pk-annotator 0.6.0 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import{n as e}from"./pka-overlay-rolldown-runtime-hePW80VL.mjs";function t(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 n(e,t=`|`){return e.map(e=>se(e)).join(t)}function r(e,t){return typeof t==`bigint`?t.toString():t}var i=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function a(e){return new i(e)}function o(e){return e==null}function s(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function c(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}const l=/* @__PURE__*/ Symbol(`evaluating`);function u(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==l)return r===void 0&&(r=l,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function d(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function f(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function p(e){return f(e._zod.def)??e._zod.def.shape}function m(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return d(this,t,e),e},enumerable:!0,configurable:!0})}function h(e,t,n){t in e?d(e,t,n):e[t]=n}function g(e,t,n,r){let i=p(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?m(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):h(e,a,r?r(n.value,a):n.value))}}function ee(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?m(e,n,()=>t[n]):h(e,n,r.value))}}function _(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function te(e){return JSON.stringify(e)}function ne(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}const re=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function v(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}const ie=/* @__PURE__*/ a(()=>{if(M.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function y(e){if(v(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return v(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function ae(e){return y(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const oe=/* @__PURE__*/ new Set([`string`,`number`,`symbol`]);function b(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function x(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function S(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 se(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function ce(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}const le={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},ue={int64:[/* @__PURE__*/ BigInt(`-9223372036854775808`),/* @__PURE__*/ BigInt(`9223372036854775807`)],uint64:[/* @__PURE__*/ BigInt(0),/* @__PURE__*/ BigInt(`18446744073709551615`)]};function de(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return g(i,e,fe(e,t)),x(e,_(n,{shape:i,checks:[]}))}function fe(e,t){let n=p(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function pe(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(fe(e,t)),a={};return g(a,e,Reflect.ownKeys(p(e)).filter(e=>!i.has(e))),x(e,_(n,{shape:a,checks:[]}))}function me(e,t){if(!y(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=p(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return x(e,_(e._zod.def,{shape:he(e,t)}))}function he(e,t){let n={};return g(n,e,Reflect.ownKeys(p(e))),ee(n,t),n}function ge(e,t){if(!y(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return x(e,_(e._zod.def,{shape:he(e,t)}))}function _e(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return g(n,e,Reflect.ownKeys(p(e))),g(n,t,Reflect.ownKeys(p(t))),x(e,_(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function ve(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(fe(t,n)):void 0,o={};return g(o,t,Reflect.ownKeys(p(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),x(t,_(t._zod.def,{shape:o,checks:[]}))}function ye(e,t,n){let r=n?new Set(fe(t,n)):void 0,i={};return g(i,t,Reflect.ownKeys(p(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),x(t,_(t._zod.def,{shape:i}))}function C(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function be(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function w(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function xe(e){return typeof e==`string`?e:e?.message}function Se(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function T(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:xe(e.inst?._zod.def?.error?.(e))??xe(a?.(e))??xe(t?.error?.(e))??xe(n.customError?.(e))??xe(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}const Ce=/[\uD800-\uDBFF]/;function we(e){let t=e.length;if(!Ce.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function Te(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Ee(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function E(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function De(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Ae(e,n,r.value)}}function D(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function Oe(e,t,n){return D(e,t,n,!1)}function ke(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return D(this,n,r(this))},set(e){D(this,n,e)}})}return t}function Ae(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:D(this,t,n.bind(this))},set(e){D(this,t,e)}})}function je(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}let Me,O=!1;const Ne={configurable:!0,get(){O=!0}};function k(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&Me!==e._zod){Me=void 0;return}Me=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Ne);let e=O;O=!1;try{let r=n(this);return O?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),O||=e,r}catch(n){throw delete this[t],O||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function Pe(e,t,n,r){let i=je(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}function Fe(e){let t=()=>e;return t[`~constantCatch`]=!0,t}var Ie;const Le={value:void 0,enumerable:!1};let Re=`captureStackTrace`in Error?Error:null;function ze(e){let t=Re;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return Re=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function A(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=/* @__PURE__ */ new Set}a.prototype=i;let o=n,s=o&&/* @__PURE__ */ new WeakSet;function c(n,r){if(!n._zod){Le.value=new a(r);try{Object.defineProperty(n,"_zod",Le)}finally{Le.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),De(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?ze(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var j=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Be=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(Ie=globalThis).__zod_globalConfig??(Ie.__zod_globalConfig={});const M=globalThis.__zod_globalConfig;function N(e){return e&&Object.assign(M,e),M}function Ve(){let e=this._zod;return e.message??=JSON.stringify(e.def,r,2),e.message}function He(e){this._zod.message=e}const Ue={get:Ve,set:He,enumerable:!0,configurable:!0},We={value:void 0,enumerable:!1},Ge=/* @__PURE__ */ new WeakSet([Object.prototype,Error.prototype]),Ke=(e,t)=>{e.name=`$ZodError`,We.value=t,Object.defineProperty(e,"issues",We),We.value=void 0,Object.defineProperty(e,"message",Ue);let n=Object.getPrototypeOf(e);Ge.has(n)||(Ge.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},qe=A(`$ZodError`,Ke);A(`$ZodError`,Ke,void 0,{Parent:Error});function Je(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function Ye(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Je(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Xe(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function Ze(e){let t=[],n=e.map(e=>typeof e==`object`?e.key:e);for(let e of n)typeof e==`number`?t.push(`[${e}]`):typeof e==`symbol`?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push(`.`),t.push(e));return t.join(``)}function Qe(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 ${Ze(e.path)}`);return t.join(`
1
+ import{a as e}from"./pka-overlay-agent-art-BKBtrWqF.mjs";function t(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 n(e,t=`|`){return e.map(e=>se(e)).join(t)}function r(e,t){return typeof t==`bigint`?t.toString():t}var i=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function a(e){return new i(e)}function o(e){return e==null}function s(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function c(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}const l=/* @__PURE__*/ Symbol(`evaluating`);function u(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==l)return r===void 0&&(r=l,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function d(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function f(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function p(e){return f(e._zod.def)??e._zod.def.shape}function m(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return d(this,t,e),e},enumerable:!0,configurable:!0})}function h(e,t,n){t in e?d(e,t,n):e[t]=n}function g(e,t,n,r){let i=p(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?m(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):h(e,a,r?r(n.value,a):n.value))}}function ee(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?m(e,n,()=>t[n]):h(e,n,r.value))}}function _(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function te(e){return JSON.stringify(e)}function ne(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}const re=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function v(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}const ie=/* @__PURE__*/ a(()=>{if(M.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function y(e){if(v(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return v(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function ae(e){return y(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const oe=/* @__PURE__*/ new Set([`string`,`number`,`symbol`]);function b(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function x(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function S(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 se(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function ce(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}const le={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},ue={int64:[/* @__PURE__*/ BigInt(`-9223372036854775808`),/* @__PURE__*/ BigInt(`9223372036854775807`)],uint64:[/* @__PURE__*/ BigInt(0),/* @__PURE__*/ BigInt(`18446744073709551615`)]};function de(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return g(i,e,fe(e,t)),x(e,_(n,{shape:i,checks:[]}))}function fe(e,t){let n=p(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function pe(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(fe(e,t)),a={};return g(a,e,Reflect.ownKeys(p(e)).filter(e=>!i.has(e))),x(e,_(n,{shape:a,checks:[]}))}function me(e,t){if(!y(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=p(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return x(e,_(e._zod.def,{shape:he(e,t)}))}function he(e,t){let n={};return g(n,e,Reflect.ownKeys(p(e))),ee(n,t),n}function ge(e,t){if(!y(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return x(e,_(e._zod.def,{shape:he(e,t)}))}function _e(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return g(n,e,Reflect.ownKeys(p(e))),g(n,t,Reflect.ownKeys(p(t))),x(e,_(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function ve(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(fe(t,n)):void 0,o={};return g(o,t,Reflect.ownKeys(p(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),x(t,_(t._zod.def,{shape:o,checks:[]}))}function ye(e,t,n){let r=n?new Set(fe(t,n)):void 0,i={};return g(i,t,Reflect.ownKeys(p(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),x(t,_(t._zod.def,{shape:i}))}function C(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function be(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function w(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function xe(e){return typeof e==`string`?e:e?.message}function Se(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function T(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:xe(e.inst?._zod.def?.error?.(e))??xe(a?.(e))??xe(t?.error?.(e))??xe(n.customError?.(e))??xe(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}const Ce=/[\uD800-\uDBFF]/;function we(e){let t=e.length;if(!Ce.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function Te(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Ee(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function E(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function De(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Ae(e,n,r.value)}}function D(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function Oe(e,t,n){return D(e,t,n,!1)}function ke(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return D(this,n,r(this))},set(e){D(this,n,e)}})}return t}function Ae(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:D(this,t,n.bind(this))},set(e){D(this,t,e)}})}function je(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}let Me,O=!1;const Ne={configurable:!0,get(){O=!0}};function k(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&Me!==e._zod){Me=void 0;return}Me=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Ne);let e=O;O=!1;try{let r=n(this);return O?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),O||=e,r}catch(n){throw delete this[t],O||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function Pe(e,t,n,r){let i=je(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}function Fe(e){let t=()=>e;return t[`~constantCatch`]=!0,t}var Ie;const Le={value:void 0,enumerable:!1};let Re=`captureStackTrace`in Error?Error:null;function ze(e){let t=Re;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return Re=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function A(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=/* @__PURE__ */ new Set}a.prototype=i;let o=n,s=o&&/* @__PURE__ */ new WeakSet;function c(n,r){if(!n._zod){Le.value=new a(r);try{Object.defineProperty(n,"_zod",Le)}finally{Le.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),De(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?ze(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var j=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Be=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(Ie=globalThis).__zod_globalConfig??(Ie.__zod_globalConfig={});const M=globalThis.__zod_globalConfig;function N(e){return e&&Object.assign(M,e),M}function Ve(){let e=this._zod;return e.message??=JSON.stringify(e.def,r,2),e.message}function He(e){this._zod.message=e}const Ue={get:Ve,set:He,enumerable:!0,configurable:!0},We={value:void 0,enumerable:!1},Ge=/* @__PURE__ */ new WeakSet([Object.prototype,Error.prototype]),Ke=(e,t)=>{e.name=`$ZodError`,We.value=t,Object.defineProperty(e,"issues",We),We.value=void 0,Object.defineProperty(e,"message",Ue);let n=Object.getPrototypeOf(e);Ge.has(n)||(Ge.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},qe=A(`$ZodError`,Ke);A(`$ZodError`,Ke,void 0,{Parent:Error});function Je(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function Ye(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Je(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Xe(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function Ze(e){let t=[],n=e.map(e=>typeof e==`object`?e.key:e);for(let e of n)typeof e==`number`?t.push(`[${e}]`):typeof e==`symbol`?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push(`.`),t.push(e));return t.join(``)}function Qe(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 ${Ze(e.path)}`);return t.join(`
2
2
  `)}function $e(e,t){return{callee:t?.callee??e,Err:t?.Err}}const et=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new j;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>T(e,o,N())));throw re(n,a?.callee??t),n}return s.value};return t},tt=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>T(e,o,N())));throw re(n,a?.callee??t),n}return s.value};return t},nt=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 j;return a.issues.length?rt(e,a.issues,i):{success:!0,data:a.value}};function rt(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>T(e,n,N()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}const it=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?rt(e,a.issues,i):{success:!0,data:a.value}},at=/* @__PURE__ */ Symbol.for(`zod.compile.invalid`),ot=/* @__PURE__ */ Symbol.for(`zod.compile.fallback`),st=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==at)return!0;if(r.definite===!0&&n===void 0)return!1}return ct(e,t,n)});function ct(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[ot]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new j;return a.issues.length===0}const lt=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},ut=e=>{let t=et(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,$e(n,a))};return n},dt=e=>{let t=et(e),n=(e,r,i,a)=>t(e,r,i,$e(n,a));return n},ft=e=>{let t=tt(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,$e(n,a))};return n},pt=e=>{let t=tt(e),n=async(e,r,i,a)=>await t(e,r,i,$e(n,a));return n},mt=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return nt(e)(t,n,i)},ht=e=>(t,n,r)=>nt(e)(t,n,r),gt=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return it(e)(t,n,i)},_t=e=>async(t,n,r)=>it(e)(t,n,r),vt=/^[cC][0-9a-z]{6,}$/,yt=/^[0-9a-z]+$/,bt=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,xt=/^[0-9a-vA-V]{20}$/,St=/^[A-Za-z0-9]{27}$/,Ct=/^[a-zA-Z0-9_-]{21}$/;function wt(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}const Tt=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Et=/^([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})$/,Dt=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Ot=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;function kt(){return/* @__PURE__ */ RegExp(`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`,`u`)}const At=/^(?:(?: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])$/,jt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Mt=/^((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])$/,Nt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Pt=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ft=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,It=/^https?$/,Lt=/^\+[1-9]\d{6,14}$/,Rt=`(?:(?:\\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])))`;function zt(e){return RegExp(`^${e}$`)}const Bt=/*@__PURE__*/ zt(Rt);function Vt(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}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Ht(e){return RegExp(`^${Vt(e)}$`)}function Ut(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${Vt({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${Vt({precision:e.precision})}`:n;return RegExp(`^${Rt}T(?:${r})$`)}const Wt=/^[\s\S]{0,}$/,Gt=/^-?\d+$/,Kt=/^-?\d+(?:\.\d+)?$/,qt=/^(?:true|false)$/i,Jt=/^null$/i,Yt=/^[^A-Z]*$/,Xt=/^[^a-z]*$/,P=/*@__PURE__*/ A(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Zt=e=>{let t=e.value;return!o(t)&&t.length!==void 0},Qt={number:`number`,bigint:`bigint`,object:`date`},$t=/*@__PURE__*/ A(`$ZodCheckLessThan`,(e,t)=>{P.init(e,t);let n=Qt[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:Qt[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),en=/*@__PURE__*/ A(`$ZodCheckGreaterThan`,(e,t)=>{P.init(e,t);let n=Qt[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Qt[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),tn=/*@__PURE__*/ A(`$ZodCheckMultipleOf`,(e,t)=>{P.init(e,t),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`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):c(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})}}),nn=/*@__PURE__*/ A(`$ZodCheckNumberFormat`,(e,t)=>{P.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=le[t.format];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`,continue:!1,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,inclusive:!0,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,inclusive:!0,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,inclusive:!0,inst:e,continue:!t.abort})}}),rn=/*@__PURE__*/ A(`$ZodCheckMaxLength`,(e,t)=>{var n;P.init(e,t),(n=e._zod.def).when??(n.when=Zt),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?we(r):i)<=t.maximum)return;let a=Te(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),an=/*@__PURE__*/ A(`$ZodCheckMinLength`,(e,t)=>{var n;P.init(e,t),(n=e._zod.def).when??(n.when=Zt),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?we(r):i)>=t.minimum)return;let a=Te(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),on=/*@__PURE__*/ A(`$ZodCheckLengthEquals`,(e,t)=>{var n;P.init(e,t),(n=e._zod.def).when??(n.when=Zt),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?we(r):i;if(a===t.length)return;let o=Te(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),sn=/*@__PURE__*/ A(`$ZodCheckStringFormat`,(e,t)=>{var n,r;P.init(e,t),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=/*@__PURE__*/ 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=/*@__PURE__*/ A(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Yt,sn.init(e,t)}),un=/*@__PURE__*/ A(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Xt,sn.init(e,t)}),dn=/*@__PURE__*/ A(`$ZodCheckIncludes`,(e,t)=>{P.init(e,t);let n=b(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),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=/*@__PURE__*/ A(`$ZodCheckStartsWith`,(e,t)=>{P.init(e,t);let n=RegExp(`^${b(t.prefix)}.*`);t.pattern??=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=/*@__PURE__*/ A(`$ZodCheckEndsWith`,(e,t)=>{P.init(e,t);let n=RegExp(`.*${b(t.suffix)}$`);t.pattern??=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=/*@__PURE__*/ A(`$ZodCheckOverwrite`,(e,t)=>{P.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});var hn=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
3
3
  `).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?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(`
4
4
  `)}\n};`)(...Object.values(this.closed))}};const gn={major:4,minor:6,patch:5},F=/*@__PURE__*/ A(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=gn;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=C(t),a;for(let o of n){if(o._zod.def.when){if(be(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new j;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(Se(t.issues,n,e),i||=C(t,n))});else{if(t.issues.length===n)continue;Se(t.issues,n,e),i||=C(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(C(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new j;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new j;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return Oe(this,`~standard`,yn(this))},set"~standard"(e){D(this,`~standard`,e)}}),_n=(e,t)=>e.issues.length?{issues:e.issues.map(e=>T(e,t,N()))}:{value:e.value};async function vn(e,t){let n={async:!0};return _n(await e._zod.run({value:t,issues:[]},n),n)}function yn(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return _n(r,n)}catch{}return vn(e,t)},vendor:`zod`,version:1}}const bn=/*@__PURE__*/ A(`$ZodString`,(e,t)=>{F.init(e,t),e._zod.pattern=t.pattern??Wt,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}}),I=/*@__PURE__*/ A(`$ZodStringFormat`,(e,t)=>{sn.init(e,t),bn.init(e,t)}),xn=/*@__PURE__*/ A(`$ZodGUID`,(e,t)=>{t.pattern??=Et,I.init(e,t)}),Sn=/*@__PURE__*/ 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??=Dt(e)}else t.pattern??=Dt();I.init(e,t)}),Cn=/*@__PURE__*/ A(`$ZodEmail`,(e,t)=>{t.pattern??=Ot,I.init(e,t)});function wn(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Tn(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?wn(e)||2:En(e,t)}function En(e,t){if(!t.normalize&&t.protocol?.source===It.source&&!/^https?:\/\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}const Dn=/[\t\n\r]/g;function On(e){return e.replace(Dn,``)}function kn(e,t){return t.lastIndex=0,t.test(e.hostname)}function An(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}const jn=/*@__PURE__*/ A(`$ZodURL`,(e,t)=>{I.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=Tn(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=On(r);return}t.hostname&&!kn(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!An(i,t.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=t.normalize?i.href:On(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Mn=/*@__PURE__*/ A(`$ZodEmoji`,(e,t)=>{t.pattern??=kt(),I.init(e,t)}),Nn=/*@__PURE__*/ A(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?Ct:wt(t.length),I.init(e,t)}),Pn=/*@__PURE__*/ A(`$ZodCUID`,(e,t)=>{t.pattern??=vt,I.init(e,t)}),Fn=/*@__PURE__*/ A(`$ZodCUID2`,(e,t)=>{t.pattern??=yt,I.init(e,t)}),In=/*@__PURE__*/ A(`$ZodULID`,(e,t)=>{t.pattern??=bt,I.init(e,t)}),Ln=/*@__PURE__*/ A(`$ZodXID`,(e,t)=>{t.pattern??=xt,I.init(e,t)}),Rn=/*@__PURE__*/ A(`$ZodKSUID`,(e,t)=>{t.pattern??=St,I.init(e,t)}),zn=/*@__PURE__*/ A(`$ZodISODateTime`,(e,t)=>{t.pattern??=Ut(t),I.init(e,t)}),Bn=/*@__PURE__*/ A(`$ZodISODate`,(e,t)=>{t.pattern??=Bt,I.init(e,t)}),Vn=/*@__PURE__*/ A(`$ZodISOTime`,(e,t)=>{t.pattern??=Ht(t),I.init(e,t)}),Hn=/*@__PURE__*/ A(`$ZodISODuration`,(e,t)=>{t.pattern??=Tt,I.init(e,t)}),Un=/*@__PURE__*/ A(`$ZodIPv4`,(e,t)=>{t.pattern??=At,I.init(e,t)}),Wn=/^[0-9a-fA-F:.]+$/;function Gn(e){return Wn.test(e)?wn(`http://[${e}]`):!1}const Kn=/*@__PURE__*/ A(`$ZodIPv6`,(e,t)=>{t.pattern??=jt,I.init(e,t),e._zod.check=n=>{Gn(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),qn=/*@__PURE__*/ A(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Mt,I.init(e,t)});function Jn(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:Gn(n)}const Yn=/*@__PURE__*/ A(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Nt,I.init(e,t),e._zod.check=n=>{Jn(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function Xn(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const Zn=/^[0-9a-zA-Z+/]*={0,2}$/,Qn=/*@__PURE__*/ A(`$ZodBase64`,(e,t)=>{t.pattern??=Zn,I.init(e,t),e._zod.check=n=>{Xn(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),$n=/^[A-Za-z0-9_-]*$/;function er(e){if(!$n.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Xn(t.padEnd(Math.ceil(t.length/4)*4,`=`))}const tr=/*@__PURE__*/ A(`$ZodBase64URL`,(e,t)=>{t.pattern??=$n,I.init(e,t),e._zod.check=n=>{er(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),nr=/*@__PURE__*/ A(`$ZodE164`,(e,t)=>{t.pattern??=Lt,I.init(e,t)});function rr(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}}const ir=/*@__PURE__*/ A(`$ZodJWT`,(e,t)=>{I.init(e,t),e._zod.check=n=>{rr(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),ar=/*@__PURE__*/ A(`$ZodNumber`,(e,t)=>{F.init(e,t),e._zod.pattern=Kt,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:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),or=/*@__PURE__*/ A(`$ZodNumberFormat`,(e,t)=>{nn.init(e,t),ar.init(e,t)}),sr=/*@__PURE__*/ A(`$ZodBoolean`,(e,t)=>{F.init(e,t),e._zod.pattern=qt,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}}),cr=/*@__PURE__*/ A(`$ZodNull`,(e,t)=>{F.init(e,t),e._zod.pattern=Jt,e._zod.values=/* @__PURE__ */ 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}}),lr=/*@__PURE__*/ A(`$ZodUnknown`,(e,t)=>{F.init(e,t),e._zod.parse=e=>e}),ur=/*@__PURE__*/ A(`$ZodNever`,(e,t)=>{F.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function dr(e,t,n){e.issues.length&&t.issues.push(...w(n,e.issues)),t.value[n]=e.value}const fr=/*@__PURE__*/ A(`$ZodArray`,(e,t)=>{F.init(e,t);let n=M.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>dr(t,r,e)));else if(dr(c,r,e),s&&c.issues.length!==0&&C(c))break}return o.length?Promise.all(o).then(()=>r):r}});function pr(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...w(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}const mr=[];function hr(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:mr,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=ce(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function gr(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(C(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>pr(e,n,i,t,d,f))):pr(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}const _r=/*@__PURE__*/ A(`$ZodObject`,(e,t)=>{F.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=a(()=>hr(t));k(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||d(n,e,/* @__PURE__ */ new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let o=v,s=t.catchall,c,l=M.memoizer;l?.attach(e),e._zod.parse=(t,n)=>{c??=i.value;let r=t.value;if(!o(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=l?l.alloc(e,t,{},n):{};let a=[],u=c.shape,d=n?.abortEarly,f=t.issues.length;for(let e of c.allKeys){if(d&&t.issues.length!==f){if(C(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],o=i._zod.optin,s=i._zod.optout,c=i._zod.run({value:r[e],issues:[]},n);c instanceof Promise?a.push(c.then(n=>pr(n,t,e,r,o,s))):pr(c,t,e,r,o,s)}return s?gr(a,r,t,n,i.value,e,d===!0):a.length?Promise.all(a).then(()=>t):t}}),vr=/*@__PURE__*/ A(`$ZodObjectJIT`,(e,t)=>{_r.init(e,t);let n=e._zod.parse,r=a(()=>hr(t)),i=M.memoizer,o=t=>{let n=r.value,a=n.symbolKeys,o=new hn([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`