@mintlify/cli 4.1.17 → 4.1.19

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.
@@ -272,12 +272,12 @@ Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=1
272
272
  `;break;case-2:a=` `;break;
273
273
  /* c8 ignore next 6 */
274
274
  case-1:if(r)continue;a=` `;break;default:a=String.fromCharCode(i)}r=i===-2,n.push(a)}return n.join(``)}function mg(e){let t=e||{},n=t.loc||{},r=t.range||[void 0,void 0],i=hg(n.start,r[0]||t.start),a=hg(n.end,r[1]||t.end);if(i&&a)return{start:i,end:a}}function hg(e,t){if(e&&typeof e==`object`){let n=`line`in e?gg(e.line):void 0,r=`column`in e?gg(e.column):void 0;if(n&&r!==void 0)return{line:n,column:r+1,offset:gg(t)}}}function gg(e){return typeof e==`number`&&e>-1?e:void 0}const _g=`https://github.com/micromark/micromark-extension-mdx-expression/tree/main/packages/micromark-extension-mdx-expression`,vg=`#unexpected-type-in-code-expected-an-object-spread-spread`;function yg(e,t,n,r,i,a,o,s,c,l,u){let d=this,f=this.events.length+3,p=0,m,h;return g;function g(t){return e.enter(n),e.enter(r),e.consume(t),e.exit(r),m=d.now(),_}function _(u){if(u===null){if(h)throw h;let e=new df("Unexpected end of file in expression, expected a corresponding closing brace for `{`",{place:d.now(),ruleId:`unexpected-eof`,source:`micromark-extension-mdx-expression`});throw e.url=_g+`#unexpected-end-of-file-in-expression-expected-a-corresponding-closing-brace-for-`,e}if(z(u))return e.enter(`lineEnding`),e.consume(u),e.exit(`lineEnding`),y;if(u===125&&p===0){let p=a?bg.call(d,a,o,i,f,m,l||!1,c||!1):{type:`ok`,estree:void 0};if(p.type===`ok`){e.enter(r),e.consume(u),e.exit(r);let i=e.exit(n);return s&&p.estree&&Object.assign(i,{estree:p.estree}),t}return h=p.message,e.enter(i),e.consume(u),v}return e.enter(i),v(u)}function v(t){return t===125&&p===0||t===null||z(t)?(e.exit(i),_(t)):(t===123&&!a?p+=1:t===125&&--p,e.consume(t),v)}function y(t){let n=d.now();if(n.line!==m.line&&!u&&d.parser.lazy[n.line]){let e=new df("Unexpected lazy line in expression in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",{place:d.now(),ruleId:`unexpected-lazy`,source:`micromark-extension-mdx-expression`});throw e.url=_g+`#unexpected-lazy-line-in-expression-in-container-expected-line-to-be-prefixed`,e}return V(t)?H(e,_,`linePrefix`,3)(t):_(t)}}function bg(e,t,n,r,i,a,o){let s=lg(this.events.slice(r),{acorn:e,tokenTypes:[n],acornOptions:t,start:i,expression:!0,allowEmpty:a,prefix:o?`({`:``,suffix:o?`})`:``}),c=s.estree;if(o&&c){let e=c.body[0];if(e.type!==`ExpressionStatement`||e.expression.type!==`ObjectExpression`){let t=mg(e),n=new df("Unexpected `"+e.type+"` in code: expected an object spread (`{...spread}`)",{place:t.start,ruleId:`non-spread`,source:`micromark-extension-mdx-expression`});throw n.url=_g+vg,n}if(e.expression.properties[1]){let t=new df(`Unexpected extra content in spread: only a single spread is supported`,{place:mg(e.expression.properties[1]).start,ruleId:`spread-extra`,source:`micromark-extension-mdx-expression`});throw t.url=_g+`#unexpected-extra-content-in-spread-only-a-single-spread-is-supported`,t}if(e.expression.properties[0]&&e.expression.properties[0].type!==`SpreadElement`){let t=mg(e.expression.properties[0]),n=new df("Unexpected `"+e.expression.properties[0].type+"` in code: only spread elements are supported",{place:t.start,ruleId:`non-spread`,source:`micromark-extension-mdx-expression`});throw n.url=_g+vg,n}}if(s.error){let e=new df(`Could not parse expression with acorn`,{cause:s.error,place:{line:s.error.loc.line,column:s.error.loc.column+1,offset:s.error.pos},ruleId:`acorn`,source:`micromark-extension-mdx-expression`});return e.url=_g+`#could-not-parse-expression-with-acorn`,{type:`nok`,message:e}}return{type:`ok`,estree:c}}function xg(e){let t=e||{},n=t.addResult,r=t.acorn,i=t.spread,a=t.allowEmpty,o;if(a??=!0,r){if(!r.parseExpressionAt)throw Error("Expected a proper `acorn` instance passed in as `options.acorn`");o=Object.assign({ecmaVersion:2024,sourceType:`module`},t.acornOptions)}else if(t.acornOptions||t.addResult)throw Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{123:{name:`mdxFlowExpression`,tokenize:s,concrete:!0}},text:{123:{name:`mdxTextExpression`,tokenize:c}}};function s(e,t,s){let c=this;return l;function l(e){return u(e)}function u(t){return yg.call(c,e,d,`mdxFlowExpression`,`mdxFlowExpressionMarker`,`mdxFlowExpressionChunk`,r,o,n,i,a)(t)}function d(t){return V(t)?H(e,f,`whitespace`)(t):f(t)}function f(n){let r=c.parser.constructs.flow[60],i=(Array.isArray(r)?r:r?[r]:[]).find(function(e){return e.name===`mdxJsxFlowTag`});return n===60&&i?e.attempt(i,f,s)(n):n===null||z(n)?t(n):s(n)}}function c(e,t){let s=this;return c;function c(c){return yg.call(s,e,t,`mdxTextExpression`,`mdxTextExpressionMarker`,`mdxTextExpressionChunk`,r,o,n,i,a,!0)(c)}}}const Sg=/[$_\p{ID_Start}]/u,Cg=/[$_\u{200C}\u{200D}\p{ID_Continue}]/u,wg=/[-$_\u{200C}\u{200D}\p{ID_Continue}]/u,Tg={};function Eg(e){return e?Sg.test(String.fromCodePoint(e)):!1}function Dg(e,t){let n=(t||Tg).jsx?wg:Cg;return e?n.test(String.fromCodePoint(e)):!1}const Og=`https://github.com/micromark/micromark-extension-mdx-jsx`;function kg(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,ee,D,te,ne,O){let k=this,A,re;return ie;function ie(t){return e.enter(s),e.enter(c),e.consume(t),e.exit(c),ae}function ae(e){return B(e)?n(e):(A=oe,j(e))}function oe(t){if(t===47)return e.enter(l),e.consume(t),e.exit(l),A=se,j;if(t===62)return Oe(t);if(t!==null&&t>=0&&Eg(t))return e.enter(d),e.enter(f),e.consume(t),ce;je(t,`before name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===33?" (note: to create a comment in MDX, use `{/* text */}`)":``))}function se(t){if(t===62)return Oe(t);if(t!==null&&t>=0&&Eg(t))return e.enter(d),e.enter(f),e.consume(t),ce;je(t,`before name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===42||t===47?` (note: JS comments in JSX tags are not supported in MDX)`:``))}function ce(t){if(t!==null&&t>=0&&Dg(t,{jsx:!0}))return e.consume(t),ce;if(t===46||t===47||t===58||t===62||t===123||B(t)||to(t))return e.exit(f),A=le,j(t);je(t,`in name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(t===64?" (note: to create a link in MDX, use `[text](url)`)":``))}function le(t){if(t===46)return e.enter(p),e.consume(t),e.exit(p),A=ue,j;if(t===58)return e.enter(h),e.consume(t),e.exit(h),A=pe,j;if(t===47||t===62||t===123||t!==null&&t>=0&&Eg(t))return e.exit(d),ge(t);je(t,`after name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ue(t){if(t!==null&&t>=0&&Eg(t))return e.enter(m),e.consume(t),de;je(t,`before member name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function de(t){if(t!==null&&t>=0&&Dg(t,{jsx:!0}))return e.consume(t),de;if(t===46||t===47||t===62||t===123||B(t)||to(t))return e.exit(m),A=fe,j(t);je(t,`in member name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(t===64?" (note: to create a link in MDX, use `[text](url)`)":``))}function fe(t){if(t===46)return e.enter(p),e.consume(t),e.exit(p),A=ue,j;if(t===47||t===62||t===123||t!==null&&t>=0&&Eg(t))return e.exit(d),ge(t);je(t,`after member name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function pe(t){if(t!==null&&t>=0&&Eg(t))return e.enter(g),e.consume(t),me;je(t,`before local name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===43||t!==null&&t>46&&t<58?" (note: to create a link in MDX, use `[text](url)`)":``))}function me(t){if(t!==null&&t>=0&&Dg(t,{jsx:!0}))return e.consume(t),me;if(t===47||t===62||t===123||B(t)||to(t))return e.exit(g),A=he,j(t);je(t,`in local name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag")}function he(t){if(t===47||t===62||t===123||t!==null&&t>=0&&Eg(t))return e.exit(d),ge(t);je(t,`after local name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ge(t){if(t===47)return e.enter(u),e.consume(t),e.exit(u),A=De,j;if(t===62)return Oe(t);if(t===123)return yg.call(k,e,_e,_,v,y,r,i,a,!0,!1,o)(t);if(t!==null&&t>=0&&Eg(t))return e.enter(b),e.enter(x),e.enter(S),e.consume(t),ve;je(t,`before attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function _e(e){return A=ge,j(e)}function ve(t){if(t!==null&&t>=0&&Dg(t,{jsx:!0}))return e.consume(t),ve;if(t===47||t===58||t===61||t===62||t===123||B(t)||to(t))return e.exit(S),A=ye,j(t);je(t,`in attribute name`,"an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function ye(t){if(t===58)return e.enter(C),e.consume(t),e.exit(C),A=be,j;if(t===61)return e.exit(x),e.enter(T),e.consume(t),e.exit(T),A=Ce,j;if(t===47||t===62||t===123||B(t)||to(t)||t!==null&&t>=0&&Eg(t))return e.exit(x),e.exit(b),A=ge,j(t);je(t,`after attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function be(t){if(t!==null&&t>=0&&Eg(t))return e.enter(w),e.consume(t),xe;je(t,`before local attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function xe(t){if(t!==null&&t>=0&&Dg(t,{jsx:!0}))return e.consume(t),xe;if(t===47||t===61||t===62||t===123||B(t)||to(t))return e.exit(w),e.exit(x),A=Se,j(t);je(t,`in local attribute name`,"an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function Se(t){if(t===61)return e.enter(T),e.consume(t),e.exit(T),A=Ce,j;if(t===47||t===62||t===123||t!==null&&t>=0&&Eg(t))return e.exit(b),ge(t);je(t,`after local attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Ce(t){if(t===34||t===39)return e.enter(E),e.enter(ee),e.consume(t),e.exit(ee),re=t,Te;if(t===123)return yg.call(k,e,we,te,ne,O,r,i,a,!1,!1,o)(t);je(t,`before attribute value`,"a character that can start an attribute value, such as `\"`, `'`, or `{`"+(t===60?" (note: to use an element or fragment as a prop value in MDX, use `{<element />}`)":``))}function we(t){return e.exit(b),A=ge,j(t)}function Te(t){return t===null&&je(t,`in attribute value`,"a corresponding closing quote `"+String.fromCodePoint(re)+"`"),t===re?(e.enter(ee),e.consume(t),e.exit(ee),e.exit(E),e.exit(b),re=void 0,A=ge,j):z(t)?(A=Te,j(t)):(e.enter(D),Ee(t))}function Ee(t){return t===null||t===re||z(t)?(e.exit(D),Te(t)):(e.consume(t),Ee)}function De(e){if(e===62)return Oe(e);je(e,`after self-closing slash`,"`>` to end the tag"+(e===42||e===47?` (note: JS comments in JSX tags are not supported in MDX)`:``))}function Oe(n){return e.enter(c),e.consume(n),e.exit(c),e.exit(s),t}function j(t){return z(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Ae):V(t)||to(t)?(e.enter(`esWhitespace`),ke(t)):A(t)}function ke(t){return z(t)?(e.exit(`esWhitespace`),j(t)):V(t)||to(t)?(e.consume(t),ke):(e.exit(`esWhitespace`),A(t))}function Ae(e){if(!o&&k.parser.lazy[k.now().line]){let e=new df("Unexpected lazy line in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",k.now(),`micromark-extension-mdx-jsx:unexpected-lazy`);throw e.url=Og+`#unexpected-lazy-line-in-container-expected-line-to-be`,e}return j(e)}function je(e,t,n){let r=new df(`Unexpected `+(e===null?`end of file`:"character `"+(e===96?"` ` `":String.fromCodePoint(e))+"` ("+Ag(e)+`)`)+` `+t+`, expected `+n,k.now(),`micromark-extension-mdx-jsx:unexpected-`+(e===null?`eof`:`character`));throw r.url=Og+(e===null?`#unexpected-end-of-file-at-expected-expect`:`#unexpected-character-at-expected-expect`),r}}function Ag(e){return`U+`+e.toString(16).toUpperCase().padStart(4,`0`)}function jg(e,t){return{name:`mdxJsxTextTag`,tokenize:n};function n(n,r,i){return kg.call(this,n,r,i,e,t.acornOptions,t.addResult,!0,`mdxJsxTextTag`,`mdxJsxTextTagMarker`,`mdxJsxTextTagClosingMarker`,`mdxJsxTextTagSelfClosingMarker`,`mdxJsxTextTagName`,`mdxJsxTextTagNamePrimary`,`mdxJsxTextTagNameMemberMarker`,`mdxJsxTextTagNameMember`,`mdxJsxTextTagNamePrefixMarker`,`mdxJsxTextTagNameLocal`,`mdxJsxTextTagExpressionAttribute`,`mdxJsxTextTagExpressionAttributeMarker`,`mdxJsxTextTagExpressionAttributeValue`,`mdxJsxTextTagAttribute`,`mdxJsxTextTagAttributeName`,`mdxJsxTextTagAttributeNamePrimary`,`mdxJsxTextTagAttributeNamePrefixMarker`,`mdxJsxTextTagAttributeNameLocal`,`mdxJsxTextTagAttributeInitializerMarker`,`mdxJsxTextTagAttributeValueLiteral`,`mdxJsxTextTagAttributeValueLiteralMarker`,`mdxJsxTextTagAttributeValueLiteralValue`,`mdxJsxTextTagAttributeValueExpression`,`mdxJsxTextTagAttributeValueExpressionMarker`,`mdxJsxTextTagAttributeValueExpressionValue`)}}function Mg(e,t){return{concrete:!0,name:`mdxJsxFlowTag`,tokenize:n};function n(n,r,i){let a=this;return o;function o(e){return s(e)}function s(r){return kg.call(a,n,c,i,e,t.acornOptions,t.addResult,!1,`mdxJsxFlowTag`,`mdxJsxFlowTagMarker`,`mdxJsxFlowTagClosingMarker`,`mdxJsxFlowTagSelfClosingMarker`,`mdxJsxFlowTagName`,`mdxJsxFlowTagNamePrimary`,`mdxJsxFlowTagNameMemberMarker`,`mdxJsxFlowTagNameMember`,`mdxJsxFlowTagNamePrefixMarker`,`mdxJsxFlowTagNameLocal`,`mdxJsxFlowTagExpressionAttribute`,`mdxJsxFlowTagExpressionAttributeMarker`,`mdxJsxFlowTagExpressionAttributeValue`,`mdxJsxFlowTagAttribute`,`mdxJsxFlowTagAttributeName`,`mdxJsxFlowTagAttributeNamePrimary`,`mdxJsxFlowTagAttributeNamePrefixMarker`,`mdxJsxFlowTagAttributeNameLocal`,`mdxJsxFlowTagAttributeInitializerMarker`,`mdxJsxFlowTagAttributeValueLiteral`,`mdxJsxFlowTagAttributeValueLiteralMarker`,`mdxJsxFlowTagAttributeValueLiteralValue`,`mdxJsxFlowTagAttributeValueExpression`,`mdxJsxFlowTagAttributeValueExpressionMarker`,`mdxJsxFlowTagAttributeValueExpressionValue`)(r)}function c(e){return V(e)?H(n,l,`whitespace`)(e):l(e)}function l(e){let t=a.parser.constructs.flow[123],s=Array.isArray(t)?t:t?[t]:[],c;for(let e of s)if(e.name===`mdxFlowExpression`){c=e;break}return e===60?o(e):e===123&&c?n.attempt(c,l,i)(e):e===null||z(e)?r(e):i(e)}}}function Ng(e){let t=e||{},n=t.acorn,r;if(n){if(!n.parse||!n.parseExpressionAt)throw Error("Expected a proper `acorn` instance passed in as `options.acorn`");r=Object.assign({ecmaVersion:2024,sourceType:`module`},t.acornOptions,{locations:!0})}else if(t.acornOptions||t.addResult)throw Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{60:Mg(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})},text:{60:jg(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})}}}var Pg=/* @__PURE__ */ t(Aa(),1);function Fg(){return{disable:{null:[`autolink`,`codeIndented`,`htmlFlow`,`htmlText`]}}}const Ig={tokenize:Bg,partial:!0},Lg=`https://github.com/micromark/micromark-extension-mdxjs-esm`,Rg=/* @__PURE__ */ new Set([`ExportAllDeclaration`,`ExportDefaultDeclaration`,`ExportNamedDeclaration`,`ImportDeclaration`]);function zg(e){let t={tokenize:i,concrete:!0};if(!e||!e.acorn||!e.acorn.parse)throw Error("Expected an `acorn` instance passed in as `options.acorn`");let n=e.acorn,r=Object.assign({ecmaVersion:2024,sourceType:`module`},e.acornOptions,{locations:!0});return{flow:{101:t,105:t}};function i(t,i,a){let o=this,s=o.parser.definedModuleSpecifiers||(o.parser.definedModuleSpecifiers=[]),c=this.events.length+1,l=``;return o.interrupt?a:u;function u(e){return o.now().column>1?a(e):(t.enter(`mdxjsEsm`),t.enter(`mdxjsEsmData`),t.consume(e),l+=String.fromCharCode(e),d)}function d(e){return qa(e)?(t.consume(e),l+=String.fromCharCode(e),d):(l===`import`||l===`export`)&&e===32?(t.consume(e),f):a(e)}function f(e){return e===null||z(e)?(t.exit(`mdxjsEsmData`),p(e)):(t.consume(e),f)}function p(e){return e===null?h(e):z(e)?t.check(Ig,h,m)(e):(t.enter(`mdxjsEsmData`),f(e))}function m(e){return t.enter(`lineEnding`),t.consume(e),t.exit(`lineEnding`),p}function h(a){let l=lg(o.events.slice(c),{acorn:n,acornOptions:r,tokenTypes:[`mdxjsEsmData`],prefix:s.length>0?`var `+s.join(`,`)+`
275
- `:``});if(l.error){if(a!==null&&l.swallow)return m(a);let e=new df(`Could not parse import/exports with acorn`,{cause:l.error,place:{line:l.error.loc.line,column:l.error.loc.column+1,offset:l.error.pos},ruleId:`acorn`,source:`micromark-extension-mdxjs-esm`});throw e.url=Lg+`#could-not-parse-importexports-with-acorn`,e}s.length>0&&l.estree.body.shift();let u=-1;for(;++u<l.estree.body.length;){let e=l.estree.body[u];if(!Rg.has(e.type)){let t=new df("Unexpected `"+e.type+"` in code: only import/exports are supported",{place:mg(e),ruleId:`non-esm`,source:`micromark-extension-mdxjs-esm`});throw t.url=Lg+`#unexpected-type-in-code-only-importexports-are-supported`,t}if(e.type===`ImportDeclaration`&&!o.interrupt){let t=-1;for(;++t<e.specifiers.length;){let n=e.specifiers[t];s.push(n.local.name)}}}return Object.assign(t.exit(`mdxjsEsm`),e.addResult?{estree:l.estree}:void 0),i(a)}}}function Bg(e,t,n){return r;function r(r){return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),e.attempt(xo,t,n)}}function Vg(e){let t=Object.assign({acorn:Ym.extend((0,Pg.default)()),acornOptions:{ecmaVersion:2024,sourceType:`module`},addResult:!0},e);return Ha([zg(t),xg(t),Ng(t),Fg()])}const Hg=/^( {0,3})(#{1,6})\s+(.+?)\s*\{\s*#([^}]+?)\s*\}\s*$/,Ug=/^(\s*)(#{1,6})\s+(.+?)\s*\{\s*#([^}]+?)\s*\}\s*$/,Wg=/<MDX(?:\s[^>]*[^/>\s])?\s*>/g,Gg=/<\/MDX\s*>/g,Kg=/(`+).*?\1|=\s*'[^'\n]*'|"[^"\n]*"/g,qg=/[<>"]/g,Jg=/[<>"&?,;:!'()\[\]{}]/g,Yg=/\p{Emoji_Modifier}|\p{Emoji_Modifier_Base}|\p{Emoji_Presentation}|\p{Extended_Pictographic}|[\u200D\uFE0E\uFE0F]/gu;function Xg(e){return e.trim().replace(qg,``)}function Zg(e){return e.trim().replace(Jg,``).replace(Yg,``).replace(/\s+/g,`-`)}function Qg(e,t){return $g(e,t).content}function $g(e,t){let n=e.split(`
276
- `),r=[],i=[],a=0,o,s=0,c=0,l=!1;for(let e of n){a+=1;let n=e.trimStart();if(o!==void 0){n_(n,o,s)&&(o=void 0),r.push(e),i.push(a);continue}let u=!l&&t_(n);if(u){o=u.char,s=u.count,r.push(e),i.push(a);continue}let{visible:d,inComment:f}=e_(e,l),p=l||f;l=f;let m=!p&&(c>0?Ug:Hg).exec(e);if(m&&m[2]&&m[3]&&m[4]){let e=m[1]??``,n=m[2].length,o=t?.preserveOriginal?Xg(m[4]):Zg(m[4]);r.push(`${e}<h${n} id="${o}">`,`${e}${m[3]}`,`${e}</h${n}>`),i.push(a,a,a)}else c=Math.max(0,c+(d.match(Wg)?.length??0)-(d.match(Gg)?.length??0)),r.push(e),i.push(a)}return{content:r.join(`
277
- `),sourceLines:i}}function e_(e,t){let n=e.replace(Kg,e=>` `.repeat(e.length)),r=``,i=0;for(;;){if(t){let n=e.indexOf(`*/`,i);if(n===-1)return{visible:r,inComment:t};i=n+2}let a=n.indexOf(`{/*`,i);if(a===-1)return{visible:r+e.slice(i),inComment:!1};r+=e.slice(i,a),i=a+3,t=!0}}function t_(e){let t=e[0];if(t!=="`"&&t!==`~`)return;let n=1;for(;n<e.length&&e[n]===t;)n++;if(!(n<3))return{char:t,count:n}}function n_(e,t,n){let r=0;for(;r<e.length&&e[r]===t;)r++;if(r<n)return!1;for(;r<e.length;r++)if(e[r]!==` `&&e[r]!==` `&&e[r]!==`\r`)return!1;return!0}const r_=/* @__PURE__ */ new Set([`loc`,`range`,`start`,`end`,`comments`,`leadingComments`,`trailingComments`]),i_=/* @__PURE__ */ new Set([`ArrowFunctionExpression`,`FunctionExpression`,`FunctionDeclaration`]);function a_(e,t){if(!R(e))return;let n=e.type;if(n===`Identifier`)typeof e.name==`string`&&t.add(e.name);else if(n===`AssignmentPattern`)a_(e.left,t);else if(n===`RestElement`)a_(e.argument,t);else if(n===`ObjectPattern`&&Array.isArray(e.properties))for(let n of e.properties)R(n)&&(n.type===`RestElement`?a_(n.argument,t):n.type===`Property`&&a_(n.value,t));else if(n===`ArrayPattern`&&Array.isArray(e.elements))for(let n of e.elements)a_(n,t)}function o_(e,t){for(let[n,r]of Object.entries(e))r_.has(n)||t(r)}function s_(e,t){if(Array.isArray(e))for(let n of e)s_(n,t);else if(R(e)&&typeof e.type==`string`&&!(i_.has(e.type)||e.type===`ClassBody`)){if(e.type===`VariableDeclaration`&&e.kind===`var`){let n=Array.isArray(e.declarations)?e.declarations:[];for(let e of n)R(e)&&a_(e.id,t)}o_(e,e=>s_(e,t))}}function c_(e){let t=/* @__PURE__ */ new Set;for(let n of e)if(R(n)){if(n.type===`VariableDeclaration`&&n.kind!==`var`){let e=Array.isArray(n.declarations)?n.declarations:[];for(let n of e)R(n)&&a_(n.id,t)}else(n.type===`FunctionDeclaration`||n.type===`ClassDeclaration`)&&R(n.id)&&typeof n.id.name==`string`&&t.add(n.id.name)}return t}function l_(e,t){let n=new Set(e);for(let e of t)n.add(e);return n}function u_(e){return typeof e==`string`&&!/^[a-z]/.test(e)&&!e.includes(`-`)}const d_=/* @__PURE__ */ new Set([`push`,`pop`,`shift`,`unshift`,`splice`,`sort`,`reverse`,`fill`,`copyWithin`,`set`,`add`,`delete`,`clear`,`__defineGetter__`,`__defineSetter__`]),f_=/* @__PURE__ */ new Set([`assign`,`defineProperty`,`defineProperties`,`setPrototypeOf`]),p_=/* @__PURE__ */ new Map([[`Object`,f_],[`Reflect`,/* @__PURE__ */ new Set([`set`,`defineProperty`,`deleteProperty`,`setPrototypeOf`])]]);function m_(e){return e===`constructor`||f_.has(e)}function h_(e){let t=e.property;if(R(t))return e.computed!==!0&&typeof t.name==`string`?t.name:t.type===`Literal`&&typeof t.value==`string`?t.value:void 0}const g_=/* @__PURE__ */ new Set([`globalThis`,`window`,`self`,`global`]),__=/* @__PURE__ */ new Set([`Object`,`Reflect`,`Function`,`eval`,...g_]),v_=/* @__PURE__ */ new WeakSet;function y_(e,t){let n=R(t)&&t.type===`Literal`&&(typeof t.value==`string`||typeof t.value==`number`);return e.computed===!0&&!n}function b_(e){let t=M_(e);for(;R(t)&&t.type===`MemberExpression`;){if(y_(t,t.property))return!0;t=M_(t.object)}return!1}function x_(e,t){var n;if(R(e))switch(e.type){case`AssignmentPattern`:x_(e.left,t);return;case`RestElement`:x_(e.argument,t);return;case`ArrayPattern`:if(Array.isArray(e.elements))for(let n of e.elements)x_(n,t);return;case`ObjectPattern`:{let r=Array.isArray(e.properties)?e.properties:[];for(let e of r){if(!R(e))continue;if(e.type===`RestElement`){x_(e.argument,t);continue}let r=e.key,i=e.computed!==!0&&R(r)&&typeof r.name==`string`?r.name:R(r)&&r.type===`Literal`?String(r.value):void 0;(y_(e,r)||i!==void 0&&(m_(i)||__.has(i)))&&((n=t.unknownWrite)==null||n.call(t)),x_(e.value,t)}return}default:return}}const S_=/* @__PURE__ */ new WeakSet;function C_(e){let t=e.callee;if(!R(t)||t.type!==`MemberExpression`)return;let n=t.object;h_(t)!==void 0&&R(n)&&n.type===`Identifier`&&typeof n.name==`string`&&p_.has(n.name)&&S_.add(n)}function w_(e){let t=e.callee;if(!R(t)||t.type!==`MemberExpression`)return;let n=h_(t);if(n===void 0)return;let r=t.object;if(R(r)&&r.type===`Identifier`&&typeof r.name==`string`){let t=p_.get(r.name);if(t!==void 0)return t.has(n)&&Array.isArray(e.arguments)?e.arguments[0]:void 0}return d_.has(n)?r:void 0}function T_(e,t,n){var r;R(e)&&typeof e.name==`string`&&!t.has(e.name)&&((e.name===`eval`||e.name===`Function`||g_.has(e.name)&&!v_.has(e)||p_.has(e.name)&&!S_.has(e))&&((r=n.unknownWrite)==null||r.call(n)),n.reference(e))}function E_(e,t,n){if(R(e))switch(e.type){case`AssignmentPattern`:E_(e.left,t,n),X(e.right,t,n);return;case`RestElement`:E_(e.argument,t,n);return;case`ObjectPattern`:{let r=Array.isArray(e.properties)?e.properties:[];for(let e of r)R(e)&&(e.type===`RestElement`?E_(e.argument,t,n):(e.computed===!0&&X(e.key,t,n),E_(e.value,t,n)));return}case`ArrayPattern`:{let r=Array.isArray(e.elements)?e.elements:[];for(let e of r)E_(e,t,n);return}case`MemberExpression`:X(e,t,n);return;default:return}}function X(e,t,n){var r,i,a,o,s,c,l,u,d,f;if(Array.isArray(e)){for(let r of e)X(r,t,n);return}if(!R(e)||typeof e.type!=`string`)return;let p=e.type;if(i_.has(p)){if(n.eagerOnly===!0)return;let r=Array.isArray(e.params)?e.params:[],i=/* @__PURE__ */ new Set;for(let e of r)a_(e,i);p===`FunctionExpression`&&R(e.id)&&typeof e.id.name==`string`&&i.add(e.id.name);let a=l_(t,i);for(let e of r)x_(e,n),E_(e,a,n);let o=/* @__PURE__ */ new Set;s_(e.body,o);let s=e.body,c=R(s)&&Array.isArray(s.body)?s.body:void 0;if(c!==void 0)for(let e of c_(c))o.add(e);X(c??s,l_(a,o),n)}else switch(p){case`Identifier`:T_(e,t,n);return;case`AssignmentExpression`:(r=n.write)==null||r.call(n,e.left,t),x_(e.left,n),X(e.left,t,n),X(e.right,t,n);return;case`UpdateExpression`:(i=n.write)==null||i.call(n,e.argument,t),X(e.argument,t,n);return;case`UnaryExpression`:if(e.operator===`delete`){let r=M_(e.argument);R(r)&&r.type===`MemberExpression`&&((a=n.mutate)==null||a.call(n,r.object,t))}X(e.argument,t,n);return;case`CallExpression`:{let r=w_(e);r!==void 0&&((o=n.mutate)==null||o.call(n,r,t)),b_(e.callee)&&((s=n.unknownWrite)==null||s.call(n)),C_(e),o_(e,e=>X(e,t,n));return}case`NewExpression`:case`TaggedTemplateExpression`:b_(p===`NewExpression`?e.callee:e.tag)&&((c=n.unknownWrite)==null||c.call(n)),o_(e,e=>X(e,t,n));return;case`ClassDeclaration`:case`ClassExpression`:{X(e.superClass,t,n);let r=p===`ClassExpression`&&R(e.id)&&typeof e.id.name==`string`?[e.id.name]:[];X(e.body,l_(t,r),n);return}case`BlockStatement`:case`StaticBlock`:{let r=Array.isArray(e.body)?e.body:[];X(r,l_(t,c_(r)),n);return}case`SwitchStatement`:{X(e.discriminant,t,n);let r=Array.isArray(e.cases)?e.cases:[];X(r,l_(t,c_(r.flatMap(e=>R(e)&&Array.isArray(e.consequent)?e.consequent:[]))),n);return}case`ForStatement`:{let r=l_(t,c_([e.init]));o_(e,e=>X(e,r,n));return}case`ForInStatement`:case`ForOfStatement`:{let r=e.left,i=l_(t,c_([r]));X(e.right,t,n),R(r)&&r.type===`VariableDeclaration`?X(r,i,n):((l=n.write)==null||l.call(n,r,t),x_(r,n),X(r,t,n)),X(e.body,i,n);return}case`CatchClause`:{let r=/* @__PURE__ */ new Set;a_(e.param,r);let i=l_(t,r);x_(e.param,n),E_(e.param,i,n),X(e.body,i,n);return}case`VariableDeclarator`:x_(e.id,n),E_(e.id,t,n),X(e.init,t,n);return;case`MemberExpression`:{let r=h_(e),i=e.object,a=R(i)&&i.type===`Identifier`&&typeof i.name==`string`&&p_.has(i.name);r!==void 0&&m_(r)&&!a&&((u=n.unknownWrite)==null||u.call(n)),r!==void 0&&__.has(r)&&((d=n.unknownWrite)==null||d.call(n)),r!==void 0&&!m_(r)&&R(i)&&i.type===`Identifier`&&typeof i.name==`string`&&g_.has(i.name)&&v_.add(i),X(e.object,t,n),e.computed===!0&&X(e.property,t,n);return}case`Property`:case`PropertyDefinition`:case`MethodDefinition`:if(e.computed===!0&&X(e.key,t,n),n.eagerOnly===!0&&p===`PropertyDefinition`&&e.static!==!0)return;X(e.value,t,n);return;case`LabeledStatement`:X(e.body,t,n);return;case`WithStatement`:(f=n.unknownWrite)==null||f.call(n),X(e.object,t,n),X(e.body,t,n);return;case`JSXOpeningElement`:case`JSXClosingElement`:{let r=e.name;R(r)&&r.type===`JSXIdentifier`&&u_(r.name)?T_(r,t,n):R(r)&&r.type===`JSXMemberExpression`&&X(r,t,n),X(e.attributes,t,n);return}case`JSXMemberExpression`:{let r=e.object;R(r)&&r.type===`JSXIdentifier`?T_(r,t,n):X(r,t,n);return}case`JSXAttribute`:X(e.value,t,n);return;case`BreakStatement`:case`ContinueStatement`:case`MetaProperty`:case`JSXIdentifier`:case`JSXNamespacedName`:return;default:o_(e,e=>X(e,t,n))}}function D_(e,t=!1){let n=/* @__PURE__ */ new Set;return X(e,/* @__PURE__ */ new Set,{reference:e=>{typeof e.name==`string`&&n.add(e.name)},eagerOnly:t}),n}const O_=/* @__PURE__ */ new Set([`ParenthesizedExpression`,`TSAsExpression`,`TSSatisfiesExpression`,`TSNonNullExpression`,`TSTypeAssertion`,`ChainExpression`]);function k_(e){let t=e.property;if(R(t)){if(e.computed!==!0)return typeof t.name==`string`?t.name:void 0;if(t.type===`Literal`&&(typeof t.value==`string`||typeof t.value==`number`))return String(t.value)}}function A_(e){if(e.computed===!0){let t=e.key;return R(t)&&t.type===`Literal`&&(typeof t.value==`string`||typeof t.value==`number`)?String(t.value):void 0}let t=e.key;if(R(t)&&typeof t.name==`string`)return t.name;if(R(t)&&t.type===`Literal`&&typeof t.value==`string`)return t.value}function j_(e,t){let n=k_(t);if(n===void 0)return`unknown`;let r=M_(e);if(!R(r))return`unknown`;if(r.type===`ObjectExpression`){let e=Array.isArray(r.properties)?r.properties:[],t=`contained`;for(let r of e){if(!R(r))continue;if(r.type===`SpreadElement`){t=`unknown`;continue}if(r.type!==`Property`)continue;let e=A_(r);e===void 0?t=`unknown`:e===n&&(t=r.value)}return t}if(r.type===`ArrayExpression`){if(!/^\d+$/.test(n))return`contained`;let e=Number(n),t=Array.isArray(r.elements)?r.elements:[],i=0;for(let n of t){if(R(n)&&n.type===`SpreadElement`)return`unknown`;if(i===e)return n??`contained`;i+=1}return`contained`}return`unknown`}function M_(e){let t=e;for(;R(t)&&typeof t.type==`string`&&O_.has(t.type);)t=t.expression;return t}function N_(e,t){if(Array.isArray(e))for(let n of e)N_(n,t);else if(R(e)&&typeof e.type==`string`){if(i_.has(e.type)&&Array.isArray(e.params))for(let n of e.params)a_(n,t);if(e.type===`CatchClause`&&a_(e.param,t),e.type===`VariableDeclarator`&&e.init==null&&a_(e.id,t),(e.type===`ForOfStatement`||e.type===`ForInStatement`)&&R(e.left)){let n=e.left;if(n.type===`VariableDeclaration`&&Array.isArray(n.declarations))for(let e of n.declarations)R(e)&&a_(e.id,t)}o_(e,e=>N_(e,t))}}function P_(e,t){if(Array.isArray(e)){for(let n of e)P_(n,t);return}if(!R(e))return;let n=(e,n)=>{let r=/* @__PURE__ */ new Set;a_(e,r);let i=D_(n);for(let e of r){let n=t.get(e)??/* @__PURE__ */ new Set;for(let e of i)n.add(e);t.set(e,n)}};e.type===`VariableDeclarator`&&n(e.id,e.init),e.type===`AssignmentExpression`&&n(M_(e.left),e.right),o_(e,e=>P_(e,t))}const F_=/* @__PURE__ */ new Set([`CallExpression`,`NewExpression`,`TaggedTemplateExpression`]);function I_(e,t){let n=M_(e);if(!R(n))return!1;switch(n.type){case`Identifier`:return typeof n.name==`string`&&t.has(n.name);case`MemberExpression`:return y_(n,n.property)||I_(n.object,t);case`LogicalExpression`:return I_(n.left,t)||I_(n.right,t);case`ConditionalExpression`:return I_(n.consequent,t)||I_(n.alternate,t);case`SequenceExpression`:{let e=Array.isArray(n.expressions)?n.expressions:[];return I_(e[e.length-1],t)}case`AwaitExpression`:case`SpreadElement`:return I_(n.argument,t);case`ArrayExpression`:return Array.isArray(n.elements)?n.elements.some(e=>I_(e,t)):!1;case`ObjectExpression`:return Array.isArray(n.properties)?n.properties.some(e=>R(e)&&I_(e.type===`SpreadElement`?e:e.value,t)):!1;default:return!1}}function L_(e,t){if(Array.isArray(e))for(let n of e)L_(n,t);else R(e)&&(e.type===`VariableDeclarator`&&I_(e.init,t)&&a_(e.id,t),e.type===`AssignmentExpression`&&I_(e.right,t)&&a_(M_(e.left),t),o_(e,e=>L_(e,t)))}const R_=/* @__PURE__ */ new Set([`apply`,`construct`]);function z_(e,t,n){if(Array.isArray(e))return e.some(e=>z_(e,t,n));if(!R(e)||typeof e.type!=`string`||n&&i_.has(e.type))return!1;if(F_.has(e.type)){let n=e.type===`TaggedTemplateExpression`?e.tag:e.callee;if(I_(n,t))return!0;let r=M_(n),i=Array.isArray(e.arguments)?e.arguments:[];if(R(r)&&r.type===`MemberExpression`&&R(r.object)&&r.object.type===`Identifier`&&r.object.name===`Reflect`&&R_.has(h_(r)??``)&&I_(i[0],t))return!0}let r=!1;return o_(e,e=>{r||=z_(e,t,n)}),r}function B_(e){if(Array.isArray(e))return e.some(B_);if(!R(e)||typeof e.type!=`string`||i_.has(e.type))return!1;if(F_.has(e.type))return!0;if(e.type===`PropertyDefinition`&&e.static!==!0)return e.computed===!0&&B_(e.key);let t=!1;return o_(e,e=>{t||=B_(e)}),t}function V_(e,t=!1){let n={reassigned:/* @__PURE__ */ new Set,mutated:/* @__PURE__ */ new Set},r=/* @__PURE__ */ new Map;P_(e,r);let i=/* @__PURE__ */ new Set;N_(e,i);let a=/* @__PURE__ */ new Set,o=-1;for(;a.size!==o;)o=a.size,L_(e,a);z_(e,a,t)&&n.mutated.add(`*`);let s=(e,t,a)=>{if(!t.has(e)){n.mutated.add(e);return}if(a.has(e))return;a.add(e);let o=r.get(e);if(o===void 0||i.has(e))n.mutated.add(`*`);else for(let e of o)s(e,/* @__PURE__ */ new Set,a)},c=(e,t)=>{let r=[],i=M_(e);for(;R(i)&&i.type===`MemberExpression`;)r.push(i),i=M_(i.object);if(R(i)){if(i.type===`ObjectExpression`||i.type===`ArrayExpression`){let e=i;for(let i=r.length-1;i>=0;--i){let a=r[i];if(a===void 0)return;let o=j_(e,a);if(o===`contained`)return;if(o===`unknown`){n.mutated.add(`*`);return}e=o;let s=M_(e);if(!R(s)||s.type!==`ObjectExpression`&&s.type!==`ArrayExpression`){c(e,t);return}e=s}}else switch(i.type){case`Identifier`:typeof i.name==`string`&&s(i.name,t,/* @__PURE__ */ new Set);return;case`ConditionalExpression`:c(i.consequent,t),c(i.alternate,t);return;case`LogicalExpression`:c(i.left,t),c(i.right,t);return;case`SequenceExpression`:{let e=Array.isArray(i.expressions)?i.expressions:[];c(e[e.length-1],t);return}case`ThisExpression`:case`ObjectExpression`:case`ArrayExpression`:case`NewExpression`:case`Literal`:case`TemplateLiteral`:return;default:n.mutated.add(`*`)}}},l=(e,t)=>{let r=M_(e);if(R(r))switch(r.type){case`Identifier`:typeof r.name==`string`&&!t.has(r.name)&&n.reassigned.add(r.name);return;case`MemberExpression`:c(r.object,t);return;case`AssignmentPattern`:l(r.left,t);return;case`RestElement`:l(r.argument,t);return;case`ObjectPattern`:{let e=Array.isArray(r.properties)?r.properties:[];for(let n of e)R(n)&&l(n.type===`RestElement`?n.argument:n.value,t);return}case`ArrayPattern`:{let e=Array.isArray(r.elements)?r.elements:[];for(let n of e)l(n,t);return}default:return}};return X(e,/* @__PURE__ */ new Set,{reference:()=>void 0,write:l,mutate:c,unknownWrite:()=>{n.mutated.add(`*`)},eagerOnly:t}),n}function H_(e,t=/* @__PURE__ */ new Set){if(Array.isArray(e)){for(let n of e)H_(n,t);return t}if(!R(e))return t;if(e.type===`VariableDeclarator`&&a_(e.id,t),(e.type===`FunctionDeclaration`||e.type===`ClassDeclaration`)&&R(e.id)&&typeof e.id.name==`string`&&t.add(e.id.name),Array.isArray(e.params))for(let n of e.params)a_(n,t);return e.type===`CatchClause`&&a_(e.param,t),(e.type===`ImportSpecifier`||e.type===`ImportDefaultSpecifier`||e.type===`ImportNamespaceSpecifier`)&&R(e.local)&&typeof e.local.name==`string`&&t.add(e.local.name),o_(e,e=>H_(e,t)),t}function U_(e){return R(e)&&typeof e.type==`string`?e.type:void 0}function W_(e){return R(e)}const G_=/* @__PURE__ */ new WeakMap;function K_(e){if(typeof e==`string`)return 1+e.length;if(typeof e!=`object`||!e)return 1;let t=G_.get(e);if(t!==void 0)return t;let n=1;if(Array.isArray(e)){for(let t of e)if(n+=K_(t),n>1e5)break}else for(let[t,r]of Object.entries(e))if(n+=t.length+K_(r),n>1e5)break;return G_.set(e,n),n}function q_(e){return K_(e)>1e5?Z:{ok:!0,value:e}}function J_(e){return e==null||typeof e==`boolean`||typeof e==`number`}function Y_(e){return Object.is(e,-0)?`-0`:Number.isNaN(e)?`0/0`:Number.isFinite(e)?JSON.stringify(e):e>0?`1e999`:`-1e999`}function X_(e){return e===void 0?`void 0`:e===null?`null`:typeof e==`number`?Y_(e):typeof e==`string`||typeof e==`boolean`?JSON.stringify(e):Array.isArray(e)?`[${e.map(e=>X_(e)).join(`,`)}]`:`{${Object.entries(e).map(([e,t])=>`${e===`__proto__`?`["__proto__"]`:JSON.stringify(e)}:${X_(t)}`).join(`,`)}}`}function Z_(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:!0,writable:!0,configurable:!0})}function Q_(e){if(U_(e)===`Identifier`&&R(e)&&typeof e.name==`string`)return e.name}function $_(e){return typeof e!=`object`||!e}const Z={ok:!1};function ev(e,t){if(e!==void 0){if(e===t.propsObjectName)return t.failedProps;if(e===t.restName)return t.restFailedProps}}function tv(e){return e==null}function nv(e){return typeof e==`object`&&!!e}function rv(e,t){return e===t?!0:tv(e)||tv(t)?tv(e)&&tv(t):nv(e)||nv(t)?nv(e)&&nv(t)?!1:void 0:typeof e==`boolean`||typeof t==`boolean`?Number(e)===Number(t):typeof e==`number`&&typeof t==`string`?e===Number(t):typeof e==`string`&&typeof t==`number`&&Number(e)===t}function iv(e,t){if(!t.scope.has(e))return Z;let n=t.scope.get(e);return{ok:!0,value:n===void 0?void 0:n}}function av(e,t){if(e.computed===!0){let n=lv(e.key,t);return n.ok&&typeof n.value==`string`?n.value:void 0}let n=Q_(e.key);if(n!==void 0)return n;if(U_(e.key)===`Literal`&&R(e.key)&&typeof e.key.value==`string`)return e.key.value}function ov(e,t){return Array.isArray(e)?typeof t!=`number`||!Number.isInteger(t)||t<0?Z:t>=e.length?{ok:!0,value:void 0}:{ok:!0,value:e[t]}:!W_(e)||typeof t!=`string`?Z:{ok:!0,value:Object.hasOwn(e,t)?e[t]:void 0}}function sv(e,t){let n=/* @__PURE__ */ new Set;a_(e,n);for(let e of n)t.scope.delete(e)}function cv(e,t,n){let r=U_(e);if(r===`Identifier`){let r=Q_(e);r!==void 0&&n.scope.set(r,t)}else if(r===`AssignmentPattern`&&R(e)){let r=t===void 0?lv(e.right,n):{ok:!0,value:t};r.ok?cv(e.left,r.value,n):sv(e.left,n)}else if(r===`ObjectPattern`&&R(e)&&Array.isArray(e.properties)){if(!W_(t)){sv(e,n);return}let r=Object.assign({},t),i=!0;for(let a of e.properties){if(U_(a)===`RestElement`&&R(a)){i?cv(a.argument,r,n):sv(a.argument,n);continue}if(U_(a)!==`Property`||!R(a))continue;let e=av(a,n);e===void 0?(i=!1,sv(a.value,n)):(delete r[e],cv(a.value,Object.hasOwn(t,e)?t[e]:void 0,n))}}else if(r===`ArrayPattern`&&R(e)&&Array.isArray(e.elements)){if(!Array.isArray(t)){sv(e,n);return}for(let r=0;r<e.elements.length;r++){let i=e.elements[r];if(i!=null){if(U_(i)===`RestElement`&&R(i)){cv(i.argument,t.slice(r),n);break}cv(i,r<t.length?t[r]:void 0,n)}}}}function lv(e,t){if(!R(e))return Z;switch(e.type){case`Literal`:{let t=e.value;return typeof t==`string`||typeof t==`number`||typeof t==`boolean`||t===null?{ok:!0,value:t}:Z}case`Identifier`:return typeof e.name==`string`?e.name===`undefined`&&!t.scope.has(`undefined`)?{ok:!0,value:void 0}:(ev(e.name,t)?.size??0)>0?Z:iv(e.name,t):Z;case`ParenthesizedExpression`:return lv(e.expression,t);case`MemberExpression`:{if(hv(e.object,t))return Z;let n=e.property,r=e.computed===!0?lv(n,t):{ok:!0,value:Q_(n)};if(!r.ok||r.value===void 0)return Z;let i=Q_(e.object),a=ev(i,t);if(a!==void 0&&i!==void 0){if(typeof r.value==`string`&&a.has(r.value))return Z;let e=iv(i,t);return e.ok?ov(e.value,r.value):Z}let o=lv(e.object,t);return o.ok?ov(o.value,r.value):Z}case`ObjectExpression`:{if(!Array.isArray(e.properties))return Z;let n={};for(let r of e.properties){if(!R(r))return Z;if(r.type===`SpreadElement`){let e=lv(r.argument,t);if(!e.ok)return Z;if(J_(e.value))continue;if(!W_(e.value))return Z;for(let[t,r]of Object.entries(e.value))Z_(n,t,r);continue}if(r.type!==`Property`)return Z;let e=av(r,t);if(e===void 0||e===`__proto__`&&r.computed!==!0&&r.shorthand!==!0)return Z;let i=lv(r.value,t);if(!i.ok)return Z;Z_(n,e,i.value)}return q_(n)}case`ArrayExpression`:{if(!Array.isArray(e.elements))return Z;let n=[];for(let r of e.elements){if(r===null)return Z;if(R(r)&&r.type===`SpreadElement`){let e=lv(r.argument,t);if(!e.ok||!Array.isArray(e.value)||n.length+e.value.length>1e5)return Z;for(let t of e.value)n.push(t);continue}let e=lv(r,t);if(!e.ok)return Z;n.push(e.value)}return q_(n)}case`TemplateLiteral`:{let n=Array.isArray(e.quasis)?e.quasis:[],r=Array.isArray(e.expressions)?e.expressions:[],i=``;for(let e=0;e<n.length;e++){let a=n[e],o=R(a)&&R(a.value)&&typeof a.value.cooked==`string`?a.value.cooked:``;if(i+=o,e<r.length){let n=lv(r[e],t);if(!n.ok||typeof n.value==`object`&&n.value!==null)return Z;i+=String(n.value)}if(i.length>1e5)return Z}return{ok:!0,value:i}}case`BinaryExpression`:{let n=lv(e.left,t),r=lv(e.right,t);if(!n.ok||!r.ok)return Z;switch(e.operator){case`+`:if(nv(n.value)||nv(r.value))return Z;if(typeof n.value==`string`||typeof r.value==`string`){let e=`${String(n.value)}${String(r.value)}`;return e.length>1e5?Z:{ok:!0,value:e}}if(typeof n.value==`number`&&typeof r.value==`number`){let e=n.value+r.value;return Number.isNaN(e)?Z:{ok:!0,value:e}}return Z;case`===`:return{ok:!0,value:n.value===r.value};case`!==`:return{ok:!0,value:n.value!==r.value};case`==`:case`!=`:{let t=rv(n.value,r.value);return t===void 0?Z:{ok:!0,value:e.operator===`==`?t:!t}}default:return Z}}case`LogicalExpression`:{let n=lv(e.left,t);if(!n.ok)return Z;let r=!!n.value;return e.operator===`&&`?r?lv(e.right,t):n:e.operator===`||`?r?n:lv(e.right,t):e.operator===`??`?n.value===null||n.value===void 0?lv(e.right,t):n:Z}case`ConditionalExpression`:{let n=lv(e.test,t);return n.ok?lv(n.value?e.consequent:e.alternate,t):Z}case`CallExpression`:return pv(e,t);case`UnaryExpression`:{if(e.operator===`typeof`)return _v(e.argument,t);let n=lv(e.argument,t);if(!n.ok)return Z;if(e.operator===`void`)return{ok:!0,value:void 0};if(e.operator===`!`)return{ok:!0,value:!n.value};if(e.operator===`-`||e.operator===`+`){if(typeof n.value==`object`&&n.value!==null)return Z;let t=e.operator===`-`?-Number(n.value):Number(n.value);return Number.isNaN(t)?Z:{ok:!0,value:t}}return Z}default:return Z}}function uv(e){return e===void 0||typeof e==`number`&&Number.isFinite(e)}function dv(e,t,n){let[r,i]=n,a=typeof r==`string`?r:void 0;switch(t){case`startsWith`:case`endsWith`:case`includes`:case`indexOf`:case`lastIndexOf`:return a===void 0||!uv(i)?Z:{ok:!0,value:e[t](a,i)};case`slice`:case`substring`:return!uv(r)||!uv(i)?Z:{ok:!0,value:e[t](r??0,i)};case`at`:case`charAt`:return uv(r)?{ok:!0,value:t===`at`?e.at(r??0):e.charAt(r??0)}:Z;case`toLowerCase`:case`toUpperCase`:case`trim`:case`trimStart`:case`trimEnd`:return n.length===0?{ok:!0,value:e[t]()}:Z;case`replace`:case`replaceAll`:{if(a===void 0||typeof i!=`string`||i.includes(`$`))return Z;let n=a===``?t===`replaceAll`?e.length+1:1:t===`replaceAll`?e.split(a).length-1:Number(e.includes(a));return e.length+n*(i.length-a.length)>1e5?Z:{ok:!0,value:e[t](a,i)}}case`split`:return a===void 0||!uv(i)?Z:q_(e.split(a,i));case`padStart`:case`padEnd`:return typeof r!=`number`||r>1e5||i!==void 0&&typeof i!=`string`?Z:{ok:!0,value:e[t](r,i)};case`repeat`:return typeof r!=`number`||r<0||e.length*r>1e5?Z:{ok:!0,value:e.repeat(r)};case`concat`:{if(!n.every(e=>typeof e==`string`||typeof e==`number`))return Z;let t=n.map(String);return t.reduce((e,t)=>e+t.length,e.length)>1e5?Z:{ok:!0,value:e.concat(...t)}}default:return Z}}function fv(e,t,n){let[r,i]=n;switch(t){case`join`:{if(r!==void 0&&typeof r!=`string`||!e.every(e=>typeof e!=`object`||!e))return Z;let t=e.map(e=>e==null?``:String(e)),n=r??`,`;return t.reduce((e,t)=>e+t.length,0)+n.length*Math.max(t.length-1,0)>1e5?Z:{ok:!0,value:t.join(n)}}case`includes`:case`indexOf`:return typeof r==`object`&&r||!uv(i)?Z:{ok:!0,value:e[t](r,i)};case`slice`:return!uv(r)||!uv(i)?Z:{ok:!0,value:e.slice(r,i)};case`at`:return uv(r)?{ok:!0,value:e.at(r??0)}:Z;default:return Z}}function pv(e,t){let n=e.callee;if(U_(n)!==`MemberExpression`||!R(n)||n.optional===!0)return Z;let r=n.computed===!0?R(n.property)&&typeof n.property.value==`string`?n.property.value:void 0:Q_(n.property);if(r===void 0||hv(n.object,t))return Z;let i=lv(n.object,t);if(!i.ok)return Z;let a=Array.isArray(e.arguments)?e.arguments:[],o=[];for(let e of a){if(U_(e)===`SpreadElement`)return Z;let n=lv(e,t);if(!n.ok)return Z;o.push(n.value)}try{if(typeof i.value==`string`)return dv(i.value,r,o);if(Array.isArray(i.value))return fv(i.value,r,o)}catch{return Z}return Z}const mv=/* @__PURE__ */ new Set([`window`,`document`,`navigator`,`location`,`history`,`localStorage`,`sessionStorage`,`matchMedia`,`requestAnimationFrame`]);function hv(e,t){if(t.markdownChildren!==!0||!R(e))return!1;if(e.type===`Identifier`)return e.name===t.childrenName&&!(t.failedProps?.has(`children`)??!1);if(e.type!==`MemberExpression`)return!1;let n=Q_(e.object);return gv(e)===`children`&&n!==void 0&&(n===t.propsObjectName||n===t.restName)}function gv(e){if(e.computed!==!0)return Q_(e.property);let t=e.property;return R(t)&&t.type===`Literal`&&typeof t.value==`string`?t.value:void 0}function _v(e,t){if(hv(e,t))return Z;if(U_(e)===`Identifier`&&R(e)&&typeof e.name==`string`&&mv.has(e.name)&&!t.scope.has(e.name)&&t.declaredNames!==void 0&&!t.declaredNames.has(e.name))return{ok:!0,value:`undefined`};let n=lv(e,t);if(!n.ok)return Z;let r=n.value;return{ok:!0,value:r===null?`object`:typeof r}}function vv(e){let t=U_(e);return t===`ArrowFunctionExpression`||t===`FunctionExpression`||t===`FunctionDeclaration`}function yv(e){if(e.type!==`mdxjsEsm`)return[];let t=e.data?.estree;return!R(t)||!Array.isArray(t.body)?[]:t.body}function bv(e,t){if(Array.isArray(e))for(let n of e)bv(n,t);else if(R(e)){R(e.data)&&e.data.estree!==void 0&&t.push(e.data.estree);for(let[n,r]of Object.entries(e))n!==`data`&&n!==`position`&&bv(r,t)}}function xv(e){for(let[t,n]of e)typeof n==`object`&&n&&e.delete(t)}function Sv(e,t){let{reassigned:n,mutated:r}=V_(e,!0);return n.size>0||r.size>0||t&&B_(e)}function Cv(e){let t=/* @__PURE__ */ new Map,n=/* @__PURE__ */ new Map,r=/* @__PURE__ */ new Map,i=[],a=e.children.flatMap(yv),o=(e,n)=>{let r=Array.isArray(n.params)?n.params:[];t.set(e,{params:r,body:n.body})},s=(e,t)=>{if(U_(e)!==`VariableDeclarator`||!R(e))return;Sv(e,f)&&xv(n);let i=e.init,a=Q_(e.id);if(a!==void 0&&vv(i)&&R(i)){o(a,i);return}if(t!==`const`)return;let s=lv(i,{scope:r,declaredNames:l});if(s.ok){let t=new Map(r);cv(e.id,s.value,{scope:t});let n=/* @__PURE__ */ new Set;a_(e.id,n);for(let e of n){if(!t.has(e))continue;let n=t.get(e),i=n===void 0?void 0:n;$_(i)&&r.set(e,i)}}let c=lv(i,{scope:n,declaredNames:l});c.ok&&cv(e.id,c.value,{scope:n})},c=[];bv(e,c);let l=H_(c),{reassigned:u,mutated:d}=V_(c),f=u.size>0||d.size>0;for(let e of a)if(R(e)){if(!(e.type===`VariableDeclaration`||e.type===`ExportNamedDeclaration`&&R(e.declaration)&&e.declaration.type===`VariableDeclaration`)&&Sv(e,f)&&xv(n),e.type===`VariableDeclaration`){let t=Array.isArray(e.declarations)?e.declarations:[];for(let n of t)s(n,e.kind)}else if(e.type===`FunctionDeclaration`){let t=e.id;U_(t)===`Identifier`&&R(t)&&typeof t.name==`string`&&o(t.name,e)}else{if(e.type===`ExportNamedDeclaration`){let t=e.declaration;if(U_(t)===`VariableDeclaration`&&R(t)){let e=Array.isArray(t.declarations)?t.declarations:[];for(let n of e)s(n,t.kind)}if(U_(t)===`FunctionDeclaration`&&R(t)){let e=t.id;U_(e)===`Identifier`&&R(e)&&typeof e.name==`string`&&o(e.name,t)}if(e.source!=null)continue;let n=Array.isArray(e.specifiers)?e.specifiers:[];for(let e of n){if(U_(e)!==`ExportSpecifier`||!R(e))continue;let t=e.local,n=e.exported;R(t)&&typeof t.name==`string`&&R(n)&&typeof n.name==`string`&&i.push([t.name,n.name])}}if(e.type===`ExportDefaultDeclaration`){let t=e.declaration;if(vv(t)&&R(t)){let e=t.id;U_(e)===`Identifier`&&R(e)&&typeof e.name==`string`&&o(e.name,t)}}}}for(let e of u)n.delete(e),r.delete(e),t.delete(e);d.size>0&&xv(n);let p=!0;for(;p;){p=!1;for(let[e,a]of i){let i=t.get(e);if(i&&!t.has(a)&&(t.set(a,i),p=!0),n.has(e)&&!n.has(a)){let t=n.get(e);n.set(a,t===void 0?void 0:t),p=!0}if(r.has(e)&&!r.has(a)){let t=r.get(e);r.set(a,t===void 0?void 0:t),p=!0}}}return{defs:t,moduleScope:n,literalScope:r,declaredNames:l}}`${Math.random().toString(36).slice(2)}${Math.random().toString(36).slice(2)}`;function wv(e){if(!R(e)||!Array.isArray(e.body))return;let[t]=e.body;if(U_(t)===`ExpressionStatement`&&R(t))return t.expression}const Tv=e=>[...new Set(e.map(e=>e.trim()))],Ev=e=>e.every(e=>typeof e==`string`),Dv=e=>Array.isArray(e)?e:[e];function Ov(e){if(Array.isArray(e)){if(e.length===0||!ua(e)||!Ev(e))return;let t=Tv(e);return ua(t)?t:void 0}let t=[e];if(!ua(t)||Ev(t))return;let[n]=t.map(({includes:e,excludes:t})=>Object.assign(Object.assign({},e&&{includes:Tv(e)}),t&&{excludes:Tv(t)}));return n&&ua([n])?n:void 0}function kv(e){if(!R(e)||Object.keys(e).length!==1)return;let t=Ov(e.groups);return t&&{groups:t}}function Av(e){return(e.type===`mdxJsxFlowElement`||e.type===`mdxJsxTextElement`)&&e.name===`Visibility`}const jv=[`humans`,`agents`,`signed-in`,`signed-out`];function Mv(e){return jv.some(t=>t===e)}function Nv(e){let t=(e.data?.estree)?.body[0];return t?.type===`ExpressionStatement`?t.expression:void 0}function Pv(e){switch(e?.type){case`Literal`:return typeof e.value==`string`?e.value:void 0;case`TemplateLiteral`:{let t=e.quasis[0]?.value.cooked??void 0;for(let[n,r]of e.expressions.entries()){let i=Pv(r),a=e.quasis[n+1]?.value.cooked;if(t===void 0||i===void 0||a==null)return;t+=i+a}return t}case`BinaryExpression`:{if(e.operator!==`+`)return;let t=Pv(e.left),n=Pv(e.right);return t===void 0||n===void 0?void 0:t+n}default:return}}function Fv(e){if(!(e.type!==`Property`||e.computed))return e.key.type===`Identifier`?e.key.name:e.key.type===`Literal`&&typeof e.key.value==`string`?e.key.value:void 0}function Iv(e){let t=e.elements.map(e=>Pv(e));return t.every(e=>e!==void 0)?t:void 0}function Lv(e){let t={};for(let n of e.properties){let e=Fv(n);if(n.type!==`Property`||e!==`includes`&&e!==`excludes`)return;let r=n.value.type===`ArrayExpression`?Iv(n.value):void 0;if(!r)return;t[e]=r}return t}function Rv(e){let t=Nv(e);if(t?.type!==`ObjectExpression`||t.properties.length!==1)return;let[n]=t.properties;if(n?.type===`Property`&&Fv(n)===`groups`)return n.value.type===`ObjectExpression`?Ov(Lv(n.value)):n.value.type===`ArrayExpression`?Ov(Iv(n.value)):void 0}function zv(e){if(e.type!==`mdxJsxExpressionAttribute`)return!1;let t=Nv(e),n=t?.type===`ObjectExpression`&&t.properties.length===1?t.properties[0]:void 0;return n?.type!==`SpreadElement`||n.argument.type!==`ObjectExpression`||n.argument.properties.some(e=>{if(e.type!==`Property`||e.computed)return!0;let t=e.key.type===`Identifier`?e.key.name:void 0,n=e.key.type===`Literal`?e.key.value:void 0;return(t??n)===`for`})}function Bv(e,t=/* @__PURE__ */ new Map,n){let r,i=!1,a=e.attributes.findLastIndex(e=>e.type===`mdxJsxAttribute`&&e.name===`for`);if(e.attributes.slice(a+1).some(zv))return{kind:`dynamic`};for(let o of a===-1?[]:e.attributes.slice(a,a+1))if(o.type===`mdxJsxAttribute`&&o.name===`for`){if(typeof o.value==`string`){if(Mv(o.value))return{kind:`audience`,audience:o.value};r??=o.value}else if(o.value&&typeof o.value==`object`){if(`value`in o.value&&typeof o.value.value==`string`){let e=o.value.value.trim(),t=Pv(Nv(o.value));if(t!==void 0){if(Mv(t))return{kind:`audience`,audience:t};r??=t;continue}let n=e.match(/^(["'`])((?:\\.|(?!\1)[^\\])*)\1$/);if(n){let e=n[2]??``;if(!(n[1]==="`"&&e.includes("${"))){if(Mv(e))return{kind:`audience`,audience:e};r??=e;continue}}let i=Rv(o.value);if(i)return{kind:`groups`,groups:i};if(Nv(o.value)?.type===`ObjectExpression`||e.startsWith(`{`)){r??=e;continue}}let e=wv(`data`in o.value?o.value.data?.estree:void 0),a=lv(e,{scope:t});if(a.ok){let t=a.value;if(Mv(t)){let r={kind:`audience`,audience:t};if(n===void 0||Hv(r))return r;let a=lv(e,{scope:n});if(a.ok&&a.value===t)return r;i=!0;continue}let o=kv(t);if(o)return{kind:`groups`,groups:o.groups};if(typeof t==`string`){r??=t;continue}}i=!0}}return r===void 0?i?{kind:`dynamic`}:{kind:`missing`}:{kind:`invalid`,raw:r}}function Vv(e){switch(e.kind){case`audience`:return e.audience===`agents`;case`groups`:return!1;case`invalid`:case`missing`:return!0;case`dynamic`:return!1}}function Hv(e){switch(e.kind){case`audience`:return e.audience===`humans`||e.audience===`signed-in`;case`groups`:case`invalid`:case`dynamic`:case`missing`:return!0}}function Uv(e){if(e.kind===`groups`)return{groups:e.groups};if(e.kind===`audience`&&(e.audience===`signed-in`||e.audience===`signed-out`))return e.audience}const Wv=(e,t)=>({type:`mdxJsxAttribute`,name:e,value:t});function Gv(e,t){let n=e.data,r=n&&`mintlifyTitleMarkdown`in n?n.mintlifyTitleMarkdown:void 0;return r&&typeof r==`object`&&`text`in r&&typeof r.text==`string`?r.text:t}const Kv=[],qv=(e,t=1,n=Kv)=>{if(`name`in e&&e.name===`Update`)return e.attributes.find(e=>`name`in e&&e.name===`label`&&typeof e.value==`string`)?.value??``;if(Av(e)){let t=Bv(e);if(!(t.kind===`dynamic`||t.kind===`audience`&&t.audience===`humans`))return``}let r=n[t-1],i=e.type===`text`,a=e.type===`inlineCode`,o=r?.type!==`mdxJsxFlowElement`,s=r&&`value`in r&&typeof r.value==`string`&&!r.value.startsWith(`<small`);if(a||i&&(o||s))return e.value;if(`children`in e&&Array.isArray(e.children)){let t=``;return e.children.forEach((e,n,r)=>{t+=qv(e,n,r)}),t}return``},Jv=[`animate`,`animateMotion`,`animateTransform`,`mpath`,`set`],Yv=e=>e.type===`mdxjsEsm`;function Xv(e){return e.data?.estree!=null}const Zv=e=>e.type===`ImportDeclaration`,Qv=e=>[`ExportAllDeclaration`,`ExportDefaultDeclaration`,`ExportNamedDeclaration`].includes(e),$v=e=>e.type===`mdxJsxFlowElement`,ey=e=>e instanceof Object&&`type`in e&&(e.type===`mdxJsxFlowElement`||e.type===`mdxJsxTextElement`),ty=e=>$v(e)&&e.name==null,ny=(e,t)=>`${e}_${t}`,ry=[`ApiPlayground`,`Accordion`,`AccordionGroup`,`Badge`,`Callout`,`CodeGroup`,`CodeBlock`,`Color`,`Color.Row`,`Color.Item`,`CustomCode`,`CustomComponent`,`DynamicCustomComponent`,`Danger`,`Tile`,`Tree`,`Tree.Folder`,`Tree.File`,`FileTree`,`SnippetGroup`,`Panel`,`RequestExample`,`ResponseExample`,`Param`,`ParamField`,`Prompt`,`Card`,`CardGroup`,`Columns`,`Column`,`Expandable`,`Frame`,`GitHub`,`GitHub.Repo`,`Github`,`Github.Repo`,`Heading`,`Info`,`Icon`,`MDX`,`Link`,`MDXContentController`,`ResponseField`,`Warning`,`Note`,`Tip`,`Check`,`Tabs`,`Tab`,`Tooltip`,`Latex`,`Step`,`Steps`,`Update`,`a`,`b`,`br`,`button`,`clipPath`,`col`,`colgroup`,`defs`,`div`,`form`,`g`,`h1`,`h2`,`h3`,`h4`,`head`,`hr`,`iframe`,`img`,`input`,`label`,`li`,`link`,`ol`,`p`,`path`,`picture`,`rect`,`script`,`section`,`source`,`span`,`sub`,`sup`,`u`,`svg`,...Jv,`table`,`tbody`,`td`,`th`,`thead`,`tr`,`ul`,`video`,`code`,`kbd`,`pre`,`ZoomImage`,`OptimizedVideo`,`Mermaid`,`Variation`,`Visibility`,`View`,`zapier-zap-templates`],iy=(e,t)=>{let n=e.position?.start.offset,r=e.position?.end.offset;return n===void 0||r===void 0?!1:!t.startsWith(`$$`,n)&&/^\d/.test(e.value)&&/\d/.test(t[r]??``)},ay=(e,t)=>{Da(e,`inlineMath`,(e,n,r)=>{if(r&&n!==void 0&&iy(e,t))return r.children.splice(n,1,{type:`text`,value:`$${e.value}$`}),[wa,n]})};Object.freeze({status:`aborted`});/* @__NO_SIDE_EFFECTS__ */
278
- function Q(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:o,traits:/* @__PURE__ */ new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}var oy=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},sy=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};const cy={};function ly(e){return e&&Object.assign(cy,e),cy}function uy(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 dy(e,t){return typeof t==`bigint`?t.toString():t}function fy(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function py(e){return e==null}function my(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function hy(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=t.toString(),i=(r.split(`.`)[1]||``).length;if(i===0&&/\d?e-\d?/.test(r)){let e=r.match(/\d?e-(\d?)/);e?.[1]&&(i=Number.parseInt(e[1]))}let a=n>i?n:i;return Number.parseInt(e.toFixed(a).replace(`.`,``))%Number.parseInt(t.toFixed(a).replace(`.`,``))/10**a}const gy=Symbol(`evaluating`);function _y(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==gy)return r===void 0&&(r=gy,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function vy(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function yy(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function by(e){return JSON.stringify(e)}function xy(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}const Sy=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Cy(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}const wy=fy(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function Ty(e){if(Cy(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return Cy(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function Ey(e){return Ty(e)?{...e}:Array.isArray(e)?[...e]:e}const Dy=/* @__PURE__ */ new Set([`string`,`number`,`symbol`]);function Oy(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function ky(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function $(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 Ay(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}const jy={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function My(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`);return ky(e,yy(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return vy(this,`shape`,e),e},checks:[]}))}function Ny(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`);return ky(e,yy(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return vy(this,`shape`,r),r},checks:[]}))}function Py(e,t){if(!Ty(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return ky(e,yy(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return vy(this,`shape`,n),n}}))}function Fy(e,t){if(!Ty(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return ky(e,yy(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return vy(this,`shape`,n),n}}))}function Iy(e,t){return ky(e,yy(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return vy(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:[]}))}function Ly(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return ky(t,yy(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return vy(this,`shape`,i),i},checks:[]}))}function Ry(e,t,n){return ky(t,yy(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return vy(this,`shape`,i),i}}))}function zy(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 By(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Vy(e){return typeof e==`string`?e:e?.message}function Hy(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=Vy(e.inst?._zod.def?.error?.(e))??Vy(t?.error?.(e))??Vy(n.customError?.(e))??Vy(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Uy(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Wy(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}const Gy=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,dy,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Ky=/* @__PURE__ */ Q(`$ZodError`,Gy),qy=/* @__PURE__ */ Q(`$ZodError`,Gy,{Parent:Error});function Jy(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Yy(e,t=e=>e.message){let n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`&&i.errors.length)i.errors.map(e=>r({issues:e}));else if(i.code===`invalid_key`)r({issues:i.issues});else if(i.code===`invalid_element`)r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}const Xy=e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new oy;if(o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>Hy(e,a,ly())));throw Sy(t,i?.callee),t}return o.value},Zy=e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>Hy(e,a,ly())));throw Sy(t,i?.callee),t}return o.value},Qy=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 oy;return a.issues.length?{success:!1,error:new(e??Ky)(a.issues.map(e=>Hy(e,i,ly())))}:{success:!0,data:a.value}},$y=/* @__PURE__*/ Qy(qy),eb=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>Hy(e,i,ly())))}:{success:!0,data:a.value}},tb=/* @__PURE__*/ eb(qy),nb=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Xy(e)(t,n,i)},rb=e=>(t,n,r)=>Xy(e)(t,n,r),ib=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Zy(e)(t,n,i)},ab=e=>async(t,n,r)=>Zy(e)(t,n,r),ob=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Qy(e)(t,n,i)},sb=e=>(t,n,r)=>Qy(e)(t,n,r),cb=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return eb(e)(t,n,i)},lb=e=>async(t,n,r)=>eb(e)(t,n,r),ub=/^[cC][^\s-]{8,}$/,db=/^[0-9a-z]+$/,fb=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,pb=/^[0-9a-vA-V]{20}$/,mb=/^[A-Za-z0-9]{27}$/,hb=/^[a-zA-Z0-9_-]{21}$/,gb=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,_b=/^([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})$/,vb=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)$/,yb=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;function bb(){return/* @__PURE__ */ RegExp(`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,`u`)}const xb=/^(?:(?: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])$/,Sb=/^(([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}|:))$/,Cb=/^((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])$/,wb=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Tb=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Eb=/^[A-Za-z0-9_-]*$/,Db=/^\+[1-9]\d{6,14}$/,Ob=`(?:(?:\\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])))`,kb=/*@__PURE__*/ RegExp(`^${Ob}$`);function Ab(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function jb(e){return RegExp(`^${Ab(e)}$`)}function Mb(e){let t=Ab({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${Ob}T(?:${r})$`)}const Nb=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},Pb=/^-?\d+$/,Fb=/^-?\d+(?:\.\d+)?$/,Ib=/^(?:true|false)$/i,Lb=/^[^A-Z]*$/,Rb=/^[^a-z]*$/,zb=/*@__PURE__*/ Q(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Bb={number:`number`,bigint:`bigint`,object:`date`},Vb=/*@__PURE__*/ Q(`$ZodCheckLessThan`,(e,t)=>{zb.init(e,t);let n=Bb[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Hb=/*@__PURE__*/ Q(`$ZodCheckGreaterThan`,(e,t)=>{zb.init(e,t);let n=Bb[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ub=/*@__PURE__*/ Q(`$ZodCheckMultipleOf`,(e,t)=>{zb.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):hy(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})}}),Wb=/*@__PURE__*/ Q(`$ZodCheckNumberFormat`,(e,t)=>{zb.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=jy[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=Pb)}),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})}}),Gb=/*@__PURE__*/ Q(`$ZodCheckMaxLength`,(e,t)=>{var n;zb.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!py(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=Uy(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Kb=/*@__PURE__*/ Q(`$ZodCheckMinLength`,(e,t)=>{var n;zb.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!py(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=Uy(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),qb=/*@__PURE__*/ Q(`$ZodCheckLengthEquals`,(e,t)=>{var n;zb.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!py(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=Uy(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Jb=/*@__PURE__*/ Q(`$ZodCheckStringFormat`,(e,t)=>{var n,r;zb.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=/* @__PURE__ */ new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Yb=/*@__PURE__*/ Q(`$ZodCheckRegex`,(e,t)=>{Jb.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})}}),Xb=/*@__PURE__*/ Q(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Lb,Jb.init(e,t)}),Zb=/*@__PURE__*/ Q(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Rb,Jb.init(e,t)}),Qb=/*@__PURE__*/ Q(`$ZodCheckIncludes`,(e,t)=>{zb.init(e,t);let n=Oy(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=/* @__PURE__ */ new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),$b=/*@__PURE__*/ Q(`$ZodCheckStartsWith`,(e,t)=>{zb.init(e,t);let n=RegExp(`^${Oy(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=/* @__PURE__ */ new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),ex=/*@__PURE__*/ Q(`$ZodCheckEndsWith`,(e,t)=>{zb.init(e,t);let n=RegExp(`.*${Oy(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=/* @__PURE__ */ new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),tx=/*@__PURE__*/ Q(`$ZodCheckOverwrite`,(e,t)=>{zb.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});var nx=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
275
+ `:``});if(l.error){if(a!==null&&l.swallow)return m(a);let e=new df(`Could not parse import/exports with acorn`,{cause:l.error,place:{line:l.error.loc.line,column:l.error.loc.column+1,offset:l.error.pos},ruleId:`acorn`,source:`micromark-extension-mdxjs-esm`});throw e.url=Lg+`#could-not-parse-importexports-with-acorn`,e}s.length>0&&l.estree.body.shift();let u=-1;for(;++u<l.estree.body.length;){let e=l.estree.body[u];if(!Rg.has(e.type)){let t=new df("Unexpected `"+e.type+"` in code: only import/exports are supported",{place:mg(e),ruleId:`non-esm`,source:`micromark-extension-mdxjs-esm`});throw t.url=Lg+`#unexpected-type-in-code-only-importexports-are-supported`,t}if(e.type===`ImportDeclaration`&&!o.interrupt){let t=-1;for(;++t<e.specifiers.length;){let n=e.specifiers[t];s.push(n.local.name)}}}return Object.assign(t.exit(`mdxjsEsm`),e.addResult?{estree:l.estree}:void 0),i(a)}}}function Bg(e,t,n){return r;function r(r){return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),e.attempt(xo,t,n)}}function Vg(e){let t=Object.assign({acorn:Ym.extend((0,Pg.default)()),acornOptions:{ecmaVersion:2024,sourceType:`module`},addResult:!0},e);return Ha([zg(t),xg(t),Ng(t),Fg()])}const Hg=/^( {0,3})(#{1,6})\s+(.+?)\s*\{\s*#([^}]+?)\s*\}\s*$/,Ug=/^(\s*)(#{1,6})\s+(.+?)\s*\{\s*#([^}]+?)\s*\}\s*$/,Wg=/<MDX(?:\s[^>]*[^/>\s])?\s*>/g,Gg=/<\/MDX\s*>/g,Kg=/(`+).*?\1|=\s*'[^'\n]*'|"[^"\n]*"/g,qg=/[<>"]/g,Jg=/[<>"&?,;:!'()\[\]{}]/g,Yg=/\p{Emoji_Modifier}|\p{Emoji_Modifier_Base}|\p{Emoji_Presentation}|\p{Extended_Pictographic}|[\u200D\uFE0E\uFE0F]/gu;function Xg(e){return e.trim().replace(qg,``)}function Zg(e){return e.trim().replace(Jg,``).replace(Yg,``).replace(/\s+/g,`-`)}function Qg(e,t){return e_(e,t).content}function $g(e,t){return e_(e,t).sourceLines}function e_(e,t){let n=e.split(`
276
+ `),r=[],i=[],a=0,o,s=0,c=0,l=!1;for(let e of n){a+=1;let n=e.trimStart();if(o!==void 0){r_(n,o,s)&&(o=void 0),r.push(e),i.push(a);continue}let u=!l&&n_(n);if(u){o=u.char,s=u.count,r.push(e),i.push(a);continue}let{visible:d,inComment:f}=t_(e,l),p=l||f;l=f;let m=!p&&(c>0?Ug:Hg).exec(e);if(m&&m[2]&&m[3]&&m[4]){let e=m[1]??``,n=m[2].length,o=t?.preserveOriginal?Xg(m[4]):Zg(m[4]);r.push(`${e}<h${n} id="${o}">`,`${e}${m[3]}`,`${e}</h${n}>`),i.push(a,a,a)}else c=Math.max(0,c+(d.match(Wg)?.length??0)-(d.match(Gg)?.length??0)),r.push(e),i.push(a)}return{content:r.join(`
277
+ `),sourceLines:i}}function t_(e,t){let n=e.replace(Kg,e=>` `.repeat(e.length)),r=``,i=0;for(;;){if(t){let n=e.indexOf(`*/`,i);if(n===-1)return{visible:r,inComment:t};i=n+2}let a=n.indexOf(`{/*`,i);if(a===-1)return{visible:r+e.slice(i),inComment:!1};r+=e.slice(i,a),i=a+3,t=!0}}function n_(e){let t=e[0];if(t!=="`"&&t!==`~`)return;let n=1;for(;n<e.length&&e[n]===t;)n++;if(!(n<3))return{char:t,count:n}}function r_(e,t,n){let r=0;for(;r<e.length&&e[r]===t;)r++;if(r<n)return!1;for(;r<e.length;r++)if(e[r]!==` `&&e[r]!==` `&&e[r]!==`\r`)return!1;return!0}const i_=/* @__PURE__ */ new Set([`loc`,`range`,`start`,`end`,`comments`,`leadingComments`,`trailingComments`]),a_=/* @__PURE__ */ new Set([`ArrowFunctionExpression`,`FunctionExpression`,`FunctionDeclaration`]);function o_(e,t){if(!R(e))return;let n=e.type;if(n===`Identifier`)typeof e.name==`string`&&t.add(e.name);else if(n===`AssignmentPattern`)o_(e.left,t);else if(n===`RestElement`)o_(e.argument,t);else if(n===`ObjectPattern`&&Array.isArray(e.properties))for(let n of e.properties)R(n)&&(n.type===`RestElement`?o_(n.argument,t):n.type===`Property`&&o_(n.value,t));else if(n===`ArrayPattern`&&Array.isArray(e.elements))for(let n of e.elements)o_(n,t)}function s_(e,t){for(let[n,r]of Object.entries(e))i_.has(n)||t(r)}function c_(e,t){if(Array.isArray(e))for(let n of e)c_(n,t);else if(R(e)&&typeof e.type==`string`&&!(a_.has(e.type)||e.type===`ClassBody`)){if(e.type===`VariableDeclaration`&&e.kind===`var`){let n=Array.isArray(e.declarations)?e.declarations:[];for(let e of n)R(e)&&o_(e.id,t)}s_(e,e=>c_(e,t))}}function l_(e){let t=/* @__PURE__ */ new Set;for(let n of e)if(R(n)){if(n.type===`VariableDeclaration`&&n.kind!==`var`){let e=Array.isArray(n.declarations)?n.declarations:[];for(let n of e)R(n)&&o_(n.id,t)}else(n.type===`FunctionDeclaration`||n.type===`ClassDeclaration`)&&R(n.id)&&typeof n.id.name==`string`&&t.add(n.id.name)}return t}function u_(e,t){let n=new Set(e);for(let e of t)n.add(e);return n}function d_(e){return typeof e==`string`&&!/^[a-z]/.test(e)&&!e.includes(`-`)}const f_=/* @__PURE__ */ new Set([`push`,`pop`,`shift`,`unshift`,`splice`,`sort`,`reverse`,`fill`,`copyWithin`,`set`,`add`,`delete`,`clear`,`__defineGetter__`,`__defineSetter__`]),p_=/* @__PURE__ */ new Set([`assign`,`defineProperty`,`defineProperties`,`setPrototypeOf`]),m_=/* @__PURE__ */ new Map([[`Object`,p_],[`Reflect`,/* @__PURE__ */ new Set([`set`,`defineProperty`,`deleteProperty`,`setPrototypeOf`])]]);function h_(e){return e===`constructor`||p_.has(e)}function g_(e){let t=e.property;if(R(t))return e.computed!==!0&&typeof t.name==`string`?t.name:t.type===`Literal`&&typeof t.value==`string`?t.value:void 0}const __=/* @__PURE__ */ new Set([`globalThis`,`window`,`self`,`global`]),v_=/* @__PURE__ */ new Set([`Object`,`Reflect`,`Function`,`eval`,...__]),y_=/* @__PURE__ */ new WeakSet;function b_(e,t){let n=R(t)&&t.type===`Literal`&&(typeof t.value==`string`||typeof t.value==`number`);return e.computed===!0&&!n}function x_(e){let t=N_(e);for(;R(t)&&t.type===`MemberExpression`;){if(b_(t,t.property))return!0;t=N_(t.object)}return!1}function S_(e,t){var n;if(R(e))switch(e.type){case`AssignmentPattern`:S_(e.left,t);return;case`RestElement`:S_(e.argument,t);return;case`ArrayPattern`:if(Array.isArray(e.elements))for(let n of e.elements)S_(n,t);return;case`ObjectPattern`:{let r=Array.isArray(e.properties)?e.properties:[];for(let e of r){if(!R(e))continue;if(e.type===`RestElement`){S_(e.argument,t);continue}let r=e.key,i=e.computed!==!0&&R(r)&&typeof r.name==`string`?r.name:R(r)&&r.type===`Literal`?String(r.value):void 0;(b_(e,r)||i!==void 0&&(h_(i)||v_.has(i)))&&((n=t.unknownWrite)==null||n.call(t)),S_(e.value,t)}return}default:return}}const C_=/* @__PURE__ */ new WeakSet;function w_(e){let t=e.callee;if(!R(t)||t.type!==`MemberExpression`)return;let n=t.object;g_(t)!==void 0&&R(n)&&n.type===`Identifier`&&typeof n.name==`string`&&m_.has(n.name)&&C_.add(n)}function T_(e){let t=e.callee;if(!R(t)||t.type!==`MemberExpression`)return;let n=g_(t);if(n===void 0)return;let r=t.object;if(R(r)&&r.type===`Identifier`&&typeof r.name==`string`){let t=m_.get(r.name);if(t!==void 0)return t.has(n)&&Array.isArray(e.arguments)?e.arguments[0]:void 0}return f_.has(n)?r:void 0}function E_(e,t,n){var r;R(e)&&typeof e.name==`string`&&!t.has(e.name)&&((e.name===`eval`||e.name===`Function`||__.has(e.name)&&!y_.has(e)||m_.has(e.name)&&!C_.has(e))&&((r=n.unknownWrite)==null||r.call(n)),n.reference(e))}function D_(e,t,n){if(R(e))switch(e.type){case`AssignmentPattern`:D_(e.left,t,n),X(e.right,t,n);return;case`RestElement`:D_(e.argument,t,n);return;case`ObjectPattern`:{let r=Array.isArray(e.properties)?e.properties:[];for(let e of r)R(e)&&(e.type===`RestElement`?D_(e.argument,t,n):(e.computed===!0&&X(e.key,t,n),D_(e.value,t,n)));return}case`ArrayPattern`:{let r=Array.isArray(e.elements)?e.elements:[];for(let e of r)D_(e,t,n);return}case`MemberExpression`:X(e,t,n);return;default:return}}function X(e,t,n){var r,i,a,o,s,c,l,u,d,f;if(Array.isArray(e)){for(let r of e)X(r,t,n);return}if(!R(e)||typeof e.type!=`string`)return;let p=e.type;if(a_.has(p)){if(n.eagerOnly===!0)return;let r=Array.isArray(e.params)?e.params:[],i=/* @__PURE__ */ new Set;for(let e of r)o_(e,i);p===`FunctionExpression`&&R(e.id)&&typeof e.id.name==`string`&&i.add(e.id.name);let a=u_(t,i);for(let e of r)S_(e,n),D_(e,a,n);let o=/* @__PURE__ */ new Set;c_(e.body,o);let s=e.body,c=R(s)&&Array.isArray(s.body)?s.body:void 0;if(c!==void 0)for(let e of l_(c))o.add(e);X(c??s,u_(a,o),n)}else switch(p){case`Identifier`:E_(e,t,n);return;case`AssignmentExpression`:(r=n.write)==null||r.call(n,e.left,t),S_(e.left,n),X(e.left,t,n),X(e.right,t,n);return;case`UpdateExpression`:(i=n.write)==null||i.call(n,e.argument,t),X(e.argument,t,n);return;case`UnaryExpression`:if(e.operator===`delete`){let r=N_(e.argument);R(r)&&r.type===`MemberExpression`&&((a=n.mutate)==null||a.call(n,r.object,t))}X(e.argument,t,n);return;case`CallExpression`:{let r=T_(e);r!==void 0&&((o=n.mutate)==null||o.call(n,r,t)),x_(e.callee)&&((s=n.unknownWrite)==null||s.call(n)),w_(e),s_(e,e=>X(e,t,n));return}case`NewExpression`:case`TaggedTemplateExpression`:x_(p===`NewExpression`?e.callee:e.tag)&&((c=n.unknownWrite)==null||c.call(n)),s_(e,e=>X(e,t,n));return;case`ClassDeclaration`:case`ClassExpression`:{X(e.superClass,t,n);let r=p===`ClassExpression`&&R(e.id)&&typeof e.id.name==`string`?[e.id.name]:[];X(e.body,u_(t,r),n);return}case`BlockStatement`:case`StaticBlock`:{let r=Array.isArray(e.body)?e.body:[];X(r,u_(t,l_(r)),n);return}case`SwitchStatement`:{X(e.discriminant,t,n);let r=Array.isArray(e.cases)?e.cases:[];X(r,u_(t,l_(r.flatMap(e=>R(e)&&Array.isArray(e.consequent)?e.consequent:[]))),n);return}case`ForStatement`:{let r=u_(t,l_([e.init]));s_(e,e=>X(e,r,n));return}case`ForInStatement`:case`ForOfStatement`:{let r=e.left,i=u_(t,l_([r]));X(e.right,t,n),R(r)&&r.type===`VariableDeclaration`?X(r,i,n):((l=n.write)==null||l.call(n,r,t),S_(r,n),X(r,t,n)),X(e.body,i,n);return}case`CatchClause`:{let r=/* @__PURE__ */ new Set;o_(e.param,r);let i=u_(t,r);S_(e.param,n),D_(e.param,i,n),X(e.body,i,n);return}case`VariableDeclarator`:S_(e.id,n),D_(e.id,t,n),X(e.init,t,n);return;case`MemberExpression`:{let r=g_(e),i=e.object,a=R(i)&&i.type===`Identifier`&&typeof i.name==`string`&&m_.has(i.name);r!==void 0&&h_(r)&&!a&&((u=n.unknownWrite)==null||u.call(n)),r!==void 0&&v_.has(r)&&((d=n.unknownWrite)==null||d.call(n)),r!==void 0&&!h_(r)&&R(i)&&i.type===`Identifier`&&typeof i.name==`string`&&__.has(i.name)&&y_.add(i),X(e.object,t,n),e.computed===!0&&X(e.property,t,n);return}case`Property`:case`PropertyDefinition`:case`MethodDefinition`:if(e.computed===!0&&X(e.key,t,n),n.eagerOnly===!0&&p===`PropertyDefinition`&&e.static!==!0)return;X(e.value,t,n);return;case`LabeledStatement`:X(e.body,t,n);return;case`WithStatement`:(f=n.unknownWrite)==null||f.call(n),X(e.object,t,n),X(e.body,t,n);return;case`JSXOpeningElement`:case`JSXClosingElement`:{let r=e.name;R(r)&&r.type===`JSXIdentifier`&&d_(r.name)?E_(r,t,n):R(r)&&r.type===`JSXMemberExpression`&&X(r,t,n),X(e.attributes,t,n);return}case`JSXMemberExpression`:{let r=e.object;R(r)&&r.type===`JSXIdentifier`?E_(r,t,n):X(r,t,n);return}case`JSXAttribute`:X(e.value,t,n);return;case`BreakStatement`:case`ContinueStatement`:case`MetaProperty`:case`JSXIdentifier`:case`JSXNamespacedName`:return;default:s_(e,e=>X(e,t,n))}}function O_(e,t=!1){let n=/* @__PURE__ */ new Set;return X(e,/* @__PURE__ */ new Set,{reference:e=>{typeof e.name==`string`&&n.add(e.name)},eagerOnly:t}),n}const k_=/* @__PURE__ */ new Set([`ParenthesizedExpression`,`TSAsExpression`,`TSSatisfiesExpression`,`TSNonNullExpression`,`TSTypeAssertion`,`ChainExpression`]);function A_(e){let t=e.property;if(R(t)){if(e.computed!==!0)return typeof t.name==`string`?t.name:void 0;if(t.type===`Literal`&&(typeof t.value==`string`||typeof t.value==`number`))return String(t.value)}}function j_(e){if(e.computed===!0){let t=e.key;return R(t)&&t.type===`Literal`&&(typeof t.value==`string`||typeof t.value==`number`)?String(t.value):void 0}let t=e.key;if(R(t)&&typeof t.name==`string`)return t.name;if(R(t)&&t.type===`Literal`&&typeof t.value==`string`)return t.value}function M_(e,t){let n=A_(t);if(n===void 0)return`unknown`;let r=N_(e);if(!R(r))return`unknown`;if(r.type===`ObjectExpression`){let e=Array.isArray(r.properties)?r.properties:[],t=`contained`;for(let r of e){if(!R(r))continue;if(r.type===`SpreadElement`){t=`unknown`;continue}if(r.type!==`Property`)continue;let e=j_(r);e===void 0?t=`unknown`:e===n&&(t=r.value)}return t}if(r.type===`ArrayExpression`){if(!/^\d+$/.test(n))return`contained`;let e=Number(n),t=Array.isArray(r.elements)?r.elements:[],i=0;for(let n of t){if(R(n)&&n.type===`SpreadElement`)return`unknown`;if(i===e)return n??`contained`;i+=1}return`contained`}return`unknown`}function N_(e){let t=e;for(;R(t)&&typeof t.type==`string`&&k_.has(t.type);)t=t.expression;return t}function P_(e,t){if(Array.isArray(e))for(let n of e)P_(n,t);else if(R(e)&&typeof e.type==`string`){if(a_.has(e.type)&&Array.isArray(e.params))for(let n of e.params)o_(n,t);if(e.type===`CatchClause`&&o_(e.param,t),e.type===`VariableDeclarator`&&e.init==null&&o_(e.id,t),(e.type===`ForOfStatement`||e.type===`ForInStatement`)&&R(e.left)){let n=e.left;if(n.type===`VariableDeclaration`&&Array.isArray(n.declarations))for(let e of n.declarations)R(e)&&o_(e.id,t)}s_(e,e=>P_(e,t))}}function F_(e,t){if(Array.isArray(e)){for(let n of e)F_(n,t);return}if(!R(e))return;let n=(e,n)=>{let r=/* @__PURE__ */ new Set;o_(e,r);let i=O_(n);for(let e of r){let n=t.get(e)??/* @__PURE__ */ new Set;for(let e of i)n.add(e);t.set(e,n)}};e.type===`VariableDeclarator`&&n(e.id,e.init),e.type===`AssignmentExpression`&&n(N_(e.left),e.right),s_(e,e=>F_(e,t))}const I_=/* @__PURE__ */ new Set([`CallExpression`,`NewExpression`,`TaggedTemplateExpression`]);function L_(e,t){let n=N_(e);if(!R(n))return!1;switch(n.type){case`Identifier`:return typeof n.name==`string`&&t.has(n.name);case`MemberExpression`:return b_(n,n.property)||L_(n.object,t);case`LogicalExpression`:return L_(n.left,t)||L_(n.right,t);case`ConditionalExpression`:return L_(n.consequent,t)||L_(n.alternate,t);case`SequenceExpression`:{let e=Array.isArray(n.expressions)?n.expressions:[];return L_(e[e.length-1],t)}case`AwaitExpression`:case`SpreadElement`:return L_(n.argument,t);case`ArrayExpression`:return Array.isArray(n.elements)?n.elements.some(e=>L_(e,t)):!1;case`ObjectExpression`:return Array.isArray(n.properties)?n.properties.some(e=>R(e)&&L_(e.type===`SpreadElement`?e:e.value,t)):!1;default:return!1}}function R_(e,t){if(Array.isArray(e))for(let n of e)R_(n,t);else R(e)&&(e.type===`VariableDeclarator`&&L_(e.init,t)&&o_(e.id,t),e.type===`AssignmentExpression`&&L_(e.right,t)&&o_(N_(e.left),t),s_(e,e=>R_(e,t)))}const z_=/* @__PURE__ */ new Set([`apply`,`construct`]);function B_(e,t,n){if(Array.isArray(e))return e.some(e=>B_(e,t,n));if(!R(e)||typeof e.type!=`string`||n&&a_.has(e.type))return!1;if(I_.has(e.type)){let n=e.type===`TaggedTemplateExpression`?e.tag:e.callee;if(L_(n,t))return!0;let r=N_(n),i=Array.isArray(e.arguments)?e.arguments:[];if(R(r)&&r.type===`MemberExpression`&&R(r.object)&&r.object.type===`Identifier`&&r.object.name===`Reflect`&&z_.has(g_(r)??``)&&L_(i[0],t))return!0}let r=!1;return s_(e,e=>{r||=B_(e,t,n)}),r}function V_(e){if(Array.isArray(e))return e.some(V_);if(!R(e)||typeof e.type!=`string`||a_.has(e.type))return!1;if(I_.has(e.type))return!0;if(e.type===`PropertyDefinition`&&e.static!==!0)return e.computed===!0&&V_(e.key);let t=!1;return s_(e,e=>{t||=V_(e)}),t}function H_(e,t=!1){let n={reassigned:/* @__PURE__ */ new Set,mutated:/* @__PURE__ */ new Set},r=/* @__PURE__ */ new Map;F_(e,r);let i=/* @__PURE__ */ new Set;P_(e,i);let a=/* @__PURE__ */ new Set,o=-1;for(;a.size!==o;)o=a.size,R_(e,a);B_(e,a,t)&&n.mutated.add(`*`);let s=(e,t,a)=>{if(!t.has(e)){n.mutated.add(e);return}if(a.has(e))return;a.add(e);let o=r.get(e);if(o===void 0||i.has(e))n.mutated.add(`*`);else for(let e of o)s(e,/* @__PURE__ */ new Set,a)},c=(e,t)=>{let r=[],i=N_(e);for(;R(i)&&i.type===`MemberExpression`;)r.push(i),i=N_(i.object);if(R(i)){if(i.type===`ObjectExpression`||i.type===`ArrayExpression`){let e=i;for(let i=r.length-1;i>=0;--i){let a=r[i];if(a===void 0)return;let o=M_(e,a);if(o===`contained`)return;if(o===`unknown`){n.mutated.add(`*`);return}e=o;let s=N_(e);if(!R(s)||s.type!==`ObjectExpression`&&s.type!==`ArrayExpression`){c(e,t);return}e=s}}else switch(i.type){case`Identifier`:typeof i.name==`string`&&s(i.name,t,/* @__PURE__ */ new Set);return;case`ConditionalExpression`:c(i.consequent,t),c(i.alternate,t);return;case`LogicalExpression`:c(i.left,t),c(i.right,t);return;case`SequenceExpression`:{let e=Array.isArray(i.expressions)?i.expressions:[];c(e[e.length-1],t);return}case`ThisExpression`:case`ObjectExpression`:case`ArrayExpression`:case`NewExpression`:case`Literal`:case`TemplateLiteral`:return;default:n.mutated.add(`*`)}}},l=(e,t)=>{let r=N_(e);if(R(r))switch(r.type){case`Identifier`:typeof r.name==`string`&&!t.has(r.name)&&n.reassigned.add(r.name);return;case`MemberExpression`:c(r.object,t);return;case`AssignmentPattern`:l(r.left,t);return;case`RestElement`:l(r.argument,t);return;case`ObjectPattern`:{let e=Array.isArray(r.properties)?r.properties:[];for(let n of e)R(n)&&l(n.type===`RestElement`?n.argument:n.value,t);return}case`ArrayPattern`:{let e=Array.isArray(r.elements)?r.elements:[];for(let n of e)l(n,t);return}default:return}};return X(e,/* @__PURE__ */ new Set,{reference:()=>void 0,write:l,mutate:c,unknownWrite:()=>{n.mutated.add(`*`)},eagerOnly:t}),n}function U_(e,t=/* @__PURE__ */ new Set){if(Array.isArray(e)){for(let n of e)U_(n,t);return t}if(!R(e))return t;if(e.type===`VariableDeclarator`&&o_(e.id,t),(e.type===`FunctionDeclaration`||e.type===`ClassDeclaration`)&&R(e.id)&&typeof e.id.name==`string`&&t.add(e.id.name),Array.isArray(e.params))for(let n of e.params)o_(n,t);return e.type===`CatchClause`&&o_(e.param,t),(e.type===`ImportSpecifier`||e.type===`ImportDefaultSpecifier`||e.type===`ImportNamespaceSpecifier`)&&R(e.local)&&typeof e.local.name==`string`&&t.add(e.local.name),s_(e,e=>U_(e,t)),t}function W_(e){return R(e)&&typeof e.type==`string`?e.type:void 0}function G_(e){return R(e)}const K_=/* @__PURE__ */ new WeakMap;function q_(e){if(typeof e==`string`)return 1+e.length;if(typeof e!=`object`||!e)return 1;let t=K_.get(e);if(t!==void 0)return t;let n=1;if(Array.isArray(e)){for(let t of e)if(n+=q_(t),n>1e5)break}else for(let[t,r]of Object.entries(e))if(n+=t.length+q_(r),n>1e5)break;return K_.set(e,n),n}function J_(e){return q_(e)>1e5?Z:{ok:!0,value:e}}function Y_(e){return e==null||typeof e==`boolean`||typeof e==`number`}function X_(e){return Object.is(e,-0)?`-0`:Number.isNaN(e)?`0/0`:Number.isFinite(e)?JSON.stringify(e):e>0?`1e999`:`-1e999`}function Z_(e){return e===void 0?`void 0`:e===null?`null`:typeof e==`number`?X_(e):typeof e==`string`||typeof e==`boolean`?JSON.stringify(e):Array.isArray(e)?`[${e.map(e=>Z_(e)).join(`,`)}]`:`{${Object.entries(e).map(([e,t])=>`${e===`__proto__`?`["__proto__"]`:JSON.stringify(e)}:${Z_(t)}`).join(`,`)}}`}function Q_(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:!0,writable:!0,configurable:!0})}function $_(e){if(W_(e)===`Identifier`&&R(e)&&typeof e.name==`string`)return e.name}function ev(e){return typeof e!=`object`||!e}const Z={ok:!1};function tv(e,t){if(e!==void 0){if(e===t.propsObjectName)return t.failedProps;if(e===t.restName)return t.restFailedProps}}function nv(e){return e==null}function rv(e){return typeof e==`object`&&!!e}function iv(e,t){return e===t?!0:nv(e)||nv(t)?nv(e)&&nv(t):rv(e)||rv(t)?rv(e)&&rv(t)?!1:void 0:typeof e==`boolean`||typeof t==`boolean`?Number(e)===Number(t):typeof e==`number`&&typeof t==`string`?e===Number(t):typeof e==`string`&&typeof t==`number`&&Number(e)===t}function av(e,t){if(!t.scope.has(e))return Z;let n=t.scope.get(e);return{ok:!0,value:n===void 0?void 0:n}}function ov(e,t){if(e.computed===!0){let n=uv(e.key,t);return n.ok&&typeof n.value==`string`?n.value:void 0}let n=$_(e.key);if(n!==void 0)return n;if(W_(e.key)===`Literal`&&R(e.key)&&typeof e.key.value==`string`)return e.key.value}function sv(e,t){return Array.isArray(e)?typeof t!=`number`||!Number.isInteger(t)||t<0?Z:t>=e.length?{ok:!0,value:void 0}:{ok:!0,value:e[t]}:!G_(e)||typeof t!=`string`?Z:{ok:!0,value:Object.hasOwn(e,t)?e[t]:void 0}}function cv(e,t){let n=/* @__PURE__ */ new Set;o_(e,n);for(let e of n)t.scope.delete(e)}function lv(e,t,n){let r=W_(e);if(r===`Identifier`){let r=$_(e);r!==void 0&&n.scope.set(r,t)}else if(r===`AssignmentPattern`&&R(e)){let r=t===void 0?uv(e.right,n):{ok:!0,value:t};r.ok?lv(e.left,r.value,n):cv(e.left,n)}else if(r===`ObjectPattern`&&R(e)&&Array.isArray(e.properties)){if(!G_(t)){cv(e,n);return}let r=Object.assign({},t),i=!0;for(let a of e.properties){if(W_(a)===`RestElement`&&R(a)){i?lv(a.argument,r,n):cv(a.argument,n);continue}if(W_(a)!==`Property`||!R(a))continue;let e=ov(a,n);e===void 0?(i=!1,cv(a.value,n)):(delete r[e],lv(a.value,Object.hasOwn(t,e)?t[e]:void 0,n))}}else if(r===`ArrayPattern`&&R(e)&&Array.isArray(e.elements)){if(!Array.isArray(t)){cv(e,n);return}for(let r=0;r<e.elements.length;r++){let i=e.elements[r];if(i!=null){if(W_(i)===`RestElement`&&R(i)){lv(i.argument,t.slice(r),n);break}lv(i,r<t.length?t[r]:void 0,n)}}}}function uv(e,t){if(!R(e))return Z;switch(e.type){case`Literal`:{let t=e.value;return typeof t==`string`||typeof t==`number`||typeof t==`boolean`||t===null?{ok:!0,value:t}:Z}case`Identifier`:return typeof e.name==`string`?e.name===`undefined`&&!t.scope.has(`undefined`)?{ok:!0,value:void 0}:(tv(e.name,t)?.size??0)>0?Z:av(e.name,t):Z;case`ParenthesizedExpression`:return uv(e.expression,t);case`MemberExpression`:{if(gv(e.object,t))return Z;let n=e.property,r=e.computed===!0?uv(n,t):{ok:!0,value:$_(n)};if(!r.ok||r.value===void 0)return Z;let i=$_(e.object),a=tv(i,t);if(a!==void 0&&i!==void 0){if(typeof r.value==`string`&&a.has(r.value))return Z;let e=av(i,t);return e.ok?sv(e.value,r.value):Z}let o=uv(e.object,t);return o.ok?sv(o.value,r.value):Z}case`ObjectExpression`:{if(!Array.isArray(e.properties))return Z;let n={};for(let r of e.properties){if(!R(r))return Z;if(r.type===`SpreadElement`){let e=uv(r.argument,t);if(!e.ok)return Z;if(Y_(e.value))continue;if(!G_(e.value))return Z;for(let[t,r]of Object.entries(e.value))Q_(n,t,r);continue}if(r.type!==`Property`)return Z;let e=ov(r,t);if(e===void 0||e===`__proto__`&&r.computed!==!0&&r.shorthand!==!0)return Z;let i=uv(r.value,t);if(!i.ok)return Z;Q_(n,e,i.value)}return J_(n)}case`ArrayExpression`:{if(!Array.isArray(e.elements))return Z;let n=[];for(let r of e.elements){if(r===null)return Z;if(R(r)&&r.type===`SpreadElement`){let e=uv(r.argument,t);if(!e.ok||!Array.isArray(e.value)||n.length+e.value.length>1e5)return Z;for(let t of e.value)n.push(t);continue}let e=uv(r,t);if(!e.ok)return Z;n.push(e.value)}return J_(n)}case`TemplateLiteral`:{let n=Array.isArray(e.quasis)?e.quasis:[],r=Array.isArray(e.expressions)?e.expressions:[],i=``;for(let e=0;e<n.length;e++){let a=n[e],o=R(a)&&R(a.value)&&typeof a.value.cooked==`string`?a.value.cooked:``;if(i+=o,e<r.length){let n=uv(r[e],t);if(!n.ok||typeof n.value==`object`&&n.value!==null)return Z;i+=String(n.value)}if(i.length>1e5)return Z}return{ok:!0,value:i}}case`BinaryExpression`:{let n=uv(e.left,t),r=uv(e.right,t);if(!n.ok||!r.ok)return Z;switch(e.operator){case`+`:if(rv(n.value)||rv(r.value))return Z;if(typeof n.value==`string`||typeof r.value==`string`){let e=`${String(n.value)}${String(r.value)}`;return e.length>1e5?Z:{ok:!0,value:e}}if(typeof n.value==`number`&&typeof r.value==`number`){let e=n.value+r.value;return Number.isNaN(e)?Z:{ok:!0,value:e}}return Z;case`===`:return{ok:!0,value:n.value===r.value};case`!==`:return{ok:!0,value:n.value!==r.value};case`==`:case`!=`:{let t=iv(n.value,r.value);return t===void 0?Z:{ok:!0,value:e.operator===`==`?t:!t}}default:return Z}}case`LogicalExpression`:{let n=uv(e.left,t);if(!n.ok)return Z;let r=!!n.value;return e.operator===`&&`?r?uv(e.right,t):n:e.operator===`||`?r?n:uv(e.right,t):e.operator===`??`?n.value===null||n.value===void 0?uv(e.right,t):n:Z}case`ConditionalExpression`:{let n=uv(e.test,t);return n.ok?uv(n.value?e.consequent:e.alternate,t):Z}case`CallExpression`:return mv(e,t);case`UnaryExpression`:{if(e.operator===`typeof`)return vv(e.argument,t);let n=uv(e.argument,t);if(!n.ok)return Z;if(e.operator===`void`)return{ok:!0,value:void 0};if(e.operator===`!`)return{ok:!0,value:!n.value};if(e.operator===`-`||e.operator===`+`){if(typeof n.value==`object`&&n.value!==null)return Z;let t=e.operator===`-`?-Number(n.value):Number(n.value);return Number.isNaN(t)?Z:{ok:!0,value:t}}return Z}default:return Z}}function dv(e){return e===void 0||typeof e==`number`&&Number.isFinite(e)}function fv(e,t,n){let[r,i]=n,a=typeof r==`string`?r:void 0;switch(t){case`startsWith`:case`endsWith`:case`includes`:case`indexOf`:case`lastIndexOf`:return a===void 0||!dv(i)?Z:{ok:!0,value:e[t](a,i)};case`slice`:case`substring`:return!dv(r)||!dv(i)?Z:{ok:!0,value:e[t](r??0,i)};case`at`:case`charAt`:return dv(r)?{ok:!0,value:t===`at`?e.at(r??0):e.charAt(r??0)}:Z;case`toLowerCase`:case`toUpperCase`:case`trim`:case`trimStart`:case`trimEnd`:return n.length===0?{ok:!0,value:e[t]()}:Z;case`replace`:case`replaceAll`:{if(a===void 0||typeof i!=`string`||i.includes(`$`))return Z;let n=a===``?t===`replaceAll`?e.length+1:1:t===`replaceAll`?e.split(a).length-1:Number(e.includes(a));return e.length+n*(i.length-a.length)>1e5?Z:{ok:!0,value:e[t](a,i)}}case`split`:return a===void 0||!dv(i)?Z:J_(e.split(a,i));case`padStart`:case`padEnd`:return typeof r!=`number`||r>1e5||i!==void 0&&typeof i!=`string`?Z:{ok:!0,value:e[t](r,i)};case`repeat`:return typeof r!=`number`||r<0||e.length*r>1e5?Z:{ok:!0,value:e.repeat(r)};case`concat`:{if(!n.every(e=>typeof e==`string`||typeof e==`number`))return Z;let t=n.map(String);return t.reduce((e,t)=>e+t.length,e.length)>1e5?Z:{ok:!0,value:e.concat(...t)}}default:return Z}}function pv(e,t,n){let[r,i]=n;switch(t){case`join`:{if(r!==void 0&&typeof r!=`string`||!e.every(e=>typeof e!=`object`||!e))return Z;let t=e.map(e=>e==null?``:String(e)),n=r??`,`;return t.reduce((e,t)=>e+t.length,0)+n.length*Math.max(t.length-1,0)>1e5?Z:{ok:!0,value:t.join(n)}}case`includes`:case`indexOf`:return typeof r==`object`&&r||!dv(i)?Z:{ok:!0,value:e[t](r,i)};case`slice`:return!dv(r)||!dv(i)?Z:{ok:!0,value:e.slice(r,i)};case`at`:return dv(r)?{ok:!0,value:e.at(r??0)}:Z;default:return Z}}function mv(e,t){let n=e.callee;if(W_(n)!==`MemberExpression`||!R(n)||n.optional===!0)return Z;let r=n.computed===!0?R(n.property)&&typeof n.property.value==`string`?n.property.value:void 0:$_(n.property);if(r===void 0||gv(n.object,t))return Z;let i=uv(n.object,t);if(!i.ok)return Z;let a=Array.isArray(e.arguments)?e.arguments:[],o=[];for(let e of a){if(W_(e)===`SpreadElement`)return Z;let n=uv(e,t);if(!n.ok)return Z;o.push(n.value)}try{if(typeof i.value==`string`)return fv(i.value,r,o);if(Array.isArray(i.value))return pv(i.value,r,o)}catch{return Z}return Z}const hv=/* @__PURE__ */ new Set([`window`,`document`,`navigator`,`location`,`history`,`localStorage`,`sessionStorage`,`matchMedia`,`requestAnimationFrame`]);function gv(e,t){if(t.markdownChildren!==!0||!R(e))return!1;if(e.type===`Identifier`)return e.name===t.childrenName&&!(t.failedProps?.has(`children`)??!1);if(e.type!==`MemberExpression`)return!1;let n=$_(e.object);return _v(e)===`children`&&n!==void 0&&(n===t.propsObjectName||n===t.restName)}function _v(e){if(e.computed!==!0)return $_(e.property);let t=e.property;return R(t)&&t.type===`Literal`&&typeof t.value==`string`?t.value:void 0}function vv(e,t){if(gv(e,t))return Z;if(W_(e)===`Identifier`&&R(e)&&typeof e.name==`string`&&hv.has(e.name)&&!t.scope.has(e.name)&&t.declaredNames!==void 0&&!t.declaredNames.has(e.name))return{ok:!0,value:`undefined`};let n=uv(e,t);if(!n.ok)return Z;let r=n.value;return{ok:!0,value:r===null?`object`:typeof r}}function yv(e){let t=W_(e);return t===`ArrowFunctionExpression`||t===`FunctionExpression`||t===`FunctionDeclaration`}function bv(e){if(e.type!==`mdxjsEsm`)return[];let t=e.data?.estree;return!R(t)||!Array.isArray(t.body)?[]:t.body}function xv(e,t){if(Array.isArray(e))for(let n of e)xv(n,t);else if(R(e)){R(e.data)&&e.data.estree!==void 0&&t.push(e.data.estree);for(let[n,r]of Object.entries(e))n!==`data`&&n!==`position`&&xv(r,t)}}function Sv(e){for(let[t,n]of e)typeof n==`object`&&n&&e.delete(t)}function Cv(e,t){let{reassigned:n,mutated:r}=H_(e,!0);return n.size>0||r.size>0||t&&V_(e)}function wv(e){let t=/* @__PURE__ */ new Map,n=/* @__PURE__ */ new Map,r=/* @__PURE__ */ new Map,i=[],a=e.children.flatMap(bv),o=(e,n)=>{let r=Array.isArray(n.params)?n.params:[];t.set(e,{params:r,body:n.body})},s=(e,t)=>{if(W_(e)!==`VariableDeclarator`||!R(e))return;Cv(e,f)&&Sv(n);let i=e.init,a=$_(e.id);if(a!==void 0&&yv(i)&&R(i)){o(a,i);return}if(t!==`const`)return;let s=uv(i,{scope:r,declaredNames:l});if(s.ok){let t=new Map(r);lv(e.id,s.value,{scope:t});let n=/* @__PURE__ */ new Set;o_(e.id,n);for(let e of n){if(!t.has(e))continue;let n=t.get(e),i=n===void 0?void 0:n;ev(i)&&r.set(e,i)}}let c=uv(i,{scope:n,declaredNames:l});c.ok&&lv(e.id,c.value,{scope:n})},c=[];xv(e,c);let l=U_(c),{reassigned:u,mutated:d}=H_(c),f=u.size>0||d.size>0;for(let e of a)if(R(e)){if(!(e.type===`VariableDeclaration`||e.type===`ExportNamedDeclaration`&&R(e.declaration)&&e.declaration.type===`VariableDeclaration`)&&Cv(e,f)&&Sv(n),e.type===`VariableDeclaration`){let t=Array.isArray(e.declarations)?e.declarations:[];for(let n of t)s(n,e.kind)}else if(e.type===`FunctionDeclaration`){let t=e.id;W_(t)===`Identifier`&&R(t)&&typeof t.name==`string`&&o(t.name,e)}else{if(e.type===`ExportNamedDeclaration`){let t=e.declaration;if(W_(t)===`VariableDeclaration`&&R(t)){let e=Array.isArray(t.declarations)?t.declarations:[];for(let n of e)s(n,t.kind)}if(W_(t)===`FunctionDeclaration`&&R(t)){let e=t.id;W_(e)===`Identifier`&&R(e)&&typeof e.name==`string`&&o(e.name,t)}if(e.source!=null)continue;let n=Array.isArray(e.specifiers)?e.specifiers:[];for(let e of n){if(W_(e)!==`ExportSpecifier`||!R(e))continue;let t=e.local,n=e.exported;R(t)&&typeof t.name==`string`&&R(n)&&typeof n.name==`string`&&i.push([t.name,n.name])}}if(e.type===`ExportDefaultDeclaration`){let t=e.declaration;if(yv(t)&&R(t)){let e=t.id;W_(e)===`Identifier`&&R(e)&&typeof e.name==`string`&&o(e.name,t)}}}}for(let e of u)n.delete(e),r.delete(e),t.delete(e);d.size>0&&Sv(n);let p=!0;for(;p;){p=!1;for(let[e,a]of i){let i=t.get(e);if(i&&!t.has(a)&&(t.set(a,i),p=!0),n.has(e)&&!n.has(a)){let t=n.get(e);n.set(a,t===void 0?void 0:t),p=!0}if(r.has(e)&&!r.has(a)){let t=r.get(e);r.set(a,t===void 0?void 0:t),p=!0}}}return{defs:t,moduleScope:n,literalScope:r,declaredNames:l}}`${Math.random().toString(36).slice(2)}${Math.random().toString(36).slice(2)}`;function Tv(e){if(!R(e)||!Array.isArray(e.body))return;let[t]=e.body;if(W_(t)===`ExpressionStatement`&&R(t))return t.expression}const Ev=e=>[...new Set(e.map(e=>e.trim()))],Dv=e=>e.every(e=>typeof e==`string`),Ov=e=>Array.isArray(e)?e:[e];function kv(e){if(Array.isArray(e)){if(e.length===0||!ua(e)||!Dv(e))return;let t=Ev(e);return ua(t)?t:void 0}let t=[e];if(!ua(t)||Dv(t))return;let[n]=t.map(({includes:e,excludes:t})=>Object.assign(Object.assign({},e&&{includes:Ev(e)}),t&&{excludes:Ev(t)}));return n&&ua([n])?n:void 0}function Av(e){if(!R(e)||Object.keys(e).length!==1)return;let t=kv(e.groups);return t&&{groups:t}}function jv(e){return(e.type===`mdxJsxFlowElement`||e.type===`mdxJsxTextElement`)&&e.name===`Visibility`}const Mv=[`humans`,`agents`,`signed-in`,`signed-out`];function Nv(e){return Mv.some(t=>t===e)}function Pv(e){let t=(e.data?.estree)?.body[0];return t?.type===`ExpressionStatement`?t.expression:void 0}function Fv(e){switch(e?.type){case`Literal`:return typeof e.value==`string`?e.value:void 0;case`TemplateLiteral`:{let t=e.quasis[0]?.value.cooked??void 0;for(let[n,r]of e.expressions.entries()){let i=Fv(r),a=e.quasis[n+1]?.value.cooked;if(t===void 0||i===void 0||a==null)return;t+=i+a}return t}case`BinaryExpression`:{if(e.operator!==`+`)return;let t=Fv(e.left),n=Fv(e.right);return t===void 0||n===void 0?void 0:t+n}default:return}}function Iv(e){if(!(e.type!==`Property`||e.computed))return e.key.type===`Identifier`?e.key.name:e.key.type===`Literal`&&typeof e.key.value==`string`?e.key.value:void 0}function Lv(e){let t=e.elements.map(e=>Fv(e));return t.every(e=>e!==void 0)?t:void 0}function Rv(e){let t={};for(let n of e.properties){let e=Iv(n);if(n.type!==`Property`||e!==`includes`&&e!==`excludes`)return;let r=n.value.type===`ArrayExpression`?Lv(n.value):void 0;if(!r)return;t[e]=r}return t}function zv(e){let t=Pv(e);if(t?.type!==`ObjectExpression`||t.properties.length!==1)return;let[n]=t.properties;if(n?.type===`Property`&&Iv(n)===`groups`)return n.value.type===`ObjectExpression`?kv(Rv(n.value)):n.value.type===`ArrayExpression`?kv(Lv(n.value)):void 0}function Bv(e){if(e.type!==`mdxJsxExpressionAttribute`)return!1;let t=Pv(e),n=t?.type===`ObjectExpression`&&t.properties.length===1?t.properties[0]:void 0;return n?.type!==`SpreadElement`||n.argument.type!==`ObjectExpression`||n.argument.properties.some(e=>{if(e.type!==`Property`||e.computed)return!0;let t=e.key.type===`Identifier`?e.key.name:void 0,n=e.key.type===`Literal`?e.key.value:void 0;return(t??n)===`for`})}function Vv(e,t=/* @__PURE__ */ new Map,n){let r,i=!1,a=e.attributes.findLastIndex(e=>e.type===`mdxJsxAttribute`&&e.name===`for`);if(e.attributes.slice(a+1).some(Bv))return{kind:`dynamic`};for(let o of a===-1?[]:e.attributes.slice(a,a+1))if(o.type===`mdxJsxAttribute`&&o.name===`for`){if(typeof o.value==`string`){if(Nv(o.value))return{kind:`audience`,audience:o.value};r??=o.value}else if(o.value&&typeof o.value==`object`){if(`value`in o.value&&typeof o.value.value==`string`){let e=o.value.value.trim(),t=Fv(Pv(o.value));if(t!==void 0){if(Nv(t))return{kind:`audience`,audience:t};r??=t;continue}let n=e.match(/^(["'`])((?:\\.|(?!\1)[^\\])*)\1$/);if(n){let e=n[2]??``;if(!(n[1]==="`"&&e.includes("${"))){if(Nv(e))return{kind:`audience`,audience:e};r??=e;continue}}let i=zv(o.value);if(i)return{kind:`groups`,groups:i};if(Pv(o.value)?.type===`ObjectExpression`||e.startsWith(`{`)){r??=e;continue}}let e=Tv(`data`in o.value?o.value.data?.estree:void 0),a=uv(e,{scope:t});if(a.ok){let t=a.value;if(Nv(t)){let r={kind:`audience`,audience:t};if(n===void 0||Uv(r))return r;let a=uv(e,{scope:n});if(a.ok&&a.value===t)return r;i=!0;continue}let o=Av(t);if(o)return{kind:`groups`,groups:o.groups};if(typeof t==`string`){r??=t;continue}}i=!0}}return r===void 0?i?{kind:`dynamic`}:{kind:`missing`}:{kind:`invalid`,raw:r}}function Hv(e){switch(e.kind){case`audience`:return e.audience===`agents`;case`groups`:return!1;case`invalid`:case`missing`:return!0;case`dynamic`:return!1}}function Uv(e){switch(e.kind){case`audience`:return e.audience===`humans`||e.audience===`signed-in`;case`groups`:case`invalid`:case`dynamic`:case`missing`:return!0}}function Wv(e){if(e.kind===`groups`)return{groups:e.groups};if(e.kind===`audience`&&(e.audience===`signed-in`||e.audience===`signed-out`))return e.audience}const Gv=(e,t)=>({type:`mdxJsxAttribute`,name:e,value:t});function Kv(e,t){let n=e.data,r=n&&`mintlifyTitleMarkdown`in n?n.mintlifyTitleMarkdown:void 0;return r&&typeof r==`object`&&`text`in r&&typeof r.text==`string`?r.text:t}const qv=[],Jv=(e,t=1,n=qv)=>{if(`name`in e&&e.name===`Update`)return e.attributes.find(e=>`name`in e&&e.name===`label`&&typeof e.value==`string`)?.value??``;if(jv(e)){let t=Vv(e);if(!(t.kind===`dynamic`||t.kind===`audience`&&t.audience===`humans`))return``}let r=n[t-1],i=e.type===`text`,a=e.type===`inlineCode`,o=r?.type!==`mdxJsxFlowElement`,s=r&&`value`in r&&typeof r.value==`string`&&!r.value.startsWith(`<small`);if(a||i&&(o||s))return e.value;if(`children`in e&&Array.isArray(e.children)){let t=``;return e.children.forEach((e,n,r)=>{t+=Jv(e,n,r)}),t}return``},Yv=[`animate`,`animateMotion`,`animateTransform`,`mpath`,`set`],Xv=e=>e.type===`mdxjsEsm`;function Zv(e){return e.data?.estree!=null}const Qv=e=>e.type===`ImportDeclaration`,$v=e=>[`ExportAllDeclaration`,`ExportDefaultDeclaration`,`ExportNamedDeclaration`].includes(e),ey=e=>e.type===`mdxJsxFlowElement`,ty=e=>e instanceof Object&&`type`in e&&(e.type===`mdxJsxFlowElement`||e.type===`mdxJsxTextElement`),ny=e=>ey(e)&&e.name==null,ry=(e,t)=>`${e}_${t}`,iy=[`ApiPlayground`,`Accordion`,`AccordionGroup`,`Badge`,`Callout`,`CodeGroup`,`CodeBlock`,`Color`,`Color.Row`,`Color.Item`,`CustomCode`,`CustomComponent`,`DynamicCustomComponent`,`Danger`,`Tile`,`Tree`,`Tree.Folder`,`Tree.File`,`FileTree`,`SnippetGroup`,`Panel`,`RequestExample`,`ResponseExample`,`Param`,`ParamField`,`Prompt`,`Card`,`CardGroup`,`Columns`,`Column`,`Expandable`,`Frame`,`GitHub`,`GitHub.Repo`,`Github`,`Github.Repo`,`Heading`,`Info`,`Icon`,`MDX`,`Link`,`MDXContentController`,`ResponseField`,`Warning`,`Note`,`Tip`,`Check`,`Tabs`,`Tab`,`Tooltip`,`Latex`,`Step`,`Steps`,`Update`,`a`,`b`,`br`,`button`,`clipPath`,`col`,`colgroup`,`defs`,`div`,`form`,`g`,`h1`,`h2`,`h3`,`h4`,`head`,`hr`,`iframe`,`img`,`input`,`label`,`li`,`link`,`ol`,`p`,`path`,`picture`,`rect`,`script`,`section`,`source`,`span`,`sub`,`sup`,`u`,`svg`,...Yv,`table`,`tbody`,`td`,`th`,`thead`,`tr`,`ul`,`video`,`code`,`kbd`,`pre`,`ZoomImage`,`OptimizedVideo`,`Mermaid`,`Variation`,`Visibility`,`View`,`zapier-zap-templates`],ay=(e,t)=>{let n=e.position?.start.offset,r=e.position?.end.offset;return n===void 0||r===void 0?!1:!t.startsWith(`$$`,n)&&/^\d/.test(e.value)&&/\d/.test(t[r]??``)},oy=(e,t)=>{Da(e,`inlineMath`,(e,n,r)=>{if(r&&n!==void 0&&ay(e,t))return r.children.splice(n,1,{type:`text`,value:`$${e.value}$`}),[wa,n]})};Object.freeze({status:`aborted`});/* @__NO_SIDE_EFFECTS__ */
278
+ function Q(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:o,traits:/* @__PURE__ */ new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}var sy=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},cy=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};const ly={};function uy(e){return e&&Object.assign(ly,e),ly}function dy(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 fy(e,t){return typeof t==`bigint`?t.toString():t}function py(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function my(e){return e==null}function hy(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function gy(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=t.toString(),i=(r.split(`.`)[1]||``).length;if(i===0&&/\d?e-\d?/.test(r)){let e=r.match(/\d?e-(\d?)/);e?.[1]&&(i=Number.parseInt(e[1]))}let a=n>i?n:i;return Number.parseInt(e.toFixed(a).replace(`.`,``))%Number.parseInt(t.toFixed(a).replace(`.`,``))/10**a}const _y=Symbol(`evaluating`);function vy(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==_y)return r===void 0&&(r=_y,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function yy(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function by(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function xy(e){return JSON.stringify(e)}function Sy(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}const Cy=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function wy(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}const Ty=py(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function Ey(e){if(wy(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return wy(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function Dy(e){return Ey(e)?{...e}:Array.isArray(e)?[...e]:e}const Oy=/* @__PURE__ */ new Set([`string`,`number`,`symbol`]);function ky(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Ay(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function $(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 jy(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}const My={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Ny(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`);return Ay(e,by(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return yy(this,`shape`,e),e},checks:[]}))}function Py(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`);return Ay(e,by(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return yy(this,`shape`,r),r},checks:[]}))}function Fy(e,t){if(!Ey(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Ay(e,by(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return yy(this,`shape`,n),n}}))}function Iy(e,t){if(!Ey(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return Ay(e,by(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return yy(this,`shape`,n),n}}))}function Ly(e,t){return Ay(e,by(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return yy(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:[]}))}function Ry(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return Ay(t,by(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return yy(this,`shape`,i),i},checks:[]}))}function zy(e,t,n){return Ay(t,by(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return yy(this,`shape`,i),i}}))}function By(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 Vy(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Hy(e){return typeof e==`string`?e:e?.message}function Uy(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=Hy(e.inst?._zod.def?.error?.(e))??Hy(t?.error?.(e))??Hy(n.customError?.(e))??Hy(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Wy(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Gy(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}const Ky=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,fy,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},qy=/* @__PURE__ */ Q(`$ZodError`,Ky),Jy=/* @__PURE__ */ Q(`$ZodError`,Ky,{Parent:Error});function Yy(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Xy(e,t=e=>e.message){let n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`&&i.errors.length)i.errors.map(e=>r({issues:e}));else if(i.code===`invalid_key`)r({issues:i.issues});else if(i.code===`invalid_element`)r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}const Zy=e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new sy;if(o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>Uy(e,a,uy())));throw Cy(t,i?.callee),t}return o.value},Qy=e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>Uy(e,a,uy())));throw Cy(t,i?.callee),t}return o.value},$y=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 sy;return a.issues.length?{success:!1,error:new(e??qy)(a.issues.map(e=>Uy(e,i,uy())))}:{success:!0,data:a.value}},eb=/* @__PURE__*/ $y(Jy),tb=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>Uy(e,i,uy())))}:{success:!0,data:a.value}},nb=/* @__PURE__*/ tb(Jy),rb=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Zy(e)(t,n,i)},ib=e=>(t,n,r)=>Zy(e)(t,n,r),ab=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Qy(e)(t,n,i)},ob=e=>async(t,n,r)=>Qy(e)(t,n,r),sb=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return $y(e)(t,n,i)},cb=e=>(t,n,r)=>$y(e)(t,n,r),lb=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return tb(e)(t,n,i)},ub=e=>async(t,n,r)=>tb(e)(t,n,r),db=/^[cC][^\s-]{8,}$/,fb=/^[0-9a-z]+$/,pb=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,mb=/^[0-9a-vA-V]{20}$/,hb=/^[A-Za-z0-9]{27}$/,gb=/^[a-zA-Z0-9_-]{21}$/,_b=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,vb=/^([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})$/,yb=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)$/,bb=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;function xb(){return/* @__PURE__ */ RegExp(`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,`u`)}const Sb=/^(?:(?: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])$/,Cb=/^(([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}|:))$/,wb=/^((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])$/,Tb=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Eb=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Db=/^[A-Za-z0-9_-]*$/,Ob=/^\+[1-9]\d{6,14}$/,kb=`(?:(?:\\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])))`,Ab=/*@__PURE__*/ RegExp(`^${kb}$`);function jb(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Mb(e){return RegExp(`^${jb(e)}$`)}function Nb(e){let t=jb({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${kb}T(?:${r})$`)}const Pb=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},Fb=/^-?\d+$/,Ib=/^-?\d+(?:\.\d+)?$/,Lb=/^(?:true|false)$/i,Rb=/^[^A-Z]*$/,zb=/^[^a-z]*$/,Bb=/*@__PURE__*/ Q(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Vb={number:`number`,bigint:`bigint`,object:`date`},Hb=/*@__PURE__*/ Q(`$ZodCheckLessThan`,(e,t)=>{Bb.init(e,t);let n=Vb[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ub=/*@__PURE__*/ Q(`$ZodCheckGreaterThan`,(e,t)=>{Bb.init(e,t);let n=Vb[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Wb=/*@__PURE__*/ Q(`$ZodCheckMultipleOf`,(e,t)=>{Bb.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):gy(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})}}),Gb=/*@__PURE__*/ Q(`$ZodCheckNumberFormat`,(e,t)=>{Bb.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=My[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=Fb)}),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})}}),Kb=/*@__PURE__*/ Q(`$ZodCheckMaxLength`,(e,t)=>{var n;Bb.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!my(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=Wy(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),qb=/*@__PURE__*/ Q(`$ZodCheckMinLength`,(e,t)=>{var n;Bb.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!my(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=Wy(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Jb=/*@__PURE__*/ Q(`$ZodCheckLengthEquals`,(e,t)=>{var n;Bb.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!my(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=Wy(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Yb=/*@__PURE__*/ Q(`$ZodCheckStringFormat`,(e,t)=>{var n,r;Bb.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=/* @__PURE__ */ new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Xb=/*@__PURE__*/ Q(`$ZodCheckRegex`,(e,t)=>{Yb.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})}}),Zb=/*@__PURE__*/ Q(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Rb,Yb.init(e,t)}),Qb=/*@__PURE__*/ Q(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=zb,Yb.init(e,t)}),$b=/*@__PURE__*/ Q(`$ZodCheckIncludes`,(e,t)=>{Bb.init(e,t);let n=ky(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=/* @__PURE__ */ new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),ex=/*@__PURE__*/ Q(`$ZodCheckStartsWith`,(e,t)=>{Bb.init(e,t);let n=RegExp(`^${ky(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=/* @__PURE__ */ new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),tx=/*@__PURE__*/ Q(`$ZodCheckEndsWith`,(e,t)=>{Bb.init(e,t);let n=RegExp(`.*${ky(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=/* @__PURE__ */ new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),nx=/*@__PURE__*/ Q(`$ZodCheckOverwrite`,(e,t)=>{Bb.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});var rx=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
279
279
  `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
280
- `))}};const rx={major:4,minor:3,patch:6},ix=/*@__PURE__*/ Q(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=rx;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=zy(e),i;for(let a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new oy;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=zy(e,t))});else{if(e.issues.length===t)continue;r||=zy(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(zy(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new oy;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new oy;return o.then(e=>t(e,r,a))}return t(o,r,a)}}_y(e,`~standard`,()=>({validate:t=>{try{let n=$y(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return tb(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),ax=/*@__PURE__*/ Q(`$ZodString`,(e,t)=>{ix.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Nb(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),ox=/*@__PURE__*/ Q(`$ZodStringFormat`,(e,t)=>{Jb.init(e,t),ax.init(e,t)}),sx=/*@__PURE__*/ Q(`$ZodGUID`,(e,t)=>{t.pattern??=_b,ox.init(e,t)}),cx=/*@__PURE__*/ Q(`$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??=vb(e)}else t.pattern??=vb();ox.init(e,t)}),lx=/*@__PURE__*/ Q(`$ZodEmail`,(e,t)=>{t.pattern??=yb,ox.init(e,t)}),ux=/*@__PURE__*/ Q(`$ZodURL`,(e,t)=>{ox.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.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&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),n.value=t.normalize?i.href:r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),dx=/*@__PURE__*/ Q(`$ZodEmoji`,(e,t)=>{t.pattern??=bb(),ox.init(e,t)}),fx=/*@__PURE__*/ Q(`$ZodNanoID`,(e,t)=>{t.pattern??=hb,ox.init(e,t)}),px=/*@__PURE__*/ Q(`$ZodCUID`,(e,t)=>{t.pattern??=ub,ox.init(e,t)}),mx=/*@__PURE__*/ Q(`$ZodCUID2`,(e,t)=>{t.pattern??=db,ox.init(e,t)}),hx=/*@__PURE__*/ Q(`$ZodULID`,(e,t)=>{t.pattern??=fb,ox.init(e,t)}),gx=/*@__PURE__*/ Q(`$ZodXID`,(e,t)=>{t.pattern??=pb,ox.init(e,t)}),_x=/*@__PURE__*/ Q(`$ZodKSUID`,(e,t)=>{t.pattern??=mb,ox.init(e,t)}),vx=/*@__PURE__*/ Q(`$ZodISODateTime`,(e,t)=>{t.pattern??=Mb(t),ox.init(e,t)}),yx=/*@__PURE__*/ Q(`$ZodISODate`,(e,t)=>{t.pattern??=kb,ox.init(e,t)}),bx=/*@__PURE__*/ Q(`$ZodISOTime`,(e,t)=>{t.pattern??=jb(t),ox.init(e,t)}),xx=/*@__PURE__*/ Q(`$ZodISODuration`,(e,t)=>{t.pattern??=gb,ox.init(e,t)}),Sx=/*@__PURE__*/ Q(`$ZodIPv4`,(e,t)=>{t.pattern??=xb,ox.init(e,t),e._zod.bag.format=`ipv4`}),Cx=/*@__PURE__*/ Q(`$ZodIPv6`,(e,t)=>{t.pattern??=Sb,ox.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),wx=/*@__PURE__*/ Q(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Cb,ox.init(e,t)}),Tx=/*@__PURE__*/ Q(`$ZodCIDRv6`,(e,t)=>{t.pattern??=wb,ox.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function Ex(e){if(e===``)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const Dx=/*@__PURE__*/ Q(`$ZodBase64`,(e,t)=>{t.pattern??=Tb,ox.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{Ex(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function Ox(e){if(!Eb.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Ex(t.padEnd(Math.ceil(t.length/4)*4,`=`))}const kx=/*@__PURE__*/ Q(`$ZodBase64URL`,(e,t)=>{t.pattern??=Eb,ox.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{Ox(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Ax=/*@__PURE__*/ Q(`$ZodE164`,(e,t)=>{t.pattern??=Db,ox.init(e,t)});function jx(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}const Mx=/*@__PURE__*/ Q(`$ZodJWT`,(e,t)=>{ox.init(e,t),e._zod.check=n=>{jx(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Nx=/*@__PURE__*/ Q(`$ZodNumber`,(e,t)=>{ix.init(e,t),e._zod.pattern=e._zod.bag.pattern??Fb,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),Px=/*@__PURE__*/ Q(`$ZodNumberFormat`,(e,t)=>{Wb.init(e,t),Nx.init(e,t)}),Fx=/*@__PURE__*/ Q(`$ZodBoolean`,(e,t)=>{ix.init(e,t),e._zod.pattern=Ib,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}}),Ix=/*@__PURE__*/ Q(`$ZodUnknown`,(e,t)=>{ix.init(e,t),e._zod.parse=e=>e}),Lx=/*@__PURE__*/ Q(`$ZodNever`,(e,t)=>{ix.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function Rx(e,t,n){e.issues.length&&t.issues.push(...By(n,e.issues)),t.value[n]=e.value}const zx=/*@__PURE__*/ Q(`$ZodArray`,(e,t)=>{ix.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>Rx(t,n,e))):Rx(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function Bx(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...By(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function Vx(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=Ay(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Hx(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optout===`optional`;for(let i in t){if(s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Bx(e,n,i,t,u))):Bx(a,n,i,t,u)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}const Ux=/*@__PURE__*/ Q(`$ZodObject`,(e,t)=>{if(ix.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let n=fy(()=>Vx(t));_y(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=/* @__PURE__ */ new Set);for(let e of r.values)n[t].add(e)}}return n});let r=Cy,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optout===`optional`,i=n._zod.run({value:s[e],issues:[]},o);i instanceof Promise?c.push(i.then(n=>Bx(n,t,e,s,r))):Bx(i,t,e,s,r)}return i?Hx(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),Wx=/*@__PURE__*/ Q(`$ZodObjectJIT`,(e,t)=>{Ux.init(e,t);let n=e._zod.parse,r=fy(()=>Vx(t)),i=e=>{let t=new nx([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=by(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=by(r),s=e[r]?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),s?t.write(`
280
+ `))}};const ix={major:4,minor:3,patch:6},ax=/*@__PURE__*/ Q(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=ix;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=By(e),i;for(let a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new sy;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=By(e,t))});else{if(e.issues.length===t)continue;r||=By(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(By(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new sy;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new sy;return o.then(e=>t(e,r,a))}return t(o,r,a)}}vy(e,`~standard`,()=>({validate:t=>{try{let n=eb(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return nb(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),ox=/*@__PURE__*/ Q(`$ZodString`,(e,t)=>{ax.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Pb(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),sx=/*@__PURE__*/ Q(`$ZodStringFormat`,(e,t)=>{Yb.init(e,t),ox.init(e,t)}),cx=/*@__PURE__*/ Q(`$ZodGUID`,(e,t)=>{t.pattern??=vb,sx.init(e,t)}),lx=/*@__PURE__*/ Q(`$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??=yb(e)}else t.pattern??=yb();sx.init(e,t)}),ux=/*@__PURE__*/ Q(`$ZodEmail`,(e,t)=>{t.pattern??=bb,sx.init(e,t)}),dx=/*@__PURE__*/ Q(`$ZodURL`,(e,t)=>{sx.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.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&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),n.value=t.normalize?i.href:r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),fx=/*@__PURE__*/ Q(`$ZodEmoji`,(e,t)=>{t.pattern??=xb(),sx.init(e,t)}),px=/*@__PURE__*/ Q(`$ZodNanoID`,(e,t)=>{t.pattern??=gb,sx.init(e,t)}),mx=/*@__PURE__*/ Q(`$ZodCUID`,(e,t)=>{t.pattern??=db,sx.init(e,t)}),hx=/*@__PURE__*/ Q(`$ZodCUID2`,(e,t)=>{t.pattern??=fb,sx.init(e,t)}),gx=/*@__PURE__*/ Q(`$ZodULID`,(e,t)=>{t.pattern??=pb,sx.init(e,t)}),_x=/*@__PURE__*/ Q(`$ZodXID`,(e,t)=>{t.pattern??=mb,sx.init(e,t)}),vx=/*@__PURE__*/ Q(`$ZodKSUID`,(e,t)=>{t.pattern??=hb,sx.init(e,t)}),yx=/*@__PURE__*/ Q(`$ZodISODateTime`,(e,t)=>{t.pattern??=Nb(t),sx.init(e,t)}),bx=/*@__PURE__*/ Q(`$ZodISODate`,(e,t)=>{t.pattern??=Ab,sx.init(e,t)}),xx=/*@__PURE__*/ Q(`$ZodISOTime`,(e,t)=>{t.pattern??=Mb(t),sx.init(e,t)}),Sx=/*@__PURE__*/ Q(`$ZodISODuration`,(e,t)=>{t.pattern??=_b,sx.init(e,t)}),Cx=/*@__PURE__*/ Q(`$ZodIPv4`,(e,t)=>{t.pattern??=Sb,sx.init(e,t),e._zod.bag.format=`ipv4`}),wx=/*@__PURE__*/ Q(`$ZodIPv6`,(e,t)=>{t.pattern??=Cb,sx.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),Tx=/*@__PURE__*/ Q(`$ZodCIDRv4`,(e,t)=>{t.pattern??=wb,sx.init(e,t)}),Ex=/*@__PURE__*/ Q(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Tb,sx.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function Dx(e){if(e===``)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const Ox=/*@__PURE__*/ Q(`$ZodBase64`,(e,t)=>{t.pattern??=Eb,sx.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{Dx(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function kx(e){if(!Db.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Dx(t.padEnd(Math.ceil(t.length/4)*4,`=`))}const Ax=/*@__PURE__*/ Q(`$ZodBase64URL`,(e,t)=>{t.pattern??=Db,sx.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{kx(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),jx=/*@__PURE__*/ Q(`$ZodE164`,(e,t)=>{t.pattern??=Ob,sx.init(e,t)});function Mx(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}const Nx=/*@__PURE__*/ Q(`$ZodJWT`,(e,t)=>{sx.init(e,t),e._zod.check=n=>{Mx(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Px=/*@__PURE__*/ Q(`$ZodNumber`,(e,t)=>{ax.init(e,t),e._zod.pattern=e._zod.bag.pattern??Ib,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),Fx=/*@__PURE__*/ Q(`$ZodNumberFormat`,(e,t)=>{Gb.init(e,t),Px.init(e,t)}),Ix=/*@__PURE__*/ Q(`$ZodBoolean`,(e,t)=>{ax.init(e,t),e._zod.pattern=Lb,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}}),Lx=/*@__PURE__*/ Q(`$ZodUnknown`,(e,t)=>{ax.init(e,t),e._zod.parse=e=>e}),Rx=/*@__PURE__*/ Q(`$ZodNever`,(e,t)=>{ax.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function zx(e,t,n){e.issues.length&&t.issues.push(...Vy(n,e.issues)),t.value[n]=e.value}const Bx=/*@__PURE__*/ Q(`$ZodArray`,(e,t)=>{ax.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>zx(t,n,e))):zx(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function Vx(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...Vy(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function Hx(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=jy(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Ux(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optout===`optional`;for(let i in t){if(s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Vx(e,n,i,t,u))):Vx(a,n,i,t,u)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}const Wx=/*@__PURE__*/ Q(`$ZodObject`,(e,t)=>{if(ax.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let n=py(()=>Hx(t));vy(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=/* @__PURE__ */ new Set);for(let e of r.values)n[t].add(e)}}return n});let r=wy,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optout===`optional`,i=n._zod.run({value:s[e],issues:[]},o);i instanceof Promise?c.push(i.then(n=>Vx(n,t,e,s,r))):Vx(i,t,e,s,r)}return i?Ux(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),Gx=/*@__PURE__*/ Q(`$ZodObjectJIT`,(e,t)=>{Wx.init(e,t);let n=e._zod.parse,r=py(()=>Hx(t)),i=e=>{let t=new rx([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=xy(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=xy(r),s=e[r]?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),s?t.write(`
281
281
  if (${n}.issues.length) {
282
282
  if (${o} in input) {
283
283
  payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
@@ -311,62 +311,62 @@ function Q(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{val
311
311
  newResult[${o}] = ${n}.value;
312
312
  }
313
313
 
314
- `)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=Cy,s=!cy.jitless,c=s&&wy.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?Hx([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function Gx(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=>!zy(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=>Hy(e,r,ly())))}),t)}const Kx=/*@__PURE__*/ Q(`$ZodUnion`,(e,t)=>{ix.init(e,t),_y(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),_y(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),_y(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),_y(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>my(e.source)).join(`|`)})$`)}});let n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(n)return r(i,a);let o=!1,s=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},a);if(t instanceof Promise)s.push(t),o=!0;else{if(t.issues.length===0)return t;s.push(t)}}return o?Promise.all(s).then(t=>Gx(t,i,e,a)):Gx(s,i,e,a)}}),qx=/*@__PURE__*/ Q(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,Kx.init(e,t);let n=e._zod.parse;_y(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=/* @__PURE__ */ new Set);for(let r of n)e[t].add(r)}}return e});let r=fy(()=>{let e=t.options,n=/* @__PURE__ */ new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!Cy(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,input:o,path:[t.discriminator],inst:e}),i)}}),Jx=/*@__PURE__*/ Q(`$ZodIntersection`,(e,t)=>{ix.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])=>Xx(e,t,n)):Xx(e,i,a)}});function Yx(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ty(e)&&Ty(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=Yx(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=Yx(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 Xx(e,t,n){let r=/* @__PURE__ */ new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),zy(e))return e;let o=Yx(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}const Zx=/*@__PURE__*/ Q(`$ZodRecord`,(e,t)=>{ix.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Ty(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=/* @__PURE__ */ new Set;for(let e of o)if(typeof e==`string`||typeof e==`number`||typeof e==`symbol`){s.add(typeof e==`number`?e.toString():e);let o=t.valueType._zod.run({value:i[e],issues:[]},r);o instanceof Promise?a.push(o.then(t=>{t.issues.length&&n.issues.push(...By(e,t.issues)),n.value[e]=t.value})):(o.issues.length&&n.issues.push(...By(e,o.issues)),n.value[e]=o.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`)continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&Fb.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>Hy(e,r,ly())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...By(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...By(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),Qx=/*@__PURE__*/ Q(`$ZodEnum`,(e,t)=>{ix.init(e,t);let n=uy(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>Dy.has(typeof e)).map(e=>typeof e==`string`?Oy(e):e.toString()).join(`|`)})$`),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}}),$x=/*@__PURE__*/ Q(`$ZodLiteral`,(e,t)=>{if(ix.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?Oy(e):e?Oy(e.toString()):String(e)).join(`|`)})$`),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}}),eS=/*@__PURE__*/ Q(`$ZodTransform`,(e,t)=>{ix.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new sy(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 oy;return n.value=i,n}});function tS(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const nS=/*@__PURE__*/ Q(`$ZodOptional`,(e,t)=>{ix.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,_y(e._zod,`values`,()=>t.innerType._zod.values?/* @__PURE__ */ new Set([...t.innerType._zod.values,void 0]):void 0),_y(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${my(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>tS(t,e.value)):tS(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),rS=/*@__PURE__*/ Q(`$ZodExactOptional`,(e,t)=>{nS.init(e,t),_y(e._zod,`values`,()=>t.innerType._zod.values),_y(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),iS=/*@__PURE__*/ Q(`$ZodNullable`,(e,t)=>{ix.init(e,t),_y(e._zod,`optin`,()=>t.innerType._zod.optin),_y(e._zod,`optout`,()=>t.innerType._zod.optout),_y(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${my(e.source)}|null)$`):void 0}),_y(e._zod,`values`,()=>t.innerType._zod.values?/* @__PURE__ */ new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),aS=/*@__PURE__*/ Q(`$ZodDefault`,(e,t)=>{ix.init(e,t),e._zod.optin=`optional`,_y(e._zod,`values`,()=>t.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=>oS(e,t)):oS(r,t)}});function oS(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const sS=/*@__PURE__*/ Q(`$ZodPrefault`,(e,t)=>{ix.init(e,t),e._zod.optin=`optional`,_y(e._zod,`values`,()=>t.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))}),cS=/*@__PURE__*/ Q(`$ZodNonOptional`,(e,t)=>{ix.init(e,t),_y(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>lS(t,e)):lS(i,e)}});function lS(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}const uS=/*@__PURE__*/ Q(`$ZodCatch`,(e,t)=>{ix.init(e,t),_y(e._zod,`optin`,()=>t.innerType._zod.optin),_y(e._zod,`optout`,()=>t.innerType._zod.optout),_y(e._zod,`values`,()=>t.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(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Hy(e,n,ly()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Hy(e,n,ly()))},input:e.value}),e.issues=[]),e)}}),dS=/*@__PURE__*/ Q(`$ZodPipe`,(e,t)=>{ix.init(e,t),_y(e._zod,`values`,()=>t.in._zod.values),_y(e._zod,`optin`,()=>t.in._zod.optin),_y(e._zod,`optout`,()=>t.out._zod.optout),_y(e._zod,`propValues`,()=>t.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=>fS(e,t.in,n)):fS(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>fS(e,t.out,n)):fS(r,t.out,n)}});function fS(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const pS=/*@__PURE__*/ Q(`$ZodReadonly`,(e,t)=>{ix.init(e,t),_y(e._zod,`propValues`,()=>t.innerType._zod.propValues),_y(e._zod,`values`,()=>t.innerType._zod.values),_y(e._zod,`optin`,()=>t.innerType?._zod?.optin),_y(e._zod,`optout`,()=>t.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(mS):mS(r)}});function mS(e){return e.value=Object.freeze(e.value),e}const hS=/*@__PURE__*/ Q(`$ZodCustom`,(e,t)=>{zb.init(e,t),ix.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=>gS(t,n,r,e));gS(i,n,r,e)}});function gS(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(Wy(e))}}var _S,vS=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 yS(){return new vS}(_S=globalThis).__zod_globalRegistry??(_S.__zod_globalRegistry=yS());const bS=globalThis.__zod_globalRegistry;// @__NO_SIDE_EFFECTS__
315
- function xS(e,t){return new e({type:`string`,...$(t)})}// @__NO_SIDE_EFFECTS__
316
- function SS(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...$(t)})}// @__NO_SIDE_EFFECTS__
317
- function CS(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...$(t)})}// @__NO_SIDE_EFFECTS__
318
- function wS(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...$(t)})}// @__NO_SIDE_EFFECTS__
319
- function TS(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...$(t)})}// @__NO_SIDE_EFFECTS__
320
- function ES(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...$(t)})}// @__NO_SIDE_EFFECTS__
321
- function DS(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...$(t)})}// @__NO_SIDE_EFFECTS__
322
- function OS(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...$(t)})}// @__NO_SIDE_EFFECTS__
323
- function kS(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...$(t)})}// @__NO_SIDE_EFFECTS__
324
- function AS(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...$(t)})}// @__NO_SIDE_EFFECTS__
325
- function jS(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...$(t)})}// @__NO_SIDE_EFFECTS__
326
- function MS(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...$(t)})}// @__NO_SIDE_EFFECTS__
327
- function NS(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...$(t)})}// @__NO_SIDE_EFFECTS__
328
- function PS(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...$(t)})}// @__NO_SIDE_EFFECTS__
329
- function FS(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...$(t)})}// @__NO_SIDE_EFFECTS__
330
- function IS(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...$(t)})}// @__NO_SIDE_EFFECTS__
331
- function LS(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...$(t)})}// @__NO_SIDE_EFFECTS__
332
- function RS(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...$(t)})}// @__NO_SIDE_EFFECTS__
333
- function zS(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...$(t)})}// @__NO_SIDE_EFFECTS__
334
- function BS(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...$(t)})}// @__NO_SIDE_EFFECTS__
335
- function VS(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...$(t)})}// @__NO_SIDE_EFFECTS__
336
- function HS(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...$(t)})}// @__NO_SIDE_EFFECTS__
337
- function US(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...$(t)})}// @__NO_SIDE_EFFECTS__
338
- function WS(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...$(t)})}// @__NO_SIDE_EFFECTS__
339
- function GS(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...$(t)})}// @__NO_SIDE_EFFECTS__
340
- function KS(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...$(t)})}// @__NO_SIDE_EFFECTS__
341
- function qS(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...$(t)})}// @__NO_SIDE_EFFECTS__
342
- function JS(e,t){return new e({type:`number`,checks:[],...$(t)})}// @__NO_SIDE_EFFECTS__
343
- function YS(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...$(t)})}// @__NO_SIDE_EFFECTS__
344
- function XS(e,t){return new e({type:`boolean`,...$(t)})}// @__NO_SIDE_EFFECTS__
345
- function ZS(e){return new e({type:`unknown`})}// @__NO_SIDE_EFFECTS__
346
- function QS(e,t){return new e({type:`never`,...$(t)})}// @__NO_SIDE_EFFECTS__
347
- function $S(e,t){return new Vb({check:`less_than`,...$(t),value:e,inclusive:!1})}// @__NO_SIDE_EFFECTS__
348
- function eC(e,t){return new Vb({check:`less_than`,...$(t),value:e,inclusive:!0})}// @__NO_SIDE_EFFECTS__
349
- function tC(e,t){return new Hb({check:`greater_than`,...$(t),value:e,inclusive:!1})}// @__NO_SIDE_EFFECTS__
350
- function nC(e,t){return new Hb({check:`greater_than`,...$(t),value:e,inclusive:!0})}// @__NO_SIDE_EFFECTS__
351
- function rC(e,t){return new Ub({check:`multiple_of`,...$(t),value:e})}// @__NO_SIDE_EFFECTS__
352
- function iC(e,t){return new Gb({check:`max_length`,...$(t),maximum:e})}// @__NO_SIDE_EFFECTS__
353
- function aC(e,t){return new Kb({check:`min_length`,...$(t),minimum:e})}// @__NO_SIDE_EFFECTS__
354
- function oC(e,t){return new qb({check:`length_equals`,...$(t),length:e})}// @__NO_SIDE_EFFECTS__
355
- function sC(e,t){return new Yb({check:`string_format`,format:`regex`,...$(t),pattern:e})}// @__NO_SIDE_EFFECTS__
356
- function cC(e){return new Xb({check:`string_format`,format:`lowercase`,...$(e)})}// @__NO_SIDE_EFFECTS__
357
- function lC(e){return new Zb({check:`string_format`,format:`uppercase`,...$(e)})}// @__NO_SIDE_EFFECTS__
358
- function uC(e,t){return new Qb({check:`string_format`,format:`includes`,...$(t),includes:e})}// @__NO_SIDE_EFFECTS__
359
- function dC(e,t){return new $b({check:`string_format`,format:`starts_with`,...$(t),prefix:e})}// @__NO_SIDE_EFFECTS__
360
- function fC(e,t){return new ex({check:`string_format`,format:`ends_with`,...$(t),suffix:e})}// @__NO_SIDE_EFFECTS__
361
- function pC(e){return new tx({check:`overwrite`,tx:e})}// @__NO_SIDE_EFFECTS__
362
- function mC(e){return/* @__PURE__ */ pC(t=>t.normalize(e))}// @__NO_SIDE_EFFECTS__
363
- function hC(){return/* @__PURE__ */ pC(e=>e.trim())}// @__NO_SIDE_EFFECTS__
364
- function gC(){return/* @__PURE__ */ pC(e=>e.toLowerCase())}// @__NO_SIDE_EFFECTS__
365
- function _C(){return/* @__PURE__ */ pC(e=>e.toUpperCase())}// @__NO_SIDE_EFFECTS__
366
- function vC(){return/* @__PURE__ */ pC(e=>xy(e))}// @__NO_SIDE_EFFECTS__
367
- function yC(e,t,n){return new e({type:`array`,element:t,...$(n)})}// @__NO_SIDE_EFFECTS__
368
- function bC(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...$(n)})}// @__NO_SIDE_EFFECTS__
369
- function xC(e){let t=/* @__PURE__ */ SC(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(Wy(e,n.value,t._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=n.value,r.inst??=t,r.continue??=!t._zod.def.abort,n.issues.push(Wy(r))}},e(n.value,n)));return t}// @__NO_SIDE_EFFECTS__
370
- function SC(e,t){let n=new zb({check:`custom`,...$(t)});return n._zod.check=e,n}function CC(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??bS,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:/* @__PURE__ */ new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function wC(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);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,wC(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&DC(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&o.schema._prefault&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function TC(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);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}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(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>
314
+ `)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=wy,s=!ly.jitless,c=s&&Ty.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?Ux([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function Kx(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=>!By(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=>Uy(e,r,uy())))}),t)}const qx=/*@__PURE__*/ Q(`$ZodUnion`,(e,t)=>{ax.init(e,t),vy(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),vy(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),vy(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),vy(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>hy(e.source)).join(`|`)})$`)}});let n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(n)return r(i,a);let o=!1,s=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},a);if(t instanceof Promise)s.push(t),o=!0;else{if(t.issues.length===0)return t;s.push(t)}}return o?Promise.all(s).then(t=>Kx(t,i,e,a)):Kx(s,i,e,a)}}),Jx=/*@__PURE__*/ Q(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,qx.init(e,t);let n=e._zod.parse;vy(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=/* @__PURE__ */ new Set);for(let r of n)e[t].add(r)}}return e});let r=py(()=>{let e=t.options,n=/* @__PURE__ */ new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!wy(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,input:o,path:[t.discriminator],inst:e}),i)}}),Yx=/*@__PURE__*/ Q(`$ZodIntersection`,(e,t)=>{ax.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])=>Zx(e,t,n)):Zx(e,i,a)}});function Xx(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ey(e)&&Ey(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=Xx(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=Xx(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 Zx(e,t,n){let r=/* @__PURE__ */ new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),By(e))return e;let o=Xx(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}const Qx=/*@__PURE__*/ Q(`$ZodRecord`,(e,t)=>{ax.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Ey(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=/* @__PURE__ */ new Set;for(let e of o)if(typeof e==`string`||typeof e==`number`||typeof e==`symbol`){s.add(typeof e==`number`?e.toString():e);let o=t.valueType._zod.run({value:i[e],issues:[]},r);o instanceof Promise?a.push(o.then(t=>{t.issues.length&&n.issues.push(...Vy(e,t.issues)),n.value[e]=t.value})):(o.issues.length&&n.issues.push(...Vy(e,o.issues)),n.value[e]=o.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`)continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&Ib.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>Uy(e,r,uy())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...Vy(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...Vy(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),$x=/*@__PURE__*/ Q(`$ZodEnum`,(e,t)=>{ax.init(e,t);let n=dy(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>Oy.has(typeof e)).map(e=>typeof e==`string`?ky(e):e.toString()).join(`|`)})$`),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}}),eS=/*@__PURE__*/ Q(`$ZodLiteral`,(e,t)=>{if(ax.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?ky(e):e?ky(e.toString()):String(e)).join(`|`)})$`),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}}),tS=/*@__PURE__*/ Q(`$ZodTransform`,(e,t)=>{ax.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new cy(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 sy;return n.value=i,n}});function nS(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const rS=/*@__PURE__*/ Q(`$ZodOptional`,(e,t)=>{ax.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,vy(e._zod,`values`,()=>t.innerType._zod.values?/* @__PURE__ */ new Set([...t.innerType._zod.values,void 0]):void 0),vy(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${hy(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>nS(t,e.value)):nS(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),iS=/*@__PURE__*/ Q(`$ZodExactOptional`,(e,t)=>{rS.init(e,t),vy(e._zod,`values`,()=>t.innerType._zod.values),vy(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),aS=/*@__PURE__*/ Q(`$ZodNullable`,(e,t)=>{ax.init(e,t),vy(e._zod,`optin`,()=>t.innerType._zod.optin),vy(e._zod,`optout`,()=>t.innerType._zod.optout),vy(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${hy(e.source)}|null)$`):void 0}),vy(e._zod,`values`,()=>t.innerType._zod.values?/* @__PURE__ */ new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),oS=/*@__PURE__*/ Q(`$ZodDefault`,(e,t)=>{ax.init(e,t),e._zod.optin=`optional`,vy(e._zod,`values`,()=>t.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=>sS(e,t)):sS(r,t)}});function sS(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const cS=/*@__PURE__*/ Q(`$ZodPrefault`,(e,t)=>{ax.init(e,t),e._zod.optin=`optional`,vy(e._zod,`values`,()=>t.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))}),lS=/*@__PURE__*/ Q(`$ZodNonOptional`,(e,t)=>{ax.init(e,t),vy(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>uS(t,e)):uS(i,e)}});function uS(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}const dS=/*@__PURE__*/ Q(`$ZodCatch`,(e,t)=>{ax.init(e,t),vy(e._zod,`optin`,()=>t.innerType._zod.optin),vy(e._zod,`optout`,()=>t.innerType._zod.optout),vy(e._zod,`values`,()=>t.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(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Uy(e,n,uy()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Uy(e,n,uy()))},input:e.value}),e.issues=[]),e)}}),fS=/*@__PURE__*/ Q(`$ZodPipe`,(e,t)=>{ax.init(e,t),vy(e._zod,`values`,()=>t.in._zod.values),vy(e._zod,`optin`,()=>t.in._zod.optin),vy(e._zod,`optout`,()=>t.out._zod.optout),vy(e._zod,`propValues`,()=>t.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=>pS(e,t.in,n)):pS(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>pS(e,t.out,n)):pS(r,t.out,n)}});function pS(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const mS=/*@__PURE__*/ Q(`$ZodReadonly`,(e,t)=>{ax.init(e,t),vy(e._zod,`propValues`,()=>t.innerType._zod.propValues),vy(e._zod,`values`,()=>t.innerType._zod.values),vy(e._zod,`optin`,()=>t.innerType?._zod?.optin),vy(e._zod,`optout`,()=>t.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(hS):hS(r)}});function hS(e){return e.value=Object.freeze(e.value),e}const gS=/*@__PURE__*/ Q(`$ZodCustom`,(e,t)=>{Bb.init(e,t),ax.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=>_S(t,n,r,e));_S(i,n,r,e)}});function _S(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(Gy(e))}}var vS,yS=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 bS(){return new yS}(vS=globalThis).__zod_globalRegistry??(vS.__zod_globalRegistry=bS());const xS=globalThis.__zod_globalRegistry;// @__NO_SIDE_EFFECTS__
315
+ function SS(e,t){return new e({type:`string`,...$(t)})}// @__NO_SIDE_EFFECTS__
316
+ function CS(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...$(t)})}// @__NO_SIDE_EFFECTS__
317
+ function wS(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...$(t)})}// @__NO_SIDE_EFFECTS__
318
+ function TS(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...$(t)})}// @__NO_SIDE_EFFECTS__
319
+ function ES(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...$(t)})}// @__NO_SIDE_EFFECTS__
320
+ function DS(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...$(t)})}// @__NO_SIDE_EFFECTS__
321
+ function OS(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...$(t)})}// @__NO_SIDE_EFFECTS__
322
+ function kS(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...$(t)})}// @__NO_SIDE_EFFECTS__
323
+ function AS(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...$(t)})}// @__NO_SIDE_EFFECTS__
324
+ function jS(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...$(t)})}// @__NO_SIDE_EFFECTS__
325
+ function MS(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...$(t)})}// @__NO_SIDE_EFFECTS__
326
+ function NS(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...$(t)})}// @__NO_SIDE_EFFECTS__
327
+ function PS(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...$(t)})}// @__NO_SIDE_EFFECTS__
328
+ function FS(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...$(t)})}// @__NO_SIDE_EFFECTS__
329
+ function IS(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...$(t)})}// @__NO_SIDE_EFFECTS__
330
+ function LS(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...$(t)})}// @__NO_SIDE_EFFECTS__
331
+ function RS(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...$(t)})}// @__NO_SIDE_EFFECTS__
332
+ function zS(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...$(t)})}// @__NO_SIDE_EFFECTS__
333
+ function BS(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...$(t)})}// @__NO_SIDE_EFFECTS__
334
+ function VS(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...$(t)})}// @__NO_SIDE_EFFECTS__
335
+ function HS(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...$(t)})}// @__NO_SIDE_EFFECTS__
336
+ function US(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...$(t)})}// @__NO_SIDE_EFFECTS__
337
+ function WS(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...$(t)})}// @__NO_SIDE_EFFECTS__
338
+ function GS(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...$(t)})}// @__NO_SIDE_EFFECTS__
339
+ function KS(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...$(t)})}// @__NO_SIDE_EFFECTS__
340
+ function qS(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...$(t)})}// @__NO_SIDE_EFFECTS__
341
+ function JS(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...$(t)})}// @__NO_SIDE_EFFECTS__
342
+ function YS(e,t){return new e({type:`number`,checks:[],...$(t)})}// @__NO_SIDE_EFFECTS__
343
+ function XS(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...$(t)})}// @__NO_SIDE_EFFECTS__
344
+ function ZS(e,t){return new e({type:`boolean`,...$(t)})}// @__NO_SIDE_EFFECTS__
345
+ function QS(e){return new e({type:`unknown`})}// @__NO_SIDE_EFFECTS__
346
+ function $S(e,t){return new e({type:`never`,...$(t)})}// @__NO_SIDE_EFFECTS__
347
+ function eC(e,t){return new Hb({check:`less_than`,...$(t),value:e,inclusive:!1})}// @__NO_SIDE_EFFECTS__
348
+ function tC(e,t){return new Hb({check:`less_than`,...$(t),value:e,inclusive:!0})}// @__NO_SIDE_EFFECTS__
349
+ function nC(e,t){return new Ub({check:`greater_than`,...$(t),value:e,inclusive:!1})}// @__NO_SIDE_EFFECTS__
350
+ function rC(e,t){return new Ub({check:`greater_than`,...$(t),value:e,inclusive:!0})}// @__NO_SIDE_EFFECTS__
351
+ function iC(e,t){return new Wb({check:`multiple_of`,...$(t),value:e})}// @__NO_SIDE_EFFECTS__
352
+ function aC(e,t){return new Kb({check:`max_length`,...$(t),maximum:e})}// @__NO_SIDE_EFFECTS__
353
+ function oC(e,t){return new qb({check:`min_length`,...$(t),minimum:e})}// @__NO_SIDE_EFFECTS__
354
+ function sC(e,t){return new Jb({check:`length_equals`,...$(t),length:e})}// @__NO_SIDE_EFFECTS__
355
+ function cC(e,t){return new Xb({check:`string_format`,format:`regex`,...$(t),pattern:e})}// @__NO_SIDE_EFFECTS__
356
+ function lC(e){return new Zb({check:`string_format`,format:`lowercase`,...$(e)})}// @__NO_SIDE_EFFECTS__
357
+ function uC(e){return new Qb({check:`string_format`,format:`uppercase`,...$(e)})}// @__NO_SIDE_EFFECTS__
358
+ function dC(e,t){return new $b({check:`string_format`,format:`includes`,...$(t),includes:e})}// @__NO_SIDE_EFFECTS__
359
+ function fC(e,t){return new ex({check:`string_format`,format:`starts_with`,...$(t),prefix:e})}// @__NO_SIDE_EFFECTS__
360
+ function pC(e,t){return new tx({check:`string_format`,format:`ends_with`,...$(t),suffix:e})}// @__NO_SIDE_EFFECTS__
361
+ function mC(e){return new nx({check:`overwrite`,tx:e})}// @__NO_SIDE_EFFECTS__
362
+ function hC(e){return/* @__PURE__ */ mC(t=>t.normalize(e))}// @__NO_SIDE_EFFECTS__
363
+ function gC(){return/* @__PURE__ */ mC(e=>e.trim())}// @__NO_SIDE_EFFECTS__
364
+ function _C(){return/* @__PURE__ */ mC(e=>e.toLowerCase())}// @__NO_SIDE_EFFECTS__
365
+ function vC(){return/* @__PURE__ */ mC(e=>e.toUpperCase())}// @__NO_SIDE_EFFECTS__
366
+ function yC(){return/* @__PURE__ */ mC(e=>Sy(e))}// @__NO_SIDE_EFFECTS__
367
+ function bC(e,t,n){return new e({type:`array`,element:t,...$(n)})}// @__NO_SIDE_EFFECTS__
368
+ function xC(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...$(n)})}// @__NO_SIDE_EFFECTS__
369
+ function SC(e){let t=/* @__PURE__ */ CC(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(Gy(e,n.value,t._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=n.value,r.inst??=t,r.continue??=!t._zod.def.abort,n.issues.push(Gy(r))}},e(n.value,n)));return t}// @__NO_SIDE_EFFECTS__
370
+ function CC(e,t){let n=new Bb({check:`custom`,...$(t)});return n._zod.check=e,n}function wC(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??xS,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:/* @__PURE__ */ new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function TC(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);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,TC(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&OC(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&o.schema._prefault&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function EC(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);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}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(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>
371
371
 
372
- 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)}}}function EC(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)):Object.assign(i,s),Object.assign(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??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);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)}Object.assign(i,n.def??n.schema);let a=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&(e.target===`draft-2020-12`?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:kC(t,`input`,e.processors),output:kC(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function DC(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 DC(r.element,n);if(r.type===`set`)return DC(r.valueType,n);if(r.type===`lazy`)return DC(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`)return DC(r.innerType,n);if(r.type===`intersection`)return DC(r.left,n)||DC(r.right,n);if(r.type===`record`||r.type===`map`)return DC(r.keyType,n)||DC(r.valueType,n);if(r.type===`pipe`)return DC(r.in,n)||DC(r.out,n);if(r.type===`object`){for(let e in r.shape)if(DC(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(DC(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(DC(e,n))return!0;return!!(r.rest&&DC(r.rest,n))}return!1}const OC=(e,t={})=>n=>{let r=CC({...n,processors:t});return wC(e,r),TC(r,e),EC(r,e)},kC=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=CC({...i??{},target:a,io:t,processors:n});return wC(e,o),TC(o,e),EC(o,e)},AC={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},jC=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=AC[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];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}))])}},MC=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;i.type=typeof s==`string`&&s.includes(`int`)?`integer`:`number`,typeof u==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u),typeof a==`number`&&(i.minimum=a,typeof u==`number`&&t.target!==`draft-04`&&(u>=a?delete i.minimum:delete i.exclusiveMinimum)),typeof l==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l),typeof o==`number`&&(i.maximum=o,typeof l==`number`&&t.target!==`draft-04`&&(l<=o?delete i.maximum:delete i.exclusiveMaximum)),typeof c==`number`&&(i.multipleOf=c)},NC=(e,t,n,r)=>{n.type=`boolean`},PC=(e,t,n,r)=>{n.not={}},FC=(e,t,n,r)=>{let i=e._zod.def,a=uy(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},IC=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);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}},LC=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},RC=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},zC=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=wC(a.element,t,{...r,path:[...r.path,`items`]})},BC=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=wC(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=wC(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},VC=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>wC(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},HC=(e,t,n,r)=>{let i=e._zod.def,a=wC(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=wC(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},UC=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=wC(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else(t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=wC(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=wC(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},WC=(e,t,n,r)=>{let i=e._zod.def,a=wC(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`}]},GC=(e,t,n,r)=>{let i=e._zod.def;wC(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},KC=(e,t,n,r)=>{let i=e._zod.def;wC(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},qC=(e,t,n,r)=>{let i=e._zod.def;wC(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},JC=(e,t,n,r)=>{let i=e._zod.def;wC(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},YC=(e,t,n,r)=>{let i=e._zod.def,a=t.io===`input`?i.in._zod.def.type===`transform`?i.out:i.in:i.out;wC(a,t,r);let o=t.seen.get(e);o.ref=a},XC=(e,t,n,r)=>{let i=e._zod.def;wC(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},ZC=(e,t,n,r)=>{let i=e._zod.def;wC(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},QC=/*@__PURE__*/ Q(`ZodISODateTime`,(e,t)=>{vx.init(e,t),Cw.init(e,t)});function $C(e){return/* @__PURE__ */ WS(QC,e)}const ew=/*@__PURE__*/ Q(`ZodISODate`,(e,t)=>{yx.init(e,t),Cw.init(e,t)});function tw(e){return/* @__PURE__ */ GS(ew,e)}const nw=/*@__PURE__*/ Q(`ZodISOTime`,(e,t)=>{bx.init(e,t),Cw.init(e,t)});function rw(e){return/* @__PURE__ */ KS(nw,e)}const iw=/*@__PURE__*/ Q(`ZodISODuration`,(e,t)=>{xx.init(e,t),Cw.init(e,t)});function aw(e){return/* @__PURE__ */ qS(iw,e)}const ow=/* @__PURE__ */ Q(`ZodError`,(e,t)=>{Ky.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>Yy(e,t)},flatten:{value:t=>Jy(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,dy,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,dy,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),sw=/* @__PURE__ */ Xy(ow),cw=/* @__PURE__ */ Zy(ow),lw=/* @__PURE__ */ Qy(ow),uw=/* @__PURE__ */ eb(ow),dw=/* @__PURE__ */ nb(ow),fw=/* @__PURE__ */ rb(ow),pw=/* @__PURE__ */ ib(ow),mw=/* @__PURE__ */ ab(ow),hw=/* @__PURE__ */ ob(ow),gw=/* @__PURE__ */ sb(ow),_w=/* @__PURE__ */ cb(ow),vw=/* @__PURE__ */ lb(ow),yw=/*@__PURE__*/ Q(`ZodType`,(e,t)=>(ix.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:kC(e,`input`),output:kC(e,`output`)}}),e.toJSONSchema=OC(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(yy(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>ky(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>sw(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>lw(e,t,n),e.parseAsync=async(t,n)=>cw(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>uw(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>dw(e,t,n),e.decode=(t,n)=>fw(e,t,n),e.encodeAsync=async(t,n)=>pw(e,t,n),e.decodeAsync=async(t,n)=>mw(e,t,n),e.safeEncode=(t,n)=>hw(e,t,n),e.safeDecode=(t,n)=>gw(e,t,n),e.safeEncodeAsync=async(t,n)=>_w(e,t,n),e.safeDecodeAsync=async(t,n)=>vw(e,t,n),e.refine=(t,n)=>e.check(RT(t,n)),e.superRefine=t=>e.check(zT(t)),e.overwrite=t=>e.check(/* @__PURE__ */ pC(t)),e.optional=()=>bT(e),e.exactOptional=()=>ST(e),e.nullable=()=>wT(e),e.nullish=()=>bT(wT(e)),e.nonoptional=t=>AT(e,t),e.array=()=>nT(e),e.or=t=>oT([e,t]),e.and=t=>uT(e,t),e.transform=t=>PT(e,vT(t)),e.default=t=>ET(e,t),e.prefault=t=>OT(e,t),e.catch=t=>MT(e,t),e.pipe=t=>PT(e,t),e.readonly=()=>IT(e),e.describe=t=>{let n=e.clone();return bS.add(n,{description:t}),n},Object.defineProperty(e,"description",{get(){return bS.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return bS.get(e);let n=e.clone();return bS.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),bw=/*@__PURE__*/ Q(`_ZodString`,(e,t)=>{ax.init(e,t),yw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jC(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(/* @__PURE__ */ sC(...t)),e.includes=(...t)=>e.check(/* @__PURE__ */ uC(...t)),e.startsWith=(...t)=>e.check(/* @__PURE__ */ dC(...t)),e.endsWith=(...t)=>e.check(/* @__PURE__ */ fC(...t)),e.min=(...t)=>e.check(/* @__PURE__ */ aC(...t)),e.max=(...t)=>e.check(/* @__PURE__ */ iC(...t)),e.length=(...t)=>e.check(/* @__PURE__ */ oC(...t)),e.nonempty=(...t)=>e.check(/* @__PURE__ */ aC(1,...t)),e.lowercase=t=>e.check(/* @__PURE__ */ cC(t)),e.uppercase=t=>e.check(/* @__PURE__ */ lC(t)),e.trim=()=>e.check(/* @__PURE__ */ hC()),e.normalize=(...t)=>e.check(/* @__PURE__ */ mC(...t)),e.toLowerCase=()=>e.check(/* @__PURE__ */ gC()),e.toUpperCase=()=>e.check(/* @__PURE__ */ _C()),e.slugify=()=>e.check(/* @__PURE__ */ vC())}),xw=/*@__PURE__*/ Q(`ZodString`,(e,t)=>{ax.init(e,t),bw.init(e,t),e.email=t=>e.check(/* @__PURE__ */ SS(ww,t)),e.url=t=>e.check(/* @__PURE__ */ OS(Ow,t)),e.jwt=t=>e.check(/* @__PURE__ */ US(Ww,t)),e.emoji=t=>e.check(/* @__PURE__ */ kS(Aw,t)),e.guid=t=>e.check(/* @__PURE__ */ CS(Ew,t)),e.uuid=t=>e.check(/* @__PURE__ */ wS(Dw,t)),e.uuidv4=t=>e.check(/* @__PURE__ */ TS(Dw,t)),e.uuidv6=t=>e.check(/* @__PURE__ */ ES(Dw,t)),e.uuidv7=t=>e.check(/* @__PURE__ */ DS(Dw,t)),e.nanoid=t=>e.check(/* @__PURE__ */ AS(jw,t)),e.guid=t=>e.check(/* @__PURE__ */ CS(Ew,t)),e.cuid=t=>e.check(/* @__PURE__ */ jS(Mw,t)),e.cuid2=t=>e.check(/* @__PURE__ */ MS(Nw,t)),e.ulid=t=>e.check(/* @__PURE__ */ NS(Pw,t)),e.base64=t=>e.check(/* @__PURE__ */ BS(Vw,t)),e.base64url=t=>e.check(/* @__PURE__ */ VS(Hw,t)),e.xid=t=>e.check(/* @__PURE__ */ PS(Fw,t)),e.ksuid=t=>e.check(/* @__PURE__ */ FS(Iw,t)),e.ipv4=t=>e.check(/* @__PURE__ */ IS(Lw,t)),e.ipv6=t=>e.check(/* @__PURE__ */ LS(Rw,t)),e.cidrv4=t=>e.check(/* @__PURE__ */ RS(zw,t)),e.cidrv6=t=>e.check(/* @__PURE__ */ zS(Bw,t)),e.e164=t=>e.check(/* @__PURE__ */ HS(Uw,t)),e.datetime=t=>e.check($C(t)),e.date=t=>e.check(tw(t)),e.time=t=>e.check(rw(t)),e.duration=t=>e.check(aw(t))});function Sw(e){return/* @__PURE__ */ xS(xw,e)}const Cw=/*@__PURE__*/ Q(`ZodStringFormat`,(e,t)=>{ox.init(e,t),bw.init(e,t)}),ww=/*@__PURE__*/ Q(`ZodEmail`,(e,t)=>{lx.init(e,t),Cw.init(e,t)});function Tw(e){return/* @__PURE__ */ SS(ww,e)}const Ew=/*@__PURE__*/ Q(`ZodGUID`,(e,t)=>{sx.init(e,t),Cw.init(e,t)}),Dw=/*@__PURE__*/ Q(`ZodUUID`,(e,t)=>{cx.init(e,t),Cw.init(e,t)}),Ow=/*@__PURE__*/ Q(`ZodURL`,(e,t)=>{ux.init(e,t),Cw.init(e,t)});function kw(e){return/* @__PURE__ */ OS(Ow,e)}const Aw=/*@__PURE__*/ Q(`ZodEmoji`,(e,t)=>{dx.init(e,t),Cw.init(e,t)}),jw=/*@__PURE__*/ Q(`ZodNanoID`,(e,t)=>{fx.init(e,t),Cw.init(e,t)}),Mw=/*@__PURE__*/ Q(`ZodCUID`,(e,t)=>{px.init(e,t),Cw.init(e,t)}),Nw=/*@__PURE__*/ Q(`ZodCUID2`,(e,t)=>{mx.init(e,t),Cw.init(e,t)}),Pw=/*@__PURE__*/ Q(`ZodULID`,(e,t)=>{hx.init(e,t),Cw.init(e,t)}),Fw=/*@__PURE__*/ Q(`ZodXID`,(e,t)=>{gx.init(e,t),Cw.init(e,t)}),Iw=/*@__PURE__*/ Q(`ZodKSUID`,(e,t)=>{_x.init(e,t),Cw.init(e,t)}),Lw=/*@__PURE__*/ Q(`ZodIPv4`,(e,t)=>{Sx.init(e,t),Cw.init(e,t)}),Rw=/*@__PURE__*/ Q(`ZodIPv6`,(e,t)=>{Cx.init(e,t),Cw.init(e,t)}),zw=/*@__PURE__*/ Q(`ZodCIDRv4`,(e,t)=>{wx.init(e,t),Cw.init(e,t)}),Bw=/*@__PURE__*/ Q(`ZodCIDRv6`,(e,t)=>{Tx.init(e,t),Cw.init(e,t)}),Vw=/*@__PURE__*/ Q(`ZodBase64`,(e,t)=>{Dx.init(e,t),Cw.init(e,t)}),Hw=/*@__PURE__*/ Q(`ZodBase64URL`,(e,t)=>{kx.init(e,t),Cw.init(e,t)}),Uw=/*@__PURE__*/ Q(`ZodE164`,(e,t)=>{Ax.init(e,t),Cw.init(e,t)}),Ww=/*@__PURE__*/ Q(`ZodJWT`,(e,t)=>{Mx.init(e,t),Cw.init(e,t)}),Gw=/*@__PURE__*/ Q(`ZodNumber`,(e,t)=>{Nx.init(e,t),yw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>MC(e,t,n,r),e.gt=(t,n)=>e.check(/* @__PURE__ */ tC(t,n)),e.gte=(t,n)=>e.check(/* @__PURE__ */ nC(t,n)),e.min=(t,n)=>e.check(/* @__PURE__ */ nC(t,n)),e.lt=(t,n)=>e.check(/* @__PURE__ */ $S(t,n)),e.lte=(t,n)=>e.check(/* @__PURE__ */ eC(t,n)),e.max=(t,n)=>e.check(/* @__PURE__ */ eC(t,n)),e.int=t=>e.check(Jw(t)),e.safe=t=>e.check(Jw(t)),e.positive=t=>e.check(/* @__PURE__ */ tC(0,t)),e.nonnegative=t=>e.check(/* @__PURE__ */ nC(0,t)),e.negative=t=>e.check(/* @__PURE__ */ $S(0,t)),e.nonpositive=t=>e.check(/* @__PURE__ */ eC(0,t)),e.multipleOf=(t,n)=>e.check(/* @__PURE__ */ rC(t,n)),e.step=(t,n)=>e.check(/* @__PURE__ */ rC(t,n)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Kw(e){return/* @__PURE__ */ JS(Gw,e)}const qw=/*@__PURE__*/ Q(`ZodNumberFormat`,(e,t)=>{Px.init(e,t),Gw.init(e,t)});function Jw(e){return/* @__PURE__ */ YS(qw,e)}const Yw=/*@__PURE__*/ Q(`ZodBoolean`,(e,t)=>{Fx.init(e,t),yw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>NC(e,t,n,r)});function Xw(e){return/* @__PURE__ */ XS(Yw,e)}const Zw=/*@__PURE__*/ Q(`ZodUnknown`,(e,t)=>{Ix.init(e,t),yw.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Qw(){return/* @__PURE__ */ ZS(Zw)}const $w=/*@__PURE__*/ Q(`ZodNever`,(e,t)=>{Lx.init(e,t),yw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>PC(e,t,n,r)});function eT(e){return/* @__PURE__ */ QS($w,e)}const tT=/*@__PURE__*/ Q(`ZodArray`,(e,t)=>{zx.init(e,t),yw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zC(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(/* @__PURE__ */ aC(t,n)),e.nonempty=t=>e.check(/* @__PURE__ */ aC(1,t)),e.max=(t,n)=>e.check(/* @__PURE__ */ iC(t,n)),e.length=(t,n)=>e.check(/* @__PURE__ */ oC(t,n)),e.unwrap=()=>e.element});function nT(e,t){return/* @__PURE__ */ yC(tT,e,t)}const rT=/*@__PURE__*/ Q(`ZodObject`,(e,t)=>{Wx.init(e,t),yw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>BC(e,t,n,r),_y(e,`shape`,()=>t.shape),e.keyof=()=>mT(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Qw()}),e.loose=()=>e.clone({...e._zod.def,catchall:Qw()}),e.strict=()=>e.clone({...e._zod.def,catchall:eT()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>Py(e,t),e.safeExtend=t=>Fy(e,t),e.merge=t=>Iy(e,t),e.pick=t=>My(e,t),e.omit=t=>Ny(e,t),e.partial=(...t)=>Ly(yT,e,t[0]),e.required=(...t)=>Ry(kT,e,t[0])});function iT(e,t){let n={type:`object`,shape:e??{},...$(t)};return new rT(n)}const aT=/*@__PURE__*/ Q(`ZodUnion`,(e,t)=>{Kx.init(e,t),yw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>VC(e,t,n,r),e.options=t.options});function oT(e,t){return new aT({type:`union`,options:e,...$(t)})}const sT=/*@__PURE__*/ Q(`ZodDiscriminatedUnion`,(e,t)=>{aT.init(e,t),qx.init(e,t)});function cT(e,t,n){return new sT({type:`union`,options:t,discriminator:e,...$(n)})}const lT=/*@__PURE__*/ Q(`ZodIntersection`,(e,t)=>{Jx.init(e,t),yw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>HC(e,t,n,r)});function uT(e,t){return new lT({type:`intersection`,left:e,right:t})}const dT=/*@__PURE__*/ Q(`ZodRecord`,(e,t)=>{Zx.init(e,t),yw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>UC(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function fT(e,t,n){return new dT({type:`record`,keyType:e,valueType:t,...$(n)})}const pT=/*@__PURE__*/ Q(`ZodEnum`,(e,t)=>{Qx.init(e,t),yw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>FC(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new pT({...t,checks:[],...$(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 pT({...t,checks:[],...$(r),entries:i})}});function mT(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new pT({type:`enum`,entries:n,...$(t)})}const hT=/*@__PURE__*/ Q(`ZodLiteral`,(e,t)=>{$x.init(e,t),yw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>IC(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 gT(e,t){return new hT({type:`literal`,values:Array.isArray(e)?e:[e],...$(t)})}const _T=/*@__PURE__*/ Q(`ZodTransform`,(e,t)=>{eS.init(e,t),yw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>RC(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new sy(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Wy(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(Wy(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function vT(e){return new _T({type:`transform`,transform:e})}const yT=/*@__PURE__*/ Q(`ZodOptional`,(e,t)=>{nS.init(e,t),yw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ZC(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function bT(e){return new yT({type:`optional`,innerType:e})}const xT=/*@__PURE__*/ Q(`ZodExactOptional`,(e,t)=>{rS.init(e,t),yw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ZC(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ST(e){return new xT({type:`optional`,innerType:e})}const CT=/*@__PURE__*/ Q(`ZodNullable`,(e,t)=>{iS.init(e,t),yw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>WC(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function wT(e){return new CT({type:`nullable`,innerType:e})}const TT=/*@__PURE__*/ Q(`ZodDefault`,(e,t)=>{aS.init(e,t),yw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>KC(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function ET(e,t){return new TT({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Ey(t)}})}const DT=/*@__PURE__*/ Q(`ZodPrefault`,(e,t)=>{sS.init(e,t),yw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qC(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function OT(e,t){return new DT({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Ey(t)}})}const kT=/*@__PURE__*/ Q(`ZodNonOptional`,(e,t)=>{cS.init(e,t),yw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>GC(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function AT(e,t){return new kT({type:`nonoptional`,innerType:e,...$(t)})}const jT=/*@__PURE__*/ Q(`ZodCatch`,(e,t)=>{uS.init(e,t),yw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>JC(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function MT(e,t){return new jT({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}const NT=/*@__PURE__*/ Q(`ZodPipe`,(e,t)=>{dS.init(e,t),yw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>YC(e,t,n,r),e.in=t.in,e.out=t.out});function PT(e,t){return new NT({type:`pipe`,in:e,out:t})}const FT=/*@__PURE__*/ Q(`ZodReadonly`,(e,t)=>{pS.init(e,t),yw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>XC(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function IT(e){return new FT({type:`readonly`,innerType:e})}const LT=/*@__PURE__*/ Q(`ZodCustom`,(e,t)=>{hS.init(e,t),yw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>LC(e,t,n,r)});function RT(e,t={}){return/* @__PURE__ */ bC(LT,e,t)}function zT(e){return/* @__PURE__ */ xC(e)}export{zf as $,_t as $t,Gv as A,_r as At,o_ as B,pt as Bt,Zv as C,wa as Ct,ty as D,pa as Dt,$v as E,ha as Et,Dv as F,At as Ft,Qg as G,St as Gt,Hg as H,ft as Ht,Cv as I,Ot as It,qp as J,mt as Jt,Vg as K,bt as Kt,X_ as L,Tt as Lt,Av as M,Bt as Mt,Bv as N,zt as Nt,Wv as O,R as Ot,Uv as P,Nt as Pt,Zf as Q,F as Qt,D_ as R,wt as Rt,Qv as S,Da as St,ey as T,ma as Tt,n_ as U,ut as Ut,X as V,ht as Vt,t_ as W,vt as Wt,Qf as X,gt as Xt,dp as Y,dt as Yt,$f as Z,yt as Zt,iy as _,yc as _t,mT as a,rf as at,ny as b,Ma as bt,cT as c,id as ct,Kw as d,vl as dt,I as en,jf as et,iT as f,rl as ft,$C as g,Oc as gt,kw as h,Fc as ht,aT as i,f as in,af as it,Vv as j,ur as jt,qv as k,Hi as kt,Tw as l,Yu as lt,Sw as m,Ic as mt,Yw as n,g as nn,mf as nt,nT as o,nf as ot,fT as p,Uc as pt,Kp as q,xt as qt,yT as r,p as rn,df as rt,Xw as s,Kd as st,tT as t,_ as tn,xf as tt,gT as u,vu as ut,ay as v,_c as vt,Yv as w,ga as wt,Xv as x,Aa as xt,ry as y,gc as yt,a_ as z,Ct as zt};
372
+ 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)}}}function DC(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)):Object.assign(i,s),Object.assign(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??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);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)}Object.assign(i,n.def??n.schema);let a=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&(e.target===`draft-2020-12`?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:AC(t,`input`,e.processors),output:AC(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function OC(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 OC(r.element,n);if(r.type===`set`)return OC(r.valueType,n);if(r.type===`lazy`)return OC(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`)return OC(r.innerType,n);if(r.type===`intersection`)return OC(r.left,n)||OC(r.right,n);if(r.type===`record`||r.type===`map`)return OC(r.keyType,n)||OC(r.valueType,n);if(r.type===`pipe`)return OC(r.in,n)||OC(r.out,n);if(r.type===`object`){for(let e in r.shape)if(OC(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(OC(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(OC(e,n))return!0;return!!(r.rest&&OC(r.rest,n))}return!1}const kC=(e,t={})=>n=>{let r=wC({...n,processors:t});return TC(e,r),EC(r,e),DC(r,e)},AC=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=wC({...i??{},target:a,io:t,processors:n});return TC(e,o),EC(o,e),DC(o,e)},jC={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},MC=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=jC[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];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}))])}},NC=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;i.type=typeof s==`string`&&s.includes(`int`)?`integer`:`number`,typeof u==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u),typeof a==`number`&&(i.minimum=a,typeof u==`number`&&t.target!==`draft-04`&&(u>=a?delete i.minimum:delete i.exclusiveMinimum)),typeof l==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l),typeof o==`number`&&(i.maximum=o,typeof l==`number`&&t.target!==`draft-04`&&(l<=o?delete i.maximum:delete i.exclusiveMaximum)),typeof c==`number`&&(i.multipleOf=c)},PC=(e,t,n,r)=>{n.type=`boolean`},FC=(e,t,n,r)=>{n.not={}},IC=(e,t,n,r)=>{let i=e._zod.def,a=dy(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},LC=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);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}},RC=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},zC=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},BC=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=TC(a.element,t,{...r,path:[...r.path,`items`]})},VC=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=TC(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=TC(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},HC=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>TC(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},UC=(e,t,n,r)=>{let i=e._zod.def,a=TC(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=TC(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},WC=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=TC(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else(t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=TC(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=TC(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},GC=(e,t,n,r)=>{let i=e._zod.def,a=TC(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`}]},KC=(e,t,n,r)=>{let i=e._zod.def;TC(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},qC=(e,t,n,r)=>{let i=e._zod.def;TC(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},JC=(e,t,n,r)=>{let i=e._zod.def;TC(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},YC=(e,t,n,r)=>{let i=e._zod.def;TC(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},XC=(e,t,n,r)=>{let i=e._zod.def,a=t.io===`input`?i.in._zod.def.type===`transform`?i.out:i.in:i.out;TC(a,t,r);let o=t.seen.get(e);o.ref=a},ZC=(e,t,n,r)=>{let i=e._zod.def;TC(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},QC=(e,t,n,r)=>{let i=e._zod.def;TC(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},$C=/*@__PURE__*/ Q(`ZodISODateTime`,(e,t)=>{yx.init(e,t),ww.init(e,t)});function ew(e){return/* @__PURE__ */ GS($C,e)}const tw=/*@__PURE__*/ Q(`ZodISODate`,(e,t)=>{bx.init(e,t),ww.init(e,t)});function nw(e){return/* @__PURE__ */ KS(tw,e)}const rw=/*@__PURE__*/ Q(`ZodISOTime`,(e,t)=>{xx.init(e,t),ww.init(e,t)});function iw(e){return/* @__PURE__ */ qS(rw,e)}const aw=/*@__PURE__*/ Q(`ZodISODuration`,(e,t)=>{Sx.init(e,t),ww.init(e,t)});function ow(e){return/* @__PURE__ */ JS(aw,e)}const sw=/* @__PURE__ */ Q(`ZodError`,(e,t)=>{qy.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>Xy(e,t)},flatten:{value:t=>Yy(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,fy,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,fy,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),cw=/* @__PURE__ */ Zy(sw),lw=/* @__PURE__ */ Qy(sw),uw=/* @__PURE__ */ $y(sw),dw=/* @__PURE__ */ tb(sw),fw=/* @__PURE__ */ rb(sw),pw=/* @__PURE__ */ ib(sw),mw=/* @__PURE__ */ ab(sw),hw=/* @__PURE__ */ ob(sw),gw=/* @__PURE__ */ sb(sw),_w=/* @__PURE__ */ cb(sw),vw=/* @__PURE__ */ lb(sw),yw=/* @__PURE__ */ ub(sw),bw=/*@__PURE__*/ Q(`ZodType`,(e,t)=>(ax.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:AC(e,`input`),output:AC(e,`output`)}}),e.toJSONSchema=kC(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(by(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>Ay(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>cw(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>uw(e,t,n),e.parseAsync=async(t,n)=>lw(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>dw(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>fw(e,t,n),e.decode=(t,n)=>pw(e,t,n),e.encodeAsync=async(t,n)=>mw(e,t,n),e.decodeAsync=async(t,n)=>hw(e,t,n),e.safeEncode=(t,n)=>gw(e,t,n),e.safeDecode=(t,n)=>_w(e,t,n),e.safeEncodeAsync=async(t,n)=>vw(e,t,n),e.safeDecodeAsync=async(t,n)=>yw(e,t,n),e.refine=(t,n)=>e.check(zT(t,n)),e.superRefine=t=>e.check(BT(t)),e.overwrite=t=>e.check(/* @__PURE__ */ mC(t)),e.optional=()=>xT(e),e.exactOptional=()=>CT(e),e.nullable=()=>TT(e),e.nullish=()=>xT(TT(e)),e.nonoptional=t=>jT(e,t),e.array=()=>rT(e),e.or=t=>sT([e,t]),e.and=t=>dT(e,t),e.transform=t=>FT(e,yT(t)),e.default=t=>DT(e,t),e.prefault=t=>kT(e,t),e.catch=t=>NT(e,t),e.pipe=t=>FT(e,t),e.readonly=()=>LT(e),e.describe=t=>{let n=e.clone();return xS.add(n,{description:t}),n},Object.defineProperty(e,"description",{get(){return xS.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return xS.get(e);let n=e.clone();return xS.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),xw=/*@__PURE__*/ Q(`_ZodString`,(e,t)=>{ox.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>MC(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(/* @__PURE__ */ cC(...t)),e.includes=(...t)=>e.check(/* @__PURE__ */ dC(...t)),e.startsWith=(...t)=>e.check(/* @__PURE__ */ fC(...t)),e.endsWith=(...t)=>e.check(/* @__PURE__ */ pC(...t)),e.min=(...t)=>e.check(/* @__PURE__ */ oC(...t)),e.max=(...t)=>e.check(/* @__PURE__ */ aC(...t)),e.length=(...t)=>e.check(/* @__PURE__ */ sC(...t)),e.nonempty=(...t)=>e.check(/* @__PURE__ */ oC(1,...t)),e.lowercase=t=>e.check(/* @__PURE__ */ lC(t)),e.uppercase=t=>e.check(/* @__PURE__ */ uC(t)),e.trim=()=>e.check(/* @__PURE__ */ gC()),e.normalize=(...t)=>e.check(/* @__PURE__ */ hC(...t)),e.toLowerCase=()=>e.check(/* @__PURE__ */ _C()),e.toUpperCase=()=>e.check(/* @__PURE__ */ vC()),e.slugify=()=>e.check(/* @__PURE__ */ yC())}),Sw=/*@__PURE__*/ Q(`ZodString`,(e,t)=>{ox.init(e,t),xw.init(e,t),e.email=t=>e.check(/* @__PURE__ */ CS(Tw,t)),e.url=t=>e.check(/* @__PURE__ */ kS(kw,t)),e.jwt=t=>e.check(/* @__PURE__ */ WS(Gw,t)),e.emoji=t=>e.check(/* @__PURE__ */ AS(jw,t)),e.guid=t=>e.check(/* @__PURE__ */ wS(Dw,t)),e.uuid=t=>e.check(/* @__PURE__ */ TS(Ow,t)),e.uuidv4=t=>e.check(/* @__PURE__ */ ES(Ow,t)),e.uuidv6=t=>e.check(/* @__PURE__ */ DS(Ow,t)),e.uuidv7=t=>e.check(/* @__PURE__ */ OS(Ow,t)),e.nanoid=t=>e.check(/* @__PURE__ */ jS(Mw,t)),e.guid=t=>e.check(/* @__PURE__ */ wS(Dw,t)),e.cuid=t=>e.check(/* @__PURE__ */ MS(Nw,t)),e.cuid2=t=>e.check(/* @__PURE__ */ NS(Pw,t)),e.ulid=t=>e.check(/* @__PURE__ */ PS(Fw,t)),e.base64=t=>e.check(/* @__PURE__ */ VS(Hw,t)),e.base64url=t=>e.check(/* @__PURE__ */ HS(Uw,t)),e.xid=t=>e.check(/* @__PURE__ */ FS(Iw,t)),e.ksuid=t=>e.check(/* @__PURE__ */ IS(Lw,t)),e.ipv4=t=>e.check(/* @__PURE__ */ LS(Rw,t)),e.ipv6=t=>e.check(/* @__PURE__ */ RS(zw,t)),e.cidrv4=t=>e.check(/* @__PURE__ */ zS(Bw,t)),e.cidrv6=t=>e.check(/* @__PURE__ */ BS(Vw,t)),e.e164=t=>e.check(/* @__PURE__ */ US(Ww,t)),e.datetime=t=>e.check(ew(t)),e.date=t=>e.check(nw(t)),e.time=t=>e.check(iw(t)),e.duration=t=>e.check(ow(t))});function Cw(e){return/* @__PURE__ */ SS(Sw,e)}const ww=/*@__PURE__*/ Q(`ZodStringFormat`,(e,t)=>{sx.init(e,t),xw.init(e,t)}),Tw=/*@__PURE__*/ Q(`ZodEmail`,(e,t)=>{ux.init(e,t),ww.init(e,t)});function Ew(e){return/* @__PURE__ */ CS(Tw,e)}const Dw=/*@__PURE__*/ Q(`ZodGUID`,(e,t)=>{cx.init(e,t),ww.init(e,t)}),Ow=/*@__PURE__*/ Q(`ZodUUID`,(e,t)=>{lx.init(e,t),ww.init(e,t)}),kw=/*@__PURE__*/ Q(`ZodURL`,(e,t)=>{dx.init(e,t),ww.init(e,t)});function Aw(e){return/* @__PURE__ */ kS(kw,e)}const jw=/*@__PURE__*/ Q(`ZodEmoji`,(e,t)=>{fx.init(e,t),ww.init(e,t)}),Mw=/*@__PURE__*/ Q(`ZodNanoID`,(e,t)=>{px.init(e,t),ww.init(e,t)}),Nw=/*@__PURE__*/ Q(`ZodCUID`,(e,t)=>{mx.init(e,t),ww.init(e,t)}),Pw=/*@__PURE__*/ Q(`ZodCUID2`,(e,t)=>{hx.init(e,t),ww.init(e,t)}),Fw=/*@__PURE__*/ Q(`ZodULID`,(e,t)=>{gx.init(e,t),ww.init(e,t)}),Iw=/*@__PURE__*/ Q(`ZodXID`,(e,t)=>{_x.init(e,t),ww.init(e,t)}),Lw=/*@__PURE__*/ Q(`ZodKSUID`,(e,t)=>{vx.init(e,t),ww.init(e,t)}),Rw=/*@__PURE__*/ Q(`ZodIPv4`,(e,t)=>{Cx.init(e,t),ww.init(e,t)}),zw=/*@__PURE__*/ Q(`ZodIPv6`,(e,t)=>{wx.init(e,t),ww.init(e,t)}),Bw=/*@__PURE__*/ Q(`ZodCIDRv4`,(e,t)=>{Tx.init(e,t),ww.init(e,t)}),Vw=/*@__PURE__*/ Q(`ZodCIDRv6`,(e,t)=>{Ex.init(e,t),ww.init(e,t)}),Hw=/*@__PURE__*/ Q(`ZodBase64`,(e,t)=>{Ox.init(e,t),ww.init(e,t)}),Uw=/*@__PURE__*/ Q(`ZodBase64URL`,(e,t)=>{Ax.init(e,t),ww.init(e,t)}),Ww=/*@__PURE__*/ Q(`ZodE164`,(e,t)=>{jx.init(e,t),ww.init(e,t)}),Gw=/*@__PURE__*/ Q(`ZodJWT`,(e,t)=>{Nx.init(e,t),ww.init(e,t)}),Kw=/*@__PURE__*/ Q(`ZodNumber`,(e,t)=>{Px.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>NC(e,t,n,r),e.gt=(t,n)=>e.check(/* @__PURE__ */ nC(t,n)),e.gte=(t,n)=>e.check(/* @__PURE__ */ rC(t,n)),e.min=(t,n)=>e.check(/* @__PURE__ */ rC(t,n)),e.lt=(t,n)=>e.check(/* @__PURE__ */ eC(t,n)),e.lte=(t,n)=>e.check(/* @__PURE__ */ tC(t,n)),e.max=(t,n)=>e.check(/* @__PURE__ */ tC(t,n)),e.int=t=>e.check(Yw(t)),e.safe=t=>e.check(Yw(t)),e.positive=t=>e.check(/* @__PURE__ */ nC(0,t)),e.nonnegative=t=>e.check(/* @__PURE__ */ rC(0,t)),e.negative=t=>e.check(/* @__PURE__ */ eC(0,t)),e.nonpositive=t=>e.check(/* @__PURE__ */ tC(0,t)),e.multipleOf=(t,n)=>e.check(/* @__PURE__ */ iC(t,n)),e.step=(t,n)=>e.check(/* @__PURE__ */ iC(t,n)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function qw(e){return/* @__PURE__ */ YS(Kw,e)}const Jw=/*@__PURE__*/ Q(`ZodNumberFormat`,(e,t)=>{Fx.init(e,t),Kw.init(e,t)});function Yw(e){return/* @__PURE__ */ XS(Jw,e)}const Xw=/*@__PURE__*/ Q(`ZodBoolean`,(e,t)=>{Ix.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>PC(e,t,n,r)});function Zw(e){return/* @__PURE__ */ ZS(Xw,e)}const Qw=/*@__PURE__*/ Q(`ZodUnknown`,(e,t)=>{Lx.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function $w(){return/* @__PURE__ */ QS(Qw)}const eT=/*@__PURE__*/ Q(`ZodNever`,(e,t)=>{Rx.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>FC(e,t,n,r)});function tT(e){return/* @__PURE__ */ $S(eT,e)}const nT=/*@__PURE__*/ Q(`ZodArray`,(e,t)=>{Bx.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>BC(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(/* @__PURE__ */ oC(t,n)),e.nonempty=t=>e.check(/* @__PURE__ */ oC(1,t)),e.max=(t,n)=>e.check(/* @__PURE__ */ aC(t,n)),e.length=(t,n)=>e.check(/* @__PURE__ */ sC(t,n)),e.unwrap=()=>e.element});function rT(e,t){return/* @__PURE__ */ bC(nT,e,t)}const iT=/*@__PURE__*/ Q(`ZodObject`,(e,t)=>{Gx.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>VC(e,t,n,r),vy(e,`shape`,()=>t.shape),e.keyof=()=>hT(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:$w()}),e.loose=()=>e.clone({...e._zod.def,catchall:$w()}),e.strict=()=>e.clone({...e._zod.def,catchall:tT()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>Fy(e,t),e.safeExtend=t=>Iy(e,t),e.merge=t=>Ly(e,t),e.pick=t=>Ny(e,t),e.omit=t=>Py(e,t),e.partial=(...t)=>Ry(bT,e,t[0]),e.required=(...t)=>zy(AT,e,t[0])});function aT(e,t){let n={type:`object`,shape:e??{},...$(t)};return new iT(n)}const oT=/*@__PURE__*/ Q(`ZodUnion`,(e,t)=>{qx.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>HC(e,t,n,r),e.options=t.options});function sT(e,t){return new oT({type:`union`,options:e,...$(t)})}const cT=/*@__PURE__*/ Q(`ZodDiscriminatedUnion`,(e,t)=>{oT.init(e,t),Jx.init(e,t)});function lT(e,t,n){return new cT({type:`union`,options:t,discriminator:e,...$(n)})}const uT=/*@__PURE__*/ Q(`ZodIntersection`,(e,t)=>{Yx.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>UC(e,t,n,r)});function dT(e,t){return new uT({type:`intersection`,left:e,right:t})}const fT=/*@__PURE__*/ Q(`ZodRecord`,(e,t)=>{Qx.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>WC(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function pT(e,t,n){return new fT({type:`record`,keyType:e,valueType:t,...$(n)})}const mT=/*@__PURE__*/ Q(`ZodEnum`,(e,t)=>{$x.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>IC(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new mT({...t,checks:[],...$(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 mT({...t,checks:[],...$(r),entries:i})}});function hT(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new mT({type:`enum`,entries:n,...$(t)})}const gT=/*@__PURE__*/ Q(`ZodLiteral`,(e,t)=>{eS.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>LC(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 _T(e,t){return new gT({type:`literal`,values:Array.isArray(e)?e:[e],...$(t)})}const vT=/*@__PURE__*/ Q(`ZodTransform`,(e,t)=>{tS.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zC(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new cy(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Gy(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(Gy(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function yT(e){return new vT({type:`transform`,transform:e})}const bT=/*@__PURE__*/ Q(`ZodOptional`,(e,t)=>{rS.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>QC(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function xT(e){return new bT({type:`optional`,innerType:e})}const ST=/*@__PURE__*/ Q(`ZodExactOptional`,(e,t)=>{iS.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>QC(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function CT(e){return new ST({type:`optional`,innerType:e})}const wT=/*@__PURE__*/ Q(`ZodNullable`,(e,t)=>{aS.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>GC(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function TT(e){return new wT({type:`nullable`,innerType:e})}const ET=/*@__PURE__*/ Q(`ZodDefault`,(e,t)=>{oS.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qC(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function DT(e,t){return new ET({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Dy(t)}})}const OT=/*@__PURE__*/ Q(`ZodPrefault`,(e,t)=>{cS.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>JC(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function kT(e,t){return new OT({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Dy(t)}})}const AT=/*@__PURE__*/ Q(`ZodNonOptional`,(e,t)=>{lS.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>KC(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function jT(e,t){return new AT({type:`nonoptional`,innerType:e,...$(t)})}const MT=/*@__PURE__*/ Q(`ZodCatch`,(e,t)=>{dS.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>YC(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function NT(e,t){return new MT({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}const PT=/*@__PURE__*/ Q(`ZodPipe`,(e,t)=>{fS.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>XC(e,t,n,r),e.in=t.in,e.out=t.out});function FT(e,t){return new PT({type:`pipe`,in:e,out:t})}const IT=/*@__PURE__*/ Q(`ZodReadonly`,(e,t)=>{mS.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ZC(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function LT(e){return new IT({type:`readonly`,innerType:e})}const RT=/*@__PURE__*/ Q(`ZodCustom`,(e,t)=>{gS.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>RC(e,t,n,r)});function zT(e,t={}){return/* @__PURE__ */ xC(RT,e,t)}function BT(e){return/* @__PURE__ */ SC(e)}export{Zf as $,F as $t,Kv as A,Hi as At,s_ as B,Ct as Bt,Qv as C,Da as Ct,ny as D,ha as Dt,ey as E,ma as Et,Ov as F,Nt as Ft,n_ as G,vt as Gt,Hg as H,ht as Ht,wv as I,At as It,Kp as J,xt as Jt,Qg as K,St as Kt,Z_ as L,Ot as Lt,jv as M,ur as Mt,Vv as N,Bt as Nt,Gv as O,pa as Ot,Wv as P,zt as Pt,$f as Q,yt as Qt,O_ as R,Tt as Rt,$v as S,Aa as St,ty as T,ga as Tt,$g as U,ft as Ut,X as V,pt as Vt,r_ as W,ut as Wt,dp as X,dt as Xt,qp as Y,mt as Yt,Qf as Z,gt as Zt,ay as _,Oc as _t,hT as a,f as an,af as at,ry as b,gc as bt,lT as c,Kd as ct,qw as d,vu as dt,_t as en,zf as et,aT as f,vl as ft,ew as g,Fc as gt,Aw as h,Ic as ht,oT as i,p as in,df as it,Hv as j,_r as jt,Jv as k,R as kt,Ew as l,id as lt,Cw as m,Uc as mt,Xw as n,_ as nn,xf as nt,rT as o,rf as ot,pT as p,rl as pt,Vg as q,bt as qt,bT as r,g as rn,mf as rt,Zw as s,nf as st,nT as t,I as tn,jf as tt,_T as u,Yu as ut,oy as v,yc as vt,Xv as w,wa as wt,Zv as x,Ma as xt,iy as y,_c as yt,o_ as z,wt as zt};