@mintlify/cli 4.1.47 → 4.1.49

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.
@@ -274,7 +274,7 @@ Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=1
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
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
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`,`track`,`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__ */
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`,`Table`,`Table.Header`,`Table.Body`,`Table.Row`,`Table.HeaderCell`,`Table.RowHeader`,`Table.Cell`,`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`,`track`,`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
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
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(`