frameboard 0.44.0 → 0.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
- (function(){let e=`data-frameboard`;function t(e,t){e.setAttribute(`data-theme`,t),e.style.colorScheme=t,e.classList.toggle(`dark`,t===`dark`),e.classList.toggle(`light`,t===`light`)}function n(t){return[...t.querySelectorAll(`*`)].filter(t=>!t.hasAttribute(e))}function r(e,t){let r=n(e).indexOf(t);return r===-1?null:r}function i(e,t){return n(e)[t]??null}function a(e){return e.querySelector(`style[data-frameboard]`)?.getAttribute(`data-hash`)??null}function o(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 s(e,t=`|`){return e.map(e=>de(e)).join(t)}function c(e,t){return typeof t==`bigint`?t.toString():t}var l=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 u(e){return new l(e)}function d(e){return e==null}function f(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function p(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}function m(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function h(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function g(e){return h(e._zod.def)??e._zod.def.shape}function _(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return m(this,t,e),e},enumerable:!0,configurable:!0})}function ee(e,t,n){t in e?m(e,t,n):e[t]=n}function v(e,t,n,r){let i=g(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?_(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):ee(e,a,r?r(n.value,a):n.value))}}function te(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?_(e,n,()=>t[n]):ee(e,n,r.value))}}function y(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function ne(e){return JSON.stringify(e)}function re(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}let ie=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function ae(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}let oe=/* @__PURE__*/ u(()=>{if(O.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function se(e){if(ae(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return ae(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function ce(e){return se(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}let le=/* @__PURE__*/ new Set([`string`,`number`,`symbol`]);function ue(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function b(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function x(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 de(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function fe(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}let pe={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},me={int64:[/* @__PURE__*/ BigInt(`-9223372036854775808`),/* @__PURE__*/ BigInt(`9223372036854775807`)],uint64:[/* @__PURE__*/ BigInt(0),/* @__PURE__*/ BigInt(`18446744073709551615`)]};function he(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 v(i,e,ge(e,t)),b(e,y(n,{shape:i,checks:[]}))}function ge(e,t){let n=g(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 _e(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(ge(e,t)),a={};return v(a,e,Reflect.ownKeys(g(e)).filter(e=>!i.has(e))),b(e,y(n,{shape:a,checks:[]}))}function ve(e,t){if(!se(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=g(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 b(e,y(e._zod.def,{shape:ye(e,t)}))}function ye(e,t){let n={};return v(n,e,Reflect.ownKeys(g(e))),te(n,t),n}function be(e,t){if(!se(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return b(e,y(e._zod.def,{shape:ye(e,t)}))}function xe(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 v(n,e,Reflect.ownKeys(g(e))),v(n,t,Reflect.ownKeys(g(t))),b(e,y(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Se(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(ge(t,n)):void 0,o={};return v(o,t,Reflect.ownKeys(g(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),b(t,y(t._zod.def,{shape:o,checks:[]}))}function Ce(e,t,n){let r=n?new Set(ge(t,n)):void 0,i={};return v(i,t,Reflect.ownKeys(g(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),b(t,y(t._zod.def,{shape:i}))}function S(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 we(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 Te(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 De(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function Oe(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function ke(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:Ee(e.inst?._zod.def?.error?.(e))??Ee(a?.(e))??Ee(t?.error?.(e))??Ee(n.customError?.(e))??Ee(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}let Ae=/[\uD800-\uDBFF]/;function je(e){let t=e.length;if(!Ae.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 Me(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Ne(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 Pe(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function Fe(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Re(e,n,r.value)}}function C(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function Ie(e,t,n){return C(e,t,n,!1)}/* @__NO_SIDE_EFFECTS__ */
2
- function Le(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return C(this,n,r(this))},set(e){C(this,n,e)}})}return t}function Re(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:C(this,t,n.bind(this))},set(e){C(this,t,e)}})}function ze(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}let Be,w=!1,Ve={configurable:!0,get(){w=!0}};function T(e,t,n){let r=Object.getPrototypeOf(e._zod);t in r&&Be!==e._zod?Be=void 0:(Be=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Ve);let e=w;w=!1;try{let r=n(this);return w?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),w||=e,r}catch(n){throw delete this[t],w||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}function He(e,t,n,r){let i=ze(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 Ue(e){let t=()=>e;return t[`~constantCatch`]=!0,t}var We;let Ge={value:void 0,enumerable:!1},Ke=`captureStackTrace`in Error?Error:null;function qe(e){let t=Ke;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return Ke=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}/* @__NO_SIDE_EFFECTS__ */
3
- function E(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){Ge.value=new a(r);try{Object.defineProperty(n,"_zod",Ge)}finally{Ge.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),Fe(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?qe(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 D=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Je=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(We=globalThis).__zod_globalConfig??(We.__zod_globalConfig={});let O=globalThis.__zod_globalConfig;function k(e){return e&&Object.assign(O,e),O}function Ye(){let e=this._zod;return e.message??=JSON.stringify(e.def,c,2),e.message}function Xe(e){this._zod.message=e}let Ze={get:Ye,set:Xe,enumerable:!0,configurable:!0},Qe={value:void 0,enumerable:!1},$e=/* @__PURE__ */ new WeakSet([Object.prototype,Error.prototype]),et=/* @__PURE__ */ E(`$ZodError`,(e,t)=>{e.name=`$ZodError`,Qe.value=t,Object.defineProperty(e,"issues",Qe),Qe.value=void 0,Object.defineProperty(e,"message",Ze);let n=Object.getPrototypeOf(e);$e.has(n)||($e.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})}}))});function tt(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 nt(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?tt(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function rt(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 it(e,t){return{callee:t?.callee??e,Err:t?.Err}}let at=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 D;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>ke(e,o,k())));throw ie(n,a?.callee??t),n}return s.value};return t},ot=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=>ke(e,o,k())));throw ie(n,a?.callee??t),n}return s.value};return t},st=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 D;return a.issues.length?ct(e,a.issues,i):{success:!0,data:a.value}};function ct(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>ke(e,n,k()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}let lt=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?ct(e,a.issues,i):{success:!0,data:a.value}},ut=/* @__PURE__ */ Symbol.for(`zod.compile.invalid`),dt=/* @__PURE__ */ Symbol.for(`zod.compile.fallback`),ft=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==ut)return!0;if(r.definite===!0&&n===void 0)return!1}return pt(e,t,n)});function pt(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[dt]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new D;return a.issues.length===0}let mt=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},ht=e=>{let t=at(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,it(n,a))};return n},gt=e=>{let t=at(e),n=(e,r,i,a)=>t(e,r,i,it(n,a));return n},_t=e=>{let t=ot(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,it(n,a))};return n},vt=e=>{let t=ot(e),n=async(e,r,i,a)=>await t(e,r,i,it(n,a));return n},yt=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return st(e)(t,n,i)},bt=e=>(t,n,r)=>st(e)(t,n,r),xt=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return lt(e)(t,n,i)},St=e=>async(t,n,r)=>lt(e)(t,n,r),Ct=/^[cC][0-9a-z]{6,}$/,wt=/^[0-9a-z]+$/,Tt=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Et=/^[0-9a-vA-V]{20}$/,Dt=/^[A-Za-z0-9]{27}$/,Ot=/^[a-zA-Z0-9_-]{21}$/;function kt(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}let At=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,jt=/^([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})$/,Mt=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)$/,Nt=/^(?:[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 Pt(){return RegExp(`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`,`u`)}let Ft=/^(?:(?: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])$/,It=/^(([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}|:))$/,Lt=/^((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])$/,Rt=/^(([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])$/,zt=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Bt=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,Vt=/^https?$/,Ht=/^\+[1-9]\d{6,14}$/,Ut=`(?:(?:\\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 Wt(e){return RegExp(`^${e}$`)}let Gt=/*@__PURE__*/ Wt(Ut);function Kt(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 qt(e){return RegExp(`^${Kt(e)}$`)}function Jt(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${Kt({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${Kt({precision:e.precision})}`:n;return RegExp(`^${Ut}T(?:${r})$`)}let Yt=/^[\s\S]{0,}$/,Xt=/^-?\d+(?:\.\d+)?$/,Zt=/^(?:true|false)$/i,Qt=/^null$/i,$t=/^[^A-Z]*$/,en=/^[^a-z]*$/,A=/*@__PURE__*/ E(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),tn=e=>{let t=e.value;return!d(t)&&t.length!==void 0},nn={number:`number`,bigint:`bigint`,object:`date`},rn=/*@__PURE__*/ E(`$ZodCheckLessThan`,(e,t)=>{A.init(e,t);let n=nn[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:nn[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})}}),an=/*@__PURE__*/ E(`$ZodCheckGreaterThan`,(e,t)=>{A.init(e,t);let n=nn[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:nn[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})}}),on=/*@__PURE__*/ E(`$ZodCheckMultipleOf`,(e,t)=>{A.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):p(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})}}),sn=/*@__PURE__*/ E(`$ZodCheckNumberFormat`,(e,t)=>{A.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=pe[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})}}),cn=/*@__PURE__*/ E(`$ZodCheckMaxLength`,(e,t)=>{var n;A.init(e,t),(n=e._zod.def).when??(n.when=tn),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?je(r):i)<=t.maximum)return;let a=Me(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ln=/*@__PURE__*/ E(`$ZodCheckMinLength`,(e,t)=>{var n;A.init(e,t),(n=e._zod.def).when??(n.when=tn),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?je(r):i)>=t.minimum)return;let a=Me(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),un=/*@__PURE__*/ E(`$ZodCheckLengthEquals`,(e,t)=>{var n;A.init(e,t),(n=e._zod.def).when??(n.when=tn),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?je(r):i;if(a===t.length)return;let o=Me(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})}}),dn=/*@__PURE__*/ E(`$ZodCheckStringFormat`,(e,t)=>{var n,r;A.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=()=>{})}),fn=/*@__PURE__*/ E(`$ZodCheckRegex`,(e,t)=>{dn.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})}}),pn=/*@__PURE__*/ E(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=$t,dn.init(e,t)}),mn=/*@__PURE__*/ E(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=en,dn.init(e,t)}),hn=/*@__PURE__*/ E(`$ZodCheckIncludes`,(e,t)=>{A.init(e,t);let n=ue(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})}}),gn=/*@__PURE__*/ E(`$ZodCheckStartsWith`,(e,t)=>{A.init(e,t);let n=RegExp(`^${ue(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})}}),_n=/*@__PURE__*/ E(`$ZodCheckEndsWith`,(e,t)=>{A.init(e,t);let n=RegExp(`.*${ue(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})}}),vn=/*@__PURE__*/ E(`$ZodCheckOverwrite`,(e,t)=>{A.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});var yn=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(`
1
+ (function(){let e=`data-frameboard`;function t(e,t){e.setAttribute(`data-theme`,t),e.style.colorScheme=t,e.classList.toggle(`dark`,t===`dark`),e.classList.toggle(`light`,t===`light`)}function n(t){return[...t.querySelectorAll(`*`)].filter(t=>!t.hasAttribute(e))}function r(e,t){let r=n(e).indexOf(t);return r===-1?null:r}function i(e,t){return n(e)[t]??null}function a(e){return e.querySelector(`style[data-frameboard]`)?.getAttribute(`data-hash`)??null}function o(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 s(e,t=`|`){return e.map(e=>de(e)).join(t)}function c(e,t){return typeof t==`bigint`?t.toString():t}var l=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 u(e){return new l(e)}function d(e){return e==null}function f(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function p(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}function m(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function h(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function g(e){return h(e._zod.def)??e._zod.def.shape}function _(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return m(this,t,e),e},enumerable:!0,configurable:!0})}function ee(e,t,n){t in e?m(e,t,n):e[t]=n}function v(e,t,n,r){let i=g(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?_(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):ee(e,a,r?r(n.value,a):n.value))}}function te(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?_(e,n,()=>t[n]):ee(e,n,r.value))}}function y(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function ne(e){return JSON.stringify(e)}function re(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}let ie=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function ae(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}let oe=/* @__PURE__*/ u(()=>{if(D.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function se(e){if(ae(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return ae(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function ce(e){return se(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}let le=/* @__PURE__*/ new Set([`string`,`number`,`symbol`]);function ue(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function b(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function x(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 de(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function fe(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}let pe={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},me={int64:[/* @__PURE__*/ BigInt(`-9223372036854775808`),/* @__PURE__*/ BigInt(`9223372036854775807`)],uint64:[/* @__PURE__*/ BigInt(0),/* @__PURE__*/ BigInt(`18446744073709551615`)]};function he(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 v(i,e,ge(e,t)),b(e,y(n,{shape:i,checks:[]}))}function ge(e,t){let n=g(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 _e(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(ge(e,t)),a={};return v(a,e,Reflect.ownKeys(g(e)).filter(e=>!i.has(e))),b(e,y(n,{shape:a,checks:[]}))}function ve(e,t){if(!se(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=g(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 b(e,y(e._zod.def,{shape:ye(e,t)}))}function ye(e,t){let n={};return v(n,e,Reflect.ownKeys(g(e))),te(n,t),n}function be(e,t){if(!se(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return b(e,y(e._zod.def,{shape:ye(e,t)}))}function xe(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 v(n,e,Reflect.ownKeys(g(e))),v(n,t,Reflect.ownKeys(g(t))),b(e,y(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Se(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(ge(t,n)):void 0,o={};return v(o,t,Reflect.ownKeys(g(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),b(t,y(t._zod.def,{shape:o,checks:[]}))}function Ce(e,t,n){let r=n?new Set(ge(t,n)):void 0,i={};return v(i,t,Reflect.ownKeys(g(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),b(t,y(t._zod.def,{shape:i}))}function S(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 we(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 Te(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 De(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function Oe(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function ke(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:Ee(e.inst?._zod.def?.error?.(e))??Ee(a?.(e))??Ee(t?.error?.(e))??Ee(n.customError?.(e))??Ee(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}let Ae=/[\uD800-\uDBFF]/;function je(e){let t=e.length;if(!Ae.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 Me(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Ne(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 Pe(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function Fe(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Re(e,n,r.value)}}function C(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function Ie(e,t,n){return C(e,t,n,!1)}/* @__NO_SIDE_EFFECTS__ */
2
+ function Le(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return C(this,n,r(this))},set(e){C(this,n,e)}})}return t}function Re(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:C(this,t,n.bind(this))},set(e){C(this,t,e)}})}function ze(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}let Be,Ve=!1,He={configurable:!0,get(){Ve=!0}};function w(e,t,n){let r=Object.getPrototypeOf(e._zod);t in r&&Be!==e._zod?Be=void 0:(Be=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,He);let e=Ve;Ve=!1;try{let r=n(this);return Ve?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),Ve||=e,r}catch(n){throw delete this[t],Ve||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}function Ue(e,t,n,r){let i=ze(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 We(e){let t=()=>e;return t[`~constantCatch`]=!0,t}var Ge;let Ke={value:void 0,enumerable:!1},qe=`captureStackTrace`in Error?Error:null;function Je(e){let t=qe;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return qe=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}/* @__NO_SIDE_EFFECTS__ */
3
+ function T(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){Ke.value=new a(r);try{Object.defineProperty(n,"_zod",Ke)}finally{Ke.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),Fe(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?Je(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 E=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Ye=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(Ge=globalThis).__zod_globalConfig??(Ge.__zod_globalConfig={});let D=globalThis.__zod_globalConfig;function O(e){return e&&Object.assign(D,e),D}function Xe(){let e=this._zod;return e.message??=JSON.stringify(e.def,c,2),e.message}function Ze(e){this._zod.message=e}let Qe={get:Xe,set:Ze,enumerable:!0,configurable:!0},$e={value:void 0,enumerable:!1},et=/* @__PURE__ */ new WeakSet([Object.prototype,Error.prototype]),tt=/* @__PURE__ */ T(`$ZodError`,(e,t)=>{e.name=`$ZodError`,$e.value=t,Object.defineProperty(e,"issues",$e),$e.value=void 0,Object.defineProperty(e,"message",Qe);let n=Object.getPrototypeOf(e);et.has(n)||(et.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})}}))});function nt(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 rt(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?nt(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function it(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 at(e,t){return{callee:t?.callee??e,Err:t?.Err}}let ot=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 E;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>ke(e,o,O())));throw ie(n,a?.callee??t),n}return s.value};return t},st=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=>ke(e,o,O())));throw ie(n,a?.callee??t),n}return s.value};return t},ct=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 E;return a.issues.length?lt(e,a.issues,i):{success:!0,data:a.value}};function lt(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>ke(e,n,O()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}let ut=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?lt(e,a.issues,i):{success:!0,data:a.value}},dt=/* @__PURE__ */ Symbol.for(`zod.compile.invalid`),ft=/* @__PURE__ */ Symbol.for(`zod.compile.fallback`),pt=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==dt)return!0;if(r.definite===!0&&n===void 0)return!1}return mt(e,t,n)});function mt(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[ft]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new E;return a.issues.length===0}let ht=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},gt=e=>{let t=ot(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,at(n,a))};return n},_t=e=>{let t=ot(e),n=(e,r,i,a)=>t(e,r,i,at(n,a));return n},vt=e=>{let t=st(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,at(n,a))};return n},yt=e=>{let t=st(e),n=async(e,r,i,a)=>await t(e,r,i,at(n,a));return n},bt=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return ct(e)(t,n,i)},xt=e=>(t,n,r)=>ct(e)(t,n,r),St=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return ut(e)(t,n,i)},Ct=e=>async(t,n,r)=>ut(e)(t,n,r),wt=/^[cC][0-9a-z]{6,}$/,Tt=/^[0-9a-z]+$/,Et=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Dt=/^[0-9a-vA-V]{20}$/,Ot=/^[A-Za-z0-9]{27}$/,kt=/^[a-zA-Z0-9_-]{21}$/;function At(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}let jt=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Mt=/^([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})$/,Nt=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)$/,Pt=/^(?:[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 Ft(){return RegExp(`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`,`u`)}let It=/^(?:(?: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])$/,Lt=/^(([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}|:))$/,Rt=/^((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])$/,zt=/^(([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])$/,Bt=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Vt=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,Ht=/^https?$/,Ut=/^\+[1-9]\d{6,14}$/,Wt=`(?:(?:\\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 Gt(e){return RegExp(`^${e}$`)}let Kt=/*@__PURE__*/ Gt(Wt);function qt(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 Jt(e){return RegExp(`^${qt(e)}$`)}function Yt(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${qt({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${qt({precision:e.precision})}`:n;return RegExp(`^${Wt}T(?:${r})$`)}let Xt=/^[\s\S]{0,}$/,Zt=/^-?\d+(?:\.\d+)?$/,Qt=/^(?:true|false)$/i,$t=/^null$/i,en=/^[^A-Z]*$/,tn=/^[^a-z]*$/,k=/*@__PURE__*/ T(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),nn=e=>{let t=e.value;return!d(t)&&t.length!==void 0},rn={number:`number`,bigint:`bigint`,object:`date`},an=/*@__PURE__*/ T(`$ZodCheckLessThan`,(e,t)=>{k.init(e,t);let n=rn[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:rn[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})}}),on=/*@__PURE__*/ T(`$ZodCheckGreaterThan`,(e,t)=>{k.init(e,t);let n=rn[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:rn[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})}}),sn=/*@__PURE__*/ T(`$ZodCheckMultipleOf`,(e,t)=>{k.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):p(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})}}),cn=/*@__PURE__*/ T(`$ZodCheckNumberFormat`,(e,t)=>{k.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=pe[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})}}),ln=/*@__PURE__*/ T(`$ZodCheckMaxLength`,(e,t)=>{var n;k.init(e,t),(n=e._zod.def).when??(n.when=nn),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?je(r):i)<=t.maximum)return;let a=Me(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),un=/*@__PURE__*/ T(`$ZodCheckMinLength`,(e,t)=>{var n;k.init(e,t),(n=e._zod.def).when??(n.when=nn),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?je(r):i)>=t.minimum)return;let a=Me(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),dn=/*@__PURE__*/ T(`$ZodCheckLengthEquals`,(e,t)=>{var n;k.init(e,t),(n=e._zod.def).when??(n.when=nn),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?je(r):i;if(a===t.length)return;let o=Me(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})}}),fn=/*@__PURE__*/ T(`$ZodCheckStringFormat`,(e,t)=>{var n,r;k.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=()=>{})}),pn=/*@__PURE__*/ T(`$ZodCheckRegex`,(e,t)=>{fn.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})}}),mn=/*@__PURE__*/ T(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=en,fn.init(e,t)}),hn=/*@__PURE__*/ T(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=tn,fn.init(e,t)}),gn=/*@__PURE__*/ T(`$ZodCheckIncludes`,(e,t)=>{k.init(e,t);let n=ue(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})}}),_n=/*@__PURE__*/ T(`$ZodCheckStartsWith`,(e,t)=>{k.init(e,t);let n=RegExp(`^${ue(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})}}),vn=/*@__PURE__*/ T(`$ZodCheckEndsWith`,(e,t)=>{k.init(e,t);let n=RegExp(`.*${ue(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})}}),yn=/*@__PURE__*/ T(`$ZodCheckOverwrite`,(e,t)=>{k.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});var bn=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(`
4
4
  `).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(`
5
- `)}\n};`)(...Object.values(this.closed))}};let bn={major:4,minor:6,patch:7},j=/*@__PURE__*/ E(`$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,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=S(t),a;for(let o of n){if(o._zod.def.when){if(we(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 D;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(Oe(t.issues,n,e),i||=S(t,n))});else{if(t.issues.length===n)continue;Oe(t.issues,n,e),i||=S(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(S(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new D;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 D;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return Ie(this,`~standard`,Cn(this))},set"~standard"(e){C(this,`~standard`,e)}}),xn=(e,t)=>e.issues.length?{issues:e.issues.map(e=>ke(e,t,k()))}:{value:e.value};async function Sn(e,t){let n={async:!0};return xn(await e._zod.run({value:t,issues:[]},n),n)}function Cn(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return xn(r,n)}catch{}return Sn(e,t)},vendor:`zod`,version:1}}let wn=/*@__PURE__*/ E(`$ZodString`,(e,t)=>{j.init(e,t),e._zod.pattern=t.pattern??Yt,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}}),M=/*@__PURE__*/ E(`$ZodStringFormat`,(e,t)=>{dn.init(e,t),wn.init(e,t)}),Tn=/*@__PURE__*/ E(`$ZodGUID`,(e,t)=>{t.pattern??=jt,M.init(e,t)}),En=/*@__PURE__*/ E(`$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??=Mt(e)}else t.pattern??=Mt();M.init(e,t)}),Dn=/*@__PURE__*/ E(`$ZodEmail`,(e,t)=>{t.pattern??=Nt,M.init(e,t)});function On(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function kn(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?On(e)||2:An(e,t)}function An(e,t){if(!t.normalize&&t.protocol?.source===Vt.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}}let jn=/[\t\n\r]/g;function Mn(e){return e.replace(jn,``)}function Nn(e,t){return t.lastIndex=0,t.test(e.hostname)}function Pn(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}let Fn=/*@__PURE__*/ E(`$ZodURL`,(e,t)=>{M.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=kn(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=Mn(r);return}t.hostname&&!Nn(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&&!Pn(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:Mn(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),In=/*@__PURE__*/ E(`$ZodEmoji`,(e,t)=>{t.pattern??=Pt(),M.init(e,t)}),Ln=/*@__PURE__*/ E(`$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?Ot:kt(t.length),M.init(e,t)}),Rn=/*@__PURE__*/ E(`$ZodCUID`,(e,t)=>{t.pattern??=Ct,M.init(e,t)}),zn=/*@__PURE__*/ E(`$ZodCUID2`,(e,t)=>{t.pattern??=wt,M.init(e,t)}),Bn=/*@__PURE__*/ E(`$ZodULID`,(e,t)=>{t.pattern??=Tt,M.init(e,t)}),Vn=/*@__PURE__*/ E(`$ZodXID`,(e,t)=>{t.pattern??=Et,M.init(e,t)}),Hn=/*@__PURE__*/ E(`$ZodKSUID`,(e,t)=>{t.pattern??=Dt,M.init(e,t)}),Un=/*@__PURE__*/ E(`$ZodISODateTime`,(e,t)=>{t.pattern??=Jt(t),M.init(e,t)}),Wn=/*@__PURE__*/ E(`$ZodISODate`,(e,t)=>{t.pattern??=Gt,M.init(e,t)}),Gn=/*@__PURE__*/ E(`$ZodISOTime`,(e,t)=>{t.pattern??=qt(t),M.init(e,t)}),Kn=/*@__PURE__*/ E(`$ZodISODuration`,(e,t)=>{t.pattern??=At,M.init(e,t)}),qn=/*@__PURE__*/ E(`$ZodIPv4`,(e,t)=>{t.pattern??=Ft,M.init(e,t)}),Jn=/^[0-9a-fA-F:.]+$/;function Yn(e){return Jn.test(e)?On(`http://[${e}]`):!1}let Xn=/*@__PURE__*/ E(`$ZodIPv6`,(e,t)=>{t.pattern??=It,M.init(e,t),e._zod.check=n=>{Yn(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),Zn=/*@__PURE__*/ E(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Lt,M.init(e,t)});function Qn(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:Yn(n)}let $n=/*@__PURE__*/ E(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Rt,M.init(e,t),e._zod.check=n=>{Qn(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function er(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}let tr=/^[0-9a-zA-Z+/]*={0,2}$/,nr=/*@__PURE__*/ E(`$ZodBase64`,(e,t)=>{t.pattern??=tr,M.init(e,t),e._zod.check=n=>{er(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),rr=/^[A-Za-z0-9_-]*$/;function ir(e){if(!rr.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return er(t.padEnd(Math.ceil(t.length/4)*4,`=`))}let ar=/*@__PURE__*/ E(`$ZodBase64URL`,(e,t)=>{t.pattern??=rr,M.init(e,t),e._zod.check=n=>{ir(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),or=/*@__PURE__*/ E(`$ZodE164`,(e,t)=>{t.pattern??=Ht,M.init(e,t)});function sr(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}}let cr=/*@__PURE__*/ E(`$ZodJWT`,(e,t)=>{M.init(e,t),e._zod.check=n=>{sr(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),lr=/*@__PURE__*/ E(`$ZodNumber`,(e,t)=>{j.init(e,t),e._zod.pattern=Xt,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}}),ur=/*@__PURE__*/ E(`$ZodNumberFormat`,(e,t)=>{sn.init(e,t),lr.init(e,t)}),dr=/*@__PURE__*/ E(`$ZodBoolean`,(e,t)=>{j.init(e,t),e._zod.pattern=Zt,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}}),fr=/*@__PURE__*/ E(`$ZodNull`,(e,t)=>{j.init(e,t),e._zod.pattern=Qt,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}}),pr=/*@__PURE__*/ E(`$ZodUnknown`,(e,t)=>{j.init(e,t),e._zod.parse=e=>e}),mr=/*@__PURE__*/ E(`$ZodNever`,(e,t)=>{j.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function hr(e,t){let n=De(e._zod.def.checks);if(!n.length)return;let r=Math.min(...n.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(n,a)=>{let o=t(n.value);if(o>r&&!a?.skipChecks&&a?.direction!==`backward`){for(let[t,r]of De(e._zod.def.checks))if(o>t&&r._zod.def.when(n)){let t=n.issues.length;return r._zod.check(n),n.issues[t].continue=!1,Oe(n.issues,t,e),n}}return i(n,a)}}let gr=e=>Array.isArray(e)?e.length:-1;function _r(e,t,n){e.issues.length&&t.issues.push(...Te(n,e.issues)),t.value[n]=e.value}let vr=/*@__PURE__*/ E(`$ZodArray`,(e,t)=>{j.init(e,t);let n=O.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=>_r(t,r,e)));else if(_r(c,r,e),s&&c.issues.length!==0&&S(c))break}return o.length?Promise.all(o).then(()=>r):r},hr(e,gr)});function yr(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(...Te(n,e.issues))}!o&&i===void 0?e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]}):e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}let br=[];function xr(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:br,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=fe(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function Sr(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(S(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=>yr(e,n,i,t,d,f))):yr(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}let Cr=/*@__PURE__*/ E(`$ZodObject`,(e,t)=>{j.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=u(()=>xr(t));T(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)||m(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 a=ae,o=t.catchall,s,c=O.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(S(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>yr(n,t,e,r,a,o))):yr(s,t,e,r,a,o)}return o?Sr(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),wr=/*@__PURE__*/ E(`$ZodObjectJIT`,(e,t)=>{Cr.init(e,t);let n=e._zod.parse,r=u(()=>xr(t)),i=O.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new yn([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`
5
+ `)}\n};`)(...Object.values(this.closed))}};let xn={major:4,minor:6,patch:7},A=/*@__PURE__*/ T(`$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,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=S(t),a;for(let o of n){if(o._zod.def.when){if(we(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 E;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(Oe(t.issues,n,e),i||=S(t,n))});else{if(t.issues.length===n)continue;Oe(t.issues,n,e),i||=S(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(S(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new E;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 E;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return Ie(this,`~standard`,wn(this))},set"~standard"(e){C(this,`~standard`,e)}}),Sn=(e,t)=>e.issues.length?{issues:e.issues.map(e=>ke(e,t,O()))}:{value:e.value};async function Cn(e,t){let n={async:!0};return Sn(await e._zod.run({value:t,issues:[]},n),n)}function wn(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return Sn(r,n)}catch{}return Cn(e,t)},vendor:`zod`,version:1}}let Tn=/*@__PURE__*/ T(`$ZodString`,(e,t)=>{A.init(e,t),e._zod.pattern=t.pattern??Xt,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}}),j=/*@__PURE__*/ T(`$ZodStringFormat`,(e,t)=>{fn.init(e,t),Tn.init(e,t)}),En=/*@__PURE__*/ T(`$ZodGUID`,(e,t)=>{t.pattern??=Mt,j.init(e,t)}),Dn=/*@__PURE__*/ T(`$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??=Nt(e)}else t.pattern??=Nt();j.init(e,t)}),On=/*@__PURE__*/ T(`$ZodEmail`,(e,t)=>{t.pattern??=Pt,j.init(e,t)});function kn(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function An(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?kn(e)||2:jn(e,t)}function jn(e,t){if(!t.normalize&&t.protocol?.source===Ht.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}}let Mn=/[\t\n\r]/g;function Nn(e){return e.replace(Mn,``)}function Pn(e,t){return t.lastIndex=0,t.test(e.hostname)}function Fn(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}let In=/*@__PURE__*/ T(`$ZodURL`,(e,t)=>{j.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=An(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=Nn(r);return}t.hostname&&!Pn(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&&!Fn(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:Nn(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Ln=/*@__PURE__*/ T(`$ZodEmoji`,(e,t)=>{t.pattern??=Ft(),j.init(e,t)}),Rn=/*@__PURE__*/ T(`$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?kt:At(t.length),j.init(e,t)}),zn=/*@__PURE__*/ T(`$ZodCUID`,(e,t)=>{t.pattern??=wt,j.init(e,t)}),Bn=/*@__PURE__*/ T(`$ZodCUID2`,(e,t)=>{t.pattern??=Tt,j.init(e,t)}),Vn=/*@__PURE__*/ T(`$ZodULID`,(e,t)=>{t.pattern??=Et,j.init(e,t)}),Hn=/*@__PURE__*/ T(`$ZodXID`,(e,t)=>{t.pattern??=Dt,j.init(e,t)}),Un=/*@__PURE__*/ T(`$ZodKSUID`,(e,t)=>{t.pattern??=Ot,j.init(e,t)}),Wn=/*@__PURE__*/ T(`$ZodISODateTime`,(e,t)=>{t.pattern??=Yt(t),j.init(e,t)}),Gn=/*@__PURE__*/ T(`$ZodISODate`,(e,t)=>{t.pattern??=Kt,j.init(e,t)}),Kn=/*@__PURE__*/ T(`$ZodISOTime`,(e,t)=>{t.pattern??=Jt(t),j.init(e,t)}),qn=/*@__PURE__*/ T(`$ZodISODuration`,(e,t)=>{t.pattern??=jt,j.init(e,t)}),Jn=/*@__PURE__*/ T(`$ZodIPv4`,(e,t)=>{t.pattern??=It,j.init(e,t)}),Yn=/^[0-9a-fA-F:.]+$/;function Xn(e){return Yn.test(e)?kn(`http://[${e}]`):!1}let Zn=/*@__PURE__*/ T(`$ZodIPv6`,(e,t)=>{t.pattern??=Lt,j.init(e,t),e._zod.check=n=>{Xn(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),Qn=/*@__PURE__*/ T(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Rt,j.init(e,t)});function $n(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:Xn(n)}let er=/*@__PURE__*/ T(`$ZodCIDRv6`,(e,t)=>{t.pattern??=zt,j.init(e,t),e._zod.check=n=>{$n(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function tr(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}let nr=/^[0-9a-zA-Z+/]*={0,2}$/,rr=/*@__PURE__*/ T(`$ZodBase64`,(e,t)=>{t.pattern??=nr,j.init(e,t),e._zod.check=n=>{tr(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),ir=/^[A-Za-z0-9_-]*$/;function ar(e){if(!ir.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return tr(t.padEnd(Math.ceil(t.length/4)*4,`=`))}let or=/*@__PURE__*/ T(`$ZodBase64URL`,(e,t)=>{t.pattern??=ir,j.init(e,t),e._zod.check=n=>{ar(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),sr=/*@__PURE__*/ T(`$ZodE164`,(e,t)=>{t.pattern??=Ut,j.init(e,t)});function cr(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}}let lr=/*@__PURE__*/ T(`$ZodJWT`,(e,t)=>{j.init(e,t),e._zod.check=n=>{cr(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),ur=/*@__PURE__*/ T(`$ZodNumber`,(e,t)=>{A.init(e,t),e._zod.pattern=Zt,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}}),dr=/*@__PURE__*/ T(`$ZodNumberFormat`,(e,t)=>{cn.init(e,t),ur.init(e,t)}),fr=/*@__PURE__*/ T(`$ZodBoolean`,(e,t)=>{A.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}}),pr=/*@__PURE__*/ T(`$ZodNull`,(e,t)=>{A.init(e,t),e._zod.pattern=$t,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}}),mr=/*@__PURE__*/ T(`$ZodUnknown`,(e,t)=>{A.init(e,t),e._zod.parse=e=>e}),hr=/*@__PURE__*/ T(`$ZodNever`,(e,t)=>{A.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function gr(e,t){let n=De(e._zod.def.checks);if(!n.length)return;let r=Math.min(...n.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(n,a)=>{let o=t(n.value);if(o>r&&!a?.skipChecks&&a?.direction!==`backward`){for(let[t,r]of De(e._zod.def.checks))if(o>t&&r._zod.def.when(n)){let t=n.issues.length;return r._zod.check(n),n.issues[t].continue=!1,Oe(n.issues,t,e),n}}return i(n,a)}}let _r=e=>Array.isArray(e)?e.length:-1;function vr(e,t,n){e.issues.length&&t.issues.push(...Te(n,e.issues)),t.value[n]=e.value}let yr=/*@__PURE__*/ T(`$ZodArray`,(e,t)=>{A.init(e,t);let n=D.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=>vr(t,r,e)));else if(vr(c,r,e),s&&c.issues.length!==0&&S(c))break}return o.length?Promise.all(o).then(()=>r):r},gr(e,_r)});function br(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(...Te(n,e.issues))}!o&&i===void 0?e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]}):e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}let xr=[];function Sr(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:xr,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=fe(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function Cr(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(S(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=>br(e,n,i,t,d,f))):br(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}let wr=/*@__PURE__*/ T(`$ZodObject`,(e,t)=>{A.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=u(()=>Sr(t));w(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)||m(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 a=ae,o=t.catchall,s,c=D.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(S(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>br(n,t,e,r,a,o))):br(s,t,e,r,a,o)}return o?Cr(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),Tr=/*@__PURE__*/ T(`$ZodObjectJIT`,(e,t)=>{wr.init(e,t);let n=e._zod.parse,r=u(()=>Sr(t)),i=D.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new bn([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`
6
6
  let ${e}_ab = false;
7
7
  for (let i = 0; i < ${e}.issues.length; i++) {
8
8
  const iss = ${e}.issues[i];
@@ -52,74 +52,96 @@ function E(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=
52
52
  newResult[${r}] = ${n}.value;
53
53
  }
54
54
 
55
- `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=ae,c=!O.jitless,l=c&&oe.value,d=t.catchall,f;e._zod.parse=(i,u)=>{f??=r.value;let p=i.value;return s(p)?c&&l&&u?.async===!1&&u.jitless!==!0?(o||=a(t.shape),i=o(i,u),d?Sr([],p,i,u,f,e,u?.abortEarly===!0):i):n(i,u):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function Tr(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!S(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>ke(e,r,k())))}),t)}let Er=/*@__PURE__*/ E(`$ZodUnion`,(e,t)=>{j.init(e,t),T(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),T(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),T(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),T(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>f(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>Tr(t,r,e,i)):Tr(o,r,e,i)}}),Dr=/*@__PURE__*/ E(`$ZodIntersection`,(e,t)=>{j.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])=>kr(e,t,n)):kr(e,i,a)}});function Or(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(se(e)&&se(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=Or(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=Or(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 kr(e,t,n){let r=/* @__PURE__ */ new Map,i,a=/* @__PURE__ */ new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=Or(t.value,n.value);if(!c.valid){if(S(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}let Ar=/*@__PURE__*/ E(`$ZodEnum`,(e,t)=>{j.init(e,t);let n=o(t.entries),r=new Set(n);e._zod.values=r,T(e,`pattern`,e=>{let t=o(e.def.entries).filter(e=>le.has(typeof e));return RegExp(t.length?`^(${t.map(e=>ue(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),jr=/*@__PURE__*/ E(`$ZodLiteral`,(e,t)=>{j.init(e,t);let n=new Set(t.values);e._zod.values=n,T(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?ue(e):e?ue(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),Mr=/*@__PURE__*/ E(`$ZodTransform`,(e,t)=>{j.init(e,t),e._zod.optin=`optional`,O.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Je(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new D;return n.value=i,n}});function Nr(e,t){return e.value=t.issues.length?void 0:t.value,e}let Pr=/*@__PURE__*/ E(`$ZodOptional`,(e,t)=>{j.init(e,t),T(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,T(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?/* @__PURE__ */ new Set([...t,void 0]):void 0}),T(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${f(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>Nr(e,t)):Nr(e,r)}return t.innerType._zod.run(e,n)}}),Fr=/*@__PURE__*/ E(`$ZodExactOptional`,(e,t)=>{Pr.init(e,t),T(e,`values`,e=>e.def.innerType._zod.values),T(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Ir=/*@__PURE__*/ E(`$ZodNullable`,(e,t)=>{j.init(e,t),T(e,`optin`,e=>e.def.innerType._zod.optin),T(e,`optout`,e=>e.def.innerType._zod.optout),T(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${f(t.source)}|null)$`):void 0}),T(e,`values`,e=>e.def.innerType._zod.values?/* @__PURE__ */ new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Lr=/*@__PURE__*/ E(`$ZodDefault`,(e,t)=>{j.init(e,t),e._zod.optin=`defaulted`,T(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(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=>Rr(e,t)):Rr(r,t)}});function Rr(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}let zr=/*@__PURE__*/ E(`$ZodPrefault`,(e,t)=>{j.init(e,t),e._zod.optin=`defaulted`,T(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Br=/*@__PURE__*/ E(`$ZodNonOptional`,(e,t)=>{j.init(e,t),T(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].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=>Vr(t,e)):Vr(i,e)}});function Vr(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 Hr(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>ke(e,r,k()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}let Ur=/*@__PURE__*/ E(`$ZodCatch`,(e,t)=>{j.init(e,t),T(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),T(e,`optout`,e=>e.def.innerType._zod.optout),T(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>Hr(e,r,t,n)):Hr(e,r,t,n)}}),Wr=/*@__PURE__*/ E(`$ZodPipe`,(e,t)=>{j.init(e,t),T(e,`values`,e=>e.def.in._zod.values),T(e,`optin`,e=>e.def.in._zod.optin),T(e,`optout`,e=>e.def.out._zod.optout),T(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Gr(e,t.in,n)):Gr(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Gr(e,t.out,n)):Gr(r,t.out,n)}});function Gr(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}let Kr=/*@__PURE__*/ E(`$ZodReadonly`,(e,t)=>{j.init(e,t),T(e,`propValues`,e=>e.def.innerType._zod.propValues),T(e,`values`,e=>e.def.innerType._zod.values),T(e,`optin`,e=>e.def.innerType?._zod?.optin),T(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(qr):qr(r)}});function qr(e){return e.memo||(e.value=Object.freeze(e.value)),e}let Jr=/*@__PURE__*/ E(`$ZodCustom`,(e,t)=>{A.init(e,t),j.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=>Yr(t,n,r,e));Yr(i,n,r,e)}});function Yr(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(Pe(e))}}var Xr=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}};let Zr=`~memo`,Qr=[];function $r(e){return typeof e==`object`&&!!e}function ei(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}let ti=/*@__PURE__*/ new WeakMap;function ni(e,t,n){let r=ti.get(e);if(r!==void 0)return r?2:0;if(t.has(e))return 2;t.add(e);let i=0,a=e=>{if(i!==2&&e?._zod){let r=ni(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=0;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?1:o.value?._zod?ni(o.value,t,n):0;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=h(c);s(e?o(e,!0):1),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?ni(r,t,!1):1);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),ri(e,i)}function ri(e,t){return t!==1&&ti.set(e,t===2),t}function ii(e,t){let n=e.buckets.get(t);return n||(n=/* @__PURE__ */ new WeakMap,e.buckets.set(t,n)),n}let ai,oi=[],si={alloc(e,t,n){let r=ai;if(!r)return n;ai=void 0;let i={value:n,issues:null};return r.set(t.value,i),oi.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&li(n,e.value))throw new Xr;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=ni(e,/* @__PURE__ */ new Set,!1);if(i===0)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===2||r?n=!0:r=!0}let l=s.value;if(!$r(l))return t(s,c);let u=c[Zr];u||(u={buckets:/* @__PURE__ */ new WeakMap,backEdges:void 0},c[Zr]=u);let d;i===c?d=a:(d=ii(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(...ei(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=/* @__PURE__ */ new WeakSet),u.backEdges.add(f.value)),s;ai=d;let p=oi.length,m=t(s,c);ai=void 0;let h=oi.length>p?oi.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?ei(e.issues):Qr),e)):(h&&(h.issues=m.issues.length?ei(m.issues):Qr),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function ci(){return si}function li(e,t){let n=e[Zr]?.backEdges;return n!==void 0&&$r(t)&&n.has(t)}let ui=()=>{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`},map:{unit:`entries`,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`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(Ne(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${de(e.values[0])}`:`Invalid option: expected one of ${s(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `: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.exact?`exactly `: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`:``}: ${s(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function di(){return{localeError:ui()}}var fi,pi=class{constructor(){this._map=/* @__PURE__ */ new WeakMap,this._idmap=/* @__PURE__ */ new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=/* @__PURE__ */ new WeakMap,this._idmap=/* @__PURE__ */ 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)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function mi(){return new pi}(fi=globalThis).__zod_globalRegistry??(fi.__zod_globalRegistry=mi());let hi=globalThis.__zod_globalRegistry;function gi(e){return e.checks&&=[...e.checks],e}// @__NO_SIDE_EFFECTS__
56
- function _i(e,t){return new e(gi({type:`string`,...x(t)}))}// @__NO_SIDE_EFFECTS__
57
- function vi(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...x(t)})}// @__NO_SIDE_EFFECTS__
58
- function yi(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...x(t)})}// @__NO_SIDE_EFFECTS__
59
- function bi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...x(t)})}// @__NO_SIDE_EFFECTS__
60
- function xi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...x(t)})}// @__NO_SIDE_EFFECTS__
61
- function Si(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...x(t)})}// @__NO_SIDE_EFFECTS__
62
- function Ci(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...x(t)})}// @__NO_SIDE_EFFECTS__
63
- function wi(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...x(t)})}// @__NO_SIDE_EFFECTS__
64
- function Ti(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...x(t)})}// @__NO_SIDE_EFFECTS__
65
- function Ei(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...x(t)})}// @__NO_SIDE_EFFECTS__
66
- function Di(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...x(t)})}// @__NO_SIDE_EFFECTS__
67
- function Oi(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...x(t)})}// @__NO_SIDE_EFFECTS__
68
- function ki(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...x(t)})}// @__NO_SIDE_EFFECTS__
69
- function Ai(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...x(t)})}// @__NO_SIDE_EFFECTS__
70
- function ji(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...x(t)})}// @__NO_SIDE_EFFECTS__
71
- function Mi(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...x(t)})}// @__NO_SIDE_EFFECTS__
72
- function Ni(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...x(t)})}// @__NO_SIDE_EFFECTS__
73
- function Pi(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...x(t)})}// @__NO_SIDE_EFFECTS__
74
- function Fi(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...x(t)})}// @__NO_SIDE_EFFECTS__
75
- function Ii(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...x(t)})}// @__NO_SIDE_EFFECTS__
76
- function Li(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...x(t)})}// @__NO_SIDE_EFFECTS__
77
- function Ri(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...x(t)})}// @__NO_SIDE_EFFECTS__
78
- function zi(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...x(t)})}// @__NO_SIDE_EFFECTS__
79
- function Bi(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...x(t)})}// @__NO_SIDE_EFFECTS__
80
- function Vi(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...x(t)})}// @__NO_SIDE_EFFECTS__
81
- function Hi(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...x(t)})}// @__NO_SIDE_EFFECTS__
82
- function Ui(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...x(t)})}// @__NO_SIDE_EFFECTS__
83
- function Wi(e,t){return new e(gi({type:`number`,checks:[],...x(t)}))}// @__NO_SIDE_EFFECTS__
84
- function Gi(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...x(t)})}// @__NO_SIDE_EFFECTS__
85
- function Ki(e,t){return new e({type:`boolean`,...x(t)})}// @__NO_SIDE_EFFECTS__
86
- function qi(e,t){return new e({type:`null`,...x(t)})}// @__NO_SIDE_EFFECTS__
87
- function Ji(e){return new e({type:`unknown`})}// @__NO_SIDE_EFFECTS__
88
- function Yi(e,t){return new e({type:`never`,...x(t)})}// @__NO_SIDE_EFFECTS__
89
- function Xi(e,t){return new rn({check:`less_than`,...x(t),value:e,inclusive:!1})}// @__NO_SIDE_EFFECTS__
90
- function Zi(e,t){return new rn({check:`less_than`,...x(t),value:e,inclusive:!0})}// @__NO_SIDE_EFFECTS__
91
- function Qi(e,t){return new an({check:`greater_than`,...x(t),value:e,inclusive:!1})}// @__NO_SIDE_EFFECTS__
92
- function $i(e,t){return new an({check:`greater_than`,...x(t),value:e,inclusive:!0})}// @__NO_SIDE_EFFECTS__
93
- function ea(e,t){return new on({check:`multiple_of`,...x(t),value:e})}// @__NO_SIDE_EFFECTS__
94
- function ta(e,t){return new cn({check:`max_length`,...x(t),maximum:e})}// @__NO_SIDE_EFFECTS__
95
- function na(e,t){return new ln({check:`min_length`,...x(t),minimum:e})}// @__NO_SIDE_EFFECTS__
96
- function ra(e,t){return new un({check:`length_equals`,...x(t),length:e})}// @__NO_SIDE_EFFECTS__
97
- function ia(e,t){return new fn({check:`string_format`,format:`regex`,...x(t),pattern:e})}// @__NO_SIDE_EFFECTS__
98
- function aa(e){return new pn({check:`string_format`,format:`lowercase`,...x(e)})}// @__NO_SIDE_EFFECTS__
99
- function oa(e){return new mn({check:`string_format`,format:`uppercase`,...x(e)})}// @__NO_SIDE_EFFECTS__
100
- function sa(e,t){return new hn({check:`string_format`,format:`includes`,...x(t),includes:e})}// @__NO_SIDE_EFFECTS__
101
- function ca(e,t){return new gn({check:`string_format`,format:`starts_with`,...x(t),prefix:e})}// @__NO_SIDE_EFFECTS__
102
- function la(e,t){return new _n({check:`string_format`,format:`ends_with`,...x(t),suffix:e})}// @__NO_SIDE_EFFECTS__
103
- function ua(e){return new vn({check:`overwrite`,tx:e})}// @__NO_SIDE_EFFECTS__
104
- function da(e){return/* @__PURE__ */ ua(t=>t.normalize(e))}// @__NO_SIDE_EFFECTS__
105
- function fa(){return/* @__PURE__ */ ua(e=>e.trim())}// @__NO_SIDE_EFFECTS__
106
- function pa(){return/* @__PURE__ */ ua(e=>e.toLowerCase())}// @__NO_SIDE_EFFECTS__
107
- function ma(){return/* @__PURE__ */ ua(e=>e.toUpperCase())}// @__NO_SIDE_EFFECTS__
108
- function ha(){return/* @__PURE__ */ ua(e=>re(e))}// @__NO_SIDE_EFFECTS__
109
- function ga(e,t,n){return new e({type:`array`,element:t,...x(n)})}// @__NO_SIDE_EFFECTS__
110
- function _a(e,t,n){let r=x(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}// @__NO_SIDE_EFFECTS__
111
- function va(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...x(n)})}// @__NO_SIDE_EFFECTS__
112
- function ya(e,t){let n=/* @__PURE__ */ ba(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Pe(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Pe(r))}},e(t.value,t)),t);return n}// @__NO_SIDE_EFFECTS__
113
- function ba(e,t){let n=new A({check:`custom`,...x(t)});return n._zod.check=e,n}function xa(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&m(e,t,n[t]);return e}function Sa(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??hi,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:/* @__PURE__ */ new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function N(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function P(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,P(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&xa(o.schema,c),t.io===`input`&&F(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function Ca(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function wa(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=/* @__PURE__ */ new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${Ca(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+Ca(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(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
55
+ `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=ae,c=!D.jitless,l=c&&oe.value,d=t.catchall,f;e._zod.parse=(i,u)=>{f??=r.value;let p=i.value;return s(p)?c&&l&&u?.async===!1&&u.jitless!==!0?(o||=a(t.shape),i=o(i,u),d?Cr([],p,i,u,f,e,u?.abortEarly===!0):i):n(i,u):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function Er(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!S(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>ke(e,r,O())))}),t)}let Dr=/*@__PURE__*/ T(`$ZodUnion`,(e,t)=>{A.init(e,t),w(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),w(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),w(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),w(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>f(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>Er(t,r,e,i)):Er(o,r,e,i)}}),Or=/*@__PURE__*/ T(`$ZodIntersection`,(e,t)=>{A.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])=>Ar(e,t,n)):Ar(e,i,a)}});function kr(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(se(e)&&se(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=kr(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=kr(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 Ar(e,t,n){let r=/* @__PURE__ */ new Map,i,a=/* @__PURE__ */ new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=kr(t.value,n.value);if(!c.valid){if(S(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}let jr=/*@__PURE__*/ T(`$ZodEnum`,(e,t)=>{A.init(e,t);let n=o(t.entries),r=new Set(n);e._zod.values=r,w(e,`pattern`,e=>{let t=o(e.def.entries).filter(e=>le.has(typeof e));return RegExp(t.length?`^(${t.map(e=>ue(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Mr=/*@__PURE__*/ T(`$ZodLiteral`,(e,t)=>{A.init(e,t);let n=new Set(t.values);e._zod.values=n,w(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?ue(e):e?ue(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),Nr=/*@__PURE__*/ T(`$ZodTransform`,(e,t)=>{A.init(e,t),e._zod.optin=`optional`,D.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Ye(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new E;return n.value=i,n}});function Pr(e,t){return e.value=t.issues.length?void 0:t.value,e}let Fr=/*@__PURE__*/ T(`$ZodOptional`,(e,t)=>{A.init(e,t),w(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,w(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?/* @__PURE__ */ new Set([...t,void 0]):void 0}),w(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${f(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>Pr(e,t)):Pr(e,r)}return t.innerType._zod.run(e,n)}}),Ir=/*@__PURE__*/ T(`$ZodExactOptional`,(e,t)=>{Fr.init(e,t),w(e,`values`,e=>e.def.innerType._zod.values),w(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Lr=/*@__PURE__*/ T(`$ZodNullable`,(e,t)=>{A.init(e,t),w(e,`optin`,e=>e.def.innerType._zod.optin),w(e,`optout`,e=>e.def.innerType._zod.optout),w(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${f(t.source)}|null)$`):void 0}),w(e,`values`,e=>e.def.innerType._zod.values?/* @__PURE__ */ new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Rr=/*@__PURE__*/ T(`$ZodDefault`,(e,t)=>{A.init(e,t),e._zod.optin=`defaulted`,w(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(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=>zr(e,t)):zr(r,t)}});function zr(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}let Br=/*@__PURE__*/ T(`$ZodPrefault`,(e,t)=>{A.init(e,t),e._zod.optin=`defaulted`,w(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Vr=/*@__PURE__*/ T(`$ZodNonOptional`,(e,t)=>{A.init(e,t),w(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].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=>Hr(t,e)):Hr(i,e)}});function Hr(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 Ur(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>ke(e,r,O()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}let Wr=/*@__PURE__*/ T(`$ZodCatch`,(e,t)=>{A.init(e,t),w(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),w(e,`optout`,e=>e.def.innerType._zod.optout),w(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>Ur(e,r,t,n)):Ur(e,r,t,n)}}),Gr=/*@__PURE__*/ T(`$ZodPipe`,(e,t)=>{A.init(e,t),w(e,`values`,e=>e.def.in._zod.values),w(e,`optin`,e=>e.def.in._zod.optin),w(e,`optout`,e=>e.def.out._zod.optout),w(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Kr(e,t.in,n)):Kr(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Kr(e,t.out,n)):Kr(r,t.out,n)}});function Kr(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}let qr=/*@__PURE__*/ T(`$ZodReadonly`,(e,t)=>{A.init(e,t),w(e,`propValues`,e=>e.def.innerType._zod.propValues),w(e,`values`,e=>e.def.innerType._zod.values),w(e,`optin`,e=>e.def.innerType?._zod?.optin),w(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Jr):Jr(r)}});function Jr(e){return e.memo||(e.value=Object.freeze(e.value)),e}let Yr=/*@__PURE__*/ T(`$ZodCustom`,(e,t)=>{k.init(e,t),A.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=>Xr(t,n,r,e));Xr(i,n,r,e)}});function Xr(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(Pe(e))}}var Zr=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}};let Qr=`~memo`,$r=[];function ei(e){return typeof e==`object`&&!!e}function ti(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}let ni=/*@__PURE__*/ new WeakMap;function ri(e,t,n){let r=ni.get(e);if(r!==void 0)return r?2:0;if(t.has(e))return 2;t.add(e);let i=0,a=e=>{if(i!==2&&e?._zod){let r=ri(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=0;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?1:o.value?._zod?ri(o.value,t,n):0;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=h(c);s(e?o(e,!0):1),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?ri(r,t,!1):1);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),ii(e,i)}function ii(e,t){return t!==1&&ni.set(e,t===2),t}function ai(e,t){let n=e.buckets.get(t);return n||(n=/* @__PURE__ */ new WeakMap,e.buckets.set(t,n)),n}let oi,si=[],ci={alloc(e,t,n){let r=oi;if(!r)return n;oi=void 0;let i={value:n,issues:null};return r.set(t.value,i),si.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&ui(n,e.value))throw new Zr;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=ri(e,/* @__PURE__ */ new Set,!1);if(i===0)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===2||r?n=!0:r=!0}let l=s.value;if(!ei(l))return t(s,c);let u=c[Qr];u||(u={buckets:/* @__PURE__ */ new WeakMap,backEdges:void 0},c[Qr]=u);let d;i===c?d=a:(d=ai(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(...ti(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=/* @__PURE__ */ new WeakSet),u.backEdges.add(f.value)),s;oi=d;let p=si.length,m=t(s,c);oi=void 0;let h=si.length>p?si.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?ti(e.issues):$r),e)):(h&&(h.issues=m.issues.length?ti(m.issues):$r),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function li(){return ci}function ui(e,t){let n=e[Qr]?.backEdges;return n!==void 0&&ei(t)&&n.has(t)}let di=()=>{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`},map:{unit:`entries`,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`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(Ne(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${de(e.values[0])}`:`Invalid option: expected one of ${s(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `: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.exact?`exactly `: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`:``}: ${s(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function fi(){return{localeError:di()}}var pi,mi=class{constructor(){this._map=/* @__PURE__ */ new WeakMap,this._idmap=/* @__PURE__ */ new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=/* @__PURE__ */ new WeakMap,this._idmap=/* @__PURE__ */ 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)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function hi(){return new mi}(pi=globalThis).__zod_globalRegistry??(pi.__zod_globalRegistry=hi());let gi=globalThis.__zod_globalRegistry;function _i(e){return e.checks&&=[...e.checks],e}// @__NO_SIDE_EFFECTS__
56
+ function vi(e,t){return new e(_i({type:`string`,...x(t)}))}// @__NO_SIDE_EFFECTS__
57
+ function yi(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...x(t)})}// @__NO_SIDE_EFFECTS__
58
+ function bi(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...x(t)})}// @__NO_SIDE_EFFECTS__
59
+ function xi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...x(t)})}// @__NO_SIDE_EFFECTS__
60
+ function Si(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...x(t)})}// @__NO_SIDE_EFFECTS__
61
+ function Ci(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...x(t)})}// @__NO_SIDE_EFFECTS__
62
+ function wi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...x(t)})}// @__NO_SIDE_EFFECTS__
63
+ function Ti(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...x(t)})}// @__NO_SIDE_EFFECTS__
64
+ function Ei(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...x(t)})}// @__NO_SIDE_EFFECTS__
65
+ function Di(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...x(t)})}// @__NO_SIDE_EFFECTS__
66
+ function Oi(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...x(t)})}// @__NO_SIDE_EFFECTS__
67
+ function ki(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...x(t)})}// @__NO_SIDE_EFFECTS__
68
+ function Ai(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...x(t)})}// @__NO_SIDE_EFFECTS__
69
+ function ji(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...x(t)})}// @__NO_SIDE_EFFECTS__
70
+ function Mi(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...x(t)})}// @__NO_SIDE_EFFECTS__
71
+ function Ni(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...x(t)})}// @__NO_SIDE_EFFECTS__
72
+ function Pi(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...x(t)})}// @__NO_SIDE_EFFECTS__
73
+ function Fi(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...x(t)})}// @__NO_SIDE_EFFECTS__
74
+ function Ii(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...x(t)})}// @__NO_SIDE_EFFECTS__
75
+ function Li(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...x(t)})}// @__NO_SIDE_EFFECTS__
76
+ function Ri(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...x(t)})}// @__NO_SIDE_EFFECTS__
77
+ function zi(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...x(t)})}// @__NO_SIDE_EFFECTS__
78
+ function Bi(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...x(t)})}// @__NO_SIDE_EFFECTS__
79
+ function Vi(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...x(t)})}// @__NO_SIDE_EFFECTS__
80
+ function Hi(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...x(t)})}// @__NO_SIDE_EFFECTS__
81
+ function Ui(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...x(t)})}// @__NO_SIDE_EFFECTS__
82
+ function Wi(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...x(t)})}// @__NO_SIDE_EFFECTS__
83
+ function Gi(e,t){return new e(_i({type:`number`,checks:[],...x(t)}))}// @__NO_SIDE_EFFECTS__
84
+ function Ki(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...x(t)})}// @__NO_SIDE_EFFECTS__
85
+ function qi(e,t){return new e({type:`boolean`,...x(t)})}// @__NO_SIDE_EFFECTS__
86
+ function Ji(e,t){return new e({type:`null`,...x(t)})}// @__NO_SIDE_EFFECTS__
87
+ function Yi(e){return new e({type:`unknown`})}// @__NO_SIDE_EFFECTS__
88
+ function Xi(e,t){return new e({type:`never`,...x(t)})}// @__NO_SIDE_EFFECTS__
89
+ function Zi(e,t){return new an({check:`less_than`,...x(t),value:e,inclusive:!1})}// @__NO_SIDE_EFFECTS__
90
+ function Qi(e,t){return new an({check:`less_than`,...x(t),value:e,inclusive:!0})}// @__NO_SIDE_EFFECTS__
91
+ function $i(e,t){return new on({check:`greater_than`,...x(t),value:e,inclusive:!1})}// @__NO_SIDE_EFFECTS__
92
+ function ea(e,t){return new on({check:`greater_than`,...x(t),value:e,inclusive:!0})}// @__NO_SIDE_EFFECTS__
93
+ function ta(e,t){return new sn({check:`multiple_of`,...x(t),value:e})}// @__NO_SIDE_EFFECTS__
94
+ function na(e,t){return new ln({check:`max_length`,...x(t),maximum:e})}// @__NO_SIDE_EFFECTS__
95
+ function ra(e,t){return new un({check:`min_length`,...x(t),minimum:e})}// @__NO_SIDE_EFFECTS__
96
+ function ia(e,t){return new dn({check:`length_equals`,...x(t),length:e})}// @__NO_SIDE_EFFECTS__
97
+ function aa(e,t){return new pn({check:`string_format`,format:`regex`,...x(t),pattern:e})}// @__NO_SIDE_EFFECTS__
98
+ function oa(e){return new mn({check:`string_format`,format:`lowercase`,...x(e)})}// @__NO_SIDE_EFFECTS__
99
+ function sa(e){return new hn({check:`string_format`,format:`uppercase`,...x(e)})}// @__NO_SIDE_EFFECTS__
100
+ function ca(e,t){return new gn({check:`string_format`,format:`includes`,...x(t),includes:e})}// @__NO_SIDE_EFFECTS__
101
+ function la(e,t){return new _n({check:`string_format`,format:`starts_with`,...x(t),prefix:e})}// @__NO_SIDE_EFFECTS__
102
+ function ua(e,t){return new vn({check:`string_format`,format:`ends_with`,...x(t),suffix:e})}// @__NO_SIDE_EFFECTS__
103
+ function da(e){return new yn({check:`overwrite`,tx:e})}// @__NO_SIDE_EFFECTS__
104
+ function fa(e){return/* @__PURE__ */ da(t=>t.normalize(e))}// @__NO_SIDE_EFFECTS__
105
+ function pa(){return/* @__PURE__ */ da(e=>e.trim())}// @__NO_SIDE_EFFECTS__
106
+ function ma(){return/* @__PURE__ */ da(e=>e.toLowerCase())}// @__NO_SIDE_EFFECTS__
107
+ function ha(){return/* @__PURE__ */ da(e=>e.toUpperCase())}// @__NO_SIDE_EFFECTS__
108
+ function ga(){return/* @__PURE__ */ da(e=>re(e))}// @__NO_SIDE_EFFECTS__
109
+ function _a(e,t,n){return new e({type:`array`,element:t,...x(n)})}// @__NO_SIDE_EFFECTS__
110
+ function va(e,t,n){let r=x(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}// @__NO_SIDE_EFFECTS__
111
+ function ya(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...x(n)})}// @__NO_SIDE_EFFECTS__
112
+ function ba(e,t){let n=/* @__PURE__ */ xa(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Pe(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Pe(r))}},e(t.value,t)),t);return n}// @__NO_SIDE_EFFECTS__
113
+ function xa(e,t){let n=new k({check:`custom`,...x(t)});return n._zod.check=e,n}function Sa(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&m(e,t,n[t]);return e}function Ca(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??gi,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:/* @__PURE__ */ new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function M(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function N(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,N(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Sa(o.schema,c),t.io===`input`&&P(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function wa(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function Ta(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=/* @__PURE__ */ new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${wa(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+wa(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(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
114
114
 
115
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0])a(n);else{if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&e.reused===`ref`)&&a(n)}}e.external&&(e.sharedDefsExtractedFor=e.external)}function Ta(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;Ta(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}let Ea=/* @__PURE__ */ new Set([`type`,`properties`,`required`,`additionalProperties`]),Da=[`oneOf`,`anyOf`];function Oa(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function ka(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!Ea.has(e))return null;t.push(n)}let n={},r=/* @__PURE__ */ new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??Oa(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}m(n,r,e.length===1?e[0]:ka(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=Oa(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function Aa(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of Ea)if(t in e)return;let n=t.filter(e=>Da.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=ka(t);else{let e=n[0],i=Da.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>ka([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,xa(e,r))}function ja(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):xa(i,s),xa(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())Ta(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=/* @__PURE__ */ new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])Aa(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}xa(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,m(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:Na(t,`input`,e.processors),output:Na(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function F(e,t){let n=t??{seen:/* @__PURE__ */ new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return F(r.element,n);if(r.type===`set`)return F(r.valueType,n);if(r.type===`lazy`)return F(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return F(r.innerType,n);if(r.type===`intersection`)return F(r.left,n)||F(r.right,n);if(r.type===`record`||r.type===`map`)return F(r.keyType,n)||F(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:F(r.in,n)||F(r.out,n);if(r.type===`object`){for(let e in r.shape)if(F(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(F(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(F(e,n))return!0;return!!(r.rest&&F(r.rest,n))}return!1}let Ma=(e,t={})=>n=>{let r=Sa({...n,processors:t});return P(e,r),wa(r,e),ja(r,e)},Na=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Sa({...i??{},target:a,io:t,processors:n});return P(e,o),wa(o,e),ja(o,e)},I=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},L=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},Pa=(e,t)=>{I(e,`minimum`,t),L(e,`maximum`,t)},Fa=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},Ia=(e,t)=>{e.patterns??=/* @__PURE__ */ new Set,e.patterns.add(t)},La=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},Ra=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},za=(e,t)=>I(e,`minimum`,t.minimum),Ba=(e,t)=>L(e,`maximum`,t.maximum),Va=e=>(t,n)=>{Ra(t,n.format);let[r,i]=e[n.format];I(t,`minimum`,r),L(t,`maximum`,i)},Ha={greater_than:(e,t)=>I(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>L(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>Fa(e,t.value),number_format:Va(pe),bigint_format:Va(me),min_length:za,max_length:Ba,length_equals:(e,t)=>Pa(e,t.length),min_size:za,max_size:Ba,size_equals:(e,t)=>Pa(e,t.size),string_format:(e,t)=>{Ra(e,t.format),t.pattern&&Ia(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>La(e,t.mime)};function R(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)Ha[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&I(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&I(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&L(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&L(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&Fa(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&La(t,i.mime);for(let e of i.patterns??[])Ia(t,e);return t}let Ua={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Wa=/* @__PURE__ */ new Map([[tr,zt],[rr,Bt]]),Ga=e=>Wa.get(e)??e,Ka=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=R(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Ua[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(Ga);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},qa=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=R(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=/* @__PURE__ */ new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):N(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},Ja=(e,t,n,r)=>{n.type=`boolean`},Ya=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},Xa=(e,t,n,r)=>{n.not={}},Za=(e,t,n,r)=>{let i=e._zod.def,a=o(i.entries);a.length===0?n.not={}:(a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a)},Qa=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(N(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(N(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},$a=(e,t,n,r)=>{N(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},eo=(e,t,n,r)=>{N(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},to=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=R(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=P(a.element,t,{...r,path:[...r.path,`items`]})};function no(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?no(t.out):t.type===`catch`?no(t.innerType):e._zod.optin}let ro=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&N(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)m(i.properties,e,P(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?no(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=P(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},io=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>P(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},ao=(e,t,n,r)=>{let i=e._zod.def,a=P(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=P(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},oo=(e,t,n,r)=>{let i=e._zod.def,a=P(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},so=(e,t,n,r)=>{let i=e._zod.def;P(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},co=Symbol();function lo(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(N(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),co):JSON.parse(o)}let uo=(e,t,n,r)=>{let i=e._zod.def;P(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=lo(i.defaultValue,e,t,n,r);o!==co&&(n.default=o)},fo=(e,t,n,r)=>{let i=e._zod.def;P(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=lo(i.defaultValue,e,t,n,r);o!==co&&(n._prefault=o)},po=(e,t,n,r)=>{let i=e._zod.def;P(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{N(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},mo=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;P(o,t,r);let s=t.seen.get(e);s.ref=o},ho=(e,t,n,r)=>{let i=e._zod.def;P(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},go=(e,t,n,r)=>{let i=e._zod.def;P(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},_o=/* @__PURE__ */ new WeakSet([Object.prototype,Error.prototype]);function vo(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}let z=/*@__PURE__*/ E(`ZodError`,(e,t)=>{et.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);_o.has(n)||(_o.add(n),vo(n,`format`,e=>t=>rt(e,t)),vo(n,`flatten`,e=>t=>nt(e,t)),vo(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,c,2)}),vo(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,c,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),yo=/* @__PURE__ */ at(z),bo=/* @__PURE__ */ ot(z),xo=/* @__PURE__ */ st(z),So=/* @__PURE__ */ lt(z),Co=/* @__PURE__ */ ht(z),wo=/* @__PURE__ */ gt(z),To=/* @__PURE__ */ _t(z),Eo=/* @__PURE__ */ vt(z),Do=/* @__PURE__ */ yt(z),Oo=/* @__PURE__ */ bt(z),ko=/* @__PURE__ */ xt(z),Ao=/* @__PURE__ */ St(z);function jo(){O.localeError||k(di())}function Mo(){O.memoizer||k({memoizer:ci()})}let B=/*@__PURE__*/ E(`ZodType`,(e,t)=>(jo(),j.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(y(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return b(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Ws(e,t))},superRefine(e,t){return this.check(Gs(e,t))},overwrite(e){return this.check(/* @__PURE__ */ ua(e))},optional(){return Ts(this)},exactOptional(){return Ds(this)},nullable(){return ks(this)},nullish(){return Ts(ks(this))},nonoptional(e){return Fs(this,e)},array(){return G(this)},or(e){return _s([this,e])},and(e){return ys(this,e)},transform(e){return zs(this,Cs(e))},default(e){return js(this,e)},prefault(e){return Ns(this,e)},catch(e){return Ls(this,e)},pipe(e){return zs(this,e)},readonly(){return Vs(this)},describe(e){let t=this.clone();return hi.add(t,{description:e}),t},meta(...e){if(e.length===0)return hi.get(this);let t=this.clone();return hi.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return Ie(this,`~standard`,{...Cn(this),jsonSchema:{input:Na(this,`input`),output:Na(this,`output`)}})},set"~standard"(e){C(this,`~standard`,e)},parse:function e(t,n){return yo(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await bo(this,t,n,{callee:e})},safeParse(e,t){return xo(this,e,t)},async safeParseAsync(e,t){return So(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){C(this,`spa`,e)},validate(e,t){return ft(this,e,t)},validateAsync(e,t){return mt(this,e,t)},encode:function e(t,n){return Co(this,t,n,{callee:e})},decode:function e(t,n){return wo(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await To(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await Eo(this,t,n,{callee:e})},safeEncode(e,t){return Do(this,e,t)},safeDecode(e,t){return Oo(this,e,t)},async safeEncodeAsync(e,t){return ko(this,e,t)},async safeDecodeAsync(e,t){return Ao(this,e,t)},toJSONSchema(e){return Ma(this,{})(e)},get description(){return hi.get(this)?.description},get _def(){return this._zod.def}}),No=/*@__PURE__*/ E(`_ZodString`,(e,t)=>{wn.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ka(e,t,n,r)},/*@__PURE__*/ Le({format:e=>R(e).format??null,minLength:e=>R(e).minimum??null,maxLength:e=>R(e).maximum??null},{regex(...e){return this.check(/* @__PURE__ */ ia(...e))},includes(...e){return this.check(/* @__PURE__ */ sa(...e))},startsWith(...e){return this.check(/* @__PURE__ */ ca(...e))},endsWith(...e){return this.check(/* @__PURE__ */ la(...e))},min(...e){return this.check(/* @__PURE__ */ na(...e))},max(...e){return this.check(/* @__PURE__ */ ta(...e))},length(...e){return this.check(/* @__PURE__ */ ra(...e))},nonempty(...e){return this.check(/* @__PURE__ */ na(1,...e))},lowercase(e){return this.check(/* @__PURE__ */ aa(e))},uppercase(e){return this.check(/* @__PURE__ */ oa(e))},trim(){return this.check(/* @__PURE__ */ fa())},normalize(...e){return this.check(/* @__PURE__ */ da(...e))},toLowerCase(){return this.check(/* @__PURE__ */ pa())},toUpperCase(){return this.check(/* @__PURE__ */ ma())},slugify(){return this.check(/* @__PURE__ */ ha())}})),Po=/*@__PURE__*/ E(`ZodString`,(e,t)=>{wn.init(e,t),No.init(e,t)},{email(e){return this.check(/* @__PURE__ */ vi(zo,e))},url(e){return this.check(/* @__PURE__ */ wi(Ho,e))},jwt(e){return this.check(/* @__PURE__ */ zi(rs,e))},emoji(e){return this.check(/* @__PURE__ */ Ti(Uo,e))},guid(e){return this.check(/* @__PURE__ */ yi(Bo,e))},uuid(e){return this.check(/* @__PURE__ */ bi(Vo,e))},uuidv4(e){return this.check(/* @__PURE__ */ xi(Vo,e))},uuidv6(e){return this.check(/* @__PURE__ */ Si(Vo,e))},uuidv7(e){return this.check(/* @__PURE__ */ Ci(Vo,e))},nanoid(e){return this.check(/* @__PURE__ */ Ei(Wo,e))},cuid(e){return this.check(/* @__PURE__ */ Di(Go,e))},cuid2(e){return this.check(/* @__PURE__ */ Oi(Ko,e))},ulid(e){return this.check(/* @__PURE__ */ ki(qo,e))},base64(e){return this.check(/* @__PURE__ */ Ii(es,e))},base64url(e){return this.check(/* @__PURE__ */ Li(ts,e))},xid(e){return this.check(/* @__PURE__ */ Ai(Jo,e))},ksuid(e){return this.check(/* @__PURE__ */ ji(Yo,e))},ipv4(e){return this.check(/* @__PURE__ */ Mi(Xo,e))},ipv6(e){return this.check(/* @__PURE__ */ Ni(Zo,e))},cidrv4(e){return this.check(/* @__PURE__ */ Pi(Qo,e))},cidrv6(e){return this.check(/* @__PURE__ */ Fi($o,e))},e164(e){return this.check(/* @__PURE__ */ Ri(ns,e))},datetime(e){return this.check(/* @__PURE__ */ Bi(Fo,e))},date(e){return this.check(/* @__PURE__ */ Vi(Io,e))},time(e){return this.check(/* @__PURE__ */ Hi(Lo,e))},duration(e){return this.check(/* @__PURE__ */ Ui(Ro,e))}});function V(e){return/* @__PURE__ */ _i(Po,e)}let H=/*@__PURE__*/ E(`ZodStringFormat`,(e,t)=>{M.init(e,t),No.init(e,t)}),Fo=/*@__PURE__*/ E(`ZodISODateTime`,(e,t)=>{Un.init(e,t),H.init(e,t)}),Io=/*@__PURE__*/ E(`ZodISODate`,(e,t)=>{Wn.init(e,t),H.init(e,t)}),Lo=/*@__PURE__*/ E(`ZodISOTime`,(e,t)=>{Gn.init(e,t),H.init(e,t)}),Ro=/*@__PURE__*/ E(`ZodISODuration`,(e,t)=>{Kn.init(e,t),H.init(e,t)}),zo=/*@__PURE__*/ E(`ZodEmail`,(e,t)=>{Dn.init(e,t),H.init(e,t)}),Bo=/*@__PURE__*/ E(`ZodGUID`,(e,t)=>{Tn.init(e,t),H.init(e,t)}),Vo=/*@__PURE__*/ E(`ZodUUID`,(e,t)=>{En.init(e,t),H.init(e,t)}),Ho=/*@__PURE__*/ E(`ZodURL`,(e,t)=>{Fn.init(e,t),H.init(e,t)}),Uo=/*@__PURE__*/ E(`ZodEmoji`,(e,t)=>{In.init(e,t),H.init(e,t)}),Wo=/*@__PURE__*/ E(`ZodNanoID`,(e,t)=>{Ln.init(e,t),H.init(e,t)}),Go=/*@__PURE__*/ E(`ZodCUID`,(e,t)=>{Rn.init(e,t),H.init(e,t)}),Ko=/*@__PURE__*/ E(`ZodCUID2`,(e,t)=>{zn.init(e,t),H.init(e,t)}),qo=/*@__PURE__*/ E(`ZodULID`,(e,t)=>{Bn.init(e,t),H.init(e,t)}),Jo=/*@__PURE__*/ E(`ZodXID`,(e,t)=>{Vn.init(e,t),H.init(e,t)}),Yo=/*@__PURE__*/ E(`ZodKSUID`,(e,t)=>{Hn.init(e,t),H.init(e,t)}),Xo=/*@__PURE__*/ E(`ZodIPv4`,(e,t)=>{qn.init(e,t),H.init(e,t)}),Zo=/*@__PURE__*/ E(`ZodIPv6`,(e,t)=>{Xn.init(e,t),H.init(e,t)}),Qo=/*@__PURE__*/ E(`ZodCIDRv4`,(e,t)=>{Zn.init(e,t),H.init(e,t)}),$o=/*@__PURE__*/ E(`ZodCIDRv6`,(e,t)=>{$n.init(e,t),H.init(e,t)}),es=/*@__PURE__*/ E(`ZodBase64`,(e,t)=>{nr.init(e,t),H.init(e,t)}),ts=/*@__PURE__*/ E(`ZodBase64URL`,(e,t)=>{ar.init(e,t),H.init(e,t)}),ns=/*@__PURE__*/ E(`ZodE164`,(e,t)=>{or.init(e,t),H.init(e,t)}),rs=/*@__PURE__*/ E(`ZodJWT`,(e,t)=>{cr.init(e,t),H.init(e,t)}),is=/*@__PURE__*/ E(`ZodNumber`,(e,t)=>{lr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qa(e,t,n,r),e.isFinite=!0},/*@__PURE__*/ Le({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=R(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=R(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=R(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>R(e).format??null},{gt(e,t){return this.check(/* @__PURE__ */ Qi(e,t))},gte(e,t){return this.check(/* @__PURE__ */ $i(e,t))},min(e,t){return this.check(/* @__PURE__ */ $i(e,t))},lt(e,t){return this.check(/* @__PURE__ */ Xi(e,t))},lte(e,t){return this.check(/* @__PURE__ */ Zi(e,t))},max(e,t){return this.check(/* @__PURE__ */ Zi(e,t))},int(e){return this.check(os(e))},safe(e){return this.check(os(e))},positive(e){return this.check(/* @__PURE__ */ Qi(0,e))},nonnegative(e){return this.check(/* @__PURE__ */ $i(0,e))},negative(e){return this.check(/* @__PURE__ */ Xi(0,e))},nonpositive(e){return this.check(/* @__PURE__ */ Zi(0,e))},multipleOf(e,t){return this.check(/* @__PURE__ */ ea(e,t))},step(e,t){return this.check(/* @__PURE__ */ ea(e,t))},finite(){return this}}));function U(e){return/* @__PURE__ */ Wi(is,e)}let as=/*@__PURE__*/ E(`ZodNumberFormat`,(e,t)=>{ur.init(e,t),is.init(e,t)});function os(e){return/* @__PURE__ */ Gi(as,e)}let ss=/*@__PURE__*/ E(`ZodBoolean`,(e,t)=>{dr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ja(e,t,n,r)});function W(e){return/* @__PURE__ */ Ki(ss,e)}let cs=/*@__PURE__*/ E(`ZodNull`,(e,t)=>{fr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ya(e,t,n,r)});function ls(e){return/* @__PURE__ */ qi(cs,e)}let us=/*@__PURE__*/ E(`ZodUnknown`,(e,t)=>{pr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function ds(){return/* @__PURE__ */ Ji(us)}let fs=/*@__PURE__*/ E(`ZodNever`,(e,t)=>{mr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xa(e,t,n,r)});function ps(e){return/* @__PURE__ */ Yi(fs,e)}let ms=/*@__PURE__*/ E(`ZodArray`,(e,t)=>{Mo(),vr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>to(e,t,n,r),e.element=t.element},{min(e,t){return this.check(/* @__PURE__ */ na(e,t))},nonempty(e){return this.check(/* @__PURE__ */ na(1,e))},max(e,t){return this.check(/* @__PURE__ */ ta(e,t))},length(e,t){return this.check(/* @__PURE__ */ ra(e,t))},unwrap(){return this.element}});function G(e,t){return/* @__PURE__ */ ga(ms,e,t)}let hs=/*@__PURE__*/ E(`ZodObject`,(e,t)=>{Mo(),wr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ro(e,t,n,r),He(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return q(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(y(this._zod.def,{catchall:e}))},passthrough(){return this.clone(y(this._zod.def,{catchall:ds()}))},loose(){return this.clone(y(this._zod.def,{catchall:ds()}))},strict(){return this.clone(y(this._zod.def,{catchall:ps()}))},strip(){return this.clone(y(this._zod.def,{catchall:void 0}))},extend(e){return ve(this,e)},safeExtend(e){return be(this,e)},merge(e){return xe(this,e)},pick(e){return he(this,e)},omit(e){return _e(this,e)},partial(...e){return Se(ws,this,e[0])},exactPartial(...e){return Se(Es,this,e[0],`exactPartial`)},required(...e){return Ce(Ps,this,e[0])}});function K(e,t){let n={type:`object`,shape:e??{},...x(t)};return new hs(n)}let gs=/*@__PURE__*/ E(`ZodUnion`,(e,t)=>{Er.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>io(e,t,n,r),e.options=t.options});function _s(e,t){return new gs({type:`union`,options:e,...x(t)})}let vs=/*@__PURE__*/ E(`ZodIntersection`,(e,t)=>{Dr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ao(e,t,n,r)});function ys(e,t){return new vs({type:`intersection`,left:e,right:t})}let bs=/*@__PURE__*/ E(`ZodEnum`,(e,t)=>{Ar.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Za(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];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 bs({...t,checks:[],...x(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 bs({...t,checks:[],...x(r),entries:i})}});function q(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new bs({type:`enum`,entries:n,...x(t)})}let xs=/*@__PURE__*/ E(`ZodLiteral`,(e,t)=>{jr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qa(e,t,n,r),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]}})});function J(e,t){return new xs({type:`literal`,values:Array.isArray(e)?e:[e],...x(t)})}let Ss=/*@__PURE__*/ E(`ZodTransform`,(e,t)=>{Mo(),Mr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>eo(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Je(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Pe(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(Pe(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Cs(e){return new Ss({type:`transform`,transform:e})}let ws=/*@__PURE__*/ E(`ZodOptional`,(e,t)=>{Pr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>go(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ts(e){return new ws({type:`optional`,innerType:e})}let Es=/*@__PURE__*/ E(`ZodExactOptional`,(e,t)=>{Fr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>go(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ds(e){return new Es({type:`optional`,innerType:e})}let Os=/*@__PURE__*/ E(`ZodNullable`,(e,t)=>{Ir.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ks(e){return new Os({type:`nullable`,innerType:e})}let As=/*@__PURE__*/ E(`ZodDefault`,(e,t)=>{Lr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function js(e,t){return new As({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():ce(t)}})}let Ms=/*@__PURE__*/ E(`ZodPrefault`,(e,t)=>{zr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ns(e,t){return new Ms({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():ce(t)}})}let Ps=/*@__PURE__*/ E(`ZodNonOptional`,(e,t)=>{Br.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>so(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Fs(e,t){return new Ps({type:`nonoptional`,innerType:e,...x(t)})}let Is=/*@__PURE__*/ E(`ZodCatch`,(e,t)=>{Ur.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>po(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Ls(e,t){return new Is({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:Ue(t)})}let Rs=/*@__PURE__*/ E(`ZodPipe`,(e,t)=>{Wr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mo(e,t,n,r),e.in=t.in,e.out=t.out});function zs(e,t){return new Rs({type:`pipe`,in:e,out:t})}let Bs=/*@__PURE__*/ E(`ZodReadonly`,(e,t)=>{Kr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ho(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Vs(e){return new Bs({type:`readonly`,innerType:e})}let Hs=/*@__PURE__*/ E(`ZodCustom`,(e,t)=>{Jr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$a(e,t,n,r)});function Us(e,t){return/* @__PURE__ */ _a(Hs,e??(()=>!0),t)}function Ws(e,t={}){return/* @__PURE__ */ va(Hs,e,t)}function Gs(e,t){return/* @__PURE__ */ ya(e,t)}let Y=U().finite(),Ks=U().int().nonnegative(),qs=K({hash:V(),gap:K({parent:Ks,before:Ks.nullable(),row:W(),flow:W(),origin:K({x:Y,y:Y}),room:Y,line:K({x:Y,y:Y,width:Y,height:Y})})}).nullable();function Js(e,t,n){return e===`grid`||e===`inline-grid`?`grid`:e!==`flex`&&e!==`inline-flex`?`block`:n===`nowrap`?t.startsWith(`column`)?`vertical`:`horizontal`:`wrap`}let Ys={deg:1,grad:.9,rad:180/Math.PI,turn:360};function Xs(e){if(e===`none`||e===``)return 0;let t=/^(-?[\d.]+(?:e[+-]?\d+)?)(deg|grad|rad|turn)$/.exec(e),n=t?.[2]?Ys[t[2]]:void 0;return!t||n===void 0?null:Math.round(Number(t[1])*n*100)/100}function Zs(e){if(e===`none`||e===``)return{x:1,y:1};let t=e.split(/\s+/).map(e=>e.endsWith(`%`)?parseFloat(e)/100:Number(e)),[n,r=n,i=1]=t;return n===void 0||r===void 0||t.some(Number.isNaN)||t.length>3||i!==1?null:{x:n,y:r}}function Qs(e){if(e===`none`||e===``)return!1;let t=/^matrix(3d)?\(([^)]*)\)$/.exec(e);if(!t?.[2])return!0;let n=t[2].split(`,`).map(Number);return(t[1]?n.slice(12,15):n.slice(4,6)).some(e=>e!==0)}let X=U().finite(),$s=U().int().nonnegative(),ec=q([`block`,`vertical`,`horizontal`,`wrap`,`grid`]),tc=K({top:X,right:X,bottom:X,left:X}),nc=K({flow:ec,inline:W(),direction:V(),wrap:V(),justify:V(),alignItems:V(),ownJustify:W(),rowGap:X,columnGap:X,padding:tc,parent:ec,parentAlignItems:V(),width:X,height:X}),rc=K({width:X,height:X}),ic=K({kind:q([`box`,`text`,`media`,`container`]),natural:rc.nullable(),hugsHeight:W(),inset:rc,sizing:K({layout:nc,fills:W()}).nullable()}),ac=K({left:X,top:X}),oc=K({x:X,y:X,width:X,height:X}),sc=G(K({index:$s,box:oc,read:ic.nullable(),placed:ac.nullable(),nested:W(),margin:tc})).nullable(),cc=K({hash:V(),ghosts:G(K({index:$s,box:oc,placed:ac.nullable()}))}).nullable(),lc=G(K({index:$s,right:X,top:X})),uc=K({x:X,y:X}),dc=G(K({opacity:X,radius:X,fontFamily:V(),fontSize:X,fontWeight:X,lineHeight:X.nullable(),letterSpacing:X,textAlign:V(),textDecorationLine:V(),textTransform:V(),textWrapStyle:V(),truncated:W(),display:V(),color:V(),bordered:W(),borderWidth:X.nullable(),holdsText:W(),textOnly:W(),text:V(),keepsBreaks:W(),rotation:K({degrees:X.nullable(),scale:uc.nullable(),own:K({rotate:X.nullable().optional(),scale:uc.nullable().optional()}),translated:W(),transform:K({own:V(),ruled:W(),reanchors:W()})}),placement:K({free:W(),left:X,top:X,width:X.nullable(),height:X.nullable(),inline:K({width:V(),height:V()}),wordsLeft:X.nullable()}),layout:nc,inline:K({color:W(),backgroundColor:W(),background:W(),border:W()}),step:K({step:V().nullable(),effect:V().nullable(),start:V().nullable()})})).nullable(),fc=K({index:$s,hash:V()}).nullable(),pc=_s([K({kind:J(`toggle-play`)}),K({kind:J(`seek`),seconds:U().finite()}),K({kind:J(`toggle-sound`)}),K({kind:J(`set-flag`),name:q([`controls`,`autoplay`,`loop`,`muted`]),on:W()})]),mc=K({tag:q([`video`,`audio`]),playable:W(),paused:W(),time:U().finite(),length:Us(e=>typeof e==`number`),muted:W(),mutedInFile:W(),controls:W(),autoplay:W(),loop:W()}).nullable(),hc=[`camera-orbit`,`max-camera-orbit`,`orientation`,`scale`,`animation-name`,`autoplay`],gc=K({name:q(hc),value:V().nullable()}),_c=V().nullable(),vc=K({src:V(),loaded:W(),clips:G(V()),orbit:K({theta:U().finite(),phi:U().finite()}).nullable(),staged:K({"camera-orbit":_c,"max-camera-orbit":_c,orientation:_c,scale:_c,"animation-name":_c,autoplay:_c})}).nullable(),Z=`frameboard-bridge`,yc=`data-frameboard-editing`,bc=/* @__PURE__ */ `content-height.element-box.element-boxes.gap-at.hide-scrollbar.hide-strips.keep-previews.keys.live-body.live-element.measure.media.media-act.model.model-stage.overflow.paint.pick-at.pins.preview-style.restamp.scroll.scroll-act.text-edit.text-written.theme`.split(`.`);function xc(e,t){let{data:n}=e;if(e.origin!==t||!jc(n)||n.tag!==`frameboard-bridge`)return null;if(n.kind===`shown`){let{page:e,hash:t}=n;return typeof e==`string`&&e!==``&&(typeof t==`string`||t===null)?{tag:Z,kind:`shown`,page:e,hash:t}:null}if(typeof n.id!=`string`||n.id===``)return null;let{id:r}=n;switch(n.kind){case`request`:return typeof n.op==`string`&&bc.includes(n.op)?{tag:Z,kind:`request`,id:r,op:n.op,args:n.args}:null;case`reply`:return n.ok===!0?{tag:Z,kind:`reply`,id:r,ok:!0,value:n.value}:n.ok===!1&&typeof n.error==`string`?{tag:Z,kind:`reply`,id:r,ok:!1,error:n.error}:null;case`push`:return{tag:Z,kind:`push`,id:r,value:n.value};case`close`:return{tag:Z,kind:`close`,id:r};default:return null}}let Q=U().int().nonnegative(),$=K({}).strict(),Sc=K({index:Q,hash:V()}),Cc=K({x:U().finite(),y:U().finite()}),wc=K({x:U().finite(),y:U().finite(),width:U().finite(),height:U().finite()}),Tc=K({left:U().finite(),top:U().finite(),right:U().finite(),bottom:U().finite()}),Ec=K({top:U().finite(),size:U().finite()}),Dc=_s([K({kind:J(`commit`),text:V(),breaks:W(),run:U().int().nonnegative().optional()}),K({kind:J(`closed`)})]),Oc={theme:{args:K({theme:q([`light`,`dark`])}),value:W()},"hide-scrollbar":{args:$,value:W()},scroll:{args:$,value:Ec.nullable(),push:Ec.nullable()},"scroll-act":{args:_s([K({act:J(`page`),toward:_s([J(-1),J(1)])}),K({act:J(`to`),top:U().finite()})]),value:W()},keys:{args:K({keys:G(V()),keepTyping:W()}),value:W(),push:K({key:V(),repeat:W()})},"content-height":{args:$,value:U().int().positive().nullable()},"element-box":{args:Sc,value:Tc.nullable()},"element-boxes":{args:K({hash:V(),indexes:G(Q)}),value:G(K({index:Q,box:wc})).nullable()},"live-body":{args:$,value:fc},"live-element":{args:K({hash:V(),indexes:G(Q)}),value:dc},measure:{args:K({hash:V(),indexes:G(Q)}),value:sc,push:sc},overflow:{args:$,value:cc,push:cc},pins:{args:K({indexes:G(Q)}),value:lc,push:lc},"pick-at":{args:K({at:Cc}),value:K({hash:V().nullable(),chain:G(K({index:Q,tag:V()}))})},"gap-at":{args:K({at:Cc,carried:Q.optional()}),value:qs},"hide-strips":{args:$,value:W()},"keep-previews":{args:$,value:ls()},media:{args:Sc,value:mc,push:mc},"media-act":{args:Sc.extend({act:pc}),value:W()},model:{args:Sc,value:vc,push:vc},"model-stage":{args:Sc.and(gc),value:W()},paint:{args:K({fill:V()}),value:V().nullable()},"preview-style":{args:K({index:Q,property:V(),value:V().nullable()}),value:ls()},restamp:{args:K({hash:V()}),value:W()},"text-edit":{args:Sc.extend({at:Cc.optional()}),value:W(),push:Dc},"text-written":{args:K({edit:V(),written:W()}),value:ls()}},kc=Symbol(`refused`);function Ac(e,t){let n=Oc[e].args.safeParse(t);return n.success?n.data:kc}function jc(e){return typeof e==`object`&&!!e}function Mc(){let e=document.documentElement.scrollHeight;return e<=innerHeight+1?null:{top:scrollY/e,size:innerHeight/e}}let Nc={theme:({theme:e})=>(t(document.documentElement,e),!0),"hide-scrollbar":(t,{onClose:n})=>{if(!document.head)return!1;let r=document.createElement(`style`);return r.setAttribute(e,``),r.textContent=`html { scrollbar-width: none }`,document.head.append(r),n(()=>r.remove()),!0},scroll:(e,{push:t,onClose:n})=>{let r=Mc(),i=()=>{let e=Mc();(e?.top!==r?.top||e?.size!==r?.size)&&(r=e,t(e))},a=new ResizeObserver(i);return a.observe(document.documentElement),addEventListener(`scroll`,i),addEventListener(`resize`,i),n(()=>{a.disconnect(),removeEventListener(`scroll`,i),removeEventListener(`resize`,i)}),r},"scroll-act":e=>(e.act===`page`?scrollBy({top:e.toward*innerHeight}):scrollTo({top:e.top*document.documentElement.scrollHeight}),!0),"content-height":()=>document.body?Pc(document):null};function Pc(e){let t=e.defaultView;if(!t)return 1;let n=e=>{let n=t.getComputedStyle(e);return n.overflowX!==`visible`||n.overflowY!==`visible`},r=t=>{for(let r=t.parentElement;r&&r!==e.body;r=r.parentElement)if(n(r))return!0;return!1},i=(e,t)=>e<t?(t-e)/2:0,a=r=>{let a=-1/0;if(n(r))return a;let o=parseFloat(t.getComputedStyle(r).lineHeight);for(let n of r.childNodes){if(n.nodeType!==t.Node.TEXT_NODE)continue;let r=e.createRange();r.selectNodeContents(n);for(let e of r.getClientRects())(e.width!==0||e.height!==0)&&(a=Math.max(a,e.bottom-i(o,e.height)))}return a},o=[`img`,`video`,`canvas`,`iframe`,`object`,`embed`,`audio`],s=e=>{let n=e.getBoundingClientRect();if(e.namespaceURI!==`http://www.w3.org/1999/xhtml`||o.includes(e.localName))return n.bottom;let r=t.getComputedStyle(e);if(r.display!==`inline`||parseFloat(r.paddingBottom)+parseFloat(r.borderBottomWidth)>0)return n.bottom;let a=parseFloat(r.paddingTop)+parseFloat(r.borderTopWidth);return n.bottom-i(parseFloat(r.lineHeight),n.height-a)},c=e.documentElement.getBoundingClientRect().bottom;for(let t of e.querySelectorAll(`body *`))r(t)||(c=Math.max(c,s(t),a(t)));return Math.max(1,Math.ceil(c+t.scrollY))}let Fc=/* @__PURE__ */ new Set([`html`,`body`]);function Ic(e,t){let n=[];for(let i=document.elementFromPoint(e,t);i&&!Fc.has(i.localName);i=i.parentElement){let e=r(document,i);e!==null&&n.push({index:e,tag:i.localName})}return n}let Lc=/* @__PURE__ */ new Set(/* @__PURE__ */ `area.br.col.embed.hr.iframe.img.input.link.meta.model-viewer.noscript.object.picture.script.select.source.style.template.textarea.title.track.video.audio.canvas.wbr.p.h1.h2.h3.h4.h5.h6.pre.button.label.a`.split(`.`));function Rc(e){if(e.localName===`body`)return!0;if(e.namespaceURI!==`http://www.w3.org/1999/xhtml`||Lc.has(e.localName)||e.childElementCount===0||e.closest(`svg, math`))return!1;let t=getComputedStyle(e).display;return t.startsWith(`inline`)||t===`contents`?!1:![...e.childNodes].some(e=>e.nodeType===Node.TEXT_NODE&&(e.textContent??``).trim()!==``)}function zc(e){let t=e.display;if(t.endsWith(`grid`))return{row:!0,reverse:!1,flow:!0};if(!t.endsWith(`flex`))return{row:!1,reverse:!1,flow:!1};let n=e.flexDirection;return{row:n.startsWith(`row`),reverse:n.endsWith(`reverse`),flow:!0}}function Bc(e){let t=e=>{let t=getComputedStyle(e);return t.position!==`static`||t.transform!==`none`},n=e===document.body||e===document.documentElement?null:e;for(let r=e;r&&!n;)t(r)&&(n=r),r=r.parentElement;if(!n)return{x:0-scrollX,y:0-scrollY};let r=n.getBoundingClientRect();return{x:r.left+n.clientLeft-n.scrollLeft,y:r.top+n.clientTop-n.scrollTop}}function Vc(e,t,n,r){if(!n){let n=t.top+t.height/2;return r?e.y>n:e.y<n}if(e.y<t.top)return!0;if(e.y>t.bottom)return!1;let i=t.left+t.width/2;return r?e.x>i:e.x<i}function Hc(e){let t=document.body;if(!t)return null;let n=document.elementFromPoint(e.x,e.y);for(n&&t.contains(n)||(n=t);n&&!Rc(n);)n=n.parentElement;let i=n&&r(document,n);if(!n||i==null)return null;let a=getComputedStyle(n),{row:o,reverse:s,flow:c}=zc(a),l=[...n.children].flatMap(e=>{let t=r(document,e),n=e.getBoundingClientRect();return t!==null&&(n.width>0||n.height>0)?[{index:t,box:n}]:[]}),u=l.findIndex(({box:t})=>Vc(e,t,o,s)),d=u===-1?l.at(-1):l[u-1],f=u===-1?void 0:l[u],p=e=>Number.parseFloat(a.getPropertyValue(`padding-${e}`))||0;return{parent:i,before:f?.index??null,row:o,flow:c,origin:Bc(n),room:Math.max(0,n.clientWidth-p(`left`)-p(`right`)),line:Uc(n.getBoundingClientRect(),a,o,s,{after:d?.box,ahead:f?.box})}}function Uc(e,t,n,r,{after:i,ahead:a}){let o=e=>Number.parseFloat(t.getPropertyValue(`padding-${e}`))||0,s={left:e.left+o(`left`),right:e.right-o(`right`),top:e.top+o(`top`),bottom:e.bottom-o(`bottom`)};if(n){let e=r?a:i,t=r?i:a,n=e&&t?(e.right+t.left)/2:e?.right??t?.left??s.left,o=a??i,c=o?.top??s.top,l=o?.bottom??s.bottom;return{x:n,y:c,width:0,height:Math.max(0,l-c)}}let c=r?a:i,l=r?i:a,u=c&&l?(c.bottom+l.top)/2:c?.bottom??l?.top??s.top;return{x:s.left,y:u,width:Math.max(0,s.right-s.left),height:0}}function Wc(e,t){let n=Hc(e),a=i(document,t),o=n?i(document,n.parent):null;if(!n||!a||!o||a.contains(o))return null;let s=a.nextElementSibling;return o===a.parentElement&&(n.before===t||n.before===(s?r(document,s):null))?null:n}function Gc(e){if(!document.body)return null;let t=document.createElement(`div`);t.style.background=e,document.body.append(t);let n=getComputedStyle(t).backgroundColor;return t.remove(),n}let Kc={"pick-at":({at:e})=>({hash:a(document),chain:Ic(e.x,e.y)}),"gap-at":({at:e,carried:t})=>{let n=a(document),r=t===void 0?Hc(e):Wc(e,t);return n&&r?{hash:n,gap:r}:null},paint:({fill:e})=>Gc(e)};function qc(e,t){e.readyState===`loading`?e.addEventListener(`DOMContentLoaded`,t,{once:!0}):t()}function Jc(e){return a(document)===e.hash?i(document,e.index):null}let Yc=[`Shift`,`Meta`,`Alt`,`Control`],Xc=typeof navigator==`object`?navigator.platform:``,Zc=/Mac|iPod|iPhone|iPad/.test(Xc)?`Meta`:`Control`,Qc=Xc===`Win32`?[`Control`,`Alt`]:[`Alt`];function $c(e){return!!(e.key&&e.code&&e.getModifierState)}function el(e){let t=e.target;return e.repeat||e.isComposing||t!==e.currentTarget&&t.matches(`[contenteditable],input,select,textarea`)}function tl(e,t){return typeof e.getModifierState==`function`?e.getModifierState(t)||Qc.includes(t)&&e.getModifierState(`AltGraph`):!1}function nl(e){return e.trim().split(` `).map(e=>{let t=e.split(/(?<=\w|\])\+/),n=t.pop(),r=n.match(/^\((.+)\)$/),i=r?RegExp(`^(?:${r[1]})$`,`iv`):n,a=[],o=[];for(let e of t){let t=e.match(/^\[(.*)\]$/),n=t?.[1]??e;n=n===`$mod`?Zc:n,t?o.push(n):a.push(n)}return[a,o,i]})}function rl(e,[t,n,r]){let i=t.includes(`AltGraph`);return!((r instanceof RegExp?!(r.test(e.key)||r.test(e.code)):r.toUpperCase()!==e.key.toUpperCase()&&r!==e.code)||t.find(t=>!tl(e,t))||Yc.find(a=>!t.includes(a)&&!n.includes(a)&&r!==a&&tl(e,a)&&!(i&&Qc.includes(a))))}function il(e,t={}){let n=t.timeout??1e3,r=t.ignore??el,i=Object.keys(e).map(t=>[t,nl(t),e[t]]),a=/* @__PURE__ */ new Map,o=null;return e=>{if(!$c(e)||r(e))return;let t=[];for(let[n,r,o]of i){let[i,...s]=a.get(n)||r;if(!rl(e,i))tl(e,e.key)||a.delete(n);else if(s.length>0)a.set(n,s),t.push(n);else if(a.delete(n),t.length)console.warn(`tinykeys: Conflict found, "${n}" did not fire, waiting for:`,t);else{o(e);break}}o&&clearTimeout(o),o=setTimeout(()=>a.clear(),n)}}function al(e,t,n={}){let r=n.event??`keydown`,i=il(t,n);return e.addEventListener(r,i,n.capture),()=>{e.removeEventListener(r,i,n.capture)}}function ol(e,t){if(e.isComposing||e.defaultPrevented)return!0;if(!t)return!1;let n=e.target;return n instanceof HTMLElement&&(n.isContentEditable||n.matches(`[contenteditable],input,select,textarea`))}let sl={keys:({keys:e,keepTyping:t},{push:n,onClose:r})=>(r(al(window,Object.fromEntries(e.map(e=>[e,t=>{t.preventDefault(),n({key:e,repeat:t.repeat})}])),{ignore:e=>ol(e,t)})),!0)},cl={step:`data-step`,effect:`data-step-effect`,start:`data-step-start`};function ll(e){return Math.round(parseFloat(e)*100)/100}function ul(e,t){let n=e.parentElement,r=n?getComputedStyle(n):null,i=e instanceof HTMLElement?e:null,a=e=>ll(e)||0;return{flow:Js(t.display,t.flexDirection,t.flexWrap),inline:t.display.startsWith(`inline-`),direction:t.flexDirection,wrap:t.flexWrap,justify:t.justifyContent,alignItems:t.alignItems,ownJustify:!!i?.style.getPropertyValue(`justify-content`),rowGap:t.rowGap===`normal`?0:a(t.rowGap),columnGap:t.columnGap===`normal`?0:a(t.columnGap),padding:{top:a(t.paddingTop),right:a(t.paddingRight),bottom:a(t.paddingBottom),left:a(t.paddingLeft)},parent:r?Js(r.display,r.flexDirection,r.flexWrap):`block`,parentAlignItems:r?.alignItems??`normal`,width:Math.round(i?.offsetWidth??0),height:Math.round(i?.offsetHeight??0)}}function dl(e){let t=getComputedStyle(e),n=e.textContent??``,r=[t.borderTopWidth,t.borderRightWidth,t.borderBottomWidth,t.borderLeftWidth];return{opacity:Number(t.opacity),radius:Math.round(parseFloat(t.borderTopLeftRadius)||0),fontFamily:t.fontFamily,fontSize:ll(t.fontSize),fontWeight:Number(t.fontWeight),lineHeight:t.lineHeight===`normal`?null:ll(t.lineHeight),letterSpacing:t.letterSpacing===`normal`?0:ll(t.letterSpacing),textAlign:vl(t.textAlign,t.direction),textDecorationLine:t.textDecorationLine,textTransform:t.textTransform,textWrapStyle:t.getPropertyValue(`text-wrap-style`)||`auto`,truncated:t.textOverflow===`ellipsis`&&t.overflowX!==`visible`&&t.getPropertyValue(`text-wrap-mode`)===`nowrap`,display:t.display,color:t.color,bordered:r.some(e=>parseFloat(e)>0),borderWidth:r.every(e=>e===r[0])?ll(t.borderTopWidth):null,holdsText:n.trim()!==``,textOnly:e.childElementCount===0&&n.trim()!==``,text:n,keepsBreaks:t.whiteSpace!==`normal`&&t.whiteSpace!==`nowrap`,rotation:{degrees:Xs(t.rotate),scale:Zs(t.scale),own:ml(e),translated:Qs(t.transform),transform:hl(e,t)},placement:fl(e,t),layout:ul(e,t),inline:_l(e),step:{step:e.getAttribute(cl.step),effect:e.getAttribute(cl.effect),start:e.getAttribute(cl.start)}}}function fl(e,t){let n=t.position===`absolute`||t.position===`fixed`,r=e=>{let t=parseFloat(e);return Number.isNaN(t)?null:Math.round(t)},i=r(t.width),a=r(t.height),o=e instanceof HTMLElement?e.style:null,s={width:o?.getPropertyValue(`width`)??``,height:o?.getPropertyValue(`height`)??``};if(n&&t.left.endsWith(`px`)&&t.top.endsWith(`px`))return{free:n,left:Math.round(parseFloat(t.left)),top:Math.round(parseFloat(t.top)),width:i,height:a,inline:s,wordsLeft:null};let c=e.parentElement,l=e=>{let t=getComputedStyle(e);return t.position!==`static`||t.transform!==`none`},u=null;if(t.position!==`fixed`){if(!n&&c&&c!==document.body&&c!==document.documentElement)u=c;else for(let e=c;e&&!u;e=e.parentElement)l(e)&&(u=e)}let d=t.position===`fixed`?0:-scrollX,f=t.position===`fixed`?0:-scrollY;if(u){let e=u.getBoundingClientRect();d=e.left+u.clientLeft-u.scrollLeft,f=e.top+u.clientTop-u.scrollTop}let p=e.getBoundingClientRect(),m=parseFloat(t.marginLeft)||0,h=pl(e,t);return{free:n,left:Math.round(p.left-d-m),top:Math.round(p.top-f-(parseFloat(t.marginTop)||0)),width:i,height:a,inline:s,wordsLeft:h===null?null:Math.round(h-d-m)}}function pl(e,t){if(!(e.childNodes.length>0&&[...e.childNodes].every(e=>e.nodeType===Node.TEXT_NODE)&&e.textContent?.trim()))return null;let n=document.createRange();n.selectNodeContents(e);let r=(parseFloat(t.borderLeftWidth)||0)+(parseFloat(t.paddingLeft)||0);return n.getBoundingClientRect().left-r}function ml(e){let t=e instanceof HTMLElement?e:null,n=!!t?.style.getPropertyValue(`rotate`),r=!!t?.style.getPropertyValue(`scale`);if(!t||!n&&!r)return{};let i=t.getAttribute(`style`);t.style.removeProperty(`rotate`),t.style.removeProperty(`scale`);let a=getComputedStyle(t),o={...n?{rotate:Xs(a.rotate)}:{},...r?{scale:Zs(a.scale)}:{}};return i===null?t.removeAttribute(`style`):t.setAttribute(`style`,i),o}function hl(e,t){let n=e instanceof HTMLElement?e.style.getPropertyValue(`transform`):``;return{own:n,ruled:n===``&&t.transform!==`none`,reanchors:t.transform===`none`&&gl(e,t)}}function gl(e,t){let n=t.position!==`static`;for(let t of e.querySelectorAll(`*`)){let r=getComputedStyle(t).position;if(r!==`fixed`&&(r!==`absolute`||n))continue;let i=!1;for(let n=t.parentElement;n&&n!==e&&!i;n=n.parentElement){let e=getComputedStyle(n);i=e.transform!==`none`||r===`absolute`&&e.position!==`static`}if(!i)return!0}return!1}function _l(e){let t=e instanceof HTMLElement?e.style:null,n=t?Array.from({length:t.length},(e,n)=>t.item(n)):[];return{color:n.includes(`color`),backgroundColor:n.includes(`background-color`),background:/(?:^|;)\s*background\s*:/i.test(e.getAttribute(`style`)??``),border:n.some(e=>e.startsWith(`border-`)&&!e.endsWith(`-radius`))}}function vl(e,t){return e===`start`?t===`rtl`?`right`:`left`:e===`end`?t===`rtl`?`left`:`right`:e}let yl={"live-element":({hash:e,indexes:t})=>{if(a(document)!==e)return null;let n=t.flatMap(e=>{let t=i(document,e);return t?[dl(t)]:[]});return n.length===t.length?n:null},"live-body":()=>{let e=a(document),t=document.body?r(document,document.body):null;return e!==null&&t!==null?{index:t,hash:e}:null}},bl=/* @__PURE__ */ new Set([`html`,`body`]),xl=/* @__PURE__ */ new Set([`img`,`video`,`model-viewer`]);function Sl(e){if(!e||bl.has(e.localName))return null;if(xl.has(e.localName))return`media`;let t=(e.textContent??``).trim()!==``;return e.childElementCount>0?t&&[...e.children].every(Cl)?`text`:`container`:t?`text`:e.localName===`div`?`box`:null}function Cl(e){let t=getComputedStyle(e).display;return t===`inline`||t.startsWith(`inline-`)}function wl(e){let t=Sl(e),n=getComputedStyle(e);return!t||Xs(n.rotate)!==0||n.transform.startsWith(`matrix3d(`)||(t===`text`||t===`container`)&&(n.display===`inline`||n.display===`contents`)?null:{kind:t,natural:Ol(e),hugsHeight:t===`text`&&!kl(e),inset:Dl(n),sizing:t===`container`?El(e,n):null}}let Tl=/* @__PURE__ */ new Set([`vertical`,`horizontal`,`wrap`]);function El(e,t){let n=ul(e,t);return{layout:n,fills:Tl.has(n.parent)&&(parseFloat(t.flexGrow)||0)>0}}function Dl(e){if(e.boxSizing!==`content-box`)return{width:0,height:0};let t=(...e)=>e.reduce((e,t)=>e+(parseFloat(t)||0),0);return{width:t(e.paddingLeft,e.paddingRight,e.borderLeftWidth,e.borderRightWidth),height:t(e.paddingTop,e.paddingBottom,e.borderTopWidth,e.borderBottomWidth)}}function Ol(e){let[t,n]=e instanceof HTMLImageElement?[e.naturalWidth,e.naturalHeight]:e instanceof HTMLVideoElement?[e.videoWidth,e.videoHeight]:[0,0];return t>0&&n>0?{width:t,height:n}:null}function kl(e){let t=e instanceof HTMLElement?e.style.height:``;return t!==``&&t!==`auto`}function Al(e,t){if(t.some(t=>t!==e&&t.contains(e)))return null;let n=getComputedStyle(e);if(n.position!==`absolute`&&n.position!==`fixed`)return null;let r=parseFloat(n.left),i=parseFloat(n.top);return Number.isNaN(r)||Number.isNaN(i)?null:{left:r,top:i}}function jl(e){let t=getComputedStyle(e),n=e=>Number.parseFloat(e)||0;return{top:n(t.marginTop),right:n(t.marginRight),bottom:n(t.marginBottom),left:n(t.marginLeft)}}function Ml(e){let t=e.getBoundingClientRect();return{x:Math.round(t.left),y:Math.round(t.top),width:Math.round(t.width),height:Math.round(t.height)}}function Nl(e){let t=e.getBoundingClientRect();return{x:t.left,y:t.top,width:t.width,height:t.height}}function Pl(e,t){if(a(document)!==e)return null;let n=t.flatMap(e=>{let t=i(document,e);return t?[t]:[]});return n.length===t.length?n:null}function Fl(e,t){return t.map((n,r)=>({index:e[r]??0,box:Ml(n),read:wl(n),placed:Al(n,[]),nested:t.some(e=>e!==n&&e.contains(n)),margin:jl(n)}))}function Il(){let e=document.body;if(!e)return[];let t=innerWidth,r=innerHeight,i=[],a=[];return n(document).forEach((n,o)=>{if(!e.contains(n)||n===e||a.some(e=>e.contains(n))||getComputedStyle(n).position===`fixed`)return;let s=n.getBoundingClientRect();(s.width!==0||s.height!==0)&&(s.left<-1||s.top<-1||s.right>t+1||s.bottom>r+1)&&!Ll(n,e)&&(a.push(n),i.push({index:o,box:Ml(n),placed:Al(n,[])}))}),i}function Ll(e,t){let n=e=>{let t=e.parentElement;if(getComputedStyle(e).position!==`absolute`)return t;for(;t&&getComputedStyle(t).position===`static`&&getComputedStyle(t).transform===`none`;)t=t.parentElement;return t};for(let r=n(e);r&&r!==t&&t.contains(r);r=n(r)){let e=getComputedStyle(r);if(e.overflowX!==`visible`||e.overflowY!==`visible`)return!0}return!1}function Rl(){let e=a(document);return e===null?null:{hash:e,ghosts:Il()}}function zl(e){return e.flatMap(e=>{let t=i(document,e)?.getBoundingClientRect();return t?[{index:e,right:t.right,top:t.top}]:[]})}function Bl(e,t,n){let r=new ResizeObserver(t);for(let t of[...e,document.documentElement])r.observe(t);let i=new MutationObserver(t);if(n)for(let t of e)i.observe(t,{attributes:!0,attributeFilter:[`style`]});return addEventListener(`scroll`,t,!0),addEventListener(`resize`,t),()=>{r.disconnect(),i.disconnect(),removeEventListener(`scroll`,t,!0),removeEventListener(`resize`,t)}}let Vl={"element-boxes":({hash:e,indexes:t})=>a(document)===e?t.flatMap(e=>{let t=i(document,e),n=t?Nl(t):null;return n&&n.width>0&&n.height>0?[{index:e,box:n}]:[]}):null,measure:({hash:e,indexes:t},{push:n,onClose:r})=>{let i=Pl(e,t);return i?(r(Bl(i,()=>n(Fl(t,i)),i.length>1)),Fl(t,i)):null},overflow:(e,{push:t,onClose:n})=>{let r=0,i=()=>{r===0&&(r=requestAnimationFrame(()=>{r=0,t(Rl())}))},a=new MutationObserver(i);return a.observe(document,{attributes:!0,attributeFilter:[`style`],subtree:!0}),addEventListener(`resize`,i),n(()=>{cancelAnimationFrame(r),a.disconnect(),removeEventListener(`resize`,i)}),Rl()},pins:({indexes:e},{push:t,onClose:n})=>(n(Bl(e.flatMap(e=>{let t=i(document,e);return t?[t]:[]}),()=>t(zl(e)),!1)),zl(e))},Hl=[`play`,`pause`,`timeupdate`,`durationchange`,`loadedmetadata`,`volumechange`,`seeked`,`error`,`emptied`],Ul=[`controls`,`autoplay`,`loop`,`muted`];function Wl(e){let t=Jc(e);return t instanceof HTMLMediaElement?t:null}function Gl(e){let t=e instanceof HTMLVideoElement,n=t&&e.readyState>=1&&e.videoWidth===0;return{tag:t?`video`:`audio`,playable:e.error===null&&!n,paused:e.paused,time:e.currentTime,length:e.duration,muted:e.muted,mutedInFile:e.defaultMuted,controls:e.hasAttribute(`controls`),autoplay:e.hasAttribute(`autoplay`),loop:e.hasAttribute(`loop`)}}function Kl(e,t){switch(t.kind){case`toggle-play`:e.paused?e.play().catch(()=>void 0):e.pause();return;case`seek`:e.currentTime=t.seconds;return;case`toggle-sound`:e.muted=!e.muted;return;case`set-flag`:e.toggleAttribute(t.name,t.on)}}let ql=`frameboard-media-strip`;function Jl(){if(document.getElementById(ql))return()=>{};let t=document.createElement(`style`);return t.id=ql,t.setAttribute(e,``),t.textContent=`video::-webkit-media-controls { display: none !important }`,document.head?.append(t),()=>t.remove()}let Yl={media:(e,{push:t,onClose:n})=>{let r=Wl(e);if(!r)return null;let i=()=>t(Gl(r));for(let e of Hl)r.addEventListener(e,i);let a=new MutationObserver(i);return a.observe(r,{attributeFilter:[...Ul]}),n(()=>{for(let e of Hl)r.removeEventListener(e,i);a.disconnect()}),Gl(r)},"media-act":({act:e,...t})=>{let n=Wl(t);return n?(Kl(n,e),!0):!1},"hide-strips":(e,{onClose:t})=>(t(Jl()),!0)},Xl=[`load`,`error`,`camera-change`];function Zl(e){let t=Jc(e);return t instanceof HTMLElement&&t.localName===`model-viewer`?t:null}function Ql(e){let t=Math.round(e*180/Math.PI)%360;return t>180?t-360:t<=-180?t+360:t}function $l(e){let t=e.loaded===!0,n=t?e.getCameraOrbit?.():void 0,r={};for(let t of hc)r[t]=e.getAttribute(t);return{src:e.getAttribute(`src`)??``,loaded:t,clips:t?[...e.availableAnimations??[]]:[],orbit:n?{theta:Ql(n.theta),phi:Ql(n.phi)}:null,staged:r}}function eu(e,t,n){n===null?e.removeAttribute(t):e.setAttribute(t,n),t===`camera-orbit`&&e.updateComplete?.then(()=>e.jumpCameraToGoal?.()),t===`autoplay`&&n===null&&e.loaded&&(e.pause?.(),e.currentTime=0)}let tu={model:(e,{push:t,onClose:n})=>{let r=Zl(e);if(!r)return null;let i=$l(r),a=JSON.stringify(i),o=()=>{let e=$l(r),n=JSON.stringify(e);n!==a&&(a=n,t(e))};for(let e of Xl)r.addEventListener(e,o);let s=new MutationObserver(o);return s.observe(r,{attributeFilter:[`src`,...hc]}),n(()=>{for(let e of Xl)r.removeEventListener(e,o);s.disconnect()}),i},"model-stage":({name:e,value:t,...n})=>{let r=Zl(n);return r?(eu(r,e,t),!0):!1}},nu=/* @__PURE__ */ new Map;function ru(e,t,n){let r=`${e}:${t}`,a=i(document,e),o=a instanceof HTMLElement?a:null,s=nu.get(r);if(n===null){if(nu.delete(r),!s||s.element!==o||!o)return;s.value===``?s.attribute===null?o.removeAttribute(`style`):o.setAttribute(`style`,s.attribute):o.style.setProperty(t,s.value,s.priority),o.getAttribute(`style`)===``&&o.removeAttribute(`style`)}else o&&(s?.element!==o&&nu.set(r,{element:o,value:o.style.getPropertyValue(t),priority:o.style.getPropertyPriority(t),attribute:o.getAttribute(`style`)}),o.style.setProperty(t,n,`important`))}function iu(t){return{"preview-style":({index:e,property:t,value:n})=>(ru(e,t,n),null),"keep-previews":()=>(nu.clear(),null),restamp:({hash:n})=>{let r=document.querySelector(`style[${e}]`);return r?(r.setAttribute(`data-hash`,n),t(),!0):!1}}}let au=/\r\n|\r/g,ou=/\n+$/,su=/[\t\n\f\r ]+/g;function cu(e){let{whiteSpace:t}=getComputedStyle(e);return t===`normal`||t===`nowrap`}function lu(e,t,n){if(!(e instanceof HTMLElement))return null;if(e.childElementCount>0){let r=n&&uu(e,n);return r?du(e,r,t):null}if((e.textContent??``).trim()===``)return null;let r=e,i=r.textContent??``,a=cu(r),o=a?i.replace(su,` `).trim():i,s=r.style.whiteSpace;o!==i&&(r.textContent=o);let c=!0,l=()=>{c=!1,r.removeAttribute(`contenteditable`),r.removeAttribute(yc),r.removeEventListener(`keydown`,h),r.removeEventListener(`paste`,g),r.removeEventListener(`blur`,m),window.removeEventListener(`pagehide`,p)},u=()=>{r.textContent=i,r.style.whiteSpace=s},d=()=>{r.isConnected&&u()},f=()=>{c&&(l(),u())};function p(){l(),t({kind:`closed`},d)}function m(){if(!c)return;l();let e=(r.textContent??``).replace(au,`
116
- `).replace(ou,``);e===o.replace(ou,``)?(u(),t({kind:`closed`},d)):(r.textContent=e,t({kind:`commit`,text:e,breaks:a&&e.includes(`
115
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0])a(n);else{if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&e.reused===`ref`)&&a(n)}}e.external&&(e.sharedDefsExtractedFor=e.external)}function Ea(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;Ea(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}let Da=/* @__PURE__ */ new Set([`type`,`properties`,`required`,`additionalProperties`]),Oa=[`oneOf`,`anyOf`];function ka(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function Aa(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!Da.has(e))return null;t.push(n)}let n={},r=/* @__PURE__ */ new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??ka(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}m(n,r,e.length===1?e[0]:Aa(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=ka(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function ja(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of Da)if(t in e)return;let n=t.filter(e=>Oa.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=Aa(t);else{let e=n[0],i=Oa.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>Aa([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,Sa(e,r))}function Ma(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Sa(i,s),Sa(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())Ea(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=/* @__PURE__ */ new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])ja(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Sa(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,m(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:Pa(t,`input`,e.processors),output:Pa(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function P(e,t){let n=t??{seen:/* @__PURE__ */ new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return P(r.element,n);if(r.type===`set`)return P(r.valueType,n);if(r.type===`lazy`)return P(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return P(r.innerType,n);if(r.type===`intersection`)return P(r.left,n)||P(r.right,n);if(r.type===`record`||r.type===`map`)return P(r.keyType,n)||P(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:P(r.in,n)||P(r.out,n);if(r.type===`object`){for(let e in r.shape)if(P(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(P(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(P(e,n))return!0;return!!(r.rest&&P(r.rest,n))}return!1}let Na=(e,t={})=>n=>{let r=Ca({...n,processors:t});return N(e,r),Ta(r,e),Ma(r,e)},Pa=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Ca({...i??{},target:a,io:t,processors:n});return N(e,o),Ta(o,e),Ma(o,e)},Fa=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},F=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},Ia=(e,t)=>{Fa(e,`minimum`,t),F(e,`maximum`,t)},La=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},Ra=(e,t)=>{e.patterns??=/* @__PURE__ */ new Set,e.patterns.add(t)},za=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},Ba=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},Va=(e,t)=>Fa(e,`minimum`,t.minimum),Ha=(e,t)=>F(e,`maximum`,t.maximum),Ua=e=>(t,n)=>{Ba(t,n.format);let[r,i]=e[n.format];Fa(t,`minimum`,r),F(t,`maximum`,i)},Wa={greater_than:(e,t)=>Fa(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>F(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>La(e,t.value),number_format:Ua(pe),bigint_format:Ua(me),min_length:Va,max_length:Ha,length_equals:(e,t)=>Ia(e,t.length),min_size:Va,max_size:Ha,size_equals:(e,t)=>Ia(e,t.size),string_format:(e,t)=>{Ba(e,t.format),t.pattern&&Ra(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>za(e,t.mime)};function I(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)Wa[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&Fa(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&Fa(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&F(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&F(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&La(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&za(t,i.mime);for(let e of i.patterns??[])Ra(t,e);return t}let Ga={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Ka=/* @__PURE__ */ new Map([[nr,Bt],[ir,Vt]]),qa=e=>Ka.get(e)??e,Ja=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=I(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Ga[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(qa);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Ya=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=I(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=/* @__PURE__ */ new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):M(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},Xa=(e,t,n,r)=>{n.type=`boolean`},Za=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},Qa=(e,t,n,r)=>{n.not={}},$a=(e,t,n,r)=>{let i=e._zod.def,a=o(i.entries);a.length===0?n.not={}:(a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a)},eo=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(M(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(M(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},to=(e,t,n,r)=>{M(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},no=(e,t,n,r)=>{M(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},ro=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=I(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=N(a.element,t,{...r,path:[...r.path,`items`]})};function io(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?io(t.out):t.type===`catch`?io(t.innerType):e._zod.optin}let ao=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&M(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)m(i.properties,e,N(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?io(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=N(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},oo=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>N(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},so=(e,t,n,r)=>{let i=e._zod.def,a=N(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=N(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},co=(e,t,n,r)=>{let i=e._zod.def,a=N(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},lo=(e,t,n,r)=>{let i=e._zod.def;N(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},uo=Symbol();function fo(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(M(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),uo):JSON.parse(o)}let po=(e,t,n,r)=>{let i=e._zod.def;N(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=fo(i.defaultValue,e,t,n,r);o!==uo&&(n.default=o)},mo=(e,t,n,r)=>{let i=e._zod.def;N(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=fo(i.defaultValue,e,t,n,r);o!==uo&&(n._prefault=o)},ho=(e,t,n,r)=>{let i=e._zod.def;N(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{M(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},go=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;N(o,t,r);let s=t.seen.get(e);s.ref=o},_o=(e,t,n,r)=>{let i=e._zod.def;N(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},vo=(e,t,n,r)=>{let i=e._zod.def;N(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},yo=/* @__PURE__ */ new WeakSet([Object.prototype,Error.prototype]);function bo(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}let L=/*@__PURE__*/ T(`ZodError`,(e,t)=>{tt.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);yo.has(n)||(yo.add(n),bo(n,`format`,e=>t=>it(e,t)),bo(n,`flatten`,e=>t=>rt(e,t)),bo(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,c,2)}),bo(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,c,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),xo=/* @__PURE__ */ ot(L),So=/* @__PURE__ */ st(L),Co=/* @__PURE__ */ ct(L),wo=/* @__PURE__ */ ut(L),To=/* @__PURE__ */ gt(L),Eo=/* @__PURE__ */ _t(L),Do=/* @__PURE__ */ vt(L),Oo=/* @__PURE__ */ yt(L),ko=/* @__PURE__ */ bt(L),Ao=/* @__PURE__ */ xt(L),jo=/* @__PURE__ */ St(L),Mo=/* @__PURE__ */ Ct(L);function No(){D.localeError||O(fi())}function Po(){D.memoizer||O({memoizer:li()})}let R=/*@__PURE__*/ T(`ZodType`,(e,t)=>(No(),A.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(y(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return b(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Ks(e,t))},superRefine(e,t){return this.check(qs(e,t))},overwrite(e){return this.check(/* @__PURE__ */ da(e))},optional(){return Ds(this)},exactOptional(){return ks(this)},nullable(){return js(this)},nullish(){return Ds(js(this))},nonoptional(e){return Ls(this,e)},array(){return U(this)},or(e){return ys([this,e])},and(e){return xs(this,e)},transform(e){return Vs(this,Ts(e))},default(e){return Ns(this,e)},prefault(e){return Fs(this,e)},catch(e){return zs(this,e)},pipe(e){return Vs(this,e)},readonly(){return Us(this)},describe(e){let t=this.clone();return gi.add(t,{description:e}),t},meta(...e){if(e.length===0)return gi.get(this);let t=this.clone();return gi.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return Ie(this,`~standard`,{...wn(this),jsonSchema:{input:Pa(this,`input`),output:Pa(this,`output`)}})},set"~standard"(e){C(this,`~standard`,e)},parse:function e(t,n){return xo(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await So(this,t,n,{callee:e})},safeParse(e,t){return Co(this,e,t)},async safeParseAsync(e,t){return wo(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){C(this,`spa`,e)},validate(e,t){return pt(this,e,t)},validateAsync(e,t){return ht(this,e,t)},encode:function e(t,n){return To(this,t,n,{callee:e})},decode:function e(t,n){return Eo(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await Do(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await Oo(this,t,n,{callee:e})},safeEncode(e,t){return ko(this,e,t)},safeDecode(e,t){return Ao(this,e,t)},async safeEncodeAsync(e,t){return jo(this,e,t)},async safeDecodeAsync(e,t){return Mo(this,e,t)},toJSONSchema(e){return Na(this,{})(e)},get description(){return gi.get(this)?.description},get _def(){return this._zod.def}}),Fo=/*@__PURE__*/ T(`_ZodString`,(e,t)=>{Tn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ja(e,t,n,r)},/*@__PURE__*/ Le({format:e=>I(e).format??null,minLength:e=>I(e).minimum??null,maxLength:e=>I(e).maximum??null},{regex(...e){return this.check(/* @__PURE__ */ aa(...e))},includes(...e){return this.check(/* @__PURE__ */ ca(...e))},startsWith(...e){return this.check(/* @__PURE__ */ la(...e))},endsWith(...e){return this.check(/* @__PURE__ */ ua(...e))},min(...e){return this.check(/* @__PURE__ */ ra(...e))},max(...e){return this.check(/* @__PURE__ */ na(...e))},length(...e){return this.check(/* @__PURE__ */ ia(...e))},nonempty(...e){return this.check(/* @__PURE__ */ ra(1,...e))},lowercase(e){return this.check(/* @__PURE__ */ oa(e))},uppercase(e){return this.check(/* @__PURE__ */ sa(e))},trim(){return this.check(/* @__PURE__ */ pa())},normalize(...e){return this.check(/* @__PURE__ */ fa(...e))},toLowerCase(){return this.check(/* @__PURE__ */ ma())},toUpperCase(){return this.check(/* @__PURE__ */ ha())},slugify(){return this.check(/* @__PURE__ */ ga())}})),Io=/*@__PURE__*/ T(`ZodString`,(e,t)=>{Tn.init(e,t),Fo.init(e,t)},{email(e){return this.check(/* @__PURE__ */ yi(Vo,e))},url(e){return this.check(/* @__PURE__ */ Ti(Wo,e))},jwt(e){return this.check(/* @__PURE__ */ Bi(as,e))},emoji(e){return this.check(/* @__PURE__ */ Ei(Go,e))},guid(e){return this.check(/* @__PURE__ */ bi(Ho,e))},uuid(e){return this.check(/* @__PURE__ */ xi(Uo,e))},uuidv4(e){return this.check(/* @__PURE__ */ Si(Uo,e))},uuidv6(e){return this.check(/* @__PURE__ */ Ci(Uo,e))},uuidv7(e){return this.check(/* @__PURE__ */ wi(Uo,e))},nanoid(e){return this.check(/* @__PURE__ */ Di(Ko,e))},cuid(e){return this.check(/* @__PURE__ */ Oi(qo,e))},cuid2(e){return this.check(/* @__PURE__ */ ki(Jo,e))},ulid(e){return this.check(/* @__PURE__ */ Ai(Yo,e))},base64(e){return this.check(/* @__PURE__ */ Li(ns,e))},base64url(e){return this.check(/* @__PURE__ */ Ri(rs,e))},xid(e){return this.check(/* @__PURE__ */ ji(Xo,e))},ksuid(e){return this.check(/* @__PURE__ */ Mi(Zo,e))},ipv4(e){return this.check(/* @__PURE__ */ Ni(Qo,e))},ipv6(e){return this.check(/* @__PURE__ */ Pi($o,e))},cidrv4(e){return this.check(/* @__PURE__ */ Fi(es,e))},cidrv6(e){return this.check(/* @__PURE__ */ Ii(ts,e))},e164(e){return this.check(/* @__PURE__ */ zi(is,e))},datetime(e){return this.check(/* @__PURE__ */ Vi(Lo,e))},date(e){return this.check(/* @__PURE__ */ Hi(Ro,e))},time(e){return this.check(/* @__PURE__ */ Ui(zo,e))},duration(e){return this.check(/* @__PURE__ */ Wi(Bo,e))}});function z(e){return/* @__PURE__ */ vi(Io,e)}let B=/*@__PURE__*/ T(`ZodStringFormat`,(e,t)=>{j.init(e,t),Fo.init(e,t)}),Lo=/*@__PURE__*/ T(`ZodISODateTime`,(e,t)=>{Wn.init(e,t),B.init(e,t)}),Ro=/*@__PURE__*/ T(`ZodISODate`,(e,t)=>{Gn.init(e,t),B.init(e,t)}),zo=/*@__PURE__*/ T(`ZodISOTime`,(e,t)=>{Kn.init(e,t),B.init(e,t)}),Bo=/*@__PURE__*/ T(`ZodISODuration`,(e,t)=>{qn.init(e,t),B.init(e,t)}),Vo=/*@__PURE__*/ T(`ZodEmail`,(e,t)=>{On.init(e,t),B.init(e,t)}),Ho=/*@__PURE__*/ T(`ZodGUID`,(e,t)=>{En.init(e,t),B.init(e,t)}),Uo=/*@__PURE__*/ T(`ZodUUID`,(e,t)=>{Dn.init(e,t),B.init(e,t)}),Wo=/*@__PURE__*/ T(`ZodURL`,(e,t)=>{In.init(e,t),B.init(e,t)}),Go=/*@__PURE__*/ T(`ZodEmoji`,(e,t)=>{Ln.init(e,t),B.init(e,t)}),Ko=/*@__PURE__*/ T(`ZodNanoID`,(e,t)=>{Rn.init(e,t),B.init(e,t)}),qo=/*@__PURE__*/ T(`ZodCUID`,(e,t)=>{zn.init(e,t),B.init(e,t)}),Jo=/*@__PURE__*/ T(`ZodCUID2`,(e,t)=>{Bn.init(e,t),B.init(e,t)}),Yo=/*@__PURE__*/ T(`ZodULID`,(e,t)=>{Vn.init(e,t),B.init(e,t)}),Xo=/*@__PURE__*/ T(`ZodXID`,(e,t)=>{Hn.init(e,t),B.init(e,t)}),Zo=/*@__PURE__*/ T(`ZodKSUID`,(e,t)=>{Un.init(e,t),B.init(e,t)}),Qo=/*@__PURE__*/ T(`ZodIPv4`,(e,t)=>{Jn.init(e,t),B.init(e,t)}),$o=/*@__PURE__*/ T(`ZodIPv6`,(e,t)=>{Zn.init(e,t),B.init(e,t)}),es=/*@__PURE__*/ T(`ZodCIDRv4`,(e,t)=>{Qn.init(e,t),B.init(e,t)}),ts=/*@__PURE__*/ T(`ZodCIDRv6`,(e,t)=>{er.init(e,t),B.init(e,t)}),ns=/*@__PURE__*/ T(`ZodBase64`,(e,t)=>{rr.init(e,t),B.init(e,t)}),rs=/*@__PURE__*/ T(`ZodBase64URL`,(e,t)=>{or.init(e,t),B.init(e,t)}),is=/*@__PURE__*/ T(`ZodE164`,(e,t)=>{sr.init(e,t),B.init(e,t)}),as=/*@__PURE__*/ T(`ZodJWT`,(e,t)=>{lr.init(e,t),B.init(e,t)}),os=/*@__PURE__*/ T(`ZodNumber`,(e,t)=>{ur.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ya(e,t,n,r),e.isFinite=!0},/*@__PURE__*/ Le({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=I(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=I(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=I(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>I(e).format??null},{gt(e,t){return this.check(/* @__PURE__ */ $i(e,t))},gte(e,t){return this.check(/* @__PURE__ */ ea(e,t))},min(e,t){return this.check(/* @__PURE__ */ ea(e,t))},lt(e,t){return this.check(/* @__PURE__ */ Zi(e,t))},lte(e,t){return this.check(/* @__PURE__ */ Qi(e,t))},max(e,t){return this.check(/* @__PURE__ */ Qi(e,t))},int(e){return this.check(cs(e))},safe(e){return this.check(cs(e))},positive(e){return this.check(/* @__PURE__ */ $i(0,e))},nonnegative(e){return this.check(/* @__PURE__ */ ea(0,e))},negative(e){return this.check(/* @__PURE__ */ Zi(0,e))},nonpositive(e){return this.check(/* @__PURE__ */ Qi(0,e))},multipleOf(e,t){return this.check(/* @__PURE__ */ ta(e,t))},step(e,t){return this.check(/* @__PURE__ */ ta(e,t))},finite(){return this}}));function V(e){return/* @__PURE__ */ Gi(os,e)}let ss=/*@__PURE__*/ T(`ZodNumberFormat`,(e,t)=>{dr.init(e,t),os.init(e,t)});function cs(e){return/* @__PURE__ */ Ki(ss,e)}let ls=/*@__PURE__*/ T(`ZodBoolean`,(e,t)=>{fr.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xa(e,t,n,r)});function H(e){return/* @__PURE__ */ qi(ls,e)}let us=/*@__PURE__*/ T(`ZodNull`,(e,t)=>{pr.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Za(e,t,n,r)});function ds(e){return/* @__PURE__ */ Ji(us,e)}let fs=/*@__PURE__*/ T(`ZodUnknown`,(e,t)=>{mr.init(e,t),R.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function ps(){return/* @__PURE__ */ Yi(fs)}let ms=/*@__PURE__*/ T(`ZodNever`,(e,t)=>{hr.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qa(e,t,n,r)});function hs(e){return/* @__PURE__ */ Xi(ms,e)}let gs=/*@__PURE__*/ T(`ZodArray`,(e,t)=>{Po(),yr.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ro(e,t,n,r),e.element=t.element},{min(e,t){return this.check(/* @__PURE__ */ ra(e,t))},nonempty(e){return this.check(/* @__PURE__ */ ra(1,e))},max(e,t){return this.check(/* @__PURE__ */ na(e,t))},length(e,t){return this.check(/* @__PURE__ */ ia(e,t))},unwrap(){return this.element}});function U(e,t){return/* @__PURE__ */ _a(gs,e,t)}let _s=/*@__PURE__*/ T(`ZodObject`,(e,t)=>{Po(),Tr.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ao(e,t,n,r),Ue(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return G(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(y(this._zod.def,{catchall:e}))},passthrough(){return this.clone(y(this._zod.def,{catchall:ps()}))},loose(){return this.clone(y(this._zod.def,{catchall:ps()}))},strict(){return this.clone(y(this._zod.def,{catchall:hs()}))},strip(){return this.clone(y(this._zod.def,{catchall:void 0}))},extend(e){return ve(this,e)},safeExtend(e){return be(this,e)},merge(e){return xe(this,e)},pick(e){return he(this,e)},omit(e){return _e(this,e)},partial(...e){return Se(Es,this,e[0])},exactPartial(...e){return Se(Os,this,e[0],`exactPartial`)},required(...e){return Ce(Is,this,e[0])}});function W(e,t){let n={type:`object`,shape:e??{},...x(t)};return new _s(n)}let vs=/*@__PURE__*/ T(`ZodUnion`,(e,t)=>{Dr.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oo(e,t,n,r),e.options=t.options});function ys(e,t){return new vs({type:`union`,options:e,...x(t)})}let bs=/*@__PURE__*/ T(`ZodIntersection`,(e,t)=>{Or.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>so(e,t,n,r)});function xs(e,t){return new bs({type:`intersection`,left:e,right:t})}let Ss=/*@__PURE__*/ T(`ZodEnum`,(e,t)=>{jr.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$a(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];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 Ss({...t,checks:[],...x(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 Ss({...t,checks:[],...x(r),entries:i})}});function G(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new Ss({type:`enum`,entries:n,...x(t)})}let Cs=/*@__PURE__*/ T(`ZodLiteral`,(e,t)=>{Mr.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>eo(e,t,n,r),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]}})});function K(e,t){return new Cs({type:`literal`,values:Array.isArray(e)?e:[e],...x(t)})}let ws=/*@__PURE__*/ T(`ZodTransform`,(e,t)=>{Po(),Nr.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>no(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Ye(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Pe(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(Pe(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Ts(e){return new ws({type:`transform`,transform:e})}let Es=/*@__PURE__*/ T(`ZodOptional`,(e,t)=>{Fr.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ds(e){return new Es({type:`optional`,innerType:e})}let Os=/*@__PURE__*/ T(`ZodExactOptional`,(e,t)=>{Ir.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ks(e){return new Os({type:`optional`,innerType:e})}let As=/*@__PURE__*/ T(`ZodNullable`,(e,t)=>{Lr.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>co(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function js(e){return new As({type:`nullable`,innerType:e})}let Ms=/*@__PURE__*/ T(`ZodDefault`,(e,t)=>{Rr.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>po(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Ns(e,t){return new Ms({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():ce(t)}})}let Ps=/*@__PURE__*/ T(`ZodPrefault`,(e,t)=>{Br.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Fs(e,t){return new Ps({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():ce(t)}})}let Is=/*@__PURE__*/ T(`ZodNonOptional`,(e,t)=>{Vr.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ls(e,t){return new Is({type:`nonoptional`,innerType:e,...x(t)})}let Rs=/*@__PURE__*/ T(`ZodCatch`,(e,t)=>{Wr.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ho(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function zs(e,t){return new Rs({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:We(t)})}let Bs=/*@__PURE__*/ T(`ZodPipe`,(e,t)=>{Gr.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>go(e,t,n,r),e.in=t.in,e.out=t.out});function Vs(e,t){return new Bs({type:`pipe`,in:e,out:t})}let Hs=/*@__PURE__*/ T(`ZodReadonly`,(e,t)=>{qr.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_o(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Us(e){return new Hs({type:`readonly`,innerType:e})}let Ws=/*@__PURE__*/ T(`ZodCustom`,(e,t)=>{Yr.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>to(e,t,n,r)});function Gs(e,t){return/* @__PURE__ */ va(Ws,e??(()=>!0),t)}function Ks(e,t={}){return/* @__PURE__ */ ya(Ws,e,t)}function qs(e,t){return/* @__PURE__ */ ba(e,t)}let q={step:`data-step`,effect:`data-step-effect`,start:`data-step-start`},Js=[`appear`,`fade`,`fly`,`wipe`,`zoom`],Ys=[`click`,`with`,`after`],Xs=W({x:V().finite(),y:V().finite(),width:V().finite(),height:V().finite()}),Zs=U(W({key:V().int().nonnegative(),control:Xs,target:Xs.nullable(),label:z()})),Qs=V().int().nonnegative(),$s=W({hash:z(),edits:U(ys([W({index:Qs,change:W({kind:K(`attribute`),name:K(`value`),value:z()})}),W({index:Qs,change:W({kind:K(`styles`),declarations:U(W({property:z(),value:z()}))})})]))}).nullable(),J=V().finite(),ec=V().int().nonnegative(),tc=W({hash:z(),gap:W({parent:ec,before:ec.nullable(),row:H(),flow:H(),origin:W({x:J,y:J}),room:J,line:W({x:J,y:J,width:J,height:J})})}).nullable();function nc(e,t,n){return e===`grid`||e===`inline-grid`?`grid`:e!==`flex`&&e!==`inline-flex`?`block`:n===`nowrap`?t.startsWith(`column`)?`vertical`:`horizontal`:`wrap`}let rc={deg:1,grad:.9,rad:180/Math.PI,turn:360};function ic(e){if(e===`none`||e===``)return 0;let t=/^(-?[\d.]+(?:e[+-]?\d+)?)(deg|grad|rad|turn)$/.exec(e),n=t?.[2]?rc[t[2]]:void 0;return!t||n===void 0?null:Math.round(Number(t[1])*n*100)/100}function ac(e){if(e===`none`||e===``)return{x:1,y:1};let t=e.split(/\s+/).map(e=>e.endsWith(`%`)?parseFloat(e)/100:Number(e)),[n,r=n,i=1]=t;return n===void 0||r===void 0||t.some(Number.isNaN)||t.length>3||i!==1?null:{x:n,y:r}}function oc(e){if(e===`none`||e===``)return!1;let t=/^matrix(3d)?\(([^)]*)\)$/.exec(e);if(!t?.[2])return!0;let n=t[2].split(`,`).map(Number);return(t[1]?n.slice(12,15):n.slice(4,6)).some(e=>e!==0)}let Y=V().finite(),sc=V().int().nonnegative(),cc=G([`block`,`vertical`,`horizontal`,`wrap`,`grid`]),lc=W({top:Y,right:Y,bottom:Y,left:Y}),uc=W({flow:cc,inline:H(),direction:z(),wrap:z(),justify:z(),alignItems:z(),ownJustify:H(),rowGap:Y,columnGap:Y,padding:lc,parent:cc,parentAlignItems:z(),width:Y,height:Y}),dc=W({width:Y,height:Y}),fc=W({kind:G([`box`,`text`,`media`,`container`]),natural:dc.nullable(),hugsHeight:H(),inset:dc,sizing:W({layout:uc,fills:H()}).nullable()}),pc=W({left:Y,top:Y}),mc=W({x:Y,y:Y,width:Y,height:Y}),hc=U(W({index:sc,box:mc,read:fc.nullable(),placed:pc.nullable(),nested:H(),margin:lc})).nullable(),gc=W({hash:z(),ghosts:U(W({index:sc,box:mc,placed:pc.nullable()}))}).nullable(),_c=U(W({index:sc,right:Y,top:Y})),vc=W({x:Y,y:Y}),yc=U(W({opacity:Y,radius:Y,fontFamily:z(),fontSize:Y,fontWeight:Y,lineHeight:Y.nullable(),letterSpacing:Y,textAlign:z(),textDecorationLine:z(),textTransform:z(),textWrapStyle:z(),truncated:H(),display:z(),color:z(),bordered:H(),borderWidth:Y.nullable(),holdsText:H(),textOnly:H(),text:z(),keepsBreaks:H(),rotation:W({degrees:Y.nullable(),scale:vc.nullable(),own:W({rotate:Y.nullable().optional(),scale:vc.nullable().optional()}),translated:H(),transform:W({own:z(),ruled:H(),reanchors:H()})}),placement:W({free:H(),left:Y,top:Y,width:Y.nullable(),height:Y.nullable(),inline:W({width:z(),height:z()}),wordsLeft:Y.nullable()}),layout:uc,inline:W({color:H(),backgroundColor:H(),background:H(),border:H()}),step:W({step:z().nullable(),effect:z().nullable(),start:z().nullable()})})).nullable(),bc=W({index:sc,hash:z()}).nullable(),xc=ys([W({kind:K(`toggle-play`)}),W({kind:K(`seek`),seconds:V().finite()}),W({kind:K(`toggle-sound`)}),W({kind:K(`set-flag`),name:G([`controls`,`autoplay`,`loop`,`muted`]),on:H()})]),Sc=W({tag:G([`video`,`audio`]),playable:H(),paused:H(),time:V().finite(),length:Gs(e=>typeof e==`number`),muted:H(),mutedInFile:H(),controls:H(),autoplay:H(),loop:H()}).nullable(),Cc=[`camera-orbit`,`max-camera-orbit`,`orientation`,`scale`,`animation-name`,`autoplay`],wc=W({name:G(Cc),value:z().nullable()}),Tc=z().nullable(),Ec=W({src:z(),loaded:H(),clips:U(z()),orbit:W({theta:V().finite(),phi:V().finite()}).nullable(),staged:W({"camera-orbit":Tc,"max-camera-orbit":Tc,orientation:Tc,scale:Tc,"animation-name":Tc,autoplay:Tc})}).nullable(),Dc=W({motion:W({source:G([`hf`,`timelines`,`css`,`model`]),duration:V().finite().nonnegative().nullable()}),span:V().finite().nonnegative()}),X=`frameboard-bridge`,Oc=`data-frameboard-editing`,kc=/* @__PURE__ */ `bindings.content-height.controls.controls-act.controls-edits.element-box.element-boxes.focus-keys.gap-at.hide-controls.hide-scrollbar.hide-strips.hold-animations.keep-previews.keys.live-body.live-element.measure.media.media-act.model.model-stage.motion.motion-moment.motion-release.motion-seek.overflow.page-colors.paint.pick-at.pins.pointer-move.preview-style.restamp.scroll.scroll-act.step-preview.steps.steps-show.takes-clicks.text-edit.text-written.theme`.split(`.`);function Ac(e,t){let{data:n}=e;if(e.origin!==t||!Vc(n)||n.tag!==`frameboard-bridge`)return null;if(n.kind===`shown`){let{page:e,hash:t}=n;return typeof e==`string`&&e!==``&&(typeof t==`string`||t===null)?{tag:X,kind:`shown`,page:e,hash:t}:null}if(typeof n.id!=`string`||n.id===``)return null;let{id:r}=n;switch(n.kind){case`request`:return typeof n.op==`string`&&kc.includes(n.op)?{tag:X,kind:`request`,id:r,op:n.op,args:n.args}:null;case`reply`:return n.ok===!0?{tag:X,kind:`reply`,id:r,ok:!0,value:n.value}:n.ok===!1&&typeof n.error==`string`?{tag:X,kind:`reply`,id:r,ok:!1,error:n.error}:null;case`push`:return{tag:X,kind:`push`,id:r,value:n.value};case`close`:return{tag:X,kind:`close`,id:r};default:return null}}let Z=V().int().nonnegative(),jc=V().int().nonnegative(),Q=W({}).strict(),Mc=W({index:Z,hash:z()}),Nc=W({x:V().finite(),y:V().finite()}),Pc=W({x:V().finite(),y:V().finite(),width:V().finite(),height:V().finite()}),Fc=W({left:V().finite(),top:V().finite(),right:V().finite(),bottom:V().finite()}),Ic=W({top:V().finite(),size:V().finite()}),Lc=ys([W({kind:K(`commit`),text:z(),breaks:H(),run:V().int().nonnegative().optional()}),W({kind:K(`closed`)})]),Rc={theme:{args:W({theme:G([`light`,`dark`])}),value:H()},"hide-scrollbar":{args:Q,value:H()},scroll:{args:Q,value:Ic.nullable(),push:Ic.nullable()},"scroll-act":{args:ys([W({act:K(`page`),toward:ys([K(-1),K(1)])}),W({act:K(`to`),top:V().finite()})]),value:H()},keys:{args:W({keys:U(z()),keepTyping:H(),keepButtons:H().optional()}),value:H(),push:W({key:z(),repeat:H()})},"focus-keys":{args:Q,value:H(),push:K(!0)},"content-height":{args:Q,value:V().int().positive().nullable()},"element-box":{args:Mc,value:Fc.nullable()},"element-boxes":{args:W({hash:z(),indexes:U(Z)}),value:U(W({index:Z,box:Pc})).nullable()},"live-body":{args:Q,value:bc},"live-element":{args:W({hash:z(),indexes:U(Z)}),value:yc},measure:{args:W({hash:z(),indexes:U(Z)}),value:hc,push:hc},overflow:{args:Q,value:gc,push:gc},pins:{args:W({indexes:U(Z)}),value:_c,push:_c},"pick-at":{args:W({at:Nc}),value:W({hash:z().nullable(),chain:U(W({index:Z,tag:z()}))})},"gap-at":{args:W({at:Nc,carried:Z.optional()}),value:tc},"hide-strips":{args:Q,value:H()},"keep-previews":{args:Q,value:ds()},media:{args:Mc,value:Sc,push:Sc},"media-act":{args:Mc.extend({act:xc}),value:H()},model:{args:Mc,value:Ec,push:Ec},"model-stage":{args:Mc.and(wc),value:H()},paint:{args:W({fill:z()}),value:z().nullable()},"preview-style":{args:W({index:Z,property:z(),value:z().nullable()}),value:ds()},restamp:{args:W({hash:z()}),value:H()},"text-edit":{args:Mc.extend({at:Nc.optional()}),value:H(),push:Lc},"text-written":{args:W({edit:z(),written:H()}),value:ds()},steps:{args:W({shown:jc}),value:jc,push:jc},"steps-show":{args:W({steps:z(),shown:jc,entering:Z.nullable()}),value:H()},"step-preview":{args:W({index:Z,effect:G(Js)}),value:H()},"hold-animations":{args:Q,value:H()},"hide-controls":{args:Q,value:H()},"pointer-move":{args:Q,value:H(),push:ds()},motion:{args:Q,value:H(),push:Dc.nullable()},"motion-seek":{args:W({motion:z(),at:V().finite()}),value:H()},"motion-release":{args:W({motion:z()}),value:H()},"motion-moment":{args:Dc,value:V().finite().nonnegative()},controls:{args:Q,value:H(),push:jc},"controls-act":{args:W({controls:z(),act:G([`reset`,`settle`])}),value:H()},"controls-edits":{args:W({controls:z()}),value:$s},"takes-clicks":{args:Q,value:H()},bindings:{args:Q,value:Zs,push:Zs},"page-colors":{args:Q,value:W({fill:z().nullable(),ink:z()})}},zc=Symbol(`refused`);function Bc(e,t){let n=Rc[e].args.safeParse(t);return n.success?n.data:zc}function Vc(e){return typeof e==`object`&&!!e}let Hc=/^http:\/\/(127\.0\.0\.1|localhost)(:\d{1,5})?$/;function Uc(e,t){return e===`null`?!1:e===t||Hc.test(e)}[...[{name:`small-phone`,label:`Small phone`,group:`phone`,width:375,height:667},{name:`iphone-16`,label:`iPhone 16`,group:`phone`,width:393,height:852},{name:`iphone-18-pro`,label:`iPhone 18 Pro`,group:`phone`,width:402,height:874},{name:`android`,label:`Android`,group:`phone`,width:412,height:917},{name:`iphone-16-pro-max`,label:`iPhone 16 Pro Max`,group:`phone`,width:440,height:956},{name:`ipad-mini`,label:`iPad mini`,group:`tablet`,width:744,height:1133},{name:`ipad-pro-12-9`,label:`iPad Pro 12.9`,group:`tablet`,width:1024,height:1366},{name:`macbook-air`,label:`MacBook Air`,group:`desktop`,width:1280,height:832},{name:`full-hd`,label:`Full HD`,group:`desktop`,width:1920,height:1080},{name:`slide-16-9`,label:`Slide 16:9`,group:`slide`,width:1920,height:1080},{name:`slide-4-3`,label:`Slide 4:3`,group:`slide`,width:1024,height:768},{name:`og-card`,label:`Open Graph`,group:`social`,width:1200,height:630},{name:`linkedin-post`,label:`LinkedIn post`,group:`social`,width:1200,height:627},{name:`video-landscape`,label:`Video landscape`,group:`video`,width:1920,height:1080},{name:`video-portrait`,label:`Video portrait`,group:`video`,width:1080,height:1920}].map(e=>e.name)],28+{height:14,reach:.06,radius:10}.height;let Wc={width:81,height:30,top:14};Wc.top+Wc.height+10,Wc.top,Wc.height;function Gc(e=document){let t=e.defaultView,n=e=>e&&t?t.getComputedStyle(e):null,r=n(e.documentElement),i=n(e.body);return{fill:[r?.backgroundColor,i?.backgroundColor].find(e=>e!==void 0&&e!==`transparent`&&!/^rgba\(.*,\s*0\)$/.test(e))??null,ink:i?.color??r?.color??`CanvasText`}}function Kc(){let e=document.documentElement.scrollHeight;return e<=innerHeight+1?null:{top:scrollY/e,size:innerHeight/e}}let qc={theme:({theme:e})=>(t(document.documentElement,e),!0),"hide-scrollbar":(t,{onClose:n})=>{if(!document.head)return!1;let r=document.createElement(`style`);return r.setAttribute(e,``),r.textContent=`html { scrollbar-width: none }`,document.head.append(r),n(()=>r.remove()),!0},scroll:(e,{push:t,onClose:n})=>{let r=Kc(),i=()=>{let e=Kc();(e?.top!==r?.top||e?.size!==r?.size)&&(r=e,t(e))},a=new ResizeObserver(i);return a.observe(document.documentElement),addEventListener(`scroll`,i),addEventListener(`resize`,i),n(()=>{a.disconnect(),removeEventListener(`scroll`,i),removeEventListener(`resize`,i)}),r},"scroll-act":e=>(e.act===`page`?scrollBy({top:e.toward*innerHeight}):scrollTo({top:e.top*document.documentElement.scrollHeight}),!0),"content-height":()=>document.body?Jc(document):null,"page-colors":()=>Gc(document)};function Jc(e){let t=e.defaultView;if(!t)return 1;let n=e=>{let n=t.getComputedStyle(e);return n.overflowX!==`visible`||n.overflowY!==`visible`},r=t=>{for(let r=t.parentElement;r&&r!==e.body;r=r.parentElement)if(n(r))return!0;return!1},i=(e,t)=>e<t?(t-e)/2:0,a=r=>{let a=-1/0;if(n(r))return a;let o=parseFloat(t.getComputedStyle(r).lineHeight);for(let n of r.childNodes){if(n.nodeType!==t.Node.TEXT_NODE)continue;let r=e.createRange();r.selectNodeContents(n);for(let e of r.getClientRects())(e.width!==0||e.height!==0)&&(a=Math.max(a,e.bottom-i(o,e.height)))}return a},o=[`img`,`video`,`canvas`,`iframe`,`object`,`embed`,`audio`],s=e=>{let n=e.getBoundingClientRect();if(e.namespaceURI!==`http://www.w3.org/1999/xhtml`||o.includes(e.localName))return n.bottom;let r=t.getComputedStyle(e);if(r.display!==`inline`||parseFloat(r.paddingBottom)+parseFloat(r.borderBottomWidth)>0)return n.bottom;let a=parseFloat(r.paddingTop)+parseFloat(r.borderTopWidth);return n.bottom-i(parseFloat(r.lineHeight),n.height-a)},c=e.documentElement.getBoundingClientRect().bottom;for(let t of e.querySelectorAll(`body *`))r(t)||(c=Math.max(c,s(t),a(t)));return Math.max(1,Math.ceil(c+t.scrollY))}let Yc=`data-binds`;function Xc(e){let t=e.trim().split(/\s+/),n=t.pop(),r=t.join(` `);return!n||r===``?null:{selector:r,property:n}}function Zc(e){return/^--./.test(e)}function Qc(e){let t=/* @__PURE__ */ new Map;for(let{target:n,property:r,value:i,unit:a}of e){let e=t.get(n)??/* @__PURE__ */ new Map;e.set(r,`${i}${a}`),t.set(n,e)}return[...e.map(({index:e,value:t})=>({index:e,change:{kind:`attribute`,name:`value`,value:t}})),...[...t].map(([e,t])=>({index:e,change:{kind:`styles`,declarations:[...t].map(([e,t])=>({property:e,value:t}))}}))]}let $c=`[${Yc}], label:has([${Yc}]), :not(html, body):has(> [${Yc}], > label > [${Yc}]):not(:has(> :not([${Yc}], label))) { display: none !important }`;function el(e,t){let n=/* @__PURE__ */ new Map,i=/* @__PURE__ */ new Map,a=t=>{let n=Xc(t.getAttribute(`data-binds`)??``);if(!n||!Zc(n.property))return null;let r;try{r=e.querySelector(n.selector)}catch{return null}return r?{control:t,target:r,property:n.property,unit:t.getAttribute(`data-unit`)??``}:null},o=e=>{let r=n.get(e);n.delete(e);let a=r&&tl(r.target);if(r&&a){let e=[...n.values()].reverse().find(e=>e.target===r.target&&e.property===r.property),t=i.get(r.target)?.get(r.property);e?a.setProperty(r.property,`${e.control.value}${e.unit}`):!t||t.value===``?a.removeProperty(r.property):a.setProperty(r.property,t.value,t.priority)}t(n.size)},s=e=>{let r=e.target;if(!nl(r))return;if(r.value===``){n.has(r)&&o(r);return}let s=a(r),c=s&&tl(s.target);if(!s||!c)return;let l=i.get(s.target)??/* @__PURE__ */ new Map;l.has(s.property)||(l.set(s.property,{value:c.getPropertyValue(s.property),priority:c.getPropertyPriority(s.property)}),i.set(s.target,l)),c.setProperty(s.property,`${r.value}${s.unit}`),n.delete(r),n.set(r,s),t(n.size)};return e.addEventListener(`input`,s,!0),{edits:()=>{let t=[];for(let{control:i,target:a,property:o,unit:s}of n.values()){let n=r(e,i),c=r(e,a);n!==null&&c!==null&&i.value!==``&&t.push({index:n,value:i.value,unit:s,target:c,property:o})}return Qc(t)},reset:()=>{for(let e of n.keys())e.value=e.defaultValue;for(let[e,t]of i){let n=tl(e);for(let[e,{value:r,priority:i}]of t)r===``?n?.removeProperty(e):n?.setProperty(e,r,i)}n.clear(),i.clear(),t(0)},settle:()=>{for(let e of n.keys())e.setAttribute(`value`,e.value);n.clear(),i.clear(),t(0)},detach:()=>e.removeEventListener(`input`,s,!0)}}function tl(e){let t=e.style;return t&&typeof t.setProperty==`function`?t:null}function nl(e){return e!==null&&`hasAttribute`in e&&e.hasAttribute(`data-binds`)&&`value`in e&&`defaultValue`in e}function rl(e){return[...e.querySelectorAll(`[${Yc}]`)].map((t,n)=>{let r=t.getAttribute(`data-binds`)??``,i=Xc(r),a=i&&Zc(i.property)?il(e,i.selector):null,o=i?Zc(i.property)?a?`${i.selector} ${i.property}`:`${i.selector}, no match`:`${i.property}, not a custom property`:`${r.trim()||`data-binds`}, no property`;return{key:n,control:al(t),target:a?al(a):null,label:o}})}function il(e,t){try{return e.querySelector(t)}catch{return null}}function al(e){let t=e.getBoundingClientRect();return{x:Math.round(t.left),y:Math.round(t.top),width:Math.round(t.width),height:Math.round(t.height)}}let ol=/* @__PURE__ */ new Map,sl={controls:(e,{id:t,push:n,onClose:r})=>{let i=el(document,e=>n(e));return ol.set(t,i),r(()=>{i.reset(),i.detach(),ol.delete(t)}),!0},"controls-act":({controls:e,act:t})=>{let n=ol.get(e);return n?(t===`reset`?n.reset():n.settle(),!0):!1},"controls-edits":({controls:e})=>{let t=ol.get(e),n=a(document),r=t?.edits()??[];return n===null||r.length===0?null:{hash:n,edits:r}},bindings:(e,{push:t,onClose:n})=>{let r=document.documentElement;if(!r)return[];let i=()=>t(rl(document)),a=new ResizeObserver(i);return a.observe(r),addEventListener(`scroll`,i,!0),n(()=>{a.disconnect(),removeEventListener(`scroll`,i,!0)}),rl(document)}},cl=/* @__PURE__ */ new Set([`html`,`body`]);function ll(e,t){let n=[];for(let i=document.elementFromPoint(e,t);i&&!cl.has(i.localName);i=i.parentElement){let e=r(document,i);e!==null&&n.push({index:e,tag:i.localName})}return n}let ul=/* @__PURE__ */ new Set(/* @__PURE__ */ `area.br.col.embed.hr.iframe.img.input.link.meta.model-viewer.noscript.object.picture.script.select.source.style.template.textarea.title.track.video.audio.canvas.wbr.p.h1.h2.h3.h4.h5.h6.pre.button.label.a`.split(`.`));function dl(e){if(e.localName===`body`)return!0;if(e.namespaceURI!==`http://www.w3.org/1999/xhtml`||ul.has(e.localName)||e.childElementCount===0||e.closest(`svg, math`))return!1;let t=getComputedStyle(e).display;return t.startsWith(`inline`)||t===`contents`?!1:![...e.childNodes].some(e=>e.nodeType===Node.TEXT_NODE&&(e.textContent??``).trim()!==``)}function fl(e){let t=e.display;if(t.endsWith(`grid`))return{row:!0,reverse:!1,flow:!0};if(!t.endsWith(`flex`))return{row:!1,reverse:!1,flow:!1};let n=e.flexDirection;return{row:n.startsWith(`row`),reverse:n.endsWith(`reverse`),flow:!0}}function pl(e){let t=e=>{let t=getComputedStyle(e);return t.position!==`static`||t.transform!==`none`},n=e===document.body||e===document.documentElement?null:e;for(let r=e;r&&!n;)t(r)&&(n=r),r=r.parentElement;if(!n)return{x:0-scrollX,y:0-scrollY};let r=n.getBoundingClientRect();return{x:r.left+n.clientLeft-n.scrollLeft,y:r.top+n.clientTop-n.scrollTop}}function ml(e,t,n,r){if(!n){let n=t.top+t.height/2;return r?e.y>n:e.y<n}if(e.y<t.top)return!0;if(e.y>t.bottom)return!1;let i=t.left+t.width/2;return r?e.x>i:e.x<i}function hl(e){let t=document.body;if(!t)return null;let n=document.elementFromPoint(e.x,e.y);for(n&&t.contains(n)||(n=t);n&&!dl(n);)n=n.parentElement;let i=n&&r(document,n);if(!n||i==null)return null;let a=getComputedStyle(n),{row:o,reverse:s,flow:c}=fl(a),l=[...n.children].flatMap(e=>{let t=r(document,e),n=e.getBoundingClientRect();return t!==null&&(n.width>0||n.height>0)?[{index:t,box:n}]:[]}),u=l.findIndex(({box:t})=>ml(e,t,o,s)),d=u===-1?l.at(-1):l[u-1],f=u===-1?void 0:l[u],p=e=>Number.parseFloat(a.getPropertyValue(`padding-${e}`))||0;return{parent:i,before:f?.index??null,row:o,flow:c,origin:pl(n),room:Math.max(0,n.clientWidth-p(`left`)-p(`right`)),line:gl(n.getBoundingClientRect(),a,o,s,{after:d?.box,ahead:f?.box})}}function gl(e,t,n,r,{after:i,ahead:a}){let o=e=>Number.parseFloat(t.getPropertyValue(`padding-${e}`))||0,s={left:e.left+o(`left`),right:e.right-o(`right`),top:e.top+o(`top`),bottom:e.bottom-o(`bottom`)};if(n){let e=r?a:i,t=r?i:a,n=e&&t?(e.right+t.left)/2:e?.right??t?.left??s.left,o=a??i,c=o?.top??s.top,l=o?.bottom??s.bottom;return{x:n,y:c,width:0,height:Math.max(0,l-c)}}let c=r?a:i,l=r?i:a,u=c&&l?(c.bottom+l.top)/2:c?.bottom??l?.top??s.top;return{x:s.left,y:u,width:Math.max(0,s.right-s.left),height:0}}function _l(e,t){let n=hl(e),a=i(document,t),o=n?i(document,n.parent):null;if(!n||!a||!o||a.contains(o))return null;let s=a.nextElementSibling;return o===a.parentElement&&(n.before===t||n.before===(s?r(document,s):null))?null:n}function vl(e){if(!document.body)return null;let t=document.createElement(`div`);t.style.background=e,document.body.append(t);let n=getComputedStyle(t).backgroundColor;return t.remove(),n}let yl={"pick-at":({at:e})=>({hash:a(document),chain:ll(e.x,e.y)}),"gap-at":({at:e,carried:t})=>{let n=a(document),r=t===void 0?hl(e):_l(e,t);return n&&r?{hash:n,gap:r}:null},paint:({fill:e})=>vl(e)};function bl(e,t){e.readyState===`loading`?e.addEventListener(`DOMContentLoaded`,t,{once:!0}):t()}function xl(e){return a(document)===e.hash?i(document,e.index):null}let Sl=[`Shift`,`Meta`,`Alt`,`Control`],Cl=typeof navigator==`object`?navigator.platform:``,wl=/Mac|iPod|iPhone|iPad/.test(Cl)?`Meta`:`Control`,Tl=Cl===`Win32`?[`Control`,`Alt`]:[`Alt`];function El(e){return!!(e.key&&e.code&&e.getModifierState)}function Dl(e){let t=e.target;return e.repeat||e.isComposing||t!==e.currentTarget&&t.matches(`[contenteditable],input,select,textarea`)}function Ol(e,t){return typeof e.getModifierState==`function`?e.getModifierState(t)||Tl.includes(t)&&e.getModifierState(`AltGraph`):!1}function kl(e){return e.trim().split(` `).map(e=>{let t=e.split(/(?<=\w|\])\+/),n=t.pop(),r=n.match(/^\((.+)\)$/),i=r?RegExp(`^(?:${r[1]})$`,`iv`):n,a=[],o=[];for(let e of t){let t=e.match(/^\[(.*)\]$/),n=t?.[1]??e;n=n===`$mod`?wl:n,t?o.push(n):a.push(n)}return[a,o,i]})}function Al(e,[t,n,r]){let i=t.includes(`AltGraph`);return!((r instanceof RegExp?!(r.test(e.key)||r.test(e.code)):r.toUpperCase()!==e.key.toUpperCase()&&r!==e.code)||t.find(t=>!Ol(e,t))||Sl.find(a=>!t.includes(a)&&!n.includes(a)&&r!==a&&Ol(e,a)&&!(i&&Tl.includes(a))))}function jl(e,t={}){let n=t.timeout??1e3,r=t.ignore??Dl,i=Object.keys(e).map(t=>[t,kl(t),e[t]]),a=/* @__PURE__ */ new Map,o=null;return e=>{if(!El(e)||r(e))return;let t=[];for(let[n,r,o]of i){let[i,...s]=a.get(n)||r;if(!Al(e,i))Ol(e,e.key)||a.delete(n);else if(s.length>0)a.set(n,s),t.push(n);else if(a.delete(n),t.length)console.warn(`tinykeys: Conflict found, "${n}" did not fire, waiting for:`,t);else{o(e);break}}o&&clearTimeout(o),o=setTimeout(()=>a.clear(),n)}}function Ml(e,t,n={}){let r=n.event??`keydown`,i=jl(t,n);return e.addEventListener(r,i,n.capture),()=>{e.removeEventListener(r,i,n.capture)}}function Nl(e){return(e.code===`Space`||e.key===`Enter`)&&e.target instanceof Element&&e.target.closest(`button`)!==null}function Pl(e,{keepTyping:t,keepButtons:n}){if(e.isComposing||e.defaultPrevented||n&&Nl(e))return!0;if(!t)return!1;let r=e.target;return r instanceof HTMLElement&&(r.isContentEditable||r.matches(`[contenteditable],input,select,textarea`))}let Fl={keys:({keys:e,...t},{push:n,onClose:r})=>(r(Ml(window,Object.fromEntries(e.map(e=>[e,t=>{t.preventDefault(),n({key:e,repeat:t.repeat})}])),{ignore:e=>Pl(e,t)})),!0),"focus-keys":(e,{push:t,onClose:n})=>{let r=()=>t(!0);return window.addEventListener(`keydown`,r,!0),n(()=>window.removeEventListener(`keydown`,r,!0)),!0}};function Il(e){return Math.round(parseFloat(e)*100)/100}function Ll(e,t){let n=e.parentElement,r=n?getComputedStyle(n):null,i=e instanceof HTMLElement?e:null,a=e=>Il(e)||0;return{flow:nc(t.display,t.flexDirection,t.flexWrap),inline:t.display.startsWith(`inline-`),direction:t.flexDirection,wrap:t.flexWrap,justify:t.justifyContent,alignItems:t.alignItems,ownJustify:!!i?.style.getPropertyValue(`justify-content`),rowGap:t.rowGap===`normal`?0:a(t.rowGap),columnGap:t.columnGap===`normal`?0:a(t.columnGap),padding:{top:a(t.paddingTop),right:a(t.paddingRight),bottom:a(t.paddingBottom),left:a(t.paddingLeft)},parent:r?nc(r.display,r.flexDirection,r.flexWrap):`block`,parentAlignItems:r?.alignItems??`normal`,width:Math.round(i?.offsetWidth??0),height:Math.round(i?.offsetHeight??0)}}function Rl(e){let t=getComputedStyle(e),n=e.textContent??``,r=[t.borderTopWidth,t.borderRightWidth,t.borderBottomWidth,t.borderLeftWidth];return{opacity:Number(t.opacity),radius:Math.round(parseFloat(t.borderTopLeftRadius)||0),fontFamily:t.fontFamily,fontSize:Il(t.fontSize),fontWeight:Number(t.fontWeight),lineHeight:t.lineHeight===`normal`?null:Il(t.lineHeight),letterSpacing:t.letterSpacing===`normal`?0:Il(t.letterSpacing),textAlign:Gl(t.textAlign,t.direction),textDecorationLine:t.textDecorationLine,textTransform:t.textTransform,textWrapStyle:t.getPropertyValue(`text-wrap-style`)||`auto`,truncated:t.textOverflow===`ellipsis`&&t.overflowX!==`visible`&&t.getPropertyValue(`text-wrap-mode`)===`nowrap`,display:t.display,color:t.color,bordered:r.some(e=>parseFloat(e)>0),borderWidth:r.every(e=>e===r[0])?Il(t.borderTopWidth):null,holdsText:n.trim()!==``,textOnly:e.childElementCount===0&&n.trim()!==``,text:n,keepsBreaks:t.whiteSpace!==`normal`&&t.whiteSpace!==`nowrap`,rotation:{degrees:ic(t.rotate),scale:ac(t.scale),own:Vl(e),translated:oc(t.transform),transform:Hl(e,t)},placement:zl(e,t),layout:Ll(e,t),inline:Wl(e),step:{step:e.getAttribute(q.step),effect:e.getAttribute(q.effect),start:e.getAttribute(q.start)}}}function zl(e,t){let n=t.position===`absolute`||t.position===`fixed`,r=e=>{let t=parseFloat(e);return Number.isNaN(t)?null:Math.round(t)},i=r(t.width),a=r(t.height),o=e instanceof HTMLElement?e.style:null,s={width:o?.getPropertyValue(`width`)??``,height:o?.getPropertyValue(`height`)??``};if(n&&t.left.endsWith(`px`)&&t.top.endsWith(`px`))return{free:n,left:Math.round(parseFloat(t.left)),top:Math.round(parseFloat(t.top)),width:i,height:a,inline:s,wordsLeft:null};let c=e.parentElement,l=e=>{let t=getComputedStyle(e);return t.position!==`static`||t.transform!==`none`},u=null;if(t.position!==`fixed`){if(!n&&c&&c!==document.body&&c!==document.documentElement)u=c;else for(let e=c;e&&!u;e=e.parentElement)l(e)&&(u=e)}let d=t.position===`fixed`?0:-scrollX,f=t.position===`fixed`?0:-scrollY;if(u){let e=u.getBoundingClientRect();d=e.left+u.clientLeft-u.scrollLeft,f=e.top+u.clientTop-u.scrollTop}let p=e.getBoundingClientRect(),m=parseFloat(t.marginLeft)||0,h=Bl(e,t);return{free:n,left:Math.round(p.left-d-m),top:Math.round(p.top-f-(parseFloat(t.marginTop)||0)),width:i,height:a,inline:s,wordsLeft:h===null?null:Math.round(h-d-m)}}function Bl(e,t){if(!(e.childNodes.length>0&&[...e.childNodes].every(e=>e.nodeType===Node.TEXT_NODE)&&e.textContent?.trim()))return null;let n=document.createRange();n.selectNodeContents(e);let r=(parseFloat(t.borderLeftWidth)||0)+(parseFloat(t.paddingLeft)||0);return n.getBoundingClientRect().left-r}function Vl(e){let t=e instanceof HTMLElement?e:null,n=!!t?.style.getPropertyValue(`rotate`),r=!!t?.style.getPropertyValue(`scale`);if(!t||!n&&!r)return{};let i=t.getAttribute(`style`);t.style.removeProperty(`rotate`),t.style.removeProperty(`scale`);let a=getComputedStyle(t),o={...n?{rotate:ic(a.rotate)}:{},...r?{scale:ac(a.scale)}:{}};return i===null?t.removeAttribute(`style`):t.setAttribute(`style`,i),o}function Hl(e,t){let n=e instanceof HTMLElement?e.style.getPropertyValue(`transform`):``;return{own:n,ruled:n===``&&t.transform!==`none`,reanchors:t.transform===`none`&&Ul(e,t)}}function Ul(e,t){let n=t.position!==`static`;for(let t of e.querySelectorAll(`*`)){let r=getComputedStyle(t).position;if(r!==`fixed`&&(r!==`absolute`||n))continue;let i=!1;for(let n=t.parentElement;n&&n!==e&&!i;n=n.parentElement){let e=getComputedStyle(n);i=e.transform!==`none`||r===`absolute`&&e.position!==`static`}if(!i)return!0}return!1}function Wl(e){let t=e instanceof HTMLElement?e.style:null,n=t?Array.from({length:t.length},(e,n)=>t.item(n)):[];return{color:n.includes(`color`),backgroundColor:n.includes(`background-color`),background:/(?:^|;)\s*background\s*:/i.test(e.getAttribute(`style`)??``),border:n.some(e=>e.startsWith(`border-`)&&!e.endsWith(`-radius`))}}function Gl(e,t){return e===`start`?t===`rtl`?`right`:`left`:e===`end`?t===`rtl`?`left`:`right`:e}let Kl={"live-element":({hash:e,indexes:t})=>{if(a(document)!==e)return null;let n=t.flatMap(e=>{let t=i(document,e);return t?[Rl(t)]:[]});return n.length===t.length?n:null},"live-body":()=>{let e=a(document),t=document.body?r(document,document.body):null;return e!==null&&t!==null?{index:t,hash:e}:null}},ql=/* @__PURE__ */ new Set([`html`,`body`]),Jl=/* @__PURE__ */ new Set([`img`,`video`,`model-viewer`]);function Yl(e){if(!e||ql.has(e.localName))return null;if(Jl.has(e.localName))return`media`;let t=(e.textContent??``).trim()!==``;return e.childElementCount>0?t&&[...e.children].every(Xl)?`text`:`container`:t?`text`:e.localName===`div`?`box`:null}function Xl(e){let t=getComputedStyle(e).display;return t===`inline`||t.startsWith(`inline-`)}function Zl(e){let t=Yl(e),n=getComputedStyle(e);return!t||ic(n.rotate)!==0||n.transform.startsWith(`matrix3d(`)||(t===`text`||t===`container`)&&(n.display===`inline`||n.display===`contents`)?null:{kind:t,natural:tu(e),hugsHeight:t===`text`&&!nu(e),inset:eu(n),sizing:t===`container`?$l(e,n):null}}let Ql=/* @__PURE__ */ new Set([`vertical`,`horizontal`,`wrap`]);function $l(e,t){let n=Ll(e,t);return{layout:n,fills:Ql.has(n.parent)&&(parseFloat(t.flexGrow)||0)>0}}function eu(e){if(e.boxSizing!==`content-box`)return{width:0,height:0};let t=(...e)=>e.reduce((e,t)=>e+(parseFloat(t)||0),0);return{width:t(e.paddingLeft,e.paddingRight,e.borderLeftWidth,e.borderRightWidth),height:t(e.paddingTop,e.paddingBottom,e.borderTopWidth,e.borderBottomWidth)}}function tu(e){let[t,n]=e instanceof HTMLImageElement?[e.naturalWidth,e.naturalHeight]:e instanceof HTMLVideoElement?[e.videoWidth,e.videoHeight]:[0,0];return t>0&&n>0?{width:t,height:n}:null}function nu(e){let t=e instanceof HTMLElement?e.style.height:``;return t!==``&&t!==`auto`}function ru(e,t){if(t.some(t=>t!==e&&t.contains(e)))return null;let n=getComputedStyle(e);if(n.position!==`absolute`&&n.position!==`fixed`)return null;let r=parseFloat(n.left),i=parseFloat(n.top);return Number.isNaN(r)||Number.isNaN(i)?null:{left:r,top:i}}function iu(e){let t=getComputedStyle(e),n=e=>Number.parseFloat(e)||0;return{top:n(t.marginTop),right:n(t.marginRight),bottom:n(t.marginBottom),left:n(t.marginLeft)}}function au(e){let t=e.getBoundingClientRect();return{x:Math.round(t.left),y:Math.round(t.top),width:Math.round(t.width),height:Math.round(t.height)}}function ou(e){let t=e.getBoundingClientRect();return{x:t.left,y:t.top,width:t.width,height:t.height}}function su(e,t){if(a(document)!==e)return null;let n=t.flatMap(e=>{let t=i(document,e);return t?[t]:[]});return n.length===t.length?n:null}function cu(e,t){return t.map((n,r)=>({index:e[r]??0,box:au(n),read:Zl(n),placed:ru(n,[]),nested:t.some(e=>e!==n&&e.contains(n)),margin:iu(n)}))}function lu(){let e=document.body;if(!e)return[];let t=innerWidth,r=innerHeight,i=[],a=[];return n(document).forEach((n,o)=>{if(!e.contains(n)||n===e||a.some(e=>e.contains(n))||getComputedStyle(n).position===`fixed`)return;let s=n.getBoundingClientRect();(s.width!==0||s.height!==0)&&(s.left<-1||s.top<-1||s.right>t+1||s.bottom>r+1)&&!uu(n,e)&&(a.push(n),i.push({index:o,box:au(n),placed:ru(n,[])}))}),i}function uu(e,t){let n=e=>{let t=e.parentElement;if(getComputedStyle(e).position!==`absolute`)return t;for(;t&&getComputedStyle(t).position===`static`&&getComputedStyle(t).transform===`none`;)t=t.parentElement;return t};for(let r=n(e);r&&r!==t&&t.contains(r);r=n(r)){let e=getComputedStyle(r);if(e.overflowX!==`visible`||e.overflowY!==`visible`)return!0}return!1}function du(){let e=a(document);return e===null?null:{hash:e,ghosts:lu()}}function fu(e){return e.flatMap(e=>{let t=i(document,e)?.getBoundingClientRect();return t?[{index:e,right:t.right,top:t.top}]:[]})}function pu(e,t,n){let r=new ResizeObserver(t);for(let t of[...e,document.documentElement])r.observe(t);let i=new MutationObserver(t);if(n)for(let t of e)i.observe(t,{attributes:!0,attributeFilter:[`style`]});return addEventListener(`scroll`,t,!0),addEventListener(`resize`,t),()=>{r.disconnect(),i.disconnect(),removeEventListener(`scroll`,t,!0),removeEventListener(`resize`,t)}}let mu={"element-boxes":({hash:e,indexes:t})=>a(document)===e?t.flatMap(e=>{let t=i(document,e),n=t?ou(t):null;return n&&n.width>0&&n.height>0?[{index:e,box:n}]:[]}):null,measure:({hash:e,indexes:t},{push:n,onClose:r})=>{let i=su(e,t);return i?(r(pu(i,()=>n(cu(t,i)),i.length>1)),cu(t,i)):null},overflow:(e,{push:t,onClose:n})=>{let r=0,i=()=>{r===0&&(r=requestAnimationFrame(()=>{r=0,t(du())}))},a=new MutationObserver(i);return a.observe(document,{attributes:!0,attributeFilter:[`style`],subtree:!0}),addEventListener(`resize`,i),n(()=>{cancelAnimationFrame(r),a.disconnect(),removeEventListener(`resize`,i)}),du()},pins:({indexes:e},{push:t,onClose:n})=>(n(pu(e.flatMap(e=>{let t=i(document,e);return t?[t]:[]}),()=>t(fu(e)),!1)),fu(e))},hu=[`play`,`pause`,`timeupdate`,`durationchange`,`loadedmetadata`,`volumechange`,`seeked`,`error`,`emptied`],gu=[`controls`,`autoplay`,`loop`,`muted`];function _u(e){let t=xl(e);return t instanceof HTMLMediaElement?t:null}function vu(e){let t=e instanceof HTMLVideoElement,n=t&&e.readyState>=1&&e.videoWidth===0;return{tag:t?`video`:`audio`,playable:e.error===null&&!n,paused:e.paused,time:e.currentTime,length:e.duration,muted:e.muted,mutedInFile:e.defaultMuted,controls:e.hasAttribute(`controls`),autoplay:e.hasAttribute(`autoplay`),loop:e.hasAttribute(`loop`)}}function yu(e,t){switch(t.kind){case`toggle-play`:e.paused?e.play().catch(()=>void 0):e.pause();return;case`seek`:e.currentTime=t.seconds;return;case`toggle-sound`:e.muted=!e.muted;return;case`set-flag`:e.toggleAttribute(t.name,t.on)}}let bu=`frameboard-media-strip`;function xu(){if(document.getElementById(bu))return()=>{};let t=document.createElement(`style`);return t.id=bu,t.setAttribute(e,``),t.textContent=`video::-webkit-media-controls { display: none !important }`,document.head?.append(t),()=>t.remove()}let Su={media:(e,{push:t,onClose:n})=>{let r=_u(e);if(!r)return null;let i=()=>t(vu(r));for(let e of hu)r.addEventListener(e,i);let a=new MutationObserver(i);return a.observe(r,{attributeFilter:[...gu]}),n(()=>{for(let e of hu)r.removeEventListener(e,i);a.disconnect()}),vu(r)},"media-act":({act:e,...t})=>{let n=_u(t);return n?(yu(n,e),!0):!1},"hide-strips":(e,{onClose:t})=>(t(xu()),!0)},Cu=[`load`,`error`,`camera-change`];function wu(e){let t=xl(e);return t instanceof HTMLElement&&t.localName===`model-viewer`?t:null}function Tu(e){let t=Math.round(e*180/Math.PI)%360;return t>180?t-360:t<=-180?t+360:t}function Eu(e){let t=e.loaded===!0,n=t?e.getCameraOrbit?.():void 0,r={};for(let t of Cc)r[t]=e.getAttribute(t);return{src:e.getAttribute(`src`)??``,loaded:t,clips:t?[...e.availableAnimations??[]]:[],orbit:n?{theta:Tu(n.theta),phi:Tu(n.phi)}:null,staged:r}}function Du(e,t,n){n===null?e.removeAttribute(t):e.setAttribute(t,n),t===`camera-orbit`&&e.updateComplete?.then(()=>e.jumpCameraToGoal?.()),t===`autoplay`&&n===null&&e.loaded&&(e.pause?.(),e.currentTime=0)}let Ou={model:(e,{push:t,onClose:n})=>{let r=wu(e);if(!r)return null;let i=Eu(r),a=JSON.stringify(i),o=()=>{let e=Eu(r),n=JSON.stringify(e);n!==a&&(a=n,t(e))};for(let e of Cu)r.addEventListener(e,o);let s=new MutationObserver(o);return s.observe(r,{attributeFilter:[`src`,...Cc]}),n(()=>{for(let e of Cu)r.removeEventListener(e,o);s.disconnect()}),i},"model-stage":({name:e,value:t,...n})=>{let r=wu(n);return r?(Du(r,e,t),!0):!1}};async function ku(e,t){let n=e.performance.now()+t,r=()=>new Promise(t=>e.requestAnimationFrame(()=>t())),i=e=>typeof e==`number`&&Number.isFinite(e)?Math.round(e*1e3):null,a=()=>{let t=e.__hf,n=i(t?.duration);if(typeof t?.seek==`function`&&n!==null&&n>0)return{source:`hf`,duration:n};let r=e.__timelines,a=Object.values(r??{}).filter(e=>typeof e?.seek==`function`);if(a.length>0){let e=a.map(e=>i(typeof e.duration==`function`?e.duration.call(e):e.duration)).filter(e=>e!==null);return{source:`timelines`,duration:e.length===0?null:Math.max(...e)}}let o=e.document.getAnimations();if(o.length>0){let e=o.map(e=>e.effect?.getComputedTiming().endTime).filter(e=>typeof e==`number`&&Number.isFinite(e));return{source:`css`,duration:e.length===0?null:Math.round(Math.max(...e))}}let s=[...e.document.querySelectorAll(`model-viewer`)].map(e=>e).filter(e=>(e.availableAnimations?.length??0)>0);if(s.length>0){let e=s.map(e=>i(e.duration)).filter(e=>e!==null);return{source:`model`,duration:e.length===0?null:Math.max(...e)}}return null};for(await r();;){let t=a();if(t!==null||e.performance.now()>=n)return t;await r()}}async function Au(e,{motion:t,ms:n}){let r=t.duration===null?n:Math.min(Math.max(n,0),t.duration);if(t.source===`hf`)await e.__hf.seek(r/1e3);else if(t.source===`timelines`){let t=e.__timelines;for(let e of Object.values(t))typeof e?.seek==`function`&&(e.pause?.(),await e.seek(r/1e3))}else if(t.source===`css`)for(let t of e.document.getAnimations())t.pause(),t.currentTime=r;for(let t of e.document.querySelectorAll(`model-viewer`)){let e=t;typeof e.pause==`function`&&(e.pause(),e.currentTime=r/1e3)}return await new Promise(t=>e.requestAnimationFrame(()=>e.requestAnimationFrame(()=>t()))),r}let ju=1e4;async function Mu(e=ju){let t=await ku(window,e);return t===null?null:{motion:t,span:t.duration??Nu()}}function Nu(){let e=document.getAnimations().map(e=>{let t=e.effect?.getComputedTiming(),n=Number(t?.duration),r=t?.delay??0;return Number.isFinite(n)?r+n:0});return Math.round(Math.max(0,...e))}function Pu(e){let t=null,n=null,r=async()=>{for(;t!==null;){let n=t;t=null,await Au(window,{motion:e,ms:n})}n=null};return e=>(t=e,n??=r(),n)}function Fu(e){if(e.source===`css`)for(let e of document.getAnimations())e.play();else location.reload()}function Iu({motion:e,span:t}){let n=0;if(e.source===`css`){let e=document.getAnimations().map(e=>Number(e.currentTime)).filter(e=>Number.isFinite(e));n=Math.max(0,...e)}else if(e.source===`timelines`){let e=window.__timelines,t=Object.values(e??{}).find(e=>typeof e?.time==`function`),r=t?Number(t.time.call(t)):0;n=Number.isFinite(r)?r*1e3:0}return Math.round(t<=0?n:e.duration===null?n%t:Math.min(n,t))}let Lu=/* @__PURE__ */ new Map;function Ru(e){return{motion:(t,n)=>Bu(e,n),"motion-seek":({motion:e,at:t})=>{let n=Lu.get(e);return n?(n.seek(t),!0):!1},"motion-release":({motion:e})=>{let t=Lu.get(e);return t?(Fu(t.found.motion),!0):!1},"motion-moment":e=>Iu(e)}}let zu=Ru(ju);function Bu(e,{id:t,push:n,onClose:r}){let i=!1;return Mu(e).catch(()=>null).then(e=>{i||(e&&Lu.set(t,{found:e,seek:Pu(e.motion)}),n(e))}),r(()=>{i=!0,Lu.delete(t)}),!0}function Vu(t,n){if(!document.head)return!1;let r=document.createElement(`style`);return r.setAttribute(e,``),r.textContent=t,document.head.append(r),n(()=>r.remove()),!0}let Hu={"hold-animations":(e,{onClose:t})=>Vu(`*, *::before, *::after { animation-play-state: paused !important }`,t),"hide-controls":(e,{onClose:t})=>Vu($c,t),"pointer-move":(e,{push:t,onClose:n})=>{let r=0,i=()=>{r===0&&(r=requestAnimationFrame(()=>{r=0,t(null)}))};return addEventListener(`pointermove`,i),n(()=>{removeEventListener(`pointermove`,i),cancelAnimationFrame(r)}),!0}},Uu=/* @__PURE__ */ new Map;function Wu(e,t,n){let r=`${e}:${t}`,a=i(document,e),o=a instanceof HTMLElement?a:null,s=Uu.get(r);if(n===null){if(Uu.delete(r),!s||s.element!==o||!o)return;s.value===``?s.attribute===null?o.removeAttribute(`style`):o.setAttribute(`style`,s.attribute):o.style.setProperty(t,s.value,s.priority),o.getAttribute(`style`)===``&&o.removeAttribute(`style`)}else o&&(s?.element!==o&&Uu.set(r,{element:o,value:o.style.getPropertyValue(t),priority:o.style.getPropertyPriority(t),attribute:o.getAttribute(`style`)}),o.style.setProperty(t,n,`important`))}function Gu(t){return{"preview-style":({index:e,property:t,value:n})=>(Wu(e,t,n),null),"keep-previews":()=>(Uu.clear(),null),restamp:({hash:n})=>{let r=document.querySelector(`style[${e}]`);return r?(r.setAttribute(`data-hash`,n),t(),!0):!1}}}function Ku(e){return n(e).some(e=>e.matches(`a[href], button, input, select, textarea, summary, [onclick], [tabindex], [contenteditable], video[controls], audio[controls], script`))}let qu={"takes-clicks":()=>Ku(document)},$=`data-frameboard-step`,Ju=`--frameboard-step-delay`,Yu=`frameboard-present-steps`,Xu=`
116
+ [${$}='hidden'] { visibility: hidden !important }
117
+
118
+ @keyframes frameboard-step-appear { from { visibility: hidden } to { visibility: visible } }
119
+ @keyframes frameboard-step-fade { from { opacity: 0 } to { opacity: 1 } }
120
+ @keyframes frameboard-step-fly { from { opacity: 0; translate: 0 40px } to { opacity: 1; translate: 0 0 } }
121
+ @keyframes frameboard-step-wipe { from { clip-path: inset(0 100% 0 0) } to { clip-path: inset(0 0 0 0) } }
122
+ @keyframes frameboard-step-zoom { from { opacity: 0; scale: 0.6 } to { opacity: 1; scale: 1 } }
123
+
124
+ @media (prefers-reduced-motion: no-preference) {
125
+ [${$}='enter'] {
126
+ animation-duration: 400ms;
127
+ animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
128
+ animation-fill-mode: both;
129
+ animation-delay: var(${Ju}, 0ms);
130
+ }
131
+ [${$}='enter'][${$}-effect='appear'] { animation-name: frameboard-step-appear; animation-duration: 1ms }
132
+ [${$}='enter'][${$}-effect='fade'] { animation-name: frameboard-step-fade }
133
+ [${$}='enter'][${$}-effect='fly'] { animation-name: frameboard-step-fly }
134
+ [${$}='enter'][${$}-effect='wipe'] { animation-name: frameboard-step-wipe }
135
+ [${$}='enter'][${$}-effect='zoom'] { animation-name: frameboard-step-zoom }
136
+ }
137
+ `;function Zu(e){return e instanceof HTMLElement||e instanceof SVGElement?e.style:void 0}function Qu(e){let t=e.getAttribute(q.step)?.trim()??``;if(!/^\d+$/.test(t))return null;let n=Number(t);return n>0?n:null}function $u(e){let t=e.getAttribute(q.effect);return Js.find(e=>e===t)??`appear`}function ed(e){let t=e.getAttribute(q.start);return Ys.find(e=>e===t)??`click`}function td(e){return e===`appear`?0:400}function nd(e){let t=[...e.querySelectorAll(`[${q.step}]`)].map(e=>({element:e,number:Qu(e)})).filter(e=>e.number!==null).sort((e,t)=>e.number-t.number),n=[],r=null;for(let e of t){let t=ed(e.element),i=$u(e.element),a=n.at(-1),o=a?.at(-1);if(a&&o&&(e.number===r||t!==`click`)){let n=t===`after`?o.delayMs+td(o.effect):o.delayMs;a.push({element:e.element,effect:i,delayMs:n})}else n.push([{element:e.element,effect:i,delayMs:0}]);r=e.number}return n}let rd=`[${q.step}]`;function id(e){return e.nodeType===1&&(e.matches(rd)||e.querySelector(rd)!==null)}function ad(e){return e.some(e=>e.type===`attributes`||[...e.addedNodes,...e.removedNodes].some(id))}function od(e,t,n,r=null){sd(e);for(let[e,i]of t.entries())for(let{element:t,effect:a,delayMs:o}of i){let i=e>=n?`hidden`:e===r?`enter`:`shown`;t.setAttribute($,i),t.setAttribute(`${$}-effect`,a),Zu(t)?.setProperty(Ju,`${o}ms`)}}function sd(t){if(t.getElementById(Yu))return;let n=t.createElement(`style`);n.id=Yu,n.setAttribute(e,``),n.textContent=Xu,t.head?.append(n)}function cd(e,t){let n=e.ownerDocument;sd(n);let r=t===`appear`;e.setAttribute($,r?`hidden`:`enter`),e.setAttribute(`${$}-effect`,t);let i=!1,a=()=>{i||(i=!0,clearTimeout(o),e.removeAttribute($),e.removeAttribute(`${$}-effect`),n.querySelector(`[${$}]`)||n.getElementById(Yu)?.remove())},o=setTimeout(a,r?200:400);return a}let ld=Object.values(q),ud=/* @__PURE__ */ new Map,dd={steps:({shown:e},{id:t,push:n,onClose:r})=>{let i={shown:e,entering:null,groups:nd(document)};od(document,i.groups,i.shown),ud.set(t,i);let a=new MutationObserver(e=>{ad(e)&&(i.groups=nd(document),od(document,i.groups,i.shown,i.entering),n(i.groups.length))});return a.observe(document.documentElement,{subtree:!0,childList:!0,attributeFilter:ld}),r(()=>{a.disconnect(),ud.delete(t)}),i.groups.length},"steps-show":({steps:e,shown:t,entering:n})=>{let r=ud.get(e);return r?(r.shown=t,r.entering=n,od(document,r.groups,t,n),!0):!1},"step-preview":({index:e,effect:t},{onClose:n})=>{let r=i(document,e);return r?(n(cd(r,t)),!0):!1}},fd=/\r\n|\r/g,pd=/\n+$/,md=/[\t\n\f\r ]+/g;function hd(e){let{whiteSpace:t}=getComputedStyle(e);return t===`normal`||t===`nowrap`}function gd(e,t,n){if(!(e instanceof HTMLElement))return null;if(e.childElementCount>0){let r=n&&_d(e,n);return r?vd(e,r,t):null}if((e.textContent??``).trim()===``)return null;let r=e,i=r.textContent??``,a=hd(r),o=a?i.replace(md,` `).trim():i,s=r.style.whiteSpace;o!==i&&(r.textContent=o);let c=!0,l=()=>{c=!1,r.removeAttribute(`contenteditable`),r.removeAttribute(Oc),r.removeEventListener(`keydown`,h),r.removeEventListener(`paste`,g),r.removeEventListener(`blur`,m),window.removeEventListener(`pagehide`,p)},u=()=>{r.textContent=i,r.style.whiteSpace=s},d=()=>{r.isConnected&&u()},f=()=>{c&&(l(),u())};function p(){l(),t({kind:`closed`},d)}function m(){if(!c)return;l();let e=(r.textContent??``).replace(fd,`
138
+ `).replace(pd,``);e===o.replace(pd,``)?(u(),t({kind:`closed`},d)):(r.textContent=e,t({kind:`commit`,text:e,breaks:a&&e.includes(`
117
139
  `)},d))}function h(e){e.key===`Enter`&&(e.preventDefault(),_(`
118
- `)),e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),m())}function g(e){e.preventDefault(),_((e.clipboardData?.getData(`text/plain`)??``).replace(au,`
140
+ `)),e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),m())}function g(e){e.preventDefault(),_((e.clipboardData?.getData(`text/plain`)??``).replace(fd,`
119
141
  `))}let _=e=>{let t=getSelection()?.getRangeAt(0);if(!t||!r.contains(t.commonAncestorContainer))return;a&&e.includes(`
120
142
  `)&&(r.style.whiteSpace=`pre-line`);let n=(e,t)=>{let n=document.createRange();return n.selectNodeContents(r),n.setEnd(e,t),n.toString().length},i=n(t.startContainer,t.startOffset),o=n(t.endContainer,t.endOffset),s=r.textContent??``,c=s.slice(o),l=c===``&&e.endsWith(`
121
143
  `)?`
122
- `:``;r.textContent=s.slice(0,i)+e+(c||l);let u=document.createRange();u.setStart(r.firstChild??r,i+e.length),u.collapse(!0),getSelection()?.removeAllRanges(),getSelection()?.addRange(u)};r.setAttribute(`contenteditable`,`plaintext-only`),r.setAttribute(yc,``),r.addEventListener(`keydown`,h),r.addEventListener(`paste`,g),r.addEventListener(`blur`,m),window.addEventListener(`pagehide`,p),r.focus();let ee=document.createRange();ee.selectNodeContents(r);let v=getSelection();return v?.removeAllRanges(),v?.addRange(ee),f}function uu(e,{x:t,y:n}){let r=document.caretPositionFromPoint?.(t,n)?.offsetNode??document.caretRangeFromPoint?.(t,n)?.startContainer;return r instanceof Text&&r.parentNode===e&&r.data.trim()!==``?r:null}function du(e,t,n){let r=[...e.childNodes].filter(e=>e instanceof Text).indexOf(t),i=t.data,a=cu(e),o=a?i.replace(su,` `):i;o!==i&&(t.data=o);let s=[...e.children].map(e=>({child:e,editable:e.getAttribute(`contenteditable`)})),c=[...e.childNodes],l=c.map(e=>e instanceof Text?e.data:``),u=!0,d=()=>{for(let t of[...e.childNodes])c.includes(t)||t.remove();for(let n=c.length-1;n>=0;n--){let r=c[n];r!==t&&r instanceof Text&&(r.data=l[n]??``);let i=c[n+1];r&&r.parentNode!==e&&e.insertBefore(r,i?.parentNode===e?i:null)}},f=()=>{u=!1,d(),e.removeAttribute(`contenteditable`),e.removeAttribute(yc);for(let{child:e,editable:t}of s)t===null?e.removeAttribute(`contenteditable`):e.setAttribute(`contenteditable`,t);e.removeEventListener(`keydown`,v),e.removeEventListener(`paste`,te),e.removeEventListener(`beforeinput`,y),e.removeEventListener(`blur`,_),window.removeEventListener(`pagehide`,g)},p=()=>{t.data=i},m=()=>{t.isConnected&&p()},h=()=>{u&&(f(),p())};function g(){f(),n({kind:`closed`},m)}function _(){if(!u)return;f();let e=t.data.replace(au,`
123
- `);e===o?(p(),n({kind:`closed`},m)):n({kind:`commit`,text:e,breaks:!1,run:r},m)}let ee=e=>a?e.replace(su,` `):e.replace(au,`
144
+ `:``;r.textContent=s.slice(0,i)+e+(c||l);let u=document.createRange();u.setStart(r.firstChild??r,i+e.length),u.collapse(!0),getSelection()?.removeAllRanges(),getSelection()?.addRange(u)};r.setAttribute(`contenteditable`,`plaintext-only`),r.setAttribute(Oc,``),r.addEventListener(`keydown`,h),r.addEventListener(`paste`,g),r.addEventListener(`blur`,m),window.addEventListener(`pagehide`,p),r.focus();let ee=document.createRange();ee.selectNodeContents(r);let v=getSelection();return v?.removeAllRanges(),v?.addRange(ee),f}function _d(e,{x:t,y:n}){let r=document.caretPositionFromPoint?.(t,n)?.offsetNode??document.caretRangeFromPoint?.(t,n)?.startContainer;return r instanceof Text&&r.parentNode===e&&r.data.trim()!==``?r:null}function vd(e,t,n){let r=[...e.childNodes].filter(e=>e instanceof Text).indexOf(t),i=t.data,a=hd(e),o=a?i.replace(md,` `):i;o!==i&&(t.data=o);let s=[...e.children].map(e=>({child:e,editable:e.getAttribute(`contenteditable`)})),c=[...e.childNodes],l=c.map(e=>e instanceof Text?e.data:``),u=!0,d=()=>{for(let t of[...e.childNodes])c.includes(t)||t.remove();for(let n=c.length-1;n>=0;n--){let r=c[n];r!==t&&r instanceof Text&&(r.data=l[n]??``);let i=c[n+1];r&&r.parentNode!==e&&e.insertBefore(r,i?.parentNode===e?i:null)}},f=()=>{u=!1,d(),e.removeAttribute(`contenteditable`),e.removeAttribute(Oc);for(let{child:e,editable:t}of s)t===null?e.removeAttribute(`contenteditable`):e.setAttribute(`contenteditable`,t);e.removeEventListener(`keydown`,v),e.removeEventListener(`paste`,te),e.removeEventListener(`beforeinput`,y),e.removeEventListener(`blur`,_),window.removeEventListener(`pagehide`,g)},p=()=>{t.data=i},m=()=>{t.isConnected&&p()},h=()=>{u&&(f(),p())};function g(){f(),n({kind:`closed`},m)}function _(){if(!u)return;f();let e=t.data.replace(fd,`
145
+ `);e===o?(p(),n({kind:`closed`},m)):n({kind:`commit`,text:e,breaks:!1,run:r},m)}let ee=e=>a?e.replace(md,` `):e.replace(fd,`
124
146
  `);function v(e){e.key===`Enter`&&(e.preventDefault(),a||ie(ne(),`
125
- `)),e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),_())}function te(e){e.preventDefault(),ie(ne(),ee(e.clipboardData?.getData(`text/plain`)??``))}function y(e){if(!e.cancelable)return;e.preventDefault();let[t=ne()]=e.getTargetRanges();e.inputType.startsWith(`delete`)?ie(t,``):e.inputType.startsWith(`insert`)&&ie(t,ee(e.data??e.dataTransfer?.getData(`text/plain`)??``))}let ne=()=>{let e=getSelection();return e&&e.rangeCount>0?e.getRangeAt(0):void 0},re=(n,r)=>{if(n===t)return r;if(n!==e)return;let i=[...e.childNodes].indexOf(t);return r===i?0:r===i+1?t.length:void 0},ie=(e,n)=>{let r=e&&re(e.startContainer,e.startOffset),i=e&&re(e.endContainer,e.endOffset);if(r===void 0||i===void 0)return;t.replaceData(r,i-r,n);let a=document.createRange();a.setStart(t,r+n.length),a.collapse(!0),getSelection()?.removeAllRanges(),getSelection()?.addRange(a)};for(let{child:e}of s)e.setAttribute(`contenteditable`,`false`);e.setAttribute(`contenteditable`,`plaintext-only`),e.setAttribute(yc,``),e.addEventListener(`keydown`,v),e.addEventListener(`paste`,te),e.addEventListener(`beforeinput`,y),e.addEventListener(`blur`,_),window.addEventListener(`pagehide`,g),e.focus();let ae=document.createRange();ae.selectNodeContents(t);let oe=getSelection();return oe?.removeAllRanges(),oe?.addRange(ae),h}document.currentScript?.remove();let fu=window.parent,pu=window.origin,mu=crypto.randomUUID(),hu=/* @__PURE__ */ new Map,gu=/* @__PURE__ */ new Map,_u={...Nc,...Kc,...sl,...yl,...Vl,...Yl,...tu,"element-box":e=>{let t=Jc(e);if(!t)return null;let{left:n,top:r,right:i,bottom:a}=t.getBoundingClientRect();return{left:n,top:r,right:i,bottom:a}},"text-edit":(e,{id:t,push:n,onClose:r})=>{let i=Jc(e),a=!1,o=i&&lu(i,(e,r)=>{a=!0,e.kind===`commit`&&gu.set(t,r),n(e)},e.at);return o?(r(()=>{a||o()}),!0):!1},"text-written":({edit:e,written:t})=>{let n=gu.get(e);return gu.delete(e),t||n?.(),null},...iu(()=>yu())};function vu(e){fu.postMessage(e,pu)}function yu(e=a(document)){vu({tag:Z,kind:`shown`,page:mu,hash:e})}function bu(e,t,n){let r=_u[e];if(!r)throw Error(`no handler for ${e}`);let i=Ac(e,t);if(i===kc)throw Error(`not the arguments ${e} takes`);return r(i,{id:n,push:e=>vu({tag:Z,kind:`push`,id:n,value:e}),onClose:e=>hu.set(n,e)})}fu!==window&&(qc(document,()=>yu()),window.addEventListener(`pagehide`,()=>yu(null)),window.addEventListener(`message`,e=>{if(e.source!==fu)return;let t=xc(e,pu);if(t?.kind===`close`&&(hu.get(t.id)?.(),hu.delete(t.id)),t?.kind!==`request`)return;let{id:n}=t;try{let e=bu(t.op,t.args,n);vu({tag:Z,kind:`reply`,id:n,ok:!0,value:e})}catch(e){let t=e instanceof Error?e.message:String(e);vu({tag:Z,kind:`reply`,id:n,ok:!1,error:t})}}))})();
147
+ `)),e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),_())}function te(e){e.preventDefault(),ie(ne(),ee(e.clipboardData?.getData(`text/plain`)??``))}function y(e){if(!e.cancelable)return;e.preventDefault();let[t=ne()]=e.getTargetRanges();e.inputType.startsWith(`delete`)?ie(t,``):e.inputType.startsWith(`insert`)&&ie(t,ee(e.data??e.dataTransfer?.getData(`text/plain`)??``))}let ne=()=>{let e=getSelection();return e&&e.rangeCount>0?e.getRangeAt(0):void 0},re=(n,r)=>{if(n===t)return r;if(n!==e)return;let i=[...e.childNodes].indexOf(t);return r===i?0:r===i+1?t.length:void 0},ie=(e,n)=>{let r=e&&re(e.startContainer,e.startOffset),i=e&&re(e.endContainer,e.endOffset);if(r===void 0||i===void 0)return;t.replaceData(r,i-r,n);let a=document.createRange();a.setStart(t,r+n.length),a.collapse(!0),getSelection()?.removeAllRanges(),getSelection()?.addRange(a)};for(let{child:e}of s)e.setAttribute(`contenteditable`,`false`);e.setAttribute(`contenteditable`,`plaintext-only`),e.setAttribute(Oc,``),e.addEventListener(`keydown`,v),e.addEventListener(`paste`,te),e.addEventListener(`beforeinput`,y),e.addEventListener(`blur`,_),window.addEventListener(`pagehide`,g),e.focus();let ae=document.createRange();ae.selectNodeContents(t);let oe=getSelection();return oe?.removeAllRanges(),oe?.addRange(ae),h}document.currentScript?.remove();let yd=window.parent,bd=window.origin,xd=crypto.randomUUID(),Sd=/* @__PURE__ */ new Map,Cd=/* @__PURE__ */ new Map,wd={...qc,...sl,...yl,...Fl,...Kl,...mu,...Su,...Ou,...zu,...Hu,...qu,...dd,"element-box":e=>{let t=xl(e);if(!t)return null;let{left:n,top:r,right:i,bottom:a}=t.getBoundingClientRect();return{left:n,top:r,right:i,bottom:a}},"text-edit":(e,{id:t,push:n,onClose:r})=>{let i=xl(e),a=!1,o=i&&gd(i,(e,r)=>{a=!0,e.kind===`commit`&&Cd.set(t,r),n(e)},e.at);return o?(r(()=>{a||o()}),!0):!1},"text-written":({edit:e,written:t})=>{let n=Cd.get(e);return Cd.delete(e),t||n?.(),null},...Gu(()=>Ed())};function Td(e,t){yd.postMessage(e,t)}function Ed(e=a(document)){Td({tag:X,kind:`shown`,page:xd,hash:e},`*`)}function Dd(e,t,n,r){let i=wd[e];if(!i)throw Error(`no handler for ${e}`);let a=Bc(e,t);if(a===zc)throw Error(`not the arguments ${e} takes`);return i(a,{id:n,push:e=>Td({tag:X,kind:`push`,id:n,value:e},r),onClose:e=>Sd.set(n,e)})}yd!==window&&(bl(document,()=>Ed()),window.addEventListener(`pagehide`,()=>Ed(null)),window.addEventListener(`message`,e=>{if(e.source!==yd)return;let{origin:t}=e;if(!Uc(t,bd))return;let n=Ac(e,t);if(n?.kind===`close`&&(Sd.get(n.id)?.(),Sd.delete(n.id)),n?.kind!==`request`)return;let{id:r}=n;try{let e=Dd(n.op,n.args,r,t);Td({tag:X,kind:`reply`,id:r,ok:!0,value:e},t)}catch(e){let n=e instanceof Error?e.message:String(e);Td({tag:X,kind:`reply`,id:r,ok:!1,error:n},t)}}))})();