@squadrules/mcp 5.13.2 → 5.13.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.tsbuildinfo +1 -1
- package/dist/embed-docs/mem/adapter-migration.md +1 -1
- package/dist/embed-docs/mem/author-adapter.md +1 -1
- package/dist/embed-docs/mem/bulk-insert-adapters-via-cli.md +1 -1
- package/dist/embed-docs/mem/challenge-type-guide.md +1 -1
- package/dist/embed-docs/mem/critic-loop-guide.md +1 -1
- package/dist/embed-docs/mem/critic-loop.md +1 -1
- package/dist/embed-docs/mem/protocol-linking-guide.md +1 -1
- package/dist/embed-docs/mem/refine-search.md +1 -1
- package/dist/resources/embedded-mcp-resources.js +8 -8
- package/dist/ui/assets/{AccountPage-4bmTctDC.js → AccountPage-Cd9wftT9.js} +1 -1
- package/dist/ui/assets/{ErrorAlert-BoPXaBKG.js → ErrorAlert-qmNLhpk4.js} +1 -1
- package/dist/ui/assets/{HomePage-B--ESwM9.js → HomePage-Ga56z2EY.js} +1 -1
- package/dist/ui/assets/{NotFoundPage-bTE_mpMC.js → NotFoundPage-CylTrT2a.js} +1 -1
- package/dist/ui/assets/{ProtocolDetailPage-DaLHkEk6.js → ProtocolDetailPage-BnrpXoJl.js} +1 -1
- package/dist/ui/assets/{ProtocolEditPage-si6FjgFJ.js → ProtocolEditPage-BIJBR_pt.js} +1 -1
- package/dist/ui/assets/{RunGuidedPage-51zvt69k.js → RunGuidedPage-BaN5aal6.js} +1 -1
- package/dist/ui/assets/{RunsPage-BSgcu2TO.js → RunsPage-CmKpmp3u.js} +1 -1
- package/dist/ui/assets/{SkillBundlePage-DjISl_TJ.js → SkillBundlePage-DMEGOp3-.js} +1 -1
- package/dist/ui/assets/{SpaceSelect-D3al0TgQ.js → SpaceSelect-BxR_Y_bD.js} +1 -1
- package/dist/ui/assets/{SquadrulesPage-C37VEZnc.js → SquadrulesPage-DndbgrFI.js} +1 -1
- package/dist/ui/assets/{StepFlowGraph-BXsWPPO0.js → StepFlowGraph-O8HTLdy_.js} +1 -1
- package/dist/ui/assets/{export-skill-zip-CHfMqCRE.js → export-skill-zip-CzFbV9LF.js} +1 -1
- package/dist/ui/assets/{index-B3Ru1FEW.js → index-B_nIor2S.js} +3 -3
- package/dist/ui/assets/{vendor-xESPQGR9.js → vendor-WsU_UJPA.js} +2 -2
- package/dist/ui/index.html +2 -2
- package/package.json +3 -3
|
@@ -26,6 +26,6 @@ import{n as e,r as t,t as n}from"./rolldown-runtime-hePW80VL.js";import{i as r,t
|
|
|
26
26
|
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
27
27
|
`,...a.current()}),u=l.charCodeAt(0);return(u===9||u===32)&&(l=_p(u)+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}bp.peek=xp;function bp(e){return e.value||``}function xp(){return`<`}Sp.peek=Cp;function Sp(e,t,n,r){let i=dp(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function Cp(){return`!`}wp.peek=Tp;function wp(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Tp(){return`!`}Ep.peek=Dp;function Ep(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e);if(!e.atBreak)continue;let i;for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function Dp(){return"`"}function Op(e,t){let n=ns(e);return!(t.options.resourceLink||!e.url||e.title||!e.children||e.children.length!==1||e.children[0].type!==`text`||n!==e.url&&`mailto:`+n!==e.url||!/^[a-z][+\-.a-z]+:/i.test(e.url)||/[\0- <>\u007F]/.test(e.url))}kp.peek=Ap;function kp(e,t,n,r){let i=dp(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r);if(Op(e,n)){let t=n.stack;n.stack=t.filter(function(e){return e!==`phrasing`});let r=n.enter(`autolink`),i=o.move(`<`);return i+=o.move(n.containerPhrasing(e,{before:i,after:`>`,...o.current()})),i+=o.move(`>`),r(),n.stack=t,i}let s=n.enter(`link`),c=n.enter(`label`),l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function Ap(e,t,n){return Op(e,n)?`<`:`[`}jp.peek=Mp;function jp(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Mp(){return`[`}function Np(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Pp(e){let t=Np(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Fp(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Ip(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Lp(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?Fp(n):Np(n),s=e.ordered?o===`.`?`)`:`.`:Pp(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),Ip(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function Rp(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function zp(e,t,n,r){let i=Rp(n),a=n.bulletCurrent||Np(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function Bp(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function Vp(e,t,n,r){if(!e.children.some(function(e){return ep(e)}))return n.containerFlow(e,r);let i=n.enter(`phrasing`),a=n.containerPhrasing(e,r);return i(),a}function Hp(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Up.attention=Wp,Up.peek=Gp;function Up(e,t,n,r){let i=n.enter(`phrasing`),a=n.containerPhrasing({type:`root`,children:[e]},r);return i(),a}function Wp(e,t){return{construct:`strong`,markers:Hp(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[2]}}function Gp(e,t,n){return n.options.strong||`*`}function Kp(e,t,n,r){let i=t?t.children:[],a=i.indexOf(e);return n.safe(e.value,{...r,afterNode:i[a+1],beforeNode:i[a-1]})}function qp(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Jp(e,t,n){let r=(Ip(n)+(n.options.ruleSpaces?` `:``)).repeat(qp(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Yp={blockquote:tp,break:ap,code:lp,definition:fp,emphasis:mp,hardBreak:ap,heading:yp,html:bp,image:Sp,imageReference:wp,inlineCode:Ep,link:kp,linkReference:jp,list:Lp,listItem:zp,paragraph:Bp,root:Vp,strong:Up,text:Kp,thematicBreak:Jp};function Xp(){return{enter:{table:Zp,tableData:tm,tableHeader:tm,tableRow:$p},exit:{codeText:nm,table:Qp,tableData:em,tableHeader:em,tableRow:em}}}function Zp(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function Qp(e){this.exit(e),this.data.inTable=void 0}function $p(e){this.enter({type:`tableRow`,children:[]},e)}function em(e){this.exit(e)}function tm(e){this.enter({type:`tableCell`,children:[]},e)}function nm(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,rm));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function rm(e,t){return t===`|`?t:e}function im(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
28
28
|
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
29
|
-
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return Zf(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=Yp.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function am(){return{exit:{taskListCheckValueChecked:sm,taskListCheckValueUnchecked:sm,paragraph:cm}}}function om(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:lm}}}function sm(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function cm(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function lm(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=Yp.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function um(){return[mf(),Rf(),Uf(),Xp(),am()]}function dm(e){return{extensions:[hf(),zf(e),Wf(),im(e),om()]}}var fm={tokenize:Em,partial:!0},pm={tokenize:Dm,partial:!0},mm={tokenize:Om,partial:!0},hm={tokenize:km,partial:!0},gm={tokenize:Am,partial:!0},_m={name:`wwwAutolink`,tokenize:wm,previous:jm},vm={name:`protocolAutolink`,tokenize:Tm,previous:Mm},ym={name:`emailAutolink`,tokenize:Cm,previous:Nm},bm={};function xm(){return{text:bm}}for(var Sm=48;Sm<123;)bm[Sm]=ym,Sm++,Sm===58?Sm=65:Sm===91&&(Sm=97);bm[43]=ym,bm[45]=ym,bm[46]=ym,bm[95]=ym,bm[72]=[ym,vm],bm[104]=[ym,vm],bm[87]=[ym,_m],bm[119]=[ym,_m];function Cm(e,t,n){let r=this,i,a;return o;function o(t){return!Pm(t)||!Nm.call(r,r.previous)||Fm(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return Pm(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(gm,u,l)(t):t===45||t===95||H(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&V(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function wm(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!jm.call(r,r.previous)||Fm(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(fm,e.attempt(pm,e.attempt(mm,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function Tm(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&Mm.call(r,r.previous)&&!Fm(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(V(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||_s(t)||W(t)||Ss(t)||xs(t)?n(t):e.attempt(pm,e.attempt(mm,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function Em(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function Dm(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(hm,c,s)(t):t===null||W(t)||Ss(t)||t!==45&&xs(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function Om(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(hm,t,a)(o):o===null||W(o)||Ss(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function km(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||W(o)||Ss(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||W(e)||Ss(e)?t(e):r(e)}function a(e){return V(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):V(t)?(e.consume(t),o):n(t)}}function Am(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return H(e)?n(e):t(e)}}function jm(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||W(e)}function Mm(e){return!V(e)}function Nm(e){return!(e===47||Pm(e))}function Pm(e){return e===43||e===45||e===46||e===95||H(e)}function Fm(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var Im={tokenize:Wm,partial:!0};function Lm(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Vm,continuation:{tokenize:Hm},exit:Um}},text:{91:{name:`gfmFootnoteCall`,tokenize:Bm},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Rm,resolveTo:zm}}}}function Rm(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=hs(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function zm(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function Bm(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||W(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(hs(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return W(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Vm(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||W(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=hs(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return W(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),K(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function Hm(e,t,n){return e.check(zs,t,e.attempt(Im,t,n))}function Um(e){e.exit(`gfmFootnoteDefinition`)}function Wm(e,t,n){let r=this;return K(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Gm(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&cs(o,o.length,0,Ms(s,e.slice(r+1,n),t)),cs(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),cs(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=js(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=js(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Km=class{constructor(){this.map=[]}add(e,t,n){qm(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function qm(e,t,n,r){let i=0;if(n!==0||r.length!==0){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function Jm(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function Ym(){return{flow:{null:{name:`table`,tokenize:Xm,resolveAll:Zm}}}}function Xm(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):U(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):G(t)?K(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||W(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,G(t)?K(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return G(t)?K(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||U(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return G(t)?K(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||U(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||U(n)?(e.exit(`tableRow`),t(n)):G(n)?K(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||W(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function Zm(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Km;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&($m(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=Qm(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=Qm(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=Qm(f,t,o,i,n,d)):(o[0]=o[1],d=Qm(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&$m(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Jm(t.events,n))}return e}function Qm(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},eh(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=eh(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=eh(t.events,n[2]),a=eh(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},eh(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function $m(e,t,n,r,i){let a=[],o=eh(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function eh(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var th={name:`tasklistCheck`,tokenize:rh};function nh(){return{text:{91:th}}}function rh(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return W(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return U(r)?t(r):G(r)?e.check({tokenize:ih},t,n)(r):n(r)}}function ih(e,t,n){return K(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function ah(e){return ds([xm(),Lm(),Gm(e),Ym(),nh()])}var oh={};function sh(e){let t=this,n=e||oh,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(ah(n)),a.push(um()),o.push(dm(n))}function ch(e,t=`|`){return e.map(e=>Sh(e)).join(t)}function lh(e,t){return typeof t==`bigint`?t.toString():t}function uh(e){return e==null}function dh(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function fh(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ph(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function mh(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function hh(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var gh=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function _h(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function vh(e){if(_h(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return _h(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function yh(e){return vh(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function bh(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function xh(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function q(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 Sh(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}var Ch={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},wh={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function Th(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 Eh(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Dh(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Oh(e){return typeof e==`string`?e:e?.message}function kh(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function Ah(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:Oh(e.inst?._zod.def?.error?.(e))??Oh(a?.(e))??Oh(t?.error?.(e))??Oh(n.customError?.(e))??Oh(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var jh=/[\uD800-\uDBFF]/;function Mh(e){let t=e.length;if(!jh.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function Nh(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Ph(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function Fh(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function Ih(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Bh(e,n,r.value)}}function Lh(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function Rh(e,t,n){return Lh(e,t,n,!1)}function zh(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return Lh(this,n,r(this))},set(e){Lh(this,n,e)}})}return t}function Bh(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:Lh(this,t,n.bind(this))},set(e){Lh(this,t,e)}})}var Vh,Hh=!1,Uh={configurable:!0,get(){Hh=!0}};function J(e,t,n){let r=Object.getPrototypeOf(e._zod);t in r&&Vh!==e._zod?Vh=void 0:(Vh=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Uh);let e=Hh;Hh=!1;try{let r=n(this);return Hh?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),Hh||=e,r}catch(n){throw delete this[t],Hh||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}var Wh=`~constantCatch`;function Gh(e){let t=()=>e;return t[Wh]=!0,t}var Kh,qh={value:void 0,enumerable:!1},Jh=`captureStackTrace`in Error?Error:null;function Yh(e){let t=Jh;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return Jh=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function Y(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){qh.value=new a(r);try{Object.defineProperty(n,"_zod",qh)}finally{qh.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),Ih(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?Yh(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var Xh=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Zh=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(Kh=globalThis).__zod_globalConfig??(Kh.__zod_globalConfig={});var Qh=globalThis.__zod_globalConfig;function $h(e){return e&&Object.assign(Qh,e),Qh}function eg(){let e=this._zod;return e.message??=JSON.stringify(e.def,lh,2),e.message}function tg(e){this._zod.message=e}var ng={get:eg,set:tg,enumerable:!0,configurable:!0},rg={value:void 0,enumerable:!1},ig=new WeakSet([Object.prototype,Error.prototype]),ag=(e,t)=>{e.name=`$ZodError`,rg.value=t,Object.defineProperty(e,"issues",rg),rg.value=void 0,Object.defineProperty(e,"message",ng);let n=Object.getPrototypeOf(e);ig.has(n)||(ig.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},og=Y(`$ZodError`,ag);Y(`$ZodError`,ag,void 0,{Parent:Error});function sg(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function cg(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?sg(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function lg(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function ug(e,t){return{callee:t?.callee??e,Err:t?.Err}}var dg=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new Xh;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Ah(e,o,$h())));throw gh(n,a?.callee??t),n}return s.value};return t},fg=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Ah(e,o,$h())));throw gh(n,a?.callee??t),n}return s.value};return t},pg=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 Xh;return a.issues.length?mg(e,a.issues,i):{success:!0,data:a.value}};function mg(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>Ah(e,n,$h()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var hg=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?mg(e,a.issues,i):{success:!0,data:a.value}},gg=Symbol.for(`zod.compile.invalid`),_g=Symbol.for(`zod.compile.fallback`),vg=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==gg)return!0;if(r.definite===!0&&n===void 0)return!1}return yg(e,t,n)});function yg(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[_g]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new Xh;return a.issues.length===0}var bg=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},xg=e=>{let t=dg(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,ug(n,a))};return n},Sg=e=>{let t=dg(e),n=(e,r,i,a)=>t(e,r,i,ug(n,a));return n},Cg=e=>{let t=fg(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,ug(n,a))};return n},wg=e=>{let t=fg(e),n=async(e,r,i,a)=>await t(e,r,i,ug(n,a));return n},Tg=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return pg(e)(t,n,i)},Eg=e=>(t,n,r)=>pg(e)(t,n,r),Dg=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return hg(e)(t,n,i)},Og=e=>async(t,n,r)=>hg(e)(t,n,r),kg=/^[cC][0-9a-z]{6,}$/,Ag=/^[0-9a-z]+$/,jg=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Mg=/^[0-9a-vA-V]{20}$/,Ng=/^[A-Za-z0-9]{27}$/,Pg=/^[a-zA-Z0-9_-]{21}$/;function Fg(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Ig=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Lg=/^([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})$/,Rg=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)$/,zg=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Bg=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function Vg(){return new RegExp(Bg,`u`)}var Hg=/^(?:(?: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])$/,Ug=/^(([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}|:))$/,Wg=/^((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])$/,Gg=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Kg=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,qg=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,Jg=/^https?$/,Yg=/^\+[1-9]\d{6,14}$/,Xg=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;function Zg(e){return RegExp(`^${e}$`)}var Qg=Zg(Xg);function $g(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function e_(e){return RegExp(`^${$g(e)}$`)}function t_(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${$g({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${$g({precision:e.precision})}`:n;return RegExp(`^${Xg}T(?:${r})$`)}var n_=/^[\s\S]{0,}$/,r_=/^[^A-Z]*$/,i_=/^[^a-z]*$/,a_=Y(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),o_=e=>{let t=e.value;return!uh(t)&&t.length!==void 0},s_=Y(`$ZodCheckMaxLength`,(e,t)=>{var n;a_.init(e,t),(n=e._zod.def).when??(n.when=o_),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?Mh(r):i)<=t.maximum)return;let a=Nh(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),c_=Y(`$ZodCheckMinLength`,(e,t)=>{var n;a_.init(e,t),(n=e._zod.def).when??(n.when=o_),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?Mh(r):i)>=t.minimum)return;let a=Nh(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),l_=Y(`$ZodCheckLengthEquals`,(e,t)=>{var n;a_.init(e,t),(n=e._zod.def).when??(n.when=o_),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?Mh(r):i;if(a===t.length)return;let o=Nh(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),u_=Y(`$ZodCheckStringFormat`,(e,t)=>{var n,r;a_.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),d_=Y(`$ZodCheckRegex`,(e,t)=>{u_.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})}}),f_=Y(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=r_,u_.init(e,t)}),p_=Y(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=i_,u_.init(e,t)}),m_=Y(`$ZodCheckIncludes`,(e,t)=>{a_.init(e,t);let n=bh(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),h_=Y(`$ZodCheckStartsWith`,(e,t)=>{a_.init(e,t);let n=RegExp(`^${bh(t.prefix)}.*`);t.pattern??=n,e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),g_=Y(`$ZodCheckEndsWith`,(e,t)=>{a_.init(e,t);let n=RegExp(`.*${bh(t.suffix)}$`);t.pattern??=n,e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),__=Y(`$ZodCheckOverwrite`,(e,t)=>{a_.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),v_={major:4,minor:6,patch:5},X=Y(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=v_;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=Th(t),a;for(let o of n){if(o._zod.def.when){if(Eh(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new Xh;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(kh(t.issues,n,e),i||=Th(t,n))});else{if(t.issues.length===n)continue;kh(t.issues,n,e),i||=Th(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(Th(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new Xh;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new Xh;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return Rh(this,`~standard`,x_(this))},set"~standard"(e){Lh(this,`~standard`,e)}}),y_=(e,t)=>e.issues.length?{issues:e.issues.map(e=>Ah(e,t,$h()))}:{value:e.value};async function b_(e,t){let n={async:!0};return y_(await e._zod.run({value:t,issues:[]},n),n)}function x_(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return y_(r,n)}catch{}return b_(e,t)},vendor:`zod`,version:1}}var S_=Y(`$ZodString`,(e,t)=>{X.init(e,t),e._zod.pattern=t.pattern??n_,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}}),Z=Y(`$ZodStringFormat`,(e,t)=>{u_.init(e,t),S_.init(e,t)}),C_=Y(`$ZodGUID`,(e,t)=>{t.pattern??=Lg,Z.init(e,t)}),w_=Y(`$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??=Rg(e)}else t.pattern??=Rg();Z.init(e,t)}),T_=Y(`$ZodEmail`,(e,t)=>{t.pattern??=zg,Z.init(e,t)});function E_(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function D_(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?E_(e)||2:O_(e,t)}function O_(e,t){if(!t.normalize&&t.protocol?.source===Jg.source&&!/^https?:\/\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}var k_=/[\t\n\r]/g;function A_(e){return e.replace(k_,``)}function j_(e,t){return t.lastIndex=0,t.test(e.hostname)}function M_(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var N_=Y(`$ZodURL`,(e,t)=>{Z.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=D_(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=A_(r);return}t.hostname&&!j_(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!M_(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:A_(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),P_=Y(`$ZodEmoji`,(e,t)=>{t.pattern??=Vg(),Z.init(e,t)}),F_=Y(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?Pg:Fg(t.length),Z.init(e,t)}),I_=Y(`$ZodCUID`,(e,t)=>{t.pattern??=kg,Z.init(e,t)}),L_=Y(`$ZodCUID2`,(e,t)=>{t.pattern??=Ag,Z.init(e,t)}),R_=Y(`$ZodULID`,(e,t)=>{t.pattern??=jg,Z.init(e,t)}),z_=Y(`$ZodXID`,(e,t)=>{t.pattern??=Mg,Z.init(e,t)}),B_=Y(`$ZodKSUID`,(e,t)=>{t.pattern??=Ng,Z.init(e,t)}),V_=Y(`$ZodISODateTime`,(e,t)=>{t.pattern??=t_(t),Z.init(e,t)}),H_=Y(`$ZodISODate`,(e,t)=>{t.pattern??=Qg,Z.init(e,t)}),U_=Y(`$ZodISOTime`,(e,t)=>{t.pattern??=e_(t),Z.init(e,t)}),W_=Y(`$ZodISODuration`,(e,t)=>{t.pattern??=Ig,Z.init(e,t)}),G_=Y(`$ZodIPv4`,(e,t)=>{t.pattern??=Hg,Z.init(e,t)}),K_=/^[0-9a-fA-F:.]+$/;function q_(e){return K_.test(e)?E_(`http://[${e}]`):!1}var J_=Y(`$ZodIPv6`,(e,t)=>{t.pattern??=Ug,Z.init(e,t),e._zod.check=n=>{q_(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),Y_=Y(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Wg,Z.init(e,t)});function X_(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:q_(n)}var Z_=Y(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Gg,Z.init(e,t),e._zod.check=n=>{X_(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function Q_(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var $_=/^[0-9a-zA-Z+/]*={0,2}$/,ev=Y(`$ZodBase64`,(e,t)=>{t.pattern??=$_,Z.init(e,t),e._zod.check=n=>{Q_(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),tv=/^[A-Za-z0-9_-]*$/;function nv(e){if(!tv.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Q_(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var rv=Y(`$ZodBase64URL`,(e,t)=>{t.pattern??=tv,Z.init(e,t),e._zod.check=n=>{nv(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),iv=Y(`$ZodE164`,(e,t)=>{t.pattern??=Yg,Z.init(e,t)});function av(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}}var ov=Y(`$ZodJWT`,(e,t)=>{Z.init(e,t),e._zod.check=n=>{av(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}});function sv(e,t,n){e.issues.length&&t.issues.push(...Dh(n,e.issues)),t.value[n]=e.value}var cv=Y(`$ZodArray`,(e,t)=>{X.init(e,t);let n=Qh.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>sv(t,r,e)));else if(sv(c,r,e),s&&c.issues.length!==0&&Th(c))break}return o.length?Promise.all(o).then(()=>r):r}});function lv(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!Th(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Ah(e,r,$h())))}),t)}var uv=Y(`$ZodUnion`,(e,t)=>{X.init(e,t),J(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),J(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),J(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),J(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>dh(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>lv(t,r,e,i)):lv(o,r,e,i)}}),dv=Y(`$ZodIntersection`,(e,t)=>{X.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>pv(e,t,n)):pv(e,i,a)}});function fv(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(vh(e)&&vh(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=fv(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=fv(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function pv(e,t,n){let r=new Map,i,a=new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=fv(t.value,n.value);if(!c.valid){if(Th(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var mv=Y(`$ZodTransform`,(e,t)=>{X.init(e,t),e._zod.optin=`optional`,Qh.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Zh(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new Xh;return n.value=i,n}});function hv(e,t){return e.value=t.issues.length?void 0:t.value,e}var gv=Y(`$ZodOptional`,(e,t)=>{X.init(e,t),J(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,J(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),J(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${dh(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>hv(e,t)):hv(e,r)}return t.innerType._zod.run(e,n)}}),_v=Y(`$ZodExactOptional`,(e,t)=>{gv.init(e,t),J(e,`values`,e=>e.def.innerType._zod.values),J(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),vv=Y(`$ZodNullable`,(e,t)=>{X.init(e,t),J(e,`optin`,e=>e.def.innerType._zod.optin),J(e,`optout`,e=>e.def.innerType._zod.optout),J(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${dh(t.source)}|null)$`):void 0}),J(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),yv=Y(`$ZodDefault`,(e,t)=>{X.init(e,t),e._zod.optin=`defaulted`,J(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>bv(e,t)):bv(r,t)}});function bv(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var xv=Y(`$ZodPrefault`,(e,t)=>{X.init(e,t),e._zod.optin=`defaulted`,J(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Sv=Y(`$ZodNonOptional`,(e,t)=>{X.init(e,t),J(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Cv(t,e)):Cv(i,e)}});function Cv(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function wv(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>Ah(e,r,$h()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var Tv=Y(`$ZodCatch`,(e,t)=>{X.init(e,t),J(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),J(e,`optout`,e=>e.def.innerType._zod.optout),J(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>wv(e,r,t,n)):wv(e,r,t,n)}}),Ev=Y(`$ZodPipe`,(e,t)=>{X.init(e,t),J(e,`values`,e=>e.def.in._zod.values),J(e,`optin`,e=>e.def.in._zod.optin),J(e,`optout`,e=>e.def.out._zod.optout),J(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Dv(e,t.in,n)):Dv(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Dv(e,t.out,n)):Dv(r,t.out,n)}});function Dv(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var Ov=Y(`$ZodReadonly`,(e,t)=>{X.init(e,t),J(e,`propValues`,e=>e.def.innerType._zod.propValues),J(e,`values`,e=>e.def.innerType._zod.values),J(e,`optin`,e=>e.def.innerType?._zod?.optin),J(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(kv):kv(r)}});function kv(e){return e.memo||(e.value=Object.freeze(e.value)),e}var Av=Y(`$ZodCustom`,(e,t)=>{a_.init(e,t),X.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>jv(t,n,r,e));jv(i,n,r,e)}});function jv(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Fh(e))}}var Mv=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},Nv=`~memo`,Pv=[];function Fv(e){return typeof e==`object`&&!!e}function Iv(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var Lv=new WeakMap,Rv=0,zv=1,Bv=2;function Vv(e,t,n){let r=Lv.get(e);if(r!==void 0)return r?Bv:Rv;if(t.has(e))return Bv;t.add(e);let i=Rv,a=e=>{if(i!==Bv&&e?._zod){let r=Vv(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=Rv;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?zv:o.value?._zod?Vv(o.value,t,n):Rv;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=ph(c);s(e?o(e,!0):zv),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?Vv(r,t,!1):zv);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),Hv(e,i)}function Hv(e,t){return t!==zv&&Lv.set(e,t===Bv),t}function Uv(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var Wv,Gv=[],Kv={alloc(e,t,n){let r=Wv;if(!r)return n;Wv=void 0;let i={value:n,issues:null};return r.set(t.value,i),Gv.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&Jv(n,e.value))throw new Mv;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=Vv(e,new Set,!1);if(i===Rv)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===Bv||r?n=!0:r=!0}let l=s.value;if(!Fv(l))return t(s,c);let u=c[Nv];u||(u={buckets:new WeakMap,backEdges:void 0},c[Nv]=u);let d;i===c?d=a:(d=Uv(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(...Iv(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),s;Wv=d;let p=Gv.length,m=t(s,c);Wv=void 0;let h=Gv.length>p?Gv.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?Iv(e.issues):Pv),e)):(h&&(h.issues=m.issues.length?Iv(m.issues):Pv),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function qv(){return Kv}function Jv(e,t){let n=e[Nv]?.backEdges;return n!==void 0&&Fv(t)&&n.has(t)}var Yv=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(Ph(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${Sh(e.values[0])}`:`Invalid option: expected one of ${ch(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${ch(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function Xv(){return{localeError:Yv()}}var Zv,Qv=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function $v(){return new Qv}(Zv=globalThis).__zod_globalRegistry??(Zv.__zod_globalRegistry=$v());var ey=globalThis.__zod_globalRegistry;function ty(e){return e.checks&&=[...e.checks],e}function ny(e,t){return new e(ty({type:`string`,...q(t)}))}function ry(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...q(t)})}function iy(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...q(t)})}function ay(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...q(t)})}function oy(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...q(t)})}function sy(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...q(t)})}function cy(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...q(t)})}function ly(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...q(t)})}function uy(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...q(t)})}function dy(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...q(t)})}function fy(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...q(t)})}function py(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...q(t)})}function my(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...q(t)})}function hy(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...q(t)})}function gy(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...q(t)})}function _y(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...q(t)})}function vy(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...q(t)})}function yy(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...q(t)})}function by(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...q(t)})}function xy(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...q(t)})}function Sy(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...q(t)})}function Cy(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...q(t)})}function wy(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...q(t)})}function Ty(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...q(t)})}function Ey(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...q(t)})}function Dy(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...q(t)})}function Oy(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...q(t)})}function ky(e,t){return new s_({check:`max_length`,...q(t),maximum:e})}function Ay(e,t){return new c_({check:`min_length`,...q(t),minimum:e})}function jy(e,t){return new l_({check:`length_equals`,...q(t),length:e})}function My(e,t){return new d_({check:`string_format`,format:`regex`,...q(t),pattern:e})}function Ny(e){return new f_({check:`string_format`,format:`lowercase`,...q(e)})}function Py(e){return new p_({check:`string_format`,format:`uppercase`,...q(e)})}function Fy(e,t){return new m_({check:`string_format`,format:`includes`,...q(t),includes:e})}function Iy(e,t){return new h_({check:`string_format`,format:`starts_with`,...q(t),prefix:e})}function Ly(e,t){return new g_({check:`string_format`,format:`ends_with`,...q(t),suffix:e})}function Ry(e){return new __({check:`overwrite`,tx:e})}function zy(e){return Ry(t=>t.normalize(e))}function By(){return Ry(e=>e.trim())}function Vy(){return Ry(e=>e.toLowerCase())}function Hy(){return Ry(e=>e.toUpperCase())}function Uy(){return Ry(e=>hh(e))}function Wy(e,t,n){return new e({type:`array`,element:t,...q(n)})}function Gy(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...q(n)})}function Ky(e,t){let n=qy(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Fh(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Fh(r))}},e(t.value,t)),t);return n}function qy(e,t){let n=new a_({check:`custom`,...q(t)});return n._zod.check=e,n}function Jy(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&fh(e,t,n[t]);return e}function Yy(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??ey,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function Xy(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function Q(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,Q(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Jy(o.schema,c),t.io===`input`&&ob(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function Zy(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function Qy(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${Zy(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+Zy(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
29
|
+
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return Zf(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=Yp.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function am(){return{exit:{taskListCheckValueChecked:sm,taskListCheckValueUnchecked:sm,paragraph:cm}}}function om(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:lm}}}function sm(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function cm(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function lm(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=Yp.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function um(){return[mf(),Rf(),Uf(),Xp(),am()]}function dm(e){return{extensions:[hf(),zf(e),Wf(),im(e),om()]}}var fm={tokenize:Em,partial:!0},pm={tokenize:Dm,partial:!0},mm={tokenize:Om,partial:!0},hm={tokenize:km,partial:!0},gm={tokenize:Am,partial:!0},_m={name:`wwwAutolink`,tokenize:wm,previous:jm},vm={name:`protocolAutolink`,tokenize:Tm,previous:Mm},ym={name:`emailAutolink`,tokenize:Cm,previous:Nm},bm={};function xm(){return{text:bm}}for(var Sm=48;Sm<123;)bm[Sm]=ym,Sm++,Sm===58?Sm=65:Sm===91&&(Sm=97);bm[43]=ym,bm[45]=ym,bm[46]=ym,bm[95]=ym,bm[72]=[ym,vm],bm[104]=[ym,vm],bm[87]=[ym,_m],bm[119]=[ym,_m];function Cm(e,t,n){let r=this,i,a;return o;function o(t){return!Pm(t)||!Nm.call(r,r.previous)||Fm(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return Pm(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(gm,u,l)(t):t===45||t===95||H(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&V(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function wm(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!jm.call(r,r.previous)||Fm(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(fm,e.attempt(pm,e.attempt(mm,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function Tm(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&Mm.call(r,r.previous)&&!Fm(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(V(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||_s(t)||W(t)||Ss(t)||xs(t)?n(t):e.attempt(pm,e.attempt(mm,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function Em(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function Dm(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(hm,c,s)(t):t===null||W(t)||Ss(t)||t!==45&&xs(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function Om(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(hm,t,a)(o):o===null||W(o)||Ss(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function km(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||W(o)||Ss(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||W(e)||Ss(e)?t(e):r(e)}function a(e){return V(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):V(t)?(e.consume(t),o):n(t)}}function Am(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return H(e)?n(e):t(e)}}function jm(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||W(e)}function Mm(e){return!V(e)}function Nm(e){return!(e===47||Pm(e))}function Pm(e){return e===43||e===45||e===46||e===95||H(e)}function Fm(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var Im={tokenize:Wm,partial:!0};function Lm(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Vm,continuation:{tokenize:Hm},exit:Um}},text:{91:{name:`gfmFootnoteCall`,tokenize:Bm},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Rm,resolveTo:zm}}}}function Rm(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=hs(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function zm(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function Bm(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||W(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(hs(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return W(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Vm(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||W(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=hs(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return W(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),K(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function Hm(e,t,n){return e.check(zs,t,e.attempt(Im,t,n))}function Um(e){e.exit(`gfmFootnoteDefinition`)}function Wm(e,t,n){let r=this;return K(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Gm(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&cs(o,o.length,0,Ms(s,e.slice(r+1,n),t)),cs(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),cs(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=js(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=js(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Km=class{constructor(){this.map=[]}add(e,t,n){qm(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function qm(e,t,n,r){let i=0;if(n!==0||r.length!==0){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function Jm(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function Ym(){return{flow:{null:{name:`table`,tokenize:Xm,resolveAll:Zm}}}}function Xm(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):U(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):G(t)?K(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||W(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,G(t)?K(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return G(t)?K(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||U(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return G(t)?K(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||U(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||U(n)?(e.exit(`tableRow`),t(n)):G(n)?K(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||W(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function Zm(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Km;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&($m(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=Qm(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=Qm(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=Qm(f,t,o,i,n,d)):(o[0]=o[1],d=Qm(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&$m(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Jm(t.events,n))}return e}function Qm(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},eh(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=eh(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=eh(t.events,n[2]),a=eh(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},eh(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function $m(e,t,n,r,i){let a=[],o=eh(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function eh(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var th={name:`tasklistCheck`,tokenize:rh};function nh(){return{text:{91:th}}}function rh(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return W(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return U(r)?t(r):G(r)?e.check({tokenize:ih},t,n)(r):n(r)}}function ih(e,t,n){return K(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function ah(e){return ds([xm(),Lm(),Gm(e),Ym(),nh()])}var oh={};function sh(e){let t=this,n=e||oh,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(ah(n)),a.push(um()),o.push(dm(n))}function ch(e,t=`|`){return e.map(e=>Sh(e)).join(t)}function lh(e,t){return typeof t==`bigint`?t.toString():t}function uh(e){return e==null}function dh(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function fh(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ph(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function mh(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function hh(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var gh=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function _h(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function vh(e){if(_h(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return _h(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function yh(e){return vh(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function bh(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function xh(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function q(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 Sh(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}var Ch={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},wh={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function Th(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 Eh(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Dh(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Oh(e){return typeof e==`string`?e:e?.message}function kh(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function Ah(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function jh(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:Oh(e.inst?._zod.def?.error?.(e))??Oh(a?.(e))??Oh(t?.error?.(e))??Oh(n.customError?.(e))??Oh(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var Mh=/[\uD800-\uDBFF]/;function Nh(e){let t=e.length;if(!Mh.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function Ph(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Fh(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function Ih(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function Lh(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Vh(e,n,r.value)}}function Rh(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function zh(e,t,n){return Rh(e,t,n,!1)}function Bh(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return Rh(this,n,r(this))},set(e){Rh(this,n,e)}})}return t}function Vh(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:Rh(this,t,n.bind(this))},set(e){Rh(this,t,e)}})}var Hh,Uh=!1,Wh={configurable:!0,get(){Uh=!0}};function J(e,t,n){let r=Object.getPrototypeOf(e._zod);t in r&&Hh!==e._zod?Hh=void 0:(Hh=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Wh);let e=Uh;Uh=!1;try{let r=n(this);return Uh?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),Uh||=e,r}catch(n){throw delete this[t],Uh||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}var Gh=`~constantCatch`;function Kh(e){let t=()=>e;return t[Gh]=!0,t}var qh,Jh={value:void 0,enumerable:!1},Yh=`captureStackTrace`in Error?Error:null;function Xh(e){let t=Yh;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return Yh=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function Y(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){Jh.value=new a(r);try{Object.defineProperty(n,"_zod",Jh)}finally{Jh.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),Lh(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?Xh(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var Zh=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Qh=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(qh=globalThis).__zod_globalConfig??(qh.__zod_globalConfig={});var $h=globalThis.__zod_globalConfig;function eg(e){return e&&Object.assign($h,e),$h}function tg(){let e=this._zod;return e.message??=JSON.stringify(e.def,lh,2),e.message}function ng(e){this._zod.message=e}var rg={get:tg,set:ng,enumerable:!0,configurable:!0},ig={value:void 0,enumerable:!1},ag=new WeakSet([Object.prototype,Error.prototype]),og=(e,t)=>{e.name=`$ZodError`,ig.value=t,Object.defineProperty(e,"issues",ig),ig.value=void 0,Object.defineProperty(e,"message",rg);let n=Object.getPrototypeOf(e);ag.has(n)||(ag.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},sg=Y(`$ZodError`,og);Y(`$ZodError`,og,void 0,{Parent:Error});function cg(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function lg(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?cg(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function ug(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function dg(e,t){return{callee:t?.callee??e,Err:t?.Err}}var fg=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new Zh;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>jh(e,o,eg())));throw gh(n,a?.callee??t),n}return s.value};return t},pg=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>jh(e,o,eg())));throw gh(n,a?.callee??t),n}return s.value};return t},mg=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 Zh;return a.issues.length?hg(e,a.issues,i):{success:!0,data:a.value}};function hg(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>jh(e,n,eg()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var gg=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?hg(e,a.issues,i):{success:!0,data:a.value}},_g=Symbol.for(`zod.compile.invalid`),vg=Symbol.for(`zod.compile.fallback`),yg=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==_g)return!0;if(r.definite===!0&&n===void 0)return!1}return bg(e,t,n)});function bg(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[vg]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new Zh;return a.issues.length===0}var xg=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},Sg=e=>{let t=fg(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,dg(n,a))};return n},Cg=e=>{let t=fg(e),n=(e,r,i,a)=>t(e,r,i,dg(n,a));return n},wg=e=>{let t=pg(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,dg(n,a))};return n},Tg=e=>{let t=pg(e),n=async(e,r,i,a)=>await t(e,r,i,dg(n,a));return n},Eg=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return mg(e)(t,n,i)},Dg=e=>(t,n,r)=>mg(e)(t,n,r),Og=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return gg(e)(t,n,i)},kg=e=>async(t,n,r)=>gg(e)(t,n,r),Ag=/^[cC][0-9a-z]{6,}$/,jg=/^[0-9a-z]+$/,Mg=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Ng=/^[0-9a-vA-V]{20}$/,Pg=/^[A-Za-z0-9]{27}$/,Fg=/^[a-zA-Z0-9_-]{21}$/;function Ig(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Lg=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Rg=/^([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})$/,zg=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)$/,Bg=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Vg=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function Hg(){return new RegExp(Vg,`u`)}var Ug=/^(?:(?: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])$/,Wg=/^(([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}|:))$/,Gg=/^((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])$/,Kg=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,qg=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Jg=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,Yg=/^https?$/,Xg=/^\+[1-9]\d{6,14}$/,Zg=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;function Qg(e){return RegExp(`^${e}$`)}var $g=Qg(Zg);function e_(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function t_(e){return RegExp(`^${e_(e)}$`)}function n_(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${e_({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${e_({precision:e.precision})}`:n;return RegExp(`^${Zg}T(?:${r})$`)}var r_=/^[\s\S]{0,}$/,i_=/^[^A-Z]*$/,a_=/^[^a-z]*$/,o_=Y(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),s_=e=>{let t=e.value;return!uh(t)&&t.length!==void 0},c_=Y(`$ZodCheckMaxLength`,(e,t)=>{var n;o_.init(e,t),(n=e._zod.def).when??(n.when=s_),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?Nh(r):i)<=t.maximum)return;let a=Ph(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),l_=Y(`$ZodCheckMinLength`,(e,t)=>{var n;o_.init(e,t),(n=e._zod.def).when??(n.when=s_),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?Nh(r):i)>=t.minimum)return;let a=Ph(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),u_=Y(`$ZodCheckLengthEquals`,(e,t)=>{var n;o_.init(e,t),(n=e._zod.def).when??(n.when=s_),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?Nh(r):i;if(a===t.length)return;let o=Ph(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),d_=Y(`$ZodCheckStringFormat`,(e,t)=>{var n,r;o_.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),f_=Y(`$ZodCheckRegex`,(e,t)=>{d_.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})}}),p_=Y(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=i_,d_.init(e,t)}),m_=Y(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=a_,d_.init(e,t)}),h_=Y(`$ZodCheckIncludes`,(e,t)=>{o_.init(e,t);let n=bh(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),g_=Y(`$ZodCheckStartsWith`,(e,t)=>{o_.init(e,t);let n=RegExp(`^${bh(t.prefix)}.*`);t.pattern??=n,e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),__=Y(`$ZodCheckEndsWith`,(e,t)=>{o_.init(e,t);let n=RegExp(`.*${bh(t.suffix)}$`);t.pattern??=n,e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),v_=Y(`$ZodCheckOverwrite`,(e,t)=>{o_.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),y_={major:4,minor:6,patch:7},X=Y(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=y_;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=Th(t),a;for(let o of n){if(o._zod.def.when){if(Eh(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new Zh;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(Ah(t.issues,n,e),i||=Th(t,n))});else{if(t.issues.length===n)continue;Ah(t.issues,n,e),i||=Th(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(Th(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new Zh;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new Zh;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return zh(this,`~standard`,S_(this))},set"~standard"(e){Rh(this,`~standard`,e)}}),b_=(e,t)=>e.issues.length?{issues:e.issues.map(e=>jh(e,t,eg()))}:{value:e.value};async function x_(e,t){let n={async:!0};return b_(await e._zod.run({value:t,issues:[]},n),n)}function S_(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return b_(r,n)}catch{}return x_(e,t)},vendor:`zod`,version:1}}var C_=Y(`$ZodString`,(e,t)=>{X.init(e,t),e._zod.pattern=t.pattern??r_,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}}),Z=Y(`$ZodStringFormat`,(e,t)=>{d_.init(e,t),C_.init(e,t)}),w_=Y(`$ZodGUID`,(e,t)=>{t.pattern??=Rg,Z.init(e,t)}),T_=Y(`$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??=zg(e)}else t.pattern??=zg();Z.init(e,t)}),E_=Y(`$ZodEmail`,(e,t)=>{t.pattern??=Bg,Z.init(e,t)});function D_(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function O_(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?D_(e)||2:k_(e,t)}function k_(e,t){if(!t.normalize&&t.protocol?.source===Yg.source&&!/^https?:\/\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}var A_=/[\t\n\r]/g;function j_(e){return e.replace(A_,``)}function M_(e,t){return t.lastIndex=0,t.test(e.hostname)}function N_(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var P_=Y(`$ZodURL`,(e,t)=>{Z.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=O_(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=j_(r);return}t.hostname&&!M_(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!N_(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:j_(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),F_=Y(`$ZodEmoji`,(e,t)=>{t.pattern??=Hg(),Z.init(e,t)}),I_=Y(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?Fg:Ig(t.length),Z.init(e,t)}),L_=Y(`$ZodCUID`,(e,t)=>{t.pattern??=Ag,Z.init(e,t)}),R_=Y(`$ZodCUID2`,(e,t)=>{t.pattern??=jg,Z.init(e,t)}),z_=Y(`$ZodULID`,(e,t)=>{t.pattern??=Mg,Z.init(e,t)}),B_=Y(`$ZodXID`,(e,t)=>{t.pattern??=Ng,Z.init(e,t)}),V_=Y(`$ZodKSUID`,(e,t)=>{t.pattern??=Pg,Z.init(e,t)}),H_=Y(`$ZodISODateTime`,(e,t)=>{t.pattern??=n_(t),Z.init(e,t)}),U_=Y(`$ZodISODate`,(e,t)=>{t.pattern??=$g,Z.init(e,t)}),W_=Y(`$ZodISOTime`,(e,t)=>{t.pattern??=t_(t),Z.init(e,t)}),G_=Y(`$ZodISODuration`,(e,t)=>{t.pattern??=Lg,Z.init(e,t)}),K_=Y(`$ZodIPv4`,(e,t)=>{t.pattern??=Ug,Z.init(e,t)}),q_=/^[0-9a-fA-F:.]+$/;function J_(e){return q_.test(e)?D_(`http://[${e}]`):!1}var Y_=Y(`$ZodIPv6`,(e,t)=>{t.pattern??=Wg,Z.init(e,t),e._zod.check=n=>{J_(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),X_=Y(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Gg,Z.init(e,t)});function Z_(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:J_(n)}var Q_=Y(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Kg,Z.init(e,t),e._zod.check=n=>{Z_(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function $_(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var ev=/^[0-9a-zA-Z+/]*={0,2}$/,tv=Y(`$ZodBase64`,(e,t)=>{t.pattern??=ev,Z.init(e,t),e._zod.check=n=>{$_(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),nv=/^[A-Za-z0-9_-]*$/;function rv(e){if(!nv.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return $_(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var iv=Y(`$ZodBase64URL`,(e,t)=>{t.pattern??=nv,Z.init(e,t),e._zod.check=n=>{rv(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),av=Y(`$ZodE164`,(e,t)=>{t.pattern??=Xg,Z.init(e,t)});function ov(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}}var sv=Y(`$ZodJWT`,(e,t)=>{Z.init(e,t),e._zod.check=n=>{ov(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}});function cv(e,t){let n=kh(e._zod.def.checks);if(!n.length)return;let r=Math.min(...n.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(n,a)=>{let o=t(n.value);if(o>r&&!a?.skipChecks&&a?.direction!==`backward`){for(let[t,r]of kh(e._zod.def.checks))if(o>t&&r._zod.def.when(n)){let t=n.issues.length;return r._zod.check(n),n.issues[t].continue=!1,Ah(n.issues,t,e),n}}return i(n,a)}}var lv=e=>Array.isArray(e)?e.length:-1;function uv(e,t,n){e.issues.length&&t.issues.push(...Dh(n,e.issues)),t.value[n]=e.value}var dv=Y(`$ZodArray`,(e,t)=>{X.init(e,t);let n=$h.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>uv(t,r,e)));else if(uv(c,r,e),s&&c.issues.length!==0&&Th(c))break}return o.length?Promise.all(o).then(()=>r):r},cv(e,lv)});function fv(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!Th(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>jh(e,r,eg())))}),t)}var pv=Y(`$ZodUnion`,(e,t)=>{X.init(e,t),J(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),J(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),J(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),J(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>dh(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>fv(t,r,e,i)):fv(o,r,e,i)}}),mv=Y(`$ZodIntersection`,(e,t)=>{X.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>gv(e,t,n)):gv(e,i,a)}});function hv(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(vh(e)&&vh(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=hv(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=hv(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function gv(e,t,n){let r=new Map,i,a=new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=hv(t.value,n.value);if(!c.valid){if(Th(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var _v=Y(`$ZodTransform`,(e,t)=>{X.init(e,t),e._zod.optin=`optional`,$h.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Qh(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new Zh;return n.value=i,n}});function vv(e,t){return e.value=t.issues.length?void 0:t.value,e}var yv=Y(`$ZodOptional`,(e,t)=>{X.init(e,t),J(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,J(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),J(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${dh(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>vv(e,t)):vv(e,r)}return t.innerType._zod.run(e,n)}}),bv=Y(`$ZodExactOptional`,(e,t)=>{yv.init(e,t),J(e,`values`,e=>e.def.innerType._zod.values),J(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),xv=Y(`$ZodNullable`,(e,t)=>{X.init(e,t),J(e,`optin`,e=>e.def.innerType._zod.optin),J(e,`optout`,e=>e.def.innerType._zod.optout),J(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${dh(t.source)}|null)$`):void 0}),J(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Sv=Y(`$ZodDefault`,(e,t)=>{X.init(e,t),e._zod.optin=`defaulted`,J(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Cv(e,t)):Cv(r,t)}});function Cv(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var wv=Y(`$ZodPrefault`,(e,t)=>{X.init(e,t),e._zod.optin=`defaulted`,J(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Tv=Y(`$ZodNonOptional`,(e,t)=>{X.init(e,t),J(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Ev(t,e)):Ev(i,e)}});function Ev(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function Dv(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>jh(e,r,eg()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var Ov=Y(`$ZodCatch`,(e,t)=>{X.init(e,t),J(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),J(e,`optout`,e=>e.def.innerType._zod.optout),J(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>Dv(e,r,t,n)):Dv(e,r,t,n)}}),kv=Y(`$ZodPipe`,(e,t)=>{X.init(e,t),J(e,`values`,e=>e.def.in._zod.values),J(e,`optin`,e=>e.def.in._zod.optin),J(e,`optout`,e=>e.def.out._zod.optout),J(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Av(e,t.in,n)):Av(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Av(e,t.out,n)):Av(r,t.out,n)}});function Av(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var jv=Y(`$ZodReadonly`,(e,t)=>{X.init(e,t),J(e,`propValues`,e=>e.def.innerType._zod.propValues),J(e,`values`,e=>e.def.innerType._zod.values),J(e,`optin`,e=>e.def.innerType?._zod?.optin),J(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Mv):Mv(r)}});function Mv(e){return e.memo||(e.value=Object.freeze(e.value)),e}var Nv=Y(`$ZodCustom`,(e,t)=>{o_.init(e,t),X.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Pv(t,n,r,e));Pv(i,n,r,e)}});function Pv(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Ih(e))}}var Fv=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},Iv=`~memo`,Lv=[];function Rv(e){return typeof e==`object`&&!!e}function zv(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var Bv=new WeakMap,Vv=0,Hv=1,Uv=2;function Wv(e,t,n){let r=Bv.get(e);if(r!==void 0)return r?Uv:Vv;if(t.has(e))return Uv;t.add(e);let i=Vv,a=e=>{if(i!==Uv&&e?._zod){let r=Wv(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=Vv;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?Hv:o.value?._zod?Wv(o.value,t,n):Vv;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=ph(c);s(e?o(e,!0):Hv),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?Wv(r,t,!1):Hv);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),Gv(e,i)}function Gv(e,t){return t!==Hv&&Bv.set(e,t===Uv),t}function Kv(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var qv,Jv=[],Yv={alloc(e,t,n){let r=qv;if(!r)return n;qv=void 0;let i={value:n,issues:null};return r.set(t.value,i),Jv.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&Zv(n,e.value))throw new Fv;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=Wv(e,new Set,!1);if(i===Vv)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===Uv||r?n=!0:r=!0}let l=s.value;if(!Rv(l))return t(s,c);let u=c[Iv];u||(u={buckets:new WeakMap,backEdges:void 0},c[Iv]=u);let d;i===c?d=a:(d=Kv(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(...zv(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),s;qv=d;let p=Jv.length,m=t(s,c);qv=void 0;let h=Jv.length>p?Jv.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?zv(e.issues):Lv),e)):(h&&(h.issues=m.issues.length?zv(m.issues):Lv),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function Xv(){return Yv}function Zv(e,t){let n=e[Iv]?.backEdges;return n!==void 0&&Rv(t)&&n.has(t)}var Qv=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(Fh(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${Sh(e.values[0])}`:`Invalid option: expected one of ${ch(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${ch(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function $v(){return{localeError:Qv()}}var ey,ty=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function ny(){return new ty}(ey=globalThis).__zod_globalRegistry??(ey.__zod_globalRegistry=ny());var ry=globalThis.__zod_globalRegistry;function iy(e){return e.checks&&=[...e.checks],e}function ay(e,t){return new e(iy({type:`string`,...q(t)}))}function oy(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...q(t)})}function sy(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...q(t)})}function cy(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...q(t)})}function ly(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...q(t)})}function uy(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...q(t)})}function dy(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...q(t)})}function fy(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...q(t)})}function py(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...q(t)})}function my(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...q(t)})}function hy(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...q(t)})}function gy(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...q(t)})}function _y(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...q(t)})}function vy(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...q(t)})}function yy(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...q(t)})}function by(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...q(t)})}function xy(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...q(t)})}function Sy(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...q(t)})}function Cy(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...q(t)})}function wy(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...q(t)})}function Ty(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...q(t)})}function Ey(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...q(t)})}function Dy(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...q(t)})}function Oy(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...q(t)})}function ky(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...q(t)})}function Ay(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...q(t)})}function jy(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...q(t)})}function My(e,t){return new c_({check:`max_length`,...q(t),maximum:e})}function Ny(e,t){return new l_({check:`min_length`,...q(t),minimum:e})}function Py(e,t){return new u_({check:`length_equals`,...q(t),length:e})}function Fy(e,t){return new f_({check:`string_format`,format:`regex`,...q(t),pattern:e})}function Iy(e){return new p_({check:`string_format`,format:`lowercase`,...q(e)})}function Ly(e){return new m_({check:`string_format`,format:`uppercase`,...q(e)})}function Ry(e,t){return new h_({check:`string_format`,format:`includes`,...q(t),includes:e})}function zy(e,t){return new g_({check:`string_format`,format:`starts_with`,...q(t),prefix:e})}function By(e,t){return new __({check:`string_format`,format:`ends_with`,...q(t),suffix:e})}function Vy(e){return new v_({check:`overwrite`,tx:e})}function Hy(e){return Vy(t=>t.normalize(e))}function Uy(){return Vy(e=>e.trim())}function Wy(){return Vy(e=>e.toLowerCase())}function Gy(){return Vy(e=>e.toUpperCase())}function Ky(){return Vy(e=>hh(e))}function qy(e,t,n){return new e({type:`array`,element:t,...q(n)})}function Jy(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...q(n)})}function Yy(e,t){let n=Xy(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Ih(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Ih(r))}},e(t.value,t)),t);return n}function Xy(e,t){let n=new o_({check:`custom`,...q(t)});return n._zod.check=e,n}function Zy(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&fh(e,t,n[t]);return e}function Qy(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??ry,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function $y(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function Q(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,Q(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Zy(o.schema,c),t.io===`input`&&lb(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function eb(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function tb(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${eb(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+eb(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
30
30
|
|
|
31
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0])a(n);else{if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&e.reused===`ref`)&&a(n)}}e.external&&(e.sharedDefsExtractedFor=e.external)}function $y(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;$y(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var eb=new Set([`type`,`properties`,`required`,`additionalProperties`]),tb=[`oneOf`,`anyOf`];function nb(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function rb(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!eb.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??nb(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}fh(n,r,e.length===1?e[0]:rb(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=nb(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function ib(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of eb)if(t in e)return;let n=t.filter(e=>tb.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=rb(t);else{let e=n[0],i=tb.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>rb([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,Jy(e,r))}function ab(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Jy(i,s),Jy(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())$y(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])ib(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Jy(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,fh(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:cb(t,`input`,e.processors),output:cb(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function ob(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return ob(r.element,n);if(r.type===`set`)return ob(r.valueType,n);if(r.type===`lazy`)return ob(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return ob(r.innerType,n);if(r.type===`intersection`)return ob(r.left,n)||ob(r.right,n);if(r.type===`record`||r.type===`map`)return ob(r.keyType,n)||ob(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:ob(r.in,n)||ob(r.out,n);if(r.type===`object`){for(let e in r.shape)if(ob(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(ob(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(ob(e,n))return!0;return!!(r.rest&&ob(r.rest,n))}return!1}var sb=(e,t={})=>n=>{let r=Yy({...n,processors:t});return Q(e,r),Qy(r,e),ab(r,e)},cb=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Yy({...i??{},target:a,io:t,processors:n});return Q(e,o),Qy(o,e),ab(o,e)},lb=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},ub=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},db=(e,t)=>{lb(e,`minimum`,t),ub(e,`maximum`,t)},fb=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},pb=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},mb=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},hb=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},gb=(e,t)=>lb(e,`minimum`,t.minimum),_b=(e,t)=>ub(e,`maximum`,t.maximum),vb=e=>(t,n)=>{hb(t,n.format);let[r,i]=e[n.format];lb(t,`minimum`,r),ub(t,`maximum`,i)},yb={greater_than:(e,t)=>lb(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>ub(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>fb(e,t.value),number_format:vb(Ch),bigint_format:vb(wh),min_length:gb,max_length:_b,length_equals:(e,t)=>db(e,t.length),min_size:gb,max_size:_b,size_equals:(e,t)=>db(e,t.size),string_format:(e,t)=>{hb(e,t.format),t.pattern&&pb(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>mb(e,t.mime)};function bb(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)yb[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&lb(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&lb(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&ub(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&ub(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&fb(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&mb(t,i.mime);for(let e of i.patterns??[])pb(t,e);return t}var xb={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Sb=new Map([[$_,Kg],[tv,qg]]),Cb=e=>Sb.get(e)??e,wb=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=bb(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=xb[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(Cb);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Tb=(e,t,n,r)=>{Xy(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},Eb=(e,t,n,r)=>{Xy(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},Db=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=bb(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=Q(a.element,t,{...r,path:[...r.path,`items`]})},Ob=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>Q(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},kb=(e,t,n,r)=>{let i=e._zod.def,a=Q(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=Q(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},Ab=(e,t,n,r)=>{let i=e._zod.def,a=Q(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},jb=(e,t,n,r)=>{let i=e._zod.def;Q(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Mb=Symbol();function Nb(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(Xy(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),Mb):JSON.parse(o)}var Pb=(e,t,n,r)=>{let i=e._zod.def;Q(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=Nb(i.defaultValue,e,t,n,r);o!==Mb&&(n.default=o)},Fb=(e,t,n,r)=>{let i=e._zod.def;Q(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=Nb(i.defaultValue,e,t,n,r);o!==Mb&&(n._prefault=o)},Ib=(e,t,n,r)=>{let i=e._zod.def;Q(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{Xy(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},Lb=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;Q(o,t,r);let s=t.seen.get(e);s.ref=o},Rb=(e,t,n,r)=>{let i=e._zod.def;Q(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},zb=(e,t,n,r)=>{let i=e._zod.def;Q(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Bb=new WeakSet([Object.prototype,Error.prototype]);function Vb(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var Hb=Y(`ZodError`,(e,t)=>{og.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);Bb.has(n)||(Bb.add(n),Vb(n,`format`,e=>t=>lg(e,t)),Vb(n,`flatten`,e=>t=>cg(e,t)),Vb(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,lh,2)}),Vb(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,lh,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),Ub=dg(Hb),Wb=fg(Hb),Gb=pg(Hb),Kb=hg(Hb),qb=xg(Hb),Jb=Sg(Hb),Yb=Cg(Hb),Xb=wg(Hb),Zb=Tg(Hb),Qb=Eg(Hb),$b=Dg(Hb),ex=Og(Hb);function tx(){Qh.localeError||$h(Xv())}function nx(){Qh.memoizer||$h({memoizer:qv()})}var rx=Y(`ZodType`,(e,t)=>(tx(),X.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(mh(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return xh(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(rS(e,t))},superRefine(e,t){return this.check(iS(e,t))},overwrite(e){return this.check(Ry(e))},optional(){return zx(this)},exactOptional(){return Vx(this)},nullable(){return Ux(this)},nullish(){return zx(Ux(this))},nonoptional(e){return Yx(this,e)},array(){return jx(this)},or(e){return Nx([this,e])},and(e){return Fx(this,e)},transform(e){return $x(this,Lx(e))},default(e){return Gx(this,e)},prefault(e){return qx(this,e)},catch(e){return Zx(this,e)},pipe(e){return $x(this,e)},readonly(){return tS(this)},describe(e){let t=this.clone();return ey.add(t,{description:e}),t},meta(...e){if(e.length===0)return ey.get(this);let t=this.clone();return ey.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return Rh(this,`~standard`,{...x_(this),jsonSchema:{input:cb(this,`input`),output:cb(this,`output`)}})},set"~standard"(e){Lh(this,`~standard`,e)},parse:function e(t,n){return Ub(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await Wb(this,t,n,{callee:e})},safeParse(e,t){return Gb(this,e,t)},async safeParseAsync(e,t){return Kb(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){Lh(this,`spa`,e)},validate(e,t){return vg(this,e,t)},validateAsync(e,t){return bg(this,e,t)},encode:function e(t,n){return qb(this,t,n,{callee:e})},decode:function e(t,n){return Jb(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await Yb(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await Xb(this,t,n,{callee:e})},safeEncode(e,t){return Zb(this,e,t)},safeDecode(e,t){return Qb(this,e,t)},async safeEncodeAsync(e,t){return $b(this,e,t)},async safeDecodeAsync(e,t){return ex(this,e,t)},toJSONSchema(e){return sb(this,{})(e)},get description(){return ey.get(this)?.description},get _def(){return this._zod.def}}),ix=Y(`_ZodString`,(e,t)=>{S_.init(e,t),rx.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wb(e,t,n,r)},zh({format:e=>bb(e).format??null,minLength:e=>bb(e).minimum??null,maxLength:e=>bb(e).maximum??null},{regex(...e){return this.check(My(...e))},includes(...e){return this.check(Fy(...e))},startsWith(...e){return this.check(Iy(...e))},endsWith(...e){return this.check(Ly(...e))},min(...e){return this.check(Ay(...e))},max(...e){return this.check(ky(...e))},length(...e){return this.check(jy(...e))},nonempty(...e){return this.check(Ay(1,...e))},lowercase(e){return this.check(Ny(e))},uppercase(e){return this.check(Py(e))},trim(){return this.check(By())},normalize(...e){return this.check(zy(...e))},toLowerCase(){return this.check(Vy())},toUpperCase(){return this.check(Hy())},slugify(){return this.check(Uy())}})),ax=Y(`ZodString`,(e,t)=>{S_.init(e,t),ix.init(e,t)},{email(e){return this.check(ry(dx,e))},url(e){return this.check(ly(mx,e))},jwt(e){return this.check(wy(kx,e))},emoji(e){return this.check(uy(hx,e))},guid(e){return this.check(iy(fx,e))},uuid(e){return this.check(ay(px,e))},uuidv4(e){return this.check(oy(px,e))},uuidv6(e){return this.check(sy(px,e))},uuidv7(e){return this.check(cy(px,e))},nanoid(e){return this.check(dy(gx,e))},cuid(e){return this.check(fy(_x,e))},cuid2(e){return this.check(py(vx,e))},ulid(e){return this.check(my(yx,e))},base64(e){return this.check(xy(Ex,e))},base64url(e){return this.check(Sy(Dx,e))},xid(e){return this.check(hy(bx,e))},ksuid(e){return this.check(gy(xx,e))},ipv4(e){return this.check(_y(Sx,e))},ipv6(e){return this.check(vy(Cx,e))},cidrv4(e){return this.check(yy(wx,e))},cidrv6(e){return this.check(by(Tx,e))},e164(e){return this.check(Cy(Ox,e))},datetime(e){return this.check(Ty(sx,e))},date(e){return this.check(Ey(cx,e))},time(e){return this.check(Dy(lx,e))},duration(e){return this.check(Oy(ux,e))}});function ox(e){return ny(ax,e)}var $=Y(`ZodStringFormat`,(e,t)=>{Z.init(e,t),ix.init(e,t)}),sx=Y(`ZodISODateTime`,(e,t)=>{V_.init(e,t),$.init(e,t)}),cx=Y(`ZodISODate`,(e,t)=>{H_.init(e,t),$.init(e,t)}),lx=Y(`ZodISOTime`,(e,t)=>{U_.init(e,t),$.init(e,t)}),ux=Y(`ZodISODuration`,(e,t)=>{W_.init(e,t),$.init(e,t)}),dx=Y(`ZodEmail`,(e,t)=>{T_.init(e,t),$.init(e,t)}),fx=Y(`ZodGUID`,(e,t)=>{C_.init(e,t),$.init(e,t)}),px=Y(`ZodUUID`,(e,t)=>{w_.init(e,t),$.init(e,t)}),mx=Y(`ZodURL`,(e,t)=>{N_.init(e,t),$.init(e,t)}),hx=Y(`ZodEmoji`,(e,t)=>{P_.init(e,t),$.init(e,t)}),gx=Y(`ZodNanoID`,(e,t)=>{F_.init(e,t),$.init(e,t)}),_x=Y(`ZodCUID`,(e,t)=>{I_.init(e,t),$.init(e,t)}),vx=Y(`ZodCUID2`,(e,t)=>{L_.init(e,t),$.init(e,t)}),yx=Y(`ZodULID`,(e,t)=>{R_.init(e,t),$.init(e,t)}),bx=Y(`ZodXID`,(e,t)=>{z_.init(e,t),$.init(e,t)}),xx=Y(`ZodKSUID`,(e,t)=>{B_.init(e,t),$.init(e,t)}),Sx=Y(`ZodIPv4`,(e,t)=>{G_.init(e,t),$.init(e,t)}),Cx=Y(`ZodIPv6`,(e,t)=>{J_.init(e,t),$.init(e,t)}),wx=Y(`ZodCIDRv4`,(e,t)=>{Y_.init(e,t),$.init(e,t)}),Tx=Y(`ZodCIDRv6`,(e,t)=>{Z_.init(e,t),$.init(e,t)}),Ex=Y(`ZodBase64`,(e,t)=>{ev.init(e,t),$.init(e,t)}),Dx=Y(`ZodBase64URL`,(e,t)=>{rv.init(e,t),$.init(e,t)}),Ox=Y(`ZodE164`,(e,t)=>{iv.init(e,t),$.init(e,t)}),kx=Y(`ZodJWT`,(e,t)=>{ov.init(e,t),$.init(e,t)}),Ax=Y(`ZodArray`,(e,t)=>{nx(),cv.init(e,t),rx.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Db(e,t,n,r),e.element=t.element},{min(e,t){return this.check(Ay(e,t))},nonempty(e){return this.check(Ay(1,e))},max(e,t){return this.check(ky(e,t))},length(e,t){return this.check(jy(e,t))},unwrap(){return this.element}});function jx(e,t){return Wy(Ax,e,t)}var Mx=Y(`ZodUnion`,(e,t)=>{uv.init(e,t),rx.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ob(e,t,n,r),e.options=t.options});function Nx(e,t){return new Mx({type:`union`,options:e,...q(t)})}var Px=Y(`ZodIntersection`,(e,t)=>{dv.init(e,t),rx.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kb(e,t,n,r)});function Fx(e,t){return new Px({type:`intersection`,left:e,right:t})}var Ix=Y(`ZodTransform`,(e,t)=>{nx(),mv.init(e,t),rx.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Eb(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Zh(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Fh(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(Fh(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Lx(e){return new Ix({type:`transform`,transform:e})}var Rx=Y(`ZodOptional`,(e,t)=>{gv.init(e,t),rx.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zb(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function zx(e){return new Rx({type:`optional`,innerType:e})}var Bx=Y(`ZodExactOptional`,(e,t)=>{_v.init(e,t),rx.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zb(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Vx(e){return new Bx({type:`optional`,innerType:e})}var Hx=Y(`ZodNullable`,(e,t)=>{vv.init(e,t),rx.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ab(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ux(e){return new Hx({type:`nullable`,innerType:e})}var Wx=Y(`ZodDefault`,(e,t)=>{yv.init(e,t),rx.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pb(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Gx(e,t){return new Wx({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():yh(t)}})}var Kx=Y(`ZodPrefault`,(e,t)=>{xv.init(e,t),rx.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fb(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function qx(e,t){return new Kx({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():yh(t)}})}var Jx=Y(`ZodNonOptional`,(e,t)=>{Sv.init(e,t),rx.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jb(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Yx(e,t){return new Jx({type:`nonoptional`,innerType:e,...q(t)})}var Xx=Y(`ZodCatch`,(e,t)=>{Tv.init(e,t),rx.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ib(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Zx(e,t){return new Xx({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:Gh(t)})}var Qx=Y(`ZodPipe`,(e,t)=>{Ev.init(e,t),rx.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Lb(e,t,n,r),e.in=t.in,e.out=t.out});function $x(e,t){return new Qx({type:`pipe`,in:e,out:t})}var eS=Y(`ZodReadonly`,(e,t)=>{Ov.init(e,t),rx.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Rb(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function tS(e){return new eS({type:`readonly`,innerType:e})}var nS=Y(`ZodCustom`,(e,t)=>{Av.init(e,t),rx.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Tb(e,t,n,r)});function rS(e,t={}){return Gy(nS,e,t)}function iS(e,t){return Ky(e,t)}export{rn as _,ga as a,Ue as b,Yi as c,Ei as d,Xr as f,_n as g,vn as h,ha as i,Ci as l,ni as m,sh as n,_a as o,Qr as p,ef as r,ba as s,ox as t,wi as u,$e as v,A as x,Ye as y};
|
|
31
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0])a(n);else{if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&e.reused===`ref`)&&a(n)}}e.external&&(e.sharedDefsExtractedFor=e.external)}function nb(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;nb(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var rb=new Set([`type`,`properties`,`required`,`additionalProperties`]),ib=[`oneOf`,`anyOf`];function ab(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function ob(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!rb.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??ab(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}fh(n,r,e.length===1?e[0]:ob(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=ab(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function sb(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of rb)if(t in e)return;let n=t.filter(e=>ib.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=ob(t);else{let e=n[0],i=ib.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>ob([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,Zy(e,r))}function cb(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Zy(i,s),Zy(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())nb(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])sb(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Zy(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,fh(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:db(t,`input`,e.processors),output:db(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function lb(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return lb(r.element,n);if(r.type===`set`)return lb(r.valueType,n);if(r.type===`lazy`)return lb(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return lb(r.innerType,n);if(r.type===`intersection`)return lb(r.left,n)||lb(r.right,n);if(r.type===`record`||r.type===`map`)return lb(r.keyType,n)||lb(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:lb(r.in,n)||lb(r.out,n);if(r.type===`object`){for(let e in r.shape)if(lb(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(lb(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(lb(e,n))return!0;return!!(r.rest&&lb(r.rest,n))}return!1}var ub=(e,t={})=>n=>{let r=Qy({...n,processors:t});return Q(e,r),tb(r,e),cb(r,e)},db=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Qy({...i??{},target:a,io:t,processors:n});return Q(e,o),tb(o,e),cb(o,e)},fb=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},pb=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},mb=(e,t)=>{fb(e,`minimum`,t),pb(e,`maximum`,t)},hb=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},gb=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},_b=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},vb=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},yb=(e,t)=>fb(e,`minimum`,t.minimum),bb=(e,t)=>pb(e,`maximum`,t.maximum),xb=e=>(t,n)=>{vb(t,n.format);let[r,i]=e[n.format];fb(t,`minimum`,r),pb(t,`maximum`,i)},Sb={greater_than:(e,t)=>fb(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>pb(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>hb(e,t.value),number_format:xb(Ch),bigint_format:xb(wh),min_length:yb,max_length:bb,length_equals:(e,t)=>mb(e,t.length),min_size:yb,max_size:bb,size_equals:(e,t)=>mb(e,t.size),string_format:(e,t)=>{vb(e,t.format),t.pattern&&gb(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>_b(e,t.mime)};function Cb(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)Sb[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&fb(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&fb(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&pb(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&pb(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&hb(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&_b(t,i.mime);for(let e of i.patterns??[])gb(t,e);return t}var wb={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Tb=new Map([[ev,qg],[nv,Jg]]),Eb=e=>Tb.get(e)??e,Db=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=Cb(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=wb[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(Eb);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Ob=(e,t,n,r)=>{$y(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},kb=(e,t,n,r)=>{$y(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},Ab=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=Cb(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=Q(a.element,t,{...r,path:[...r.path,`items`]})},jb=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>Q(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Mb=(e,t,n,r)=>{let i=e._zod.def,a=Q(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=Q(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},Nb=(e,t,n,r)=>{let i=e._zod.def,a=Q(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Pb=(e,t,n,r)=>{let i=e._zod.def;Q(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Fb=Symbol();function Ib(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?($y(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),Fb):JSON.parse(o)}var Lb=(e,t,n,r)=>{let i=e._zod.def;Q(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=Ib(i.defaultValue,e,t,n,r);o!==Fb&&(n.default=o)},Rb=(e,t,n,r)=>{let i=e._zod.def;Q(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=Ib(i.defaultValue,e,t,n,r);o!==Fb&&(n._prefault=o)},zb=(e,t,n,r)=>{let i=e._zod.def;Q(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{$y(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},Bb=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;Q(o,t,r);let s=t.seen.get(e);s.ref=o},Vb=(e,t,n,r)=>{let i=e._zod.def;Q(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Hb=(e,t,n,r)=>{let i=e._zod.def;Q(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Ub=new WeakSet([Object.prototype,Error.prototype]);function Wb(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var Gb=Y(`ZodError`,(e,t)=>{sg.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);Ub.has(n)||(Ub.add(n),Wb(n,`format`,e=>t=>ug(e,t)),Wb(n,`flatten`,e=>t=>lg(e,t)),Wb(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,lh,2)}),Wb(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,lh,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),Kb=fg(Gb),qb=pg(Gb),Jb=mg(Gb),Yb=gg(Gb),Xb=Sg(Gb),Zb=Cg(Gb),Qb=wg(Gb),$b=Tg(Gb),ex=Eg(Gb),tx=Dg(Gb),nx=Og(Gb),rx=kg(Gb);function ix(){$h.localeError||eg($v())}function ax(){$h.memoizer||eg({memoizer:Xv()})}var ox=Y(`ZodType`,(e,t)=>(ix(),X.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(mh(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return xh(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(oS(e,t))},superRefine(e,t){return this.check(sS(e,t))},overwrite(e){return this.check(Vy(e))},optional(){return Hx(this)},exactOptional(){return Wx(this)},nullable(){return Kx(this)},nullish(){return Hx(Kx(this))},nonoptional(e){return Qx(this,e)},array(){return Px(this)},or(e){return Ix([this,e])},and(e){return Rx(this,e)},transform(e){return nS(this,Bx(e))},default(e){return Jx(this,e)},prefault(e){return Xx(this,e)},catch(e){return eS(this,e)},pipe(e){return nS(this,e)},readonly(){return iS(this)},describe(e){let t=this.clone();return ry.add(t,{description:e}),t},meta(...e){if(e.length===0)return ry.get(this);let t=this.clone();return ry.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return zh(this,`~standard`,{...S_(this),jsonSchema:{input:db(this,`input`),output:db(this,`output`)}})},set"~standard"(e){Rh(this,`~standard`,e)},parse:function e(t,n){return Kb(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await qb(this,t,n,{callee:e})},safeParse(e,t){return Jb(this,e,t)},async safeParseAsync(e,t){return Yb(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){Rh(this,`spa`,e)},validate(e,t){return yg(this,e,t)},validateAsync(e,t){return xg(this,e,t)},encode:function e(t,n){return Xb(this,t,n,{callee:e})},decode:function e(t,n){return Zb(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await Qb(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await $b(this,t,n,{callee:e})},safeEncode(e,t){return ex(this,e,t)},safeDecode(e,t){return tx(this,e,t)},async safeEncodeAsync(e,t){return nx(this,e,t)},async safeDecodeAsync(e,t){return rx(this,e,t)},toJSONSchema(e){return ub(this,{})(e)},get description(){return ry.get(this)?.description},get _def(){return this._zod.def}}),sx=Y(`_ZodString`,(e,t)=>{C_.init(e,t),ox.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Db(e,t,n,r)},Bh({format:e=>Cb(e).format??null,minLength:e=>Cb(e).minimum??null,maxLength:e=>Cb(e).maximum??null},{regex(...e){return this.check(Fy(...e))},includes(...e){return this.check(Ry(...e))},startsWith(...e){return this.check(zy(...e))},endsWith(...e){return this.check(By(...e))},min(...e){return this.check(Ny(...e))},max(...e){return this.check(My(...e))},length(...e){return this.check(Py(...e))},nonempty(...e){return this.check(Ny(1,...e))},lowercase(e){return this.check(Iy(e))},uppercase(e){return this.check(Ly(e))},trim(){return this.check(Uy())},normalize(...e){return this.check(Hy(...e))},toLowerCase(){return this.check(Wy())},toUpperCase(){return this.check(Gy())},slugify(){return this.check(Ky())}})),cx=Y(`ZodString`,(e,t)=>{C_.init(e,t),sx.init(e,t)},{email(e){return this.check(oy(mx,e))},url(e){return this.check(fy(_x,e))},jwt(e){return this.check(Dy(Mx,e))},emoji(e){return this.check(py(vx,e))},guid(e){return this.check(sy(hx,e))},uuid(e){return this.check(cy(gx,e))},uuidv4(e){return this.check(ly(gx,e))},uuidv6(e){return this.check(uy(gx,e))},uuidv7(e){return this.check(dy(gx,e))},nanoid(e){return this.check(my(yx,e))},cuid(e){return this.check(hy(bx,e))},cuid2(e){return this.check(gy(xx,e))},ulid(e){return this.check(_y(Sx,e))},base64(e){return this.check(wy(kx,e))},base64url(e){return this.check(Ty(Ax,e))},xid(e){return this.check(vy(Cx,e))},ksuid(e){return this.check(yy(wx,e))},ipv4(e){return this.check(by(Tx,e))},ipv6(e){return this.check(xy(Ex,e))},cidrv4(e){return this.check(Sy(Dx,e))},cidrv6(e){return this.check(Cy(Ox,e))},e164(e){return this.check(Ey(jx,e))},datetime(e){return this.check(Oy(ux,e))},date(e){return this.check(ky(dx,e))},time(e){return this.check(Ay(fx,e))},duration(e){return this.check(jy(px,e))}});function lx(e){return ay(cx,e)}var $=Y(`ZodStringFormat`,(e,t)=>{Z.init(e,t),sx.init(e,t)}),ux=Y(`ZodISODateTime`,(e,t)=>{H_.init(e,t),$.init(e,t)}),dx=Y(`ZodISODate`,(e,t)=>{U_.init(e,t),$.init(e,t)}),fx=Y(`ZodISOTime`,(e,t)=>{W_.init(e,t),$.init(e,t)}),px=Y(`ZodISODuration`,(e,t)=>{G_.init(e,t),$.init(e,t)}),mx=Y(`ZodEmail`,(e,t)=>{E_.init(e,t),$.init(e,t)}),hx=Y(`ZodGUID`,(e,t)=>{w_.init(e,t),$.init(e,t)}),gx=Y(`ZodUUID`,(e,t)=>{T_.init(e,t),$.init(e,t)}),_x=Y(`ZodURL`,(e,t)=>{P_.init(e,t),$.init(e,t)}),vx=Y(`ZodEmoji`,(e,t)=>{F_.init(e,t),$.init(e,t)}),yx=Y(`ZodNanoID`,(e,t)=>{I_.init(e,t),$.init(e,t)}),bx=Y(`ZodCUID`,(e,t)=>{L_.init(e,t),$.init(e,t)}),xx=Y(`ZodCUID2`,(e,t)=>{R_.init(e,t),$.init(e,t)}),Sx=Y(`ZodULID`,(e,t)=>{z_.init(e,t),$.init(e,t)}),Cx=Y(`ZodXID`,(e,t)=>{B_.init(e,t),$.init(e,t)}),wx=Y(`ZodKSUID`,(e,t)=>{V_.init(e,t),$.init(e,t)}),Tx=Y(`ZodIPv4`,(e,t)=>{K_.init(e,t),$.init(e,t)}),Ex=Y(`ZodIPv6`,(e,t)=>{Y_.init(e,t),$.init(e,t)}),Dx=Y(`ZodCIDRv4`,(e,t)=>{X_.init(e,t),$.init(e,t)}),Ox=Y(`ZodCIDRv6`,(e,t)=>{Q_.init(e,t),$.init(e,t)}),kx=Y(`ZodBase64`,(e,t)=>{tv.init(e,t),$.init(e,t)}),Ax=Y(`ZodBase64URL`,(e,t)=>{iv.init(e,t),$.init(e,t)}),jx=Y(`ZodE164`,(e,t)=>{av.init(e,t),$.init(e,t)}),Mx=Y(`ZodJWT`,(e,t)=>{sv.init(e,t),$.init(e,t)}),Nx=Y(`ZodArray`,(e,t)=>{ax(),dv.init(e,t),ox.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ab(e,t,n,r),e.element=t.element},{min(e,t){return this.check(Ny(e,t))},nonempty(e){return this.check(Ny(1,e))},max(e,t){return this.check(My(e,t))},length(e,t){return this.check(Py(e,t))},unwrap(){return this.element}});function Px(e,t){return qy(Nx,e,t)}var Fx=Y(`ZodUnion`,(e,t)=>{pv.init(e,t),ox.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jb(e,t,n,r),e.options=t.options});function Ix(e,t){return new Fx({type:`union`,options:e,...q(t)})}var Lx=Y(`ZodIntersection`,(e,t)=>{mv.init(e,t),ox.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mb(e,t,n,r)});function Rx(e,t){return new Lx({type:`intersection`,left:e,right:t})}var zx=Y(`ZodTransform`,(e,t)=>{ax(),_v.init(e,t),ox.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kb(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Qh(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Ih(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(Ih(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Bx(e){return new zx({type:`transform`,transform:e})}var Vx=Y(`ZodOptional`,(e,t)=>{yv.init(e,t),ox.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Hb(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Hx(e){return new Vx({type:`optional`,innerType:e})}var Ux=Y(`ZodExactOptional`,(e,t)=>{bv.init(e,t),ox.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Hb(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Wx(e){return new Ux({type:`optional`,innerType:e})}var Gx=Y(`ZodNullable`,(e,t)=>{xv.init(e,t),ox.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Nb(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Kx(e){return new Gx({type:`nullable`,innerType:e})}var qx=Y(`ZodDefault`,(e,t)=>{Sv.init(e,t),ox.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Lb(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Jx(e,t){return new qx({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():yh(t)}})}var Yx=Y(`ZodPrefault`,(e,t)=>{wv.init(e,t),ox.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Rb(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Xx(e,t){return new Yx({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():yh(t)}})}var Zx=Y(`ZodNonOptional`,(e,t)=>{Tv.init(e,t),ox.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pb(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Qx(e,t){return new Zx({type:`nonoptional`,innerType:e,...q(t)})}var $x=Y(`ZodCatch`,(e,t)=>{Ov.init(e,t),ox.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zb(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function eS(e,t){return new $x({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:Kh(t)})}var tS=Y(`ZodPipe`,(e,t)=>{kv.init(e,t),ox.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bb(e,t,n,r),e.in=t.in,e.out=t.out});function nS(e,t){return new tS({type:`pipe`,in:e,out:t})}var rS=Y(`ZodReadonly`,(e,t)=>{jv.init(e,t),ox.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vb(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function iS(e){return new rS({type:`readonly`,innerType:e})}var aS=Y(`ZodCustom`,(e,t)=>{Nv.init(e,t),ox.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ob(e,t,n,r)});function oS(e,t={}){return Jy(aS,e,t)}function sS(e,t){return Yy(e,t)}export{rn as _,ga as a,Ue as b,Yi as c,Ei as d,Xr as f,_n as g,vn as h,ha as i,Ci as l,ni as m,sh as n,_a as o,Qr as p,ef as r,ba as s,lx as t,wi as u,$e as v,A as x,Ye as y};
|
package/dist/ui/index.html
CHANGED
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
root.style.colorScheme = theme;
|
|
27
27
|
})();
|
|
28
28
|
</script>
|
|
29
|
-
<script type="module" crossorigin src="/ui/assets/index-
|
|
29
|
+
<script type="module" crossorigin src="/ui/assets/index-B_nIor2S.js"></script>
|
|
30
30
|
<link rel="modulepreload" crossorigin href="/ui/assets/rolldown-runtime-hePW80VL.js">
|
|
31
31
|
<link rel="modulepreload" crossorigin href="/ui/assets/react-BvB9BS1T.js">
|
|
32
32
|
<link rel="modulepreload" crossorigin href="/ui/assets/tiptap-CCr8bvo1.js">
|
|
33
|
-
<link rel="modulepreload" crossorigin href="/ui/assets/vendor-
|
|
33
|
+
<link rel="modulepreload" crossorigin href="/ui/assets/vendor-WsU_UJPA.js">
|
|
34
34
|
<link rel="stylesheet" crossorigin href="/ui/assets/index-CLF3sr9I.css">
|
|
35
35
|
</head>
|
|
36
36
|
<body>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@squadrules/mcp",
|
|
3
|
-
"version": "5.13.
|
|
3
|
+
"version": "5.13.3",
|
|
4
4
|
"description": "SquadRules MCP server for agent automation: persistent memory and deterministic workflow execution for AI agents and chats",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
"ts-jest": "29.4.14",
|
|
152
152
|
"ts-node": "^10.9.2",
|
|
153
153
|
"typescript": "^5.9.3",
|
|
154
|
-
"undici": "8.
|
|
154
|
+
"undici": "8.12.3",
|
|
155
155
|
"vite": "^8.3.4",
|
|
156
156
|
"vitest": "^5.0.3"
|
|
157
157
|
},
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
"react-router": "^8.4.0",
|
|
172
172
|
"typescript": "^5.9.3",
|
|
173
173
|
"brace-expansion": "^5.0.12",
|
|
174
|
-
"undici": "8.
|
|
174
|
+
"undici": "8.12.3",
|
|
175
175
|
"katex": "^0.18.2",
|
|
176
176
|
"source-map-js": "^1.2.2",
|
|
177
177
|
"fast-copy": "^4.1.2",
|