@es-joy/jsoe 0.26.1 → 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. package/.gitignore +10 -0
  2. package/.npmignore +9 -0
  3. package/CHANGES.md +43 -0
  4. package/README.md +3 -3
  5. package/badges/coverage-badge.svg +1 -1
  6. package/dist/formats/schema.d.ts.map +1 -1
  7. package/dist/fundamentalTypes/arrayType.d.ts.map +1 -1
  8. package/dist/fundamentalTypes/stringType.d.ts.map +1 -1
  9. package/dist/index.js +2 -2
  10. package/dist/index.js.map +1 -1
  11. package/dist/typeChoices.d.ts.map +1 -1
  12. package/dist/types.d.ts.map +1 -1
  13. package/eslint.config.js +36 -27
  14. package/package.json +12 -11
  15. package/pnpm-workspace.yaml +3 -2
  16. package/src/formats/schema.js +35 -6
  17. package/src/fundamentalTypes/arrayType.js +30 -6
  18. package/src/fundamentalTypes/stringType.js +5 -0
  19. package/src/typeChoices.js +3 -1
  20. package/src/types.js +7 -0
  21. package/vendor/typeson-registry/dist/index.js +83 -10
  22. package/vendor/zod/classic/checks.d.ts +1 -1
  23. package/vendor/zod/classic/checks.js +1 -1
  24. package/vendor/zod/classic/external.d.ts +1 -1
  25. package/vendor/zod/classic/external.js +1 -1
  26. package/vendor/zod/classic/from-json-schema.js +245 -24
  27. package/vendor/zod/classic/schemas.d.ts +17 -1
  28. package/vendor/zod/classic/schemas.js +77 -29
  29. package/vendor/zod/core/api.d.ts +6 -4
  30. package/vendor/zod/core/api.js +17 -2
  31. package/vendor/zod/core/checks.d.ts +1 -1
  32. package/vendor/zod/core/checks.js +0 -96
  33. package/vendor/zod/core/compile.d.ts +18 -4
  34. package/vendor/zod/core/compile.js +146 -67
  35. package/vendor/zod/core/doc.js +7 -2
  36. package/vendor/zod/core/errors.js +2 -5
  37. package/vendor/zod/core/json-schema-generator.js +2 -2
  38. package/vendor/zod/core/json-schema-processors.d.ts +17 -0
  39. package/vendor/zod/core/json-schema-processors.js +195 -64
  40. package/vendor/zod/core/memoizer.js +72 -23
  41. package/vendor/zod/core/parse.js +37 -16
  42. package/vendor/zod/core/regexes.d.ts +2 -0
  43. package/vendor/zod/core/regexes.js +8 -4
  44. package/vendor/zod/core/schemas.d.ts +42 -7
  45. package/vendor/zod/core/schemas.js +301 -94
  46. package/vendor/zod/core/to-json-schema.d.ts +7 -3
  47. package/vendor/zod/core/to-json-schema.js +8 -7
  48. package/vendor/zod/core/util.d.ts +25 -4
  49. package/vendor/zod/core/util.js +160 -143
  50. package/vendor/zod/core/versions.d.ts +1 -1
  51. package/vendor/zod/core/versions.js +2 -2
  52. package/vendor/zod/core/visit.js +12 -0
  53. package/vendor/zod/locales/ar.js +1 -0
  54. package/vendor/zod/locales/az.js +1 -0
  55. package/vendor/zod/locales/be.js +1 -0
  56. package/vendor/zod/locales/bg.js +1 -0
  57. package/vendor/zod/locales/bn.js +1 -0
  58. package/vendor/zod/locales/ca.js +1 -0
  59. package/vendor/zod/locales/ckb.js +1 -0
  60. package/vendor/zod/locales/cs.js +1 -0
  61. package/vendor/zod/locales/da.js +1 -0
  62. package/vendor/zod/locales/de.js +1 -0
  63. package/vendor/zod/locales/el.js +1 -0
  64. package/vendor/zod/locales/en.js +1 -0
  65. package/vendor/zod/locales/eo.js +1 -0
  66. package/vendor/zod/locales/es.js +1 -0
  67. package/vendor/zod/locales/fa.js +1 -0
  68. package/vendor/zod/locales/fi.js +1 -0
  69. package/vendor/zod/locales/fr-CA.js +1 -0
  70. package/vendor/zod/locales/fr.js +1 -0
  71. package/vendor/zod/locales/gu.js +1 -0
  72. package/vendor/zod/locales/he.js +1 -0
  73. package/vendor/zod/locales/hi.js +1 -0
  74. package/vendor/zod/locales/hr.js +1 -0
  75. package/vendor/zod/locales/hu.js +1 -0
  76. package/vendor/zod/locales/hy.js +1 -0
  77. package/vendor/zod/locales/id.js +1 -0
  78. package/vendor/zod/locales/index.d.ts +1 -0
  79. package/vendor/zod/locales/index.js +1 -0
  80. package/vendor/zod/locales/is.js +1 -0
  81. package/vendor/zod/locales/it.js +1 -0
  82. package/vendor/zod/locales/ja.js +1 -0
  83. package/vendor/zod/locales/ka.js +1 -0
  84. package/vendor/zod/locales/km.js +1 -0
  85. package/vendor/zod/locales/kn.js +1 -0
  86. package/vendor/zod/locales/ko.js +1 -0
  87. package/vendor/zod/locales/lt.js +1 -0
  88. package/vendor/zod/locales/mk.js +1 -0
  89. package/vendor/zod/locales/ms.js +1 -0
  90. package/vendor/zod/locales/ne.js +1 -0
  91. package/vendor/zod/locales/nl.js +1 -0
  92. package/vendor/zod/locales/nn.js +1 -0
  93. package/vendor/zod/locales/no.js +1 -0
  94. package/vendor/zod/locales/ota.js +1 -0
  95. package/vendor/zod/locales/pl.js +1 -0
  96. package/vendor/zod/locales/ps.js +1 -0
  97. package/vendor/zod/locales/pt-BR.js +1 -0
  98. package/vendor/zod/locales/pt.js +1 -0
  99. package/vendor/zod/locales/ro.js +1 -0
  100. package/vendor/zod/locales/ru.js +1 -0
  101. package/vendor/zod/locales/sk.js +1 -0
  102. package/vendor/zod/locales/sl.js +1 -0
  103. package/vendor/zod/locales/sv.js +1 -0
  104. package/vendor/zod/locales/ta.js +1 -0
  105. package/vendor/zod/locales/tg.d.ts +4 -0
  106. package/vendor/zod/locales/tg.js +116 -0
  107. package/vendor/zod/locales/th.js +1 -0
  108. package/vendor/zod/locales/tk.js +1 -0
  109. package/vendor/zod/locales/tr.js +1 -0
  110. package/vendor/zod/locales/uk.js +1 -0
  111. package/vendor/zod/locales/ur.js +1 -0
  112. package/vendor/zod/locales/uz.js +1 -0
  113. package/vendor/zod/locales/vi.js +1 -0
  114. package/vendor/zod/locales/yo.js +1 -0
  115. package/vendor/zod/locales/zh-CN.js +1 -0
  116. package/vendor/zod/locales/zh-TW.js +1 -0
  117. package/vendor/zod/mini/checks.d.ts +1 -1
  118. package/vendor/zod/mini/checks.js +1 -1
  119. package/vendor/zod/mini/external.d.ts +1 -1
  120. package/vendor/zod/mini/external.js +1 -1
  121. package/vendor/zod/mini/schemas.d.ts +8 -0
  122. package/vendor/zod/mini/schemas.js +19 -2
  123. package/vendor/zodexy/dist/esm/index.js +34 -1
  124. package/vendor/zodexy/dist/schema.zodexy.json +18 -0
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
- function getDefaultExportFromCjs(g){return g&&g.__esModule&&Object.prototype.hasOwnProperty.call(g,"default")?g.default:g}var jml$1={exports:{}},jml=jml$1.exports,hasRequiredJml;function requireJml(){return hasRequiredJml||(hasRequiredJml=1,function(g){let v;"undefined"!=typeof window&&window&&(v=window);let D="undefined"!=typeof document&&document||v?.document;const R=["$plugins","$map"],q="http://www.w3.org/1999/xhtml",ie=/-([a-z])/gu,se=new Map([["maxlength","maxLength"],["minlength","minLength"],["readonly","readOnly"]]),ce=new Set(["checked","defaultChecked","defaultSelected","disabled","indeterminate","open","readOnly","selected","accessKey","async","autocapitalize","autofocus","contentEditable","defaultValue","defer","draggable","formnovalidate","hidden","innerText","inputMode","ismap","multiple","novalidate","pattern","required","spellcheck","translate","value","willvalidate"]),le=new Set(["autocomplete","dir","integrity","lang","max","min","minLength","maxLength","title"]),$=g=>{if(!D)throw new Error("No document object");return D.querySelector(g)},$$=g=>{if(!D)throw new Error("No document object");return[...D.querySelectorAll(g)]};function _appendNode(g,v){const D=g.nodeName?.toLowerCase();"template"!==D?g.append(v):g.content.append(v)}function _addEvent(g,v,D,R){g.addEventListener(v,D,Boolean(R))}function _createSafeReference(g,v,R){if(!D)throw new Error("No document defined");if(!/^\w+$/u.test(R))throw new TypeError(`Bad ${g} reference; with prefix "${v}" and arg "${R}"`);const q=D.createElement("div");return q.innerHTML="&"+v+R+";",D.createTextNode(q.innerHTML)}function _upperCase(g,v){return v.toUpperCase()}function _isNullish(g){return null==g}function _isHTMLElement(g){return Boolean(g&&"object"==typeof g&&"nodeType"in g&&1===g.nodeType)}function _getType(g){if("string"==typeof g||void 0===g)return"string";const v=typeof g;if("object"===v){if(null===g)return"null";if(Array.isArray(g))return"array";if("nodeType"in g)switch(g.nodeType){case 1:return"element";case 7:return"processing-instruction";case 9:return"document";case 11:return"fragment";default:return"non-container node"}}return v}function _fragReducer(g,v){return g.append(v),g}function escapeReplacer(g){return g.replaceAll("$","$$$$")}function _replaceDefiner(g){return function(...v){const D=v[0];let R=g[""]?' xmlns="'+escapeReplacer(g[""])+'"':D;for(const[v,D]of Object.entries(g))""!==v&&(R+=" xmlns:"+v+'="'+escapeReplacer(D)+'"');return R}}function _childrenToJML(g){return function(v,D){const R=g.childNodes[D],q=Array.isArray(v)?me(...v):me(v);R.replaceWith(q)}}function _appendJML(g){return function(v){if("string"==typeof v||"number"==typeof v)throw new TypeError("Unexpected text string/number in the head");Array.isArray(v)?g.append(me(...v)):"object"==typeof v&&"nodeType"in v?g.append(v):g.append(me(v))}}function _appendJMLOrText(g){return function(v){"string"==typeof v||"number"==typeof v?g.append(String(v)):Array.isArray(v)?g.append(me(...v)):"object"==typeof v&&"nodeType"in v?g.append(v):g.append(me(v))}}function checkPluginValue(g,v,D,R,q){if(R.$state=q??"attributeValue",D&&"object"==typeof D){const q=getMatchingPlugin(R,Object.keys(D)[0]);if(q)return q.set({opts:R,element:g,attribute:{name:v,value:D}})}return D}function getMatchingPlugin(g,v){return g.$plugins&&g.$plugins.find(g=>g.name===v)}const me=function jml(...g){if(!v)throw new Error("No window object");if(!D)throw new Error("No document object");let me=D.createDocumentFragment();function _checkAtts(v){if(!D)throw new Error("No document object");for(let[R,q]of Object.entries(v))if(R=se.has(R)?String(se.get(R)):R,le.has(R))q=checkPluginValue(me,R,q,ve),_isNullish(q)||(me[R]=q);else if(ce.has(R))q=checkPluginValue(me,R,q,ve),me[R]=q;else switch(R){case"#":ve.$state="fragmentChildren",fe[fe.length]=jml(ve,q);break;case"$shadow":{const{open:g,closed:v}=q;let{content:R,template:ie}=q;const se=me.attachShadow({mode:v||!1===g?"closed":"open"});ie?(Array.isArray(ie)?ie="object"===_getType(ie[0])?jml("template",...ie,D.body):jml("template",ie,D.body):"string"==typeof ie&&(ie=$(ie)),jml(ie.content.cloneNode(!0),se)):(R||!0!==g&&(R=g||"boolean"==typeof v?R:v),R&&"boolean"!=typeof R&&(Array.isArray(R)?jml({"#":R},se):jml(R,se)));break}case"$state":case"is":case"xmlns":break;case"$custom":if(null!==q&&("object"==typeof q||"function"==typeof q)&&Object.prototype.propertyIsEnumerable.call(q,"__proto__"))throw new TypeError("`$custom` may not define `__proto__`");Object.assign(me,q);break;case"$define":{if(!("localName"in me))throw new Error("Element expected for `$define`");const R=me.localName.toLowerCase(),ie=!R.includes("-");let se;if(ie&&(se=me.getAttribute("is"),!se)){if(!Object.hasOwn(v,"is"))throw new TypeError(`Expected \`is\` with \`$define\` on built-in; args: ${JSON.stringify(g)}`);v.is=checkPluginValue(me,"is",v.is,ve),me.setAttribute("is",v.is),({is:se}=v)}const ce=ie?se:R;if(window.customElements.get(ce))break;const getConstructor=g=>{if(!D)throw new Error("No document object");const v="object"==typeof fe&&"string"==typeof fe.extends?D.createElement(fe.extends).constructor:ie?D.createElement(R).constructor:window.HTMLElement;return g?class extends v{constructor(){super(),g.call(this)}}:class extends v{}};let le,fe,ge;const xe=q;Array.isArray(xe)?xe.length<=2?([le]=xe,fe=xe[1],"string"==typeof fe?fe={extends:fe}:fe&&!Object.hasOwn(fe,"extends")&&(ge=fe),"object"==typeof le&&(ge=le,le=getConstructor())):([le,ge,fe]=xe,"string"==typeof fe&&(fe={extends:fe})):"function"==typeof xe?le=xe:(ge=xe,le=getConstructor()),le.toString().startsWith("class")||(le=getConstructor(le)),!fe&&ie&&(fe={extends:R}),ge&&Object.entries(ge).forEach(([g,v])=>{Reflect.set(le.prototype,g,v)}),window.customElements.define(ce,le,"object"==typeof fe?fe:void 0);break}case"$symbol":{if(!_isHTMLElement(me))throw new TypeError("Element expected for `$symbol`");const g=me,[v,D]=q;if("function"==typeof D){const R=D.bind(g);"string"==typeof v?me[Symbol.for(v)]=R:me[v]=R}else{const R=D;R.elem=g,"string"==typeof v?me[Symbol.for(v)]=R:me[v]=R}break}case"$data":setMap(q);break;case"$attribute":{const g=q,v=3===g.length?D.createAttributeNS(g[0],g[1]):D.createAttribute(g[0]);v.value=g.at(-1),fe[fe.length]=v;break}case"$text":{const g=D.createTextNode(q);fe[fe.length]=g;break}case"$document":{if(!q)throw new Error("Bad attribute value");const g=D.implementation.createHTMLDocument(),v=q;if(v.childNodes){const D=v.childNodes.length;for(;Object.hasOwn(g.childNodes,D);)g.childNodes[D].remove();v.childNodes.forEach(_childrenToJML(g))}else{if(v.$DOCTYPE){const D={$DOCTYPE:v.$DOCTYPE},R=jml(D);g.firstChild?.replaceWith(R)}const R=g.querySelector("html"),q=R?.querySelector("head"),ie=R?.querySelector("body");if(v.title||v.head){const R=D.createElement("meta");R.setAttribute("charset","utf-8"),q?.append(R),v.title&&(g.title=v.title),q&&v.head&&v.head.forEach(_appendJML(q))}ie&&v.body&&v.body.forEach(_appendJMLOrText(ie))}if(v.xmlDeclaration){const{version:R,encoding:q,standalone:ie}=v.xmlDeclaration,se=`${R?` version="${R}"`:""}${q?` encoding="${q}"`:""}${ie?' standalone="yes"':""}`.slice(1),ce=D.createProcessingInstruction("xml",se);g.insertBefore(ce,g.firstChild)}fe[fe.length]=g;break}case"$DOCTYPE":{const g=q,v=D.implementation.createDocumentType(g.name,g.publicId||"",g.systemId||"");fe[fe.length]=v;break}case"$on":{const v=me;for(let[D,R]of Object.entries(q||{})){if("function"==typeof R&&(R=[R,!1]),"function"!=typeof R[0])throw new TypeError(`Expect a function for \`$on\`; args: ${JSON.stringify(g)}`);_addEvent(v,D,R[0],R[1])}break}case"className":case"class":q=checkPluginValue(me,R,q,ve),_isNullish(q)||(me.className=q);break;case"dataset":{const recurse=(g,v)=>{let D="";const R=""!==v;Object.keys(g).forEach(q=>{const se=g[q];if(D=v+(R?q.replaceAll(ie,_upperCase).replace(/^([a-z])/u,_upperCase):q.replaceAll(ie,_upperCase)),null===se||"object"!=typeof se)return _isNullish(se)||(me.dataset[D]=se),void(D=v);recurse(se,D)})};recurse(q,"");break}case"innerHTML":_isNullish(q)||(me.innerHTML=q);break;case"htmlFor":case"for":if("label"===ge){q=checkPluginValue(me,R,q,ve),_isNullish(q)||(me.htmlFor=q);break}q=checkPluginValue(me,R,q,ve),me.setAttribute(R,q);break;default:{if(R.startsWith("on")){q=checkPluginValue(me,R,q,ve),me[R]=q;break}if("style"===R){if(q=checkPluginValue(me,R,q,ve),_isNullish(q))break;if("object"==typeof q){for(const[g,v]of Object.entries(q))_isNullish(v)||("float"===g?(me.style.cssFloat=v,me.style.styleFloat=v):me.style[g.replaceAll(ie,_upperCase)]=v);break}me.setAttribute(R,q);break}const g=R,v=getMatchingPlugin(ve,g);if(v){v.set({opts:ve,element:fe[0],attribute:{name:g,value:q}});break}q=checkPluginValue(me,R,q,ve),me.setAttribute(R,q);break}}}const fe=[];let ge,ve,xe=!1,_e=0;if("object"===_getType(g[0])&&Object.keys(g[0]).some(g=>R.includes(g))){if(ve=g[0],void 0===ve.$state&&(xe=!0,ve.$state="root"),Array.isArray(ve.$map)&&(ve.$map={root:ve.$map}),"$plugins"in ve){if(!Array.isArray(ve.$plugins))throw new TypeError(`\`$plugins\` must be an array; args: ${JSON.stringify(g)}`);ve.$plugins.forEach(v=>{if(!v||"object"!=typeof v)throw new TypeError(`Plugin must be an object; args: ${JSON.stringify(g)}`);if(!v.name||!v.name.startsWith("$_"))throw new TypeError(`Plugin object name must be present and begin with \`$_\`; args: ${JSON.stringify(g)}`);if("function"!=typeof v.set)throw new TypeError(`Plugin object must have a \`set\` method; args: ${JSON.stringify(g)}`)})}_e=1}else ve={$state:void 0};const ke=g.length,we=ve.$map&&ve.$map.root,setMap=g=>{let v,D;const R=we;if(!0===g)[v,D]=R;else if(Array.isArray(g)){if("string"==typeof g[0])return void g.forEach(g=>{setMap(ve.$map[g])});v=g[0]||R[0],D=g[1]||R[1]}else/^\[object (?:Weak)?Map\]$/u.test([].toString.call(g))?(v=g,D=R[1]):(v=R[0],D=g);v.set(me,D)};for(let R=_e;R<ke;R++){let ie=g[R];const se=_getType(ie);switch(se){case"null":if(R===ke-1)return fe.length<=1?fe[0]:fe.reduce(_fragReducer,D.createDocumentFragment());throw new TypeError(`\`null\` values not allowed except as final Jamilih argument; index ${R} on args: ${JSON.stringify(g)}`);case"string":switch(ie){case"!":fe[fe.length]=D.createComment(g[++R]);break;case"?":{ie=g[++R];let v=g[++R];const q=v;if(q&&"object"==typeof q){const g=[];for(const[v,D]of Object.entries(q))g.push(v+'="'+D.replaceAll('"',"&quot;")+'"');v=g.join(" ")}try{fe[fe.length]=D.createProcessingInstruction(ie,v)}catch(g){fe[fe.length]=D.createComment("?"+ie+" "+v+"?")}break}case"&":fe[fe.length]=_createSafeReference("entity","",g[++R]);break;case"#":fe[fe.length]=_createSafeReference("decimal",ie,String(g[++R]));break;case"#x":fe[fe.length]=_createSafeReference("hexadecimal",ie,g[++R]);break;case"![":try{fe[fe.length]=D.createCDATASection(g[++R])}catch(v){fe[fe.length]=D.createTextNode(g[R])}break;case"":fe[fe.length]=me=D.createDocumentFragment(),ve.$state="fragment";break;default:{ge=ie;const v=g[R+1];if(v&&"object"===_getType(v)&&v.is){const{is:g}=v;me=D.createElementNS?D.createElementNS(q,ge,{is:g}):D.createElement(ge,{is:g})}else me=D.createElementNS?D.createElementNS(q,ge):D.createElement(ge);ve.$state="element",fe[fe.length]=me;break}}break;case"object":{if(!ie||"object"!=typeof ie)throw new Error("Null should not reach here");const g=ie;if("xmlns"in g){const D=g,R=D.xmlns&&"object"==typeof D.xmlns?_replaceDefiner(D.xmlns):' xmlns="'+escapeReplacer(D.xmlns)+'"';me=fe[fe.length-1]=(new v.DOMParser).parseFromString((new v.XMLSerializer).serializeToString(me).replace(' xmlns="'+escapeReplacer(q)+'"',R),"application/xml").documentElement,ve.$state="element"}_checkAtts(g);break}case"processing-instruction":case"document":case"fragment":case"element":if(0===R&&(me=ie,ve.$state="element"),R===ke-1||R===ke-2&&null===g[R+1]){const g=fe.length;for(let v=0;v<g;v++)_appendNode(ie,fe[v])}else fe[fe.length]=ie;break;case"array":{const v=ie,R=v.length,getBadChildrenError=D=>new TypeError(`Bad children (parent array: ${JSON.stringify(g)}; index ${D} of child: ${JSON.stringify(v)})`);for(let g=0;g<R;g++){const R=v[g],q=typeof R;if(null===R||_isNullish(R))throw getBadChildrenError(g);switch(q){case"string":case"number":case"boolean":_appendNode(me,D.createTextNode(String(R)));break;default:if("object"!=typeof R)throw getBadChildrenError(g);if(Array.isArray(R)){const v=typeof R[0];if(0===R.length||"string"!==v&&"object"!==v||null===R[0])throw getBadChildrenError(g);ve.$state="children";const D=[ve,...R];_appendNode(me,jml(...D))}else if("#"in R)ve.$state="fragmentChildren",_appendNode(me,jml(ve,R["#"]));else{let g;"nodeType"in R||(g=checkPluginValue(me,null,R,ve,"children")),_appendNode(me,g||R)}}}break}default:throw new TypeError(`Unexpected type: ${se}; arg: ${ie}; index ${R} on args: ${JSON.stringify(g)}`)}}const Se=fe[0]||me;return xe&&ve.$map&&ve.$map.root&&setMap(!0),Se};class DOMException extends Error{constructor(g,v){super(g),this.code=0,this.name=v}}const toJML=function(g,{stringOutput:D=!1,reportInvalidState:R=!0,stripWhitespace:q=!1}={}){if(!v)throw new Error("No window object set");"string"==typeof g&&(g=(new v.DOMParser).parseFromString(g,"text/html"));const ie=[];let se=ie,ce=0;function invalidStateError(g){if(!R)return;const v=new DOMException(g,"INVALID_STATE_ERR");throw v.code=11,v}function addExternalID(g,v){v.systemId.includes('"')&&v.systemId.includes("'")&&invalidStateError("systemId cannot have both single and double quotes.");const{publicId:D,systemId:R}=v;R&&(g.systemId=R),D&&(g.publicId=D)}function set(g){se[ce]=g,ce++}function setChildren(){set([]),se=se[ce-1],ce=0}function setObj(g,v){se=se[ce-1][g],ce=0,v&&(se=se[v])}function parseDOM(g,v){const D="nodeType"in g?g.nodeType:null;if(!D)throw new TypeError("Not an XML type");if(5===D)return void set(["&",g.nodeName]);v={...v};const R=/^([\u{9}\u{A}\u{D}\u{20}-\u{D7FF}\u{E000}-\u{FFFD}]|[\uD800-\uDBFF][\uDC00-\uDFFF])*$/u,ie=g.nodeValue;let le,me;function setTemp(){le=se,me=ce}function resetTemp(){se=le,ce=me,ce++}switch([2,3,4,7,8].includes(D)&&ie&&!R.test(ie)&&invalidStateError("Node has bad XML character value"),D){case 1:{const D=g;setTemp();const R=D.nodeName.toLowerCase();setChildren(),set(R);const q={};let ie=!1;v[D.prefix||""]!==D.namespaceURI&&(v[D.prefix||""]=D.namespaceURI,D.prefix?q["xmlns:"+D.prefix]=D.namespaceURI:D.namespaceURI?q.xmlns=D.namespaceURI:q.xmlns=null,ie=!0),D.attributes.length?set([...D.attributes].reduce(function(g,v){return g[v.name]=v.value,g},q)):ie&&set(q);const{childNodes:se}=D;se.length&&(setChildren(),[...se].forEach(function(g){parseDOM(g,v)})),resetTemp();break}case 2:{const v=g;set({$attribute:[v.namespaceURI,v.name,v.value]});break}case 3:{const v=g;if(!v.nodeValue)throw new Error("Unexpected null comment value");if(q&&/^\s+$/u.test(v.nodeValue))return void set("");set(v.nodeValue);break}case 4:{const v=g;v.nodeValue?.includes("]]>")&&invalidStateError("CDATA cannot end with closing ]]>"),set(["![",v.nodeValue]);break}case 7:{const v=g;/^xml$/iu.test(v.target)&&invalidStateError('Processing instructions cannot be "xml".'),v.target.includes("?>")&&invalidStateError("Processing instruction targets cannot include ?>"),v.target.includes(":")&&invalidStateError('The processing instruction target cannot include ":"'),v.data.includes("?>")&&invalidStateError("Processing instruction data cannot include ?>"),set(["?",v.target,v.data]);break}case 8:{const v=g;if(!v.nodeValue)throw new Error("Unexpected null comment value");(v.nodeValue.includes("--")||v.nodeValue.length&&v.nodeValue.lastIndexOf("-")===v.nodeValue.length-1)&&invalidStateError("Comments cannot include --"),set(["!",v.nodeValue]);break}case 9:{const D=g;setTemp(),set({$document:{childNodes:[]}}),setObj("$document","childNodes");const{childNodes:R}=D;R.length||invalidStateError("Documents must have a child node"),[...R].forEach(function(g){parseDOM(g,v)}),resetTemp();break}case 10:{const v=g;setTemp();const D={$DOCTYPE:{name:v.name}};/^(\u{20}|\u{D}|\u{A}|[a-zA-Z0-9]|[-'()+,./:=?;!*#@$_%])*$/u.test(v.publicId)||invalidStateError("A publicId must have valid characters."),addExternalID(D.$DOCTYPE,v),set(D),resetTemp();break}case 11:{const D=g;setTemp(),set({"#":[]}),setObj("#");const{childNodes:R}=D;[...R].forEach(function(g){parseDOM(g,v)}),resetTemp();break}default:throw new TypeError("Not an XML type")}}return parseDOM(g,{}),D?JSON.stringify(ie[0]):ie[0]};me.toJML=toJML;const toJMLString=function(g,v){return toJML(g,Object.assign(v||{},{stringOutput:!0}))};me.toJMLString=toJMLString;const toDOM=function(...g){return me(...g)};me.toDOM=toDOM;const toHTML=function(...g){const v=me(...g);switch(v.nodeType){case 1:return v.outerHTML;case 2:return`${v.name}="${v.value.replaceAll('"',"&quot;")}"`;case 3:{const g=v.nodeValue;if(!g)throw new TypeError("Unexpected null Text node");return g}case 7:{const g=v;return`<?${g.target} ${g.data}?>`}case 9:case 11:return[...v.childNodes].map(g=>toHTML(g)).join("");case 10:{const g=v;return`<!DOCTYPE ${g.name}${g.publicId?` PUBLIC "${g.publicId}" "${g.systemId}"`:g.systemId?` SYSTEM "${g.systemId}"`:""}>`}default:throw new Error("Unexpected node type")}};me.toHTML=toHTML;const toDOMString=function(...g){return toHTML(...g)};me.toDOMString=toDOMString;const toXML=function(...g){if(!v)throw new Error("No window object set");const D=me(...g);return(new v.XMLSerializer).serializeToString(D)};me.toXML=toXML;const toXMLDOMString=function(...g){return toXML(...g)};me.toXMLDOMString=toXMLDOMString;class JamilihMap extends Map{get(g){const v="string"==typeof g?$(g):g;return super.get.call(this,v)}set(g,v){const D="string"==typeof g?$(g):g;return super.set.call(this,D,v),this}invoke(g,v,...D){const R="string"==typeof g?$(g):g;return this.get(R)[v](R,...D)}}class JamilihWeakMap extends WeakMap{get(g){const v="string"==typeof g?$(g):g;if(!v)throw new Error("Can't find the element");return super.get.call(this,v)}set(g,v){const D="string"==typeof g?$(g):g;if(!D)throw new Error("Can't find the element");return super.set.call(this,D,v),this}invoke(g,v,...D){const R="string"==typeof g?$(g):g;if(!R)throw new Error("Can't find the element");return this.get(R)[v](R,...D)}}me.Map=JamilihMap,me.WeakMap=JamilihWeakMap,me.weak=function(g,...v){const D=new JamilihWeakMap;return[D,me({$map:[D,g]},...v)]},me.strong=function(g,...v){const D=new JamilihMap;return[D,me({$map:[D,g]},...v)]},me.symbol=me.sym=me.for=function(g,v){return("string"==typeof g?$(g):g)["symbol"==typeof v?v:Symbol.for(v)]},me.command=function(g,v,D,...R){if(!(g="string"==typeof g?$(g):g))throw new Error("No element found");let q;if(["symbol","string"].includes(typeof v))return q=me.sym(g,v),"function"==typeof q?q(D,...R):q[D](...R);if(q=v.get(g),!q)throw new Error("No map found");return"function"==typeof q?q.call(g,D,...R):q[D](g,...R)};const setWindow=R=>{v=R,D=v?.document,D&&D.body&&(g.body=D.body)};me.setWindow=setWindow;const getWindow=()=>{if(!v)throw new Error("No window object set");return v};function glue(g,v){return[...g].reduce((g,D)=>(g.push(D,v),g),[]).slice(0,-1)}me.getWindow=getWindow,g.body=void 0,D&&D.body&&(g.body=D.body);const fe=" ";g.$=$,g.$$=$$,g.DOMException=DOMException,g.getWindow=getWindow,g.glue=glue,g.jml=me,g.nbsp=fe,g.setWindow=setWindow,g.toDOM=toDOM,g.toDOMString=toDOMString,g.toHTML=toHTML,g.toJML=toJML,g.toJMLString=toJMLString,g.toXML=toXML,g.toXMLDOMString=toXMLDOMString}(jml$1.exports)),jml$1.exports}var jmlExports=requireJml();class TypesonPromise{constructor(g){this.p=new Promise(g)}}TypesonPromise.__typeson__type__="TypesonPromise","undefined"!=typeof Symbol&&Object.defineProperty(TypesonPromise.prototype,Symbol.toStringTag,{get:()=>"TypesonPromise"}),TypesonPromise.prototype.then=function(g,v){return new TypesonPromise((D,R)=>{this.p.then(function(v){D(g?g(v):v)}).catch(function(g){return v?v(g):Promise.reject(g)}).then(D,R)})},TypesonPromise.prototype.catch=function(g){return this.then(void 0,g)},TypesonPromise.resolve=function(g){return new TypesonPromise(v=>{v(g)})},TypesonPromise.reject=function(g){return new TypesonPromise((v,D)=>{D(g)})},TypesonPromise.all=function(g){return new TypesonPromise(function(v,D){Promise.all(g.map(g=>g?.constructor&&"__typeson__type__"in g.constructor&&"TypesonPromise"===g.constructor.__typeson__type__?g.p:g)).then(v,D)})},TypesonPromise.race=function(g){return new TypesonPromise(function(v,D){Promise.race(g.map(g=>g?.constructor&&"__typeson__type__"in g.constructor&&"TypesonPromise"===g.constructor.__typeson__type__?g.p:g)).then(v,D)})},TypesonPromise.allSettled=function(g){return new TypesonPromise(function(v,D){Promise.allSettled(g.map(g=>g?.constructor&&"__typeson__type__"in g.constructor&&"TypesonPromise"===g.constructor.__typeson__type__?g.p:g)).then(v,D)})};const{hasOwn:e}=Object,t=Object.getPrototypeOf;function isThenable(g,v){return isObject$1(g)&&"function"==typeof g.then&&!0}function toStringTag(g){return Object.prototype.toString.call(g).slice(8,-1)}function hasConstructorOf(g,v){if(!g||"object"!=typeof g)return!1;const D=t(g);if(!D)return null===v;const R=e(D,"constructor")&&D.constructor;return"function"!=typeof R?null===v:v===R||null!==v&&Function.prototype.toString.call(R)===Function.prototype.toString.call(v)||"function"==typeof v&&"string"==typeof R.__typeson__type__&&R.__typeson__type__===v.__typeson__type__}function isPlainObject$1(g){return!(!g||"Object"!==toStringTag(g))&&(!t(g)||hasConstructorOf(g,Object))}function isUserObject(g){if(!g||"Object"!==toStringTag(g))return!1;const v=t(g);return!v||hasConstructorOf(g,Object)||isUserObject(v)}function isObject$1(g){return null!==g&&"object"==typeof g}function escapeKeyPathComponent(g){return g.replaceAll("''","''''").replace(/^$/u,"''").replaceAll("~","~0").replaceAll(".","~1")}function unescapeKeyPathComponent(g){return g.replaceAll("~1",".").replaceAll("~0","~").replace(/^''$/u,"").replaceAll("''''","''")}function getByKeyPath(g,v,D){if(""===v)return g;if(null===g||"object"!=typeof g)throw new TypeError("Unexpected non-object type");const R=v.indexOf("."),q=unescapeKeyPathComponent(-1===R?v:v.slice(0,R));if(e(g,q)){if(-1!==R){const D=g[q];return void 0===D?void 0:getByKeyPath(D,v.slice(R+1))}return g[q]}}function setAtKeyPath(g,v,D,R){if(""===v)return D;let q=g,ie=v;for(;;){if(!q||"object"!=typeof q)throw new TypeError("Unexpected non-object type");const v=ie.indexOf("."),R=unescapeKeyPathComponent(-1===v?ie:ie.slice(0,v));if("__proto__"===R)throw new TypeError("Invalid property");if(-1===v)return q[R]=D,g;if(!e(q,R))throw new TypeError("Invalid property");q=q[R],ie=ie.slice(v+1)}}function getJSONType(g){return null===g?"null":Array.isArray(g)?"array":typeof g}
1
+ function getDefaultExportFromCjs(g){return g&&g.__esModule&&Object.prototype.hasOwnProperty.call(g,"default")?g.default:g}var jml$1={exports:{}},jml=jml$1.exports,hasRequiredJml;function requireJml(){return hasRequiredJml||(hasRequiredJml=1,function(g){let v;"undefined"!=typeof window&&window&&(v=window);let L="undefined"!=typeof document&&document||v?.document;const R=["$plugins","$map"],W="http://www.w3.org/1999/xhtml",ie=/-([a-z])/gu,ce=new Map([["maxlength","maxLength"],["minlength","minLength"],["readonly","readOnly"]]),le=new Set(["checked","defaultChecked","defaultSelected","disabled","indeterminate","open","readOnly","selected","accessKey","async","autocapitalize","autofocus","contentEditable","defaultValue","defer","draggable","formnovalidate","hidden","innerText","inputMode","ismap","multiple","novalidate","pattern","required","spellcheck","translate","value","willvalidate"]),ue=new Set(["autocomplete","dir","integrity","lang","max","min","minLength","maxLength","title"]),$=g=>{if(!L)throw new Error("No document object");return L.querySelector(g)},$$=g=>{if(!L)throw new Error("No document object");return[...L.querySelectorAll(g)]};function _appendNode(g,v){const L=g.nodeName?.toLowerCase();"template"!==L?g.append(v):g.content.append(v)}function _addEvent(g,v,L,R){g.addEventListener(v,L,Boolean(R))}function _createSafeReference(g,v,R){if(!L)throw new Error("No document defined");if(!/^\w+$/u.test(R))throw new TypeError(`Bad ${g} reference; with prefix "${v}" and arg "${R}"`);const W=L.createElement("div");return W.innerHTML="&"+v+R+";",L.createTextNode(W.innerHTML)}function _upperCase(g,v){return v.toUpperCase()}function _isNullish(g){return null==g}function _isHTMLElement(g){return Boolean(g&&"object"==typeof g&&"nodeType"in g&&1===g.nodeType)}function _getType(g){if("string"==typeof g||void 0===g)return"string";const v=typeof g;if("object"===v){if(null===g)return"null";if(Array.isArray(g))return"array";if("nodeType"in g)switch(g.nodeType){case 1:return"element";case 7:return"processing-instruction";case 9:return"document";case 11:return"fragment";default:return"non-container node"}}return v}function _fragReducer(g,v){return g.append(v),g}function escapeReplacer(g){return g.replaceAll("$","$$$$")}function _replaceDefiner(g){return function(...v){const L=v[0];let R=g[""]?' xmlns="'+escapeReplacer(g[""])+'"':L;for(const[v,L]of Object.entries(g))""!==v&&(R+=" xmlns:"+v+'="'+escapeReplacer(L)+'"');return R}}function _childrenToJML(g){return function(v,L){const R=g.childNodes[L],W=Array.isArray(v)?me(...v):me(v);R.replaceWith(W)}}function _appendJML(g){return function(v){if("string"==typeof v||"number"==typeof v)throw new TypeError("Unexpected text string/number in the head");Array.isArray(v)?g.append(me(...v)):"object"==typeof v&&"nodeType"in v?g.append(v):g.append(me(v))}}function _appendJMLOrText(g){return function(v){"string"==typeof v||"number"==typeof v?g.append(String(v)):Array.isArray(v)?g.append(me(...v)):"object"==typeof v&&"nodeType"in v?g.append(v):g.append(me(v))}}function checkPluginValue(g,v,L,R,W){if(R.$state=W??"attributeValue",L&&"object"==typeof L){const W=getMatchingPlugin(R,Object.keys(L)[0]);if(W)return W.set({opts:R,element:g,attribute:{name:v,value:L}})}return L}function getMatchingPlugin(g,v){return g.$plugins&&g.$plugins.find(g=>g.name===v)}const me=function jml(...g){if(!v)throw new Error("No window object");if(!L)throw new Error("No document object");let me=L.createDocumentFragment();function _checkAtts(v){if(!L)throw new Error("No document object");for(let[R,W]of Object.entries(v))if(R=ce.has(R)?String(ce.get(R)):R,ue.has(R))W=checkPluginValue(me,R,W,xe),_isNullish(W)||(me[R]=W);else if(le.has(R))W=checkPluginValue(me,R,W,xe),me[R]=W;else switch(R){case"#":xe.$state="fragmentChildren",ge[ge.length]=jml(xe,W);break;case"$shadow":{const{open:g,closed:v}=W;let{content:R,template:ie}=W;const ce=me.attachShadow({mode:v||!1===g?"closed":"open"});ie?(Array.isArray(ie)?ie="object"===_getType(ie[0])?jml("template",...ie,L.body):jml("template",ie,L.body):"string"==typeof ie&&(ie=$(ie)),jml(ie.content.cloneNode(!0),ce)):(R||!0!==g&&(R=g||"boolean"==typeof v?R:v),R&&"boolean"!=typeof R&&(Array.isArray(R)?jml({"#":R},ce):jml(R,ce)));break}case"$state":case"is":case"xmlns":break;case"$custom":if(null!==W&&("object"==typeof W||"function"==typeof W)&&Object.prototype.propertyIsEnumerable.call(W,"__proto__"))throw new TypeError("`$custom` may not define `__proto__`");Object.assign(me,W);break;case"$define":{if(!("localName"in me))throw new Error("Element expected for `$define`");const R=me.localName.toLowerCase(),ie=!R.includes("-");let ce;if(ie&&(ce=me.getAttribute("is"),!ce)){if(!Object.hasOwn(v,"is"))throw new TypeError(`Expected \`is\` with \`$define\` on built-in; args: ${JSON.stringify(g)}`);v.is=checkPluginValue(me,"is",v.is,xe),me.setAttribute("is",v.is),({is:ce}=v)}const le=ie?ce:R;if(window.customElements.get(le))break;const getConstructor=g=>{if(!L)throw new Error("No document object");const v="object"==typeof ge&&"string"==typeof ge.extends?L.createElement(ge.extends).constructor:ie?L.createElement(R).constructor:window.HTMLElement;return g?class extends v{constructor(){super(),g.call(this)}}:class extends v{}};let ue,ge,ve;const _e=W;Array.isArray(_e)?_e.length<=2?([ue]=_e,ge=_e[1],"string"==typeof ge?ge={extends:ge}:ge&&!Object.hasOwn(ge,"extends")&&(ve=ge),"object"==typeof ue&&(ve=ue,ue=getConstructor())):([ue,ve,ge]=_e,"string"==typeof ge&&(ge={extends:ge})):"function"==typeof _e?ue=_e:(ve=_e,ue=getConstructor()),ue.toString().startsWith("class")||(ue=getConstructor(ue)),!ge&&ie&&(ge={extends:R}),ve&&Object.entries(ve).forEach(([g,v])=>{Reflect.set(ue.prototype,g,v)}),window.customElements.define(le,ue,"object"==typeof ge?ge:void 0);break}case"$symbol":{if(!_isHTMLElement(me))throw new TypeError("Element expected for `$symbol`");const g=me,[v,L]=W;if("function"==typeof L){const R=L.bind(g);"string"==typeof v?me[Symbol.for(v)]=R:me[v]=R}else{const R=L;R.elem=g,"string"==typeof v?me[Symbol.for(v)]=R:me[v]=R}break}case"$data":setMap(W);break;case"$attribute":{const g=W,v=3===g.length?L.createAttributeNS(g[0],g[1]):L.createAttribute(g[0]);v.value=g.at(-1),ge[ge.length]=v;break}case"$text":{const g=L.createTextNode(W);ge[ge.length]=g;break}case"$document":{if(!W)throw new Error("Bad attribute value");const g=L.implementation.createHTMLDocument(),v=W;if(v.childNodes){const L=v.childNodes.length;for(;Object.hasOwn(g.childNodes,L);)g.childNodes[L].remove();v.childNodes.forEach(_childrenToJML(g))}else{if(v.$DOCTYPE){const L={$DOCTYPE:v.$DOCTYPE},R=jml(L);g.firstChild?.replaceWith(R)}const R=g.querySelector("html"),W=R?.querySelector("head"),ie=R?.querySelector("body");if(v.title||v.head){const R=L.createElement("meta");R.setAttribute("charset","utf-8"),W?.append(R),v.title&&(g.title=v.title),W&&v.head&&v.head.forEach(_appendJML(W))}ie&&v.body&&v.body.forEach(_appendJMLOrText(ie))}if(v.xmlDeclaration){const{version:R,encoding:W,standalone:ie}=v.xmlDeclaration,ce=`${R?` version="${R}"`:""}${W?` encoding="${W}"`:""}${ie?' standalone="yes"':""}`.slice(1),le=L.createProcessingInstruction("xml",ce);g.insertBefore(le,g.firstChild)}ge[ge.length]=g;break}case"$DOCTYPE":{const g=W,v=L.implementation.createDocumentType(g.name,g.publicId||"",g.systemId||"");ge[ge.length]=v;break}case"$on":{const v=me;for(let[L,R]of Object.entries(W||{})){if("function"==typeof R&&(R=[R,!1]),"function"!=typeof R[0])throw new TypeError(`Expect a function for \`$on\`; args: ${JSON.stringify(g)}`);_addEvent(v,L,R[0],R[1])}break}case"className":case"class":W=checkPluginValue(me,R,W,xe),_isNullish(W)||(me.className=W);break;case"dataset":{const recurse=(g,v)=>{let L="";const R=""!==v;Object.keys(g).forEach(W=>{const ce=g[W];if(L=v+(R?W.replaceAll(ie,_upperCase).replace(/^([a-z])/u,_upperCase):W.replaceAll(ie,_upperCase)),null===ce||"object"!=typeof ce)return _isNullish(ce)||(me.dataset[L]=ce),void(L=v);recurse(ce,L)})};recurse(W,"");break}case"innerHTML":_isNullish(W)||(me.innerHTML=W);break;case"htmlFor":case"for":if("label"===ve){W=checkPluginValue(me,R,W,xe),_isNullish(W)||(me.htmlFor=W);break}W=checkPluginValue(me,R,W,xe),me.setAttribute(R,W);break;default:{if(R.startsWith("on")){W=checkPluginValue(me,R,W,xe),me[R]=W;break}if("style"===R){if(W=checkPluginValue(me,R,W,xe),_isNullish(W))break;if("object"==typeof W){for(const[g,v]of Object.entries(W))_isNullish(v)||("float"===g?(me.style.cssFloat=v,me.style.styleFloat=v):me.style[g.replaceAll(ie,_upperCase)]=v);break}me.setAttribute(R,W);break}const g=R,v=getMatchingPlugin(xe,g);if(v){v.set({opts:xe,element:ge[0],attribute:{name:g,value:W}});break}W=checkPluginValue(me,R,W,xe),me.setAttribute(R,W);break}}}const ge=[];let ve,xe,_e=!1,ke=0;if("object"===_getType(g[0])&&Object.keys(g[0]).some(g=>R.includes(g))){if(xe=g[0],void 0===xe.$state&&(_e=!0,xe.$state="root"),Array.isArray(xe.$map)&&(xe.$map={root:xe.$map}),"$plugins"in xe){if(!Array.isArray(xe.$plugins))throw new TypeError(`\`$plugins\` must be an array; args: ${JSON.stringify(g)}`);xe.$plugins.forEach(v=>{if(!v||"object"!=typeof v)throw new TypeError(`Plugin must be an object; args: ${JSON.stringify(g)}`);if(!v.name||!v.name.startsWith("$_"))throw new TypeError(`Plugin object name must be present and begin with \`$_\`; args: ${JSON.stringify(g)}`);if("function"!=typeof v.set)throw new TypeError(`Plugin object must have a \`set\` method; args: ${JSON.stringify(g)}`)})}ke=1}else xe={$state:void 0};const Se=g.length,we=xe.$map&&xe.$map.root,setMap=g=>{let v,L;const R=we;if(!0===g)[v,L]=R;else if(Array.isArray(g)){if("string"==typeof g[0])return void g.forEach(g=>{setMap(xe.$map[g])});v=g[0]||R[0],L=g[1]||R[1]}else/^\[object (?:Weak)?Map\]$/u.test([].toString.call(g))?(v=g,L=R[1]):(v=R[0],L=g);v.set(me,L)};for(let R=ke;R<Se;R++){let ie=g[R];const ce=_getType(ie);switch(ce){case"null":if(R===Se-1)return ge.length<=1?ge[0]:ge.reduce(_fragReducer,L.createDocumentFragment());throw new TypeError(`\`null\` values not allowed except as final Jamilih argument; index ${R} on args: ${JSON.stringify(g)}`);case"string":switch(ie){case"!":ge[ge.length]=L.createComment(g[++R]);break;case"?":{ie=g[++R];let v=g[++R];const W=v;if(W&&"object"==typeof W){const g=[];for(const[v,L]of Object.entries(W))g.push(v+'="'+L.replaceAll('"',"&quot;")+'"');v=g.join(" ")}try{ge[ge.length]=L.createProcessingInstruction(ie,v)}catch(g){ge[ge.length]=L.createComment("?"+ie+" "+v+"?")}break}case"&":ge[ge.length]=_createSafeReference("entity","",g[++R]);break;case"#":ge[ge.length]=_createSafeReference("decimal",ie,String(g[++R]));break;case"#x":ge[ge.length]=_createSafeReference("hexadecimal",ie,g[++R]);break;case"![":try{ge[ge.length]=L.createCDATASection(g[++R])}catch(v){ge[ge.length]=L.createTextNode(g[R])}break;case"":ge[ge.length]=me=L.createDocumentFragment(),xe.$state="fragment";break;default:{ve=ie;const v=g[R+1];if(v&&"object"===_getType(v)&&v.is){const{is:g}=v;me=L.createElementNS?L.createElementNS(W,ve,{is:g}):L.createElement(ve,{is:g})}else me=L.createElementNS?L.createElementNS(W,ve):L.createElement(ve);xe.$state="element",ge[ge.length]=me;break}}break;case"object":{if(!ie||"object"!=typeof ie)throw new Error("Null should not reach here");const g=ie;if("xmlns"in g){const L=g,R=L.xmlns&&"object"==typeof L.xmlns?_replaceDefiner(L.xmlns):' xmlns="'+escapeReplacer(L.xmlns)+'"';me=ge[ge.length-1]=(new v.DOMParser).parseFromString((new v.XMLSerializer).serializeToString(me).replace(' xmlns="'+escapeReplacer(W)+'"',R),"application/xml").documentElement,xe.$state="element"}_checkAtts(g);break}case"processing-instruction":case"document":case"fragment":case"element":if(0===R&&(me=ie,xe.$state="element"),R===Se-1||R===Se-2&&null===g[R+1]){const g=ge.length;for(let v=0;v<g;v++)_appendNode(ie,ge[v])}else ge[ge.length]=ie;break;case"array":{const v=ie,R=v.length,getBadChildrenError=L=>new TypeError(`Bad children (parent array: ${JSON.stringify(g)}; index ${L} of child: ${JSON.stringify(v)})`);for(let g=0;g<R;g++){const R=v[g],W=typeof R;if(null===R||_isNullish(R))throw getBadChildrenError(g);switch(W){case"string":case"number":case"boolean":_appendNode(me,L.createTextNode(String(R)));break;default:if("object"!=typeof R)throw getBadChildrenError(g);if(Array.isArray(R)){const v=typeof R[0];if(0===R.length||"string"!==v&&"object"!==v||null===R[0])throw getBadChildrenError(g);xe.$state="children";const L=[xe,...R];_appendNode(me,jml(...L))}else if("#"in R)xe.$state="fragmentChildren",_appendNode(me,jml(xe,R["#"]));else{let g;"nodeType"in R||(g=checkPluginValue(me,null,R,xe,"children")),_appendNode(me,g||R)}}}break}default:throw new TypeError(`Unexpected type: ${ce}; arg: ${ie}; index ${R} on args: ${JSON.stringify(g)}`)}}const Ie=ge[0]||me;return _e&&xe.$map&&xe.$map.root&&setMap(!0),Ie};class DOMException extends Error{constructor(g,v){super(g),this.code=0,this.name=v}}const toJML=function(g,{stringOutput:L=!1,reportInvalidState:R=!0,stripWhitespace:W=!1}={}){if(!v)throw new Error("No window object set");"string"==typeof g&&(g=(new v.DOMParser).parseFromString(g,"text/html"));const ie=[];let ce=ie,le=0;function invalidStateError(g){if(!R)return;const v=new DOMException(g,"INVALID_STATE_ERR");throw v.code=11,v}function addExternalID(g,v){v.systemId.includes('"')&&v.systemId.includes("'")&&invalidStateError("systemId cannot have both single and double quotes.");const{publicId:L,systemId:R}=v;R&&(g.systemId=R),L&&(g.publicId=L)}function set(g){ce[le]=g,le++}function setChildren(){set([]),ce=ce[le-1],le=0}function setObj(g,v){ce=ce[le-1][g],le=0,v&&(ce=ce[v])}function parseDOM(g,v){const L="nodeType"in g?g.nodeType:null;if(!L)throw new TypeError("Not an XML type");if(5===L)return void set(["&",g.nodeName]);v={...v};const R=/^([\u{9}\u{A}\u{D}\u{20}-\u{D7FF}\u{E000}-\u{FFFD}]|[\uD800-\uDBFF][\uDC00-\uDFFF])*$/u,ie=g.nodeValue;let ue,me;function setTemp(){ue=ce,me=le}function resetTemp(){ce=ue,le=me,le++}switch([2,3,4,7,8].includes(L)&&ie&&!R.test(ie)&&invalidStateError("Node has bad XML character value"),L){case 1:{const L=g;setTemp();const R=L.nodeName.toLowerCase();setChildren(),set(R);const W={};let ie=!1;v[L.prefix||""]!==L.namespaceURI&&(v[L.prefix||""]=L.namespaceURI,L.prefix?W["xmlns:"+L.prefix]=L.namespaceURI:L.namespaceURI?W.xmlns=L.namespaceURI:W.xmlns=null,ie=!0),L.attributes.length?set([...L.attributes].reduce(function(g,v){return g[v.name]=v.value,g},W)):ie&&set(W);const{childNodes:ce}=L;ce.length&&(setChildren(),[...ce].forEach(function(g){parseDOM(g,v)})),resetTemp();break}case 2:{const v=g;set({$attribute:[v.namespaceURI,v.name,v.value]});break}case 3:{const v=g;if(!v.nodeValue)throw new Error("Unexpected null comment value");if(W&&/^\s+$/u.test(v.nodeValue))return void set("");set(v.nodeValue);break}case 4:{const v=g;v.nodeValue?.includes("]]>")&&invalidStateError("CDATA cannot end with closing ]]>"),set(["![",v.nodeValue]);break}case 7:{const v=g;/^xml$/iu.test(v.target)&&invalidStateError('Processing instructions cannot be "xml".'),v.target.includes("?>")&&invalidStateError("Processing instruction targets cannot include ?>"),v.target.includes(":")&&invalidStateError('The processing instruction target cannot include ":"'),v.data.includes("?>")&&invalidStateError("Processing instruction data cannot include ?>"),set(["?",v.target,v.data]);break}case 8:{const v=g;if(!v.nodeValue)throw new Error("Unexpected null comment value");(v.nodeValue.includes("--")||v.nodeValue.length&&v.nodeValue.lastIndexOf("-")===v.nodeValue.length-1)&&invalidStateError("Comments cannot include --"),set(["!",v.nodeValue]);break}case 9:{const L=g;setTemp(),set({$document:{childNodes:[]}}),setObj("$document","childNodes");const{childNodes:R}=L;R.length||invalidStateError("Documents must have a child node"),[...R].forEach(function(g){parseDOM(g,v)}),resetTemp();break}case 10:{const v=g;setTemp();const L={$DOCTYPE:{name:v.name}};/^(\u{20}|\u{D}|\u{A}|[a-zA-Z0-9]|[-'()+,./:=?;!*#@$_%])*$/u.test(v.publicId)||invalidStateError("A publicId must have valid characters."),addExternalID(L.$DOCTYPE,v),set(L),resetTemp();break}case 11:{const L=g;setTemp(),set({"#":[]}),setObj("#");const{childNodes:R}=L;[...R].forEach(function(g){parseDOM(g,v)}),resetTemp();break}default:throw new TypeError("Not an XML type")}}return parseDOM(g,{}),L?JSON.stringify(ie[0]):ie[0]};me.toJML=toJML;const toJMLString=function(g,v){return toJML(g,Object.assign(v||{},{stringOutput:!0}))};me.toJMLString=toJMLString;const toDOM=function(...g){return me(...g)};me.toDOM=toDOM;const toHTML=function(...g){const v=me(...g);switch(v.nodeType){case 1:return v.outerHTML;case 2:return`${v.name}="${v.value.replaceAll('"',"&quot;")}"`;case 3:{const g=v.nodeValue;if(!g)throw new TypeError("Unexpected null Text node");return g}case 7:{const g=v;return`<?${g.target} ${g.data}?>`}case 9:case 11:return[...v.childNodes].map(g=>toHTML(g)).join("");case 10:{const g=v;return`<!DOCTYPE ${g.name}${g.publicId?` PUBLIC "${g.publicId}" "${g.systemId}"`:g.systemId?` SYSTEM "${g.systemId}"`:""}>`}default:throw new Error("Unexpected node type")}};me.toHTML=toHTML;const toDOMString=function(...g){return toHTML(...g)};me.toDOMString=toDOMString;const toXML=function(...g){if(!v)throw new Error("No window object set");const L=me(...g);return(new v.XMLSerializer).serializeToString(L)};me.toXML=toXML;const toXMLDOMString=function(...g){return toXML(...g)};me.toXMLDOMString=toXMLDOMString;class JamilihMap extends Map{get(g){const v="string"==typeof g?$(g):g;return super.get.call(this,v)}set(g,v){const L="string"==typeof g?$(g):g;return super.set.call(this,L,v),this}invoke(g,v,...L){const R="string"==typeof g?$(g):g;return this.get(R)[v](R,...L)}}class JamilihWeakMap extends WeakMap{get(g){const v="string"==typeof g?$(g):g;if(!v)throw new Error("Can't find the element");return super.get.call(this,v)}set(g,v){const L="string"==typeof g?$(g):g;if(!L)throw new Error("Can't find the element");return super.set.call(this,L,v),this}invoke(g,v,...L){const R="string"==typeof g?$(g):g;if(!R)throw new Error("Can't find the element");return this.get(R)[v](R,...L)}}me.Map=JamilihMap,me.WeakMap=JamilihWeakMap,me.weak=function(g,...v){const L=new JamilihWeakMap;return[L,me({$map:[L,g]},...v)]},me.strong=function(g,...v){const L=new JamilihMap;return[L,me({$map:[L,g]},...v)]},me.symbol=me.sym=me.for=function(g,v){return("string"==typeof g?$(g):g)["symbol"==typeof v?v:Symbol.for(v)]},me.command=function(g,v,L,...R){if(!(g="string"==typeof g?$(g):g))throw new Error("No element found");let W;if(["symbol","string"].includes(typeof v))return W=me.sym(g,v),"function"==typeof W?W(L,...R):W[L](...R);if(W=v.get(g),!W)throw new Error("No map found");return"function"==typeof W?W.call(g,L,...R):W[L](g,...R)};const setWindow=R=>{v=R,L=v?.document,L&&L.body&&(g.body=L.body)};me.setWindow=setWindow;const getWindow=()=>{if(!v)throw new Error("No window object set");return v};function glue(g,v){return[...g].reduce((g,L)=>(g.push(L,v),g),[]).slice(0,-1)}me.getWindow=getWindow,g.body=void 0,L&&L.body&&(g.body=L.body);const ge=" ";g.$=$,g.$$=$$,g.DOMException=DOMException,g.getWindow=getWindow,g.glue=glue,g.jml=me,g.nbsp=ge,g.setWindow=setWindow,g.toDOM=toDOM,g.toDOMString=toDOMString,g.toHTML=toHTML,g.toJML=toJML,g.toJMLString=toJMLString,g.toXML=toXML,g.toXMLDOMString=toXMLDOMString}(jml$1.exports)),jml$1.exports}var jmlExports=requireJml();class TypesonPromise{constructor(g){this.p=new Promise(g)}}TypesonPromise.__typeson__type__="TypesonPromise","undefined"!=typeof Symbol&&Object.defineProperty(TypesonPromise.prototype,Symbol.toStringTag,{get:()=>"TypesonPromise"}),TypesonPromise.prototype.then=function(g,v){return new TypesonPromise((L,R)=>{this.p.then(function(v){L(g?g(v):v)}).catch(function(g){return v?v(g):Promise.reject(g)}).then(L,R)})},TypesonPromise.prototype.catch=function(g){return this.then(void 0,g)},TypesonPromise.resolve=function(g){return new TypesonPromise(v=>{v(g)})},TypesonPromise.reject=function(g){return new TypesonPromise((v,L)=>{L(g)})},TypesonPromise.all=function(g){return new TypesonPromise(function(v,L){Promise.all(g.map(g=>g?.constructor&&"__typeson__type__"in g.constructor&&"TypesonPromise"===g.constructor.__typeson__type__?g.p:g)).then(v,L)})},TypesonPromise.race=function(g){return new TypesonPromise(function(v,L){Promise.race(g.map(g=>g?.constructor&&"__typeson__type__"in g.constructor&&"TypesonPromise"===g.constructor.__typeson__type__?g.p:g)).then(v,L)})},TypesonPromise.allSettled=function(g){return new TypesonPromise(function(v,L){Promise.allSettled(g.map(g=>g?.constructor&&"__typeson__type__"in g.constructor&&"TypesonPromise"===g.constructor.__typeson__type__?g.p:g)).then(v,L)})};const{hasOwn:e}=Object,t=Object.getPrototypeOf;function isThenable(g,v){return isObject$1(g)&&"function"==typeof g.then&&!0}function toStringTag(g){return Object.prototype.toString.call(g).slice(8,-1)}function hasConstructorOf(g,v){if(!g||"object"!=typeof g)return!1;const L=t(g);if(!L)return null===v;const R=e(L,"constructor")&&L.constructor;return"function"!=typeof R?null===v:v===R||null!==v&&Function.prototype.toString.call(R)===Function.prototype.toString.call(v)||"function"==typeof v&&"string"==typeof R.__typeson__type__&&R.__typeson__type__===v.__typeson__type__}function isPlainObject$1(g){return!(!g||"Object"!==toStringTag(g))&&(!t(g)||hasConstructorOf(g,Object))}function isUserObject(g){if(!g||"Object"!==toStringTag(g))return!1;const v=t(g);return!v||hasConstructorOf(g,Object)||isUserObject(v)}function isObject$1(g){return null!==g&&"object"==typeof g}function escapeKeyPathComponent(g){return g.replaceAll("''","''''").replace(/^$/u,"''").replaceAll("~","~0").replaceAll(".","~1")}function unescapeKeyPathComponent(g){return g.replaceAll("~1",".").replaceAll("~0","~").replace(/^''$/u,"").replaceAll("''''","''")}function getByKeyPath(g,v,L){if(""===v)return g;if(null===g||"object"!=typeof g)throw new TypeError("Unexpected non-object type");const R=v.indexOf("."),W=unescapeKeyPathComponent(-1===R?v:v.slice(0,R));if(e(g,W)){if(-1!==R){const L=g[W];return void 0===L?void 0:getByKeyPath(L,v.slice(R+1))}return g[W]}}function setAtKeyPath(g,v,L,R){if(""===v)return L;let W=g,ie=v;for(;;){if(!W||"object"!=typeof W)throw new TypeError("Unexpected non-object type");const v=ie.indexOf("."),R=unescapeKeyPathComponent(-1===v?ie:ie.slice(0,v));if("__proto__"===R)throw new TypeError("Invalid property");if(-1===v)return W[R]=L,g;if(!e(W,R))throw new TypeError("Invalid property");W=W[R],ie=ie.slice(v+1)}}function getJSONType(g){return null===g?"null":Array.isArray(g)?"array":typeof g}
2
2
  /**
3
3
  * @file Typeson - JSON with types.
4
4
  * @license The MIT License (MIT)
5
5
  * @copyright (c) 2016-2018 David Fahlander, Brett Zamir
6
- */const{keys:r,hasOwn:n}=Object,{isArray:o}=Array,a=["type","replaced","iterateIn","iterateUnsetNumeric","iterateSymbols","addLength"];function setOwnEnumerable(g,v,D){Object.defineProperty(g,v,{configurable:!0,enumerable:!0,value:D,writable:!0})}const s=["asyncIterator","hasInstance","isConcatSpreadable","iterator","match","matchAll","replace","search","species","split","toPrimitive","toStringTag","unscopables"];function nestedPathsFirst(g,v){if(""===g.keypath)return-1;let D=g.keypath.match(/\./gu)??0,R=v.keypath.match(/\./gu)??0;return D&&(D=D.length),R&&(R=R.length),D>R?-1:D<R?1:g.keypath<v.keypath?-1:g.keypath>v.keypath?1:0}class Typeson{constructor(g){this.options=g,this.plainObjectReplacers=[],this.nonplainObjectReplacers=[],this.revivers={},this.types={},this.symbolsByName=Object.create(null),this.symbolsByValue=new Map;const v=g?.symbols;v&&Object.entries(v).forEach(([g,v])=>{if("symbol"!=typeof v)throw new TypeError("Non-symbol value supplied for `symbols` entry: "+g);this.symbolsByName[g]=v,this.symbolsByValue.set(v,g)})}stringify(g,v,D,R){R={...this.options,...R,stringification:!0};const q=this.encapsulate(g,null,R);return o(q)?JSON.stringify(q[0],v,D):q.then(g=>JSON.stringify(g,v,D))}stringifySync(g,v,D,R){return this.stringify(g,v,D,{throwOnBadSyncType:!0,...R,sync:!0})}stringifyAsync(g,v,D,R){return this.stringify(g,v,D,{throwOnBadSyncType:!0,...R,sync:!1})}parse(g,v,D){return D={...this.options,...D,parse:!0},this.revive(JSON.parse(g,v),D)}parseSync(g,v,D){return this.parse(g,v,{throwOnBadSyncType:!0,...D,sync:!0})}parseAsync(g,v,D){return this.parse(g,v,{throwOnBadSyncType:!0,...D,sync:!1})}specialTypeNames(g,v,D={}){return this.encapsulate(g,v,{...D,returnTypeNames:!0})}rootTypeName(g,v,D={}){return this.encapsulate(g,v,{...D,iterateNone:!0})}encapsulate(g,v,D){const R={sync:!0,...this.options,...D},{sync:q}=R,ie={},se={},ce=[],le=[],me=[],fe=!("cyclic"in R)||R.cyclic,{encapsulateObserver:ge,encapsulateError:ve}=R,finish=g=>{const v=Object.values(ie);if(R.iterateNone)return v.length?v[0]:getJSONType(g);if(R.returnTypeNames)return!!v.length&&[...new Set(v)];const D=Object.keys(se).length>0,q=isObject$1(g)&&(n(g,"$types")||n(g,"$symbolKeys"));return D||v.length?(!q&&g&&isPlainObject$1(g)?v.length&&(g.$types=ie):g={$:g,$types:{$:ie}},D&&(g.$symbolKeys=se)):q&&(g={$:g,$types:!0}),g},checkPromises=async(g,v)=>{const D=await Promise.all(v.map(g=>g[1].p));return await Promise.all(D.map(async function(D){const R=[],[q]=v.splice(0,1),[ie,,se,ce,le,me,fe]=q,ge=_encapsulate(ie,D,se,ce,R,!0,fe),ve=hasConstructorOf(ge,TypesonPromise);return ie&&ve?(setOwnEnumerable(le,me,await ge.p),checkPromises(g,R)):(ie?setOwnEnumerable(le,me,ge):g=ve?ge.p:ge,checkPromises(g,R))})),g},_adaptBuiltinStateObjectProperties=(g,v,D)=>{Object.assign(g,v);const R=a.map(v=>{const D=g[v];return delete g[v],D});D(),a.forEach((v,D)=>{g[v]=R[D]})},_encapsulate=(g,v,D,q,me,fe,xe)=>{let _e,ke={};const we=ge?function(R){const ie=xe??q.type??getJSONType(v);ge(Object.assign(R??ke,{keypath:g,value:v,cyclic:D,stateObj:q,promisesData:me,resolvingTypesonPromise:fe,awaitingTypesonPromise:hasConstructorOf(v,TypesonPromise)},{type:ie}))}:null,getEncapsulatedValue=(g,v,R)=>{try{return{value:_encapsulate(g,v[R],Boolean(D),q,me,fe)}}catch(D){if(!ve)throw D;const ie=xe??q.type??getJSONType(v),se=ve({keypath:g,error:D,parent:v,key:R,stateObj:q,type:ie});if(!se)throw D;if("substitute"in se)return{value:se.substitute,substitute:!0};if(se.ignore)return;throw D}};if(["string","boolean","number","undefined"].includes(typeof v))return void 0===v||v===1/0||0===v||v===-1/0||Number.isNaN(v)?(_e=q.replaced?v:replace(g,v,q,me,!1,fe,we),_e!==v&&(ke={replaced:_e})):_e=v,we&&we(),_e;if(null===v)return we&&we(),v;if(D&&v&&"object"==typeof v&&!q.iterateIn&&!q.iterateUnsetNumeric){const R=ce.indexOf(v);if(-1!==R)return ie[g]="#",we&&we({cyclicKeypath:le[R]}),"#"+le[R];!0===D&&(ce.push(v),le.push(g))}const Se=isPlainObject$1(v),Ie=o(v),Ee=(Se||Ie)&&(!this.plainObjectReplacers.length||q.replaced)||q.iterateIn?v:replace(g,v,q,me,Se||Ie,null,we);let Ce;if(Ee!==v?(_e=Ee,ke={replaced:Ee}):""===g&&hasConstructorOf(v,TypesonPromise)?(me.push([g,v,D,q,void 0,void 0,q.type]),_e=v):Ie&&"object"!==q.iterateIn||"array"===q.iterateIn?(Ce=new Array(v.length),ke={clone:Ce}):!Se&&("object"!=typeof v||"toJSON"in v||hasConstructorOf(v,TypesonPromise)||hasConstructorOf(v,Promise)||hasConstructorOf(v,ArrayBuffer))&&"object"!==q.iterateIn?_e=v:(Ce={},q.addLength&&(Ce.length=v.length),ke={clone:Ce}),we&&we(),R.iterateNone)return Ce??_e;if(!Ce)return _e;if(q.iterateIn){for(const R in v){const ie={ownKeys:n(v,R)};_adaptBuiltinStateObjectProperties(q,ie,()=>{const ie=g+(g?".":"")+escapeKeyPathComponent(R),se=getEncapsulatedValue(ie,v,R),ce=se&&se.value;hasConstructorOf(ce,TypesonPromise)?me.push([ie,ce,Boolean(D),q,Ce,R,q.type]):se&&(void 0!==ce||"substitute"in se)&&setOwnEnumerable(Ce,R,ce)})}we&&we({endIterateIn:!0,end:!0})}else r(v).forEach(function(R){const ie=g+(g?".":"")+escapeKeyPathComponent(R);_adaptBuiltinStateObjectProperties(q,{ownKeys:!0},()=>{const g=getEncapsulatedValue(ie,v,R),se=g&&g.value;hasConstructorOf(se,TypesonPromise)?me.push([ie,se,Boolean(D),q,Ce,R,q.type]):g&&(void 0!==se||"substitute"in g)&&setOwnEnumerable(Ce,R,se)})}),we&&we({endIterateOwn:!0,end:!0}),(q.iterateSymbols||R.iterateSymbols)&&(Object.getOwnPropertySymbols(v).filter(g=>Object.prototype.propertyIsEnumerable.call(v,g)).forEach(ie=>{const ce=function resolveSymbolIdentity(g,v){const D=Symbol.keyFor(g);if(void 0!==D)return{for:D};const R=s.find(v=>Symbol[v]===g);if(R)return{wellKnown:R};const q=v.get(g);return void 0!==q?{registered:q}:null}(ie,this.symbolsByValue);if(!ce){if(R.throwOnUnregisteredSymbol)throw new TypeError("Cannot serialize a Symbol-keyed property whose Symbol has no portable identity (not global, not well-known, and not in the `symbols` option): "+String(ie));return}const le=se[g]??=[],fe={key:ce};le.push(fe);const ge=le.length-1,ve=`$symbolKeys.${escapeKeyPathComponent(g)}.${String(ge)}.value`,xe={value:v[ie]};_adaptBuiltinStateObjectProperties(q,{ownKeys:!0},()=>{const g=getEncapsulatedValue(ve,xe,"value"),v=g&&g.value;hasConstructorOf(v,TypesonPromise)?me.push([ve,v,Boolean(D),q,fe,"value",q.type]):g&&(void 0!==v||"substitute"in g)&&setOwnEnumerable(fe,"value",v)})}),we&&we({endIterateSymbols:!0,end:!0}));if(q.iterateUnsetNumeric){const R=v.length;for(let ie=0;ie<R;ie++){if(ie in v)continue;const R=`${g}${g?".":""}${String(ie)}`;_adaptBuiltinStateObjectProperties(q,{ownKeys:!1},()=>{const g=_encapsulate(R,void 0,Boolean(D),q,me,fe);hasConstructorOf(g,TypesonPromise)?me.push([R,g,Boolean(D),q,Ce,ie,q.type]):void 0!==g&&setOwnEnumerable(Ce,ie,g)})}we&&we({endIterateUnsetNumeric:!0,end:!0})}return Ce},replace=(g,v,D,R,se,ce,le)=>{const me=se?this.plainObjectReplacers:this.nonplainObjectReplacers;let ge=me.length;for(;ge--;){const se=me[ge];if(se.test(v,D)){const{type:me}=se;if(Object.hasOwn(this.revivers,me)){const v=ie[g];ie[g]=v?[me].concat(v):me}if(Object.assign(D,{type:me,replaced:!0}),(q||!se.replaceAsync)&&!se.replace)return le&&le({typeDetected:!0}),_encapsulate(g,v,fe&&"readonly",D,R,ce,me);let ge;if(le&&le({replacing:!0}),q||!se.replaceAsync){if(void 0===se.replace)throw new TypeError("Missing replacer");ge=se.replace(v,D)}else ge=se.replaceAsync(v,D);return _encapsulate(g,ge,fe&&"readonly",D,R,ce,me)}}return v},xe=_encapsulate("",g,fe,v??{},me);if(me.length)return q&&R.throwOnBadSyncType?(()=>{throw new TypeError("Sync method requested but async result obtained")})():Promise.resolve(checkPromises(xe,me)).then(finish);if(!q&&R.throwOnBadSyncType)throw new TypeError("Async method requested but sync result obtained");return q&&R.stringification?[finish(xe)]:q?finish(xe):Promise.resolve(finish(xe))}encapsulateSync(g,v,D){return this.encapsulate(g,v,{throwOnBadSyncType:!0,...D,sync:!0})}encapsulateAsync(g,v,D){return this.encapsulate(g,v,{throwOnBadSyncType:!0,...D,sync:!1})}revive(g,v){const D={sync:!0,...this.options,...v},{sync:R}=D;function finishRevival(g){if(R)return g;if(D.throwOnBadSyncType)throw new TypeError("Async method requested but sync result obtained");return Promise.resolve(g)}if(!g||"object"!=typeof g||Array.isArray(g))return finishRevival(g);let q=g.$types;if(!0===q)return finishRevival(g.$);const ie=g.$symbolKeys;let se=void 0!==ie;if(!q||"object"!=typeof q||Array.isArray(q)){if(!ie)return finishRevival(g);q={}}const ce=[],le=Object.create(null),me={};let fe=!0;q.$&&isPlainObject$1(q.$)&&(g=g.$,q=q.$,fe=!1,se=!1,void 0!==ie&&isObject$1(g)&&!n(g,"$symbolKeys")&&(g.$symbolKeys=ie,se=!0));const executeReviver=(g,v)=>{const[D]=this.revivers[g]??[];if(!D)throw new Error("Unregistered type: "+g);if(R&&!("revive"in D))return v;if(!R&&D.reviveAsync)return D.reviveAsync(v,me);if(D.revive)return D.revive(v,me);throw new Error("Missing reviver")},ge=[];function checkUndefined(g){return hasConstructorOf(g,Undefined)?void 0:g}const reHomeSymbolKeys=g=>{if(!isObject$1(g))return;const v=se?g.$symbolKeys:ie;v&&(Object.entries(v).forEach(([v,D])=>{const R=getByKeyPath(g,v);isObject$1(R)&&D.forEach(g=>{if(!n(g,"value"))return;const v=function resolveSymbolFromIdentity(g,v){if("for"in g)return Symbol.for(g.for);if("wellKnown"in g){const v=s.find(v=>v===g.wellKnown);if(!v)throw new Error("Unknown well-known Symbol: "+g.wellKnown);return Symbol[v]}if(!n(v,g.registered))throw new Error("Unregistered symbol: "+g.registered);return v[g.registered]}(g.key,this.symbolsByName),D=checkUndefined(g.value);g.descriptor?Object.defineProperty(R,v,{configurable:!0,enumerable:!0,writable:!0,...g.descriptor,value:D}):R[v]=D})}),se&&delete g.$symbolKeys)},ve=(()=>{if(!q)throw new Error("Found bad `types`");const v=[];if(Object.entries(q).forEach(([g,D])=>{"#"!==D&&[].concat(D).forEach(D=>{const[,{plain:R}]=this.revivers[D]??[null,{}];R&&(v.push({keypath:g,type:D}),delete q[g])})}),v.length)return v.sort(nestedPathsFirst),v.reduce(function reducer(v,{keypath:D,type:R}){if(isThenable(v))return v.then(g=>reducer(g,{keypath:D,type:R}));let q=getByKeyPath(g,D);if(q=executeReviver(R,q),hasConstructorOf(q,TypesonPromise))return q.then(v=>{const R=setAtKeyPath(g,D,v);R===v&&(g=R)});const ie=setAtKeyPath(g,D,q);ie===q&&(g=ie)},void 0)})();let xe;return hasConstructorOf(ve,TypesonPromise)?xe=ve.then(()=>g):(xe=function _revive(g,v,D,ie,se){if(fe&&"$types"===g)return;const me=ge.length,ve=n(q,g)?q[g]:void 0,xe=o(v);if(xe||isPlainObject$1(v)){const R=xe?new Array(v.length):{};for(r(v).forEach(q=>{const ie=_revive(g+(g?".":"")+escapeKeyPathComponent(q),v[q],D??R,R,q),set=g=>(hasConstructorOf(g,Undefined)?setOwnEnumerable(R,q,void 0):void 0!==g&&setOwnEnumerable(R,q,g),g);hasConstructorOf(ie,TypesonPromise)?ge.push(ie.then(g=>set(g))):set(ie)}),v=R;ce.length;){const[[g,v,D,R]]=ce,q=n(le,v),ie=q?le[v]:getByKeyPath(g,v);if(!q&&void 0===ie)break;setOwnEnumerable(D,R,ie),ce.shift()}}if(!ve)return le[g]=v,v;if("#"===ve){const g=v.slice(1),R=n(le,g),q=R?le[g]:getByKeyPath(D,g);return R||void 0!==q||ce.push([D,g,ie,se]),q}const applyType=v=>{const D=[].concat(ve).reduce(function reducer(g,v){if(hasConstructorOf(g,TypesonPromise))return g.then(g=>reducer(g,v));if("string"!=typeof v)throw new TypeError("Bad type JSON");return executeReviver(v,g)},v);return hasConstructorOf(D,TypesonPromise)?D.then(v=>(le[g]=v,v)):(le[g]=D,D)};return!R&&ge.length>me?TypesonPromise.all(ge.slice(me)).then(()=>applyType(v)):applyType(v)}("",g,null),ge.length&&(xe=TypesonPromise.resolve(xe).then(g=>TypesonPromise.all([g,...ge])).then(([g])=>g))),ie&&(isThenable(xe)?xe=xe.then(g=>(reHomeSymbolKeys(g),g)):reHomeSymbolKeys(xe)),isThenable(xe)?R&&D.throwOnBadSyncType?(()=>{throw new TypeError("Sync method requested but async result obtained")})():hasConstructorOf(xe,TypesonPromise)?xe.p.then(checkUndefined):xe:!R&&D.throwOnBadSyncType?(()=>{throw new TypeError("Async method requested but sync result obtained")})():R?checkUndefined(xe):Promise.resolve(checkUndefined(xe))}reviveSync(g,v){return this.revive(g,{throwOnBadSyncType:!0,...v,sync:!0})}reviveAsync(g,v){return this.revive(g,{throwOnBadSyncType:!0,...v,sync:!1})}register(g,v){const D=v??{},reg=g=>{o(g)?g.forEach(g=>{reg(g)}):r(g).forEach(v=>{if("#"===v)throw new TypeError("# cannot be used as a type name as it is reserved for cyclic objects");if(i$1.includes(v))throw new TypeError("Plain JSON object types are reserved as type names");let R=g[v];if([this.plainObjectReplacers,this.nonplainObjectReplacers].forEach(g=>{const D=g.findIndex(g=>g.type===v);-1!==D&&g.splice(D,1)}),delete this.revivers[v],delete this.types[v],"function"==typeof R){const g=R;R={test:v=>v&&v.constructor===g,replace:g=>({...g}),revive:v=>Object.assign(Object.create(g.prototype),v)}}else if(o(R)){const[g,v,D]=R;R={test:g,replace:v,revive:D}}if(!R?.test)return;const q={type:v,test:R.test.bind(R)};R.replace&&(q.replace=R.replace.bind(R)),R.replaceAsync&&(q.replaceAsync=R.replaceAsync.bind(R));const ie="number"==typeof D.fallback?D.fallback:D.fallback?0:1/0;if(R.testPlainObjects?this.plainObjectReplacers.splice(ie,0,q):this.nonplainObjectReplacers.splice(ie,0,q),R.revive||R.reviveAsync){const g={};R.revive&&(g.revive=R.revive.bind(R)),R.reviveAsync&&(g.reviveAsync=R.reviveAsync.bind(R)),this.revivers[v]=[g,{plain:R.testPlainObjects}]}this.types[v]=R})};return[].concat(g).forEach(g=>{reg(g)}),this}}class Undefined{}Undefined.__typeson__type__="TypesonUndefined";const i$1=["null","boolean","number","string","array","object"];for(var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=new Uint8Array(256),y=0;y<64;y++)l[c.codePointAt(y)]=y;var u=function encode(g,v,D){null==D&&(D=g.byteLength);for(var R=new Uint8Array(g,0,D),q=R.length,ie="",se=0;se<q;se+=3)ie+=c[R[se]>>2],ie+=c[(3&R[se])<<4|R[se+1]>>4],ie+=c[(15&R[se+1])<<2|R[se+2]>>6],ie+=c[63&R[se+2]];return q%3==2?ie=ie.slice(0,-1)+"=":q%3==1&&(ie=ie.slice(0,-2)+"=="),ie},p=function decode(g,v){var D=g.length;if(D%4)throw new Error("Bad base64 length: not divisible by four");var R,q,ie,se,ce=.75*g.length,le=0;"="===g[g.length-1]&&(ce--,"="===g[g.length-2]&&ce--);for(var me=new ArrayBuffer(ce,v),fe=new Uint8Array(me),ge=0;ge<D;ge+=4)R=l[g.codePointAt(ge)],q=l[g.codePointAt(ge+1)],ie=l[g.codePointAt(ge+2)],se=l[g.codePointAt(ge+3)],fe[le++]=R<<2|q>>4,fe[le++]=(15&q)<<4|ie>>2,fe[le++]=(3&ie)<<6|63&se;return me};const f={arraybuffer:{test:g=>"ArrayBuffer"===toStringTag(g),replace(g,v){v.buffers||(v.buffers=[]);const D=v.buffers.indexOf(g);return-1!==D?{index:D}:(v.buffers.push(g),{s:u(g),maxByteLength:g.maxByteLength,resizable:g.resizable})},revive(g,v){if(v.buffers||(v.buffers=[]),Object.hasOwn(g,"index"))return v.buffers[g.index];const D=p(g.s,g.resizable?{maxByteLength:g.maxByteLength}:void 0);return v.buffers.push(D),D}}},d$1={audiodata:{test:g=>"AudioData"===toStringTag(g),replace(g){const{format:v,sampleRate:D,numberOfFrames:R,numberOfChannels:q,timestamp:ie}=g,se=v.endsWith("-planar")?q:1,ce=[];let le=0;for(let v=0;v<se;v++){const D=g.allocationSize({planeIndex:v});ce.push(D),le+=D}const me=new ArrayBuffer(le);let fe=0;for(let v=0;v<se;v++){const D=new Uint8Array(me,fe,ce[v]);g.copyTo(D,{planeIndex:v}),fe+=ce[v]}return{format:v,sampleRate:D,numberOfFrames:R,numberOfChannels:q,timestamp:ie,data:me}},revive:({format:g,sampleRate:v,numberOfFrames:D,numberOfChannels:R,timestamp:q,data:ie})=>new AudioData({format:g,sampleRate:v,numberOfFrames:D,numberOfChannels:R,timestamp:q,data:new Uint8Array(ie)})}},m={bigintObject:{test:g=>"object"==typeof g&&hasConstructorOf(g,BigInt),replace:String,revive:g=>new Object(BigInt(g))}},h={bigint:{test:g=>"bigint"==typeof g,replace:String,revive:g=>BigInt(g)}};function arraybuffer2string(g){return new Uint8Array(g).reduce((g,v)=>g+String.fromCodePoint(v),"")}function string2arraybuffer(g){const v=new Uint8Array(g.length);for(let D=0;D<g.length;D++)v[D]=g.charCodeAt(D);return v.buffer}const b={blob:{test:g=>"Blob"===toStringTag(g),replace(g){const v=new XMLHttpRequest;if(v.overrideMimeType("text/plain; charset=x-user-defined"),v.open("GET",URL.createObjectURL(g),!1),v.send(),200!==v.status&&0!==v.status)throw new Error("Bad Blob access: "+v.status);return{type:g.type,stringContents:v.responseText}},revive(g){const{type:v,stringContents:D}=g;return new Blob([string2arraybuffer(D)],{type:v})},replaceAsync:g=>new TypesonPromise((v,D)=>{const R=new FileReader;R.addEventListener("load",()=>{v({type:g.type,stringContents:arraybuffer2string(R.result)})}),R.addEventListener("error",()=>{D(R.error)}),R.readAsArrayBuffer(g)})}};function generateUUID(){let g=Date.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replaceAll(/[xy]/gu,function(v){const D=Math.trunc((g+16*Math.random())%16);return g=Math.floor(g/16),("x"===v?D:3&D|8).toString(16)})}const w={cryptokey:{test:g=>"CryptoKey"===toStringTag(g)&&g.extractable,replaceAsync:g=>new TypesonPromise(async(v,D)=>{let R;try{R=await crypto.subtle.exportKey("jwk",g)}catch(g){return void D(g)}v({jwk:R,algorithm:g.algorithm,usages:g.usages})}),revive(g){const{jwk:v,algorithm:D,usages:R}=g;return crypto.subtle.importKey("jwk",v,D,!0,R)}}},O={dataview:{test:g=>"DataView"===toStringTag(g),replace({buffer:g,byteOffset:v,byteLength:D},R){R.buffers||(R.buffers=[]);const q=R.buffers.indexOf(g);return-1!==q?{index:q,byteOffset:v,byteLength:D}:(R.buffers.push(g),{encoded:u(g),maxByteLength:g.maxByteLength,resizable:g.resizable,byteOffset:v,byteLength:D})},revive(g,v){v.buffers||(v.buffers=[]);const{byteOffset:D,byteLength:R,encoded:q,index:ie,maxByteLength:se,resizable:ce}=g;let le;return"index"in g?le=v.buffers[ie]:(le=p(q,ce?{maxByteLength:se}:se),v.buffers.push(le)),new DataView(le,D,R)}}},A={date:{test:g=>"Date"===toStringTag(g),replace(g){const v=g.getTime();return Number.isNaN(v)?"NaN":v},revive:g=>"NaN"===g?new Date(NaN):new Date(g)}},T={domexception:{test:g=>"DOMException"===toStringTag(g),replace:g=>({name:g.name,message:g.message}),revive:({message:g,name:v})=>new DOMException(g,v)}},S={};function create$5(g){S[g.name.toLowerCase()]={test:v=>toStringTag(v)===g.name,replace:g=>g.is2D?{a:g.a,b:g.b,c:g.c,d:g.d,e:g.e,f:g.f}:{m11:g.m11,m12:g.m12,m13:g.m13,m14:g.m14,m21:g.m21,m22:g.m22,m23:g.m23,m24:g.m24,m31:g.m31,m32:g.m32,m33:g.m33,m34:g.m34,m41:g.m41,m42:g.m42,m43:g.m43,m44:g.m44},revive:v=>Object.hasOwn(v,"a")?new g([v.a,v.b,v.c,v.d,v.e,v.f]):new g([v.m11,v.m12,v.m13,v.m14,v.m21,v.m22,v.m23,v.m24,v.m31,v.m32,v.m33,v.m34,v.m41,v.m42,v.m43,v.m44])}}"undefined"!=typeof DOMMatrix&&create$5(DOMMatrix),"undefined"!=typeof DOMMatrixReadOnly&&create$5(DOMMatrixReadOnly);const P={};function create$4(g){P[g.name.toLowerCase()]={test:v=>toStringTag(v)===g.name,replace:g=>({x:g.x,y:g.y,z:g.z,w:g.w}),revive:({x:v,y:D,z:R,w:q})=>new g(v,D,R,q)}}"undefined"!=typeof DOMPoint&&create$4(DOMPoint),"undefined"!=typeof DOMPointReadOnly&&create$4(DOMPointReadOnly);const E={domquad:{test:g=>"DOMQuad"===toStringTag(g),replace:g=>({p1:g.p1,p2:g.p2,p3:g.p3,p4:g.p4}),revive:({p1:g,p2:v,p3:D,p4:R})=>new DOMQuad(g,v,D,R)}},x={};function create$3(g){x[g.name.toLowerCase()]={test:v=>toStringTag(v)===g.name,replace:g=>({x:g.x,y:g.y,width:g.width,height:g.height}),revive:({x:v,y:D,width:R,height:q})=>new g(v,D,R,q)}}"undefined"!=typeof DOMRect&&create$3(DOMRect),"undefined"!=typeof DOMRectReadOnly&&create$3(DOMRectReadOnly);const j={encodedaudiochunk:{test:g=>"EncodedAudioChunk"===toStringTag(g),replace(g){const{type:v,timestamp:D,duration:R,byteLength:q}=g,ie=new ArrayBuffer(q);return g.copyTo(ie),{type:v,timestamp:D,duration:R,data:ie}},revive({type:g,timestamp:v,duration:D,data:R}){const q={type:g,timestamp:v,data:new Uint8Array(R)};return null!=D&&(q.duration=D),new EncodedAudioChunk(q)}}},B={encodedvideochunk:{test:g=>"EncodedVideoChunk"===toStringTag(g),replace(g){const{type:v,timestamp:D,duration:R,byteLength:q}=g,ie=new ArrayBuffer(q);return g.copyTo(ie),{type:v,timestamp:D,duration:R,data:ie}},revive({type:g,timestamp:v,duration:D,data:R}){const q={type:g,timestamp:v,data:new Uint8Array(R)};return null!=D&&(q.duration=D),new EncodedVideoChunk(q)}}},N={error:{test:g=>"Error"===toStringTag(g),replace:({name:g,message:v,cause:D,stack:R,fileName:q,lineNumber:ie,columnNumber:se})=>({name:g,message:v,cause:D,stack:R,fileName:q,lineNumber:ie,columnNumber:se}),revive(g){const v=new Error(g.message);return v.name=g.name,v.cause=g.cause,v.stack=g.stack,v.fileName=g.fileName,v.lineNumber=g.lineNumber,v.columnNumber=g.columnNumber,v}}},C={};function create$2(g){C[g.name.toLowerCase()]={test:v=>hasConstructorOf(v,g),replace:({name:g,message:v,cause:D,stack:R,fileName:q,lineNumber:ie,columnNumber:se,errors:ce})=>({name:g,message:v,cause:D,stack:R,fileName:q,lineNumber:ie,columnNumber:se,errors:ce}),revive(v){const D="undefined"!=typeof AggregateError&&g===AggregateError?new g(v.errors,v.message):new g(v.message);return D.name=v.name,D.cause=v.cause,D.stack=v.stack,D.fileName=v.fileName,D.lineNumber=v.lineNumber,D.columnNumber=v.columnNumber,D}}}[TypeError,RangeError,SyntaxError,ReferenceError,EvalError,URIError].forEach(g=>create$2(g)),"undefined"!=typeof AggregateError&&create$2(AggregateError),"function"==typeof InternalError&&create$2(InternalError);const I={file:{test:g=>"File"===toStringTag(g),replace(g){const v=new XMLHttpRequest;if(v.overrideMimeType("text/plain; charset=x-user-defined"),v.open("GET",URL.createObjectURL(g),!1),v.send(),200!==v.status&&0!==v.status)throw new Error("Bad File access: "+v.status);return{type:g.type,stringContents:v.responseText,name:g.name,lastModified:g.lastModified}},revive:({name:g,type:v,stringContents:D,lastModified:R})=>new File([string2arraybuffer(D)],g,{type:v,lastModified:R}),replaceAsync:g=>new TypesonPromise(function(v,D){const R=new FileReader;R.addEventListener("load",function(){v({type:g.type,stringContents:arraybuffer2string(R.result),name:g.name,lastModified:g.lastModified})}),R.addEventListener("error",function(){D(R.error)}),R.readAsArrayBuffer(g)})}},U$1={file:I.file,filelist:{test:g=>"FileList"===toStringTag(g),replace(g){const v=[];for(let D=0;D<g.length;D++)v[D]=g.item(D);return v},revive(g){class FileList{constructor(){this._files=arguments[0],this.length=this._files.length}item(g){return this._files[g]}get[Symbol.toStringTag](){return"FileList"}}return new FileList(g)}}},_={imagebitmap:{test:g=>"ImageBitmap"===toStringTag(g)||g&&g.dataset&&"ImageBitmap"===g.dataset.toStringTag,replace(g){const v=document.createElement("canvas");return v.getContext("2d").drawImage(g,0,0),{width:g.width,height:g.height,dataURL:v.toDataURL()}},revive(g){const v="undefined"==typeof OffscreenCanvas?document.createElement("canvas"):new OffscreenCanvas(g.width,g.height),D=v.getContext("2d"),R=document.createElement("img");return R.addEventListener("load",function(){D.drawImage(R,0,0)}),R.src=g.dataURL,"undefined"==typeof OffscreenCanvas?v:v.transferToImageBitmap()},reviveAsync(g){const v=document.createElement("canvas"),D=v.getContext("2d"),R=document.createElement("img");return R.addEventListener("load",function(){D.drawImage(R,0,0)}),R.src=g.dataURL,new TypesonPromise(async(g,D)=>{try{g(await createImageBitmap(v))}catch(g){D(g)}})}}},k={imagedata:{test:g=>"ImageData"===toStringTag(g),replace(g){const v="Float16Array"===toStringTag(g.data)?"rgba-float16":"rgba-unorm8";return{array:[...g.data],width:g.width,height:g.height,pixelFormat:v,colorSpace:g.colorSpace}},revive(g){const{array:v,width:D,height:R,colorSpace:q,pixelFormat:ie}=g;return"rgba-float16"===ie?new ImageData(new Float16Array(v),D,R,{colorSpace:q,pixelFormat:ie}):new ImageData(new Uint8ClampedArray(v),D,R,{colorSpace:q,pixelFormat:ie})}}},M={infinity:{test:g=>g===1/0,replace:()=>"Infinity",revive:()=>1/0}},L={map:{test:g=>"Map"===toStringTag(g),replace:g=>g.entries().toArray(),revive:g=>new Map(g)}},F={nan:{test:g=>Number.isNaN(g),replace:()=>"NaN",revive:()=>NaN}},K={negativeInfinity:{test:g=>g===-1/0,replace:()=>"-Infinity",revive:()=>-1/0}},$$1={negativeZero:{test:g=>Object.is(g,-0),replace:()=>0,revive:()=>-0}},W={StringObject:{test:g=>"String"===toStringTag(g)&&"object"==typeof g,replace:String,revive:g=>new String(g)},BooleanObject:{test:g=>"Boolean"===toStringTag(g)&&"object"==typeof g,replace:g=>g.valueOf(),revive:g=>new Boolean(g)},NumberObject:{test:g=>"Number"===toStringTag(g)&&"object"==typeof g,replace(g){const v=g.valueOf();return Number.isNaN(v)?"NaN":v===1/0?"Infinity":v===-1/0?"-Infinity":Object.is(v,-0)?"-0":v},revive:g=>new Number("NaN"===g?NaN:"Infinity"===g?1/0:"-Infinity"===g?-1/0:"-0"===g?-0:g)}},z$2={promise:{test:g=>"Promise"===toStringTag(g),replaceAsync:g=>new TypesonPromise(async v=>{try{v({value:await g})}catch(g){v({error:g})}}),revive:g=>g.error?Promise.reject(g.error):Promise.resolve(g.value)}},V={quotaexceedederror:{test:g=>"QuotaExceededError"===toStringTag(g),replace:({message:g,quota:v,requested:D})=>({message:g,quota:v,requested:D}),revive({message:g,quota:v,requested:D}){const R={};return null!=v&&(R.quota=v),null!=D&&(R.requested=D),new QuotaExceededError(g,R)}}},J={regexp:{test:g=>"RegExp"===toStringTag(g),replace:g=>({source:g.source,flags:(g.global?"g":"")+(g.ignoreCase?"i":"")+(g.multiline?"m":"")+(g.sticky?"y":"")+(g.unicode?"u":"")+(g.unicodeSets?"v":"")+(g.hasIndices?"d":"")+(g.dotAll?"s":"")}),revive:({source:g,flags:v})=>new RegExp(g,v)}},H={},Q={resurrectable:{test:g=>g&&!Array.isArray(g)&&["object","function","symbol"].includes(typeof g),replace(g){const v=generateUUID();return H[v]=g,v},revive:g=>H[g]}},G={set:{test:g=>"Set"===toStringTag(g),replace:g=>g.values().toArray(),revive:g=>new Set(g)}},X={symbol:{test:g=>"symbol"==typeof g,replace:g=>({global:void 0!==Symbol.keyFor(g),sym:String(g).slice(7,-1)}),revive:g=>g.global?Symbol.for(g.sym):Symbol(g.sym)}},Y={};"function"==typeof Int8Array&&[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,..."function"==typeof BigInt64Array?[BigInt64Array,BigUint64Array]:[],..."function"==typeof Float16Array?[Float16Array]:[]].forEach(g=>function create$1(g){const v=g.name;Y[v.toLowerCase()]={test:g=>toStringTag(g)===v,replace:g=>(0===g.byteOffset&&g.byteLength===g.buffer.byteLength?g:g.slice(0)).buffer,revive:v=>"ArrayBuffer"===toStringTag(v)?new g(v):v}}(g));const Z={};"function"==typeof Int8Array&&[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,..."function"==typeof BigInt64Array?[BigInt64Array,BigUint64Array]:[],..."function"==typeof Float16Array?[Float16Array]:[]].forEach(g=>function create(g){const v=g.name;Z[v.toLowerCase()]={test:g=>toStringTag(g)===v,replace({buffer:g,byteOffset:v,length:D},R){R.buffers||(R.buffers=[]);const q=R.buffers.indexOf(g);return-1!==q?{index:q,byteOffset:v,length:D}:(R.buffers.push(g),{maxByteLength:g.maxByteLength,resizable:g.resizable,encoded:u(g),byteOffset:v,length:D})},revive(v,D){D.buffers||(D.buffers=[]);const{byteOffset:R,length:q,encoded:ie,index:se,maxByteLength:ce,resizable:le}=v;let me;return"index"in v?me=D.buffers[se]:(me=p(ie,le?{maxByteLength:ce}:void 0),D.buffers.push(me)),new g(me,R,q)}}}(g));const ee={undef:{test:(g,v)=>void 0===g&&(v.ownKeys||!("ownKeys"in v)),replace:()=>0,revive:()=>new Undefined}},te={userObject:{test:g=>isUserObject(g),replace:g=>({...g}),revive:g=>g}},re={videoframe:{test:g=>"VideoFrame"===toStringTag(g),replaceAsync:g=>new TypesonPromise(async(v,D)=>{try{const{format:D,codedWidth:R,codedHeight:q,timestamp:ie,duration:se,visibleRect:ce,displayWidth:le,displayHeight:me,colorSpace:fe}=g,ge=new ArrayBuffer(g.allocationSize());await g.copyTo(ge),v({format:D,codedWidth:R,codedHeight:q,timestamp:ie,duration:se,visibleRect:{x:ce.x,y:ce.y,width:ce.width,height:ce.height},displayWidth:le,displayHeight:me,colorSpace:{primaries:fe.primaries,transfer:fe.transfer,matrix:fe.matrix,fullRange:fe.fullRange},data:ge})}catch(g){D(g)}}),revive({format:g,codedWidth:v,codedHeight:D,timestamp:R,duration:q,visibleRect:ie,displayWidth:se,displayHeight:ce,colorSpace:le,data:me}){const fe={format:g,codedWidth:v,codedHeight:D,timestamp:R,visibleRect:ie,displayWidth:se,displayHeight:ce,colorSpace:le};return null!=q&&(fe.duration=q),new VideoFrame(new Uint8Array(me),fe)}}},ne$1={webtransporterror:{test:g=>"WebTransportError"===toStringTag(g),replace:({message:g,streamErrorCode:v})=>({message:g,streamErrorCode:v}),revive:({message:g,streamErrorCode:v})=>new WebTransportError({message:g,streamErrorCode:v})}},oe=[{arrayNonindexKeys:{testPlainObjects:!0,test:(g,v)=>!!Array.isArray(g)&&(Object.keys(g).some(g=>String(Number(g))!==g)&&(v.iterateIn="object",v.addLength=!0),!0),replace:(g,v)=>(v.iterateUnsetNumeric=!0,g),revive(g){if(Array.isArray(g))return g;const v=[];return Object.entries(g).forEach(([g,D])=>{v[g]=D}),v}}},{sparseUndefined:{test:(g,v)=>void 0===g&&!1===v.ownKeys,replace:()=>0,revive(){}}}],ae=[F,M,K,$$1],ye=[te,ee,oe,W,ae,A,J,k,_,I,U$1,b,N,C].concat("function"==typeof Map?L:[],"function"==typeof Set?G:[],"function"==typeof ArrayBuffer?f:[],"function"==typeof Uint8Array?Z:[],"function"==typeof DataView?O:[],"undefined"!=typeof crypto?w:[],"undefined"!=typeof BigInt?[h,m]:[],"undefined"!=typeof DOMException?T:[],"undefined"!=typeof QuotaExceededError?V:[],"undefined"!=typeof WebTransportError?ne$1:[],"undefined"!=typeof DOMRect?x:[],"undefined"!=typeof DOMPoint?P:[],"undefined"!=typeof DOMQuad?E:[],"undefined"!=typeof DOMMatrix?S:[],"undefined"!=typeof AudioData?d$1:[],"undefined"!=typeof EncodedAudioChunk?j:[],"undefined"!=typeof EncodedVideoChunk?B:[],"undefined"!=typeof VideoFrame?re:[]),ue=ye.concat({checkDataCloneException:{test(g){const v={}.toString.call(g).slice(8,-1);if(["symbol","function"].includes(typeof g)||["Arguments","Module","Promise","WeakMap","WeakSet","Event","MessageChannel","MessagePort"].includes(v)||g&&g.constructor&&["MessageChannel","MessagePort"].includes(g.constructor.name)||["ArrayBuffer","DataView","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"].includes(v)&&function isBufferDetached(g){if("boolean"==typeof g.detached)return g.detached;if(0!==g.byteLength)return!1;try{return new Uint8Array(g),!1}catch{return!0}}(g)||g&&"object"==typeof g&&"number"==typeof g.nodeType&&"function"==typeof g.insertBefore)throw new DOMException("The object cannot be cloned.","DataCloneError");return!1}}}),pe=ue.concat({checkSharedArrayBufferException:{test(g){if("SharedArrayBuffer"==={}.toString.call(g).slice(8,-1))throw new DOMException("The object cannot be cloned.","DataCloneError");return!1}}});var astralIdentifierCodes=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],astralIdentifierStartCodes=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],nonASCIIidentifierChars="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",nonASCIIidentifierStartChars="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",reservedWords={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},ecma5AndLessKeywords="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",keywords$1={5:ecma5AndLessKeywords,"5module":ecma5AndLessKeywords+" export import",6:ecma5AndLessKeywords+" const class extends export import super"},keywordRelationalOperator=/^in(stanceof)?$/,nonASCIIidentifierStart=new RegExp("["+nonASCIIidentifierStartChars+"]"),nonASCIIidentifier=new RegExp("["+nonASCIIidentifierStartChars+nonASCIIidentifierChars+"]");function isInAstralSet(g,v){for(var D=65536,R=0;R<v.length;R+=2){if((D+=v[R])>g)return!1;if((D+=v[R+1])>=g)return!0}return!1}function isIdentifierStart(g,v){return g<65?36===g:g<91||(g<97?95===g:g<123||(g<=65535?g>=170&&nonASCIIidentifierStart.test(String.fromCharCode(g)):!1!==v&&isInAstralSet(g,astralIdentifierStartCodes)))}function isIdentifierChar(g,v){return g<48?36===g:g<58||!(g<65)&&(g<91||(g<97?95===g:g<123||(g<=65535?g>=170&&nonASCIIidentifier.test(String.fromCharCode(g)):!1!==v&&(isInAstralSet(g,astralIdentifierStartCodes)||isInAstralSet(g,astralIdentifierCodes)))))}var TokenType=function TokenType(g,v){void 0===v&&(v={}),this.label=g,this.keyword=v.keyword,this.beforeExpr=!!v.beforeExpr,this.startsExpr=!!v.startsExpr,this.isLoop=!!v.isLoop,this.isAssign=!!v.isAssign,this.prefix=!!v.prefix,this.postfix=!!v.postfix,this.binop=v.binop||null,this.updateContext=null};function binop(g,v){return new TokenType(g,{beforeExpr:!0,binop:v})}var beforeExpr={beforeExpr:!0},startsExpr={startsExpr:!0},keywords={};function kw(g,v){return void 0===v&&(v={}),v.keyword=g,keywords[g]=new TokenType(g,v)}var types$1$1={num:new TokenType("num",startsExpr),regexp:new TokenType("regexp",startsExpr),string:new TokenType("string",startsExpr),name:new TokenType("name",startsExpr),privateId:new TokenType("privateId",startsExpr),eof:new TokenType("eof"),bracketL:new TokenType("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new TokenType("]"),braceL:new TokenType("{",{beforeExpr:!0,startsExpr:!0}),braceR:new TokenType("}"),parenL:new TokenType("(",{beforeExpr:!0,startsExpr:!0}),parenR:new TokenType(")"),comma:new TokenType(",",beforeExpr),semi:new TokenType(";",beforeExpr),colon:new TokenType(":",beforeExpr),dot:new TokenType("."),question:new TokenType("?",beforeExpr),questionDot:new TokenType("?."),arrow:new TokenType("=>",beforeExpr),template:new TokenType("template"),invalidTemplate:new TokenType("invalidTemplate"),ellipsis:new TokenType("...",beforeExpr),backQuote:new TokenType("`",startsExpr),dollarBraceL:new TokenType("${",{beforeExpr:!0,startsExpr:!0}),eq:new TokenType("=",{beforeExpr:!0,isAssign:!0}),assign:new TokenType("_=",{beforeExpr:!0,isAssign:!0}),incDec:new TokenType("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new TokenType("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:binop("||",1),logicalAND:binop("&&",2),bitwiseOR:binop("|",3),bitwiseXOR:binop("^",4),bitwiseAND:binop("&",5),equality:binop("==/!=/===/!==",6),relational:binop("</>/<=/>=",7),bitShift:binop("<</>>/>>>",8),plusMin:new TokenType("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:binop("%",10),star:binop("*",10),slash:binop("/",10),starstar:new TokenType("**",{beforeExpr:!0}),coalesce:binop("??",1),_break:kw("break"),_case:kw("case",beforeExpr),_catch:kw("catch"),_continue:kw("continue"),_debugger:kw("debugger"),_default:kw("default",beforeExpr),_do:kw("do",{isLoop:!0,beforeExpr:!0}),_else:kw("else",beforeExpr),_finally:kw("finally"),_for:kw("for",{isLoop:!0}),_function:kw("function",startsExpr),_if:kw("if"),_return:kw("return",beforeExpr),_switch:kw("switch"),_throw:kw("throw",beforeExpr),_try:kw("try"),_var:kw("var"),_const:kw("const"),_while:kw("while",{isLoop:!0}),_with:kw("with"),_new:kw("new",{beforeExpr:!0,startsExpr:!0}),_this:kw("this",startsExpr),_super:kw("super",startsExpr),_class:kw("class",startsExpr),_extends:kw("extends",beforeExpr),_export:kw("export"),_import:kw("import",startsExpr),_null:kw("null",startsExpr),_true:kw("true",startsExpr),_false:kw("false",startsExpr),_in:kw("in",{beforeExpr:!0,binop:7}),_instanceof:kw("instanceof",{beforeExpr:!0,binop:7}),_typeof:kw("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:kw("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:kw("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},lineBreak=/\r\n?|\n|\u2028|\u2029/,lineBreakG=new RegExp(lineBreak.source,"g");function isNewLine(g){return 10===g||13===g||8232===g||8233===g}function nextLineBreak(g,v,D){void 0===D&&(D=g.length);for(var R=v;R<D;R++){var q=g.charCodeAt(R);if(isNewLine(q))return R<D-1&&13===q&&10===g.charCodeAt(R+1)?R+2:R+1}return-1}var nonASCIIwhitespace=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,skipWhiteSpace=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,ref=Object.prototype,hasOwnProperty=ref.hasOwnProperty,toString=ref.toString,hasOwn=Object.hasOwn||function(g,v){return hasOwnProperty.call(g,v)},isArray=Array.isArray||function(g){return"[object Array]"===toString.call(g)},regexpCache=Object.create(null);function wordsRegexp(g){return regexpCache[g]||(regexpCache[g]=new RegExp("^(?:"+g.replace(/ /g,"|")+")$"))}function codePointToString(g){return g<=65535?String.fromCharCode(g):(g-=65536,String.fromCharCode(55296+(g>>10),56320+(1023&g)))}var loneSurrogate=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Position=function Position(g,v){this.line=g,this.column=v};Position.prototype.offset=function offset(g){return new Position(this.line,this.column+g)};var SourceLocation=function SourceLocation(g,v,D){this.start=v,this.end=D,null!==g.sourceFile&&(this.source=g.sourceFile)};function getLineInfo(g,v){for(var D=1,R=0;;){var q=nextLineBreak(g,R,v);if(q<0)return new Position(D,v-R);++D,R=q}}var defaultOptions={ecmaVersion:null,sourceType:"script",strict:!1,onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,startLocation:null,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},warnedAboutEcmaVersion=!1;function getOptions(g){var v={};for(var D in defaultOptions)v[D]=g&&hasOwn(g,D)?g[D]:defaultOptions[D];if("latest"===v.ecmaVersion?v.ecmaVersion=1e8:null==v.ecmaVersion?(!warnedAboutEcmaVersion&&"object"==typeof console&&console.warn&&(warnedAboutEcmaVersion=!0,console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")),v.ecmaVersion=11):v.ecmaVersion>=2015&&(v.ecmaVersion-=2009),null==v.allowReserved&&(v.allowReserved=v.ecmaVersion<5),g&&null!=g.allowHashBang||(v.allowHashBang=v.ecmaVersion>=14),isArray(v.onToken)){var R=v.onToken;v.onToken=function(g){return R.push(g)}}if(isArray(v.onComment)&&(v.onComment=pushComment(v,v.onComment)),"commonjs"===v.sourceType&&v.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return v}function pushComment(g,v){return function(D,R,q,ie,se,ce){var le={type:D?"Block":"Line",value:R,start:q,end:ie};g.locations&&(le.loc=new SourceLocation(this,se,ce)),g.ranges&&(le.range=[q,ie]),v.push(le)}}var SCOPE_TOP=1,SCOPE_FUNCTION=2,SCOPE_ASYNC=4,SCOPE_GENERATOR=8,SCOPE_ARROW=16,SCOPE_SIMPLE_CATCH=32,SCOPE_SUPER=64,SCOPE_DIRECT_SUPER=128,SCOPE_CLASS_STATIC_BLOCK=256,SCOPE_CLASS_FIELD_INIT=512,SCOPE_SWITCH=1024,SCOPE_VAR=SCOPE_TOP|SCOPE_FUNCTION|SCOPE_CLASS_STATIC_BLOCK;function functionFlags(g,v){return SCOPE_FUNCTION|(g?SCOPE_ASYNC:0)|(v?SCOPE_GENERATOR:0)}var BIND_NONE=0,BIND_VAR=1,BIND_LEXICAL=2,BIND_FUNCTION=3,BIND_SIMPLE_CATCH=4,BIND_OUTSIDE=5,Parser=function Parser(g,v,D){this.options=g=getOptions(g),this.sourceFile=g.sourceFile,this.keywords=wordsRegexp(keywords$1[g.ecmaVersion>=6?6:"module"===g.sourceType?"5module":5]);var R="";!0!==g.allowReserved&&(R=reservedWords[g.ecmaVersion>=6?6:5===g.ecmaVersion?5:3],"module"===g.sourceType&&(R+=" await")),this.reservedWords=wordsRegexp(R);var q=(R?R+" ":"")+reservedWords.strict;this.reservedWordsStrict=wordsRegexp(q),this.reservedWordsStrictBind=wordsRegexp(q+" "+reservedWords.strictBind),this.input=String(v),this.containsEsc=!1,this.pos=D||0,this.curLine=1,g.startLocation?(this.lineStart=this.pos-g.startLocation.column,this.curLine=g.startLocation.line):D?(this.lineStart=this.input.lastIndexOf("\n",D-1)+1,this.options.locations&&(this.curLine=this.input.slice(0,this.lineStart).split(lineBreak).length)):this.lineStart=0,this.type=types$1$1.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===g.sourceType,this.strict=this.inModule||!0===g.strict||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),0===this.pos&&g.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope("commonjs"===this.options.sourceType?SCOPE_FUNCTION:SCOPE_TOP),this.regexpState=null,this.privateNameStack=[]},prototypeAccessors={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};Parser.prototype.parse=function parse(){var g=this,v=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return g.parseTopLevel(v)})},prototypeAccessors.inFunction.get=function(){return(this.currentVarScope().flags&SCOPE_FUNCTION)>0},prototypeAccessors.inGenerator.get=function(){return(this.currentVarScope().flags&SCOPE_GENERATOR)>0},prototypeAccessors.inAsync.get=function(){return(this.currentVarScope().flags&SCOPE_ASYNC)>0},prototypeAccessors.canAwait.get=function(){for(var g=this.scopeStack.length-1;g>=0;g--){var v=this.scopeStack[g].flags;if(v&(SCOPE_CLASS_STATIC_BLOCK|SCOPE_CLASS_FIELD_INIT))return!1;if(v&SCOPE_FUNCTION)return(v&SCOPE_ASYNC)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},prototypeAccessors.allowReturn.get=function(){return!!this.inFunction||!!(this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&SCOPE_TOP)},prototypeAccessors.allowSuper.get=function(){return(this.currentThisScope().flags&SCOPE_SUPER)>0||this.options.allowSuperOutsideMethod},prototypeAccessors.allowDirectSuper.get=function(){return(this.currentThisScope().flags&SCOPE_DIRECT_SUPER)>0},prototypeAccessors.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},prototypeAccessors.allowNewDotTarget.get=function(){for(var g=this.scopeStack.length-1;g>=0;g--){var v=this.scopeStack[g].flags;if(v&(SCOPE_CLASS_STATIC_BLOCK|SCOPE_CLASS_FIELD_INIT)||v&SCOPE_FUNCTION&&!(v&SCOPE_ARROW))return!0}return!1},prototypeAccessors.allowUsing.get=function(){var g=this.currentScope().flags;return!(g&SCOPE_SWITCH)&&!(!this.inModule&&g&SCOPE_TOP)},prototypeAccessors.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&SCOPE_CLASS_STATIC_BLOCK)>0},Parser.extend=function extend(){for(var g=[],v=arguments.length;v--;)g[v]=arguments[v];for(var D=this,R=0;R<g.length;R++)D=g[R](D);return D},Parser.parse=function parse(g,v){return new this(v,g).parse()},Parser.parseExpressionAt=function parseExpressionAt(g,v,D){var R=new this(D,g,v);return R.nextToken(),R.parseExpression()},Parser.tokenizer=function tokenizer(g,v){return new this(v,g)},Object.defineProperties(Parser.prototype,prototypeAccessors);var pp$9=Parser.prototype,literal$1=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;pp$9.strictDirective=function(g){if(this.options.ecmaVersion<5)return!1;for(;;){skipWhiteSpace.lastIndex=g,g+=skipWhiteSpace.exec(this.input)[0].length;var v=literal$1.exec(this.input.slice(g));if(!v)return!1;if("use strict"===(v[1]||v[2])){skipWhiteSpace.lastIndex=g+v[0].length;var D=skipWhiteSpace.exec(this.input),R=D.index+D[0].length,q=this.input.charAt(R);return";"===q||"}"===q||lineBreak.test(D[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(q)||"!"===q&&"="===this.input.charAt(R+1))}g+=v[0].length,skipWhiteSpace.lastIndex=g,g+=skipWhiteSpace.exec(this.input)[0].length,";"===this.input[g]&&g++}},pp$9.eat=function(g){return this.type===g&&(this.next(),!0)},pp$9.isContextual=function(g){return this.type===types$1$1.name&&this.value===g&&!this.containsEsc},pp$9.eatContextual=function(g){return!!this.isContextual(g)&&(this.next(),!0)},pp$9.catchStackOverflow=function(g){try{return g()}catch(g){if(!(g instanceof Error&&(/\bstack\b.*\b(exceeded|overflow)\b/i.test(g.message)||/\btoo much recursion\b/i.test(g.message))))throw g;this.raise(this.start,"Not enough stack space to parse input")}},pp$9.expectContextual=function(g){this.eatContextual(g)||this.unexpected()},pp$9.canInsertSemicolon=function(){return this.type===types$1$1.eof||this.type===types$1$1.braceR||lineBreak.test(this.input.slice(this.lastTokEnd,this.start))},pp$9.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},pp$9.semicolon=function(){this.eat(types$1$1.semi)||this.insertSemicolon()||this.unexpected()},pp$9.afterTrailingComma=function(g,v){if(this.type===g)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),v||this.next(),!0},pp$9.expect=function(g){this.eat(g)||this.unexpected()},pp$9.unexpected=function(g){this.raise(null!=g?g:this.start,"Unexpected token")};var DestructuringErrors=function DestructuringErrors(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};pp$9.checkPatternErrors=function(g,v){if(g){g.trailingComma>-1&&this.raiseRecoverable(g.trailingComma,"Comma is not permitted after the rest element");var D=v?g.parenthesizedAssign:g.parenthesizedBind;D>-1&&this.raiseRecoverable(D,v?"Assigning to rvalue":"Parenthesized pattern")}},pp$9.checkExpressionErrors=function(g,v){if(!g)return!1;var D=g.shorthandAssign,R=g.doubleProto;if(!v)return D>=0||R>=0;D>=0&&this.raise(D,"Shorthand property assignments are valid only in destructuring patterns"),R>=0&&this.raiseRecoverable(R,"Redefinition of __proto__ property")},pp$9.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},pp$9.isSimpleAssignTarget=function(g){return"ParenthesizedExpression"===g.type?this.isSimpleAssignTarget(g.expression):"Identifier"===g.type||"MemberExpression"===g.type};var pp$8=Parser.prototype;pp$8.parseTopLevel=function(g){var v=Object.create(null);for(g.body||(g.body=[]);this.type!==types$1$1.eof;){var D=this.parseStatement(null,!0,v);g.body.push(D)}if(this.inModule)for(var R=0,q=Object.keys(this.undefinedExports);R<q.length;R+=1){var ie=q[R];this.raiseRecoverable(this.undefinedExports[ie].start,"Export '"+ie+"' is not defined")}return this.adaptDirectivePrologue(g.body),this.next(),g.sourceType="commonjs"===this.options.sourceType?"script":this.options.sourceType,this.finishNode(g,"Program")};var loopLabel={kind:"loop"},switchLabel={kind:"switch"};pp$8.isLet=function(g){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;skipWhiteSpace.lastIndex=this.pos;var v=skipWhiteSpace.exec(this.input),D=this.pos+v[0].length,R=this.fullCharCodeAt(D);if(91===R||92===R)return!0;if(g)return!1;if(123===R)return!0;if(isIdentifierStart(R)){var q=D;do{D+=R<=65535?1:2}while(isIdentifierChar(R=this.fullCharCodeAt(D)));if(92===R)return!0;var ie=this.input.slice(q,D);if(!keywordRelationalOperator.test(ie))return!0}return!1},pp$8.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;skipWhiteSpace.lastIndex=this.pos;var g,v=skipWhiteSpace.exec(this.input),D=this.pos+v[0].length;return!(lineBreak.test(this.input.slice(this.pos,D))||"function"!==this.input.slice(D,D+8)||D+8!==this.input.length&&(isIdentifierChar(g=this.fullCharCodeAt(D+8))||92===g))},pp$8.isUsingKeyword=function(g,v){if(this.options.ecmaVersion<17||!this.isContextual(g?"await":"using"))return!1;skipWhiteSpace.lastIndex=this.pos;var D=skipWhiteSpace.exec(this.input),R=this.pos+D[0].length;if(lineBreak.test(this.input.slice(this.pos,R)))return!1;if(g){var q,ie=R+5;if("using"!==this.input.slice(R,ie)||ie===this.input.length||isIdentifierChar(q=this.fullCharCodeAt(ie))||92===q)return!1;skipWhiteSpace.lastIndex=ie;var se=skipWhiteSpace.exec(this.input);if(R=ie+se[0].length,se&&lineBreak.test(this.input.slice(ie,R)))return!1}var ce=this.fullCharCodeAt(R);if(!isIdentifierStart(ce)&&92!==ce)return!1;var le=R;do{R+=ce<=65535?1:2}while(isIdentifierChar(ce=this.fullCharCodeAt(R)));if(92===ce)return!0;var me=this.input.slice(le,R);if(keywordRelationalOperator.test(me))return!1;if(v&&!g&&"of"===me&&(skipWhiteSpace.lastIndex=R,R+=skipWhiteSpace.exec(this.input)[0].length,61!==this.input.charCodeAt(R)||61===(ce=this.input.charCodeAt(R+1))||62===ce))return!1;return!0},pp$8.isAwaitUsing=function(g){return this.isUsingKeyword(!0,g)},pp$8.isUsing=function(g){return this.isUsingKeyword(!1,g)},pp$8.parseStatement=function(g,v,D){var R,q=this.type,ie=this.startNode();switch(this.isLet(g)&&(q=types$1$1._var,R="let"),q){case types$1$1._break:case types$1$1._continue:return this.parseBreakContinueStatement(ie,q.keyword);case types$1$1._debugger:return this.parseDebuggerStatement(ie);case types$1$1._do:return this.parseDoStatement(ie);case types$1$1._for:return this.parseForStatement(ie);case types$1$1._function:return g&&(this.strict||"if"!==g&&"label"!==g)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(ie,!1,!g);case types$1$1._class:return g&&this.unexpected(),this.parseClass(ie,!0);case types$1$1._if:return this.parseIfStatement(ie);case types$1$1._return:return this.parseReturnStatement(ie);case types$1$1._switch:return this.parseSwitchStatement(ie);case types$1$1._throw:return this.parseThrowStatement(ie);case types$1$1._try:return this.parseTryStatement(ie);case types$1$1._const:case types$1$1._var:return R=R||this.value,g&&"var"!==R&&this.unexpected(),this.parseVarStatement(ie,R);case types$1$1._while:return this.parseWhileStatement(ie);case types$1$1._with:return this.parseWithStatement(ie);case types$1$1.braceL:return this.parseBlock(!0,ie);case types$1$1.semi:return this.parseEmptyStatement(ie);case types$1$1._export:case types$1$1._import:if(this.options.ecmaVersion>10&&q===types$1$1._import){skipWhiteSpace.lastIndex=this.pos;var se=skipWhiteSpace.exec(this.input),ce=this.pos+se[0].length,le=this.input.charCodeAt(ce);if(40===le||46===le)return this.parseExpressionStatement(ie,this.parseExpression())}return this.options.allowImportExportEverywhere||(v||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),q===types$1$1._import?this.parseImport(ie):this.parseExport(ie,D);default:if(this.isAsyncFunction())return g&&this.unexpected(),this.next(),this.parseFunctionStatement(ie,!0,!g);var me=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(me)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),g&&this.raise(this.start,"Using declaration is not allowed in single-statement positions"),"await using"===me&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(ie,!1,me),this.semicolon(),this.finishNode(ie,"VariableDeclaration");var fe=this.value,ge=this.parseExpression();return q===types$1$1.name&&"Identifier"===ge.type&&this.eat(types$1$1.colon)?this.parseLabeledStatement(ie,fe,ge,g):this.parseExpressionStatement(ie,ge)}},pp$8.parseBreakContinueStatement=function(g,v){var D="break"===v;this.next(),this.eat(types$1$1.semi)||this.insertSemicolon()?g.label=null:this.type!==types$1$1.name?this.unexpected():(g.label=this.parseIdent(),this.semicolon());for(var R=0;R<this.labels.length;++R){var q=this.labels[R];if(null==g.label||q.name===g.label.name){if(null!=q.kind&&(D||"loop"===q.kind))break;if(g.label&&D)break}}return R===this.labels.length&&this.raise(g.start,"Unsyntactic "+v),this.finishNode(g,D?"BreakStatement":"ContinueStatement")},pp$8.parseDebuggerStatement=function(g){return this.next(),this.semicolon(),this.finishNode(g,"DebuggerStatement")},pp$8.parseDoStatement=function(g){return this.next(),this.labels.push(loopLabel),g.body=this.parseStatement("do"),this.labels.pop(),this.expect(types$1$1._while),g.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(types$1$1.semi):this.semicolon(),this.finishNode(g,"DoWhileStatement")},pp$8.parseForStatement=function(g){this.next();var v=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(loopLabel),this.enterScope(0),this.expect(types$1$1.parenL),this.type===types$1$1.semi)return v>-1&&this.unexpected(v),this.parseFor(g,null);var D=this.isLet();if(this.type===types$1$1._var||this.type===types$1$1._const||D){var R=this.startNode(),q=D?"let":this.value;return this.next(),this.parseVar(R,!0,q),this.finishNode(R,"VariableDeclaration"),this.parseForAfterInit(g,R,v)}var ie=this.isContextual("let"),se=!1,ce=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(ce){var le=this.startNode();return this.next(),"await using"===ce&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(le,!0,ce),this.finishNode(le,"VariableDeclaration"),this.parseForAfterInit(g,le,v)}var me=this.containsEsc,fe=new DestructuringErrors,ge=this.start,ve=v>-1?this.parseExprSubscripts(fe,"await"):this.parseExpression(!0,fe);return this.type===types$1$1._in||(se=this.options.ecmaVersion>=6&&this.isContextual("of"))?(v>-1?(this.type===types$1$1._in&&this.unexpected(v),g.await=!0):se&&this.options.ecmaVersion>=8&&(ve.start!==ge||me||"Identifier"!==ve.type||"async"!==ve.name?this.options.ecmaVersion>=9&&(g.await=!1):this.unexpected()),ie&&se&&this.raise(ve.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(ve,!1,fe),this.checkLValPattern(ve),this.parseForIn(g,ve)):(this.checkExpressionErrors(fe,!0),v>-1&&this.unexpected(v),this.parseFor(g,ve))},pp$8.parseForAfterInit=function(g,v,D){return(this.type===types$1$1._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===v.declarations.length?(this.type===types$1$1._in?("using"!==v.kind&&"await using"!==v.kind||v.declarations[0].init||this.raise(this.start,"Using declaration is not allowed in for-in loops"),this.options.ecmaVersion>=9&&D>-1&&this.unexpected(D)):this.options.ecmaVersion>=9&&(g.await=D>-1),this.parseForIn(g,v)):(D>-1&&this.unexpected(D),this.parseFor(g,v))},pp$8.parseFunctionStatement=function(g,v,D){return this.next(),this.parseFunction(g,FUNC_STATEMENT|(D?0:FUNC_HANGING_STATEMENT),!1,v)},pp$8.parseIfStatement=function(g){return this.next(),g.test=this.parseParenExpression(),g.consequent=this.parseStatement("if"),g.alternate=this.eat(types$1$1._else)?this.parseStatement("if"):null,this.finishNode(g,"IfStatement")},pp$8.parseReturnStatement=function(g){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(types$1$1.semi)||this.insertSemicolon()?g.argument=null:(g.argument=this.parseExpression(),this.semicolon()),this.finishNode(g,"ReturnStatement")},pp$8.parseSwitchStatement=function(g){var v;this.next(),g.discriminant=this.parseParenExpression(),g.cases=[],this.expect(types$1$1.braceL),this.labels.push(switchLabel),this.enterScope(SCOPE_SWITCH);for(var D=!1;this.type!==types$1$1.braceR;)if(this.type===types$1$1._case||this.type===types$1$1._default){var R=this.type===types$1$1._case;v&&this.finishNode(v,"SwitchCase"),g.cases.push(v=this.startNode()),v.consequent=[],this.next(),R?v.test=this.parseExpression():(D&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),D=!0,v.test=null),this.expect(types$1$1.colon)}else v||this.unexpected(),v.consequent.push(this.parseStatement(null));return this.exitScope(),v&&this.finishNode(v,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(g,"SwitchStatement")},pp$8.parseThrowStatement=function(g){return this.next(),lineBreak.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),g.argument=this.parseExpression(),this.semicolon(),this.finishNode(g,"ThrowStatement")};var empty$1=[];pp$8.parseCatchClauseParam=function(){var g=this.parseBindingAtom(),v="Identifier"===g.type;return this.enterScope(v?SCOPE_SIMPLE_CATCH:0),this.checkLValPattern(g,v?BIND_SIMPLE_CATCH:BIND_LEXICAL),this.expect(types$1$1.parenR),g},pp$8.parseTryStatement=function(g){if(this.next(),g.block=this.parseBlock(),g.handler=null,this.type===types$1$1._catch){var v=this.startNode();this.next(),this.eat(types$1$1.parenL)?v.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),v.param=null,this.enterScope(0)),v.body=this.parseBlock(!1),this.exitScope(),g.handler=this.finishNode(v,"CatchClause")}return g.finalizer=this.eat(types$1$1._finally)?this.parseBlock():null,g.handler||g.finalizer||this.raise(g.start,"Missing catch or finally clause"),this.finishNode(g,"TryStatement")},pp$8.parseVarStatement=function(g,v,D){return this.next(),this.parseVar(g,!1,v,D),this.semicolon(),this.finishNode(g,"VariableDeclaration")},pp$8.parseWhileStatement=function(g){return this.next(),g.test=this.parseParenExpression(),this.labels.push(loopLabel),g.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(g,"WhileStatement")},pp$8.parseWithStatement=function(g){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),g.object=this.parseParenExpression(),g.body=this.parseStatement("with"),this.finishNode(g,"WithStatement")},pp$8.parseEmptyStatement=function(g){return this.next(),this.finishNode(g,"EmptyStatement")},pp$8.parseLabeledStatement=function(g,v,D,R){for(var q=0,ie=this.labels;q<ie.length;q+=1){ie[q].name===v&&this.raise(D.start,"Label '"+v+"' is already declared")}for(var se=this.type.isLoop?"loop":this.type===types$1$1._switch?"switch":null,ce=this.labels.length-1;ce>=0;ce--){var le=this.labels[ce];if(le.statementStart!==g.start)break;le.statementStart=this.start,le.kind=se}return this.labels.push({name:v,kind:se,statementStart:this.start}),g.body=this.parseStatement(R?-1===R.indexOf("label")?R+"label":R:"label"),this.labels.pop(),g.label=D,this.finishNode(g,"LabeledStatement")},pp$8.parseExpressionStatement=function(g,v){return g.expression=v,this.semicolon(),this.finishNode(g,"ExpressionStatement")},pp$8.parseBlock=function(g,v,D){for(void 0===g&&(g=!0),void 0===v&&(v=this.startNode()),v.body=[],this.expect(types$1$1.braceL),g&&this.enterScope(0);this.type!==types$1$1.braceR;){var R=this.parseStatement(null);v.body.push(R)}return D&&(this.strict=!1),this.next(),g&&this.exitScope(),this.finishNode(v,"BlockStatement")},pp$8.parseFor=function(g,v){return g.init=v,this.expect(types$1$1.semi),g.test=this.type===types$1$1.semi?null:this.parseExpression(),this.expect(types$1$1.semi),g.update=this.type===types$1$1.parenR?null:this.parseExpression(),this.expect(types$1$1.parenR),g.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(g,"ForStatement")},pp$8.parseForIn=function(g,v){var D=this.type===types$1$1._in;return this.next(),"VariableDeclaration"===v.type&&null!=v.declarations[0].init&&(!D||this.options.ecmaVersion<8||this.strict||"var"!==v.kind||"Identifier"!==v.declarations[0].id.type)&&this.raise(v.start,(D?"for-in":"for-of")+" loop variable declaration may not have an initializer"),g.left=v,g.right=D?this.parseExpression():this.parseMaybeAssign(),this.expect(types$1$1.parenR),g.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(g,D?"ForInStatement":"ForOfStatement")},pp$8.parseVar=function(g,v,D,R){for(g.declarations=[],g.kind=D;;){var q=this.startNode();if(this.parseVarId(q,D),this.eat(types$1$1.eq)?q.init=this.parseMaybeAssign(v):R||"const"!==D||this.type===types$1$1._in||this.options.ecmaVersion>=6&&this.isContextual("of")?R||"using"!==D&&"await using"!==D||!(this.options.ecmaVersion>=17)||this.type===types$1$1._in||this.isContextual("of")?R||"Identifier"===q.id.type||v&&(this.type===types$1$1._in||this.isContextual("of"))?q.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.raise(this.lastTokEnd,"Missing initializer in "+D+" declaration"):this.unexpected(),g.declarations.push(this.finishNode(q,"VariableDeclarator")),!this.eat(types$1$1.comma))break}return g},pp$8.parseVarId=function(g,v){g.id="using"===v||"await using"===v?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(g.id,"var"===v?BIND_VAR:BIND_LEXICAL,!1)};var FUNC_STATEMENT=1,FUNC_HANGING_STATEMENT=2,FUNC_NULLABLE_ID=4;function isPrivateNameConflicted(g,v){var D=v.key.name,R=g[D],q="true";return"MethodDefinition"!==v.type||"get"!==v.kind&&"set"!==v.kind||(q=(v.static?"s":"i")+v.kind),"iget"===R&&"iset"===q||"iset"===R&&"iget"===q||"sget"===R&&"sset"===q||"sset"===R&&"sget"===q?(g[D]="true",!1):!!R||(g[D]=q,!1)}function checkKeyName(g,v){var D=g.computed,R=g.key;return!D&&("Identifier"===R.type&&R.name===v||"Literal"===R.type&&R.value===v)}pp$8.parseFunction=function(g,v,D,R,q){this.initFunction(g),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!R)&&(this.type===types$1$1.star&&v&FUNC_HANGING_STATEMENT&&this.unexpected(),g.generator=this.eat(types$1$1.star)),this.options.ecmaVersion>=8&&(g.async=!!R),v&FUNC_STATEMENT&&(g.id=v&FUNC_NULLABLE_ID&&this.type!==types$1$1.name?null:this.parseIdent(),!g.id||v&FUNC_HANGING_STATEMENT||this.checkLValSimple(g.id,this.strict||g.generator||g.async?this.treatFunctionsAsVar?BIND_VAR:BIND_LEXICAL:BIND_FUNCTION));var ie=this.yieldPos,se=this.awaitPos,ce=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(functionFlags(g.async,g.generator)),v&FUNC_STATEMENT||(g.id=this.type===types$1$1.name?this.parseIdent():null),this.parseFunctionParams(g),this.parseFunctionBody(g,D,!1,q),this.yieldPos=ie,this.awaitPos=se,this.awaitIdentPos=ce,this.finishNode(g,v&FUNC_STATEMENT?"FunctionDeclaration":"FunctionExpression")},pp$8.parseFunctionParams=function(g){this.expect(types$1$1.parenL),g.params=this.parseBindingList(types$1$1.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},pp$8.parseClass=function(g,v){this.next();var D=this.strict;this.strict=!0,this.parseClassId(g,v),this.parseClassSuper(g);var R=this.enterClassBody(),q=this.startNode(),ie=!1;for(q.body=[],this.expect(types$1$1.braceL);this.type!==types$1$1.braceR;){var se=this.parseClassElement(null!==g.superClass);se&&(q.body.push(se),"MethodDefinition"===se.type&&"constructor"===se.kind?(ie&&this.raiseRecoverable(se.start,"Duplicate constructor in the same class"),ie=!0):se.key&&"PrivateIdentifier"===se.key.type&&isPrivateNameConflicted(R,se)&&this.raiseRecoverable(se.key.start,"Identifier '#"+se.key.name+"' has already been declared"))}return this.strict=D,this.next(),g.body=this.finishNode(q,"ClassBody"),this.exitClassBody(),this.finishNode(g,v?"ClassDeclaration":"ClassExpression")},pp$8.parseClassElement=function(g){if(this.eat(types$1$1.semi))return null;var v=this.options.ecmaVersion,D=this.startNode(),R="",q=!1,ie=!1,se="method",ce=!1;if(this.eatContextual("static")){if(v>=13&&this.eat(types$1$1.braceL))return this.parseClassStaticBlock(D),D;this.isClassElementNameStart()||this.type===types$1$1.star?ce=!0:R="static"}if(D.static=ce,!R&&v>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==types$1$1.star||this.canInsertSemicolon()?R="async":ie=!0),!R&&(v>=9||!ie)&&this.eat(types$1$1.star)&&(q=!0),!R&&!ie&&!q){var le=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?se=le:R=le)}if(R?(D.computed=!1,D.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),D.key.name=R,this.finishNode(D.key,"Identifier")):this.parseClassElementName(D),v<13||this.type===types$1$1.parenL||"method"!==se||q||ie){var me=!D.static&&checkKeyName(D,"constructor"),fe=me&&g;me&&"method"!==se&&this.raise(D.key.start,"Constructor can't have get/set modifier"),D.kind=me?"constructor":se,this.parseClassMethod(D,q,ie,fe)}else this.parseClassField(D);return D},pp$8.isClassElementNameStart=function(){return this.type===types$1$1.name||this.type===types$1$1.privateId||this.type===types$1$1.num||this.type===types$1$1.string||this.type===types$1$1.bracketL||this.type.keyword},pp$8.parseClassElementName=function(g){this.type===types$1$1.privateId?("constructor"===this.value&&this.raise(this.start,"Classes can't have an element named '#constructor'"),g.computed=!1,g.key=this.parsePrivateIdent()):this.parsePropertyName(g)},pp$8.parseClassMethod=function(g,v,D,R){var q=g.key;"constructor"===g.kind?(v&&this.raise(q.start,"Constructor can't be a generator"),D&&this.raise(q.start,"Constructor can't be an async method")):g.static&&checkKeyName(g,"prototype")&&this.raise(q.start,"Classes may not have a static property named prototype");var ie=g.value=this.parseMethod(v,D,R);return"get"===g.kind&&0!==ie.params.length&&this.raiseRecoverable(ie.start,"getter should have no params"),"set"===g.kind&&1!==ie.params.length&&this.raiseRecoverable(ie.start,"setter should have exactly one param"),"set"===g.kind&&"RestElement"===ie.params[0].type&&this.raiseRecoverable(ie.params[0].start,"Setter cannot use rest params"),this.finishNode(g,"MethodDefinition")},pp$8.parseClassField=function(g){return checkKeyName(g,"constructor")?this.raise(g.key.start,"Classes can't have a field named 'constructor'"):g.static&&checkKeyName(g,"prototype")&&this.raise(g.key.start,"Classes can't have a static field named 'prototype'"),this.eat(types$1$1.eq)?(this.enterScope(SCOPE_CLASS_FIELD_INIT|SCOPE_SUPER),g.value=this.parseMaybeAssign(),this.exitScope()):g.value=null,this.semicolon(),this.finishNode(g,"PropertyDefinition")},pp$8.parseClassStaticBlock=function(g){g.body=[];var v=this.labels;for(this.labels=[],this.enterScope(SCOPE_CLASS_STATIC_BLOCK|SCOPE_SUPER);this.type!==types$1$1.braceR;){var D=this.parseStatement(null);g.body.push(D)}return this.next(),this.exitScope(),this.labels=v,this.finishNode(g,"StaticBlock")},pp$8.parseClassId=function(g,v){this.type===types$1$1.name?(g.id=this.parseIdent(),v&&this.checkLValSimple(g.id,BIND_LEXICAL,!1)):(!0===v&&this.unexpected(),g.id=null)},pp$8.parseClassSuper=function(g){g.superClass=this.eat(types$1$1._extends)?this.parseExprSubscripts(null,!1):null},pp$8.enterClassBody=function(){var g={declared:Object.create(null),used:[]};return this.privateNameStack.push(g),g.declared},pp$8.exitClassBody=function(){var g=this.privateNameStack.pop(),v=g.declared,D=g.used;if(this.options.checkPrivateFields)for(var R=this.privateNameStack.length,q=0===R?null:this.privateNameStack[R-1],ie=0;ie<D.length;++ie){var se=D[ie];hasOwn(v,se.name)||(q?q.used.push(se):this.raiseRecoverable(se.start,"Private field '#"+se.name+"' must be declared in an enclosing class"))}},pp$8.parseExportAllDeclaration=function(g,v){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(g.exported=this.parseModuleExportName(),this.checkExport(v,g.exported,this.lastTokStart)):g.exported=null),this.expectContextual("from"),this.type!==types$1$1.string&&this.unexpected(),g.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(g.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(g,"ExportAllDeclaration")},pp$8.parseExport=function(g,v){if(this.next(),this.eat(types$1$1.star))return this.parseExportAllDeclaration(g,v);if(this.eat(types$1$1._default))return this.checkExport(v,"default",this.lastTokStart),g.declaration=this.parseExportDefaultDeclaration(),this.finishNode(g,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())g.declaration=this.parseExportDeclaration(g),"VariableDeclaration"===g.declaration.type?this.checkVariableExport(v,g.declaration.declarations):this.checkExport(v,g.declaration.id,g.declaration.id.start),g.specifiers=[],g.source=null,this.options.ecmaVersion>=16&&(g.attributes=[]);else{if(g.declaration=null,g.specifiers=this.parseExportSpecifiers(v),this.eatContextual("from"))this.type!==types$1$1.string&&this.unexpected(),g.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(g.attributes=this.parseWithClause());else{for(var D=0,R=g.specifiers;D<R.length;D+=1){var q=R[D];this.checkUnreserved(q.local),this.checkLocalExport(q.local),"Literal"===q.local.type&&this.raise(q.local.start,"A string literal cannot be used as an exported binding without `from`.")}g.source=null,this.options.ecmaVersion>=16&&(g.attributes=[])}this.semicolon()}return this.finishNode(g,"ExportNamedDeclaration")},pp$8.parseExportDeclaration=function(g){return this.parseStatement(null)},pp$8.parseExportDefaultDeclaration=function(){var g;if(this.type===types$1$1._function||(g=this.isAsyncFunction())){var v=this.startNode();return this.next(),g&&this.next(),this.parseFunction(v,FUNC_STATEMENT|FUNC_NULLABLE_ID,!1,g)}if(this.type===types$1$1._class){var D=this.startNode();return this.parseClass(D,"nullableID")}var R=this.parseMaybeAssign();return this.semicolon(),R},pp$8.checkExport=function(g,v,D){g&&("string"!=typeof v&&(v="Identifier"===v.type?v.name:v.value),hasOwn(g,v)&&this.raiseRecoverable(D,"Duplicate export '"+v+"'"),g[v]=!0)},pp$8.checkPatternExport=function(g,v){var D=v.type;if("Identifier"===D)this.checkExport(g,v,v.start);else if("ObjectPattern"===D)for(var R=0,q=v.properties;R<q.length;R+=1){var ie=q[R];this.checkPatternExport(g,ie)}else if("ArrayPattern"===D)for(var se=0,ce=v.elements;se<ce.length;se+=1){var le=ce[se];le&&this.checkPatternExport(g,le)}else"Property"===D?this.checkPatternExport(g,v.value):"AssignmentPattern"===D?this.checkPatternExport(g,v.left):"RestElement"===D&&this.checkPatternExport(g,v.argument)},pp$8.checkVariableExport=function(g,v){if(g)for(var D=0,R=v;D<R.length;D+=1){var q=R[D];this.checkPatternExport(g,q.id)}},pp$8.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},pp$8.parseExportSpecifier=function(g){var v=this.startNode();return v.local=this.parseModuleExportName(),v.exported=this.eatContextual("as")?this.parseModuleExportName():v.local,this.checkExport(g,v.exported,v.exported.start),this.finishNode(v,"ExportSpecifier")},pp$8.parseExportSpecifiers=function(g){var v=[],D=!0;for(this.expect(types$1$1.braceL);!this.eat(types$1$1.braceR);){if(D)D=!1;else if(this.expect(types$1$1.comma),this.afterTrailingComma(types$1$1.braceR))break;v.push(this.parseExportSpecifier(g))}return v},pp$8.parseImport=function(g){return this.next(),this.type===types$1$1.string?(g.specifiers=empty$1,g.source=this.parseExprAtom()):(g.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),g.source=this.type===types$1$1.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(g.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(g,"ImportDeclaration")},pp$8.parseImportSpecifier=function(){var g=this.startNode();return g.imported=this.parseModuleExportName(),this.eatContextual("as")?g.local=this.parseIdent():(this.checkUnreserved(g.imported),g.local=g.imported),this.checkLValSimple(g.local,BIND_LEXICAL),this.finishNode(g,"ImportSpecifier")},pp$8.parseImportDefaultSpecifier=function(){var g=this.startNode();return g.local=this.parseIdent(),this.checkLValSimple(g.local,BIND_LEXICAL),this.finishNode(g,"ImportDefaultSpecifier")},pp$8.parseImportNamespaceSpecifier=function(){var g=this.startNode();return this.next(),this.expectContextual("as"),g.local=this.parseIdent(),this.checkLValSimple(g.local,BIND_LEXICAL),this.finishNode(g,"ImportNamespaceSpecifier")},pp$8.parseImportSpecifiers=function(){var g=[],v=!0;if(this.type===types$1$1.name&&(g.push(this.parseImportDefaultSpecifier()),!this.eat(types$1$1.comma)))return g;if(this.type===types$1$1.star)return g.push(this.parseImportNamespaceSpecifier()),g;for(this.expect(types$1$1.braceL);!this.eat(types$1$1.braceR);){if(v)v=!1;else if(this.expect(types$1$1.comma),this.afterTrailingComma(types$1$1.braceR))break;g.push(this.parseImportSpecifier())}return g},pp$8.parseWithClause=function(){var g=[];if(!this.eat(types$1$1._with))return g;this.expect(types$1$1.braceL);for(var v={},D=!0;!this.eat(types$1$1.braceR);){if(D)D=!1;else if(this.expect(types$1$1.comma),this.afterTrailingComma(types$1$1.braceR))break;var R=this.parseImportAttribute(),q="Identifier"===R.key.type?R.key.name:R.key.value;hasOwn(v,q)&&this.raiseRecoverable(R.key.start,"Duplicate attribute key '"+q+"'"),v[q]=!0,g.push(R)}return g},pp$8.parseImportAttribute=function(){var g=this.startNode();return g.key=this.type===types$1$1.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved),this.expect(types$1$1.colon),this.type!==types$1$1.string&&this.unexpected(),g.value=this.parseExprAtom(),this.finishNode(g,"ImportAttribute")},pp$8.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===types$1$1.string){var g=this.parseLiteral(this.value);return loneSurrogate.test(g.value)&&this.raise(g.start,"An export name cannot include a lone surrogate."),g}return this.parseIdent(!0)},pp$8.adaptDirectivePrologue=function(g){for(var v=0;v<g.length&&this.isDirectiveCandidate(g[v]);++v)g[v].directive=g[v].expression.raw.slice(1,-1)},pp$8.isDirectiveCandidate=function(g){return this.options.ecmaVersion>=5&&"ExpressionStatement"===g.type&&"Literal"===g.expression.type&&"string"==typeof g.expression.value&&('"'===this.input[g.start]||"'"===this.input[g.start])};var pp$7=Parser.prototype;pp$7.toAssignable=function(g,v,D){if(this.options.ecmaVersion>=6&&g)switch(g.type){case"Identifier":this.inAsync&&"await"===g.name&&this.raise(g.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":g.type="ObjectPattern",D&&this.checkPatternErrors(D,!0);for(var R=0,q=g.properties;R<q.length;R+=1){var ie=q[R];this.toAssignable(ie,v),"RestElement"!==ie.type||"ArrayPattern"!==ie.argument.type&&"ObjectPattern"!==ie.argument.type||this.raise(ie.argument.start,"Unexpected token")}break;case"Property":"init"!==g.kind&&this.raise(g.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(g.value,v);break;case"ArrayExpression":g.type="ArrayPattern",D&&this.checkPatternErrors(D,!0),this.toAssignableList(g.elements,v);break;case"SpreadElement":g.type="RestElement",this.toAssignable(g.argument,v),"AssignmentPattern"===g.argument.type&&this.raise(g.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":"="!==g.operator&&this.raise(g.left.end,"Only '=' operator can be used for specifying default value."),g.type="AssignmentPattern",delete g.operator,this.toAssignable(g.left,v);break;case"ParenthesizedExpression":this.toAssignable(g.expression,v,D);break;case"ChainExpression":this.raiseRecoverable(g.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!v)break;default:this.raise(g.start,"Assigning to rvalue")}else D&&this.checkPatternErrors(D,!0);return g},pp$7.toAssignableList=function(g,v){for(var D=g.length,R=0;R<D;R++){var q=g[R];q&&this.toAssignable(q,v)}if(D){var ie=g[D-1];6===this.options.ecmaVersion&&v&&ie&&"RestElement"===ie.type&&"Identifier"!==ie.argument.type&&this.unexpected(ie.argument.start)}return g},pp$7.parseSpread=function(g){var v=this.startNode();return this.next(),v.argument=this.parseMaybeAssign(!1,g),this.finishNode(v,"SpreadElement")},pp$7.parseRestBinding=function(){var g=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==types$1$1.name&&this.unexpected(),g.argument=this.parseBindingAtom(),this.finishNode(g,"RestElement")},pp$7.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case types$1$1.bracketL:var g=this.startNode();return this.next(),g.elements=this.parseBindingList(types$1$1.bracketR,!0,!0),this.finishNode(g,"ArrayPattern");case types$1$1.braceL:return this.parseObj(!0)}return this.parseIdent()},pp$7.parseBindingList=function(g,v,D,R){for(var q=[],ie=!0;!this.eat(g);)if(ie?ie=!1:this.expect(types$1$1.comma),v&&this.type===types$1$1.comma)q.push(null);else{if(D&&this.afterTrailingComma(g))break;if(this.type===types$1$1.ellipsis){var se=this.parseRestBinding();this.parseBindingListItem(se),q.push(se),this.type===types$1$1.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(g);break}q.push(this.parseAssignableListItem(R))}return q},pp$7.parseAssignableListItem=function(g){var v=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(v),v},pp$7.parseBindingListItem=function(g){return g},pp$7.parseMaybeDefault=function(g,v,D){if(D=D||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(types$1$1.eq))return D;var R=this.startNodeAt(g,v);return R.left=D,R.right=this.parseMaybeAssign(),this.finishNode(R,"AssignmentPattern")},pp$7.checkLValSimple=function(g,v,D){void 0===v&&(v=BIND_NONE);var R=v!==BIND_NONE;switch(g.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(g.name)&&this.raiseRecoverable(g.start,(R?"Binding ":"Assigning to ")+g.name+" in strict mode"),R&&(v===BIND_LEXICAL&&"let"===g.name&&this.raiseRecoverable(g.start,"let is disallowed as a lexically bound name"),D&&(hasOwn(D,g.name)&&this.raiseRecoverable(g.start,"Argument name clash"),D[g.name]=!0),v!==BIND_OUTSIDE&&this.declareName(g.name,v,g.start));break;case"ChainExpression":this.raiseRecoverable(g.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":R&&this.raiseRecoverable(g.start,"Binding member expression");break;case"ParenthesizedExpression":return R&&this.raiseRecoverable(g.start,"Binding parenthesized expression"),this.checkLValSimple(g.expression,v,D);default:this.raise(g.start,(R?"Binding":"Assigning to")+" rvalue")}},pp$7.checkLValPattern=function(g,v,D){switch(void 0===v&&(v=BIND_NONE),g.type){case"ObjectPattern":for(var R=0,q=g.properties;R<q.length;R+=1){var ie=q[R];this.checkLValInnerPattern(ie,v,D)}break;case"ArrayPattern":for(var se=0,ce=g.elements;se<ce.length;se+=1){var le=ce[se];le&&this.checkLValInnerPattern(le,v,D)}break;default:this.checkLValSimple(g,v,D)}},pp$7.checkLValInnerPattern=function(g,v,D){switch(void 0===v&&(v=BIND_NONE),g.type){case"Property":this.checkLValInnerPattern(g.value,v,D);break;case"AssignmentPattern":this.checkLValPattern(g.left,v,D);break;case"RestElement":this.checkLValPattern(g.argument,v,D);break;default:this.checkLValPattern(g,v,D)}};var TokContext=function TokContext(g,v,D,R,q){this.token=g,this.isExpr=!!v,this.preserveSpace=!!D,this.override=R,this.generator=!!q},types$2={b_stat:new TokContext("{",!1),b_expr:new TokContext("{",!0),b_tmpl:new TokContext("${",!1),p_stat:new TokContext("(",!1),p_expr:new TokContext("(",!0),q_tmpl:new TokContext("`",!0,!0,function(g){return g.tryReadTemplateToken()}),f_stat:new TokContext("function",!1),f_expr:new TokContext("function",!0),f_expr_gen:new TokContext("function",!0,!1,null,!0),f_gen:new TokContext("function",!1,!1,null,!0)},pp$6=Parser.prototype;pp$6.initialContext=function(){return[types$2.b_stat]},pp$6.curContext=function(){return this.context[this.context.length-1]},pp$6.braceIsBlock=function(g){var v=this.curContext();return v===types$2.f_expr||v===types$2.f_stat||(g!==types$1$1.colon||v!==types$2.b_stat&&v!==types$2.b_expr?g===types$1$1._return||g===types$1$1.name&&this.exprAllowed?lineBreak.test(this.input.slice(this.lastTokEnd,this.start)):g===types$1$1._else||g===types$1$1.semi||g===types$1$1.eof||g===types$1$1.parenR||g===types$1$1.arrow||(g===types$1$1.braceL?v===types$2.b_stat:g!==types$1$1._var&&g!==types$1$1._const&&g!==types$1$1.name&&!this.exprAllowed):!v.isExpr)},pp$6.inGeneratorContext=function(){for(var g=this.context.length-1;g>=1;g--){var v=this.context[g];if("function"===v.token)return v.generator}return!1},pp$6.updateContext=function(g){var v,D=this.type;D.keyword&&g===types$1$1.dot?this.exprAllowed=!1:(v=D.updateContext)?v.call(this,g):this.exprAllowed=D.beforeExpr},pp$6.overrideContext=function(g){this.curContext()!==g&&(this.context[this.context.length-1]=g)},types$1$1.parenR.updateContext=types$1$1.braceR.updateContext=function(){if(1!==this.context.length){var g=this.context.pop();g===types$2.b_stat&&"function"===this.curContext().token&&(g=this.context.pop()),this.exprAllowed=!g.isExpr}else this.exprAllowed=!0},types$1$1.braceL.updateContext=function(g){this.context.push(this.braceIsBlock(g)?types$2.b_stat:types$2.b_expr),this.exprAllowed=!0},types$1$1.dollarBraceL.updateContext=function(){this.context.push(types$2.b_tmpl),this.exprAllowed=!0},types$1$1.parenL.updateContext=function(g){var v=g===types$1$1._if||g===types$1$1._for||g===types$1$1._with||g===types$1$1._while;this.context.push(v?types$2.p_stat:types$2.p_expr),this.exprAllowed=!0},types$1$1.incDec.updateContext=function(){},types$1$1._function.updateContext=types$1$1._class.updateContext=function(g){!g.beforeExpr||g===types$1$1._else||g===types$1$1.semi&&this.curContext()!==types$2.p_stat||g===types$1$1._return&&lineBreak.test(this.input.slice(this.lastTokEnd,this.start))||(g===types$1$1.colon||g===types$1$1.braceL)&&this.curContext()===types$2.b_stat?this.context.push(types$2.f_stat):this.context.push(types$2.f_expr),this.exprAllowed=!1},types$1$1.colon.updateContext=function(){"function"===this.curContext().token&&this.context.pop(),this.exprAllowed=!0},types$1$1.backQuote.updateContext=function(){this.curContext()===types$2.q_tmpl?this.context.pop():this.context.push(types$2.q_tmpl),this.exprAllowed=!1},types$1$1.star.updateContext=function(g){if(g===types$1$1._function){var v=this.context.length-1;this.context[v]===types$2.f_expr?this.context[v]=types$2.f_expr_gen:this.context[v]=types$2.f_gen}this.exprAllowed=!0},types$1$1.name.updateContext=function(g){var v=!1;this.options.ecmaVersion>=6&&g!==types$1$1.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(v=!0),this.exprAllowed=v};var pp$5=Parser.prototype;function isLocalVariableAccess(g){return"Identifier"===g.type||"ParenthesizedExpression"===g.type&&isLocalVariableAccess(g.expression)}function isPrivateFieldAccess(g){return"MemberExpression"===g.type&&"PrivateIdentifier"===g.property.type||"ChainExpression"===g.type&&isPrivateFieldAccess(g.expression)||"ParenthesizedExpression"===g.type&&isPrivateFieldAccess(g.expression)}pp$5.checkPropClash=function(g,v,D){if(!(this.options.ecmaVersion>=9&&"SpreadElement"===g.type||this.options.ecmaVersion>=6&&(g.computed||g.method||g.shorthand))){var R,q=g.key;switch(q.type){case"Identifier":R=q.name;break;case"Literal":R=String(q.value);break;default:return}var ie=g.kind;if(this.options.ecmaVersion>=6)"__proto__"===R&&"init"===ie&&(v.proto&&(D?D.doubleProto<0&&(D.doubleProto=q.start):this.raiseRecoverable(q.start,"Redefinition of __proto__ property")),v.proto=!0);else{var se=v[R="$"+R];if(se)("init"===ie?this.strict&&se.init||se.get||se.set:se.init||se[ie])&&this.raiseRecoverable(q.start,"Redefinition of property");else se=v[R]={init:!1,get:!1,set:!1};se[ie]=!0}}},pp$5.parseExpression=function(g,v){var D=this;return this.catchStackOverflow(function(){var R=D.start,q=D.startLoc,ie=D.parseMaybeAssign(g,v);if(D.type===types$1$1.comma){var se=D.startNodeAt(R,q);for(se.expressions=[ie];D.eat(types$1$1.comma);)se.expressions.push(D.parseMaybeAssign(g,v));return D.finishNode(se,"SequenceExpression")}return ie})},pp$5.parseMaybeAssign=function(g,v,D){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(g);this.exprAllowed=!1}var R=!1,q=-1,ie=-1,se=-1;v?(q=v.parenthesizedAssign,ie=v.trailingComma,se=v.doubleProto,v.parenthesizedAssign=v.trailingComma=-1):(v=new DestructuringErrors,R=!0);var ce=this.start,le=this.startLoc;this.type!==types$1$1.parenL&&this.type!==types$1$1.name||(this.potentialArrowAt=this.start,this.potentialArrowInForAwait="await"===g);var me=this.parseMaybeConditional(g,v);if(D&&(me=D.call(this,me,ce,le)),this.type.isAssign){var fe=this.startNodeAt(ce,le);return fe.operator=this.value,this.type===types$1$1.eq&&(me=this.toAssignable(me,!1,v)),R||(v.parenthesizedAssign=v.trailingComma=v.doubleProto=-1),v.shorthandAssign>=me.start&&(v.shorthandAssign=-1),this.type===types$1$1.eq?this.checkLValPattern(me):this.checkLValSimple(me),fe.left=me,this.next(),fe.right=this.parseMaybeAssign(g),se>-1&&(v.doubleProto=se),this.finishNode(fe,"AssignmentExpression")}return R&&this.checkExpressionErrors(v,!0),q>-1&&(v.parenthesizedAssign=q),ie>-1&&(v.trailingComma=ie),me},pp$5.parseMaybeConditional=function(g,v){var D=this.start,R=this.startLoc,q=this.parseExprOps(g,v);if(this.checkExpressionErrors(v))return q;if(("ArrowFunctionExpression"!==q.type||q.start!==D)&&this.eat(types$1$1.question)){var ie=this.startNodeAt(D,R);return ie.test=q,ie.consequent=this.parseMaybeAssign(),this.expect(types$1$1.colon),ie.alternate=this.parseMaybeAssign(g),this.finishNode(ie,"ConditionalExpression")}return q},pp$5.parseExprOps=function(g,v){var D=this.start,R=this.startLoc,q=this.parseMaybeUnary(v,!1,!1,g);return this.checkExpressionErrors(v)||q.start===D&&"ArrowFunctionExpression"===q.type?q:this.parseExprOp(q,D,R,-1,g)},pp$5.parseExprOp=function(g,v,D,R,q){var ie=this.type.binop;if(null!=ie&&(!q||this.type!==types$1$1._in)&&ie>R){var se=this.type===types$1$1.logicalOR||this.type===types$1$1.logicalAND,ce=this.type===types$1$1.coalesce;ce&&(ie=types$1$1.logicalAND.binop);var le=this.value;this.next();var me=this.start,fe=this.startLoc,ge=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,q),me,fe,ie,q),ve=this.buildBinary(v,D,g,ge,le,se||ce);return(se&&this.type===types$1$1.coalesce||ce&&(this.type===types$1$1.logicalOR||this.type===types$1$1.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(ve,v,D,R,q)}return g},pp$5.buildBinary=function(g,v,D,R,q,ie){"PrivateIdentifier"===R.type&&this.raise(R.start,"Private identifier can only be left side of binary expression");var se=this.startNodeAt(g,v);return se.left=D,se.operator=q,se.right=R,this.finishNode(se,ie?"LogicalExpression":"BinaryExpression")},pp$5.parseMaybeUnary=function(g,v,D,R){var q,ie=this.start,se=this.startLoc;if(this.isContextual("await")&&this.canAwait)q=this.parseAwait(R),v=!0;else if(this.type.prefix){var ce=this.startNode(),le=this.type===types$1$1.incDec;ce.operator=this.value,ce.prefix=!0,this.next(),ce.argument=this.parseMaybeUnary(null,!0,le,R),this.checkExpressionErrors(g,!0),le?this.checkLValSimple(ce.argument):this.strict&&"delete"===ce.operator&&isLocalVariableAccess(ce.argument)?this.raiseRecoverable(ce.start,"Deleting local variable in strict mode"):"delete"===ce.operator&&isPrivateFieldAccess(ce.argument)?this.raiseRecoverable(ce.start,"Private fields can not be deleted"):v=!0,q=this.finishNode(ce,le?"UpdateExpression":"UnaryExpression")}else if(v||this.type!==types$1$1.privateId){if(q=this.parseExprSubscripts(g,R),this.checkExpressionErrors(g))return q;for(;this.type.postfix&&!this.canInsertSemicolon();){var me=this.startNodeAt(ie,se);me.operator=this.value,me.prefix=!1,me.argument=q,this.checkLValSimple(q),this.next(),q=this.finishNode(me,"UpdateExpression")}}else(R||0===this.privateNameStack.length)&&this.options.checkPrivateFields&&this.unexpected(),q=this.parsePrivateIdent(),this.type!==types$1$1._in&&this.unexpected();return D||"ArrowFunctionExpression"===q.type&&q.start===ie||!this.eat(types$1$1.starstar)?q:v?void this.unexpected(this.lastTokStart):this.buildBinary(ie,se,q,this.parseMaybeUnary(null,!1,!1,R),"**",!1)},pp$5.parseExprSubscripts=function(g,v){var D=this.start,R=this.startLoc,q=this.parseExprAtom(g,v);if("ArrowFunctionExpression"===q.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd))return q;var ie=this.parseSubscripts(q,D,R,!1,v);return g&&"MemberExpression"===ie.type&&(g.parenthesizedAssign>=ie.start&&(g.parenthesizedAssign=-1),g.parenthesizedBind>=ie.start&&(g.parenthesizedBind=-1),g.trailingComma>=ie.start&&(g.trailingComma=-1)),ie},pp$5.parseSubscripts=function(g,v,D,R,q){for(var ie=this.options.ecmaVersion>=8&&"Identifier"===g.type&&"async"===g.name&&this.lastTokEnd===g.end&&!this.canInsertSemicolon()&&g.end-g.start===5&&this.potentialArrowAt===g.start,se=!1;;){var ce=this.parseSubscript(g,v,D,R,ie,se,q);if(ce.optional&&(se=!0),ce===g||"ArrowFunctionExpression"===ce.type){if(se){var le=this.startNodeAt(v,D);le.expression=ce,ce=this.finishNode(le,"ChainExpression")}return ce}g=ce}},pp$5.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(types$1$1.arrow)},pp$5.parseSubscriptAsyncArrow=function(g,v,D,R){return this.parseArrowExpression(this.startNodeAt(g,v),D,!0,R)},pp$5.parseSubscript=function(g,v,D,R,q,ie,se){var ce=this.options.ecmaVersion>=11,le=ce&&this.eat(types$1$1.questionDot);R&&le&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var me=this.eat(types$1$1.bracketL);if(me||le&&this.type!==types$1$1.parenL&&this.type!==types$1$1.backQuote||this.eat(types$1$1.dot)){var fe=this.startNodeAt(v,D);fe.object=g,me?(fe.property=this.parseExpression(),this.expect(types$1$1.bracketR)):this.type===types$1$1.privateId&&"Super"!==g.type?fe.property=this.parsePrivateIdent():fe.property=this.parseIdent("never"!==this.options.allowReserved),fe.computed=!!me,ce&&(fe.optional=le),g=this.finishNode(fe,"MemberExpression")}else if(!R&&this.eat(types$1$1.parenL)){var ge=new DestructuringErrors,ve=this.yieldPos,xe=this.awaitPos,_e=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var ke=this.parseExprList(types$1$1.parenR,this.options.ecmaVersion>=8,!1,ge);if(q&&!le&&this.shouldParseAsyncArrow())return this.checkPatternErrors(ge,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=ve,this.awaitPos=xe,this.awaitIdentPos=_e,this.parseSubscriptAsyncArrow(v,D,ke,se);this.checkExpressionErrors(ge,!0),this.yieldPos=ve||this.yieldPos,this.awaitPos=xe||this.awaitPos,this.awaitIdentPos=_e||this.awaitIdentPos;var we=this.startNodeAt(v,D);we.callee=g,we.arguments=ke,ce&&(we.optional=le),g=this.finishNode(we,"CallExpression")}else if(this.type===types$1$1.backQuote){(le||ie)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var Se=this.startNodeAt(v,D);Se.tag=g,Se.quasi=this.parseTemplate({isTagged:!0}),g=this.finishNode(Se,"TaggedTemplateExpression")}return g},pp$5.parseExprAtom=function(g,v,D){this.type===types$1$1.slash&&this.readRegexp();var R,q=this.potentialArrowAt===this.start;switch(this.type){case types$1$1._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),R=this.startNode(),this.next(),this.type!==types$1$1.parenL||this.allowDirectSuper||this.raise(R.start,"super() call outside constructor of a subclass"),this.type!==types$1$1.dot&&this.type!==types$1$1.bracketL&&this.type!==types$1$1.parenL&&this.unexpected(),this.finishNode(R,"Super");case types$1$1._this:return R=this.startNode(),this.next(),this.finishNode(R,"ThisExpression");case types$1$1.name:var ie=this.start,se=this.startLoc,ce=this.containsEsc,le=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!ce&&"async"===le.name&&!this.canInsertSemicolon()&&this.eat(types$1$1._function))return this.overrideContext(types$2.f_expr),this.parseFunction(this.startNodeAt(ie,se),0,!1,!0,v);if(q&&!this.canInsertSemicolon()){if(this.eat(types$1$1.arrow))return this.parseArrowExpression(this.startNodeAt(ie,se),[le],!1,v);if(this.options.ecmaVersion>=8&&"async"===le.name&&this.type===types$1$1.name&&!ce&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return le=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(types$1$1.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(ie,se),[le],!0,v)}return le;case types$1$1.regexp:var me=this.value;return(R=this.parseLiteral(me.value)).regex={pattern:me.pattern,flags:me.flags},R;case types$1$1.num:case types$1$1.string:return this.parseLiteral(this.value);case types$1$1._null:case types$1$1._true:case types$1$1._false:return(R=this.startNode()).value=this.type===types$1$1._null?null:this.type===types$1$1._true,R.raw=this.type.keyword,this.next(),this.finishNode(R,"Literal");case types$1$1.parenL:var fe=this.start,ge=this.parseParenAndDistinguishExpression(q,v);return g&&(g.parenthesizedAssign<0&&!this.isSimpleAssignTarget(ge)&&(g.parenthesizedAssign=fe),g.parenthesizedBind<0&&(g.parenthesizedBind=fe)),ge;case types$1$1.bracketL:return R=this.startNode(),this.next(),R.elements=this.parseExprList(types$1$1.bracketR,!0,!0,g),this.finishNode(R,"ArrayExpression");case types$1$1.braceL:return this.overrideContext(types$2.b_expr),this.parseObj(!1,g);case types$1$1._function:return R=this.startNode(),this.next(),this.parseFunction(R,0);case types$1$1._class:return this.parseClass(this.startNode(),!1);case types$1$1._new:return this.parseNew();case types$1$1.backQuote:return this.parseTemplate();case types$1$1._import:return this.options.ecmaVersion>=11?this.parseExprImport(D):this.unexpected();default:return this.parseExprAtomDefault()}},pp$5.parseExprAtomDefault=function(){this.unexpected()},pp$5.parseExprImport=function(g){var v=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===types$1$1.parenL&&!g)return this.parseDynamicImport(v);if(this.type===types$1$1.dot){var D=this.startNodeAt(v.start,v.loc&&v.loc.start);return D.name="import",v.meta=this.finishNode(D,"Identifier"),this.parseImportMeta(v)}this.unexpected()},pp$5.parseDynamicImport=function(g){if(this.next(),g.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(types$1$1.parenR)?g.options=null:(this.expect(types$1$1.comma),this.afterTrailingComma(types$1$1.parenR)?g.options=null:(g.options=this.parseMaybeAssign(),this.eat(types$1$1.parenR)||(this.expect(types$1$1.comma),this.afterTrailingComma(types$1$1.parenR)||this.unexpected())));else if(!this.eat(types$1$1.parenR)){var v=this.start;this.eat(types$1$1.comma)&&this.eat(types$1$1.parenR)?this.raiseRecoverable(v,"Trailing comma is not allowed in import()"):this.unexpected(v)}return this.finishNode(g,"ImportExpression")},pp$5.parseImportMeta=function(g){this.next();var v=this.containsEsc;return g.property=this.parseIdent(!0),"meta"!==g.property.name&&this.raiseRecoverable(g.property.start,"The only valid meta property for import is 'import.meta'"),v&&this.raiseRecoverable(g.start,"'import.meta' must not contain escaped characters"),"module"===this.options.sourceType||this.options.allowImportExportEverywhere||this.raiseRecoverable(g.start,"Cannot use 'import.meta' outside a module"),this.finishNode(g,"MetaProperty")},pp$5.parseLiteral=function(g){var v=this.startNode();return v.value=g,v.raw=this.input.slice(this.start,this.end),110===v.raw.charCodeAt(v.raw.length-1)&&(v.bigint=null!=v.value?v.value.toString():v.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(v,"Literal")},pp$5.parseParenExpression=function(){this.expect(types$1$1.parenL);var g=this.parseExpression();return this.expect(types$1$1.parenR),g},pp$5.shouldParseArrow=function(g){return!this.canInsertSemicolon()},pp$5.parseParenAndDistinguishExpression=function(g,v){var D,R=this.start,q=this.startLoc,ie=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var se,ce=this.start,le=this.startLoc,me=[],fe=!0,ge=!1,ve=new DestructuringErrors,xe=this.yieldPos,_e=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==types$1$1.parenR;){if(fe?fe=!1:this.expect(types$1$1.comma),ie&&this.afterTrailingComma(types$1$1.parenR,!0)){ge=!0;break}if(this.type===types$1$1.ellipsis){se=this.start,me.push(this.parseParenItem(this.parseRestBinding())),this.type===types$1$1.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}me.push(this.parseMaybeAssign(!1,ve,this.parseParenItem))}var ke=this.lastTokEnd,we=this.lastTokEndLoc;if(this.expect(types$1$1.parenR),g&&this.shouldParseArrow(me)&&this.eat(types$1$1.arrow))return this.checkPatternErrors(ve,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=xe,this.awaitPos=_e,this.parseParenArrowList(R,q,me,v);me.length&&!ge||this.unexpected(this.lastTokStart),se&&this.unexpected(se),this.checkExpressionErrors(ve,!0),this.yieldPos=xe||this.yieldPos,this.awaitPos=_e||this.awaitPos,me.length>1?((D=this.startNodeAt(ce,le)).expressions=me,this.finishNodeAt(D,"SequenceExpression",ke,we)):D=me[0]}else D=this.parseParenExpression();if(this.options.preserveParens){var Se=this.startNodeAt(R,q);return Se.expression=D,this.finishNode(Se,"ParenthesizedExpression")}return D},pp$5.parseParenItem=function(g){return g},pp$5.parseParenArrowList=function(g,v,D,R){return this.parseArrowExpression(this.startNodeAt(g,v),D,!1,R)};var empty=[];pp$5.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var g=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===types$1$1.dot){var v=this.startNodeAt(g.start,g.loc&&g.loc.start);v.name="new",g.meta=this.finishNode(v,"Identifier"),this.next();var D=this.containsEsc;return g.property=this.parseIdent(!0),"target"!==g.property.name&&this.raiseRecoverable(g.property.start,"The only valid meta property for new is 'new.target'"),D&&this.raiseRecoverable(g.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(g.start,"'new.target' can only be used in functions and class static block"),this.finishNode(g,"MetaProperty")}var R=this.start,q=this.startLoc;return g.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),R,q,!0,!1),"Super"===g.callee.type&&this.raiseRecoverable(R,"Invalid use of 'super'"),this.eat(types$1$1.parenL)?g.arguments=this.parseExprList(types$1$1.parenR,this.options.ecmaVersion>=8,!1):g.arguments=empty,this.finishNode(g,"NewExpression")},pp$5.parseTemplateElement=function(g){var v=g.isTagged,D=this.startNode();return this.type===types$1$1.invalidTemplate?(v||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),D.value={raw:this.value.replace(/\r\n?/g,"\n"),cooked:null}):D.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),D.tail=this.type===types$1$1.backQuote,this.finishNode(D,"TemplateElement")},pp$5.parseTemplate=function(g){void 0===g&&(g={});var v=g.isTagged;void 0===v&&(v=!1);var D=this.startNode();this.next(),D.expressions=[];var R=this.parseTemplateElement({isTagged:v});for(D.quasis=[R];!R.tail;)this.type===types$1$1.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(types$1$1.dollarBraceL),D.expressions.push(this.parseExpression()),this.expect(types$1$1.braceR),D.quasis.push(R=this.parseTemplateElement({isTagged:v}));return this.next(),this.finishNode(D,"TemplateLiteral")},pp$5.isAsyncProp=function(g){return!g.computed&&"Identifier"===g.key.type&&"async"===g.key.name&&(this.type===types$1$1.name||this.type===types$1$1.num||this.type===types$1$1.string||this.type===types$1$1.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===types$1$1.star)&&!lineBreak.test(this.input.slice(this.lastTokEnd,this.start))},pp$5.parseObj=function(g,v){var D=this.startNode(),R=!0,q={};for(D.properties=[],this.next();!this.eat(types$1$1.braceR);){if(R)R=!1;else if(this.expect(types$1$1.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(types$1$1.braceR))break;var ie=this.parseProperty(g,v);g||this.checkPropClash(ie,q,v),D.properties.push(ie)}return this.finishNode(D,g?"ObjectPattern":"ObjectExpression")},pp$5.parseProperty=function(g,v){var D,R,q,ie,se=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(types$1$1.ellipsis))return g?(se.argument=this.parseIdent(!1),this.type===types$1$1.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(se,"RestElement")):(se.argument=this.parseMaybeAssign(!1,v),this.type===types$1$1.comma&&v&&v.trailingComma<0&&(v.trailingComma=this.start),this.finishNode(se,"SpreadElement"));this.options.ecmaVersion>=6&&(se.method=!1,se.shorthand=!1,(g||v)&&(q=this.start,ie=this.startLoc),g||(D=this.eat(types$1$1.star)));var ce=this.containsEsc;return this.parsePropertyName(se),!g&&!ce&&this.options.ecmaVersion>=8&&!D&&this.isAsyncProp(se)?(R=!0,D=this.options.ecmaVersion>=9&&this.eat(types$1$1.star),this.parsePropertyName(se)):R=!1,this.parsePropertyValue(se,g,D,R,q,ie,v,ce),this.finishNode(se,"Property")},pp$5.parseGetterSetter=function(g){var v=g.key.name;this.parsePropertyName(g),g.value=this.parseMethod(!1),g.kind=v;var D="get"===g.kind?0:1;if(g.value.params.length!==D){var R=g.value.start;"get"===g.kind?this.raiseRecoverable(R,"getter should have no params"):this.raiseRecoverable(R,"setter should have exactly one param")}else"set"===g.kind&&"RestElement"===g.value.params[0].type&&this.raiseRecoverable(g.value.params[0].start,"Setter cannot use rest params")},pp$5.parsePropertyValue=function(g,v,D,R,q,ie,se,ce){(D||R)&&this.type===types$1$1.colon&&this.unexpected(),this.eat(types$1$1.colon)?(g.value=v?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,se),g.kind="init"):this.options.ecmaVersion>=6&&this.type===types$1$1.parenL?(v&&this.unexpected(),g.method=!0,g.value=this.parseMethod(D,R),g.kind="init"):v||ce||!(this.options.ecmaVersion>=5)||g.computed||"Identifier"!==g.key.type||"get"!==g.key.name&&"set"!==g.key.name||this.type===types$1$1.comma||this.type===types$1$1.braceR||this.type===types$1$1.eq?this.options.ecmaVersion>=6&&!g.computed&&"Identifier"===g.key.type?((D||R)&&this.unexpected(),this.checkUnreserved(g.key),"await"!==g.key.name||this.awaitIdentPos||(this.awaitIdentPos=q),v?g.value=this.parseMaybeDefault(q,ie,this.copyNode(g.key)):this.type===types$1$1.eq&&se?(se.shorthandAssign<0&&(se.shorthandAssign=this.start),g.value=this.parseMaybeDefault(q,ie,this.copyNode(g.key))):g.value=this.copyNode(g.key),g.kind="init",g.shorthand=!0):this.unexpected():((D||R)&&this.unexpected(),this.parseGetterSetter(g))},pp$5.parsePropertyName=function(g){if(this.options.ecmaVersion>=6){if(this.eat(types$1$1.bracketL))return g.computed=!0,g.key=this.parseMaybeAssign(),this.expect(types$1$1.bracketR),g.key;g.computed=!1}return g.key=this.type===types$1$1.num||this.type===types$1$1.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},pp$5.initFunction=function(g){g.id=null,this.options.ecmaVersion>=6&&(g.generator=g.expression=!1),this.options.ecmaVersion>=8&&(g.async=!1)},pp$5.parseMethod=function(g,v,D){var R=this.startNode(),q=this.yieldPos,ie=this.awaitPos,se=this.awaitIdentPos;return this.initFunction(R),this.options.ecmaVersion>=6&&(R.generator=g),this.options.ecmaVersion>=8&&(R.async=!!v),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(functionFlags(v,R.generator)|SCOPE_SUPER|(D?SCOPE_DIRECT_SUPER:0)),this.expect(types$1$1.parenL),R.params=this.parseBindingList(types$1$1.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(R,!1,!0,!1),this.yieldPos=q,this.awaitPos=ie,this.awaitIdentPos=se,this.finishNode(R,"FunctionExpression")},pp$5.parseArrowExpression=function(g,v,D,R){var q=this.yieldPos,ie=this.awaitPos,se=this.awaitIdentPos;return this.enterScope(functionFlags(D,!1)|SCOPE_ARROW),this.initFunction(g),this.options.ecmaVersion>=8&&(g.async=!!D),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,g.params=this.toAssignableList(v,!0),this.parseFunctionBody(g,!0,!1,R),this.yieldPos=q,this.awaitPos=ie,this.awaitIdentPos=se,this.finishNode(g,"ArrowFunctionExpression")},pp$5.parseFunctionBody=function(g,v,D,R){var q=v&&this.type!==types$1$1.braceL,ie=this.strict,se=!1;if(q)g.body=this.parseMaybeAssign(R),g.expression=!0,this.checkParams(g,!1);else{var ce=this.options.ecmaVersion>=7&&!this.isSimpleParamList(g.params);ie&&!ce||(se=this.strictDirective(this.end))&&ce&&this.raiseRecoverable(g.start,"Illegal 'use strict' directive in function with non-simple parameter list");var le=this.labels;this.labels=[],se&&(this.strict=!0),this.checkParams(g,!ie&&!se&&!v&&!D&&this.isSimpleParamList(g.params)),this.strict&&g.id&&this.checkLValSimple(g.id,BIND_OUTSIDE),g.body=this.parseBlock(!1,void 0,se&&!ie),g.expression=!1,this.adaptDirectivePrologue(g.body.body),this.labels=le}this.exitScope()},pp$5.isSimpleParamList=function(g){for(var v=0,D=g;v<D.length;v+=1){if("Identifier"!==D[v].type)return!1}return!0},pp$5.checkParams=function(g,v){for(var D=Object.create(null),R=0,q=g.params;R<q.length;R+=1){var ie=q[R];this.checkLValInnerPattern(ie,BIND_VAR,v?null:D)}},pp$5.parseExprList=function(g,v,D,R){for(var q=[],ie=!0;!this.eat(g);){if(ie)ie=!1;else if(this.expect(types$1$1.comma),v&&this.afterTrailingComma(g))break;var se=void 0;D&&this.type===types$1$1.comma?se=null:this.type===types$1$1.ellipsis?(se=this.parseSpread(R),R&&this.type===types$1$1.comma&&R.trailingComma<0&&(R.trailingComma=this.start)):se=this.parseMaybeAssign(!1,R),q.push(se)}return q},pp$5.checkUnreserved=function(g){var v=g.start,D=g.end,R=g.name;(this.inGenerator&&"yield"===R&&this.raiseRecoverable(v,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&"await"===R&&this.raiseRecoverable(v,"Cannot use 'await' as identifier inside an async function"),this.currentThisScope().flags&SCOPE_VAR||"arguments"!==R||this.raiseRecoverable(v,"Cannot use 'arguments' in class field initializer"),!this.inClassStaticBlock||"arguments"!==R&&"await"!==R||this.raise(v,"Cannot use "+R+" in class static initialization block"),this.keywords.test(R)&&this.raise(v,"Unexpected keyword '"+R+"'"),this.options.ecmaVersion<6&&-1!==this.input.slice(v,D).indexOf("\\"))||(this.strict?this.reservedWordsStrict:this.reservedWords).test(R)&&(this.inAsync||"await"!==R||this.raiseRecoverable(v,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(v,"The keyword '"+R+"' is reserved"))},pp$5.parseIdent=function(g){var v=this.parseIdentNode();return this.next(!!g),this.finishNode(v,"Identifier"),g||(this.checkUnreserved(v),"await"!==v.name||this.awaitIdentPos||(this.awaitIdentPos=v.start)),v},pp$5.parseIdentNode=function(){var g=this.startNode();return this.type===types$1$1.name?g.name=this.value:this.type.keyword?(g.name=this.type.keyword,"class"!==g.name&&"function"!==g.name||this.lastTokEnd===this.lastTokStart+1&&46===this.input.charCodeAt(this.lastTokStart)||this.context.pop(),this.type=types$1$1.name):this.unexpected(),g},pp$5.parsePrivateIdent=function(){var g=this.startNode();return this.type===types$1$1.privateId?g.name=this.value:this.unexpected(),this.next(),this.finishNode(g,"PrivateIdentifier"),this.options.checkPrivateFields&&(0===this.privateNameStack.length?this.raise(g.start,"Private field '#"+g.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(g)),g},pp$5.parseYield=function(g){this.yieldPos||(this.yieldPos=this.start);var v=this.startNode();return this.next(),this.type===types$1$1.semi||this.canInsertSemicolon()||this.type!==types$1$1.star&&!this.type.startsExpr?(v.delegate=!1,v.argument=null):(v.delegate=this.eat(types$1$1.star),v.argument=this.parseMaybeAssign(g)),this.finishNode(v,"YieldExpression")},pp$5.parseAwait=function(g){this.awaitPos||(this.awaitPos=this.start);var v=this.startNode();return this.next(),v.argument=this.parseMaybeUnary(null,!0,!1,g),this.finishNode(v,"AwaitExpression")};var pp$4=Parser.prototype;pp$4.raise=function(g,v){var D=getLineInfo(this.input,g);v+=" ("+D.line+":"+D.column+")",this.sourceFile&&(v+=" in "+this.sourceFile);var R=new SyntaxError(v);throw R.pos=g,R.loc=D,R.raisedAt=this.pos,R},pp$4.raiseRecoverable=pp$4.raise,pp$4.curPosition=function(){if(this.options.locations)return new Position(this.curLine,this.pos-this.lineStart)};var pp$3=Parser.prototype,Scope=function Scope(g){this.flags=g,this.var=[],this.lexical=[],this.functions=[]};pp$3.enterScope=function(g){this.scopeStack.push(new Scope(g))},pp$3.exitScope=function(){this.scopeStack.pop()},pp$3.treatFunctionsAsVarInScope=function(g){return g.flags&SCOPE_FUNCTION||!this.inModule&&g.flags&SCOPE_TOP},pp$3.declareName=function(g,v,D){var R=!1;if(v===BIND_LEXICAL){var q=this.currentScope();R=q.lexical.indexOf(g)>-1||q.functions.indexOf(g)>-1||q.var.indexOf(g)>-1,q.lexical.push(g),this.inModule&&q.flags&SCOPE_TOP&&delete this.undefinedExports[g]}else if(v===BIND_SIMPLE_CATCH){this.currentScope().lexical.push(g)}else if(v===BIND_FUNCTION){var ie=this.currentScope();R=this.treatFunctionsAsVar?ie.lexical.indexOf(g)>-1:ie.lexical.indexOf(g)>-1||ie.var.indexOf(g)>-1,ie.functions.push(g)}else for(var se=this.scopeStack.length-1;se>=0;--se){var ce=this.scopeStack[se];if(ce.lexical.indexOf(g)>-1&&!(ce.flags&SCOPE_SIMPLE_CATCH&&ce.lexical[0]===g)||!this.treatFunctionsAsVarInScope(ce)&&ce.functions.indexOf(g)>-1){R=!0;break}if(ce.var.push(g),this.inModule&&ce.flags&SCOPE_TOP&&delete this.undefinedExports[g],ce.flags&SCOPE_VAR)break}R&&this.raiseRecoverable(D,"Identifier '"+g+"' has already been declared")},pp$3.checkLocalExport=function(g){-1===this.scopeStack[0].lexical.indexOf(g.name)&&-1===this.scopeStack[0].var.indexOf(g.name)&&(this.undefinedExports[g.name]=g)},pp$3.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},pp$3.currentVarScope=function(){for(var g=this.scopeStack.length-1;;g--){var v=this.scopeStack[g];if(v.flags&(SCOPE_VAR|SCOPE_CLASS_FIELD_INIT|SCOPE_CLASS_STATIC_BLOCK))return v}},pp$3.currentThisScope=function(){for(var g=this.scopeStack.length-1;;g--){var v=this.scopeStack[g];if(v.flags&(SCOPE_VAR|SCOPE_CLASS_FIELD_INIT|SCOPE_CLASS_STATIC_BLOCK)&&!(v.flags&SCOPE_ARROW))return v}};var Node$1=function Node(g,v,D){this.type="",this.start=v,this.end=0,g.options.locations&&(this.loc=new SourceLocation(g,D)),g.options.directSourceFile&&(this.sourceFile=g.options.directSourceFile),g.options.ranges&&(this.range=[v,0])},pp$2=Parser.prototype;function finishNodeAt(g,v,D,R){return g.type=v,g.end=D,this.options.locations&&(g.loc.end=R),this.options.ranges&&(g.range[1]=D),g}pp$2.startNode=function(){return new Node$1(this,this.start,this.startLoc)},pp$2.startNodeAt=function(g,v){return new Node$1(this,g,v)},pp$2.finishNode=function(g,v){return finishNodeAt.call(this,g,v,this.lastTokEnd,this.lastTokEndLoc)},pp$2.finishNodeAt=function(g,v,D,R){return finishNodeAt.call(this,g,v,D,R)},pp$2.copyNode=function(g){var v=new Node$1(this,g.start,this.startLoc);for(var D in g)v[D]=g[D];return v};var scriptValuesAddedInUnicode="Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz",ecma9BinaryProperties="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",ecma10BinaryProperties=ecma9BinaryProperties+" Extended_Pictographic",ecma11BinaryProperties=ecma10BinaryProperties,ecma12BinaryProperties=ecma11BinaryProperties+" EBase EComp EMod EPres ExtPict",ecma13BinaryProperties=ecma12BinaryProperties,ecma14BinaryProperties=ecma13BinaryProperties,unicodeBinaryProperties={9:ecma9BinaryProperties,10:ecma10BinaryProperties,11:ecma11BinaryProperties,12:ecma12BinaryProperties,13:ecma13BinaryProperties,14:ecma14BinaryProperties},ecma14BinaryPropertiesOfStrings="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",unicodeBinaryPropertiesOfStrings={9:"",10:"",11:"",12:"",13:"",14:ecma14BinaryPropertiesOfStrings},unicodeGeneralCategoryValues="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",ecma9ScriptValues="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",ecma10ScriptValues=ecma9ScriptValues+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",ecma11ScriptValues=ecma10ScriptValues+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",ecma12ScriptValues=ecma11ScriptValues+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",ecma13ScriptValues=ecma12ScriptValues+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",ecma14ScriptValues=ecma13ScriptValues+" "+scriptValuesAddedInUnicode,unicodeScriptValues={9:ecma9ScriptValues,10:ecma10ScriptValues,11:ecma11ScriptValues,12:ecma12ScriptValues,13:ecma13ScriptValues,14:ecma14ScriptValues},data={};function buildUnicodeData(g){var v=data[g]={binary:wordsRegexp(unicodeBinaryProperties[g]+" "+unicodeGeneralCategoryValues),binaryOfStrings:wordsRegexp(unicodeBinaryPropertiesOfStrings[g]),nonBinary:{General_Category:wordsRegexp(unicodeGeneralCategoryValues),Script:wordsRegexp(unicodeScriptValues[g])}};v.nonBinary.Script_Extensions=v.nonBinary.Script,v.nonBinary.gc=v.nonBinary.General_Category,v.nonBinary.sc=v.nonBinary.Script,v.nonBinary.scx=v.nonBinary.Script_Extensions}for(var i=0,list=[9,10,11,12,13,14];i<list.length;i+=1){var ecmaVersion=list[i];buildUnicodeData(ecmaVersion)}var pp$1=Parser.prototype,BranchID=function BranchID(g,v){this.parent=g,this.base=v||this};BranchID.prototype.separatedFrom=function separatedFrom(g){for(var v=this;v;v=v.parent)for(var D=g;D;D=D.parent)if(v.base===D.base&&v!==D)return!0;return!1},BranchID.prototype.sibling=function sibling(){return new BranchID(this.parent,this.base)};var RegExpValidationState=function RegExpValidationState(g){this.parser=g,this.validFlags="gim"+(g.options.ecmaVersion>=6?"uy":"")+(g.options.ecmaVersion>=9?"s":"")+(g.options.ecmaVersion>=13?"d":"")+(g.options.ecmaVersion>=15?"v":""),this.unicodeProperties=data[g.options.ecmaVersion>=14?14:g.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};function hasProp(g){for(var v in g)return!0;return!1}function isRegularExpressionModifier(g){return 105===g||109===g||115===g}function isSyntaxCharacter(g){return 36===g||g>=40&&g<=43||46===g||63===g||g>=91&&g<=94||g>=123&&g<=125}function isRegExpIdentifierStart(g){return isIdentifierStart(g,!0)||36===g||95===g}function isRegExpIdentifierPart(g){return isIdentifierChar(g,!0)||36===g||95===g||8204===g||8205===g}function isControlLetter(g){return g>=65&&g<=90||g>=97&&g<=122}function isValidUnicode(g){return g>=0&&g<=1114111}RegExpValidationState.prototype.reset=function reset(g,v,D){var R=-1!==D.indexOf("v"),q=-1!==D.indexOf("u");this.start=0|g,this.source=v+"",this.flags=D,R&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=q&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=q&&this.parser.options.ecmaVersion>=9)},RegExpValidationState.prototype.raise=function raise(g){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+g)},RegExpValidationState.prototype.at=function at(g,v){void 0===v&&(v=!1);var D=this.source,R=D.length;if(g>=R)return-1;var q=D.charCodeAt(g);if(!v&&!this.switchU||q<=55295||q>=57344||g+1>=R)return q;var ie=D.charCodeAt(g+1);return ie>=56320&&ie<=57343?(q<<10)+ie-56613888:q},RegExpValidationState.prototype.nextIndex=function nextIndex(g,v){void 0===v&&(v=!1);var D=this.source,R=D.length;if(g>=R)return R;var q,ie=D.charCodeAt(g);return!v&&!this.switchU||ie<=55295||ie>=57344||g+1>=R||(q=D.charCodeAt(g+1))<56320||q>57343?g+1:g+2},RegExpValidationState.prototype.current=function current(g){return void 0===g&&(g=!1),this.at(this.pos,g)},RegExpValidationState.prototype.lookahead=function lookahead(g){return void 0===g&&(g=!1),this.at(this.nextIndex(this.pos,g),g)},RegExpValidationState.prototype.advance=function advance(g){void 0===g&&(g=!1),this.pos=this.nextIndex(this.pos,g)},RegExpValidationState.prototype.eat=function eat(g,v){return void 0===v&&(v=!1),this.current(v)===g&&(this.advance(v),!0)},RegExpValidationState.prototype.eatChars=function eatChars(g,v){void 0===v&&(v=!1);for(var D=this.pos,R=0,q=g;R<q.length;R+=1){var ie=q[R],se=this.at(D,v);if(-1===se||se!==ie)return!1;D=this.nextIndex(D,v)}return this.pos=D,!0},pp$1.validateRegExpFlags=function(g){for(var v=g.validFlags,D=g.flags,R=!1,q=!1,ie=0;ie<D.length;ie++){var se=D.charAt(ie);-1===v.indexOf(se)&&this.raise(g.start,"Invalid regular expression flag"),D.indexOf(se,ie+1)>-1&&this.raise(g.start,"Duplicate regular expression flag"),"u"===se&&(R=!0),"v"===se&&(q=!0)}this.options.ecmaVersion>=15&&R&&q&&this.raise(g.start,"Invalid regular expression flag")},pp$1.validateRegExpPattern=function(g){this.regexp_pattern(g),!g.switchN&&this.options.ecmaVersion>=9&&hasProp(g.groupNames)&&(g.switchN=!0,this.regexp_pattern(g))},pp$1.regexp_pattern=function(g){g.pos=0,g.lastIntValue=0,g.lastStringValue="",g.lastAssertionIsQuantifiable=!1,g.numCapturingParens=0,g.maxBackReference=0,g.groupNames=Object.create(null),g.backReferenceNames.length=0,g.branchID=null,this.regexp_disjunction(g),g.pos!==g.source.length&&(g.eat(41)&&g.raise("Unmatched ')'"),(g.eat(93)||g.eat(125))&&g.raise("Lone quantifier brackets")),g.maxBackReference>g.numCapturingParens&&g.raise("Invalid escape");for(var v=0,D=g.backReferenceNames;v<D.length;v+=1){var R=D[v];g.groupNames[R]||g.raise("Invalid named capture referenced")}},pp$1.regexp_disjunction=function(g){var v=this.options.ecmaVersion>=16;for(v&&(g.branchID=new BranchID(g.branchID,null)),this.regexp_alternative(g);g.eat(124);)v&&(g.branchID=g.branchID.sibling()),this.regexp_alternative(g);v&&(g.branchID=g.branchID.parent),this.regexp_eatQuantifier(g,!0)&&g.raise("Nothing to repeat"),g.eat(123)&&g.raise("Lone quantifier brackets")},pp$1.regexp_alternative=function(g){for(;g.pos<g.source.length&&this.regexp_eatTerm(g););},pp$1.regexp_eatTerm=function(g){return this.regexp_eatAssertion(g)?(g.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(g)&&g.switchU&&g.raise("Invalid quantifier"),!0):!!(g.switchU?this.regexp_eatAtom(g):this.regexp_eatExtendedAtom(g))&&(this.regexp_eatQuantifier(g),!0)},pp$1.regexp_eatAssertion=function(g){var v=g.pos;if(g.lastAssertionIsQuantifiable=!1,g.eat(94)||g.eat(36))return!0;if(g.eat(92)){if(g.eat(66)||g.eat(98))return!0;g.pos=v}if(g.eat(40)&&g.eat(63)){var D=!1;if(this.options.ecmaVersion>=9&&(D=g.eat(60)),g.eat(61)||g.eat(33))return this.regexp_disjunction(g),g.eat(41)||g.raise("Unterminated group"),g.lastAssertionIsQuantifiable=!D,!0}return g.pos=v,!1},pp$1.regexp_eatQuantifier=function(g,v){return void 0===v&&(v=!1),!!this.regexp_eatQuantifierPrefix(g,v)&&(g.eat(63),!0)},pp$1.regexp_eatQuantifierPrefix=function(g,v){return g.eat(42)||g.eat(43)||g.eat(63)||this.regexp_eatBracedQuantifier(g,v)},pp$1.regexp_eatBracedQuantifier=function(g,v){var D=g.pos;if(g.eat(123)){var R=0,q=-1;if(this.regexp_eatDecimalDigits(g)&&(R=g.lastIntValue,g.eat(44)&&this.regexp_eatDecimalDigits(g)&&(q=g.lastIntValue),g.eat(125)))return-1!==q&&q<R&&!v&&g.raise("numbers out of order in {} quantifier"),!0;g.switchU&&!v&&g.raise("Incomplete quantifier"),g.pos=D}return!1},pp$1.regexp_eatAtom=function(g){return this.regexp_eatPatternCharacters(g)||g.eat(46)||this.regexp_eatReverseSolidusAtomEscape(g)||this.regexp_eatCharacterClass(g)||this.regexp_eatUncapturingGroup(g)||this.regexp_eatCapturingGroup(g)},pp$1.regexp_eatReverseSolidusAtomEscape=function(g){var v=g.pos;if(g.eat(92)){if(this.regexp_eatAtomEscape(g))return!0;g.pos=v}return!1},pp$1.regexp_eatUncapturingGroup=function(g){var v=g.pos;if(g.eat(40)){if(g.eat(63)){if(this.options.ecmaVersion>=16){var D=this.regexp_eatModifiers(g),R=g.eat(45);if(D||R){for(var q=0;q<D.length;q++){var ie=D.charAt(q);D.indexOf(ie,q+1)>-1&&g.raise("Duplicate regular expression modifiers")}if(R){var se=this.regexp_eatModifiers(g);D||se||58!==g.current()||g.raise("Invalid regular expression modifiers");for(var ce=0;ce<se.length;ce++){var le=se.charAt(ce);(se.indexOf(le,ce+1)>-1||D.indexOf(le)>-1)&&g.raise("Duplicate regular expression modifiers")}}}}if(g.eat(58)){if(this.regexp_disjunction(g),g.eat(41))return!0;g.raise("Unterminated group")}}g.pos=v}return!1},pp$1.regexp_eatCapturingGroup=function(g){if(g.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(g):63===g.current()&&g.raise("Invalid group"),this.regexp_disjunction(g),g.eat(41))return g.numCapturingParens+=1,!0;g.raise("Unterminated group")}return!1},pp$1.regexp_eatModifiers=function(g){for(var v="",D=0;-1!==(D=g.current())&&isRegularExpressionModifier(D);)v+=codePointToString(D),g.advance();return v},pp$1.regexp_eatExtendedAtom=function(g){return g.eat(46)||this.regexp_eatReverseSolidusAtomEscape(g)||this.regexp_eatCharacterClass(g)||this.regexp_eatUncapturingGroup(g)||this.regexp_eatCapturingGroup(g)||this.regexp_eatInvalidBracedQuantifier(g)||this.regexp_eatExtendedPatternCharacter(g)},pp$1.regexp_eatInvalidBracedQuantifier=function(g){return this.regexp_eatBracedQuantifier(g,!0)&&g.raise("Nothing to repeat"),!1},pp$1.regexp_eatSyntaxCharacter=function(g){var v=g.current();return!!isSyntaxCharacter(v)&&(g.lastIntValue=v,g.advance(),!0)},pp$1.regexp_eatPatternCharacters=function(g){for(var v=g.pos,D=0;-1!==(D=g.current())&&!isSyntaxCharacter(D);)g.advance();return g.pos!==v},pp$1.regexp_eatExtendedPatternCharacter=function(g){var v=g.current();return!(-1===v||36===v||v>=40&&v<=43||46===v||63===v||91===v||94===v||124===v)&&(g.advance(),!0)},pp$1.regexp_groupSpecifier=function(g){if(g.eat(63)){this.regexp_eatGroupName(g)||g.raise("Invalid group");var v=this.options.ecmaVersion>=16,D=g.groupNames[g.lastStringValue];if(D)if(v)for(var R=0,q=D;R<q.length;R+=1){q[R].separatedFrom(g.branchID)||g.raise("Duplicate capture group name")}else g.raise("Duplicate capture group name");v?(D||(g.groupNames[g.lastStringValue]=[])).push(g.branchID):g.groupNames[g.lastStringValue]=!0}},pp$1.regexp_eatGroupName=function(g){if(g.lastStringValue="",g.eat(60)){if(this.regexp_eatRegExpIdentifierName(g)&&g.eat(62))return!0;g.raise("Invalid capture group name")}return!1},pp$1.regexp_eatRegExpIdentifierName=function(g){if(g.lastStringValue="",this.regexp_eatRegExpIdentifierStart(g)){for(g.lastStringValue+=codePointToString(g.lastIntValue);this.regexp_eatRegExpIdentifierPart(g);)g.lastStringValue+=codePointToString(g.lastIntValue);return!0}return!1},pp$1.regexp_eatRegExpIdentifierStart=function(g){var v=g.pos,D=this.options.ecmaVersion>=11,R=g.current(D);return g.advance(D),92===R&&this.regexp_eatRegExpUnicodeEscapeSequence(g,D)&&(R=g.lastIntValue),isRegExpIdentifierStart(R)?(g.lastIntValue=R,!0):(g.pos=v,!1)},pp$1.regexp_eatRegExpIdentifierPart=function(g){var v=g.pos,D=this.options.ecmaVersion>=11,R=g.current(D);return g.advance(D),92===R&&this.regexp_eatRegExpUnicodeEscapeSequence(g,D)&&(R=g.lastIntValue),isRegExpIdentifierPart(R)?(g.lastIntValue=R,!0):(g.pos=v,!1)},pp$1.regexp_eatAtomEscape=function(g){return!!(this.regexp_eatBackReference(g)||this.regexp_eatCharacterClassEscape(g)||this.regexp_eatCharacterEscape(g)||g.switchN&&this.regexp_eatKGroupName(g))||(g.switchU&&(99===g.current()&&g.raise("Invalid unicode escape"),g.raise("Invalid escape")),!1)},pp$1.regexp_eatBackReference=function(g){var v=g.pos;if(this.regexp_eatDecimalEscape(g)){var D=g.lastIntValue;if(g.switchU)return D>g.maxBackReference&&(g.maxBackReference=D),!0;if(D<=g.numCapturingParens)return!0;g.pos=v}return!1},pp$1.regexp_eatKGroupName=function(g){if(g.eat(107)){if(this.regexp_eatGroupName(g))return g.backReferenceNames.push(g.lastStringValue),!0;g.raise("Invalid named reference")}return!1},pp$1.regexp_eatCharacterEscape=function(g){return this.regexp_eatControlEscape(g)||this.regexp_eatCControlLetter(g)||this.regexp_eatZero(g)||this.regexp_eatHexEscapeSequence(g)||this.regexp_eatRegExpUnicodeEscapeSequence(g,!1)||!g.switchU&&this.regexp_eatLegacyOctalEscapeSequence(g)||this.regexp_eatIdentityEscape(g)},pp$1.regexp_eatCControlLetter=function(g){var v=g.pos;if(g.eat(99)){if(this.regexp_eatControlLetter(g))return!0;g.pos=v}return!1},pp$1.regexp_eatZero=function(g){return 48===g.current()&&!isDecimalDigit(g.lookahead())&&(g.lastIntValue=0,g.advance(),!0)},pp$1.regexp_eatControlEscape=function(g){var v=g.current();return 116===v?(g.lastIntValue=9,g.advance(),!0):110===v?(g.lastIntValue=10,g.advance(),!0):118===v?(g.lastIntValue=11,g.advance(),!0):102===v?(g.lastIntValue=12,g.advance(),!0):114===v&&(g.lastIntValue=13,g.advance(),!0)},pp$1.regexp_eatControlLetter=function(g){var v=g.current();return!!isControlLetter(v)&&(g.lastIntValue=v%32,g.advance(),!0)},pp$1.regexp_eatRegExpUnicodeEscapeSequence=function(g,v){void 0===v&&(v=!1);var D=g.pos,R=v||g.switchU;if(g.eat(117)){if(this.regexp_eatFixedHexDigits(g,4)){var q=g.lastIntValue;if(R&&q>=55296&&q<=56319){var ie=g.pos;if(g.eat(92)&&g.eat(117)&&this.regexp_eatFixedHexDigits(g,4)){var se=g.lastIntValue;if(se>=56320&&se<=57343)return g.lastIntValue=1024*(q-55296)+(se-56320)+65536,!0}g.pos=ie,g.lastIntValue=q}return!0}if(R&&g.eat(123)&&this.regexp_eatHexDigits(g)&&g.eat(125)&&isValidUnicode(g.lastIntValue))return!0;R&&g.raise("Invalid unicode escape"),g.pos=D}return!1},pp$1.regexp_eatIdentityEscape=function(g){if(g.switchU)return!!this.regexp_eatSyntaxCharacter(g)||!!g.eat(47)&&(g.lastIntValue=47,!0);var v=g.current();return!(99===v||g.switchN&&107===v)&&(g.lastIntValue=v,g.advance(),!0)},pp$1.regexp_eatDecimalEscape=function(g){g.lastIntValue=0;var v=g.current();if(v>=49&&v<=57){do{g.lastIntValue=10*g.lastIntValue+(v-48),g.advance()}while((v=g.current())>=48&&v<=57);return!0}return!1};var CharSetNone=0,CharSetOk=1,CharSetString=2;function isCharacterClassEscape(g){return 100===g||68===g||115===g||83===g||119===g||87===g}function isUnicodePropertyNameCharacter(g){return isControlLetter(g)||95===g}function isUnicodePropertyValueCharacter(g){return isUnicodePropertyNameCharacter(g)||isDecimalDigit(g)}function isClassSetReservedDoublePunctuatorCharacter(g){return 33===g||g>=35&&g<=38||g>=42&&g<=44||46===g||g>=58&&g<=64||94===g||96===g||126===g}function isClassSetSyntaxCharacter(g){return 40===g||41===g||45===g||47===g||g>=91&&g<=93||g>=123&&g<=125}function isClassSetReservedPunctuator(g){return 33===g||35===g||37===g||38===g||44===g||45===g||g>=58&&g<=62||64===g||96===g||126===g}function isDecimalDigit(g){return g>=48&&g<=57}function isHexDigit(g){return g>=48&&g<=57||g>=65&&g<=70||g>=97&&g<=102}function hexToInt(g){return g>=65&&g<=70?g-65+10:g>=97&&g<=102?g-97+10:g-48}function isOctalDigit(g){return g>=48&&g<=55}pp$1.regexp_eatCharacterClassEscape=function(g){var v=g.current();if(isCharacterClassEscape(v))return g.lastIntValue=-1,g.advance(),CharSetOk;var D=!1;if(g.switchU&&this.options.ecmaVersion>=9&&((D=80===v)||112===v)){var R;if(g.lastIntValue=-1,g.advance(),g.eat(123)&&(R=this.regexp_eatUnicodePropertyValueExpression(g))&&g.eat(125))return D&&R===CharSetString&&g.raise("Invalid property name"),R;g.raise("Invalid property name")}return CharSetNone},pp$1.regexp_eatUnicodePropertyValueExpression=function(g){var v=g.pos;if(this.regexp_eatUnicodePropertyName(g)&&g.eat(61)){var D=g.lastStringValue;if(this.regexp_eatUnicodePropertyValue(g)){var R=g.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(g,D,R),CharSetOk}}if(g.pos=v,this.regexp_eatLoneUnicodePropertyNameOrValue(g)){var q=g.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(g,q)}return CharSetNone},pp$1.regexp_validateUnicodePropertyNameAndValue=function(g,v,D){hasOwn(g.unicodeProperties.nonBinary,v)||g.raise("Invalid property name"),g.unicodeProperties.nonBinary[v].test(D)||g.raise("Invalid property value")},pp$1.regexp_validateUnicodePropertyNameOrValue=function(g,v){return g.unicodeProperties.binary.test(v)?CharSetOk:g.switchV&&g.unicodeProperties.binaryOfStrings.test(v)?CharSetString:void g.raise("Invalid property name")},pp$1.regexp_eatUnicodePropertyName=function(g){var v=0;for(g.lastStringValue="";isUnicodePropertyNameCharacter(v=g.current());)g.lastStringValue+=codePointToString(v),g.advance();return""!==g.lastStringValue},pp$1.regexp_eatUnicodePropertyValue=function(g){var v=0;for(g.lastStringValue="";isUnicodePropertyValueCharacter(v=g.current());)g.lastStringValue+=codePointToString(v),g.advance();return""!==g.lastStringValue},pp$1.regexp_eatLoneUnicodePropertyNameOrValue=function(g){return this.regexp_eatUnicodePropertyValue(g)},pp$1.regexp_eatCharacterClass=function(g){if(g.eat(91)){var v=g.eat(94),D=this.regexp_classContents(g);return g.eat(93)||g.raise("Unterminated character class"),v&&D===CharSetString&&g.raise("Negated character class may contain strings"),!0}return!1},pp$1.regexp_classContents=function(g){return 93===g.current()?CharSetOk:g.switchV?this.regexp_classSetExpression(g):(this.regexp_nonEmptyClassRanges(g),CharSetOk)},pp$1.regexp_nonEmptyClassRanges=function(g){for(;this.regexp_eatClassAtom(g);){var v=g.lastIntValue;if(g.eat(45)&&this.regexp_eatClassAtom(g)){var D=g.lastIntValue;!g.switchU||-1!==v&&-1!==D||g.raise("Invalid character class"),-1!==v&&-1!==D&&v>D&&g.raise("Range out of order in character class")}}},pp$1.regexp_eatClassAtom=function(g){var v=g.pos;if(g.eat(92)){if(this.regexp_eatClassEscape(g))return!0;if(g.switchU){var D=g.current();(99===D||isOctalDigit(D))&&g.raise("Invalid class escape"),g.raise("Invalid escape")}g.pos=v}var R=g.current();return 93!==R&&(g.lastIntValue=R,g.advance(),!0)},pp$1.regexp_eatClassEscape=function(g){var v=g.pos;if(g.eat(98))return g.lastIntValue=8,!0;if(g.switchU&&g.eat(45))return g.lastIntValue=45,!0;if(!g.switchU&&g.eat(99)){if(this.regexp_eatClassControlLetter(g))return!0;g.pos=v}return this.regexp_eatCharacterClassEscape(g)||this.regexp_eatCharacterEscape(g)},pp$1.regexp_classSetExpression=function(g){var v,D=CharSetOk;if(this.regexp_eatClassSetRange(g));else if(v=this.regexp_eatClassSetOperand(g)){v===CharSetString&&(D=CharSetString);for(var R=g.pos;g.eatChars([38,38]);)38!==g.current()&&(v=this.regexp_eatClassSetOperand(g))?v!==CharSetString&&(D=CharSetOk):g.raise("Invalid character in character class");if(R!==g.pos)return D;for(;g.eatChars([45,45]);)this.regexp_eatClassSetOperand(g)||g.raise("Invalid character in character class");if(R!==g.pos)return D}else g.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(g)){if(!(v=this.regexp_eatClassSetOperand(g)))return D;v===CharSetString&&(D=CharSetString)}},pp$1.regexp_eatClassSetRange=function(g){var v=g.pos;if(this.regexp_eatClassSetCharacter(g)){var D=g.lastIntValue;if(g.eat(45)&&this.regexp_eatClassSetCharacter(g)){var R=g.lastIntValue;return-1!==D&&-1!==R&&D>R&&g.raise("Range out of order in character class"),!0}g.pos=v}return!1},pp$1.regexp_eatClassSetOperand=function(g){return this.regexp_eatClassSetCharacter(g)?CharSetOk:this.regexp_eatClassStringDisjunction(g)||this.regexp_eatNestedClass(g)},pp$1.regexp_eatNestedClass=function(g){var v=g.pos;if(g.eat(91)){var D=g.eat(94),R=this.regexp_classContents(g);if(g.eat(93))return D&&R===CharSetString&&g.raise("Negated character class may contain strings"),R;g.pos=v}if(g.eat(92)){var q=this.regexp_eatCharacterClassEscape(g);if(q)return q;g.pos=v}return null},pp$1.regexp_eatClassStringDisjunction=function(g){var v=g.pos;if(g.eatChars([92,113])){if(g.eat(123)){var D=this.regexp_classStringDisjunctionContents(g);if(g.eat(125))return D}else g.raise("Invalid escape");g.pos=v}return null},pp$1.regexp_classStringDisjunctionContents=function(g){for(var v=this.regexp_classString(g);g.eat(124);)this.regexp_classString(g)===CharSetString&&(v=CharSetString);return v},pp$1.regexp_classString=function(g){for(var v=0;this.regexp_eatClassSetCharacter(g);)v++;return 1===v?CharSetOk:CharSetString},pp$1.regexp_eatClassSetCharacter=function(g){var v=g.pos;if(g.eat(92))return!(!this.regexp_eatCharacterEscape(g)&&!this.regexp_eatClassSetReservedPunctuator(g))||(g.eat(98)?(g.lastIntValue=8,!0):(g.pos=v,!1));var D=g.current();return!(D<0||D===g.lookahead()&&isClassSetReservedDoublePunctuatorCharacter(D))&&(!isClassSetSyntaxCharacter(D)&&(g.advance(),g.lastIntValue=D,!0))},pp$1.regexp_eatClassSetReservedPunctuator=function(g){var v=g.current();return!!isClassSetReservedPunctuator(v)&&(g.lastIntValue=v,g.advance(),!0)},pp$1.regexp_eatClassControlLetter=function(g){var v=g.current();return!(!isDecimalDigit(v)&&95!==v)&&(g.lastIntValue=v%32,g.advance(),!0)},pp$1.regexp_eatHexEscapeSequence=function(g){var v=g.pos;if(g.eat(120)){if(this.regexp_eatFixedHexDigits(g,2))return!0;g.switchU&&g.raise("Invalid escape"),g.pos=v}return!1},pp$1.regexp_eatDecimalDigits=function(g){var v=g.pos,D=0;for(g.lastIntValue=0;isDecimalDigit(D=g.current());)g.lastIntValue=10*g.lastIntValue+(D-48),g.advance();return g.pos!==v},pp$1.regexp_eatHexDigits=function(g){var v=g.pos,D=0;for(g.lastIntValue=0;isHexDigit(D=g.current());)g.lastIntValue=16*g.lastIntValue+hexToInt(D),g.advance();return g.pos!==v},pp$1.regexp_eatLegacyOctalEscapeSequence=function(g){if(this.regexp_eatOctalDigit(g)){var v=g.lastIntValue;if(this.regexp_eatOctalDigit(g)){var D=g.lastIntValue;v<=3&&this.regexp_eatOctalDigit(g)?g.lastIntValue=64*v+8*D+g.lastIntValue:g.lastIntValue=8*v+D}else g.lastIntValue=v;return!0}return!1},pp$1.regexp_eatOctalDigit=function(g){var v=g.current();return isOctalDigit(v)?(g.lastIntValue=v-48,g.advance(),!0):(g.lastIntValue=0,!1)},pp$1.regexp_eatFixedHexDigits=function(g,v){var D=g.pos;g.lastIntValue=0;for(var R=0;R<v;++R){var q=g.current();if(!isHexDigit(q))return g.pos=D,!1;g.lastIntValue=16*g.lastIntValue+hexToInt(q),g.advance()}return!0};var Token=function Token(g){this.type=g.type,this.value=g.value,this.start=g.start,this.end=g.end,g.options.locations&&(this.loc=new SourceLocation(g,g.startLoc,g.endLoc)),g.options.ranges&&(this.range=[g.start,g.end])},pp=Parser.prototype;function stringToNumber(g,v){return v?parseInt(g,8):parseFloat(g.replace(/_/g,""))}function stringToBigInt(g){return"function"!=typeof BigInt?null:BigInt(g.replace(/_/g,""))}pp.next=function(g){!g&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new Token(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},pp.getToken=function(){return this.next(),new Token(this)},"undefined"!=typeof Symbol&&(pp[Symbol.iterator]=function(){var g=this;return{next:function(){var v=g.getToken();return{done:v.type===types$1$1.eof,value:v}}}}),pp.nextToken=function(){var g=this.curContext();return g&&g.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(types$1$1.eof):g.override?g.override(this):void this.readToken(this.fullCharCodeAtPos())},pp.readToken=function(g){return isIdentifierStart(g,this.options.ecmaVersion>=6)||92===g?this.readWord():this.getTokenFromCode(g)},pp.fullCharCodeAt=function(g){var v=this.input.charCodeAt(g);if(v<=55295||v>=56320)return v;var D=this.input.charCodeAt(g+1);return D<=56319||D>=57344?v:(v<<10)+D-56613888},pp.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)},pp.skipBlockComment=function(){var g=this.options.onComment&&this.curPosition(),v=this.pos,D=this.input.indexOf("*/",this.pos+=2);if(-1===D&&this.raise(this.pos-2,"Unterminated comment"),this.pos=D+2,this.options.locations)for(var R=void 0,q=v;(R=nextLineBreak(this.input,q,this.pos))>-1;)++this.curLine,q=this.lineStart=R;this.options.onComment&&this.options.onComment(!0,this.input.slice(v+2,D),v,this.pos,g,this.curPosition())},pp.skipLineComment=function(g){for(var v=this.pos,D=this.options.onComment&&this.curPosition(),R=this.input.charCodeAt(this.pos+=g);this.pos<this.input.length&&!isNewLine(R);)R=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(v+g,this.pos),v,this.pos,D,this.curPosition())},pp.skipSpace=function(){e:for(;this.pos<this.input.length;){var g=this.input.charCodeAt(this.pos);switch(g){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(!(g>8&&g<14||g>=5760&&nonASCIIwhitespace.test(String.fromCharCode(g))))break e;++this.pos}}},pp.finishToken=function(g,v){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var D=this.type;this.type=g,this.value=v,this.updateContext(D)},pp.readToken_dot=function(){var g=this.input.charCodeAt(this.pos+1);if(g>=48&&g<=57)return this.readNumber(!0);var v=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===g&&46===v?(this.pos+=3,this.finishToken(types$1$1.ellipsis)):(++this.pos,this.finishToken(types$1$1.dot))},pp.readToken_slash=function(){var g=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===g?this.finishOp(types$1$1.assign,2):this.finishOp(types$1$1.slash,1)},pp.readToken_mult_modulo_exp=function(g){var v=this.input.charCodeAt(this.pos+1),D=1,R=42===g?types$1$1.star:types$1$1.modulo;return this.options.ecmaVersion>=7&&42===g&&42===v&&(++D,R=types$1$1.starstar,v=this.input.charCodeAt(this.pos+2)),61===v?this.finishOp(types$1$1.assign,D+1):this.finishOp(R,D)},pp.readToken_pipe_amp=function(g){var v=this.input.charCodeAt(this.pos+1);if(v===g){if(this.options.ecmaVersion>=12)if(61===this.input.charCodeAt(this.pos+2))return this.finishOp(types$1$1.assign,3);return this.finishOp(124===g?types$1$1.logicalOR:types$1$1.logicalAND,2)}return 61===v?this.finishOp(types$1$1.assign,2):this.finishOp(124===g?types$1$1.bitwiseOR:types$1$1.bitwiseAND,1)},pp.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(types$1$1.assign,2):this.finishOp(types$1$1.bitwiseXOR,1)},pp.readToken_plus_min=function(g){var v=this.input.charCodeAt(this.pos+1);return v===g?45!==v||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!lineBreak.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(types$1$1.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===v?this.finishOp(types$1$1.assign,2):this.finishOp(types$1$1.plusMin,1)},pp.readToken_lt_gt=function(g){var v=this.input.charCodeAt(this.pos+1),D=1;return v===g?(D=62===g&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+D)?this.finishOp(types$1$1.assign,D+1):this.finishOp(types$1$1.bitShift,D)):33!==v||60!==g||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===v&&(D=2),this.finishOp(types$1$1.relational,D)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},pp.readToken_eq_excl=function(g){var v=this.input.charCodeAt(this.pos+1);return 61===v?this.finishOp(types$1$1.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===g&&62===v&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(types$1$1.arrow)):this.finishOp(61===g?types$1$1.eq:types$1$1.prefix,1)},pp.readToken_question=function(){var g=this.options.ecmaVersion;if(g>=11){var v=this.input.charCodeAt(this.pos+1);if(46===v){var D=this.input.charCodeAt(this.pos+2);if(D<48||D>57)return this.finishOp(types$1$1.questionDot,2)}if(63===v){if(g>=12)if(61===this.input.charCodeAt(this.pos+2))return this.finishOp(types$1$1.assign,3);return this.finishOp(types$1$1.coalesce,2)}}return this.finishOp(types$1$1.question,1)},pp.readToken_numberSign=function(){var g=35;if(this.options.ecmaVersion>=13&&(++this.pos,isIdentifierStart(g=this.fullCharCodeAtPos(),!0)||92===g))return this.finishToken(types$1$1.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+codePointToString(g)+"'")},pp.getTokenFromCode=function(g){switch(g){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(types$1$1.parenL);case 41:return++this.pos,this.finishToken(types$1$1.parenR);case 59:return++this.pos,this.finishToken(types$1$1.semi);case 44:return++this.pos,this.finishToken(types$1$1.comma);case 91:return++this.pos,this.finishToken(types$1$1.bracketL);case 93:return++this.pos,this.finishToken(types$1$1.bracketR);case 123:return++this.pos,this.finishToken(types$1$1.braceL);case 125:return++this.pos,this.finishToken(types$1$1.braceR);case 58:return++this.pos,this.finishToken(types$1$1.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(types$1$1.backQuote);case 48:var v=this.input.charCodeAt(this.pos+1);if(120===v||88===v)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===v||79===v)return this.readRadixNumber(8);if(98===v||66===v)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(g);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(g);case 124:case 38:return this.readToken_pipe_amp(g);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(g);case 60:case 62:return this.readToken_lt_gt(g);case 61:case 33:return this.readToken_eq_excl(g);case 63:return this.readToken_question();case 126:return this.finishOp(types$1$1.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+codePointToString(g)+"'")},pp.finishOp=function(g,v){var D=this.input.slice(this.pos,this.pos+v);return this.pos+=v,this.finishToken(g,D)},pp.readRegexp=function(){for(var g,v,D=this.pos;;){this.pos>=this.input.length&&this.raise(D,"Unterminated regular expression");var R=this.input.charAt(this.pos);if(lineBreak.test(R)&&this.raise(D,"Unterminated regular expression"),g)g=!1;else{if("["===R)v=!0;else if("]"===R&&v)v=!1;else if("/"===R&&!v)break;g="\\"===R}++this.pos}var q=this.input.slice(D,this.pos);++this.pos;var ie=this.pos,se=this.readWord1();this.containsEsc&&this.unexpected(ie);var ce=this.regexpState||(this.regexpState=new RegExpValidationState(this));ce.reset(D,q,se),this.validateRegExpFlags(ce),this.validateRegExpPattern(ce);var le=null;try{le=new RegExp(q,se)}catch(g){}return this.finishToken(types$1$1.regexp,{pattern:q,flags:se,value:le})},pp.readInt=function(g,v,D){for(var R=this.options.ecmaVersion>=12&&void 0===v,q=D&&48===this.input.charCodeAt(this.pos),ie=this.pos,se=0,ce=0,le=0,me=null==v?1/0:v;le<me;++le,++this.pos){var fe=this.input.charCodeAt(this.pos),ge=void 0;if(R&&95===fe)q&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),95===ce&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),0===le&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),ce=fe;else{if((ge=fe>=97?fe-97+10:fe>=65?fe-65+10:fe>=48&&fe<=57?fe-48:1/0)>=g)break;ce=fe,se=se*g+ge}}return R&&95===ce&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===ie||null!=v&&this.pos-ie!==v?null:se},pp.readRadixNumber=function(g){var v=this.pos;this.pos+=2;var D=this.readInt(g);return null==D&&this.raise(this.start+2,"Expected number in radix "+g),this.options.ecmaVersion>=11&&110===this.input.charCodeAt(this.pos)?(D=stringToBigInt(this.input.slice(v,this.pos)),++this.pos):isIdentifierStart(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(types$1$1.num,D)},pp.readNumber=function(g){var v=this.pos;g||null!==this.readInt(10,void 0,!0)||this.raise(v,"Invalid number");var D=this.pos-v>=2&&48===this.input.charCodeAt(v);D&&this.strict&&this.raise(v,"Invalid number");var R=this.input.charCodeAt(this.pos);if(!D&&!g&&this.options.ecmaVersion>=11&&110===R){var q=stringToBigInt(this.input.slice(v,this.pos));return++this.pos,isIdentifierStart(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(types$1$1.num,q)}D&&/[89]/.test(this.input.slice(v,this.pos))&&(D=!1),46!==R||D||(++this.pos,this.readInt(10),R=this.input.charCodeAt(this.pos)),69!==R&&101!==R||D||(43!==(R=this.input.charCodeAt(++this.pos))&&45!==R||++this.pos,null===this.readInt(10)&&this.raise(v,"Invalid number")),isIdentifierStart(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var ie=stringToNumber(this.input.slice(v,this.pos),D);return this.finishToken(types$1$1.num,ie)},pp.readCodePoint=function(){var g;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var v=++this.pos;g=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,g>1114111&&this.invalidStringToken(v,"Code point out of bounds")}else g=this.readHexChar(4);return g},pp.readString=function(g){for(var v="",D=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var R=this.input.charCodeAt(this.pos);if(R===g)break;92===R?(v+=this.input.slice(D,this.pos),v+=this.readEscapedChar(!1),D=this.pos):8232===R||8233===R?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(isNewLine(R)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return v+=this.input.slice(D,this.pos++),this.finishToken(types$1$1.string,v)};var INVALID_TEMPLATE_ESCAPE_ERROR={};pp.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(g){if(g!==INVALID_TEMPLATE_ESCAPE_ERROR)throw g;this.readInvalidTemplateToken()}this.inTemplateElement=!1},pp.invalidStringToken=function(g,v){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw INVALID_TEMPLATE_ESCAPE_ERROR;this.raise(g,v)},pp.readTmplToken=function(){for(var g="",v=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var D=this.input.charCodeAt(this.pos);if(96===D||36===D&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==types$1$1.template&&this.type!==types$1$1.invalidTemplate?(g+=this.input.slice(v,this.pos),this.finishToken(types$1$1.template,g)):36===D?(this.pos+=2,this.finishToken(types$1$1.dollarBraceL)):(++this.pos,this.finishToken(types$1$1.backQuote));if(92===D)g+=this.input.slice(v,this.pos),g+=this.readEscapedChar(!0),v=this.pos;else if(isNewLine(D)){switch(g+=this.input.slice(v,this.pos),++this.pos,D){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:g+="\n";break;default:g+=String.fromCharCode(D)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),v=this.pos}else++this.pos}},pp.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if("{"!==this.input[this.pos+1])break;case"`":return this.finishToken(types$1$1.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":"\n"===this.input[this.pos+1]&&++this.pos;case"\n":case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1}this.raise(this.start,"Unterminated template")},pp.readEscapedChar=function(g){var v=this.input.charCodeAt(++this.pos);switch(++this.pos,v){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return codePointToString(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),g){var D=this.pos-1;this.invalidStringToken(D,"Invalid escape sequence in template string")}default:if(v>=48&&v<=55){var R=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],q=parseInt(R,8);return q>255&&(R=R.slice(0,-1),q=parseInt(R,8)),this.pos+=R.length-1,v=this.input.charCodeAt(this.pos),"0"===R&&56!==v&&57!==v||!this.strict&&!g||this.invalidStringToken(this.pos-1-R.length,g?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(q)}return isNewLine(v)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(v)}},pp.readHexChar=function(g){var v=this.pos,D=this.readInt(16,g);return null===D&&this.invalidStringToken(v,"Bad character escape sequence"),D},pp.readWord1=function(){this.containsEsc=!1;for(var g="",v=!0,D=this.pos,R=this.options.ecmaVersion>=6;this.pos<this.input.length;){var q=this.fullCharCodeAtPos();if(isIdentifierChar(q,R))this.pos+=q<=65535?1:2;else{if(92!==q)break;this.containsEsc=!0,g+=this.input.slice(D,this.pos);var ie=this.pos;117!==this.input.charCodeAt(++this.pos)&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var se=this.readCodePoint();(v?isIdentifierStart:isIdentifierChar)(se,R)||this.invalidStringToken(ie,"Invalid Unicode escape"),g+=codePointToString(se),D=this.pos}v=!1}return g+this.input.slice(D,this.pos)},pp.readWord=function(){var g=this.readWord1(),v=types$1$1.name;return this.keywords.test(g)&&(v=keywords[g]),this.finishToken(v,g)};var version$1="8.18.0";function parse$2(g,v){return Parser.parse(g,v)}Parser.acorn={Parser:Parser,version:version$1,defaultOptions:defaultOptions,Position:Position,SourceLocation:SourceLocation,getLineInfo:getLineInfo,Node:Node$1,TokenType:TokenType,tokTypes:types$1$1,keywordTypes:keywords,TokContext:TokContext,tokContexts:types$2,isIdentifierChar:isIdentifierChar,isIdentifierStart:isIdentifierStart,Token:Token,isNewLine:isNewLine,lineBreak:lineBreak,lineBreakG:lineBreakG,nonASCIIwhitespace:nonASCIIwhitespace};const types$1={"application/andrew-inset":["ez"],"application/appinstaller":["appinstaller"],"application/applixware":["aw"],"application/appx":["appx"],"application/appxbundle":["appxbundle"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/automationml-aml+xml":["aml"],"application/automationml-amlx+zip":["amlx"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cpl+xml":["cpl"],"application/cu-seeme":["cu"],"application/cwl":["cwl"],"application/dash+xml":["mpd"],"application/dash-patch+xml":["mpp"],"application/davmount+xml":["davmount"],"application/dicom":["dcm"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdf":["fdf"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["*js"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/media-policy-dataset+xml":["mpf"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["*mp4","*mpg4","mp4s","m4p"],"application/msix":["msix"],"application/msixbundle":["msixbundle"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg","one","onea"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-keys":["asc"],"application/pgp-signature":["sig","*asc"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/sql":["sql"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/watcherinfo+xml":["wif"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xfdf":["xfdf"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"application/zip+dotlottie":["lottie"],"audio/3gpp":["*3gpp"],"audio/aac":["adts","aac"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a","m4b"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avci":["avci"],"image/avcs":["avcs"],"image/avif":["avif"],"image/bmp":["bmp","dib"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/dpx":["dpx"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/ief":["ief"],"image/jaii":["jaii"],"image/jais":["jais"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpg","jpeg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm","jpgm"],"image/jpx":["jpx","jpf"],"image/jxl":["jxl"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/pjpeg":["jfif"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime","mht","mhtml"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/jt":["jt"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/prc":["prc"],"model/step":["step","stp","stpnc","p21","210"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/u3d":["u3d"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/javascript":["js","mjs"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["md","markdown"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/wgsl":["wgsl"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","*jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts","m2t","m2ts","mts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]};Object.freeze(types$1);const types={"application/prs.cww":["cww"],"application/prs.xsf+xml":["xsf"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["*xfdf"],"application/vnd.age":["age"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.autodesk.fbx":["fbx"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dcmp+xml":["dcmp"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["*fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.slides":["ggs"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.drawing":["gdraw"],"application/vnd.google-apps.form":["gform"],"application/vnd.google-apps.jam":["gjam"],"application/vnd.google-apps.map":["gmap"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.script":["gscript"],"application/vnd.google-apps.site":["gsite"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.gov.sk.xmldatacontainer+xml":["xdcf"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mapbox-vector-tile":["mvt"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["*mpp","mpt"],"application/vnd.ms-visio.viewer":["vdx"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.nato.bindingdataobject+xml":["bdo"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.procrate.brushset":["brushset"],"application/vnd.procreate.brush":["brush"],"application/vnd.procreate.dream":["drm"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.pwg-xhtml-print+xml":["xhtm"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml","uo"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw","vsdx","vtx"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blender":["blend"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-compressed":["*rar"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-ipynb+json":["ipynb"],"application/x-iso9660-image":["*iso"],"application/x-iwork-keynote-sffkey":["*key"],"application/x-iwork-numbers-sffnumbers":["*numbers"],"application/x-iwork-pages-sffpages":["*pages"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["*prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["*sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zip-compressed":["*zip"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["*aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif","btf"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.blockfact.facti":["facti"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-adobe-dng":["dng"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.bary":["bary"],"model/vnd.cld":["cld"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["*mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.pytha.pyox":["pyo","pyox"],"model/vnd.sap.vds":["vds"],"model/vnd.usda":["usda"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.familysearch.gedcom":["ged"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]};Object.freeze(types);const upArrow="↑",downArrow="↓",U={upArrow:upArrow,downArrow:downArrow},$=g=>document.querySelector(g),$e=(g,v)=>{const D="string"==typeof g?$(g):g;return D?D.querySelector(v):null},$$e=(g,v)=>{const D="string"==typeof g?$(g):g;return D?[...D.querySelectorAll(v)]:[]},removeChildren=g=>{const v="string"==typeof g?$(g):g;if(!v)throw new Error("Node not found!");for(;v.hasChildNodes();)v.lastChild?.remove()},removeIfExists=g=>{const v="string"==typeof g?$(g):g;v&&v.remove()},filterChildElements=(g,v)=>{const D="string"==typeof g?$(g):g;if(!D)throw new Error("Element not found!");let R=[D];return(v=Array.isArray(v)?v:[v]).forEach(g=>{R=R.reduce((v,D)=>D?(v.push(...((g,v)=>{const D=[...g.children].filter(g=>g.matches(v));return D})(D,g)),v):v,[])}),R},initialCaps=g=>g.charAt(0).toUpperCase()+g.slice(1),DOM={removeChildren:removeChildren,removeIfExists:removeIfExists,filterChildElements:filterChildElements,initialCaps:initialCaps},isNullish=g=>null==g,unionLikeTypes=["union","xor","discriminatedUnion"],isUnionLike=g=>unionLikeTypes.includes(g);function assertEqual(g){return g}function assertNotEqual(g){return g}function toZod(){return g=>g}function assertIs(g){}function assertNever(g){throw new Error("Unexpected value in exhaustive check")}function assert(g){}function getEnumValues(g){const v=Object.values(g).filter(g=>"number"==typeof g),D=Object.entries(g).filter(([g,D])=>-1===v.indexOf(+g)).map(([g,v])=>v);return D}function joinValues(g,v="|"){return g.map(g=>stringifyPrimitive(g)).join(v)}function jsonStringifyReplacer(g,v){return"bigint"==typeof v?v.toString():v}function cached(g){return{get value(){{const v=g();return Object.defineProperty(this,"value",{value:v}),v}}}}function nullish$1(g){return null==g}function cleanRegex(g){const v=g.startsWith("^")?1:0,D=g.endsWith("$")?g.length-1:g.length;return g.slice(v,D)}function floatSafeRemainder(g,v){const D=g/v,R=Math.round(D),q=4*Number.EPSILON*Math.max(Math.abs(D),1);return Math.abs(D-R)<q?0:D-R}const EVALUATING=Symbol("evaluating");function defineLazy(g,v,D){let R;Object.defineProperty(g,v,{get(){if(R!==EVALUATING)return void 0===R&&(R=EVALUATING,R=D()),R},set(D){Object.defineProperty(g,v,{value:D})},configurable:!0})}function objectClone(g){return Object.create(Object.getPrototypeOf(g),Object.getOwnPropertyDescriptors(g))}function assignProp(g,v,D){Object.defineProperty(g,v,{value:D,writable:!0,enumerable:!0,configurable:!0})}function mergeDefs(...g){const v={};for(const D of g){const g=Object.getOwnPropertyDescriptors(D);Object.assign(v,g)}return Object.defineProperties({},v)}function cloneDef(g){return mergeDefs(g._zod.def)}function getElementAtPath(g,v){return v?v.reduce((g,v)=>g?.[v],g):g}function promiseAllObject(g){const v=Object.keys(g),D=v.map(v=>g[v]);return Promise.all(D).then(g=>{const D={};for(let R=0;R<v.length;R++)D[v[R]]=g[R];return D})}function randomString(g=10){const v="abcdefghijklmnopqrstuvwxyz";let D="";for(let R=0;R<g;R++)D+=v[Math.floor(26*Math.random())];return D}function esc(g){return JSON.stringify(g)}function slugify(g){return g.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const captureStackTrace="captureStackTrace"in Error?Error.captureStackTrace:(...g)=>{};function isObject(g){return"object"==typeof g&&null!==g&&!Array.isArray(g)}const allowsEval=cached(()=>{if(globalConfig.jitless)return!1;if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(g){return!1}});function isPlainObject(g){if(!1===isObject(g))return!1;const v=g.constructor;if(void 0===v)return!0;if("function"!=typeof v)return!0;const D=v.prototype;return!1!==isObject(D)&&!1!==Object.prototype.hasOwnProperty.call(D,"isPrototypeOf")}function shallowClone(g){return isPlainObject(g)?{...g}:Array.isArray(g)?[...g]:g instanceof Map?new Map(g):g instanceof Set?new Set(g):g}function numKeys(g){let v=0;for(const D in g)Object.prototype.hasOwnProperty.call(g,D)&&v++;return v}const getParsedType=g=>{const v=typeof g;switch(v){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(g)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(g)?"array":null===g?"null":g.then&&"function"==typeof g.then&&g.catch&&"function"==typeof g.catch?"promise":"undefined"!=typeof Map&&g instanceof Map?"map":"undefined"!=typeof Set&&g instanceof Set?"set":"undefined"!=typeof Date&&g instanceof Date?"date":"undefined"!=typeof File&&g instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${v}`)}},propertyKeyTypes=new Set(["string","number","symbol"]),primitiveTypes=new Set(["string","number","bigint","boolean","symbol","undefined"]);function escapeRegex$1(g){return g.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function clone(g,v,D){const R=new g._zod.constr(v??g._zod.def);return v&&!D?.parent||(R._zod.parent=g),R}function normalizeParams(g){const v=g;if(!v)return{};if("string"==typeof v)return{error:()=>v};if(void 0!==v?.message){if(void 0!==v?.error)throw new Error("Cannot specify both `message` and `error` params");v.error=v.message}return delete v.message,"string"==typeof v.error?{...v,error:()=>v.error}:v}function createTransparentProxy(g){let v;return new Proxy({},{get:(D,R,q)=>(v??(v=g()),Reflect.get(v,R,q)),set:(D,R,q,ie)=>(v??(v=g()),Reflect.set(v,R,q,ie)),has:(D,R)=>(v??(v=g()),Reflect.has(v,R)),deleteProperty:(D,R)=>(v??(v=g()),Reflect.deleteProperty(v,R)),ownKeys:D=>(v??(v=g()),Reflect.ownKeys(v)),getOwnPropertyDescriptor:(D,R)=>(v??(v=g()),Reflect.getOwnPropertyDescriptor(v,R)),defineProperty:(D,R,q)=>(v??(v=g()),Reflect.defineProperty(v,R,q))})}function stringifyPrimitive(g){return"bigint"==typeof g?g.toString()+"n":"string"==typeof g?`"${g}"`:`${g}`}function optionalKeys(g){return Object.keys(g).filter(v=>void 0!==g[v]._zod.optin&&"optional"===g[v]._zod.optout)}const NUMBER_FORMAT_RANGES=(()=>({safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]}))(),BIGINT_FORMAT_RANGES={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function pick(g,v){const D=g._zod.def,R=D.checks;if(R&&R.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");return clone(g,mergeDefs(g._zod.def,{get shape(){const g={};for(const R of Reflect.ownKeys(v)){if(!Object.prototype.hasOwnProperty.call(D.shape,R))throw new Error(`Unrecognized key: "${String(R)}"`);v[R]&&assignProp(g,R,D.shape[R])}return assignProp(this,"shape",g),g},checks:[]}))}function omit(g,v){const D=g._zod.def,R=D.checks;if(R&&R.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const q=mergeDefs(g._zod.def,{get shape(){const R={...g._zod.def.shape};for(const g of Reflect.ownKeys(v)){if(!Object.prototype.hasOwnProperty.call(D.shape,g))throw new Error(`Unrecognized key: "${String(g)}"`);v[g]&&delete R[g]}return assignProp(this,"shape",R),R},checks:[]});return clone(g,q)}function extend(g,v){if(!isPlainObject(v))throw new Error("Invalid input to extend: expected a plain object");const D=g._zod.def.checks;if(D&&D.length>0){const D=g._zod.def.shape;for(const g of Reflect.ownKeys(v))if(void 0!==Object.getOwnPropertyDescriptor(D,g))throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const R=mergeDefs(g._zod.def,{get shape(){const D={...g._zod.def.shape,...v};return assignProp(this,"shape",D),D}});return clone(g,R)}function safeExtend(g,v){if(!isPlainObject(v))throw new Error("Invalid input to safeExtend: expected a plain object");const D=mergeDefs(g._zod.def,{get shape(){const D={...g._zod.def.shape,...v};return assignProp(this,"shape",D),D}});return clone(g,D)}function merge(g,v){if(!v?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(g._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const D=mergeDefs(g._zod.def,{get shape(){const D={...g._zod.def.shape,...v._zod.def.shape};return assignProp(this,"shape",D),D},get catchall(){return v._zod.def.catchall},checks:v._zod.def.checks??[]});return clone(g,D)}function partial(g,v,D,R="partial"){const q=v._zod.def.checks;if(q&&q.length>0)throw new Error(`.${R}() cannot be used on object schemas containing refinements`);const ie=mergeDefs(v._zod.def,{get shape(){const R=v._zod.def.shape,q={...R};if(D)for(const v of Reflect.ownKeys(D)){if(!Object.prototype.hasOwnProperty.call(R,v))throw new Error(`Unrecognized key: "${String(v)}"`);D[v]&&(q[v]=g?new g({type:"optional",innerType:R[v]}):R[v])}else for(const v of Reflect.ownKeys(R))q[v]=g?new g({type:"optional",innerType:R[v]}):R[v];return assignProp(this,"shape",q),q},checks:[]});return clone(v,ie)}function required(g,v,D){const R=mergeDefs(v._zod.def,{get shape(){const R=v._zod.def.shape,q={...R};if(D)for(const v of Reflect.ownKeys(D)){if(!Object.prototype.hasOwnProperty.call(q,v))throw new Error(`Unrecognized key: "${String(v)}"`);D[v]&&(q[v]=new g({type:"nonoptional",innerType:R[v]}))}else for(const v of Reflect.ownKeys(R))q[v]=new g({type:"nonoptional",innerType:R[v]});return assignProp(this,"shape",q),q}});return clone(v,R)}function aborted(g,v=0){if(!0===g.aborted)return!0;for(let D=v;D<g.issues.length;D++)if(!0!==g.issues[D]?.continue)return!0;return!1}function explicitlyAborted(g,v=0){if(!0===g.aborted)return!0;for(let D=v;D<g.issues.length;D++)if(!1===g.issues[D]?.continue)return!0;return!1}function prefixIssues(g,v){return v.map(v=>{var D;return(D=v).path??(D.path=[]),v.path.unshift(g),v})}function unwrapMessage(g){return"string"==typeof g?g:g?.message}function attachSchema(g,v,D){var R;for(let q=v;q<g.length;q++)(R=g[q]).schema??(R.schema=D)}function finalizeIssue(g,v,D){var R;const q=g.inst?._zod?.traits;q?.has("$ZodType")&&(q.has("$ZodCheck")?(R=g).schema??(R.schema=g.inst):g.schema=g.inst);const ie=g.schema!==g.inst?g.schema?._zod.def?.error:void 0,se=g.message?g.message:unwrapMessage(g.inst?._zod.def?.error?.(g))??unwrapMessage(ie?.(g))??unwrapMessage(v?.error?.(g))??unwrapMessage(D.customError?.(g))??unwrapMessage(D.localeError?.(g))??"Invalid input",{inst:ce,schema:le,continue:me,input:fe,...ge}=g;return ge.path??(ge.path=[]),ge.message=se,v?.reportInput&&(ge.input=fe),ge}function getSizableOrigin(g){return g instanceof Set?"set":g instanceof Map?"map":g instanceof File?"file":"unknown"}const highSurrogate=/[\uD800-\uDBFF]/;function codePointLength(g){const v=g.length;if(!highSurrogate.test(g))return v;let D=v;for(let R=0;R<v-1;R++)55296==(64512&g.charCodeAt(R))&&56320==(64512&g.charCodeAt(R+1))&&(D--,R++);return D}function getLengthableOrigin(g){return Array.isArray(g)?"array":"string"==typeof g?"string":"unknown"}function parsedType(g){const v=typeof g;switch(v){case"number":return Number.isNaN(g)?"nan":"number";case"object":{if(null===g)return"null";if(Array.isArray(g))return"array";const v=g;if(v&&Object.getPrototypeOf(v)!==Object.prototype&&"constructor"in v&&v.constructor)return v.constructor.name}}return v}function issue(...g){const[v,D,R]=g;return"string"==typeof v?{message:v,code:"custom",input:D,inst:R}:{...v}}function cleanEnum(g){return Object.entries(g).filter(([g,v])=>Number.isNaN(Number.parseInt(g,10))).map(g=>g[1])}function base64ToUint8Array(g){const v=atob(g),D=new Uint8Array(v.length);for(let g=0;g<v.length;g++)D[g]=v.charCodeAt(g);return D}function uint8ArrayToBase64(g){let v="";for(let D=0;D<g.length;D++)v+=String.fromCharCode(g[D]);return btoa(v)}function base64urlToUint8Array(g){const v=g.replace(/-/g,"+").replace(/_/g,"/");return base64ToUint8Array(v+"=".repeat((4-v.length%4)%4))}function uint8ArrayToBase64url(g){return uint8ArrayToBase64(g).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function hexToUint8Array(g){const v=g.replace(/^0x/,"");if(v.length%2!=0)throw new Error("Invalid hex string length");const D=new Uint8Array(v.length/2);for(let g=0;g<v.length;g+=2)D[g/2]=Number.parseInt(v.slice(g,g+2),16);return D}function uint8ArrayToHex(g){return Array.from(g).map(g=>g.toString(16).padStart(2,"0")).join("")}class Class{constructor(...g){}}function members(g,v){for(const D in v){const R=Object.getOwnPropertyDescriptor(v,D);R.get?Object.defineProperty(g,D,{...R,enumerable:!1}):defineBound(g,D,R.value)}}function own(g,v,D,R=!0){return Object.defineProperty(g,v,{configurable:!0,writable:!0,enumerable:R,value:D}),D}function hide(g,v,D){return own(g,v,D,!1)}function defineBound(g,v,D){Object.defineProperty(g,v,{configurable:!0,get(){return null==this?D:own(this,v,D.bind(this))},set(g){own(this,v,g)}})}function claim(g,v){const D=Object.getPrototypeOf(g);return v in D?void 0:D}let installing,broke=!1;const breaker={configurable:!0,get(){broke=!0}};function defineLazyInternal(g,v,D){const R=Object.getPrototypeOf(g._zod);v in R&&installing!==g._zod?installing=void 0:(installing=g._zod,Object.defineProperty(R,v,{configurable:!0,get(){Object.defineProperty(this,v,breaker);const g=broke;broke=!1;try{const R=D(this);return broke?delete this[v]:Object.defineProperty(this,v,{configurable:!0,writable:!0,value:R}),broke=broke||g,R}catch(D){throw delete this[v],broke=broke||g,D}},set(g){Object.defineProperty(this,v,{configurable:!0,writable:!0,value:g})}}))}function installLazyProp(g,v,D,R){const q=claim(g,v);q&&Object.defineProperty(q,v,{configurable:!0,get(){const g={configurable:!0,writable:!0,enumerable:R,value:void 0};return Object.defineProperty(this,v,g),g.value=D(this),Object.defineProperty(this,v,g),g.value},set(g){Object.defineProperty(this,v,{configurable:!0,writable:!0,enumerable:R,value:g})}})}const CONSTANT_CATCH="~constantCatch";function constantCatch(g){const fn=()=>g;return fn[CONSTANT_CATCH]=!0,fn}var util=Object.freeze({__proto__:null,BIGINT_FORMAT_RANGES:BIGINT_FORMAT_RANGES,CONSTANT_CATCH:CONSTANT_CATCH,Class:Class,NUMBER_FORMAT_RANGES:NUMBER_FORMAT_RANGES,aborted:aborted,allowsEval:allowsEval,assert:assert,assertEqual:assertEqual,assertIs:assertIs,assertNever:assertNever,assertNotEqual:assertNotEqual,assignProp:assignProp,attachSchema:attachSchema,base64ToUint8Array:base64ToUint8Array,base64urlToUint8Array:base64urlToUint8Array,cached:cached,captureStackTrace:captureStackTrace,cleanEnum:cleanEnum,cleanRegex:cleanRegex,clone:clone,cloneDef:cloneDef,codePointLength:codePointLength,constantCatch:constantCatch,createTransparentProxy:createTransparentProxy,defineLazy:defineLazy,defineLazyInternal:defineLazyInternal,esc:esc,escapeRegex:escapeRegex$1,explicitlyAborted:explicitlyAborted,extend:extend,finalizeIssue:finalizeIssue,floatSafeRemainder:floatSafeRemainder,getElementAtPath:getElementAtPath,getEnumValues:getEnumValues,getLengthableOrigin:getLengthableOrigin,getParsedType:getParsedType,getSizableOrigin:getSizableOrigin,hexToUint8Array:hexToUint8Array,hide:hide,installLazyProp:installLazyProp,isObject:isObject,isPlainObject:isPlainObject,issue:issue,joinValues:joinValues,jsonStringifyReplacer:jsonStringifyReplacer,members:members,merge:merge,mergeDefs:mergeDefs,normalizeParams:normalizeParams,nullish:nullish$1,numKeys:numKeys,objectClone:objectClone,omit:omit,optionalKeys:optionalKeys,own:own,parsedType:parsedType,partial:partial,pick:pick,prefixIssues:prefixIssues,primitiveTypes:primitiveTypes,promiseAllObject:promiseAllObject,propertyKeyTypes:propertyKeyTypes,randomString:randomString,required:required,safeExtend:safeExtend,shallowClone:shallowClone,slugify:slugify,stringifyPrimitive:stringifyPrimitive,toZod:toZod,uint8ArrayToBase64:uint8ArrayToBase64,uint8ArrayToBase64url:uint8ArrayToBase64url,uint8ArrayToHex:uint8ArrayToHex,unwrapMessage:unwrapMessage}),_a$1;const NEVER=Object.freeze({status:"aborted"}),_zodDesc$1={value:void 0,enumerable:!1};let _E="captureStackTrace"in Error?Error:null;function newError(g){const v=_E;if(v){const D=v.stackTraceLimit;if("number"==typeof D){try{v.stackTraceLimit=0}catch{return _E=null,new g}try{return new g}finally{v.stackTraceLimit=D}}}return new g}function $constructor(g,v,D,R){function Internals(g){this.def=g,this.constr=_,this.traits=new Set}Internals.prototype={};const q=D,ie=q&&new WeakSet;function init(D,R){if(!D._zod){_zodDesc$1.value=new Internals(R);try{Object.defineProperty(D,"_zod",_zodDesc$1)}finally{_zodDesc$1.value=void 0}}if(D._zod.traits.has(g))return;if(D._zod.traits.add(g),v(D,R),ie){const g=Object.getPrototypeOf(D),v=D._zod.constr.prototype;let R=g;for(;R&&R!==v;)R=Object.getPrototypeOf(R);const se=R??g;ie.has(se)||(ie.add(se),members(se,q))}const se=_.prototype;for(const g in se)Object.prototype.hasOwnProperty.call(se,g)&&(g in D||(D[g]=se[g].bind(D)))}const se=R?.Parent??Object;class Definition extends se{}function _(g){const v=R?.Parent?newError(Definition):this;init(v,g);const D=v._zod.deferred;if(D){for(const g of D)g();v._zod.deferred=void 0}const q=globalThis.__zod_globalConfig?.postProcessor;return q&&q(v),v}return Object.defineProperty(Definition,"name",{value:g}),Object.defineProperty(_,"init",{value:init}),Object.defineProperty(_,Symbol.hasInstance,{value:v=>!!(R?.Parent&&v instanceof R.Parent)||v?._zod?.traits?.has(g)}),Object.defineProperty(_,"name",{value:g}),_}const $brand=Symbol("zod_brand");class $ZodAsyncError extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class $ZodEncodeError extends Error{constructor(g){super(`Encountered unidirectional transform during encode: ${g}`),this.name="ZodEncodeError"}}(_a$1=globalThis).__zod_globalConfig??(_a$1.__zod_globalConfig={});const globalConfig=globalThis.__zod_globalConfig;function config(g){return g&&Object.assign(globalConfig,g),globalConfig}function _getMessage(){const g=this._zod;return g.message??(g.message=JSON.stringify(g.def,jsonStringifyReplacer,2)),g.message}function _setMessage(g){this._zod.message=g}const _messageDesc={get:_getMessage,set:_setMessage,enumerable:!0,configurable:!0},_zodDesc={value:void 0,enumerable:!1},_issuesDesc={value:void 0,enumerable:!1},_installedToString=new WeakSet([Object.prototype,Error.prototype]),initializer$1=(g,v)=>{g.name="$ZodError",_zodDesc.value=g._zod,Object.defineProperty(g,"_zod",_zodDesc),_issuesDesc.value=v,Object.defineProperty(g,"issues",_issuesDesc),_zodDesc.value=void 0,_issuesDesc.value=void 0,Object.defineProperty(g,"message",_messageDesc);const D=Object.getPrototypeOf(g);_installedToString.has(D)||(_installedToString.add(D),Object.defineProperty(D,"toString",{configurable:!0,enumerable:!1,get(){const value=()=>this.message;return Object.defineProperty(this,"toString",{value:value,configurable:!0,writable:!0}),value},set(g){Object.defineProperty(this,"toString",{value:g,configurable:!0,writable:!0})}}))},$ZodError=$constructor("$ZodError",initializer$1),$ZodRealError=$constructor("$ZodError",initializer$1,void 0,{Parent:Error});function node(g,v,D){return Object.prototype.hasOwnProperty.call(g,v)||("__proto__"===v?Object.defineProperty(g,v,{value:D(),writable:!0,enumerable:!0,configurable:!0}):g[v]=D()),g[v]}function flattenError(g,v=g=>g.message){const D={},R=[];for(const q of g.issues)q.path.length>0?node(D,q.path[0],()=>[]).push(v(q)):R.push(v(q));return{formErrors:R,fieldErrors:D}}function formatError(g,v=g=>g.message){const D={_errors:[]},processError=(g,R=[])=>{for(const q of g.issues)if("invalid_union"===q.code&&q.errors.length)q.errors.map(g=>processError({issues:g},[...R,...q.path]));else if("invalid_key"===q.code)processError({issues:q.issues},[...R,...q.path]);else if("invalid_element"===q.code)processError({issues:q.issues},[...R,...q.path]);else{const g=[...R,...q.path];if(0===g.length)D._errors.push(v(q));else{let R=D,ie=0;for(;ie<g.length;){const D=g[ie],se=ie===g.length-1;if("_errors"===D){se&&R._errors.push(v(q)),ie++;continue}Object.prototype.hasOwnProperty.call(R,D)||Object.defineProperty(R,D,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});const ce=R[D];se&&ce._errors.push(v(q)),R=ce,ie++}}}};return processError(g),D}function treeifyError(g,v=g=>g.message){const D={errors:[]},processError=(g,R=[])=>{var q;for(const ie of g.issues)if("invalid_union"===ie.code&&ie.errors.length)ie.errors.map(g=>processError({issues:g},[...R,...ie.path]));else if("invalid_key"===ie.code)processError({issues:ie.issues},[...R,...ie.path]);else if("invalid_element"===ie.code)processError({issues:ie.issues},[...R,...ie.path]);else{const g=[...R,...ie.path];if(0===g.length){D.errors.push(v(ie));continue}let se=D,ce=0;for(;ce<g.length;){const D=g[ce],R=ce===g.length-1;"string"==typeof D?(se.properties??(se.properties={}),Object.prototype.hasOwnProperty.call(se.properties,D)||Object.defineProperty(se.properties,D,{value:{errors:[]},enumerable:!0,writable:!0,configurable:!0}),se=se.properties[D]):(se.items??(se.items=[]),(q=se.items)[D]??(q[D]={errors:[]}),se=se.items[D]),R&&se.errors.push(v(ie)),ce++}}};return processError(g),D}function toDotPath(g){const v=[],D=g.map(g=>"object"==typeof g?g.key:g);for(const g of D)"number"==typeof g?v.push(`[${g}]`):"symbol"==typeof g?v.push(`[${JSON.stringify(String(g))}]`):/[^\w$]/.test(g)?v.push(`[${JSON.stringify(g)}]`):(v.length&&v.push("."),v.push(g));return v.join("")}function prettifyError(g){const v=[],D=[...g.issues].sort((g,v)=>(g.path??[]).length-(v.path??[]).length);for(const g of D)v.push(`✖ ${g.message}`),g.path?.length&&v.push(` → at ${toDotPath(g.path)}`);return v.join("\n")}function finalizeParams(g,v){return{callee:v?.callee??g,Err:v?.Err}}const _parse=g=>{const fn=(v,D,R,q)=>{const ie=R?{...R,async:!1}:{async:!1},se=v._zod.run({value:D,issues:[]},ie);if(se instanceof Promise)throw new $ZodAsyncError;if(se.issues.length){const v=new(q?.Err??g)(se.issues.map(g=>finalizeIssue(g,ie,config())));throw captureStackTrace(v,q?.callee??fn),v}return se.value};return fn},parse$1=_parse($ZodRealError),_parseAsync=g=>{const fn=async(v,D,R,q)=>{const ie=R?{...R,async:!0}:{async:!0};let se=v._zod.run({value:D,issues:[]},ie);if(se instanceof Promise&&(se=await se),se.issues.length){const v=new(q?.Err??g)(se.issues.map(g=>finalizeIssue(g,ie,config())));throw captureStackTrace(v,q?.callee??fn),v}return se.value};return fn},parseAsync$1=_parseAsync($ZodRealError),_safeParse=g=>(v,D,R)=>{const q=R?{...R,async:!1}:{async:!1},ie=v._zod.run({value:D,issues:[]},q);if(ie instanceof Promise)throw new $ZodAsyncError;return ie.issues.length?{success:!1,error:new(g??$ZodError)(ie.issues.map(g=>finalizeIssue(g,q,config())))}:{success:!0,data:ie.value}},safeParse$1=_safeParse($ZodRealError),_safeParseAsync=g=>async(v,D,R)=>{const q=R?{...R,async:!0}:{async:!0};let ie=v._zod.run({value:D,issues:[]},q);return ie instanceof Promise&&(ie=await ie),ie.issues.length?{success:!1,error:new g(ie.issues.map(g=>finalizeIssue(g,q,config())))}:{success:!0,data:ie.value}},safeParseAsync$1=_safeParseAsync($ZodRealError),COMPILE_INVALID=Symbol.for("zod.compile.invalid"),COMPILE_FALLBACK=Symbol.for("zod.compile.fallback"),validate=(g,v,D)=>{const R=g._zod.bag.validator;return void 0!==R&&R(v)!==COMPILE_INVALID||validateFallback(g,v,D)};function validateFallback(g,v,D){const R=D?{...D,async:!1}:{async:!1},q=g._zod.bag.fallbackRun;let ie;if(q?(R[COMPILE_FALLBACK]=!0,ie=q({value:v,issues:[]},R)):ie=g._zod.run({value:v,issues:[]},R),ie instanceof Promise)throw new $ZodAsyncError;return 0===ie.issues.length}const validateAsync=async(g,v,D)=>{const R=D?{...D,async:!0}:{async:!0};let q=g._zod.run({value:v,issues:[]},R);return q instanceof Promise&&(q=await q),0===q.issues.length},_encode=g=>{const v=_parse(g),fn=(g,D,R,q)=>{const ie=R?{...R,direction:"backward"}:{direction:"backward"};return v(g,D,ie,finalizeParams(fn,q))};return fn},encode$1=_encode($ZodRealError),_decode=g=>{const v=_parse(g),fn=(g,D,R,q)=>v(g,D,R,finalizeParams(fn,q));return fn},decode$1=_decode($ZodRealError),_encodeAsync=g=>{const v=_parseAsync(g),fn=async(g,D,R,q)=>{const ie=R?{...R,direction:"backward"}:{direction:"backward"};return await v(g,D,ie,finalizeParams(fn,q))};return fn},encodeAsync$1=_encodeAsync($ZodRealError),_decodeAsync=g=>{const v=_parseAsync(g),fn=async(g,D,R,q)=>await v(g,D,R,finalizeParams(fn,q));return fn},decodeAsync$1=_decodeAsync($ZodRealError),_safeEncode=g=>(v,D,R)=>{const q=R?{...R,direction:"backward"}:{direction:"backward"};return _safeParse(g)(v,D,q)},safeEncode$1=_safeEncode($ZodRealError),_safeDecode=g=>(v,D,R)=>_safeParse(g)(v,D,R),safeDecode$1=_safeDecode($ZodRealError),_safeEncodeAsync=g=>async(v,D,R)=>{const q=R?{...R,direction:"backward"}:{direction:"backward"};return _safeParseAsync(g)(v,D,q)},safeEncodeAsync$1=_safeEncodeAsync($ZodRealError),_safeDecodeAsync=g=>async(v,D,R)=>_safeParseAsync(g)(v,D,R),safeDecodeAsync$1=_safeDecodeAsync($ZodRealError),cuid$1=/^[cC][0-9a-z]{6,}$/,cuid2$1=/^[0-9a-z]+$/,ulid$1=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,xid$1=/^[0-9a-vA-V]{20}$/,ksuid$1=/^[A-Za-z0-9]{27}$/,nanoid$1=/^[a-zA-Z0-9_-]{21}$/;function nanoidOfLength(g){return new RegExp(`^[a-zA-Z0-9_-]{${g}}$`)}const duration$1=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,extendedDuration=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,guid$1=/^([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})$/,uuid$1=g=>g?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${g}[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)$/,uuid4=uuid$1(4),uuid6=uuid$1(6),uuid7=uuid$1(7),email$1=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,html5Email=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,rfc5322Email=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,unicodeEmail=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,idnEmail=unicodeEmail,browserEmail=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,_emoji$1="^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function emoji$1(){return new RegExp(_emoji$1,"u")}const ipv4$1=/^(?:(?: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])$/,ipv6$1=/^(([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}|:))$/,mac$1=g=>{const v=escapeRegex$1(g??":");return new RegExp(`^(?:[0-9A-F]{2}${v}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${v}){5}[0-9a-f]{2}$`)},cidrv4$1=/^((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])$/,cidrv6$1=/^(([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])$/,base64$1=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,base64url$1=/^[A-Za-z0-9_-]*$/,hostname$1=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,domain=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,httpProtocol=/^https?$/,e164$1=/^\+[1-9]\d{6,14}$/,creditCard$1=/^\d(?:[ -]?\d){11,18}$/,dateSource="(?:(?:\\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 anchor(g){return new RegExp(`^${g}$`)}const date$3=anchor(dateSource);function timeSource(g){const v="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof g.precision?-1===g.precision?`${v}`:0===g.precision?`${v}:[0-5]\\d`:`${v}:[0-5]\\d\\.\\d{${g.precision}}`:g.seconds?`${v}:[0-5]\\d(?:\\.\\d+)?`:`${v}(?::[0-5]\\d(?:\\.\\d+)?)?`}function time$1(g){return new RegExp(`^${timeSource(g)}$`)}function datetime$1(g){const v=["Z"];g.offset&&v.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const D=`${timeSource({precision:g.precision,seconds:!0})}(?:${v.join("|")})`,R=g.local?`${D}|${timeSource({precision:g.precision})}`:D;return new RegExp(`^${dateSource}T(?:${R})$`)}const string$2=g=>new RegExp(`^${g?`[\\s\\S]{${g?.minimum??0},${g?.maximum??""}}`:"[\\s\\S]*"}$`),bigint$2=/^-?\d+n?$/,integer=/^-?\d+$/,number$2=/^-?\d+(?:\.\d+)?$/,boolean$2=/^(?:true|false)$/i,_null$2=/^null$/i,_undefined$2=/^undefined$/i,lowercase=/^[^A-Z]*$/,uppercase=/^[^a-z]*$/,hex$1=/^[0-9a-fA-F]*$/;function fixedBase64(g,v){return new RegExp(`^[A-Za-z0-9+/]{${g}}${v}$`)}function fixedBase64url(g){return new RegExp(`^[A-Za-z0-9_-]{${g}}$`)}const md5_hex=/^[0-9a-fA-F]{32}$/,md5_base64=fixedBase64(22,"=="),md5_base64url=fixedBase64url(22),sha1_hex=/^[0-9a-fA-F]{40}$/,sha1_base64=fixedBase64(27,"="),sha1_base64url=fixedBase64url(27),sha256_hex=/^[0-9a-fA-F]{64}$/,sha256_base64=fixedBase64(43,"="),sha256_base64url=fixedBase64url(43),sha384_hex=/^[0-9a-fA-F]{96}$/,sha384_base64=fixedBase64(64,""),sha384_base64url=fixedBase64url(64),sha512_hex=/^[0-9a-fA-F]{128}$/,sha512_base64=fixedBase64(86,"=="),sha512_base64url=fixedBase64url(86);var regexes=Object.freeze({__proto__:null,base64:base64$1,base64url:base64url$1,bigint:bigint$2,boolean:boolean$2,browserEmail:browserEmail,cidrv4:cidrv4$1,cidrv6:cidrv6$1,creditCard:creditCard$1,cuid:cuid$1,cuid2:cuid2$1,date:date$3,datetime:datetime$1,domain:domain,duration:duration$1,e164:e164$1,email:email$1,emoji:emoji$1,extendedDuration:extendedDuration,guid:guid$1,hex:hex$1,hostname:hostname$1,html5Email:html5Email,httpProtocol:httpProtocol,idnEmail:idnEmail,integer:integer,ipv4:ipv4$1,ipv6:ipv6$1,ksuid:ksuid$1,lowercase:lowercase,mac:mac$1,md5_base64:md5_base64,md5_base64url:md5_base64url,md5_hex:md5_hex,nanoid:nanoid$1,nanoidOfLength:nanoidOfLength,null:_null$2,number:number$2,rfc5322Email:rfc5322Email,sha1_base64:sha1_base64,sha1_base64url:sha1_base64url,sha1_hex:sha1_hex,sha256_base64:sha256_base64,sha256_base64url:sha256_base64url,sha256_hex:sha256_hex,sha384_base64:sha384_base64,sha384_base64url:sha384_base64url,sha384_hex:sha384_hex,sha512_base64:sha512_base64,sha512_base64url:sha512_base64url,sha512_hex:sha512_hex,string:string$2,time:time$1,ulid:ulid$1,undefined:_undefined$2,unicodeEmail:unicodeEmail,uppercase:uppercase,uuid:uuid$1,uuid4:uuid4,uuid6:uuid6,uuid7:uuid7,xid:xid$1});const $ZodCheck=$constructor("$ZodCheck",(g,v)=>{var D;g._zod??(g._zod={}),g._zod.def=v,(D=g._zod).onattach??(D.onattach=[])}),_whenHasSize=g=>{const v=g.value;return!nullish$1(v)&&void 0!==v.size},_whenHasLength=g=>{const v=g.value;return!nullish$1(v)&&void 0!==v.length},numericOriginMap={number:"number",bigint:"bigint",object:"date"},$ZodCheckLessThan=$constructor("$ZodCheckLessThan",(g,v)=>{$ZodCheck.init(g,v);const D=numericOriginMap[typeof v.value];g._zod.onattach.push(g=>{const D=g._zod.bag,R=(v.inclusive?D.maximum:D.exclusiveMaximum)??Number.POSITIVE_INFINITY;v.value<R&&(v.inclusive?D.maximum=v.value:D.exclusiveMaximum=v.value)}),g._zod.check=R=>{(v.inclusive?R.value<=v.value:R.value<v.value)||R.issues.push({origin:numericOriginMap[typeof R.value]??D,code:"too_big",maximum:"object"==typeof v.value?v.value.getTime():v.value,input:R.value,inclusive:v.inclusive,inst:g,continue:!v.abort})}}),$ZodCheckGreaterThan=$constructor("$ZodCheckGreaterThan",(g,v)=>{$ZodCheck.init(g,v);const D=numericOriginMap[typeof v.value];g._zod.onattach.push(g=>{const D=g._zod.bag,R=(v.inclusive?D.minimum:D.exclusiveMinimum)??Number.NEGATIVE_INFINITY;v.value>R&&(v.inclusive?D.minimum=v.value:D.exclusiveMinimum=v.value)}),g._zod.check=R=>{(v.inclusive?R.value>=v.value:R.value>v.value)||R.issues.push({origin:numericOriginMap[typeof R.value]??D,code:"too_small",minimum:"object"==typeof v.value?v.value.getTime():v.value,input:R.value,inclusive:v.inclusive,inst:g,continue:!v.abort})}}),$ZodCheckMultipleOf=$constructor("$ZodCheckMultipleOf",(g,v)=>{$ZodCheck.init(g,v),g._zod.onattach.push(g=>{var D;(D=g._zod.bag).multipleOf??(D.multipleOf=v.value)}),g._zod.check=D=>{if(typeof D.value!=typeof v.value)throw new Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof D.value?v.value!==BigInt(0)&&D.value%v.value===BigInt(0):0===floatSafeRemainder(D.value,v.value))||D.issues.push({origin:typeof D.value,code:"not_multiple_of",divisor:v.value,input:D.value,inst:g,continue:!v.abort})}}),$ZodCheckNumberFormat=$constructor("$ZodCheckNumberFormat",(g,v)=>{$ZodCheck.init(g,v),v.format=v.format||"float64";const D=v.format?.includes("int"),R=D?"int":"number",[q,ie]=NUMBER_FORMAT_RANGES[v.format];g._zod.onattach.push(g=>{const R=g._zod.bag;R.format=v.format,R.minimum=q,R.maximum=ie,D&&(R.pattern=integer)}),g._zod.check=se=>{const ce=se.value;if(D){if(!Number.isInteger(ce))return void se.issues.push({expected:R,format:v.format,code:"invalid_type",continue:!1,input:ce,inst:g});if(!Number.isSafeInteger(ce))return void(ce>0?se.issues.push({input:ce,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:g,origin:R,inclusive:!0,continue:!v.abort}):se.issues.push({input:ce,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:g,origin:R,inclusive:!0,continue:!v.abort}))}ce<q&&se.issues.push({origin:"number",input:ce,code:"too_small",minimum:q,inclusive:!0,inst:g,continue:!v.abort}),ce>ie&&se.issues.push({origin:"number",input:ce,code:"too_big",maximum:ie,inclusive:!0,inst:g,continue:!v.abort})}}),$ZodCheckBigIntFormat=$constructor("$ZodCheckBigIntFormat",(g,v)=>{$ZodCheck.init(g,v);const[D,R]=BIGINT_FORMAT_RANGES[v.format];g._zod.onattach.push(g=>{const q=g._zod.bag;q.format=v.format,q.minimum=D,q.maximum=R}),g._zod.check=q=>{const ie=q.value;ie<D&&q.issues.push({origin:"bigint",input:ie,code:"too_small",minimum:D,inclusive:!0,inst:g,continue:!v.abort}),ie>R&&q.issues.push({origin:"bigint",input:ie,code:"too_big",maximum:R,inclusive:!0,inst:g,continue:!v.abort})}}),$ZodCheckMaxSize=$constructor("$ZodCheckMaxSize",(g,v)=>{var D;$ZodCheck.init(g,v),(D=g._zod.def).when??(D.when=_whenHasSize),g._zod.onattach.push(g=>{const D=g._zod.bag.maximum??Number.POSITIVE_INFINITY;v.maximum<D&&(g._zod.bag.maximum=v.maximum)}),g._zod.check=D=>{const R=D.value;R.size<=v.maximum||D.issues.push({origin:getSizableOrigin(R),code:"too_big",maximum:v.maximum,inclusive:!0,input:R,inst:g,continue:!v.abort})}}),$ZodCheckMinSize=$constructor("$ZodCheckMinSize",(g,v)=>{var D;$ZodCheck.init(g,v),(D=g._zod.def).when??(D.when=_whenHasSize),g._zod.onattach.push(g=>{const D=g._zod.bag.minimum??Number.NEGATIVE_INFINITY;v.minimum>D&&(g._zod.bag.minimum=v.minimum)}),g._zod.check=D=>{const R=D.value;R.size>=v.minimum||D.issues.push({origin:getSizableOrigin(R),code:"too_small",minimum:v.minimum,inclusive:!0,input:R,inst:g,continue:!v.abort})}}),$ZodCheckSizeEquals=$constructor("$ZodCheckSizeEquals",(g,v)=>{var D;$ZodCheck.init(g,v),(D=g._zod.def).when??(D.when=_whenHasSize),g._zod.onattach.push(g=>{const D=g._zod.bag;D.minimum=v.size,D.maximum=v.size,D.size=v.size}),g._zod.check=D=>{const R=D.value,q=R.size;if(q===v.size)return;const ie=q>v.size;D.issues.push({origin:getSizableOrigin(R),...ie?{code:"too_big",maximum:v.size}:{code:"too_small",minimum:v.size},inclusive:!0,exact:!0,input:D.value,inst:g,continue:!v.abort})}}),$ZodCheckMaxLength=$constructor("$ZodCheckMaxLength",(g,v)=>{var D;$ZodCheck.init(g,v),(D=g._zod.def).when??(D.when=_whenHasLength),g._zod.onattach.push(g=>{const D=g._zod.bag.maximum??Number.POSITIVE_INFINITY;v.maximum<D&&(g._zod.bag.maximum=v.maximum)}),g._zod.check=D=>{const R=D.value,q=R.length;if(("string"==typeof R&&q>v.maximum?codePointLength(R):q)<=v.maximum)return;const ie=getLengthableOrigin(R);D.issues.push({origin:ie,code:"too_big",maximum:v.maximum,inclusive:!0,input:R,inst:g,continue:!v.abort})}}),$ZodCheckMinLength=$constructor("$ZodCheckMinLength",(g,v)=>{var D;$ZodCheck.init(g,v),(D=g._zod.def).when??(D.when=_whenHasLength),g._zod.onattach.push(g=>{const D=g._zod.bag.minimum??Number.NEGATIVE_INFINITY;v.minimum>D&&(g._zod.bag.minimum=v.minimum)}),g._zod.check=D=>{const R=D.value,q=R.length;if(("string"==typeof R&&q>=v.minimum&&q<2*v.minimum?codePointLength(R):q)>=v.minimum)return;const ie=getLengthableOrigin(R);D.issues.push({origin:ie,code:"too_small",minimum:v.minimum,inclusive:!0,input:R,inst:g,continue:!v.abort})}}),$ZodCheckLengthEquals=$constructor("$ZodCheckLengthEquals",(g,v)=>{var D;$ZodCheck.init(g,v),(D=g._zod.def).when??(D.when=_whenHasLength),g._zod.onattach.push(g=>{const D=g._zod.bag;D.minimum=v.length,D.maximum=v.length,D.length=v.length}),g._zod.check=D=>{const R=D.value,q=R.length,ie="string"==typeof R&&q>=v.length&&q<=2*v.length?codePointLength(R):q;if(ie===v.length)return;const se=getLengthableOrigin(R),ce=ie>v.length;D.issues.push({origin:se,...ce?{code:"too_big",maximum:v.length}:{code:"too_small",minimum:v.length},inclusive:!0,exact:!0,input:D.value,inst:g,continue:!v.abort})}}),$ZodCheckStringFormat=$constructor("$ZodCheckStringFormat",(g,v)=>{var D,R;$ZodCheck.init(g,v),g._zod.onattach.push(g=>{const D=g._zod.bag;D.format=v.format,v.pattern&&(D.patterns??(D.patterns=new Set),D.patterns.add(v.pattern))}),v.pattern?(D=g._zod).check??(D.check=D=>{v.pattern.lastIndex=0,v.pattern.test(D.value)||D.issues.push({origin:"string",code:"invalid_format",format:v.format,input:D.value,...v.pattern?{pattern:v.pattern.toString()}:{},inst:g,continue:!v.abort})}):(R=g._zod).check??(R.check=()=>{})}),$ZodCheckRegex=$constructor("$ZodCheckRegex",(g,v)=>{$ZodCheckStringFormat.init(g,v),g._zod.check=D=>{v.pattern.lastIndex=0,v.pattern.test(D.value)||D.issues.push({origin:"string",code:"invalid_format",format:"regex",input:D.value,pattern:v.pattern.toString(),inst:g,continue:!v.abort})}}),$ZodCheckLowerCase=$constructor("$ZodCheckLowerCase",(g,v)=>{v.pattern??(v.pattern=lowercase),$ZodCheckStringFormat.init(g,v)}),$ZodCheckUpperCase=$constructor("$ZodCheckUpperCase",(g,v)=>{v.pattern??(v.pattern=uppercase),$ZodCheckStringFormat.init(g,v)}),$ZodCheckIncludes=$constructor("$ZodCheckIncludes",(g,v)=>{$ZodCheck.init(g,v);const D=escapeRegex$1(v.includes),R=new RegExp("number"==typeof v.position?`^.{${v.position},}${D}`:D);v.pattern=R,g._zod.onattach.push(g=>{const v=g._zod.bag;v.patterns??(v.patterns=new Set),v.patterns.add(R)}),g._zod.check=D=>{D.value.includes(v.includes,v.position)||D.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:v.includes,input:D.value,inst:g,continue:!v.abort})}}),$ZodCheckStartsWith=$constructor("$ZodCheckStartsWith",(g,v)=>{$ZodCheck.init(g,v);const D=new RegExp(`^${escapeRegex$1(v.prefix)}.*`);v.pattern??(v.pattern=D),g._zod.onattach.push(g=>{const v=g._zod.bag;v.patterns??(v.patterns=new Set),v.patterns.add(D)}),g._zod.check=D=>{D.value.startsWith(v.prefix)||D.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:v.prefix,input:D.value,inst:g,continue:!v.abort})}}),$ZodCheckEndsWith=$constructor("$ZodCheckEndsWith",(g,v)=>{$ZodCheck.init(g,v);const D=new RegExp(`.*${escapeRegex$1(v.suffix)}$`);v.pattern??(v.pattern=D),g._zod.onattach.push(g=>{const v=g._zod.bag;v.patterns??(v.patterns=new Set),v.patterns.add(D)}),g._zod.check=D=>{D.value.endsWith(v.suffix)||D.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:v.suffix,input:D.value,inst:g,continue:!v.abort})}});function handleCheckPropertyResult(g,v,D){g.issues.length&&v.issues.push(...prefixIssues(D,g.issues))}const $ZodCheckProperty=$constructor("$ZodCheckProperty",(g,v)=>{$ZodCheck.init(g,v),g._zod.check=g=>{const D=v.schema._zod.run({value:g.value[v.property],issues:[]},{});if(D instanceof Promise)return D.then(D=>handleCheckPropertyResult(D,g,v.property));handleCheckPropertyResult(D,g,v.property)}}),$ZodCheckMimeType=$constructor("$ZodCheckMimeType",(g,v)=>{$ZodCheck.init(g,v);const D=new Set(v.mime);g._zod.onattach.push(g=>{g._zod.bag.mime=v.mime}),g._zod.check=R=>{D.has(R.value.type)||R.issues.push({code:"invalid_value",values:v.mime,input:R.value.type,inst:g,continue:!v.abort})}}),$ZodCheckOverwrite=$constructor("$ZodCheckOverwrite",(g,v)=>{$ZodCheck.init(g,v),g._zod.check=g=>{g.value=v.tx(g.value)}});class Doc{constructor(g=[],v={}){this.content=[],this.indent=0,this.args=g,this.closed=v}indented(g){this.indent+=1,g(this),this.indent-=1}write(g){if("function"==typeof g)return g(this,{execution:"sync"}),void g(this,{execution:"async"});const v=g.split("\n").filter(g=>g),D=Math.min(...v.map(g=>g.length-g.trimStart().length)),R=v.map(g=>g.slice(D)).map(g=>" ".repeat(2*this.indent)+g);for(const g of R)this.content.push(g)}compile(){const g=Function,v=this?.content??[""];return new g(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {\n${v.join("\n")}\n};`)(...Object.values(this.closed))}}const version={major:4,minor:5,patch:4},$ZodType=$constructor("$ZodType",(g,v)=>{var D;g??(g={}),g._zod.def=v,g._zod.bag=g._zod.bag||{},g._zod.version=version;const R=g._zod.def.checks,q=g._zod.traits.has("$ZodCheck")?[g,...R??[]]:R?.length?[...R]:[];for(const v of q)for(const D of v._zod.onattach)D(g);if(0===q.length)(D=g._zod).deferred??(D.deferred=[]),g._zod.deferred?.push(()=>{g._zod.run=g._zod.parse});else{const runChecks=(v,D,R)=>{if(v.memo)return v;let q,ie=aborted(v);for(const se of D){if(se._zod.def.when){if(explicitlyAborted(v))continue;if(!se._zod.def.when(v))continue}else if(ie)continue;const D=v.issues.length,ce=se._zod.check(v);if(ce instanceof Promise&&!1===R?.async)throw new $ZodAsyncError;if(q||ce instanceof Promise)q=(q??Promise.resolve()).then(async()=>{await ce;v.issues.length!==D&&(attachSchema(v.issues,D,g),ie||(ie=aborted(v,D)))});else{if(v.issues.length===D)continue;attachSchema(v.issues,D,g),ie||(ie=aborted(v,D))}}return q?q.then(()=>v):v},handleCanaryResult=(v,D,R)=>{if(aborted(v))return v.aborted=!0,v;const ie=runChecks(D,q,R);if(ie instanceof Promise){if(!1===R.async)throw new $ZodAsyncError;return ie.then(v=>g._zod.parse(v,R))}return g._zod.parse(ie,R)};g._zod.run=(v,D)=>{if(D.skipChecks)return g._zod.parse(v,D);if("backward"===D.direction){const R=g._zod.parse({value:v.value,issues:[]},{...D,skipChecks:!0});return R instanceof Promise?R.then(g=>handleCanaryResult(g,v,D)):handleCanaryResult(R,v,D)}const R=g._zod.parse(v,D);if(R instanceof Promise){if(!1===D.async)throw new $ZodAsyncError;return R.then(g=>runChecks(g,q,D))}return runChecks(R,q,D)}}},{get"~standard"(){return hide(this,"~standard",standardProps(this))},set"~standard"(g){own(this,"~standard",g)}}),toStandardResult=g=>g.success?{value:g.data}:{issues:g.error?.issues};function standardProps(g){return{validate:v=>{try{return toStandardResult(safeParse$1(g,v))}catch(D){return safeParseAsync$1(g,v).then(toStandardResult)}},vendor:"zod",version:1}}const $ZodString=$constructor("$ZodString",(g,v)=>{$ZodType.init(g,v),g._zod.pattern=[...g?._zod.bag?.patterns??[]].pop()??string$2(g._zod.bag),g._zod.parse=(D,R)=>{if(v.coerce)try{D.value=String(D.value)}catch(R){}return"string"==typeof D.value||D.issues.push({expected:"string",code:"invalid_type",input:D.value,inst:g}),D}}),$ZodStringFormat=$constructor("$ZodStringFormat",(g,v)=>{$ZodCheckStringFormat.init(g,v),$ZodString.init(g,v)}),$ZodGUID=$constructor("$ZodGUID",(g,v)=>{v.pattern??(v.pattern=guid$1),$ZodStringFormat.init(g,v)}),$ZodUUID=$constructor("$ZodUUID",(g,v)=>{if(v.version){const g={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[v.version];if(void 0===g)throw new Error(`Invalid UUID version: "${v.version}"`);v.pattern??(v.pattern=uuid$1(g))}else v.pattern??(v.pattern=uuid$1());$ZodStringFormat.init(g,v)}),$ZodEmail=$constructor("$ZodEmail",(g,v)=>{v.pattern??(v.pattern=email$1),$ZodStringFormat.init(g,v)}),URL_BAD_FORMAT=1,URL_UNPARSEABLE=2;function parseURLObject(g,v){if(!v.normalize&&v.protocol?.source===httpProtocol.source&&!/^https?:\/\//i.test(g))return URL_BAD_FORMAT;try{return new URL(g)}catch{return URL_UNPARSEABLE}}const asciiTabOrNewline=/[\t\n\r]/g;function stripTabAndNewline(g){return g.replace(asciiTabOrNewline,"")}function urlHostnameOk(g,v){return v.lastIndex=0,v.test(g.hostname)}function urlProtocolOk(g,v){return v.lastIndex=0,v.test(g.protocol.endsWith(":")?g.protocol.slice(0,-1):g.protocol)}const $ZodURL=$constructor("$ZodURL",(g,v)=>{$ZodStringFormat.init(g,v),g._zod.check=D=>{try{const R=D.value.trim(),q=parseURLObject(R,v);return q===URL_BAD_FORMAT?void D.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:D.value,inst:g,continue:!v.abort}):q===URL_UNPARSEABLE?void D.issues.push({code:"invalid_format",format:"url",input:D.value,inst:g,continue:!v.abort}):(v.hostname&&!urlHostnameOk(q,v.hostname)&&D.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:v.hostname.source,input:D.value,inst:g,continue:!v.abort}),v.protocol&&!urlProtocolOk(q,v.protocol)&&D.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:v.protocol.source,input:D.value,inst:g,continue:!v.abort}),void(D.value=v.normalize?q.href:stripTabAndNewline(R)))}catch(R){D.issues.push({code:"invalid_format",format:"url",input:D.value,inst:g,continue:!v.abort})}}}),$ZodEmoji=$constructor("$ZodEmoji",(g,v)=>{v.pattern??(v.pattern=emoji$1()),$ZodStringFormat.init(g,v)}),$ZodNanoID=$constructor("$ZodNanoID",(g,v)=>{if(void 0!==v.length&&(!Number.isInteger(v.length)||v.length<1))throw new Error(`Invalid nanoid length: ${v.length}`);v.pattern??(v.pattern=void 0===v.length?nanoid$1:nanoidOfLength(v.length)),$ZodStringFormat.init(g,v)}),$ZodCUID=$constructor("$ZodCUID",(g,v)=>{v.pattern??(v.pattern=cuid$1),$ZodStringFormat.init(g,v)}),$ZodCUID2=$constructor("$ZodCUID2",(g,v)=>{v.pattern??(v.pattern=cuid2$1),$ZodStringFormat.init(g,v)}),$ZodULID=$constructor("$ZodULID",(g,v)=>{v.pattern??(v.pattern=ulid$1),$ZodStringFormat.init(g,v)}),$ZodXID=$constructor("$ZodXID",(g,v)=>{v.pattern??(v.pattern=xid$1),$ZodStringFormat.init(g,v)}),$ZodKSUID=$constructor("$ZodKSUID",(g,v)=>{v.pattern??(v.pattern=ksuid$1),$ZodStringFormat.init(g,v)}),$ZodISODateTime=$constructor("$ZodISODateTime",(g,v)=>{v.pattern??(v.pattern=datetime$1(v)),$ZodStringFormat.init(g,v),(v.local||-1===v.precision)&&(g._zod.bag.laxFormat=!0,g._zod.onattach.push(g=>{g._zod.bag.laxFormat=!0}))}),$ZodISODate=$constructor("$ZodISODate",(g,v)=>{v.pattern??(v.pattern=date$3),$ZodStringFormat.init(g,v)}),$ZodISOTime=$constructor("$ZodISOTime",(g,v)=>{v.pattern??(v.pattern=time$1(v)),$ZodStringFormat.init(g,v)}),$ZodISODuration=$constructor("$ZodISODuration",(g,v)=>{v.pattern??(v.pattern=duration$1),$ZodStringFormat.init(g,v)}),$ZodIPv4=$constructor("$ZodIPv4",(g,v)=>{v.pattern??(v.pattern=ipv4$1),$ZodStringFormat.init(g,v),g._zod.bag.format="ipv4"}),ipv6Alphabet=/^[0-9a-fA-F:.]+$/;function isValidIPv6(g){if(!ipv6Alphabet.test(g))return!1;try{return new URL(`http://[${g}]`),!0}catch{return!1}}const $ZodIPv6=$constructor("$ZodIPv6",(g,v)=>{v.pattern??(v.pattern=ipv6$1),$ZodStringFormat.init(g,v),g._zod.bag.format="ipv6",g._zod.check=D=>{isValidIPv6(D.value)||D.issues.push({code:"invalid_format",format:"ipv6",input:D.value,inst:g,continue:!v.abort})}}),$ZodMAC=$constructor("$ZodMAC",(g,v)=>{v.pattern??(v.pattern=mac$1(v.delimiter)),$ZodStringFormat.init(g,v),g._zod.bag.format="mac"}),$ZodCIDRv4=$constructor("$ZodCIDRv4",(g,v)=>{v.pattern??(v.pattern=cidrv4$1),$ZodStringFormat.init(g,v)});function isValidCIDRv6(g){const v=g.split("/");if(2!==v.length)return!1;const[D,R]=v;if(!R)return!1;const q=Number(R);return`${q}`===R&&(!(q<0||q>128)&&isValidIPv6(D))}const $ZodCIDRv6=$constructor("$ZodCIDRv6",(g,v)=>{v.pattern??(v.pattern=cidrv6$1),$ZodStringFormat.init(g,v),g._zod.check=D=>{isValidCIDRv6(D.value)||D.issues.push({code:"invalid_format",format:"cidrv6",input:D.value,inst:g,continue:!v.abort})}});function isValidBase64(g){if(""===g)return!0;if(/\s/.test(g))return!1;if(g.length%4!=0)return!1;try{return atob(g),!0}catch{return!1}}const $ZodBase64=$constructor("$ZodBase64",(g,v)=>{v.pattern??(v.pattern=base64$1),$ZodStringFormat.init(g,v),g._zod.bag.contentEncoding="base64",g._zod.check=D=>{isValidBase64(D.value)||D.issues.push({code:"invalid_format",format:"base64",input:D.value,inst:g,continue:!v.abort})}});function isValidBase64URL(g){if(!base64url$1.test(g))return!1;const v=g.replace(/[-_]/g,g=>"-"===g?"+":"/");return isValidBase64(v.padEnd(4*Math.ceil(v.length/4),"="))}const $ZodBase64URL=$constructor("$ZodBase64URL",(g,v)=>{v.pattern??(v.pattern=base64url$1),$ZodStringFormat.init(g,v),g._zod.bag.contentEncoding="base64url",g._zod.check=D=>{isValidBase64URL(D.value)||D.issues.push({code:"invalid_format",format:"base64url",input:D.value,inst:g,continue:!v.abort})}}),$ZodE164=$constructor("$ZodE164",(g,v)=>{v.pattern??(v.pattern=e164$1),$ZodStringFormat.init(g,v)}),CC_SANITIZE=/[- ]/g;function isLuhnAlgo(g){let v=g.length,D=1,R=0;for(;v;){const q=+g[--v];D^=1,R+=D?[0,2,4,6,8,1,3,5,7,9][q]:q}return R%10==0}function isValidCreditCard(g){return!!creditCard$1.test(g)&&isLuhnAlgo(g.replace(CC_SANITIZE,""))}const $ZodCreditCard=$constructor("$ZodCreditCard",(g,v)=>{v.pattern??(v.pattern=creditCard$1),$ZodStringFormat.init(g,v),g._zod.check=D=>{isValidCreditCard(D.value)||D.issues.push({code:"invalid_format",format:"credit_card",input:D.value,inst:g,continue:!v.abort})}});function isValidJWT(g,v=null){try{const D=g.split(".");if(3!==D.length)return!1;const[R]=D;if(!R)return!1;const q=JSON.parse(atob(R));return(!("typ"in q)||"JWT"===q?.typ)&&(!!q.alg&&(!v||"alg"in q&&q.alg===v))}catch{return!1}}const $ZodJWT=$constructor("$ZodJWT",(g,v)=>{$ZodStringFormat.init(g,v),g._zod.check=D=>{isValidJWT(D.value,v.alg)||D.issues.push({code:"invalid_format",format:"jwt",input:D.value,inst:g,continue:!v.abort})}}),$ZodCustomStringFormat=$constructor("$ZodCustomStringFormat",(g,v)=>{$ZodStringFormat.init(g,v),g._zod.check=D=>{v.fn(D.value)||D.issues.push({code:"invalid_format",format:v.format,input:D.value,inst:g,continue:!v.abort})}}),$ZodNumber=$constructor("$ZodNumber",(g,v)=>{$ZodType.init(g,v),g._zod.pattern=g._zod.bag.pattern??number$2,g._zod.parse=(D,R)=>{if(v.coerce)try{D.value=Number(D.value)}catch(g){}const q=D.value;if("number"==typeof q&&!Number.isNaN(q)&&Number.isFinite(q))return D;const ie="number"==typeof q?Number.isNaN(q)?"NaN":Number.isFinite(q)?void 0:String(q):void 0;return D.issues.push({expected:"number",code:"invalid_type",input:q,inst:g,...ie?{received:ie}:{}}),D}}),$ZodNumberFormat=$constructor("$ZodNumberFormat",(g,v)=>{$ZodCheckNumberFormat.init(g,v),$ZodNumber.init(g,v)}),$ZodBoolean=$constructor("$ZodBoolean",(g,v)=>{$ZodType.init(g,v),g._zod.pattern=boolean$2,g._zod.parse=(D,R)=>{if(v.coerce)try{D.value=Boolean(D.value)}catch(g){}const q=D.value;return"boolean"==typeof q||D.issues.push({expected:"boolean",code:"invalid_type",input:q,inst:g}),D}}),$ZodBigInt=$constructor("$ZodBigInt",(g,v)=>{$ZodType.init(g,v),g._zod.pattern=bigint$2,g._zod.parse=(D,R)=>{if(v.coerce)try{D.value=BigInt(D.value)}catch(g){}return"bigint"==typeof D.value||D.issues.push({expected:"bigint",code:"invalid_type",input:D.value,inst:g}),D}}),$ZodBigIntFormat=$constructor("$ZodBigIntFormat",(g,v)=>{$ZodCheckBigIntFormat.init(g,v),$ZodBigInt.init(g,v)}),$ZodSymbol=$constructor("$ZodSymbol",(g,v)=>{$ZodType.init(g,v),g._zod.parse=(v,D)=>{const R=v.value;return"symbol"==typeof R||v.issues.push({expected:"symbol",code:"invalid_type",input:R,inst:g}),v}}),$ZodUndefined=$constructor("$ZodUndefined",(g,v)=>{$ZodType.init(g,v),g._zod.pattern=_undefined$2,g._zod.values=new Set([void 0]),g._zod.parse=(v,D)=>{const R=v.value;return void 0===R||v.issues.push({expected:"undefined",code:"invalid_type",input:R,inst:g}),v}}),$ZodNull=$constructor("$ZodNull",(g,v)=>{$ZodType.init(g,v),g._zod.pattern=_null$2,g._zod.values=new Set([null]),g._zod.parse=(v,D)=>{const R=v.value;return null===R||v.issues.push({expected:"null",code:"invalid_type",input:R,inst:g}),v}}),$ZodAny=$constructor("$ZodAny",(g,v)=>{$ZodType.init(g,v),g._zod.parse=g=>g}),$ZodUnknown=$constructor("$ZodUnknown",(g,v)=>{$ZodType.init(g,v),g._zod.parse=g=>g}),$ZodNever=$constructor("$ZodNever",(g,v)=>{$ZodType.init(g,v),g._zod.parse=(v,D)=>(v.issues.push({expected:"never",code:"invalid_type",input:v.value,inst:g}),v)}),$ZodVoid=$constructor("$ZodVoid",(g,v)=>{$ZodType.init(g,v),g._zod.parse=(v,D)=>{const R=v.value;return void 0===R||v.issues.push({expected:"void",code:"invalid_type",input:R,inst:g}),v}}),$ZodDate=$constructor("$ZodDate",(g,v)=>{$ZodType.init(g,v),g._zod.parse=(D,R)=>{if(v.coerce)try{D.value=new Date(D.value)}catch(g){}const q=D.value,ie=q instanceof Date;return ie&&!Number.isNaN(q.getTime())||D.issues.push({expected:"date",code:"invalid_type",input:q,...ie?{received:"Invalid Date"}:{},inst:g}),D}});function handleArrayResult(g,v,D){g.issues.length&&v.issues.push(...prefixIssues(D,g.issues)),v.value[D]=g.value}const $ZodArray=$constructor("$ZodArray",(g,v)=>{$ZodType.init(g,v);const D=globalConfig.memoizer;D?.attach(g),g._zod.parse=(R,q)=>{const ie=R.value;if(!Array.isArray(ie))return R.issues.push({expected:"array",code:"invalid_type",input:ie,inst:g}),R;R.value=D?D.alloc(g,R,Array(ie.length),q):Array(ie.length);const se=[];for(let g=0;g<ie.length;g++){const D=ie[g],ce=v.element._zod.run({value:D,issues:[]},q);ce instanceof Promise?se.push(ce.then(v=>handleArrayResult(v,R,g))):handleArrayResult(ce,R,g)}return se.length?Promise.all(se).then(()=>R):R}});function handlePropertyResult(g,v,D,R,q,ie){const se=D in R,ce="optional"===ie;if(se||!ce||"optional"!==q){if(g.issues.length){if(void 0!==q&&ce&&!se)return;v.issues.push(...prefixIssues(D,g.issues))}se||void 0!==q?void 0===g.value?se&&(v.value[D]=void 0):v.value[D]=g.value:g.issues.length||v.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[D]})}}const NO_SYMBOL_KEYS=[];function normalizeDef(g){const v=Object.keys(g.shape),D=Object.getOwnPropertySymbols(g.shape),R=D.length?D:NO_SYMBOL_KEYS,q=R.length?[...v,...R]:v;for(const v of q)if(!g.shape?.[v]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(v)}": expected a Zod schema`);const ie=optionalKeys(g.shape);return{...g,allKeys:q,symbolKeys:R,keySet:new Set(v),numKeys:v.length,optionalKeys:new Set(ie)}}function handleCatchall(g,v,D,R,q,ie){const se=[],ce=q.keySet,le=q.catchall._zod,me=le.def.type,fe=le.optin,ge=le.optout;for(const q in v){if(ce.has(q))continue;if("__proto__"===q){"never"===me&&se.push(q);continue}if("never"===me){se.push(q);continue}const ie=le.run({value:v[q],issues:[]},R);ie instanceof Promise?g.push(ie.then(g=>handlePropertyResult(g,D,q,v,fe,ge))):handlePropertyResult(ie,D,q,v,fe,ge)}return se.length&&D.issues.push({code:"unrecognized_keys",keys:se,input:v,inst:ie,continue:!0}),g.length?Promise.all(g).then(()=>D):D}const propShapes=new WeakMap,$ZodObject=$constructor("$ZodObject",(g,v)=>{$ZodType.init(g,v);const D=Object.getOwnPropertyDescriptor(v,"shape");if(!D?.get){const g=v.shape;propShapes.set(v,g),Object.defineProperty(v,"shape",{get:()=>{const D={...g};return Object.defineProperty(v,"shape",{value:D}),propShapes.set(v,D),D}})}const R=cached(()=>normalizeDef(v));defineLazyInternal(g,"propValues",g=>{const v=g.def.shape,D={};for(const g in v){const R=v[g]._zod;if(R.values){Object.prototype.hasOwnProperty.call(D,g)||assignProp(D,g,new Set);for(const v of R.values)D[g].add(v);void 0!==R.optin&&D[g].add(void 0)}}return D});const q=isObject,ie=v.catchall;let se;const ce=globalConfig.memoizer;ce?.attach(g),g._zod.parse=(v,D)=>{se??(se=R.value);const le=v.value;if(!q(le))return v.issues.push({expected:"object",code:"invalid_type",input:le,inst:g}),v;v.value=ce?ce.alloc(g,v,{},D):{};const me=[],fe=se.shape;for(const g of se.allKeys){if("__proto__"===g)continue;const R=fe[g],q=R._zod.optin,ie=R._zod.optout,se=R._zod.run({value:le[g],issues:[]},D);se instanceof Promise?me.push(se.then(D=>handlePropertyResult(D,v,g,le,q,ie))):handlePropertyResult(se,v,g,le,q,ie)}return ie?handleCatchall(me,le,v,D,R.value,g):me.length?Promise.all(me).then(()=>v):v}}),$ZodObjectJIT=$constructor("$ZodObjectJIT",(g,v)=>{$ZodObject.init(g,v);const D=g._zod.parse,R=cached(()=>normalizeDef(v)),q=globalConfig.memoizer;let ie;const se=isObject,ce=!globalConfig.jitless,le=ce&&allowsEval.value,me=v.catchall;let fe;g._zod.parse=(ge,ve)=>{fe??(fe=R.value);const xe=ge.value;return se(xe)?ce&&le&&!1===ve?.async&&!0!==ve.jitless?(ie||(ie=(v=>{const D=R.value,ie=D.symbolKeys,se=new Doc(["payload","ctx"],{shape:v,inst:g,memo:q,syms:ie}),parseStr=g=>`shape[${g}]._zod.run({ value: input[${g}], issues: [] }, ctx)`,prefixStr=(g,v)=>`\n for (let i = 0; i < ${g}.issues.length; i++) {\n const iss = ${g}.issues[i];\n iss.path = iss.path ? [${v}, ...iss.path] : [${v}];\n payload.issues.push(iss);\n }`;se.write("const input = payload.value;");const ce=Object.create(null);let le=0;for(const g of D.allKeys)ce[g]="key_"+le++;se.write(q?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(const g of D.allKeys){if("__proto__"===g)continue;const D=ce[g],R="symbol"==typeof g?`syms[${ie.indexOf(g)}]`:esc(g),q=`${R} in input`,le=v[g],me=le?._zod?.optin,fe=void 0!==me,ge="optional"===le?._zod?.optout;if(se.write(`const ${D} = ${parseStr(R)};`),fe&&ge){const g="optional"===me?`${D}_present`:`${D}.value !== undefined || ${D}_present`;se.write(`\n const ${D}_present = ${q};\n if (!${D}.issues.length || ${D}_present) {\n if (${D}.issues.length) {${prefixStr(D,R)}\n }\n\n if (${g}) {\n newResult[${R}] = ${D}.value;\n }\n }\n\n `)}else fe?se.write(`\n if (${D}.issues.length) {${prefixStr(D,R)}\n }\n \n if (${D}.value === undefined) {\n if (${q}) {\n newResult[${R}] = undefined;\n }\n } else {\n newResult[${R}] = ${D}.value;\n }\n\n `):se.write(`\n const ${D}_present = ${q};\n if (${D}.issues.length) {${prefixStr(D,R)}\n }\n if (!${D}_present && !${D}.issues.length) {\n payload.issues.push({\n code: "invalid_type",\n expected: "nonoptional",\n input: undefined,\n path: [${R}]\n });\n }\n\n if (${D}_present) {\n newResult[${R}] = ${D}.value;\n }\n\n `)}return se.write("payload.value = newResult;"),se.write("return payload;"),se.compile()})(v.shape)),ge=ie(ge,ve),me?handleCatchall([],xe,ge,ve,fe,g):ge):D(ge,ve):(ge.issues.push({expected:"object",code:"invalid_type",input:xe,inst:g}),ge)}});function handleUnionResults(g,v,D,R){for(const D of g)if(0===D.issues.length)return v.value=D.value,v;const q=g.filter(g=>!aborted(g));return 1===q.length?(v.value=q[0].value,q[0]):(v.issues.push({code:"invalid_union",input:v.value,inst:D,errors:g.map(g=>g.issues.map(g=>finalizeIssue(g,R,config())))}),v)}const $ZodUnion=$constructor("$ZodUnion",(g,v)=>{$ZodType.init(g,v),defineLazyInternal(g,"optin",g=>g.def.options.some(g=>"defaulted"===g._zod.optin)?"defaulted":g.def.options.some(g=>void 0!==g._zod.optin)?"optional":void 0),defineLazyInternal(g,"optout",g=>g.def.options.some(g=>"optional"===g._zod.optout)?"optional":void 0),defineLazyInternal(g,"values",g=>{if(g.def.options.every(g=>g._zod.values))return new Set(g.def.options.flatMap(g=>Array.from(g._zod.values)))}),defineLazyInternal(g,"pattern",g=>{if(g.def.options.every(g=>g._zod.pattern)){const v=g.def.options.map(g=>g._zod.pattern);return new RegExp(`^(${v.map(g=>cleanRegex(g.source)).join("|")})$`)}});const D=1===v.options.length?v.options[0]._zod.run:null;g._zod.parse=(R,q)=>{if(D)return D(R,q);let ie=!1;const se=[];for(const g of v.options){const v=g._zod.run({value:R.value,issues:[]},q);if(v instanceof Promise)se.push(v),ie=!0;else{if(0===v.issues.length)return v;se.push(v)}}return ie?Promise.all(se).then(v=>handleUnionResults(v,R,g,q)):handleUnionResults(se,R,g,q)}});function handleExclusiveUnionResults(g,v,D,R){const q=[];for(let v=0;v<g.length;v++)0===g[v].issues.length&&q.push(v);return 1===q.length?(v.value=g[q[0]].value,v):(0===q.length?v.issues.push({code:"invalid_union",input:v.value,inst:D,errors:g.map(g=>g.issues.map(g=>finalizeIssue(g,R,config())))}):v.issues.push({code:"invalid_union",input:v.value,inst:D,errors:[],inclusive:!1,matches:q}),v)}const $ZodXor=$constructor("$ZodXor",(g,v)=>{$ZodUnion.init(g,v),v.inclusive=!1;const D=1===v.options.length?v.options[0]._zod.run:null;g._zod.parse=(R,q)=>{if(D)return D(R,q);let ie=!1;const se=[];for(const g of v.options){const v=g._zod.run({value:R.value,issues:[]},q);v instanceof Promise?(se.push(v),ie=!0):se.push(v)}return ie?Promise.all(se).then(v=>handleExclusiveUnionResults(v,R,g,q)):handleExclusiveUnionResults(se,R,g,q)}});function getDiscriminatedOption(g,v){const D=g._zod;let R=D.bag.optionsMap;if(!R){R=new Map;const{options:g,discriminator:v}=D.def;for(const D of g)for(const g of D._zod.propValues?.[v]??[])R.has(g)||R.set(g,D);D.bag.optionsMap=R}return R.get(v)}const $ZodDiscriminatedUnion=$constructor("$ZodDiscriminatedUnion",(g,v)=>{v.inclusive=!1,$ZodUnion.init(g,v);const D=g._zod.parse;defineLazyInternal(g,"propValues",g=>{const v={};for(const D of g.def.options){const R=D._zod.propValues;if(!R||0===Object.keys(R).length)throw new Error(`Invalid discriminated union option at index "${g.def.options.indexOf(D)}"`);for(const[g,D]of Object.entries(R)){Object.prototype.hasOwnProperty.call(v,g)||assignProp(v,g,new Set);for(const R of D)v[g].add(R)}}return v}),v.options.forEach((g,D)=>{const R=propShapes.get(g._zod.def);if(R&&!Object.prototype.hasOwnProperty.call(R,v.discriminator))throw new Error(`Invalid discriminated union option at index "${D}"`)});const R=cached(()=>{const g=v.options,D=new Map;for(const R of g){const g=R._zod.propValues?.[v.discriminator];if(!g||0===g.size)throw new Error(`Invalid discriminated union option at index "${v.options.indexOf(R)}"`);for(const v of g){if(D.has(v))throw new Error(`Duplicate discriminator value "${String(v)}"`);D.set(v,R)}}return D});g._zod.parse=(q,ie)=>{const se=q.value;if(!isObject(se))return q.issues.push({code:"invalid_type",expected:"object",input:se,inst:g}),q;const ce=R.value.get(se?.[v.discriminator]);return ce?ce._zod.run(q,ie):v.unionFallback||"backward"===ie.direction?D(q,ie):(q.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:v.discriminator,options:Array.from(R.value.keys()),input:se,path:[v.discriminator],inst:g}),q)}}),$ZodIntersection=$constructor("$ZodIntersection",(g,v)=>{$ZodType.init(g,v),g._zod.parse=(g,D)=>{const R=g.value,q=v.left._zod.run({value:R,issues:[]},D),ie=v.right._zod.run({value:R,issues:[]},D);return q instanceof Promise||ie instanceof Promise?Promise.all([q,ie]).then(([v,D])=>handleIntersectionResults(g,v,D)):handleIntersectionResults(g,q,ie)}});function mergeValues(g,v){if(g===v)return{valid:!0,data:g};if(g instanceof Date&&v instanceof Date&&+g===+v)return{valid:!0,data:g};if(isPlainObject(g)&&isPlainObject(v)){const D=Object.keys(v),R=Object.keys(g).filter(g=>-1!==D.indexOf(g)),q={...g,...v};Object.prototype.hasOwnProperty.call(q,"__proto__")&&delete q.__proto__;for(const D of R){if("__proto__"===D)continue;const R=mergeValues(g[D],v[D]);if(!R.valid)return{valid:!1,mergeErrorPath:[D,...R.mergeErrorPath]};q[D]=R.data}return{valid:!0,data:q}}if(Array.isArray(g)&&Array.isArray(v)){if(g.length!==v.length)return{valid:!1,mergeErrorPath:[]};const D=[];for(let R=0;R<g.length;R++){const q=mergeValues(g[R],v[R]);if(!q.valid)return{valid:!1,mergeErrorPath:[R,...q.mergeErrorPath]};D.push(q.data)}return{valid:!0,data:D}}return{valid:!1,mergeErrorPath:[]}}function handleIntersectionResults(g,v,D){const R=new Map;let q;const ie=new Map,collect=(g,v)=>{let D;if("unrecognized_keys"!==g.code||g.path?.length){if("invalid_key"!==g.code||"record"!==g.origin||1!==g.path?.length)return!1;{const v=String(g.path[0]);ie.has(v)||ie.set(v,g),D=[v]}}else q??(q=g),D=g.keys;for(const g of D)R.has(g)||R.set(g,{}),R.get(g)[v]=!0;return!0};for(const D of v.issues)collect(D,"l")||g.issues.push(D);for(const v of D.issues)collect(v,"r")||g.issues.push(v);const se=[...R].filter(([,g])=>g.l&&g.r).map(([g])=>g);if(se.length){const v=q?se.filter(g=>q.keys.includes(g)):[];v.length&&g.issues.push({...q,keys:v});for(const D of se)!v.includes(D)&&ie.has(D)&&g.issues.push(ie.get(D))}const ce=mergeValues(v.value,D.value);if(!ce.valid){if(aborted(g))return g;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(ce.mergeErrorPath)}`)}return g.value=ce.data,g}const $ZodTuple=$constructor("$ZodTuple",(g,v)=>{$ZodType.init(g,v);const D=v.items,R=globalConfig.memoizer;R?.attach(g),g._zod.parse=(q,ie)=>{const se=q.value;if(!Array.isArray(se))return q.issues.push({input:se,inst:g,expected:"tuple",code:"invalid_type"}),q;q.value=R?R.alloc(g,q,[],ie):[];const ce=[],le=getTupleOptStart$1(D,"optin"),me=getTupleOptStart$1(D,"optout");if(!v.rest){if(se.length<le)return q.issues.push({code:"too_small",minimum:le,inclusive:!0,input:se,inst:g,origin:"array"}),q;se.length>D.length&&q.issues.push({code:"too_big",maximum:D.length,inclusive:!0,input:se,inst:g,origin:"array"})}const fe=new Array(D.length);for(let g=0;g<D.length;g++){const v=D[g]._zod.run({value:se[g],issues:[]},ie);v instanceof Promise?ce.push(v.then(v=>{fe[g]=v})):fe[g]=v}if(v.rest){let g=D.length-1;const R=se.slice(D.length);for(const D of R){g++;const R=v.rest._zod.run({value:D,issues:[]},ie);R instanceof Promise?ce.push(R.then(v=>handleTupleResult(v,q,g))):handleTupleResult(R,q,g)}}return ce.length?Promise.all(ce).then(()=>handleTupleResults(fe,q,D,se,me)):handleTupleResults(fe,q,D,se,me)}});function getTupleOptStart$1(g,v){for(let D=g.length-1;D>=0;D--){if(!("optin"===v?void 0!==g[D]._zod.optin:"optional"===g[D]._zod.optout))return D+1}return 0}function handleTupleResult(g,v,D){g.issues.length&&v.issues.push(...prefixIssues(D,g.issues)),v.value[D]=g.value}function handleTupleResults(g,v,D,R,q){for(let ie=0;ie<D.length;ie++){const se=g[ie],ce=ie<R.length;if(!ce&&ie>=q&&"optional"===D[ie]._zod.optin){v.value.length=ie;break}if(se.issues.length){if(!ce&&ie>=q){v.value.length=ie;break}v.issues.push(...prefixIssues(ie,se.issues))}v.value[ie]=se.value}for(let g=v.value.length-1;g>=R.length&&("optional"===D[g]._zod.optout&&void 0===v.value[g]);g--)v.value.length=g;return v}const $ZodRecord=$constructor("$ZodRecord",(g,v)=>{$ZodType.init(g,v);const D=globalConfig.memoizer;D?.attach(g),g._zod.parse=(R,q)=>{const ie=R.value;if(!isPlainObject(ie))return R.issues.push({expected:"record",code:"invalid_type",input:ie,inst:g}),R;const se=[],ce=v.keyType._zod.values;if(ce&&!v.partial){R.value=D?D.alloc(g,R,{},q):{};const le=new Set;for(const D of ce)if("string"==typeof D||"number"==typeof D||"symbol"==typeof D){if(le.add("number"==typeof D?D.toString():D),"__proto__"===D)continue;const ce=v.keyType._zod.run({value:D,issues:[]},q);if(ce instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(ce.issues.length){R.issues.push({code:"invalid_key",origin:"record",issues:ce.issues.map(g=>finalizeIssue(g,q,config())),input:D,path:[D],inst:g});continue}const me=ce.value;if("__proto__"===me)continue;const fe=v.valueType._zod.run({value:ie[D],issues:[]},q);fe instanceof Promise?se.push(fe.then(g=>{g.issues.length&&R.issues.push(...prefixIssues(D,g.issues)),R.value[me]=g.value})):(fe.issues.length&&R.issues.push(...prefixIssues(D,fe.issues)),R.value[me]=fe.value)}let me;for(const g in ie)if(!le.has(g))if("loose"===v.mode){if("__proto__"===g)continue;R.value[g]=ie[g]}else me=me??[],me.push(g);me&&me.length>0&&R.issues.push({code:"unrecognized_keys",input:ie,inst:g,keys:me,continue:!0})}else{let le;R.value=D?D.alloc(g,R,{},q):{};for(const D of Reflect.ownKeys(ie)){if("__proto__"===D)continue;if(!Object.prototype.propertyIsEnumerable.call(ie,D))continue;let me=v.keyType._zod.run({value:D,issues:[]},q);if(me instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if("string"==typeof D&&number$2.test(D)&&me.issues.length){const g=v.keyType._zod.run({value:Number(D),issues:[]},q);if(g instanceof Promise)throw new Error("Async schemas not supported in object keys currently");0===g.issues.length&&(me=g)}if(me.issues.length){"loose"===v.mode?R.value[D]=ie[D]:ce?(le=le??[],le.push(D)):R.issues.push({code:"invalid_key",origin:"record",issues:me.issues.map(g=>finalizeIssue(g,q,config())),input:D,path:[D],inst:g});continue}const fe=me.value;if("__proto__"===fe)continue;const ge=v.valueType._zod.run({value:ie[D],issues:[]},q);ge instanceof Promise?se.push(ge.then(g=>{g.issues.length&&R.issues.push(...prefixIssues(D,g.issues)),R.value[fe]=g.value})):(ge.issues.length&&R.issues.push(...prefixIssues(D,ge.issues)),R.value[fe]=ge.value)}le&&le.length>0&&R.issues.push({code:"unrecognized_keys",input:ie,inst:g,keys:le,continue:!0})}return se.length?Promise.all(se).then(()=>R):R}}),$ZodMap=$constructor("$ZodMap",(g,v)=>{$ZodType.init(g,v);const D=globalConfig.memoizer;D?.attach(g),g._zod.parse=(R,q)=>{const ie=R.value;if(!(ie instanceof Map))return R.issues.push({expected:"map",code:"invalid_type",input:ie,inst:g}),R;const se=[];R.value=D?D.alloc(g,R,new Map,q):new Map;for(const[D,ce]of ie){const le=v.keyType._zod.run({value:D,issues:[]},q),me=v.valueType._zod.run({value:ce,issues:[]},q);le instanceof Promise||me instanceof Promise?se.push(Promise.all([le,me]).then(([v,se])=>{handleMapResult(v,se,R,D,ie,g,q)})):handleMapResult(le,me,R,D,ie,g,q)}return se.length?Promise.all(se).then(()=>R):R}});function handleMapResult(g,v,D,R,q,ie,se){g.issues.length&&(propertyKeyTypes.has(typeof R)?D.issues.push(...prefixIssues(R,g.issues)):D.issues.push({code:"invalid_key",origin:"map",input:q,inst:ie,issues:g.issues.map(g=>finalizeIssue(g,se,config()))})),v.issues.length&&(propertyKeyTypes.has(typeof R)?D.issues.push(...prefixIssues(R,v.issues)):D.issues.push({origin:"map",code:"invalid_element",input:q,inst:ie,key:R,issues:v.issues.map(g=>finalizeIssue(g,se,config()))})),D.value.set(g.value,v.value)}const $ZodSet=$constructor("$ZodSet",(g,v)=>{$ZodType.init(g,v);const D=globalConfig.memoizer;D?.attach(g),g._zod.parse=(R,q)=>{const ie=R.value;if(!(ie instanceof Set))return R.issues.push({input:ie,inst:g,expected:"set",code:"invalid_type"}),R;const se=[];R.value=D?D.alloc(g,R,new Set,q):new Set;for(const g of ie){const D=v.valueType._zod.run({value:g,issues:[]},q);D instanceof Promise?se.push(D.then(g=>handleSetResult(g,R))):handleSetResult(D,R)}return se.length?Promise.all(se).then(()=>R):R}});function handleSetResult(g,v){g.issues.length&&v.issues.push(...g.issues),v.value.add(g.value)}const $ZodEnum=$constructor("$ZodEnum",(g,v)=>{$ZodType.init(g,v);const D=getEnumValues(v.entries),R=new Set(D);g._zod.values=R;const q=D.filter(g=>propertyKeyTypes.has(typeof g));g._zod.pattern=new RegExp(q.length?`^(${q.map(g=>escapeRegex$1(g.toString())).join("|")})$`:"^[^\\s\\S]$"),g._zod.parse=(v,q)=>{const ie=v.value;return R.has(ie)||v.issues.push({code:"invalid_value",values:D,input:ie,inst:g}),v}}),$ZodLiteral=$constructor("$ZodLiteral",(g,v)=>{$ZodType.init(g,v);const D=new Set(v.values);g._zod.values=D,g._zod.pattern=new RegExp(v.values.length?`^(${v.values.map(g=>"string"==typeof g?escapeRegex$1(g):g?escapeRegex$1(g.toString()):String(g)).join("|")})$`:"^[^\\s\\S]$"),g._zod.parse=(R,q)=>{const ie=R.value;return D.has(ie)||R.issues.push({code:"invalid_value",values:v.values,input:ie,inst:g}),R}}),$ZodFile=$constructor("$ZodFile",(g,v)=>{$ZodType.init(g,v),g._zod.parse=(v,D)=>{const R=v.value;return R instanceof File||v.issues.push({expected:"file",code:"invalid_type",input:R,inst:g}),v}}),$ZodTransform=$constructor("$ZodTransform",(g,v)=>{$ZodType.init(g,v),g._zod.optin="optional",globalConfig.memoizer?.guard(g),g._zod.parse=(D,R)=>{if("backward"===R.direction)throw new $ZodEncodeError(g.constructor.name);const q=v.transform(D.value,D);if(R.async){return(q instanceof Promise?q:Promise.resolve(q)).then(g=>(D.value=g,D))}if(q instanceof Promise)throw new $ZodAsyncError;return D.value=q,D}});function handleOptionalResult(g,v){return g.value=v.issues.length?void 0:v.value,g}const $ZodOptional=$constructor("$ZodOptional",(g,v)=>{$ZodType.init(g,v),defineLazyInternal(g,"optin",g=>"defaulted"===g.def.innerType._zod.optin?"defaulted":"optional"),g._zod.optout="optional",defineLazyInternal(g,"values",g=>{const v=g.def.innerType._zod.values;return v?new Set([...v,void 0]):void 0}),defineLazyInternal(g,"pattern",g=>{const v=g.def.innerType._zod.pattern;return v?new RegExp(`^(${cleanRegex(v.source)})?$`):void 0}),g._zod.parse=(g,D)=>{if(void 0===g.value){if("defaulted"!==v.innerType._zod.optin)return g;const R=v.innerType._zod.run({value:g.value,issues:[]},D);return R instanceof Promise?R.then(v=>handleOptionalResult(g,v)):handleOptionalResult(g,R)}return v.innerType._zod.run(g,D)}}),$ZodExactOptional=$constructor("$ZodExactOptional",(g,v)=>{$ZodOptional.init(g,v),defineLazyInternal(g,"values",g=>g.def.innerType._zod.values),defineLazyInternal(g,"pattern",g=>g.def.innerType._zod.pattern),g._zod.parse=(g,D)=>v.innerType._zod.run(g,D)}),$ZodNullable=$constructor("$ZodNullable",(g,v)=>{$ZodType.init(g,v),defineLazyInternal(g,"optin",g=>g.def.innerType._zod.optin),defineLazyInternal(g,"optout",g=>g.def.innerType._zod.optout),defineLazyInternal(g,"pattern",g=>{const v=g.def.innerType._zod.pattern;return v?new RegExp(`^(${cleanRegex(v.source)}|null)$`):void 0}),defineLazyInternal(g,"values",g=>g.def.innerType._zod.values?new Set([...g.def.innerType._zod.values,null]):void 0),g._zod.parse=(g,D)=>null===g.value?g:v.innerType._zod.run(g,D)}),$ZodDefault=$constructor("$ZodDefault",(g,v)=>{$ZodType.init(g,v),g._zod.optin="defaulted",defineLazyInternal(g,"values",g=>g.def.innerType._zod.values),g._zod.parse=(g,D)=>{if("backward"===D.direction)return v.innerType._zod.run(g,D);if(void 0===g.value)return g.value=v.defaultValue,g;const R=v.innerType._zod.run(g,D);return R instanceof Promise?R.then(g=>handleDefaultResult(g,v)):handleDefaultResult(R,v)}});function handleDefaultResult(g,v){return void 0===g.value&&(g.value=v.defaultValue),g}const $ZodPrefault=$constructor("$ZodPrefault",(g,v)=>{$ZodType.init(g,v),g._zod.optin="defaulted",defineLazyInternal(g,"values",g=>g.def.innerType._zod.values),g._zod.parse=(g,D)=>("backward"===D.direction||void 0===g.value&&(g.value=v.defaultValue),v.innerType._zod.run(g,D))}),$ZodNonOptional=$constructor("$ZodNonOptional",(g,v)=>{$ZodType.init(g,v),defineLazyInternal(g,"values",g=>{const v=g.def.innerType._zod.values;return v?new Set([...v].filter(g=>void 0!==g)):void 0}),g._zod.parse=(D,R)=>{const q=v.innerType._zod.run(D,R);return q instanceof Promise?q.then(v=>handleNonOptionalResult(v,g)):handleNonOptionalResult(q,g)}});function handleNonOptionalResult(g,v){return g.issues.length||void 0!==g.value||g.issues.push({code:"invalid_type",expected:"nonoptional",input:g.value,inst:v}),g}const $ZodSuccess=$constructor("$ZodSuccess",(g,v)=>{$ZodType.init(g,v),g._zod.parse=(g,D)=>{if("backward"===D.direction)throw new $ZodEncodeError("ZodSuccess");const R=v.innerType._zod.run(g,D);return R instanceof Promise?R.then(v=>(g.value=0===v.issues.length,g)):(g.value=0===R.issues.length,g)}});function handleCatchResult(g,v,D,R){return v.issues.length?(g.value=D.catchValue({...v,value:g.value,error:{issues:v.issues.map(g=>finalizeIssue(g,R,config()))},input:g.value}),g):(g.value=v.value,v.memo&&(g.memo=!0),g)}const $ZodCatch=$constructor("$ZodCatch",(g,v)=>{$ZodType.init(g,v),defineLazyInternal(g,"optin",g=>"defaulted"===g.def.innerType._zod.optin?"defaulted":"optional"),defineLazyInternal(g,"optout",g=>g.def.innerType._zod.optout),defineLazyInternal(g,"values",g=>g.def.innerType._zod.values),g._zod.parse=(g,D)=>{if("backward"===D.direction)return v.innerType._zod.run(g,D);const R=v.innerType._zod.run({value:g.value,issues:[]},D);return R instanceof Promise?R.then(R=>handleCatchResult(g,R,v,D)):handleCatchResult(g,R,v,D)}}),$ZodNaN=$constructor("$ZodNaN",(g,v)=>{$ZodType.init(g,v),g._zod.parse=(v,D)=>("number"==typeof v.value&&Number.isNaN(v.value)||v.issues.push({input:v.value,inst:g,expected:"nan",code:"invalid_type"}),v)}),$ZodPipe=$constructor("$ZodPipe",(g,v)=>{$ZodType.init(g,v),defineLazyInternal(g,"values",g=>g.def.in._zod.values),defineLazyInternal(g,"optin",g=>g.def.in._zod.optin),defineLazyInternal(g,"optout",g=>g.def.out._zod.optout),defineLazyInternal(g,"propValues",g=>g.def.in._zod.propValues),g._zod.parse=(g,D)=>{if("backward"===D.direction){const R=v.out._zod.run(g,D);return R instanceof Promise?R.then(g=>handlePipeResult(g,v.in,D)):handlePipeResult(R,v.in,D)}const R=v.in._zod.run(g,D);return R instanceof Promise?R.then(g=>handlePipeResult(g,v.out,D)):handlePipeResult(R,v.out,D)}});function handlePipeResult(g,v,D){return g.issues.some(g=>"unrecognized_keys"!==g.code)?(g.aborted=!0,g):v._zod.run({value:g.value,issues:g.issues},D)}const $ZodCodec=$constructor("$ZodCodec",(g,v)=>{$ZodType.init(g,v),defineLazyInternal(g,"values",g=>g.def.in._zod.values),defineLazyInternal(g,"optin",g=>g.def.in._zod.optin),defineLazyInternal(g,"optout",g=>g.def.out._zod.optout),defineLazyInternal(g,"propValues",g=>g.def.in._zod.propValues),g._zod.parse=(g,D)=>{if("forward"===(D.direction||"forward")){const R=v.in._zod.run(g,D);return R instanceof Promise?R.then(g=>handleCodecAResult(g,v,D)):handleCodecAResult(R,v,D)}{const R=v.out._zod.run(g,D);return R instanceof Promise?R.then(g=>handleCodecAResult(g,v,D)):handleCodecAResult(R,v,D)}}});function handleCodecAResult(g,v,D){if(g.issues.length)return g.aborted=!0,g;if("forward"===(D.direction||"forward")){const R=v.transform(g.value,g);return R instanceof Promise?R.then(R=>handleCodecTxResult(g,R,v.out,D)):handleCodecTxResult(g,R,v.out,D)}{const R=v.reverseTransform(g.value,g);return R instanceof Promise?R.then(R=>handleCodecTxResult(g,R,v.in,D)):handleCodecTxResult(g,R,v.in,D)}}function handleCodecTxResult(g,v,D,R){return g.issues.length?(g.aborted=!0,g):D._zod.run({value:v,issues:g.issues},R)}const $ZodPreprocess=$constructor("$ZodPreprocess",(g,v)=>{$ZodPipe.init(g,v)}),$ZodReadonly=$constructor("$ZodReadonly",(g,v)=>{$ZodType.init(g,v),defineLazyInternal(g,"propValues",g=>g.def.innerType._zod.propValues),defineLazyInternal(g,"values",g=>g.def.innerType._zod.values),defineLazyInternal(g,"optin",g=>g.def.innerType?._zod?.optin),defineLazyInternal(g,"optout",g=>g.def.innerType?._zod?.optout),g._zod.parse=(g,D)=>{if("backward"===D.direction)return v.innerType._zod.run(g,D);const R=v.innerType._zod.run(g,D);return R instanceof Promise?R.then(handleReadonlyResult):handleReadonlyResult(R)}});function handleReadonlyResult(g){return g.memo||(g.value=Object.freeze(g.value)),g}const $ZodTemplateLiteral=$constructor("$ZodTemplateLiteral",(g,v)=>{$ZodType.init(g,v);const D=[];for(const g of v.parts)if("object"==typeof g&&null!==g){if(!g._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...g._zod.traits].shift()}`);const v=g._zod.pattern instanceof RegExp?g._zod.pattern.source:g._zod.pattern;if(!v)throw new Error(`Invalid template literal part: ${g._zod.traits}`);const R=v.startsWith("^")?1:0,q=v.endsWith("$")?v.length-1:v.length;D.push(v.slice(R,q))}else{if(null!==g&&!primitiveTypes.has(typeof g))throw new Error(`Invalid template literal part: ${g}`);D.push(escapeRegex$1(`${g}`))}g._zod.pattern=new RegExp(`^${D.join("")}$`),g._zod.parse=(D,R)=>"string"!=typeof D.value?(D.issues.push({input:D.value,inst:g,expected:"string",code:"invalid_type"}),D):(g._zod.pattern.lastIndex=0,g._zod.pattern.test(D.value)||D.issues.push({input:D.value,inst:g,code:"invalid_format",format:v.format??"template_literal",pattern:g._zod.pattern.source}),D)}),$ZodFunction=$constructor("$ZodFunction",(g,v)=>($ZodType.init(g,v),Object.defineProperty(g,"_def",{value:v}),g._zod.def=v,g.implement=v=>{if("function"!=typeof v)throw new Error("implement() must be called with a function");return Object.defineProperty(function(...D){const R=g._def.input?parse$1(g._def.input,D):D,q=Reflect.apply(v,this,R);return g._def.output?parse$1(g._def.output,q):q},"_zod",{value:g._zod,enumerable:!1})},g.implementAsync=v=>{if("function"!=typeof v)throw new Error("implementAsync() must be called with a function");return Object.defineProperty(async function(...D){const R=g._def.input?await parseAsync$1(g._def.input,D):D,q=await Reflect.apply(v,this,R);return g._def.output?await parseAsync$1(g._def.output,q):q},"_zod",{value:g._zod,enumerable:!1})},g._zod.parse=(v,D)=>{if("function"!=typeof v.value)return v.issues.push({code:"invalid_type",expected:"function",input:v.value,inst:g}),v;const R=g._def.output&&"promise"===g._def.output._zod.def.type;return v.value=R?g.implementAsync(v.value):g.implement(v.value),v},g.input=(...v)=>{const D=g.constructor;return Array.isArray(v[0])?new D({type:"function",input:new $ZodTuple({type:"tuple",items:v[0],rest:v[1]}),output:g._def.output}):new D({type:"function",input:v[0],output:g._def.output})},g.output=v=>new(0,g.constructor)({type:"function",input:g._def.input,output:v}),g)),$ZodPromise=$constructor("$ZodPromise",(g,v)=>{$ZodType.init(g,v),g._zod.parse=(g,D)=>Promise.resolve(g.value).then(g=>v.innerType._zod.run({value:g,issues:[]},D))}),$ZodLazy=$constructor("$ZodLazy",(g,v)=>{$ZodType.init(g,v),defineLazy(g._zod,"innerType",()=>{const g=v;return g._cachedInner||(g._cachedInner=v.getter()),g._cachedInner}),defineLazyInternal(g,"pattern",g=>g.innerType?._zod?.pattern),defineLazyInternal(g,"propValues",g=>g.innerType?._zod?.propValues),defineLazyInternal(g,"optin",g=>g.innerType?._zod?.optin??void 0),defineLazyInternal(g,"optout",g=>g.innerType?._zod?.optout??void 0),g._zod.parse=(v,D)=>g._zod.innerType._zod.run(v,D)}),$ZodCustom=$constructor("$ZodCustom",(g,v)=>{$ZodCheck.init(g,v),$ZodType.init(g,v),g._zod.parse=(g,v)=>g,g._zod.check=D=>{const R=D.value,q=v.fn(R);if(q instanceof Promise)return q.then(v=>handleRefineResult(v,D,R,g));handleRefineResult(q,D,R,g)}});function handleRefineResult(g,v,D,R){if(!g){const g={code:"custom",input:D,inst:R,path:[...R._zod.def.path??[]],continue:!R._zod.def.abort};R._zod.def.params&&(g.params=R._zod.def.params),v.issues.push(issue(g))}}class $ZodCyclicError extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}const STATE="~memo",NO_ISSUES=[];function cloneIssues(g){return g.map(g=>g.path?{...g,path:g.path.slice()}:{...g})}const recursive=new WeakMap;function isRecursive(g,v){const D=recursive.get(g);if(void 0!==D)return D;if(v.has(g))return!0;v.add(g);let R=!1;const check=g=>{!R&&g?._zod&&isRecursive(g,v)&&(R=!0)},q=g._zod.def;switch(q.type){case"object":for(const g of Reflect.ownKeys(q.shape))check(q.shape[g]);check(q.catchall);break;case"array":check(q.element);break;case"tuple":for(const g of q.items)check(g);check(q.rest);break;case"record":case"map":check(q.keyType),check(q.valueType);break;case"set":check(q.valueType);break;case"union":for(const g of q.options)check(g);break;case"intersection":check(q.left),check(q.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":check(q.innerType);break;case"pipe":check(q.in),check(q.out);break;case"function":check(q.input),check(q.output);break;case"lazy":check(g._zod.innerType);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(const g in q){const v=Object.getOwnPropertyDescriptor(q,g);if(!v||v.get)continue;const D=v.value;if(D&&"object"==typeof D)if(D._zod)check(D);else if(Array.isArray(D))for(const g of D)check(g)}}return v.delete(g),recursive.set(g,R),R}function isRecursiveSchema(g){return isRecursive(g,new Set)}function bucketFor(g,v){let D=g.buckets.get(v);return D||(D=new Map,g.buckets.set(v,D)),D}let handoff;const open=[],memo={alloc(g,v,D){const R=handoff;if(!R)return D;handoff=void 0;const q={value:D,issues:null};return R.set(v.value,q),open.push(q),D},guard(g){var v;(v=g._zod).deferred??(v.deferred=[]),g._zod.deferred.push(()=>{const v=g._zod.parse,wrapped=(g,D)=>{if("backward"!==D.direction&&isBackEdge(D,g.value))throw new $ZodCyclicError;return v(g,D)};g._zod.parse=wrapped,g._zod.run===v&&(g._zod.run=wrapped)})},attach(g){var v;let D,R,q;(v=g._zod).deferred??(v.deferred=[]),g._zod.deferred.push(()=>{const v=g._zod.parse,wrapped=(ie,se)=>{if(void 0===D&&(D=isRecursive(g,new Set),!D))return g._zod.parse=v,g._zod.run===wrapped&&(g._zod.run=v),v(ie,se);const ce=ie.value;if(null===ce||"object"!=typeof ce)return v(ie,se);let le,me=se[STATE];me||(me={buckets:new Map,backEdges:void 0},se[STATE]=me),R===se?le=q:(le=bucketFor(me,g),R=se,q=le);const fe=le.get(ce);if(fe)return ie.value=fe.value,fe.issues?fe.issues.length&&ie.issues.push(...cloneIssues(fe.issues)):(ie.memo=!0,me.backEdges??(me.backEdges=new Set),me.backEdges.add(fe.value)),ie;handoff=le;const ge=open.length,ve=v(ie,se);handoff=void 0;const xe=open.length>ge?open.pop():void 0;return ve instanceof Promise?ve.then(g=>(xe&&(xe.issues=g.issues.length?cloneIssues(g.issues):NO_ISSUES),g)):(xe&&(xe.issues=ve.issues.length?cloneIssues(ve.issues):NO_ISSUES),ve)};g._zod.parse=wrapped,g._zod.run===v&&(g._zod.run=wrapped)})}};function memoizer(){return memo}function isBackEdge(g,v){const D=g[STATE]?.backEdges;return void 0!==D&&null!==v&&"object"==typeof v&&D.has(v)}const error$X=()=>{const g={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"},map:{unit:"عنصر",verb:"أن يحوي"}};function getSizing(v){return g[v]??null}const v={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",mac:"عنوان MAC",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",credit_card:"رقم بطاقة الائتمان",jwt:"JWT",template_literal:"مدخل"},D={nan:"NaN"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`مدخلات غير مقبولة: يفترض إدخال instanceof ${g.expected}، ولكن تم إدخال ${q}`:`مدخلات غير مقبولة: يفترض إدخال ${v}، ولكن تم إدخال ${q}`}case"invalid_value":return 1===g.values.length?`مدخلات غير مقبولة: يفترض إدخال ${stringifyPrimitive(g.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?` أكبر من اللازم: يفترض أن تكون ${g.origin??"القيمة"} ${v} ${g.maximum.toString()} ${D.unit??"عنصر"}`:`أكبر من اللازم: يفترض أن تكون ${g.origin??"القيمة"} ${v} ${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`أصغر من اللازم: يفترض لـ ${g.origin} أن يكون ${v} ${g.minimum.toString()} ${D.unit}`:`أصغر من اللازم: يفترض لـ ${g.origin} أن يكون ${v} ${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`نَص غير مقبول: يجب أن يبدأ بـ "${g.prefix}"`:"ends_with"===D.format?`نَص غير مقبول: يجب أن ينتهي بـ "${D.suffix}"`:"includes"===D.format?`نَص غير مقبول: يجب أن يتضمَّن "${D.includes}"`:"regex"===D.format?`نَص غير مقبول: يجب أن يطابق النمط ${D.pattern}`:`${v[D.format]??g.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${g.divisor}`;case"unrecognized_keys":return`معرف${g.keys.length>1?"ات":""} غريب${g.keys.length>1?"ة":""}: ${joinValues(g.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${g.origin}`;case"invalid_union":default:return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${g.origin}`}}};function ar(){return{localeError:error$X()}}const error$W=()=>{const g={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"},map:{unit:"element",verb:"olmalıdır"}};function getSizing(v){return g[v]??null}const v={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",credit_card:"kredit kartı nömrəsi",jwt:"JWT",template_literal:"input"},D={nan:"NaN"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`Yanlış dəyər: gözlənilən instanceof ${g.expected}, daxil olan ${q}`:`Yanlış dəyər: gözlənilən ${v}, daxil olan ${q}`}case"invalid_value":return 1===g.values.length?`Yanlış dəyər: gözlənilən ${stringifyPrimitive(g.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`Çox böyük: gözlənilən ${g.origin??"dəyər"} ${v}${g.maximum.toString()} ${D.unit??"element"}`:`Çox böyük: gözlənilən ${g.origin??"dəyər"} ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`Çox kiçik: gözlənilən ${g.origin} ${v}${g.minimum.toString()} ${D.unit}`:`Çox kiçik: gözlənilən ${g.origin} ${v}${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`Yanlış mətn: "${D.prefix}" ilə başlamalıdır`:"ends_with"===D.format?`Yanlış mətn: "${D.suffix}" ilə bitməlidir`:"includes"===D.format?`Yanlış mətn: "${D.includes}" daxil olmalıdır`:"regex"===D.format?`Yanlış mətn: ${D.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${v[D.format]??g.format}`}case"not_multiple_of":return`Yanlış ədəd: ${g.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${g.keys.length>1?"lar":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`${g.origin} daxilində yanlış açar`;case"invalid_union":default:return"Yanlış dəyər";case"invalid_element":return`${g.origin} daxilində yanlış dəyər`}}};function az(){return{localeError:error$W()}}function getBelarusianPlural(g,v,D,R){const q=Math.abs(g),ie=q%10,se=q%100;return se>=11&&se<=19?R:1===ie?v:ie>=2&&ie<=4?D:R}const error$V=()=>{const g={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},map:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function getSizing(v){return g[v]??null}const v={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",mac:"MAC адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",credit_card:"нумар крэдытнай карты",jwt:"JWT",template_literal:"увод"},D={nan:"NaN",number:"лік",array:"масіў"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`Няправільны ўвод: чакаўся instanceof ${g.expected}, атрымана ${q}`:`Няправільны ўвод: чакаўся ${v}, атрымана ${q}`}case"invalid_value":return 1===g.values.length?`Няправільны ўвод: чакалася ${stringifyPrimitive(g.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);if(D){const R=getBelarusianPlural(Number(g.maximum),D.unit.one,D.unit.few,D.unit.many);return`Занадта вялікі: чакалася, што ${g.origin??"значэнне"} павінна ${D.verb} ${v}${g.maximum.toString()} ${R}`}return`Занадта вялікі: чакалася, што ${g.origin??"значэнне"} павінна быць ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);if(D){const R=getBelarusianPlural(Number(g.minimum),D.unit.one,D.unit.few,D.unit.many);return`Занадта малы: чакалася, што ${g.origin} павінна ${D.verb} ${v}${g.minimum.toString()} ${R}`}return`Занадта малы: чакалася, што ${g.origin} павінна быць ${v}${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`Няправільны радок: павінен пачынацца з "${D.prefix}"`:"ends_with"===D.format?`Няправільны радок: павінен заканчвацца на "${D.suffix}"`:"includes"===D.format?`Няправільны радок: павінен змяшчаць "${D.includes}"`:"regex"===D.format?`Няправільны радок: павінен адпавядаць шаблону ${D.pattern}`:`Няправільны ${v[D.format]??g.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${g.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${g.keys.length>1?"ключы":"ключ"}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${g.origin}`;case"invalid_union":default:return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${g.origin}`}}};function be(){return{localeError:error$V()}}const error$U=()=>{const g={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"},map:{unit:"елемента",verb:"да съдържа"}};function getSizing(v){return g[v]??null}const v={regex:"вход",email:"имейл адрес",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO време",date:"ISO дата",time:"ISO време",duration:"ISO продължителност",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",mac:"MAC адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",credit_card:"номер на кредитна карта",jwt:"JWT",template_literal:"вход"},D={nan:"NaN",number:"число",array:"масив"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`Невалиден вход: очакван instanceof ${g.expected}, получен ${q}`:`Невалиден вход: очакван ${v}, получен ${q}`}case"invalid_value":return 1===g.values.length?`Невалиден вход: очакван ${stringifyPrimitive(g.values[0])}`:`Невалидна опция: очаквано едно от ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`Твърде голямо: очаква се ${g.origin??"стойност"} да съдържа ${v}${g.maximum.toString()} ${D.unit??"елемента"}`:`Твърде голямо: очаква се ${g.origin??"стойност"} да бъде ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`Твърде малко: очаква се ${g.origin} да съдържа ${v}${g.minimum.toString()} ${D.unit}`:`Твърде малко: очаква се ${g.origin} да бъде ${v}${g.minimum.toString()}`}case"invalid_format":{const D=g;if("starts_with"===D.format)return`Невалиден низ: трябва да започва с "${D.prefix}"`;if("ends_with"===D.format)return`Невалиден низ: трябва да завършва с "${D.suffix}"`;if("includes"===D.format)return`Невалиден низ: трябва да включва "${D.includes}"`;if("regex"===D.format)return`Невалиден низ: трябва да съвпада с ${D.pattern}`;let R="Невалиден";return"emoji"===D.format&&(R="Невалидно"),"datetime"===D.format&&(R="Невалидно"),"date"===D.format&&(R="Невалидна"),"time"===D.format&&(R="Невалидно"),"duration"===D.format&&(R="Невалидна"),`${R} ${v[D.format]??g.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${g.divisor}`;case"unrecognized_keys":return`Неразпознат${g.keys.length>1?"и":""} ключ${g.keys.length>1?"ове":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${g.origin}`;case"invalid_union":default:return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${g.origin}`}}};function bg(){return{localeError:error$U()}}const error$T=()=>{const g={string:{unit:"অক্ষর",verb:"থাকতে হবে"},file:{unit:"বাইট",verb:"থাকতে হবে"},array:{unit:"আইটেম",verb:"থাকতে হবে"},set:{unit:"আইটেম",verb:"থাকতে হবে"},map:{unit:"এন্ট্রি",verb:"থাকতে হবে"}};function getSizing(v){return g[v]??null}const v={regex:"ইনপুট",email:"ইমেইল ঠিকানা",url:"URL",emoji:"ইমোজি",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO তারিখ ও সময়",date:"ISO তারিখ",time:"ISO সময়",duration:"ISO সময়কাল",ipv4:"IPv4 ঠিকানা",ipv6:"IPv6 ঠিকানা",mac:"MAC ঠিকানা",cidrv4:"IPv4 রেঞ্জ",cidrv6:"IPv6 রেঞ্জ",base64:"base64-এনকোডেড স্ট্রিং",base64url:"base64url-এনকোডেড স্ট্রিং",json_string:"JSON স্ট্রিং",e164:"E.164 নম্বর",credit_card:"ক্রেডিট কার্ড নম্বর",jwt:"JWT",template_literal:"ইনপুট"},D={nan:"NaN"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input);return`অবৈধ ইনপুট: প্রত্যাশিত ${v}, প্রাপ্ত ${D[R]??R}`}case"invalid_value":return 1===g.values.length?`অবৈধ ইনপুট: প্রত্যাশিত ${stringifyPrimitive(g.values[0])}`:`অবৈধ অপশন: ${joinValues(g.values," | ")} এর মধ্যে একটি প্রত্যাশিত`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`অনেক বড়: ${g.origin??"মান"} ${v}${g.maximum.toString()} ${D.unit??"এলিমেন্ট"} হতে হবে`:`অনেক বড়: ${g.origin??"মান"} ${v}${g.maximum.toString()} হতে হবে`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`অনেক ছোট: ${g.origin} ${v}${g.minimum.toString()} ${D.unit} হতে হবে`:`অনেক ছোট: ${g.origin} ${v}${g.minimum.toString()} হতে হবে`}case"invalid_format":{const D=g;return"starts_with"===D.format?`অবৈধ স্ট্রিং: "${D.prefix}" দিয়ে শুরু হতে হবে`:"ends_with"===D.format?`অবৈধ স্ট্রিং: "${D.suffix}" দিয়ে শেষ হতে হবে`:"includes"===D.format?`অবৈধ স্ট্রিং: "${D.includes}" অন্তর্ভুক্ত থাকতে হবে`:"regex"===D.format?`অবৈধ স্ট্রিং: ${D.pattern} প্যাটার্ন মিলতে হবে`:`অবৈধ ${v[D.format]??g.format}`}case"not_multiple_of":return`অবৈধ নম্বর: ${g.divisor} এর গুণিতক হতে হবে`;case"unrecognized_keys":return`অচেনা কী${g.keys.length>1?"গুলো":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`${g.origin} এ অবৈধ কী`;case"invalid_union":if(g.options&&Array.isArray(g.options)&&g.options.length>0){const v=g.options.map(g=>`'${g}'`).join(" | ");return`অবৈধ ডিসক্রিমিনেটর মান। প্রত্যাশিত ${v}`}return"অবৈধ ইনপুট";case"invalid_element":return`${g.origin} এ অবৈধ মান`;default:return"অবৈধ ইনপুট"}}};function bn(){return{localeError:error$T()}}const error$S=()=>{const g={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"},map:{unit:"elements",verb:"contenir"}};function getSizing(v){return g[v]??null}const v={regex:"entrada",email:"adreça electrònica",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:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",mac:"adreça MAC",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",credit_card:"número de targeta de crèdit",jwt:"JWT",template_literal:"entrada"},D={nan:"NaN"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`Tipus invàlid: s'esperava instanceof ${g.expected}, s'ha rebut ${q}`:`Tipus invàlid: s'esperava ${v}, s'ha rebut ${q}`}case"invalid_value":return 1===g.values.length?`Valor invàlid: s'esperava ${stringifyPrimitive(g.values[0])}`:`Opció invàlida: s'esperava una de ${joinValues(g.values," o ")}`;case"too_big":{const v=g.inclusive?"com a màxim":"menys de",D=getSizing(g.origin);return D?`Massa gran: s'esperava que ${g.origin??"el valor"} contingués ${v} ${g.maximum.toString()} ${D.unit??"elements"}`:`Massa gran: s'esperava que ${g.origin??"el valor"} fos ${v} ${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?"com a mínim":"més de",D=getSizing(g.origin);return D?`Massa petit: s'esperava que ${g.origin} contingués ${v} ${g.minimum.toString()} ${D.unit}`:`Massa petit: s'esperava que ${g.origin} fos ${v} ${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`Format invàlid: ha de començar amb "${D.prefix}"`:"ends_with"===D.format?`Format invàlid: ha d'acabar amb "${D.suffix}"`:"includes"===D.format?`Format invàlid: ha d'incloure "${D.includes}"`:"regex"===D.format?`Format invàlid: ha de coincidir amb el patró ${D.pattern}`:`Format invàlid per a ${v[D.format]??g.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${g.divisor}`;case"unrecognized_keys":return`Clau${g.keys.length>1?"s":""} no reconeguda${g.keys.length>1?"s":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${g.origin}`;case"invalid_union":default:return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${g.origin}`}}};function ca(){return{localeError:error$S()}}const error$R=()=>{const g={string:{unit:"پیت",verb:"بێت"},file:{unit:"بایت",verb:"بێت"},array:{unit:"دانە",verb:"بێت"},set:{unit:"دانە",verb:"بێت"},map:{unit:"دانە",verb:"بێت"}};function getSizing(v){return g[v]??null}const v={regex:"regex",email:"ئیمەیڵ",url:"بەستەر (URL)",emoji:"ئیمۆجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ڕێکەوت و کات",date:"ڕێکەوت",time:"کات",duration:"ماوە",ipv4:"ناونیشانی IPv4",ipv6:"ناونیشانی IPv6",mac:"ناونیشانی MAC",cidrv4:"مەودای IPv4",cidrv6:"مەودای IPv6",base64:"دەقی base64",base64url:"دەقی base64url",json_string:"دەقی JSON",e164:"ژمارەی E.164",credit_card:"ژمارەی کارتی کرێدیت",jwt:"JWT",template_literal:"تێکردە"},D={nan:"NaN",string:"نووسین",number:"ژمارە",boolean:"boolean",array:"array",object:"object",date:"ڕێکەوت",integer:"ژمارە",float:"ژمارە",null:"null",undefined:"undefined",function:"function",symbol:"symbol",unknown:"unknown",promise:"promise",void:"void",never:"never",map:"map",set:"set"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R,ie=["ا","و","ۆ","وو","ە","ی","ێ"].some(g=>q.endsWith(g))?"یە":"ە",se=/^[a-zA-Z]+$/.test(q);return"null"===R||"undefined"===R?"داواکراوە":`چاوەڕوانکراوە ${v} بێت، بەڵام ${q}${se?"":ie}`}case"invalid_value":return 1===g.values.length?`بەهاکە نادرووستە: چاوەڕوانکراوە ${stringifyPrimitive(g.values[0])} بێت`:`هەڵبژاردەی نادروست: چاوەڕوانکراوە یەکێک بێت لە ${joinValues(g.values,"|")}`;case"too_big":{const v=getSizing(g.origin);return v?`پێویستە بە لایەنی زۆرەوە ${g.maximum.toString()} ${v.unit} ${v.verb}`:`پێویستە بە لایەنی زۆرەوە ${g.maximum.toString()} بێت`}case"too_small":{const v=getSizing(g.origin);return v?`پێویستە بە لایەنی کەمەوە ${g.minimum.toString()} ${v.unit} ${v.verb}`:`پێویستە بە لایەنی کەمەوە ${g.minimum.toString()} بێت`}case"invalid_format":{const D=g;return"starts_with"===D.format?`دەقی نادروست: پێویستە دەستپێبکات بە "${D.prefix}"`:"ends_with"===D.format?`دەقی نادروست: پێویستە کۆتاییبێت بە "${D.suffix}"`:"includes"===D.format?`دەقی نادروست: پێویستە "${D.includes}" لەخۆبگرێت`:"regex"===D.format?`دەقی نادروست: پێویستە لەگەڵ پاتێرنی ${D.pattern} بگونجێت`:`بەهای ${v[D.format]??g.format} نادروستە`}case"not_multiple_of":return`ژمارەی نادروست: دەبێت چەند هێندە بێت بۆ ${g.divisor}`;case"unrecognized_keys":return`کلیلی نەناسراو: ${joinValues(g.keys,", ")}`;case"invalid_key":return`کلیلی نادروست لە ${g.origin}`;case"invalid_union":if(g.options&&Array.isArray(g.options)&&g.options.length>0){const v=g.options.map(g=>`'${g}'`).join(" | ");return`بەهای نەناسراو هەیە. بەهای چاوەڕوانکراو: ${v}`}return"یەکگرتنی نادروست";case"invalid_element":return`${g.origin} بەهاکە نادروستە`;default:return"تێکردەی نادروست"}}};function ckb(){return{localeError:error$R()}}const error$Q=()=>{const g={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"},map:{unit:"prvků",verb:"mít"}};function getSizing(v){return g[v]??null}const v={regex:"regulární výraz",email:"e-mailová adresa",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:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",credit_card:"číslo kreditní karty",jwt:"JWT",template_literal:"vstup"},D={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`Neplatný vstup: očekáváno instanceof ${g.expected}, obdrženo ${q}`:`Neplatný vstup: očekáváno ${v}, obdrženo ${q}`}case"invalid_value":return 1===g.values.length?`Neplatný vstup: očekáváno ${stringifyPrimitive(g.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`Hodnota je příliš velká: ${g.origin??"hodnota"} musí mít ${v}${g.maximum.toString()} ${D.unit??"prvků"}`:`Hodnota je příliš velká: ${g.origin??"hodnota"} musí být ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`Hodnota je příliš malá: ${g.origin??"hodnota"} musí mít ${v}${g.minimum.toString()} ${D.unit??"prvků"}`:`Hodnota je příliš malá: ${g.origin??"hodnota"} musí být ${v}${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`Neplatný řetězec: musí začínat na "${D.prefix}"`:"ends_with"===D.format?`Neplatný řetězec: musí končit na "${D.suffix}"`:"includes"===D.format?`Neplatný řetězec: musí obsahovat "${D.includes}"`:"regex"===D.format?`Neplatný řetězec: musí odpovídat vzoru ${D.pattern}`:`Neplatný formát ${v[D.format]??g.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${g.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${g.origin}`;case"invalid_union":default:return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${g.origin}`}}};function cs(){return{localeError:error$Q()}}const error$P=()=>{const g={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"},map:{unit:"elementer",verb:"indeholdt"}};function getSizing(v){return g[v]??null}const v={regex:"input",email:"e-mailadresse",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 dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kreditkortnummer",jwt:"JWT",template_literal:"input"},D={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`Ugyldigt input: forventede instanceof ${g.expected}, fik ${q}`:`Ugyldigt input: forventede ${v}, fik ${q}`}case"invalid_value":return 1===g.values.length?`Ugyldig værdi: forventede ${stringifyPrimitive(g.values[0])}`:`Ugyldigt valg: forventede en af følgende ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",R=getSizing(g.origin),q=D[g.origin]??g.origin;return R?`For stor: forventede ${q??"value"} ${R.verb} ${v} ${g.maximum.toString()} ${R.unit??"elementer"}`:`For stor: forventede ${q??"value"} havde ${v} ${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",R=getSizing(g.origin),q=D[g.origin]??g.origin;return R?`For lille: forventede ${q} ${R.verb} ${v} ${g.minimum.toString()} ${R.unit}`:`For lille: forventede ${q} havde ${v} ${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`Ugyldig streng: skal starte med "${D.prefix}"`:"ends_with"===D.format?`Ugyldig streng: skal ende med "${D.suffix}"`:"includes"===D.format?`Ugyldig streng: skal indeholde "${D.includes}"`:"regex"===D.format?`Ugyldig streng: skal matche mønsteret ${D.pattern}`:`Ugyldig ${v[D.format]??g.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${g.divisor}`;case"unrecognized_keys":return`${g.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${g.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${g.origin}`;default:return"Ugyldigt input"}}};function da(){return{localeError:error$P()}}const error$O=()=>{const g={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"},map:{unit:"Elemente",verb:"zu haben"}};function getSizing(v){return g[v]??null}const v={regex:"Eingabe",email:"E-Mail-Adresse",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-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",mac:"MAC-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",credit_card:"Kreditkartennummer",jwt:"JWT",template_literal:"Eingabe"},D={nan:"NaN",number:"Zahl",array:"Array"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`Ungültige Eingabe: erwartet instanceof ${g.expected}, erhalten ${q}`:`Ungültige Eingabe: erwartet ${v}, erhalten ${q}`}case"invalid_value":return 1===g.values.length?`Ungültige Eingabe: erwartet ${stringifyPrimitive(g.values[0])}`:`Ungültige Option: erwartet eine von ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`Zu groß: erwartet, dass ${g.origin??"Wert"} ${v}${g.maximum.toString()} ${D.unit??"Elemente"} hat`:`Zu groß: erwartet, dass ${g.origin??"Wert"} ${v}${g.maximum.toString()} ist`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`Zu klein: erwartet, dass ${g.origin} ${v}${g.minimum.toString()} ${D.unit} hat`:`Zu klein: erwartet, dass ${g.origin} ${v}${g.minimum.toString()} ist`}case"invalid_format":{const D=g;return"starts_with"===D.format?`Ungültiger String: muss mit "${D.prefix}" beginnen`:"ends_with"===D.format?`Ungültiger String: muss mit "${D.suffix}" enden`:"includes"===D.format?`Ungültiger String: muss "${D.includes}" enthalten`:"regex"===D.format?`Ungültiger String: muss dem Muster ${D.pattern} entsprechen`:`Ungültig: ${v[D.format]??g.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${g.divisor} sein`;case"unrecognized_keys":return`${g.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${g.origin}`;case"invalid_union":default:return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${g.origin}`}}};function de(){return{localeError:error$O()}}const error$N=()=>{const g={string:{unit:"χαρακτήρες",verb:"να έχει"},file:{unit:"bytes",verb:"να έχει"},array:{unit:"στοιχεία",verb:"να έχει"},set:{unit:"στοιχεία",verb:"να έχει"},map:{unit:"καταχωρήσεις",verb:"να έχει"}};function getSizing(v){return g[v]??null}const v={regex:"είσοδος",email:"διεύθυνση email",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 ημερομηνία και ώρα",date:"ISO ημερομηνία",time:"ISO ώρα",duration:"ISO διάρκεια",ipv4:"διεύθυνση IPv4",ipv6:"διεύθυνση IPv6",mac:"διεύθυνση MAC",cidrv4:"εύρος IPv4",cidrv6:"εύρος IPv6",base64:"συμβολοσειρά κωδικοποιημένη σε base64",base64url:"συμβολοσειρά κωδικοποιημένη σε base64url",json_string:"συμβολοσειρά JSON",e164:"αριθμός E.164",credit_card:"αριθμός πιστωτικής κάρτας",jwt:"JWT",template_literal:"είσοδος"},D={nan:"NaN"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return"string"==typeof g.expected&&/^[A-Z]/.test(g.expected)?`Μη έγκυρη είσοδος: αναμενόταν instanceof ${g.expected}, λήφθηκε ${q}`:`Μη έγκυρη είσοδος: αναμενόταν ${v}, λήφθηκε ${q}`}case"invalid_value":return 1===g.values.length?`Μη έγκυρη είσοδος: αναμενόταν ${stringifyPrimitive(g.values[0])}`:`Μη έγκυρη επιλογή: αναμενόταν ένα από ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`Πολύ μεγάλο: αναμενόταν ${g.origin??"τιμή"} να έχει ${v}${g.maximum.toString()} ${D.unit??"στοιχεία"}`:`Πολύ μεγάλο: αναμενόταν ${g.origin??"τιμή"} να είναι ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`Πολύ μικρό: αναμενόταν ${g.origin} να έχει ${v}${g.minimum.toString()} ${D.unit}`:`Πολύ μικρό: αναμενόταν ${g.origin} να είναι ${v}${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`Μη έγκυρη συμβολοσειρά: πρέπει να ξεκινά με "${D.prefix}"`:"ends_with"===D.format?`Μη έγκυρη συμβολοσειρά: πρέπει να τελειώνει με "${D.suffix}"`:"includes"===D.format?`Μη έγκυρη συμβολοσειρά: πρέπει να περιέχει "${D.includes}"`:"regex"===D.format?`Μη έγκυρη συμβολοσειρά: πρέπει να ταιριάζει με το μοτίβο ${D.pattern}`:`Μη έγκυρο: ${v[D.format]??g.format}`}case"not_multiple_of":return`Μη έγκυρος αριθμός: πρέπει να είναι πολλαπλάσιο του ${g.divisor}`;case"unrecognized_keys":return`Άγνωστ${g.keys.length>1?"α":"ο"} κλειδ${g.keys.length>1?"ιά":"ί"}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Μη έγκυρο κλειδί στο ${g.origin}`;case"invalid_union":default:return"Μη έγκυρη είσοδος";case"invalid_element":return`Μη έγκυρη τιμή στο ${g.origin}`}}};function el(){return{localeError:error$N()}}const error$M=()=>{const g={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 getSizing(v){return g[v]??null}const v={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",credit_card:"credit card number",jwt:"JWT",template_literal:"input"},D={nan:"NaN"};function getTypeName(g,v){return"number"!==g||"number"!=typeof v||Number.isFinite(v)?D[g]??g:String(v)}return g=>{switch(g.code){case"invalid_type":return`Invalid input: expected ${getTypeName(g.expected)}, received ${getTypeName(parsedType(g.input),g.input)}`;case"invalid_value":return 1===g.values.length?`Invalid input: expected ${stringifyPrimitive(g.values[0])}`:`Invalid option: expected one of ${joinValues(g.values,"|")}`;case"too_big":{const v=g.exact?"exactly ":g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`Too big: expected ${g.origin??"value"} to have ${v}${g.maximum.toString()} ${D.unit??"elements"}`:`Too big: expected ${g.origin??"value"} to be ${v}${g.maximum.toString()}`}case"too_small":{const v=g.exact?"exactly ":g.inclusive?">=":">",D=getSizing(g.origin);return D?`Too small: expected ${g.origin} to have ${v}${g.minimum.toString()} ${D.unit}`:`Too small: expected ${g.origin} to be ${v}${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`Invalid string: must start with "${D.prefix}"`:"ends_with"===D.format?`Invalid string: must end with "${D.suffix}"`:"includes"===D.format?`Invalid string: must include "${D.includes}"`:"regex"===D.format?`Invalid string: must match pattern ${D.pattern}`:`Invalid ${v[D.format]??g.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${g.divisor}`;case"unrecognized_keys":return`Unrecognized key${g.keys.length>1?"s":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Invalid key in ${g.origin}`;case"invalid_union":if(g.options&&Array.isArray(g.options)&&g.options.length>0){const v=g.options.map(g=>`'${g}'`).join(" | ");return`Invalid discriminator value. Expected ${v}`}return!1===g.inclusive?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${g.origin}`;default:return"Invalid input"}}};function en(){return{localeError:error$M()}}const error$L=()=>{const g={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"},map:{unit:"elementojn",verb:"havi"}};function getSizing(v){return g[v]??null}const v={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",mac:"MAC-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",credit_card:"kreditkarta numero",jwt:"JWT",template_literal:"enigo"},D={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`Nevalida enigo: atendiĝis instanceof ${g.expected}, riceviĝis ${q}`:`Nevalida enigo: atendiĝis ${v}, riceviĝis ${q}`}case"invalid_value":return 1===g.values.length?`Nevalida enigo: atendiĝis ${stringifyPrimitive(g.values[0])}`:`Nevalida opcio: atendiĝis unu el ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`Tro granda: atendiĝis ke ${g.origin??"valoro"} havu ${v}${g.maximum.toString()} ${D.unit??"elementojn"}`:`Tro granda: atendiĝis ke ${g.origin??"valoro"} havu ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`Tro malgranda: atendiĝis ke ${g.origin} havu ${v}${g.minimum.toString()} ${D.unit}`:`Tro malgranda: atendiĝis ke ${g.origin} estu ${v}${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`Nevalida karaktraro: devas komenciĝi per "${D.prefix}"`:"ends_with"===D.format?`Nevalida karaktraro: devas finiĝi per "${D.suffix}"`:"includes"===D.format?`Nevalida karaktraro: devas inkluzivi "${D.includes}"`:"regex"===D.format?`Nevalida karaktraro: devas kongrui kun la modelo ${D.pattern}`:`Nevalida ${v[D.format]??g.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${g.divisor}`;case"unrecognized_keys":return`Nekonata${g.keys.length>1?"j":""} ŝlosilo${g.keys.length>1?"j":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${g.origin}`;case"invalid_union":default:return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${g.origin}`}}};function eo(){return{localeError:error$L()}}const error$K=()=>{const g={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function getSizing(v){return g[v]??null}const v={regex:"entrada",email:"dirección de correo electrónico",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:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",mac:"dirección MAC",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",credit_card:"número de tarjeta de crédito",jwt:"JWT",template_literal:"entrada"},D={nan:"NaN",string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`Entrada inválida: se esperaba instanceof ${g.expected}, recibido ${q}`:`Entrada inválida: se esperaba ${v}, recibido ${q}`}case"invalid_value":return 1===g.values.length?`Entrada inválida: se esperaba ${stringifyPrimitive(g.values[0])}`:`Opción inválida: se esperaba una de ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",R=getSizing(g.origin),q=D[g.origin]??g.origin;return R?`Demasiado grande: se esperaba que ${q??"valor"} tuviera ${v}${g.maximum.toString()} ${R.unit??"elementos"}`:`Demasiado grande: se esperaba que ${q??"valor"} fuera ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",R=getSizing(g.origin),q=D[g.origin]??g.origin;return R?`Demasiado pequeño: se esperaba que ${q} tuviera ${v}${g.minimum.toString()} ${R.unit}`:`Demasiado pequeño: se esperaba que ${q} fuera ${v}${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`Cadena inválida: debe comenzar con "${D.prefix}"`:"ends_with"===D.format?`Cadena inválida: debe terminar en "${D.suffix}"`:"includes"===D.format?`Cadena inválida: debe incluir "${D.includes}"`:"regex"===D.format?`Cadena inválida: debe coincidir con el patrón ${D.pattern}`:`Inválido ${v[D.format]??g.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${g.divisor}`;case"unrecognized_keys":return`Llave${g.keys.length>1?"s":""} desconocida${g.keys.length>1?"s":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Llave inválida en ${D[g.origin]??g.origin}`;case"invalid_union":default:return"Entrada inválida";case"invalid_element":return`Valor inválido en ${D[g.origin]??g.origin}`}}};function es(){return{localeError:error$K()}}const error$J=()=>{const g={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"},map:{unit:"آیتم",verb:"داشته باشد"}};function getSizing(v){return g[v]??null}const v={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",mac:"MAC آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",credit_card:"شماره کارت اعتباری",jwt:"JWT",template_literal:"ورودی"},D={nan:"NaN",number:"عدد",array:"آرایه"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`ورودی نامعتبر: می‌بایست instanceof ${g.expected} می‌بود، ${q} دریافت شد`:`ورودی نامعتبر: می‌بایست ${v} می‌بود، ${q} دریافت شد`}case"invalid_value":return 1===g.values.length?`ورودی نامعتبر: می‌بایست ${stringifyPrimitive(g.values[0])} می‌بود`:`گزینه نامعتبر: می‌بایست یکی از ${joinValues(g.values,"|")} می‌بود`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`خیلی بزرگ: ${g.origin??"مقدار"} باید ${v}${g.maximum.toString()} ${D.unit??"عنصر"} باشد`:`خیلی بزرگ: ${g.origin??"مقدار"} باید ${v}${g.maximum.toString()} باشد`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`خیلی کوچک: ${g.origin} باید ${v}${g.minimum.toString()} ${D.unit} باشد`:`خیلی کوچک: ${g.origin} باید ${v}${g.minimum.toString()} باشد`}case"invalid_format":{const D=g;return"starts_with"===D.format?`رشته نامعتبر: باید با "${D.prefix}" شروع شود`:"ends_with"===D.format?`رشته نامعتبر: باید با "${D.suffix}" تمام شود`:"includes"===D.format?`رشته نامعتبر: باید شامل "${D.includes}" باشد`:"regex"===D.format?`رشته نامعتبر: باید با الگوی ${D.pattern} مطابقت داشته باشد`:`${v[D.format]??g.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${g.divisor} باشد`;case"unrecognized_keys":return`کلید${g.keys.length>1?"های":""} ناشناس: ${joinValues(g.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${g.origin}`;case"invalid_union":default:return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${g.origin}`}}};function fa(){return{localeError:error$J()}}const error$I=()=>{const g={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},map:{unit:"alkiota",subject:"kuvauksen"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function getSizing(v){return g[v]??null}const v={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",mac:"MAC-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",credit_card:"luottokortin numero",jwt:"JWT",template_literal:"templaattimerkkijono"},D={nan:"NaN"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`Virheellinen tyyppi: odotettiin instanceof ${g.expected}, oli ${q}`:`Virheellinen tyyppi: odotettiin ${v}, oli ${q}`}case"invalid_value":return 1===g.values.length?`Virheellinen syöte: täytyy olla ${stringifyPrimitive(g.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`Liian suuri: ${D.subject} täytyy olla ${v}${g.maximum.toString()} ${D.unit}`.trim():`Liian suuri: arvon täytyy olla ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`Liian pieni: ${D.subject} täytyy olla ${v}${g.minimum.toString()} ${D.unit}`.trim():`Liian pieni: arvon täytyy olla ${v}${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`Virheellinen syöte: täytyy alkaa "${D.prefix}"`:"ends_with"===D.format?`Virheellinen syöte: täytyy loppua "${D.suffix}"`:"includes"===D.format?`Virheellinen syöte: täytyy sisältää "${D.includes}"`:"regex"===D.format?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${D.pattern}`:`Virheellinen ${v[D.format]??g.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${g.divisor} monikerta`;case"unrecognized_keys":return`${g.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${joinValues(g.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};function fi(){return{localeError:error$I()}}const error$H=()=>{const g={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function getSizing(v){return g[v]??null}const v={regex:"expression régulière",email:"adresse e-mail",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:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",mac:"adresse MAC",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne de caractères encodée en base64",base64url:"chaîne de caractères encodée en base64url",json_string:"chaîne de caractères JSON",e164:"numéro au format E.164",credit_card:"numéro de carte de crédit",jwt:"JWT",template_literal:"entrée"},D={string:"chaîne de caractères",number:"nombre",int:"entier",boolean:"booléen",bigint:"grand entier",symbol:"symbole",undefined:"indéfini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"record",map:"map",set:"ensemble",file:"fichier",nonoptional:"non optionnel",nan:"NaN",function:"fonction"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`Entrée invalide : instance de ${g.expected} attendu, ${q} reçu`:`Entrée invalide : ${v} attendu, ${q} reçu`}case"invalid_value":return 1===g.values.length?`Entrée invalide : ${stringifyPrimitive(g.values[0])} attendu`:`Option invalide : une valeur parmi ${joinValues(g.values,"|")} attendue`;case"too_big":{const v=g.inclusive?"<=":"<",R=getSizing(g.origin);return R?`Trop grand : ${D[g.origin]??"valeur"} doit ${R.verb} ${v}${g.maximum.toString()} ${R.unit??"élément(s)"}`:`Trop grand : ${D[g.origin]??"valeur"} doit être ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",R=getSizing(g.origin);return R?`Trop petit : ${D[g.origin]??"valeur"} doit ${R.verb} ${v}${g.minimum.toString()} ${R.unit}`:`Trop petit : ${D[g.origin]??"valeur"} doit être ${v}${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`Chaîne de caractères invalide : doit commencer par "${D.prefix}"`:"ends_with"===D.format?`Chaîne de caractères invalide : doit se terminer par "${D.suffix}"`:"includes"===D.format?`Chaîne de caractères invalide : doit inclure "${D.includes}"`:"regex"===D.format?`Chaîne de caractères invalide : doit correspondre au motif ${D.pattern}`:`${v[D.format]??g.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${g.divisor}`;case"unrecognized_keys":return`Clé${g.keys.length>1?"s":""} non reconnue${g.keys.length>1?"s":""} : ${joinValues(g.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${g.origin}`;case"invalid_union":default:return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${g.origin}`}}};function fr(){return{localeError:error$H()}}const error$G=()=>{const g={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"},map:{unit:"éléments",verb:"avoir"}};function getSizing(v){return g[v]??null}const v={regex:"entrée",email:"adresse courriel",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:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",mac:"adresse MAC",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",credit_card:"numéro de carte de crédit",jwt:"JWT",template_literal:"entrée"},D={nan:"NaN"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`Entrée invalide : attendu instanceof ${g.expected}, reçu ${q}`:`Entrée invalide : attendu ${v}, reçu ${q}`}case"invalid_value":return 1===g.values.length?`Entrée invalide : attendu ${stringifyPrimitive(g.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"≤":"<",D=getSizing(g.origin);return D?`Trop grand : attendu que ${g.origin??"la valeur"} ait ${v}${g.maximum.toString()} ${D.unit}`:`Trop grand : attendu que ${g.origin??"la valeur"} soit ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?"≥":">",D=getSizing(g.origin);return D?`Trop petit : attendu que ${g.origin} ait ${v}${g.minimum.toString()} ${D.unit}`:`Trop petit : attendu que ${g.origin} soit ${v}${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`Chaîne invalide : doit commencer par "${D.prefix}"`:"ends_with"===D.format?`Chaîne invalide : doit se terminer par "${D.suffix}"`:"includes"===D.format?`Chaîne invalide : doit inclure "${D.includes}"`:"regex"===D.format?`Chaîne invalide : doit correspondre au motif ${D.pattern}`:`${v[D.format]??g.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${g.divisor}`;case"unrecognized_keys":return`Clé${g.keys.length>1?"s":""} non reconnue${g.keys.length>1?"s":""} : ${joinValues(g.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${g.origin}`;case"invalid_union":default:return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${g.origin}`}}};function frCA(){return{localeError:error$G()}}const error$F=()=>{const g={string:{unit:"અક્ષર",verb:"હોવા જોઈએ"},file:{unit:"બાયટ",verb:"હોવા જોઈએ"},array:{unit:"આઇટમ",verb:"હોવા જોઈએ"},set:{unit:"આઇટમ",verb:"હોવા જોઈએ"},map:{unit:"એન્ટ્રી",verb:"હોવા જોઈએ"}};function getSizing(v){return g[v]??null}const v={regex:"ઇનપુટ",email:"ઈમેઇલ એડ્રેસ",url:"URL",emoji:"ઇમોજી",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO તારીખ અને સમય",date:"ISO તારીખ",time:"ISO સમય",duration:"ISO અવધિ",ipv4:"IPv4 એડ્રેસ",ipv6:"IPv6 એડ્રેસ",mac:"MAC એડ્રેસ",cidrv4:"IPv4 શ્રેણી",cidrv6:"IPv6 શ્રેણી",base64:"base64-એન્કોડેડ સ્ટ્રિંગ",base64url:"base64url-એન્કોડેડ સ્ટ્રિંગ",json_string:"JSON સ્ટ્રિંગ",e164:"E.164 નંબર",credit_card:"ક્રેડિટ કાર્ડ નંબર",jwt:"JWT",template_literal:"ઇનપુટ"},D={nan:"NaN"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input);return`અમાન્ય ઇનપુટ: અપેક્ષિત ${v}, પ્રાપ્ત ${D[R]??R}`}case"invalid_value":return 1===g.values.length?`અમાન્ય ઇનપુટ: અપેક્ષિત ${stringifyPrimitive(g.values[0])}`:`અમાન્ય વિકલ્પ: ${joinValues(g.values," | ")} માધ્યમથી એક અપેક્ષિત`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`ખૂબ મોટું: ${g.origin??"મૂલ્ય"} ${v}${g.maximum.toString()} ${D.unit??"એલિમેન્ટ"} હોવા જોઈએ`:`ખૂબ મોટું: ${g.origin??"મૂલ્ય"} ${v}${g.maximum.toString()} હોવું જોઈએ`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`ખૂબ નાનું: ${g.origin} ${v}${g.minimum.toString()} ${D.unit} હોવા જોઈએ`:`ખૂબ નાનું: ${g.origin} ${v}${g.minimum.toString()} હોવું જોઈએ`}case"invalid_format":{const D=g;return"starts_with"===D.format?`અમાન્ય સ્ટ્રિંગ: "${D.prefix}" થી શરૂ થવું જોઈએ`:"ends_with"===D.format?`અમાન્ય સ્ટ્રિંગ: "${D.suffix}" પર સમાપ્ત થવું જોઈએ`:"includes"===D.format?`અમાન્ય સ્ટ્રિંગ: "${D.includes}" શામેલ હોવું જોઈએ`:"regex"===D.format?`અમાન્ય સ્ટ્રિંગ: પેટર્ન ${D.pattern} સાથે મેળ ખાવું જોઈએ`:`અમાન્ય ${v[D.format]??g.format}`}case"not_multiple_of":return`અમાન્ય નંબર: ${g.divisor} નો ગુણાંક હોવો જોઈએ`;case"unrecognized_keys":return`ઓળખી શકાતા નહીં તે કી${g.keys.length>1?"ઓ":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`${g.origin} માં અમાન્ય કી`;case"invalid_union":if(g.options&&Array.isArray(g.options)&&g.options.length>0){const v=g.options.map(g=>`'${g}'`).join(" | ");return`અમાન્ય ડિસ્ક્રિમિનેટર મૂલ્ય. અપેક્ષિત ${v}`}return"અમાન્ય ઇનપુટ";case"invalid_element":return`${g.origin} માં અમાન્ય મૂલ્ય`;default:return"અમાન્ય ઇનપુટ"}}};function gu(){return{localeError:error$F()}}const error$E=()=>{const g={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},v={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},typeEntry=v=>v?g[v]:void 0,typeLabel=v=>{const D=typeEntry(v);return D?D.label:v??g.unknown.label},withDefinite=g=>`ה${typeLabel(g)}`,verbFor=g=>{const v=typeEntry(g);return"f"===(v?.gender??"m")?"צריכה להיות":"צריך להיות"},getSizing=g=>g?v[g]??null:null,D={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",gender:"m"},uuidv4:{label:"UUIDv4",gender:"m"},uuidv6:{label:"UUIDv6",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},mac:{label:"כתובת MAC",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},credit_card:{label:"מספר כרטיס אשראי",gender:"m"},jwt:{label:"JWT",gender:"m"},template_literal:{label:"קלט",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}},R={nan:"NaN"};return v=>{switch(v.code){case"invalid_type":{const D=v.expected,q=R[D??""]??typeLabel(D),ie=parsedType(v.input),se=R[ie]??g[ie]?.label??ie;return/^[A-Z]/.test(v.expected)?`קלט לא תקין: צריך להיות instanceof ${v.expected}, התקבל ${se}`:`קלט לא תקין: צריך להיות ${q}, התקבל ${se}`}case"invalid_value":{if(1===v.values.length)return`ערך לא תקין: הערך חייב להיות ${stringifyPrimitive(v.values[0])}`;const g=v.values.map(g=>stringifyPrimitive(g));if(2===v.values.length)return`ערך לא תקין: האפשרויות המתאימות הן ${g[0]} או ${g[1]}`;const D=g[g.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${g.slice(0,-1).join(", ")} או ${D}`}case"too_big":{const g=getSizing(v.origin),D=withDefinite(v.origin??"value");if("string"===v.origin)return`${g?.longLabel??"ארוך"} מדי: ${D} צריכה להכיל ${v.maximum.toString()} ${g?.unit??""} ${v.inclusive?"או פחות":"לכל היותר"}`.trim();if("number"===v.origin){return`גדול מדי: ${D} צריך להיות ${v.inclusive?`קטן או שווה ל-${v.maximum}`:`קטן מ-${v.maximum}`}`}if("array"===v.origin||"set"===v.origin){return`גדול מדי: ${D} ${"set"===v.origin?"צריכה":"צריך"} להכיל ${v.inclusive?`${v.maximum} ${g?.unit??""} או פחות`:`פחות מ-${v.maximum} ${g?.unit??""}`}`.trim()}const R=v.inclusive?"<=":"<",q=verbFor(v.origin??"value");return g?.unit?`${g.longLabel} מדי: ${D} ${q} ${R}${v.maximum.toString()} ${g.unit}`:`${g?.longLabel??"גדול"} מדי: ${D} ${q} ${R}${v.maximum.toString()}`}case"too_small":{const g=getSizing(v.origin),D=withDefinite(v.origin??"value");if("string"===v.origin)return`${g?.shortLabel??"קצר"} מדי: ${D} צריכה להכיל ${v.minimum.toString()} ${g?.unit??""} ${v.inclusive?"או יותר":"לפחות"}`.trim();if("number"===v.origin){return`קטן מדי: ${D} צריך להיות ${v.inclusive?`גדול או שווה ל-${v.minimum}`:`גדול מ-${v.minimum}`}`}if("array"===v.origin||"set"===v.origin){const R="set"===v.origin?"צריכה":"צריך";if(1===v.minimum&&v.inclusive){return`קטן מדי: ${D} ${R} להכיל ${v.origin,"לפחות פריט אחד"}`}return`קטן מדי: ${D} ${R} להכיל ${v.inclusive?`${v.minimum} ${g?.unit??""} או יותר`:`יותר מ-${v.minimum} ${g?.unit??""}`}`.trim()}const R=v.inclusive?">=":">",q=verbFor(v.origin??"value");return g?.unit?`${g.shortLabel} מדי: ${D} ${q} ${R}${v.minimum.toString()} ${g.unit}`:`${g?.shortLabel??"קטן"} מדי: ${D} ${q} ${R}${v.minimum.toString()}`}case"invalid_format":{const g=v;if("starts_with"===g.format)return`המחרוזת חייבת להתחיל ב "${g.prefix}"`;if("ends_with"===g.format)return`המחרוזת חייבת להסתיים ב "${g.suffix}"`;if("includes"===g.format)return`המחרוזת חייבת לכלול "${g.includes}"`;if("regex"===g.format)return`המחרוזת חייבת להתאים לתבנית ${g.pattern}`;const R=D[g.format];return`${R?.label??g.format} לא ${"f"===(R?.gender??"m")?"תקינה":"תקין"}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${v.divisor}`;case"unrecognized_keys":return`מפתח${v.keys.length>1?"ות":""} לא מזוה${v.keys.length>1?"ים":"ה"}: ${joinValues(v.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":default:return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${withDefinite(v.origin??"array")}`}}};function he(){return{localeError:error$E()}}const error$D=()=>{const g={string:{unit:"अक्षर",verb:"रखने के लिए"},file:{unit:"बाइट्स",verb:"रखने के लिए"},array:{unit:"तत्व",verb:"रखने के लिए"},set:{unit:"तत्व",verb:"रखने के लिए"},map:{unit:"प्रविष्टियाँ",verb:"रखने के लिए"}};function getSizing(v){return g[v]??null}const v={regex:"इनपुट",email:"ईमेल पता",url:"URL",emoji:"इमोजी",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO तिथि और समय",date:"ISO तिथि",time:"ISO समय",duration:"ISO अवधि",ipv4:"IPv4 पता",ipv6:"IPv6 पता",mac:"MAC पता",cidrv4:"IPv4 श्रेणी",cidrv6:"IPv6 श्रेणी",base64:"Base64-एन्कोडेड स्ट्रिंग",base64url:"Base64URL-एन्कोडेड स्ट्रिंग",json_string:"JSON स्ट्रिंग",e164:"E.164 संख्या",credit_card:"क्रेडिट कार्ड संख्या",jwt:"JWT",template_literal:"इनपुट"},D={nan:"NaN"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input);return`अमान्य इनपुट: अपेक्षित ${v}, प्राप्त ${D[R]??R}`}case"invalid_value":return 1===g.values.length?`अमान्य इनपुट: अपेक्षित ${stringifyPrimitive(g.values[0])}`:`अमान्य विकल्प: अपेक्षित मानों में से एक ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`बहुत बड़ा: अपेक्षित था कि ${g.origin??"मान"} में ${v}${g.maximum} ${D.unit} हों`:`बहुत बड़ा: अपेक्षित था कि ${g.origin??"मान"} ${v}${g.maximum} हो`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`बहुत छोटा: अपेक्षित था कि ${g.origin} में ${v}${g.minimum} ${D.unit} हों`:`बहुत छोटा: अपेक्षित था कि ${g.origin} ${v}${g.minimum} हो`}case"invalid_format":{const D=g;return"starts_with"===D.format?`अमान्य स्ट्रिंग: "${D.prefix}" से शुरू होना चाहिए`:"ends_with"===D.format?`अमान्य स्ट्रिंग: "${D.suffix}" पर समाप्त होना चाहिए`:"includes"===D.format?`अमान्य स्ट्रिंग: इसमें "${D.includes}" शामिल होना चाहिए`:"regex"===D.format?`अमान्य स्ट्रिंग: पैटर्न ${D.pattern} से मेल खाना चाहिए`:`अमान्य ${v[D.format]??g.format}`}case"not_multiple_of":return`अमान्य संख्या: यह ${g.divisor} का गुणज होना चाहिए`;case"unrecognized_keys":return`अपरिचित कुंजी${g.keys.length>1?"याँ":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`अमान्य कुंजी: ${g.origin} में`;case"invalid_union":if(g.options&&Array.isArray(g.options)&&g.options.length>0){const v=g.options.map(g=>`'${g}'`).join(" | ");return`अमान्य डिस्क्रिमिनेटर मान: अपेक्षित ${v}`}return"अमान्य इनपुट";case"invalid_element":return`अमान्य मान: ${g.origin} में`;default:return"अमान्य इनपुट"}}};function hi(){return{localeError:error$D()}}const error$C=()=>{const g={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function getSizing(v){return g[v]??null}const v={regex:"unos",email:"email adresa",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 datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",credit_card:"broj kreditne kartice",jwt:"JWT",template_literal:"unos"},D={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`Neispravan unos: očekuje se instanceof ${g.expected}, a primljeno je ${q}`:`Neispravan unos: očekuje se ${v}, a primljeno je ${q}`}case"invalid_value":return 1===g.values.length?`Neispravna vrijednost: očekivano ${stringifyPrimitive(g.values[0])}`:`Neispravna opcija: očekivano jedno od ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",R=getSizing(g.origin),q=D[g.origin]??g.origin;return R?`Preveliko: očekivano da ${q??"vrijednost"} ima ${v}${g.maximum.toString()} ${R.unit??"elemenata"}`:`Preveliko: očekivano da ${q??"vrijednost"} bude ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",R=getSizing(g.origin),q=D[g.origin]??g.origin;return R?`Premalo: očekivano da ${q} ima ${v}${g.minimum.toString()} ${R.unit}`:`Premalo: očekivano da ${q} bude ${v}${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`Neispravan tekst: mora započinjati s "${D.prefix}"`:"ends_with"===D.format?`Neispravan tekst: mora završavati s "${D.suffix}"`:"includes"===D.format?`Neispravan tekst: mora sadržavati "${D.includes}"`:"regex"===D.format?`Neispravan tekst: mora odgovarati uzorku ${D.pattern}`:`Neispravna ${v[D.format]??g.format}`}case"not_multiple_of":return`Neispravan broj: mora biti višekratnik od ${g.divisor}`;case"unrecognized_keys":return`Neprepoznat${g.keys.length>1?"i ključevi":" ključ"}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Neispravan ključ u ${D[g.origin]??g.origin}`;case"invalid_union":default:return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${D[g.origin]??g.origin}`}}};function hr(){return{localeError:error$C()}}const error$B=()=>{const g={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"},map:{unit:"elem",verb:"legyen"}};function getSizing(v){return g[v]??null}const v={regex:"bemenet",email:"email cím",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 időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",mac:"MAC cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",credit_card:"hitelkártyaszám",jwt:"JWT",template_literal:"bemenet"},D={nan:"NaN",number:"szám",array:"tömb"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`Érvénytelen bemenet: a várt érték instanceof ${g.expected}, a kapott érték ${q}`:`Érvénytelen bemenet: a várt érték ${v}, a kapott érték ${q}`}case"invalid_value":return 1===g.values.length?`Érvénytelen bemenet: a várt érték ${stringifyPrimitive(g.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`Túl nagy: ${g.origin??"érték"} mérete túl nagy ${v}${g.maximum.toString()} ${D.unit??"elem"}`:`Túl nagy: a bemeneti érték ${g.origin??"érték"} túl nagy: ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`Túl kicsi: a bemeneti érték ${g.origin} mérete túl kicsi ${v}${g.minimum.toString()} ${D.unit}`:`Túl kicsi: a bemeneti érték ${g.origin} túl kicsi ${v}${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`Érvénytelen string: "${D.prefix}" értékkel kell kezdődnie`:"ends_with"===D.format?`Érvénytelen string: "${D.suffix}" értékkel kell végződnie`:"includes"===D.format?`Érvénytelen string: "${D.includes}" értéket kell tartalmaznia`:"regex"===D.format?`Érvénytelen string: ${D.pattern} mintának kell megfelelnie`:`Érvénytelen ${v[D.format]??g.format}`}case"not_multiple_of":return`Érvénytelen szám: ${g.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${g.keys.length>1?"s":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${g.origin}`;case"invalid_union":default:return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${g.origin}`}}};function hu(){return{localeError:error$B()}}function getArmenianPlural(g,v,D){return 1===Math.abs(g)?v:D}function withDefiniteArticle(g){if(!g)return"";const v=g[g.length-1];return g+(["ա","ե","ը","ի","ո","ու","օ"].includes(v)?"ն":"ը")}const error$A=()=>{const g={string:{unit:{one:"նշան",many:"նշաններ"},verb:"ունենալ"},file:{unit:{one:"բայթ",many:"բայթեր"},verb:"ունենալ"},array:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},set:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},map:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"}};function getSizing(v){return g[v]??null}const v={regex:"մուտք",email:"էլ. հասցե",url:"URL",emoji:"էմոջի",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO ամսաթիվ և ժամ",date:"ISO ամսաթիվ",time:"ISO ժամ",duration:"ISO տևողություն",ipv4:"IPv4 հասցե",ipv6:"IPv6 հասցե",mac:"MAC հասցե",cidrv4:"IPv4 միջակայք",cidrv6:"IPv6 միջակայք",base64:"base64 ձևաչափով տող",base64url:"base64url ձևաչափով տող",json_string:"JSON տող",e164:"E.164 համար",credit_card:"կրեդիտ քարտի համար",jwt:"JWT",template_literal:"մուտք"},D={nan:"NaN",number:"թիվ",array:"զանգված"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`Սխալ մուտքագրում․ սպասվում էր instanceof ${g.expected}, ստացվել է ${q}`:`Սխալ մուտքագրում․ սպասվում էր ${v}, ստացվել է ${q}`}case"invalid_value":return 1===g.values.length?`Սխալ մուտքագրում․ սպասվում էր ${stringifyPrimitive(g.values[1])}`:`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);if(D){const R=getArmenianPlural(Number(g.maximum),D.unit.one,D.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${withDefiniteArticle(g.origin??"արժեք")} կունենա ${v}${g.maximum.toString()} ${R}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${withDefiniteArticle(g.origin??"արժեք")} լինի ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);if(D){const R=getArmenianPlural(Number(g.minimum),D.unit.one,D.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${withDefiniteArticle(g.origin)} կունենա ${v}${g.minimum.toString()} ${R}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${withDefiniteArticle(g.origin)} լինի ${v}${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`Սխալ տող․ պետք է սկսվի "${D.prefix}"-ով`:"ends_with"===D.format?`Սխալ տող․ պետք է ավարտվի "${D.suffix}"-ով`:"includes"===D.format?`Սխալ տող․ պետք է պարունակի "${D.includes}"`:"regex"===D.format?`Սխալ տող․ պետք է համապատասխանի ${D.pattern} ձևաչափին`:`Սխալ ${v[D.format]??g.format}`}case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${g.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${g.keys.length>1?"ներ":""}. ${joinValues(g.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${withDefiniteArticle(g.origin)}-ում`;case"invalid_union":default:return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${withDefiniteArticle(g.origin)}-ում`}}};function hy(){return{localeError:error$A()}}const error$z=()=>{const g={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"},map:{unit:"item",verb:"memiliki"}};function getSizing(v){return g[v]??null}const v={regex:"input",email:"alamat email",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:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",mac:"alamat MAC",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",credit_card:"nomor kartu kredit",jwt:"JWT",template_literal:"input"},D={nan:"NaN"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`Input tidak valid: diharapkan instanceof ${g.expected}, diterima ${q}`:`Input tidak valid: diharapkan ${v}, diterima ${q}`}case"invalid_value":return 1===g.values.length?`Input tidak valid: diharapkan ${stringifyPrimitive(g.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`Terlalu besar: diharapkan ${g.origin??"value"} memiliki ${v}${g.maximum.toString()} ${D.unit??"elemen"}`:`Terlalu besar: diharapkan ${g.origin??"value"} menjadi ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`Terlalu kecil: diharapkan ${g.origin} memiliki ${v}${g.minimum.toString()} ${D.unit}`:`Terlalu kecil: diharapkan ${g.origin} menjadi ${v}${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`String tidak valid: harus dimulai dengan "${D.prefix}"`:"ends_with"===D.format?`String tidak valid: harus berakhir dengan "${D.suffix}"`:"includes"===D.format?`String tidak valid: harus menyertakan "${D.includes}"`:"regex"===D.format?`String tidak valid: harus sesuai pola ${D.pattern}`:`${v[D.format]??g.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${g.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${g.keys.length>1?"s":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${g.origin}`;case"invalid_union":default:return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${g.origin}`}}};function id(){return{localeError:error$z()}}const error$y=()=>{const g={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"},map:{unit:"hluti",verb:"að hafa"}};function getSizing(v){return g[v]??null}const v={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",credit_card:"kreditkortanúmer",jwt:"JWT",template_literal:"gildi"},D={nan:"NaN",number:"númer",array:"fylki"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`Rangt gildi: Þú slóst inn ${q} þar sem á að vera instanceof ${g.expected}`:`Rangt gildi: Þú slóst inn ${q} þar sem á að vera ${v}`}case"invalid_value":return 1===g.values.length?`Rangt gildi: gert ráð fyrir ${stringifyPrimitive(g.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`Of stórt: gert er ráð fyrir að ${g.origin??"gildi"} hafi ${v}${g.maximum.toString()} ${D.unit??"hluti"}`:`Of stórt: gert er ráð fyrir að ${g.origin??"gildi"} sé ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`Of lítið: gert er ráð fyrir að ${g.origin} hafi ${v}${g.minimum.toString()} ${D.unit}`:`Of lítið: gert er ráð fyrir að ${g.origin} sé ${v}${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`Ógildur strengur: verður að byrja á "${D.prefix}"`:"ends_with"===D.format?`Ógildur strengur: verður að enda á "${D.suffix}"`:"includes"===D.format?`Ógildur strengur: verður að innihalda "${D.includes}"`:"regex"===D.format?`Ógildur strengur: verður að fylgja mynstri ${D.pattern}`:`Rangt ${v[D.format]??g.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${g.divisor}`;case"unrecognized_keys":return`Óþekkt ${g.keys.length>1?"ir lyklar":"ur lykill"}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${g.origin}`;case"invalid_union":default:return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${g.origin}`}}};function is(){return{localeError:error$y()}}const error$x=()=>{const g={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"},map:{unit:"elementi",verb:"avere"}};function getSizing(v){return g[v]??null}const v={regex:"input",email:"indirizzo email",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:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",mac:"indirizzo MAC",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",credit_card:"numero di carta di credito",jwt:"JWT",template_literal:"input"},D={nan:"NaN",number:"numero",array:"vettore"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`Input non valido: atteso instanceof ${g.expected}, ricevuto ${q}`:`Input non valido: atteso ${v}, ricevuto ${q}`}case"invalid_value":return 1===g.values.length?`Input non valido: atteso ${stringifyPrimitive(g.values[0])}`:`Opzione non valida: atteso uno tra ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`Troppo grande: ${g.origin??"valore"} deve avere ${v}${g.maximum.toString()} ${D.unit??"elementi"}`:`Troppo grande: ${g.origin??"valore"} deve essere ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`Troppo piccolo: ${g.origin} deve avere ${v}${g.minimum.toString()} ${D.unit}`:`Troppo piccolo: ${g.origin} deve essere ${v}${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`Stringa non valida: deve iniziare con "${D.prefix}"`:"ends_with"===D.format?`Stringa non valida: deve terminare con "${D.suffix}"`:"includes"===D.format?`Stringa non valida: deve includere "${D.includes}"`:"regex"===D.format?`Stringa non valida: deve corrispondere al pattern ${D.pattern}`:`Input non valido: ${v[D.format]??g.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${g.divisor}`;case"unrecognized_keys":return`Chiav${g.keys.length>1?"i":"e"} non riconosciut${g.keys.length>1?"e":"a"}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${g.origin}`;case"invalid_union":default:return"Input non valido";case"invalid_element":return`Valore non valido in ${g.origin}`}}};function it(){return{localeError:error$x()}}const error$w=()=>{const g={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"},map:{unit:"要素",verb:"である"}};function getSizing(v){return g[v]??null}const v={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",mac:"MACアドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",credit_card:"クレジットカード番号",jwt:"JWT",template_literal:"入力値"},D={nan:"NaN",number:"数値",array:"配列"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`無効な入力: instanceof ${g.expected}が期待されましたが、${q}が入力されました`:`無効な入力: ${v}が期待されましたが、${q}が入力されました`}case"invalid_value":return 1===g.values.length?`無効な入力: ${stringifyPrimitive(g.values[0])}が期待されました`:`無効な選択: ${joinValues(g.values,"、")}のいずれかである必要があります`;case"too_big":{const v=g.inclusive?"以下である":"より小さい",D=getSizing(g.origin);return D?`大きすぎる値: ${g.origin??"値"}は${g.maximum.toString()}${D.unit??"要素"}${v}必要があります`:`大きすぎる値: ${g.origin??"値"}は${g.maximum.toString()}${v}必要があります`}case"too_small":{const v=g.inclusive?"以上である":"より大きい",D=getSizing(g.origin);return D?`小さすぎる値: ${g.origin}は${g.minimum.toString()}${D.unit}${v}必要があります`:`小さすぎる値: ${g.origin}は${g.minimum.toString()}${v}必要があります`}case"invalid_format":{const D=g;return"starts_with"===D.format?`無効な文字列: "${D.prefix}"で始まる必要があります`:"ends_with"===D.format?`無効な文字列: "${D.suffix}"で終わる必要があります`:"includes"===D.format?`無効な文字列: "${D.includes}"を含む必要があります`:"regex"===D.format?`無効な文字列: パターン${D.pattern}に一致する必要があります`:`無効な${v[D.format]??g.format}`}case"not_multiple_of":return`無効な数値: ${g.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${g.keys.length>1?"群":""}: ${joinValues(g.keys,"、")}`;case"invalid_key":return`${g.origin}内の無効なキー`;case"invalid_union":default:return"無効な入力";case"invalid_element":return`${g.origin}内の無効な値`}}};function ja(){return{localeError:error$w()}}const error$v=()=>{const g={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},map:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function getSizing(v){return g[v]??null}const v={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",mac:"MAC მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული ველი",base64url:"base64url-კოდირებული ველი",json_string:"JSON ველი",e164:"E.164 ნომერი",credit_card:"საკრედიტო ბარათის ნომერი",jwt:"JWT",template_literal:"შეყვანა"},D={nan:"NaN",number:"რიცხვი",string:"ველი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`არასწორი შეყვანა: მოსალოდნელი instanceof ${g.expected}, მიღებული ${q}`:`არასწორი შეყვანა: მოსალოდნელი ${v}, მიღებული ${q}`}case"invalid_value":return 1===g.values.length?`არასწორი შეყვანა: მოსალოდნელი ${stringifyPrimitive(g.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${joinValues(g.values,"|")}-დან`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`ზედმეტად დიდი: მოსალოდნელი ${g.origin??"მნიშვნელობა"} ${D.verb} ${v}${g.maximum.toString()} ${D.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${g.origin??"მნიშვნელობა"} იყოს ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`ზედმეტად პატარა: მოსალოდნელი ${g.origin} ${D.verb} ${v}${g.minimum.toString()} ${D.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${g.origin} იყოს ${v}${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`არასწორი ველი: უნდა იწყებოდეს "${D.prefix}"-ით`:"ends_with"===D.format?`არასწორი ველი: უნდა მთავრდებოდეს "${D.suffix}"-ით`:"includes"===D.format?`არასწორი ველი: უნდა შეიცავდეს "${D.includes}"-ს`:"regex"===D.format?`არასწორი ველი: უნდა შეესაბამებოდეს შაბლონს ${D.pattern}`:`არასწორი ${v[D.format]??g.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${g.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${g.keys.length>1?"ები":"ი"}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${g.origin}-ში`;case"invalid_union":default:return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${g.origin}-ში`}}};function ka(){return{localeError:error$v()}}const error$u=()=>{const g={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"},map:{unit:"ធាតុ",verb:"គួរមាន"}};function getSizing(v){return g[v]??null}const v={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",mac:"អាសយដ្ឋាន MAC",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",credit_card:"លេខប័ណ្ណឥណទាន",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"},D={nan:"NaN",number:"លេខ",array:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${g.expected} ប៉ុន្តែទទួលបាន ${q}`:`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${v} ប៉ុន្តែទទួលបាន ${q}`}case"invalid_value":return 1===g.values.length?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${stringifyPrimitive(g.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`ធំពេក៖ ត្រូវការ ${g.origin??"តម្លៃ"} ${v} ${g.maximum.toString()} ${D.unit??"ធាតុ"}`:`ធំពេក៖ ត្រូវការ ${g.origin??"តម្លៃ"} ${v} ${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`តូចពេក៖ ត្រូវការ ${g.origin} ${v} ${g.minimum.toString()} ${D.unit}`:`តូចពេក៖ ត្រូវការ ${g.origin} ${v} ${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${D.prefix}"`:"ends_with"===D.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${D.suffix}"`:"includes"===D.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${D.includes}"`:"regex"===D.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${D.pattern}`:`មិនត្រឹមត្រូវ៖ ${v[D.format]??g.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${g.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${joinValues(g.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${g.origin}`;case"invalid_union":default:return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${g.origin}`}}};function km(){return{localeError:error$u()}}function kh(){return km()}const error$t=()=>{const g={string:{unit:"ಅಕ್ಷರಗಳು",verb:"ಹೊಂದಲು"},file:{unit:"ಬೈಟ್‌ಗಳು",verb:"ಹೊಂದಲು"},array:{unit:"ವಸ್ತುಗಳು",verb:"ಹೊಂದಲು"},set:{unit:"ವಸ್ತುಗಳು",verb:"ಹೊಂದಲು"},map:{unit:"entries",verb:"ಹೊಂದಲು"}};function getSizing(v){return g[v]??null}const v={regex:"ಇನ್ಪುಟ್",email:"email ವಿಳಾಸ",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 ದಿನಾಂಕದ ಸಮಯ",date:"ISO ದಿನಾಂಕ",time:"ISO ಸಮಯ",duration:"ISO ಅವಧಿ",ipv4:"IPv4 ವಿಳಾಸ",ipv6:"IPv6 ವಿಳಾಸ",mac:"MAC ವಿಳಾಸ",cidrv4:"IPv4 ವ್ಯಾಪ್ತಿಯ",cidrv6:"IPv6 ವ್ಯಾಪ್ತಿಯ",base64:"base64-encodedಸ್ಟ್ರಿಂಗ್",base64url:"base64url-encodedಸ್ಟ್ರಿಂಗ್",json_string:"JSONಸ್ಟ್ರಿಂಗ್",e164:"E.164 ಸಂಖ್ಯೆ",credit_card:"ಕ್ರೆಡಿಟ್ ಕಾರ್ಡ್ ಸಂಖ್ಯೆ",jwt:"JWT",template_literal:"ಇನ್ಪುಟ್"},D={nan:"NaN"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input);return`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${v}, ಸ್ವೀಕರಿಸಿದನು ${D[R]??R}`}case"invalid_value":return 1===g.values.length?`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${stringifyPrimitive(g.values[0])}`:`ಅಮಾನ್ಯ ಆಯ್ಕೆ: ಇವುಗಳಲ್ಲಿ ಒಂದನ್ನು ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`ತುಂಬಾ ದೊಡ್ಡದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${g.origin??"value"} ಹೊಂದಲು ${v}${g.maximum.toString()} ${D.unit??"ಅಂಶಗಳು"}`:`ತುಂಬಾ ದೊಡ್ಡದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${g.origin??"value"} ಎಂದು ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`ತುಂಬಾ ಚಿಕ್ಕದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${g.origin} ಹೊಂದಲು ${v}${g.minimum.toString()} ${D.unit}`:`ತುಂಬಾ ಚಿಕ್ಕದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${g.origin} ಎಂದು ${v}${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`ಅಮಾನ್ಯವಾದ ಸ್ಟ್ರಿಂಗ್: ಇದರೊಂದಿಗೆ ಪ್ರಾರಂಭಿಸಬೇಕು "${D.prefix}"`:"ends_with"===D.format?`ಅಮಾನ್ಯವಾದ ಸ್ಟ್ರಿಂಗ್: ಇದರೊಂದಿಗೆ ಕೊನೆಗೊಳ್ಳಬೇಕು "${D.suffix}"`:"includes"===D.format?`ಅಮಾನ್ಯ ಸ್ಟ್ರಿಂಗ್: ಒಳಗೊಂಡಿರಬೇಕು "${D.includes}"`:"regex"===D.format?`ಅಮಾನ್ಯವಾದ ಸ್ಟ್ರಿಂಗ್: ಮಾದರಿಗೆ ಹೊಂದಿಕೆಯಾಗಬೇಕು ${D.pattern}`:`ಅಮಾನ್ಯ ${v[D.format]??g.format}`}case"not_multiple_of":return`ಅಮಾನ್ಯ ಸಂಖ್ಯೆ: ಬಹುಸಂಖ್ಯೆಯಾಗಿರಬೇಕು ${g.divisor}`;case"unrecognized_keys":return`ಗುರುತಿಸಲಾಗದ ಕೀ ${g.keys.length>1?"s":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`ಅಮಾನ್ಯವಾದ ಕೀ ಇನ್ ${g.origin}`;case"invalid_union":if(g.options&&Array.isArray(g.options)&&g.options.length>0){const v=g.options.map(g=>`'${g}'`).join(" | ");return`ಅಮಾನ್ಯ ತಾರತಮ್ಯ ಮೌಲ್ಯ. ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${v}`}return"ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್";case"invalid_element":return`ರಲ್ಲಿ ಅಮಾನ್ಯ ಮೌಲ್ಯ ${g.origin}`;default:return"ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್"}}};function kn(){return{localeError:error$t()}}const error$s=()=>{const g={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"},map:{unit:"개",verb:"to have"}};function getSizing(v){return g[v]??null}const v={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",mac:"MAC 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",credit_card:"신용카드 번호",jwt:"JWT",template_literal:"입력"},D={nan:"NaN"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`잘못된 입력: 예상 타입은 instanceof ${g.expected}, 받은 타입은 ${q}입니다`:`잘못된 입력: 예상 타입은 ${v}, 받은 타입은 ${q}입니다`}case"invalid_value":return 1===g.values.length?`잘못된 입력: 값은 ${stringifyPrimitive(g.values[0])} 이어야 합니다`:`잘못된 옵션: ${joinValues(g.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{const v=g.inclusive?"이하":"미만",D="미만"===v?"이어야 합니다":"여야 합니다",R=getSizing(g.origin),q=R?.unit??"요소";return R?`${g.origin??"값"}이 너무 큽니다: ${g.maximum.toString()}${q} ${v}${D}`:`${g.origin??"값"}이 너무 큽니다: ${g.maximum.toString()} ${v}${D}`}case"too_small":{const v=g.inclusive?"이상":"초과",D="이상"===v?"이어야 합니다":"여야 합니다",R=getSizing(g.origin),q=R?.unit??"요소";return R?`${g.origin??"값"}이 너무 작습니다: ${g.minimum.toString()}${q} ${v}${D}`:`${g.origin??"값"}이 너무 작습니다: ${g.minimum.toString()} ${v}${D}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`잘못된 문자열: "${D.prefix}"(으)로 시작해야 합니다`:"ends_with"===D.format?`잘못된 문자열: "${D.suffix}"(으)로 끝나야 합니다`:"includes"===D.format?`잘못된 문자열: "${D.includes}"을(를) 포함해야 합니다`:"regex"===D.format?`잘못된 문자열: 정규식 ${D.pattern} 패턴과 일치해야 합니다`:`잘못된 ${v[D.format]??g.format}`}case"not_multiple_of":return`잘못된 숫자: ${g.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${joinValues(g.keys,", ")}`;case"invalid_key":return`잘못된 키: ${g.origin}`;case"invalid_union":default:return"잘못된 입력";case"invalid_element":return`잘못된 값: ${g.origin}`}}};function ko(){return{localeError:error$s()}}const capitalizeFirstCharacter=g=>g.charAt(0).toUpperCase()+g.slice(1);function getUnitTypeFromNumber(g){const v=Math.abs(g),D=v%10,R=v%100;return R>=11&&R<=19||0===D?"many":1===D?"one":"few"}const error$r=()=>{const g={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function getSizing(v,D,R,q){const ie=g[v]??null;return null===ie?ie:{unit:ie.unit[D],verb:ie.verb[q][R?"inclusive":"notInclusive"]}}const v={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",mac:"MAC adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",credit_card:"kredito kortelės numeris",jwt:"JWT",template_literal:"įvestis"},D={nan:"NaN",number:"skaičius",bigint:"sveikasis skaičius",string:"eilutė",boolean:"loginė reikšmė",undefined:"neapibrėžta reikšmė",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulinė reikšmė"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`Gautas tipas ${q}, o tikėtasi - instanceof ${g.expected}`:`Gautas tipas ${q}, o tikėtasi - ${v}`}case"invalid_value":return 1===g.values.length?`Privalo būti ${stringifyPrimitive(g.values[0])}`:`Privalo būti vienas iš ${joinValues(g.values,"|")} pasirinkimų`;case"too_big":{const v=D[g.origin]??g.origin,R=getSizing(g.origin,getUnitTypeFromNumber(Number(g.maximum)),g.inclusive??!1,"smaller");if(R?.verb)return`${capitalizeFirstCharacter(v??g.origin??"reikšmė")} ${R.verb} ${g.maximum.toString()} ${R.unit??"elementų"}`;const q=g.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${capitalizeFirstCharacter(v??g.origin??"reikšmė")} turi būti ${q} ${g.maximum.toString()} ${R?.unit}`}case"too_small":{const v=D[g.origin]??g.origin,R=getSizing(g.origin,getUnitTypeFromNumber(Number(g.minimum)),g.inclusive??!1,"bigger");if(R?.verb)return`${capitalizeFirstCharacter(v??g.origin??"reikšmė")} ${R.verb} ${g.minimum.toString()} ${R.unit??"elementų"}`;const q=g.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${capitalizeFirstCharacter(v??g.origin??"reikšmė")} turi būti ${q} ${g.minimum.toString()} ${R?.unit}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`Eilutė privalo prasidėti "${D.prefix}"`:"ends_with"===D.format?`Eilutė privalo pasibaigti "${D.suffix}"`:"includes"===D.format?`Eilutė privalo įtraukti "${D.includes}"`:"regex"===D.format?`Eilutė privalo atitikti ${D.pattern}`:`Neteisingas ${v[D.format]??g.format}`}case"not_multiple_of":return`Skaičius privalo būti ${g.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${g.keys.length>1?"i":"as"} rakt${g.keys.length>1?"ai":"as"}: ${joinValues(g.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":default:return"Klaidinga įvestis";case"invalid_element":{const v=D[g.origin]??g.origin;return`${capitalizeFirstCharacter(v??g.origin??"reikšmė")} turi klaidingą įvestį`}}}};function lt(){return{localeError:error$r()}}const error$q=()=>{const g={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"},map:{unit:"ставки",verb:"да имаат"}};function getSizing(v){return g[v]??null}const v={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",mac:"MAC адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",credit_card:"број на кредитна картичка",jwt:"JWT",template_literal:"внес"},D={nan:"NaN",number:"број",array:"низа"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`Грешен внес: се очекува instanceof ${g.expected}, примено ${q}`:`Грешен внес: се очекува ${v}, примено ${q}`}case"invalid_value":return 1===g.values.length?`Invalid input: expected ${stringifyPrimitive(g.values[0])}`:`Грешана опција: се очекува една ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`Премногу голем: се очекува ${g.origin??"вредноста"} да има ${v}${g.maximum.toString()} ${D.unit??"елементи"}`:`Премногу голем: се очекува ${g.origin??"вредноста"} да биде ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`Премногу мал: се очекува ${g.origin} да има ${v}${g.minimum.toString()} ${D.unit}`:`Премногу мал: се очекува ${g.origin} да биде ${v}${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`Неважечка низа: мора да започнува со "${D.prefix}"`:"ends_with"===D.format?`Неважечка низа: мора да завршува со "${D.suffix}"`:"includes"===D.format?`Неважечка низа: мора да вклучува "${D.includes}"`:"regex"===D.format?`Неважечка низа: мора да одгоара на патернот ${D.pattern}`:`Invalid ${v[D.format]??g.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${g.divisor}`;case"unrecognized_keys":return`${g.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${g.origin}`;case"invalid_union":default:return"Грешен внес";case"invalid_element":return`Грешна вредност во ${g.origin}`}}};function mk(){return{localeError:error$q()}}const error$p=()=>{const g={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"},map:{unit:"elemen",verb:"mempunyai"}};function getSizing(v){return g[v]??null}const v={regex:"input",email:"alamat e-mel",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:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",mac:"alamat MAC",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",credit_card:"nombor kad kredit",jwt:"JWT",template_literal:"input"},D={nan:"NaN",number:"nombor"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`Input tidak sah: dijangka instanceof ${g.expected}, diterima ${q}`:`Input tidak sah: dijangka ${v}, diterima ${q}`}case"invalid_value":return 1===g.values.length?`Input tidak sah: dijangka ${stringifyPrimitive(g.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`Terlalu besar: dijangka ${g.origin??"nilai"} ${D.verb} ${v}${g.maximum.toString()} ${D.unit??"elemen"}`:`Terlalu besar: dijangka ${g.origin??"nilai"} adalah ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`Terlalu kecil: dijangka ${g.origin} ${D.verb} ${v}${g.minimum.toString()} ${D.unit}`:`Terlalu kecil: dijangka ${g.origin} adalah ${v}${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`String tidak sah: mesti bermula dengan "${D.prefix}"`:"ends_with"===D.format?`String tidak sah: mesti berakhir dengan "${D.suffix}"`:"includes"===D.format?`String tidak sah: mesti mengandungi "${D.includes}"`:"regex"===D.format?`String tidak sah: mesti sepadan dengan corak ${D.pattern}`:`${v[D.format]??g.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${g.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${g.origin}`;case"invalid_union":default:return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${g.origin}`}}};function ms(){return{localeError:error$p()}}const error$o=()=>{const g={string:{unit:"अक्षर",verb:"हुनुपर्छ"},file:{unit:"बाइट",verb:"हुनुपर्छ"},array:{unit:"तत्व",verb:"हुनुपर्छ"},set:{unit:"तत्व",verb:"हुनुपर्छ"},map:{unit:"प्रविष्टि",verb:"हुनुपर्छ"}};function getSizing(v){return g[v]??null}const v={regex:"इनपुट",email:"इमेल ठेगाना",url:"URL",emoji:"इमोजी",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO मिति र समय",date:"ISO मिति",time:"ISO समय",duration:"ISO अवधि",ipv4:"IPv4 ठेगाना",ipv6:"IPv6 ठेगाना",mac:"MAC ठेगाना",cidrv4:"IPv4 दायरा",cidrv6:"IPv6 दायरा",base64:"base64-इन्कोड गरिएको स्ट्रिङ",base64url:"base64url-इन्कोड गरिएको स्ट्रिङ",json_string:"JSON स्ट्रिङ",e164:"E.164 नम्बर",credit_card:"क्रेडिट कार्ड नम्बर",jwt:"JWT",template_literal:"इनपुट"},D={nan:"NaN"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input);return`अमान्य इनपुट: अपेक्षित ${v}, प्राप्त ${D[R]??R}`}case"invalid_value":return 1===g.values.length?`अमान्य इनपुट: अपेक्षित ${stringifyPrimitive(g.values[0])}`:`अमान्य विकल्प: अपेक्षित मानहरू मध्ये एक ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`धेरै ठूलो: ${g.origin??"मान"} मा ${v}${g.maximum.toString()} ${D.unit} ${D.verb}`:`धेरै ठूलो: ${g.origin??"मान"} ${v}${g.maximum.toString()} हुनुपर्छ`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`धेरै सानो: ${g.origin} मा ${v}${g.minimum.toString()} ${D.unit} ${D.verb}`:`धेरै सानो: ${g.origin} ${v}${g.minimum.toString()} हुनुपर्छ`}case"invalid_format":{const D=g;return"starts_with"===D.format?`अमान्य स्ट्रिङ: "${D.prefix}" बाट सुरु हुनुपर्छ`:"ends_with"===D.format?`अमान्य स्ट्रिङ: "${D.suffix}" मा समाप्त हुनुपर्छ`:"includes"===D.format?`अमान्य स्ट्रिङ: "${D.includes}" समावेश हुनुपर्छ`:"regex"===D.format?`अमान्य स्ट्रिङ: ढाँचा ${D.pattern} सँग मेल खानुपर्छ`:`अमान्य ${v[D.format]??g.format}`}case"not_multiple_of":return`अमान्य संख्या: ${g.divisor} को गुणज हुनुपर्छ`;case"unrecognized_keys":return`अपरिचित कुञ्जी${g.keys.length>1?"हरू":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`अमान्य कुञ्जी: ${g.origin} मा`;case"invalid_union":if(g.options&&Array.isArray(g.options)&&g.options.length>0){const v=g.options.map(g=>`'${g}'`).join(" | ");return`अमान्य डिस्क्रिमिनेटर मान: अपेक्षित ${v}`}return"अमान्य इनपुट";case"invalid_element":return`अमान्य मान: ${g.origin} मा`;default:return"अमान्य इनपुट"}}};function ne(){return{localeError:error$o()}}const error$n=()=>{const g={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"},map:{unit:"elementen",verb:"heeft"}};function getSizing(v){return g[v]??null}const v={regex:"invoer",email:"emailadres",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 datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",mac:"MAC-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",credit_card:"creditcardnummer",jwt:"JWT",template_literal:"invoer"},D={nan:"NaN",number:"getal"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`Ongeldige invoer: verwacht instanceof ${g.expected}, ontving ${q}`:`Ongeldige invoer: verwacht ${v}, ontving ${q}`}case"invalid_value":return 1===g.values.length?`Ongeldige invoer: verwacht ${stringifyPrimitive(g.values[0])}`:`Ongeldige optie: verwacht één van ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin),R="date"===g.origin?"laat":"string"===g.origin?"lang":"groot";return D?`Te ${R}: verwacht dat ${g.origin??"waarde"} ${v}${g.maximum.toString()} ${D.unit??"elementen"} ${D.verb}`:`Te ${R}: verwacht dat ${g.origin??"waarde"} ${v}${g.maximum.toString()} is`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin),R="date"===g.origin?"vroeg":"string"===g.origin?"kort":"klein";return D?`Te ${R}: verwacht dat ${g.origin} ${v}${g.minimum.toString()} ${D.unit} ${D.verb}`:`Te ${R}: verwacht dat ${g.origin} ${v}${g.minimum.toString()} is`}case"invalid_format":{const D=g;return"starts_with"===D.format?`Ongeldige tekst: moet met "${D.prefix}" beginnen`:"ends_with"===D.format?`Ongeldige tekst: moet op "${D.suffix}" eindigen`:"includes"===D.format?`Ongeldige tekst: moet "${D.includes}" bevatten`:"regex"===D.format?`Ongeldige tekst: moet overeenkomen met patroon ${D.pattern}`:`Ongeldig: ${v[D.format]??g.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${g.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${g.keys.length>1?"s":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${g.origin}`;case"invalid_union":default:return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${g.origin}`}}};function nl(){return{localeError:error$n()}}const error$m=()=>{const g={string:{unit:"teikn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"element",verb:"å innehalde"},set:{unit:"element",verb:"å innehalde"},map:{unit:"element",verb:"å innehalde"}};function getSizing(v){return g[v]??null}const v={regex:"input",email:"e-postadresse",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 dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varigheit",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkoda streng",base64url:"base64url-enkoda streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",jwt:"JWT",template_literal:"input"},D={nan:"NaN",number:"tal",array:"liste"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`Ugyldig input: forventa instanceof ${g.expected}, fekk ${q}`:`Ugyldig input: forventa ${v}, fekk ${q}`}case"invalid_value":return 1===g.values.length?`Ugyldig verdi: forventa ${stringifyPrimitive(g.values[0])}`:`Ugyldig val: forventa eitt av ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`For stor(t): forventa ${g.origin??"value"} til å ha ${v}${g.maximum.toString()} ${D.unit??"element"}`:`For stor(t): forventa ${g.origin??"value"} til å ha ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`For lite(n): forventa ${g.origin} til å ha ${v}${g.minimum.toString()} ${D.unit}`:`For lite(n): forventa ${g.origin} til å ha ${v}${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`Ugyldig streng: må starte med "${D.prefix}"`:"ends_with"===D.format?`Ugyldig streng: må slutte med "${D.suffix}"`:"includes"===D.format?`Ugyldig streng: må innehalde "${D.includes}"`:"regex"===D.format?`Ugyldig streng: må matche mønsteret ${D.pattern}`:`Ugyldig ${v[D.format]??g.format}`}case"not_multiple_of":return`Ugyldig tal: må vere eit multiplum av ${g.divisor}`;case"unrecognized_keys":return`${g.keys.length>1?"Ukjende nøklar":"Ukjend nøkkel"}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${g.origin}`;case"invalid_union":default:return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${g.origin}`}}};function nn(){return{localeError:error$m()}}const error$l=()=>{const g={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"},map:{unit:"elementer",verb:"å inneholde"}};function getSizing(v){return g[v]??null}const v={regex:"input",email:"e-postadresse",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 dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",jwt:"JWT",template_literal:"input"},D={nan:"NaN",number:"tall",array:"liste"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`Ugyldig input: forventet instanceof ${g.expected}, fikk ${q}`:`Ugyldig input: forventet ${v}, fikk ${q}`}case"invalid_value":return 1===g.values.length?`Ugyldig verdi: forventet ${stringifyPrimitive(g.values[0])}`:`Ugyldig valg: forventet en av ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`For stor(t): forventet ${g.origin??"value"} til å ha ${v}${g.maximum.toString()} ${D.unit??"elementer"}`:`For stor(t): forventet ${g.origin??"value"} til å ha ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`For lite(n): forventet ${g.origin} til å ha ${v}${g.minimum.toString()} ${D.unit}`:`For lite(n): forventet ${g.origin} til å ha ${v}${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`Ugyldig streng: må starte med "${D.prefix}"`:"ends_with"===D.format?`Ugyldig streng: må ende med "${D.suffix}"`:"includes"===D.format?`Ugyldig streng: må inneholde "${D.includes}"`:"regex"===D.format?`Ugyldig streng: må matche mønsteret ${D.pattern}`:`Ugyldig ${v[D.format]??g.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${g.divisor}`;case"unrecognized_keys":return`${g.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${g.origin}`;case"invalid_union":default:return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${g.origin}`}}};function no(){return{localeError:error$l()}}const error$k=()=>{const g={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"},map:{unit:"unsur",verb:"olmalıdır"}};function getSizing(v){return g[v]??null}const v={regex:"giren",email:"epostagâh",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 hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",mac:"MAC nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",credit_card:"i'tibâr kartı numarası",jwt:"JWT",template_literal:"giren"},D={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`Fâsit giren: umulan instanceof ${g.expected}, alınan ${q}`:`Fâsit giren: umulan ${v}, alınan ${q}`}case"invalid_value":return 1===g.values.length?`Fâsit giren: umulan ${stringifyPrimitive(g.values[0])}`:`Fâsit tercih: mûteberler ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`Fazla büyük: ${g.origin??"value"}, ${v}${g.maximum.toString()} ${D.unit??"elements"} sahip olmalıydı.`:`Fazla büyük: ${g.origin??"value"}, ${v}${g.maximum.toString()} olmalıydı.`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`Fazla küçük: ${g.origin}, ${v}${g.minimum.toString()} ${D.unit} sahip olmalıydı.`:`Fazla küçük: ${g.origin}, ${v}${g.minimum.toString()} olmalıydı.`}case"invalid_format":{const D=g;return"starts_with"===D.format?`Fâsit metin: "${D.prefix}" ile başlamalı.`:"ends_with"===D.format?`Fâsit metin: "${D.suffix}" ile bitmeli.`:"includes"===D.format?`Fâsit metin: "${D.includes}" ihtivâ etmeli.`:"regex"===D.format?`Fâsit metin: ${D.pattern} nakşına uymalı.`:`Fâsit ${v[D.format]??g.format}`}case"not_multiple_of":return`Fâsit sayı: ${g.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${g.keys.length>1?"s":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`${g.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${g.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function ota(){return{localeError:error$k()}}const error$j=()=>{const g={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"},map:{unit:"توکي",verb:"ولري"}};function getSizing(v){return g[v]??null}const v={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",mac:"د MAC پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",credit_card:"د کریډیټ کارت شمیره",jwt:"JWT",template_literal:"ورودي"},D={nan:"NaN",number:"عدد",array:"ارې"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`ناسم ورودي: باید instanceof ${g.expected} وای, مګر ${q} ترلاسه شو`:`ناسم ورودي: باید ${v} وای, مګر ${q} ترلاسه شو`}case"invalid_value":return 1===g.values.length?`ناسم ورودي: باید ${stringifyPrimitive(g.values[0])} وای`:`ناسم انتخاب: باید یو له ${joinValues(g.values,"|")} څخه وای`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`ډیر لوی: ${g.origin??"ارزښت"} باید ${v}${g.maximum.toString()} ${D.unit??"عنصرونه"} ولري`:`ډیر لوی: ${g.origin??"ارزښت"} باید ${v}${g.maximum.toString()} وي`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`ډیر کوچنی: ${g.origin} باید ${v}${g.minimum.toString()} ${D.unit} ولري`:`ډیر کوچنی: ${g.origin} باید ${v}${g.minimum.toString()} وي`}case"invalid_format":{const D=g;return"starts_with"===D.format?`ناسم متن: باید د "${D.prefix}" سره پیل شي`:"ends_with"===D.format?`ناسم متن: باید د "${D.suffix}" سره پای ته ورسيږي`:"includes"===D.format?`ناسم متن: باید "${D.includes}" ولري`:"regex"===D.format?`ناسم متن: باید د ${D.pattern} سره مطابقت ولري`:`${v[D.format]??g.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${g.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${g.keys.length>1?"کلیډونه":"کلیډ"}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${g.origin} کې`;case"invalid_union":default:return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${g.origin} کې`}}};function ps(){return{localeError:error$j()}}const error$i=()=>{const g={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"},map:{unit:"elementów",verb:"mieć"}};function getSizing(v){return g[v]??null}const v={regex:"wyrażenie",email:"adres email",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:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",mac:"adres MAC",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",credit_card:"numer karty kredytowej",jwt:"JWT",template_literal:"wejście"},D={nan:"NaN",number:"liczba",array:"tablica"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${g.expected}, otrzymano ${q}`:`Nieprawidłowe dane wejściowe: oczekiwano ${v}, otrzymano ${q}`}case"invalid_value":return 1===g.values.length?`Nieprawidłowe dane wejściowe: oczekiwano ${stringifyPrimitive(g.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`Za duża wartość: oczekiwano, że ${g.origin??"wartość"} będzie mieć ${v}${g.maximum.toString()} ${D.unit??"elementów"}`:`Zbyt duż(y/a/e): oczekiwano, że ${g.origin??"wartość"} będzie wynosić ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`Za mała wartość: oczekiwano, że ${g.origin??"wartość"} będzie mieć ${v}${g.minimum.toString()} ${D.unit??"elementów"}`:`Zbyt mał(y/a/e): oczekiwano, że ${g.origin??"wartość"} będzie wynosić ${v}${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${D.prefix}"`:"ends_with"===D.format?`Nieprawidłowy ciąg znaków: musi kończyć się na "${D.suffix}"`:"includes"===D.format?`Nieprawidłowy ciąg znaków: musi zawierać "${D.includes}"`:"regex"===D.format?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${D.pattern}`:`Nieprawidłow(y/a/e) ${v[D.format]??g.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${g.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${g.keys.length>1?"s":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${g.origin}`;case"invalid_union":default:return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${g.origin}`}}};function pl(){return{localeError:error$i()}}const error$h=()=>{const g={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function getSizing(v){return g[v]??null}const v={regex:"a entrada",email:"o endereço de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a duração ISO",ipv4:"o endereço IPv4",ipv6:"o endereço IPv6",mac:"o endereço MAC",cidrv4:"o intervalo de endereços IPv4",cidrv6:"o intervalo de endereços IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o número E.164",credit_card:"o número de cartão de crédito",jwt:"o JWT",template_literal:"a entrada"},D={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},R={string:{name:"texto",articles:D.masculine},number:{name:"número",articles:D.masculine},int:{name:"número inteiro",articles:D.masculine},boolean:{name:"valor booleano",articles:D.masculine},bigint:{name:"número bigint",articles:D.masculine},symbol:{name:"símbolo",articles:D.masculine},undefined:{name:'valor "undefined"',articles:D.masculine},null:{name:'valor "nulo"',articles:D.masculine},never:{name:'valor "never"',articles:D.masculine},void:{name:'valor "void"',articles:D.masculine},date:{name:"data",articles:D.feminine},array:{name:"vetor",articles:D.masculine},object:{name:"objeto",articles:D.masculine},tuple:{name:"tuplo",articles:D.masculine},record:{name:"registo",articles:D.masculine},map:{name:"mapa",articles:D.masculine},set:{name:"conjunto",articles:D.masculine},file:{name:"ficheiro",articles:D.masculine},nonoptional:{name:"valor não opcional",articles:D.masculine},nan:{name:'valor "NaN"',articles:D.masculine},function:{name:"função",articles:D.feminine}};function translateOriginWithArticle(g,v){const q=R[g]??{name:`valor "${g}"`,articles:D.masculine};return`${q.articles[v]} ${q.name}`}return g=>{switch(g.code){case"invalid_type":return`Entrada inválida: esperava ${translateOriginWithArticle(g.expected,"indefinite")}, recebeu ${translateOriginWithArticle(parsedType(g.input),"indefinite")}`;case"invalid_value":return 1===g.values.length?`Entrada inválida: esperava ${stringifyPrimitive(g.values[0])}`:`Opção inválida: esperava uma das seguintes opções: ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`Demasiado grande: esperava que ${translateOriginWithArticle(g.origin,"definite")} tivesse ${v} ${g.maximum.toString()} ${D.unit??"elementos"}`:`Demasiado grande: esperava que ${translateOriginWithArticle(g.origin,"definite")} fosse ${v} ${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`Demasiado pequeno: esperava que ${translateOriginWithArticle(g.origin,"definite")} tivesse ${v} ${g.minimum.toString()} ${D.unit??"elementos"}`:`Demasiado pequeno: esperava que ${translateOriginWithArticle(g.origin,"definite")} fosse ${v} ${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`Texto inválido: deve começar por "${D.prefix}"`:"ends_with"===D.format?`Texto inválido: deve terminar em "${D.suffix}"`:"includes"===D.format?`Texto inválido: deve incluir "${D.includes}"`:"regex"===D.format?`Texto inválido: deve corresponder ao padrão ${D.pattern}`:`Formato d${v[D.format]??g.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${g.divisor}`;case"unrecognized_keys":{const v=g.keys.length>1?"s":"";return`Chave${v} inválida${v}: ${joinValues(g.keys,", ")}`}case"invalid_key":case"invalid_element":return`Entrada inválida n${translateOriginWithArticle(g.origin,"definite")}`;case"invalid_union":if(g.options&&Array.isArray(g.options)&&g.options.length>0){const v=g.options.map(g=>`'${g}'`).join(" | ");return`Valor de discriminação inválido. Esperava ${v}`}return"Entrada inválida";default:return"Entrada inválida"}}};function pt(){return{localeError:error$h()}}const error$g=()=>{const g={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function getSizing(v){return g[v]??null}const v={regex:"a entrada",email:"o endereço de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a duração ISO",ipv4:"o endereço IPv4",ipv6:"o endereço IPv6",mac:"o endereço MAC",cidrv4:"a faixa de endereços IPv4",cidrv6:"a faixa de endereços IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o número E.164",credit_card:"o número de cartão de crédito",jwt:"o JWT",template_literal:"a entrada"},D={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},R={string:{name:"texto",articles:D.masculine},number:{name:"número",articles:D.masculine},int:{name:"número inteiro",articles:D.masculine},boolean:{name:"valor booleano",articles:D.masculine},bigint:{name:"número bigint",articles:D.masculine},symbol:{name:"símbolo",articles:D.masculine},undefined:{name:'valor "undefined"',articles:D.masculine},null:{name:'valor "nulo"',articles:D.masculine},never:{name:'valor "never"',articles:D.masculine},void:{name:'valor "void"',articles:D.masculine},date:{name:"data",articles:D.feminine},array:{name:"vetor",articles:D.masculine},object:{name:"objeto",articles:D.masculine},tuple:{name:"tupla",articles:D.feminine},record:{name:"registro",articles:D.masculine},map:{name:"mapa",articles:D.masculine},set:{name:"conjunto",articles:D.masculine},file:{name:"arquivo",articles:D.masculine},nonoptional:{name:"valor não opcional",articles:D.masculine},nan:{name:'valor "NaN"',articles:D.masculine},function:{name:"função",articles:D.feminine}};function translateOriginWithArticle(g,v){const q=R[g]??{name:`valor "${g}"`,articles:D.masculine};return`${q.articles[v]} ${q.name}`}return g=>{switch(g.code){case"invalid_type":return`Entrada inválida: esperava ${translateOriginWithArticle(g.expected,"indefinite")}, recebeu ${translateOriginWithArticle(parsedType(g.input),"indefinite")}`;case"invalid_value":return 1===g.values.length?`Entrada inválida: esperava ${stringifyPrimitive(g.values[0])}`:`Opção inválida: esperava uma das seguintes opções: ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`Grande demais: esperava que ${translateOriginWithArticle(g.origin,"definite")} tivesse ${v} ${g.maximum.toString()} ${D.unit??"elementos"}`:`Grande demais: esperava que ${translateOriginWithArticle(g.origin,"definite")} fosse ${v} ${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`Pequeno demais: esperava que ${translateOriginWithArticle(g.origin,"definite")} tivesse ${v} ${g.minimum.toString()} ${D.unit??"elementos"}`:`Pequeno demais: esperava que ${translateOriginWithArticle(g.origin,"definite")} fosse ${v} ${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`Texto inválido: deve começar com "${D.prefix}"`:"ends_with"===D.format?`Texto inválido: deve terminar com "${D.suffix}"`:"includes"===D.format?`Texto inválido: deve incluir "${D.includes}"`:"regex"===D.format?`Texto inválido: deve corresponder ao padrão ${D.pattern}`:`Formato d${v[D.format]??g.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${g.divisor}`;case"unrecognized_keys":{const v=g.keys.length>1?"s":"";return`Chave${v} inválida${v}: ${joinValues(g.keys,", ")}`}case"invalid_key":case"invalid_element":return`Entrada inválida n${translateOriginWithArticle(g.origin,"definite")}`;case"invalid_union":if(g.options&&Array.isArray(g.options)&&g.options.length>0){const v=g.options.map(g=>`'${g}'`).join(" | ");return`Valor de discriminação inválido. Esperava ${v}`}return"Entrada inválida";default:return"Entrada inválida"}}};function ptBR(){return{localeError:error$g()}}const error$f=()=>{const g={string:{unit:"caractere",verb:"să aibă"},file:{unit:"octeți",verb:"să aibă"},array:{unit:"elemente",verb:"să aibă"},set:{unit:"elemente",verb:"să aibă"},map:{unit:"intrări",verb:"să aibă"}};function getSizing(v){return g[v]??null}const v={regex:"intrare",email:"adresă de email",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:"dată și oră ISO",date:"dată ISO",time:"oră ISO",duration:"durată ISO",ipv4:"adresă IPv4",ipv6:"adresă IPv6",mac:"adresă MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"șir codat base64",base64url:"șir codat base64url",json_string:"șir JSON",e164:"număr E.164",credit_card:"număr de card de credit",jwt:"JWT",template_literal:"intrare"},D={nan:"NaN",string:"șir",number:"număr",boolean:"boolean",function:"funcție",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"număr mare",void:"void",never:"never",map:"hartă",set:"set"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input);return`Intrare invalidă: așteptat ${v}, primit ${D[R]??R}`}case"invalid_value":return 1===g.values.length?`Intrare invalidă: așteptat ${stringifyPrimitive(g.values[0])}`:`Opțiune invalidă: așteptat una dintre ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`Prea mare: așteptat ca ${g.origin??"valoarea"} ${D.verb} ${v}${g.maximum.toString()} ${D.unit??"elemente"}`:`Prea mare: așteptat ca ${g.origin??"valoarea"} să fie ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`Prea mic: așteptat ca ${g.origin} ${D.verb} ${v}${g.minimum.toString()} ${D.unit}`:`Prea mic: așteptat ca ${g.origin} să fie ${v}${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`Șir invalid: trebuie să înceapă cu "${D.prefix}"`:"ends_with"===D.format?`Șir invalid: trebuie să se termine cu "${D.suffix}"`:"includes"===D.format?`Șir invalid: trebuie să includă "${D.includes}"`:"regex"===D.format?`Șir invalid: trebuie să se potrivească cu modelul ${D.pattern}`:`Format invalid: ${v[D.format]??g.format}`}case"not_multiple_of":return`Număr invalid: trebuie să fie multiplu de ${g.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Cheie invalidă în ${g.origin}`;case"invalid_union":default:return"Intrare invalidă";case"invalid_element":return`Valoare invalidă în ${g.origin}`}}};function ro(){return{localeError:error$f()}}function getRussianPlural(g,v,D,R){const q=Math.abs(g),ie=q%10,se=q%100;return se>=11&&se<=19?R:1===ie?v:ie>=2&&ie<=4?D:R}const error$e=()=>{const g={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},map:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function getSizing(v){return g[v]??null}const v={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",mac:"MAC адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",credit_card:"номер кредитной карты",jwt:"JWT",template_literal:"ввод"},D={nan:"NaN",number:"число",array:"массив"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`Неверный ввод: ожидалось instanceof ${g.expected}, получено ${q}`:`Неверный ввод: ожидалось ${v}, получено ${q}`}case"invalid_value":return 1===g.values.length?`Неверный ввод: ожидалось ${stringifyPrimitive(g.values[0])}`:`Неверный вариант: ожидалось одно из ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);if(D){const R=getRussianPlural(Number(g.maximum),D.unit.one,D.unit.few,D.unit.many);return`Слишком большое значение: ожидалось, что ${g.origin??"значение"} будет иметь ${v}${g.maximum.toString()} ${R}`}return`Слишком большое значение: ожидалось, что ${g.origin??"значение"} будет ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);if(D){const R=getRussianPlural(Number(g.minimum),D.unit.one,D.unit.few,D.unit.many);return`Слишком маленькое значение: ожидалось, что ${g.origin} будет иметь ${v}${g.minimum.toString()} ${R}`}return`Слишком маленькое значение: ожидалось, что ${g.origin} будет ${v}${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`Неверная строка: должна начинаться с "${D.prefix}"`:"ends_with"===D.format?`Неверная строка: должна заканчиваться на "${D.suffix}"`:"includes"===D.format?`Неверная строка: должна содержать "${D.includes}"`:"regex"===D.format?`Неверная строка: должна соответствовать шаблону ${D.pattern}`:`Неверный ${v[D.format]??g.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${g.divisor}`;case"unrecognized_keys":return`Нераспознанн${g.keys.length>1?"ые":"ый"} ключ${g.keys.length>1?"и":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${g.origin}`;case"invalid_union":default:return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${g.origin}`}}};function ru(){return{localeError:error$e()}}const error$d=()=>{const g={string:{unit:"znakov",verb:"mať"},file:{unit:"bajtov",verb:"mať"},array:{unit:"prvkov",verb:"mať"},set:{unit:"prvkov",verb:"mať"},map:{unit:"položiek",verb:"mať"}};function getSizing(v){return g[v]??null}const v={regex:"regulárny výraz",email:"e-mailová adresa",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:"dátum a čas vo formáte ISO",date:"dátum vo formáte ISO",time:"čas vo formáte ISO",duration:"doba trvania ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"reťazec zakódovaný vo formáte base64",base64url:"reťazec zakódovaný vo formáte base64url",json_string:"reťazec vo formáte JSON",e164:"číslo E.164",credit_card:"číslo kreditnej karty",jwt:"JWT",template_literal:"vstup"},D={nan:"NaN",number:"číslo",string:"reťazec",function:"funkcia",array:"pole"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`Neplatný vstup: očakávané instanceof ${g.expected}, obdržané ${q}`:`Neplatný vstup: očakávané ${v}, obdržané ${q}`}case"invalid_value":return 1===g.values.length?`Neplatný vstup: očakávané ${stringifyPrimitive(g.values[0])}`:`Neplatný vstup: očakávaná jedna z hodnôt ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`Hodnota je príliš veľká: ${g.origin??"hodnota"} musí mať ${v}${g.maximum.toString()} ${D.unit??"prvkov"}`:`Hodnota je príliš veľká: ${g.origin??"hodnota"} musí byť ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`Hodnota je príliš malá: ${g.origin??"hodnota"} musí mať ${v}${g.minimum.toString()} ${D.unit??"prvkov"}`:`Hodnota je príliš malá: ${g.origin??"hodnota"} musí byť ${v}${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`Neplatný reťazec: musí začínať na "${D.prefix}"`:"ends_with"===D.format?`Neplatný reťazec: musí končiť na "${D.suffix}"`:"includes"===D.format?`Neplatný reťazec: musí obsahovať "${D.includes}"`:"regex"===D.format?`Neplatný reťazec: musí zodpovedať vzoru ${D.pattern}`:`Neplatný formát ${v[D.format]??g.format}`}case"not_multiple_of":return`Neplatné číslo: musí byť násobkom ${g.divisor}`;case"unrecognized_keys":return`Neznáme klúče: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Neplatný klúč v ${g.origin}`;case"invalid_union":default:return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${g.origin}`}}};function sk(){return{localeError:error$d()}}const error$c=()=>{const g={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"},map:{unit:"elementov",verb:"imeti"}};function getSizing(v){return g[v]??null}const v={regex:"vnos",email:"e-poštni naslov",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 datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",mac:"MAC naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",credit_card:"številka kreditne kartice",jwt:"JWT",template_literal:"vnos"},D={nan:"NaN",number:"število",array:"tabela"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`Neveljaven vnos: pričakovano instanceof ${g.expected}, prejeto ${q}`:`Neveljaven vnos: pričakovano ${v}, prejeto ${q}`}case"invalid_value":return 1===g.values.length?`Neveljaven vnos: pričakovano ${stringifyPrimitive(g.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`Preveliko: pričakovano, da bo ${g.origin??"vrednost"} imelo ${v}${g.maximum.toString()} ${D.unit??"elementov"}`:`Preveliko: pričakovano, da bo ${g.origin??"vrednost"} ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`Premajhno: pričakovano, da bo ${g.origin} imelo ${v}${g.minimum.toString()} ${D.unit}`:`Premajhno: pričakovano, da bo ${g.origin} ${v}${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`Neveljaven niz: mora se začeti z "${D.prefix}"`:"ends_with"===D.format?`Neveljaven niz: mora se končati z "${D.suffix}"`:"includes"===D.format?`Neveljaven niz: mora vsebovati "${D.includes}"`:"regex"===D.format?`Neveljaven niz: mora ustrezati vzorcu ${D.pattern}`:`Neveljaven ${v[D.format]??g.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${g.divisor}`;case"unrecognized_keys":return`Neprepoznan${g.keys.length>1?"i ključi":" ključ"}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${g.origin}`;case"invalid_union":default:return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${g.origin}`}}};function sl(){return{localeError:error$c()}}const error$b=()=>{const g={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"},map:{unit:"objekt",verb:"att innehålla"}};function getSizing(v){return g[v]??null}const v={regex:"reguljärt uttryck",email:"e-postadress",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-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-adress",ipv6:"IPv6-adress",mac:"MAC-adress",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",credit_card:"kreditkortsnummer",jwt:"JWT",template_literal:"mall-literal"},D={nan:"NaN",number:"antal",array:"lista"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`Ogiltig inmatning: förväntat instanceof ${g.expected}, fick ${q}`:`Ogiltig inmatning: förväntat ${v}, fick ${q}`}case"invalid_value":return 1===g.values.length?`Ogiltig inmatning: förväntat ${stringifyPrimitive(g.values[0])}`:`Ogiltigt val: förväntade en av ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`För stor(t): förväntade ${g.origin??"värdet"} att ha ${v}${g.maximum.toString()} ${D.unit??"element"}`:`För stor(t): förväntat ${g.origin??"värdet"} att ha ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`För lite(t): förväntade ${g.origin??"värdet"} att ha ${v}${g.minimum.toString()} ${D.unit}`:`För lite(t): förväntade ${g.origin??"värdet"} att ha ${v}${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`Ogiltig sträng: måste börja med "${D.prefix}"`:"ends_with"===D.format?`Ogiltig sträng: måste sluta med "${D.suffix}"`:"includes"===D.format?`Ogiltig sträng: måste innehålla "${D.includes}"`:"regex"===D.format?`Ogiltig sträng: måste matcha mönstret "${D.pattern}"`:`Ogiltig(t) ${v[D.format]??g.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${g.divisor}`;case"unrecognized_keys":return`${g.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${g.origin??"värdet"}`;case"invalid_union":default:return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${g.origin??"värdet"}`}}};function sv(){return{localeError:error$b()}}const error$a=()=>{const g={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},map:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function getSizing(v){return g[v]??null}const v={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",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 தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",mac:"MAC முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",credit_card:"கடன் அட்டை எண்",jwt:"JWT",template_literal:"input"},D={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${g.expected}, பெறப்பட்டது ${q}`:`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${v}, பெறப்பட்டது ${q}`}case"invalid_value":return 1===g.values.length?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${stringifyPrimitive(g.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${joinValues(g.values,"|")} இல் ஒன்று`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${g.origin??"மதிப்பு"} ${v}${g.maximum.toString()} ${D.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${g.origin??"மதிப்பு"} ${v}${g.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${g.origin} ${v}${g.minimum.toString()} ${D.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${g.origin} ${v}${g.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{const D=g;return"starts_with"===D.format?`தவறான சரம்: "${D.prefix}" இல் தொடங்க வேண்டும்`:"ends_with"===D.format?`தவறான சரம்: "${D.suffix}" இல் முடிவடைய வேண்டும்`:"includes"===D.format?`தவறான சரம்: "${D.includes}" ஐ உள்ளடக்க வேண்டும்`:"regex"===D.format?`தவறான சரம்: ${D.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${v[D.format]??g.format}`}case"not_multiple_of":return`தவறான எண்: ${g.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${g.keys.length>1?"கள்":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`${g.origin} இல் தவறான விசை`;case"invalid_union":default:return"தவறான உள்ளீடு";case"invalid_element":return`${g.origin} இல் தவறான மதிப்பு`}}};function ta(){return{localeError:error$a()}}const error$9=()=>{const g={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"},map:{unit:"รายการ",verb:"ควรมี"}};function getSizing(v){return g[v]??null}const v={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",mac:"ที่อยู่ MAC",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",credit_card:"หมายเลขบัตรเครดิต",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"},D={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${g.expected} แต่ได้รับ ${q}`:`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${v} แต่ได้รับ ${q}`}case"invalid_value":return 1===g.values.length?`ค่าไม่ถูกต้อง: ควรเป็น ${stringifyPrimitive(g.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"ไม่เกิน":"น้อยกว่า",D=getSizing(g.origin);return D?`เกินกำหนด: ${g.origin??"ค่า"} ควรมี${v} ${g.maximum.toString()} ${D.unit??"รายการ"}`:`เกินกำหนด: ${g.origin??"ค่า"} ควรมี${v} ${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?"อย่างน้อย":"มากกว่า",D=getSizing(g.origin);return D?`น้อยกว่ากำหนด: ${g.origin} ควรมี${v} ${g.minimum.toString()} ${D.unit}`:`น้อยกว่ากำหนด: ${g.origin} ควรมี${v} ${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${D.prefix}"`:"ends_with"===D.format?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${D.suffix}"`:"includes"===D.format?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${D.includes}" อยู่ในข้อความ`:"regex"===D.format?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${D.pattern}`:`รูปแบบไม่ถูกต้อง: ${v[D.format]??g.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${g.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${joinValues(g.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${g.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${g.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function th(){return{localeError:error$9()}}const error$8=()=>{const g={string:{unit:"simwol",verb:"bolmaly"},file:{unit:"baýt",verb:"bolmaly"},array:{unit:"elementler",verb:"bolmaly"},set:{unit:"elementler",verb:"bolmaly"},map:{unit:"elementler",verb:"bolmaly"}};function getSizing(v){return g[v]??null}const v={regex:"giriş",email:"e-poçta salgysy",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 sene we wagt",date:"ISO sene",time:"ISO wagt",duration:"ISO wagt aralygy",ipv4:"IPv4 salgysy",ipv6:"IPv6 salgysy",mac:"MAC salgysy",cidrv4:"IPv4 aralygy",cidrv6:"IPv6 aralygy",base64:"base64 bilen şifrlenen setir",base64url:"base64url bilen şifrlenen setir",json_string:"JSON setiri",e164:"E.164 nomeri",credit_card:"kredit kartynyň nomeri",jwt:"JWT",template_literal:"şablon"},D={nan:"NaN"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input);return`Nädogry baha: garaşylan ${v} ýerine ${D[R]??R} alyndy`}case"invalid_value":return 1===g.values.length?`Nädogry baha: ${stringifyPrimitive(g.values[0])} bolmaly`:`Nädogry saýlaw: aşakdakylardan biri bolmaly: ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`Has uly: garaşylýan ${g.origin??"baha"} ${v} ${g.maximum.toString()} ${D.unit??"element"}`:`Has uly: garaşylýan ${g.origin??"baha"} ${v} ${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`Has kiçi: garaşylýan ${g.origin} ${v} ${g.minimum.toString()} ${D.unit}`:`Has kiçi: garaşylýan ${g.origin} ${v} ${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`Nädogry setir: "${D.prefix}" bilen başlamaly`:"ends_with"===D.format?`Nädogry setir: "${D.suffix}" bilen gutarmaly`:"includes"===D.format?`Nädogry setir: "${D.includes}" saklamaly`:"regex"===D.format?`Nädogry setir: ${D.pattern} nusga laýyk bolmaly`:`Nädogry ${v[D.format]??g.format}`}case"not_multiple_of":return`Nädogry san: ${g.divisor} bilen galyndysyz bölünmeli`;case"unrecognized_keys":return`Tanalmaýan açar${g.keys.length>1?"lar":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`${g.origin} içinde nädogry açar`;case"invalid_union":default:return"Nädogry baha";case"invalid_element":return`${g.origin} içinde nädogry baha`}}};function tk(){return{localeError:error$8()}}const error$7=()=>{const g={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"},map:{unit:"öğe",verb:"olmalı"}};function getSizing(v){return g[v]??null}const v={regex:"girdi",email:"e-posta adresi",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 tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",mac:"MAC adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",credit_card:"kredi kartı numarası",jwt:"JWT",template_literal:"Şablon dizesi"},D={nan:"NaN"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`Geçersiz değer: beklenen instanceof ${g.expected}, alınan ${q}`:`Geçersiz değer: beklenen ${v}, alınan ${q}`}case"invalid_value":return 1===g.values.length?`Geçersiz değer: beklenen ${stringifyPrimitive(g.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`Çok büyük: beklenen ${g.origin??"değer"} ${v}${g.maximum.toString()} ${D.unit??"öğe"}`:`Çok büyük: beklenen ${g.origin??"değer"} ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`Çok küçük: beklenen ${g.origin} ${v}${g.minimum.toString()} ${D.unit}`:`Çok küçük: beklenen ${g.origin} ${v}${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`Geçersiz metin: "${D.prefix}" ile başlamalı`:"ends_with"===D.format?`Geçersiz metin: "${D.suffix}" ile bitmeli`:"includes"===D.format?`Geçersiz metin: "${D.includes}" içermeli`:"regex"===D.format?`Geçersiz metin: ${D.pattern} desenine uymalı`:`Geçersiz ${v[D.format]??g.format}`}case"not_multiple_of":return`Geçersiz sayı: ${g.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${g.keys.length>1?"lar":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`${g.origin} içinde geçersiz anahtar`;case"invalid_union":default:return"Geçersiz değer";case"invalid_element":return`${g.origin} içinde geçersiz değer`}}};function tr(){return{localeError:error$7()}}const error$6=()=>{const g={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"},map:{unit:"елементів",verb:"матиме"}};function getSizing(v){return g[v]??null}const v={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",mac:"адреса MAC",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",credit_card:"номер кредитної картки",jwt:"JWT",template_literal:"вхідні дані"},D={nan:"NaN",number:"число",array:"масив"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`Неправильні вхідні дані: очікується instanceof ${g.expected}, отримано ${q}`:`Неправильні вхідні дані: очікується ${v}, отримано ${q}`}case"invalid_value":return 1===g.values.length?`Неправильні вхідні дані: очікується ${stringifyPrimitive(g.values[0])}`:`Неправильна опція: очікується одне з ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`Занадто велике: очікується, що ${g.origin??"значення"} ${D.verb} ${v}${g.maximum.toString()} ${D.unit??"елементів"}`:`Занадто велике: очікується, що ${g.origin??"значення"} буде ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`Занадто мале: очікується, що ${g.origin} ${D.verb} ${v}${g.minimum.toString()} ${D.unit}`:`Занадто мале: очікується, що ${g.origin} буде ${v}${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`Неправильний рядок: повинен починатися з "${D.prefix}"`:"ends_with"===D.format?`Неправильний рядок: повинен закінчуватися на "${D.suffix}"`:"includes"===D.format?`Неправильний рядок: повинен містити "${D.includes}"`:"regex"===D.format?`Неправильний рядок: повинен відповідати шаблону ${D.pattern}`:`Неправильний ${v[D.format]??g.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${g.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${g.keys.length>1?"і":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${g.origin}`;case"invalid_union":default:return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${g.origin}`}}};function uk(){return{localeError:error$6()}}function ua(){return uk()}const error$5=()=>{const g={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"},map:{unit:"آئٹمز",verb:"ہونا"}};function getSizing(v){return g[v]??null}const v={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",mac:"ایم اے سی ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",credit_card:"کریڈٹ کارڈ نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"},D={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`غلط ان پٹ: instanceof ${g.expected} متوقع تھا، ${q} موصول ہوا`:`غلط ان پٹ: ${v} متوقع تھا، ${q} موصول ہوا`}case"invalid_value":return 1===g.values.length?`غلط ان پٹ: ${stringifyPrimitive(g.values[0])} متوقع تھا`:`غلط آپشن: ${joinValues(g.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`بہت بڑا: ${g.origin??"ویلیو"} کے ${v}${g.maximum.toString()} ${D.unit??"عناصر"} ہونے متوقع تھے`:`بہت بڑا: ${g.origin??"ویلیو"} کا ${v}${g.maximum.toString()} ہونا متوقع تھا`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`بہت چھوٹا: ${g.origin} کے ${v}${g.minimum.toString()} ${D.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${g.origin} کا ${v}${g.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{const D=g;return"starts_with"===D.format?`غلط سٹرنگ: "${D.prefix}" سے شروع ہونا چاہیے`:"ends_with"===D.format?`غلط سٹرنگ: "${D.suffix}" پر ختم ہونا چاہیے`:"includes"===D.format?`غلط سٹرنگ: "${D.includes}" شامل ہونا چاہیے`:"regex"===D.format?`غلط سٹرنگ: پیٹرن ${D.pattern} سے میچ ہونا چاہیے`:`غلط ${v[D.format]??g.format}`}case"not_multiple_of":return`غلط نمبر: ${g.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${g.keys.length>1?"ز":""}: ${joinValues(g.keys,"، ")}`;case"invalid_key":return`${g.origin} میں غلط کی`;case"invalid_union":default:return"غلط ان پٹ";case"invalid_element":return`${g.origin} میں غلط ویلیو`}}};function ur(){return{localeError:error$5()}}const error$4=()=>{const g={string:{unit:"belgi",verb:"bo‘lishi kerak"},file:{unit:"bayt",verb:"bo‘lishi kerak"},array:{unit:"element",verb:"bo‘lishi kerak"},set:{unit:"element",verb:"bo‘lishi kerak"},map:{unit:"yozuv",verb:"bo‘lishi kerak"}};function getSizing(v){return g[v]??null}const v={regex:"kirish",email:"elektron pochta manzili",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 sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",credit_card:"kredit karta raqami",jwt:"JWT",template_literal:"kirish"},D={nan:"NaN",number:"raqam",array:"massiv"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`Noto‘g‘ri kirish: kutilgan instanceof ${g.expected}, qabul qilingan ${q}`:`Noto‘g‘ri kirish: kutilgan ${v}, qabul qilingan ${q}`}case"invalid_value":return 1===g.values.length?`Noto‘g‘ri kirish: kutilgan ${stringifyPrimitive(g.values[0])}`:`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`Juda katta: kutilgan ${g.origin??"qiymat"} ${v}${g.maximum.toString()} ${D.unit} ${D.verb}`:`Juda katta: kutilgan ${g.origin??"qiymat"} ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`Juda kichik: kutilgan ${g.origin} ${v}${g.minimum.toString()} ${D.unit} ${D.verb}`:`Juda kichik: kutilgan ${g.origin} ${v}${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`Noto‘g‘ri satr: "${D.prefix}" bilan boshlanishi kerak`:"ends_with"===D.format?`Noto‘g‘ri satr: "${D.suffix}" bilan tugashi kerak`:"includes"===D.format?`Noto‘g‘ri satr: "${D.includes}" ni o‘z ichiga olishi kerak`:"regex"===D.format?`Noto‘g‘ri satr: ${D.pattern} shabloniga mos kelishi kerak`:`Noto‘g‘ri ${v[D.format]??g.format}`}case"not_multiple_of":return`Noto‘g‘ri raqam: ${g.divisor} ning karralisi bo‘lishi kerak`;case"unrecognized_keys":return`Noma’lum kalit${g.keys.length>1?"lar":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`${g.origin} dagi kalit noto‘g‘ri`;case"invalid_union":default:return"Noto‘g‘ri kirish";case"invalid_element":return`${g.origin} da noto‘g‘ri qiymat`}}};function uz(){return{localeError:error$4()}}const error$3=()=>{const g={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"},map:{unit:"phần tử",verb:"có"}};function getSizing(v){return g[v]??null}const v={regex:"đầu vào",email:"địa chỉ email",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:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",mac:"địa chỉ MAC",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",credit_card:"số thẻ tín dụng",jwt:"JWT",template_literal:"đầu vào"},D={nan:"NaN",number:"số",array:"mảng"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`Đầu vào không hợp lệ: mong đợi instanceof ${g.expected}, nhận được ${q}`:`Đầu vào không hợp lệ: mong đợi ${v}, nhận được ${q}`}case"invalid_value":return 1===g.values.length?`Đầu vào không hợp lệ: mong đợi ${stringifyPrimitive(g.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`Quá lớn: mong đợi ${g.origin??"giá trị"} ${D.verb} ${v}${g.maximum.toString()} ${D.unit??"phần tử"}`:`Quá lớn: mong đợi ${g.origin??"giá trị"} ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`Quá nhỏ: mong đợi ${g.origin} ${D.verb} ${v}${g.minimum.toString()} ${D.unit}`:`Quá nhỏ: mong đợi ${g.origin} ${v}${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`Chuỗi không hợp lệ: phải bắt đầu bằng "${D.prefix}"`:"ends_with"===D.format?`Chuỗi không hợp lệ: phải kết thúc bằng "${D.suffix}"`:"includes"===D.format?`Chuỗi không hợp lệ: phải bao gồm "${D.includes}"`:"regex"===D.format?`Chuỗi không hợp lệ: phải khớp với mẫu ${D.pattern}`:`${v[D.format]??g.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${g.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${g.origin}`;case"invalid_union":default:return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${g.origin}`}}};function vi(){return{localeError:error$3()}}const error$2=()=>{const g={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"},map:{unit:"项",verb:"包含"}};function getSizing(v){return g[v]??null}const v={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",mac:"MAC地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",credit_card:"信用卡号",jwt:"JWT",template_literal:"输入"},D={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`无效输入:期望 instanceof ${g.expected},实际接收 ${q}`:`无效输入:期望 ${v},实际接收 ${q}`}case"invalid_value":return 1===g.values.length?`无效输入:期望 ${stringifyPrimitive(g.values[0])}`:`无效选项:期望以下之一 ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`数值过大:期望 ${g.origin??"值"} ${v}${g.maximum.toString()} ${D.unit??"个元素"}`:`数值过大:期望 ${g.origin??"值"} ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`数值过小:期望 ${g.origin} ${v}${g.minimum.toString()} ${D.unit}`:`数值过小:期望 ${g.origin} ${v}${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`无效字符串:必须以 "${D.prefix}" 开头`:"ends_with"===D.format?`无效字符串:必须以 "${D.suffix}" 结尾`:"includes"===D.format?`无效字符串:必须包含 "${D.includes}"`:"regex"===D.format?`无效字符串:必须满足正则表达式 ${D.pattern}`:`无效${v[D.format]??g.format}`}case"not_multiple_of":return`无效数字:必须是 ${g.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${joinValues(g.keys,", ")}`;case"invalid_key":return`${g.origin} 中的键(key)无效`;case"invalid_union":default:return"无效输入";case"invalid_element":return`${g.origin} 中包含无效值(value)`}}};function zhCN(){return{localeError:error$2()}}const error$1=()=>{const g={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"},map:{unit:"項目",verb:"擁有"}};function getSizing(v){return g[v]??null}const v={regex:"輸入",email:"郵件地址",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 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",mac:"MAC 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",credit_card:"信用卡號",jwt:"JWT",template_literal:"輸入"},D={nan:"NaN"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`無效的輸入值:預期為 instanceof ${g.expected},但收到 ${q}`:`無效的輸入值:預期為 ${v},但收到 ${q}`}case"invalid_value":return 1===g.values.length?`無效的輸入值:預期為 ${stringifyPrimitive(g.values[0])}`:`無效的選項:預期為以下其中之一 ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`數值過大:預期 ${g.origin??"值"} 應為 ${v}${g.maximum.toString()} ${D.unit??"個元素"}`:`數值過大:預期 ${g.origin??"值"} 應為 ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`數值過小:預期 ${g.origin} 應為 ${v}${g.minimum.toString()} ${D.unit}`:`數值過小:預期 ${g.origin} 應為 ${v}${g.minimum.toString()}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`無效的字串:必須以 "${D.prefix}" 開頭`:"ends_with"===D.format?`無效的字串:必須以 "${D.suffix}" 結尾`:"includes"===D.format?`無效的字串:必須包含 "${D.includes}"`:"regex"===D.format?`無效的字串:必須符合格式 ${D.pattern}`:`無效的 ${v[D.format]??g.format}`}case"not_multiple_of":return`無效的數字:必須為 ${g.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${g.keys.length>1?"們":""}:${joinValues(g.keys,"、")}`;case"invalid_key":return`${g.origin} 中有無效的鍵值`;case"invalid_union":default:return"無效的輸入值";case"invalid_element":return`${g.origin} 中有無效的值`}}};function zhTW(){return{localeError:error$1()}}const error=()=>{const g={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"},map:{unit:"nkan",verb:"ní"}};function getSizing(v){return g[v]??null}const v={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",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:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",mac:"àdírẹ́sì MAC",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",credit_card:"nọmba kaadi gbese",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"},D={nan:"NaN",number:"nọ́mbà",array:"akopọ"};return g=>{switch(g.code){case"invalid_type":{const v=D[g.expected]??g.expected,R=parsedType(g.input),q=D[R]??R;return/^[A-Z]/.test(g.expected)?`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${g.expected}, àmọ̀ a rí ${q}`:`Ìbáwọlé aṣìṣe: a ní láti fi ${v}, àmọ̀ a rí ${q}`}case"invalid_value":return 1===g.values.length?`Ìbáwọlé aṣìṣe: a ní láti fi ${stringifyPrimitive(g.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",D=getSizing(g.origin);return D?`Tó pọ̀ jù: a ní láti jẹ́ pé ${g.origin??"iye"} ${D.verb} ${v}${g.maximum} ${D.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${v}${g.maximum}`}case"too_small":{const v=g.inclusive?">=":">",D=getSizing(g.origin);return D?`Kéré ju: a ní láti jẹ́ pé ${g.origin} ${D.verb} ${v}${g.minimum} ${D.unit}`:`Kéré ju: a ní láti jẹ́ ${v}${g.minimum}`}case"invalid_format":{const D=g;return"starts_with"===D.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${D.prefix}"`:"ends_with"===D.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${D.suffix}"`:"includes"===D.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${D.includes}"`:"regex"===D.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${D.pattern}`:`Aṣìṣe: ${v[D.format]??g.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${g.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${g.origin}`;case"invalid_union":default:return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${g.origin}`}}};function yo(){return{localeError:error()}}var index$1=Object.freeze({__proto__:null,ar:ar,az:az,be:be,bg:bg,bn:bn,ca:ca,ckb:ckb,cs:cs,da:da,de:de,el:el,en:en,eo:eo,es:es,fa:fa,fi:fi,fr:fr,frCA:frCA,gu:gu,he:he,hi:hi,hr:hr,hu:hu,hy:hy,id:id,is:is,it:it,ja:ja,ka:ka,kh:kh,km:km,kn:kn,ko:ko,lt:lt,mk:mk,ms:ms,ne:ne,nl:nl,nn:nn,no:no,ota:ota,pl:pl,ps:ps,pt:pt,ptBR:ptBR,ro:ro,ru:ru,sk:sk,sl:sl,sv:sv,ta:ta,th:th,tk:tk,tr:tr,ua:ua,uk:uk,ur:ur,uz:uz,vi:vi,yo:yo,zhCN:zhCN,zhTW:zhTW}),_a;const $output=Symbol("ZodOutput"),$input=Symbol("ZodInput");class $ZodRegistry{constructor(){this._map=new WeakMap,this._idmap=new Map}add(g,...v){const D=v[0];return this._map.set(g,D),D&&"object"==typeof D&&"id"in D&&this._idmap.set(D.id,g),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(g){const v=this._map.get(g);return v&&"object"==typeof v&&"id"in v&&this._idmap.delete(v.id),this._map.delete(g),this}get(g){const v=g._zod.parent;if(v){const D={...this.get(v)??{}};delete D.id;const R={...D,...this._map.get(g)};return Object.keys(R).length?R:void 0}return this._map.get(g)}has(g){return this._map.has(g)}}function registry(){return new $ZodRegistry}(_a=globalThis).__zod_globalRegistry??(_a.__zod_globalRegistry=registry());const globalRegistry=globalThis.__zod_globalRegistry,INVALID=Symbol.for("zod.compile.invalid"),FALLBACK_FLAG=Symbol.for("zod.compile.fallback");class ZodCompileAsyncError extends Error{constructor(g="z.compile does not support async refinements, transforms, or checks"){super(g),this.name="ZodCompileAsyncError"}}class ZodCompileUnsupportedError extends Error{constructor(g,v=!0){super(`z.compile does not support ${g}; this schema must use the runtime parser`),this.name="ZodCompileUnsupportedError",this.islandable=v}}function compileValidator(g,v){try{return compileFn(g,{assertOnly:!0})}catch{return v}}function compile(g,v){try{const v=compileFn(g),D=clone(g),R=g._zod.run,q=R.__originalRun??R,wrapped=(g,D)=>{if(D?.async||"backward"===D?.direction||D?.skipChecks||D?.[FALLBACK_FLAG])return q(g,D);if(D&&isBackEdge(D,g.value))return q(g,D);const R=v(g.value);return R!==INVALID?(g.value=R,g):(D&&(D[FALLBACK_FLAG]=!0),q(g,D))};return wrapped.__originalRun=q,D._zod.bag.fallbackRun=q,D._zod.bag.validator=compileValidator(g,v),D._zod.run=wrapped,R.__originalRun||installCompiledUserMethods(D,g,v),D}catch(D){if(v?.strict)throw D;return g}}function installCompiledUserMethods(g,v,D){const R=g,q=v;if("function"==typeof q.safeParse){const g=q.safeParse;R.safeParse=(v,R)=>{const q=D(v);return q!==INVALID?{success:!0,data:q}:g(v,R)}}if("function"==typeof q.parse){const g=q.parse;R.parse=(v,R)=>{const q=D(v);return q!==INVALID?q:g(v,R)}}}function compileFn(g,v){let D=!0;try{D=isRecursiveSchema(g)}catch{}if(D)throw new ZodCompileUnsupportedError("a schema whose subtree contains a reference cycle");const R={constants:new Map,constantCounter:0,varCounter:0},q=new Doc(["input"]),ie=generateCheck(q,R,g,"input",!v?.assertOnly);q.write(null===ie?"return true;":`return ${ie};`);const se=["INVALID",...R.constants.keys()],ce=[INVALID,...R.constants.values()],le=q.content.join("\n"),me=v?.debug?se.length>0?`// Constants: ${se.join(", ")}\n${le}`:le:"",fe=Function,ge=`return (input) => {\n${le}\n}`;let ve;try{ve=new fe(...se,ge)(...ce)}catch(g){throw new ZodCompileUnsupportedError(`this schema (generated code failed to evaluate: ${g.message})`)}return v?.debug&&(ve.code=me),ve}function addConstant(g,v){for(const[D,R]of g.constants)if(R===v)return D;const D="c"+g.constantCounter++;return g.constants.set(D,v),D}function newVar(g){return"v"+g.varCounter++}function runtimeRun(g,v){const D=g._zod.run({value:v,issues:[]},{});if(D&&"function"==typeof D.then)return INVALID;const R=D;return 0===R.issues.length?R.value:INVALID}function compileChild(g,v,D,R,q=!0){const ie=g.content.length,se=v.constants.size,ce=v.constantCounter,le=v.varCounter;try{return generateCheck(g,v,D,R,q)}catch(q){if(!(q instanceof ZodCompileUnsupportedError&&q.islandable))throw q;if(g.content.length=ie,v.constants.size>se){const g=Array.from(v.constants.keys()).slice(se);for(const D of g)v.constants.delete(D)}return v.constantCounter=ce,v.varCounter=le,emitRuntimeIsland(g,v,D,R)}}function emitRuntimeIsland(g,v,D,R){const q=addConstant(v,D),ie=addConstant(v,runtimeRun),se=newVar(v);return g.write(`const ${se} = ${ie}(${q}, ${R});`),g.write(`if (${se} === INVALID) return INVALID;`),se}const WHEN_DEFAULTED_CHECKS=new Set(["max_size","min_size","size_equals","max_length","min_length","length_equals"]);function generateChecks(g,v,D,R){const q=D._zod.def.checks;if(!q||0===q.length)return R;let ie=R;for(const D of q){const R=D._zod.def;if(R.when&&!WHEN_DEFAULTED_CHECKS.has(R.check))throw new ZodCompileUnsupportedError('check with a custom "when" condition');switch(R.check){case"greater_than":generateGreaterThanCheck(g,v,R,ie);break;case"less_than":generateLessThanCheck(g,v,R,ie);break;case"multiple_of":generateMultipleOfCheck(g,v,R,ie);break;case"number_format":generateNumberFormatCheck(g,R,ie);break;case"min_length":{const D=numericOperand(R.minimum,"min_length"),q=codePointLengthVar(g,v,ie,`${ie}.length >= ${D} && ${ie}.length < ${2*R.minimum}`);g.write(`if (${q} < ${D}) return INVALID;`);break}case"max_length":{const D=numericOperand(R.maximum,"max_length"),q=codePointLengthVar(g,v,ie,`${ie}.length > ${D}`);g.write(`if (${q} > ${D}) return INVALID;`);break}case"length_equals":{const D=numericOperand(R.length,"length_equals"),q=codePointLengthVar(g,v,ie,`${ie}.length >= ${D} && ${ie}.length <= ${2*R.length}`);g.write(`if (${q} !== ${D}) return INVALID;`);break}case"min_size":g.write(`if (${ie}.size < ${numericOperand(R.minimum,"min_size")}) return INVALID;`);break;case"max_size":g.write(`if (${ie}.size > ${numericOperand(R.maximum,"max_size")}) return INVALID;`);break;case"size_equals":g.write(`if (${ie}.size !== ${numericOperand(R.size,"size_equals")}) return INVALID;`);break;case"string_format":ie=generateStringFormatCheck(g,v,R,ie);break;case"custom":ie=generateCustomRefineCheck(g,v,D,ie);break;case"bigint_format":generateBigIntFormatCheck(g,R,ie);break;case"mime_type":generateMimeTypeCheck(g,v,R,ie);break;case"property":generatePropertyCheck(g,v,R,ie);break;case"overwrite":{const R=newVar(v);generateOverwriteCheck(g,v,D,ie,R),ie=R;break}default:throw new ZodCompileUnsupportedError(`check type ${R.check}`)}}return ie}function codePointLengthVar(g,v,D,R){const q=addConstant(v,codePointLength),ie=newVar(v);return g.write(`const ${ie} = typeof ${D} === "string" && ${R} ? ${q}(${D}) : ${D}.length;`),ie}function numericOperand(g,v){if("number"!=typeof g||!Number.isFinite(g))throw new ZodCompileUnsupportedError(`${v} bound of type ${typeof g}`);return`${g}`}function comparisonOperand(g,v){if("bigint"==typeof v)return`${v}n`;if("number"==typeof v){if(Number.isNaN(v))throw new ZodCompileUnsupportedError("comparison check with NaN bound");return`${v}`}if(v instanceof Date){if(Number.isNaN(v.getTime()))throw new ZodCompileUnsupportedError("comparison check with Invalid Date bound");return addConstant(g,v)}throw new ZodCompileUnsupportedError("comparison check bound of type "+typeof v)}function generateGreaterThanCheck(g,v,D,R){const q=D.inclusive?"<":"<=";g.write(`if (${R} ${q} ${comparisonOperand(v,D.value)}) return INVALID;`)}function generateLessThanCheck(g,v,D,R){const q=D.inclusive?">":">=";g.write(`if (${R} ${q} ${comparisonOperand(v,D.value)}) return INVALID;`)}function generateMultipleOfCheck(g,v,D,R){if("bigint"==typeof D.value){if(D.value===BigInt(0))throw new ZodCompileUnsupportedError("multiple_of check with a zero divisor");g.write(`if (${R} % ${D.value}n !== 0n) return INVALID;`)}else{const q=addConstant(v,floatSafeRemainder);g.write(`if (${q}(${R}, ${numericOperand(D.value,"multiple_of")}) !== 0) return INVALID;`)}}function generateNumberFormatCheck(g,v,D){const R=v.format;switch(R){case"safeint":g.write(`if (!Number.isSafeInteger(${D})) return INVALID;`);break;case"int32":g.write(`if (!Number.isInteger(${D}) || ${D} < -2147483648 || ${D} > 2147483647) return INVALID;`);break;case"uint32":g.write(`if (!Number.isInteger(${D}) || ${D} < 0 || ${D} > 4294967295) return INVALID;`);break;case"float32":g.write(`if (!Number.isFinite(${D}) || ${D} < -3.4028234663852886e38 || ${D} > 3.4028234663852886e38) return INVALID;`);break;case"float64":g.write(`if (!Number.isFinite(${D})) return INVALID;`);break;default:throw new ZodCompileUnsupportedError(`number format ${R}`)}}function generateBigIntFormatCheck(g,v,D){const R=v.format;if(R)switch(R){case"int64":g.write(`if (${D} < -9223372036854775808n || ${D} > 9223372036854775807n) return INVALID;`);break;case"uint64":g.write(`if (${D} < 0n || ${D} > 18446744073709551615n) return INVALID;`);break;default:throw new ZodCompileUnsupportedError(`bigint format ${R}`)}}function generateMimeTypeCheck(g,v,D,R){const q=D.mime;if(q&&q.length>0){const D=addConstant(v,new Set(q));g.write(`if (!${D}.has(${R}.type)) return INVALID;`)}}function generatePropertyCheck(g,v,D,R){const q=`${R}[${JSON.stringify(D.property)}]`;generateCheck(g,v,D.schema,q)}function generateOverwriteCheck(g,v,D,R,q){const ie=D._zod.def.tx;if(!ie)throw new ZodCompileUnsupportedError("overwrite check without a transform function");if(isAsyncFunction(ie))throw new ZodCompileAsyncError("z.compile: async overwrite transforms are not supported");const se=addConstant(v,ie);g.write(`const ${q} = ${se}(${R});`)}function throwAsync(){throw new $ZodAsyncError}function pushIssue(g){this.issues.push(g)}function generateCustomRefineCheck(g,v,D,R){const q=D._zod.def;if(q.fn){if(isAsyncFunction(q.fn))throw new ZodCompileAsyncError("z.compile: async .refine() predicates are not supported");const D=addConstant(v,q.fn),ie=addConstant(v,throwAsync),se=newVar(v);return g.write(`const ${se} = ${D}(${R});`),g.write(`if (${se} instanceof Promise) ${ie}();`),g.write(`if (!${se}) return INVALID;`),R}if(D._zod.check){if(isAsyncFunction(D._zod.check))throw new ZodCompileAsyncError("z.compile: async .superRefine() / check functions are not supported");const q=D._zod.check,ie=addConstant(v,g=>{const v={value:g,issues:[],addIssue:pushIssue};return q(v)instanceof Promise&&throwAsync(),0===v.issues.length?v.value:INVALID}),se=newVar(v);return g.write(`const ${se} = ${ie}(${R});`),g.write(`if (${se} === INVALID) return INVALID;`),se}throw new ZodCompileUnsupportedError("custom check without a predicate or check function")}const PATTERN_IS_COMPLETE=new Set(["cidrv4","cuid","cuid2","date","datetime","duration","e164","email","emoji","ends_with","guid","includes","ipv4","ksuid","lowercase","mac","nanoid","regex","starts_with","time","ulid","uppercase","uuid","xid"]);function generateStringFormatCheck(g,v,D,R){const q=D.format;if("base64"===q){const D=addConstant(v,isValidBase64);return g.write(`if (!${D}(${R})) return INVALID;`),R}if("base64url"===q){const D=addConstant(v,isValidBase64URL);return g.write(`if (!${D}(${R})) return INVALID;`),R}if("jwt"===q){const q=addConstant(v,isValidJWT),ie=addConstant(v,D.alg??null);return g.write(`if (!${q}(${R}, ${ie})) return INVALID;`),R}if("ipv6"===q){const D=addConstant(v,isValidIPv6);return g.write(`if (!${D}(${R})) return INVALID;`),R}if("cidrv6"===q){const D=addConstant(v,isValidCIDRv6);return g.write(`if (!${D}(${R})) return INVALID;`),R}if("credit_card"===q){const D=addConstant(v,isValidCreditCard);return g.write(`if (!${D}(${R})) return INVALID;`),R}const ie=D;if("url"===q||"httpurl"===q||ie.normalize||void 0!==ie.hostname||void 0!==ie.protocol){const q=addConstant(v,parseURLObject),se=addConstant(v,D),ce=newVar(v),le=newVar(v);if(g.write(`const ${ce} = ${R}.trim();`),g.write(`const ${le} = ${q}(${ce}, ${se});`),g.write(`if (typeof ${le} === "number") return INVALID;`),void 0!==ie.hostname){const D=addConstant(v,urlHostnameOk);g.write(`if (!${D}(${le}, ${se}.hostname)) return INVALID;`)}if(void 0!==ie.protocol){const D=addConstant(v,urlProtocolOk);g.write(`if (!${D}(${le}, ${se}.protocol)) return INVALID;`)}const me=newVar(v),fe=ie.normalize?`${le}.href`:`${addConstant(v,stripTabAndNewline)}(${ce})`;return g.write(`const ${me} = ${fe};`),me}const se=D.fn;if(se){if(isAsyncFunction(se))throw new ZodCompileUnsupportedError(`async string format ${q}`);const D=addConstant(v,se);return g.write(`if (!${D}(${R})) return INVALID;`),R}if(PATTERN_IS_COMPLETE.has(q)&&D.pattern){const q=addConstant(v,D.pattern);return g.write(`${q}.lastIndex = 0;`),g.write(`if (!${q}.test(${R})) return INVALID;`),R}const ce=D.format;switch(ce){case"regex":throw new ZodCompileUnsupportedError("regex format without a pattern");case"lowercase":g.write(`if (${R} !== ${R}.toLowerCase()) return INVALID;`);break;case"uppercase":g.write(`if (${R} !== ${R}.toUpperCase()) return INVALID;`);break;case"includes":g.write(`if (!${R}.includes(${esc(D.includes)})) return INVALID;`);break;case"starts_with":{const v=D.prefix;g.write(`if (${R}.slice(0, ${v.length}) !== ${esc(v)}) return INVALID;`);break}case"ends_with":{const v=D.suffix;g.write(`if (${R}.slice(-${v.length}) !== ${esc(v)}) return INVALID;`);break}default:throw new ZodCompileUnsupportedError(`string format ${ce}`)}return R}function generateCheck(g,v,D,R,q=!0){const ie=D._zod.def,se=ie.type;if(ie.coerce)throw new ZodCompileUnsupportedError(`coercion (z.coerce.${se}())`);const ce=q||!!ie.checks?.length;let le;switch(se){case"string":le=generateStringCheck(g,v,D,R);break;case"number":le=generateNumberCheck(g,D,R);break;case"boolean":le=generateBooleanCheck(g,R);break;case"bigint":le=generateBigIntCheck(g,D,R);break;case"symbol":le=generateSymbolCheck(g,R);break;case"undefined":le=generateUndefinedCheck(g,R);break;case"null":le=generateNullCheck(g,R);break;case"any":case"unknown":le=R;break;case"never":g.write("return INVALID;"),le=R;break;case"void":le=generateVoidCheck(g,R);break;case"nan":le=generateNaNCheck(g,R);break;case"date":le=generateDateCheck(g,R);break;case"object":le=generateObjectCheck(g,v,D,R,ce);break;case"optional":le=generateOptionalCheck(g,v,D,R,ce);break;case"nullable":le=generateNullableCheck(g,v,D,R,ce);break;case"array":le=generateArrayCheck(g,v,D,R,ce);break;case"literal":le=generateLiteralCheck(g,v,D,R);break;case"enum":le=generateEnumCheck(g,v,D,R);break;case"readonly":{const q=generateWrapperCheck(g,v,D,R),ie=newVar(v);g.write(`const ${ie} = Object.freeze(${q});`),le=ie;break}case"success":generateWrapperCheck(g,v,D,R),le="true";break;case"default":case"prefault":le=generateDefaultCheck(g,v,D,R);break;case"nonoptional":le=generateNonOptionalCheck(g,v,D,R);break;case"tuple":le=generateTupleCheck(g,v,D,R);break;case"union":le=generateUnionCheck(g,v,D,R);break;case"intersection":le=generateIntersectionCheck(g,v,D,R);break;case"record":le=generateRecordCheck(g,v,D,R);break;case"map":le=generateMapCheck(g,v,D,R);break;case"set":le=generateSetCheck(g,v,D,R);break;case"file":le=generateFileCheck(g,R);break;case"template_literal":le=generateTemplateLiteralCheck(g,v,D,R);break;case"lazy":le=generateLazyCheck(g,v,D,R);break;case"pipe":le=generatePipeCheck(g,v,D,R);break;case"custom":le=generateCustomCheck(g,v,D,R);break;case"transform":le=generateTransformCheck(g,v,D,R);break;case"catch":le=generateCatchCheck(g,v,D,R);break;default:throw new ZodCompileUnsupportedError(`schema type ${se}`)}return null===le?null:generateChecks(g,v,D,le)}function generateStringCheck(g,v,D,R){g.write(`if (typeof ${R} !== "string") return INVALID;`);const q=D._zod.def;return void 0===q.format?R:generateStringFormatCheck(g,v,q,R)}function generateNumberCheck(g,v,D){g.write(`if (typeof ${D} !== "number" || !Number.isFinite(${D})) return INVALID;`);const R=v._zod.def;return"number_format"===R.check&&R.format&&generateNumberFormatCheck(g,{format:R.format},D),D}function generateBooleanCheck(g,v){return g.write(`if (typeof ${v} !== "boolean") return INVALID;`),v}function generateBigIntCheck(g,v,D){g.write(`if (typeof ${D} !== "bigint") return INVALID;`);const R=v._zod.def;if(R.format)switch(R.format){case"int64":g.write(`if (${D} < -9223372036854775808n || ${D} > 9223372036854775807n) return INVALID;`);break;case"uint64":g.write(`if (${D} < 0n || ${D} > 18446744073709551615n) return INVALID;`)}return D}function generateSymbolCheck(g,v){return g.write(`if (typeof ${v} !== "symbol") return INVALID;`),v}function generateUndefinedCheck(g,v){return g.write(`if (${v} !== undefined) return INVALID;`),v}function generateNullCheck(g,v){return g.write(`if (${v} !== null) return INVALID;`),v}function generateVoidCheck(g,v){return g.write(`if (${v} !== undefined) return INVALID;`),v}function generateNaNCheck(g,v){return g.write(`if (typeof ${v} !== "number" || !Number.isNaN(${v})) return INVALID;`),v}function generateDateCheck(g,v){return g.write(`if (!(${v} instanceof Date) || Number.isNaN(${v}.getTime())) return INVALID;`),v}function generateObjectCheck(g,v,D,R,q=!0){const ie=D._zod.def;g.write(`if (typeof ${R} !== "object" || ${R} === null || Array.isArray(${R})) return INVALID;`);const se=ie.shape,ce=Object.keys(se),le=Object.getOwnPropertySymbols(se),me=le.length?[...ce,...le]:ce,keyExpr=g=>"symbol"==typeof g?addConstant(v,g):esc(g),fe=se;if(ce.includes("__proto__"))throw new ZodCompileUnsupportedError('object shape key "__proto__"');const ge=new Map;for(const D of me){const ie=fe[D],se=keyExpr(D),ce=newVar(v);if(g.write(`const ${ce} = ${R}[${se}];`),void 0!==ie._zod.optin){const q=newVar(v);g.write(`let ${q} = (() => {`),g.indented(g=>{const D=compileChild(g,v,ie,ce);g.write(`return ${D};`)}),g.write("})();"),"optional"===ie._zod.optout?(g.write(`if (${q} === INVALID) {`),g.indented(g=>{g.write(`if (${se} in ${R}) return INVALID;`),g.write(`${q} = undefined;`)}),g.write("}")):g.write(`if (${q} === INVALID) return INVALID;`),ge.set(D,q)}else{requiresPresenceCheck(ie)&&g.write(`if (!(${se} in ${R})) return INVALID;`);const le=compileChild(g,v,ie,ce,q);null!==le&&ge.set(D,le)}}const ve=ie.catchall;let xe="none";if(ve){const v=ve._zod.def.type;if("never"===v){const v=ce.map(g=>`k !== ${esc(g)}`).join(" && ")||"true";g.write(`for (const k in ${R}) {`),g.indented(g=>{g.write(`if (${v}) return INVALID;`)}),g.write("}")}else xe="unknown"!==v&&"any"!==v||ve._zod.def.checks?.length?"schema":"passthrough"}const _e=newVar(v),ke=me.some(g=>mayOutputUndefined(fe[g])||dropsWhenAbsent(fe[g]));if(!q){if("schema"===xe){const D=ce.length>0?addConstant(v,new Set(ce)):null;g.write(`for (const k in ${R}) {`),g.indented(g=>{g.write('if (k === "__proto__") continue;'),D&&g.write(`if (${D}.has(k)) continue;`);const q=newVar(v);g.write(`const ${q} = ${R}[k];`),compileChild(g,v,ve,q,!1)}),g.write("}")}return null}if(ke){g.write(`const ${_e} = {};`);for(const v of me){const D=keyExpr(v),q=ge.get(v);dropsWhenAbsent(fe[v])?g.write(`if (${D} in ${R}) ${_e}[${D}] = ${q};`):mayOutputUndefined(fe[v])?g.write(`if (${q} !== undefined || ${D} in ${R}) ${_e}[${D}] = ${q};`):g.write(`${_e}[${D}] = ${q};`)}}else{const v=me.map(g=>`${(g=>"symbol"==typeof g?`[${keyExpr(g)}]`:esc(g))(g)}: ${ge.get(g)}`).join(", ");g.write(`const ${_e} = { ${v} };`)}if("none"!==xe){const D=ce.length>0?addConstant(v,new Set(ce)):null;g.write(`for (const k in ${R}) {`),g.indented(g=>{if(g.write('if (k === "__proto__") continue;'),D&&g.write(`if (${D}.has(k)) continue;`),"passthrough"===xe)g.write(`${_e}[k] = ${R}[k];`);else{const D=newVar(v);g.write(`const ${D} = ${R}[k];`);const q=compileChild(g,v,ve,D);g.write(`${_e}[k] = ${q};`)}}),g.write("}")}return _e}function generateOptionalCheck(g,v,D,R,q=!0){const ie=D._zod.def;if(isExactOptional(D))return generateCheck(g,v,ie.innerType,R,q);if("defaulted"===ie.innerType._zod.optin){const D=newVar(v),q=newVar(v);return g.write(`let ${D};`),g.write(`if (${R} === undefined) {`),g.indented(g=>{g.write(`const ${q} = (() => {`),g.indented(g=>{const D=generateCheck(g,v,ie.innerType,R);g.write(`return ${D};`)}),g.write("})();"),g.write(`if (${q} !== INVALID) ${D} = ${q};`)}),g.write("} else {"),g.indented(g=>{const q=generateCheck(g,v,ie.innerType,R);g.write(`${D} = ${q};`)}),g.write("}"),D}const se=q?newVar(v):null;return se&&g.write(`let ${se};`),g.write(`if (${R} !== undefined) {`),g.indented(g=>{const D=generateCheck(g,v,ie.innerType,R,q);se&&null!==D&&g.write(`${se} = ${D};`)}),g.write("}"),se}function isExactOptional(g){return!0===g._zod.traits?.has("$ZodExactOptional")}function requiresPresenceCheck(g){return void 0===g._zod.optin&&fastPathAcceptsAbsence(g)}function fastPathAcceptsAbsence(g){if(g._zod.def.coerce)return!0;const v=g._zod.def;switch(v.type){case"any":case"unknown":case"undefined":case"void":case"default":case"prefault":case"transform":case"custom":case"lazy":case"catch":default:return!0;case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"never":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":return!1;case"nonoptional":return!!v.innerType&&fastPathAcceptsAbsence(v.innerType);case"literal":return!!v.values?.includes(void 0);case"enum":return!!g._zod.values?.has(void 0);case"optional":case"nullable":case"readonly":case"success":return!v.innerType||fastPathAcceptsAbsence(v.innerType);case"union":return!v.options||v.options.some(fastPathAcceptsAbsence);case"intersection":return!v.left||!v.right||fastPathAcceptsAbsence(v.left)&&fastPathAcceptsAbsence(v.right);case"pipe":return!v.in||fastPathAcceptsAbsence(v.in)}}function dropsWhenAbsent(g){return"optional"===g._zod.optin&&"optional"===g._zod.optout}function mayOutputUndefined(g){const v=g._zod.def;switch(v.type){case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":case"never":case"success":return!1;case"literal":return!!v.values?.includes(void 0);case"enum":return!!g._zod.values?.has(void 0);case"optional":default:return!0;case"nullable":case"readonly":case"nonoptional":return!v.innerType||mayOutputUndefined(v.innerType);case"union":return!v.options||v.options.some(mayOutputUndefined);case"intersection":return!v.left||!v.right||mayOutputUndefined(v.left)||mayOutputUndefined(v.right);case"pipe":return!v.out||mayOutputUndefined(v.out)}}function generateNullableCheck(g,v,D,R,q=!0){const ie=D._zod.def,se=q?newVar(v):null;return se&&g.write(`let ${se} = null;`),g.write(`if (${R} !== null) {`),g.indented(g=>{const D=generateCheck(g,v,ie.innerType,R,q);se&&null!==D&&g.write(`${se} = ${D};`)}),g.write("}"),se}function generateArrayCheck(g,v,D,R,q=!0){const ie=D._zod.def;g.write(`if (!Array.isArray(${R})) return INVALID;`);const se=q?newVar(v):null,ce=newVar(v),le=newVar(v);return se&&g.write(`const ${se} = new Array(${R}.length);`),g.write(`for (let ${ce} = 0; ${ce} < ${R}.length; ${ce}++) {`),g.indented(g=>{g.write(`const ${le} = ${R}[${ce}];`);const D=compileChild(g,v,ie.element,le,q);se&&null!==D&&g.write(`${se}[${ce}] = ${D};`)}),g.write("}"),se}function generateLiteralCheck(g,v,D,R){const q=D._zod.def.values;if(1!==q.length){const D=addConstant(v,new Set(q));return g.write(`if (!${D}.has(${R})) return INVALID;`),R}const ie=q[0];if("number"==typeof ie&&Number.isNaN(ie)){const D=addConstant(v,new Set(q));return g.write(`if (!${D}.has(${R})) return INVALID;`),R}if("string"==typeof ie)g.write(`if (${R} !== ${esc(ie)}) return INVALID;`);else if("number"==typeof ie||"boolean"==typeof ie)g.write(`if (${R} !== ${ie}) return INVALID;`);else if(null===ie)g.write(`if (${R} !== null) return INVALID;`);else if(void 0===ie)g.write(`if (${R} !== undefined) return INVALID;`);else{if("bigint"!=typeof ie)throw new ZodCompileUnsupportedError("literal type "+typeof ie);g.write(`if (${R} !== ${ie}n) return INVALID;`)}return R}function generateEnumCheck(g,v,D,R){const q=D._zod.values;if(!q)throw new ZodCompileUnsupportedError("enum schema without enumerated values");const ie=addConstant(v,q);return g.write(`if (!${ie}.has(${R})) return INVALID;`),R}function generateWrapperCheck(g,v,D,R){return generateCheck(g,v,D._zod.def.innerType,R)}function generateDefaultCheck(g,v,D,R){const q=D._zod.def,ie=Object.getOwnPropertyDescriptor(D._zod.def,"defaultValue")?()=>D._zod.def.defaultValue:void 0;if("prefault"===D._zod.def.type){if(!ie)return generateCheck(g,v,q.innerType,R);const D=addConstant(v,ie),se=newVar(v);return g.write(`let ${se} = ${R};`),g.write(`if (${R} === undefined) ${se} = ${D}();`),generateCheck(g,v,q.innerType,se)}const se=newVar(v);if(ie){const D=addConstant(v,ie),ce=addConstant(v,shallowClone);g.write(`let ${se};`),g.write(`if (${R} === undefined) {`),g.indented(g=>{g.write(`${se} = ${ce}(${D}());`)}),g.write("} else {"),g.indented(g=>{const ie=generateCheck(g,v,q.innerType,R);g.write(`${se} = ${ie} === undefined ? ${ce}(${D}()) : ${ie};`)}),g.write("}")}else g.write(`let ${se};`),g.write(`if (${R} !== undefined) {`),g.indented(g=>{const D=generateCheck(g,v,q.innerType,R);g.write(`${se} = ${D};`)}),g.write("}");return se}function generateNonOptionalCheck(g,v,D,R){const q=generateCheck(g,v,D._zod.def.innerType,R),ie=newVar(v);return g.write(`const ${ie} = ${q};`),g.write(`if (${ie} === undefined) return INVALID;`),ie}function generateTupleCheck(g,v,D,R){const q=D._zod.def,ie=q.items,se=q.rest;g.write(`if (!Array.isArray(${R})) return INVALID;`);const ce=getTupleOptStart(ie,"optin"),le=getTupleOptStart(ie,"optout");se?g.write(`if (${R}.length < ${ce}) return INVALID;`):g.write(`if (${R}.length < ${ce} || ${R}.length > ${ie.length}) return INVALID;`);const me=newVar(v);g.write(`const ${me} = [];`);for(let D=0;D<ie.length;D++){const q=ie[D];if(D>=le)g.write(`if (${me}.length === ${D}) {`),g.indented(g=>{g.write(`if (${D} < ${R}.length) {`),g.indented(g=>{const ie=newVar(v);g.write(`const ${ie} = ${R}[${D}];`);const se=compileChild(g,v,q,ie);g.write(`${me}[${D}] = ${se};`)}),g.write("} else {"),g.indented(g=>{if(dropsWhenAbsent(q))return void g.write(`${me}.length = ${D};`);const R=newVar(v),ie=newVar(v);g.write(`const ${R} = undefined;`),g.write(`const ${ie} = (() => {`),g.indented(g=>{const D=compileChild(g,v,q,R);g.write(`return ${D};`)}),g.write("})();"),g.write(`if (${ie} === INVALID || ${ie} === undefined) ${me}.length = ${D};`),g.write(`else ${me}[${D}] = ${ie};`)}),g.write("}")}),g.write("}");else{const ie=newVar(v);g.write(`const ${ie} = ${R}[${D}];`);const se=compileChild(g,v,q,ie);g.write(`${me}[${D}] = ${se};`)}}if(se){const D=newVar(v),q=newVar(v);g.write(`for (let ${D} = ${ie.length}; ${D} < ${R}.length; ${D}++) {`),g.indented(g=>{g.write(`const ${q} = ${R}[${D}];`);const ie=compileChild(g,v,se,q);g.write(`${me}[${D}] = ${ie};`)}),g.write("}")}return me}function getTupleOptStart(g,v){for(let D=g.length-1;D>=0;D--){if(!("optin"===v?void 0!==g[D]._zod.optin:"optional"===g[D]._zod.optout))return D+1}return 0}function generateUnionCheck(g,v,D,R){const q=D._zod.def,ie=q.options;if(q.discriminator)return generateDiscriminatedUnionCheck(g,v,q,R);if(!1===q.inclusive)throw new ZodCompileUnsupportedError("exclusive unions (z.xor)");if(0===ie.length)return g.write("return INVALID;"),R;if(1===ie.length)return generateCheck(g,v,ie[0],R);if(ie.every(g=>"literal"===g._zod.def.type&&!g._zod.def.checks?.length)){const D=new Set(ie.flatMap(g=>g._zod.def.values)),q=addConstant(v,D);return g.write(`if (!${q}.has(${R})) return INVALID;`),R}const se=newVar(v);g.write(`let ${se};`);for(let D=0;D<ie.length;D++){const q=ie[D];0===D?g.write(`${se} = (() => {`):g.write(`if (${se} === INVALID) ${se} = (() => {`),g.indented(g=>{const D=generateCheck(g,v,q,R);g.write(`return ${D};`)}),g.write("})();")}return g.write(`if (${se} === INVALID) return INVALID;`),se}function generateDiscriminatedUnionCheck(g,v,D,R){if(D.unionFallback)throw new ZodCompileUnsupportedError("discriminated union with unionFallback");if(0===D.options.length)return g.write("return INVALID;"),R;const q=newVar(v),ie=newVar(v);g.write(`const ${q} = ${R}?.[${esc(D.discriminator)}];`),g.write(`let ${ie};`);let se=!0;const ce=new Set;for(const le of D.options){const me=le._zod.propValues?.[D.discriminator];if(!me||0===me.size)throw new ZodCompileUnsupportedError("discriminated union option without static discriminator values");for(const g of me){if(ce.has(g))throw new ZodCompileUnsupportedError(`duplicate discriminator value ${String(g)}`);ce.add(g)}const fe=Array.from(me,g=>literalEquality(v,q,g)),ge=se?"if":"else if";g.write(`${ge} (${fe.join(" || ")}) {`),g.indented(g=>{const D=generateCheck(g,v,le,R);g.write(`${ie} = ${D};`)}),g.write("}"),se=!1}return g.write("else { return INVALID; }"),ie}function literalEquality(g,v,D){if("string"==typeof D)return`${v} === ${esc(D)}`;if("number"==typeof D)return Number.isNaN(D)?`Number.isNaN(${v})`:`${v} === ${D}`;if("boolean"==typeof D)return`${v} === ${D}`;if(null===D)return`${v} === null`;if(void 0===D)return`${v} === undefined`;if("bigint"==typeof D)return`${v} === ${D}n`;if("symbol"==typeof D){return`${v} === ${addConstant(g,D)}`}throw new ZodCompileUnsupportedError(`literal discriminator value ${String(D)}`)}function generateIntersectionCheck(g,v,D,R){const q=D._zod.def,ie=compileChild(g,v,q.left,R),se=compileChild(g,v,q.right,R),ce=addConstant(v,mergeValues),le=newVar(v);return g.write(`const ${le} = ${ce}(${ie}, ${se});`),g.write(`if (!${le}.valid) return INVALID;`),`${le}.data`}function generateRecordCheck(g,v,D,R){const q=D._zod.def,ie=addConstant(v,isPlainObject);g.write(`if (!${ie}(${R})) return INVALID;`);const se=newVar(v),ce=newVar(v),le=newVar(v);g.write(`const ${se} = {};`);const me=q,fe=me.partial?void 0:q.keyType._zod.values;if(fe){const D=[];for(const ie of fe){if("string"!=typeof ie&&"number"!=typeof ie&&"symbol"!=typeof ie)throw new ZodCompileUnsupportedError(`record key value ${String(ie)}`);const ce="number"==typeof ie?ie.toString():ie;if("__proto__"===ce)throw new ZodCompileUnsupportedError('record key "__proto__"');D.push(ce);const le=addConstant(v,ie),me=generateCheck(g,v,q.keyType,le),fe=newVar(v);g.write(`const ${fe} = ${R}[${literalPropertyKey(v,ce)}];`);const ge=compileChild(g,v,q.valueType,fe);g.write(`${se}[${me}] = ${ge};`)}const ie=addConstant(v,new Set(D));return g.write(`for (const ${ce} in ${R}) {`),g.indented(g=>{g.write(`if (${ie}.has(${ce})) continue;`),"loose"===me.mode?g.write(`if (${ce} !== "__proto__") ${se}[${ce}] = ${R}[${ce}];`):g.write("return INVALID;")}),g.write("}"),se}const ge=q.keyType._zod.def;if(!("string"===ge.type&&void 0===ge.format&&!ge.coerce&&0===(ge.checks?.length??0))){const D="loose"===q.mode,ie=addConstant(v,compileFn(q.keyType)),le=addConstant(v,number$2),me=addConstant(v,Object.prototype.propertyIsEnumerable),fe=newVar(v);return g.write(`for (const ${ce} of Reflect.ownKeys(${R})) {`),g.indented(g=>{g.write(`if (${ce} === "__proto__") continue;`),g.write(`if (!${me}.call(${R}, ${ce})) continue;`),g.write(`let ${fe} = ${ie}(${ce});`),g.write(`if (${fe} === INVALID && typeof ${ce} === "string" && ${le}.test(${ce})) ${fe} = ${ie}(Number(${ce}));`),D?g.write(`if (${fe} === INVALID) { ${se}[${ce}] = ${R}[${ce}]; continue; }`):g.write(`if (${fe} === INVALID) return INVALID;`),g.write(`if (${fe} === "__proto__") continue;`);const ge=newVar(v);g.write(`const ${ge} = ${R}[${ce}];`);const ve=compileChild(g,v,q.valueType,ge);g.write(`${se}[${fe}] = ${ve};`)}),g.write("}"),se}const ve=addConstant(v,Object.prototype.propertyIsEnumerable);return g.write(`for (const ${ce} of Reflect.ownKeys(${R})) {`),g.indented(g=>{g.write(`if (${ce} === "__proto__") continue;`),g.write(`if (!${ve}.call(${R}, ${ce})) continue;`),g.write(`if (typeof ${ce} !== "string") return INVALID;`),g.write(`const ${le} = ${R}[${ce}];`);const D=compileChild(g,v,q.valueType,le);g.write(`${se}[${ce}] = ${D};`)}),g.write("}"),se}function literalPropertyKey(g,v){return"string"==typeof v?esc(v):addConstant(g,v)}function generateMapCheck(g,v,D,R){const q=D._zod.def;g.write(`if (!(${R} instanceof Map)) return INVALID;`);const ie=newVar(v),se=newVar(v),ce=newVar(v);return g.write(`const ${ie} = new Map();`),g.write(`for (const [${se}, ${ce}] of ${R}) {`),g.indented(g=>{const D=generateCheck(g,v,q.keyType,se),R=generateCheck(g,v,q.valueType,ce);g.write(`${ie}.set(${D}, ${R});`)}),g.write("}"),ie}function generateSetCheck(g,v,D,R){const q=D._zod.def;g.write(`if (!(${R} instanceof Set)) return INVALID;`);const ie=newVar(v),se=newVar(v);return g.write(`const ${ie} = new Set();`),g.write(`for (const ${se} of ${R}) {`),g.indented(g=>{const D=generateCheck(g,v,q.valueType,se);g.write(`${ie}.add(${D});`)}),g.write("}"),ie}function generateFileCheck(g,v){return g.write(`if (!(${v} instanceof File)) return INVALID;`),v}function generateTemplateLiteralCheck(g,v,D,R){g.write(`if (typeof ${R} !== "string") return INVALID;`);const q=D._zod.pattern;if(q){const D=addConstant(v,q);g.write(`${D}.lastIndex = 0;`),g.write(`if (!${D}.test(${R})) return INVALID;`)}return R}function generateLazyCheck(g,v,D,R){const q=addConstant(v,D._zod.def.getter),ie=addConstant(v,{parser:null});g.write(`if (!${ie}.parser) {`),g.indented(g=>{g.write(`const inner = ${q}();`),g.write(`${ie}.parser = function(input) {`),g.indented(g=>{g.write("const result = inner._zod.run({ value: input, issues: [] }, {});"),g.write("return result.issues.length === 0 ? result.value : INVALID;")}),g.write("};")}),g.write("}");const se=newVar(v);return g.write(`const ${se} = ${ie}.parser(${R});`),g.write(`if (${se} === INVALID) return INVALID;`),se}function generatePipeCheck(g,v,D,R){const q=D._zod.def,ie=generateCheck(g,v,q.in,R);if(q.transform){if(isAsyncFunction(q.transform))throw new ZodCompileAsyncError("z.compile: async transforms in pipes are not supported");const D=q.transform,R=addConstant(v,g=>{const v={value:g,issues:[],addIssue:pushIssue},R=D(g,v);return R instanceof Promise?INVALID:0===v.issues.length?R:INVALID}),se=newVar(v);return g.write(`const ${se} = ${R}(${ie});`),g.write(`if (${se} === INVALID) return INVALID;`),generateCheck(g,v,q.out,se)}return generateCheck(g,v,q.out,ie)}function isAsyncFunction(g){return"function"==typeof g&&("AsyncFunction"===g.constructor.name||"AsyncFunction"===g[Symbol.toStringTag])}function generateCustomCheck(g,v,D,R){const q=D._zod.def;if(!q.fn)throw new ZodCompileUnsupportedError("custom schema without a predicate function");{if(isAsyncFunction(q.fn))throw new ZodCompileAsyncError("z.compile: async custom predicates are not supported");const D=addConstant(v,q.fn),ie=addConstant(v,throwAsync),se=newVar(v);g.write(`const ${se} = ${D}(${R});`),g.write(`if (${se} instanceof Promise) ${ie}();`),g.write(`if (!${se}) return INVALID;`)}return R}function runtimeCatch(g,v,D){const R=g._zod.run({value:D,issues:[]},{});if(R&&"function"==typeof R.then)return INVALID;const q=R;return 0===q.issues.length?q.value:v()}function generateCatchCheck(g,v,D,R){const q=D._zod.def;if(!q.catchValue[CONSTANT_CATCH])throw new ZodCompileUnsupportedError("catch with a callback (only a constant catch value compiles)",!1);const ie=newVar(v);g.write(`let ${ie} = (() => {`),g.indented(g=>{const D=compileChild(g,v,q.innerType,R);g.write(`return ${D};`)}),g.write("})();");const se=addConstant(v,q.innerType),ce=addConstant(v,q.catchValue),le=addConstant(v,runtimeCatch);return g.write(`if (${ie} === INVALID) {`),g.indented(g=>{g.write(`${ie} = ${le}(${se}, ${ce}, ${R});`),g.write(`if (${ie} === INVALID) return INVALID;`)}),g.write("}"),ie}function generateTransformCheck(g,v,D,R){const q=D._zod.def;if(q.transform){if(isAsyncFunction(q.transform))throw new ZodCompileAsyncError("z.compile: async transforms are not supported");const D=q.transform,ie=addConstant(v,g=>{const v={value:g,issues:[],addIssue:pushIssue},R=D(g,v);return R instanceof Promise?INVALID:0===v.issues.length?R:INVALID}),se=newVar(v);return g.write(`const ${se} = ${ie}(${R});`),g.write(`if (${se} === INVALID) return INVALID;`),se}return R}function _string(g,v){return new g({type:"string",...normalizeParams(v)})}function _coercedString(g,v){return new g({type:"string",coerce:!0,...normalizeParams(v)})}function _email(g,v){return new g({type:"string",format:"email",check:"string_format",abort:!1,...normalizeParams(v)})}function _guid(g,v){return new g({type:"string",format:"guid",check:"string_format",abort:!1,...normalizeParams(v)})}function _uuid(g,v){return new g({type:"string",format:"uuid",check:"string_format",abort:!1,...normalizeParams(v)})}function _uuidv4(g,v){return new g({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...normalizeParams(v)})}function _uuidv6(g,v){return new g({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...normalizeParams(v)})}function _uuidv7(g,v){return new g({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...normalizeParams(v)})}function _url(g,v){return new g({type:"string",format:"url",check:"string_format",abort:!1,...normalizeParams(v)})}function _emoji(g,v){return new g({type:"string",format:"emoji",check:"string_format",abort:!1,...normalizeParams(v)})}function _nanoid(g,v){return new g({type:"string",format:"nanoid",check:"string_format",abort:!1,...normalizeParams(v)})}function _cuid(g,v){return new g({type:"string",format:"cuid",check:"string_format",abort:!1,...normalizeParams(v)})}function _cuid2(g,v){return new g({type:"string",format:"cuid2",check:"string_format",abort:!1,...normalizeParams(v)})}function _ulid(g,v){return new g({type:"string",format:"ulid",check:"string_format",abort:!1,...normalizeParams(v)})}function _xid(g,v){return new g({type:"string",format:"xid",check:"string_format",abort:!1,...normalizeParams(v)})}function _ksuid(g,v){return new g({type:"string",format:"ksuid",check:"string_format",abort:!1,...normalizeParams(v)})}function _ipv4(g,v){return new g({type:"string",format:"ipv4",check:"string_format",abort:!1,...normalizeParams(v)})}function _ipv6(g,v){return new g({type:"string",format:"ipv6",check:"string_format",abort:!1,...normalizeParams(v)})}function _mac(g,v){return new g({type:"string",format:"mac",check:"string_format",abort:!1,...normalizeParams(v)})}function _cidrv4(g,v){return new g({type:"string",format:"cidrv4",check:"string_format",abort:!1,...normalizeParams(v)})}function _cidrv6(g,v){return new g({type:"string",format:"cidrv6",check:"string_format",abort:!1,...normalizeParams(v)})}function _base64(g,v){return new g({type:"string",format:"base64",check:"string_format",abort:!1,...normalizeParams(v)})}function _base64url(g,v){return new g({type:"string",format:"base64url",check:"string_format",abort:!1,...normalizeParams(v)})}function _e164(g,v){return new g({type:"string",format:"e164",check:"string_format",abort:!1,...normalizeParams(v)})}function _creditCard(g,v){return new g({type:"string",format:"credit_card",check:"string_format",abort:!1,...normalizeParams(v)})}function _jwt(g,v){return new g({type:"string",format:"jwt",check:"string_format",abort:!1,...normalizeParams(v)})}const TimePrecision={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function _isoDateTime(g,v){return new g({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...normalizeParams(v)})}function _isoDate(g,v){return new g({type:"string",format:"date",check:"string_format",...normalizeParams(v)})}function _isoTime(g,v){return new g({type:"string",format:"time",check:"string_format",precision:null,...normalizeParams(v)})}function _isoDuration(g,v){return new g({type:"string",format:"duration",check:"string_format",...normalizeParams(v)})}function _number(g,v){return new g({type:"number",checks:[],...normalizeParams(v)})}function _coercedNumber(g,v){return new g({type:"number",coerce:!0,checks:[],...normalizeParams(v)})}function _int(g,v){return new g({type:"number",check:"number_format",abort:!1,format:"safeint",...normalizeParams(v)})}function _float32(g,v){return new g({type:"number",check:"number_format",abort:!1,format:"float32",...normalizeParams(v)})}function _float64(g,v){return new g({type:"number",check:"number_format",abort:!1,format:"float64",...normalizeParams(v)})}function _int32(g,v){return new g({type:"number",check:"number_format",abort:!1,format:"int32",...normalizeParams(v)})}function _uint32(g,v){return new g({type:"number",check:"number_format",abort:!1,format:"uint32",...normalizeParams(v)})}function _boolean(g,v){return new g({type:"boolean",...normalizeParams(v)})}function _coercedBoolean(g,v){return new g({type:"boolean",coerce:!0,...normalizeParams(v)})}function _bigint(g,v){return new g({type:"bigint",...normalizeParams(v)})}function _coercedBigint(g,v){return new g({type:"bigint",coerce:!0,...normalizeParams(v)})}function _int64(g,v){return new g({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...normalizeParams(v)})}function _uint64(g,v){return new g({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...normalizeParams(v)})}function _symbol(g,v){return new g({type:"symbol",...normalizeParams(v)})}function _undefined$1(g,v){return new g({type:"undefined",...normalizeParams(v)})}function _null$1(g,v){return new g({type:"null",...normalizeParams(v)})}function _any(g){return new g({type:"any"})}function _unknown(g){return new g({type:"unknown"})}function _never(g,v){return new g({type:"never",...normalizeParams(v)})}function _void$1(g,v){return new g({type:"void",...normalizeParams(v)})}function _date(g,v){return new g({type:"date",...normalizeParams(v)})}function _coercedDate(g,v){return new g({type:"date",coerce:!0,...normalizeParams(v)})}function _nan(g,v){return new g({type:"nan",...normalizeParams(v)})}function _lt(g,v){return new $ZodCheckLessThan({check:"less_than",...normalizeParams(v),value:g,inclusive:!1})}function _lte(g,v){return new $ZodCheckLessThan({check:"less_than",...normalizeParams(v),value:g,inclusive:!0})}function _gt(g,v){return new $ZodCheckGreaterThan({check:"greater_than",...normalizeParams(v),value:g,inclusive:!1})}function _gte(g,v){return new $ZodCheckGreaterThan({check:"greater_than",...normalizeParams(v),value:g,inclusive:!0})}function _positive(g){return _gt(0,g)}function _negative(g){return _lt(0,g)}function _nonpositive(g){return _lte(0,g)}function _nonnegative(g){return _gte(0,g)}function _multipleOf(g,v){return new $ZodCheckMultipleOf({check:"multiple_of",...normalizeParams(v),value:g})}function _maxSize(g,v){return new $ZodCheckMaxSize({check:"max_size",...normalizeParams(v),maximum:g})}function _minSize(g,v){return new $ZodCheckMinSize({check:"min_size",...normalizeParams(v),minimum:g})}function _size(g,v){return new $ZodCheckSizeEquals({check:"size_equals",...normalizeParams(v),size:g})}function _maxLength(g,v){return new $ZodCheckMaxLength({check:"max_length",...normalizeParams(v),maximum:g})}function _minLength(g,v){return new $ZodCheckMinLength({check:"min_length",...normalizeParams(v),minimum:g})}function _length(g,v){return new $ZodCheckLengthEquals({check:"length_equals",...normalizeParams(v),length:g})}function _regex(g,v){return new $ZodCheckRegex({check:"string_format",format:"regex",...normalizeParams(v),pattern:g})}function _lowercase(g){return new $ZodCheckLowerCase({check:"string_format",format:"lowercase",...normalizeParams(g)})}function _uppercase(g){return new $ZodCheckUpperCase({check:"string_format",format:"uppercase",...normalizeParams(g)})}function _includes(g,v){return new $ZodCheckIncludes({check:"string_format",format:"includes",...normalizeParams(v),includes:g})}function _startsWith(g,v){return new $ZodCheckStartsWith({check:"string_format",format:"starts_with",...normalizeParams(v),prefix:g})}function _endsWith(g,v){return new $ZodCheckEndsWith({check:"string_format",format:"ends_with",...normalizeParams(v),suffix:g})}function _property(g,v,D){return new $ZodCheckProperty({check:"property",property:g,schema:v,...normalizeParams(D)})}function _properties(g){return Object.entries(g).map(([g,v])=>new $ZodCheckProperty({check:"property",property:g,schema:v}))}function _mime(g,v){return new $ZodCheckMimeType({check:"mime_type",mime:g,...normalizeParams(v)})}function _overwrite(g){return new $ZodCheckOverwrite({check:"overwrite",tx:g})}function _normalize(g){return _overwrite(v=>v.normalize(g))}function _trim(){return _overwrite(g=>g.trim())}function _toLowerCase(){return _overwrite(g=>g.toLowerCase())}function _toUpperCase(){return _overwrite(g=>g.toUpperCase())}function _slugify(){return _overwrite(g=>slugify(g))}function _array(g,v,D){return new g({type:"array",element:v,...normalizeParams(D)})}function _union(g,v,D){return new g({type:"union",options:v,...normalizeParams(D)})}function _xor(g,v,D){return new g({type:"union",options:v,inclusive:!1,...normalizeParams(D)})}function _discriminatedUnion(g,v,D,R){return new g({type:"union",options:D,discriminator:v,...normalizeParams(R)})}function _intersection(g,v,D){return new g({type:"intersection",left:v,right:D})}function _tuple(g,v,D,R){const q=D instanceof $ZodType;return new g({type:"tuple",items:v,rest:q?D:null,...normalizeParams(q?R:D)})}function _record(g,v,D,R){return new g({type:"record",keyType:v,valueType:D,...normalizeParams(R)})}function _map(g,v,D,R){return new g({type:"map",keyType:v,valueType:D,...normalizeParams(R)})}function _set(g,v,D){return new g({type:"set",valueType:v,...normalizeParams(D)})}function _enum$1(g,v,D){return new g({type:"enum",entries:Array.isArray(v)?Object.fromEntries(v.map(g=>[g,g])):v,...normalizeParams(D)})}function _nativeEnum(g,v,D){return new g({type:"enum",entries:v,...normalizeParams(D)})}function _literal(g,v,D){return new g({type:"literal",values:Array.isArray(v)?v:[v],...normalizeParams(D)})}function _file(g,v){return new g({type:"file",...normalizeParams(v)})}function _transform(g,v){return new g({type:"transform",transform:v})}function _optional(g,v){return new g({type:"optional",innerType:v})}function _nullable(g,v){return new g({type:"nullable",innerType:v})}function _default$1(g,v,D){return new g({type:"default",innerType:v,get defaultValue(){return"function"==typeof D?D():shallowClone(D)}})}function _nonoptional(g,v,D){return new g({type:"nonoptional",innerType:v,...normalizeParams(D)})}function _success(g,v){return new g({type:"success",innerType:v})}function _catch$1(g,v,D){return new g({type:"catch",innerType:v,catchValue:"function"==typeof D?D:constantCatch(D)})}function _pipe(g,v,D){return new g({type:"pipe",in:v,out:D})}function _readonly(g,v){return new g({type:"readonly",innerType:v})}function _templateLiteral(g,v,D){return new g({type:"template_literal",parts:v,...normalizeParams(D)})}function _lazy(g,v){return new g({type:"lazy",getter:v})}function _promise(g,v){return new g({type:"promise",innerType:v})}function _custom(g,v,D){const R=normalizeParams(D);R.abort??(R.abort=!0);return new g({type:"custom",check:"custom",fn:v,...R})}function _refine(g,v,D){return new g({type:"custom",check:"custom",fn:v,...normalizeParams(D)})}function _superRefine(g,v){const D=_check(v=>(v.addIssue=g=>{if("string"==typeof g)v.issues.push(issue(g,v.value,D._zod.def));else{const R=g;R.fatal&&(R.continue=!1),R.code??(R.code="custom"),"input"in R||(R.input=v.value),R.inst??(R.inst=D),R.continue??(R.continue=!D._zod.def.abort),v.issues.push(issue(R))}},g(v.value,v)),v);return D}function _check(g,v){const D=new $ZodCheck({check:"custom",...normalizeParams(v)});return D._zod.check=g,D}function describe$1(g){const v=new $ZodCheck({check:"describe"});return v._zod.onattach=[v=>{const D=globalRegistry.get(v)??{};globalRegistry.add(v,{...D,description:g})}],v._zod.check=()=>{},v}function meta$1(g){const v=new $ZodCheck({check:"meta"});return v._zod.onattach=[v=>{const D=globalRegistry.get(v)??{};globalRegistry.add(v,{...D,...g})}],v._zod.check=()=>{},v}function _stringbool(g,v){const D=normalizeParams(v);let R=D.truthy??["true","1","yes","on","y","enabled"],q=D.falsy??["false","0","no","off","n","disabled"];"sensitive"!==D.case&&(R=R.map(g=>"string"==typeof g?g.toLowerCase():g),q=q.map(g=>"string"==typeof g?g.toLowerCase():g));const ie=new Set(R),se=new Set(q),ce=g.Codec??$ZodCodec,le=g.Boolean??$ZodBoolean,me=new ce({type:"pipe",in:new(g.String??$ZodString)({type:"string",error:D.error}),out:new le({type:"boolean",error:D.error}),transform:(g,v)=>{let R=g;return"sensitive"!==D.case&&(R=R.toLowerCase()),!!ie.has(R)||!se.has(R)&&(v.issues.push({code:"invalid_value",expected:"stringbool",values:[...ie,...se],input:v.value,inst:me,continue:!1}),{})},reverseTransform:(g,v)=>!0===g?R[0]||"true":q[0]||"false",error:D.error});return me._zod.bag.truthy=R,me._zod.bag.falsy=q,me._zod.bag.case=D.case??"insensitive",me}function _stringFormat(g,v,D,R={}){const q=normalizeParams(R),ie={check:"string_format",type:"string",format:v,fn:"function"==typeof D?D:g=>D.test(g),...q};D instanceof RegExp&&(ie.pattern=D);return new g(ie)}function assignProps(g,...v){for(const D of v)for(const v of Reflect.ownKeys(D))Object.prototype.propertyIsEnumerable.call(D,v)&&assignProp(g,v,D[v]);return g}function initializeContext(g){let v=g?.target??"draft-2020-12";return"draft-4"===v&&(v="draft-04"),"draft-7"===v&&(v="draft-07"),{processors:g.processors??{},metadataRegistry:g?.metadata??globalRegistry,target:v,unrepresentable:g?.unrepresentable??"throw",override:g?.override??(()=>{}),io:g?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:g?.cycles??"ref",reused:g?.reused??"inline",intersections:[],deferred:[],external:g?.external??void 0}}function handleUnrepresentable(g,v,D,R,q){const ie="function"==typeof v.unrepresentable?v.unrepresentable({zodSchema:g,path:R.path,message:q}):v.unrepresentable;if("any"===ie)return!1;if(void 0===ie||"throw"===ie)throw new Error(q);return Object.assign(D,ie),!0}function process(g,v,D={path:[],schemaPath:[]}){var R;const q=g._zod.def,ie=v.seen.get(g);if(ie){ie.count++;return D.schemaPath.includes(g)&&(ie.cycle=D.path),ie.schema}const se={schema:{},count:1,cycle:void 0,path:D.path};v.seen.set(g,se),v.sharedDefsExtractedFor=void 0,v.sharedEmitDoneFor=void 0;const ce=g._zod.toJSONSchema?.();if(ce)se.schema=ce;else{const R={...D,schemaPath:[...D.schemaPath,g],path:D.path};if(g._zod.processJSONSchema)g._zod.processJSONSchema(v,se.schema,R);else{const D=se.schema,ie=v.processors[q.type];if(!ie)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${q.type}`);ie(g,v,D,R)}const ie=g._zod.parent;ie&&(se.ref||(se.ref=ie),process(ie,v,R),v.seen.get(ie).isParent=!0)}const le=v.metadataRegistry.get(g);le&&assignProps(se.schema,le),"input"===v.io&&isTransforming(g)&&(delete se.schema.examples,delete se.schema.default),"input"===v.io&&"_prefault"in se.schema&&((R=se.schema).default??(R.default=se.schema._prefault)),delete se.schema._prefault;return v.seen.get(g).schema}function encodeJSONPointerSegment(g){return g.replace(/~/g,"~0").replace(/\//g,"~1")}function extractDefs(g,v){const D=g.seen.get(v);if(!D)throw new Error("Unprocessed schema. This is a bug in Zod.");if(g.external&&g.sharedDefsExtractedFor===g.external)return;const R=new Map;for(const v of g.seen.entries()){const D=g.metadataRegistry.get(v[0])?.id;if(D){const g=R.get(D);if(g&&g!==v[0])throw new Error(`Duplicate schema id "${D}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);R.set(D,v[0])}}const extractToDef=v=>{if(v[1].schema.$ref)return;const R=v[1],{ref:q,defId:ie}=(v=>{const R="draft-2020-12"===g.target?"$defs":"definitions";if(g.external){const D=g.external.registry.get(v[0])?.id,q=g.external.uri??(g=>g);if(D)return{ref:q(D)};const ie=v[1].defId??v[1].schema.id??"schema"+g.counter++;return v[1].defId=ie,{defId:ie,ref:`${q("__shared")}#/${R}/${encodeJSONPointerSegment(ie)}`}}const q=`#/${R}/`;if(v[1]===D&&!v[1].schema.id)return{ref:"#"};const ie=v[1].schema.id??"__schema"+g.counter++;return{defId:ie,ref:q+encodeJSONPointerSegment(ie)}})(v);R.def={...R.schema},ie&&(R.defId=ie);const se=R.schema;for(const g in se)delete se[g];se.$ref=q};if("throw"===g.cycles)for(const v of g.seen.entries()){const g=v[1];if(g.cycle)throw new Error(`Cycle detected: #/${g.cycle?.join("/")}/<root>\n\nSet the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const D of g.seen.entries()){const R=D[1];if(v===D[0]){extractToDef(D);continue}if(g.external){const R=g.external.registry.get(D[0])?.id;if(v!==D[0]&&R){extractToDef(D);continue}}const q=g.metadataRegistry.get(D[0])?.id;q?extractToDef(D):(R.cycle||R.count>1&&"ref"===g.reused)&&extractToDef(D)}g.external&&(g.sharedDefsExtractedFor=g.external)}function compactTypeUnion(g){const v=g.anyOf;if(!Array.isArray(v)||0===v.length||void 0!==g.type)return;const D=[];for(const g of v){if(!g||"object"!=typeof g)return;compactTypeUnion(g);const v=Object.keys(g);if(1!==v.length||"type"!==v[0])return;const R=g.type;for(const g of Array.isArray(R)?R:[R]){if("string"!=typeof g)return;D.includes(g)||D.push(g)}}delete g.anyOf,g.type=1===D.length?D[0]:D}const FOLDABLE_KEYS=new Set(["type","properties","required","additionalProperties"]),UNION_KEYS=["oneOf","anyOf"];function undeclaredConstraint(g){const v=g.additionalProperties;return void 0===v||!1===v||"object"!=typeof v||null===v?null:Object.keys(v).length?v:null}function foldObjects(g){const v=[];for(const D of g){if("object"!=typeof D||"object"!==D.type)return null;for(const g in D)if(!FOLDABLE_KEYS.has(g))return null;v.push(D)}const D={},R=new Set;for(const g of v){for(const R in g.properties){if(Object.prototype.hasOwnProperty.call(D,R))continue;const g=[];for(const D of v){const v=D.properties?.[R]??undeclaredConstraint(D);null!=v&&(g.some(g=>JSON.stringify(g)===JSON.stringify(v))||g.push(v))}assignProp(D,R,1===g.length?g[0]:foldObjects(g)??{allOf:g})}for(const v of g.required??[])R.add(v)}const q={type:"object",properties:D};if(R.size&&(q.required=[...R]),v.every(g=>!1===g.additionalProperties))q.additionalProperties=!1;else{const g=[];for(const D of v){const v=undeclaredConstraint(D);v&&!g.some(g=>JSON.stringify(g)===JSON.stringify(v))&&g.push(v)}1===g.length?q.additionalProperties=g[0]:g.length>1&&(q.additionalProperties={allOf:g})}return q}function foldIntersection(g){const v=g.allOf;if(!Array.isArray(v)||v.length<2)return;for(const v of FOLDABLE_KEYS)if(v in g)return;const D=v.filter(g=>UNION_KEYS.some(v=>Array.isArray(g[v])));let R=null;if(D.length){const g=D[0],q=UNION_KEYS.find(v=>Array.isArray(g[v]));if(1!==Object.keys(g).length)return;const ie=v.filter(v=>v!==g),se=g[q].map(g=>foldObjects([...ie,g]));if(se.some(g=>!g))return;R={[q]:se}}else R=foldObjects(v);R&&(delete g.allOf,assignProps(g,R))}function finalize(g,v){const D=g.seen.get(v);if(!D)throw new Error("Unprocessed schema. This is a bug in Zod.");const flattenRef=v=>{const D=g.seen.get(v);if(null===D.ref)return;const R=D.def??D.schema,q={...R},ie=D.ref;if(D.ref=null,ie){flattenRef(ie);const D=g.seen.get(ie),se=D.schema;!se.$ref||"draft-07"!==g.target&&"draft-04"!==g.target&&"openapi-3.0"!==g.target?assignProps(R,se):(R.allOf=R.allOf??[],R.allOf.push(se)),assignProps(R,q);if(v._zod.parent===ie)for(const g in R)"$ref"!==g&&"allOf"!==g&&(g in q||delete R[g]);if(se.$ref&&D.def)for(const g in R)"$ref"!==g&&"allOf"!==g&&g in D.def&&JSON.stringify(R[g])===JSON.stringify(D.def[g])&&delete R[g]}const se=v._zod.parent;if(se&&se!==ie){flattenRef(se);const v=g.seen.get(se);if(v?.schema.$ref&&(R.$ref=v.schema.$ref,v.def))for(const g in R)"$ref"!==g&&"allOf"!==g&&g in v.def&&JSON.stringify(R[g])===JSON.stringify(v.def[g])&&delete R[g]}g.override({zodSchema:v,jsonSchema:R,path:D.path??[]})};if(!g.external||g.sharedEmitDoneFor!==g.external){for(const v of[...g.seen.entries()].reverse())flattenRef(v[0]);if("openapi-3.0"!==g.target)for(const v of g.seen.entries())compactTypeUnion(v[1].def??v[1].schema);for(const v of g.deferred)v();if(g.intersections.length){const v=new Map;for(const D of g.seen.values())for(const g of[D.schema,D.def]){const D=g?.allOf;if(!Array.isArray(D))continue;const R=v.get(D);R?R.push(g):v.set(D,[g])}for(const D of g.intersections)for(const g of v.get(D)??[])foldIntersection(g)}}const R={};if("draft-2020-12"===g.target?R.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===g.target?R.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===g.target?R.$schema="http://json-schema.org/draft-04/schema#":g.target,g.external?.uri){const D=g.external.registry.get(v)?.id;if(!D)throw new Error("Schema is missing an `id` property");R.$id=g.external.uri(D)}assignProps(R,D.defId?D.schema:D.def??D.schema);const q=g.metadataRegistry.get(v)?.id;void 0!==q&&R.id===q&&delete R.id;const ie=g.external?.defs??{};if(!g.external||g.sharedEmitDoneFor!==g.external)for(const v of g.seen.entries()){const g=v[1];g.def&&g.defId&&(g.def.id===g.defId&&delete g.def.id,assignProp(ie,g.defId,g.def))}g.external&&(g.sharedEmitDoneFor=g.external),g.external||Object.keys(ie).length>0&&("draft-2020-12"===g.target?R.$defs=ie:R.definitions=ie);try{const D=JSON.parse(JSON.stringify(R));return Object.defineProperty(D,"~standard",{value:{...v["~standard"],jsonSchema:{input:createStandardJSONSchemaMethod(v,"input",g.processors),output:createStandardJSONSchemaMethod(v,"output",g.processors)}},enumerable:!1,writable:!1}),D}catch(g){throw new Error("Error converting schema to JSON.")}}function isTransforming(g,v){const D=v??{seen:new Set};if(D.seen.has(g))return!1;D.seen.add(g);const R=g._zod.def;if("transform"===R.type)return!0;if("array"===R.type)return isTransforming(R.element,D);if("set"===R.type)return isTransforming(R.valueType,D);if("lazy"===R.type)return isTransforming(R.getter(),D);if("promise"===R.type||"optional"===R.type||"nonoptional"===R.type||"nullable"===R.type||"readonly"===R.type||"default"===R.type||"prefault"===R.type||"catch"===R.type)return isTransforming(R.innerType,D);if("intersection"===R.type)return isTransforming(R.left,D)||isTransforming(R.right,D);if("record"===R.type||"map"===R.type)return isTransforming(R.keyType,D)||isTransforming(R.valueType,D);if("pipe"===R.type)return!!g._zod.traits.has("$ZodCodec")||(isTransforming(R.in,D)||isTransforming(R.out,D));if("object"===R.type){for(const g in R.shape)if(isTransforming(R.shape[g],D))return!0;return!1}if("union"===R.type){for(const g of R.options)if(isTransforming(g,D))return!0;return!1}if("tuple"===R.type){for(const g of R.items)if(isTransforming(g,D))return!0;return!(!R.rest||!isTransforming(R.rest,D))}return!1}const createToJSONSchemaMethod=(g,v={})=>D=>{const R=initializeContext({...D,processors:v});return process(g,R),extractDefs(R,g),finalize(R,g)},createStandardJSONSchemaMethod=(g,v,D={})=>R=>{const{libraryOptions:q,target:ie}=R??{},se=initializeContext({...q??{},target:ie,io:v,processors:D});return process(g,se),extractDefs(se,g),finalize(se,g)},formatMap={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},stringProcessor=(g,v,D,R)=>{const q=D;q.type="string";const{minimum:ie,maximum:se,format:ce,patterns:le,contentEncoding:me,laxFormat:fe}=g._zod.bag;if("number"==typeof ie&&(q.minLength=ie),"number"==typeof se&&(q.maxLength=se),ce&&(q.format=formatMap[ce]??ce,""===q.format&&delete q.format,("time"===ce||fe)&&delete q.format),me&&(q.contentEncoding=me),le&&le.size>0){const g=[...le];1===g.length?q.pattern=g[0].source:g.length>1&&(q.allOf=[...g.map(g=>({..."draft-07"===v.target||"draft-04"===v.target||"openapi-3.0"===v.target?{type:"string"}:{},pattern:g.source}))])}},numberProcessor=(g,v,D,R)=>{const q=D,{minimum:ie,maximum:se,format:ce,multipleOf:le,exclusiveMaximum:me,exclusiveMinimum:fe}=g._zod.bag;"string"==typeof ce&&ce.includes("int")?q.type="integer":q.type="number";const ge="number"==typeof fe&&fe>=(ie??Number.NEGATIVE_INFINITY),ve="number"==typeof me&&me<=(se??Number.POSITIVE_INFINITY),xe="draft-04"===v.target||"openapi-3.0"===v.target;ge?xe?(q.minimum=fe,q.exclusiveMinimum=!0):q.exclusiveMinimum=fe:"number"==typeof ie&&(q.minimum=ie),ve?xe?(q.maximum=me,q.exclusiveMaximum=!0):q.exclusiveMaximum=me:"number"==typeof se&&(q.maximum=se),"number"==typeof le&&(Number.isFinite(le)&&0!==le?q.multipleOf=Math.abs(le):handleUnrepresentable(g,v,q,R,`A multipleOf divisor of ${le} cannot be represented in JSON Schema`))},booleanProcessor=(g,v,D,R)=>{D.type="boolean"},bigintProcessor=(g,v,D,R)=>{handleUnrepresentable(g,v,D,R,"BigInt cannot be represented in JSON Schema")},symbolProcessor=(g,v,D,R)=>{handleUnrepresentable(g,v,D,R,"Symbols cannot be represented in JSON Schema")},nullProcessor=(g,v,D,R)=>{"openapi-3.0"===v.target?(D.type="string",D.nullable=!0,D.enum=[null]):D.type="null"},undefinedProcessor=(g,v,D,R)=>{handleUnrepresentable(g,v,D,R,"Undefined cannot be represented in JSON Schema")},voidProcessor=(g,v,D,R)=>{handleUnrepresentable(g,v,D,R,"Void cannot be represented in JSON Schema")},neverProcessor=(g,v,D,R)=>{D.not={}},anyProcessor=(g,v,D,R)=>{},unknownProcessor=(g,v,D,R)=>{},dateProcessor=(g,v,D,R)=>{handleUnrepresentable(g,v,D,R,"Date cannot be represented in JSON Schema")},enumProcessor=(g,v,D,R)=>{const q=getEnumValues(g._zod.def.entries);0!==q.length?(q.every(g=>"number"==typeof g)&&(D.type="number"),q.every(g=>"string"==typeof g)&&(D.type="string"),D.enum=q):D.not={}},literalProcessor=(g,v,D,R)=>{const q=g._zod.def;if(0===q.values.length)return void(D.not={});const ie=[];for(const se of q.values)if(void 0===se){if(handleUnrepresentable(g,v,D,R,"Literal `undefined` cannot be represented in JSON Schema"))return}else if("bigint"==typeof se){if(handleUnrepresentable(g,v,D,R,"BigInt literals cannot be represented in JSON Schema"))return;ie.push(Number(se))}else ie.push(se);if(0===ie.length);else if(1===ie.length){const g=ie[0];D.type=null===g?"null":typeof g,"draft-04"===v.target||"openapi-3.0"===v.target?D.enum=[g]:D.const=g}else ie.every(g=>"number"==typeof g)&&(D.type="number"),ie.every(g=>"string"==typeof g)&&(D.type="string"),ie.every(g=>"boolean"==typeof g)&&(D.type="boolean"),ie.every(g=>null===g)&&(D.type="null"),D.enum=ie},nanProcessor=(g,v,D,R)=>{handleUnrepresentable(g,v,D,R,"NaN cannot be represented in JSON Schema")},templateLiteralProcessor=(g,v,D,R)=>{const q=D,ie=g._zod.pattern;if(!ie)throw new Error("Pattern not found in template literal");q.type="string",q.pattern=ie.source},fileProcessor=(g,v,D,R)=>{const q=D,ie={type:"string",format:"binary",contentEncoding:"binary"},{minimum:se,maximum:ce,mime:le}=g._zod.bag;void 0!==se&&(ie.minLength=se),void 0!==ce&&(ie.maxLength=ce),le?1===le.length?(ie.contentMediaType=le[0],Object.assign(q,ie)):(Object.assign(q,ie),q.anyOf=le.map(g=>({contentMediaType:g}))):Object.assign(q,ie)},successProcessor=(g,v,D,R)=>{D.type="boolean"},customProcessor=(g,v,D,R)=>{handleUnrepresentable(g,v,D,R,"Custom types cannot be represented in JSON Schema")},functionProcessor=(g,v,D,R)=>{handleUnrepresentable(g,v,D,R,"Function types cannot be represented in JSON Schema")},transformProcessor=(g,v,D,R)=>{handleUnrepresentable(g,v,D,R,"Transforms cannot be represented in JSON Schema")},mapProcessor=(g,v,D,R)=>{handleUnrepresentable(g,v,D,R,"Map cannot be represented in JSON Schema")},setProcessor=(g,v,D,R)=>{handleUnrepresentable(g,v,D,R,"Set cannot be represented in JSON Schema")},arrayProcessor=(g,v,D,R)=>{const q=D,ie=g._zod.def,{minimum:se,maximum:ce}=g._zod.bag;"number"==typeof se&&(q.minItems=se),"number"==typeof ce&&(q.maxItems=ce),q.type="array",q.items=process(ie.element,v,{...R,path:[...R.path,"items"]})};function inputOptin(g){const v=g._zod.def;return"pipe"===v.type&&v.in._zod.traits.has("$ZodTransform")?inputOptin(v.out):"catch"===v.type?inputOptin(v.innerType):g._zod.optin}const objectProcessor=(g,v,D,R)=>{const q=D,ie=g._zod.def,se=ie.shape;if(Object.getOwnPropertySymbols(se).length&&handleUnrepresentable(g,v,q,R,"Symbol keys cannot be represented in JSON Schema"))return;q.type="object",q.properties={};for(const g in se)assignProp(q.properties,g,process(se[g],v,{...R,path:[...R.path,"properties",g]}));const ce=new Set(Object.keys(se)),le=new Set([...ce].filter(g=>{const D=ie.shape[g];return"input"===v.io?void 0===inputOptin(D):void 0===D._zod.optout}));le.size>0&&(q.required=Array.from(le)),"never"===ie.catchall?._zod.def.type?q.additionalProperties=!1:ie.catchall?ie.catchall&&(q.additionalProperties=process(ie.catchall,v,{...R,path:[...R.path,"additionalProperties"]})):"output"===v.io&&(q.additionalProperties=!1)},unionProcessor=(g,v,D,R)=>{const q=g._zod.def,ie=!1===q.inclusive,se=q.options.map((g,D)=>process(g,v,{...R,path:[...R.path,ie?"oneOf":"anyOf",D]}));ie?D.oneOf=se:D.anyOf=se},intersectionProcessor=(g,v,D,R)=>{const q=g._zod.def,ie=process(q.left,v,{...R,path:[...R.path,"allOf",0]}),se=process(q.right,v,{...R,path:[...R.path,"allOf",1]}),isSimpleIntersection=g=>"allOf"in g&&1===Object.keys(g).length,ce=[...isSimpleIntersection(ie)?ie.allOf:[ie],...isSimpleIntersection(se)?se.allOf:[se]];D.allOf=ce,v.intersections.push(ce)},tupleProcessor=(g,v,D,R)=>{const q=D,ie=g._zod.def;q.type="array";const se="draft-2020-12"===v.target?"prefixItems":"items",ce="draft-2020-12"===v.target||"openapi-3.0"===v.target?"items":"additionalItems",le=ie.items.map((g,D)=>process(g,v,{...R,path:[...R.path,se,D]})),me=ie.rest?process(ie.rest,v,{...R,path:[...R.path,ce,..."openapi-3.0"===v.target?[ie.items.length]:[]]}):null;let fe=ie.items.length;for(;fe>0;){const g=ie.items[fe-1];if(!("input"===v.io?void 0!==inputOptin(g):"optional"===g._zod.optout))break;fe--}const ge=ie.items.length,ve=!ie.rest;"draft-2020-12"===v.target?(q.prefixItems=le,ve?q.items=!1:me&&(q.items=me),fe>0&&(q.minItems=fe),ve&&(q.maxItems=ge)):"openapi-3.0"===v.target?(q.items={anyOf:le},me&&q.items.anyOf.push(me),fe>0&&(q.minItems=fe),ve&&(q.maxItems=ge)):(q.items=le,ve?q.additionalItems=!1:me&&(q.additionalItems=me),fe>0&&(q.minItems=fe),ve&&(q.maxItems=ge));const{minimum:xe,maximum:_e}=g._zod.bag;"number"==typeof xe&&(q.minItems=xe),"number"==typeof _e&&(q.maxItems=_e)};function stringifyKeyNames(g,v,D){if(v.$ref){if(D.has(v))return v;D.add(v);const R=g.get(v)?.def;if(!R)return v;const q=stringifyKeyNames(g,R,D);return q===R?v:q}for(const R of["anyOf","oneOf"]){const q=v[R];if(!Array.isArray(q))continue;const ie=q.map(v=>stringifyKeyNames(g,v,D));ie.some((g,v)=>g!==q[v])&&(v={...v,[R]:ie})}const R=Array.isArray(v.type)?v.type:[v.type],q=!R.includes("string")&&R.some(g=>"number"===g||"integer"===g),ie=v.enum??(void 0!==v.const?[v.const]:void 0);if(!q&&!ie?.some(g=>"number"==typeof g))return v;const{minimum:se,maximum:ce,exclusiveMinimum:le,exclusiveMaximum:me,multipleOf:fe,format:ge,id:ve,...xe}=v;return xe.enum?xe.enum=xe.enum.map(g=>"number"==typeof g?String(g):g):"number"==typeof xe.const&&(xe.const=String(xe.const)),q?(xe.type="string",ie||(xe.pattern=(R.includes("number")?number$2:integer).source),xe):xe}const pendingRecords=new WeakMap;function rewriteKeyNames(g){const v=new Map;for(const D of g.seen.values())D.def&&!v.has(D.schema)&&v.set(D.schema,D);const D=new Map;for(const R of pendingRecords.get(g)??[]){const q=g.seen.get(R),ie=(q?.def??q?.schema)?.propertyNames;if(!ie||!0===ie||D.has(ie))continue;const se=stringifyKeyNames(v,ie,new Set);se!==ie&&D.set(ie,se)}if(D.size)for(const v of g.seen.values())for(const g of[v.schema,v.def]){const v=g&&D.get(g.propertyNames);v&&(g.propertyNames=v)}}const recordProcessor=(g,v,D,R)=>{const q=D,ie=g._zod.def;q.type="object";const se=ie.keyType,ce=se._zod.bag,le=ce?.patterns;if("loose"===ie.mode&&le&&le.size>0){const g=process(ie.valueType,v,{...R,path:[...R.path,"patternProperties","*"]});q.patternProperties={};for(const v of le)assignProp(q.patternProperties,v.source,g)}else{if("draft-07"===v.target||"draft-2020-12"===v.target){q.propertyNames=process(ie.keyType,v,{...R,path:[...R.path,"propertyNames"]});let D=pendingRecords.get(v);D||(D=[],pendingRecords.set(v,D),v.deferred.push(()=>rewriteKeyNames(v))),D.push(g)}q.additionalProperties=process(ie.valueType,v,{...R,path:[...R.path,"additionalProperties"]})}const me=se._zod.values,fe="input"===v.io&&void 0!==inputOptin(ie.valueType);if(me&&!ie.partial&&!fe){const g=[...me].filter(g=>"string"==typeof g||"number"==typeof g);g.length>0&&(q.required=g.map(String))}},nullableProcessor=(g,v,D,R)=>{const q=g._zod.def,ie=process(q.innerType,v,R),se=v.seen.get(g);"openapi-3.0"===v.target?(se.ref=q.innerType,D.nullable=!0):D.anyOf=[ie,{type:"null"}]},nonoptionalProcessor=(g,v,D,R)=>{const q=g._zod.def;process(q.innerType,v,R);v.seen.get(g).ref=q.innerType},UNREPRESENTABLE_DEFAULT=Symbol();function serializeDefaultValue(g,v,D,R,q){let ie=!1;const se=JSON.stringify(g,(g,v)=>"bigint"!=typeof v?v:(ie=!0,null));return ie?(handleUnrepresentable(v,D,R,q,"BigInt defaults cannot be represented in JSON Schema"),UNREPRESENTABLE_DEFAULT):JSON.parse(se)}const defaultProcessor=(g,v,D,R)=>{const q=g._zod.def;process(q.innerType,v,R);v.seen.get(g).ref=q.innerType;const ie=serializeDefaultValue(q.defaultValue,g,v,D,R);ie!==UNREPRESENTABLE_DEFAULT&&(D.default=ie)},prefaultProcessor=(g,v,D,R)=>{const q=g._zod.def;process(q.innerType,v,R);if(v.seen.get(g).ref=q.innerType,"input"!==v.io)return;const ie=serializeDefaultValue(q.defaultValue,g,v,D,R);ie!==UNREPRESENTABLE_DEFAULT&&(D._prefault=ie)},catchProcessor=(g,v,D,R)=>{const q=g._zod.def;process(q.innerType,v,R);let ie;v.seen.get(g).ref=q.innerType;try{ie=q.catchValue(void 0)}catch{return void handleUnrepresentable(g,v,D,R,"Dynamic catch values are not supported in JSON Schema")}D.default=ie},pipeProcessor=(g,v,D,R)=>{const q=g._zod.def,ie=q.in._zod.traits.has("$ZodTransform"),se="input"===v.io?ie?q.out:q.in:q.out;process(se,v,R);v.seen.get(g).ref=se},readonlyProcessor=(g,v,D,R)=>{const q=g._zod.def;process(q.innerType,v,R);v.seen.get(g).ref=q.innerType,D.readOnly=!0},promiseProcessor=(g,v,D,R)=>{const q=g._zod.def;process(q.innerType,v,R);v.seen.get(g).ref=q.innerType},optionalProcessor=(g,v,D,R)=>{const q=g._zod.def;process(q.innerType,v,R);v.seen.get(g).ref=q.innerType},lazyProcessor=(g,v,D,R)=>{const q=g._zod.innerType;process(q,v,R);v.seen.get(g).ref=q},allProcessors={string:stringProcessor,number:numberProcessor,boolean:booleanProcessor,bigint:bigintProcessor,symbol:symbolProcessor,null:nullProcessor,undefined:undefinedProcessor,void:voidProcessor,never:neverProcessor,any:anyProcessor,unknown:unknownProcessor,date:dateProcessor,enum:enumProcessor,literal:literalProcessor,nan:nanProcessor,template_literal:templateLiteralProcessor,file:fileProcessor,success:successProcessor,custom:customProcessor,function:functionProcessor,transform:transformProcessor,map:mapProcessor,set:setProcessor,array:arrayProcessor,object:objectProcessor,union:unionProcessor,intersection:intersectionProcessor,tuple:tupleProcessor,record:recordProcessor,nullable:nullableProcessor,nonoptional:nonoptionalProcessor,default:defaultProcessor,prefault:prefaultProcessor,catch:catchProcessor,pipe:pipeProcessor,readonly:readonlyProcessor,promise:promiseProcessor,optional:optionalProcessor,lazy:lazyProcessor};function toJSONSchema(g,v){if("_idmap"in g){const D=g,R=initializeContext({...v,processors:allProcessors}),q={};for(const g of D._idmap.entries()){const[v,D]=g;process(D,R)}const ie={},se={registry:D,uri:v?.uri,defs:q};R.external=se;for(const g of D._idmap.entries()){const[v,D]=g;extractDefs(R,D),assignProp(ie,v,finalize(R,D))}if(Object.keys(q).length>0){const g="draft-2020-12"===R.target?"$defs":"definitions";ie.__shared={[g]:q}}return{schemas:ie}}const D=initializeContext({...v,processors:allProcessors});return process(g,D),extractDefs(D,g),finalize(D,g)}class JSONSchemaGenerator{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(g){this.ctx.counter=g}get seen(){return this.ctx.seen}constructor(g){let v=g?.target??"draft-2020-12";"draft-4"===v&&(v="draft-04"),"draft-7"===v&&(v="draft-07"),this.ctx=initializeContext({processors:allProcessors,target:v,...g?.metadata&&{metadata:g.metadata},...g?.unrepresentable&&{unrepresentable:g.unrepresentable},...g?.override&&{override:g.override},...g?.io&&{io:g.io}})}process(g,v={path:[],schemaPath:[]}){return process(g,this.ctx,v)}emit(g,v){v&&(v.cycles&&(this.ctx.cycles=v.cycles),v.reused&&(this.ctx.reused=v.reused),v.external&&(this.ctx.external=v.external)),this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,extractDefs(this.ctx,g);const D=finalize(this.ctx,g),{"~standard":R,...q}=D;return q}}var jsonSchema=Object.freeze({__proto__:null}),index=Object.freeze({__proto__:null,$ZodAny:$ZodAny,$ZodArray:$ZodArray,$ZodAsyncError:$ZodAsyncError,$ZodBase64:$ZodBase64,$ZodBase64URL:$ZodBase64URL,$ZodBigInt:$ZodBigInt,$ZodBigIntFormat:$ZodBigIntFormat,$ZodBoolean:$ZodBoolean,$ZodCIDRv4:$ZodCIDRv4,$ZodCIDRv6:$ZodCIDRv6,$ZodCUID:$ZodCUID,$ZodCUID2:$ZodCUID2,$ZodCatch:$ZodCatch,$ZodCheck:$ZodCheck,$ZodCheckBigIntFormat:$ZodCheckBigIntFormat,$ZodCheckEndsWith:$ZodCheckEndsWith,$ZodCheckGreaterThan:$ZodCheckGreaterThan,$ZodCheckIncludes:$ZodCheckIncludes,$ZodCheckLengthEquals:$ZodCheckLengthEquals,$ZodCheckLessThan:$ZodCheckLessThan,$ZodCheckLowerCase:$ZodCheckLowerCase,$ZodCheckMaxLength:$ZodCheckMaxLength,$ZodCheckMaxSize:$ZodCheckMaxSize,$ZodCheckMimeType:$ZodCheckMimeType,$ZodCheckMinLength:$ZodCheckMinLength,$ZodCheckMinSize:$ZodCheckMinSize,$ZodCheckMultipleOf:$ZodCheckMultipleOf,$ZodCheckNumberFormat:$ZodCheckNumberFormat,$ZodCheckOverwrite:$ZodCheckOverwrite,$ZodCheckProperty:$ZodCheckProperty,$ZodCheckRegex:$ZodCheckRegex,$ZodCheckSizeEquals:$ZodCheckSizeEquals,$ZodCheckStartsWith:$ZodCheckStartsWith,$ZodCheckStringFormat:$ZodCheckStringFormat,$ZodCheckUpperCase:$ZodCheckUpperCase,$ZodCodec:$ZodCodec,$ZodCreditCard:$ZodCreditCard,$ZodCustom:$ZodCustom,$ZodCustomStringFormat:$ZodCustomStringFormat,$ZodCyclicError:$ZodCyclicError,$ZodDate:$ZodDate,$ZodDefault:$ZodDefault,$ZodDiscriminatedUnion:$ZodDiscriminatedUnion,$ZodE164:$ZodE164,$ZodEmail:$ZodEmail,$ZodEmoji:$ZodEmoji,$ZodEncodeError:$ZodEncodeError,$ZodEnum:$ZodEnum,$ZodError:$ZodError,$ZodExactOptional:$ZodExactOptional,$ZodFile:$ZodFile,$ZodFunction:$ZodFunction,$ZodGUID:$ZodGUID,$ZodIPv4:$ZodIPv4,$ZodIPv6:$ZodIPv6,$ZodISODate:$ZodISODate,$ZodISODateTime:$ZodISODateTime,$ZodISODuration:$ZodISODuration,$ZodISOTime:$ZodISOTime,$ZodIntersection:$ZodIntersection,$ZodJWT:$ZodJWT,$ZodKSUID:$ZodKSUID,$ZodLazy:$ZodLazy,$ZodLiteral:$ZodLiteral,$ZodMAC:$ZodMAC,$ZodMap:$ZodMap,$ZodNaN:$ZodNaN,$ZodNanoID:$ZodNanoID,$ZodNever:$ZodNever,$ZodNonOptional:$ZodNonOptional,$ZodNull:$ZodNull,$ZodNullable:$ZodNullable,$ZodNumber:$ZodNumber,$ZodNumberFormat:$ZodNumberFormat,$ZodObject:$ZodObject,$ZodObjectJIT:$ZodObjectJIT,$ZodOptional:$ZodOptional,$ZodPipe:$ZodPipe,$ZodPrefault:$ZodPrefault,$ZodPreprocess:$ZodPreprocess,$ZodPromise:$ZodPromise,$ZodReadonly:$ZodReadonly,$ZodRealError:$ZodRealError,$ZodRecord:$ZodRecord,$ZodRegistry:$ZodRegistry,$ZodSet:$ZodSet,$ZodString:$ZodString,$ZodStringFormat:$ZodStringFormat,$ZodSuccess:$ZodSuccess,$ZodSymbol:$ZodSymbol,$ZodTemplateLiteral:$ZodTemplateLiteral,$ZodTransform:$ZodTransform,$ZodTuple:$ZodTuple,$ZodType:$ZodType,$ZodULID:$ZodULID,$ZodURL:$ZodURL,$ZodUUID:$ZodUUID,$ZodUndefined:$ZodUndefined,$ZodUnion:$ZodUnion,$ZodUnknown:$ZodUnknown,$ZodVoid:$ZodVoid,$ZodXID:$ZodXID,$ZodXor:$ZodXor,$brand:$brand,$constructor:$constructor,$input:$input,$output:$output,Doc:Doc,INVALID:INVALID,JSONSchema:jsonSchema,JSONSchemaGenerator:JSONSchemaGenerator,NEVER:NEVER,TimePrecision:TimePrecision,URL_BAD_FORMAT:URL_BAD_FORMAT,URL_UNPARSEABLE:URL_UNPARSEABLE,ZodCompileAsyncError:ZodCompileAsyncError,ZodCompileUnsupportedError:ZodCompileUnsupportedError,_any:_any,_array:_array,_base64:_base64,_base64url:_base64url,_bigint:_bigint,_boolean:_boolean,_catch:_catch$1,_check:_check,_cidrv4:_cidrv4,_cidrv6:_cidrv6,_coercedBigint:_coercedBigint,_coercedBoolean:_coercedBoolean,_coercedDate:_coercedDate,_coercedNumber:_coercedNumber,_coercedString:_coercedString,_creditCard:_creditCard,_cuid:_cuid,_cuid2:_cuid2,_custom:_custom,_date:_date,_decode:_decode,_decodeAsync:_decodeAsync,_default:_default$1,_discriminatedUnion:_discriminatedUnion,_e164:_e164,_email:_email,_emoji:_emoji,_encode:_encode,_encodeAsync:_encodeAsync,_endsWith:_endsWith,_enum:_enum$1,_file:_file,_float32:_float32,_float64:_float64,_gt:_gt,_gte:_gte,_guid:_guid,_includes:_includes,_int:_int,_int32:_int32,_int64:_int64,_intersection:_intersection,_ipv4:_ipv4,_ipv6:_ipv6,_isoDate:_isoDate,_isoDateTime:_isoDateTime,_isoDuration:_isoDuration,_isoTime:_isoTime,_jwt:_jwt,_ksuid:_ksuid,_lazy:_lazy,_length:_length,_literal:_literal,_lowercase:_lowercase,_lt:_lt,_lte:_lte,_mac:_mac,_map:_map,_max:_lte,_maxLength:_maxLength,_maxSize:_maxSize,_mime:_mime,_min:_gte,_minLength:_minLength,_minSize:_minSize,_multipleOf:_multipleOf,_nan:_nan,_nanoid:_nanoid,_nativeEnum:_nativeEnum,_negative:_negative,_never:_never,_nonnegative:_nonnegative,_nonoptional:_nonoptional,_nonpositive:_nonpositive,_normalize:_normalize,_null:_null$1,_nullable:_nullable,_number:_number,_optional:_optional,_overwrite:_overwrite,_parse:_parse,_parseAsync:_parseAsync,_pipe:_pipe,_positive:_positive,_promise:_promise,_properties:_properties,_property:_property,_readonly:_readonly,_record:_record,_refine:_refine,_regex:_regex,_safeDecode:_safeDecode,_safeDecodeAsync:_safeDecodeAsync,_safeEncode:_safeEncode,_safeEncodeAsync:_safeEncodeAsync,_safeParse:_safeParse,_safeParseAsync:_safeParseAsync,_set:_set,_size:_size,_slugify:_slugify,_startsWith:_startsWith,_string:_string,_stringFormat:_stringFormat,_stringbool:_stringbool,_success:_success,_superRefine:_superRefine,_symbol:_symbol,_templateLiteral:_templateLiteral,_toLowerCase:_toLowerCase,_toUpperCase:_toUpperCase,_transform:_transform,_trim:_trim,_tuple:_tuple,_uint32:_uint32,_uint64:_uint64,_ulid:_ulid,_undefined:_undefined$1,_union:_union,_unknown:_unknown,_uppercase:_uppercase,_url:_url,_uuid:_uuid,_uuidv4:_uuidv4,_uuidv6:_uuidv6,_uuidv7:_uuidv7,_void:_void$1,_xid:_xid,_xor:_xor,clone:clone,compile:compile,compileFn:compileFn,config:config,createStandardJSONSchemaMethod:createStandardJSONSchemaMethod,createToJSONSchemaMethod:createToJSONSchemaMethod,decode:decode$1,decodeAsync:decodeAsync$1,describe:describe$1,encode:encode$1,encodeAsync:encodeAsync$1,extractDefs:extractDefs,finalize:finalize,flattenError:flattenError,formatError:formatError,getDiscriminatedOption:getDiscriminatedOption,globalConfig:globalConfig,globalRegistry:globalRegistry,handleUnrepresentable:handleUnrepresentable,initializeContext:initializeContext,isBackEdge:isBackEdge,isRecursiveSchema:isRecursiveSchema,isValidBase64:isValidBase64,isValidBase64URL:isValidBase64URL,isValidCIDRv6:isValidCIDRv6,isValidCreditCard:isValidCreditCard,isValidIPv6:isValidIPv6,isValidJWT:isValidJWT,locales:index$1,memoizer:memoizer,mergeValues:mergeValues,meta:meta$1,parse:parse$1,parseAsync:parseAsync$1,parseURLObject:parseURLObject,prettifyError:prettifyError,process:process,regexes:regexes,registry:registry,safeDecode:safeDecode$1,safeDecodeAsync:safeDecodeAsync$1,safeEncode:safeEncode$1,safeEncodeAsync:safeEncodeAsync$1,safeParse:safeParse$1,safeParseAsync:safeParseAsync$1,standardProps:standardProps,stripTabAndNewline:stripTabAndNewline,toDotPath:toDotPath,toJSONSchema:toJSONSchema,toZod:toZod,treeifyError:treeifyError,urlHostnameOk:urlHostnameOk,urlProtocolOk:urlProtocolOk,util:util,validate:validate,validateAsync:validateAsync,version:version}),_checks=Object.freeze({__proto__:null,endsWith:_endsWith,gt:_gt,gte:_gte,includes:_includes,length:_length,lowercase:_lowercase,lt:_lt,lte:_lte,maxLength:_maxLength,maxSize:_maxSize,mime:_mime,minLength:_minLength,minSize:_minSize,multipleOf:_multipleOf,negative:_negative,nonnegative:_nonnegative,nonpositive:_nonpositive,normalize:_normalize,overwrite:_overwrite,positive:_positive,properties:_properties,property:_property,regex:_regex,size:_size,slugify:_slugify,startsWith:_startsWith,toLowerCase:_toLowerCase,toUpperCase:_toUpperCase,trim:_trim,uppercase:_uppercase});const _installedErrorProtos=new WeakSet([Object.prototype,Error.prototype]);function _lazyMethod(g,v,D){Object.defineProperty(g,v,{configurable:!0,enumerable:!1,get(){const g=D(this);return Object.defineProperty(this,v,{value:g,configurable:!0,writable:!0}),g},set(g){Object.defineProperty(this,v,{value:g,configurable:!0,writable:!0})}})}const initializer=(g,v)=>{$ZodError.init(g,v),g.name="ZodError";const D=Object.getPrototypeOf(g);_installedErrorProtos.has(D)||(_installedErrorProtos.add(D),_lazyMethod(D,"format",g=>v=>formatError(g,v)),_lazyMethod(D,"flatten",g=>v=>flattenError(g,v)),_lazyMethod(D,"addIssue",g=>v=>{g.issues.push(v),g.message=JSON.stringify(g.issues,jsonStringifyReplacer,2)}),_lazyMethod(D,"addIssues",g=>v=>{g.issues.push(...v),g.message=JSON.stringify(g.issues,jsonStringifyReplacer,2)}),Object.defineProperty(D,"isEmpty",{configurable:!0,enumerable:!1,get(){return 0===this.issues.length}}))},ZodError=$constructor("ZodError",initializer),ZodRealError=$constructor("ZodError",initializer,void 0,{Parent:Error}),parse=_parse(ZodRealError),parseAsync=_parseAsync(ZodRealError),safeParse=_safeParse(ZodRealError),safeParseAsync=_safeParseAsync(ZodRealError),encode=_encode(ZodRealError),decode=_decode(ZodRealError),encodeAsync=_encodeAsync(ZodRealError),decodeAsync=_decodeAsync(ZodRealError),safeEncode=_safeEncode(ZodRealError),safeDecode=_safeDecode(ZodRealError),safeEncodeAsync=_safeEncodeAsync(ZodRealError),safeDecodeAsync=_safeDecodeAsync(ZodRealError);function _ensureDefaultLocale(){globalConfig.localeError||config(en())}function _ensureDefaultMemoizer(){globalConfig.memoizer||config({memoizer:memoizer()})}const ZodType=$constructor("ZodType",(g,v)=>(_ensureDefaultLocale(),$ZodType.init(g,v),g.def=v,g.type=v.type,g),{check(...g){const v=this.def;return this.clone(mergeDefs(v,{checks:[...v.checks??[],...g.map(g=>"function"==typeof g?{_zod:{check:g,def:{check:"custom"},onattach:[]}}:g)]}),{parent:!0})},with(...g){return this.check(...g)},clone(g,v){return clone(this,g,v)},brand(){return this},register(g,v){return g.add(this,v),this},refine(g,v){return this.check(refine(g,v))},superRefine(g,v){return this.check(superRefine(g,v))},overwrite(g){return this.check(_overwrite(g))},optional(){return optional(this)},exactOptional(){return exactOptional(this)},nullable(){return nullable(this)},nullish(){return optional(nullable(this))},nonoptional(g){return nonoptional(this,g)},array(){return array(this)},or(g){return union([this,g])},and(g){return intersection(this,g)},transform(g){return pipe(this,transform(g))},default(g){return _default(this,g)},prefault(g){return prefault(this,g)},catch(g){return _catch(this,g)},pipe(g){return pipe(this,g)},readonly(){return readonly(this)},describe(g){const v=this.clone();return globalRegistry.add(v,{description:g}),v},meta(...g){if(0===g.length)return globalRegistry.get(this);const v=this.clone();return globalRegistry.add(v,g[0]),v},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(g,...v){return 0===v.length?g(this):g(this,...v)},get"~standard"(){return hide(this,"~standard",{...standardProps(this),jsonSchema:{input:createStandardJSONSchemaMethod(this,"input"),output:createStandardJSONSchemaMethod(this,"output")}})},set"~standard"(g){own(this,"~standard",g)},parse:function _parse(g,v){return parse(this,g,v,{callee:_parse})},parseAsync:async function _parseAsync(g,v){return await parseAsync(this,g,v,{callee:_parseAsync})},safeParse(g,v){return safeParse(this,g,v)},async safeParseAsync(g,v){return safeParseAsync(this,g,v)},get spa(){return this?.safeParseAsync},set spa(g){own(this,"spa",g)},encode:function _encode(g,v){return encode(this,g,v,{callee:_encode})},decode:function _decode(g,v){return decode(this,g,v,{callee:_decode})},encodeAsync:async function _encodeAsync(g,v){return await encodeAsync(this,g,v,{callee:_encodeAsync})},decodeAsync:async function _decodeAsync(g,v){return await decodeAsync(this,g,v,{callee:_decodeAsync})},safeEncode(g,v){return safeEncode(this,g,v)},safeDecode(g,v){return safeDecode(this,g,v)},async safeEncodeAsync(g,v){return safeEncodeAsync(this,g,v)},async safeDecodeAsync(g,v){return safeDecodeAsync(this,g,v)},toJSONSchema(g){return createToJSONSchemaMethod(this,{})(g)},get description(){return globalRegistry.get(this)?.description},get _def(){return this._zod.def}}),_ZodString=$constructor("_ZodString",(g,v)=>{$ZodString.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,D,R)=>stringProcessor(g,v,D);const D=g._zod.bag;g.format=D.format??null,g.minLength=D.minimum??null,g.maxLength=D.maximum??null},{regex(...g){return this.check(_regex(...g))},includes(...g){return this.check(_includes(...g))},startsWith(...g){return this.check(_startsWith(...g))},endsWith(...g){return this.check(_endsWith(...g))},min(...g){return this.check(_minLength(...g))},max(...g){return this.check(_maxLength(...g))},length(...g){return this.check(_length(...g))},nonempty(...g){return this.check(_minLength(1,...g))},lowercase(g){return this.check(_lowercase(g))},uppercase(g){return this.check(_uppercase(g))},trim(){return this.check(_trim())},normalize(...g){return this.check(_normalize(...g))},toLowerCase(){return this.check(_toLowerCase())},toUpperCase(){return this.check(_toUpperCase())},slugify(){return this.check(_slugify())}}),ZodString=$constructor("ZodString",(g,v)=>{$ZodString.init(g,v),_ZodString.init(g,v)},{email(g){return this.check(_email(ZodEmail,g))},url(g){return this.check(_url(ZodURL,g))},jwt(g){return this.check(_jwt(ZodJWT,g))},emoji(g){return this.check(_emoji(ZodEmoji,g))},guid(g){return this.check(_guid(ZodGUID,g))},uuid(g){return this.check(_uuid(ZodUUID,g))},uuidv4(g){return this.check(_uuidv4(ZodUUID,g))},uuidv6(g){return this.check(_uuidv6(ZodUUID,g))},uuidv7(g){return this.check(_uuidv7(ZodUUID,g))},nanoid(g){return this.check(_nanoid(ZodNanoID,g))},cuid(g){return this.check(_cuid(ZodCUID,g))},cuid2(g){return this.check(_cuid2(ZodCUID2,g))},ulid(g){return this.check(_ulid(ZodULID,g))},base64(g){return this.check(_base64(ZodBase64,g))},base64url(g){return this.check(_base64url(ZodBase64URL,g))},xid(g){return this.check(_xid(ZodXID,g))},ksuid(g){return this.check(_ksuid(ZodKSUID,g))},ipv4(g){return this.check(_ipv4(ZodIPv4,g))},ipv6(g){return this.check(_ipv6(ZodIPv6,g))},cidrv4(g){return this.check(_cidrv4(ZodCIDRv4,g))},cidrv6(g){return this.check(_cidrv6(ZodCIDRv6,g))},e164(g){return this.check(_e164(ZodE164,g))},datetime(g){return this.check(_isoDateTime(ZodISODateTime,g))},date(g){return this.check(_isoDate(ZodISODate,g))},time(g){return this.check(_isoTime(ZodISOTime,g))},duration(g){return this.check(_isoDuration(ZodISODuration,g))}});function string$1(g){return _string(ZodString,g)}const ZodStringFormat=$constructor("ZodStringFormat",(g,v)=>{$ZodStringFormat.init(g,v),_ZodString.init(g,v)}),ZodISODateTime=$constructor("ZodISODateTime",(g,v)=>{$ZodISODateTime.init(g,v),ZodStringFormat.init(g,v)}),ZodISODate=$constructor("ZodISODate",(g,v)=>{$ZodISODate.init(g,v),ZodStringFormat.init(g,v)}),ZodISOTime=$constructor("ZodISOTime",(g,v)=>{$ZodISOTime.init(g,v),ZodStringFormat.init(g,v)}),ZodISODuration=$constructor("ZodISODuration",(g,v)=>{$ZodISODuration.init(g,v),ZodStringFormat.init(g,v)}),ZodEmail=$constructor("ZodEmail",(g,v)=>{$ZodEmail.init(g,v),ZodStringFormat.init(g,v)});function email(g){return _email(ZodEmail,g)}const ZodGUID=$constructor("ZodGUID",(g,v)=>{$ZodGUID.init(g,v),ZodStringFormat.init(g,v)});function guid(g){return _guid(ZodGUID,g)}const ZodUUID=$constructor("ZodUUID",(g,v)=>{$ZodUUID.init(g,v),ZodStringFormat.init(g,v)});function uuid(g){return _uuid(ZodUUID,g)}function uuidv4(g){return _uuidv4(ZodUUID,g)}function uuidv6(g){return _uuidv6(ZodUUID,g)}function uuidv7(g){return _uuidv7(ZodUUID,g)}const ZodURL=$constructor("ZodURL",(g,v)=>{$ZodURL.init(g,v),ZodStringFormat.init(g,v)});function url(g){return _url(ZodURL,g)}function httpUrl(g){return _url(ZodURL,{protocol:httpProtocol,hostname:domain,...normalizeParams(g)})}const ZodEmoji=$constructor("ZodEmoji",(g,v)=>{$ZodEmoji.init(g,v),ZodStringFormat.init(g,v)});function emoji(g){return _emoji(ZodEmoji,g)}const ZodNanoID=$constructor("ZodNanoID",(g,v)=>{$ZodNanoID.init(g,v),ZodStringFormat.init(g,v)});function nanoid(g){return _nanoid(ZodNanoID,g)}const ZodCUID=$constructor("ZodCUID",(g,v)=>{$ZodCUID.init(g,v),ZodStringFormat.init(g,v)});function cuid(g){return _cuid(ZodCUID,g)}const ZodCUID2=$constructor("ZodCUID2",(g,v)=>{$ZodCUID2.init(g,v),ZodStringFormat.init(g,v)});function cuid2(g){return _cuid2(ZodCUID2,g)}const ZodULID=$constructor("ZodULID",(g,v)=>{$ZodULID.init(g,v),ZodStringFormat.init(g,v)});function ulid(g){return _ulid(ZodULID,g)}const ZodXID=$constructor("ZodXID",(g,v)=>{$ZodXID.init(g,v),ZodStringFormat.init(g,v)});function xid(g){return _xid(ZodXID,g)}const ZodKSUID=$constructor("ZodKSUID",(g,v)=>{$ZodKSUID.init(g,v),ZodStringFormat.init(g,v)});function ksuid(g){return _ksuid(ZodKSUID,g)}const ZodIPv4=$constructor("ZodIPv4",(g,v)=>{$ZodIPv4.init(g,v),ZodStringFormat.init(g,v)});function ipv4(g){return _ipv4(ZodIPv4,g)}const ZodMAC=$constructor("ZodMAC",(g,v)=>{$ZodMAC.init(g,v),ZodStringFormat.init(g,v)});function mac(g){return _mac(ZodMAC,g)}const ZodIPv6=$constructor("ZodIPv6",(g,v)=>{$ZodIPv6.init(g,v),ZodStringFormat.init(g,v)});function ipv6(g){return _ipv6(ZodIPv6,g)}const ZodCIDRv4=$constructor("ZodCIDRv4",(g,v)=>{$ZodCIDRv4.init(g,v),ZodStringFormat.init(g,v)});function cidrv4(g){return _cidrv4(ZodCIDRv4,g)}const ZodCIDRv6=$constructor("ZodCIDRv6",(g,v)=>{$ZodCIDRv6.init(g,v),ZodStringFormat.init(g,v)});function cidrv6(g){return _cidrv6(ZodCIDRv6,g)}const ZodBase64=$constructor("ZodBase64",(g,v)=>{$ZodBase64.init(g,v),ZodStringFormat.init(g,v)});function base64(g){return _base64(ZodBase64,g)}const ZodBase64URL=$constructor("ZodBase64URL",(g,v)=>{$ZodBase64URL.init(g,v),ZodStringFormat.init(g,v)});function base64url(g){return _base64url(ZodBase64URL,g)}const ZodE164=$constructor("ZodE164",(g,v)=>{$ZodE164.init(g,v),ZodStringFormat.init(g,v)});function e164(g){return _e164(ZodE164,g)}const ZodCreditCard=$constructor("ZodCreditCard",(g,v)=>{$ZodCreditCard.init(g,v),ZodStringFormat.init(g,v)});function creditCard(g){return _creditCard(ZodCreditCard,g)}const ZodJWT=$constructor("ZodJWT",(g,v)=>{$ZodJWT.init(g,v),ZodStringFormat.init(g,v)});function jwt(g){return _jwt(ZodJWT,g)}const ZodCustomStringFormat=$constructor("ZodCustomStringFormat",(g,v)=>{$ZodCustomStringFormat.init(g,v),ZodStringFormat.init(g,v)});function stringFormat(g,v,D={}){return _stringFormat(ZodCustomStringFormat,g,v,D)}function hostname(g){return _stringFormat(ZodCustomStringFormat,"hostname",hostname$1,g)}function hex(g){return _stringFormat(ZodCustomStringFormat,"hex",hex$1,g)}function hash(g,v){const D=`${g}_${v?.enc??"hex"}`,R=regexes[D];if(!R)throw new Error(`Unrecognized hash format: ${D}`);return _stringFormat(ZodCustomStringFormat,D,R,v)}const ZodNumber=$constructor("ZodNumber",(g,v)=>{$ZodNumber.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,D,R)=>numberProcessor(g,v,D,R);const D=g._zod.bag;g.minValue=Math.max(D.minimum??Number.NEGATIVE_INFINITY,D.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,g.maxValue=Math.min(D.maximum??Number.POSITIVE_INFINITY,D.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,g.isInt=(D.format??"").includes("int")||Number.isSafeInteger(D.multipleOf??.5),g.isFinite=!0,g.format=D.format??null},{gt(g,v){return this.check(_gt(g,v))},gte(g,v){return this.check(_gte(g,v))},min(g,v){return this.check(_gte(g,v))},lt(g,v){return this.check(_lt(g,v))},lte(g,v){return this.check(_lte(g,v))},max(g,v){return this.check(_lte(g,v))},int(g){return this.check(int(g))},safe(g){return this.check(int(g))},positive(g){return this.check(_gt(0,g))},nonnegative(g){return this.check(_gte(0,g))},negative(g){return this.check(_lt(0,g))},nonpositive(g){return this.check(_lte(0,g))},multipleOf(g,v){return this.check(_multipleOf(g,v))},step(g,v){return this.check(_multipleOf(g,v))},finite(){return this}});function number$1(g){return _number(ZodNumber,g)}const ZodNumberFormat=$constructor("ZodNumberFormat",(g,v)=>{$ZodNumberFormat.init(g,v),ZodNumber.init(g,v)});function int(g){return _int(ZodNumberFormat,g)}function float32(g){return _float32(ZodNumberFormat,g)}function float64(g){return _float64(ZodNumberFormat,g)}function int32(g){return _int32(ZodNumberFormat,g)}function uint32(g){return _uint32(ZodNumberFormat,g)}const ZodBoolean=$constructor("ZodBoolean",(g,v)=>{$ZodBoolean.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,D,R)=>booleanProcessor(g,v,D)});function boolean$1(g){return _boolean(ZodBoolean,g)}const ZodBigInt=$constructor("ZodBigInt",(g,v)=>{$ZodBigInt.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,D,R)=>bigintProcessor(g,v,D,R);const D=g._zod.bag;g.minValue=D.minimum??null,g.maxValue=D.maximum??null,g.format=D.format??null},{gte(g,v){return this.check(_gte(g,v))},min(g,v){return this.check(_gte(g,v))},gt(g,v){return this.check(_gt(g,v))},lt(g,v){return this.check(_lt(g,v))},lte(g,v){return this.check(_lte(g,v))},max(g,v){return this.check(_lte(g,v))},positive(g){return this.check(_gt(BigInt(0),g))},negative(g){return this.check(_lt(BigInt(0),g))},nonpositive(g){return this.check(_lte(BigInt(0),g))},nonnegative(g){return this.check(_gte(BigInt(0),g))},multipleOf(g,v){return this.check(_multipleOf(g,v))}});function bigint$1(g){return _bigint(ZodBigInt,g)}const ZodBigIntFormat=$constructor("ZodBigIntFormat",(g,v)=>{$ZodBigIntFormat.init(g,v),ZodBigInt.init(g,v)});function int64(g){return _int64(ZodBigIntFormat,g)}function uint64(g){return _uint64(ZodBigIntFormat,g)}const ZodSymbol=$constructor("ZodSymbol",(g,v)=>{$ZodSymbol.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,D,R)=>symbolProcessor(g,v,D,R)});function symbol(g){return _symbol(ZodSymbol,g)}const ZodUndefined=$constructor("ZodUndefined",(g,v)=>{$ZodUndefined.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,D,R)=>undefinedProcessor(g,v,D,R)});function _undefined(g){return _undefined$1(ZodUndefined,g)}const ZodNull=$constructor("ZodNull",(g,v)=>{$ZodNull.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,D,R)=>nullProcessor(g,v,D)});function _null(g){return _null$1(ZodNull,g)}const ZodAny=$constructor("ZodAny",(g,v)=>{$ZodAny.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(g,v,D)=>anyProcessor()});function any(){return _any(ZodAny)}const ZodUnknown=$constructor("ZodUnknown",(g,v)=>{$ZodUnknown.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(g,v,D)=>unknownProcessor()});function unknown(){return _unknown(ZodUnknown)}const ZodNever=$constructor("ZodNever",(g,v)=>{$ZodNever.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,D,R)=>neverProcessor(g,v,D)});function never(g){return _never(ZodNever,g)}const ZodVoid=$constructor("ZodVoid",(g,v)=>{$ZodVoid.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,D,R)=>voidProcessor(g,v,D,R)});function _void(g){return _void$1(ZodVoid,g)}const ZodDate=$constructor("ZodDate",(g,v)=>{$ZodDate.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,D,R)=>dateProcessor(g,v,D,R),g.min=(v,D)=>g.check(_gte(v,D)),g.max=(v,D)=>g.check(_lte(v,D));const D=g._zod.bag;g.minDate=D.minimum?new Date(D.minimum):null,g.maxDate=D.maximum?new Date(D.maximum):null});function date$2(g){return _date(ZodDate,g)}const ZodArray=$constructor("ZodArray",(g,v)=>{_ensureDefaultMemoizer(),$ZodArray.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,D,R)=>arrayProcessor(g,v,D,R),g.element=v.element},{min(g,v){return this.check(_minLength(g,v))},nonempty(g){return this.check(_minLength(1,g))},max(g,v){return this.check(_maxLength(g,v))},length(g,v){return this.check(_length(g,v))},unwrap(){return this.element}});function array(g,v){return _array(ZodArray,g,v)}function keyof(g){const v=g._zod.def.shape;return _enum(Object.keys(v))}const ZodObject=$constructor("ZodObject",(g,v)=>{_ensureDefaultMemoizer(),$ZodObjectJIT.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,D,R)=>objectProcessor(g,v,D,R),installLazyProp(g,"shape",g=>g._zod.def.shape,!1)},{keyof(){return _enum(Object.keys(this._zod.def.shape))},catchall(g){return this.clone({...this._zod.def,catchall:g})},passthrough(){return this.clone({...this._zod.def,catchall:unknown()})},loose(){return this.clone({...this._zod.def,catchall:unknown()})},strict(){return this.clone({...this._zod.def,catchall:never()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(g){return extend(this,g)},safeExtend(g){return safeExtend(this,g)},merge(g){return merge(this,g)},pick(g){return pick(this,g)},omit(g){return omit(this,g)},partial(...g){return partial(ZodOptional,this,g[0])},exactPartial(...g){return partial(ZodExactOptional,this,g[0],"exactPartial")},required(...g){return required(ZodNonOptional,this,g[0])}});function object(g,v){const D={type:"object",shape:g??{},...normalizeParams(v)};return new ZodObject(D)}function strictObject(g,v){return new ZodObject({type:"object",shape:g,catchall:never(),...normalizeParams(v)})}function looseObject(g,v){return new ZodObject({type:"object",shape:g,catchall:unknown(),...normalizeParams(v)})}const ZodUnion=$constructor("ZodUnion",(g,v)=>{$ZodUnion.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,D,R)=>unionProcessor(g,v,D,R),g.options=v.options});function union(g,v){return new ZodUnion({type:"union",options:g,...normalizeParams(v)})}const ZodXor=$constructor("ZodXor",(g,v)=>{ZodUnion.init(g,v),$ZodXor.init(g,v),g._zod.processJSONSchema=(v,D,R)=>unionProcessor(g,v,D,R),g.options=v.options});function xor(g,v){return new ZodXor({type:"union",options:g,inclusive:!1,...normalizeParams(v)})}const ZodDiscriminatedUnion=$constructor("ZodDiscriminatedUnion",(g,v)=>{ZodUnion.init(g,v),$ZodDiscriminatedUnion.init(g,v)});function discriminatedUnion(g,v,D){return new ZodDiscriminatedUnion({type:"union",options:v,discriminator:g,...normalizeParams(D)})}const ZodIntersection=$constructor("ZodIntersection",(g,v)=>{$ZodIntersection.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,D,R)=>intersectionProcessor(g,v,D,R)});function intersection(g,v){return new ZodIntersection({type:"intersection",left:g,right:v})}const ZodTuple=$constructor("ZodTuple",(g,v)=>{_ensureDefaultMemoizer(),$ZodTuple.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,D,R)=>tupleProcessor(g,v,D,R)},{rest(g){return this.clone({...this._zod.def,rest:g})},partial(){const g=this._zod.def;if(g.checks?.length)throw new Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...g,items:g.items.map(g=>new ZodOptional({type:"optional",innerType:g}))})}});function tuple(g,v,D){const R=v instanceof $ZodType;return new ZodTuple({type:"tuple",items:g,rest:R?v:null,...normalizeParams(R?D:v)})}const ZodRecord=$constructor("ZodRecord",(g,v)=>{_ensureDefaultMemoizer(),$ZodRecord.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,D,R)=>recordProcessor(g,v,D,R),g.keyType=v.keyType,g.valueType=v.valueType});function record(g,v,D){return v&&v._zod?new ZodRecord({type:"record",keyType:g,valueType:v,...normalizeParams(D)}):new ZodRecord({type:"record",keyType:string$1(),valueType:g,...normalizeParams(v)})}function partialRecord(g,v,D){return new ZodRecord({type:"record",keyType:g,valueType:v,...normalizeParams(D),partial:!0})}function looseRecord(g,v,D){return new ZodRecord({type:"record",keyType:g,valueType:v,mode:"loose",...normalizeParams(D)})}const ZodMap=$constructor("ZodMap",(g,v)=>{_ensureDefaultMemoizer(),$ZodMap.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,D,R)=>mapProcessor(g,v,D,R),g.keyType=v.keyType,g.valueType=v.valueType,g.min=(...v)=>g.check(_minSize(...v)),g.nonempty=v=>g.check(_minSize(1,v)),g.max=(...v)=>g.check(_maxSize(...v)),g.size=(...v)=>g.check(_size(...v))});function map(g,v,D){return new ZodMap({type:"map",keyType:g,valueType:v,...normalizeParams(D)})}const ZodSet=$constructor("ZodSet",(g,v)=>{_ensureDefaultMemoizer(),$ZodSet.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,D,R)=>setProcessor(g,v,D,R),g.min=(...v)=>g.check(_minSize(...v)),g.nonempty=v=>g.check(_minSize(1,v)),g.max=(...v)=>g.check(_maxSize(...v)),g.size=(...v)=>g.check(_size(...v))});function set(g,v){return new ZodSet({type:"set",valueType:g,...normalizeParams(v)})}const ZodEnum=$constructor("ZodEnum",(g,v)=>{$ZodEnum.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,D,R)=>enumProcessor(g,v,D),g.enum=v.entries,g.options=Object.values(v.entries);const D=new Set(Object.keys(v.entries));g.extract=(g,R)=>{const q={};for(const R of g){if(!D.has(R))throw new Error(`Key ${R} not found in enum`);q[R]=v.entries[R]}return new ZodEnum({...v,checks:[],...normalizeParams(R),entries:q})},g.exclude=(g,R)=>{const q={...v.entries};for(const v of g){if(!D.has(v))throw new Error(`Key ${v} not found in enum`);delete q[v]}return new ZodEnum({...v,checks:[],...normalizeParams(R),entries:q})}});function _enum(g,v){const D=Array.isArray(g)?Object.fromEntries(g.map(g=>[g,g])):g;return new ZodEnum({type:"enum",entries:D,...normalizeParams(v)})}function nativeEnum(g,v){return new ZodEnum({type:"enum",entries:g,...normalizeParams(v)})}const ZodLiteral=$constructor("ZodLiteral",(g,v)=>{$ZodLiteral.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,D,R)=>literalProcessor(g,v,D,R),g.values=new Set(v.values),Object.defineProperty(g,"value",{get(){if(v.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return v.values[0]}})});function literal(g,v){return new ZodLiteral({type:"literal",values:Array.isArray(g)?g:[g],...normalizeParams(v)})}const ZodFile=$constructor("ZodFile",(g,v)=>{$ZodFile.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,D,R)=>fileProcessor(g,v,D),g.min=(v,D)=>g.check(_minSize(v,D)),g.max=(v,D)=>g.check(_maxSize(v,D)),g.mime=(v,D)=>g.check(_mime(Array.isArray(v)?v:[v],D))});function file(g){return _file(ZodFile,g)}const ZodTransform=$constructor("ZodTransform",(g,v)=>{_ensureDefaultMemoizer(),$ZodTransform.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,D,R)=>transformProcessor(g,v,D,R),g._zod.parse=(D,R)=>{if("backward"===R.direction)throw new $ZodEncodeError(g.constructor.name);D.addIssue=R=>{if("string"==typeof R)D.issues.push(issue(R,D.value,v));else{const v=R;v.fatal&&(v.continue=!1),v.code??(v.code="custom"),"input"in v||(v.input=D.value),v.inst??(v.inst=g),D.issues.push(issue(v))}};const q=v.transform(D.value,D);return q instanceof Promise?q.then(g=>(D.value=g,D)):(D.value=q,D)}});function transform(g){return new ZodTransform({type:"transform",transform:g})}const ZodOptional=$constructor("ZodOptional",(g,v)=>{$ZodOptional.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,D,R)=>optionalProcessor(g,v,D,R),g.unwrap=()=>g._zod.def.innerType});function optional(g){return new ZodOptional({type:"optional",innerType:g})}const ZodExactOptional=$constructor("ZodExactOptional",(g,v)=>{$ZodExactOptional.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,D,R)=>optionalProcessor(g,v,D,R),g.unwrap=()=>g._zod.def.innerType});function exactOptional(g){return new ZodExactOptional({type:"optional",innerType:g})}const ZodNullable=$constructor("ZodNullable",(g,v)=>{$ZodNullable.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,D,R)=>nullableProcessor(g,v,D,R),g.unwrap=()=>g._zod.def.innerType});function nullable(g){return new ZodNullable({type:"nullable",innerType:g})}function nullish(g){return optional(nullable(g))}const ZodDefault=$constructor("ZodDefault",(g,v)=>{$ZodDefault.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,D,R)=>defaultProcessor(g,v,D,R),g.unwrap=()=>g._zod.def.innerType,g.removeDefault=g.unwrap});function _default(g,v){return new ZodDefault({type:"default",innerType:g,get defaultValue(){return"function"==typeof v?v():shallowClone(v)}})}const ZodPrefault=$constructor("ZodPrefault",(g,v)=>{$ZodPrefault.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,D,R)=>prefaultProcessor(g,v,D,R),g.unwrap=()=>g._zod.def.innerType});function prefault(g,v){return new ZodPrefault({type:"prefault",innerType:g,get defaultValue(){return"function"==typeof v?v():shallowClone(v)}})}const ZodNonOptional=$constructor("ZodNonOptional",(g,v)=>{$ZodNonOptional.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,D,R)=>nonoptionalProcessor(g,v,D,R),g.unwrap=()=>g._zod.def.innerType});function nonoptional(g,v){return new ZodNonOptional({type:"nonoptional",innerType:g,...normalizeParams(v)})}const ZodSuccess=$constructor("ZodSuccess",(g,v)=>{$ZodSuccess.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,D,R)=>successProcessor(g,v,D),g.unwrap=()=>g._zod.def.innerType});function success(g){return new ZodSuccess({type:"success",innerType:g})}const ZodCatch=$constructor("ZodCatch",(g,v)=>{$ZodCatch.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,D,R)=>catchProcessor(g,v,D,R),g.unwrap=()=>g._zod.def.innerType,g.removeCatch=g.unwrap});function _catch(g,v){return new ZodCatch({type:"catch",innerType:g,catchValue:"function"==typeof v?v:constantCatch(v)})}const ZodNaN=$constructor("ZodNaN",(g,v)=>{$ZodNaN.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,D,R)=>nanProcessor(g,v,D,R)});function nan(g){return _nan(ZodNaN,g)}const ZodPipe=$constructor("ZodPipe",(g,v)=>{$ZodPipe.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,D,R)=>pipeProcessor(g,v,D,R),g.in=v.in,g.out=v.out});function pipe(g,v){return new ZodPipe({type:"pipe",in:g,out:v})}const ZodCodec=$constructor("ZodCodec",(g,v)=>{ZodPipe.init(g,v),$ZodCodec.init(g,v)});function codec(g,v,D){return new ZodCodec({type:"pipe",in:g,out:v,transform:D.decode,reverseTransform:D.encode})}function invertCodec(g){const v=g._zod.def;return new ZodCodec({type:"pipe",in:v.out,out:v.in,transform:v.reverseTransform,reverseTransform:v.transform})}const ZodPreprocess=$constructor("ZodPreprocess",(g,v)=>{ZodPipe.init(g,v),$ZodPreprocess.init(g,v)}),ZodReadonly=$constructor("ZodReadonly",(g,v)=>{$ZodReadonly.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,D,R)=>readonlyProcessor(g,v,D,R),g.unwrap=()=>g._zod.def.innerType});function readonly(g){return new ZodReadonly({type:"readonly",innerType:g})}const ZodTemplateLiteral=$constructor("ZodTemplateLiteral",(g,v)=>{$ZodTemplateLiteral.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,D,R)=>templateLiteralProcessor(g,v,D)});function templateLiteral(g,v){return new ZodTemplateLiteral({type:"template_literal",parts:g,...normalizeParams(v)})}const ZodLazy=$constructor("ZodLazy",(g,v)=>{$ZodLazy.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,D,R)=>lazyProcessor(g,v,D,R),g.unwrap=()=>g._zod.def.getter()});function lazy(g){return new ZodLazy({type:"lazy",getter:g})}const ZodPromise=$constructor("ZodPromise",(g,v)=>{$ZodPromise.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,D,R)=>promiseProcessor(g,v,D,R),g.unwrap=()=>g._zod.def.innerType});function promise(g){return new ZodPromise({type:"promise",innerType:g})}const ZodFunction=$constructor("ZodFunction",(g,v)=>{$ZodFunction.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,D,R)=>functionProcessor(g,v,D,R)});function _function(g){return new ZodFunction({type:"function",input:Array.isArray(g?.input)?tuple(g?.input):g?.input??array(unknown()),output:g?.output??unknown()})}const ZodCustom=$constructor("ZodCustom",(g,v)=>{$ZodCustom.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,D,R)=>customProcessor(g,v,D,R)});function check(g){const v=new $ZodCheck({check:"custom"});return v._zod.check=g,v}function custom(g,v){return _custom(ZodCustom,g??(()=>!0),v)}function refine(g,v={}){return _refine(ZodCustom,g,v)}function superRefine(g,v){return _superRefine(g,v)}const describe=describe$1,meta=meta$1;function _instanceof(g,v={}){const D=new ZodCustom({type:"custom",check:"custom",fn:v=>v instanceof g,abort:!0,...normalizeParams(v)});return D._zod.bag.Class=g,D._zod.check=v=>{v.value instanceof g||v.issues.push({code:"invalid_type",expected:g.name,input:v.value,inst:D,path:[...D._zod.def.path??[]]})},D}const stringbool=(...g)=>_stringbool({Codec:ZodCodec,Boolean:ZodBoolean,String:ZodString},...g);function json$1(g){const v=lazy(()=>union([string$1(g),number$1(),boolean$1(),_null(),array(v),record(string$1(),v)]));return v}function preprocess(g,v){return new ZodPreprocess({type:"pipe",in:transform(g),out:v})}var _schemas=Object.freeze({__proto__:null,ZodAny:ZodAny,ZodArray:ZodArray,ZodBase64:ZodBase64,ZodBase64URL:ZodBase64URL,ZodBigInt:ZodBigInt,ZodBigIntFormat:ZodBigIntFormat,ZodBoolean:ZodBoolean,ZodCIDRv4:ZodCIDRv4,ZodCIDRv6:ZodCIDRv6,ZodCUID:ZodCUID,ZodCUID2:ZodCUID2,ZodCatch:ZodCatch,ZodCodec:ZodCodec,ZodCreditCard:ZodCreditCard,ZodCustom:ZodCustom,ZodCustomStringFormat:ZodCustomStringFormat,ZodDate:ZodDate,ZodDefault:ZodDefault,ZodDiscriminatedUnion:ZodDiscriminatedUnion,ZodE164:ZodE164,ZodEmail:ZodEmail,ZodEmoji:ZodEmoji,ZodEnum:ZodEnum,ZodExactOptional:ZodExactOptional,ZodFile:ZodFile,ZodFunction:ZodFunction,ZodGUID:ZodGUID,ZodIPv4:ZodIPv4,ZodIPv6:ZodIPv6,ZodISODate:ZodISODate,ZodISODateTime:ZodISODateTime,ZodISODuration:ZodISODuration,ZodISOTime:ZodISOTime,ZodIntersection:ZodIntersection,ZodJWT:ZodJWT,ZodKSUID:ZodKSUID,ZodLazy:ZodLazy,ZodLiteral:ZodLiteral,ZodMAC:ZodMAC,ZodMap:ZodMap,ZodNaN:ZodNaN,ZodNanoID:ZodNanoID,ZodNever:ZodNever,ZodNonOptional:ZodNonOptional,ZodNull:ZodNull,ZodNullable:ZodNullable,ZodNumber:ZodNumber,ZodNumberFormat:ZodNumberFormat,ZodObject:ZodObject,ZodOptional:ZodOptional,ZodPipe:ZodPipe,ZodPrefault:ZodPrefault,ZodPreprocess:ZodPreprocess,ZodPromise:ZodPromise,ZodReadonly:ZodReadonly,ZodRecord:ZodRecord,ZodSet:ZodSet,ZodString:ZodString,ZodStringFormat:ZodStringFormat,ZodSuccess:ZodSuccess,ZodSymbol:ZodSymbol,ZodTemplateLiteral:ZodTemplateLiteral,ZodTransform:ZodTransform,ZodTuple:ZodTuple,ZodType:ZodType,ZodULID:ZodULID,ZodURL:ZodURL,ZodUUID:ZodUUID,ZodUndefined:ZodUndefined,ZodUnion:ZodUnion,ZodUnknown:ZodUnknown,ZodVoid:ZodVoid,ZodXID:ZodXID,ZodXor:ZodXor,_ZodString:_ZodString,_default:_default,_function:_function,any:any,array:array,base64:base64,base64url:base64url,bigint:bigint$1,boolean:boolean$1,catch:_catch,check:check,cidrv4:cidrv4,cidrv6:cidrv6,codec:codec,creditCard:creditCard,cuid:cuid,cuid2:cuid2,custom:custom,date:date$2,describe:describe,discriminatedUnion:discriminatedUnion,e164:e164,email:email,emoji:emoji,enum:_enum,exactOptional:exactOptional,file:file,float32:float32,float64:float64,function:_function,guid:guid,hash:hash,hex:hex,hostname:hostname,httpUrl:httpUrl,instanceof:_instanceof,int:int,int32:int32,int64:int64,intersection:intersection,invertCodec:invertCodec,ipv4:ipv4,ipv6:ipv6,json:json$1,jwt:jwt,keyof:keyof,ksuid:ksuid,lazy:lazy,literal:literal,looseObject:looseObject,looseRecord:looseRecord,mac:mac,map:map,meta:meta,nan:nan,nanoid:nanoid,nativeEnum:nativeEnum,never:never,nonoptional:nonoptional,null:_null,nullable:nullable,nullish:nullish,number:number$1,object:object,optional:optional,partialRecord:partialRecord,pipe:pipe,prefault:prefault,preprocess:preprocess,promise:promise,readonly:readonly,record:record,refine:refine,set:set,strictObject:strictObject,string:string$1,stringFormat:stringFormat,stringbool:stringbool,success:success,superRefine:superRefine,symbol:symbol,templateLiteral:templateLiteral,transform:transform,tuple:tuple,uint32:uint32,uint64:uint64,ulid:ulid,undefined:_undefined,union:union,unknown:unknown,url:url,uuid:uuid,uuidv4:uuidv4,uuidv6:uuidv6,uuidv7:uuidv7,void:_void,xid:xid,xor:xor});const ZodIssueCode={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function setErrorMap(g){config({customError:g})}function getErrorMap(){return config().customError}var ZodFirstPartyTypeKind;function datetime(g){return _isoDateTime(ZodISODateTime,g)}function date$1(g){return _isoDate(ZodISODate,g)}function time(g){return _isoTime(ZodISOTime,g)}function duration(g){return _isoDuration(ZodISODuration,g)}ZodFirstPartyTypeKind||(ZodFirstPartyTypeKind={});var _iso=Object.freeze({__proto__:null,ZodISODate:ZodISODate,ZodISODateTime:ZodISODateTime,ZodISODuration:ZodISODuration,ZodISOTime:ZodISOTime,date:date$1,datetime:datetime,duration:duration,time:time});const z$1={..._schemas,..._checks,iso:_iso},RECOGNIZED_KEYS=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function detectVersion(g,v){const D=g.$schema;return"https://json-schema.org/draft/2020-12/schema"===D?"draft-2020-12":"http://json-schema.org/draft-07/schema#"===D?"draft-7":"http://json-schema.org/draft-04/schema#"===D?"draft-4":v??"draft-2020-12"}function applyMinItems(g,v){return g.map((g,D)=>D<v?g:g.optional())}function decodeJSONPointerSegment(g){return g.replace(/~1/g,"/").replace(/~0/g,"~")}function resolveRef(g,v){if(!g.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");const D=g.slice(1).split("/").filter(Boolean);if(0===D.length)return v.rootSchema;const R="draft-2020-12"===v.version?"$defs":"definitions";if(D[0]===R){const R=void 0===D[1]?void 0:decodeJSONPointerSegment(D[1]);if(!R||!v.defs[R])throw new Error(`Reference not found: ${g}`);return v.defs[R]}throw new Error(`Reference not found: ${g}`)}function checkPropertyNames(g,v){return z$1.transform(g=>g).check(g=>{const D=g.value;if("object"==typeof D&&null!==D&&!Array.isArray(D))for(const R of Object.getOwnPropertyNames(D)){const D=v.safeParse(R);D.success||g.issues.push({code:"invalid_key",origin:"record",issues:D.error.issues,input:R,path:[R],continue:!0})}}).pipe(g)}function getTupleRest(g,v){if(!1!==g)return void 0===g||!0===g?z$1.any():convertSchema(g,v)}const fullTime=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function convertBaseSchema(g,v){if(void 0!==g.not){if("object"==typeof g.not&&0===Object.keys(g.not).length)return z$1.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(void 0!==g.unevaluatedItems)throw new Error("unevaluatedItems is not supported");if(void 0!==g.unevaluatedProperties)throw new Error("unevaluatedProperties is not supported");if(void 0!==g.if||void 0!==g.then||void 0!==g.else)throw new Error("Conditional schemas (if/then/else) are not supported");if(void 0!==g.dependentSchemas||void 0!==g.dependentRequired)throw new Error("dependentSchemas and dependentRequired are not supported");if(g.$ref){const D=g.$ref;if(v.refs.has(D))return v.refs.get(D);if(v.processing.has(D))return z$1.lazy(()=>{if(!v.refs.has(D))throw new Error(`Circular reference not resolved: ${D}`);return v.refs.get(D)});v.processing.add(D);const R=convertSchema(resolveRef(D,v),v);return v.refs.set(D,R),v.processing.delete(D),R}if(void 0!==g.enum){const D=g.enum;if("openapi-3.0"===v.version&&!0===g.nullable&&1===D.length&&null===D[0])return z$1.null();if(0===D.length)return z$1.never();if(1===D.length)return z$1.literal(D[0]);if(D.every(g=>"string"==typeof g))return z$1.enum(D);const R=D.map(g=>z$1.literal(g));return R.length<2?R[0]:z$1.union([R[0],R[1],...R.slice(2)])}if(void 0!==g.const)return z$1.literal(g.const);const D=g.type;if(Array.isArray(D)){const R=D.map(D=>convertBaseSchema({...g,type:D},v));return 0===R.length?z$1.never():1===R.length?R[0]:z$1.union(R)}if(!D)return z$1.any();let R;switch(D){case"string":{let v=z$1.string();if(g.format){const D=g.format;"email"===D?v=v.check(z$1.email()):"uri"===D||"uri-reference"===D?v=v.check(z$1.url()):"uuid"===D||"guid"===D?v=v.check(z$1.uuid()):"date-time"===D?v=v.check(z$1.iso.datetime({offset:!0})):"date"===D?v=v.check(z$1.iso.date()):"time"===D?v=v.check(z$1.regex(fullTime)):"duration"===D?v=v.check(z$1.iso.duration()):"hostname"===D?v=v.check(z$1.hostname()):"ipv4"===D?v=v.check(z$1.ipv4()):"ipv6"===D?v=v.check(z$1.ipv6()):"mac"===D?v=v.check(z$1.mac()):"cidr"===D?v=v.check(z$1.cidrv4()):"cidr-v6"===D?v=v.check(z$1.cidrv6()):"base64"===D?v=v.check(z$1.base64()):"base64url"===D?v=v.check(z$1.base64url()):"e164"===D?v=v.check(z$1.e164()):"credit_card"===D?v=v.check(z$1.creditCard()):"jwt"===D?v=v.check(z$1.jwt()):"emoji"===D?v=v.check(z$1.emoji()):"nanoid"===D?v=v.check(z$1.nanoid()):"cuid"===D?v=v.check(z$1.cuid()):"cuid2"===D?v=v.check(z$1.cuid2()):"ulid"===D?v=v.check(z$1.ulid()):"xid"===D?v=v.check(z$1.xid()):"ksuid"===D&&(v=v.check(z$1.ksuid()))}"number"==typeof g.minLength&&(v=v.min(g.minLength)),"number"==typeof g.maxLength&&(v=v.max(g.maxLength)),g.pattern&&(v=v.regex(new RegExp(g.pattern))),R=v;break}case"number":case"integer":{let v="integer"===D?z$1.number().int():z$1.number();"number"==typeof g.minimum&&!0!==g.exclusiveMinimum&&(v=v.min(g.minimum)),"number"==typeof g.maximum&&!0!==g.exclusiveMaximum&&(v=v.max(g.maximum)),"number"==typeof g.exclusiveMinimum?v=v.gt(g.exclusiveMinimum):!0===g.exclusiveMinimum&&"number"==typeof g.minimum&&(v=v.gt(g.minimum)),"number"==typeof g.exclusiveMaximum?v=v.lt(g.exclusiveMaximum):!0===g.exclusiveMaximum&&"number"==typeof g.maximum&&(v=v.lt(g.maximum)),"number"==typeof g.multipleOf&&(v=v.multipleOf(g.multipleOf)),R=v;break}case"boolean":R=z$1.boolean();break;case"null":R=z$1.null();break;case"object":{const D={},q=g.properties||{},ie=new Set(g.required||[]),se="object"==typeof g.additionalProperties?convertSchema(g.additionalProperties,v):void 0;for(const[g,R]of Object.entries(q)){const q=convertSchema(R,v);assignProp(D,g,ie.has(g)?q:q.optional())}if(g.patternProperties){const q=g.patternProperties,ie=Object.keys(q),se=[];for(const g of ie){const D=convertSchema(q[g],v),R=z$1.string().regex(new RegExp(g));se.push(z$1.looseRecord(R,D))}const ce=[];if(Object.keys(D).length>0&&ce.push(z$1.object(D).passthrough()),ce.push(...se),0===ce.length)R=z$1.object({}).passthrough();else if(1===ce.length)R=ce[0];else{let g=z$1.intersection(ce[0],ce[1]);for(let v=2;v<ce.length;v++)g=z$1.intersection(g,ce[v]);R=g}if(!1===g.additionalProperties){const g=Object.keys(D),v=ie.map(g=>new RegExp(g)),q=R;R=R.check(D=>{if(!isPlainObject(D.value))return;const R=[];for(const q of Object.keys(D.value))g.includes(q)||v.some(g=>g.test(q))||R.push(q);R.length&&D.issues.push({code:"unrecognized_keys",keys:R,input:D.value,inst:q})})}}else{const v=z$1.object(D);R=!1===g.additionalProperties?v.strict():se?v.catchall(se):v.passthrough()}if(void 0!==g.propertyNames&&!0!==g.propertyNames){R=checkPropertyNames(R,convertSchema("object"==typeof g.propertyNames&&void 0===g.propertyNames.type?{type:"string",...g.propertyNames}:g.propertyNames,v))}break}case"array":{const D=g.prefixItems,q=g.items;if(D&&Array.isArray(D)){const ie="number"==typeof g.minItems?g.minItems:0,se=applyMinItems(D.map(g=>convertSchema(g,v)),ie),ce=Array.isArray(q)?void 0:getTupleRest(q,v),le=z$1.tuple(se);R=ce?le.rest(ce):le,"number"==typeof g.minItems&&(R=R.check(z$1.minLength(g.minItems))),"number"==typeof g.maxItems&&(R=R.check(z$1.maxLength(g.maxItems)))}else if(Array.isArray(q)){const D="number"==typeof g.minItems?g.minItems:0,ie=applyMinItems(q.map(g=>convertSchema(g,v)),D),se=getTupleRest(g.additionalItems,v),ce=z$1.tuple(ie);R=se?ce.rest(se):ce,"number"==typeof g.minItems&&(R=R.check(z$1.minLength(g.minItems))),"number"==typeof g.maxItems&&(R=R.check(z$1.maxLength(g.maxItems)))}else if(void 0!==q){const D=convertSchema(q,v);let ie=z$1.array(D);"number"==typeof g.minItems&&(ie=ie.min(g.minItems)),"number"==typeof g.maxItems&&(ie=ie.max(g.maxItems)),R=ie}else R=z$1.array(z$1.any());break}default:throw new Error(`Unsupported type: ${D}`)}return R}function convertSchema(g,v){if("boolean"==typeof g)return g?z$1.any():z$1.never();let D=convertBaseSchema(g,v);const R=g.type||void 0!==g.enum||void 0!==g.const;if(g.anyOf&&Array.isArray(g.anyOf)){const q=g.anyOf.map(g=>convertSchema(g,v)),ie=z$1.union(q);D=R?z$1.intersection(D,ie):ie}if(g.oneOf&&Array.isArray(g.oneOf)){const q=g.oneOf.map(g=>convertSchema(g,v)),ie=z$1.xor(q);D=R?z$1.intersection(D,ie):ie}if(g.allOf&&Array.isArray(g.allOf))if(0===g.allOf.length)D=R?D:z$1.any();else{let q=R?D:convertSchema(g.allOf[0],v);for(let D=R?0:1;D<g.allOf.length;D++)q=z$1.intersection(q,convertSchema(g.allOf[D],v));D=q}!0===g.nullable&&"openapi-3.0"===v.version&&(D=z$1.nullable(D)),!0===g.readOnly&&(D=z$1.readonly(D)),void 0!==g.default&&(D=D.default(g.default));const q={},ie=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(const v of ie)v in g&&(q[v]=g[v]);const se=["contentEncoding","contentMediaType","contentSchema"];for(const v of se)v in g&&(q[v]=g[v]);void 0!==g.propertyNames&&"object"===g.type&&void 0===g.$ref&&(q.propertyNames=g.propertyNames);for(const v of Object.keys(g))RECOGNIZED_KEYS.has(v)||assignProp(q,v,g[v]);return Object.keys(q).length>0&&v.registry.add(D,q),g.description&&(D=D.describe(g.description)),D}function fromJSONSchema(g,v){if("boolean"==typeof g)return g?z$1.any():z$1.never();let D;try{D=JSON.parse(JSON.stringify(g))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}return convertSchema(D,{version:detectVersion(D,v?.defaultTarget),defs:D.$defs||D.definitions||{},refs:new Map,processing:new Set,rootSchema:D,registry:v?.registry??globalRegistry})}const RESOLVING=Symbol("z.visit/resolving");function visit(g,v){const D="function"==typeof v?v:(g,D)=>{const R=v[g._zod.def.type];return R?R(g,D):g},R=new Map;function run(g){const v=R.get(g);if(v===RESOLVING)return new $ZodLazy({type:"lazy",getter:()=>R.get(g)});if(void 0!==v)return v;R.set(g,RESOLVING);const q=function mapInner(g){const v=g._zod.def;switch(v.type){case"object":{const D=v.shape,R=Object.keys(D);let q=!1;const ie={};for(const g of R){const v=run(D[g]);v!==D[g]&&(q=!0),ie[g]=v}let se=v.catchall;return v.catchall&&(se=run(v.catchall),se!==v.catchall&&(q=!0)),q?clone(g,{...v,shape:ie,catchall:se}):g}case"array":{const D=run(v.element);return D===v.element?g:clone(g,{...v,element:D})}case"tuple":{const D=v.items;let R=!1;const q=[];for(const g of D){const v=run(g);v!==g&&(R=!0),q.push(v)}let ie=v.rest;return v.rest&&(ie=run(v.rest),ie!==v.rest&&(R=!0)),R?clone(g,{...v,items:q,rest:ie}):g}case"record":case"map":{const D=run(v.keyType),R=run(v.valueType);return D===v.keyType&&R===v.valueType?g:clone(g,{...v,keyType:D,valueType:R})}case"set":{const D=run(v.valueType);return D===v.valueType?g:clone(g,{...v,valueType:D})}case"union":{const D=v.options;let R=!1;const q=[];for(const g of D){const v=run(g);v!==g&&(R=!0),q.push(v)}return R?clone(g,{...v,options:q}):g}case"intersection":{const D=run(v.left),R=run(v.right);return D===v.left&&R===v.right?g:clone(g,{...v,left:D,right:R})}case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":{const D=run(v.innerType);return D===v.innerType?g:clone(g,{...v,innerType:D})}case"pipe":{const D=run(v.in),R=run(v.out);return D===v.in&&R===v.out?g:clone(g,{...v,in:D,out:R})}case"function":{const D=run(v.input),R=run(v.output);return D===v.input&&R===v.output?g:clone(g,{...v,input:D,output:R})}case"lazy":{const D=v.getter,{_cachedInner:R,...q}=v;return clone(g,{...q,getter:()=>run(D())})}default:return g}}(g),ie=D(q,q!==g);return R.set(g,ie),ie}return run(g)}function deepPartial(g){return visit(g,{object:g=>g.partial(),union:g=>{const v=g._zod.def;return void 0===v.discriminator?g:union(v.options)}})}function withChecks(g,v){if(!v?.length)return g;const D=g._zod.def;return clone(g,mergeDefs(D,{checks:[...D.checks??[],...v]}),{parent:!0})}function outSide(g){return withChecks(g.out,g.checks)}function inSide(g){return g.in._zod.traits.has("$ZodTransform")?outSide(g):g.in}function input(g){return visit(g,{pipe:g=>inSide(g._zod.def),default:(g,v)=>v?optional(g._zod.def.innerType):g,catch:(g,v)=>v?g._zod.def.innerType:g})}function output(g){return visit(g,{pipe:g=>outSide(g._zod.def),prefault:(g,v)=>v?g._zod.def.innerType:g})}function string(g){return _coercedString(ZodString,g)}function number(g){return _coercedNumber(ZodNumber,g)}function boolean(g){return _coercedBoolean(ZodBoolean,g)}function bigint(g){return _coercedBigint(ZodBigInt,g)}function date(g){return _coercedDate(ZodDate,g)}var coerce=Object.freeze({__proto__:null,bigint:bigint,boolean:boolean,date:date,number:number,string:string}),z=Object.freeze({__proto__:null,$brand:$brand,$input:$input,$output:$output,NEVER:NEVER,TimePrecision:TimePrecision,ZodAny:ZodAny,ZodArray:ZodArray,ZodBase64:ZodBase64,ZodBase64URL:ZodBase64URL,ZodBigInt:ZodBigInt,ZodBigIntFormat:ZodBigIntFormat,ZodBoolean:ZodBoolean,ZodCIDRv4:ZodCIDRv4,ZodCIDRv6:ZodCIDRv6,ZodCUID:ZodCUID,ZodCUID2:ZodCUID2,ZodCatch:ZodCatch,ZodCodec:ZodCodec,ZodCompileAsyncError:ZodCompileAsyncError,ZodCompileUnsupportedError:ZodCompileUnsupportedError,ZodCreditCard:ZodCreditCard,ZodCustom:ZodCustom,ZodCustomStringFormat:ZodCustomStringFormat,ZodDate:ZodDate,ZodDefault:ZodDefault,ZodDiscriminatedUnion:ZodDiscriminatedUnion,ZodE164:ZodE164,ZodEmail:ZodEmail,ZodEmoji:ZodEmoji,ZodEnum:ZodEnum,ZodError:ZodError,ZodExactOptional:ZodExactOptional,ZodFile:ZodFile,get ZodFirstPartyTypeKind(){return ZodFirstPartyTypeKind},ZodFunction:ZodFunction,ZodGUID:ZodGUID,ZodIPv4:ZodIPv4,ZodIPv6:ZodIPv6,ZodISODate:ZodISODate,ZodISODateTime:ZodISODateTime,ZodISODuration:ZodISODuration,ZodISOTime:ZodISOTime,ZodIntersection:ZodIntersection,ZodIssueCode:ZodIssueCode,ZodJWT:ZodJWT,ZodKSUID:ZodKSUID,ZodLazy:ZodLazy,ZodLiteral:ZodLiteral,ZodMAC:ZodMAC,ZodMap:ZodMap,ZodNaN:ZodNaN,ZodNanoID:ZodNanoID,ZodNever:ZodNever,ZodNonOptional:ZodNonOptional,ZodNull:ZodNull,ZodNullable:ZodNullable,ZodNumber:ZodNumber,ZodNumberFormat:ZodNumberFormat,ZodObject:ZodObject,ZodOptional:ZodOptional,ZodPipe:ZodPipe,ZodPrefault:ZodPrefault,ZodPreprocess:ZodPreprocess,ZodPromise:ZodPromise,ZodReadonly:ZodReadonly,ZodRealError:ZodRealError,ZodRecord:ZodRecord,ZodSet:ZodSet,ZodString:ZodString,ZodStringFormat:ZodStringFormat,ZodSuccess:ZodSuccess,ZodSymbol:ZodSymbol,ZodTemplateLiteral:ZodTemplateLiteral,ZodTransform:ZodTransform,ZodTuple:ZodTuple,ZodType:ZodType,ZodULID:ZodULID,ZodURL:ZodURL,ZodUUID:ZodUUID,ZodUndefined:ZodUndefined,ZodUnion:ZodUnion,ZodUnknown:ZodUnknown,ZodVoid:ZodVoid,ZodXID:ZodXID,ZodXor:ZodXor,_ZodString:_ZodString,_default:_default,_function:_function,any:any,array:array,base64:base64,base64url:base64url,bigint:bigint$1,boolean:boolean$1,catch:_catch,check:check,cidrv4:cidrv4,cidrv6:cidrv6,clone:clone,codec:codec,coerce:coerce,compile:compile,config:config,core:index,creditCard:creditCard,cuid:cuid,cuid2:cuid2,custom:custom,date:date$2,decode:decode,decodeAsync:decodeAsync,deepPartial:deepPartial,describe:describe,discriminatedUnion:discriminatedUnion,e164:e164,email:email,emoji:emoji,encode:encode,encodeAsync:encodeAsync,endsWith:_endsWith,enum:_enum,exactOptional:exactOptional,file:file,flattenError:flattenError,float32:float32,float64:float64,formatError:formatError,fromJSONSchema:fromJSONSchema,function:_function,getDiscriminatedOption:getDiscriminatedOption,getErrorMap:getErrorMap,globalRegistry:globalRegistry,gt:_gt,gte:_gte,guid:guid,hash:hash,hex:hex,hostname:hostname,httpUrl:httpUrl,includes:_includes,input:input,instanceof:_instanceof,int:int,int32:int32,int64:int64,intersection:intersection,invertCodec:invertCodec,ipv4:ipv4,ipv6:ipv6,iso:_iso,json:json$1,jwt:jwt,keyof:keyof,ksuid:ksuid,lazy:lazy,length:_length,literal:literal,locales:index$1,looseObject:looseObject,looseRecord:looseRecord,lowercase:_lowercase,lt:_lt,lte:_lte,mac:mac,map:map,maxLength:_maxLength,maxSize:_maxSize,memoizer:memoizer,meta:meta,mime:_mime,minLength:_minLength,minSize:_minSize,multipleOf:_multipleOf,nan:nan,nanoid:nanoid,nativeEnum:nativeEnum,negative:_negative,never:never,nonnegative:_nonnegative,nonoptional:nonoptional,nonpositive:_nonpositive,normalize:_normalize,null:_null,nullable:nullable,nullish:nullish,number:number$1,object:object,optional:optional,output:output,overwrite:_overwrite,parse:parse,parseAsync:parseAsync,partialRecord:partialRecord,pipe:pipe,positive:_positive,prefault:prefault,preprocess:preprocess,prettifyError:prettifyError,promise:promise,properties:_properties,property:_property,readonly:readonly,record:record,refine:refine,regex:_regex,regexes:regexes,registry:registry,safeDecode:safeDecode,safeDecodeAsync:safeDecodeAsync,safeEncode:safeEncode,safeEncodeAsync:safeEncodeAsync,safeParse:safeParse,safeParseAsync:safeParseAsync,set:set,setErrorMap:setErrorMap,size:_size,slugify:_slugify,startsWith:_startsWith,strictObject:strictObject,string:string$1,stringFormat:stringFormat,stringbool:stringbool,success:success,superRefine:superRefine,symbol:symbol,templateLiteral:templateLiteral,toJSONSchema:toJSONSchema,toLowerCase:_toLowerCase,toUpperCase:_toUpperCase,toZod:toZod,transform:transform,treeifyError:treeifyError,trim:_trim,tuple:tuple,uint32:uint32,uint64:uint64,ulid:ulid,undefined:_undefined,union:union,unknown:unknown,uppercase:_uppercase,url:url,util:util,uuid:uuid,uuidv4:uuidv4,uuidv6:uuidv6,uuidv7:uuidv7,validate:validate,validateAsync:validateAsync,void:_void,xid:xid,xor:xor}),NUMBER_FORMATS=new Set(["int32","uint32","float32","float64","safeint"]);function checkRef(g,v){if("$ref"in g){const D=lazy(()=>string$1());return v.$refs.push([D,g.$ref]),D}return!1}var getCustomChecks=(g,v,D)=>{if("checks"in v&&D.checks)for(const R of v.checks)g=g.check(D.checks[R.name]);return g},getError=(g,v)=>"string"==typeof g.error?g.error:g.error&&v.errors?{error:v.errors[g.error.key]}:void 0,d=dezerializeRefs,dezerializers={function:(g,v)=>{const D=_function({input:d(g.input,v),output:d(g.output,v)});return getCustomChecks(D,g,v)},number:(g,v)=>{const D=g.format&&NUMBER_FORMATS.has(g.format)?"safeint"===g.format?"int":g.format:"number";let R=g.coerce?number(getError(g,v)):z[D](getError(g,v));return void 0!==g.min&&(R=g.minInclusive?R.min(g.min):R.gt(g.min)),void 0!==g.max&&(R=g.maxInclusive?R.max(g.max):R.lt(g.max)),void 0!==g.multipleOf&&(R=R.multipleOf(g.multipleOf)),getCustomChecks(R,g,v)},string:(g,v)=>{let D=g.coerce?string(getError(g,v)):string$1(getError(g,v));return void 0!==g.min&&(D=D.min(g.min)),void 0!==g.max&&(D=D.max(g.max)),void 0!==g.length&&(D=D.length(g.length)),void 0!==g.startsWith&&(D=D.startsWith(g.startsWith)),void 0!==g.endsWith&&(D=D.endsWith(g.endsWith)),void 0!==g.toLowerCase&&(D=D.toLowerCase()),void 0!==g.toUpperCase&&(D=D.toUpperCase()),void 0!==g.trim&&(D=D.trim()),"includes"in g&&(D=D.includes(g.includes,{position:g.position})),"regex"in g&&(D=D.regex(new RegExp(g.regex,g.flags))),"kind"in g&&("ip"==g.kind?D="v6"==g.version?ipv6():ipv4():"cidr"==g.kind?D="v6"===g.version?cidrv6():cidrv4():"uuid"==g.kind?D=uuid({version:g.version}):"datetime"==g.kind?D=datetime({offset:g.offset,precision:g.precision,local:g.local}):"time"==g.kind?D=time({precision:g.precision}):"duration"===g.kind||"date"===g.kind?D=_iso[g.kind]():"jwt"===g.kind?D="algorithm"in g?jwt({alg:g.algorithm}):jwt():"email"==g.kind?D="pattern"in g&&g.pattern?email({pattern:new RegExp(g.pattern,g.flags)}):email():"nanoid"===g.kind?D="length"in g?nanoid({length:g.length}):nanoid():"credit_card"===g.kind?D=creditCard():"json_string"!==g.kind&&(D=z[g.kind]())),getCustomChecks(D,g,v)},boolean:(g,v)=>getCustomChecks(g.coerce?boolean(getError(g,v)):boolean$1(getError(g,v)),g,v),nan:(g,v)=>getCustomChecks(nan(getError(g,v)),g,v),bigInt:(g,v)=>{const D=g.format&&["uint64","int64"].includes(g.format)?g.format:"bigint";let R=g.coerce?bigint(getError(g,v)):z[D](getError(g,v));if(void 0!==g.min){const v=BigInt(g.min);R=g.minInclusive?R.min(v):R.gt(v)}if(void 0!==g.max){const v=BigInt(g.max);R=g.maxInclusive?R.max(v):R.lt(v)}if(void 0!==g.multipleOf){const v=BigInt(g.multipleOf);R=R.multipleOf(v)}return getCustomChecks(R,g,v)},file:(g,v)=>{let D=file(getError(g,v));return g.max&&(D=D.max(g.max)),g.min&&(D=D.min(g.min)),g.mime&&(D=D.mime(g.mime)),getCustomChecks(D,g,v)},date:(g,v)=>{let D=g.coerce?date(getError(g,v)):date$2(getError(g,v));return void 0!==g.min&&(D=D.min(new Date(g.min))),void 0!==g.max&&(D=D.max(new Date(g.max))),getCustomChecks(D,g,v)},undefined:(g,v)=>getCustomChecks(_undefined(getError(g,v)),g,v),null:(g,v)=>getCustomChecks(_null(getError(g,v)),g,v),any:(g,v)=>getCustomChecks(any(),g,v),unknown:(g,v)=>getCustomChecks(unknown(),g,v),never:(g,v)=>getCustomChecks(never(getError(g,v)),g,v),void:(g,v)=>getCustomChecks(_void(getError(g,v)),g,v),literal:(g,v)=>getCustomChecks(literal(g.values,getError(g,v)),g,v),templateLiteral:(g,v)=>{const D=getError(g,v);return getCustomChecks(templateLiteral(g.parts.map((g,D)=>{if("string"==typeof g)return g;return checkRef(g,v)||d(g,{...v,path:v.path+"/parts/"+D})}),"string"==typeof D?D:{...D,...g.format?{format:g.format}:{}}),g,v)},symbol:(g,v)=>getCustomChecks(symbol(getError(g,v)),g,v),tuple:(g,v)=>{let D=tuple(g.items.map((g,D)=>checkRef(g,v)||d(g,{...v,path:v.path+"/items/"+D})),getError(g,v));if(g.rest){const R=checkRef(g.rest,v)||d(g.rest,{...v,path:v.path+"/rest"});D=D.rest(R)}return v.pathToSchema.set(v.path,D),getCustomChecks(D,g,v)},set:(g,v)=>{let D=set(checkRef(g.value,v)||d(g.value,{...v,path:v.path+"/value"}),getError(g,v));return void 0!==g.minSize&&(D=D.min(g.minSize)),void 0!==g.maxSize&&(D=D.max(g.maxSize)),v.pathToSchema.set(v.path,D),getCustomChecks(D,g,v)},array:(g,v)=>{let D=array(checkRef(g.element,v)||d(g.element,{...v,path:v.path+"/element"}),getError(g,v));return void 0!==g.minLength&&(D=D.min(g.minLength)),void 0!==g.maxLength&&(D=D.max(g.maxLength)),v.pathToSchema.set(v.path,D),getCustomChecks(D,g,v)},object:(g,v)=>{let D=object({...Object.fromEntries(Object.entries(g.properties).map(([g,D])=>[g,checkRef(D,v)||d(D,{...v,path:v.path+"/properties/"+g})])),...Object.fromEntries(Object.entries(g.symbols??{}).map(([g,D])=>{if(!v.symbols)throw new Error("A symbol key was specified, but no `symbols` option was found");if(!(g in v.symbols))throw new Error("A symbol key was specified and a `symbols` option was found, but not at the specified index.");return[v.symbols[Number(g)],checkRef(D,v)||d(D,{...v,path:v.path+"/symbols/"+g})]}))},getError(g,v));return g.catchall&&(D=D.catchall(d(g.catchall,v))),v.pathToSchema.set(v.path,D),getCustomChecks(D,g,v)},record:(g,v)=>{const D=record(checkRef(g.key,v)||d(g.key,{...v,path:v.path+"/key"}),checkRef(g.value,v)||d(g.value,{...v,path:v.path+"/value"}),getError(g,v));return v.pathToSchema.set(v.path,D),getCustomChecks(D,g,v)},looseRecord:(g,v)=>{const D=looseRecord(checkRef(g.key,v)||d(g.key,{...v,path:v.path+"/key"}),checkRef(g.value,v)||d(g.value,{...v,path:v.path+"/value"}),getError(g,v));return v.pathToSchema.set(v.path,D),getCustomChecks(D,g,v)},map:(g,v)=>{let D=map(checkRef(g.key,v)||d(g.key,{...v,path:v.path+"/key"}),checkRef(g.value,v)||d(g.value,{...v,path:v.path+"/value"}),getError(g,v));return"min"in g&&void 0!==g.min&&(D=D.min(g.min)),"max"in g&&void 0!==g.max&&(D=D.max(g.max)),v.pathToSchema.set(v.path,D),getCustomChecks(D,g,v)},enum:(g,v)=>getCustomChecks(_enum(g.values,getError(g,v)),g,v),union:(g,v)=>{const D=union(g.options.map((g,D)=>checkRef(g,v)||d(g,{...v,path:v.path+"/options/"+D})),getError(g,v));return v.pathToSchema.set(v.path,D),getCustomChecks(D,g,v)},discriminatedUnion:(g,v)=>{const D=discriminatedUnion(g.discriminator,g.options.map((g,D)=>checkRef(g,v)||d(g,{...v,path:v.path+"/options/"+D})),getError(g,v));return v.pathToSchema.set(v.path,D),getCustomChecks(D,g,v)},xor:(g,v)=>{const D=xor(g.options.map((g,D)=>checkRef(g,v)||d(g,{...v,path:v.path+"/options/"+D})),getError(g,v));return v.pathToSchema.set(v.path,D),getCustomChecks(D,g,v)},intersection:(g,v)=>{const D=intersection(checkRef(g.left,v)||d(g.left,{...v,path:v.path+"/left"}),checkRef(g.right,v)||d(g.right,{...v,path:v.path+"/right"}));return v.pathToSchema.set(v.path,D),getCustomChecks(D,g,v)},promise:(g,v)=>{const D=promise(checkRef(g.value,v)||d(g.value,{...v,path:v.path+"/value"}));return v.pathToSchema.set(v.path,D),getCustomChecks(D,g,v)},catch:(g,v)=>{let D=checkRef(g.innerType,v)||d(g.innerType,{...v,path:v.path+"/innerType"});return D=D.catch(g.value),v.pathToSchema.set(v.path,D),getCustomChecks(D,g,v)},transform:(g,v)=>{if(!v.transforms||!(g.name in v.transforms))throw new Error("Must supply transforms for the given transform name, "+g.name);return getCustomChecks(transform(v.transforms[g.name]),g,v)},codec:(g,v)=>{const D=v.codecs?.[g.name];if(!D)throw new Error("Must supply a codec for the given codec name, "+g.name);return getCustomChecks(codec(d(g.input,{...v,path:v.path+"/input"}),d(g.output,{...v,path:v.path+"/output"}),D),g,v)},instanceof:(g,v)=>{const D=v.instances?.[g.name];if(!D)throw new Error("Must supply an instance constructor for the given name, "+g.name);const R=getError(g,v);return _instanceof(D,"string"==typeof R?{error:R}:R)},pipe:(g,v)=>{if("truthy"in g)return stringbool({truthy:g.truthy,falsy:g.falsy});const D=checkRef(g.inner,v)||d(g.inner,{...v,path:v.path+"/inner"});return getCustomChecks(D.pipe(d(g.outer,{...v,path:v.path+"/outer"})),g,v)}},es6,hasRequiredEs6;function dezerializeRefs(g,v){if("isOptional"in g){const{isOptional:D,...R}=g,q=d(R,v),ie=D?q.optional():q;return v.pathToSchema.set(v.path,ie),ie}if("isNullable"in g){const{isNullable:D,...R}=g,q=d(R,v),ie=D?q.nullable():q;return v.pathToSchema.set(v.path,ie),ie}if("defaultValue"in g){const{defaultValue:D,...R}=g,q=d(R,v).default("bigInt"===g.type?BigInt(D):"date"===g.type?new Date(D):D);return v.pathToSchema.set(v.path,q),q}if("readonly"in g){const{readonly:D,...R}=g,q=d(R,v),ie=D?q.readonly():q;return v.pathToSchema.set(v.path,ie),ie}if("description"in g&&"string"==typeof g.description){const{description:D,...R}=g,q=d(R,v).meta({description:D});return v.pathToSchema.set(v.path,q),q}if("meta"in g&&g.meta){const{meta:D,...R}=g,q=d(R,v).meta(D);return v.pathToSchema.set(v.path,q),q}return dezerializers[g.type](g,v)}function resolvePointer(g,v){return v.split("/").slice(1).reduce((g,v)=>void 0===g?g:g[v.replace(/~1/g,"/").replace(/~0/g,"~")],g)}function dezerialize(g,v={}){"path"in v||(v.path="#"),"pathToSchema"in v||(v.pathToSchema=new Map),"$refs"in v||(v.$refs=[]),"originalShape"in v||(v.originalShape=g);const D=v,R=dezerializeRefs(g,D);for(const[g,v]of D.$refs)g._zod.def.getter=()=>{const g=D.pathToSchema.get(v);if(g)return g;const R=dezerialize(resolvePointer(D.originalShape,v),D);return D.pathToSchema.set(v,R),R};return R}function requireEs6(){return hasRequiredEs6||(hasRequiredEs6=1,es6=function equal(g,v){if(g===v)return!0;if(g&&v&&"object"==typeof g&&"object"==typeof v){if(g.constructor!==v.constructor)return!1;var D,R,q;if(Array.isArray(g)){if((D=g.length)!=v.length)return!1;for(R=D;0!==R--;)if(!equal(g[R],v[R]))return!1;return!0}if(g instanceof Map&&v instanceof Map){if(g.size!==v.size)return!1;for(R of g.entries())if(!v.has(R[0]))return!1;for(R of g.entries())if(!equal(R[1],v.get(R[0])))return!1;return!0}if(g instanceof Set&&v instanceof Set){if(g.size!==v.size)return!1;for(R of g.entries())if(!v.has(R[0]))return!1;return!0}if(ArrayBuffer.isView(g)&&ArrayBuffer.isView(v)){if((D=g.length)!=v.length)return!1;for(R=D;0!==R--;)if(g[R]!==v[R])return!1;return!0}if(g.constructor===RegExp)return g.source===v.source&&g.flags===v.flags;if(g.valueOf!==Object.prototype.valueOf)return g.valueOf()===v.valueOf();if(g.toString!==Object.prototype.toString)return g.toString()===v.toString();if((D=(q=Object.keys(g)).length)!==Object.keys(v).length)return!1;for(R=D;0!==R--;)if(!Object.prototype.hasOwnProperty.call(v,q[R]))return!1;for(R=D;0!==R--;){var ie=q[R];if(!equal(g[ie],v[ie]))return!1}return!0}return g!=g&&v!=v}),es6}var es6Exports=requireEs6(),deepEqual=getDefaultExportFromCjs(es6Exports);const unescapeJSONPointerPart=g=>g.replaceAll(/~([01])/gu,(g,v)=>"0"===v?"~":"/"),getJSONPointerParts=g=>g.split("/").slice(1).map(g=>unescapeJSONPointerPart(g)),reduceJSONPointerParts=(g,v)=>{if(!Object.hasOwn(g,v))throw new TypeError("Path part not found in object");return g=g[v]},resolveJSONPointer=({path:g,obj:v})=>getJSONPointerParts(g).reduce((g,v)=>reduceJSONPointerParts(g,v),v),typesonPathToJSONPointer=g=>g?"/"+g.split(".").map(g=>g.replaceAll("~1",".").replaceAll("/","~1")).join("/"):g;function copyObject(g){const v=Array.isArray(g)?[]:{};for(const[D,R]of Object.entries(g))v[D]=R&&"object"==typeof R?copyObject(R):R;return v}class FileList{constructor(g){this._files=g,this.length=this._files.length}item(g){return this._files[g]}get[Symbol.toStringTag](){return"FileList"}}const zodexToStructuredCloningTypeMap=new Map([["boolean","boolean"],["number","number"],["nan","nan"],["bigInt","bigint"],["string","string"],["date","date"],["file","file"],["undefined","undef"],["void","undef"],["null","null"],["array","arrayNonindexKeys"],["object","object"],["tuple","array"],["record","object"],["looseRecord","object"],["map","map"],["set","set"],["promise","promise"],["function","function"]]);function getValueType(g){if(null===g)return"null";switch(typeof g){case"undefined":return"undef";case"bigint":return"bigint";case"boolean":return"boolean";case"number":return"number";case"string":return"string";default:return}}function splitConstrainedSchema(g){const v="literal"===g.type?g.values:Object.values(g.values),D=new Set(v.map(g=>getValueType(g)));return new Set([...D].flatMap(D=>{if(!D)return[];const R=v.filter(g=>getValueType(g)===D),{defaultValue:q}=g;return[{...g,values:"literal"===g.type?R:Object.fromEntries(Object.entries(g.values).filter(([,g])=>getValueType(g)===D)),defaultValue:R.includes(q)?q:R[0]}]}))}function getCheckedType(g){return g.checks?.[0]?.name}function isStringboolSchema(g){return"pipe"===g.type&&"string"===g.inner?.type&&"boolean"===g.outer?.type&&"case"in g&&"falsy"in g&&"truthy"in g}function getSchemaType(g){return isStringboolSchema(g)?"string":"codec"===g.type&&"filelist"===g.name?"filelist":"instanceof"===g.type?g.name:"literal"===g.type?getValueType(g.values[0]):"enum"===g.type?getValueType(Object.values(g.values)[0]):"templateLiteral"===g.type?"string":getCheckedType(g)??zodexToStructuredCloningTypeMap.get(g.type)}const dezerializerInstances={filelist:FileList},dezerializerCodecs={filelist:{decode:g=>Array.from({length:g.length},(v,D)=>g.item(D)),encode:g=>new FileList(g)}};function parseValue(g,v,D,R){return dezerialize(v,{checks:getChecks(g),codecs:dezerializerCodecs,instances:dezerializerInstances,originalShape:D}).safeParse(R)}function getInvalidIntersectionBranch(g,v,D,R){return"intersection"===v.type?getInvalidIntersectionBranch(g,v.left,D,R)??getInvalidIntersectionBranch(g,v.right,D,R):parseValue(g,v,D,R).success?void 0:v}function recordKeyConforms(g,v,D){return!v||void 0===D||(!!parseValue(g,v,v,D).success||"string"==typeof D&&""!==D.trim()&&Number.isFinite(Number(D))&&parseValue(g,v,v,Number(D)).success)}function getXorBranchMatchInfo(g,v,D){const R=v.options??[];let q=0;for(const ie of R)parseValue(g,ie,v,D).success&&q++;return{matched:q,total:R.length}}function valueMatchesSchema(g,v,D){return parseValue(g,v,v,D).success}function getChecks(g){return Object.fromEntries(Object.entries(g.availableTypes).map(([g,v])=>[g,D=>{Array.isArray(v)||!v.valueMatch||v.valueMatch(D.value)||D.issues.push({code:"custom",input:D.value,message:`Value does not match ${g}`})}]))}const intersectionSchemas=new WeakMap,originalSchemas=new WeakMap;function rememberOriginalSchema(g,v){for(const D of g)originalSchemas.set(D,v);return g}function getValidationSchema(g){return intersectionSchemas.get(g)??g}function getComparableConstraint(g,v){return"bigInt"===g?BigInt(v):v}function mergeMeta(g,v){const D={...g};for(const[g,R]of Object.entries(v))"title"===g||"description"===g?"string"==typeof R&&"Modifiers"!==R&&(D[g]="string"==typeof D[g]&&"Modifiers"!==D[g]?D[g]+" and "+R:R):Object.hasOwn(D,g)||(D[g]=R&&"object"==typeof R?copyObject(R):R);return D}function mergeSchema(g,v){if(g.type!==v.type)throw new Error("Cannot merge intersection types "+g.type+" and "+v.type);const D=copyObject(g);for(const[R,q]of Object.entries(v))if("type"!==R&&"properties"!==R&&"error"!==R)if("description"===R){if("Modifiers"!==q){const g=D[R];D[R]=g?g+" and "+q:q}}else if("meta"===R)D.meta=mergeMeta(D.meta,q);else if(Object.hasOwn(D,R)){if(D[R]!==q&&!deepEqual(D[R],q)){if("object"===g.type)throw new Error("Duplicate property "+R+" of value "+JSON.stringify(q)+" and "+JSON.stringify(D[R]));if("min"===R||"minLength"===R){const ie=getComparableConstraint(g.type,D[R]),se=getComparableConstraint(v.type,q);D[R]=ie>se?D[R]:q}else if("max"===R||"maxLength"===R){const ie=getComparableConstraint(g.type,D[R]),se=getComparableConstraint(v.type,q);D[R]=ie<se?D[R]:q}}}else D[R]=q&&"object"==typeof q?copyObject(q):q;if("object"!==g.type||"object"!==v.type)return delete D.error,D;for(const[g,R]of Object.entries(v.properties)){if("string"!=typeof D.properties&&Object.hasOwn(D.properties,g)){if(deepEqual(D.properties[g],R))continue;throw new Error("Duplicate property "+g+" of value "+JSON.stringify(R)+" and "+JSON.stringify(D.properties[g]))}D.properties[g]=R&&"object"==typeof R?copyObject(R):R}return D}function flattenIntersection(g,v){const D=[...g],R=[...v],q=[];for(const g of D)for(const v of R)q.push(mergeSchema(g,v));return q}let unionGroupID=0;function addModifiers(g,v){if("defaultValue"in g){unionGroupID++;for(const D of v)D.$unionGroupID=unionGroupID,D.$defaultValue=g.defaultValue}if(g.isNullable&&v.push({type:"null"}),g.isOptional)for(const D of v)"isOptional"in D||(D.isOptional=g.isOptional);if(g.readonly)for(const D of v)"readonly"in D||(D.$readonlyParent=g.readonly);if(g.description)for(const D of v)D.description=D.description?D.description+" and "+g.description:g.description;if(g.meta&&"object"==typeof g.meta)for(const D of v)D.meta=mergeMeta(D.meta,g.meta)}function getTypesForSchema(g,v){for(;;){if(getCheckedType(g))return rememberOriginalSchema(new Set([g]),v);switch(g.type){case"never":return new Set;case"literal":case"enum":return rememberOriginalSchema(splitConstrainedSchema(g),v);case"catch":{const D=g,R=[...getTypesForSchema(D.innerType,v)].map(g=>({...g}));addModifiers(g,R);const q=[...getTypesForSchema({type:"literal",values:[D.value]},v)];return addModifiers(g,q),rememberOriginalSchema(new Set([...R,...q]),v)}case"object":{const D=new Set;return D.add(g),rememberOriginalSchema(D,v)}case"discriminatedUnion":case"xor":case"union":{let D=[];for(const R of g.options)D=[...D,...getTypesForSchema(R,v)];if("discriminatedUnion"===g.type)for(const v of D)v.$discriminator=g.discriminator;return addModifiers(g,D),rememberOriginalSchema(new Set(D),v)}case"intersection":{const D=flattenIntersection(getTypesForSchema(g.left,v),getTypesForSchema(g.right,v));for(const v of D)intersectionSchemas.set(v,g);return addModifiers(g,D),rememberOriginalSchema(new Set(D),v)}case"pipe":{if(isStringboolSchema(g)){const D={...g};delete D.description;const R=[D];return addModifiers(g,R),rememberOriginalSchema(new Set(R),v)}const D=[...getTypesForSchema(g.inner,v)];return addModifiers(g,D),rememberOriginalSchema(new Set(D),v)}case"any":case"unknown":return rememberOriginalSchema(new Set([{type:"boolean"},{type:"number"},{type:"nan"},{type:"bigInt"},{type:"string"},{description:"Email",type:"string",kind:"email"},{description:"URL",type:"string",kind:"url"},{description:"Date",type:"string",kind:"date"},{type:"date"},{type:"undefined"},{type:"null"},{type:"object",properties:{},catchall:{type:"unknown"}},{type:"array",element:{type:"any"}},{type:"set",value:{type:"any"}},{type:"map",key:{type:"any"},value:{type:"any"}},{type:"any",checks:[{name:"regexp"}]},{type:"any",checks:[{name:"blob"}]},{type:"any",checks:[{name:"BooleanObject"}]},{type:"any",checks:[{name:"NumberObject"}]},{type:"any",checks:[{name:"StringObject"}]},{type:"any",checks:[{name:"SpecialRealNumber"}]},{type:"any",checks:[{name:"domexception"}]},{type:"any",checks:[{name:"error"}]},{type:"any",checks:[{name:"filelist"}]},{type:"any",checks:[{name:"file"}]},{type:"any",checks:[{name:"resurrectable"}]},{type:"any",checks:[{name:"blobHTML"}]},{type:"any",checks:[{name:"buffersource"}]},{type:"any",checks:[{name:"dommatrix"}]},{type:"any",checks:[{name:"dompoint"}]},{type:"any",checks:[{name:"domrect"}]},{type:"any",checks:[{name:"errors"}]},{description:"JSON Reference",type:"object",properties:{$ref:{type:"string"}}}]),v);default:if("$ref"in g){g=resolveJSONPointer({obj:v,path:g.$ref});continue}return rememberOriginalSchema(new Set([g]),v)}}}const schema={isValueValidationRequired:g=>!!["record","looseRecord","tuple"].includes(g.type)||"object"!==g.type&&intersectionSchemas.has(g),validateValue(g,v,D){const R=getValidationSchema(v),q=originalSchemas.get(v)??originalSchemas.get(R)??R,ie=parseValue(g,R,q,D);return ie.success?{valid:!0}:{valid:!1,message:ie.error.issues[0]?.message,schema:"intersection"===R.type?getInvalidIntersectionBranch(g,R,q,D):R}},iterate:(g,v)=>(v.format="schema",structuredCloning.iterate(g,v)),convertFromTypeson(g,v,D,R,q,ie){let[se,ce]=q??[];if(!ie)throw new Error("State object expected for schema");let le=ie.schemaContent,me=!1;switch("number"==typeof ce&&isUnionLike(se?.type)&&(se=se.options[ce]),se?.type){case"object":le=se.properties[R],le||(le=se.catchall,me=!0);break;case"array":le=se.element;break;case"set":case"promise":le=se.value;break;case"codec":"filelist"===se.name&&"array"===se.output.type&&(le="file"===g?se.output.element:se);break;case"tuple":le=se.items[Number(R)]??se.rest;break;case"record":le=se.value,me=!0;break;case"looseRecord":me=!0,le=recordKeyConforms(v,se.key,R)?se.value:void 0}if(!le)return{type:g};const fe=[...getTypesForSchema(le,ie.schemaContent)];let ge,ve;for(const[g,R]of fe.entries()){const q=getSchemaType(R),se=v.getTypeObject(q);if(!se.valueMatch?.(D))continue;const ce=dezerialize(R,{checks:getChecks(v),codecs:dezerializerCodecs,instances:dezerializerInstances,originalShape:ie.schemaContent}),le="promise"===q?{success:!0}:ce.safeParse(D),xe={type:q,schemaIdx:g,schema:!ie.rootUI||ie.readonly||1===fe.length?R:{type:"union",options:fe},mustBeOptional:me};if(le.success){if("promise"===q||"data"in le&&deepEqual(le.data,D))return xe;ge??=xe}else ve??=xe}return ge||(ve||{type:g})},types:()=>structuredCloning.types(),getTypesAndSchemasForState(g,v,D,R){if(!D)throw new Error("Missing schema object");if("array"===v)return structuredCloning.getTypesAndSchemasForState(g,v,D,R);const q=[...getTypesForSchema(D,R??D)];return{schemaObjects:q,types:q.map(g=>getSchemaType(g))}}},localeStrings={submit:"Submit",cancel:"Cancel",ok:"Ok"},dialogs={localeStrings:{},setLocale(g={}){this.localeStrings={...localeStrings,...g}},makeDialog({atts:g={},children:v=[],close:D,remove:R=!0}={}){D&&(g.$on||(g.$on={}),"close"in g.$on||(g.$on.close=D));const q=jmlExports.jml("dialog",g,v,jmlExports.body);return q.showModal(),R&&q.addEventListener("close",()=>{q.remove()}),q},makeCancelDialog({cancel:g,cancelClass:v="cancel",submitClass:D="submit",...R}){const q=this.makeDialog(R);return jmlExports.jml("div",{class:D},[["br"],["br"],["button",{class:v,$on:{click(v){v.preventDefault(),g&&g.call(this,{e:v,dialog:q})||q.close()}}},[this.localeStrings.cancel]]],q),q},makeSubmitDialog({submit:g,submitText:v,submitClass:D="submit",...R}){const q=this.makeCancelDialog(R);return $e(q,`button.${R.cancelClass||"cancel"}`)?.before(jmlExports.jml("button",{class:D,$on:{click(v){g.call(this,{e:v,dialog:q})}}},[v??this.localeStrings.submit]),jmlExports.nbsp.repeat(2)),q},alert(g){g=g&&"object"==typeof g?g:{message:g};const{submitClass:v="submit"}=g,{message:D}=g;return new Promise(g=>{const R=jmlExports.jml("dialog",[D,["br"],["br"],["div",{class:v},[["button",{$on:{click(){R.close(),g()}}},[this.localeStrings.ok]]]]],jmlExports.body);R.showModal()})},confirm({atts:g={},message:v,submitClass:D="submit"}){return({message:v}="string"==typeof v?{message:v}:v),new Promise((R,q)=>{const ie=jmlExports.jml("dialog",g,[v,["br"],["br"],["div",{class:D},[["button",{$on:{click(){ie.close(),R()}}},[this.localeStrings.ok]],jmlExports.nbsp.repeat(2),["button",{$on:{click(){ie.close(),q(new Error("cancelled"))}}},[this.localeStrings.cancel]]]]],jmlExports.body);ie.showModal()})}};dialogs.setLocale();const tick=()=>new Promise(g=>{setTimeout(g,0)}),MAX_CONNECT_WAIT_TICKS=50,whenConnected=async(g,v=MAX_CONNECT_WAIT_TICKS)=>{for(let D=0;!g.isConnected&&D<v;D++)await tick();return g.isConnected},typeChoicesAPIMethods=["$getValue","$setType","$setTypeNoEditUI","$setStyles","$getTypeRoot","$addAndValidateEditUI","$addTypeAndEditUI","$addEditUI","$getContainer","$getTopRoot","$validate","$whenReady"];function deriveXorBranchLabel(g,v,D){if(g&&"description"in g&&g.description)return g.description;if(g&&"literal"===g.type){const{values:v}=g;if(Array.isArray(v)&&v.length)return String(v[0])}if(g&&"object"===g.type){const{properties:v}=g,D=v&&"object"==typeof v?Object.keys(v):[];if(D.length)return D.length>3?`${D.slice(0,3).join(", ")}, +${D.length-3} more`:D.join(", ")}return v||`Option ${D+1}`}function buildXorTypeChoices({typeNamespace:g,keySelectClass:v,typeOptions:D,schemaObjs:R,types:q,typeContainer:ie,xorSchema:se,selectEl:ce}){const le=`typeChoices-${g}-xor`,me=jmlExports.jml("fieldset",{class:`typeChoices-${g} xorTypeChoices${v?" "+v:""}`,$on:{change(g){g?.stopPropagation();const v=g.target?.dataset?.idx??this.selectedOptions[0]?.dataset?.idx;this.$addAndValidateEditUI({schemaObject:void 0===v?void 0:R[Number(v)]}),this.$setStyles(),updateMatchStatus()}}},[["legend",{class:"xorTypeChoicesLegend"},["Exactly one of"]],...D.map(([g,v],D)=>["label",{class:"xorTypeChoice"},[["input",{type:"radio",name:le,value:v?.value??"",dataset:{idx:D}}],["span",{class:"xorTypeChoiceLabel"},[deriveXorBranchLabel(R[D],g,D)]]]]),["div",{class:"xorMatchStatus",hidden:!0}]]),radios=()=>[...me.querySelectorAll('input[type="radio"]')],fe=$e(me,".xorMatchStatus");function updateMatchStatus(){const g=radios();for(const v of g)v.setCustomValidity("");const v=g.find(g=>g.checked);if(!se||!v||!$e(ie,"div[data-type]"))return void(fe.hidden=!0);let D;try{D=ve.$getValue()}catch{return void(fe.hidden=!0)}const{matched:ce,total:le}=getXorBranchMatchInfo(q,se,D),me=R[Number(v.dataset.idx)],ge=Boolean(me)&&valueMatchesSchema(q,me,D),xe=ge&&1===ce;fe.hidden=!1,fe.textContent=ge?xe?`Matches 1 of ${le} options`:`Matches ${ce} of ${le} — value must match exactly one`:"Value does not match the selected option",fe.classList.toggle("xorMatchOk",xe),fe.classList.toggle("xorMatchErr",!xe),v.setCustomValidity(xe?"":ge?"Value must match exactly one option":"Value does not match the selected option")}ie.addEventListener("input",updateMatchStatus),ie.addEventListener("change",updateMatchStatus);const ge=ce,ve=me;for(const g of typeChoicesAPIMethods)ve[g]=ge[g];return Object.defineProperties(me,{value:{configurable:!0,get:()=>radios().find(g=>g.checked)?.value??"",set(g){const v=radios().find(v=>v.value===g);for(const g of radios())g.checked=g===v}},selectedIndex:{configurable:!0,get(){const g=radios().findIndex(g=>g.checked);return-1===g?0:g+1},set(g){radios().forEach((v,D)=>{v.checked=D===Number(g)-1})}},selectedOptions:{configurable:!0,get(){const g=radios().find(g=>g.checked);return g?[{value:g.value,dataset:{idx:g.dataset.idx}}]:[]}}}),me}const buildTypeChoices=({autoTrigger:g=!0,format:v,typeNamespace:D,value:R,setValue:q=!1,state:ie,keySelectClass:se,requireObject:ce,objectHasValue:le,topRoot:me,formats:fe=new Formats,types:ge=new Types,schema:ve,schemaIdx:xe,schemaOriginal:_e,schemaContent:ke})=>{const we=ce&&!ke?{typeOptions:[ge.getOptionForType("object")],schemaObjects:void 0}:ge.getTypeOptionsForFormatAndState(v,ie,ke,_e),{typeOptions:Se}=we,Ie=we.schemaObjects;let Ee,Ce;const Oe=new Promise(g=>{Ce=g}),$getValue=(g,R)=>{const q=$e(Te,"div[data-type]");return ge.getValueForRoot(q,{typeNamespace:D,formats:fe,format:v,types:ge,...g},R)},Te=jmlExports.jml("div",{class:"typeContainer"}),Ne=jmlExports.jml("select",{hidden:ce||1===Se.length,class:`typeChoices-${D}${se?" "+se:""}`,$custom:{$getValue:$getValue,$whenReady:()=>Oe,$setType(g){const{type:v,baseValue:D,bringIntoFocus:R,avoidReport:q,specificSchema:ie}=g;if(Ie&&ie){const g=Ie.findIndex(g=>deepEqual(g,ie));-1===g?this.value=v:this.selectedIndex=g+1}else this.value=v;this.$setStyles(),this.$addAndValidateEditUI({baseValue:D,bringIntoFocus:R,schemaObject:ie,avoidReport:q})},$setTypeNoEditUI(g){const{type:v,specificSchema:D}=g;if(Ie&&D){const g=Ie.findIndex(g=>deepEqual(g,D));this.selectedIndex=g+1}else this.value=v;this.$setStyles()},$setStyles(){const{value:g}=this;this.dataset.type=g;let v=this.parentElement;v&&("fieldset"!==v.nodeName.toLowerCase()&&(v=v.parentElement),"fieldset"===v?.nodeName.toLowerCase()&&(v.dataset.type=g,DOM.filterChildElements(v,"legend").forEach(v=>{v.dataset.type=g})))},$getTypeRoot(){const g=this.$getContainer();return!!g&&$e(g,"div[data-type]")},$addAndValidateEditUI(g={}){const{baseValue:R,bringIntoFocus:q,schemaObject:ie,avoidReport:se}=g,{value:ce}=this;if(!ce)return;let le=this.$getTopRoot();Ee=ge.getUIForModeAndType({readonly:!1,typeNamespace:D,type:ce,bringIntoFocus:q,hasValue:void 0!==R,value:R,buildTypeChoices:buildTypeChoices,format:v,topRoot:le,schemaContent:_e??(void 0!==xe&&isUnionLike(ke?.type)?ke.options[xe]:ke),specificSchemaObject:ie??Ie?.[Ae.selectedIndex-1]??(void 0!==xe&&isUnionLike(ke?.type)?ke.options[xe]:ke),schemaFallingBack:Boolean(!ie&&ke)}),this.$addEditUI({editUI:Ee}),this.$validate({avoidReport:se}),le=this.$getTopRoot(),ge.validateAllReferences({topRoot:le,avoidReport:se})},$addTypeAndEditUI(g){const{type:v,editUI:D,specificSchema:R}=g;this.$setTypeNoEditUI({type:v,specificSchema:R}),this.$addEditUI({editUI:D})},$addEditUI(g){const{editUI:v}=g,D=this.$getContainer();DOM.removeChildren(D),jmlExports.jml(v,D)},$getContainer(){return this.nextElementSibling},$getTopRoot(){return me||this.$getTypeRoot()},$validate(g={}){const{avoidReport:v}=g,{value:D}=this,R=this.$getContainer();if(!R.firstElementChild)return!1;const q=R.firstElementChild;return ge.validate({type:D,root:q,topRoot:this.$getTopRoot(),avoidReport:v})}},$on:{change(g){g?.stopPropagation(),this.$addAndValidateEditUI({schemaObject:Ie?Ie[Number(g.target.selectedOptions[0].dataset.idx)]:void 0}),this.$setStyles()}}},[["option",{value:""},["(Choose a type)"]],...Se.map(([g,v],D)=>["option",{...v,dataset:Ie?{idx:D}:{}},[g]])]),Ae=Boolean(Ie&&!ce&&Se.length>1&&("xor"===ke?.type||"xor"===_e?.type))?buildXorTypeChoices({typeNamespace:D,keySelectClass:se,typeOptions:Se,types:ge,typeContainer:Te,schemaObjs:Ie,xorSchema:"xor"===ke?.type?ke:_e,selectEl:Ne}):Ne;return g&&!q&&1===Se.length?setTimeout(async()=>{try{if(!await whenConnected(Ae))return;Ae.selectedIndex=1,Ae.dispatchEvent(new Event("change"))}finally{Ce()}},0):q||ce&&!le?setTimeout(async()=>{try{if(!await whenConnected(Ae))return;q||(R={});try{const g=await fe.getControlsForFormatAndValue(ge,v,R,{readonly:!1,typeNamespace:D,schema:ve,schemaContent:ke,formats:fe,types:ge}),{rootUI:q,specificSchemas:ie}=g,se=Types.getTypeForRoot(q);Ae.$addTypeAndEditUI({type:se,editUI:q,specificSchema:ie?.[0]}),await g.whenBuilt}catch(g){dialogs.alert({message:"The object to be added had types not supported by the current format."}),console.log("err",g)}}finally{Ce()}},0):setTimeout(()=>{Ce()},0),{domArray:[Ae,Te],whenReady:Oe,getValue:$getValue,getType(){const g=$e(Te,"div[data-type]");return Types.getTypeForRoot(g)},validValuesSet(){const g=$e(Te,"div[data-type]");if(!g)return!1;const v=g.closest("form");return Types.validValuesSet({form:v,typeNamespace:D})},async setValue(g,D){const R=(await fe.getControlsForFormatAndValue(ge,v,g,D)).rootUI,q=Types.getTypeForRoot(R);Ae.$addTypeAndEditUI({type:q,editUI:R})}}},typesonToJson=new Map([["arrayNonindexKeys","array"]]),json={types:()=>["null","true","false","number","string","array","object"],iterate(g,v){const D=g;return v.format="json",structuredCloning.iterate(D,v)},convertFromTypeson:g=>({type:typesonToJson.get(g)}),testInvalid(g,v){if("array"===g)return Object.keys(v).length!==v.length},getTypesAndSchemasForState(g,v){if(!v||["array","object"].includes(v))return{types:this.types(),schemaObjects:[]}}},functionSpec={function:{test:g=>"function"==typeof g,replace:g=>"("+g.toString()+")",revive(o){return eval(o)}}},structuredCloningJsoe=pe.filter(g=>["imagedata","imagebitmap","domquad","quotaexceedederror","webtransporterror","cryptokey","audiodata","encodedaudiochunk","encodedvideochunk","videoframe"].every(v=>!Object.hasOwn(g,v))),MAX_PARENT_WAIT_TICKS=50;Q.resurrectable.test=g=>g&&"object"==typeof g&&!Array.isArray(g)&&"Object"!==toStringTag(g);const encapsulateObserver=g=>{const{typeNamespace:v,readonly:D,format:R,schemaContent:q,formats:ie,types:se}=g,ce=R,le=g.pendingBuilds||=[],me={},fe={},ge=[],ve=[];return R=>{const{type:xe,cyclic:_e,keypath:ke,value:we,replaced:Se,cyclicKeypath:Ie,endIterateIn:Ee,endIterateOwn:Ce,endIterateUnsetNumeric:Oe,clone:Te}=R;if(ve.some(g=>""===g?""!==ke:ke.startsWith(`${g}.`)))return;if("replaced"in R)return;if("readonly"===_e&&!Array.isArray(R.value))return;if("readonly"===_e&&("set"===xe||"filelist"===xe))return;if(Ee||Ce)return;if(Oe||void 0===Te&&void 0===Ie&&Array.isArray(we))return;if("negativeZero"===xe&&R.replacing)return;if("sparseUndefined"===xe)return;let Ne,Ae=we;const Pe="structuredCloning"===ce?"arrayNonindexKeys":"array",ze=ke.lastIndexOf("."),je=unescapeKeyPathComponent(ke.slice(ze+1)),De=-1===ze?"":ke.slice(0,ze);let Ze,Ue,Le;if("string"==typeof Ie)Ae=typesonPathToJSONPointer(Ie),Ne="array"===xe?"arrayReference":"objectReference",({newType:Ne,schema:Ze,schemaIdx:Ue,mustBeOptional:Le}=canonicalTypeToAvailableTypeAndSchema(se,ie,ce,Pe,Ne,we,je,fe[De],g));else try{({newType:Ne,schema:Ze,schemaIdx:Ue,mustBeOptional:Le}=canonicalTypeToAvailableTypeAndSchema(se,ie,ce,Pe,xe,we,je,fe[De],g))}catch(v){return console.log("err",xe,v,we),void(g.error=v)}const Re=["array","object","set","map","filelist","arrayNonindexKeys"].includes(Ne);"symbol"!==xe&&"file"!==xe||ve.push(ke);const Ve="map"===xe&&"[object Map]"===Object.prototype.toString.call(we);if(Ve&&ge.push(ke),Ze&&(g.specificSchema=Ze,g.specificSchemas||(g.specificSchemas=[]),g.specificSchemas.push(Ze)),!g.rootUI)return g.rootUI=se?.getUIForModeAndType({readonly:D,typeNamespace:v,type:Ne,bringIntoFocus:!1,buildTypeChoices:buildTypeChoices,format:ce,specificSchemaObject:Ze,schemaContent:q,value:Ae,hasValue:!0,replaced:Se}),me[""]=g.rootUI,Ze&&(fe[""]=[Ze,Ue]),void(Ve&&[...we].forEach((v,D)=>{me[D]=g.rootUI}));Ze&&(fe[ke]=[Ze,Ue]),le.push((async()=>{await tick();let v=me[De];for(let g=0;(!v||!("$addAndSetArrayElement"in v))&&g<MAX_PARENT_WAIT_TICKS;g++)await tick(),v=me[De];if(!v||!("$addAndSetArrayElement"in v))return g.buildWarnings||(g.buildWarnings=[]),void g.buildWarnings.push({keypath:ke,type:Ne,reason:"no parent UI registered"});if(!Ve&&ge.some(g=>{if(g===ke||""===g&&/^\d+$/u.test(ke))return!0;const v=ke.match(/\.\d+$/u);return v&&""!==g&&ke.slice(0,-v[0].length)===g}))return;const R=v.$addAndSetArrayElement({mustBeOptional:Le,propName:je,type:Ne,value:Ae,bringIntoFocus:!1,schemaIdx:Ue,schemaContent:Ze??q});R&&(Re&&(me[ke]=R,Ve&&[...we].forEach((g,v)=>{me[`${ke}.${v}`]=R})),D||(await(se?.setValue({type:Ne,root:R,value:Ae})),se?.validate({type:Ne,root:R,topRoot:g.rootUI,avoidReport:!0})))})().catch(v=>{g.buildWarnings||(g.buildWarnings=[]),g.buildWarnings.push({keypath:ke,type:Ne,reason:v?.message??String(v)})}))}},replaceTypes=(g,v)=>{v.forEach(([v,D])=>{g.splice(g.indexOf(v),1,D)})},canonicalTypeToAvailableTypeAndSchema=(g,v,D,R,q,ie,se,ce,le)=>{const me=v.getAvailableFormat(D),{getTypesAndSchemasForState:fe,convertFromTypeson:ge,testInvalid:ve}=me,xe=fe.call(me,g,R,le.schemaContent)?.types;if(!xe)throw new Error("Unexpected undefined type for state");let _e;"array"===q&&xe.includes("arrayNonindexKeys")&&(q="arrayNonindexKeys");const isInvalid=g=>{const v=new Error("Invalid");throw v.newValType=g,v};let ke;if(ge){let v,D,R;if(({type:v,schema:ke,schemaIdx:R,mustBeOptional:D}=ge(q,g,ie,se,ce,le)),"string"==typeof v){if(ve&&ve(v,ie))return isInvalid(v);if(q=v,ke)return{newType:q,schema:ke,schemaIdx:R,mustBeOptional:D}}}return xe.some(v=>{const D=g.getTypeObject(v),{valueMatch:R,superType:se,childTypes:ce}=D;return!!(se&&R&&se===q&&R(ie)||ce&&ce.includes(q))&&(_e=v,!0)}),void 0===_e&&(xe.some(g=>g===q&&(_e=g,!0)),void 0===_e)?(console.log("AALLLowableTypes",R,xe,"::",q,ie),isInvalid(q)):{newType:_e,schema:ke}},structuredCloning={async iterate(g,v){v.format||(v.format="structuredCloning"),structuredCloningJsoe.splice(1,0,Q);const D=new Typeson({encapsulateObserver:encapsulateObserver(v)}).register("arbitraryJS"===v.format||"schema"===v.format?[...structuredCloningJsoe,X,z$2,functionSpec]:structuredCloningJsoe);if(await D.encapsulateAsync(g,null,{throwOnBadSyncType:!1}),v.whenBuilt=(async()=>{await Promise.allSettled(v.pendingBuilds??[])})(),v.error)throw v.error;return v},getTypesAndSchemasForState(g,v){if(v&&g.getContextInfo("structuredCloning",v)){const D=this.getTypesAndSchemasForState(g)?.types||[];return g.getContextInfo("structuredCloning",v).forEach(({type:g,after:v})=>{const R=D.indexOf(v);D.splice(R+1,0,g)}),{types:D,schemaObjects:[]}}return"errorsArray"===v?{types:["error","errors"],schemaObjects:[]}:"filelistArray"===v?{types:["file"],schemaObjects:[]}:{types:this.types(),schemaObjects:[]}},types(){const g=json.types();return replaceTypes(g,[["array","arrayNonindexKeys"]]),[...g,"undef","bigint","bigintObject","SpecialNumber","date","regexp","BooleanObject","NumberObject","StringObject","error","errors","blob","blobHTML","file","set","map","filelist","domexception","domrect","dompoint","dommatrix","buffersource","resurrectable"]}},indexedDBKey={types:()=>["number","SpecialRealNumber","string","ValidDate","array","buffersource"],testInvalid(g,v){switch(g){case"SpecialRealNumber":return Number.isNaN(v);case"ValidDate":return Number.isNaN(v.getTime());case"array":return Object.keys(v).length!==v.length;default:return!1}},convertFromTypeson:g=>({type:typesonToIndexedDBKey.get(g)}),iterate:(g,v)=>(v.format="indexedDBKey",structuredCloning.iterate(g,v)),getTypesAndSchemasForState(g,v){if(!v||["array"].includes(v))return{types:this.types(),schemaObjects:[]}}},typesonToIndexedDBKey=new Map([["SpecialNumber","SpecialRealNumber"],["date","ValidDate"],["arrayNonindexKeys","array"]]),arbitraryJS={types:()=>[...structuredCloning.types(),"symbol","promise","function"],iterate(g,v){const D=g;return v.format="arbitraryJS",structuredCloning.iterate(D,v)},getTypesAndSchemasForState(g,v){return structuredCloning.getTypesAndSchemasForState.call(this,g,v)}};class Formats{constructor(){this.availableFormats={indexedDBKey:indexedDBKey,json:json,structuredCloning:structuredCloning,arbitraryJS:arbitraryJS,schema:schema}}async getControlsForFormatAndValue(g,v,D,R){return await this.availableFormats[v].iterate(D,{...R,types:g,formats:this,format:v})}getTypesAndSchemasForFormatAndState(g,v,D,R,q){return this.availableFormats[v].getTypesAndSchemasForState(g,D,R,q)}getAvailableFormat(g){return this.availableFormats[g]}}const RESERVED=new Set(["title","description","id","deprecated"]);function stringifyMetaValue(g){return"string"==typeof g?g:JSON.stringify(g)}function resolveSchemaMeta(g){const v=g&&"object"==typeof g?g:void 0,D=v&&v.meta&&"object"==typeof v.meta?v.meta:void 0,R="string"==typeof v?.description?v.description:void 0,q="string"==typeof D?.title?D.title:void 0,ie="string"==typeof D?.description?D.description:void 0,se="string"==typeof D?.id?D.id:void 0,ce="boolean"==typeof D?.deprecated||"string"==typeof D?.deprecated?D.deprecated:void 0,le=D&&D.jsoe&&"object"==typeof D.jsoe?D.jsoe:void 0,me=D?Object.entries(D).filter(([g])=>!RESERVED.has(g)&&"jsoe"!==g):[],fe=q??ie??R,ge=q?ie:void 0,ve=[];q&&ve.push(["Title",q]);const xe=ie??R;xe&&ve.push(["Description",xe]),void 0!==se&&ve.push(["ID",se]),void 0!==ce&&!1!==ce&&ve.push(["Deprecated",!0===ce?"yes":String(ce)]);for(const[g,v]of me)ve.push([g,stringifyMetaValue(v)]);if(le)for(const[g,v]of Object.entries(le))ve.push([`jsoe.${g}`,stringifyMetaValue(v)]);return{label:fe,longText:ge,id:se,deprecated:ce,custom:me,jsoe:le,rows:ve,hasAny:ve.length>0}}function schemaLabel(g){return resolveSchemaMeta(g).label}function isDeprecated(g){const{deprecated:v}=resolveSchemaMeta(g);return void 0!==v&&!1!==v}function deprecatedClassSuffix(g){return isDeprecated(g)?" schema-deprecated":""}function lastTypeChild(g){let v=g.lastElementChild;for(;v&&v.classList.contains("schema-meta");)v=v.previousElementSibling;return v}function metaTooltipText(g){return g.map(([g,v])=>`${g}: ${v}`).join("\n")}function metaTable(g){return["table",{class:"schema-meta-table"},[["tbody",g.map(([g,v])=>["tr",[["th",[g]],["td",[v]]]])]]]}function appendSchemaMeta(g,v){const D=resolveSchemaMeta(v);if(!D.hasAny)return;void 0!==D.deprecated&&!1!==D.deprecated&&g.classList.add("schema-deprecated");const onToggle=g=>{g.preventDefault();const v=g.target.closest(".schema-meta-toggle");let R=v.nextElementSibling;const q=!R||R.hidden;R||(R=jmlExports.jml(...metaTable(D.rows)),v.parentElement.append(R)),R.hidden=!q,v.setAttribute("aria-expanded",String(q))},R=["span",{class:"schema-meta"},[["span",{class:"schema-meta-toggle",role:"button",tabindex:"0","aria-expanded":"false","aria-label":"Schema metadata",title:metaTooltipText(D.rows),$on:{click:onToggle,keydown:g=>{"Enter"!==g.key&&" "!==g.key||onToggle(g)}}}]]];g.append(jmlExports.jml(...R))}const nullType={option:["Null"],stringRegex:/^null$/u,valueMatch:g=>null===g,toValue:()=>({value:null}),getValue:()=>null,getInput:({root:g})=>$e(g,"input"),viewUI:({specificSchemaObject:g})=>["i",{dataset:{type:"null"},title:schemaLabel(g)??"(a `null`)"},["null"]],editUI:({typeNamespace:g,specificSchemaObject:v})=>["div",{dataset:{type:"null"},title:schemaLabel(v)??"Null"},[["label",["Null",["input",{type:"checkbox",name:`${g}-null`,checked:!0,disabled:!0}]]]]]},trueType={option:["Boolean (true)",{value:"true"}],stringRegex:/^true$/u,toValue:()=>({value:!0}),valueMatch:g=>!0===g,superType:"boolean",getValue:()=>!0,viewUI:()=>["i",{dataset:{type:"true"}},["true"]],ct:0,getInput:({root:g})=>$e(g,"input"),editUI({typeNamespace:g}){return this.ct++,["div",{dataset:{type:"true"}},[["label",["True",["input",{type:"radio",name:`${g}-true${this.ct}`,value:"true",checked:!0}]]],["label",["False",["input",{type:"radio",name:`${g}-true${this.ct}`,value:"false",disabled:!0}]]]]]}},falseType={option:["Boolean (false)",{value:"false"}],stringRegex:/^false$/u,toValue:()=>({value:!1}),valueMatch:g=>!1===g,superType:"boolean",getValue:()=>!1,viewUI:()=>["i",{dataset:{type:"false"}},["false"]],ct:0,getInput:({root:g})=>$e(g,"input[value=false]"),editUI({typeNamespace:g}){return this.ct++,["div",{dataset:{type:"false"}},[["label",["True",["input",{type:"radio",name:`${g}-false${this.ct}`,value:"true",disabled:!0}]]],["label",["False",["input",{type:"radio",name:`${g}-false${this.ct}`,value:"false",checked:!0}]]]]]}},nanType={option:["NaN"],stringRegex:/^NaN$/u,valueMatch:g=>Number.isNaN(g),toValue:()=>({value:NaN}),getValue:()=>NaN,getInput:({root:g})=>$e(g,"input"),viewUI:({specificSchemaObject:g})=>["i",{dataset:{type:"nan"},title:schemaLabel(g)??"(a `NaN`)"},["NaN"]],editUI:({typeNamespace:g,specificSchemaObject:v})=>["div",{dataset:{type:"nan"},title:schemaLabel(v)??"NaN"},[["label",["NaN",["input",{type:"checkbox",name:`${g}-nan`,checked:!0}]]]]]},blobHTMLType={option:["Blob (text/html)"],stringRegex:/^data:text\/html(?:;base64)?,.*$/u,valueMatch:g=>g&&"text/html"===g.type,superType:"blob",toValue:g=>({value:function dataURIToBlob(g){const v=g.indexOf(","),D=g.slice(0,v),R=g.slice(v+1),[q,ie]=D.split(":",2)[1].split(";",2);let se;if("base64"===ie){const g=atob(R);se=new ArrayBuffer(g.length);const v=new Uint8Array(se);for(let D=0;D<g.length;D++)v[D]=g.charCodeAt(D)}else se=R;return new Blob([se],{type:q})}(g)}),getInput:({root:g})=>$e(g,"textarea[name$=-blobHTML]"),getValue({root:g}){return this.toValue("data:text/html,"+this.getInput({root:g}).sceditorInstance.val()).value},loadBlob:async g=>await g.text(),async setValue({root:g,value:v}){const D=await this.loadBlob(v);this.getInput({root:g}).sceditorInstance.val(D)},viewUI({value:g,specificSchemaObject:v}){let D;const R=jmlExports.jml("div",{dataset:{type:"blobHTML"},title:schemaLabel(v)?"HTML":void 0},[schemaLabel(v)??"HTML",": ",["button",{$on:{click(){dialogs.alert({message:["div",["Source: ",["textarea",{class:"view-source"},[D]]]]})}}},["View source"]]]);return this.loadBlob(g).then(g=>{D=g,jmlExports.jml("iframe",{sandbox:"",srcdoc:D},R)}).catch(g=>{console.error("Err",g)}),[R]},editUI({typeNamespace:g,specificSchemaObject:v,value:D}){const R=jmlExports.jml("textarea",{name:`${g}-blobHTML`});R.sceditorInstance={val(){throw new Error("Not yet instantiated")}};const q=jmlExports.jml("div",{dataset:{type:"blobHTML"},title:schemaLabel(v)??"Blob (HTML)"},[R]);return(async()=>{await whenConnected(R,250)&&(sceditor.create(R,{width:"1000px",height:"225px",autoUpdate:!0,resizeMaxHeight:-1,resizeMaxWidth:-1,plugins:"xhtml,plaintext,undo",emoticonsRoot:"node_modules/sceditor/",style:"/node_modules/sceditor/minified/themes/content/default.min.css"}),R.sceditorInstance=sceditor.instance(R),isNullish(D)||this.setValue({root:q,value:D}))})(),[q]}},booleanType={option:["Boolean",{value:"boolean"}],stringRegex:/^(?:true|false)$/u,valueMatch:g=>"boolean"==typeof g,toValue:g=>({value:"true"===g}),getValue({root:g}){return this.getInput({root:g}).checked},getInput:({root:g})=>$e(g,"input[value=true]"),setValue({root:g,value:v}){$e(g,v?"input[value=true]":"input[value=false]").checked=!0},viewUI:({value:g,specificSchemaObject:v})=>["i",{dataset:{type:"boolean"},title:schemaLabel(v)??"(a boolean)"},[g?"true":"false"]],ct:0,editUI({typeNamespace:g,specificSchemaObject:v,value:D}){this.ct++;const R="literal"===v?.type,q=v?.values?.filter(g=>"boolean"==typeof g)??[],ie=R&&1===q.length,se=ie?q[0]:D??v?.defaultValue;return["div",{dataset:{type:"boolean"},title:schemaLabel(v)??"Boolean"},[["label",["True",["input",{disabled:ie,type:"radio",name:`${g}-boolean${this.ct}`,value:"true",checked:"boolean"!=typeof se||se}]]],["label",["False",["input",{disabled:R,type:"radio",name:`${g}-boolean${this.ct}`,value:"false",checked:"boolean"==typeof se&&!se}]]]]]}},numberType={option:["Number"],stringRegex:new RegExp("^[-+]?"+String.raw`(?:\d{0,30}\.)?`+String.raw`\d{1,30}`+String.raw`(?:[Ee][-+]?[1-2]?\d)?`+"$","u"),valueMatch:g=>"number"==typeof g&&!Number.isNaN(g)&&g!==1/0&&g!==-1/0&&!Object.is(g,-0),toValue:g=>({value:Number(g)}),getInput:({root:g})=>$e(g,"input,select"),setValue({root:g,value:v}){this.getInput({root:g}).value=String(v)},validate({root:g}){const v=this.getInput({root:g}).value;return{message:"Not a valid (finite) number",valid:Boolean(v&&/^-?(\d+|\d*\.\d+)$/u.test(v))}},getValue({root:g}){const{value:v}=this.getInput({root:g});return""===v.trim()?NaN:Number(v)},viewUI:({value:g,specificSchemaObject:v})=>["i",{dataset:{type:"number"},title:schemaLabel(v)??"(a number)"},[String(g)]],editUI({typeNamespace:g,specificSchemaObject:v,value:D}){if("literal"===v?.type||"enum"===v?.type){const R=D??v.defaultValue;return["div",{dataset:{type:"number"},title:schemaLabel(v)??"Number"},[["select",{name:`${g}-number`},Object.values(v.values).filter(g=>"number"==typeof g).map(g=>["option",{selected:g===R},[String(g)]])]]]}const R=v,q=150*Number.EPSILON,ie=300*Number.EPSILON,isInteger=()=>R&&"format"in R&&R.format&&["int32","uint32","safeint"].includes(R.format),se=R?.min??(R&&"format"in R&&R.format?{int32:-2147483648,uint32:0,safeint:Number.MIN_SAFE_INTEGER,float32:11754943508222875e-54,float64:Number.MIN_VALUE}[R.format]:void 0),ce=R?.max??(R&&"format"in R&&R.format?{int32:2147483647,uint32:4294967295,safeint:Number.MAX_SAFE_INTEGER,float32:34028234663852886e22,float64:Number.MAX_VALUE}[R.format]:void 0);return["div",{dataset:{type:"number"},title:schemaLabel(v)??"Number"},[["input",{name:`${g}-number`,type:"number",min:se?R?.minInclusive?se:se+(isInteger()?1:q):void 0,max:ce?R?.maxInclusive?ce:ce-(isInteger()?1:ie):void 0,step:R?.multipleOf??(isInteger()?"1":"any"),value:D??v?.defaultValue??""}]]]}},bigintType={option:["BigInt"],stringRegex:new RegExp("^-?"+String.raw`\d+`+"n$","u"),valueMatch:g=>"bigint"==typeof g,toValue:g=>({value:BigInt(g.slice(0,-1))}),getInput:({root:g})=>$e(g,"input,select"),setValue({root:g,value:v}){this.getInput({root:g}).value=String(v)},validate({root:g}){const v=this.getInput({root:g}),{value:D}=v;if(!Boolean(D&&/^-?(\d+)$/u.test(D)))return{message:"Not a valid BigInt",valid:!1};const R=BigInt(D);return void 0!==v.$minBigInt&&R<BigInt(v.$minBigInt)?{message:`BigInt must be at least ${v.$minBigInt}`,valid:!1}:void 0!==v.$maxBigInt&&R>BigInt(v.$maxBigInt)?{message:`BigInt must be at most ${v.$maxBigInt}`,valid:!1}:{message:"",valid:!0}},getValue({root:g}){return BigInt(this.getInput({root:g}).value)},viewUI:({value:g,specificSchemaObject:v})=>["i",{dataset:{type:"bigint"},title:schemaLabel(v)??"(a BigInt)"},[`${String(g)}n`]],editUI({typeNamespace:g,specificSchemaObject:v,value:D}){if("literal"===v?.type){const R=D??v.defaultValue;return["div",{dataset:{type:"bigint"},title:schemaLabel(v)??"BigInt"},[["select",{name:`${g}-bigint`},v.values.filter(g=>"bigint"==typeof g).map(g=>["option",{selected:g===R},[String(g)]])]]]}const R=v,q=R?.format?{int64:{min:"-9223372036854775808",max:"9223372036854775807"},uint64:{min:"0",max:"18446744073709551615"}}[R.format]:void 0,ie=R?.min,se=R?.max,ce=ie??q?.min,le=se??q?.max,me=void 0!==ce?void 0===ie||R?.minInclusive?ce:String(BigInt(ce)+1n):void 0,fe=void 0!==le?void 0===se||R?.maxInclusive?le:String(BigInt(le)-1n):void 0;return["div",{dataset:{type:"bigint"},title:schemaLabel(v)??"BigInt"},[["input",{name:`${g}-bigint`,type:"number",$custom:{$minBigInt:me,$maxBigInt:fe},value:D??v?.defaultValue??"",min:me,max:fe,step:R?.multipleOf??"1"}]]]}},bigintObjectType={option:["BigInt Object"],stringRegex:new RegExp("^BigIntObject-?"+String.raw`\d+`+"n$","u"),valueMatch:g=>"object"==typeof g&&hasConstructorOf(g,BigInt),toValue:g=>({value:new Object(BigInt(g.slice(12,-1)))}),getInput:({root:g})=>$e(g,"input"),setValue({root:g,value:v}){this.getInput({root:g}).value=String(v)},validate({root:g}){const v=this.getInput({root:g}).value;return{message:"Not a valid BigInt",valid:Boolean(v&&/^-?(\d+)$/u.test(v))}},getValue({root:g}){return new Object(BigInt(this.getInput({root:g}).value))},viewUI:({value:g,specificSchemaObject:v})=>["i",{dataset:{type:"bigintObject"},title:schemaLabel(v)??"(a BigInt Object)"},[`${String(g)}n`]],editUI:({typeNamespace:g,specificSchemaObject:v,value:D=""})=>["div",{dataset:{type:"bigintObject"},title:schemaLabel(v)??"BigInt object"},[["input",{name:`${g}-bigintObject`,type:"number",step:"1",value:D}]]]},cidrv6Schema=cidrv6(),stringType={option:["String"],stringRegex:/^"(?:[^\\"]|\\\\|\\")*"$/u,valueMatch:g=>"string"==typeof g,toValue:g=>({value:g.slice(1,-1)}),getInput:({root:g})=>$e(g,'[data-type="string"] > textarea,input,select'),setValue({root:g,value:v}){this.getInput({root:g}).value=v},getValue({root:g}){return this.getInput({root:g}).value},viewUI({value:g,specificSchemaObject:v}){const D=v&&"kind"in v&&v.kind,R=v&&"truthy"in v&&"falsy"in v;return["span",{dataset:{type:"string"},title:schemaLabel(v)??(R?"(a string boolean)":"email"===D?`(an ${D} string)`:D?`(a ${D} string)`:"(a string)")},[g]]},editUI({typeNamespace:g,specificSchemaObject:v,types:D,value:R}){const q=v??{type:"string"},ie="kind"in q?q.kind:null,se="literal"===v?.type||"enum"===v?.type,ce=q?.min??q?.length,le=q?.max??q?.length,me=q?.startsWith,fe=q?.endsWith,ge=q?.toLowerCase,ve=q?.toUpperCase,xe=q?.trim,_e="includes"in q&&q.includes,ke="position"in q?q.position:void 0,we="regex"in q&&q.regex,Se="email"===ie&&"pattern"in q?q.pattern:void 0,Ie="flags"in q?q.flags:void 0,Ee=q,Ce=Array.isArray(Ee.truthy)&&Array.isArray(Ee.falsy)?[...Ee.truthy,...Ee.falsy]:null,checkValue=g=>{if(Ce){const v="sensitive"===Ee.case,D=v?g:g.toLowerCase();if(!Ce.some(g=>(v?g:g.toLowerCase())===D))return`Value is not a recognized string boolean; expected one of: ${Ce.join(", ")}`}if(me&&!g.startsWith(me))return`Value doesn't start with expected: ${me}`;if(fe&&!g.endsWith(fe))return`Value doesn't end with expected: ${fe}`;if(_e&&!g.includes(_e,ke??0))return`Value doesn't include the expected: ${_e}${ke?` after position: ${ke}`:""}`;if(we&&!new RegExp(we,Ie??"").test(g))return`Value doesn't match regular expression: ${we}${Ie?` with flags: ${Ie}`:""}`;if(Se&&!new RegExp(Se,Ie??"").test(g))return`Value doesn't match email pattern: ${Se}${Ie?` with flags: ${Ie}`:""}`;if(ie)switch(ie){case"credit_card":if(!creditCard$1.test(g))return"Value doesn't match credit card pattern.";break;case"ip":if("v4"===("version"in q&&q.version)){if(!ipv4$1.test(g))return"Value doesn't match IP v4 pattern."}else if(!ipv6$1.test(g))return"Value doesn't match IP v6 pattern.";break;case"time":if(!time$1(q).test(g))return"Value does not match time/precision.";break;case"datetime":if(!datetime$1(q).test(g))return"Value does not match datetime/precision/offset/local";break;case"emoji":if(!emoji$1().test(g))return"Value does not match emoji pattern";break;case"uuid":if(!uuid$1("version"in q&&q.version?Number(q.version.slice(1)):void 0).test(g))return"Value does not match uuid pattern";break;case"jwt":if(!jwt("algorithm"in q?{alg:q.algorithm}:void 0).safeParse(g).success)return"Value does not match jwt pattern";break;case"e164":case"xid":case"guid":case"ksuid":if(!regexes[ie].test(g))return`Value does not match ${ie} pattern`;break;case"nanoid":if("length"in q&&q.length){if(g.length!==q.length)return`Nanoid value is not of the expected length: ${q.length}`;if(!nanoidOfLength(15).test(g))return"Value does not match nanoid pattern";break}if(!nanoid$1.test(g))return"Value does not match nanoid pattern";break;case"cuid":if(!cuid$1.test(g))return"Value does not match cuid pattern";break;case"cuid2":if(!cuid2$1.test(g))return"Value does not match cuid2 pattern";break;case"ulid":if(!ulid$1.test(g))return"Value does not match ulid pattern";break;case"duration":if(!duration$1.test(g))return"Value does not match duration pattern";break;case"base64":if(!base64$1.test(g))return"Value does not match base64 pattern";break;case"base64url":if(!base64url$1.test(g))return"Value does not match base64url pattern";break;case"cidr":if("v4"===("version"in q&&q.version)){if(!cidrv4$1.test(g))return"Value doesn't match IP v4 cidr pattern."}else if(!cidrv6Schema.safeParse(g).success)return"Value doesn't match IP v6 cidr pattern."}return null},transform=g=>(ge&&(g=g.toLowerCase()),ve&&(g=g.toUpperCase()),xe&&(g=g.trim()),g);return["div",{dataset:{type:"string"},title:schemaLabel(v)??"String"},[ie&&["email","url","date"].includes(ie)?["input",{$on:{change(){const g=this;g.value=transform(g.value);const R=checkValue(g.value);g.setCustomValidity(D.getValidationMessage({message:R,schema:v,typeSpecific:!0})??""),g.reportValidity()}},name:`${g}-string`,type:ie,value:R??v?.defaultValue??"",minlength:"date"===ie?void 0:ce,maxlength:"date"===ie?void 0:le}]:se?["select",{name:`${g}-string`},Object.values(v.values).filter(g=>"string"==typeof g).map(g=>["option",{selected:g===(R??v.defaultValue)},[g]])]:["textarea",{$on:{change(){const g=this;g.value=transform(g.value);const R=checkValue(g.value);g.setCustomValidity(D.getValidationMessage({message:R,schema:v,typeSpecific:!0})??""),g.reportValidity()}},name:`${g}-string`,minlength:ce,maxlength:le},[R??v?.defaultValue??""]]]]}},arrayReferenceType={option:["Array reference"],type:"array",stringRegex:/^arrayRef\((?:\/[^)]*|)\)$/u,toValue(g,v){const{rootHolder:D,parent:R,parentPath:q}=v,ie=g.slice(`${this.type}Ref(`.length,-1);return D.push([this.type,R,q,ie]),{assign:!1}},resolveReference(g,v){let D=v;return""!==g&&getJSONPointerParts(g).forEach(g=>{if(D=D[g],!D)throw new Error("Bad path")}),D},stateDependent:{structuredCloning:{after:"arrayNonindexKeys",contexts:["arrayNonindexKeys","object","set"]}},getInput:({root:g})=>$e(g,"input"),setValue({root:g,value:v}){this.getInput({root:g}).value=v},getValue({root:g,stateObj:v,currentPath:D}){const R=this.getInput({root:g}).value;v&&(v.paths||(v.paths={}),v.paths[D]={referentPath:R,expectArrayReferent:"array"===this.type},v.handlingReference=!0),console.log(R)},validate({root:g,topRoot:v}){const{type:D}=this,R=this.getInput({root:g}),q=R.value,invalidMessage=g=>({valid:!1,message:g});if(R.validity.patternMismatch)return invalidMessage('You must use a path beginning with "/" (or the empty string)');if(/~([^01]|$)/u.test(q))return invalidMessage("You must use a valid JSON Pointer (with tildes followed by 0 or 1)");let ie=v||g;let se;if(""!==q&&getJSONPointerParts(q).some((v,D)=>{const R=DOM.filterChildElements($e(ie,".arrayItems"),["fieldset","legend"]),q=R.map(g=>getPropertyValueFromLegend(g)).indexOf(v);return-1===q?(se="Specified path doesn't exist",!0):(ie=$e(R[q].parentElement,"div[data-type]"),ie===g?(se="Can't reference self",!0):!["array","object","arrayNonindexKeys"].includes(Types.getTypeForRoot(ie))&&(se=`Referent portion (at segment ${D}) is not an object or array`,!0))}))return invalidMessage(se);const ce=Types.getTypeForRoot(ie);return(["array","arrayNonindexKeys"].includes(ce)?"array":"object"===ce?"object":null)!==D?invalidMessage("Reference must match expected reference type (array or object)"):{valid:!0}},validateAll({types:g,topRoot:v,avoidReport:D}){const R=`${this.type}Reference`;$$e(v,`div[data-type="${R}"]`).forEach(q=>{g.validate({type:R,root:q,topRoot:v,avoidReport:D})})},viewUI({value:g}){return["i",{dataset:{type:`${this.type}Reference`}},[`${this.type}Ref(${g})`]]},editUI({typeNamespace:g,value:v=""}){const{type:D}=this;return["div",{dataset:{type:`${D}Reference`}},[["label",[`JSON Pointer path to ${D} (leave blank for path to root) `,["input",{name:`${g}-${D}Reference`,type:"text",pattern:"^(|/.*)$",value:v}]]]]]}},objectReferenceType={option:["Object reference"],type:"object",stringRegex:/^objectRef\((?:\/[^)]*|)\)$/u,toValue(...g){return arrayReferenceType.toValue.apply(this,g)},resolveReference(...g){return arrayReferenceType.resolveReference?.apply(this,g)},stateDependent:{structuredCloning:{after:"object",contexts:["arrayNonindexKeys","object","set"]}},getInput(...g){return arrayReferenceType.getInput.apply(this,g)},setValue(...g){return arrayReferenceType.setValue?.apply(this,g)},getValue(...g){return arrayReferenceType.getValue.apply(this,g)},validate(...g){return arrayReferenceType.validate?.apply(this,g)},validateAll(...g){return arrayReferenceType.validateAll?.apply(this,g)},viewUI(...g){return arrayReferenceType.viewUI.apply(this,g)},editUI(...g){return arrayReferenceType.editUI.apply(this,g)}};let optionalPropertyId=0;function sameValueZero(g,v){return"number"==typeof g&&"number"==typeof v?g===v||g!=g&&v!=v:g===v}const arrayType={option:["Array"],array:!0,regexEndings:[",","]"],stringRegexBegin:/^\[/u,stringRegexEnd:/^\]/u,valueMatch:g=>Array.isArray(g),toValue(g,v){const{endMatchTypeObjs:D=[],remnant:R,rootHolder:q,schemaObject:ie}=v,se=v.format,ce=v.types,{sparse:le}=this,me=le?"arrayNonindexKeys":this.array?"array":"object",fe=this.array?[]:{};let ge=R;const checkEnd=g=>{if(g&&D.length){const g=ge.match(D.at(-1).stringRegexEnd);if(g)return D.pop(),ge=ge.slice(g[0].length),!0}return!1};if(this.array){let g=0;const parse=()=>{if(!ge)return;const v=ge.match(le?/^[,\s]+/u:/^\s*,?\s*/u);if(v){const D=v[0].match(/\s/gu);if(g+=v[0].length-(D?D.length:0),ge=ge.slice(v[0].length),!ge)return}let R,ve,xe;try{[R,ge,ve,xe]=ce.getValueForString(ge,{firstRun:!1,format:se,state:me,schemaObject:ie,endMatchTypeObjs:D,rootHolder:q,parent:fe,parentPath:g})}catch(g){return void console.log("e",g)}xe&&(fe[g]=R),checkEnd(ve)||parse()};return parse(),le&&g&&g>fe.length-1&&(fe.length=g+1),{value:this.set&&Array.isArray(fe)?new Set(fe):this.map?new Map(fe):this.filelist?new FileList(fe):fe,remnant:ge}}const parse=g=>{if(!ge)return;g&&","===ge[0]&&(ge=ge.slice(1));const v=ge.match(/^\s*(?:([^:"}]+)|"((?:[^\\"]|\\\\|\\")*)")(\s*:\s*)/u);if(!v)return;const[,R,le]=v,ve=R??le;let xe,_e,ke;ge=ge.slice(v[0].length);try{[xe,ge,_e,ke]=ce.getValueForString(ge,{firstRun:!1,format:se,state:me,schemaObject:ie,endMatchTypeObjs:D,rootHolder:q,parent:fe,parentPath:ve})}catch{return}ke&&(fe[ve]=xe),checkEnd(_e)||parse(!0)};return parse(),{value:fe,remnant:ge}},getValue({root:g,stateObj:v,currentPath:D=""}){if(!v)throw new Error("TS guard");const R=v.types,q=""===D,ie=$e(g,".arrayItems");if(!ie)throw new Error("Not yet instantiated");const se=[...ie.children],ce="true"===g.dataset.record,le=ce||"object"!==g.dataset.type?this.sparse?Array.from({length:Math.trunc(Number(DOM.filterChildElements(g,["div","div","label","input"])[0].value))}):[]:{};return se.forEach(g=>{const q=g.firstElementChild,ie=getPropertyValueFromLegend(q),se=DOM.filterChildElements(g,[".typeContainer","div[data-type]"])[0]||DOM.filterChildElements(g,["[class^=optionalProperties-placeholder]",".typeContainer","div[data-type]"])[0];if(!se)return;const ce=DOM.filterChildElements(q,["input"]),[me,fe]=((g,q)=>{const ie=R.getValueForRoot(g,v,D+"/"+q);return"handlingReference"in v&&v.handlingReference?(v.handlingReference=!1,[!1]):[!0,ie]})(se,ie);me&&(ce.length?le[ie]=fe:le.push(fe))}),q&&Object.entries(v.paths||[]).forEach(([g,{referentPath:v}])=>{const D=""===v?le:resolveJSONPointer({path:v,obj:le}),R=getJSONPointerParts(g),q=R.pop();R.reduce((g,v)=>reduceJSONPointerParts(g,v),le)[q]=D}),this.filelist?new FileList(le):this.set&&Array.isArray(le)?new Set(le):this.map?new Map(ie.$getMapKeySelects().map((g,v)=>[g.$getValue(),le[v]])):ce?ie.$getMapKeySelects().reduce((g,v,D)=>(g[v.$getValue()]=le[D],g),{}):le},viewUI({typeNamespace:g,type:v,types:D,value:R,topRoot:q,resultType:ie,format:se,specificSchemaObject:ce}){let le=-1;const me=v,fe="record"===ce?.type||"looseRecord"===ce?.type,ge="tuple"===ce?.type,buildLegend=({itemIndex:g,typeNamespace:D,propName:R})=>{const q=ce?.items?.[g],ie=ce?.rest;return["legend",[!fe&&this.array?schemaLabel(ce?.element)??("set"===v&&schemaLabel(ce?.value)?schemaLabel(ce?.value):schemaLabel(q)??schemaLabel(ie))??"Item":ce?"":"Property",ce?"":":",jmlExports.nbsp.repeat(2),["span",{class:`propertyName-${D}`,title:fe&&schemaLabel(ce?.key)?schemaLabel(ce?.key):ce?R:void 0},[void 0!==R?schemaLabel(ce?.properties?.[R])??R:g]]]]},ve=jmlExports.jml("div",{class:"arrayHolder",dataset:{type:v,...fe?{record:"true"}:{},...ge?{tuple:"true"}:{}},$custom:{$addAndSetArrayElement(v){const{propName:R,type:le,value:fe,bringIntoFocus:ge,schemaContent:ve}=v;if("map"===me){const v=D.getUIForModeAndType({resultType:ie,readonly:!0,typeNamespace:g,type:le,topRoot:q,bringIntoFocus:ge,format:se,schemaContent:ve,value:fe,hasValue:!0});if("0"===R){const g=this.$addMapElement();this._lastFieldset=g;const D=jmlExports.jml("fieldset",[["legend",{title:schemaLabel(ce?.key)?"(map key)":void 0},[schemaLabel(ce?.key)??"Key"]]],g);jmlExports.jml(v,D)}else{const g=jmlExports.jml("fieldset",[["legend",{title:schemaLabel(ce?.value)?"(map value)":void 0},[schemaLabel(ce?.value)??"Value"]]],this._lastFieldset);this._lastFieldset=null,jmlExports.jml(v,g)}return v}const xe=this.$addArrayElement({propName:R}),_e=D.getUIForModeAndType({resultType:ie,readonly:!0,typeNamespace:g,type:le,topRoot:q,bringIntoFocus:ge,format:se,schemaContent:ve,specificSchemaObject:ve,value:fe,hasValue:!0});return jmlExports.jml(_e,xe),_e},$addMapElement(){le++;const v=this.$getArrayItems();return jmlExports.jml("fieldset",[buildLegend({itemIndex:le,typeNamespace:g,propName:void 0})],v)},$addArrayElement(v){const{propName:D}=v;le++;const R=this.$getArrayItems();return jmlExports.jml("fieldset",[buildLegend({itemIndex:le,typeNamespace:g,propName:D})],R)},$getArrayItems(){return lastTypeChild(this).lastElementChild}}},[["span",{title:schemaLabel(ce)},[ce?"—":DOM.initialCaps(v).replace(/s$/u,"")]],jmlExports.nbsp.repeat(2),["button",{$on:{click(g){g.preventDefault();const{target:v}=g,D=$e(v.closest(".arrayHolder"),".arrayContents");D.hidden=!D.hidden,v.textContent=D.hidden?"+":"-"}}},["-"]],["div",{class:"arrayContents"},[!fe&&this.array?["div",{title:ce?"filelist"===v?"(a FileList)":"set"===v?"(a Set)":"map"===v?"(a Map)":ge?"(a tuple)":"(an Array)":void 0},["filelist"===v?(schemaLabel(ce)??"FileList")+" length: ":"set"===v?(schemaLabel(ce)??"Set")+" size: ":"map"===v?(schemaLabel(ce)??"Map")+" size: ":(schemaLabel(ce)??"Array")+" length: ",["span",[(!R||"set"!==v&&"map"!==v?R.length:R.size)||0]]]]:fe?schemaLabel(ce)??"Record":"",["div",{class:"arrayItems"}]]]]);return[ve]},getInput:({root:g})=>$e(g,"button"),editUI({typeNamespace:g,buildTypeChoices:v,format:D,formats:R,types:q,specificSchemaObject:ie,schemaFallingBack:se,schemaContent:ce,type:le,forcedState:me,topRoot:fe,value:ge,hasValue:ve,bringIntoFocus:xe=!0}){const{sparse:_e}=this,ke=this,we="record"===ie?.type||"looseRecord"===ie?.type,Se="tuple"===ie?.type,Ie=ke.array||we,Ee=we?"record":Se?"tuple":le,Ce="object"===le?1:0;let Oe=Ce-1;const Te="array"!==le&&"set"!==le&&"map"!==le&&"filelist"!==le&&!Se&&!we,Ne="map"===le||we,getSchemaValidationMessage=g=>q.getValidationMessage({message:g,schema:ie,typeSpecific:!0})??g,Ae=schemaLabel(ie?.element)??("set"===le?schemaLabel(ie?.value):"filelist"===le?schemaLabel((ie?.output)?.element):void 0),bringFocus=(g,v)=>{(xe||v)&&(g.scrollIntoView(),g.focus())},$validateLegend=function(){const g=this.$arrayItems.$getPropertyInputs(),v=g.some(g=>this!==g&&g.value===this.value)?"Duplicate property name":"";v&&(this.setCustomValidity(v),this.reportValidity()),g.some((g,v,D)=>{const R=D.some(v=>g!==v&&g.value===v.value)?"Duplicate property name":"";return(g.validity.valid||"Invalid length"!==g.validationMessage)&&(g.setCustomValidity(R),R&&g.reportValidity()),R})},buildLegend=({className:g,splice:R,itemIndex:se,typeNamespace:me,arrayItems:ge,propName:ve,required:xe,schema:Ie})=>{if(Ne){const R=v({value:void 0!==ve&&we?ve:void 0,setValue:void 0!==ve&&we,autoTrigger:void 0===ve||we,format:D,schemaOriginal:ce,schemaContent:ie?.key,typeNamespace:"key-type-choices-only"});return["legend",[["span",{class:"mapKey",title:"map"===le&&schemaLabel(ie?.key)?"(map key)":we&&schemaLabel(ie?.key)?"(record key)":void 0},["map"===le?schemaLabel(ie?.key)??"Map key":schemaLabel(ie?.key)??"Record key"," "]],["span",{dataset:{prop:"true"},className:g},[String(se)]],":",jmlExports.nbsp.repeat(2),["span",{class:"mapKeyHolder",$on:{change:[function(){this.$validateMapKey(),q.validateAllReferences({topRoot:fe})},!0]},$custom:{$validateMapKey(){const g=ge.$getMapKeySelects();setTimeout(()=>{const v=g.map(g=>g.$getValue()),D=v.findLastIndex((g,D)=>v.some((v,R)=>D!==R&&sameValueZero(g,v)));if(-1===D)return;const R=g[D];if(!R)return;const q=R.hidden?$e(R.nextElementSibling,"input,textarea"):R;q.setCustomValidity(`Duplicate ${"map"===le?"Map":"Record"} key value`),q.reportValidity()},0)}}},R.domArray]]]}const $validateLength=async function(g){if(!_e)return;const v=ge.$inputsExceedingLength(),D=v.length;if(g||!D||!/^\d+$/u.test(this.value))return;await dialogs.confirm({message:'You are attempting to add an (integer-based) array item beyond the length. Click "Ok" to allow to permit and extend the array length or "Cancel" otherwise.'});const R=$e(ge.previousElementSibling,"input"),q=Math.max(...v.map(g=>Math.trunc(Number(g.value))));R.value=String(q+1),R.$oldvalue=String(q+1),this.$validateLength(!0)};if(Te){const v=ie?.properties?.[ve],D=schemaLabel(v),ce=Object.entries(ie?.properties??{}).map(([g,v])=>v.isOptional?g:null).filter(Boolean);optionalPropertyId++;const we=_e?"append"===R?"":void 0!==ve?ve:se:ve||"";return["legend",{class:deprecatedClassSuffix(v).trim()},[_e?Ae??"Item":{"#":xe?[["b",{className:g,title:Ae??D?ve:void 0},[Ae??D??ve]]]:[["span",{className:`${g}_propertyHolder${optionalPropertyId}`},[...ie&&ve?[["b",[(()=>{const g=ie?.properties?.[ve];return g?schemaLabel(g)??ve:schemaLabel(ie?.catchall)??ve})()]]]:["Property ",["span",{className:g},[String(se)]],":"]]]]},jmlExports.nbsp.repeat(2),ie&&!xe?["datalist",{id:`optionalProperties_${optionalPropertyId}`},ce.map(g=>["option",{value:g}])]:"",["input",{list:ie&&!xe?`optionalProperties_${optionalPropertyId}`:void 0,style:{display:xe&&"arrayNonindexKeys"!==le?"none":"block"},disabled:xe&&"arrayNonindexKeys"===le,value:we,dataset:{prop:!0,object:!0,optionalPropertyId:optionalPropertyId},$custom:{async $validate(){try{try{await this.$validateLength()}catch{}this.$validateLegend(),q.validateAllReferences({topRoot:fe})}catch{}},$parseInt(){return!!/^\d+$/u.test(this.value)&&Math.trunc(Number(this.value))},$validateLegend:$validateLegend,$arrayItems:ge,$validateLength:$validateLength,$resort(g){const{alwaysFocus:v}=g,D=this.$arrayItems.$getPropertyInputs();if(1===D.length)return;const getFieldset=g=>g.closest("fieldset"),R=getFieldset(this),q=this.$parseInt();if(!1===q)return D.reverse(),void D.some(g=>{if(g===this)return!0;return"number"==typeof g.$parseInt()&&(getFieldset(g).after(R),bringFocus(this,v),ge.$redrawMoveArrows(),!0)});const getNearest=g=>{let ie;if(D.some(v=>{if(v===this)return!1;const D=v.$parseInt();if("number"!=typeof D)return ie||(ie=v),!1;const cmp=(v,D)=>g?v>D:v<D;return!(!cmp(q,D)||!(!ie||/^\d+$/u.test(ie.value)&&cmp(D,Math.trunc(Number(ie.value)))))&&(ie=v,q+(g?-1:1)===D)}),!ie)return!1;const se=g?"after":"before";return setTimeout(()=>{ie&&(getFieldset(ie)[se](R),bringFocus(this,v),ge.$redrawMoveArrows())},0),!0};getNearest()||getNearest(!0)}},$on:{input(){if(!ie&&!Ie)return;const v=$e(ge,`.${g}_propertyHolder${this.dataset.optionalPropertyId}`);DOM.removeChildren(v);const D=ie?.properties?.[this.value];jmlExports.jml("b",[D?schemaLabel(D)??this.value:schemaLabel(ie?.catchall)??this.value],v)},change(g){let v=!1;if("never"===ie?.properties?.[this.value]?.type)this.setCustomValidity("Never value"),this.reportValidity(),this.style.backgroundColor="pink",v=!0;else if(this.list&&!ke.array){if([...this.list.options].map(({value:g})=>g).includes(this.value)||"never"!==ie.catchall?.type){this.style.backgroundColor="revert-layer",this.setCustomValidity(""),this.reportValidity();const{optionalPropertyId:g}=this.dataset;let v=$e(ge,`.optionalProperties-placeholder${g}`);v||(v=$e(this.parentElement?.parentElement,".property-placeholder")?.previousElementSibling,v.previousElementSibling?.remove()),v.replaceWith(jmlExports.jml("div",{className:`optionalProperties-placeholder${g}`},[...buildTypeChoicesForProperty({propName:this.value,schema:ie?.properties?.[this.value]??ie?.catchall??{type:"any"}})]))}else this.setCustomValidity("Bad value"),this.reportValidity(),this.style.backgroundColor="pink",v=!0}if(v){const g=$e(ge,`.optionalProperties-placeholder${optionalPropertyId}`);DOM.removeChildren(g)}else this.$validate();g.stopPropagation(),this.$resort({alwaysFocus:!0})}},class:`propertyName-${me}`}]]]}const Ee="filelist"===le?schemaLabel(ie):void 0;return["legend",{class:deprecatedClassSuffix(Ie).trim()},[Ae?"":Ee?`${Ee} `:schemaLabel(Ie)?`${schemaLabel(Ie)} `:Se&&schemaLabel(ie?.rest)?`${schemaLabel(ie?.rest)} `:"Item ",["span",{dataset:{prop:!0,array:!0},className:g},[Ae?`${Ae} ${se+1}`:void 0!==ve?ve:String(se)]]]]},decrementItemIndex=g=>{_e?Oe=g.$getPropertyInputs().reduce((g,v)=>{const D=v.$parseInt();return!1!==D&&D>g?D:g},-1):Oe--},getChildSchema=(g,v)=>{if(v)return v;if(Se)return ie.rest;if(we){const v=ie;return"looseRecord"!==ie?.type||recordKeyConforms(q,v.key,g)?v?.value:{type:"unknown"}}return Ne||"set"===le?ie?.value:"filelist"===le?(ie?.output)?.element:"array"===le||"arrayNonindexKeys"===le?ie?.element:ie?.properties?.[g]},buildTypeChoicesForProperty=({propName:R,schema:q,schemaIdx:ie,autoTrigger:se})=>v({autoTrigger:se,topRoot:fe,format:D,schemaOriginal:ce,schemaIdx:ie,schemaContent:getChildSchema(R,q),state:ke.filelist?"filelistArray":Se?"arrayNonindexKeys":me??le,typeNamespace:g}).domArray;function preventAdding(g=0){if(Se)return"never"===ie?.rest?.type?(dialogs.alert(getSchemaValidationMessage('Tuple has rest type "never", so one cannot add to it.')),!0):"never"===ie?.items?.[0]?.type&&(dialogs.alert(getSchemaValidationMessage('Tuple has items type "never", so one cannot add to it.')),!0);switch(le){case"set":{if("never"===ie?.value?.type)return dialogs.alert(getSchemaValidationMessage('Set has type "never", so one cannot add to it.')),!0;const{maxSize:v}=ie??{};if(void 0!==v&&[...je.children].length+g>v)return dialogs.alert(getSchemaValidationMessage("You cannot add beyond the `maxSize` of the Set")),!0;break}case"map":{const{max:v}=ie??{};if(void 0!==v&&[...je.children].length+g>v)return dialogs.alert(getSchemaValidationMessage("You cannot add beyond the `max` of the Map")),!0;break}case"array":case"arrayNonindexKeys":{if("never"===ie?.element?.type)return dialogs.alert(getSchemaValidationMessage('Array has type "never", so one cannot add to it.')),!0;const{maxLength:v}=ie??{};if(void 0!==v&&je.$getArrayLength()+g>v)return dialogs.alert(getSchemaValidationMessage("You cannot add beyond the `maxLength` of the array")),!0;break}}return!1}const Pe=["button",{class:"addArrayElement",$custom:{$addArrayElement:function({propName:v,splice:D,alwaysFocus:se,required:ce,schema:me,schemaIdx:ge,autoTrigger:ve}){const xe=this.$getArrayItems();if(_e)if(v){const g=v.match(/^\d+$/u)&&Math.trunc(Number(v));"number"==typeof g&&(Oe=g)}else"number"==typeof D?Oe=D+1:"string"!=typeof D&&(Oe=xe.$getPropertyInputs().reduce((g,v)=>{const D=v.$parseInt();return!1!==D&&D>g?D:g},-1)+1);else Oe++;const Ne=this,Pe=`${Ee}Item`,ze=jmlExports.jml("fieldset",{dataset:ce?{required:"required"}:{},$on:{change:[()=>{"set"===le&&setTimeout(()=>{const g=Le,v=ke.getValue.call({...ke,set:!1},{root:g,stateObj:{types:q,formats:R}}),D=v.findLastIndex((g,D)=>v.some((v,R)=>D!==R&&g===v));if(-1===D)return;const ie=[...xe.children].map(g=>{const v=$e(g,"div[data-type]");return v?q.getFormControlForRoot(v):null}),se=ie[D];se&&(se.setCustomValidity("Duplicate Set value"),se.reportValidity())},10)},!0]},$custom:{$getPropertyInput(){return DOM.filterChildElements(this,["legend",`input.propertyName-${g}`]).pop()}}},[buildLegend({className:Pe,splice:D,itemIndex:Oe,typeNamespace:g,arrayItems:xe,propName:v,required:ce,schema:me})],xe);if(jmlExports.jml({"#":[["span",{class:"mapValue",title:"map"===le&&schemaLabel(ie?.value)?"(map value)":we&&schemaLabel(ie?.value)?"(record value)":void 0},["map"===le?schemaLabel(ie?.value)??"Map value":we?schemaLabel(ie?.value)??"Record value":""," "]],...!ie||v||Ie?buildTypeChoicesForProperty({propName:v,schema:me,schemaIdx:ge,autoTrigger:ve}):[jmlExports.jml("span",{className:`optionalProperties-placeholder${optionalPropertyId}`})],["span",{className:"property-placeholder"}],jmlExports.nbsp.repeat(2),["button",{disabled:Se&&ce&&ie?.items?.length-1>Oe,$on:{click(g){if(g.preventDefault(),preventAdding(1))return;let v;if(_e){const g=ze.$getPropertyInput().$parseInt();v=!1===g?"append":g}Ne.$addArrayElement({splice:v,alwaysFocus:!0,schema:me});const D=xe.lastElementChild;if(ze.after(D),_e||!Ie&&(ie||me)){const g=D.$getPropertyInput();bringFocus(g,!0)}else DOM.filterChildElements(xe,["fieldset","legend","."+Pe]).forEach((g,v)=>{g.textContent=Ae?`${Ae} ${v+Ce+1}`:String(v+Ce)});q.validateAllReferences({topRoot:fe}),xe.$redrawMoveArrows()}}},["+"]],["button",{disabled:ce,$on:{click(g){g.preventDefault(),ze.remove(),decrementItemIndex(xe),_e||ie&&!Ie||DOM.filterChildElements(xe,["fieldset","legend","."+Pe]).forEach((g,v)=>{g.textContent=Ae?`${Ae} ${v+Ce+1}`:String(v+Ce)}),q.validateAllReferences({topRoot:fe}),xe.$redrawMoveArrows()}}},["x"]],["span",{class:`${Ee}Item-arrowHolder-${g}`},[]]]},ze),Te){const g=xe.$getPropertyInputs();if(g.length){const v=g.pop();v.$validate(),v.$resort({alwaysFocus:se}),bringFocus(v,se)}}xe.$redrawMoveArrows()},$getArrayItems(){return this.previousElementSibling}},$on:{click(){preventAdding(1)||(this.$addArrayElement({alwaysFocus:!0}),q.validateAllReferences({topRoot:fe}))}}},["+ Item"]],ze=_e?["div",[["label",["Array length: ",["input",{type:"number",value:ge&&ge.length||0,step:1,size:4,class:"arrayLength",pattern:String.raw`\d`,$on:{async change(){if(preventAdding())return void(this.value=this.$oldvalue??this.defaultValue);const g=$e(this.closest(".arrayContents"),".arrayItems").$inputsExceedingLength();try{if(g.length)await dialogs.confirm({message:"Your new length will truncate the array causing items to be removed. Continue?"}),g.forEach(g=>{const v=g.closest("fieldset");if(v.matches("[data-required]")){const g=$e(Le,".arrayLength");g.value=String(Math.trunc(Number(g.value))+1)}else v.remove()}),q.validateAllReferences({topRoot:fe});else{const g=ie?.element;if(!["void","undefined"].includes(g?.type)&&(!isUnionLike(g?.type)||g?.options?.every(g=>!["void","undefined"].includes(g.type)))){const g=this.$oldvalue??this.defaultValue,v=/^\d+$/u.test(g)?Math.trunc(Number(this.value))-Math.trunc(Number(g)):0;(async()=>{for(let g=0;g<v;g++)await tick(),Le.$addArrayElement({})})()}}this.$oldvalue=this.value}catch{this.value=this.$oldvalue}}}}]]]]]:"",je=jmlExports.jml("div",{class:"arrayItems",$custom:{$swapGroup:function(g,v){const D=g.parentElement,R=D["up"===v?"previousElementSibling":"nextElementSibling"];if(R&&"fieldset"===R.nodeName.toLowerCase()){if(_e||ie&&!Ie){const g=D.$getPropertyInput(),v=R.$getPropertyInput();if("number"==typeof g.$parseInt()||"number"==typeof v.$parseInt()){const D=g.value,R=v.value;g.value=R,v.value=D}}else{const g=DOM.filterChildElements(R,["legend","span",`.${Ee}Item`])[0]??DOM.filterChildElements(R,["legend",`.${Ee}Item`])[0],v=DOM.filterChildElements(D,["legend","span",`.${Ee}Item`])[0]??DOM.filterChildElements(D,["legend",`.${Ee}Item`])[0],q=g.textContent,ie=v.textContent;g.textContent=ie,v.textContent=q}"up"===v?R.before(D):D.before(R),q.validateAllReferences({topRoot:fe}),this.$redrawMoveArrows()}},$redrawMoveArrows:function(){Se||DOM.filterChildElements(this,["fieldset",`.${Ee}Item-arrowHolder-${g}`]).forEach((g,v,D)=>{if(DOM.removeChildren(g),1===D.length)return;let R=!0,q=!0;0===v?R=!1:v===D.length-1&&(q=!1),R&&jmlExports.jml("button",{$on:{click:()=>{this.$swapGroup(g,"up")}}},[U.upArrow],g),q&&jmlExports.jml("button",{$on:{click:()=>{this.$swapGroup(g,"down")}}},[U.downArrow],g)})},$getArrayLength:function(){return Number($e(this.previousElementSibling,"input").value)},$inputsExceedingLength:function(){const g=this.$getArrayLength()-1;return this.$getPropertyInputs().filter(g=>g.value.match(/^\d+$/u)).filter(v=>{const D=Math.trunc(Number(v.value))>g;return v.setCustomValidity(D?"Invalid length":""),v.reportValidity(),D})},$getMapKeySelects(){return DOM.filterChildElements(this,["fieldset","legend:first-child","span.mapKeyHolder","select.typeChoices-key-type-choices-only"])},$getPropertyInputs(){return DOM.filterChildElements(this,["fieldset","legend",`input.propertyName-${g}`])}}}),De=["button",{$on:{click(g){g.preventDefault();const{target:v}=g,D=$e(Le,".arrayContents");D.hidden=!D.hidden,v.textContent=D.hidden?"+":"-"}}},["-"]],Ze=["div",{class:"arrayContents"},[ze,je,Pe,["button",{$on:{click(){const g=this.closest(".arrayContents"),v=$e(g,".arrayItems"),D=v.lastElementChild;D&&!D.matches("[data-required]")&&(D.remove(),decrementItemIndex(v),$e(g,".arrayItems").$redrawMoveArrows()),q.validateAllReferences({topRoot:fe})}}},["- Last item"]],["button",{$on:{click(){const g=this.closest(".arrayContents"),v=$e(g,".arrayItems"),D=$$e(g,".arrayItems > fieldset:not([data-required])");for(const g of D)g.remove();_e?decrementItemIndex(v):Oe=-1,q.validateAllReferences({topRoot:fe})}}},["x All"]]]],Ue=le,Le=jmlExports.jml("div",{dataset:{type:le,...we?{record:"true"}:{},...Se?{tuple:"true"}:{}},$custom:{$addAndSetArrayElement(g){const{propName:v,type:D,value:R,bringIntoFocus:ie,setAValue:se,schemaContent:ce,schemaIdx:le,mustBeOptional:me}=g;if("map"===Ue){if("0"===v){this.$addArrayElement({propName:v,autoTrigger:!1});const g=this.$getArrayItems(),q=DOM.filterChildElements(g,["fieldset:last-of-type","legend",".mapKeyHolder","select"])[0];return q.$setType({type:D,baseValue:R,bringIntoFocus:ie,avoidReport:!0}),q.$getTypeRoot()}}else we?this.$addArrayElement({propName:v,autoTrigger:!1,required:!1}):this.$addArrayElement({propName:v,schema:ce,autoTrigger:!1,schemaIdx:le,required:!me&&ce&&!ce.isOptional&&"never"!==ce.type});const ge=this.$getTypeChoices();ge.$setType({type:D,baseValue:R,bringIntoFocus:ie,specificSchema:void 0!==le&&isUnionLike(ce?.type)?ce.options[le]:ce,avoidReport:!0});const ve=ge.$getTypeRoot();if(se){const g=q.getTypeObject(D);g.setValue&&g.setValue({root:ve,value:R})}return q.validate({type:D,root:ve,topRoot:fe,avoidReport:!0}),ve},$getAddArrayElement(){const g=lastTypeChild(this).firstElementChild.nextElementSibling;return _e?g?.nextElementSibling:g},$addArrayElement(g){const{propName:v,splice:D,alwaysFocus:R,required:q,schema:ie,schemaIdx:se,autoTrigger:ce}=g;this.$getAddArrayElement().$addArrayElement({propName:v,splice:D,alwaysFocus:R,required:q,schema:ie,schemaIdx:se,autoTrigger:ce})},$getArrayItems(){return this.$getAddArrayElement().previousElementSibling},$getTypeChoices(){const v=this.$getArrayItems();return $e(v.lastElementChild,`fieldset > .typeChoices-${g}`)}},$on:{click(g){const v=g,D=v.target;["checkbox","radio","file","datetime-local",void 0].includes(D.type)||v.preventDefault()}}},[[ie?"span":"b",{title:schemaLabel(ie)??DOM.initialCaps(Ee).replace(/s$/u,"")},[ie?"—":DOM.initialCaps(le).replace(/s$/u,"")]],jmlExports.nbsp.repeat(2),"filelist"===le?["input",{name:g+"-filelist",multiple:!0,type:"file",$on:{change(){if(this.files)for(let g=0;g<this.files.length;g++){const v=this.files.item(g);Le.$addAndSetArrayElement({propName:String(g),type:"file",value:v,bringIntoFocus:!1,setAValue:!0,schemaContent:(ie?.output)?.element})}}}}]:"",De,Ze]);if(fe||=Le,!ve&&ie&&Se){if(!se){const g=ie;if("never"!==g?.items?.[0]?.type)for(const v of g.items)Le.$addArrayElement({schema:v,required:!0})}}else if(!ve&&ie)switch(le){case"object":if(!se)for(const[g,v]of Object.entries(ie.properties??{}))v.isOptional||"never"===v.type||Le.$addArrayElement({propName:g,required:!0});break;case"arrayNonindexKeys":{const{minLength:g=0}=ie,v=$e(Le,".arrayLength");v.value=String(g),v.$oldvalue=String(g);for(let v=0;v<g;v++)Le.$addArrayElement({required:!0});break}case"set":if(!se){const{minSize:g=0}=ie;for(let v=0;v<g;v++)Le.$addArrayElement({required:!0})}break;case"map":if(!se){const{min:g=0}=ie;for(let v=0;v<g;v++)Le.$addArrayElement({required:!0})}}return[Le]}},objectType={option:["Object"],regexEndings:[",","}"],stringRegexBegin:/^\{/u,stringRegexEnd:/^\}/u,valueMatch:g=>g&&"object"==typeof g&&"Object"===toStringTag(g),toValue(...g){return arrayType.toValue.apply(this,g)},getValue(...g){return arrayType.getValue.apply(this,g)},getInput(...g){return arrayType.getInput.apply(this,g)},viewUI({...g}){return arrayType.viewUI.call(this,{...g,type:"object"})},editUI({...g}){return arrayType.editUI.call(this,{...g,type:"object"})}},dateType={option:["Date"],dateRegex:/^(?:\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d)$/u,stringRegex(){const g=this.dateRegex;if(!this.valid){const{source:v}=g;return new RegExp("^(?:InvalidDate)|"+v.slice(1),"u")}return new RegExp(g,"u")},valueMatch:g=>"Date"===toStringTag(g),toValue:g=>({value:new Date(g)}),getInput:({root:g})=>$e(g,'input[type="datetime-local"]'),setValue({root:g,value:v}){if(v&&Number.isNaN(v.getTime()))return void $e(g,".invalidDate").$setValidity(!0);const D=new Date(Date.parse(v)).toISOString();this.getInput({root:g}).value=24===D.length?D.slice(0,-8):D.slice(3,13)},validate({root:g}){if(this.isInvalid({root:g}))return{valid:!0};const v=this.getInput({root:g}).value;return v?{valid:new RegExp(this.dateRegex,"u").test(v),message:"Must match a valid date"}:{valid:!1,message:"Must not be empty`"}},isInvalid({root:g}){return!this.valid&&$e(g,".invalidDate").checked},getValue({root:g}){return this.isInvalid({root:g})?this.toValue("NaN").value:this.toValue(this.getInput({root:g}).value).value},isValueInvalid:g=>g&&Number.isNaN(g.getTime()),viewUI({value:g,specificSchemaObject:v}){return!this.valid&&this.isValueInvalid(g)?["i",{dataset:{type:"date"},class:"InvalidDate",title:schemaLabel(v)??"(an InvalidDate)"},["InvalidDate"]]:["i",{dataset:{type:"date"},class:"ValidDate",title:schemaLabel(v)??"(a `Date`)"},[g.toISOString().slice(0,-8)]]},editUI({typeNamespace:g,specificSchemaObject:v,types:D,value:R}){const q=v,ie=R??(v?.defaultValue?new Date(v?.defaultValue):""),se=this.isValueInvalid(ie),ce=this.valid?"":jmlExports.jml("div",[["label",["Invalid date",["input",{type:"checkbox",class:"invalidDate",checked:se,name:`${g}-invalidDate`,$custom:{$setValidity(g){!0===g&&(this.checked=!0);const v=ce.previousElementSibling;v.hidden=Boolean(g);const R=v.parentElement;D.validate({type:"date",root:R})}},$on:{click(){this.$setValidity(this.checked)}}}]]]]);return["div",{dataset:{type:this.valid?"ValidDate":"date"},title:schemaLabel(v)??"Date"},[["label",{hidden:se},["Date: ",["input",{name:`${g}-date`,type:"datetime-local",value:!ie||se?"":ie.toISOString().slice(0,-8),min:q?.min?new Date(q.min).toISOString().slice(0,-8):void 0,max:q?.max?new Date(q.max).toISOString().slice(0,-8):void 0}]]],ce]]}},setType={option:["Set"],array:!0,set:!0,regexEndings:[",",")"],stringRegexBegin:/^Set\(/u,stringRegexEnd:/^\)/u,valueMatch:g=>"Set"===toStringTag(g),toValue(...g){return arrayType.toValue.apply(this,g)},getValue(...g){return arrayType.getValue.apply(this,g)},getInput(...g){return arrayType.getInput.apply(this,g)},viewUI({...g}){return arrayType.viewUI.call(this,{...g,type:"set"})},editUI({...g}){return arrayType.editUI.call(this,{...g,type:"set"})}},mapType={option:["Map"],array:!0,map:!0,regexEndings:[",",")"],stringRegexBegin:/^Map\(/u,stringRegexEnd:/^\)/u,valueMatch:g=>"Map"===toStringTag(g),toValue(...g){return arrayType.toValue.apply(this,g)},getValue(...g){return arrayType.getValue.apply(this,g)},getInput(...g){return arrayType.getInput.apply(this,g)},viewUI({...g}){return arrayType.viewUI.call(this,{...g,type:"map"})},editUI({...g}){return arrayType.editUI.call(this,{...g,type:"map"})}},undefinedType={stringRegex:/^undefined$/u,option:["Explicit undefined"],valueMatch:g=>void 0===g,toValue:()=>({value:void 0}),getValue(){return this.toValue("").value},viewUI:({specificSchemaObject:g})=>["i",{dataset:{type:"undef"},title:schemaLabel(g)??"(an `undefined`)"},["undefined"]],getInput:({root:g})=>$e(g,"input"),editUI:({typeNamespace:g,specificSchemaObject:v})=>["div",{dataset:{type:"undef"},title:schemaLabel(v)??"Undefined"},[["label",["Undefined",["input",{type:"checkbox",name:`${g}-undef`,disabled:!0,checked:!0}]]]]]},regexpType={option:["RegExp"],stringRegex(g){const v=g?"(?:":"(";return new RegExp(`^/${v}.*)/${v}[${this.allowedFlags.join("")}]{0,${this.allowedFlags.length}})$`,"u")},valueMatch:g=>"RegExp"===toStringTag(g),toValue(g){if("function"!=typeof this.stringRegex)throw new TypeError("Guard for TS");const[,v,D]=g.match(this.stringRegex());return{value:new RegExp(v,D)}},getInput:({root:g})=>$e(g,"input"),setValue({root:g,value:v}){this.getInput({root:g}).value=v.source,this.getSelect({root:g}).$set([...v.flags])},getSelect:({root:g})=>$e(g,"select"),validate({root:g}){try{return this.getValue({root:g}),{valid:!0}}catch(g){return{valid:!1,message:g.message}}},getValue({root:g}){return new RegExp(this.getInput({root:g}).value,[...this.getSelect({root:g}).selectedOptions].reduce((g,v)=>g+v.value,""))},allowedFlags:["g","i","m","u","y","s","v"],viewUI:({value:g,specificSchemaObject:v})=>["i",{dataset:{type:"regexp"},title:schemaLabel(v)??"(a `RegExp`)"},[String(g)]],editUI({typeNamespace:g,specificSchemaObject:v,types:D,value:R={source:"",flags:""}}){const q=jmlExports.jml("select",{multiple:!0,size:5,$custom:{$set(g){[...this.options].forEach(v=>{v.selected=g.includes(v.value)})}}},this.allowedFlags.map(g=>["option",{selected:R.flags.includes(g)},[g]])),ie=jmlExports.jml("div",{dataset:{type:"regexp"},title:schemaLabel(v)??"RegExp"},[["label",["Source ",["input",{name:`${g}-regexp`,type:"text",value:R.source,$on:{input(){D.validate({type:"regexp",root:ie})},change(){D.validate({type:"regexp",root:ie})}}}]]],["br"],["label",["Flags ",q]]]);return q.addEventListener("change",()=>{D.validate({type:"regexp",root:ie})}),[ie]}},BooleanObjectType={option:["BooleanObject"],stringRegex:/^Boolean\((.*)\)$/u,valueMatch:g=>"Boolean"===toStringTag(g)&&"object"==typeof g,toValue:g=>({value:new Boolean("true"===g)}),getInput:({root:g})=>$e(g,"input"),getValue({root:g}){return this.toValue(String(this.getInput({root:g}).checked)).value},setValue({root:g,value:v}){$$e(g,"input")[v.valueOf()?0:1].checked=!0},viewUI:({value:g,specificSchemaObject:v})=>["i",{dataset:{type:"BooleanObject"},title:schemaLabel(v)??"(a Boolean Object)"},[v?String(g):`Boolean(${g})`]],ct:0,editUI({typeNamespace:g,specificSchemaObject:v,value:D=new Boolean(!0)}){return this.ct++,["div",{dataset:{type:"BooleanObject"},title:schemaLabel(v)??"Boolean object"},[["label",["True",["input",{type:"radio",name:`${g}-BooleanObject${this.ct}`,value:"true",checked:D.valueOf()}]]],["label",["False",["input",{type:"radio",name:`${g}-BooleanObject${this.ct}`,value:"false",checked:!D.valueOf()}]]]]]}},NumberObjectType={option:["NumberObject"],stringRegex:/^Number\((.*)\)$/u,valueMatch:g=>"Number"===toStringTag(g)&&"object"==typeof g,toValue:g=>({value:new Number(g)}),validate:({root:g})=>numberType.validate({root:g}),getInput:({root:g})=>$e(g,"input"),getValue({root:g}){return this.toValue(this.getInput({root:g}).value).value},setValue({root:g,value:v}){this.getInput({root:g}).value=String(v)},viewUI:({value:g,specificSchemaObject:v})=>["i",{dataset:{type:"NumberObject"},title:schemaLabel(v)??"(a Number Object)"},[v?String(g):`Number(${g})`]],editUI:({typeNamespace:g,specificSchemaObject:v,value:D})=>["div",{dataset:{type:"NumberObject"},title:schemaLabel(v)??"Number object"},[["input",{name:`${g}-NumberObject`,type:"number",value:D,step:"any"}]]]},StringObjectType={stringRegex:/^String\(([^)]*)\)$/u,valueMatch:g=>"String"===toStringTag(g)&&"object"==typeof g,toValue:g=>({value:new String(g)}),option:["StringObject"],getInput:({root:g})=>$e(g,"textarea"),getValue({root:g}){return this.toValue(this.getInput({root:g}).value).value},setValue({root:g,value:v}){this.getInput({root:g}).value=v},viewUI:({value:g,specificSchemaObject:v})=>["span",{dataset:{type:"StringObject"},title:schemaLabel(v)??"(a String Object)"},[v?"":["i",["String("]],["span",[g.valueOf()]],v?"":["i",[")"]]]],editUI:({typeNamespace:g,specificSchemaObject:v,value:D=""})=>["div",{dataset:{type:"StringObject"},title:schemaLabel(v)??"String object"},[["textarea",{name:`${g}-StringObject`},[D]]]]},SpecialRealNumberSuperType={option:["Special Real Number",{title:"`Infinity`, `-Infinity`, `-0`"}],childTypes:["infinity","negativeInfinity","negativeZero"],stringRegex:/^(?:-?Infinity|-0)$/u,valueMatch:g=>Object.is(g,-0)||g===1/0||g===-1/0,toValue:g=>({value:"-0"===g?-0:"Infinity"===g?1/0:-1/0}),getSelect:({root:g})=>$e(g,"select"),getValue({root:g}){return this.toValue(this.getSelect({root:g}).value).value},setValue({root:g,value:v}){this.getSelect({root:g}).value=Object.is(v,-0)?"-0":String(v)},viewUI({value:g,specificSchemaObject:v}){const D=Object.is(g,-0);return["i",{dataset:{type:"SpecialRealNumber"},title:schemaLabel(v)??(D?"(negative zero)":`(${String(g)})`)},[D?"-0":String(g)]]},getInput:({root:g})=>$e(g,"select"),editUI:({typeNamespace:g,specificSchemaObject:v,value:D=1/0})=>["div",{dataset:{type:"SpecialRealNumber"},title:schemaLabel(v)??"Special Real Number"},[["label",[["select",{name:`${g}-SpecialRealNumber`},[["option",{value:"Infinity",selected:D===1/0},["Infinity"]],["option",{value:"-Infinity",selected:D===-1/0},["-Infinity"]],["option",{value:"-0",selected:Object.is(D,-0)},["-0"]]]]]]]]},SpecialNumberSuperType={option:["Special Number",{title:"`NaN`, `Infinity`, `-Infinity`, `-0`"}],childTypes:["infinity","negativeInfinity","nan","negativeZero"],stringRegex:/^(?:NaN|-?Infinity|-0)$/u,toValue:g=>({value:"-0"===g?-0:"NaN"===g?NaN:"Infinity"===g?1/0:-1/0}),getSelect:({root:g})=>$e(g,"select"),getInput:({root:g})=>$e(g,"select"),getValue({root:g}){return this.toValue(this.getSelect({root:g}).value).value},setValue({root:g,value:v}){this.getSelect({root:g}).value=Object.is(v,-0)?"-0":String(v)},viewUI:({value:g})=>["i",{dataset:{type:"SpecialNumber"}},[Object.is(g,-0)?"-0":String(g)]],editUI:({typeNamespace:g,value:v=NaN})=>["div",{dataset:{type:"SpecialNumber"}},[["label",["Special number: ",["select",{name:`${g}-SpecialNumber`},[["option",{value:"NaN",selected:Number.isNaN(v)},["NaN"]],["option",{value:"Infinity",selected:v===1/0},["Infinity"]],["option",{value:"-Infinity",selected:v===-1/0},["-Infinity"]],["option",{value:"-0",selected:Object.is(v,-0)},["-0"]]]]]]]]},errorType={option:["Error"],stringRegex:/^Error\((.*)\)$/u,valueMatch:g=>"Error"===toStringTag(g)&&hasConstructorOf(g,Error),toValue(g){const v=JSON.parse(g);return{value:N.error.revive(v,{})}},getInput:({root:g})=>$e(g,"input:not([type])"),setValue({root:g,value:v}){return"string"==typeof v.message?$e(g,"input.message:not([type])").value=v.message:$e(g,"input.message[type=checkbox]").click(),"string"==typeof v.name?$e(g,"input.name:not([type])").value=v.name:$e(g,"input.name[type=checkbox]").click(),"string"==typeof v.fileName?$e(g,"input.fileName:not([type])").value=v.fileName:$e(g,"input.fileName[type=checkbox]").click(),"number"==typeof v.lineNumber?$e(g,"input.lineNumber[type=number]").value=v.lineNumber:$e(g,"input.lineNumber[type=number]").value="","number"==typeof v.columnNumber?$e(g,"input.columnNumber[type=number]").value=v.columnNumber:$e(g,"input.columnNumber[type=number]").value="","string"==typeof v.stack?$e(g,"textarea.stack:not([type])").value=v.stack:$e(g,"input.stack[type=checkbox]").click(),(async()=>{await tick(),"object"==typeof v.cause&&($e(g,".cause").click(),await this.setValue({root:$e(g,".causeContents"),value:v.cause}))})()},getValue({root:g}){let v;if($e(g,"input.message[type=checkbox]").checked){const D=$e(g,"input.message:not([type])").value;v=new Error(D)}else v=new Error,v.message=void 0;if($e(g,"input.name[type=checkbox]").checked){const D=$e(g,"input.name:not([type])").value;v.name=D}else v.name=void 0;if($e(g,"input.fileName[type=checkbox]").checked){const D=$e(g,"input.fileName:not([type])").value;v.fileName=D}else v.fileName=void 0;if($e(g,"input.stack[type=checkbox]").checked){const D=$e(g,"textarea.stack:not([type])").value;v.stack=D}else v.stack=void 0;const D=$e(g,"input.lineNumber[type=number]").value;v.lineNumber=""===D?void 0:Number(D);const R=$e(g,"input.columnNumber[type=number]").value;v.columnNumber=""===R?void 0:Number(R);const q=$e(g,".causeContents");return q.children.length&&(v.cause=this.getValue({root:q})),v},viewUI({value:g,specificSchemaObject:v,types:D,format:R}){return["div",{dataset:{type:"error"}},[["b",{class:"emphasis",title:schemaLabel(v)?"(an Error)":void 0},[schemaLabel(v)??"Error"]],..."string"==typeof g.message?[["div",[["b",["Message: "]],["span",[g.message]]]]]:[],..."string"==typeof g.name?[["div",[["b",["Name: "]],["span",[g.name]]]]]:[],..."string"==typeof g.fileName?[["div",[["b",["File name: "]],["span",[g.fileName]]]]]:[],..."number"==typeof g.lineNumber?[["div",[["b",["Line number: "]],["span",[g.lineNumber]]]]]:[],..."number"==typeof g.columnNumber?[["div",[["b",["Column number: "]],["span",[g.columnNumber]]]]]:[],..."string"==typeof g.stack?[["div",[["b",["Stack: "]],["span",[g.stack]]]]]:[],["b",["Cause: "]],["div",{class:"causeHolder"},[["button",{$on:{click(g){g.preventDefault();const{target:v}=g,D=v.nextElementSibling;D.hidden=!D.hidden,v.textContent=D.hidden?"+":"-"}}},["-"]],["div",{class:"causeContents"},[g.cause?this.viewUI({format:R,value:g.cause,types:D}):""]]]]]]},editUI({typeNamespace:g,types:v,specificSchemaObject:D,value:R={message:"",name:"",fileName:"",lineNumber:"",columnNumber:"",stack:"",cause:void 0}}){const click=function(g){this.parentNode.nextElementSibling.hidden=!g.target.checked},q=this;"object"==typeof R.cause&&setTimeout(()=>{$e(ie,".cause").click()},0);const ie=jmlExports.jml("div",{dataset:{type:"error"},title:schemaLabel(D)??"Error"},[["div",[["label",["Message? ",["input",{class:"message",type:"checkbox",checked:"string"==typeof R.message,$on:{click:click}}]]]," ",["label",{hidden:"string"!=typeof R.message},["Message ",["input",{class:"message",name:`${g}-error-message`,value:R.message}]]]]],["div",[["label",["Name? ",["input",{class:"name",type:"checkbox",checked:"string"==typeof R.name,$on:{click:click}}]]]," ",["label",{hidden:"string"!=typeof R.name},["Name ",["input",{class:"name",name:`${g}-error-name`,value:R.name}]]]]],["br"],["div",[["label",["File name? ",["input",{class:"fileName",type:"checkbox",checked:"string"==typeof R.fileName,$on:{click:click}}]]]," ",["label",{hidden:"string"!=typeof R.fileName},["File name ",["input",{class:"fileName",name:`${g}-error-fileName`,value:R.fileName}]]]]],["label",["Line number ",["input",{class:"lineNumber",name:`${g}-error-lineNumber`,type:"number",step:"any",value:R.lineNumber}]]],["br"],["label",["Column number ",["input",{class:"columnNumber",name:`${g}-error-columnNumber`,type:"number",step:"any",value:R.columnNumber}]]],["div",[["label",["Stack? ",["input",{class:"stack",type:"checkbox",checked:"string"==typeof R.stack,$on:{click:click}}]]],["label",{hidden:"string"!=typeof R.stack},["Stack ",["textarea",{class:"stack",name:`${g}-error-stack`},[R.stack]]]]]],["label",["Cause? ",["input",{class:"cause",type:"checkbox",$on:{click(D){click.call(this,D);const ie=this.parentElement.nextElementSibling,se=$e(ie,".causeContents");if(!se?.children.length){const D=q.editUI({typeNamespace:g,types:v,value:R.cause});jmlExports.jml(...D,se)}}}}]]],["div",{class:"causeHolder",hidden:!0},[["label",["Cause "]],["button",{$on:{click(g){g.preventDefault();const{target:v}=g,D=$e(v.closest(".causeHolder"),".causeContents");D.hidden=!D.hidden,v.textContent=D.hidden?"+":"-"}}},["-"]],["div",{class:"causeContents"}]]]]);return[ie]}};function getConstructor(g){const v=Function.prototype.toString.call(g);return v.slice(9,v.indexOf("("))}const specialErrorsMap=new Map([["TypeError",TypeError],["RangeError",RangeError],["SyntaxError",SyntaxError],["ReferenceError",ReferenceError],["EvalError",EvalError],["URIError",URIError]]);"undefined"!=typeof AggregateError&&specialErrorsMap.set("AggregateError",AggregateError),"undefined"!=typeof InternalError&&specialErrorsMap.set("InternalError",InternalError);const specialErrors=[...specialErrorsMap.keys()],errorsSpecialType={option:["Special errors"],valueMatch:g=>[TypeError,RangeError,SyntaxError,ReferenceError,EvalError,URIError,AggregateError].some(v=>hasConstructorOf(g,v)),childTypes:specialErrors.map(g=>g.toLowerCase()),stringRegex:new RegExp("^(?<errorClass>"+specialErrors.join("|")+String.raw`)\((?<innerContent>.*)\)$`,"u"),toValue(g,v){const{groups:{errorClass:D}={}}=v.match,R=JSON.parse(g);return{value:C[D.toLowerCase()].revive(R,{})}},getInput:({root:g})=>$e(g,"input:not([type])"),setValue({root:g,value:v}){const D=$e(g,".errorType");return D.value=getConstructor(v.constructor),D.$hideAggregateErrorsLabel(),"string"==typeof v.message?$e(g,"input.message:not([type])").value=v.message:$e(g,"input.message[type=checkbox]").click(),"string"==typeof v.name?$e(g,"input.name:not([type])").value=v.name:$e(g,"input.name[type=checkbox]").click(),"string"==typeof v.fileName?$e(g,"input.fileName:not([type])").value=v.fileName:$e(g,"input.fileName[type=checkbox]").click(),"number"==typeof v.lineNumber?$e(g,"input.lineNumber[type=number]").value=v.lineNumber:$e(g,"input.lineNumber[type=number]").value="","number"==typeof v.columnNumber?$e(g,"input.columnNumber[type=number]").value=v.columnNumber:$e(g,"input.columnNumber[type=number]").value="","string"==typeof v.stack?$e(g,"textarea.stack:not([type])").value=v.stack:$e(g,"input.stack[type=checkbox]").click(),(async()=>{if(await tick(),"object"==typeof v.cause&&($e(g,".cause").click(),await this.setValue({root:$e(g,".causeContents"),value:v.cause})),Array.isArray(v.errors)){const D=$e(g,"input.aggregateErrors");D.click(),D.$emptyAggregateErrorsContents(),D.$populateContents(v.errors)}})()},getValue({root:g,stateObj:v}){const D=specialErrorsMap.get($e(g,".errorType").value);if(!D)throw new Error("Not yet instantiated");let R;const q=D;if($e(g,"input.message[type=checkbox]").checked){const ie=$e(g,"input.message:not([type])").value;if("AggregateError"===getConstructor(D)){const D=$e(g,".aggregateErrorsContents").firstElementChild;if(!D)throw new Error("Not yet instantiated");R=new q(arrayType.getValue({stateObj:v,root:D}),ie)}else R=new q(ie)}else{if("AggregateError"===getConstructor(D)){const D=$e(g,".aggregateErrorsContents").firstElementChild;if(!D)throw new Error("Not yet instantiated");R=new q(arrayType.getValue({stateObj:v,root:D}))}else R=new q;R.message=void 0}if($e(g,"input.name[type=checkbox]").checked){const v=$e(g,"input.name:not([type])").value;R.name=v}else R.name=void 0;if($e(g,"input.fileName[type=checkbox]").checked){const v=$e(g,"input.fileName:not([type])").value;R.fileName=v}else R.fileName=void 0;if($e(g,"input.stack[type=checkbox]").checked){const v=$e(g,"textarea.stack:not([type])").value;R.stack=v}else R.stack=void 0;const ie=$e(g,"input.lineNumber[type=number]").value;R.lineNumber=""===ie?void 0:Number(ie);const se=$e(g,"input.columnNumber[type=number]").value;R.columnNumber=""===se?void 0:Number(se);const ce=$e(g,".causeContents");return ce.children.length&&(R.cause=this.getValue({stateObj:v,root:ce})),R},viewUI({value:g,types:v,format:D,specificSchemaObject:R,typeNamespace:q,resultType:ie}){const se=getConstructor(g.constructor);return["div",{dataset:{type:"errors"},title:schemaLabel(R)?`(an Error ${se})`:void 0},[schemaLabel(R)??["div",[["b",["Error type: "]],["span",[se]]]],..."string"==typeof g.message?[["div",[["b",["Message: "]],["span",[g.message]]]]]:[],..."string"==typeof g.name?[["div",[["b",["Name: "]],["span",[g.name]]]]]:[],..."string"==typeof g.fileName?[["div",[["b",["File name: "]],["span",[g.fileName]]]]]:[],..."number"==typeof g.lineNumber?[["div",[["b",["Line number: "]],["span",[g.lineNumber]]]]]:[],..."number"==typeof g.columnNumber?[["div",[["b",["Column number: "]],["span",[g.columnNumber]]]]]:[],..."string"==typeof g.stack?[["div",[["b",["Stack: "]],["span",[g.stack]]]]]:[],["b",["Cause: "]],["div",{class:"causeHolder"},[["button",{$on:{click(g){g.preventDefault();const{target:v}=g,D=v.nextElementSibling;D.hidden=!D.hidden,v.textContent=D.hidden?"+":"-"}}},["-"]],["div",{class:"causeContents"},[g.cause?this.viewUI({format:D,value:g.cause,types:v}):""]]]],"AggregateError"===se?["div",[["b",["Errors "]],["div",{class:"aggregateErrorsHolder"},[["button",{$on:{click(g){g.preventDefault();const{target:v}=g,D=v.nextElementSibling;D.hidden=!D.hidden,v.textContent=D.hidden?"+":"-"}}},["-"]],["div",{class:"aggregateErrorsContents"},[g.errors?(()=>{const[R]=arrayType.viewUI({typeNamespace:q,resultType:ie,format:D,type:"arrayNonindexKeys",value:[],types:v});return g.errors.forEach((g,v)=>{R.$addAndSetArrayElement({propName:String(v),type:"Error"===getConstructor(g.constructor)?"error":"errors",value:g,bringIntoFocus:!1})}),R})():""]]]]]]:""]]},editUI({typeNamespace:g,specificSchemaObject:v,types:D,buildTypeChoices:R,format:q,topRoot:ie,bringIntoFocus:se,value:ce={message:"",name:"",fileName:"",lineNumber:"",columnNumber:"",stack:"",cause:void 0,errors:void 0}}){const click=function(g){this.parentNode.nextElementSibling.hidden=!g.target.checked},le=this;"object"==typeof ce.cause&&setTimeout(()=>{$e(me,".cause").click()},0),Array.isArray(ce.errors)&&setTimeout(()=>{$e(me,"input.aggregateErrors").click()},0);const me=jmlExports.jml("div",{dataset:{type:"errors"},title:schemaLabel(v)??"Special error"},[["div",[["label",["Special error type ",["select",{class:"errorType",$custom:{$hideAggregateErrorsLabel(){$e(this.parentElement?.closest("div[data-type=errors]"),"label.aggregateErrors").hidden="AggregateError"!==this.value}},$on:{change(){this.$hideAggregateErrorsLabel()}}},[["option",{value:""},["Select an error type"]],...specialErrors.map(g=>["option",{selected:g===getConstructor(ce.constructor)?"selected":void 0},[g]])]]]],["br"],["label",["Message? ",["input",{class:"message",type:"checkbox",checked:"string"==typeof ce.message,$on:{click:click}}]]]," ",["label",{hidden:"string"!=typeof ce.message},["Message ",["input",{class:"message",name:`${g}-errors-message`,value:ce.message}]]]]],["div",[["label",["Name? ",["input",{class:"name",type:"checkbox",checked:"string"==typeof ce.name,$on:{click:click}}]]]," ",["label",{hidden:"string"!=typeof ce.name},["Name ",["input",{class:"name",name:`${g}-errors-name`,value:ce.name}]]]]],["br"],["div",[["label",["File name? ",["input",{class:"fileName",type:"checkbox",checked:"string"==typeof ce.fileName,$on:{click:click}}]]]," ",["label",{hidden:"string"!=typeof ce.fileName},["File name ",["input",{class:"fileName",name:`${g}-errors-fileName`,value:ce.fileName}]]]]],["label",["Line number ",["input",{class:"lineNumber",name:`${g}-errors-lineNumber`,type:"number",step:"any",value:ce.lineNumber}]]],["br"],["label",["Column number ",["input",{class:"columnNumber",name:`${g}-errors-columnNumber`,type:"number",step:"any",value:ce.columnNumber}]]],["div",[["label",["Stack? ",["input",{class:"stack",type:"checkbox",checked:"string"==typeof ce.stack,$on:{click:click}}]]],["label",{hidden:"string"!=typeof ce.stack},["Stack ",["textarea",{class:"stack",name:`${g}-errors-stack`},[ce.stack??""]]]]]],["label",["Cause? ",["input",{class:"cause",type:"checkbox",$on:{click(v){click.call(this,v);const q=this.parentElement.nextElementSibling,ie=$e(q,".causeContents");if(!ie?.children.length){const v=le.editUI({buildTypeChoices:R,typeNamespace:g,types:D,value:ce.cause});jmlExports.jml(...v,ie)}}}}]]],["div",{class:"causeHolder",hidden:!0},[["label",["Cause "]],["button",{$on:{click(g){g.preventDefault();const{target:v}=g,D=$e(v.closest(".causeHolder"),".causeContents");D.hidden=!D.hidden,v.textContent=D.hidden?"+":"-"}}},["-"]],["div",{class:"causeContents"}]]],["br"],["label",{class:"aggregateErrors"},{hidden:!ce.errors},["Aggregate errors? ",["input",{class:"aggregateErrors",type:"checkbox",$custom:{$emptyAggregateErrorsContents(){const g=this.parentElement.nextElementSibling,v=$e(g,".aggregateErrorsContents");for(;v?.firstChild;)v?.firstChild.remove()},$populateContents(v){const ce=this.parentElement.nextElementSibling,le=$e(ce,".aggregateErrorsContents");if(!le?.children.length){const[ce]=arrayType.editUI({typeNamespace:g,types:D,buildTypeChoices:R,format:q,type:"array",topRoot:ie,bringIntoFocus:se,forcedState:"errorsArray",value:[]});v.forEach((g,v)=>{ce.$addAndSetArrayElement({propName:String(v),type:"Error"===getConstructor(g.constructor)?"error":"errors",value:g,bringIntoFocus:!1,setAValue:!0})}),jmlExports.jml(ce,le)}}},$on:{click(g){click.call(this,g);const v=this;ce.errors?v.$populateContents(ce.errors):v.$populateContents([{message:"",name:"",stack:""}])}}}]]],["div",{class:"aggregateErrorsHolder",hidden:!0},[["label",["Aggregate errors "]],["button",{$on:{click(g){g.preventDefault();const{target:v}=g,D=$e(v.closest(".aggregateErrorsHolder"),".aggregateErrorsContents");D.hidden=!D.hidden,v.textContent=D.hidden?"+":"-"}}},["-"]],["div",{class:"aggregateErrorsContents"}]]]]);return[me]}};let audioCtx;function visualize(g,v){audioCtx||(audioCtx=new AudioContext);const D=v.getContext("2d"),R=audioCtx.createMediaStreamSource(g),q=audioCtx.createAnalyser();q.fftSize=2048;const ie=q.frequencyBinCount,se=new Uint8Array(ie);R.connect(q),function draw(){const g=v.width,R=v.height;requestAnimationFrame(draw),q.getByteTimeDomainData(se),D.fillStyle="rgb(200, 200, 200)",D.fillRect(0,0,g,R),D.lineWidth=2,D.strokeStyle="rgb(0, 0, 0)",D.beginPath();const ce=1*g/ie;let le=0;for(let g=0;g<ie;g++){const v=se[g]/128*R/2;0===g?D.moveTo(le,v):D.lineTo(le,v),le+=ce}D.lineTo(v.width,v.height/2),D.stroke()}()}async function getUserMedia(g){let v=null;try{v=await navigator.mediaDevices.getUserMedia(g)}catch(g){return console.error("err",g),null}return v}async function startScreenCapture(g){let v=null;try{v=await navigator.mediaDevices.getDisplayMedia(g)}catch(g){console.error(`Error: ${g}`)}return v}const commonMimeTypes=[...new Set([...Object.keys(types$1),...Object.keys(types)])].toSorted((g,v)=>g.localeCompare(v));let fileContentTypeListId=0;function checkFileSize(g,v,D){return void 0!==v&&g<v?`File size (${g} bytes) is below the minimum of ${v} bytes`:void 0!==D&&g>D?`File size (${g} bytes) exceeds the maximum of ${D} bytes`:null}function checkFileMimeType(g,v){return v&&v.length>0&&!v.includes(g)?`File type (${g||"(none)"}) is not among the allowed MIME types: ${v.join(", ")}`:null}function checkFile(g,v,D,R){return g?checkFileSize(g.size,v,D)??checkFileMimeType(g.type,R):"File data is required"}function getDateString(g){const v=new Date(g);return new Date(v.getTime()-6e4*v.getTimezoneOffset()).toISOString().slice(0,-1)}function createFileForBinary(g,v){const D=g.$value;return new File([void 0===v.stringContents?D&&"File"===Object.prototype.toString.call(D).slice(8,-1)?D:"":v.stringContents],void 0===v.name?D?.name??"":v.name,{type:void 0===v.type?D?.type??"":v.type,lastModified:void 0===v.lastModified?D?.lastModified??0:v.lastModified})}function newFileForBinary(g,v){const D=createFileForBinary(g,v);return g.$value=D,D}function binaryButton$1(g,v,D,R,q,ie){return["button",{class:"viewBinary",$custom:{$value:g,$min:D,$max:R,$mime:q},$on:{click(g){const v=this;g.preventDefault(),v.$value&&"File"===Object.prototype.toString.call(v.$value).slice(8,-1)||newFileForBinary(v,{});const se=new FileReader;se.addEventListener("load",async function(){const g=await dialogs.makeSubmitDialog({submitText:"Save",submit(){const se=$e(g,".view-binary"),ce=createFileForBinary(v,{stringContents:se.value}),le=checkFile(ce,D,R,q);le?dialogs.alert(ie?.(le)??le):($e(v.closest('[data-type="file"]'),"fieldset.fileMetaData").$setValue(ce),g.close())},children:[["div",["Binary source",["br"],["textarea",{class:"view-binary"},[se.result??""]]]]]})}),se.addEventListener("error",async function(){console.error(se.error),await dialogs.alert(se.error.message)}),se.readAsBinaryString(v.$value)}}},[v?"Edit binary data":"View binary data"]]}const fileType={option:["File"],stringRegex:/^File\((.*)\)$/u,valueMatch:g=>"File"===toStringTag(g),validate({root:g}){const v=this.getInput({root:g}),D=checkFile(v.$value,v.$min,v.$max,v.$mime);return{valid:!D,message:D??void 0}},toValue(g){const v=JSON.parse(g);return{value:new File([v.stringContents],v.name,{type:v.type,lastModified:v.lastModified})}},getInput:({root:g})=>$e(g,"button.viewBinary"),setValue({root:g,value:v}){$e(g,"fieldset.fileMetaData").$setValue(v)},getValue({root:g}){return this.getInput({root:g}).$value},viewUI:({value:g,specificSchemaObject:v})=>["div",{dataset:{type:"file"}},[["b",{class:"emphasis",title:schemaLabel(v)?"(a File)":void 0},[schemaLabel(v)??"File"]],["br"],["br"],["b",["Name "]],g.name,["br"],["b",["Size (in bytes) "]],String(g.size),["br"],["b",["Content type "]],g.type,["br"],["b",["Last modified date "]],getDateString(g.lastModified),["br"],g.type.startsWith("text/")||"application/json"===g.type?(()=>{const v=jmlExports.jml("div"),D=new FileReader;return D.addEventListener("load",function(){v.append(jmlExports.jml("div",["Text source",["br"],["textarea",{class:"view-text"},[D.result??""]]]))}),D.addEventListener("error",function(){console.error(D.error),v.append(D.error.message)}),D.readAsBinaryString(g),v})():binaryButton$1(g),g.type.startsWith("video/")?(()=>{const v=URL.createObjectURL(g),D=jmlExports.jml("video",{src:v,class:"video",$on:{loadeddata(){/iPad|iPhone|iPod|Safari/u.test(navigator.userAgent)||URL.revokeObjectURL(v)}}});return["div",[D,["button",{class:"play",$on:{click(g){g.preventDefault(),D.play()}}},["Play"]],["button",{class:"pause",$on:{click(g){g.preventDefault(),D.pause()}}},["Pause"]],["button",{class:"replay",$on:{click(g){g.preventDefault(),D.pause(),D.currentTime=0,D.play()}}},["Replay"]]]]})():"",g.type.startsWith("audio/")?(()=>{const v=URL.createObjectURL(g),D=jmlExports.jml("audio",{src:v,class:"audio",$on:{loadeddata(){URL.revokeObjectURL(v)}}});return["div",[D,["button",{class:"play",$on:{click(g){g.preventDefault(),D.play()}}},["Play"]],["button",{class:"pause",$on:{click(g){g.preventDefault(),D.pause()}}},["Pause"]],["button",{class:"replay",$on:{click(g){g.preventDefault(),D.pause(),D.currentTime=0,D.play()}}},["Replay"]]]]})():"","application/pdf"===g.type?(()=>{const v=URL.createObjectURL(g);return jmlExports.jml("iframe",{class:"PDF",src:v,$on:{load(){URL.revokeObjectURL(v)}}})})():"",g.type.startsWith("image/")?["img",{class:"imageView",src:URL.createObjectURL(g),$on:{load(){URL.revokeObjectURL(this.src)}}}]:""]],editUI({typeNamespace:g,specificSchemaObject:v,types:D,value:R={}}){const q=v,{min:ie,max:se,mime:ce}=q??{},getValidationMessage=g=>D.getValidationMessage({message:g,schema:v,typeSpecific:!0});fileContentTypeListId++;const le=`fileContentTypes-${fileContentTypeListId}`,me=ce&&ce.length>0?ce:commonMimeTypes;return["div",{dataset:{type:"file"},title:schemaLabel(v)??"File"},[["fieldset",{class:"fileMetaData",$custom:{$setValue(g){const v=this;$e(v,".fileName").value=g.name,$e(v,".size").value=String(g.size);const D=$e(v,".contentType");D.value=g.type,D.setCustomValidity(getValidationMessage(checkFileMimeType(g.type,ce))??""),$e(v,".lastModified").value="number"==typeof g.lastModified?getDateString(g.lastModified):"";const R=$e(v,"button.viewBinary");R.$value="number"==typeof g.lastModified?g:void 0;const q=checkFile(R.$value,R.$min,R.$max,R.$mime);R.setCustomValidity(getValidationMessage(q)??"")}}},[["legend",["Current file data"]],["label",["Name ",["input",{size:50,class:"fileName",value:R.name??"",$on:{change(){newFileForBinary($e(this.parentElement?.parentElement,"button.viewBinary"),{name:this.value})}}}]]],["br"],["label",[`Size (in bytes)${void 0!==ie||void 0!==se?` (min: ${ie??0}${void 0===se?"":`, max: ${se}`})`:""} `,["input",{type:"number",step:"1",disabled:!0,class:"size",value:String(R.size)}]]],["br"],["label",[`Content type${ce&&ce.length>0?` (allowed: ${ce.join(", ")})`:""} `,["input",{class:"contentType",value:R.type??"",list:le,$on:{change(){const g=this,v=$e(this.parentElement?.parentElement,"button.viewBinary"),D=g.value,R=checkFile(createFileForBinary(v,{type:D}),ie,se,ce),q=getValidationMessage(R);if(g.setCustomValidity(q??""),R)return dialogs.alert(q??R),void g.reportValidity();newFileForBinary(v,{type:D})}}}]]],["datalist",{id:le,class:"contentTypeOptions"},me.map(g=>["option",[g]])],["br"],["label",["Last modified date ",["input",{type:"datetime-local",class:"lastModified",step:.001,value:R.lastModified?getDateString(R.lastModified):void 0,$on:{change(){const g=$e(this.parentElement?.parentElement,"button.viewBinary"),v=this.value;newFileForBinary(g,{lastModified:new Date(v).getTime()})}}}]]],["br"],binaryButton$1(R,!0,ie,se,ce,getValidationMessage),["button",{class:"clearData",$on:{click(g){g.preventDefault(),this.parentElement.$setValue({name:"",size:"",type:"",lastModified:""})}}},["Clear data"]]]],["fieldset",[["legend",["Supply file through upload"]],["label",["File ",["input",{$on:{change(){const g=this;if(!g.files)return;const v=g.files[0],D=checkFile(v,ie,se,ce);if(D)return dialogs.alert(getValidationMessage(D)??D),void(g.value="");const R=(this.parentElement?.parentElement)?.previousElementSibling;R.$setValue(v)}},accept:ce?.join(","),name:`${g}-file`,type:"file"}]]]]],["fieldset",[["legend",["Supply file through recording"]],(()=>{const g=jmlExports.jml("select",{class:"device",$on:{async change(){const v=this.nextElementSibling?.nextElementSibling;$e(v,"img.photo").hidden=!0;const D=$e(v,"video.previewMedia"),R=jmlExports.jml("video",{class:"previewMedia"});if(D.$stream){D.$stream.getTracks().forEach(g=>{g.stop()}),D.srcObject=null}D.replaceWith(R);const q=$e(g.nextElementSibling,".takeSnapshot"),ie=$e(g.nextElementSibling,".recordMedia");$e(g.nextElementSibling?.nextElementSibling,"div.recordedMedia").hidden=!0;const se=$e(v,"canvas.visualizer");let ce,le;switch(R.$screenShare=!1,g.value){case"audio-and-video":ce={video:!0,audio:!0},R.hidden=!1,q.hidden=!1,ie.textContent="Record video/audio";break;case"video":ce={video:!0},R.hidden=!1,q.hidden=!1,ie.textContent="Record video";break;case"audio":ce={audio:!0},R.hidden=!0,q.hidden=!0,ie.textContent="Record audio";break;case"screenShare":le={video:!0};case"screenShareAndVideo":le||(le={video:!0,audio:!0}),R.$screenShare=!0,R.hidden=!0,q.hidden=!0,se.hidden=!0;break;default:return}if(ce){const g=await getUserMedia(ce);if(!g)return void await dialogs.alert("Error getting user media");if(v.hidden=!1,R.srcObject=g,R.$stream=g,ce.video){const g=$e(v,"canvas.recordedImage");R.addEventListener("canplay",()=>{g.setAttribute("width",String(R.videoWidth)),g.setAttribute("height",String(R.videoHeight))})}R.addEventListener("loadedmetadata",()=>{R.play(),ce?.audio?(se.hidden=!1,visualize(g,se)):se.hidden=!0})}else if(le){const g=await startScreenCapture(le);if(!g)return void await dialogs.alert("Error getting user media");v.hidden=!1,R.srcObject=g,R.$stream=g}}}},[["option",{value:""},["Please choose a device"]]]);return(async()=>{const v=await navigator.mediaDevices.enumerateDevices();let D=!1,R=!1;v.forEach(g=>{switch(g.kind){case"audioinput":D=!0;break;case"videoinput":R=!0}}),D&&jmlExports.jml("option",{value:"audio"},["Microphone only"],g),R&&jmlExports.jml("option",{value:"video"},["Video camera only"],g),D&&R&&jmlExports.jml("option",{value:"audio-and-video"},["Video camera and microphone"],g),jmlExports.jml("option",{value:"screenShare"},["Screen share"],g),jmlExports.jml("option",{value:"screenShareAndVideo"},["Screen share and microphone"],g)})(),g})()," ",["div",[["button",{class:"recordMedia",$on:{click(g){g.preventDefault();const v=$e(this.parentElement?.nextElementSibling,"video.previewMedia");if(!v.srcObject)return void dialogs.alert("No stream found to record");const D=this.parentElement?.nextElementSibling;$e(D,"img.photo").hidden=!0;const R="video/mp4",q=new MediaRecorder(v.$stream,{mimeType:R});let le=[];q.addEventListener("dataavailable",g=>{le.push(g.data)});try{q.start()}catch{return void dialogs.alert("Error starting media recorder")}q.addEventListener("stop",()=>{const g=new Blob(le,{type:R}),v=URL.createObjectURL(g),D=$e(this.parentElement?.nextElementSibling,"video.recordedMedia");D.parentElement.hidden=!1,D.src=v,D.addEventListener("loadeddata",()=>{/iPad|iPhone|iPod|Safari/u.test(navigator.userAgent)||URL.revokeObjectURL(v)});const q=new File([g],"placeholder.mp4",{type:R});console.log("file",q);const me=checkFile(q,ie,se,ce);if(me)return dialogs.alert(getValidationMessage(me)??me),void(le=[]);const fe=this.closest('[data-type="file"]');$e(fe,"fieldset.fileMetaData").$setValue(q),le=[]}),this.$mediaRecorder=q}}},["Record media"]],["button",{class:"stopRecording",$on:{click(g){g.preventDefault(),this.previousElementSibling.$mediaRecorder.stop()}}},["Stop recording"]],["button",{class:"takeSnapshot",hidden:!0},{$on:{click(g){g.preventDefault();const v=this.parentElement?.nextElementSibling;$e(v,".recordedMedia").hidden=!0;const D=$e(v,"canvas.recordedImage"),R=D.getContext("2d"),q=$e(v,"video.previewMedia");R.drawImage(q,0,0,D.width,D.height);const le=$e(v,"img.photo");D.toBlob(g=>{if(!g)return void dialogs.alert("Error converting canvas to Blob");const v=jmlExports.jml("img",{class:"photo"}),D=URL.createObjectURL(g);v.addEventListener("load",()=>{URL.revokeObjectURL(D)});const R=new File([g],"placeholder.png",{type:g.type});console.log("file",R);const q=checkFile(R,ie,se,ce);if(q)return void dialogs.alert(getValidationMessage(q)??q);const me=this.closest('[data-type="file"]');$e(me,"fieldset.fileMetaData").$setValue(R),v.src=D,le.replaceWith(v)})}}},["Take and use snapshot as file"]]]],["div",{class:"videoContainer",hidden:!0},[["canvas",{class:"visualizer",hidden:!0}],["br"],["video",{class:"previewMedia"}],["div",[["canvas",{hidden:!0,class:"recordedImage"}],["img",{class:"photo"}]]],["div",{class:"recordedMedia"},[...(()=>{const g=jmlExports.jml("video",{class:"recordedMedia"});return[g,["br"],jmlExports.jml("button",{class:"play",$on:{click(v){v.preventDefault(),g.play()}}},["Play"]),jmlExports.jml("button",{class:"pause",$on:{click(v){v.preventDefault(),g.pause()}}},["Pause"]),jmlExports.jml("button",{class:"replay",$on:{click(v){v.preventDefault(),g.pause(),g.currentTime=0,g.play()}}},["Replay"])]})()]]]]]]]]}},filelistType={option:["FileList"],array:!0,filelist:!0,regexEndings:[",",")"],stringRegexBegin:/^FileList\(/u,stringRegexEnd:/^\)/u,valueMatch:g=>"FileList"===toStringTag(g),toValue(...g){return arrayType.toValue.apply(this,g)},getValue(...g){return arrayType.getValue.apply(this,g)},getInput(...g){return arrayType.getInput.apply(this,g)},viewUI({...g}){return arrayType.viewUI.call(this,{...g,type:"filelist"})},editUI({...g}){return arrayType.editUI.call(this,{...g,type:"filelist"})}};function newBlobForBinary(g,v){const D=g.$value,R=new Blob([void 0===v.stringContents?D&&"Blob"===Object.prototype.toString.call(D).slice(8,-1)?D:"":v.stringContents],{type:void 0===v.type?D?.type??"":v.type});return g.$value=R,R}function binaryButton(g,v){return["button",{class:"viewBinary",$custom:{$value:g},$on:{click(g){const v=this;g.preventDefault(),v.$value&&"Blob"===Object.prototype.toString.call(v.$value).slice(8,-1)||newBlobForBinary(v,{});const D=new FileReader;D.addEventListener("load",async function(){const g=await dialogs.makeSubmitDialog({submitText:"Save",submit(){const D=$e(g,".view-binary"),R=newBlobForBinary(v,{stringContents:D.value});v.parentElement.$setValue(R),g.close()},children:[["div",["Binary source",["br"],["textarea",{class:"view-binary"},[D.result??""]]]]]})}),D.addEventListener("error",async function(){console.error(D.error),await dialogs.alert(D.error.message)}),D.readAsBinaryString(v.$value)}}},[v?"Edit binary data":"View binary data"]]}const blobType={option:["Blob"],stringRegex:/^Blob\((.*)\)$/u,valueMatch:g=>"Blob"===toStringTag(g),toValue(g){const v=JSON.parse(g);return{value:new Blob([v.stringContents],{type:v.type})}},getInput:({root:g})=>$e(g,"button.viewBinary"),setValue({root:g,value:v}){$e(g,"fieldset.blobMetaData").$setValue(v)},getValue({root:g}){return this.getInput({root:g}).$value},viewUI:({value:g,specificSchemaObject:v})=>["div",{dataset:{type:"blob"}},[["b",{class:"emphasis",title:schemaLabel(v)?"(a Blob)":void 0},[schemaLabel(v)??"Blob"]],["br"],["br"],["b",["Size (in bytes) "]],String(g.size),["br"],["b",["Content type "]],g.type,["br"],g.type.startsWith("text/")||"application/json"===g.type?(()=>{const v=jmlExports.jml("div"),D=new FileReader;return D.addEventListener("load",function(){v.append(jmlExports.jml("div",["Text source",["br"],["textarea",{class:"view-text"},[D.result??""]]]))}),D.addEventListener("error",function(){console.error(D.error),v.append(D.error.message)}),D.readAsBinaryString(g),v})():binaryButton(g),g.type.startsWith("video/")?(()=>{const v=URL.createObjectURL(g),D=jmlExports.jml("video",{src:v,class:"video",$on:{loadeddata(){/iPad|iPhone|iPod|Safari/u.test(navigator.userAgent)||URL.revokeObjectURL(v)}}});return["div",[D,["button",{class:"play",$on:{click(g){g.preventDefault(),D.play()}}},["Play"]],["button",{class:"pause",$on:{click(g){g.preventDefault(),D.pause()}}},["Pause"]],["button",{class:"replay",$on:{click(g){g.preventDefault(),D.pause(),D.currentTime=0,D.play()}}},["Replay"]]]]})():"",g.type.startsWith("audio/")?(()=>{const v=URL.createObjectURL(g),D=jmlExports.jml("audio",{src:v,class:"audio",$on:{loadeddata(){URL.revokeObjectURL(v)}}});return["div",[D,["button",{class:"play",$on:{click(g){g.preventDefault(),D.play()}}},["Play"]],["button",{class:"pause",$on:{click(g){g.preventDefault(),D.pause()}}},["Pause"]],["button",{class:"replay",$on:{click(g){g.preventDefault(),D.pause(),D.currentTime=0,D.play()}}},["Replay"]]]]})():"","application/pdf"===g.type?(()=>{const v=URL.createObjectURL(g);return jmlExports.jml("iframe",{class:"PDF",src:v,$on:{load(){URL.revokeObjectURL(v)}}})})():"",g.type.startsWith("image/")?["img",{class:"imageView",src:URL.createObjectURL(g),$on:{load(){URL.revokeObjectURL(this.src)}}}]:""]],editUI:({typeNamespace:g,specificSchemaObject:v,value:D={}})=>["div",{dataset:{type:"blob"},title:schemaLabel(v)??"Blob"},[["fieldset",{class:"blobMetaData",$custom:{$setValue(g){const v=this;$e(v,".size").value=String(g.size),$e(v,".contentType").value=g.type,$e(v,"button.viewBinary").$value="Blob"===Object.prototype.toString.call(g).slice(8,-1)?g:void 0}}},[["legend",["Current blob data"]],["label",["Size (in bytes) ",["input",{type:"number",step:"1",disabled:!0,class:"size",value:String(D.size)}]]],["br"],["label",["Content type ",["input",{class:"contentType",value:D.type??"",$on:{change(){newBlobForBinary($e(this.parentElement?.parentElement,"button.viewBinary"),{type:this.value})}}}]]],["br"],binaryButton(D,!0),["button",{class:"clearData",$on:{click(g){g.preventDefault(),this.parentElement.$setValue({size:"",type:""})}}},["Clear data"]]]],["fieldset",[["legend",["Supply blob through upload"]],["label",["Blob ",["input",{$on:{change(){if(!this.files)return;const g=this.files[0],v=new Blob([g],{type:g.type}),D=(this.parentElement?.parentElement)?.previousElementSibling;D.$setValue(v)}},name:`${g}-blob`,type:"file"}]]]]],["fieldset",[["legend",["Supply blob through recording"]],(()=>{const g=jmlExports.jml("select",{class:"device",$on:{async change(){const v=this.nextElementSibling?.nextElementSibling;$e(v,"img.photo").hidden=!0;const D=$e(v,"video.previewMedia"),R=jmlExports.jml("video",{class:"previewMedia"});if(D.$stream){D.$stream.getTracks().forEach(g=>{g.stop()}),D.srcObject=null}D.replaceWith(R);const q=$e(g.nextElementSibling,".takeSnapshot"),ie=$e(g.nextElementSibling,".recordMedia");$e(g.nextElementSibling?.nextElementSibling,"div.recordedMedia").hidden=!0;const se=$e(v,"canvas.visualizer");let ce,le;switch(R.$screenShare=!1,g.value){case"audio-and-video":ce={video:!0,audio:!0},R.hidden=!1,q.hidden=!1,ie.textContent="Record video/audio";break;case"video":ce={video:!0},R.hidden=!1,q.hidden=!1,ie.textContent="Record video";break;case"audio":ce={audio:!0},R.hidden=!0,q.hidden=!0,ie.textContent="Record audio";break;case"screenShare":le={video:!0};case"screenShareAndVideo":le||(le={video:!0,audio:!0}),R.$screenShare=!0,R.hidden=!0,q.hidden=!0,se.hidden=!0;break;default:return}if(ce){const g=await getUserMedia(ce);if(!g)return void await dialogs.alert("Error getting user media");if(v.hidden=!1,R.srcObject=g,R.$stream=g,ce.video){const g=$e(v,"canvas.recordedImage");R.addEventListener("canplay",()=>{g.setAttribute("width",String(R.videoWidth)),g.setAttribute("height",String(R.videoHeight))})}R.addEventListener("loadedmetadata",()=>{R.play(),ce?.audio?(se.hidden=!1,visualize(g,se)):se.hidden=!0})}else if(le){const g=await startScreenCapture(le);if(!g)return void await dialogs.alert("Error getting user media");v.hidden=!1,R.srcObject=g,R.$stream=g}}}},[["option",{value:""},["Please choose a device"]]]);return(async()=>{const v=await navigator.mediaDevices.enumerateDevices();let D=!1,R=!1;v.forEach(g=>{switch(g.kind){case"audioinput":D=!0;break;case"videoinput":R=!0}}),D&&jmlExports.jml("option",{value:"audio"},["Microphone only"],g),R&&jmlExports.jml("option",{value:"video"},["Video camera only"],g),D&&R&&jmlExports.jml("option",{value:"audio-and-video"},["Video camera and microphone"],g),jmlExports.jml("option",{value:"screenShare"},["Screen share"],g),jmlExports.jml("option",{value:"screenShareAndVideo"},["Screen share and microphone"],g)})(),g})()," ",["div",[["button",{class:"recordMedia",$on:{click(g){g.preventDefault();const v=$e(this.parentElement?.nextElementSibling,"video.previewMedia");if(!v.srcObject)return void dialogs.alert("No stream found to record");const D=this.parentElement?.nextElementSibling;$e(D,"img.photo").hidden=!0;const R="video/mp4",q=new MediaRecorder(v.$stream,{mimeType:R});let ie=[];q.addEventListener("dataavailable",g=>{ie.push(g.data)});try{q.start()}catch{return void dialogs.alert("Error starting media recorder")}q.addEventListener("stop",()=>{const g=new Blob(ie,{type:R}),v=URL.createObjectURL(g),D=$e(this.parentElement?.nextElementSibling,"video.recordedMedia");D.parentElement.hidden=!1,D.src=v,D.addEventListener("loadeddata",()=>{/iPad|iPhone|iPod|Safari/u.test(navigator.userAgent)||URL.revokeObjectURL(v)});const q=this.closest('[data-type="blob"]');$e(q,"fieldset.blobMetaData").$setValue(g),ie=[]}),this.$mediaRecorder=q}}},["Record media"]],["button",{class:"stopRecording",$on:{click(g){g.preventDefault(),this.previousElementSibling.$mediaRecorder.stop()}}},["Stop recording"]],["button",{class:"takeSnapshot",hidden:!0},{$on:{click(g){g.preventDefault();const v=this.parentElement?.nextElementSibling;$e(v,".recordedMedia").hidden=!0;const D=$e(v,"canvas.recordedImage"),R=D.getContext("2d"),q=$e(v,"video.previewMedia");R.drawImage(q,0,0,D.width,D.height);const ie=$e(v,"img.photo");D.toBlob(g=>{if(!g)return void dialogs.alert("Error converting canvas to Blob");const v=jmlExports.jml("img",{class:"photo"}),D=URL.createObjectURL(g);v.addEventListener("load",()=>{URL.revokeObjectURL(D)});const R=this.closest('[data-type="blob"]');$e(R,"fieldset.blobMetaData").$setValue(g),v.src=D,ie.replaceWith(v)})}}},["Take and use snapshot as blob"]]]],["div",{class:"videoContainer",hidden:!0},[["canvas",{class:"visualizer",hidden:!0}],["br"],["video",{class:"previewMedia"}],["div",[["canvas",{hidden:!0,class:"recordedImage"}],["img",{class:"photo"}]]],["div",{class:"recordedMedia"},[...(()=>{const g=jmlExports.jml("video",{class:"recordedMedia"});return[g,["br"],jmlExports.jml("button",{class:"play",$on:{click(v){v.preventDefault(),g.play()}}},["Play"]),jmlExports.jml("button",{class:"pause",$on:{click(v){v.preventDefault(),g.pause()}}},["Pause"]),jmlExports.jml("button",{class:"replay",$on:{click(v){v.preventDefault(),g.pause(),g.currentTime=0,g.play()}}},["Replay"])]})()]]]]]]]]};let domExceptionNameId=0;const domexceptionType={option:["DOMException"],stringRegex:/^DOMException\((.*)\)$/u,valueMatch:g=>"DOMException"===toStringTag(g),toValue(g){const{message:v,name:D}=JSON.parse(g);return{value:new DOMException(v,D)}},getInput:({root:g})=>$e(g,"input"),setValue({root:g,value:v}){$e(g,".message").value=v.message,$e(g,".name").value=v.name},getValue({root:g}){const v=$e(g,".message").value,D=$e(g,".name").value;return new DOMException(v,D)},viewUI:({value:g,specificSchemaObject:v})=>["div",{dataset:{type:"domexception"},title:schemaLabel(v)??"(a `DOMException`)"},[["b",["Message "]],g.message,["br"],["b",["Name "]],g.name,["br"],["b",["Code "]],g.code]],editUI:({typeNamespace:g,specificSchemaObject:v,value:D=""})=>(domExceptionNameId++,["div",{dataset:{type:"domexception"},title:schemaLabel(v)??"DOMException"},[["label",["Name: ",["input",{class:"name",list:`domExceptionNames-${domExceptionNameId}`,name:`${g}-domexception-name`,value:D?.name??"",size:30,placeholder:"(Optional predefined name)"}]]],["datalist",{id:`domExceptionNames-${domExceptionNameId}`,class:"predefinedNames"},["IndexSizeError","HierarchyRequestError","WrongDocumentError","InvalidCharacterError","NoModificationAllowedError","NotFoundError","NotSupportedError","InvalidStateError","InUseAttributeError","SyntaxError","InvalidModificationError","NamespaceError","InvalidAccessError","TypeMismatchError","SecurityError","NetworkError","AbortError","URLMismatchError","QuotaExceededError","TimeoutError","InvalidNodeTypeError","DataCloneError","EncodingError","NotReadableError","UnknownError","ConstraintError","DataError","TransactionInactiveError","ReadOnlyErrorVersionError","OperationError","NotAllowedError"].map(g=>["option",[g]])],["br"],["label",["Message: ",["input",{class:"message",name:`${g}-domexception-message`,value:D?.message??""}]]]]])};let idx$3=0;const domrectType={option:["DOMRect"],childTypes:["domrectreadonly"],stringRegex:/^(?<domRectClass>DOMRect|DOMRectReadOnly)\((?<innerContent>.*)\)$/u,valueMatch:g=>["DOMRect","DOMRectReadOnly"].includes(toStringTag(g)),toValue(g,v){const{groups:{domRectClass:D}={}}=v.match,{x:R,y:q,width:ie,height:se}=JSON.parse(g);return{value:new("DOMRect"===D?DOMRect:DOMRectReadOnly)(R,q,ie,se)}},getInput:({root:g})=>$e(g,"input"),setValue({root:g,value:v}){$e(g,".x").value=String(v.x),$e(g,".y").value=String(v.y),$e(g,".width").value=String(v.width),$e(g,".height").value=String(v.height),"DOMRect"===toStringTag(v)?$e(g,".domrect-readonly-readwrite").checked=!0:$e(g,".domrect-readonly-readonly").checked=!0},getValue({root:g}){const v=Number($e(g,".x").value),D=Number($e(g,".y").value),R=Number($e(g,".width").value),q=Number($e(g,".height").value);return new($e(g,".domrect-readonly-readwrite").checked?DOMRect:DOMRectReadOnly)(v,D,R,q)},viewUI({value:g,specificSchemaObject:v}){const D="DOMRect"===toStringTag(g);return["div",{dataset:{type:"domrect"},title:schemaLabel(v)?`(a \`${D?"DOMRect":"DOMRectReadOnly"}\`)`:void 0},[["b",{class:"emphasis"},[schemaLabel(v)??(D?"DOMRect":"DOMRectReadOnly")]],["br"],["b",["x "]],g.x,["br"],["b",["y "]],g.y,["br"],["b",["width "]],g.width,["br"],["b",["height "]],g.height]]},editUI({typeNamespace:g,specificSchemaObject:v,value:D={x:"",y:"",width:"",height:""}}){idx$3++;const R="any";return["div",{dataset:{type:"domrect"},title:schemaLabel(v)??"DOMRect"},[["div",[["label",[["input",{type:"radio",class:"domrect-readonly-readwrite",name:`${g}-domrect-readonly-${idx$3}`,value:"readwrite",checked:"DOMRectReadOnly"!==toStringTag(D)}],"Readwrite"]]," ",["label",[["input",{type:"radio",class:"domrect-readonly-readonly",name:`${g}-domrect-readonly-${idx$3}`,value:"readonly",checked:"DOMRectReadOnly"===toStringTag(D)}],"Read-only"]]]],["label",["x: ",["input",{type:"number",step:R,class:"x",name:`${g}-domrect-x`,value:D.x}]]],["br"],["label",["y: ",["input",{type:"number",step:R,class:"y",name:`${g}-domrect-y`,value:D.y}]]],["br"],["label",["width: ",["input",{type:"number",step:R,class:"width",name:`${g}-domrect-width`,value:D.width}]]],["br"],["label",["height: ",["input",{type:"number",step:R,class:"height",name:`${g}-domrect-height`,value:D.height}]]]]]}};let idx$2=0;const dompointType={option:["DOMPoint"],childTypes:["dompointreadonly"],stringRegex:/^(?<domPointClass>DOMPoint|DOMPointReadOnly)\((?<innerContent>.*)\)$/u,valueMatch:g=>["DOMPoint","DOMPointReadOnly"].includes(toStringTag(g)),toValue(g,v){const{groups:{domPointClass:D}={}}=v.match,{x:R,y:q,z:ie,w:se}=JSON.parse(g);return{value:new("DOMPoint"===D?DOMPoint:DOMPointReadOnly)(R,q,ie,se)}},getInput:({root:g})=>$e(g,"input"),setValue({root:g,value:v}){$e(g,".x").value=String(v.x),$e(g,".y").value=String(v.y),$e(g,".z").value=String(v.z),$e(g,".w").value=String(v.w),"DOMPoint"===toStringTag(v)?$e(g,".dompoint-readonly-readwrite").checked=!0:$e(g,".dompoint-readonly-readonly").checked=!0},getValue({root:g}){const v=Number($e(g,".x").value),D=Number($e(g,".y").value),R=Number($e(g,".z").value),q=Number($e(g,".w").value);return new($e(g,".dompoint-readonly-readwrite").checked?DOMPoint:DOMPointReadOnly)(v,D,R,q)},viewUI({value:g,specificSchemaObject:v}){const D="DOMPoint"===toStringTag(g);return["div",{dataset:{type:"dompoint"},title:schemaLabel(v)?`(a \`${D?"DOMPoint":"DOMPointReadOnly"}\`)`:void 0},[["b",{class:"emphasis"},[schemaLabel(v)??(D?"DOMPoint":"DOMPointReadOnly")]],["br"],["b",["x "]],g.x,["br"],["b",["y "]],g.y,["br"],["b",["z "]],g.z,["br"],["b",["w "]],g.w]]},editUI({typeNamespace:g,specificSchemaObject:v,value:D={x:"",y:"",z:"",w:""}}){idx$2++;const R="any";return["div",{dataset:{type:"dompoint"},title:schemaLabel(v)??"DOMPoint"},[["div",[["label",[["input",{type:"radio",class:"dompoint-readonly-readwrite",name:`${g}-dompoint-readonly-${idx$2}`,value:"readwrite",checked:"DOMPointReadOnly"!==toStringTag(D)}],"Readwrite"]]," ",["label",[["input",{type:"radio",class:"dompoint-readonly-readonly",name:`${g}-dompoint-readonly-${idx$2}`,value:"readonly",checked:"DOMPointReadOnly"===toStringTag(D)}],"Read-only"]]]],["label",["x: ",["input",{type:"number",step:R,class:"x",name:`${g}-dompoint-x`,value:D.x}]]],["br"],["label",["y: ",["input",{type:"number",step:R,class:"y",name:`${g}-dompoint-y`,value:D.y}]]],["br"],["label",["z: ",["input",{type:"number",step:R,class:"z",name:`${g}-dompoint-z`,value:D.z}]]],["br"],["label",["w: ",["input",{type:"number",step:R,class:"w",name:`${g}-dompoint-w`,value:D.w}]]]]]}};let idx$1=0;const dommatrixType={option:["DOMMatrix"],childTypes:["dommatrixreadonly"],stringRegex:/^(?<domMatrixClass>DOMMatrix|DOMMatrixReadOnly)\((?<innerContent>.*)\)$/u,valueMatch:g=>["DOMMatrix","DOMMatrixReadOnly"].includes(toStringTag(g)),toValue(g,v){const{groups:{domMatrixClass:D}={}}=v.match,R=JSON.parse(g),q="DOMMatrix"===D?DOMMatrix:DOMMatrixReadOnly;return{value:Object.hasOwn(R,"a")?new q([R.a,R.b,R.c,R.d,R.e,R.f]):new q([R.m11,R.m12,R.m13,R.m14,R.m21,R.m22,R.m23,R.m24,R.m31,R.m32,R.m33,R.m34,R.m41,R.m42,R.m43,R.m44])}},getInput:({root:g})=>$e(g,"input"),setValue({root:g,value:v}){const{is2D:D}=v;$e(g,".d2").checked=D,$e(g,".d3").checked=!D,$e(g,".holder2d").hidden=!D,$e(g,".holder3d").hidden=D,D?($e(g,".a").value=v.a,$e(g,".b").value=v.b,$e(g,".c").value=v.c,$e(g,".d").value=v.d,$e(g,".e").value=v.e,$e(g,".f").value=v.f):($e(g,".m11").value=v.m11,$e(g,".m12").value=v.m12,$e(g,".m13").value=v.m13,$e(g,".m14").value=v.m14,$e(g,".m21").value=v.m21,$e(g,".m22").value=v.m22,$e(g,".m23").value=v.m23,$e(g,".m24").value=v.m24,$e(g,".m31").value=v.m31,$e(g,".m32").value=v.m32,$e(g,".m33").value=v.m33,$e(g,".m34").value=v.m34,$e(g,".m41").value=v.m41,$e(g,".m42").value=v.m42,$e(g,".m43").value=v.m43,$e(g,".m44").value=v.m44),"DOMMatrix"===toStringTag(v)?$e(g,".dommatrix-readonly-readwrite").checked=!0:$e(g,".dommatrix-readonly-readonly").checked=!0},getValue({root:g}){const v=$e(g,".dommatrix-readonly-readwrite").checked?DOMMatrix:DOMMatrixReadOnly,D=$e(g,".a").value;if(D){return new v([Number(D),Number($e(g,".b").value),Number($e(g,".c").value),Number($e(g,".d").value),Number($e(g,".e").value),Number($e(g,".f").value)])}return new v([Number($e(g,".m11").value),Number($e(g,".m12").value),Number($e(g,".m13").value),Number($e(g,".m14").value),Number($e(g,".m21").value),Number($e(g,".m22").value),Number($e(g,".m23").value),Number($e(g,".m24").value),Number($e(g,".m31").value),Number($e(g,".m32").value),Number($e(g,".m33").value),Number($e(g,".m34").value),Number($e(g,".m41").value),Number($e(g,".m42").value),Number($e(g,".m43").value),Number($e(g,".m44").value)])},viewUI({value:g,specificSchemaObject:v}){const D="DOMMatrix"===toStringTag(g);return["div",{dataset:{type:"dommatrix"}},[["b",{class:"emphasis",title:schemaLabel(v)?`(a \`${D?"DOMMatrix":"DOMMatrixReadOnly"}\`)`:void 0},[schemaLabel(v)??(D?"DOMMatrix":"DOMMatrixReadOnly")]],g.is2D?["div",[["b",["a "]],g.a,["br"],["b",["b "]],g.b,["br"],["b",["c "]],g.c,["br"],["b",["d "]],g.d,["br"],["b",["e "]],g.e,["br"],["b",["f "]],g.f]]:["div",[["b",["m11 "]],g.m11,["br"],["b",["m12 "]],g.m12,["br"],["b",["m13 "]],g.m13,["br"],["b",["m14 "]],g.m14,["br"],["b",["m21 "]],g.m21,["br"],["b",["m22 "]],g.m22,["br"],["b",["m23 "]],g.m23,["br"],["b",["m24 "]],g.m24,["br"],["b",["m31 "]],g.m31,["br"],["b",["m32 "]],g.m32,["br"],["b",["m33 "]],g.m33,["br"],["b",["m34 "]],g.m34,["br"],["b",["m41 "]],g.m41,["br"],["b",["m42 "]],g.m42,["br"],["b",["m43 "]],g.m43,["br"],["b",["m44 "]],g.m44]]]]},editUI({typeNamespace:g,specificSchemaObject:v,value:D={}}){idx$1++;const{is2D:R}=D;return["div",{dataset:{type:"dommatrix"},title:schemaLabel(v)??"DOMMatrix"},[["div",[["label",[["input",{type:"radio",class:"dommatrix-readonly-readwrite",name:`${g}-dommatrix-readonly-${idx$1}`,value:"readwrite",checked:"DOMMatrixReadOnly"!==toStringTag(D)}],"Readwrite"]]," ",["label",[["input",{type:"radio",class:"dommatrix-readonly-readonly",name:`${g}-dommatrix-readonly-${idx$1}`,value:"readonly",checked:"DOMMatrixReadOnly"===toStringTag(D)}],"Read-only"]]]],["div",{$on:{click(g){const{target:v}=g;if("radio"!==v.type)return;const D=this.parentElement;$e(D,".holder2d").hidden="3d"===v.value,$e(D,".holder3d").hidden="2d"===v.value}}},[["label",["2d",["input",{class:"d2",type:"radio",name:`${g}-dommatrix-dimension-${idx$1}`,value:"2d",checked:Boolean(R)}]]]," ",["label",["3d",["input",{class:"d3",type:"radio",name:`${g}-dommatrix-dimension-${idx$1}`,value:"3d",checked:!R}]]]]],["div",{class:"holder2d",hidden:!R},["a","b","c","d","e","f"].flatMap(v=>[["br"],["label",[v+": ",["input",{type:"number",step:"any",class:v,name:`${g}-dommatrix-${v}`,value:D[v]??""}]]]]).slice(1)],["div",{class:"holder3d",hidden:Boolean(R)},["m11","m12","m13","m14","m21","m22","m23","m24","m31","m32","m33","m34","m41","m42","m43","m44"].flatMap(v=>[["br"],["label",[v+": ",["input",{type:"number",step:"any",class:v,name:`${g}-dommatrix-${v}`,value:D[v]??""}]]]]).slice(1)]]]}},toInteger=g=>""===g.trim()?NaN:Math.trunc(Number(g)),dataViewMethods=["setInt8","setUint8","setInt16","setUint16","setInt32","setUint32","setFloat32","setFloat64","setBigInt64","setBigUint64"],typedArrays=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"],getMinMaxForTypedArray=g=>{switch(g){case"Int8Array":return{min:-128,max:127};case"Uint8Array":case"Uint8ClampedArray":return{min:0,max:255};case"Int16Array":return{min:-32768,max:32767};case"Uint16Array":return{min:0,max:65535};case"Int32Array":return{min:-2147483648,max:2147483647};case"Uint32Array":return{min:0,max:4294967295};case"Float32Array":return{min:-34e37,max:34e37};case"Float64Array":return{min:-1/0,max:1/0};case"BigInt64Array":return{min:-0x8000000000000000,max:2**63-1};case"BigUint64Array":return{min:0,max:2**64-1};default:throw new Error("Unexpected typed array type")}},getTypedArray=g=>{switch(g){case"Int8Array":return Int8Array;case"Uint8Array":return Uint8Array;case"Uint8ClampedArray":return Uint8ClampedArray;case"Int16Array":return Int16Array;case"Uint16Array":return Uint16Array;case"Int32Array":return Int32Array;case"Uint32Array":return Uint32Array;case"Float32Array":return Float32Array;case"Float64Array":return Float64Array;case"BigInt64Array":return BigInt64Array;case"BigUint64Array":return BigUint64Array;default:throw new Error("Unexpected type")}},bufferSourceClasses=new Set(["ArrayBuffer","DataView","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"]);let idx=0;const buffersourceType={option:["Buffer source (ArrayBuffer, DataView, TypedArrays)"],childTypes:["arraybuffer","dataview","int8array","uint8array","uint8clampedarray","int16array","uint16array","int32array","uint32array","float32array","float64array","bigint64array","biguint64array"],stringRegex:/^(?<bufferSourceClass>ArrayBuffer|DataView|(?:Int8|Uint8|Uint8Clamped|Int16|Uint16|Int32|Uint32|Float32|Float64|BigInt64|BigUint64)Array)\((?<innerContent>.*)\)$/u,valueMatch:g=>bufferSourceClasses.has(toStringTag(g)),toValue(g,v){const{groups:{bufferSourceClass:D}={}}=v.match,R=JSON.parse(g),{byteLength:q,maxByteLength:ie,byteOffset:se,dataViewByteOffset:ce,dataViewByteLength:le,length:me}=R,fe=new ArrayBuffer(q,{maxByteLength:ie});let ge,ve,xe;return(D.endsWith("Array")||"typedArray"in R)&&(ve=getTypedArray(R.typedArray??D),ge=new ve(fe,se,me),"set"in R&&(R.set[0].forEach((g,v)=>{"string"==typeof g&&(R.set[0][v]=BigInt(g))}),ge.set(...R.set))),("DataView"===D||dataViewMethods.some(g=>Object.hasOwn(R,g)))&&(xe=new DataView(fe,ce,le),dataViewMethods.forEach(g=>{R[g]?.forEach(v=>{"string"==typeof v[1]&&(v[1]=BigInt(v[1])),xe[g](...v)})})),{value:"ArrayBuffer"===D?fe:"DataView"===D?xe:ge}},getInput:({root:g})=>$e(g,".byteLength"),setValue({root:g,value:v}){const D=toStringTag(v);if("ArrayBuffer"===D||"DataView"===D)$e(g,`[value=${D}].buffersource-returnType`)?.click();else{$e(g,"[value=TypedArray].buffersource-returnType")?.click();const v=$e(g,".buffersource-typedArrays");v.value=D,v.dispatchEvent(new Event("change"))}const R=$e(g,".byteLength");R.$value=v;const q="ArrayBuffer"===D?v:v.buffer;R.value=q.byteLength,R.dispatchEvent(new Event("change"));const ie=$e(g,".maxByteLength");if(ie.value=q.maxByteLength,ie.dispatchEvent(new Event("change")),"DataView"===D){const D=$e(g,".dataViewByteLength");D.value=v.byteLength,D.dispatchEvent(new Event("change"));const R=$e(g,".dataViewByteOffset");R.value=v.byteOffset,R.dispatchEvent(new Event("change"))}else if("ArrayBuffer"!==D){const D=$e(g,".typedArrayByteOffset");D.value=v.byteOffset,D.dispatchEvent(new Event("change"));const R=$e(g,".typedArrayLength");R.value=v.length,R.dispatchEvent(new Event("change"))}},getValue({root:g}){return this.getInput({root:g}).$value},viewUI({value:g,specificSchemaObject:v}){const D=toStringTag(g),R="ArrayBuffer"===D?g:g.buffer;return["div",{dataset:{type:"buffersource"}},[["b",{class:"emphasis",title:schemaLabel(v)?/^[aeiou]/iu.test(D)?`(an ${D})`:`(a ${D})`:void 0},[schemaLabel(v)??D]],["br"],["b",["Buffer byte length: "]],R.byteLength,["br"],["b",["Buffer max byte length: "]],R.maxByteLength,..."DataView"===D?[["br"],["b",["Data View byte length: "]],g.byteLength,["br"],["b",["Data View byte offset: "]],g.byteOffset]:[""],..."DataView"!==D&&"ArrayBuffer"!==D?[["br"],["b",["Typed Array byte offset: "]],g.byteOffset,["br"],["b",["Typed Array length: "]],g.length]:[""],["br"],["button",{class:"buffersource-viewData",$on:{async click(g){g.preventDefault();const v=await dialogs.makeCancelDialog({children:[["select",{class:"buffersource-typedArrays-view","aria-label":"Typed Arrays",$on:{change(){const g=this.value,v=new(getTypedArray(g))(R),D=$e(this.parentElement,".typedArrayArea");D.textContent="",D.append(...Array.from({length:v.length},(g,D)=>{const R=v[D];return jmlExports.jml("span",[["b",[D]]," ",["span",[R?String(R):"0"]]," "])}))}}},typedArrays.map(g=>["option",{selected:D===g||void 0},[g]])],["div",{class:"typedArrayArea"}]]});$e(v,".buffersource-typedArrays-view").dispatchEvent(new Event("change"))}}},["View data"]]]]},editUI({typeNamespace:g,specificSchemaObject:v,value:D}){idx++;const R=jmlExports.jml("div",{dataset:{type:"buffersource"},title:schemaLabel(v)??"BufferSource"},[["fieldset",{class:"returnType",$on:{change(){this.$buildInstances()}},$custom:{$buildInstances(){const v=this.parentElement,{value:D}=$e(this,`[name=${g}-buffersource-returnType-${idx}]:checked`),R=$e(v,".byteLength"),q=toInteger(R.value),ie=toInteger($e(v,".maxByteLength").value),se=new ArrayBuffer(q,ie?{maxByteLength:ie}:void 0),ce=$e(v,".dataViewByteOffset").value,le=ce?toInteger(ce):0,me=$e(v,".dataViewByteLength").value,fe=me?toInteger(me):void 0,ge=new DataView(se,le,fe),{value:ve}=$e(v,".buffersource-typedArrays-init"),xe=getTypedArray(ve),_e=$e(v,".typedArrayByteOffset").value,ke=_e?toInteger(_e):0,we=$e(v,".typedArrayLength").value,Se=we?toInteger(we):q,Ie=new xe(se,ke,Se);R.$dataView=ge,R.$typedArray=Ie;const Ee=$$e(v,".typedArrayArea .typedArrayValue").map(g=>xe.name.startsWith("Big")?BigInt(g.value):Number(g.value));switch(R.$typedArray.set(Ee,0),D){case"ArrayBuffer":R.$value=se;break;case"DataView":R.$value=ge;break;default:R.$value=Ie}}}},[["legend",["Return type"]],["label",{$on:{click(){$e(this.parentElement,".buffersource-typedArrays").hidden=!0,$e(this?.parentElement?.parentElement,".buffersource-typedArrays-init").hidden=!1}}},[["input",{type:"radio",class:"buffersource-returnType buffersource-returnType-arraybuffer",name:`${g}-buffersource-returnType-${idx}`,checked:!0,value:"ArrayBuffer"}],"ArrayBuffer"]]," ",["label",{$on:{click(){$e(this.parentElement,".buffersource-typedArrays").hidden=!0,$e(this?.parentElement?.parentElement,".buffersource-typedArrays-init").hidden=!1}}},[["input",{type:"radio",class:"buffersource-returnType buffersource-returnType-dataview",name:`${g}-buffersource-returnType-${idx}`,value:"DataView"}],"DataView"]]," ",["label",{$on:{click(){$e(this.parentElement,".buffersource-typedArrays").hidden=!1,$e(this?.parentElement?.parentElement,".buffersource-typedArrays-init").hidden=!0}}},[["input",{type:"radio",class:"buffersource-returnType buffersource-returnType-typedarray",name:`${g}-buffersource-returnType-${idx}`,value:"TypedArray"}],"Typed Array"]]," ",["select",{hidden:!0,class:"buffersource-typedArrays","aria-label":"Typed Arrays",$on:{change(g){const v=this.parentElement?.parentElement,D=$e(v,".buffersource-typedArrays-init");D.value=this.value;if(!$e(v,".typedArrayLength").$checkBufferBounds(g))return;D.$setMinsAndMaxes(this.value),D.$checkTypedArrayByteLength(g);$e(this?.parentElement?.parentElement,".typedArrayByteOffset").$checkByteOffsetMultiple(g)}}},typedArrays.map(g=>["option",[g]])]]],["fieldset",{$on:{change(){this.previousElementSibling.$buildInstances()}}},[["legend",["Construction options"]],["fieldset",[["legend",["ArrayBuffer"]],["label",["Byte length ",["input",{class:"byteLength",type:"number",step:"1",size:"4",pattern:String.raw`\d+`,min:0,$custom:{$value:D??new ArrayBuffer(0)},$on:{change(g){const v=this,D=v.parentElement?.parentElement?.parentElement?.parentElement;if(!$e(D,".typedArrayLength").$checkBufferBounds(g))return;const R=$e(v.parentElement?.parentElement,".maxByteLength"),q=v.value;if(toInteger(q)>Number.MAX_SAFE_INTEGER)return v.setCustomValidity("The ArrayBuffer length exceeds the maximum allowable size"),g.stopPropagation(),void v.reportValidity();v.setCustomValidity(""),v.reportValidity(),toInteger(q)>toInteger(R.value)&&(R.value=q);const ie=v.parentElement?.parentElement?.parentElement;$e(ie,".dataViewByteLength").$checkDataViewByteLength(g),$e(ie.parentElement,".buffersource-typedArrays-init").$checkTypedArrayByteLength(g)}}}]]]," ",["label",["Max byte length ",["input",{class:"maxByteLength",type:"number",step:"1",size:"4",pattern:String.raw`\d+`,min:0,$on:{change(g){const v=this,D=$e(v.parentElement?.parentElement,".byteLength"),R=v.value;toInteger(R)<toInteger(D.value)?(v.setCustomValidity("The max value cannot be less than the byte length"),g.stopPropagation()):v.setCustomValidity(""),v.reportValidity()}}}]]]]],["fieldset",[["legend",["DataView"]],["label",["Byte length ",["input",{class:"dataViewByteLength",type:"number",step:"1",size:"4",pattern:String.raw`\d+`,min:0,$custom:{$checkDataViewByteLength(g){const v=this,D=v.parentElement?.parentElement?.parentElement,R=toInteger($e(D,".dataViewByteOffset").value)||0,q=$e(D,".byteLength").value,ie=q?toInteger(q):0;R+(v.value?toInteger(v.value):ie)>ie?(v.setCustomValidity("The DataView byte length and offset exceed the buffer's byte length"),g.stopPropagation()):v.setCustomValidity(""),v.reportValidity()}},$on:{change(g){this.$checkDataViewByteLength(g)}}}]]]," ",["label",["Byte offset ",["input",{class:"dataViewByteOffset",type:"number",step:"1",size:"4",pattern:String.raw`\d+`,min:0,$on:{change(g){const v=this.parentElement?.parentElement?.parentElement;$e(v,".dataViewByteLength").$checkDataViewByteLength(g)}}}]]]]],["fieldset",[["legend",["Typed array"]],["label",["Byte offset ",["input",{class:"typedArrayByteOffset",type:"number",step:"1",size:"4",pattern:String.raw`\d+`,min:0,max:2**53-1,$custom:{$checkByteOffsetMultiple(g){const v=this,D=v.parentElement?.parentElement?.parentElement?.parentElement,{value:R}=$e(D,".buffersource-typedArrays-init"),q=getTypedArray(R);toInteger(v.value)%q.BYTES_PER_ELEMENT?(v.setCustomValidity(`Byte offset must be a multiple of the typed array's bytes-per-element size (${q.BYTES_PER_ELEMENT})`),g.stopPropagation()):v.setCustomValidity(""),v.reportValidity()}},$on:{change(g){const v=this.parentElement?.parentElement?.parentElement?.parentElement;$e(v,".typedArrayLength").$checkBufferBounds(g)&&this.$checkByteOffsetMultiple(g)}}}]]]]]]],["fieldset",[["legend",["Typed Array initialization (optional)"]],["select",{class:"buffersource-typedArrays-init","aria-label":"Typed Arrays",$custom:{$setMinsAndMaxes(g){const{min:v,max:D}=getMinMaxForTypedArray(g);$$e(this.parentElement,".typedArrayValue").forEach(R=>{R.className="typedArrayValue typedArray-"+g,R.min=String(v),R.max=String(D)})},$checkTypedArrayByteLength(g){const v=getTypedArray(this.value),D=$e(this.parentElement?.parentElement,".byteLength");(D.value?toInteger(D.value):0)%v.BYTES_PER_ELEMENT?(D.setCustomValidity(`Array buffer must be a multiple of the typed array's bytes-per-element size (${v.BYTES_PER_ELEMENT})`),g.stopPropagation()):D.setCustomValidity(""),D.reportValidity()}},$on:{change(g){const v=this,D=v.parentElement?.parentElement?.parentElement;$e(this.parentElement?.parentElement,".buffersource-typedArrays").value=v.value;if(!$e(D,".typedArrayLength").$checkBufferBounds(g))return;v.$checkTypedArrayByteLength(g),v.$setMinsAndMaxes(v.value);$e(v?.parentElement?.parentElement,".typedArrayByteOffset").$checkByteOffsetMultiple(g),$e(this.parentElement?.parentElement,".returnType").$buildInstances()}}},typedArrays.map(g=>["option",[g]])]," ",["label",["Array length: ",["input",{class:"typedArrayLength",type:"number",step:"1",size:"4",pattern:String.raw`\d+`,min:0,$custom:{$checkBufferBounds(g){const v=this,D=v.parentElement?.parentElement?.parentElement,R=$e(D,".byteLength").value,q=R?toInteger(R):0,ie=v.value?toInteger(v.value):q,{value:se}=$e(D,".buffersource-typedArrays-init"),ce=getTypedArray(se),le=$e(D,".typedArrayByteOffset").value;return(le?toInteger(le):0)+ie*ce.BYTES_PER_ELEMENT>q?(v.setCustomValidity("The byte offset and the length times bytes per element is greater than the buffer length"),g.stopPropagation(),v.reportValidity(),!1):(v.setCustomValidity(""),v.reportValidity(),!0)},$buildTypedArray(){const g=this,v=toInteger(g.value),D=g.parentElement?.parentElement,R=g.parentElement?.parentElement?.parentElement,q=$e(R,".byteLength"),ie=$e(D,".typedArrayArea");ie.addEventListener("change",g=>{const v=g.target;q.$typedArray.set(["true"===v.dataset.bigint?BigInt(v.value):Number(v.value)],toInteger(v.dataset.key))});const{value:se}=$e(D,".buffersource-typedArrays-init"),{min:ce,max:le}=getMinMaxForTypedArray(se);ie.textContent="",ie.append(...Array.from({length:v},(g,v)=>{const D=q.$typedArray[v];return jmlExports.jml("label",[v," ",["input",{class:"typedArrayValue typedArray-"+se,dataset:{key:v,bigint:String(se.startsWith("BigInt"))},type:"number",step:"1",pattern:se.startsWith("Float")?String.raw`\d+(?:\.\d+)?`:String.raw`\d+`,value:D?String(D):"0",min:ce,max:le}]," "])}))}},$on:{change(g){const v=this;if(!v.$checkBufferBounds(g))return;const D=this.parentElement?.parentElement,{value:R}=$e(D,".buffersource-typedArrays-init"),q=toInteger(v.value);try{new(getTypedArray(R))(q)}catch{return v.setCustomValidity("Typed Array length is too long"),g.stopPropagation(),void v.reportValidity()}v.setCustomValidity(""),v.reportValidity(),$e(this.parentElement?.parentElement?.parentElement,".returnType").$buildInstances(),v.$buildTypedArray()}}}],["div",{class:"typedArrayArea"}]]]]],["fieldset",[["legend",["DataView initialization (optional)"]],["select",{class:"dataViewMethod","aria-label":"Data View methods",$on:{change(){const g=$e(this.parentElement,".dataViewArea"),v=this.value,D=v.slice(3)+"Array";g.textContent="",g.append(jmlExports.jml("label",["Byte offset ",["input",{type:"number",class:"dataViewSetByteOffset",step:"1",size:"4",pattern:String.raw`\d+`}]])," ",jmlExports.jml("label",["Value ",["input",{type:"number",step:"1",size:"4",pattern:String.raw`\d+`,class:"typedArrayValue typedArray-"+D,...getMinMaxForTypedArray(D)}]]),"setInt8"===v||"setUint8"===v?"":jmlExports.jml("label",[["input",{class:"littleEndian",type:"checkbox"}],"Little endian"])," ",jmlExports.jml("button",{$on:{click(g){g.preventDefault();const v=this.parentElement,D=v.previousElementSibling?.value,R=toInteger($e(v,".dataViewSetByteOffset").value),q=$e(v,".typedArrayValue").value,ie=$e(v,".littleEndian")?.checked,se=$e(v?.parentElement?.parentElement,".byteLength");"setBigInt64"===D||"setBigUint64"===D?se.$dataView[D](R,BigInt(q),ie):se.$dataView[D](R,Number(q),ie);$e(v.parentElement?.parentElement,".typedArrayLength").$buildTypedArray()}}},["Set"]))}}},[["option",{value:""},["(Select a data view method)"]],...dataViewMethods.map(g=>["option",[g]])]]," ",["div",{class:"dataViewArea"}]]]]);if(D&&this.setValue)this.setValue({root:R,value:D});else{$e(R,".byteLength").$value=new ArrayBuffer(0)}return[R]}},noneditableType={option:["Non-editable"],valueMatch:()=>!0,getInput:({root:g})=>$e(g,"button"),setValue({root:g,value:v}){this.getInput({root:g}).$value=v,$e(g,".stringTag").textContent=void 0===v?"(None)":toStringTag(v)},getValue({root:g}){return this.getInput({root:g}).$value},validate({root:g}){return{message:"The non-editable type is only for passing on pre-existing content that is unknown or currently unsupported",valid:void 0!==this.getInput({root:g}).$value}},viewUI({value:g,specificSchemaObject:v}){const D=toStringTag(g);return["div",{dataset:{type:"resurrectable"}},[["b",{class:"emphasis",title:schemaLabel(v)?`(a non-editable ${D})`:void 0},[schemaLabel(v)??"Non-editable"]],["span",{title:"There is no current support for editing this element's type, but its contents will be passed on transparently."},["?"]],["b",["String tag: "]],D]]},editUI:({typeNamespace:g,specificSchemaObject:v,value:D})=>["div",{dataset:{type:"resurrectable"},title:schemaLabel(v)??"Non-editable"},[["a",{href:"javascript:void(0)",$on:{click(g){g.preventDefault()}},title:"There is no current support for editing this element's type, but its contents will be passed on transparently."},["?"]]," ",["button",{$on:{click(g){g.preventDefault(),console.log(this.$value)}},name:`${g}-resurrectable`,$custom:{$value:D}},["Non-editable"]],["br"],["b",["String tag: "]],["span",{class:"stringTag"},[D?toStringTag(D):"(None)"]]]]},symbolType={option:["Symbol"],stringRegex:/^(?<symbolClassType>Symbol|Symbol.for)\((?<innerContent>[^)]*)\)$/u,ct:0,valueMatch:g=>"symbol"==typeof g,toValue(g,v){const{groups:{symbolClassType:D}={}}=v.match;return{value:("Symbol"===D?Symbol:Symbol.for.bind(Symbol))(g)}},getInput:({root:g})=>$e(g,"input.symbolInput"),setValue({root:g,value:v}){Symbol.keyFor(v)?$e(g,'input[value="Symbol.for"]').checked=!0:$e(g,'input[value="Symbol"]').checked=!0,this.getInput({root:g}).value=String(v).slice(7,-1)},getValue({root:g}){return($e(g,'input[value="Symbol"]').checked?Symbol:Symbol.for.bind(Symbol))(this.getInput({root:g}).value)},viewUI:({value:g,specificSchemaObject:v})=>["span",{dataset:{type:"symbol"},title:schemaLabel(v)??"(a Symbol)"},[void 0===Symbol.keyFor(g)?"":["b",["Global: "]],String(g).slice(7,-1)]],editUI({typeNamespace:g,specificSchemaObject:v,value:D=""}){return this.ct++,["div",{dataset:{type:"symbol"},title:schemaLabel(v)??"(a Symbol)"},[["label",["Symbol()",["input",{type:"radio",name:`${g}-symbol${this.ct}`,value:"Symbol",checked:!D||!Symbol.keyFor(D)}]]],["label",["Symbol.for()",["input",{type:"radio",name:`${g}-symbol${this.ct}`,value:"Symbol.for",checked:D&&void 0!==Symbol.keyFor(D)}]]],["br"],["input",{className:"symbolInput",name:`${g}-symbol`,value:String(D).slice(7,-1)}]]]}},getTypeson=()=>(structuredCloningJsoe.splice(1,0,Q),(new Typeson).register([...structuredCloningJsoe,X,z$2,functionSpec])),promiseType={option:["Promise"],regexEndings:[",",")"],stringRegexBegin:/^Promise\(/u,stringRegexEnd:/^\)/u,array:!0,valueMatch:g=>"Promise"===toStringTag(g),toValue(...g){const v=arrayType.toValue.apply(this,g);return{value:Promise.resolve(v.value[0]),remnant:v.remnant}},getInput({root:g}){const v=$e(g,"div[data-type]");return this.types?.getFormControlForRoot(v)},setValue({root:g,value:v}){return(async()=>{await tick();const D=await v,R=getTypeson(),q=await R.rootTypeName(D),ie=$e(g,"select");ie.value=q,ie.dispatchEvent(new Event("change"));const se=$e(g,"div[data-type]");await(this.types?.setValue({type:q,root:se,value:D}));const ce=this.types?.getFormControlForRoot(se);ce?.dispatchEvent(new Event("input")),ce?.blur()})()},getValue({root:g}){const v=$e(g,"div[data-type]");return Promise.resolve(this.types?.getValueForRoot(v))},viewUI({specificSchemaObject:g,types:v,value:D,...R}){const q=getTypeson(),ie=jmlExports.jml("span"),se=jmlExports.jml("div");return(async()=>{const ce=await D,le=await q.rootTypeName(ce);ie.textContent=le;const me=v.getTypeObject(le);se.append(jmlExports.jml(...me.viewUI({specificSchemaObject:g,types:v,value:ce,...R})))})(),["span",{dataset:{type:"promise"},title:schemaLabel(g)},["A Promise ",ie,se]]},editUI({format:g,types:v,type:D,buildTypeChoices:R,specificSchemaObject:q,topRoot:ie,schemaContent:se,typeNamespace:ce,value:le}){this.types=v;const me=jmlExports.jml("div",{dataset:{type:"promise"},title:schemaLabel(q)??"(a Promise)"},["Promise ",...R({topRoot:ie,format:g,schemaOriginal:se,schemaContent:q?.value??{type:"any"},state:D,typeNamespace:ce}).domArray]);return le&&this.setValue&&this.setValue({root:me,value:le}),[me]}},observerMap=new WeakMap,idRegex=String.raw`^(?:[$_\p{ID_Start}])(?:[$_\u200C\u200D\p{ID_Continue}])*$`,setTooltips=({root:g,specificSchemaObject:v,textareas:D,textareaBody:R})=>{R.title=`Return type:\n\n${JSON.stringify(v.output,null,2)}`;const q=v.input;if(D.forEach((g,v)=>{g.title=JSON.stringify(q.items[v]??q.rest,null,2)}),observerMap.has(g))return;const addTitles=v=>{if(v.nodeType!==Node.ELEMENT_NODE)return;if(v.querySelector("textarea")){$$e(g,"textarea").slice(0,-1).forEach((g,v)=>{g.title=JSON.stringify(q.items[v]??q.rest,null,2)})}},ie=new MutationObserver(g=>{for(const v of g)if("childList"===v.type){for(const g of v.removedNodes)addTitles(g);for(const g of v.addedNodes)addTitles(g)}});ie.observe(g,{attributes:!1,childList:!0,subtree:!0}),observerMap.set(g,ie)},getArgsAndBodyOfFunction=g=>{const v=String(g),D=`(${v.trimStart().startsWith("function")?v:`function ${v}`})`,R=D.slice(D.indexOf("{")+1,D.lastIndexOf("}")).trim();return{args:parse$2(D,{ecmaVersion:"latest",sourceType:"module"}).body[0].expression.params.map(({name:g})=>g.trim()),body:R}},setValueAndTooltips=({root:g,value:v,specificSchemaObject:D})=>{const{args:R,body:q}=getArgsAndBodyOfFunction(v);return(async()=>{await tick();let ie=$$e(g,'textarea[name$="-string"]');const se=ie.pop();R.forEach((v,D)=>{Object.hasOwn(ie,D)||$e(g,".addArrayElement")?.click()}),await tick(),ie=$$e(g,'textarea[name$="-string"]').slice(0,-1),v&&(R.forEach((g,v)=>{Object.hasOwn(ie,v)&&(ie[v].value=g)}),se&&(se.value=q)),D&&setTooltips({root:g,specificSchemaObject:D,textareas:ie,textareaBody:se})})()},functionType={option:["function"],regexEndings:["}"],stringRegexBegin:/^function\((?<args>[^)]*?)\) \{(?<returns>.*)\}$/u,stringRegexEnd:/^\}/u,array:!0,valueMatch:g=>"function"==typeof g,toValue(g,v){const{groups:{args:D,returns:R}={}}=v.match;return{value:new Function(...D.split(/\s*,\s*/u),R)}},getInput:({root:g})=>$e(g,"textarea"),setValue:({root:g,value:v})=>setValueAndTooltips({root:g,value:v}),getValue({root:g}){const v=$$e(g,"textarea"),D=v.pop();if(!D)throw new Error("Not yet instantiated");return new Function(...v.map(({value:g})=>g.trim()),D.value.trim())},viewUI({value:g,specificSchemaObject:v}){const{args:D,body:R}=getArgsAndBodyOfFunction(g);return["span",{dataset:{type:"function"},title:schemaLabel(v)??"(a function)"},[["b",["Args"]]," ",`(${D.join(", ")})`,["br"],["b",["Body"]]," ",R]]},editUI({type:g,buildTypeChoices:v,specificSchemaObject:D,topRoot:R,typeNamespace:q,value:ie}){const se=D?copyObject(D):void 0,ce=se?.input??{items:[],rest:{}};ce.description="",ce.rest&&(ce.rest.description="Argument");const le=ce.items.length,me=v,fe=me({topRoot:R,format:"schema",schemaContent:{type:"set",minSize:le,maxSize:ce.rest?void 0:le,value:{type:"string",regex:idRegex,flags:"v"}},state:g,typeNamespace:q}),ge=me({topRoot:R,format:"schema",schemaContent:{type:"string"},state:g,typeNamespace:q}),ve=jmlExports.jml("div",{dataset:{type:"function"}},[["b",["Arguments"]],["br"],...fe.domArray,["b",["Function body"]],["br"],...ge.domArray]),xe=Promise.all([fe.whenReady,ge.whenReady]);return ie?(async()=>{try{await xe,await setValueAndTooltips({root:ve,value:ie,specificSchemaObject:D})}catch{}})():D&&(async()=>{await xe;const g=$$e(ve,"textarea"),v=g.pop();setTooltips({root:ve,specificSchemaObject:D,textareas:g,textareaBody:v})})(),[ve]}},getPropertyValueFromLegend=g=>{const v=$e(g,'*[data-prop="true"]');if(!v)throw new Error("No property on the supplied legend element");if("input"===v.nodeName.toLowerCase())return v.value;if(!v.textContent)throw new Error("No property with text present on the supplied legend element");return String(Math.trunc(Number(v.textContent))-1)};class Types{constructor({useZodexyErrorMessages:g=!1,useZodexyErrorMessagesInTypes:v=!1}={}){this.formats=new Formats,this.useZodexyErrorMessages=g,this.useZodexyErrorMessagesInTypes=v,this.schemasForRoots=new WeakMap,this.customValidateAllReferences=void 0,this.availableTypes={null:nullType,true:trueType,false:falseType,nan:nanType,boolean:booleanType,number:numberType,bigint:bigintType,bigintObject:bigintObjectType,string:stringType,arrayReference:arrayReferenceType,objectReference:objectReferenceType,array:arrayType,object:objectType,date:dateType,userObject:["User objects"],undef:undefinedType,SpecialRealNumber:SpecialRealNumberSuperType,SpecialNumber:SpecialNumberSuperType,error:errorType,errors:errorsSpecialType,regexp:regexpType,BooleanObject:BooleanObjectType,NumberObject:NumberObjectType,StringObject:StringObjectType,map:mapType,set:setType,file:fileType,filelist:filelistType,blob:blobType,blobHTML:blobHTMLType,domexception:domexceptionType,domrect:domrectType,dompoint:dompointType,dommatrix:dommatrixType,resurrectable:noneditableType,symbol:symbolType,promise:promiseType,function:functionType,buffersource:buffersourceType,dataview:{option:["DataView"]},imagedata:{option:["ImageData"]},imagebitmap:{option:["ImageBitmap"]},int8array:{option:["Int8Array"]},uint8array:{option:["Uint8Array"]},uint8clampedarray:{option:["Uint8ClampedArray"]},int16array:{option:["Int16Array"]},uint16array:{option:["Uint16Array"]},int32array:{option:["Int32Array"]},uint32array:{option:["Uint32Array"]},float32array:{option:["Float32Array"]},float64array:{option:["Float64Array"]},ValidDate:{valid:!0},arrayNonindexKeys:{sparse:!0}};(g=>{g.forEach(([g,v])=>{Object.assign(this.availableTypes[v],this.availableTypes[g])})})([["date","ValidDate"],["array","arrayNonindexKeys"]]),this.contexts={},Object.entries(this.availableTypes).forEach(([g,v])=>{const D=g,{stateDependent:R}=v;R&&Object.entries(R).forEach(([g,v])=>{Object.hasOwn(this.contexts,g)||(this.contexts[g]={});const{contexts:R,after:q}=v;R.forEach(v=>{Object.hasOwn(this.contexts[g],v)||(this.contexts[g][v]=[]),this.contexts[g][v].push({type:D,after:q})})})})}async getControlsForFormatAndValue(g,v,D){return(await this.formats.getControlsForFormatAndValue(this,g,v,D)).rootUI}getContextInfo(g,v){return this.contexts[g][v]}getValueForRoot(g,v,D){return this.availableTypes[Types.getTypeForRoot(g)].getValue({root:g,stateObj:v??{types:this},currentPath:D})}getFormControlForRoot(g){const v=this.availableTypes[Types.getTypeForRoot(g)];return v.getInput?v.getInput({root:g}):null}getValueFromRootAncestor(g,v){return this.getValueForRoot($e(g,"div[data-type]"),{...v,types:this,formats:this.formats})}getFormControlFromRootAncestor(g){const v=$e(g,"div[data-type]");return v?this.getFormControlForRoot(v):null}getOptionForType(g,v=void 0){const D=[...this.availableTypes[g].option],R=resolveSchemaMeta(v).label;return R&&(D[0]=`${D[0]} (${R})`),D[1]={value:g,...D[1]},D}getTypeOptionsForFormatAndState(g,v,D,R){const q=this.formats.getTypesAndSchemasForFormatAndState(this,g,v,D,R);if(!q)throw new Error("Unexpected type for format and state");return{typeOptions:q.types.map((g,v)=>this.getOptionForType(g,q.schemaObjects[v])),schemaObjects:q.schemaObjects}}getUIForModeAndType({readonly:g,resultType:v,typeNamespace:D,type:R,topRoot:q,bringIntoFocus:ie,buildTypeChoices:se,format:ce,schemaContent:le,value:me,hasValue:fe,replaced:ge,specificSchemaObject:ve,schemaFallingBack:xe}){const _e=this.availableTypes[R],ke=fe?{typeNamespace:D,type:R,buildTypeChoices:se,format:ce,schemaContent:le,resultType:v,topRoot:q,bringIntoFocus:ie,value:me,replaced:ge,specificSchemaObject:ve,schemaFallingBack:xe,hasValue:fe,types:this}:{typeNamespace:D,type:R,buildTypeChoices:se,format:ce,schemaContent:le,resultType:v,topRoot:q,bringIntoFocus:ie,replaced:ge,specificSchemaObject:ve,schemaFallingBack:xe,hasValue:fe,types:this},we=jmlExports.jml(...g?_e.viewUI(ke):_e.editUI(ke));if(ve&&this.schemasForRoots.set(we,ve),appendSchemaMeta(we,ve),!g&&_e.validate){_e.getInput({root:we}).addEventListener("input",()=>{this.validate({type:R,root:we,topRoot:q})})}return we}validateAllReferences({topRoot:g,avoidReport:v}){g?(Object.values(this.availableTypes).forEach(D=>{const R=D;R.validateAll&&R.validateAll({topRoot:g,types:this,avoidReport:v})}),this.customValidateAllReferences&&this.customValidateAllReferences({topRoot:g})):console.log("No references present")}getValidationMessage({message:g,schema:v,typeSpecific:D=!1}){if(!g)return g;const R=v?.error;return"string"!=typeof R||!this.useZodexyErrorMessages||D&&!this.useZodexyErrorMessagesInTypes?g:R}validate({type:g,root:v,topRoot:D,avoidReport:R}){if(Types.getTypeForRoot(v)!==g)return!0;const q=this.availableTypes[g],ie=q.validate?q.validate({root:v,topRoot:D}):{valid:!0,message:void 0},se=this.schemasForRoots.get(v);let ce,le=!0;try{ce=q.getValue?.({root:v,stateObj:{types:this,formats:this.formats}})}catch(g){if("Not yet instantiated"!==(g&&"object"==typeof g&&"message"in g?g.message:void 0)&&ie.valid)return!1;le=!1}const me=this.formats.getAvailableFormat("schema"),fe=le&&se&&("templateLiteral"===se.type||me.isValueValidationRequired?.(se))?me.validateValue?.(this,se,ce)??{valid:!0,message:void 0}:{valid:!0,message:void 0},ge=ie.valid&&fe.valid,ve=ie.valid?fe.message:ie.message,xe=q.getInput?.({root:v});if(xe){const g=this.getValidationMessage({message:ve||"Invalid",schema:fe.valid?se:fe.schema??se});xe.setCustomValidity(ge?"":g||"Invalid"),R||xe.reportValidity()}return ge}setValue({type:g,root:v,value:D}){if(Types.getTypeForRoot(v)!==g)return;const R=this.availableTypes[g];return R.setValue?R.setValue({root:v,value:D}):void 0}getValueForString(g,{format:v,state:D,endMatchTypeObjs:R=[],firstRun:q=!0,rootHolder:ie=[],parent:se,parentPath:ce,schemaObject:le,schemaOriginal:me}){const fe=this.formats.getTypesAndSchemasForFormatAndState(this,v,D,le,me)?.types;if(!fe)throw new Error("Could not get types for format and state");const ge=Object.entries(this.availableTypes).filter(([g])=>fe.includes(g)),ve=ge.map(([,g])=>g).reduce((g,v)=>{const D=v;let R=g;return D.regexEndings&&(R.push(...D.regexEndings),R=[...new Set(R)]),R},[]),xe="|"+ve.map(g=>escapeRegex(g)).join("|");let _e=null,ke=ge.find(([,v])=>{const D=v;let{stringRegex:R}=D;return"function"==typeof D.stringRegex&&(R=D.stringRegex(!0)),R=R?new RegExp(R.source.slice(0,-1)+"(?=$"+xe+")","u"):R,_e=Boolean(R&&g)&&g.match(R),_e}),we=!1;void 0===ke&&(ke=ge.find(([,v])=>{const D=v,{stringRegexBegin:q}=D;return _e=Boolean(q&&g)&&g.match(q),_e&&(we=!0,R.push(D)),_e}));let Se=!0;if(void 0!==ke){const D=_e,[me,fe]=D;let ge,ve=g.slice(me.length);g=g.slice(0,me.length);try{const q=ke[1];if(!q.toValue)throw new Error("Type has no `toValue` method");ge=q.toValue(D.groups?.innerContent||fe||g,{types:this,format:v,match:_e,endMatchTypeObjs:R,remnant:ve,rootHolder:ie,parent:se,parentPath:ce,schemaObject:le})}catch(g){throw console.log("eee",g),g}!1===ge.assign&&(Se=!1);const{value:xe}=ge;if(void 0!==ge.remnant&&({remnant:ve}=ge),we&&R.length){const g=ve.match(R.at(-1).stringRegexEnd);g&&(R.pop(),ve=ve.slice(g[0].length))}if(q){const g=(new Typeson).register(pe);try{const v=g.revive(xe);return ie.forEach(([g,D,R,q])=>{const ie=this.availableTypes[g+"Reference"].resolveReference(q,v);getJSONType(ie)===g&&["array","object"].includes(g)&&(D[R]=ie)}),[v,ve,we,Se]}catch(g){console.log("failed Typeson revival",g)}}return[xe,ve,we,Se]}throw new Error("Bad parsing data")}getTypeObject(g){return this.availableTypes[g]}}function escapeRegex(g){return g.replaceAll(/[.\\+*?^[\]$(){}=!<>|:-]/gu,String.raw`\$&`)}Types.getTypeForRoot=g=>String(g?g.dataset.type:g),Types.validValuesSet=({form:g,typeNamespace:v,keySelectClass:D})=>{if(!g.offsetParent||!g.checkValidity())return!1;return $$e(g,D?`.${D}`:`.typeChoices-${v}`).every(g=>!g.offsetParent||""!==g.value&&g.$validate())};const getFormatAndSchemaChoices=({schemas:g,selectedSchema:v,hasKeyPath:D,preselectSchema:R,arbitraryJS:q=!1}={})=>{const ie=g&&g.length;return[["JSON only",{value:"json"}],...D?[]:[["IndexedDB key",{value:"indexedDBKey"}]],["Structured Clone (via Typeson JSON)",{value:"structuredCloning",selected:!(R&&ie||q)}],...q?[["Arbitrary JavaScript Object",{value:"arbitraryJS",selected:!R||!ie}]]:[],...ie?g.map((g,D)=>[`Schema: ${g}`,{value:"schema",dataset:{schema:g},selected:R?v?g===v:0===D:void 0}]):[]].map(([g,v])=>jmlExports.jml("option",v,[g])).reduce((g,v)=>(g.append(v),g),document.createDocumentFragment())};async function formatAndTypeChoices({schemas:g,getSchemaContent:v,hasValue:D,singleValue:R,hasKeyPath:q,arbitraryJS:ie=!1,preselectSchema:se=!0,typeNamespace:ce,selectedSchema:le,formats:me=new Formats,useZodexyErrorMessages:fe=!1,useZodexyErrorMessagesInTypes:ge=!1,types:ve=new Types({useZodexyErrorMessages:fe,useZodexyErrorMessagesInTypes:ge})}){const xe=se&&g&&g.length?"schema":ie?"arbitraryJS":"structuredCloning";let _e=Promise.resolve();const ke=jmlExports.jml("select",{class:"formatChoices",hidden:R,$custom:{async $setFormat({valueFormat:g,autoTrigger:v,schema:D}){if(D){const g=[...this.options].findIndex(g=>g.dataset.schema===D);this.selectedIndex=-1===g?0:g}else g&&(this.value=g);await this.$buildTypeChoices(v)},$whenReady:()=>_e,async $buildTypeChoices(g){DOM.removeChildren(we);const{schema:R}=this.selectedOptions[0].dataset,ie=buildTypeChoices({autoTrigger:g,topRoot:$e(we,"div[data-type]"),format:this.value,formats:me,types:ve,typeNamespace:ce,requireObject:q,objectHasValue:D,schema:R,schemaContent:R?await(v?.(R)):void 0});_e=ie.whenReady,jmlExports.jml({"#":ie.domArray},we),await ie.whenReady}},$on:{async change(){await this.$buildTypeChoices()}}},[getFormatAndSchemaChoices({schemas:g,hasKeyPath:q,selectedSchema:le,arbitraryJS:ie,preselectSchema:se})]),we=jmlExports.jml("div",{class:"typesHolder",$custom:{$getTypeRoot(){return $e(this,"div[data-type]")},$getTypeSelect(){return $e(this,`.typeChoices-${ce}`)}}}),Se="schema"===xe?ke.selectedOptions[0].dataset.schema:void 0,Ie=buildTypeChoices({topRoot:$e(we,"div[data-type]"),format:xe,formats:me,types:ve,typeNamespace:ce,requireObject:q,objectHasValue:D,schema:Se,schemaContent:void 0===Se?void 0:await(v?.(Se))});return _e=Ie.whenReady,jmlExports.jml({"#":Ie.domArray},we),{formats:me,types:ve,formatChoices:ke,typesHolder:we,domArray:[ke,we],whenReady:_e,getValue(g,v){const D=we.$getTypeRoot();return ve.getValueForRoot(D,{typeNamespace:ce,format:ke.value,formats:me,types:ve,...g},v)},getType(){const g=we.$getTypeRoot();return Types.getTypeForRoot(g)},validValuesSet(){const g=we.$getTypeRoot();if(!g)return!1;const v=g.closest("form");return Types.validValuesSet({form:v,typeNamespace:ce})},async setValue(g,v){const D=await me.getControlsForFormatAndValue(ve,ke.value,g,v),R=D.rootUI,q=Types.getTypeForRoot(R);we.$getTypeSelect().$addTypeAndEditUI({type:q,editUI:R}),await D.whenBuilt}}}export{Formats,Types,formatAndTypeChoices,getFormatAndSchemaChoices,getTypesForSchema,buildTypeChoices as typeChoices};
6
+ */const{keys:r,hasOwn:n}=Object,{isArray:o}=Array,a=["type","replaced","iterateIn","iterateUnsetNumeric","iterateSymbols","addLength"];function setOwnEnumerable(g,v,L){Object.defineProperty(g,v,{configurable:!0,enumerable:!0,value:L,writable:!0})}const s=["asyncIterator","hasInstance","isConcatSpreadable","iterator","match","matchAll","replace","search","species","split","toPrimitive","toStringTag","unscopables"];function nestedPathsFirst(g,v){if(""===g.keypath)return-1;let L=g.keypath.match(/\./gu)??0,R=v.keypath.match(/\./gu)??0;return L&&(L=L.length),R&&(R=R.length),L>R?-1:L<R?1:g.keypath<v.keypath?-1:g.keypath>v.keypath?1:0}class Typeson{constructor(g){this.options=g,this.plainObjectReplacers=[],this.nonplainObjectReplacers=[],this.revivers={},this.types={},this.symbolsByName=Object.create(null),this.symbolsByValue=new Map;const v=g?.symbols;v&&Object.entries(v).forEach(([g,v])=>{if("symbol"!=typeof v)throw new TypeError("Non-symbol value supplied for `symbols` entry: "+g);this.symbolsByName[g]=v,this.symbolsByValue.set(v,g)})}stringify(g,v,L,R){R={...this.options,...R,stringification:!0};const W=this.encapsulate(g,null,R);return o(W)?JSON.stringify(W[0],v,L):W.then(g=>JSON.stringify(g,v,L))}stringifySync(g,v,L,R){return this.stringify(g,v,L,{throwOnBadSyncType:!0,...R,sync:!0})}stringifyAsync(g,v,L,R){return this.stringify(g,v,L,{throwOnBadSyncType:!0,...R,sync:!1})}parse(g,v,L){return L={...this.options,...L,parse:!0},this.revive(JSON.parse(g,v),L)}parseSync(g,v,L){return this.parse(g,v,{throwOnBadSyncType:!0,...L,sync:!0})}parseAsync(g,v,L){return this.parse(g,v,{throwOnBadSyncType:!0,...L,sync:!1})}specialTypeNames(g,v,L={}){return this.encapsulate(g,v,{...L,returnTypeNames:!0})}rootTypeName(g,v,L={}){return this.encapsulate(g,v,{...L,iterateNone:!0})}encapsulate(g,v,L){const R={sync:!0,...this.options,...L},{sync:W}=R,ie={},ce={},le=[],ue=[],me=[],ge=!("cyclic"in R)||R.cyclic,{encapsulateObserver:ve,encapsulateError:xe}=R,finish=g=>{const v=Object.values(ie);if(R.iterateNone)return v.length?v[0]:getJSONType(g);if(R.returnTypeNames)return!!v.length&&[...new Set(v)];const L=Object.keys(ce).length>0,W=isObject$1(g)&&(n(g,"$types")||n(g,"$symbolKeys"));return L||v.length?(!W&&g&&isPlainObject$1(g)?v.length&&(g.$types=ie):g={$:g,$types:{$:ie}},L&&(g.$symbolKeys=ce)):W&&(g={$:g,$types:!0}),g},checkPromises=async(g,v)=>{const L=await Promise.all(v.map(g=>g[1].p));return await Promise.all(L.map(async function(L){const R=[],[W]=v.splice(0,1),[ie,,ce,le,ue,me,ge]=W,ve=_encapsulate(ie,L,ce,le,R,!0,ge),xe=hasConstructorOf(ve,TypesonPromise);return ie&&xe?(setOwnEnumerable(ue,me,await ve.p),checkPromises(g,R)):(ie?setOwnEnumerable(ue,me,ve):g=xe?ve.p:ve,checkPromises(g,R))})),g},_adaptBuiltinStateObjectProperties=(g,v,L)=>{Object.assign(g,v);const R=a.map(v=>{const L=g[v];return delete g[v],L});L(),a.forEach((v,L)=>{g[v]=R[L]})},_encapsulate=(g,v,L,W,me,ge,_e)=>{let ke,Se={};const we=ve?function(R){const ie=_e??W.type??getJSONType(v);ve(Object.assign(R??Se,{keypath:g,value:v,cyclic:L,stateObj:W,promisesData:me,resolvingTypesonPromise:ge,awaitingTypesonPromise:hasConstructorOf(v,TypesonPromise)},{type:ie}))}:null,getEncapsulatedValue=(g,v,R)=>{try{return{value:_encapsulate(g,v[R],Boolean(L),W,me,ge)}}catch(L){if(!xe)throw L;const ie=_e??W.type??getJSONType(v),ce=xe({keypath:g,error:L,parent:v,key:R,stateObj:W,type:ie});if(!ce)throw L;if("substitute"in ce)return{value:ce.substitute,substitute:!0};if(ce.ignore)return;throw L}};if(["string","boolean","number","undefined"].includes(typeof v))return void 0===v||v===1/0||0===v||v===-1/0||Number.isNaN(v)?(ke=W.replaced?v:replace(g,v,W,me,!1,ge,we),ke!==v&&(Se={replaced:ke})):ke=v,we&&we(),ke;if(null===v)return we&&we(),v;if(L&&v&&"object"==typeof v&&!W.iterateIn&&!W.iterateUnsetNumeric){const R=le.indexOf(v);if(-1!==R)return ie[g]="#",we&&we({cyclicKeypath:ue[R]}),"#"+ue[R];!0===L&&(le.push(v),ue.push(g))}const Ie=isPlainObject$1(v),Ee=o(v),Ce=(Ie||Ee)&&(!this.plainObjectReplacers.length||W.replaced)||W.iterateIn?v:replace(g,v,W,me,Ie||Ee,null,we);let Oe;if(Ce!==v?(ke=Ce,Se={replaced:Ce}):""===g&&hasConstructorOf(v,TypesonPromise)?(me.push([g,v,L,W,void 0,void 0,W.type]),ke=v):Ee&&"object"!==W.iterateIn||"array"===W.iterateIn?(Oe=new Array(v.length),Se={clone:Oe}):!Ie&&("object"!=typeof v||"toJSON"in v||hasConstructorOf(v,TypesonPromise)||hasConstructorOf(v,Promise)||hasConstructorOf(v,ArrayBuffer))&&"object"!==W.iterateIn?ke=v:(Oe={},W.addLength&&(Oe.length=v.length),Se={clone:Oe}),we&&we(),R.iterateNone)return Oe??ke;if(!Oe)return ke;if(W.iterateIn){for(const R in v){const ie={ownKeys:n(v,R)};_adaptBuiltinStateObjectProperties(W,ie,()=>{const ie=g+(g?".":"")+escapeKeyPathComponent(R),ce=getEncapsulatedValue(ie,v,R),le=ce&&ce.value;hasConstructorOf(le,TypesonPromise)?me.push([ie,le,Boolean(L),W,Oe,R,W.type]):ce&&(void 0!==le||"substitute"in ce)&&setOwnEnumerable(Oe,R,le)})}we&&we({endIterateIn:!0,end:!0})}else r(v).forEach(function(R){const ie=g+(g?".":"")+escapeKeyPathComponent(R);_adaptBuiltinStateObjectProperties(W,{ownKeys:!0},()=>{const g=getEncapsulatedValue(ie,v,R),ce=g&&g.value;hasConstructorOf(ce,TypesonPromise)?me.push([ie,ce,Boolean(L),W,Oe,R,W.type]):g&&(void 0!==ce||"substitute"in g)&&setOwnEnumerable(Oe,R,ce)})}),we&&we({endIterateOwn:!0,end:!0}),(W.iterateSymbols||R.iterateSymbols)&&(Object.getOwnPropertySymbols(v).filter(g=>Object.prototype.propertyIsEnumerable.call(v,g)).forEach(ie=>{const le=function resolveSymbolIdentity(g,v){const L=Symbol.keyFor(g);if(void 0!==L)return{for:L};const R=s.find(v=>Symbol[v]===g);if(R)return{wellKnown:R};const W=v.get(g);return void 0!==W?{registered:W}:null}(ie,this.symbolsByValue);if(!le){if(R.throwOnUnregisteredSymbol)throw new TypeError("Cannot serialize a Symbol-keyed property whose Symbol has no portable identity (not global, not well-known, and not in the `symbols` option): "+String(ie));return}const ue=ce[g]??=[],ge={key:le};ue.push(ge);const ve=ue.length-1,xe=`$symbolKeys.${escapeKeyPathComponent(g)}.${String(ve)}.value`,_e={value:v[ie]};_adaptBuiltinStateObjectProperties(W,{ownKeys:!0},()=>{const g=getEncapsulatedValue(xe,_e,"value"),v=g&&g.value;hasConstructorOf(v,TypesonPromise)?me.push([xe,v,Boolean(L),W,ge,"value",W.type]):g&&(void 0!==v||"substitute"in g)&&setOwnEnumerable(ge,"value",v)})}),we&&we({endIterateSymbols:!0,end:!0}));if(W.iterateUnsetNumeric){const R=v.length;for(let ie=0;ie<R;ie++){if(ie in v)continue;const R=`${g}${g?".":""}${String(ie)}`;_adaptBuiltinStateObjectProperties(W,{ownKeys:!1},()=>{const g=_encapsulate(R,void 0,Boolean(L),W,me,ge);hasConstructorOf(g,TypesonPromise)?me.push([R,g,Boolean(L),W,Oe,ie,W.type]):void 0!==g&&setOwnEnumerable(Oe,ie,g)})}we&&we({endIterateUnsetNumeric:!0,end:!0})}return Oe},replace=(g,v,L,R,ce,le,ue)=>{const me=ce?this.plainObjectReplacers:this.nonplainObjectReplacers;let ve=me.length;for(;ve--;){const ce=me[ve];if(ce.test(v,L)){const{type:me}=ce;if(Object.hasOwn(this.revivers,me)){const v=ie[g];ie[g]=v?[me].concat(v):me}if(Object.assign(L,{type:me,replaced:!0}),(W||!ce.replaceAsync)&&!ce.replace)return ue&&ue({typeDetected:!0}),_encapsulate(g,v,ge&&"readonly",L,R,le,me);let ve;if(ue&&ue({replacing:!0}),W||!ce.replaceAsync){if(void 0===ce.replace)throw new TypeError("Missing replacer");ve=ce.replace(v,L)}else ve=ce.replaceAsync(v,L);return _encapsulate(g,ve,ge&&"readonly",L,R,le,me)}}return v},_e=_encapsulate("",g,ge,v??{},me);if(me.length)return W&&R.throwOnBadSyncType?(()=>{throw new TypeError("Sync method requested but async result obtained")})():Promise.resolve(checkPromises(_e,me)).then(finish);if(!W&&R.throwOnBadSyncType)throw new TypeError("Async method requested but sync result obtained");return W&&R.stringification?[finish(_e)]:W?finish(_e):Promise.resolve(finish(_e))}encapsulateSync(g,v,L){return this.encapsulate(g,v,{throwOnBadSyncType:!0,...L,sync:!0})}encapsulateAsync(g,v,L){return this.encapsulate(g,v,{throwOnBadSyncType:!0,...L,sync:!1})}revive(g,v){const L={sync:!0,...this.options,...v},{sync:R}=L;function finishRevival(g){if(R)return g;if(L.throwOnBadSyncType)throw new TypeError("Async method requested but sync result obtained");return Promise.resolve(g)}if(!g||"object"!=typeof g||Array.isArray(g))return finishRevival(g);let W=g.$types;if(!0===W)return finishRevival(g.$);const ie=g.$symbolKeys;let ce=void 0!==ie;if(!W||"object"!=typeof W||Array.isArray(W)){if(!ie)return finishRevival(g);W={}}const le=[],ue=Object.create(null),me={};let ge=!0;W.$&&isPlainObject$1(W.$)&&(g=g.$,W=W.$,ge=!1,ce=!1,void 0!==ie&&isObject$1(g)&&!n(g,"$symbolKeys")&&(g.$symbolKeys=ie,ce=!0));const executeReviver=(g,v)=>{const[L]=this.revivers[g]??[];if(!L)throw new Error("Unregistered type: "+g);if(R&&!("revive"in L))return v;if(!R&&L.reviveAsync)return L.reviveAsync(v,me);if(L.revive)return L.revive(v,me);throw new Error("Missing reviver")},ve=[];function checkUndefined(g){return hasConstructorOf(g,Undefined)?void 0:g}const reHomeSymbolKeys=g=>{if(!isObject$1(g))return;const v=ce?g.$symbolKeys:ie;v&&(Object.entries(v).forEach(([v,L])=>{const R=getByKeyPath(g,v);isObject$1(R)&&L.forEach(g=>{if(!n(g,"value"))return;const v=function resolveSymbolFromIdentity(g,v){if("for"in g)return Symbol.for(g.for);if("wellKnown"in g){const v=s.find(v=>v===g.wellKnown);if(!v)throw new Error("Unknown well-known Symbol: "+g.wellKnown);return Symbol[v]}if(!n(v,g.registered))throw new Error("Unregistered symbol: "+g.registered);return v[g.registered]}(g.key,this.symbolsByName),L=checkUndefined(g.value);g.descriptor?Object.defineProperty(R,v,{configurable:!0,enumerable:!0,writable:!0,...g.descriptor,value:L}):R[v]=L})}),ce&&delete g.$symbolKeys)},xe=(()=>{if(!W)throw new Error("Found bad `types`");const v=[];if(Object.entries(W).forEach(([g,L])=>{"#"!==L&&[].concat(L).forEach(L=>{const[,{plain:R}]=this.revivers[L]??[null,{}];R&&(v.push({keypath:g,type:L}),delete W[g])})}),v.length)return v.sort(nestedPathsFirst),v.reduce(function reducer(v,{keypath:L,type:R}){if(isThenable(v))return v.then(g=>reducer(g,{keypath:L,type:R}));let W=getByKeyPath(g,L);if(W=executeReviver(R,W),hasConstructorOf(W,TypesonPromise))return W.then(v=>{const R=setAtKeyPath(g,L,v);R===v&&(g=R)});const ie=setAtKeyPath(g,L,W);ie===W&&(g=ie)},void 0)})();let _e;return hasConstructorOf(xe,TypesonPromise)?_e=xe.then(()=>g):(_e=function _revive(g,v,L,ie,ce){if(ge&&"$types"===g)return;const me=ve.length,xe=n(W,g)?W[g]:void 0,_e=o(v);if(_e||isPlainObject$1(v)){const R=_e?new Array(v.length):{};for(r(v).forEach(W=>{const ie=_revive(g+(g?".":"")+escapeKeyPathComponent(W),v[W],L??R,R,W),set=g=>(hasConstructorOf(g,Undefined)?setOwnEnumerable(R,W,void 0):void 0!==g&&setOwnEnumerable(R,W,g),g);hasConstructorOf(ie,TypesonPromise)?ve.push(ie.then(g=>set(g))):set(ie)}),v=R;le.length;){const[[g,v,L,R]]=le,W=n(ue,v),ie=W?ue[v]:getByKeyPath(g,v);if(!W&&void 0===ie)break;setOwnEnumerable(L,R,ie),le.shift()}}if(!xe)return ue[g]=v,v;if("#"===xe){const g=v.slice(1),R=n(ue,g),W=R?ue[g]:getByKeyPath(L,g);return R||void 0!==W||le.push([L,g,ie,ce]),W}const applyType=v=>{const L=[].concat(xe).reduce(function reducer(g,v){if(hasConstructorOf(g,TypesonPromise))return g.then(g=>reducer(g,v));if("string"!=typeof v)throw new TypeError("Bad type JSON");return executeReviver(v,g)},v);return hasConstructorOf(L,TypesonPromise)?L.then(v=>(ue[g]=v,v)):(ue[g]=L,L)};return!R&&ve.length>me?TypesonPromise.all(ve.slice(me)).then(()=>applyType(v)):applyType(v)}("",g,null),ve.length&&(_e=TypesonPromise.resolve(_e).then(g=>TypesonPromise.all([g,...ve])).then(([g])=>g))),ie&&(isThenable(_e)?_e=_e.then(g=>(reHomeSymbolKeys(g),g)):reHomeSymbolKeys(_e)),isThenable(_e)?R&&L.throwOnBadSyncType?(()=>{throw new TypeError("Sync method requested but async result obtained")})():hasConstructorOf(_e,TypesonPromise)?_e.p.then(checkUndefined):_e:!R&&L.throwOnBadSyncType?(()=>{throw new TypeError("Async method requested but sync result obtained")})():R?checkUndefined(_e):Promise.resolve(checkUndefined(_e))}reviveSync(g,v){return this.revive(g,{throwOnBadSyncType:!0,...v,sync:!0})}reviveAsync(g,v){return this.revive(g,{throwOnBadSyncType:!0,...v,sync:!1})}register(g,v){const L=v??{},reg=g=>{o(g)?g.forEach(g=>{reg(g)}):r(g).forEach(v=>{if("#"===v)throw new TypeError("# cannot be used as a type name as it is reserved for cyclic objects");if(i$1.includes(v))throw new TypeError("Plain JSON object types are reserved as type names");let R=g[v];if([this.plainObjectReplacers,this.nonplainObjectReplacers].forEach(g=>{const L=g.findIndex(g=>g.type===v);-1!==L&&g.splice(L,1)}),delete this.revivers[v],delete this.types[v],"function"==typeof R){const g=R;R={test:v=>v&&v.constructor===g,replace:g=>({...g}),revive:v=>Object.assign(Object.create(g.prototype),v)}}else if(o(R)){const[g,v,L]=R;R={test:g,replace:v,revive:L}}if(!R?.test)return;const W={type:v,test:R.test.bind(R)};R.replace&&(W.replace=R.replace.bind(R)),R.replaceAsync&&(W.replaceAsync=R.replaceAsync.bind(R));const ie="number"==typeof L.fallback?L.fallback:L.fallback?0:1/0;if(R.testPlainObjects?this.plainObjectReplacers.splice(ie,0,W):this.nonplainObjectReplacers.splice(ie,0,W),R.revive||R.reviveAsync){const g={};R.revive&&(g.revive=R.revive.bind(R)),R.reviveAsync&&(g.reviveAsync=R.reviveAsync.bind(R)),this.revivers[v]=[g,{plain:R.testPlainObjects}]}this.types[v]=R})};return[].concat(g).forEach(g=>{reg(g)}),this}}class Undefined{}Undefined.__typeson__type__="TypesonUndefined";const i$1=["null","boolean","number","string","array","object"];for(var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=new Uint8Array(256),u=0;u<64;u++)l[c.codePointAt(u)]=u;var y=function encode(g,v,L){null==L&&(L=g.byteLength);for(var R=new Uint8Array(g,0,L),W=R.length,ie="",ce=0;ce<W;ce+=3)ie+=c[R[ce]>>2],ie+=c[(3&R[ce])<<4|R[ce+1]>>4],ie+=c[(15&R[ce+1])<<2|R[ce+2]>>6],ie+=c[63&R[ce+2]];return W%3==2?ie=ie.slice(0,-1)+"=":W%3==1&&(ie=ie.slice(0,-2)+"=="),ie},p=function decode(g,v){var L=g.length;if(L%4)throw new Error("Bad base64 length: not divisible by four");var R,W,ie,ce,le=.75*g.length,ue=0;"="===g[g.length-1]&&(le--,"="===g[g.length-2]&&le--);for(var me=new ArrayBuffer(le,v),ge=new Uint8Array(me),ve=0;ve<L;ve+=4)R=l[g.codePointAt(ve)],W=l[g.codePointAt(ve+1)],ie=l[g.codePointAt(ve+2)],ce=l[g.codePointAt(ve+3)],ge[ue++]=R<<2|W>>4,ge[ue++]=(15&W)<<4|ie>>2,ge[ue++]=(3&ie)<<6|63&ce;return me};const f={arraybuffer:{test:g=>"ArrayBuffer"===toStringTag(g),replace(g,v){v.buffers||(v.buffers=[]);const L=v.buffers.indexOf(g);return-1!==L?{index:L}:(v.buffers.push(g),{s:y(g),maxByteLength:g.maxByteLength,resizable:g.resizable})},revive(g,v){if(v.buffers||(v.buffers=[]),Object.hasOwn(g,"index"))return v.buffers[g.index];const L=p(g.s,g.resizable?{maxByteLength:g.maxByteLength}:void 0);return v.buffers.push(L),L}}},d$1={audiodata:{test:g=>"AudioData"===toStringTag(g),replace(g){const{format:v,sampleRate:L,numberOfFrames:R,numberOfChannels:W,timestamp:ie}=g,ce=v.endsWith("-planar")?W:1,le=[];let ue=0;for(let v=0;v<ce;v++){const L=g.allocationSize({planeIndex:v});le.push(L),ue+=L}const me=new ArrayBuffer(ue);let ge=0;for(let v=0;v<ce;v++){const L=new Uint8Array(me,ge,le[v]);g.copyTo(L,{planeIndex:v}),ge+=le[v]}return{format:v,sampleRate:L,numberOfFrames:R,numberOfChannels:W,timestamp:ie,data:me}},revive:({format:g,sampleRate:v,numberOfFrames:L,numberOfChannels:R,timestamp:W,data:ie})=>new AudioData({format:g,sampleRate:v,numberOfFrames:L,numberOfChannels:R,timestamp:W,data:new Uint8Array(ie)})}},m={bigintObject:{test:g=>"object"==typeof g&&hasConstructorOf(g,BigInt),replace:String,revive:g=>new Object(BigInt(g))}},h={bigint:{test:g=>"bigint"==typeof g,replace:String,revive:g=>BigInt(g)}};function arraybuffer2string(g){return new Uint8Array(g).reduce((g,v)=>g+String.fromCodePoint(v),"")}function string2arraybuffer(g){const v=new Uint8Array(g.length);for(let L=0;L<g.length;L++)v[L]=g.charCodeAt(L);return v.buffer}const b={blob:{test:g=>"Blob"===toStringTag(g),replace(g){const v=new XMLHttpRequest;if(v.overrideMimeType("text/plain; charset=x-user-defined"),v.open("GET",URL.createObjectURL(g),!1),v.send(),200!==v.status&&0!==v.status)throw new Error("Bad Blob access: "+v.status);return{type:g.type,stringContents:v.responseText}},revive(g){const{type:v,stringContents:L}=g;return new Blob([string2arraybuffer(L)],{type:v})},replaceAsync:g=>new TypesonPromise((v,L)=>{const R=new FileReader;R.addEventListener("load",()=>{v({type:g.type,stringContents:arraybuffer2string(R.result)})}),R.addEventListener("error",()=>{L(R.error)}),R.readAsArrayBuffer(g)})}};function generateUUID(){let g=Date.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replaceAll(/[xy]/gu,function(v){const L=Math.trunc((g+16*Math.random())%16);return g=Math.floor(g/16),("x"===v?L:3&L|8).toString(16)})}const w={cryptokey:{test:g=>"CryptoKey"===toStringTag(g)&&g.extractable,replaceAsync:g=>new TypesonPromise(async(v,L)=>{let R;try{R=await crypto.subtle.exportKey("jwk",g)}catch(g){return void L(g)}v({jwk:R,algorithm:g.algorithm,usages:g.usages})}),revive(g){const{jwk:v,algorithm:L,usages:R}=g;return crypto.subtle.importKey("jwk",v,L,!0,R)}}},O={dataview:{test:g=>"DataView"===toStringTag(g),replace({buffer:g,byteOffset:v,byteLength:L},R){R.buffers||(R.buffers=[]);const W=R.buffers.indexOf(g);return-1!==W?{index:W,byteOffset:v,byteLength:L}:(R.buffers.push(g),{encoded:y(g),maxByteLength:g.maxByteLength,resizable:g.resizable,byteOffset:v,byteLength:L})},revive(g,v){v.buffers||(v.buffers=[]);const{byteOffset:L,byteLength:R,encoded:W,index:ie,maxByteLength:ce,resizable:le}=g;let ue;return"index"in g?ue=v.buffers[ie]:(ue=p(W,le?{maxByteLength:ce}:ce),v.buffers.push(ue)),new DataView(ue,L,R)}}},A={date:{test:g=>"Date"===toStringTag(g),replace(g){const v=g.getTime();return Number.isNaN(v)?"NaN":v},revive:g=>"NaN"===g?new Date(NaN):new Date(g)}},T={domexception:{test:g=>"DOMException"===toStringTag(g),replace:g=>({name:g.name,message:g.message}),revive:({message:g,name:v})=>new DOMException(g,v)}},S={};function create$5(g){S[g.name.toLowerCase()]={test:v=>toStringTag(v)===g.name,replace:g=>g.is2D?{a:g.a,b:g.b,c:g.c,d:g.d,e:g.e,f:g.f}:{m11:g.m11,m12:g.m12,m13:g.m13,m14:g.m14,m21:g.m21,m22:g.m22,m23:g.m23,m24:g.m24,m31:g.m31,m32:g.m32,m33:g.m33,m34:g.m34,m41:g.m41,m42:g.m42,m43:g.m43,m44:g.m44},revive:v=>Object.hasOwn(v,"a")?new g([v.a,v.b,v.c,v.d,v.e,v.f]):new g([v.m11,v.m12,v.m13,v.m14,v.m21,v.m22,v.m23,v.m24,v.m31,v.m32,v.m33,v.m34,v.m41,v.m42,v.m43,v.m44])}}"undefined"!=typeof DOMMatrix&&create$5(DOMMatrix),"undefined"!=typeof DOMMatrixReadOnly&&create$5(DOMMatrixReadOnly);const P={};function create$4(g){P[g.name.toLowerCase()]={test:v=>toStringTag(v)===g.name,replace:g=>({x:g.x,y:g.y,z:g.z,w:g.w}),revive:({x:v,y:L,z:R,w:W})=>new g(v,L,R,W)}}"undefined"!=typeof DOMPoint&&create$4(DOMPoint),"undefined"!=typeof DOMPointReadOnly&&create$4(DOMPointReadOnly);const E={domquad:{test:g=>"DOMQuad"===toStringTag(g),replace:g=>({p1:g.p1,p2:g.p2,p3:g.p3,p4:g.p4}),revive:({p1:g,p2:v,p3:L,p4:R})=>new DOMQuad(g,v,L,R)}},N={};function create$3(g){N[g.name.toLowerCase()]={test:v=>toStringTag(v)===g.name,replace:g=>({x:g.x,y:g.y,width:g.width,height:g.height}),revive:({x:v,y:L,width:R,height:W})=>new g(v,L,R,W)}}"undefined"!=typeof DOMRect&&create$3(DOMRect),"undefined"!=typeof DOMRectReadOnly&&create$3(DOMRectReadOnly);const x={encodedaudiochunk:{test:g=>"EncodedAudioChunk"===toStringTag(g),replace(g){const{type:v,timestamp:L,duration:R,byteLength:W}=g,ie=new ArrayBuffer(W);return g.copyTo(ie),{type:v,timestamp:L,duration:R,data:ie}},revive({type:g,timestamp:v,duration:L,data:R}){const W={type:g,timestamp:v,data:new Uint8Array(R)};return null!=L&&(W.duration=L),new EncodedAudioChunk(W)}}},j={encodedvideochunk:{test:g=>"EncodedVideoChunk"===toStringTag(g),replace(g){const{type:v,timestamp:L,duration:R,byteLength:W}=g,ie=new ArrayBuffer(W);return g.copyTo(ie),{type:v,timestamp:L,duration:R,data:ie}},revive({type:g,timestamp:v,duration:L,data:R}){const W={type:g,timestamp:v,data:new Uint8Array(R)};return null!=L&&(W.duration=L),new EncodedVideoChunk(W)}}},B={error:{test:g=>"Error"===toStringTag(g),replace:({name:g,message:v,cause:L,stack:R,fileName:W,lineNumber:ie,columnNumber:ce})=>({name:g,message:v,cause:L,stack:R,fileName:W,lineNumber:ie,columnNumber:ce}),revive(g){const v=new Error(g.message);return v.name=g.name,v.cause=g.cause,v.stack=g.stack,v.fileName=g.fileName,v.lineNumber=g.lineNumber,v.columnNumber=g.columnNumber,v}}},C={};function create$2(g){C[g.name.toLowerCase()]={test:v=>hasConstructorOf(v,g),replace:({name:g,message:v,cause:L,stack:R,fileName:W,lineNumber:ie,columnNumber:ce,errors:le})=>({name:g,message:v,cause:L,stack:R,fileName:W,lineNumber:ie,columnNumber:ce,errors:le}),revive(v){const L="undefined"!=typeof AggregateError&&g===AggregateError?new g(v.errors,v.message):new g(v.message);return L.name=v.name,L.cause=v.cause,L.stack=v.stack,L.fileName=v.fileName,L.lineNumber=v.lineNumber,L.columnNumber=v.columnNumber,L}}}[TypeError,RangeError,SyntaxError,ReferenceError,EvalError,URIError].forEach(g=>create$2(g)),"undefined"!=typeof AggregateError&&create$2(AggregateError),"function"==typeof InternalError&&create$2(InternalError);const I={file:{test:g=>"File"===toStringTag(g),replace(g){const v=new XMLHttpRequest;if(v.overrideMimeType("text/plain; charset=x-user-defined"),v.open("GET",URL.createObjectURL(g),!1),v.send(),200!==v.status&&0!==v.status)throw new Error("Bad File access: "+v.status);return{type:g.type,stringContents:v.responseText,name:g.name,lastModified:g.lastModified}},revive:({name:g,type:v,stringContents:L,lastModified:R})=>new File([string2arraybuffer(L)],g,{type:v,lastModified:R}),replaceAsync:g=>new TypesonPromise(function(v,L){const R=new FileReader;R.addEventListener("load",function(){v({type:g.type,stringContents:arraybuffer2string(R.result),name:g.name,lastModified:g.lastModified})}),R.addEventListener("error",function(){L(R.error)}),R.readAsArrayBuffer(g)})}},U$1={file:I.file,filelist:{test:g=>"FileList"===toStringTag(g),replace(g){const v=[];for(let L=0;L<g.length;L++)v[L]=g.item(L);return v},revive(g){class FileList{constructor(){this._files=arguments[0],this.length=this._files.length}item(g){return this._files[g]}get[Symbol.toStringTag](){return"FileList"}}return new FileList(g)}}},k={imagebitmap:{test:g=>"ImageBitmap"===toStringTag(g)||g&&g.dataset&&"ImageBitmap"===g.dataset.toStringTag,replace(g){const v=document.createElement("canvas");return v.getContext("2d").drawImage(g,0,0),{width:g.width,height:g.height,dataURL:v.toDataURL()}},revive(g){const v="undefined"==typeof OffscreenCanvas?document.createElement("canvas"):new OffscreenCanvas(g.width,g.height),L=v.getContext("2d"),R=document.createElement("img");return R.addEventListener("load",function(){L.drawImage(R,0,0)}),R.src=g.dataURL,"undefined"==typeof OffscreenCanvas?v:v.transferToImageBitmap()},reviveAsync(g){const v=document.createElement("canvas"),L=v.getContext("2d"),R=document.createElement("img");return R.addEventListener("load",function(){L.drawImage(R,0,0)}),R.src=g.dataURL,new TypesonPromise(async(g,L)=>{try{g(await createImageBitmap(v))}catch(g){L(g)}})}}},M={imagedata:{test:g=>"ImageData"===toStringTag(g),replace(g){const v="Float16Array"===toStringTag(g.data)?"rgba-float16":"rgba-unorm8";return{array:[...g.data],width:g.width,height:g.height,pixelFormat:v,colorSpace:g.colorSpace}},revive(g){const{array:v,width:L,height:R,colorSpace:W,pixelFormat:ie}=g;return"rgba-float16"===ie?new ImageData(new Float16Array(v),L,R,{colorSpace:W,pixelFormat:ie}):new ImageData(new Uint8ClampedArray(v),L,R,{colorSpace:W,pixelFormat:ie})}}},D={infinity:{test:g=>g===1/0,replace:()=>"Infinity",revive:()=>1/0}},F={map:{test:g=>"Map"===toStringTag(g),replace:g=>g.entries().toArray(),revive:g=>new Map(g)}},K={nan:{test:g=>Number.isNaN(g),replace:()=>"NaN",revive:()=>NaN}},$$1={negativeInfinity:{test:g=>g===-1/0,replace:()=>"-Infinity",revive:()=>-1/0}},q={negativeZero:{test:g=>Object.is(g,-0),replace:()=>0,revive:()=>-0}},z$2={StringObject:{test:g=>"String"===toStringTag(g)&&"object"==typeof g,replace:String,revive:g=>new String(g)},BooleanObject:{test:g=>"Boolean"===toStringTag(g)&&"object"==typeof g,replace:g=>g.valueOf(),revive:g=>new Boolean(g)},NumberObject:{test:g=>"Number"===toStringTag(g)&&"object"==typeof g,replace(g){const v=g.valueOf();return Number.isNaN(v)?"NaN":v===1/0?"Infinity":v===-1/0?"-Infinity":Object.is(v,-0)?"-0":v},revive:g=>new Number("NaN"===g?NaN:"Infinity"===g?1/0:"-Infinity"===g?-1/0:"-0"===g?-0:g)}},V={promise:{test:g=>"Promise"===toStringTag(g),replaceAsync:g=>new TypesonPromise(async v=>{try{v({value:await g})}catch(g){v({error:g})}}),revive:g=>g.error?Promise.reject(g.error):Promise.resolve(g.value)}},J={quotaexceedederror:{test:g=>"QuotaExceededError"===toStringTag(g),replace:({message:g,quota:v,requested:L,cause:R,stack:W,fileName:ie,lineNumber:ce,columnNumber:le})=>({message:g,quota:v,requested:L,cause:R,stack:W,fileName:ie,lineNumber:ce,columnNumber:le}),revive(g){const{message:v,quota:L,requested:R}=g,W={};null!=L&&(W.quota=L),null!=R&&(W.requested=R);const ie=new QuotaExceededError(v,W);return ie.cause=g.cause,ie.stack=g.stack,ie.fileName=g.fileName,ie.lineNumber=g.lineNumber,ie.columnNumber=g.columnNumber,ie}}},H={regexp:{test:g=>"RegExp"===toStringTag(g),replace:g=>({source:g.source,flags:(g.global?"g":"")+(g.ignoreCase?"i":"")+(g.multiline?"m":"")+(g.sticky?"y":"")+(g.unicode?"u":"")+(g.unicodeSets?"v":"")+(g.hasIndices?"d":"")+(g.dotAll?"s":"")}),revive:({source:g,flags:v})=>new RegExp(g,v)}},Q={},G={resurrectable:{test:g=>g&&!Array.isArray(g)&&["object","function","symbol"].includes(typeof g),replace(g){const v=generateUUID();return Q[v]=g,v},revive:g=>Q[g]}},X={set:{test:g=>"Set"===toStringTag(g),replace:g=>g.values().toArray(),revive:g=>new Set(g)}},Y={symbol:{test:g=>"symbol"==typeof g,replace:g=>({global:void 0!==Symbol.keyFor(g),sym:String(g).slice(7,-1)}),revive:g=>g.global?Symbol.for(g.sym):Symbol(g.sym)}},Z={};"function"==typeof Int8Array&&[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,..."function"==typeof BigInt64Array?[BigInt64Array,BigUint64Array]:[],..."function"==typeof Float16Array?[Float16Array]:[]].forEach(g=>function create$1(g){const v=g.name;Z[v.toLowerCase()]={test:g=>toStringTag(g)===v,replace:g=>(0===g.byteOffset&&g.byteLength===g.buffer.byteLength?g:g.slice(0)).buffer,revive:v=>"ArrayBuffer"===toStringTag(v)?new g(v):v}}(g));const ee={};"function"==typeof Int8Array&&[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,..."function"==typeof BigInt64Array?[BigInt64Array,BigUint64Array]:[],..."function"==typeof Float16Array?[Float16Array]:[]].forEach(g=>function create(g){const v=g.name;ee[v.toLowerCase()]={test:g=>toStringTag(g)===v,replace({buffer:g,byteOffset:v,length:L},R){R.buffers||(R.buffers=[]);const W=R.buffers.indexOf(g);return-1!==W?{index:W,byteOffset:v,length:L}:(R.buffers.push(g),{maxByteLength:g.maxByteLength,resizable:g.resizable,encoded:y(g),byteOffset:v,length:L})},revive(v,L){L.buffers||(L.buffers=[]);const{byteOffset:R,length:W,encoded:ie,index:ce,maxByteLength:le,resizable:ue}=v;let me;return"index"in v?me=L.buffers[ce]:(me=p(ie,ue?{maxByteLength:le}:void 0),L.buffers.push(me)),new g(me,R,W)}}}(g));const te={undef:{test:(g,v)=>void 0===g&&(v.ownKeys||!("ownKeys"in v)),replace:()=>0,revive:()=>new Undefined}},re={userObject:{test:g=>isUserObject(g),replace:g=>({...g}),revive:g=>g}},ne$1={videoframe:{test:g=>"VideoFrame"===toStringTag(g),replaceAsync:g=>new TypesonPromise(async(v,L)=>{try{const{format:L,codedWidth:R,codedHeight:W,timestamp:ie,duration:ce,visibleRect:le,displayWidth:ue,displayHeight:me,colorSpace:ge}=g,ve=new ArrayBuffer(g.allocationSize());await g.copyTo(ve),v({format:L,codedWidth:R,codedHeight:W,timestamp:ie,duration:ce,visibleRect:{x:le.x,y:le.y,width:le.width,height:le.height},displayWidth:ue,displayHeight:me,colorSpace:{primaries:ge.primaries,transfer:ge.transfer,matrix:ge.matrix,fullRange:ge.fullRange},data:ve})}catch(g){L(g)}}),revive({format:g,codedWidth:v,codedHeight:L,timestamp:R,duration:W,visibleRect:ie,displayWidth:ce,displayHeight:le,colorSpace:ue,data:me}){const ge={format:g,codedWidth:v,codedHeight:L,timestamp:R,visibleRect:ie,displayWidth:ce,displayHeight:le,colorSpace:ue};return null!=W&&(ge.duration=W),new VideoFrame(new Uint8Array(me),ge)}}},oe={webtransporterror:{test:g=>"WebTransportError"===toStringTag(g),replace:({message:g,streamErrorCode:v,cause:L,stack:R,fileName:W,lineNumber:ie,columnNumber:ce})=>({message:g,streamErrorCode:v,cause:L,stack:R,fileName:W,lineNumber:ie,columnNumber:ce}),revive(g){const{message:v,streamErrorCode:L}=g,R=new WebTransportError({message:v,streamErrorCode:L});return R.cause=g.cause,R.stack=g.stack,R.fileName=g.fileName,R.lineNumber=g.lineNumber,R.columnNumber=g.columnNumber,R}}},ae=[{arrayNonindexKeys:{testPlainObjects:!0,test:(g,v)=>!!Array.isArray(g)&&(Object.keys(g).some(g=>String(Number(g))!==g)&&(v.iterateIn="object",v.addLength=!0),!0),replace:(g,v)=>(v.iterateUnsetNumeric=!0,g),revive(g){if(Array.isArray(g))return g;const v=[];return Object.entries(g).forEach(([g,L])=>{v[g]=L}),v}}},{sparseUndefined:{test:(g,v)=>void 0===g&&!1===v.ownKeys,replace:()=>0,revive(){}}}],se=[K,D,$$1,q],ye=[re,te,ae,z$2,se,A,H,M,k,I,U$1,b,B,C].concat("function"==typeof Map?F:[],"function"==typeof Set?X:[],"function"==typeof ArrayBuffer?f:[],"function"==typeof Uint8Array?ee:[],"function"==typeof DataView?O:[],"undefined"!=typeof crypto?w:[],"undefined"!=typeof BigInt?[h,m]:[],"undefined"!=typeof DOMException?T:[],"undefined"!=typeof QuotaExceededError?J:[],"undefined"!=typeof WebTransportError?oe:[],"undefined"!=typeof DOMRect?N:[],"undefined"!=typeof DOMPoint?P:[],"undefined"!=typeof DOMQuad?E:[],"undefined"!=typeof DOMMatrix?S:[],"undefined"!=typeof AudioData?d$1:[],"undefined"!=typeof EncodedAudioChunk?x:[],"undefined"!=typeof EncodedVideoChunk?j:[],"undefined"!=typeof VideoFrame?ne$1:[]),pe=ye.concat({checkDataCloneException:{test(g){const v={}.toString.call(g).slice(8,-1);if(["symbol","function"].includes(typeof g)||["Arguments","Module","Promise","WeakMap","WeakSet","Event","MessageChannel","MessagePort"].includes(v)||g&&g.constructor&&["MessageChannel","MessagePort"].includes(g.constructor.name)||["ArrayBuffer","DataView","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"].includes(v)&&function isBufferDetached(g){if("boolean"==typeof g.detached)return g.detached;if(0!==g.byteLength)return!1;try{return new Uint8Array(g),!1}catch{return!0}}(g)||g&&"object"==typeof g&&"number"==typeof g.nodeType&&"function"==typeof g.insertBefore)throw new DOMException("The object cannot be cloned.","DataCloneError");return!1}}}),fe=pe.concat({checkSharedArrayBufferException:{test(g){if("SharedArrayBuffer"==={}.toString.call(g).slice(8,-1))throw new DOMException("The object cannot be cloned.","DataCloneError");return!1}}});var astralIdentifierCodes=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],astralIdentifierStartCodes=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],nonASCIIidentifierChars="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",nonASCIIidentifierStartChars="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",reservedWords={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},ecma5AndLessKeywords="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",keywords$1={5:ecma5AndLessKeywords,"5module":ecma5AndLessKeywords+" export import",6:ecma5AndLessKeywords+" const class extends export import super"},keywordRelationalOperator=/^in(stanceof)?$/,nonASCIIidentifierStart=new RegExp("["+nonASCIIidentifierStartChars+"]"),nonASCIIidentifier=new RegExp("["+nonASCIIidentifierStartChars+nonASCIIidentifierChars+"]");function isInAstralSet(g,v){for(var L=65536,R=0;R<v.length;R+=2){if((L+=v[R])>g)return!1;if((L+=v[R+1])>=g)return!0}return!1}function isIdentifierStart(g,v){return g<65?36===g:g<91||(g<97?95===g:g<123||(g<=65535?g>=170&&nonASCIIidentifierStart.test(String.fromCharCode(g)):!1!==v&&isInAstralSet(g,astralIdentifierStartCodes)))}function isIdentifierChar(g,v){return g<48?36===g:g<58||!(g<65)&&(g<91||(g<97?95===g:g<123||(g<=65535?g>=170&&nonASCIIidentifier.test(String.fromCharCode(g)):!1!==v&&(isInAstralSet(g,astralIdentifierStartCodes)||isInAstralSet(g,astralIdentifierCodes)))))}var TokenType=function TokenType(g,v){void 0===v&&(v={}),this.label=g,this.keyword=v.keyword,this.beforeExpr=!!v.beforeExpr,this.startsExpr=!!v.startsExpr,this.isLoop=!!v.isLoop,this.isAssign=!!v.isAssign,this.prefix=!!v.prefix,this.postfix=!!v.postfix,this.binop=v.binop||null,this.updateContext=null};function binop(g,v){return new TokenType(g,{beforeExpr:!0,binop:v})}var beforeExpr={beforeExpr:!0},startsExpr={startsExpr:!0},keywords={};function kw(g,v){return void 0===v&&(v={}),v.keyword=g,keywords[g]=new TokenType(g,v)}var types$1$1={num:new TokenType("num",startsExpr),regexp:new TokenType("regexp",startsExpr),string:new TokenType("string",startsExpr),name:new TokenType("name",startsExpr),privateId:new TokenType("privateId",startsExpr),eof:new TokenType("eof"),bracketL:new TokenType("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new TokenType("]"),braceL:new TokenType("{",{beforeExpr:!0,startsExpr:!0}),braceR:new TokenType("}"),parenL:new TokenType("(",{beforeExpr:!0,startsExpr:!0}),parenR:new TokenType(")"),comma:new TokenType(",",beforeExpr),semi:new TokenType(";",beforeExpr),colon:new TokenType(":",beforeExpr),dot:new TokenType("."),question:new TokenType("?",beforeExpr),questionDot:new TokenType("?."),arrow:new TokenType("=>",beforeExpr),template:new TokenType("template"),invalidTemplate:new TokenType("invalidTemplate"),ellipsis:new TokenType("...",beforeExpr),backQuote:new TokenType("`",startsExpr),dollarBraceL:new TokenType("${",{beforeExpr:!0,startsExpr:!0}),eq:new TokenType("=",{beforeExpr:!0,isAssign:!0}),assign:new TokenType("_=",{beforeExpr:!0,isAssign:!0}),incDec:new TokenType("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new TokenType("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:binop("||",1),logicalAND:binop("&&",2),bitwiseOR:binop("|",3),bitwiseXOR:binop("^",4),bitwiseAND:binop("&",5),equality:binop("==/!=/===/!==",6),relational:binop("</>/<=/>=",7),bitShift:binop("<</>>/>>>",8),plusMin:new TokenType("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:binop("%",10),star:binop("*",10),slash:binop("/",10),starstar:new TokenType("**",{beforeExpr:!0}),coalesce:binop("??",1),_break:kw("break"),_case:kw("case",beforeExpr),_catch:kw("catch"),_continue:kw("continue"),_debugger:kw("debugger"),_default:kw("default",beforeExpr),_do:kw("do",{isLoop:!0,beforeExpr:!0}),_else:kw("else",beforeExpr),_finally:kw("finally"),_for:kw("for",{isLoop:!0}),_function:kw("function",startsExpr),_if:kw("if"),_return:kw("return",beforeExpr),_switch:kw("switch"),_throw:kw("throw",beforeExpr),_try:kw("try"),_var:kw("var"),_const:kw("const"),_while:kw("while",{isLoop:!0}),_with:kw("with"),_new:kw("new",{beforeExpr:!0,startsExpr:!0}),_this:kw("this",startsExpr),_super:kw("super",startsExpr),_class:kw("class",startsExpr),_extends:kw("extends",beforeExpr),_export:kw("export"),_import:kw("import",startsExpr),_null:kw("null",startsExpr),_true:kw("true",startsExpr),_false:kw("false",startsExpr),_in:kw("in",{beforeExpr:!0,binop:7}),_instanceof:kw("instanceof",{beforeExpr:!0,binop:7}),_typeof:kw("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:kw("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:kw("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},lineBreak=/\r\n?|\n|\u2028|\u2029/,lineBreakG=new RegExp(lineBreak.source,"g");function isNewLine(g){return 10===g||13===g||8232===g||8233===g}function nextLineBreak(g,v,L){void 0===L&&(L=g.length);for(var R=v;R<L;R++){var W=g.charCodeAt(R);if(isNewLine(W))return R<L-1&&13===W&&10===g.charCodeAt(R+1)?R+2:R+1}return-1}var nonASCIIwhitespace=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,skipWhiteSpace=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,ref=Object.prototype,hasOwnProperty=ref.hasOwnProperty,toString=ref.toString,hasOwn=Object.hasOwn||function(g,v){return hasOwnProperty.call(g,v)},isArray=Array.isArray||function(g){return"[object Array]"===toString.call(g)},regexpCache=Object.create(null);function wordsRegexp(g){return regexpCache[g]||(regexpCache[g]=new RegExp("^(?:"+g.replace(/ /g,"|")+")$"))}function codePointToString(g){return g<=65535?String.fromCharCode(g):(g-=65536,String.fromCharCode(55296+(g>>10),56320+(1023&g)))}var loneSurrogate=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Position=function Position(g,v){this.line=g,this.column=v};Position.prototype.offset=function offset(g){return new Position(this.line,this.column+g)};var SourceLocation=function SourceLocation(g,v,L){this.start=v,this.end=L,null!==g.sourceFile&&(this.source=g.sourceFile)};function getLineInfo(g,v){for(var L=1,R=0;;){var W=nextLineBreak(g,R,v);if(W<0)return new Position(L,v-R);++L,R=W}}var defaultOptions={ecmaVersion:null,sourceType:"script",strict:!1,onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,startLocation:null,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},warnedAboutEcmaVersion=!1;function getOptions(g){var v={};for(var L in defaultOptions)v[L]=g&&hasOwn(g,L)?g[L]:defaultOptions[L];if("latest"===v.ecmaVersion?v.ecmaVersion=1e8:null==v.ecmaVersion?(!warnedAboutEcmaVersion&&"object"==typeof console&&console.warn&&(warnedAboutEcmaVersion=!0,console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")),v.ecmaVersion=11):v.ecmaVersion>=2015&&(v.ecmaVersion-=2009),null==v.allowReserved&&(v.allowReserved=v.ecmaVersion<5),g&&null!=g.allowHashBang||(v.allowHashBang=v.ecmaVersion>=14),isArray(v.onToken)){var R=v.onToken;v.onToken=function(g){return R.push(g)}}if(isArray(v.onComment)&&(v.onComment=pushComment(v,v.onComment)),"commonjs"===v.sourceType&&v.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return v}function pushComment(g,v){return function(L,R,W,ie,ce,le){var ue={type:L?"Block":"Line",value:R,start:W,end:ie};g.locations&&(ue.loc=new SourceLocation(this,ce,le)),g.ranges&&(ue.range=[W,ie]),v.push(ue)}}var SCOPE_TOP=1,SCOPE_FUNCTION=2,SCOPE_ASYNC=4,SCOPE_GENERATOR=8,SCOPE_ARROW=16,SCOPE_SIMPLE_CATCH=32,SCOPE_SUPER=64,SCOPE_DIRECT_SUPER=128,SCOPE_CLASS_STATIC_BLOCK=256,SCOPE_CLASS_FIELD_INIT=512,SCOPE_SWITCH=1024,SCOPE_VAR=SCOPE_TOP|SCOPE_FUNCTION|SCOPE_CLASS_STATIC_BLOCK;function functionFlags(g,v){return SCOPE_FUNCTION|(g?SCOPE_ASYNC:0)|(v?SCOPE_GENERATOR:0)}var BIND_NONE=0,BIND_VAR=1,BIND_LEXICAL=2,BIND_FUNCTION=3,BIND_SIMPLE_CATCH=4,BIND_OUTSIDE=5,Parser=function Parser(g,v,L){this.options=g=getOptions(g),this.sourceFile=g.sourceFile,this.keywords=wordsRegexp(keywords$1[g.ecmaVersion>=6?6:"module"===g.sourceType?"5module":5]);var R="";!0!==g.allowReserved&&(R=reservedWords[g.ecmaVersion>=6?6:5===g.ecmaVersion?5:3],"module"===g.sourceType&&(R+=" await")),this.reservedWords=wordsRegexp(R);var W=(R?R+" ":"")+reservedWords.strict;this.reservedWordsStrict=wordsRegexp(W),this.reservedWordsStrictBind=wordsRegexp(W+" "+reservedWords.strictBind),this.input=String(v),this.containsEsc=!1,this.pos=L||0,this.curLine=1,g.startLocation?(this.lineStart=this.pos-g.startLocation.column,this.curLine=g.startLocation.line):L?(this.lineStart=this.input.lastIndexOf("\n",L-1)+1,this.options.locations&&(this.curLine=this.input.slice(0,this.lineStart).split(lineBreak).length)):this.lineStart=0,this.type=types$1$1.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===g.sourceType,this.strict=this.inModule||!0===g.strict||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),0===this.pos&&g.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope("commonjs"===this.options.sourceType?SCOPE_FUNCTION:SCOPE_TOP),this.regexpState=null,this.privateNameStack=[]},prototypeAccessors={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};Parser.prototype.parse=function parse(){var g=this,v=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return g.parseTopLevel(v)})},prototypeAccessors.inFunction.get=function(){return(this.currentVarScope().flags&SCOPE_FUNCTION)>0},prototypeAccessors.inGenerator.get=function(){return(this.currentVarScope().flags&SCOPE_GENERATOR)>0},prototypeAccessors.inAsync.get=function(){return(this.currentVarScope().flags&SCOPE_ASYNC)>0},prototypeAccessors.canAwait.get=function(){for(var g=this.scopeStack.length-1;g>=0;g--){var v=this.scopeStack[g].flags;if(v&(SCOPE_CLASS_STATIC_BLOCK|SCOPE_CLASS_FIELD_INIT))return!1;if(v&SCOPE_FUNCTION)return(v&SCOPE_ASYNC)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},prototypeAccessors.allowReturn.get=function(){return!!this.inFunction||!!(this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&SCOPE_TOP)},prototypeAccessors.allowSuper.get=function(){return(this.currentThisScope().flags&SCOPE_SUPER)>0||this.options.allowSuperOutsideMethod},prototypeAccessors.allowDirectSuper.get=function(){return(this.currentThisScope().flags&SCOPE_DIRECT_SUPER)>0},prototypeAccessors.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},prototypeAccessors.allowNewDotTarget.get=function(){for(var g=this.scopeStack.length-1;g>=0;g--){var v=this.scopeStack[g].flags;if(v&(SCOPE_CLASS_STATIC_BLOCK|SCOPE_CLASS_FIELD_INIT)||v&SCOPE_FUNCTION&&!(v&SCOPE_ARROW))return!0}return!1},prototypeAccessors.allowUsing.get=function(){var g=this.currentScope().flags;return!(g&SCOPE_SWITCH)&&!(!this.inModule&&g&SCOPE_TOP)},prototypeAccessors.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&SCOPE_CLASS_STATIC_BLOCK)>0},Parser.extend=function extend(){for(var g=[],v=arguments.length;v--;)g[v]=arguments[v];for(var L=this,R=0;R<g.length;R++)L=g[R](L);return L},Parser.parse=function parse(g,v){return new this(v,g).parse()},Parser.parseExpressionAt=function parseExpressionAt(g,v,L){var R=new this(L,g,v);return R.nextToken(),R.parseExpression()},Parser.tokenizer=function tokenizer(g,v){return new this(v,g)},Object.defineProperties(Parser.prototype,prototypeAccessors);var pp$9=Parser.prototype,literal$1=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;pp$9.strictDirective=function(g){if(this.options.ecmaVersion<5)return!1;for(;;){skipWhiteSpace.lastIndex=g,g+=skipWhiteSpace.exec(this.input)[0].length;var v=literal$1.exec(this.input.slice(g));if(!v)return!1;if("use strict"===(v[1]||v[2])){skipWhiteSpace.lastIndex=g+v[0].length;var L=skipWhiteSpace.exec(this.input),R=L.index+L[0].length,W=this.input.charAt(R);return";"===W||"}"===W||lineBreak.test(L[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(W)||"!"===W&&"="===this.input.charAt(R+1))}g+=v[0].length,skipWhiteSpace.lastIndex=g,g+=skipWhiteSpace.exec(this.input)[0].length,";"===this.input[g]&&g++}},pp$9.eat=function(g){return this.type===g&&(this.next(),!0)},pp$9.isContextual=function(g){return this.type===types$1$1.name&&this.value===g&&!this.containsEsc},pp$9.eatContextual=function(g){return!!this.isContextual(g)&&(this.next(),!0)},pp$9.catchStackOverflow=function(g){try{return g()}catch(g){if(!(g instanceof Error&&(/\bstack\b.*\b(exceeded|overflow)\b/i.test(g.message)||/\btoo much recursion\b/i.test(g.message))))throw g;this.raise(this.start,"Not enough stack space to parse input")}},pp$9.expectContextual=function(g){this.eatContextual(g)||this.unexpected()},pp$9.canInsertSemicolon=function(){return this.type===types$1$1.eof||this.type===types$1$1.braceR||lineBreak.test(this.input.slice(this.lastTokEnd,this.start))},pp$9.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},pp$9.semicolon=function(){this.eat(types$1$1.semi)||this.insertSemicolon()||this.unexpected()},pp$9.afterTrailingComma=function(g,v){if(this.type===g)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),v||this.next(),!0},pp$9.expect=function(g){this.eat(g)||this.unexpected()},pp$9.unexpected=function(g){this.raise(null!=g?g:this.start,"Unexpected token")};var DestructuringErrors=function DestructuringErrors(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};pp$9.checkPatternErrors=function(g,v){if(g){g.trailingComma>-1&&this.raiseRecoverable(g.trailingComma,"Comma is not permitted after the rest element");var L=v?g.parenthesizedAssign:g.parenthesizedBind;L>-1&&this.raiseRecoverable(L,v?"Assigning to rvalue":"Parenthesized pattern")}},pp$9.checkExpressionErrors=function(g,v){if(!g)return!1;var L=g.shorthandAssign,R=g.doubleProto;if(!v)return L>=0||R>=0;L>=0&&this.raise(L,"Shorthand property assignments are valid only in destructuring patterns"),R>=0&&this.raiseRecoverable(R,"Redefinition of __proto__ property")},pp$9.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},pp$9.isSimpleAssignTarget=function(g){return"ParenthesizedExpression"===g.type?this.isSimpleAssignTarget(g.expression):"Identifier"===g.type||"MemberExpression"===g.type};var pp$8=Parser.prototype;pp$8.parseTopLevel=function(g){var v=Object.create(null);for(g.body||(g.body=[]);this.type!==types$1$1.eof;){var L=this.parseStatement(null,!0,v);g.body.push(L)}if(this.inModule)for(var R=0,W=Object.keys(this.undefinedExports);R<W.length;R+=1){var ie=W[R];this.raiseRecoverable(this.undefinedExports[ie].start,"Export '"+ie+"' is not defined")}return this.adaptDirectivePrologue(g.body),this.next(),g.sourceType="commonjs"===this.options.sourceType?"script":this.options.sourceType,this.finishNode(g,"Program")};var loopLabel={kind:"loop"},switchLabel={kind:"switch"};pp$8.isLet=function(g){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;skipWhiteSpace.lastIndex=this.pos;var v=skipWhiteSpace.exec(this.input),L=this.pos+v[0].length,R=this.fullCharCodeAt(L);if(91===R||92===R)return!0;if(g)return!1;if(123===R)return!0;if(isIdentifierStart(R)){var W=L;do{L+=R<=65535?1:2}while(isIdentifierChar(R=this.fullCharCodeAt(L)));if(92===R)return!0;var ie=this.input.slice(W,L);if(!keywordRelationalOperator.test(ie))return!0}return!1},pp$8.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;skipWhiteSpace.lastIndex=this.pos;var g,v=skipWhiteSpace.exec(this.input),L=this.pos+v[0].length;return!(lineBreak.test(this.input.slice(this.pos,L))||"function"!==this.input.slice(L,L+8)||L+8!==this.input.length&&(isIdentifierChar(g=this.fullCharCodeAt(L+8))||92===g))},pp$8.isUsingKeyword=function(g,v){if(this.options.ecmaVersion<17||!this.isContextual(g?"await":"using"))return!1;skipWhiteSpace.lastIndex=this.pos;var L=skipWhiteSpace.exec(this.input),R=this.pos+L[0].length;if(lineBreak.test(this.input.slice(this.pos,R)))return!1;if(g){var W,ie=R+5;if("using"!==this.input.slice(R,ie)||ie===this.input.length||isIdentifierChar(W=this.fullCharCodeAt(ie))||92===W)return!1;skipWhiteSpace.lastIndex=ie;var ce=skipWhiteSpace.exec(this.input);if(R=ie+ce[0].length,ce&&lineBreak.test(this.input.slice(ie,R)))return!1}var le=this.fullCharCodeAt(R);if(!isIdentifierStart(le)&&92!==le)return!1;var ue=R;do{R+=le<=65535?1:2}while(isIdentifierChar(le=this.fullCharCodeAt(R)));if(92===le)return!0;var me=this.input.slice(ue,R);if(keywordRelationalOperator.test(me))return!1;if(v&&!g&&"of"===me&&(skipWhiteSpace.lastIndex=R,R+=skipWhiteSpace.exec(this.input)[0].length,61!==this.input.charCodeAt(R)||61===(le=this.input.charCodeAt(R+1))||62===le))return!1;return!0},pp$8.isAwaitUsing=function(g){return this.isUsingKeyword(!0,g)},pp$8.isUsing=function(g){return this.isUsingKeyword(!1,g)},pp$8.parseStatement=function(g,v,L){var R,W=this.type,ie=this.startNode();switch(this.isLet(g)&&(W=types$1$1._var,R="let"),W){case types$1$1._break:case types$1$1._continue:return this.parseBreakContinueStatement(ie,W.keyword);case types$1$1._debugger:return this.parseDebuggerStatement(ie);case types$1$1._do:return this.parseDoStatement(ie);case types$1$1._for:return this.parseForStatement(ie);case types$1$1._function:return g&&(this.strict||"if"!==g&&"label"!==g)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(ie,!1,!g);case types$1$1._class:return g&&this.unexpected(),this.parseClass(ie,!0);case types$1$1._if:return this.parseIfStatement(ie);case types$1$1._return:return this.parseReturnStatement(ie);case types$1$1._switch:return this.parseSwitchStatement(ie);case types$1$1._throw:return this.parseThrowStatement(ie);case types$1$1._try:return this.parseTryStatement(ie);case types$1$1._const:case types$1$1._var:return R=R||this.value,g&&"var"!==R&&this.unexpected(),this.parseVarStatement(ie,R);case types$1$1._while:return this.parseWhileStatement(ie);case types$1$1._with:return this.parseWithStatement(ie);case types$1$1.braceL:return this.parseBlock(!0,ie);case types$1$1.semi:return this.parseEmptyStatement(ie);case types$1$1._export:case types$1$1._import:if(this.options.ecmaVersion>10&&W===types$1$1._import){skipWhiteSpace.lastIndex=this.pos;var ce=skipWhiteSpace.exec(this.input),le=this.pos+ce[0].length,ue=this.input.charCodeAt(le);if(40===ue||46===ue)return this.parseExpressionStatement(ie,this.parseExpression())}return this.options.allowImportExportEverywhere||(v||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),W===types$1$1._import?this.parseImport(ie):this.parseExport(ie,L);default:if(this.isAsyncFunction())return g&&this.unexpected(),this.next(),this.parseFunctionStatement(ie,!0,!g);var me=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(me)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),g&&this.raise(this.start,"Using declaration is not allowed in single-statement positions"),"await using"===me&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(ie,!1,me),this.semicolon(),this.finishNode(ie,"VariableDeclaration");var ge=this.value,ve=this.parseExpression();return W===types$1$1.name&&"Identifier"===ve.type&&this.eat(types$1$1.colon)?this.parseLabeledStatement(ie,ge,ve,g):this.parseExpressionStatement(ie,ve)}},pp$8.parseBreakContinueStatement=function(g,v){var L="break"===v;this.next(),this.eat(types$1$1.semi)||this.insertSemicolon()?g.label=null:this.type!==types$1$1.name?this.unexpected():(g.label=this.parseIdent(),this.semicolon());for(var R=0;R<this.labels.length;++R){var W=this.labels[R];if(null==g.label||W.name===g.label.name){if(null!=W.kind&&(L||"loop"===W.kind))break;if(g.label&&L)break}}return R===this.labels.length&&this.raise(g.start,"Unsyntactic "+v),this.finishNode(g,L?"BreakStatement":"ContinueStatement")},pp$8.parseDebuggerStatement=function(g){return this.next(),this.semicolon(),this.finishNode(g,"DebuggerStatement")},pp$8.parseDoStatement=function(g){return this.next(),this.labels.push(loopLabel),g.body=this.parseStatement("do"),this.labels.pop(),this.expect(types$1$1._while),g.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(types$1$1.semi):this.semicolon(),this.finishNode(g,"DoWhileStatement")},pp$8.parseForStatement=function(g){this.next();var v=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(loopLabel),this.enterScope(0),this.expect(types$1$1.parenL),this.type===types$1$1.semi)return v>-1&&this.unexpected(v),this.parseFor(g,null);var L=this.isLet();if(this.type===types$1$1._var||this.type===types$1$1._const||L){var R=this.startNode(),W=L?"let":this.value;return this.next(),this.parseVar(R,!0,W),this.finishNode(R,"VariableDeclaration"),this.parseForAfterInit(g,R,v)}var ie=this.isContextual("let"),ce=!1,le=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(le){var ue=this.startNode();return this.next(),"await using"===le&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(ue,!0,le),this.finishNode(ue,"VariableDeclaration"),this.parseForAfterInit(g,ue,v)}var me=this.containsEsc,ge=new DestructuringErrors,ve=this.start,xe=v>-1?this.parseExprSubscripts(ge,"await"):this.parseExpression(!0,ge);return this.type===types$1$1._in||(ce=this.options.ecmaVersion>=6&&this.isContextual("of"))?(v>-1?(this.type===types$1$1._in&&this.unexpected(v),g.await=!0):ce&&this.options.ecmaVersion>=8&&(xe.start!==ve||me||"Identifier"!==xe.type||"async"!==xe.name?this.options.ecmaVersion>=9&&(g.await=!1):this.unexpected()),ie&&ce&&this.raise(xe.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(xe,!1,ge),this.checkLValPattern(xe),this.parseForIn(g,xe)):(this.checkExpressionErrors(ge,!0),v>-1&&this.unexpected(v),this.parseFor(g,xe))},pp$8.parseForAfterInit=function(g,v,L){return(this.type===types$1$1._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===v.declarations.length?(this.type===types$1$1._in?("using"!==v.kind&&"await using"!==v.kind||v.declarations[0].init||this.raise(this.start,"Using declaration is not allowed in for-in loops"),this.options.ecmaVersion>=9&&L>-1&&this.unexpected(L)):this.options.ecmaVersion>=9&&(g.await=L>-1),this.parseForIn(g,v)):(L>-1&&this.unexpected(L),this.parseFor(g,v))},pp$8.parseFunctionStatement=function(g,v,L){return this.next(),this.parseFunction(g,FUNC_STATEMENT|(L?0:FUNC_HANGING_STATEMENT),!1,v)},pp$8.parseIfStatement=function(g){return this.next(),g.test=this.parseParenExpression(),g.consequent=this.parseStatement("if"),g.alternate=this.eat(types$1$1._else)?this.parseStatement("if"):null,this.finishNode(g,"IfStatement")},pp$8.parseReturnStatement=function(g){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(types$1$1.semi)||this.insertSemicolon()?g.argument=null:(g.argument=this.parseExpression(),this.semicolon()),this.finishNode(g,"ReturnStatement")},pp$8.parseSwitchStatement=function(g){var v;this.next(),g.discriminant=this.parseParenExpression(),g.cases=[],this.expect(types$1$1.braceL),this.labels.push(switchLabel),this.enterScope(SCOPE_SWITCH);for(var L=!1;this.type!==types$1$1.braceR;)if(this.type===types$1$1._case||this.type===types$1$1._default){var R=this.type===types$1$1._case;v&&this.finishNode(v,"SwitchCase"),g.cases.push(v=this.startNode()),v.consequent=[],this.next(),R?v.test=this.parseExpression():(L&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),L=!0,v.test=null),this.expect(types$1$1.colon)}else v||this.unexpected(),v.consequent.push(this.parseStatement(null));return this.exitScope(),v&&this.finishNode(v,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(g,"SwitchStatement")},pp$8.parseThrowStatement=function(g){return this.next(),lineBreak.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),g.argument=this.parseExpression(),this.semicolon(),this.finishNode(g,"ThrowStatement")};var empty$1=[];pp$8.parseCatchClauseParam=function(){var g=this.parseBindingAtom(),v="Identifier"===g.type;return this.enterScope(v?SCOPE_SIMPLE_CATCH:0),this.checkLValPattern(g,v?BIND_SIMPLE_CATCH:BIND_LEXICAL),this.expect(types$1$1.parenR),g},pp$8.parseTryStatement=function(g){if(this.next(),g.block=this.parseBlock(),g.handler=null,this.type===types$1$1._catch){var v=this.startNode();this.next(),this.eat(types$1$1.parenL)?v.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),v.param=null,this.enterScope(0)),v.body=this.parseBlock(!1),this.exitScope(),g.handler=this.finishNode(v,"CatchClause")}return g.finalizer=this.eat(types$1$1._finally)?this.parseBlock():null,g.handler||g.finalizer||this.raise(g.start,"Missing catch or finally clause"),this.finishNode(g,"TryStatement")},pp$8.parseVarStatement=function(g,v,L){return this.next(),this.parseVar(g,!1,v,L),this.semicolon(),this.finishNode(g,"VariableDeclaration")},pp$8.parseWhileStatement=function(g){return this.next(),g.test=this.parseParenExpression(),this.labels.push(loopLabel),g.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(g,"WhileStatement")},pp$8.parseWithStatement=function(g){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),g.object=this.parseParenExpression(),g.body=this.parseStatement("with"),this.finishNode(g,"WithStatement")},pp$8.parseEmptyStatement=function(g){return this.next(),this.finishNode(g,"EmptyStatement")},pp$8.parseLabeledStatement=function(g,v,L,R){for(var W=0,ie=this.labels;W<ie.length;W+=1){ie[W].name===v&&this.raise(L.start,"Label '"+v+"' is already declared")}for(var ce=this.type.isLoop?"loop":this.type===types$1$1._switch?"switch":null,le=this.labels.length-1;le>=0;le--){var ue=this.labels[le];if(ue.statementStart!==g.start)break;ue.statementStart=this.start,ue.kind=ce}return this.labels.push({name:v,kind:ce,statementStart:this.start}),g.body=this.parseStatement(R?-1===R.indexOf("label")?R+"label":R:"label"),this.labels.pop(),g.label=L,this.finishNode(g,"LabeledStatement")},pp$8.parseExpressionStatement=function(g,v){return g.expression=v,this.semicolon(),this.finishNode(g,"ExpressionStatement")},pp$8.parseBlock=function(g,v,L){for(void 0===g&&(g=!0),void 0===v&&(v=this.startNode()),v.body=[],this.expect(types$1$1.braceL),g&&this.enterScope(0);this.type!==types$1$1.braceR;){var R=this.parseStatement(null);v.body.push(R)}return L&&(this.strict=!1),this.next(),g&&this.exitScope(),this.finishNode(v,"BlockStatement")},pp$8.parseFor=function(g,v){return g.init=v,this.expect(types$1$1.semi),g.test=this.type===types$1$1.semi?null:this.parseExpression(),this.expect(types$1$1.semi),g.update=this.type===types$1$1.parenR?null:this.parseExpression(),this.expect(types$1$1.parenR),g.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(g,"ForStatement")},pp$8.parseForIn=function(g,v){var L=this.type===types$1$1._in;return this.next(),"VariableDeclaration"===v.type&&null!=v.declarations[0].init&&(!L||this.options.ecmaVersion<8||this.strict||"var"!==v.kind||"Identifier"!==v.declarations[0].id.type)&&this.raise(v.start,(L?"for-in":"for-of")+" loop variable declaration may not have an initializer"),g.left=v,g.right=L?this.parseExpression():this.parseMaybeAssign(),this.expect(types$1$1.parenR),g.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(g,L?"ForInStatement":"ForOfStatement")},pp$8.parseVar=function(g,v,L,R){for(g.declarations=[],g.kind=L;;){var W=this.startNode();if(this.parseVarId(W,L),this.eat(types$1$1.eq)?W.init=this.parseMaybeAssign(v):R||"const"!==L||this.type===types$1$1._in||this.options.ecmaVersion>=6&&this.isContextual("of")?R||"using"!==L&&"await using"!==L||!(this.options.ecmaVersion>=17)||this.type===types$1$1._in||this.isContextual("of")?R||"Identifier"===W.id.type||v&&(this.type===types$1$1._in||this.isContextual("of"))?W.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.raise(this.lastTokEnd,"Missing initializer in "+L+" declaration"):this.unexpected(),g.declarations.push(this.finishNode(W,"VariableDeclarator")),!this.eat(types$1$1.comma))break}return g},pp$8.parseVarId=function(g,v){g.id="using"===v||"await using"===v?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(g.id,"var"===v?BIND_VAR:BIND_LEXICAL,!1)};var FUNC_STATEMENT=1,FUNC_HANGING_STATEMENT=2,FUNC_NULLABLE_ID=4;function isPrivateNameConflicted(g,v){var L=v.key.name,R=g[L],W="true";return"MethodDefinition"!==v.type||"get"!==v.kind&&"set"!==v.kind||(W=(v.static?"s":"i")+v.kind),"iget"===R&&"iset"===W||"iset"===R&&"iget"===W||"sget"===R&&"sset"===W||"sset"===R&&"sget"===W?(g[L]="true",!1):!!R||(g[L]=W,!1)}function checkKeyName(g,v){var L=g.computed,R=g.key;return!L&&("Identifier"===R.type&&R.name===v||"Literal"===R.type&&R.value===v)}pp$8.parseFunction=function(g,v,L,R,W){this.initFunction(g),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!R)&&(this.type===types$1$1.star&&v&FUNC_HANGING_STATEMENT&&this.unexpected(),g.generator=this.eat(types$1$1.star)),this.options.ecmaVersion>=8&&(g.async=!!R),v&FUNC_STATEMENT&&(g.id=v&FUNC_NULLABLE_ID&&this.type!==types$1$1.name?null:this.parseIdent(),!g.id||v&FUNC_HANGING_STATEMENT||this.checkLValSimple(g.id,this.strict||g.generator||g.async?this.treatFunctionsAsVar?BIND_VAR:BIND_LEXICAL:BIND_FUNCTION));var ie=this.yieldPos,ce=this.awaitPos,le=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(functionFlags(g.async,g.generator)),v&FUNC_STATEMENT||(g.id=this.type===types$1$1.name?this.parseIdent():null),this.parseFunctionParams(g),this.parseFunctionBody(g,L,!1,W),this.yieldPos=ie,this.awaitPos=ce,this.awaitIdentPos=le,this.finishNode(g,v&FUNC_STATEMENT?"FunctionDeclaration":"FunctionExpression")},pp$8.parseFunctionParams=function(g){this.expect(types$1$1.parenL),g.params=this.parseBindingList(types$1$1.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},pp$8.parseClass=function(g,v){this.next();var L=this.strict;this.strict=!0,this.parseClassId(g,v),this.parseClassSuper(g);var R=this.enterClassBody(),W=this.startNode(),ie=!1;for(W.body=[],this.expect(types$1$1.braceL);this.type!==types$1$1.braceR;){var ce=this.parseClassElement(null!==g.superClass);ce&&(W.body.push(ce),"MethodDefinition"===ce.type&&"constructor"===ce.kind?(ie&&this.raiseRecoverable(ce.start,"Duplicate constructor in the same class"),ie=!0):ce.key&&"PrivateIdentifier"===ce.key.type&&isPrivateNameConflicted(R,ce)&&this.raiseRecoverable(ce.key.start,"Identifier '#"+ce.key.name+"' has already been declared"))}return this.strict=L,this.next(),g.body=this.finishNode(W,"ClassBody"),this.exitClassBody(),this.finishNode(g,v?"ClassDeclaration":"ClassExpression")},pp$8.parseClassElement=function(g){if(this.eat(types$1$1.semi))return null;var v=this.options.ecmaVersion,L=this.startNode(),R="",W=!1,ie=!1,ce="method",le=!1;if(this.eatContextual("static")){if(v>=13&&this.eat(types$1$1.braceL))return this.parseClassStaticBlock(L),L;this.isClassElementNameStart()||this.type===types$1$1.star?le=!0:R="static"}if(L.static=le,!R&&v>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==types$1$1.star||this.canInsertSemicolon()?R="async":ie=!0),!R&&(v>=9||!ie)&&this.eat(types$1$1.star)&&(W=!0),!R&&!ie&&!W){var ue=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?ce=ue:R=ue)}if(R?(L.computed=!1,L.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),L.key.name=R,this.finishNode(L.key,"Identifier")):this.parseClassElementName(L),v<13||this.type===types$1$1.parenL||"method"!==ce||W||ie){var me=!L.static&&checkKeyName(L,"constructor"),ge=me&&g;me&&"method"!==ce&&this.raise(L.key.start,"Constructor can't have get/set modifier"),L.kind=me?"constructor":ce,this.parseClassMethod(L,W,ie,ge)}else this.parseClassField(L);return L},pp$8.isClassElementNameStart=function(){return this.type===types$1$1.name||this.type===types$1$1.privateId||this.type===types$1$1.num||this.type===types$1$1.string||this.type===types$1$1.bracketL||this.type.keyword},pp$8.parseClassElementName=function(g){this.type===types$1$1.privateId?("constructor"===this.value&&this.raise(this.start,"Classes can't have an element named '#constructor'"),g.computed=!1,g.key=this.parsePrivateIdent()):this.parsePropertyName(g)},pp$8.parseClassMethod=function(g,v,L,R){var W=g.key;"constructor"===g.kind?(v&&this.raise(W.start,"Constructor can't be a generator"),L&&this.raise(W.start,"Constructor can't be an async method")):g.static&&checkKeyName(g,"prototype")&&this.raise(W.start,"Classes may not have a static property named prototype");var ie=g.value=this.parseMethod(v,L,R);return"get"===g.kind&&0!==ie.params.length&&this.raiseRecoverable(ie.start,"getter should have no params"),"set"===g.kind&&1!==ie.params.length&&this.raiseRecoverable(ie.start,"setter should have exactly one param"),"set"===g.kind&&"RestElement"===ie.params[0].type&&this.raiseRecoverable(ie.params[0].start,"Setter cannot use rest params"),this.finishNode(g,"MethodDefinition")},pp$8.parseClassField=function(g){return checkKeyName(g,"constructor")?this.raise(g.key.start,"Classes can't have a field named 'constructor'"):g.static&&checkKeyName(g,"prototype")&&this.raise(g.key.start,"Classes can't have a static field named 'prototype'"),this.eat(types$1$1.eq)?(this.enterScope(SCOPE_CLASS_FIELD_INIT|SCOPE_SUPER),g.value=this.parseMaybeAssign(),this.exitScope()):g.value=null,this.semicolon(),this.finishNode(g,"PropertyDefinition")},pp$8.parseClassStaticBlock=function(g){g.body=[];var v=this.labels;for(this.labels=[],this.enterScope(SCOPE_CLASS_STATIC_BLOCK|SCOPE_SUPER);this.type!==types$1$1.braceR;){var L=this.parseStatement(null);g.body.push(L)}return this.next(),this.exitScope(),this.labels=v,this.finishNode(g,"StaticBlock")},pp$8.parseClassId=function(g,v){this.type===types$1$1.name?(g.id=this.parseIdent(),v&&this.checkLValSimple(g.id,BIND_LEXICAL,!1)):(!0===v&&this.unexpected(),g.id=null)},pp$8.parseClassSuper=function(g){g.superClass=this.eat(types$1$1._extends)?this.parseExprSubscripts(null,!1):null},pp$8.enterClassBody=function(){var g={declared:Object.create(null),used:[]};return this.privateNameStack.push(g),g.declared},pp$8.exitClassBody=function(){var g=this.privateNameStack.pop(),v=g.declared,L=g.used;if(this.options.checkPrivateFields)for(var R=this.privateNameStack.length,W=0===R?null:this.privateNameStack[R-1],ie=0;ie<L.length;++ie){var ce=L[ie];hasOwn(v,ce.name)||(W?W.used.push(ce):this.raiseRecoverable(ce.start,"Private field '#"+ce.name+"' must be declared in an enclosing class"))}},pp$8.parseExportAllDeclaration=function(g,v){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(g.exported=this.parseModuleExportName(),this.checkExport(v,g.exported,this.lastTokStart)):g.exported=null),this.expectContextual("from"),this.type!==types$1$1.string&&this.unexpected(),g.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(g.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(g,"ExportAllDeclaration")},pp$8.parseExport=function(g,v){if(this.next(),this.eat(types$1$1.star))return this.parseExportAllDeclaration(g,v);if(this.eat(types$1$1._default))return this.checkExport(v,"default",this.lastTokStart),g.declaration=this.parseExportDefaultDeclaration(),this.finishNode(g,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())g.declaration=this.parseExportDeclaration(g),"VariableDeclaration"===g.declaration.type?this.checkVariableExport(v,g.declaration.declarations):this.checkExport(v,g.declaration.id,g.declaration.id.start),g.specifiers=[],g.source=null,this.options.ecmaVersion>=16&&(g.attributes=[]);else{if(g.declaration=null,g.specifiers=this.parseExportSpecifiers(v),this.eatContextual("from"))this.type!==types$1$1.string&&this.unexpected(),g.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(g.attributes=this.parseWithClause());else{for(var L=0,R=g.specifiers;L<R.length;L+=1){var W=R[L];this.checkUnreserved(W.local),this.checkLocalExport(W.local),"Literal"===W.local.type&&this.raise(W.local.start,"A string literal cannot be used as an exported binding without `from`.")}g.source=null,this.options.ecmaVersion>=16&&(g.attributes=[])}this.semicolon()}return this.finishNode(g,"ExportNamedDeclaration")},pp$8.parseExportDeclaration=function(g){return this.parseStatement(null)},pp$8.parseExportDefaultDeclaration=function(){var g;if(this.type===types$1$1._function||(g=this.isAsyncFunction())){var v=this.startNode();return this.next(),g&&this.next(),this.parseFunction(v,FUNC_STATEMENT|FUNC_NULLABLE_ID,!1,g)}if(this.type===types$1$1._class){var L=this.startNode();return this.parseClass(L,"nullableID")}var R=this.parseMaybeAssign();return this.semicolon(),R},pp$8.checkExport=function(g,v,L){g&&("string"!=typeof v&&(v="Identifier"===v.type?v.name:v.value),hasOwn(g,v)&&this.raiseRecoverable(L,"Duplicate export '"+v+"'"),g[v]=!0)},pp$8.checkPatternExport=function(g,v){var L=v.type;if("Identifier"===L)this.checkExport(g,v,v.start);else if("ObjectPattern"===L)for(var R=0,W=v.properties;R<W.length;R+=1){var ie=W[R];this.checkPatternExport(g,ie)}else if("ArrayPattern"===L)for(var ce=0,le=v.elements;ce<le.length;ce+=1){var ue=le[ce];ue&&this.checkPatternExport(g,ue)}else"Property"===L?this.checkPatternExport(g,v.value):"AssignmentPattern"===L?this.checkPatternExport(g,v.left):"RestElement"===L&&this.checkPatternExport(g,v.argument)},pp$8.checkVariableExport=function(g,v){if(g)for(var L=0,R=v;L<R.length;L+=1){var W=R[L];this.checkPatternExport(g,W.id)}},pp$8.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},pp$8.parseExportSpecifier=function(g){var v=this.startNode();return v.local=this.parseModuleExportName(),v.exported=this.eatContextual("as")?this.parseModuleExportName():v.local,this.checkExport(g,v.exported,v.exported.start),this.finishNode(v,"ExportSpecifier")},pp$8.parseExportSpecifiers=function(g){var v=[],L=!0;for(this.expect(types$1$1.braceL);!this.eat(types$1$1.braceR);){if(L)L=!1;else if(this.expect(types$1$1.comma),this.afterTrailingComma(types$1$1.braceR))break;v.push(this.parseExportSpecifier(g))}return v},pp$8.parseImport=function(g){return this.next(),this.type===types$1$1.string?(g.specifiers=empty$1,g.source=this.parseExprAtom()):(g.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),g.source=this.type===types$1$1.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(g.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(g,"ImportDeclaration")},pp$8.parseImportSpecifier=function(){var g=this.startNode();return g.imported=this.parseModuleExportName(),this.eatContextual("as")?g.local=this.parseIdent():(this.checkUnreserved(g.imported),g.local=g.imported),this.checkLValSimple(g.local,BIND_LEXICAL),this.finishNode(g,"ImportSpecifier")},pp$8.parseImportDefaultSpecifier=function(){var g=this.startNode();return g.local=this.parseIdent(),this.checkLValSimple(g.local,BIND_LEXICAL),this.finishNode(g,"ImportDefaultSpecifier")},pp$8.parseImportNamespaceSpecifier=function(){var g=this.startNode();return this.next(),this.expectContextual("as"),g.local=this.parseIdent(),this.checkLValSimple(g.local,BIND_LEXICAL),this.finishNode(g,"ImportNamespaceSpecifier")},pp$8.parseImportSpecifiers=function(){var g=[],v=!0;if(this.type===types$1$1.name&&(g.push(this.parseImportDefaultSpecifier()),!this.eat(types$1$1.comma)))return g;if(this.type===types$1$1.star)return g.push(this.parseImportNamespaceSpecifier()),g;for(this.expect(types$1$1.braceL);!this.eat(types$1$1.braceR);){if(v)v=!1;else if(this.expect(types$1$1.comma),this.afterTrailingComma(types$1$1.braceR))break;g.push(this.parseImportSpecifier())}return g},pp$8.parseWithClause=function(){var g=[];if(!this.eat(types$1$1._with))return g;this.expect(types$1$1.braceL);for(var v={},L=!0;!this.eat(types$1$1.braceR);){if(L)L=!1;else if(this.expect(types$1$1.comma),this.afterTrailingComma(types$1$1.braceR))break;var R=this.parseImportAttribute(),W="Identifier"===R.key.type?R.key.name:R.key.value;hasOwn(v,W)&&this.raiseRecoverable(R.key.start,"Duplicate attribute key '"+W+"'"),v[W]=!0,g.push(R)}return g},pp$8.parseImportAttribute=function(){var g=this.startNode();return g.key=this.type===types$1$1.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved),this.expect(types$1$1.colon),this.type!==types$1$1.string&&this.unexpected(),g.value=this.parseExprAtom(),this.finishNode(g,"ImportAttribute")},pp$8.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===types$1$1.string){var g=this.parseLiteral(this.value);return loneSurrogate.test(g.value)&&this.raise(g.start,"An export name cannot include a lone surrogate."),g}return this.parseIdent(!0)},pp$8.adaptDirectivePrologue=function(g){for(var v=0;v<g.length&&this.isDirectiveCandidate(g[v]);++v)g[v].directive=g[v].expression.raw.slice(1,-1)},pp$8.isDirectiveCandidate=function(g){return this.options.ecmaVersion>=5&&"ExpressionStatement"===g.type&&"Literal"===g.expression.type&&"string"==typeof g.expression.value&&('"'===this.input[g.start]||"'"===this.input[g.start])};var pp$7=Parser.prototype;pp$7.toAssignable=function(g,v,L){if(this.options.ecmaVersion>=6&&g)switch(g.type){case"Identifier":this.inAsync&&"await"===g.name&&this.raise(g.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":g.type="ObjectPattern",L&&this.checkPatternErrors(L,!0);for(var R=0,W=g.properties;R<W.length;R+=1){var ie=W[R];this.toAssignable(ie,v),"RestElement"!==ie.type||"ArrayPattern"!==ie.argument.type&&"ObjectPattern"!==ie.argument.type||this.raise(ie.argument.start,"Unexpected token")}break;case"Property":"init"!==g.kind&&this.raise(g.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(g.value,v);break;case"ArrayExpression":g.type="ArrayPattern",L&&this.checkPatternErrors(L,!0),this.toAssignableList(g.elements,v);break;case"SpreadElement":g.type="RestElement",this.toAssignable(g.argument,v),"AssignmentPattern"===g.argument.type&&this.raise(g.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":"="!==g.operator&&this.raise(g.left.end,"Only '=' operator can be used for specifying default value."),g.type="AssignmentPattern",delete g.operator,this.toAssignable(g.left,v);break;case"ParenthesizedExpression":this.toAssignable(g.expression,v,L);break;case"ChainExpression":this.raiseRecoverable(g.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!v)break;default:this.raise(g.start,"Assigning to rvalue")}else L&&this.checkPatternErrors(L,!0);return g},pp$7.toAssignableList=function(g,v){for(var L=g.length,R=0;R<L;R++){var W=g[R];W&&this.toAssignable(W,v)}if(L){var ie=g[L-1];6===this.options.ecmaVersion&&v&&ie&&"RestElement"===ie.type&&"Identifier"!==ie.argument.type&&this.unexpected(ie.argument.start)}return g},pp$7.parseSpread=function(g){var v=this.startNode();return this.next(),v.argument=this.parseMaybeAssign(!1,g),this.finishNode(v,"SpreadElement")},pp$7.parseRestBinding=function(){var g=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==types$1$1.name&&this.unexpected(),g.argument=this.parseBindingAtom(),this.finishNode(g,"RestElement")},pp$7.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case types$1$1.bracketL:var g=this.startNode();return this.next(),g.elements=this.parseBindingList(types$1$1.bracketR,!0,!0),this.finishNode(g,"ArrayPattern");case types$1$1.braceL:return this.parseObj(!0)}return this.parseIdent()},pp$7.parseBindingList=function(g,v,L,R){for(var W=[],ie=!0;!this.eat(g);)if(ie?ie=!1:this.expect(types$1$1.comma),v&&this.type===types$1$1.comma)W.push(null);else{if(L&&this.afterTrailingComma(g))break;if(this.type===types$1$1.ellipsis){var ce=this.parseRestBinding();this.parseBindingListItem(ce),W.push(ce),this.type===types$1$1.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(g);break}W.push(this.parseAssignableListItem(R))}return W},pp$7.parseAssignableListItem=function(g){var v=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(v),v},pp$7.parseBindingListItem=function(g){return g},pp$7.parseMaybeDefault=function(g,v,L){if(L=L||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(types$1$1.eq))return L;var R=this.startNodeAt(g,v);return R.left=L,R.right=this.parseMaybeAssign(),this.finishNode(R,"AssignmentPattern")},pp$7.checkLValSimple=function(g,v,L){void 0===v&&(v=BIND_NONE);var R=v!==BIND_NONE;switch(g.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(g.name)&&this.raiseRecoverable(g.start,(R?"Binding ":"Assigning to ")+g.name+" in strict mode"),R&&(v===BIND_LEXICAL&&"let"===g.name&&this.raiseRecoverable(g.start,"let is disallowed as a lexically bound name"),L&&(hasOwn(L,g.name)&&this.raiseRecoverable(g.start,"Argument name clash"),L[g.name]=!0),v!==BIND_OUTSIDE&&this.declareName(g.name,v,g.start));break;case"ChainExpression":this.raiseRecoverable(g.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":R&&this.raiseRecoverable(g.start,"Binding member expression");break;case"ParenthesizedExpression":return R&&this.raiseRecoverable(g.start,"Binding parenthesized expression"),this.checkLValSimple(g.expression,v,L);default:this.raise(g.start,(R?"Binding":"Assigning to")+" rvalue")}},pp$7.checkLValPattern=function(g,v,L){switch(void 0===v&&(v=BIND_NONE),g.type){case"ObjectPattern":for(var R=0,W=g.properties;R<W.length;R+=1){var ie=W[R];this.checkLValInnerPattern(ie,v,L)}break;case"ArrayPattern":for(var ce=0,le=g.elements;ce<le.length;ce+=1){var ue=le[ce];ue&&this.checkLValInnerPattern(ue,v,L)}break;default:this.checkLValSimple(g,v,L)}},pp$7.checkLValInnerPattern=function(g,v,L){switch(void 0===v&&(v=BIND_NONE),g.type){case"Property":this.checkLValInnerPattern(g.value,v,L);break;case"AssignmentPattern":this.checkLValPattern(g.left,v,L);break;case"RestElement":this.checkLValPattern(g.argument,v,L);break;default:this.checkLValPattern(g,v,L)}};var TokContext=function TokContext(g,v,L,R,W){this.token=g,this.isExpr=!!v,this.preserveSpace=!!L,this.override=R,this.generator=!!W},types$2={b_stat:new TokContext("{",!1),b_expr:new TokContext("{",!0),b_tmpl:new TokContext("${",!1),p_stat:new TokContext("(",!1),p_expr:new TokContext("(",!0),q_tmpl:new TokContext("`",!0,!0,function(g){return g.tryReadTemplateToken()}),f_stat:new TokContext("function",!1),f_expr:new TokContext("function",!0),f_expr_gen:new TokContext("function",!0,!1,null,!0),f_gen:new TokContext("function",!1,!1,null,!0)},pp$6=Parser.prototype;pp$6.initialContext=function(){return[types$2.b_stat]},pp$6.curContext=function(){return this.context[this.context.length-1]},pp$6.braceIsBlock=function(g){var v=this.curContext();return v===types$2.f_expr||v===types$2.f_stat||(g!==types$1$1.colon||v!==types$2.b_stat&&v!==types$2.b_expr?g===types$1$1._return||g===types$1$1.name&&this.exprAllowed?lineBreak.test(this.input.slice(this.lastTokEnd,this.start)):g===types$1$1._else||g===types$1$1.semi||g===types$1$1.eof||g===types$1$1.parenR||g===types$1$1.arrow||(g===types$1$1.braceL?v===types$2.b_stat:g!==types$1$1._var&&g!==types$1$1._const&&g!==types$1$1.name&&!this.exprAllowed):!v.isExpr)},pp$6.inGeneratorContext=function(){for(var g=this.context.length-1;g>=1;g--){var v=this.context[g];if("function"===v.token)return v.generator}return!1},pp$6.updateContext=function(g){var v,L=this.type;L.keyword&&g===types$1$1.dot?this.exprAllowed=!1:(v=L.updateContext)?v.call(this,g):this.exprAllowed=L.beforeExpr},pp$6.overrideContext=function(g){this.curContext()!==g&&(this.context[this.context.length-1]=g)},types$1$1.parenR.updateContext=types$1$1.braceR.updateContext=function(){if(1!==this.context.length){var g=this.context.pop();g===types$2.b_stat&&"function"===this.curContext().token&&(g=this.context.pop()),this.exprAllowed=!g.isExpr}else this.exprAllowed=!0},types$1$1.braceL.updateContext=function(g){this.context.push(this.braceIsBlock(g)?types$2.b_stat:types$2.b_expr),this.exprAllowed=!0},types$1$1.dollarBraceL.updateContext=function(){this.context.push(types$2.b_tmpl),this.exprAllowed=!0},types$1$1.parenL.updateContext=function(g){var v=g===types$1$1._if||g===types$1$1._for||g===types$1$1._with||g===types$1$1._while;this.context.push(v?types$2.p_stat:types$2.p_expr),this.exprAllowed=!0},types$1$1.incDec.updateContext=function(){},types$1$1._function.updateContext=types$1$1._class.updateContext=function(g){!g.beforeExpr||g===types$1$1._else||g===types$1$1.semi&&this.curContext()!==types$2.p_stat||g===types$1$1._return&&lineBreak.test(this.input.slice(this.lastTokEnd,this.start))||(g===types$1$1.colon||g===types$1$1.braceL)&&this.curContext()===types$2.b_stat?this.context.push(types$2.f_stat):this.context.push(types$2.f_expr),this.exprAllowed=!1},types$1$1.colon.updateContext=function(){"function"===this.curContext().token&&this.context.pop(),this.exprAllowed=!0},types$1$1.backQuote.updateContext=function(){this.curContext()===types$2.q_tmpl?this.context.pop():this.context.push(types$2.q_tmpl),this.exprAllowed=!1},types$1$1.star.updateContext=function(g){if(g===types$1$1._function){var v=this.context.length-1;this.context[v]===types$2.f_expr?this.context[v]=types$2.f_expr_gen:this.context[v]=types$2.f_gen}this.exprAllowed=!0},types$1$1.name.updateContext=function(g){var v=!1;this.options.ecmaVersion>=6&&g!==types$1$1.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(v=!0),this.exprAllowed=v};var pp$5=Parser.prototype;function isLocalVariableAccess(g){return"Identifier"===g.type||"ParenthesizedExpression"===g.type&&isLocalVariableAccess(g.expression)}function isPrivateFieldAccess(g){return"MemberExpression"===g.type&&"PrivateIdentifier"===g.property.type||"ChainExpression"===g.type&&isPrivateFieldAccess(g.expression)||"ParenthesizedExpression"===g.type&&isPrivateFieldAccess(g.expression)}pp$5.checkPropClash=function(g,v,L){if(!(this.options.ecmaVersion>=9&&"SpreadElement"===g.type||this.options.ecmaVersion>=6&&(g.computed||g.method||g.shorthand))){var R,W=g.key;switch(W.type){case"Identifier":R=W.name;break;case"Literal":R=String(W.value);break;default:return}var ie=g.kind;if(this.options.ecmaVersion>=6)"__proto__"===R&&"init"===ie&&(v.proto&&(L?L.doubleProto<0&&(L.doubleProto=W.start):this.raiseRecoverable(W.start,"Redefinition of __proto__ property")),v.proto=!0);else{var ce=v[R="$"+R];if(ce)("init"===ie?this.strict&&ce.init||ce.get||ce.set:ce.init||ce[ie])&&this.raiseRecoverable(W.start,"Redefinition of property");else ce=v[R]={init:!1,get:!1,set:!1};ce[ie]=!0}}},pp$5.parseExpression=function(g,v){var L=this;return this.catchStackOverflow(function(){var R=L.start,W=L.startLoc,ie=L.parseMaybeAssign(g,v);if(L.type===types$1$1.comma){var ce=L.startNodeAt(R,W);for(ce.expressions=[ie];L.eat(types$1$1.comma);)ce.expressions.push(L.parseMaybeAssign(g,v));return L.finishNode(ce,"SequenceExpression")}return ie})},pp$5.parseMaybeAssign=function(g,v,L){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(g);this.exprAllowed=!1}var R=!1,W=-1,ie=-1,ce=-1;v?(W=v.parenthesizedAssign,ie=v.trailingComma,ce=v.doubleProto,v.parenthesizedAssign=v.trailingComma=-1):(v=new DestructuringErrors,R=!0);var le=this.start,ue=this.startLoc;this.type!==types$1$1.parenL&&this.type!==types$1$1.name||(this.potentialArrowAt=this.start,this.potentialArrowInForAwait="await"===g);var me=this.parseMaybeConditional(g,v);if(L&&(me=L.call(this,me,le,ue)),this.type.isAssign){var ge=this.startNodeAt(le,ue);return ge.operator=this.value,this.type===types$1$1.eq&&(me=this.toAssignable(me,!1,v)),R||(v.parenthesizedAssign=v.trailingComma=v.doubleProto=-1),v.shorthandAssign>=me.start&&(v.shorthandAssign=-1),this.type===types$1$1.eq?this.checkLValPattern(me):this.checkLValSimple(me),ge.left=me,this.next(),ge.right=this.parseMaybeAssign(g),ce>-1&&(v.doubleProto=ce),this.finishNode(ge,"AssignmentExpression")}return R&&this.checkExpressionErrors(v,!0),W>-1&&(v.parenthesizedAssign=W),ie>-1&&(v.trailingComma=ie),me},pp$5.parseMaybeConditional=function(g,v){var L=this.start,R=this.startLoc,W=this.parseExprOps(g,v);if(this.checkExpressionErrors(v))return W;if(("ArrowFunctionExpression"!==W.type||W.start!==L)&&this.eat(types$1$1.question)){var ie=this.startNodeAt(L,R);return ie.test=W,ie.consequent=this.parseMaybeAssign(),this.expect(types$1$1.colon),ie.alternate=this.parseMaybeAssign(g),this.finishNode(ie,"ConditionalExpression")}return W},pp$5.parseExprOps=function(g,v){var L=this.start,R=this.startLoc,W=this.parseMaybeUnary(v,!1,!1,g);return this.checkExpressionErrors(v)||W.start===L&&"ArrowFunctionExpression"===W.type?W:this.parseExprOp(W,L,R,-1,g)},pp$5.parseExprOp=function(g,v,L,R,W){var ie=this.type.binop;if(null!=ie&&(!W||this.type!==types$1$1._in)&&ie>R){var ce=this.type===types$1$1.logicalOR||this.type===types$1$1.logicalAND,le=this.type===types$1$1.coalesce;le&&(ie=types$1$1.logicalAND.binop);var ue=this.value;this.next();var me=this.start,ge=this.startLoc,ve=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,W),me,ge,ie,W),xe=this.buildBinary(v,L,g,ve,ue,ce||le);return(ce&&this.type===types$1$1.coalesce||le&&(this.type===types$1$1.logicalOR||this.type===types$1$1.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(xe,v,L,R,W)}return g},pp$5.buildBinary=function(g,v,L,R,W,ie){"PrivateIdentifier"===R.type&&this.raise(R.start,"Private identifier can only be left side of binary expression");var ce=this.startNodeAt(g,v);return ce.left=L,ce.operator=W,ce.right=R,this.finishNode(ce,ie?"LogicalExpression":"BinaryExpression")},pp$5.parseMaybeUnary=function(g,v,L,R){var W,ie=this.start,ce=this.startLoc;if(this.isContextual("await")&&this.canAwait)W=this.parseAwait(R),v=!0;else if(this.type.prefix){var le=this.startNode(),ue=this.type===types$1$1.incDec;le.operator=this.value,le.prefix=!0,this.next(),le.argument=this.parseMaybeUnary(null,!0,ue,R),this.checkExpressionErrors(g,!0),ue?this.checkLValSimple(le.argument):this.strict&&"delete"===le.operator&&isLocalVariableAccess(le.argument)?this.raiseRecoverable(le.start,"Deleting local variable in strict mode"):"delete"===le.operator&&isPrivateFieldAccess(le.argument)?this.raiseRecoverable(le.start,"Private fields can not be deleted"):v=!0,W=this.finishNode(le,ue?"UpdateExpression":"UnaryExpression")}else if(v||this.type!==types$1$1.privateId){if(W=this.parseExprSubscripts(g,R),this.checkExpressionErrors(g))return W;for(;this.type.postfix&&!this.canInsertSemicolon();){var me=this.startNodeAt(ie,ce);me.operator=this.value,me.prefix=!1,me.argument=W,this.checkLValSimple(W),this.next(),W=this.finishNode(me,"UpdateExpression")}}else(R||0===this.privateNameStack.length)&&this.options.checkPrivateFields&&this.unexpected(),W=this.parsePrivateIdent(),this.type!==types$1$1._in&&this.unexpected();return L||"ArrowFunctionExpression"===W.type&&W.start===ie||!this.eat(types$1$1.starstar)?W:v?void this.unexpected(this.lastTokStart):this.buildBinary(ie,ce,W,this.parseMaybeUnary(null,!1,!1,R),"**",!1)},pp$5.parseExprSubscripts=function(g,v){var L=this.start,R=this.startLoc,W=this.parseExprAtom(g,v);if("ArrowFunctionExpression"===W.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd))return W;var ie=this.parseSubscripts(W,L,R,!1,v);return g&&"MemberExpression"===ie.type&&(g.parenthesizedAssign>=ie.start&&(g.parenthesizedAssign=-1),g.parenthesizedBind>=ie.start&&(g.parenthesizedBind=-1),g.trailingComma>=ie.start&&(g.trailingComma=-1)),ie},pp$5.parseSubscripts=function(g,v,L,R,W){for(var ie=this.options.ecmaVersion>=8&&"Identifier"===g.type&&"async"===g.name&&this.lastTokEnd===g.end&&!this.canInsertSemicolon()&&g.end-g.start===5&&this.potentialArrowAt===g.start,ce=!1;;){var le=this.parseSubscript(g,v,L,R,ie,ce,W);if(le.optional&&(ce=!0),le===g||"ArrowFunctionExpression"===le.type){if(ce){var ue=this.startNodeAt(v,L);ue.expression=le,le=this.finishNode(ue,"ChainExpression")}return le}g=le}},pp$5.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(types$1$1.arrow)},pp$5.parseSubscriptAsyncArrow=function(g,v,L,R){return this.parseArrowExpression(this.startNodeAt(g,v),L,!0,R)},pp$5.parseSubscript=function(g,v,L,R,W,ie,ce){var le=this.options.ecmaVersion>=11,ue=le&&this.eat(types$1$1.questionDot);R&&ue&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var me=this.eat(types$1$1.bracketL);if(me||ue&&this.type!==types$1$1.parenL&&this.type!==types$1$1.backQuote||this.eat(types$1$1.dot)){var ge=this.startNodeAt(v,L);ge.object=g,me?(ge.property=this.parseExpression(),this.expect(types$1$1.bracketR)):this.type===types$1$1.privateId&&"Super"!==g.type?ge.property=this.parsePrivateIdent():ge.property=this.parseIdent("never"!==this.options.allowReserved),ge.computed=!!me,le&&(ge.optional=ue),g=this.finishNode(ge,"MemberExpression")}else if(!R&&this.eat(types$1$1.parenL)){var ve=new DestructuringErrors,xe=this.yieldPos,_e=this.awaitPos,ke=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var Se=this.parseExprList(types$1$1.parenR,this.options.ecmaVersion>=8,!1,ve);if(W&&!ue&&this.shouldParseAsyncArrow())return this.checkPatternErrors(ve,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=xe,this.awaitPos=_e,this.awaitIdentPos=ke,this.parseSubscriptAsyncArrow(v,L,Se,ce);this.checkExpressionErrors(ve,!0),this.yieldPos=xe||this.yieldPos,this.awaitPos=_e||this.awaitPos,this.awaitIdentPos=ke||this.awaitIdentPos;var we=this.startNodeAt(v,L);we.callee=g,we.arguments=Se,le&&(we.optional=ue),g=this.finishNode(we,"CallExpression")}else if(this.type===types$1$1.backQuote){(ue||ie)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var Ie=this.startNodeAt(v,L);Ie.tag=g,Ie.quasi=this.parseTemplate({isTagged:!0}),g=this.finishNode(Ie,"TaggedTemplateExpression")}return g},pp$5.parseExprAtom=function(g,v,L){this.type===types$1$1.slash&&this.readRegexp();var R,W=this.potentialArrowAt===this.start;switch(this.type){case types$1$1._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),R=this.startNode(),this.next(),this.type!==types$1$1.parenL||this.allowDirectSuper||this.raise(R.start,"super() call outside constructor of a subclass"),this.type!==types$1$1.dot&&this.type!==types$1$1.bracketL&&this.type!==types$1$1.parenL&&this.unexpected(),this.finishNode(R,"Super");case types$1$1._this:return R=this.startNode(),this.next(),this.finishNode(R,"ThisExpression");case types$1$1.name:var ie=this.start,ce=this.startLoc,le=this.containsEsc,ue=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!le&&"async"===ue.name&&!this.canInsertSemicolon()&&this.eat(types$1$1._function))return this.overrideContext(types$2.f_expr),this.parseFunction(this.startNodeAt(ie,ce),0,!1,!0,v);if(W&&!this.canInsertSemicolon()){if(this.eat(types$1$1.arrow))return this.parseArrowExpression(this.startNodeAt(ie,ce),[ue],!1,v);if(this.options.ecmaVersion>=8&&"async"===ue.name&&this.type===types$1$1.name&&!le&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return ue=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(types$1$1.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(ie,ce),[ue],!0,v)}return ue;case types$1$1.regexp:var me=this.value;return(R=this.parseLiteral(me.value)).regex={pattern:me.pattern,flags:me.flags},R;case types$1$1.num:case types$1$1.string:return this.parseLiteral(this.value);case types$1$1._null:case types$1$1._true:case types$1$1._false:return(R=this.startNode()).value=this.type===types$1$1._null?null:this.type===types$1$1._true,R.raw=this.type.keyword,this.next(),this.finishNode(R,"Literal");case types$1$1.parenL:var ge=this.start,ve=this.parseParenAndDistinguishExpression(W,v);return g&&(g.parenthesizedAssign<0&&!this.isSimpleAssignTarget(ve)&&(g.parenthesizedAssign=ge),g.parenthesizedBind<0&&(g.parenthesizedBind=ge)),ve;case types$1$1.bracketL:return R=this.startNode(),this.next(),R.elements=this.parseExprList(types$1$1.bracketR,!0,!0,g),this.finishNode(R,"ArrayExpression");case types$1$1.braceL:return this.overrideContext(types$2.b_expr),this.parseObj(!1,g);case types$1$1._function:return R=this.startNode(),this.next(),this.parseFunction(R,0);case types$1$1._class:return this.parseClass(this.startNode(),!1);case types$1$1._new:return this.parseNew();case types$1$1.backQuote:return this.parseTemplate();case types$1$1._import:return this.options.ecmaVersion>=11?this.parseExprImport(L):this.unexpected();default:return this.parseExprAtomDefault()}},pp$5.parseExprAtomDefault=function(){this.unexpected()},pp$5.parseExprImport=function(g){var v=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===types$1$1.parenL&&!g)return this.parseDynamicImport(v);if(this.type===types$1$1.dot){var L=this.startNodeAt(v.start,v.loc&&v.loc.start);return L.name="import",v.meta=this.finishNode(L,"Identifier"),this.parseImportMeta(v)}this.unexpected()},pp$5.parseDynamicImport=function(g){if(this.next(),g.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(types$1$1.parenR)?g.options=null:(this.expect(types$1$1.comma),this.afterTrailingComma(types$1$1.parenR)?g.options=null:(g.options=this.parseMaybeAssign(),this.eat(types$1$1.parenR)||(this.expect(types$1$1.comma),this.afterTrailingComma(types$1$1.parenR)||this.unexpected())));else if(!this.eat(types$1$1.parenR)){var v=this.start;this.eat(types$1$1.comma)&&this.eat(types$1$1.parenR)?this.raiseRecoverable(v,"Trailing comma is not allowed in import()"):this.unexpected(v)}return this.finishNode(g,"ImportExpression")},pp$5.parseImportMeta=function(g){this.next();var v=this.containsEsc;return g.property=this.parseIdent(!0),"meta"!==g.property.name&&this.raiseRecoverable(g.property.start,"The only valid meta property for import is 'import.meta'"),v&&this.raiseRecoverable(g.start,"'import.meta' must not contain escaped characters"),"module"===this.options.sourceType||this.options.allowImportExportEverywhere||this.raiseRecoverable(g.start,"Cannot use 'import.meta' outside a module"),this.finishNode(g,"MetaProperty")},pp$5.parseLiteral=function(g){var v=this.startNode();return v.value=g,v.raw=this.input.slice(this.start,this.end),110===v.raw.charCodeAt(v.raw.length-1)&&(v.bigint=null!=v.value?v.value.toString():v.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(v,"Literal")},pp$5.parseParenExpression=function(){this.expect(types$1$1.parenL);var g=this.parseExpression();return this.expect(types$1$1.parenR),g},pp$5.shouldParseArrow=function(g){return!this.canInsertSemicolon()},pp$5.parseParenAndDistinguishExpression=function(g,v){var L,R=this.start,W=this.startLoc,ie=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var ce,le=this.start,ue=this.startLoc,me=[],ge=!0,ve=!1,xe=new DestructuringErrors,_e=this.yieldPos,ke=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==types$1$1.parenR;){if(ge?ge=!1:this.expect(types$1$1.comma),ie&&this.afterTrailingComma(types$1$1.parenR,!0)){ve=!0;break}if(this.type===types$1$1.ellipsis){ce=this.start,me.push(this.parseParenItem(this.parseRestBinding())),this.type===types$1$1.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}me.push(this.parseMaybeAssign(!1,xe,this.parseParenItem))}var Se=this.lastTokEnd,we=this.lastTokEndLoc;if(this.expect(types$1$1.parenR),g&&this.shouldParseArrow(me)&&this.eat(types$1$1.arrow))return this.checkPatternErrors(xe,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=_e,this.awaitPos=ke,this.parseParenArrowList(R,W,me,v);me.length&&!ve||this.unexpected(this.lastTokStart),ce&&this.unexpected(ce),this.checkExpressionErrors(xe,!0),this.yieldPos=_e||this.yieldPos,this.awaitPos=ke||this.awaitPos,me.length>1?((L=this.startNodeAt(le,ue)).expressions=me,this.finishNodeAt(L,"SequenceExpression",Se,we)):L=me[0]}else L=this.parseParenExpression();if(this.options.preserveParens){var Ie=this.startNodeAt(R,W);return Ie.expression=L,this.finishNode(Ie,"ParenthesizedExpression")}return L},pp$5.parseParenItem=function(g){return g},pp$5.parseParenArrowList=function(g,v,L,R){return this.parseArrowExpression(this.startNodeAt(g,v),L,!1,R)};var empty=[];pp$5.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var g=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===types$1$1.dot){var v=this.startNodeAt(g.start,g.loc&&g.loc.start);v.name="new",g.meta=this.finishNode(v,"Identifier"),this.next();var L=this.containsEsc;return g.property=this.parseIdent(!0),"target"!==g.property.name&&this.raiseRecoverable(g.property.start,"The only valid meta property for new is 'new.target'"),L&&this.raiseRecoverable(g.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(g.start,"'new.target' can only be used in functions and class static block"),this.finishNode(g,"MetaProperty")}var R=this.start,W=this.startLoc;return g.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),R,W,!0,!1),"Super"===g.callee.type&&this.raiseRecoverable(R,"Invalid use of 'super'"),this.eat(types$1$1.parenL)?g.arguments=this.parseExprList(types$1$1.parenR,this.options.ecmaVersion>=8,!1):g.arguments=empty,this.finishNode(g,"NewExpression")},pp$5.parseTemplateElement=function(g){var v=g.isTagged,L=this.startNode();return this.type===types$1$1.invalidTemplate?(v||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),L.value={raw:this.value.replace(/\r\n?/g,"\n"),cooked:null}):L.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),L.tail=this.type===types$1$1.backQuote,this.finishNode(L,"TemplateElement")},pp$5.parseTemplate=function(g){void 0===g&&(g={});var v=g.isTagged;void 0===v&&(v=!1);var L=this.startNode();this.next(),L.expressions=[];var R=this.parseTemplateElement({isTagged:v});for(L.quasis=[R];!R.tail;)this.type===types$1$1.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(types$1$1.dollarBraceL),L.expressions.push(this.parseExpression()),this.expect(types$1$1.braceR),L.quasis.push(R=this.parseTemplateElement({isTagged:v}));return this.next(),this.finishNode(L,"TemplateLiteral")},pp$5.isAsyncProp=function(g){return!g.computed&&"Identifier"===g.key.type&&"async"===g.key.name&&(this.type===types$1$1.name||this.type===types$1$1.num||this.type===types$1$1.string||this.type===types$1$1.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===types$1$1.star)&&!lineBreak.test(this.input.slice(this.lastTokEnd,this.start))},pp$5.parseObj=function(g,v){var L=this.startNode(),R=!0,W={};for(L.properties=[],this.next();!this.eat(types$1$1.braceR);){if(R)R=!1;else if(this.expect(types$1$1.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(types$1$1.braceR))break;var ie=this.parseProperty(g,v);g||this.checkPropClash(ie,W,v),L.properties.push(ie)}return this.finishNode(L,g?"ObjectPattern":"ObjectExpression")},pp$5.parseProperty=function(g,v){var L,R,W,ie,ce=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(types$1$1.ellipsis))return g?(ce.argument=this.parseIdent(!1),this.type===types$1$1.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(ce,"RestElement")):(ce.argument=this.parseMaybeAssign(!1,v),this.type===types$1$1.comma&&v&&v.trailingComma<0&&(v.trailingComma=this.start),this.finishNode(ce,"SpreadElement"));this.options.ecmaVersion>=6&&(ce.method=!1,ce.shorthand=!1,(g||v)&&(W=this.start,ie=this.startLoc),g||(L=this.eat(types$1$1.star)));var le=this.containsEsc;return this.parsePropertyName(ce),!g&&!le&&this.options.ecmaVersion>=8&&!L&&this.isAsyncProp(ce)?(R=!0,L=this.options.ecmaVersion>=9&&this.eat(types$1$1.star),this.parsePropertyName(ce)):R=!1,this.parsePropertyValue(ce,g,L,R,W,ie,v,le),this.finishNode(ce,"Property")},pp$5.parseGetterSetter=function(g){var v=g.key.name;this.parsePropertyName(g),g.value=this.parseMethod(!1),g.kind=v;var L="get"===g.kind?0:1;if(g.value.params.length!==L){var R=g.value.start;"get"===g.kind?this.raiseRecoverable(R,"getter should have no params"):this.raiseRecoverable(R,"setter should have exactly one param")}else"set"===g.kind&&"RestElement"===g.value.params[0].type&&this.raiseRecoverable(g.value.params[0].start,"Setter cannot use rest params")},pp$5.parsePropertyValue=function(g,v,L,R,W,ie,ce,le){(L||R)&&this.type===types$1$1.colon&&this.unexpected(),this.eat(types$1$1.colon)?(g.value=v?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,ce),g.kind="init"):this.options.ecmaVersion>=6&&this.type===types$1$1.parenL?(v&&this.unexpected(),g.method=!0,g.value=this.parseMethod(L,R),g.kind="init"):v||le||!(this.options.ecmaVersion>=5)||g.computed||"Identifier"!==g.key.type||"get"!==g.key.name&&"set"!==g.key.name||this.type===types$1$1.comma||this.type===types$1$1.braceR||this.type===types$1$1.eq?this.options.ecmaVersion>=6&&!g.computed&&"Identifier"===g.key.type?((L||R)&&this.unexpected(),this.checkUnreserved(g.key),"await"!==g.key.name||this.awaitIdentPos||(this.awaitIdentPos=W),v?g.value=this.parseMaybeDefault(W,ie,this.copyNode(g.key)):this.type===types$1$1.eq&&ce?(ce.shorthandAssign<0&&(ce.shorthandAssign=this.start),g.value=this.parseMaybeDefault(W,ie,this.copyNode(g.key))):g.value=this.copyNode(g.key),g.kind="init",g.shorthand=!0):this.unexpected():((L||R)&&this.unexpected(),this.parseGetterSetter(g))},pp$5.parsePropertyName=function(g){if(this.options.ecmaVersion>=6){if(this.eat(types$1$1.bracketL))return g.computed=!0,g.key=this.parseMaybeAssign(),this.expect(types$1$1.bracketR),g.key;g.computed=!1}return g.key=this.type===types$1$1.num||this.type===types$1$1.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},pp$5.initFunction=function(g){g.id=null,this.options.ecmaVersion>=6&&(g.generator=g.expression=!1),this.options.ecmaVersion>=8&&(g.async=!1)},pp$5.parseMethod=function(g,v,L){var R=this.startNode(),W=this.yieldPos,ie=this.awaitPos,ce=this.awaitIdentPos;return this.initFunction(R),this.options.ecmaVersion>=6&&(R.generator=g),this.options.ecmaVersion>=8&&(R.async=!!v),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(functionFlags(v,R.generator)|SCOPE_SUPER|(L?SCOPE_DIRECT_SUPER:0)),this.expect(types$1$1.parenL),R.params=this.parseBindingList(types$1$1.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(R,!1,!0,!1),this.yieldPos=W,this.awaitPos=ie,this.awaitIdentPos=ce,this.finishNode(R,"FunctionExpression")},pp$5.parseArrowExpression=function(g,v,L,R){var W=this.yieldPos,ie=this.awaitPos,ce=this.awaitIdentPos;return this.enterScope(functionFlags(L,!1)|SCOPE_ARROW),this.initFunction(g),this.options.ecmaVersion>=8&&(g.async=!!L),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,g.params=this.toAssignableList(v,!0),this.parseFunctionBody(g,!0,!1,R),this.yieldPos=W,this.awaitPos=ie,this.awaitIdentPos=ce,this.finishNode(g,"ArrowFunctionExpression")},pp$5.parseFunctionBody=function(g,v,L,R){var W=v&&this.type!==types$1$1.braceL,ie=this.strict,ce=!1;if(W)g.body=this.parseMaybeAssign(R),g.expression=!0,this.checkParams(g,!1);else{var le=this.options.ecmaVersion>=7&&!this.isSimpleParamList(g.params);ie&&!le||(ce=this.strictDirective(this.end))&&le&&this.raiseRecoverable(g.start,"Illegal 'use strict' directive in function with non-simple parameter list");var ue=this.labels;this.labels=[],ce&&(this.strict=!0),this.checkParams(g,!ie&&!ce&&!v&&!L&&this.isSimpleParamList(g.params)),this.strict&&g.id&&this.checkLValSimple(g.id,BIND_OUTSIDE),g.body=this.parseBlock(!1,void 0,ce&&!ie),g.expression=!1,this.adaptDirectivePrologue(g.body.body),this.labels=ue}this.exitScope()},pp$5.isSimpleParamList=function(g){for(var v=0,L=g;v<L.length;v+=1){if("Identifier"!==L[v].type)return!1}return!0},pp$5.checkParams=function(g,v){for(var L=Object.create(null),R=0,W=g.params;R<W.length;R+=1){var ie=W[R];this.checkLValInnerPattern(ie,BIND_VAR,v?null:L)}},pp$5.parseExprList=function(g,v,L,R){for(var W=[],ie=!0;!this.eat(g);){if(ie)ie=!1;else if(this.expect(types$1$1.comma),v&&this.afterTrailingComma(g))break;var ce=void 0;L&&this.type===types$1$1.comma?ce=null:this.type===types$1$1.ellipsis?(ce=this.parseSpread(R),R&&this.type===types$1$1.comma&&R.trailingComma<0&&(R.trailingComma=this.start)):ce=this.parseMaybeAssign(!1,R),W.push(ce)}return W},pp$5.checkUnreserved=function(g){var v=g.start,L=g.end,R=g.name;(this.inGenerator&&"yield"===R&&this.raiseRecoverable(v,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&"await"===R&&this.raiseRecoverable(v,"Cannot use 'await' as identifier inside an async function"),this.currentThisScope().flags&SCOPE_VAR||"arguments"!==R||this.raiseRecoverable(v,"Cannot use 'arguments' in class field initializer"),!this.inClassStaticBlock||"arguments"!==R&&"await"!==R||this.raise(v,"Cannot use "+R+" in class static initialization block"),this.keywords.test(R)&&this.raise(v,"Unexpected keyword '"+R+"'"),this.options.ecmaVersion<6&&-1!==this.input.slice(v,L).indexOf("\\"))||(this.strict?this.reservedWordsStrict:this.reservedWords).test(R)&&(this.inAsync||"await"!==R||this.raiseRecoverable(v,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(v,"The keyword '"+R+"' is reserved"))},pp$5.parseIdent=function(g){var v=this.parseIdentNode();return this.next(!!g),this.finishNode(v,"Identifier"),g||(this.checkUnreserved(v),"await"!==v.name||this.awaitIdentPos||(this.awaitIdentPos=v.start)),v},pp$5.parseIdentNode=function(){var g=this.startNode();return this.type===types$1$1.name?g.name=this.value:this.type.keyword?(g.name=this.type.keyword,"class"!==g.name&&"function"!==g.name||this.lastTokEnd===this.lastTokStart+1&&46===this.input.charCodeAt(this.lastTokStart)||this.context.pop(),this.type=types$1$1.name):this.unexpected(),g},pp$5.parsePrivateIdent=function(){var g=this.startNode();return this.type===types$1$1.privateId?g.name=this.value:this.unexpected(),this.next(),this.finishNode(g,"PrivateIdentifier"),this.options.checkPrivateFields&&(0===this.privateNameStack.length?this.raise(g.start,"Private field '#"+g.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(g)),g},pp$5.parseYield=function(g){this.yieldPos||(this.yieldPos=this.start);var v=this.startNode();return this.next(),this.type===types$1$1.semi||this.canInsertSemicolon()||this.type!==types$1$1.star&&!this.type.startsExpr?(v.delegate=!1,v.argument=null):(v.delegate=this.eat(types$1$1.star),v.argument=this.parseMaybeAssign(g)),this.finishNode(v,"YieldExpression")},pp$5.parseAwait=function(g){this.awaitPos||(this.awaitPos=this.start);var v=this.startNode();return this.next(),v.argument=this.parseMaybeUnary(null,!0,!1,g),this.finishNode(v,"AwaitExpression")};var pp$4=Parser.prototype;pp$4.raise=function(g,v){var L=getLineInfo(this.input,g);v+=" ("+L.line+":"+L.column+")",this.sourceFile&&(v+=" in "+this.sourceFile);var R=new SyntaxError(v);throw R.pos=g,R.loc=L,R.raisedAt=this.pos,R},pp$4.raiseRecoverable=pp$4.raise,pp$4.curPosition=function(){if(this.options.locations)return new Position(this.curLine,this.pos-this.lineStart)};var pp$3=Parser.prototype,Scope=function Scope(g){this.flags=g,this.var=[],this.lexical=[],this.functions=[]};pp$3.enterScope=function(g){this.scopeStack.push(new Scope(g))},pp$3.exitScope=function(){this.scopeStack.pop()},pp$3.treatFunctionsAsVarInScope=function(g){return g.flags&SCOPE_FUNCTION||!this.inModule&&g.flags&SCOPE_TOP},pp$3.declareName=function(g,v,L){var R=!1;if(v===BIND_LEXICAL){var W=this.currentScope();R=W.lexical.indexOf(g)>-1||W.functions.indexOf(g)>-1||W.var.indexOf(g)>-1,W.lexical.push(g),this.inModule&&W.flags&SCOPE_TOP&&delete this.undefinedExports[g]}else if(v===BIND_SIMPLE_CATCH){this.currentScope().lexical.push(g)}else if(v===BIND_FUNCTION){var ie=this.currentScope();R=this.treatFunctionsAsVar?ie.lexical.indexOf(g)>-1:ie.lexical.indexOf(g)>-1||ie.var.indexOf(g)>-1,ie.functions.push(g)}else for(var ce=this.scopeStack.length-1;ce>=0;--ce){var le=this.scopeStack[ce];if(le.lexical.indexOf(g)>-1&&!(le.flags&SCOPE_SIMPLE_CATCH&&le.lexical[0]===g)||!this.treatFunctionsAsVarInScope(le)&&le.functions.indexOf(g)>-1){R=!0;break}if(le.var.push(g),this.inModule&&le.flags&SCOPE_TOP&&delete this.undefinedExports[g],le.flags&SCOPE_VAR)break}R&&this.raiseRecoverable(L,"Identifier '"+g+"' has already been declared")},pp$3.checkLocalExport=function(g){-1===this.scopeStack[0].lexical.indexOf(g.name)&&-1===this.scopeStack[0].var.indexOf(g.name)&&(this.undefinedExports[g.name]=g)},pp$3.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},pp$3.currentVarScope=function(){for(var g=this.scopeStack.length-1;;g--){var v=this.scopeStack[g];if(v.flags&(SCOPE_VAR|SCOPE_CLASS_FIELD_INIT|SCOPE_CLASS_STATIC_BLOCK))return v}},pp$3.currentThisScope=function(){for(var g=this.scopeStack.length-1;;g--){var v=this.scopeStack[g];if(v.flags&(SCOPE_VAR|SCOPE_CLASS_FIELD_INIT|SCOPE_CLASS_STATIC_BLOCK)&&!(v.flags&SCOPE_ARROW))return v}};var Node$1=function Node(g,v,L){this.type="",this.start=v,this.end=0,g.options.locations&&(this.loc=new SourceLocation(g,L)),g.options.directSourceFile&&(this.sourceFile=g.options.directSourceFile),g.options.ranges&&(this.range=[v,0])},pp$2=Parser.prototype;function finishNodeAt(g,v,L,R){return g.type=v,g.end=L,this.options.locations&&(g.loc.end=R),this.options.ranges&&(g.range[1]=L),g}pp$2.startNode=function(){return new Node$1(this,this.start,this.startLoc)},pp$2.startNodeAt=function(g,v){return new Node$1(this,g,v)},pp$2.finishNode=function(g,v){return finishNodeAt.call(this,g,v,this.lastTokEnd,this.lastTokEndLoc)},pp$2.finishNodeAt=function(g,v,L,R){return finishNodeAt.call(this,g,v,L,R)},pp$2.copyNode=function(g){var v=new Node$1(this,g.start,this.startLoc);for(var L in g)v[L]=g[L];return v};var scriptValuesAddedInUnicode="Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz",ecma9BinaryProperties="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",ecma10BinaryProperties=ecma9BinaryProperties+" Extended_Pictographic",ecma11BinaryProperties=ecma10BinaryProperties,ecma12BinaryProperties=ecma11BinaryProperties+" EBase EComp EMod EPres ExtPict",ecma13BinaryProperties=ecma12BinaryProperties,ecma14BinaryProperties=ecma13BinaryProperties,unicodeBinaryProperties={9:ecma9BinaryProperties,10:ecma10BinaryProperties,11:ecma11BinaryProperties,12:ecma12BinaryProperties,13:ecma13BinaryProperties,14:ecma14BinaryProperties},ecma14BinaryPropertiesOfStrings="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",unicodeBinaryPropertiesOfStrings={9:"",10:"",11:"",12:"",13:"",14:ecma14BinaryPropertiesOfStrings},unicodeGeneralCategoryValues="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",ecma9ScriptValues="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",ecma10ScriptValues=ecma9ScriptValues+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",ecma11ScriptValues=ecma10ScriptValues+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",ecma12ScriptValues=ecma11ScriptValues+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",ecma13ScriptValues=ecma12ScriptValues+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",ecma14ScriptValues=ecma13ScriptValues+" "+scriptValuesAddedInUnicode,unicodeScriptValues={9:ecma9ScriptValues,10:ecma10ScriptValues,11:ecma11ScriptValues,12:ecma12ScriptValues,13:ecma13ScriptValues,14:ecma14ScriptValues},data={};function buildUnicodeData(g){var v=data[g]={binary:wordsRegexp(unicodeBinaryProperties[g]+" "+unicodeGeneralCategoryValues),binaryOfStrings:wordsRegexp(unicodeBinaryPropertiesOfStrings[g]),nonBinary:{General_Category:wordsRegexp(unicodeGeneralCategoryValues),Script:wordsRegexp(unicodeScriptValues[g])}};v.nonBinary.Script_Extensions=v.nonBinary.Script,v.nonBinary.gc=v.nonBinary.General_Category,v.nonBinary.sc=v.nonBinary.Script,v.nonBinary.scx=v.nonBinary.Script_Extensions}for(var i=0,list=[9,10,11,12,13,14];i<list.length;i+=1){var ecmaVersion=list[i];buildUnicodeData(ecmaVersion)}var pp$1=Parser.prototype,BranchID=function BranchID(g,v){this.parent=g,this.base=v||this};BranchID.prototype.separatedFrom=function separatedFrom(g){for(var v=this;v;v=v.parent)for(var L=g;L;L=L.parent)if(v.base===L.base&&v!==L)return!0;return!1},BranchID.prototype.sibling=function sibling(){return new BranchID(this.parent,this.base)};var RegExpValidationState=function RegExpValidationState(g){this.parser=g,this.validFlags="gim"+(g.options.ecmaVersion>=6?"uy":"")+(g.options.ecmaVersion>=9?"s":"")+(g.options.ecmaVersion>=13?"d":"")+(g.options.ecmaVersion>=15?"v":""),this.unicodeProperties=data[g.options.ecmaVersion>=14?14:g.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};function hasProp(g){for(var v in g)return!0;return!1}function isRegularExpressionModifier(g){return 105===g||109===g||115===g}function isSyntaxCharacter(g){return 36===g||g>=40&&g<=43||46===g||63===g||g>=91&&g<=94||g>=123&&g<=125}function isRegExpIdentifierStart(g){return isIdentifierStart(g,!0)||36===g||95===g}function isRegExpIdentifierPart(g){return isIdentifierChar(g,!0)||36===g||95===g||8204===g||8205===g}function isControlLetter(g){return g>=65&&g<=90||g>=97&&g<=122}function isValidUnicode(g){return g>=0&&g<=1114111}RegExpValidationState.prototype.reset=function reset(g,v,L){var R=-1!==L.indexOf("v"),W=-1!==L.indexOf("u");this.start=0|g,this.source=v+"",this.flags=L,R&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=W&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=W&&this.parser.options.ecmaVersion>=9)},RegExpValidationState.prototype.raise=function raise(g){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+g)},RegExpValidationState.prototype.at=function at(g,v){void 0===v&&(v=!1);var L=this.source,R=L.length;if(g>=R)return-1;var W=L.charCodeAt(g);if(!v&&!this.switchU||W<=55295||W>=57344||g+1>=R)return W;var ie=L.charCodeAt(g+1);return ie>=56320&&ie<=57343?(W<<10)+ie-56613888:W},RegExpValidationState.prototype.nextIndex=function nextIndex(g,v){void 0===v&&(v=!1);var L=this.source,R=L.length;if(g>=R)return R;var W,ie=L.charCodeAt(g);return!v&&!this.switchU||ie<=55295||ie>=57344||g+1>=R||(W=L.charCodeAt(g+1))<56320||W>57343?g+1:g+2},RegExpValidationState.prototype.current=function current(g){return void 0===g&&(g=!1),this.at(this.pos,g)},RegExpValidationState.prototype.lookahead=function lookahead(g){return void 0===g&&(g=!1),this.at(this.nextIndex(this.pos,g),g)},RegExpValidationState.prototype.advance=function advance(g){void 0===g&&(g=!1),this.pos=this.nextIndex(this.pos,g)},RegExpValidationState.prototype.eat=function eat(g,v){return void 0===v&&(v=!1),this.current(v)===g&&(this.advance(v),!0)},RegExpValidationState.prototype.eatChars=function eatChars(g,v){void 0===v&&(v=!1);for(var L=this.pos,R=0,W=g;R<W.length;R+=1){var ie=W[R],ce=this.at(L,v);if(-1===ce||ce!==ie)return!1;L=this.nextIndex(L,v)}return this.pos=L,!0},pp$1.validateRegExpFlags=function(g){for(var v=g.validFlags,L=g.flags,R=!1,W=!1,ie=0;ie<L.length;ie++){var ce=L.charAt(ie);-1===v.indexOf(ce)&&this.raise(g.start,"Invalid regular expression flag"),L.indexOf(ce,ie+1)>-1&&this.raise(g.start,"Duplicate regular expression flag"),"u"===ce&&(R=!0),"v"===ce&&(W=!0)}this.options.ecmaVersion>=15&&R&&W&&this.raise(g.start,"Invalid regular expression flag")},pp$1.validateRegExpPattern=function(g){this.regexp_pattern(g),!g.switchN&&this.options.ecmaVersion>=9&&hasProp(g.groupNames)&&(g.switchN=!0,this.regexp_pattern(g))},pp$1.regexp_pattern=function(g){g.pos=0,g.lastIntValue=0,g.lastStringValue="",g.lastAssertionIsQuantifiable=!1,g.numCapturingParens=0,g.maxBackReference=0,g.groupNames=Object.create(null),g.backReferenceNames.length=0,g.branchID=null,this.regexp_disjunction(g),g.pos!==g.source.length&&(g.eat(41)&&g.raise("Unmatched ')'"),(g.eat(93)||g.eat(125))&&g.raise("Lone quantifier brackets")),g.maxBackReference>g.numCapturingParens&&g.raise("Invalid escape");for(var v=0,L=g.backReferenceNames;v<L.length;v+=1){var R=L[v];g.groupNames[R]||g.raise("Invalid named capture referenced")}},pp$1.regexp_disjunction=function(g){var v=this.options.ecmaVersion>=16;for(v&&(g.branchID=new BranchID(g.branchID,null)),this.regexp_alternative(g);g.eat(124);)v&&(g.branchID=g.branchID.sibling()),this.regexp_alternative(g);v&&(g.branchID=g.branchID.parent),this.regexp_eatQuantifier(g,!0)&&g.raise("Nothing to repeat"),g.eat(123)&&g.raise("Lone quantifier brackets")},pp$1.regexp_alternative=function(g){for(;g.pos<g.source.length&&this.regexp_eatTerm(g););},pp$1.regexp_eatTerm=function(g){return this.regexp_eatAssertion(g)?(g.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(g)&&g.switchU&&g.raise("Invalid quantifier"),!0):!!(g.switchU?this.regexp_eatAtom(g):this.regexp_eatExtendedAtom(g))&&(this.regexp_eatQuantifier(g),!0)},pp$1.regexp_eatAssertion=function(g){var v=g.pos;if(g.lastAssertionIsQuantifiable=!1,g.eat(94)||g.eat(36))return!0;if(g.eat(92)){if(g.eat(66)||g.eat(98))return!0;g.pos=v}if(g.eat(40)&&g.eat(63)){var L=!1;if(this.options.ecmaVersion>=9&&(L=g.eat(60)),g.eat(61)||g.eat(33))return this.regexp_disjunction(g),g.eat(41)||g.raise("Unterminated group"),g.lastAssertionIsQuantifiable=!L,!0}return g.pos=v,!1},pp$1.regexp_eatQuantifier=function(g,v){return void 0===v&&(v=!1),!!this.regexp_eatQuantifierPrefix(g,v)&&(g.eat(63),!0)},pp$1.regexp_eatQuantifierPrefix=function(g,v){return g.eat(42)||g.eat(43)||g.eat(63)||this.regexp_eatBracedQuantifier(g,v)},pp$1.regexp_eatBracedQuantifier=function(g,v){var L=g.pos;if(g.eat(123)){var R=0,W=-1;if(this.regexp_eatDecimalDigits(g)&&(R=g.lastIntValue,g.eat(44)&&this.regexp_eatDecimalDigits(g)&&(W=g.lastIntValue),g.eat(125)))return-1!==W&&W<R&&!v&&g.raise("numbers out of order in {} quantifier"),!0;g.switchU&&!v&&g.raise("Incomplete quantifier"),g.pos=L}return!1},pp$1.regexp_eatAtom=function(g){return this.regexp_eatPatternCharacters(g)||g.eat(46)||this.regexp_eatReverseSolidusAtomEscape(g)||this.regexp_eatCharacterClass(g)||this.regexp_eatUncapturingGroup(g)||this.regexp_eatCapturingGroup(g)},pp$1.regexp_eatReverseSolidusAtomEscape=function(g){var v=g.pos;if(g.eat(92)){if(this.regexp_eatAtomEscape(g))return!0;g.pos=v}return!1},pp$1.regexp_eatUncapturingGroup=function(g){var v=g.pos;if(g.eat(40)){if(g.eat(63)){if(this.options.ecmaVersion>=16){var L=this.regexp_eatModifiers(g),R=g.eat(45);if(L||R){for(var W=0;W<L.length;W++){var ie=L.charAt(W);L.indexOf(ie,W+1)>-1&&g.raise("Duplicate regular expression modifiers")}if(R){var ce=this.regexp_eatModifiers(g);L||ce||58!==g.current()||g.raise("Invalid regular expression modifiers");for(var le=0;le<ce.length;le++){var ue=ce.charAt(le);(ce.indexOf(ue,le+1)>-1||L.indexOf(ue)>-1)&&g.raise("Duplicate regular expression modifiers")}}}}if(g.eat(58)){if(this.regexp_disjunction(g),g.eat(41))return!0;g.raise("Unterminated group")}}g.pos=v}return!1},pp$1.regexp_eatCapturingGroup=function(g){if(g.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(g):63===g.current()&&g.raise("Invalid group"),this.regexp_disjunction(g),g.eat(41))return g.numCapturingParens+=1,!0;g.raise("Unterminated group")}return!1},pp$1.regexp_eatModifiers=function(g){for(var v="",L=0;-1!==(L=g.current())&&isRegularExpressionModifier(L);)v+=codePointToString(L),g.advance();return v},pp$1.regexp_eatExtendedAtom=function(g){return g.eat(46)||this.regexp_eatReverseSolidusAtomEscape(g)||this.regexp_eatCharacterClass(g)||this.regexp_eatUncapturingGroup(g)||this.regexp_eatCapturingGroup(g)||this.regexp_eatInvalidBracedQuantifier(g)||this.regexp_eatExtendedPatternCharacter(g)},pp$1.regexp_eatInvalidBracedQuantifier=function(g){return this.regexp_eatBracedQuantifier(g,!0)&&g.raise("Nothing to repeat"),!1},pp$1.regexp_eatSyntaxCharacter=function(g){var v=g.current();return!!isSyntaxCharacter(v)&&(g.lastIntValue=v,g.advance(),!0)},pp$1.regexp_eatPatternCharacters=function(g){for(var v=g.pos,L=0;-1!==(L=g.current())&&!isSyntaxCharacter(L);)g.advance();return g.pos!==v},pp$1.regexp_eatExtendedPatternCharacter=function(g){var v=g.current();return!(-1===v||36===v||v>=40&&v<=43||46===v||63===v||91===v||94===v||124===v)&&(g.advance(),!0)},pp$1.regexp_groupSpecifier=function(g){if(g.eat(63)){this.regexp_eatGroupName(g)||g.raise("Invalid group");var v=this.options.ecmaVersion>=16,L=g.groupNames[g.lastStringValue];if(L)if(v)for(var R=0,W=L;R<W.length;R+=1){W[R].separatedFrom(g.branchID)||g.raise("Duplicate capture group name")}else g.raise("Duplicate capture group name");v?(L||(g.groupNames[g.lastStringValue]=[])).push(g.branchID):g.groupNames[g.lastStringValue]=!0}},pp$1.regexp_eatGroupName=function(g){if(g.lastStringValue="",g.eat(60)){if(this.regexp_eatRegExpIdentifierName(g)&&g.eat(62))return!0;g.raise("Invalid capture group name")}return!1},pp$1.regexp_eatRegExpIdentifierName=function(g){if(g.lastStringValue="",this.regexp_eatRegExpIdentifierStart(g)){for(g.lastStringValue+=codePointToString(g.lastIntValue);this.regexp_eatRegExpIdentifierPart(g);)g.lastStringValue+=codePointToString(g.lastIntValue);return!0}return!1},pp$1.regexp_eatRegExpIdentifierStart=function(g){var v=g.pos,L=this.options.ecmaVersion>=11,R=g.current(L);return g.advance(L),92===R&&this.regexp_eatRegExpUnicodeEscapeSequence(g,L)&&(R=g.lastIntValue),isRegExpIdentifierStart(R)?(g.lastIntValue=R,!0):(g.pos=v,!1)},pp$1.regexp_eatRegExpIdentifierPart=function(g){var v=g.pos,L=this.options.ecmaVersion>=11,R=g.current(L);return g.advance(L),92===R&&this.regexp_eatRegExpUnicodeEscapeSequence(g,L)&&(R=g.lastIntValue),isRegExpIdentifierPart(R)?(g.lastIntValue=R,!0):(g.pos=v,!1)},pp$1.regexp_eatAtomEscape=function(g){return!!(this.regexp_eatBackReference(g)||this.regexp_eatCharacterClassEscape(g)||this.regexp_eatCharacterEscape(g)||g.switchN&&this.regexp_eatKGroupName(g))||(g.switchU&&(99===g.current()&&g.raise("Invalid unicode escape"),g.raise("Invalid escape")),!1)},pp$1.regexp_eatBackReference=function(g){var v=g.pos;if(this.regexp_eatDecimalEscape(g)){var L=g.lastIntValue;if(g.switchU)return L>g.maxBackReference&&(g.maxBackReference=L),!0;if(L<=g.numCapturingParens)return!0;g.pos=v}return!1},pp$1.regexp_eatKGroupName=function(g){if(g.eat(107)){if(this.regexp_eatGroupName(g))return g.backReferenceNames.push(g.lastStringValue),!0;g.raise("Invalid named reference")}return!1},pp$1.regexp_eatCharacterEscape=function(g){return this.regexp_eatControlEscape(g)||this.regexp_eatCControlLetter(g)||this.regexp_eatZero(g)||this.regexp_eatHexEscapeSequence(g)||this.regexp_eatRegExpUnicodeEscapeSequence(g,!1)||!g.switchU&&this.regexp_eatLegacyOctalEscapeSequence(g)||this.regexp_eatIdentityEscape(g)},pp$1.regexp_eatCControlLetter=function(g){var v=g.pos;if(g.eat(99)){if(this.regexp_eatControlLetter(g))return!0;g.pos=v}return!1},pp$1.regexp_eatZero=function(g){return 48===g.current()&&!isDecimalDigit(g.lookahead())&&(g.lastIntValue=0,g.advance(),!0)},pp$1.regexp_eatControlEscape=function(g){var v=g.current();return 116===v?(g.lastIntValue=9,g.advance(),!0):110===v?(g.lastIntValue=10,g.advance(),!0):118===v?(g.lastIntValue=11,g.advance(),!0):102===v?(g.lastIntValue=12,g.advance(),!0):114===v&&(g.lastIntValue=13,g.advance(),!0)},pp$1.regexp_eatControlLetter=function(g){var v=g.current();return!!isControlLetter(v)&&(g.lastIntValue=v%32,g.advance(),!0)},pp$1.regexp_eatRegExpUnicodeEscapeSequence=function(g,v){void 0===v&&(v=!1);var L=g.pos,R=v||g.switchU;if(g.eat(117)){if(this.regexp_eatFixedHexDigits(g,4)){var W=g.lastIntValue;if(R&&W>=55296&&W<=56319){var ie=g.pos;if(g.eat(92)&&g.eat(117)&&this.regexp_eatFixedHexDigits(g,4)){var ce=g.lastIntValue;if(ce>=56320&&ce<=57343)return g.lastIntValue=1024*(W-55296)+(ce-56320)+65536,!0}g.pos=ie,g.lastIntValue=W}return!0}if(R&&g.eat(123)&&this.regexp_eatHexDigits(g)&&g.eat(125)&&isValidUnicode(g.lastIntValue))return!0;R&&g.raise("Invalid unicode escape"),g.pos=L}return!1},pp$1.regexp_eatIdentityEscape=function(g){if(g.switchU)return!!this.regexp_eatSyntaxCharacter(g)||!!g.eat(47)&&(g.lastIntValue=47,!0);var v=g.current();return!(99===v||g.switchN&&107===v)&&(g.lastIntValue=v,g.advance(),!0)},pp$1.regexp_eatDecimalEscape=function(g){g.lastIntValue=0;var v=g.current();if(v>=49&&v<=57){do{g.lastIntValue=10*g.lastIntValue+(v-48),g.advance()}while((v=g.current())>=48&&v<=57);return!0}return!1};var CharSetNone=0,CharSetOk=1,CharSetString=2;function isCharacterClassEscape(g){return 100===g||68===g||115===g||83===g||119===g||87===g}function isUnicodePropertyNameCharacter(g){return isControlLetter(g)||95===g}function isUnicodePropertyValueCharacter(g){return isUnicodePropertyNameCharacter(g)||isDecimalDigit(g)}function isClassSetReservedDoublePunctuatorCharacter(g){return 33===g||g>=35&&g<=38||g>=42&&g<=44||46===g||g>=58&&g<=64||94===g||96===g||126===g}function isClassSetSyntaxCharacter(g){return 40===g||41===g||45===g||47===g||g>=91&&g<=93||g>=123&&g<=125}function isClassSetReservedPunctuator(g){return 33===g||35===g||37===g||38===g||44===g||45===g||g>=58&&g<=62||64===g||96===g||126===g}function isDecimalDigit(g){return g>=48&&g<=57}function isHexDigit(g){return g>=48&&g<=57||g>=65&&g<=70||g>=97&&g<=102}function hexToInt(g){return g>=65&&g<=70?g-65+10:g>=97&&g<=102?g-97+10:g-48}function isOctalDigit(g){return g>=48&&g<=55}pp$1.regexp_eatCharacterClassEscape=function(g){var v=g.current();if(isCharacterClassEscape(v))return g.lastIntValue=-1,g.advance(),CharSetOk;var L=!1;if(g.switchU&&this.options.ecmaVersion>=9&&((L=80===v)||112===v)){var R;if(g.lastIntValue=-1,g.advance(),g.eat(123)&&(R=this.regexp_eatUnicodePropertyValueExpression(g))&&g.eat(125))return L&&R===CharSetString&&g.raise("Invalid property name"),R;g.raise("Invalid property name")}return CharSetNone},pp$1.regexp_eatUnicodePropertyValueExpression=function(g){var v=g.pos;if(this.regexp_eatUnicodePropertyName(g)&&g.eat(61)){var L=g.lastStringValue;if(this.regexp_eatUnicodePropertyValue(g)){var R=g.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(g,L,R),CharSetOk}}if(g.pos=v,this.regexp_eatLoneUnicodePropertyNameOrValue(g)){var W=g.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(g,W)}return CharSetNone},pp$1.regexp_validateUnicodePropertyNameAndValue=function(g,v,L){hasOwn(g.unicodeProperties.nonBinary,v)||g.raise("Invalid property name"),g.unicodeProperties.nonBinary[v].test(L)||g.raise("Invalid property value")},pp$1.regexp_validateUnicodePropertyNameOrValue=function(g,v){return g.unicodeProperties.binary.test(v)?CharSetOk:g.switchV&&g.unicodeProperties.binaryOfStrings.test(v)?CharSetString:void g.raise("Invalid property name")},pp$1.regexp_eatUnicodePropertyName=function(g){var v=0;for(g.lastStringValue="";isUnicodePropertyNameCharacter(v=g.current());)g.lastStringValue+=codePointToString(v),g.advance();return""!==g.lastStringValue},pp$1.regexp_eatUnicodePropertyValue=function(g){var v=0;for(g.lastStringValue="";isUnicodePropertyValueCharacter(v=g.current());)g.lastStringValue+=codePointToString(v),g.advance();return""!==g.lastStringValue},pp$1.regexp_eatLoneUnicodePropertyNameOrValue=function(g){return this.regexp_eatUnicodePropertyValue(g)},pp$1.regexp_eatCharacterClass=function(g){if(g.eat(91)){var v=g.eat(94),L=this.regexp_classContents(g);return g.eat(93)||g.raise("Unterminated character class"),v&&L===CharSetString&&g.raise("Negated character class may contain strings"),!0}return!1},pp$1.regexp_classContents=function(g){return 93===g.current()?CharSetOk:g.switchV?this.regexp_classSetExpression(g):(this.regexp_nonEmptyClassRanges(g),CharSetOk)},pp$1.regexp_nonEmptyClassRanges=function(g){for(;this.regexp_eatClassAtom(g);){var v=g.lastIntValue;if(g.eat(45)&&this.regexp_eatClassAtom(g)){var L=g.lastIntValue;!g.switchU||-1!==v&&-1!==L||g.raise("Invalid character class"),-1!==v&&-1!==L&&v>L&&g.raise("Range out of order in character class")}}},pp$1.regexp_eatClassAtom=function(g){var v=g.pos;if(g.eat(92)){if(this.regexp_eatClassEscape(g))return!0;if(g.switchU){var L=g.current();(99===L||isOctalDigit(L))&&g.raise("Invalid class escape"),g.raise("Invalid escape")}g.pos=v}var R=g.current();return 93!==R&&(g.lastIntValue=R,g.advance(),!0)},pp$1.regexp_eatClassEscape=function(g){var v=g.pos;if(g.eat(98))return g.lastIntValue=8,!0;if(g.switchU&&g.eat(45))return g.lastIntValue=45,!0;if(!g.switchU&&g.eat(99)){if(this.regexp_eatClassControlLetter(g))return!0;g.pos=v}return this.regexp_eatCharacterClassEscape(g)||this.regexp_eatCharacterEscape(g)},pp$1.regexp_classSetExpression=function(g){var v,L=CharSetOk;if(this.regexp_eatClassSetRange(g));else if(v=this.regexp_eatClassSetOperand(g)){v===CharSetString&&(L=CharSetString);for(var R=g.pos;g.eatChars([38,38]);)38!==g.current()&&(v=this.regexp_eatClassSetOperand(g))?v!==CharSetString&&(L=CharSetOk):g.raise("Invalid character in character class");if(R!==g.pos)return L;for(;g.eatChars([45,45]);)this.regexp_eatClassSetOperand(g)||g.raise("Invalid character in character class");if(R!==g.pos)return L}else g.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(g)){if(!(v=this.regexp_eatClassSetOperand(g)))return L;v===CharSetString&&(L=CharSetString)}},pp$1.regexp_eatClassSetRange=function(g){var v=g.pos;if(this.regexp_eatClassSetCharacter(g)){var L=g.lastIntValue;if(g.eat(45)&&this.regexp_eatClassSetCharacter(g)){var R=g.lastIntValue;return-1!==L&&-1!==R&&L>R&&g.raise("Range out of order in character class"),!0}g.pos=v}return!1},pp$1.regexp_eatClassSetOperand=function(g){return this.regexp_eatClassSetCharacter(g)?CharSetOk:this.regexp_eatClassStringDisjunction(g)||this.regexp_eatNestedClass(g)},pp$1.regexp_eatNestedClass=function(g){var v=g.pos;if(g.eat(91)){var L=g.eat(94),R=this.regexp_classContents(g);if(g.eat(93))return L&&R===CharSetString&&g.raise("Negated character class may contain strings"),R;g.pos=v}if(g.eat(92)){var W=this.regexp_eatCharacterClassEscape(g);if(W)return W;g.pos=v}return null},pp$1.regexp_eatClassStringDisjunction=function(g){var v=g.pos;if(g.eatChars([92,113])){if(g.eat(123)){var L=this.regexp_classStringDisjunctionContents(g);if(g.eat(125))return L}else g.raise("Invalid escape");g.pos=v}return null},pp$1.regexp_classStringDisjunctionContents=function(g){for(var v=this.regexp_classString(g);g.eat(124);)this.regexp_classString(g)===CharSetString&&(v=CharSetString);return v},pp$1.regexp_classString=function(g){for(var v=0;this.regexp_eatClassSetCharacter(g);)v++;return 1===v?CharSetOk:CharSetString},pp$1.regexp_eatClassSetCharacter=function(g){var v=g.pos;if(g.eat(92))return!(!this.regexp_eatCharacterEscape(g)&&!this.regexp_eatClassSetReservedPunctuator(g))||(g.eat(98)?(g.lastIntValue=8,!0):(g.pos=v,!1));var L=g.current();return!(L<0||L===g.lookahead()&&isClassSetReservedDoublePunctuatorCharacter(L))&&(!isClassSetSyntaxCharacter(L)&&(g.advance(),g.lastIntValue=L,!0))},pp$1.regexp_eatClassSetReservedPunctuator=function(g){var v=g.current();return!!isClassSetReservedPunctuator(v)&&(g.lastIntValue=v,g.advance(),!0)},pp$1.regexp_eatClassControlLetter=function(g){var v=g.current();return!(!isDecimalDigit(v)&&95!==v)&&(g.lastIntValue=v%32,g.advance(),!0)},pp$1.regexp_eatHexEscapeSequence=function(g){var v=g.pos;if(g.eat(120)){if(this.regexp_eatFixedHexDigits(g,2))return!0;g.switchU&&g.raise("Invalid escape"),g.pos=v}return!1},pp$1.regexp_eatDecimalDigits=function(g){var v=g.pos,L=0;for(g.lastIntValue=0;isDecimalDigit(L=g.current());)g.lastIntValue=10*g.lastIntValue+(L-48),g.advance();return g.pos!==v},pp$1.regexp_eatHexDigits=function(g){var v=g.pos,L=0;for(g.lastIntValue=0;isHexDigit(L=g.current());)g.lastIntValue=16*g.lastIntValue+hexToInt(L),g.advance();return g.pos!==v},pp$1.regexp_eatLegacyOctalEscapeSequence=function(g){if(this.regexp_eatOctalDigit(g)){var v=g.lastIntValue;if(this.regexp_eatOctalDigit(g)){var L=g.lastIntValue;v<=3&&this.regexp_eatOctalDigit(g)?g.lastIntValue=64*v+8*L+g.lastIntValue:g.lastIntValue=8*v+L}else g.lastIntValue=v;return!0}return!1},pp$1.regexp_eatOctalDigit=function(g){var v=g.current();return isOctalDigit(v)?(g.lastIntValue=v-48,g.advance(),!0):(g.lastIntValue=0,!1)},pp$1.regexp_eatFixedHexDigits=function(g,v){var L=g.pos;g.lastIntValue=0;for(var R=0;R<v;++R){var W=g.current();if(!isHexDigit(W))return g.pos=L,!1;g.lastIntValue=16*g.lastIntValue+hexToInt(W),g.advance()}return!0};var Token=function Token(g){this.type=g.type,this.value=g.value,this.start=g.start,this.end=g.end,g.options.locations&&(this.loc=new SourceLocation(g,g.startLoc,g.endLoc)),g.options.ranges&&(this.range=[g.start,g.end])},pp=Parser.prototype;function stringToNumber(g,v){return v?parseInt(g,8):parseFloat(g.replace(/_/g,""))}function stringToBigInt(g){return"function"!=typeof BigInt?null:BigInt(g.replace(/_/g,""))}pp.next=function(g){!g&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new Token(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},pp.getToken=function(){return this.next(),new Token(this)},"undefined"!=typeof Symbol&&(pp[Symbol.iterator]=function(){var g=this;return{next:function(){var v=g.getToken();return{done:v.type===types$1$1.eof,value:v}}}}),pp.nextToken=function(){var g=this.curContext();return g&&g.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(types$1$1.eof):g.override?g.override(this):void this.readToken(this.fullCharCodeAtPos())},pp.readToken=function(g){return isIdentifierStart(g,this.options.ecmaVersion>=6)||92===g?this.readWord():this.getTokenFromCode(g)},pp.fullCharCodeAt=function(g){var v=this.input.charCodeAt(g);if(v<=55295||v>=56320)return v;var L=this.input.charCodeAt(g+1);return L<=56319||L>=57344?v:(v<<10)+L-56613888},pp.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)},pp.skipBlockComment=function(){var g=this.options.onComment&&this.curPosition(),v=this.pos,L=this.input.indexOf("*/",this.pos+=2);if(-1===L&&this.raise(this.pos-2,"Unterminated comment"),this.pos=L+2,this.options.locations)for(var R=void 0,W=v;(R=nextLineBreak(this.input,W,this.pos))>-1;)++this.curLine,W=this.lineStart=R;this.options.onComment&&this.options.onComment(!0,this.input.slice(v+2,L),v,this.pos,g,this.curPosition())},pp.skipLineComment=function(g){for(var v=this.pos,L=this.options.onComment&&this.curPosition(),R=this.input.charCodeAt(this.pos+=g);this.pos<this.input.length&&!isNewLine(R);)R=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(v+g,this.pos),v,this.pos,L,this.curPosition())},pp.skipSpace=function(){e:for(;this.pos<this.input.length;){var g=this.input.charCodeAt(this.pos);switch(g){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(!(g>8&&g<14||g>=5760&&nonASCIIwhitespace.test(String.fromCharCode(g))))break e;++this.pos}}},pp.finishToken=function(g,v){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var L=this.type;this.type=g,this.value=v,this.updateContext(L)},pp.readToken_dot=function(){var g=this.input.charCodeAt(this.pos+1);if(g>=48&&g<=57)return this.readNumber(!0);var v=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===g&&46===v?(this.pos+=3,this.finishToken(types$1$1.ellipsis)):(++this.pos,this.finishToken(types$1$1.dot))},pp.readToken_slash=function(){var g=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===g?this.finishOp(types$1$1.assign,2):this.finishOp(types$1$1.slash,1)},pp.readToken_mult_modulo_exp=function(g){var v=this.input.charCodeAt(this.pos+1),L=1,R=42===g?types$1$1.star:types$1$1.modulo;return this.options.ecmaVersion>=7&&42===g&&42===v&&(++L,R=types$1$1.starstar,v=this.input.charCodeAt(this.pos+2)),61===v?this.finishOp(types$1$1.assign,L+1):this.finishOp(R,L)},pp.readToken_pipe_amp=function(g){var v=this.input.charCodeAt(this.pos+1);if(v===g){if(this.options.ecmaVersion>=12)if(61===this.input.charCodeAt(this.pos+2))return this.finishOp(types$1$1.assign,3);return this.finishOp(124===g?types$1$1.logicalOR:types$1$1.logicalAND,2)}return 61===v?this.finishOp(types$1$1.assign,2):this.finishOp(124===g?types$1$1.bitwiseOR:types$1$1.bitwiseAND,1)},pp.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(types$1$1.assign,2):this.finishOp(types$1$1.bitwiseXOR,1)},pp.readToken_plus_min=function(g){var v=this.input.charCodeAt(this.pos+1);return v===g?45!==v||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!lineBreak.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(types$1$1.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===v?this.finishOp(types$1$1.assign,2):this.finishOp(types$1$1.plusMin,1)},pp.readToken_lt_gt=function(g){var v=this.input.charCodeAt(this.pos+1),L=1;return v===g?(L=62===g&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+L)?this.finishOp(types$1$1.assign,L+1):this.finishOp(types$1$1.bitShift,L)):33!==v||60!==g||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===v&&(L=2),this.finishOp(types$1$1.relational,L)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},pp.readToken_eq_excl=function(g){var v=this.input.charCodeAt(this.pos+1);return 61===v?this.finishOp(types$1$1.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===g&&62===v&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(types$1$1.arrow)):this.finishOp(61===g?types$1$1.eq:types$1$1.prefix,1)},pp.readToken_question=function(){var g=this.options.ecmaVersion;if(g>=11){var v=this.input.charCodeAt(this.pos+1);if(46===v){var L=this.input.charCodeAt(this.pos+2);if(L<48||L>57)return this.finishOp(types$1$1.questionDot,2)}if(63===v){if(g>=12)if(61===this.input.charCodeAt(this.pos+2))return this.finishOp(types$1$1.assign,3);return this.finishOp(types$1$1.coalesce,2)}}return this.finishOp(types$1$1.question,1)},pp.readToken_numberSign=function(){var g=35;if(this.options.ecmaVersion>=13&&(++this.pos,isIdentifierStart(g=this.fullCharCodeAtPos(),!0)||92===g))return this.finishToken(types$1$1.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+codePointToString(g)+"'")},pp.getTokenFromCode=function(g){switch(g){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(types$1$1.parenL);case 41:return++this.pos,this.finishToken(types$1$1.parenR);case 59:return++this.pos,this.finishToken(types$1$1.semi);case 44:return++this.pos,this.finishToken(types$1$1.comma);case 91:return++this.pos,this.finishToken(types$1$1.bracketL);case 93:return++this.pos,this.finishToken(types$1$1.bracketR);case 123:return++this.pos,this.finishToken(types$1$1.braceL);case 125:return++this.pos,this.finishToken(types$1$1.braceR);case 58:return++this.pos,this.finishToken(types$1$1.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(types$1$1.backQuote);case 48:var v=this.input.charCodeAt(this.pos+1);if(120===v||88===v)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===v||79===v)return this.readRadixNumber(8);if(98===v||66===v)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(g);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(g);case 124:case 38:return this.readToken_pipe_amp(g);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(g);case 60:case 62:return this.readToken_lt_gt(g);case 61:case 33:return this.readToken_eq_excl(g);case 63:return this.readToken_question();case 126:return this.finishOp(types$1$1.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+codePointToString(g)+"'")},pp.finishOp=function(g,v){var L=this.input.slice(this.pos,this.pos+v);return this.pos+=v,this.finishToken(g,L)},pp.readRegexp=function(){for(var g,v,L=this.pos;;){this.pos>=this.input.length&&this.raise(L,"Unterminated regular expression");var R=this.input.charAt(this.pos);if(lineBreak.test(R)&&this.raise(L,"Unterminated regular expression"),g)g=!1;else{if("["===R)v=!0;else if("]"===R&&v)v=!1;else if("/"===R&&!v)break;g="\\"===R}++this.pos}var W=this.input.slice(L,this.pos);++this.pos;var ie=this.pos,ce=this.readWord1();this.containsEsc&&this.unexpected(ie);var le=this.regexpState||(this.regexpState=new RegExpValidationState(this));le.reset(L,W,ce),this.validateRegExpFlags(le),this.validateRegExpPattern(le);var ue=null;try{ue=new RegExp(W,ce)}catch(g){}return this.finishToken(types$1$1.regexp,{pattern:W,flags:ce,value:ue})},pp.readInt=function(g,v,L){for(var R=this.options.ecmaVersion>=12&&void 0===v,W=L&&48===this.input.charCodeAt(this.pos),ie=this.pos,ce=0,le=0,ue=0,me=null==v?1/0:v;ue<me;++ue,++this.pos){var ge=this.input.charCodeAt(this.pos),ve=void 0;if(R&&95===ge)W&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),95===le&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),0===ue&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),le=ge;else{if((ve=ge>=97?ge-97+10:ge>=65?ge-65+10:ge>=48&&ge<=57?ge-48:1/0)>=g)break;le=ge,ce=ce*g+ve}}return R&&95===le&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===ie||null!=v&&this.pos-ie!==v?null:ce},pp.readRadixNumber=function(g){var v=this.pos;this.pos+=2;var L=this.readInt(g);return null==L&&this.raise(this.start+2,"Expected number in radix "+g),this.options.ecmaVersion>=11&&110===this.input.charCodeAt(this.pos)?(L=stringToBigInt(this.input.slice(v,this.pos)),++this.pos):isIdentifierStart(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(types$1$1.num,L)},pp.readNumber=function(g){var v=this.pos;g||null!==this.readInt(10,void 0,!0)||this.raise(v,"Invalid number");var L=this.pos-v>=2&&48===this.input.charCodeAt(v);L&&this.strict&&this.raise(v,"Invalid number");var R=this.input.charCodeAt(this.pos);if(!L&&!g&&this.options.ecmaVersion>=11&&110===R){var W=stringToBigInt(this.input.slice(v,this.pos));return++this.pos,isIdentifierStart(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(types$1$1.num,W)}L&&/[89]/.test(this.input.slice(v,this.pos))&&(L=!1),46!==R||L||(++this.pos,this.readInt(10),R=this.input.charCodeAt(this.pos)),69!==R&&101!==R||L||(43!==(R=this.input.charCodeAt(++this.pos))&&45!==R||++this.pos,null===this.readInt(10)&&this.raise(v,"Invalid number")),isIdentifierStart(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var ie=stringToNumber(this.input.slice(v,this.pos),L);return this.finishToken(types$1$1.num,ie)},pp.readCodePoint=function(){var g;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var v=++this.pos;g=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,g>1114111&&this.invalidStringToken(v,"Code point out of bounds")}else g=this.readHexChar(4);return g},pp.readString=function(g){for(var v="",L=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var R=this.input.charCodeAt(this.pos);if(R===g)break;92===R?(v+=this.input.slice(L,this.pos),v+=this.readEscapedChar(!1),L=this.pos):8232===R||8233===R?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(isNewLine(R)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return v+=this.input.slice(L,this.pos++),this.finishToken(types$1$1.string,v)};var INVALID_TEMPLATE_ESCAPE_ERROR={};pp.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(g){if(g!==INVALID_TEMPLATE_ESCAPE_ERROR)throw g;this.readInvalidTemplateToken()}this.inTemplateElement=!1},pp.invalidStringToken=function(g,v){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw INVALID_TEMPLATE_ESCAPE_ERROR;this.raise(g,v)},pp.readTmplToken=function(){for(var g="",v=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var L=this.input.charCodeAt(this.pos);if(96===L||36===L&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==types$1$1.template&&this.type!==types$1$1.invalidTemplate?(g+=this.input.slice(v,this.pos),this.finishToken(types$1$1.template,g)):36===L?(this.pos+=2,this.finishToken(types$1$1.dollarBraceL)):(++this.pos,this.finishToken(types$1$1.backQuote));if(92===L)g+=this.input.slice(v,this.pos),g+=this.readEscapedChar(!0),v=this.pos;else if(isNewLine(L)){switch(g+=this.input.slice(v,this.pos),++this.pos,L){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:g+="\n";break;default:g+=String.fromCharCode(L)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),v=this.pos}else++this.pos}},pp.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if("{"!==this.input[this.pos+1])break;case"`":return this.finishToken(types$1$1.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":"\n"===this.input[this.pos+1]&&++this.pos;case"\n":case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1}this.raise(this.start,"Unterminated template")},pp.readEscapedChar=function(g){var v=this.input.charCodeAt(++this.pos);switch(++this.pos,v){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return codePointToString(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),g){var L=this.pos-1;this.invalidStringToken(L,"Invalid escape sequence in template string")}default:if(v>=48&&v<=55){var R=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],W=parseInt(R,8);return W>255&&(R=R.slice(0,-1),W=parseInt(R,8)),this.pos+=R.length-1,v=this.input.charCodeAt(this.pos),"0"===R&&56!==v&&57!==v||!this.strict&&!g||this.invalidStringToken(this.pos-1-R.length,g?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(W)}return isNewLine(v)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(v)}},pp.readHexChar=function(g){var v=this.pos,L=this.readInt(16,g);return null===L&&this.invalidStringToken(v,"Bad character escape sequence"),L},pp.readWord1=function(){this.containsEsc=!1;for(var g="",v=!0,L=this.pos,R=this.options.ecmaVersion>=6;this.pos<this.input.length;){var W=this.fullCharCodeAtPos();if(isIdentifierChar(W,R))this.pos+=W<=65535?1:2;else{if(92!==W)break;this.containsEsc=!0,g+=this.input.slice(L,this.pos);var ie=this.pos;117!==this.input.charCodeAt(++this.pos)&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var ce=this.readCodePoint();(v?isIdentifierStart:isIdentifierChar)(ce,R)||this.invalidStringToken(ie,"Invalid Unicode escape"),g+=codePointToString(ce),L=this.pos}v=!1}return g+this.input.slice(L,this.pos)},pp.readWord=function(){var g=this.readWord1(),v=types$1$1.name;return this.keywords.test(g)&&(v=keywords[g]),this.finishToken(v,g)};var version$1="8.18.0";function parse$2(g,v){return Parser.parse(g,v)}Parser.acorn={Parser:Parser,version:version$1,defaultOptions:defaultOptions,Position:Position,SourceLocation:SourceLocation,getLineInfo:getLineInfo,Node:Node$1,TokenType:TokenType,tokTypes:types$1$1,keywordTypes:keywords,TokContext:TokContext,tokContexts:types$2,isIdentifierChar:isIdentifierChar,isIdentifierStart:isIdentifierStart,Token:Token,isNewLine:isNewLine,lineBreak:lineBreak,lineBreakG:lineBreakG,nonASCIIwhitespace:nonASCIIwhitespace};const types$1={"application/andrew-inset":["ez"],"application/appinstaller":["appinstaller"],"application/applixware":["aw"],"application/appx":["appx"],"application/appxbundle":["appxbundle"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/automationml-aml+xml":["aml"],"application/automationml-amlx+zip":["amlx"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cpl+xml":["cpl"],"application/cu-seeme":["cu"],"application/cwl":["cwl"],"application/dash+xml":["mpd"],"application/dash-patch+xml":["mpp"],"application/davmount+xml":["davmount"],"application/dicom":["dcm"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdf":["fdf"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["*js"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/media-policy-dataset+xml":["mpf"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["*mp4","*mpg4","mp4s","m4p"],"application/msix":["msix"],"application/msixbundle":["msixbundle"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg","one","onea"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-keys":["asc"],"application/pgp-signature":["sig","*asc"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/sql":["sql"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/watcherinfo+xml":["wif"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xfdf":["xfdf"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"application/zip+dotlottie":["lottie"],"audio/3gpp":["*3gpp"],"audio/aac":["adts","aac"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a","m4b"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avci":["avci"],"image/avcs":["avcs"],"image/avif":["avif"],"image/bmp":["bmp","dib"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/dpx":["dpx"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/ief":["ief"],"image/jaii":["jaii"],"image/jais":["jais"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpg","jpeg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm","jpgm"],"image/jpx":["jpx","jpf"],"image/jxl":["jxl"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/pjpeg":["jfif"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime","mht","mhtml"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/jt":["jt"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/prc":["prc"],"model/step":["step","stp","stpnc","p21","210"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/u3d":["u3d"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/javascript":["js","mjs"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["md","markdown"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/wgsl":["wgsl"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","*jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts","m2t","m2ts","mts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]};Object.freeze(types$1);const types={"application/prs.cww":["cww"],"application/prs.xsf+xml":["xsf"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["*xfdf"],"application/vnd.age":["age"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.autodesk.fbx":["fbx"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dcmp+xml":["dcmp"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["*fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.slides":["ggs"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.drawing":["gdraw"],"application/vnd.google-apps.form":["gform"],"application/vnd.google-apps.jam":["gjam"],"application/vnd.google-apps.map":["gmap"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.script":["gscript"],"application/vnd.google-apps.site":["gsite"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.gov.sk.xmldatacontainer+xml":["xdcf"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mapbox-vector-tile":["mvt"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["*mpp","mpt"],"application/vnd.ms-visio.viewer":["vdx"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.nato.bindingdataobject+xml":["bdo"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.procrate.brushset":["brushset"],"application/vnd.procreate.brush":["brush"],"application/vnd.procreate.dream":["drm"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.pwg-xhtml-print+xml":["xhtm"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml","uo"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw","vsdx","vtx"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blender":["blend"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-compressed":["*rar"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-ipynb+json":["ipynb"],"application/x-iso9660-image":["*iso"],"application/x-iwork-keynote-sffkey":["*key"],"application/x-iwork-numbers-sffnumbers":["*numbers"],"application/x-iwork-pages-sffpages":["*pages"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["*prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["*sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zip-compressed":["*zip"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["*aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif","btf"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.blockfact.facti":["facti"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-adobe-dng":["dng"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.bary":["bary"],"model/vnd.cld":["cld"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["*mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.pytha.pyox":["pyo","pyox"],"model/vnd.sap.vds":["vds"],"model/vnd.usda":["usda"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.familysearch.gedcom":["ged"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]};Object.freeze(types);const upArrow="↑",downArrow="↓",U={upArrow:upArrow,downArrow:downArrow},$=g=>document.querySelector(g),$e=(g,v)=>{const L="string"==typeof g?$(g):g;return L?L.querySelector(v):null},$$e=(g,v)=>{const L="string"==typeof g?$(g):g;return L?[...L.querySelectorAll(v)]:[]},removeChildren=g=>{const v="string"==typeof g?$(g):g;if(!v)throw new Error("Node not found!");for(;v.hasChildNodes();)v.lastChild?.remove()},removeIfExists=g=>{const v="string"==typeof g?$(g):g;v&&v.remove()},filterChildElements=(g,v)=>{const L="string"==typeof g?$(g):g;if(!L)throw new Error("Element not found!");let R=[L];return(v=Array.isArray(v)?v:[v]).forEach(g=>{R=R.reduce((v,L)=>L?(v.push(...((g,v)=>{const L=[...g.children].filter(g=>g.matches(v));return L})(L,g)),v):v,[])}),R},initialCaps=g=>g.charAt(0).toUpperCase()+g.slice(1),DOM={removeChildren:removeChildren,removeIfExists:removeIfExists,filterChildElements:filterChildElements,initialCaps:initialCaps},isNullish=g=>null==g,unionLikeTypes=["union","xor","discriminatedUnion"],isUnionLike=g=>unionLikeTypes.includes(g);function assertEqual(g){return g}function assertNotEqual(g){return g}function toZod(){return g=>g}function assertIs(g){}function assertNever(g){throw new Error("Unexpected value in exhaustive check")}function assert(g){}function getEnumValues(g){const v=Object.values(g).filter(g=>"number"==typeof g),L=Object.entries(g).filter(([g,L])=>-1===v.indexOf(+g)).map(([g,v])=>v);return L}function joinValues(g,v="|"){return g.map(g=>stringifyPrimitive(g)).join(v)}function jsonStringifyReplacer(g,v){return"bigint"==typeof v?v.toString():v}class Cached{constructor(g){this._getter=g,this._value=void 0}get value(){const g=this._getter;return void 0!==g&&(this._value=g(),this._getter=void 0),this._value}}function cached(g){return new Cached(g)}function nullish$1(g){return null==g}function cleanRegex(g){const v=g.startsWith("^")?1:0,L=g.endsWith("$")?g.length-1:g.length;return g.slice(v,L)}function floatSafeRemainder(g,v){const L=g/v,R=Math.round(L),W=4*Number.EPSILON*Math.max(Math.abs(L),1);return Math.abs(L-R)<W?0:L-R}const EVALUATING=Symbol("evaluating");function defineLazy(g,v,L){let R;Object.defineProperty(g,v,{get(){if(R!==EVALUATING)return void 0===R&&(R=EVALUATING,R=L()),R},set(L){Object.defineProperty(g,v,{value:L})},configurable:!0})}function objectClone(g){return Object.create(Object.getPrototypeOf(g),Object.getOwnPropertyDescriptors(g))}function assignProp(g,v,L){Object.defineProperty(g,v,{value:L,writable:!0,enumerable:!0,configurable:!0})}function rawShape(g){const v=Object.getOwnPropertyDescriptor(g,"shape");return v?.get?v.get.raw:v?.value}function sourceShape(g){return rawShape(g._zod.def)??g._zod.def.shape}function deferProp(g,v,L){Object.defineProperty(g,v,{get(){const g=L();return assignProp(this,v,g),g},enumerable:!0,configurable:!0})}function putProp(g,v,L){v in g?assignProp(g,v,L):g[v]=L}function mirrorShape(g,v,L,R){const W=sourceShape(v);for(const ie of L){const L=Object.getOwnPropertyDescriptor(W,ie);L.enumerable&&(L.get?deferProp(g,ie,()=>{const g=v._zod.def.shape[ie];return R?R(g,ie):g}):putProp(g,ie,R?R(L.value,ie):L.value))}}function mirrorProps(g,v){for(const L of Reflect.ownKeys(v)){const R=Object.getOwnPropertyDescriptor(v,L);R.enumerable&&(R.get?deferProp(g,L,()=>v[L]):putProp(g,L,R.value))}}function mergeDefs(...g){const v={};for(const L of g){const g=Object.getOwnPropertyDescriptors(L);Object.assign(v,g)}return Object.defineProperties({},v)}function cloneDef(g){return mergeDefs(g._zod.def)}function getElementAtPath(g,v){return v?v.reduce((g,v)=>g?.[v],g):g}function promiseAllObject(g){const v=Object.keys(g),L=v.map(v=>g[v]);return Promise.all(L).then(g=>{const L={};for(let R=0;R<v.length;R++)L[v[R]]=g[R];return L})}function randomString(g=10){const v="abcdefghijklmnopqrstuvwxyz";let L="";for(let R=0;R<g;R++)L+=v[Math.floor(26*Math.random())];return L}function esc(g){return JSON.stringify(g)}function slugify(g){return g.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const captureStackTrace="captureStackTrace"in Error?Error.captureStackTrace:(...g)=>{};function isObject(g){return"object"==typeof g&&null!==g&&!Array.isArray(g)}const allowsEval=cached(()=>{if(globalConfig.jitless)return!1;if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(g){return!1}});function isPlainObject(g){if(!1===isObject(g))return!1;const v=g.constructor;if(void 0===v)return!0;if("function"!=typeof v)return!0;const L=v.prototype;return!1!==isObject(L)&&!1!==Object.prototype.hasOwnProperty.call(L,"isPrototypeOf")}function shallowClone(g){return isPlainObject(g)?{...g}:Array.isArray(g)?[...g]:g instanceof Map?new Map(g):g instanceof Set?new Set(g):g}function numKeys(g){let v=0;for(const L in g)Object.prototype.hasOwnProperty.call(g,L)&&v++;return v}const getParsedType=g=>{const v=typeof g;switch(v){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(g)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(g)?"array":null===g?"null":g.then&&"function"==typeof g.then&&g.catch&&"function"==typeof g.catch?"promise":"undefined"!=typeof Map&&g instanceof Map?"map":"undefined"!=typeof Set&&g instanceof Set?"set":"undefined"!=typeof Date&&g instanceof Date?"date":"undefined"!=typeof File&&g instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${v}`)}},propertyKeyTypes=new Set(["string","number","symbol"]),primitiveTypes=new Set(["string","number","bigint","boolean","symbol","undefined"]);function escapeRegex$1(g){return g.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function clone(g,v,L){const R=new g._zod.constr(v??g._zod.def);return v&&!L?.parent||(R._zod.parent=g),R}function normalizeParams(g){const v=g;if(!v)return{};if("string"==typeof v)return{error:()=>v};if(void 0!==v?.message){if(void 0!==v?.error)throw new Error("Cannot specify both `message` and `error` params");v.error=v.message}return delete v.message,"string"==typeof v.error?{...v,error:()=>v.error}:v}function createTransparentProxy(g){let v;return new Proxy({},{get:(L,R,W)=>(v??(v=g()),Reflect.get(v,R,W)),set:(L,R,W,ie)=>(v??(v=g()),Reflect.set(v,R,W,ie)),has:(L,R)=>(v??(v=g()),Reflect.has(v,R)),deleteProperty:(L,R)=>(v??(v=g()),Reflect.deleteProperty(v,R)),ownKeys:L=>(v??(v=g()),Reflect.ownKeys(v)),getOwnPropertyDescriptor:(L,R)=>(v??(v=g()),Reflect.getOwnPropertyDescriptor(v,R)),defineProperty:(L,R,W)=>(v??(v=g()),Reflect.defineProperty(v,R,W))})}function stringifyPrimitive(g){return"bigint"==typeof g?g.toString()+"n":"string"==typeof g?`"${g}"`:`${g}`}function optionalKeys(g){return Object.keys(g).filter(v=>void 0!==g[v]._zod.optin&&"optional"===g[v]._zod.optout)}const NUMBER_FORMAT_RANGES=(()=>({safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]}))(),BIGINT_FORMAT_RANGES={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function pick(g,v){const L=g._zod.def,R=L.checks;if(R&&R.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const W={};return mirrorShape(W,g,maskedKeys(g,v)),clone(g,mergeDefs(L,{shape:W,checks:[]}))}function maskedKeys(g,v){const L=sourceShape(g),R=[];for(const g of Reflect.ownKeys(v)){if(!Object.getOwnPropertyDescriptor(L,g)?.enumerable)throw new Error(`Unrecognized key: "${String(g)}"`);v[g]&&R.push(g)}return R}function omit(g,v){const L=g._zod.def,R=L.checks;if(R&&R.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const W=new Set(maskedKeys(g,v)),ie={};return mirrorShape(ie,g,Reflect.ownKeys(sourceShape(g)).filter(g=>!W.has(g))),clone(g,mergeDefs(L,{shape:ie,checks:[]}))}function extend(g,v){if(!isPlainObject(v))throw new Error("Invalid input to extend: expected a plain object");const L=g._zod.def.checks;if(L&&L.length>0){const L=sourceShape(g);for(const g of Reflect.ownKeys(v))if(void 0!==Object.getOwnPropertyDescriptor(L,g))throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return clone(g,mergeDefs(g._zod.def,{shape:extended(g,v)}))}function extended(g,v){const L={};return mirrorShape(L,g,Reflect.ownKeys(sourceShape(g))),mirrorProps(L,v),L}function safeExtend(g,v){if(!isPlainObject(v))throw new Error("Invalid input to safeExtend: expected a plain object");return clone(g,mergeDefs(g._zod.def,{shape:extended(g,v)}))}function merge(g,v){if(!v?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(g._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const L={};mirrorShape(L,g,Reflect.ownKeys(sourceShape(g))),mirrorShape(L,v,Reflect.ownKeys(sourceShape(v)));return clone(g,mergeDefs(g._zod.def,{shape:L,get catchall(){return v._zod.def.catchall},checks:v._zod.def.checks??[]}))}function partial(g,v,L,R="partial"){const W=v._zod.def.checks;if(W&&W.length>0)throw new Error(`.${R}() cannot be used on object schemas containing refinements`);const ie=L?new Set(maskedKeys(v,L)):void 0,ce={};return mirrorShape(ce,v,Reflect.ownKeys(sourceShape(v)),g&&((v,L)=>ie&&!ie.has(L)?v:new g({type:"optional",innerType:v}))),clone(v,mergeDefs(v._zod.def,{shape:ce,checks:[]}))}function required(g,v,L){const R=L?new Set(maskedKeys(v,L)):void 0,W={};return mirrorShape(W,v,Reflect.ownKeys(sourceShape(v)),(v,L)=>R&&!R.has(L)?v:new g({type:"nonoptional",innerType:v})),clone(v,mergeDefs(v._zod.def,{shape:W}))}function aborted(g,v=0){if(!0===g.aborted)return!0;for(let L=v;L<g.issues.length;L++)if(!0!==g.issues[L]?.continue)return!0;return!1}function explicitlyAborted(g,v=0){if(!0===g.aborted)return!0;for(let L=v;L<g.issues.length;L++)if(!1===g.issues[L]?.continue)return!0;return!1}function prefixIssues(g,v){return v.map(v=>{var L;return(L=v).path??(L.path=[]),v.path.unshift(g),v})}function unwrapMessage(g){return"string"==typeof g?g:g?.message}function attachSchema(g,v,L){var R;for(let W=v;W<g.length;W++)(R=g[W]).schema??(R.schema=L)}function finalizeIssue(g,v,L){var R;const W=g.inst?._zod?.traits;W?.has("$ZodType")&&(W.has("$ZodCheck")?(R=g).schema??(R.schema=g.inst):g.schema=g.inst);const ie=g.schema!==g.inst?g.schema?._zod.def?.error:void 0,ce=g.message?g.message:unwrapMessage(g.inst?._zod.def?.error?.(g))??unwrapMessage(ie?.(g))??unwrapMessage(v?.error?.(g))??unwrapMessage(L.customError?.(g))??unwrapMessage(L.localeError?.(g))??"Invalid input",le={};for(const v of Object.keys(g))"inst"!==v&&"schema"!==v&&"continue"!==v&&"input"!==v&&"__proto__"!==v&&(le[v]=g[v]);return le.path??(le.path=[]),le.message=ce,v?.reportInput&&(le.input=g.input),le}function getSizableOrigin(g){return g instanceof Set?"set":g instanceof Map?"map":g instanceof File?"file":"unknown"}const highSurrogate=/[\uD800-\uDBFF]/;function codePointLength(g){const v=g.length;if(!highSurrogate.test(g))return v;let L=v;for(let R=0;R<v-1;R++)55296==(64512&g.charCodeAt(R))&&56320==(64512&g.charCodeAt(R+1))&&(L--,R++);return L}function getLengthableOrigin(g){return Array.isArray(g)?"array":"string"==typeof g?"string":"unknown"}function parsedType(g){const v=typeof g;switch(v){case"number":return Number.isNaN(g)?"nan":"number";case"object":{if(null===g)return"null";if(Array.isArray(g))return"array";const v=g;if(v&&Object.getPrototypeOf(v)!==Object.prototype&&"constructor"in v&&v.constructor)return v.constructor.name}}return v}function issue(...g){const[v,L,R]=g;return"string"==typeof v?{message:v,code:"custom",input:L,inst:R}:{...v}}function cleanEnum(g){return Object.entries(g).filter(([g,v])=>Number.isNaN(Number.parseInt(g,10))).map(g=>g[1])}function base64ToUint8Array(g){const v=atob(g),L=new Uint8Array(v.length);for(let g=0;g<v.length;g++)L[g]=v.charCodeAt(g);return L}function uint8ArrayToBase64(g){let v="";for(let L=0;L<g.length;L++)v+=String.fromCharCode(g[L]);return btoa(v)}function base64urlToUint8Array(g){const v=g.replace(/-/g,"+").replace(/_/g,"/");return base64ToUint8Array(v+"=".repeat((4-v.length%4)%4))}function uint8ArrayToBase64url(g){return uint8ArrayToBase64(g).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function hexToUint8Array(g){const v=g.replace(/^0x/,"");if(v.length%2!=0)throw new Error("Invalid hex string length");const L=new Uint8Array(v.length/2);for(let g=0;g<v.length;g+=2)L[g/2]=Number.parseInt(v.slice(g,g+2),16);return L}function uint8ArrayToHex(g){return Array.from(g).map(g=>g.toString(16).padStart(2,"0")).join("")}class Class{constructor(...g){}}function members(g,v){for(const L in v){const R=Object.getOwnPropertyDescriptor(v,L);R.get?Object.defineProperty(g,L,{...R,enumerable:!1}):defineBound(g,L,R.value)}for(const L of Object.getOwnPropertySymbols(v))defineBound(g,L,v[L])}function own(g,v,L,R=!0){return Object.defineProperty(g,v,{configurable:!0,writable:!0,enumerable:R,value:L}),L}function hide(g,v,L){return own(g,v,L,!1)}function derived(g,v){for(const L in g){const R=g[L];Object.defineProperty(v,L,{configurable:!0,enumerable:!0,get(){return own(this,L,R(this))},set(g){own(this,L,g)}})}return v}function defineBound(g,v,L){Object.defineProperty(g,v,{configurable:!0,get(){return null==this?L:own(this,v,L.bind(this))},set(g){own(this,v,g)}})}function claim(g,v){const L=Object.getPrototypeOf(g);return v in L?void 0:L}let installing,broke=!1;const breaker={configurable:!0,get(){broke=!0}};function defineLazyInternal(g,v,L){const R=Object.getPrototypeOf(g._zod);v in R&&installing!==g._zod?installing=void 0:(installing=g._zod,Object.defineProperty(R,v,{configurable:!0,get(){Object.defineProperty(this,v,breaker);const g=broke;broke=!1;try{const R=L(this);return broke?delete this[v]:Object.defineProperty(this,v,{configurable:!0,writable:!0,value:R}),broke=broke||g,R}catch(L){throw delete this[v],broke=broke||g,L}},set(g){Object.defineProperty(this,v,{configurable:!0,writable:!0,value:g})}}))}function installLazyProp(g,v,L,R){const W=claim(g,v);W&&Object.defineProperty(W,v,{configurable:!0,get(){const g={configurable:!0,writable:!0,enumerable:R,value:void 0};return Object.defineProperty(this,v,g),g.value=L(this),Object.defineProperty(this,v,g),g.value},set(g){Object.defineProperty(this,v,{configurable:!0,writable:!0,enumerable:R,value:g})}})}const CONSTANT_CATCH="~constantCatch";function constantCatch(g){const fn=()=>g;return fn[CONSTANT_CATCH]=!0,fn}var util=Object.freeze({__proto__:null,BIGINT_FORMAT_RANGES:BIGINT_FORMAT_RANGES,CONSTANT_CATCH:CONSTANT_CATCH,Class:Class,NUMBER_FORMAT_RANGES:NUMBER_FORMAT_RANGES,aborted:aborted,allowsEval:allowsEval,assert:assert,assertEqual:assertEqual,assertIs:assertIs,assertNever:assertNever,assertNotEqual:assertNotEqual,assignProp:assignProp,attachSchema:attachSchema,base64ToUint8Array:base64ToUint8Array,base64urlToUint8Array:base64urlToUint8Array,cached:cached,captureStackTrace:captureStackTrace,cleanEnum:cleanEnum,cleanRegex:cleanRegex,clone:clone,cloneDef:cloneDef,codePointLength:codePointLength,constantCatch:constantCatch,createTransparentProxy:createTransparentProxy,defineLazy:defineLazy,defineLazyInternal:defineLazyInternal,derived:derived,esc:esc,escapeRegex:escapeRegex$1,explicitlyAborted:explicitlyAborted,extend:extend,finalizeIssue:finalizeIssue,floatSafeRemainder:floatSafeRemainder,getElementAtPath:getElementAtPath,getEnumValues:getEnumValues,getLengthableOrigin:getLengthableOrigin,getParsedType:getParsedType,getSizableOrigin:getSizableOrigin,hexToUint8Array:hexToUint8Array,hide:hide,installLazyProp:installLazyProp,isObject:isObject,isPlainObject:isPlainObject,issue:issue,joinValues:joinValues,jsonStringifyReplacer:jsonStringifyReplacer,members:members,merge:merge,mergeDefs:mergeDefs,normalizeParams:normalizeParams,nullish:nullish$1,numKeys:numKeys,objectClone:objectClone,omit:omit,optionalKeys:optionalKeys,own:own,parsedType:parsedType,partial:partial,pick:pick,prefixIssues:prefixIssues,primitiveTypes:primitiveTypes,promiseAllObject:promiseAllObject,propertyKeyTypes:propertyKeyTypes,randomString:randomString,rawShape:rawShape,required:required,safeExtend:safeExtend,shallowClone:shallowClone,slugify:slugify,stringifyPrimitive:stringifyPrimitive,toZod:toZod,uint8ArrayToBase64:uint8ArrayToBase64,uint8ArrayToBase64url:uint8ArrayToBase64url,uint8ArrayToHex:uint8ArrayToHex,unwrapMessage:unwrapMessage}),_a$1;const NEVER=Object.freeze({status:"aborted"}),_zodDesc={value:void 0,enumerable:!1};let _E="captureStackTrace"in Error?Error:null;function newError(g){const v=_E;if(v){const L=v.stackTraceLimit;if("number"==typeof L){try{v.stackTraceLimit=0}catch{return _E=null,new g}try{return new g}finally{v.stackTraceLimit=L}}}return new g}function $constructor(g,v,L,R){function Internals(g){this.def=g,this.constr=_,this.traits=new Set}Internals.prototype={};const W=L,ie=W&&new WeakSet;function init(L,R){if(!L._zod){_zodDesc.value=new Internals(R);try{Object.defineProperty(L,"_zod",_zodDesc)}finally{_zodDesc.value=void 0}}if(L._zod.traits.has(g))return;if(L._zod.traits.add(g),v(L,R),ie){const g=Object.getPrototypeOf(L),v=L._zod.constr.prototype;let R=g;for(;R&&R!==v;)R=Object.getPrototypeOf(R);const ce=R??g;ie.has(ce)||(ie.add(ce),members(ce,W))}const ce=_.prototype;for(const g in ce)Object.prototype.hasOwnProperty.call(ce,g)&&(g in L||(L[g]=ce[g].bind(L)))}const ce=R?.Parent??Object;class Definition extends ce{}function _(g){const v=R?.Parent?newError(Definition):this;init(v,g);const L=v._zod.deferred;if(L){for(const g of L)g();v._zod.deferred=void 0}const W=globalThis.__zod_globalConfig?.postProcessor;return W&&W(v),v}return Object.defineProperty(Definition,"name",{value:g}),Object.defineProperty(_,"init",{value:init}),Object.defineProperty(_,Symbol.hasInstance,{value:v=>!!(R?.Parent&&v instanceof R.Parent)||v?._zod?.traits?.has(g)}),Object.defineProperty(_,"name",{value:g}),_}const $brand=Symbol("zod_brand");class $ZodAsyncError extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class $ZodEncodeError extends Error{constructor(g){super(`Encountered unidirectional transform during encode: ${g}`),this.name="ZodEncodeError"}}(_a$1=globalThis).__zod_globalConfig??(_a$1.__zod_globalConfig={});const globalConfig=globalThis.__zod_globalConfig;function config(g){return g&&Object.assign(globalConfig,g),globalConfig}function _getMessage(){const g=this._zod;return g.message??(g.message=JSON.stringify(g.def,jsonStringifyReplacer,2)),g.message}function _setMessage(g){this._zod.message=g}const _messageDesc={get:_getMessage,set:_setMessage,enumerable:!0,configurable:!0},_issuesDesc={value:void 0,enumerable:!1},_installedToString=new WeakSet([Object.prototype,Error.prototype]),initializer$1=(g,v)=>{g.name="$ZodError",_issuesDesc.value=v,Object.defineProperty(g,"issues",_issuesDesc),_issuesDesc.value=void 0,Object.defineProperty(g,"message",_messageDesc);const L=Object.getPrototypeOf(g);_installedToString.has(L)||(_installedToString.add(L),Object.defineProperty(L,"toString",{configurable:!0,enumerable:!1,get(){const value=()=>this.message;return Object.defineProperty(this,"toString",{value:value,configurable:!0,writable:!0}),value},set(g){Object.defineProperty(this,"toString",{value:g,configurable:!0,writable:!0})}}))},$ZodError=$constructor("$ZodError",initializer$1),$ZodRealError=$constructor("$ZodError",initializer$1,void 0,{Parent:Error});function node(g,v,L){return Object.prototype.hasOwnProperty.call(g,v)||("__proto__"===v?Object.defineProperty(g,v,{value:L(),writable:!0,enumerable:!0,configurable:!0}):g[v]=L()),g[v]}function flattenError(g,v=g=>g.message){const L={},R=[];for(const W of g.issues)W.path.length>0?node(L,W.path[0],()=>[]).push(v(W)):R.push(v(W));return{formErrors:R,fieldErrors:L}}function formatError(g,v=g=>g.message){const L={_errors:[]},processError=(g,R=[])=>{for(const W of g.issues)if("invalid_union"===W.code&&W.errors.length)W.errors.map(g=>processError({issues:g},[...R,...W.path]));else if("invalid_key"===W.code)processError({issues:W.issues},[...R,...W.path]);else if("invalid_element"===W.code)processError({issues:W.issues},[...R,...W.path]);else{const g=[...R,...W.path];if(0===g.length)L._errors.push(v(W));else{let R=L,ie=0;for(;ie<g.length;){const L=g[ie],ce=ie===g.length-1;if("_errors"===L){ce&&R._errors.push(v(W)),ie++;continue}Object.prototype.hasOwnProperty.call(R,L)||Object.defineProperty(R,L,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});const le=R[L];ce&&le._errors.push(v(W)),R=le,ie++}}}};return processError(g),L}function treeifyError(g,v=g=>g.message){const L={errors:[]},processError=(g,R=[])=>{var W;for(const ie of g.issues)if("invalid_union"===ie.code&&ie.errors.length)ie.errors.map(g=>processError({issues:g},[...R,...ie.path]));else if("invalid_key"===ie.code)processError({issues:ie.issues},[...R,...ie.path]);else if("invalid_element"===ie.code)processError({issues:ie.issues},[...R,...ie.path]);else{const g=[...R,...ie.path];if(0===g.length){L.errors.push(v(ie));continue}let ce=L,le=0;for(;le<g.length;){const L=g[le],R=le===g.length-1;"string"==typeof L?(ce.properties??(ce.properties={}),Object.prototype.hasOwnProperty.call(ce.properties,L)||Object.defineProperty(ce.properties,L,{value:{errors:[]},enumerable:!0,writable:!0,configurable:!0}),ce=ce.properties[L]):(ce.items??(ce.items=[]),(W=ce.items)[L]??(W[L]={errors:[]}),ce=ce.items[L]),R&&ce.errors.push(v(ie)),le++}}};return processError(g),L}function toDotPath(g){const v=[],L=g.map(g=>"object"==typeof g?g.key:g);for(const g of L)"number"==typeof g?v.push(`[${g}]`):"symbol"==typeof g?v.push(`[${JSON.stringify(String(g))}]`):/[^\w$]/.test(g)?v.push(`[${JSON.stringify(g)}]`):(v.length&&v.push("."),v.push(g));return v.join("")}function prettifyError(g){const v=[],L=[...g.issues].sort((g,v)=>(g.path??[]).length-(v.path??[]).length);for(const g of L)v.push(`✖ ${g.message}`),g.path?.length&&v.push(` → at ${toDotPath(g.path)}`);return v.join("\n")}function finalizeParams(g,v){return{callee:v?.callee??g,Err:v?.Err}}const _parse=g=>{const fn=(v,L,R,W)=>{const ie=R?{...R,async:!1}:{async:!1},ce=v._zod.run({value:L,issues:[]},ie);if(ce instanceof Promise)throw new $ZodAsyncError;if(ce.issues.length){const v=new(W?.Err??g)(ce.issues.map(g=>finalizeIssue(g,ie,config())));throw captureStackTrace(v,W?.callee??fn),v}return ce.value};return fn},parse$1=_parse($ZodRealError),_parseAsync=g=>{const fn=async(v,L,R,W)=>{const ie=R?{...R,async:!0}:{async:!0};let ce=v._zod.run({value:L,issues:[]},ie);if(ce instanceof Promise&&(ce=await ce),ce.issues.length){const v=new(W?.Err??g)(ce.issues.map(g=>finalizeIssue(g,ie,config())));throw captureStackTrace(v,W?.callee??fn),v}return ce.value};return fn},parseAsync$1=_parseAsync($ZodRealError),_safeParse=g=>(v,L,R)=>{const W=R?{...R,async:!1}:{async:!1},ie=v._zod.run({value:L,issues:[]},W);if(ie instanceof Promise)throw new $ZodAsyncError;return ie.issues.length?failure(g,ie.issues,W):{success:!0,data:ie.value}},safeParse$1=_safeParse($ZodRealError);function failure(g,v,L){let R;return{success:!1,get error(){return R||(R=new g(v.map(g=>finalizeIssue(g,L,config()))),v=void 0,L=void 0),R},set error(g){R=g,v=void 0,L=void 0}}}const _safeParseAsync=g=>async(v,L,R)=>{const W=R?{...R,async:!0}:{async:!0};let ie=v._zod.run({value:L,issues:[]},W);return ie instanceof Promise&&(ie=await ie),ie.issues.length?failure(g,ie.issues,W):{success:!0,data:ie.value}},safeParseAsync$1=_safeParseAsync($ZodRealError),COMPILE_INVALID=Symbol.for("zod.compile.invalid"),COMPILE_FALLBACK=Symbol.for("zod.compile.fallback"),validate=(g,v,L)=>{const R=g._zod.bag.validator;if(void 0!==R){if(R(v)!==COMPILE_INVALID)return!0;if(!0===R.definite&&void 0===L)return!1}return validateFallback(g,v,L)};function validateFallback(g,v,L){const R=L?{...L,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},W=g._zod.bag.fallbackRun;let ie;if(W?(R[COMPILE_FALLBACK]=!0,ie=W({value:v,issues:[]},R)):ie=g._zod.run({value:v,issues:[]},R),ie instanceof Promise)throw new $ZodAsyncError;return 0===ie.issues.length}const validateAsync$1=async(g,v,L)=>{const R=L?{...L,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0};let W=g._zod.run({value:v,issues:[]},R);return W instanceof Promise&&(W=await W),0===W.issues.length},_encode=g=>{const v=_parse(g),fn=(g,L,R,W)=>{const ie=R?{...R,direction:"backward"}:{direction:"backward"};return v(g,L,ie,finalizeParams(fn,W))};return fn},encode$1=_encode($ZodRealError),_decode=g=>{const v=_parse(g),fn=(g,L,R,W)=>v(g,L,R,finalizeParams(fn,W));return fn},decode$1=_decode($ZodRealError),_encodeAsync=g=>{const v=_parseAsync(g),fn=async(g,L,R,W)=>{const ie=R?{...R,direction:"backward"}:{direction:"backward"};return await v(g,L,ie,finalizeParams(fn,W))};return fn},encodeAsync$1=_encodeAsync($ZodRealError),_decodeAsync=g=>{const v=_parseAsync(g),fn=async(g,L,R,W)=>await v(g,L,R,finalizeParams(fn,W));return fn},decodeAsync$1=_decodeAsync($ZodRealError),_safeEncode=g=>(v,L,R)=>{const W=R?{...R,direction:"backward"}:{direction:"backward"};return _safeParse(g)(v,L,W)},safeEncode$1=_safeEncode($ZodRealError),_safeDecode=g=>(v,L,R)=>_safeParse(g)(v,L,R),safeDecode$1=_safeDecode($ZodRealError),_safeEncodeAsync=g=>async(v,L,R)=>{const W=R?{...R,direction:"backward"}:{direction:"backward"};return _safeParseAsync(g)(v,L,W)},safeEncodeAsync$1=_safeEncodeAsync($ZodRealError),_safeDecodeAsync=g=>async(v,L,R)=>_safeParseAsync(g)(v,L,R),safeDecodeAsync$1=_safeDecodeAsync($ZodRealError),cuid$1=/^[cC][0-9a-z]{6,}$/,cuid2$1=/^[0-9a-z]+$/,ulid$1=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,xid$1=/^[0-9a-vA-V]{20}$/,ksuid$1=/^[A-Za-z0-9]{27}$/,nanoid$1=/^[a-zA-Z0-9_-]{21}$/;function nanoidOfLength(g){return new RegExp(`^[a-zA-Z0-9_-]{${g}}$`)}const duration$1=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,extendedDuration=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,guid$1=/^([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})$/,uuid$1=g=>g?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${g}[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)$/,uuid4=uuid$1(4),uuid6=uuid$1(6),uuid7=uuid$1(7),email$1=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,html5Email=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,rfc5322Email=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,unicodeEmail=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,idnEmail=unicodeEmail,browserEmail=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,_emoji$1="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function emoji$1(){return new RegExp(_emoji$1,"u")}const ipv4$1=/^(?:(?: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])$/,ipv6$1=/^(([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}|:))$/,mac$1=g=>{const v=escapeRegex$1(g??":");return new RegExp(`^(?:[0-9A-F]{2}${v}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${v}){5}[0-9a-f]{2}$`)},cidrv4$1=/^((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])$/,cidrv6$1=/^(([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])$/,base64$1=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,base64url$1=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,hostname$1=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,domain=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,httpProtocol=/^https?$/,e164$1=/^\+[1-9]\d{6,14}$/,creditCard$1=/^\d(?:[ -]?\d){11,18}$/,iban$1=/^[A-Z]{2}(?!00|01|99)\d{2}[A-Z0-9]{11,30}$/,dateSource="(?:(?:\\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 anchor(g){return new RegExp(`^${g}$`)}const date$3=anchor(dateSource);function timeSource(g){const v="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof g.precision?-1===g.precision?`${v}`:0===g.precision?`${v}:[0-5]\\d`:`${v}:[0-5]\\d\\.\\d{${g.precision}}`:g.seconds?`${v}:[0-5]\\d(?:\\.\\d+)?`:`${v}(?::[0-5]\\d(?:\\.\\d+)?)?`}function time$1(g){return new RegExp(`^${timeSource(g)}$`)}function datetime$1(g){const v=["Z"];g.offset&&v.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const L=`${timeSource({precision:g.precision,seconds:!0})}(?:${v.join("|")})`,R=g.local?`${L}|${timeSource({precision:g.precision})}`:L;return new RegExp(`^${dateSource}T(?:${R})$`)}const anyString=/^[\s\S]{0,}$/,string$2=g=>new RegExp(`^${g?`[\\s\\S]{${g?.minimum??0},${g?.maximum??""}}`:"[\\s\\S]*"}$`),bigint$2=/^-?\d+n?$/,integer=/^-?\d+$/,number$2=/^-?\d+(?:\.\d+)?$/,boolean$2=/^(?:true|false)$/i,_null$2=/^null$/i,_undefined$2=/^undefined$/i,lowercase=/^[^A-Z]*$/,uppercase=/^[^a-z]*$/,hex$1=/^[0-9a-fA-F]*$/;function fixedBase64(g,v){return new RegExp(`^[A-Za-z0-9+/]{${g}}${v}$`)}function fixedBase64url(g){return new RegExp(`^[A-Za-z0-9_-]{${g}}$`)}const md5_hex=/^[0-9a-fA-F]{32}$/,md5_base64=fixedBase64(22,"=="),md5_base64url=fixedBase64url(22),sha1_hex=/^[0-9a-fA-F]{40}$/,sha1_base64=fixedBase64(27,"="),sha1_base64url=fixedBase64url(27),sha256_hex=/^[0-9a-fA-F]{64}$/,sha256_base64=fixedBase64(43,"="),sha256_base64url=fixedBase64url(43),sha384_hex=/^[0-9a-fA-F]{96}$/,sha384_base64=fixedBase64(64,""),sha384_base64url=fixedBase64url(64),sha512_hex=/^[0-9a-fA-F]{128}$/,sha512_base64=fixedBase64(86,"=="),sha512_base64url=fixedBase64url(86);var regexes=Object.freeze({__proto__:null,anyString:anyString,base64:base64$1,base64url:base64url$1,bigint:bigint$2,boolean:boolean$2,browserEmail:browserEmail,cidrv4:cidrv4$1,cidrv6:cidrv6$1,creditCard:creditCard$1,cuid:cuid$1,cuid2:cuid2$1,date:date$3,datetime:datetime$1,domain:domain,duration:duration$1,e164:e164$1,email:email$1,emoji:emoji$1,extendedDuration:extendedDuration,guid:guid$1,hex:hex$1,hostname:hostname$1,html5Email:html5Email,httpProtocol:httpProtocol,iban:iban$1,idnEmail:idnEmail,integer:integer,ipv4:ipv4$1,ipv6:ipv6$1,ksuid:ksuid$1,lowercase:lowercase,mac:mac$1,md5_base64:md5_base64,md5_base64url:md5_base64url,md5_hex:md5_hex,nanoid:nanoid$1,nanoidOfLength:nanoidOfLength,null:_null$2,number:number$2,rfc5322Email:rfc5322Email,sha1_base64:sha1_base64,sha1_base64url:sha1_base64url,sha1_hex:sha1_hex,sha256_base64:sha256_base64,sha256_base64url:sha256_base64url,sha256_hex:sha256_hex,sha384_base64:sha384_base64,sha384_base64url:sha384_base64url,sha384_hex:sha384_hex,sha512_base64:sha512_base64,sha512_base64url:sha512_base64url,sha512_hex:sha512_hex,string:string$2,time:time$1,ulid:ulid$1,undefined:_undefined$2,unicodeEmail:unicodeEmail,uppercase:uppercase,uuid:uuid$1,uuid4:uuid4,uuid6:uuid6,uuid7:uuid7,xid:xid$1});const $ZodCheck=$constructor("$ZodCheck",(g,v)=>{var L;g._zod??(g._zod={}),g._zod.def=v,(L=g._zod).onattach??(L.onattach=[])}),_whenHasSize=g=>{const v=g.value;return!nullish$1(v)&&void 0!==v.size},_whenHasLength=g=>{const v=g.value;return!nullish$1(v)&&void 0!==v.length},numericOriginMap={number:"number",bigint:"bigint",object:"date"},$ZodCheckLessThan=$constructor("$ZodCheckLessThan",(g,v)=>{$ZodCheck.init(g,v);const L=numericOriginMap[typeof v.value];g._zod.check=R=>{(v.inclusive?R.value<=v.value:R.value<v.value)||R.issues.push({origin:numericOriginMap[typeof R.value]??L,code:"too_big",maximum:"object"==typeof v.value?v.value.getTime():v.value,input:R.value,inclusive:v.inclusive,inst:g,continue:!v.abort})}}),$ZodCheckGreaterThan=$constructor("$ZodCheckGreaterThan",(g,v)=>{$ZodCheck.init(g,v);const L=numericOriginMap[typeof v.value];g._zod.check=R=>{(v.inclusive?R.value>=v.value:R.value>v.value)||R.issues.push({origin:numericOriginMap[typeof R.value]??L,code:"too_small",minimum:"object"==typeof v.value?v.value.getTime():v.value,input:R.value,inclusive:v.inclusive,inst:g,continue:!v.abort})}}),$ZodCheckMultipleOf=$constructor("$ZodCheckMultipleOf",(g,v)=>{$ZodCheck.init(g,v),g._zod.check=L=>{if(typeof L.value!=typeof v.value)throw new Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof L.value?v.value!==BigInt(0)&&L.value%v.value===BigInt(0):0===floatSafeRemainder(L.value,v.value))||L.issues.push({origin:typeof L.value,code:"not_multiple_of",divisor:v.value,input:L.value,inst:g,continue:!v.abort})}}),$ZodCheckNumberFormat=$constructor("$ZodCheckNumberFormat",(g,v)=>{$ZodCheck.init(g,v),v.format=v.format||"float64";const L=v.format?.includes("int"),R=L?"int":"number",[W,ie]=NUMBER_FORMAT_RANGES[v.format];g._zod.check=ce=>{const le=ce.value;if(L){if(!Number.isInteger(le))return void ce.issues.push({expected:R,format:v.format,code:"invalid_type",continue:!1,input:le,inst:g});if(!Number.isSafeInteger(le))return void(le>0?ce.issues.push({input:le,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:g,origin:R,inclusive:!0,continue:!v.abort}):ce.issues.push({input:le,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:g,origin:R,inclusive:!0,continue:!v.abort}))}le<W&&ce.issues.push({origin:"number",input:le,code:"too_small",minimum:W,inclusive:!0,inst:g,continue:!v.abort}),le>ie&&ce.issues.push({origin:"number",input:le,code:"too_big",maximum:ie,inclusive:!0,inst:g,continue:!v.abort})}}),$ZodCheckBigIntFormat=$constructor("$ZodCheckBigIntFormat",(g,v)=>{$ZodCheck.init(g,v);const[L,R]=BIGINT_FORMAT_RANGES[v.format];g._zod.check=W=>{const ie=W.value;ie<L&&W.issues.push({origin:"bigint",input:ie,code:"too_small",minimum:L,inclusive:!0,inst:g,continue:!v.abort}),ie>R&&W.issues.push({origin:"bigint",input:ie,code:"too_big",maximum:R,inclusive:!0,inst:g,continue:!v.abort})}}),$ZodCheckMaxSize=$constructor("$ZodCheckMaxSize",(g,v)=>{var L;$ZodCheck.init(g,v),(L=g._zod.def).when??(L.when=_whenHasSize),g._zod.check=L=>{const R=L.value;R.size<=v.maximum||L.issues.push({origin:getSizableOrigin(R),code:"too_big",maximum:v.maximum,inclusive:!0,input:R,inst:g,continue:!v.abort})}}),$ZodCheckMinSize=$constructor("$ZodCheckMinSize",(g,v)=>{var L;$ZodCheck.init(g,v),(L=g._zod.def).when??(L.when=_whenHasSize),g._zod.check=L=>{const R=L.value;R.size>=v.minimum||L.issues.push({origin:getSizableOrigin(R),code:"too_small",minimum:v.minimum,inclusive:!0,input:R,inst:g,continue:!v.abort})}}),$ZodCheckSizeEquals=$constructor("$ZodCheckSizeEquals",(g,v)=>{var L;$ZodCheck.init(g,v),(L=g._zod.def).when??(L.when=_whenHasSize),g._zod.check=L=>{const R=L.value,W=R.size;if(W===v.size)return;const ie=W>v.size;L.issues.push({origin:getSizableOrigin(R),...ie?{code:"too_big",maximum:v.size}:{code:"too_small",minimum:v.size},inclusive:!0,exact:!0,input:L.value,inst:g,continue:!v.abort})}}),$ZodCheckMaxLength=$constructor("$ZodCheckMaxLength",(g,v)=>{var L;$ZodCheck.init(g,v),(L=g._zod.def).when??(L.when=_whenHasLength),g._zod.check=L=>{const R=L.value,W=R.length;if(("string"==typeof R&&W>v.maximum?codePointLength(R):W)<=v.maximum)return;const ie=getLengthableOrigin(R);L.issues.push({origin:ie,code:"too_big",maximum:v.maximum,inclusive:!0,input:R,inst:g,continue:!v.abort})}}),$ZodCheckMinLength=$constructor("$ZodCheckMinLength",(g,v)=>{var L;$ZodCheck.init(g,v),(L=g._zod.def).when??(L.when=_whenHasLength),g._zod.check=L=>{const R=L.value,W=R.length;if(("string"==typeof R&&W>=v.minimum&&W<2*v.minimum?codePointLength(R):W)>=v.minimum)return;const ie=getLengthableOrigin(R);L.issues.push({origin:ie,code:"too_small",minimum:v.minimum,inclusive:!0,input:R,inst:g,continue:!v.abort})}}),$ZodCheckLengthEquals=$constructor("$ZodCheckLengthEquals",(g,v)=>{var L;$ZodCheck.init(g,v),(L=g._zod.def).when??(L.when=_whenHasLength),g._zod.check=L=>{const R=L.value,W=R.length,ie="string"==typeof R&&W>=v.length&&W<=2*v.length?codePointLength(R):W;if(ie===v.length)return;const ce=getLengthableOrigin(R),le=ie>v.length;L.issues.push({origin:ce,...le?{code:"too_big",maximum:v.length}:{code:"too_small",minimum:v.length},inclusive:!0,exact:!0,input:L.value,inst:g,continue:!v.abort})}}),$ZodCheckStringFormat=$constructor("$ZodCheckStringFormat",(g,v)=>{var L,R;$ZodCheck.init(g,v),v.pattern?(L=g._zod).check??(L.check=L=>{v.pattern.lastIndex=0,v.pattern.test(L.value)||L.issues.push({origin:"string",code:"invalid_format",format:v.format,input:L.value,...v.pattern?{pattern:v.pattern.toString()}:{},inst:g,continue:!v.abort})}):(R=g._zod).check??(R.check=()=>{})}),$ZodCheckRegex=$constructor("$ZodCheckRegex",(g,v)=>{$ZodCheckStringFormat.init(g,v),g._zod.check=L=>{v.pattern.lastIndex=0,v.pattern.test(L.value)||L.issues.push({origin:"string",code:"invalid_format",format:"regex",input:L.value,pattern:v.pattern.toString(),inst:g,continue:!v.abort})}}),$ZodCheckLowerCase=$constructor("$ZodCheckLowerCase",(g,v)=>{v.pattern??(v.pattern=lowercase),$ZodCheckStringFormat.init(g,v)}),$ZodCheckUpperCase=$constructor("$ZodCheckUpperCase",(g,v)=>{v.pattern??(v.pattern=uppercase),$ZodCheckStringFormat.init(g,v)}),$ZodCheckIncludes=$constructor("$ZodCheckIncludes",(g,v)=>{$ZodCheck.init(g,v);const L=escapeRegex$1(v.includes),R=new RegExp("number"==typeof v.position?`^.{${v.position},}${L}`:L);v.pattern=R,g._zod.check=L=>{L.value.includes(v.includes,v.position)||L.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:v.includes,input:L.value,inst:g,continue:!v.abort})}}),$ZodCheckStartsWith=$constructor("$ZodCheckStartsWith",(g,v)=>{$ZodCheck.init(g,v);const L=new RegExp(`^${escapeRegex$1(v.prefix)}.*`);v.pattern??(v.pattern=L),g._zod.check=L=>{L.value.startsWith(v.prefix)||L.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:v.prefix,input:L.value,inst:g,continue:!v.abort})}}),$ZodCheckEndsWith=$constructor("$ZodCheckEndsWith",(g,v)=>{$ZodCheck.init(g,v);const L=new RegExp(`.*${escapeRegex$1(v.suffix)}$`);v.pattern??(v.pattern=L),g._zod.check=L=>{L.value.endsWith(v.suffix)||L.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:v.suffix,input:L.value,inst:g,continue:!v.abort})}});function handleCheckPropertyResult(g,v,L){g.issues.length&&v.issues.push(...prefixIssues(L,g.issues))}const $ZodCheckProperty=$constructor("$ZodCheckProperty",(g,v)=>{$ZodCheck.init(g,v),g._zod.check=g=>{const L=v.schema._zod.run({value:g.value[v.property],issues:[]},{});if(L instanceof Promise)return L.then(L=>handleCheckPropertyResult(L,g,v.property));handleCheckPropertyResult(L,g,v.property)}}),$ZodCheckMimeType=$constructor("$ZodCheckMimeType",(g,v)=>{$ZodCheck.init(g,v);const L=new Set(v.mime);g._zod.check=R=>{L.has(R.value.type)||R.issues.push({code:"invalid_value",values:v.mime,input:R.value.type,inst:g,continue:!v.abort})}}),$ZodCheckOverwrite=$constructor("$ZodCheckOverwrite",(g,v)=>{$ZodCheck.init(g,v),g._zod.check=g=>{g.value=v.tx(g.value)}});class Doc{constructor(g=[],v={}){this.content=[],this.indent=0,this.args=g,this.closed=v}indented(g){this.indent+=1;try{g(this)}finally{this.indent-=1}}write(g){if("function"==typeof g)return g(this,{execution:"sync"}),void g(this,{execution:"async"});const v=g.split("\n").filter(g=>g),L=Math.min(...v.map(g=>g.length-g.trimStart().length)),R=v.map(g=>g.slice(L)).map(g=>" ".repeat(2*this.indent)+g);for(const g of R)this.content.push(g)}compile(){const g=Function,v=this?.content??[""];return new g(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {\n${v.join("\n")}\n};`)(...Object.values(this.closed))}}const version={major:4,minor:6,patch:1},$ZodType=$constructor("$ZodType",(g,v)=>{var L;g??(g={}),g._zod.def=v,g._zod.bag=g._zod.bag||{},g._zod.version=version;const R=g._zod.def.checks,W=g._zod.traits.has("$ZodCheck")?[g,...R??[]]:R?.length?[...R]:[];for(const v of W)for(const L of v._zod.onattach)L(g);if(0===W.length)(L=g._zod).deferred??(L.deferred=[]),g._zod.deferred?.push(()=>{g._zod.run=g._zod.parse});else{const runChecks=(v,L,R)=>{if(v.memo)return v;let W,ie=aborted(v);for(const ce of L){if(ce._zod.def.when){if(explicitlyAborted(v))continue;if(!ce._zod.def.when(v))continue}else if(ie)continue;const L=v.issues.length,le=ce._zod.check(v);if(le instanceof Promise&&!1===R?.async)throw new $ZodAsyncError;if(W||le instanceof Promise)W=(W??Promise.resolve()).then(async()=>{await le;v.issues.length!==L&&(attachSchema(v.issues,L,g),ie||(ie=aborted(v,L)))});else{if(v.issues.length===L)continue;attachSchema(v.issues,L,g),ie||(ie=aborted(v,L))}}return W?W.then(()=>v):v},handleCanaryResult=(v,L,R)=>{if(aborted(v))return v.aborted=!0,v;const ie=runChecks(L,W,R);if(ie instanceof Promise){if(!1===R.async)throw new $ZodAsyncError;return ie.then(v=>g._zod.parse(v,R))}return g._zod.parse(ie,R)};g._zod.run=(v,L)=>{if(L.skipChecks)return g._zod.parse(v,L);if("backward"===L.direction){const R=g._zod.parse({value:v.value,issues:[]},{...L,skipChecks:!0});return R instanceof Promise?R.then(g=>handleCanaryResult(g,v,L)):handleCanaryResult(R,v,L)}const R=g._zod.parse(v,L);if(R instanceof Promise){if(!1===L.async)throw new $ZodAsyncError;return R.then(g=>runChecks(g,W,L))}return runChecks(R,W,L)}}},{get"~standard"(){return hide(this,"~standard",standardProps(this))},set"~standard"(g){own(this,"~standard",g)}}),toStandardResult=(g,v)=>g.issues.length?{issues:g.issues.map(g=>finalizeIssue(g,v,config()))}:{value:g.value};async function validateAsync(g,v){const L={async:!0};return toStandardResult(await g._zod.run({value:v,issues:[]},L),L)}function standardProps(g){return{validate:v=>{const L={async:!1};try{const R=g._zod.run({value:v,issues:[]},L);if(!(R instanceof Promise))return toStandardResult(R,L)}catch(g){}return validateAsync(g,v)},vendor:"zod",version:1}}const $ZodString=$constructor("$ZodString",(g,v)=>{$ZodType.init(g,v),g._zod.pattern=v.pattern??anyString,g._zod.parse=(L,R)=>{if(v.coerce)try{L.value=String(L.value)}catch(R){}return"string"==typeof L.value||L.issues.push({expected:"string",code:"invalid_type",input:L.value,inst:g}),L}}),$ZodStringFormat=$constructor("$ZodStringFormat",(g,v)=>{$ZodCheckStringFormat.init(g,v),$ZodString.init(g,v)}),$ZodGUID=$constructor("$ZodGUID",(g,v)=>{v.pattern??(v.pattern=guid$1),$ZodStringFormat.init(g,v)}),$ZodUUID=$constructor("$ZodUUID",(g,v)=>{if(v.version){const g={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[v.version];if(void 0===g)throw new Error(`Invalid UUID version: "${v.version}"`);v.pattern??(v.pattern=uuid$1(g))}else v.pattern??(v.pattern=uuid$1());$ZodStringFormat.init(g,v)}),$ZodEmail=$constructor("$ZodEmail",(g,v)=>{v.pattern??(v.pattern=email$1),$ZodStringFormat.init(g,v)}),URL_BAD_FORMAT=1,URL_UNPARSEABLE=2;function parseURLObject(g,v){if(!v.normalize&&v.protocol?.source===httpProtocol.source&&!/^https?:\/\//i.test(g))return URL_BAD_FORMAT;try{return new URL(g)}catch{return URL_UNPARSEABLE}}const asciiTabOrNewline=/[\t\n\r]/g;function stripTabAndNewline(g){return g.replace(asciiTabOrNewline,"")}function urlHostnameOk(g,v){return v.lastIndex=0,v.test(g.hostname)}function urlProtocolOk(g,v){return v.lastIndex=0,v.test(g.protocol.endsWith(":")?g.protocol.slice(0,-1):g.protocol)}const $ZodURL=$constructor("$ZodURL",(g,v)=>{$ZodStringFormat.init(g,v),g._zod.check=L=>{try{const R=L.value.trim(),W=parseURLObject(R,v);return W===URL_BAD_FORMAT?void L.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:L.value,inst:g,continue:!v.abort}):W===URL_UNPARSEABLE?void L.issues.push({code:"invalid_format",format:"url",input:L.value,inst:g,continue:!v.abort}):(v.hostname&&!urlHostnameOk(W,v.hostname)&&L.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:v.hostname.source,input:L.value,inst:g,continue:!v.abort}),v.protocol&&!urlProtocolOk(W,v.protocol)&&L.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:v.protocol.source,input:L.value,inst:g,continue:!v.abort}),void(L.value=v.normalize?W.href:stripTabAndNewline(R)))}catch(R){L.issues.push({code:"invalid_format",format:"url",input:L.value,inst:g,continue:!v.abort})}}}),$ZodEmoji=$constructor("$ZodEmoji",(g,v)=>{v.pattern??(v.pattern=emoji$1()),$ZodStringFormat.init(g,v)}),$ZodNanoID=$constructor("$ZodNanoID",(g,v)=>{if(void 0!==v.length&&(!Number.isInteger(v.length)||v.length<1))throw new Error(`Invalid nanoid length: ${v.length}`);v.pattern??(v.pattern=void 0===v.length?nanoid$1:nanoidOfLength(v.length)),$ZodStringFormat.init(g,v)}),$ZodCUID=$constructor("$ZodCUID",(g,v)=>{v.pattern??(v.pattern=cuid$1),$ZodStringFormat.init(g,v)}),$ZodCUID2=$constructor("$ZodCUID2",(g,v)=>{v.pattern??(v.pattern=cuid2$1),$ZodStringFormat.init(g,v)}),$ZodULID=$constructor("$ZodULID",(g,v)=>{v.pattern??(v.pattern=ulid$1),$ZodStringFormat.init(g,v)}),$ZodXID=$constructor("$ZodXID",(g,v)=>{v.pattern??(v.pattern=xid$1),$ZodStringFormat.init(g,v)}),$ZodKSUID=$constructor("$ZodKSUID",(g,v)=>{v.pattern??(v.pattern=ksuid$1),$ZodStringFormat.init(g,v)}),$ZodISODateTime=$constructor("$ZodISODateTime",(g,v)=>{v.pattern??(v.pattern=datetime$1(v)),$ZodStringFormat.init(g,v)}),$ZodISODate=$constructor("$ZodISODate",(g,v)=>{v.pattern??(v.pattern=date$3),$ZodStringFormat.init(g,v)}),$ZodISOTime=$constructor("$ZodISOTime",(g,v)=>{v.pattern??(v.pattern=time$1(v)),$ZodStringFormat.init(g,v)}),$ZodISODuration=$constructor("$ZodISODuration",(g,v)=>{v.pattern??(v.pattern=duration$1),$ZodStringFormat.init(g,v)}),$ZodIPv4=$constructor("$ZodIPv4",(g,v)=>{v.pattern??(v.pattern=ipv4$1),$ZodStringFormat.init(g,v)}),ipv6Alphabet=/^[0-9a-fA-F:.]+$/;function isValidIPv6(g){if(!ipv6Alphabet.test(g))return!1;try{return new URL(`http://[${g}]`),!0}catch{return!1}}const $ZodIPv6=$constructor("$ZodIPv6",(g,v)=>{v.pattern??(v.pattern=ipv6$1),$ZodStringFormat.init(g,v),g._zod.check=L=>{isValidIPv6(L.value)||L.issues.push({code:"invalid_format",format:"ipv6",input:L.value,inst:g,continue:!v.abort})}}),$ZodMAC=$constructor("$ZodMAC",(g,v)=>{v.pattern??(v.pattern=mac$1(v.delimiter)),$ZodStringFormat.init(g,v)}),$ZodCIDRv4=$constructor("$ZodCIDRv4",(g,v)=>{v.pattern??(v.pattern=cidrv4$1),$ZodStringFormat.init(g,v)});function isValidCIDRv6(g){const v=g.split("/");if(2!==v.length)return!1;const[L,R]=v;if(!R)return!1;const W=Number(R);return`${W}`===R&&(!(W<0||W>128)&&isValidIPv6(L))}const $ZodCIDRv6=$constructor("$ZodCIDRv6",(g,v)=>{v.pattern??(v.pattern=cidrv6$1),$ZodStringFormat.init(g,v),g._zod.check=L=>{isValidCIDRv6(L.value)||L.issues.push({code:"invalid_format",format:"cidrv6",input:L.value,inst:g,continue:!v.abort})}});function isValidBase64(g){if(""===g)return!0;if(/\s/.test(g))return!1;if(g.length%4!=0)return!1;try{return atob(g),!0}catch{return!1}}const base64Charset=/^[0-9a-zA-Z+/]*={0,2}$/,$ZodBase64=$constructor("$ZodBase64",(g,v)=>{v.pattern??(v.pattern=base64Charset),$ZodStringFormat.init(g,v),g._zod.check=L=>{isValidBase64(L.value)||L.issues.push({code:"invalid_format",format:"base64",input:L.value,inst:g,continue:!v.abort})}}),base64urlCharset=/^[A-Za-z0-9_-]*$/;function isValidBase64URL(g){if(!base64urlCharset.test(g))return!1;const v=g.replace(/[-_]/g,g=>"-"===g?"+":"/");return isValidBase64(v.padEnd(4*Math.ceil(v.length/4),"="))}const $ZodBase64URL=$constructor("$ZodBase64URL",(g,v)=>{v.pattern??(v.pattern=base64urlCharset),$ZodStringFormat.init(g,v),g._zod.check=L=>{isValidBase64URL(L.value)||L.issues.push({code:"invalid_format",format:"base64url",input:L.value,inst:g,continue:!v.abort})}}),$ZodE164=$constructor("$ZodE164",(g,v)=>{v.pattern??(v.pattern=e164$1),$ZodStringFormat.init(g,v)}),CC_SANITIZE=/[- ]/g;function isLuhnAlgo(g){let v=g.length,L=1,R=0;for(;v;){const W=g.charCodeAt(--v)-48;L^=1,R+=L?[0,2,4,6,8,1,3,5,7,9][W]:W}return R%10==0}function isValidCreditCard(g){return!!creditCard$1.test(g)&&isLuhnAlgo(g.replace(CC_SANITIZE,""))}const $ZodCreditCard=$constructor("$ZodCreditCard",(g,v)=>{v.pattern??(v.pattern=creditCard$1),$ZodStringFormat.init(g,v),g._zod.check=L=>{isValidCreditCard(L.value)||L.issues.push({code:"invalid_format",format:"credit_card",input:L.value,inst:g,continue:!v.abort})}});function isIso7064Mod97(g){let v=0;const L=g.length;for(let R=4;R<L;R++){const L=g.charCodeAt(R);v=(L>=65?100*v+(L-55):10*v+(L-48))%97}for(let L=0;L<4;L++){const R=g.charCodeAt(L);v=(R>=65?100*v+(R-55):10*v+(R-48))%97}return 1===v}function isValidIBAN(g){return!!iban$1.test(g)&&isIso7064Mod97(g)}const $ZodIBAN=$constructor("$ZodIBAN",(g,v)=>{v.pattern??(v.pattern=iban$1),$ZodStringFormat.init(g,v),g._zod.check=L=>{isValidIBAN(L.value)||L.issues.push({code:"invalid_format",format:"iban",input:L.value,inst:g,continue:!v.abort})}});function isValidJWT(g,v=null){try{const L=g.split(".");if(3!==L.length)return!1;const[R]=L;if(!R)return!1;const W=JSON.parse(atob(R));return(!("typ"in W)||"JWT"===W?.typ)&&(!!W.alg&&(!v||"alg"in W&&W.alg===v))}catch{return!1}}const $ZodJWT=$constructor("$ZodJWT",(g,v)=>{$ZodStringFormat.init(g,v),g._zod.check=L=>{isValidJWT(L.value,v.alg)||L.issues.push({code:"invalid_format",format:"jwt",input:L.value,inst:g,continue:!v.abort})}}),$ZodCustomStringFormat=$constructor("$ZodCustomStringFormat",(g,v)=>{$ZodStringFormat.init(g,v),g._zod.check=L=>{v.fn(L.value)||L.issues.push({code:"invalid_format",format:v.format,input:L.value,inst:g,continue:!v.abort})}}),$ZodNumber=$constructor("$ZodNumber",(g,v)=>{$ZodType.init(g,v),g._zod.pattern=number$2,g._zod.parse=(L,R)=>{if(v.coerce)try{L.value=Number(L.value)}catch(g){}const W=L.value;if("number"==typeof W&&!Number.isNaN(W)&&Number.isFinite(W))return L;const ie="number"==typeof W?Number.isNaN(W)?"NaN":Number.isFinite(W)?void 0:String(W):void 0;return L.issues.push({expected:"number",code:"invalid_type",input:W,inst:g,...ie?{received:ie}:{}}),L}}),$ZodNumberFormat=$constructor("$ZodNumberFormat",(g,v)=>{$ZodCheckNumberFormat.init(g,v),$ZodNumber.init(g,v)}),$ZodBoolean=$constructor("$ZodBoolean",(g,v)=>{$ZodType.init(g,v),g._zod.pattern=boolean$2,g._zod.parse=(L,R)=>{if(v.coerce)try{L.value=Boolean(L.value)}catch(g){}const W=L.value;return"boolean"==typeof W||L.issues.push({expected:"boolean",code:"invalid_type",input:W,inst:g}),L}}),$ZodBigInt=$constructor("$ZodBigInt",(g,v)=>{$ZodType.init(g,v),g._zod.pattern=bigint$2,g._zod.parse=(L,R)=>{if(v.coerce)try{L.value=BigInt(L.value)}catch(g){}return"bigint"==typeof L.value||L.issues.push({expected:"bigint",code:"invalid_type",input:L.value,inst:g}),L}}),$ZodBigIntFormat=$constructor("$ZodBigIntFormat",(g,v)=>{$ZodCheckBigIntFormat.init(g,v),$ZodBigInt.init(g,v)}),$ZodSymbol=$constructor("$ZodSymbol",(g,v)=>{$ZodType.init(g,v),g._zod.parse=(v,L)=>{const R=v.value;return"symbol"==typeof R||v.issues.push({expected:"symbol",code:"invalid_type",input:R,inst:g}),v}}),$ZodUndefined=$constructor("$ZodUndefined",(g,v)=>{$ZodType.init(g,v),g._zod.pattern=_undefined$2,g._zod.values=new Set([void 0]),g._zod.parse=(v,L)=>{const R=v.value;return void 0===R||v.issues.push({expected:"undefined",code:"invalid_type",input:R,inst:g}),v}}),$ZodNull=$constructor("$ZodNull",(g,v)=>{$ZodType.init(g,v),g._zod.pattern=_null$2,g._zod.values=new Set([null]),g._zod.parse=(v,L)=>{const R=v.value;return null===R||v.issues.push({expected:"null",code:"invalid_type",input:R,inst:g}),v}}),$ZodAny=$constructor("$ZodAny",(g,v)=>{$ZodType.init(g,v),g._zod.parse=g=>g}),$ZodUnknown=$constructor("$ZodUnknown",(g,v)=>{$ZodType.init(g,v),g._zod.parse=g=>g}),$ZodNever=$constructor("$ZodNever",(g,v)=>{$ZodType.init(g,v),g._zod.parse=(v,L)=>(v.issues.push({expected:"never",code:"invalid_type",input:v.value,inst:g}),v)}),$ZodVoid=$constructor("$ZodVoid",(g,v)=>{$ZodType.init(g,v),g._zod.parse=(v,L)=>{const R=v.value;return void 0===R||v.issues.push({expected:"void",code:"invalid_type",input:R,inst:g}),v}}),$ZodDate=$constructor("$ZodDate",(g,v)=>{$ZodType.init(g,v),g._zod.parse=(L,R)=>{if(v.coerce)try{L.value=new Date(L.value)}catch(g){}const W=L.value,ie=W instanceof Date;return ie&&!Number.isNaN(W.getTime())||L.issues.push({expected:"date",code:"invalid_type",input:W,...ie?{received:"Invalid Date"}:{},inst:g}),L}});function handleArrayResult(g,v,L){g.issues.length&&v.issues.push(...prefixIssues(L,g.issues)),v.value[L]=g.value}const $ZodArray=$constructor("$ZodArray",(g,v)=>{$ZodType.init(g,v);const L=globalConfig.memoizer;L?.attach(g),g._zod.parse=(R,W)=>{const ie=R.value;if(!Array.isArray(ie))return R.issues.push({expected:"array",code:"invalid_type",input:ie,inst:g}),R;R.value=L?L.alloc(g,R,Array(ie.length),W):Array(ie.length);const ce=[],le=W?.abortEarly;for(let g=0;g<ie.length;g++){const L=ie[g],ue=v.element._zod.run({value:L,issues:[]},W);if(ue instanceof Promise)ce.push(ue.then(v=>handleArrayResult(v,R,g)));else if(handleArrayResult(ue,R,g),le&&0!==ue.issues.length&&aborted(ue))break}return ce.length?Promise.all(ce).then(()=>R):R}});function handlePropertyResult(g,v,L,R,W,ie){const ce=L in R,le="optional"===ie;if(ce||!le||"optional"!==W){if(g.issues.length){if(void 0!==W&&le&&!ce)return;v.issues.push(...prefixIssues(L,g.issues))}ce||void 0!==W?void 0===g.value?ce&&(v.value[L]=void 0):v.value[L]=g.value:g.issues.length||v.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[L]})}}const NO_SYMBOL_KEYS=[];function normalizeDef(g){const v=Object.keys(g.shape),L=Object.getOwnPropertySymbols(g.shape),R=L.length?L:NO_SYMBOL_KEYS,W=R.length?[...v,...R]:v;for(const v of W)if(!g.shape?.[v]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(v)}": expected a Zod schema`);const ie=optionalKeys(g.shape);return{...g,allKeys:W,symbolKeys:R,keySet:new Set(v),numKeys:v.length,optionalKeys:new Set(ie)}}function handleCatchall(g,v,L,R,W,ie,ce){const le=[],ue=W.keySet,me=W.catchall._zod,ge=me.def.type,ve=me.optin,xe=me.optout;let _e=0;for(const W in v){if(ce&&L.issues.length!==_e){if(aborted(L,_e))break;_e=L.issues.length}if(ue.has(W))continue;if("__proto__"===W){"never"===ge&&le.push(W);continue}if("never"===ge){le.push(W);continue}const ie=me.run({value:v[W],issues:[]},R);ie instanceof Promise?g.push(ie.then(g=>handlePropertyResult(g,L,W,v,ve,xe))):handlePropertyResult(ie,L,W,v,ve,xe)}return le.length&&L.issues.push({code:"unrecognized_keys",keys:le,input:v,inst:ie,continue:!0}),g.length?Promise.all(g).then(()=>L):L}const $ZodObject=$constructor("$ZodObject",(g,v)=>{$ZodType.init(g,v);const L=Object.getOwnPropertyDescriptor(v,"shape"),R=L?.get?L.get.raw:v.shape??{};if(R){const get=()=>{const g={...R};return Object.defineProperty(v,"shape",{value:g}),get.raw=g,g};get.raw=R,Object.defineProperty(v,"shape",{get:get})}const W=cached(()=>normalizeDef(v));defineLazyInternal(g,"propValues",g=>{const v=g.def.shape,L={};for(const g in v){const R=v[g]._zod;if(R.values){Object.prototype.hasOwnProperty.call(L,g)||assignProp(L,g,new Set);for(const v of R.values)L[g].add(v);void 0!==R.optin&&L[g].add(void 0)}}return L});const ie=isObject,ce=v.catchall;let le;const ue=globalConfig.memoizer;ue?.attach(g),g._zod.parse=(v,L)=>{le??(le=W.value);const R=v.value;if(!ie(R))return v.issues.push({expected:"object",code:"invalid_type",input:R,inst:g}),v;v.value=ue?ue.alloc(g,v,{},L):{};const me=[],ge=le.shape,ve=L?.abortEarly;let xe=v.issues.length;for(const g of le.allKeys){if(ve&&v.issues.length!==xe){if(aborted(v,xe))break;xe=v.issues.length}if("__proto__"===g)continue;const W=ge[g],ie=W._zod.optin,ce=W._zod.optout,le=W._zod.run({value:R[g],issues:[]},L);le instanceof Promise?me.push(le.then(L=>handlePropertyResult(L,v,g,R,ie,ce))):handlePropertyResult(le,v,g,R,ie,ce)}return ce?handleCatchall(me,R,v,L,W.value,g,!0===ve):me.length?Promise.all(me).then(()=>v):v}}),$ZodObjectJIT=$constructor("$ZodObjectJIT",(g,v)=>{$ZodObject.init(g,v);const L=g._zod.parse,R=cached(()=>normalizeDef(v)),W=globalConfig.memoizer;let ie;const ce=isObject,le=!globalConfig.jitless,ue=le&&allowsEval.value,me=v.catchall;let ge;g._zod.parse=(ve,xe)=>{ge??(ge=R.value);const _e=ve.value;return ce(_e)?le&&ue&&!1===xe?.async&&!0!==xe.jitless?(ie||(ie=(v=>{const L=R.value,ie=L.symbolKeys,ce=new Doc(["payload","ctx"],{shape:v,inst:g,memo:W,syms:ie}),parseStr=g=>`shape[${g}]._zod.run({ value: input[${g}], issues: [] }, ctx)`,prefixStr=(g,v)=>`\n let ${g}_ab = false;\n for (let i = 0; i < ${g}.issues.length; i++) {\n const iss = ${g}.issues[i];\n iss.path = iss.path ? [${v}, ...iss.path] : [${v}];\n payload.issues.push(iss);\n if (iss.continue !== true) ${g}_ab = true;\n }\n if (${g}_ab && ctx && ctx.abortEarly) {\n payload.value = newResult;\n return payload;\n }`;ce.write("const input = payload.value;");const le=Object.create(null);let ue=0;for(const g of L.allKeys)le[g]="key_"+ue++;ce.write(W?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(const g of L.allKeys){if("__proto__"===g)continue;const L=le[g],R="symbol"==typeof g?`syms[${ie.indexOf(g)}]`:esc(g),W=`${R} in input`,ue=v[g],me=ue?._zod?.optin,ge=void 0!==me,ve="optional"===ue?._zod?.optout;if(ce.write(`const ${L} = ${parseStr(R)};`),ge&&ve){const g="optional"===me?`${L}_present`:`${L}.value !== undefined || ${L}_present`;ce.write(`\n const ${L}_present = ${W};\n if (!${L}.issues.length || ${L}_present) {\n if (${L}.issues.length) {${prefixStr(L,R)}\n }\n\n if (${g}) {\n newResult[${R}] = ${L}.value;\n }\n }\n\n `)}else ge?ce.write(`\n if (${L}.issues.length) {${prefixStr(L,R)}\n }\n \n if (${L}.value === undefined) {\n if (${W}) {\n newResult[${R}] = undefined;\n }\n } else {\n newResult[${R}] = ${L}.value;\n }\n\n `):ce.write(`\n const ${L}_present = ${W};\n if (${L}.issues.length) {${prefixStr(L,R)}\n }\n if (!${L}_present && !${L}.issues.length) {\n payload.issues.push({\n code: "invalid_type",\n expected: "nonoptional",\n input: undefined,\n path: [${R}]\n });\n if (ctx && ctx.abortEarly) {\n payload.value = newResult;\n return payload;\n }\n }\n\n if (${L}_present) {\n newResult[${R}] = ${L}.value;\n }\n\n `)}return ce.write("payload.value = newResult;"),ce.write("return payload;"),ce.compile()})(v.shape)),ve=ie(ve,xe),me?handleCatchall([],_e,ve,xe,ge,g,!0===xe?.abortEarly):ve):L(ve,xe):(ve.issues.push({expected:"object",code:"invalid_type",input:_e,inst:g}),ve)}});function handleUnionResults(g,v,L,R){for(const L of g)if(0===L.issues.length)return v.value=L.value,v;const W=g.filter(g=>!aborted(g));return 1===W.length?(v.value=W[0].value,W[0]):(v.issues.push({code:"invalid_union",input:v.value,inst:L,errors:g.map(g=>g.issues.map(g=>finalizeIssue(g,R,config())))}),v)}const $ZodUnion=$constructor("$ZodUnion",(g,v)=>{$ZodType.init(g,v),defineLazyInternal(g,"optin",g=>g.def.options.some(g=>"defaulted"===g._zod.optin)?"defaulted":g.def.options.some(g=>void 0!==g._zod.optin)?"optional":void 0),defineLazyInternal(g,"optout",g=>g.def.options.some(g=>"optional"===g._zod.optout)?"optional":void 0),defineLazyInternal(g,"values",g=>{if(g.def.options.every(g=>g._zod.values))return new Set(g.def.options.flatMap(g=>Array.from(g._zod.values)))}),defineLazyInternal(g,"pattern",g=>{if(g.def.options.every(g=>g._zod.pattern)){const v=g.def.options.map(g=>g._zod.pattern);return new RegExp(`^(${v.map(g=>cleanRegex(g.source)).join("|")})$`)}});const L=1===v.options.length?v.options[0]._zod.run:null;g._zod.parse=(R,W)=>{if(L)return L(R,W);let ie=!1;const ce=[];for(const g of v.options){const v=g._zod.run({value:R.value,issues:[]},W);if(v instanceof Promise)ce.push(v),ie=!0;else{if(0===v.issues.length)return v;ce.push(v)}}return ie?Promise.all(ce).then(v=>handleUnionResults(v,R,g,W)):handleUnionResults(ce,R,g,W)}});function handleExclusiveUnionResults(g,v,L,R){const W=[];for(let v=0;v<g.length;v++)0===g[v].issues.length&&W.push(v);return 1===W.length?(v.value=g[W[0]].value,v):(0===W.length?v.issues.push({code:"invalid_union",input:v.value,inst:L,errors:g.map(g=>g.issues.map(g=>finalizeIssue(g,R,config())))}):v.issues.push({code:"invalid_union",input:v.value,inst:L,errors:[],inclusive:!1,matches:W}),v)}const $ZodXor=$constructor("$ZodXor",(g,v)=>{$ZodUnion.init(g,v),v.inclusive=!1;const L=1===v.options.length?v.options[0]._zod.run:null;g._zod.parse=(R,W)=>{if(L)return L(R,W);let ie=!1;const ce=[];for(const g of v.options){const v=g._zod.run({value:R.value,issues:[]},W);v instanceof Promise?(ce.push(v),ie=!0):ce.push(v)}return ie?Promise.all(ce).then(v=>handleExclusiveUnionResults(v,R,g,W)):handleExclusiveUnionResults(ce,R,g,W)}});function getDiscriminatedOption(g,v){const L=g._zod;let R=L.bag.optionsMap;R||(R=discriminatorMap(L.def),L.bag.optionsMap=R);const W=R.get(v);if(null===W)throw new Error(`Ambiguous discriminator value "${String(v)}"`);return W}function discriminatorMap(g){const v=new Map;for(const L of g.options){const R=L._zod.propValues?.[g.discriminator];if(!R||0===R.size)throw new Error(`Invalid discriminated union option at index "${g.options.indexOf(L)}"`);for(const g of R)if(v.has(g)){if(void 0!==g)throw new Error(`Duplicate discriminator value "${String(g)}"`);v.set(g,null)}else v.set(g,L)}return v}const $ZodDiscriminatedUnion=$constructor("$ZodDiscriminatedUnion",(g,v)=>{v.inclusive=!1,$ZodUnion.init(g,v);const L=g._zod.parse;defineLazyInternal(g,"propValues",g=>{const v={};let L=0;for(const R of g.def.options){const W=R._zod.propValues;if(!W||0===Object.keys(W).length)throw new Error(`Invalid discriminated union option at index "${g.def.options.indexOf(R)}"`);W[g.def.discriminator]?.has(void 0)&&L++;for(const[g,L]of Object.entries(W)){Object.prototype.hasOwnProperty.call(v,g)||assignProp(v,g,new Set);for(const R of L)v[g].add(R)}}return!g.def.unionFallback&&L>1&&v[g.def.discriminator]?.delete(void 0),v}),v.options.forEach((g,L)=>{const R=rawShape(g._zod.def);if(R&&!Object.prototype.hasOwnProperty.call(R,v.discriminator))throw new Error(`Invalid discriminated union option at index "${L}"`)});const R=cached(()=>discriminatorMap(v));g._zod.parse=(W,ie)=>{const ce=W.value;if(!isObject(ce))return W.issues.push({code:"invalid_type",expected:"object",input:ce,inst:g}),W;const le=ce?.[v.discriminator],ue=R.value.get(le);return!ue||void 0===le&&"backward"===ie.direction?v.unionFallback||"backward"===ie.direction?L(W,ie):(W.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:v.discriminator,options:Array.from(R.value.keys()).filter(g=>null!==R.value.get(g)),input:ce,path:[v.discriminator],inst:g}),W):ue._zod.run(W,ie)}}),$ZodIntersection=$constructor("$ZodIntersection",(g,v)=>{$ZodType.init(g,v),g._zod.parse=(g,L)=>{const R=g.value,W=v.left._zod.run({value:R,issues:[]},L),ie=v.right._zod.run({value:R,issues:[]},L);return W instanceof Promise||ie instanceof Promise?Promise.all([W,ie]).then(([v,L])=>handleIntersectionResults(g,v,L)):handleIntersectionResults(g,W,ie)}});function mergeValues(g,v){if(g===v)return{valid:!0,data:g};if(g instanceof Date&&v instanceof Date&&+g===+v)return{valid:!0,data:g};if(isPlainObject(g)&&isPlainObject(v)){const L=Object.keys(v),R=Object.keys(g).filter(g=>-1!==L.indexOf(g)),W={...g,...v};Object.prototype.hasOwnProperty.call(W,"__proto__")&&delete W.__proto__;for(const L of R){if("__proto__"===L)continue;const R=mergeValues(g[L],v[L]);if(!R.valid)return{valid:!1,mergeErrorPath:[L,...R.mergeErrorPath]};W[L]=R.data}return{valid:!0,data:W}}if(Array.isArray(g)&&Array.isArray(v)){if(g.length!==v.length)return{valid:!1,mergeErrorPath:[]};const L=[];for(let R=0;R<g.length;R++){const W=mergeValues(g[R],v[R]);if(!W.valid)return{valid:!1,mergeErrorPath:[R,...W.mergeErrorPath]};L.push(W.data)}return{valid:!0,data:L}}return{valid:!1,mergeErrorPath:[]}}function handleIntersectionResults(g,v,L){const R=new Map;let W;const ie=new Map,collect=(g,v)=>{let L;if("unrecognized_keys"!==g.code||g.path?.length){if("invalid_key"!==g.code||"record"!==g.origin||1!==g.path?.length)return!1;{const v=String(g.path[0]);ie.has(v)||ie.set(v,g),L=[v]}}else W??(W=g),L=g.keys;for(const g of L)R.has(g)||R.set(g,{}),R.get(g)[v]=!0;return!0};for(const L of v.issues)collect(L,"l")||g.issues.push(L);for(const v of L.issues)collect(v,"r")||g.issues.push(v);const ce=[...R].filter(([,g])=>g.l&&g.r).map(([g])=>g);if(ce.length){const v=W?ce.filter(g=>W.keys.includes(g)):[];v.length&&g.issues.push({...W,keys:v});for(const L of ce)!v.includes(L)&&ie.has(L)&&g.issues.push(ie.get(L))}const le=mergeValues(v.value,L.value);if(!le.valid){if(aborted(g))return g;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(le.mergeErrorPath)}`)}return g.value=le.data,g}const $ZodTuple=$constructor("$ZodTuple",(g,v)=>{$ZodType.init(g,v);const L=v.items,R=globalConfig.memoizer;R?.attach(g),g._zod.parse=(W,ie)=>{const ce=W.value;if(!Array.isArray(ce))return W.issues.push({input:ce,inst:g,expected:"tuple",code:"invalid_type"}),W;W.value=R?R.alloc(g,W,[],ie):[];const le=[],ue=getTupleOptStart$1(L,"optin"),me=getTupleOptStart$1(L,"optout");if(!v.rest){if(ce.length<ue)return W.issues.push({code:"too_small",minimum:ue,inclusive:!0,input:ce,inst:g,origin:"array"}),W;ce.length>L.length&&W.issues.push({code:"too_big",maximum:L.length,inclusive:!0,input:ce,inst:g,origin:"array"})}const ge=new Array(L.length),ve=v.rest?ie?.abortEarly:void 0;let xe=!1;for(let g=0;g<L.length;g++){const v=L[g]._zod.run({value:ce[g],issues:[]},ie);v instanceof Promise?le.push(v.then(v=>{ge[g]=v})):(ge[g]=v,ve&&!xe&&v.issues.length&&(xe=aborted(v)))}if(v.rest&&!xe){let g=L.length-1;const R=ce.slice(L.length);let ue=W.issues.length;for(const L of R){if(ve&&W.issues.length!==ue){if(aborted(W,ue))break;ue=W.issues.length}g++;const R=v.rest._zod.run({value:L,issues:[]},ie);R instanceof Promise?le.push(R.then(v=>handleTupleResult(v,W,g))):handleTupleResult(R,W,g)}}return le.length?Promise.all(le).then(()=>handleTupleResults(ge,W,L,ce,me)):handleTupleResults(ge,W,L,ce,me)}});function getTupleOptStart$1(g,v){for(let L=g.length-1;L>=0;L--){if(!("optin"===v?void 0!==g[L]._zod.optin:"optional"===g[L]._zod.optout))return L+1}return 0}function handleTupleResult(g,v,L){g.issues.length&&v.issues.push(...prefixIssues(L,g.issues)),v.value[L]=g.value}function handleTupleResults(g,v,L,R,W){for(let ie=0;ie<L.length;ie++){const ce=g[ie],le=ie<R.length;if(!le&&ie>=W&&"optional"===L[ie]._zod.optin){v.value.length=ie;break}if(ce.issues.length){if(!le&&ie>=W){v.value.length=ie;break}v.issues.push(...prefixIssues(ie,ce.issues))}v.value[ie]=ce.value}for(let g=v.value.length-1;g>=R.length&&("optional"===L[g]._zod.optout&&void 0===v.value[g]);g--)v.value.length=g;return v}const $ZodRecord=$constructor("$ZodRecord",(g,v)=>{$ZodType.init(g,v);const L=globalConfig.memoizer;L?.attach(g),g._zod.parse=(R,W)=>{const ie=R.value;if(!isPlainObject(ie))return R.issues.push({expected:"record",code:"invalid_type",input:ie,inst:g}),R;const ce=[],le=v.keyType._zod.values;if(le&&!v.partial){R.value=L?L.alloc(g,R,{},W):{};const ue=new Set;for(const L of le)if("string"==typeof L||"number"==typeof L||"symbol"==typeof L){if(ue.add("number"==typeof L?L.toString():L),"__proto__"===L)continue;const le=v.keyType._zod.run({value:L,issues:[]},W);if(le instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(le.issues.length){R.issues.push({code:"invalid_key",origin:"record",issues:le.issues.map(g=>finalizeIssue(g,W,config())),input:L,path:[L],inst:g});continue}const me=le.value;if("__proto__"===me)continue;const ge=v.valueType._zod.run({value:ie[L],issues:[]},W);ge instanceof Promise?ce.push(ge.then(g=>{g.issues.length&&R.issues.push(...prefixIssues(L,g.issues)),R.value[me]=g.value})):(ge.issues.length&&R.issues.push(...prefixIssues(L,ge.issues)),R.value[me]=ge.value)}let me;for(const g in ie)if(!ue.has(g))if("loose"===v.mode){if("__proto__"===g)continue;R.value[g]=ie[g]}else me=me??[],me.push(g);me&&me.length>0&&R.issues.push({code:"unrecognized_keys",input:ie,inst:g,keys:me,continue:!0})}else{let ue;R.value=L?L.alloc(g,R,{},W):{};for(const L of Reflect.ownKeys(ie)){if("__proto__"===L)continue;if(!Object.prototype.propertyIsEnumerable.call(ie,L))continue;let me=v.keyType._zod.run({value:L,issues:[]},W);if(me instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if("string"==typeof L&&number$2.test(L)&&me.issues.length){const g=v.keyType._zod.run({value:Number(L),issues:[]},W);if(g instanceof Promise)throw new Error("Async schemas not supported in object keys currently");0===g.issues.length&&(me=g)}if(me.issues.length){"loose"===v.mode?R.value[L]=ie[L]:le?(ue=ue??[],ue.push(L)):R.issues.push({code:"invalid_key",origin:"record",issues:me.issues.map(g=>finalizeIssue(g,W,config())),input:L,path:[L],inst:g});continue}const ge=me.value;if("__proto__"===ge)continue;const ve=v.valueType._zod.run({value:ie[L],issues:[]},W);ve instanceof Promise?ce.push(ve.then(g=>{g.issues.length&&R.issues.push(...prefixIssues(L,g.issues)),R.value[ge]=g.value})):(ve.issues.length&&R.issues.push(...prefixIssues(L,ve.issues)),R.value[ge]=ve.value)}ue&&ue.length>0&&R.issues.push({code:"unrecognized_keys",input:ie,inst:g,keys:ue,continue:!0})}return ce.length?Promise.all(ce).then(()=>R):R}}),$ZodMap=$constructor("$ZodMap",(g,v)=>{$ZodType.init(g,v);const L=globalConfig.memoizer;L?.attach(g),g._zod.parse=(R,W)=>{const ie=R.value;if(!(ie instanceof Map))return R.issues.push({expected:"map",code:"invalid_type",input:ie,inst:g}),R;const ce=[];R.value=L?L.alloc(g,R,new Map,W):new Map;const le=W?.abortEarly;let ue=R.issues.length;for(const[L,me]of ie){if(le&&R.issues.length!==ue){if(aborted(R,ue))break;ue=R.issues.length}const ge=v.keyType._zod.run({value:L,issues:[]},W),ve=v.valueType._zod.run({value:me,issues:[]},W);ge instanceof Promise||ve instanceof Promise?ce.push(Promise.all([ge,ve]).then(([v,ce])=>{handleMapResult(v,ce,R,L,ie,g,W)})):handleMapResult(ge,ve,R,L,ie,g,W)}return ce.length?Promise.all(ce).then(()=>R):R}});function handleMapResult(g,v,L,R,W,ie,ce){g.issues.length&&(propertyKeyTypes.has(typeof R)?L.issues.push(...prefixIssues(R,g.issues)):L.issues.push({code:"invalid_key",origin:"map",input:W,inst:ie,issues:g.issues.map(g=>finalizeIssue(g,ce,config()))})),v.issues.length&&(propertyKeyTypes.has(typeof R)?L.issues.push(...prefixIssues(R,v.issues)):L.issues.push({origin:"map",code:"invalid_element",input:W,inst:ie,key:R,issues:v.issues.map(g=>finalizeIssue(g,ce,config()))})),L.value.set(g.value,v.value)}const $ZodSet=$constructor("$ZodSet",(g,v)=>{$ZodType.init(g,v);const L=globalConfig.memoizer;L?.attach(g),g._zod.parse=(R,W)=>{const ie=R.value;if(!(ie instanceof Set))return R.issues.push({input:ie,inst:g,expected:"set",code:"invalid_type"}),R;const ce=[];R.value=L?L.alloc(g,R,new Set,W):new Set;const le=W?.abortEarly;let ue=R.issues.length;for(const g of ie){if(le&&R.issues.length!==ue){if(aborted(R,ue))break;ue=R.issues.length}const L=v.valueType._zod.run({value:g,issues:[]},W);L instanceof Promise?ce.push(L.then(g=>handleSetResult(g,R))):handleSetResult(L,R)}return ce.length?Promise.all(ce).then(()=>R):R}});function handleSetResult(g,v){g.issues.length&&v.issues.push(...g.issues),v.value.add(g.value)}const $ZodEnum=$constructor("$ZodEnum",(g,v)=>{$ZodType.init(g,v);const L=getEnumValues(v.entries),R=new Set(L);g._zod.values=R,defineLazyInternal(g,"pattern",g=>{const v=getEnumValues(g.def.entries).filter(g=>propertyKeyTypes.has(typeof g));return new RegExp(v.length?`^(${v.map(g=>escapeRegex$1(g.toString())).join("|")})$`:"^[^\\s\\S]$")}),g._zod.parse=(v,W)=>{const ie=v.value;return R.has(ie)||v.issues.push({code:"invalid_value",values:L,input:ie,inst:g}),v}}),$ZodLiteral=$constructor("$ZodLiteral",(g,v)=>{$ZodType.init(g,v);const L=new Set(v.values);g._zod.values=L,defineLazyInternal(g,"pattern",g=>{const v=g.def.values;return new RegExp(v.length?`^(${v.map(g=>"string"==typeof g?escapeRegex$1(g):g?escapeRegex$1(g.toString()):String(g)).join("|")})$`:"^[^\\s\\S]$")}),g._zod.parse=(R,W)=>{const ie=R.value;return L.has(ie)||R.issues.push({code:"invalid_value",values:v.values,input:ie,inst:g}),R}}),$ZodFile=$constructor("$ZodFile",(g,v)=>{$ZodType.init(g,v),g._zod.parse=(v,L)=>{const R=v.value;return R instanceof File||v.issues.push({expected:"file",code:"invalid_type",input:R,inst:g}),v}}),$ZodTransform=$constructor("$ZodTransform",(g,v)=>{$ZodType.init(g,v),g._zod.optin="optional",globalConfig.memoizer?.guard(g),g._zod.parse=(L,R)=>{if("backward"===R.direction)throw new $ZodEncodeError(g.constructor.name);const W=v.transform(L.value,L);if(R.async){return(W instanceof Promise?W:Promise.resolve(W)).then(g=>(L.value=g,L))}if(W instanceof Promise)throw new $ZodAsyncError;return L.value=W,L}});function handleOptionalResult(g,v){return g.value=v.issues.length?void 0:v.value,g}const $ZodOptional=$constructor("$ZodOptional",(g,v)=>{$ZodType.init(g,v),defineLazyInternal(g,"optin",g=>"defaulted"===g.def.innerType._zod.optin?"defaulted":"optional"),g._zod.optout="optional",defineLazyInternal(g,"values",g=>{const v=g.def.innerType._zod.values;return v?new Set([...v,void 0]):void 0}),defineLazyInternal(g,"pattern",g=>{const v=g.def.innerType._zod.pattern;return v?new RegExp(`^(${cleanRegex(v.source)})?$`):void 0}),g._zod.parse=(g,L)=>{if(void 0===g.value){if("defaulted"!==v.innerType._zod.optin)return g;const R=v.innerType._zod.run({value:g.value,issues:[]},L);return R instanceof Promise?R.then(v=>handleOptionalResult(g,v)):handleOptionalResult(g,R)}return v.innerType._zod.run(g,L)}}),$ZodExactOptional=$constructor("$ZodExactOptional",(g,v)=>{$ZodOptional.init(g,v),defineLazyInternal(g,"values",g=>g.def.innerType._zod.values),defineLazyInternal(g,"pattern",g=>g.def.innerType._zod.pattern),g._zod.parse=(g,L)=>v.innerType._zod.run(g,L)}),$ZodNullable=$constructor("$ZodNullable",(g,v)=>{$ZodType.init(g,v),defineLazyInternal(g,"optin",g=>g.def.innerType._zod.optin),defineLazyInternal(g,"optout",g=>g.def.innerType._zod.optout),defineLazyInternal(g,"pattern",g=>{const v=g.def.innerType._zod.pattern;return v?new RegExp(`^(${cleanRegex(v.source)}|null)$`):void 0}),defineLazyInternal(g,"values",g=>g.def.innerType._zod.values?new Set([...g.def.innerType._zod.values,null]):void 0),g._zod.parse=(g,L)=>null===g.value?g:v.innerType._zod.run(g,L)}),$ZodDefault=$constructor("$ZodDefault",(g,v)=>{$ZodType.init(g,v),g._zod.optin="defaulted",defineLazyInternal(g,"values",g=>g.def.innerType._zod.values),g._zod.parse=(g,L)=>{if("backward"===L.direction)return v.innerType._zod.run(g,L);if(void 0===g.value)return g.value=v.defaultValue,g;const R=v.innerType._zod.run(g,L);return R instanceof Promise?R.then(g=>handleDefaultResult(g,v)):handleDefaultResult(R,v)}});function handleDefaultResult(g,v){return void 0===g.value&&(g.value=v.defaultValue),g}const $ZodPrefault=$constructor("$ZodPrefault",(g,v)=>{$ZodType.init(g,v),g._zod.optin="defaulted",defineLazyInternal(g,"values",g=>g.def.innerType._zod.values),g._zod.parse=(g,L)=>("backward"===L.direction||void 0===g.value&&(g.value=v.defaultValue),v.innerType._zod.run(g,L))}),$ZodNonOptional=$constructor("$ZodNonOptional",(g,v)=>{$ZodType.init(g,v),defineLazyInternal(g,"values",g=>{const v=g.def.innerType._zod.values;return v?new Set([...v].filter(g=>void 0!==g)):void 0}),g._zod.parse=(L,R)=>{const W=v.innerType._zod.run(L,R);return W instanceof Promise?W.then(v=>handleNonOptionalResult(v,g)):handleNonOptionalResult(W,g)}});function handleNonOptionalResult(g,v){return g.issues.length||void 0!==g.value||g.issues.push({code:"invalid_type",expected:"nonoptional",input:g.value,inst:v}),g}const $ZodSuccess=$constructor("$ZodSuccess",(g,v)=>{$ZodType.init(g,v),g._zod.parse=(g,L)=>{if("backward"===L.direction)throw new $ZodEncodeError("ZodSuccess");const R=v.innerType._zod.run(g,L);return R instanceof Promise?R.then(v=>(g.value=0===v.issues.length,g)):(g.value=0===R.issues.length,g)}});function handleCatchResult(g,v,L,R){return v.issues.length?(g.value=L.catchValue({...v,value:g.value,error:{issues:v.issues.map(g=>finalizeIssue(g,R,config()))},input:g.value}),g):(g.value=v.value,v.memo&&(g.memo=!0),g)}const $ZodCatch=$constructor("$ZodCatch",(g,v)=>{$ZodType.init(g,v),defineLazyInternal(g,"optin",g=>"defaulted"===g.def.innerType._zod.optin?"defaulted":"optional"),defineLazyInternal(g,"optout",g=>g.def.innerType._zod.optout),defineLazyInternal(g,"values",g=>g.def.innerType._zod.values),g._zod.parse=(g,L)=>{if("backward"===L.direction)return v.innerType._zod.run(g,L);const R=v.innerType._zod.run({value:g.value,issues:[]},L);return R instanceof Promise?R.then(R=>handleCatchResult(g,R,v,L)):handleCatchResult(g,R,v,L)}}),$ZodNaN=$constructor("$ZodNaN",(g,v)=>{$ZodType.init(g,v),g._zod.parse=(v,L)=>("number"==typeof v.value&&Number.isNaN(v.value)||v.issues.push({input:v.value,inst:g,expected:"nan",code:"invalid_type"}),v)}),$ZodPipe=$constructor("$ZodPipe",(g,v)=>{$ZodType.init(g,v),defineLazyInternal(g,"values",g=>g.def.in._zod.values),defineLazyInternal(g,"optin",g=>g.def.in._zod.optin),defineLazyInternal(g,"optout",g=>g.def.out._zod.optout),defineLazyInternal(g,"propValues",g=>g.def.in._zod.propValues),g._zod.parse=(g,L)=>{if("backward"===L.direction){const R=v.out._zod.run(g,L);return R instanceof Promise?R.then(g=>handlePipeResult(g,v.in,L)):handlePipeResult(R,v.in,L)}const R=v.in._zod.run(g,L);return R instanceof Promise?R.then(g=>handlePipeResult(g,v.out,L)):handlePipeResult(R,v.out,L)}});function handlePipeResult(g,v,L){return g.issues.some(g=>"unrecognized_keys"!==g.code)?(g.aborted=!0,g):v._zod.run({value:g.value,issues:g.issues},L)}const $ZodCodec=$constructor("$ZodCodec",(g,v)=>{$ZodType.init(g,v),defineLazyInternal(g,"values",g=>g.def.in._zod.values),defineLazyInternal(g,"optin",g=>g.def.in._zod.optin),defineLazyInternal(g,"optout",g=>g.def.out._zod.optout),defineLazyInternal(g,"propValues",g=>g.def.in._zod.propValues),g._zod.parse=(g,L)=>{if("forward"===(L.direction||"forward")){const R=v.in._zod.run(g,L);return R instanceof Promise?R.then(g=>handleCodecAResult(g,v,L)):handleCodecAResult(R,v,L)}{const R=v.out._zod.run(g,L);return R instanceof Promise?R.then(g=>handleCodecAResult(g,v,L)):handleCodecAResult(R,v,L)}}});function handleCodecAResult(g,v,L){if(g.issues.length)return g.aborted=!0,g;if("forward"===(L.direction||"forward")){const R=v.transform(g.value,g);return R instanceof Promise?R.then(R=>handleCodecTxResult(g,R,v.out,L)):handleCodecTxResult(g,R,v.out,L)}{const R=v.reverseTransform(g.value,g);return R instanceof Promise?R.then(R=>handleCodecTxResult(g,R,v.in,L)):handleCodecTxResult(g,R,v.in,L)}}function handleCodecTxResult(g,v,L,R){return g.issues.length?(g.aborted=!0,g):L._zod.run({value:v,issues:g.issues},R)}const $ZodPreprocess=$constructor("$ZodPreprocess",(g,v)=>{$ZodPipe.init(g,v)}),$ZodReadonly=$constructor("$ZodReadonly",(g,v)=>{$ZodType.init(g,v),defineLazyInternal(g,"propValues",g=>g.def.innerType._zod.propValues),defineLazyInternal(g,"values",g=>g.def.innerType._zod.values),defineLazyInternal(g,"optin",g=>g.def.innerType?._zod?.optin),defineLazyInternal(g,"optout",g=>g.def.innerType?._zod?.optout),g._zod.parse=(g,L)=>{if("backward"===L.direction)return v.innerType._zod.run(g,L);const R=v.innerType._zod.run(g,L);return R instanceof Promise?R.then(handleReadonlyResult):handleReadonlyResult(R)}});function handleReadonlyResult(g){return g.memo||(g.value=Object.freeze(g.value)),g}function leafPattern(g){const v=g._zod.def;let L,R,W=v.pattern,ie=!!v.format?.includes("int");for(const g of v.checks??[]){const v=g._zod.def;v.pattern&&(W=v.pattern),ie||(ie=!!v.format?.includes("int"));const ce=v.minimum??v.length,le=v.maximum??v.length;void 0!==ce&&(void 0===L||ce>L)&&(L=ce),void 0!==le&&(void 0===R||le<R)&&(R=le)}if(W)return W.source;if(void 0!==L&&void 0!==R&&L>R)return"(?!)";if(void 0!==L||void 0!==R)return string$2({minimum:L,maximum:R}).source;const ce=g._zod.pattern;return(ie&&ce===number$2?integer:ce)?.source}function partPattern(g){const v=g._zod.def,L=g._zod.pattern?.source,R=v.innerType??g._zod.innerType;if(R){const g=R._zod.pattern?.source,v=partPattern(R);return L&&g&&v&&v!==g?L.replace(cleanRegex(g),()=>cleanRegex(v)):L}if(v.options){const g=v.options.map(partPattern);if(g.every(Boolean))return`^(${g.map(g=>cleanRegex(g)).join("|")})$`}return leafPattern(g)}const $ZodTemplateLiteral=$constructor("$ZodTemplateLiteral",(g,v)=>{$ZodType.init(g,v);const L=[];for(const g of v.parts)if("object"==typeof g&&null!==g){const v=partPattern(g);if(!v)throw new Error(`Invalid template literal part, no pattern found: ${[...g._zod.traits].shift()}`);L.push(cleanRegex(v))}else{if(null!==g&&!primitiveTypes.has(typeof g))throw new Error(`Invalid template literal part: ${g}`);L.push(escapeRegex$1(`${g}`))}g._zod.pattern=new RegExp(`^${L.join("")}$`),g._zod.parse=(L,R)=>"string"!=typeof L.value?(L.issues.push({input:L.value,inst:g,expected:"string",code:"invalid_type"}),L):(g._zod.pattern.lastIndex=0,g._zod.pattern.test(L.value)||L.issues.push({input:L.value,inst:g,code:"invalid_format",format:v.format??"template_literal",pattern:g._zod.pattern.source}),L)}),$ZodFunction=$constructor("$ZodFunction",(g,v)=>($ZodType.init(g,v),Object.defineProperty(g,"_def",{value:v}),g._zod.def=v,g.implement=v=>{if("function"!=typeof v)throw new Error("implement() must be called with a function");return Object.defineProperty(function(...L){const R=g._def.input?parse$1(g._def.input,L):L,W=Reflect.apply(v,this,R);return g._def.output?parse$1(g._def.output,W):W},"_zod",{value:g._zod,enumerable:!1})},g.implementAsync=v=>{if("function"!=typeof v)throw new Error("implementAsync() must be called with a function");return Object.defineProperty(async function(...L){const R=g._def.input?await parseAsync$1(g._def.input,L):L,W=await Reflect.apply(v,this,R);return g._def.output?await parseAsync$1(g._def.output,W):W},"_zod",{value:g._zod,enumerable:!1})},g._zod.parse=(v,L)=>{if("function"!=typeof v.value)return v.issues.push({code:"invalid_type",expected:"function",input:v.value,inst:g}),v;const R=g._def.output&&"promise"===g._def.output._zod.def.type;return v.value=R?g.implementAsync(v.value):g.implement(v.value),v},g.input=(...v)=>{const L=g.constructor;return Array.isArray(v[0])?new L({type:"function",input:new $ZodTuple({type:"tuple",items:v[0],rest:v[1]}),output:g._def.output}):new L({type:"function",input:v[0],output:g._def.output})},g.output=v=>new(0,g.constructor)({type:"function",input:g._def.input,output:v}),g)),$ZodPromise=$constructor("$ZodPromise",(g,v)=>{$ZodType.init(g,v),g._zod.parse=(g,L)=>Promise.resolve(g.value).then(g=>v.innerType._zod.run({value:g,issues:[]},L))}),$ZodLazy=$constructor("$ZodLazy",(g,v)=>{$ZodType.init(g,v),defineLazy(g._zod,"innerType",()=>{const g=v;return g._cachedInner||(g._cachedInner=v.getter()),g._cachedInner}),defineLazyInternal(g,"pattern",g=>g.innerType?._zod?.pattern),defineLazyInternal(g,"propValues",g=>g.innerType?._zod?.propValues),defineLazyInternal(g,"optin",g=>g.innerType?._zod?.optin??void 0),defineLazyInternal(g,"optout",g=>g.innerType?._zod?.optout??void 0),g._zod.parse=(v,L)=>g._zod.innerType._zod.run(v,L)}),$ZodCustom=$constructor("$ZodCustom",(g,v)=>{$ZodCheck.init(g,v),$ZodType.init(g,v),g._zod.parse=(g,v)=>g,g._zod.check=L=>{const R=L.value,W=v.fn(R);if(W instanceof Promise)return W.then(v=>handleRefineResult(v,L,R,g));handleRefineResult(W,L,R,g)}});function handleRefineResult(g,v,L,R){if(!g){const g={code:"custom",input:L,inst:R,path:[...R._zod.def.path??[]],continue:!R._zod.def.abort};R._zod.def.params&&(g.params=R._zod.def.params),v.issues.push(issue(g))}}function handlePropertiesResult(g,v,L){g.issues.length&&v.issues.push(...prefixIssues(L,g.issues))}const $ZodProperties=$constructor("$ZodProperties",(g,v)=>{$ZodType.init(g,v),$ZodCheck.init(g,v);const L=globalConfig.memoizer;let R;L?.attach(g);const runShape=(g,L)=>{R??(R=Reflect.ownKeys(v.shape).map(g=>[g,v.shape[g]]));const W=g.value;let ie;for(const[v,ce]of R){const R=ce._zod.run({value:W[v],issues:[]},L);R instanceof Promise?(ie??(ie=[]),ie.push(R.then(L=>handlePropertiesResult(L,g,v)))):handlePropertiesResult(R,g,v)}if(ie)return Promise.all(ie).then(()=>{})};g._zod.parse=(v,R)=>{const W=v.value;if(null===W||"object"!=typeof W&&"function"!=typeof W)return v.issues.push({expected:"object",code:"invalid_type",input:W,inst:g}),v;"backward"===R.direction&&(R={...R,direction:"forward"}),L&&L.alloc(g,v,W,R);const ie=runShape(v,R);return ie instanceof Promise?ie.then(()=>v):v},g._zod.check=v=>{if(null!=v.value)return runShape(v,{});v.issues.push({expected:"object",code:"invalid_type",input:v.value,inst:g})}},{*[Symbol.iterator](){yield this}});class $ZodCyclicError extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}const STATE="~memo",NO_ISSUES=[];function isRef(g){return null!==g&&("object"==typeof g||"function"==typeof g)}function cloneIssues(g){return g.map(g=>g.path?{...g,path:g.path.slice()}:{...g})}const recursive=new WeakMap,NONE=0,ASSUMED=1,PROVEN=2;function isRecursive(g,v,L){const R=recursive.get(g);if(void 0!==R)return R?PROVEN:NONE;if(v.has(g))return PROVEN;v.add(g);let W=NONE;const check=g=>{if(W!==PROVEN&&g?._zod){const R=isRecursive(g,v,L);R>W&&(W=R)}},shape=(g,R)=>{let W=NONE;for(const ie of Reflect.ownKeys(g)){const ce=Object.getOwnPropertyDescriptor(g,ie);if(R&&!ce.enumerable)continue;const le=ce.get?ASSUMED:ce.value?._zod?isRecursive(ce.value,v,L):NONE;le>W&&(W=le)}return W},merge=g=>{g>W&&(W=g)},ie=g._zod.def;switch(ie.type){case"object":{const g=rawShape(ie);merge(g?shape(g,!0):ASSUMED),check(ie.catchall);break}case"properties":merge(shape(ie.shape,!1));break;case"array":check(ie.element);break;case"tuple":for(const g of ie.items)check(g);check(ie.rest);break;case"record":case"map":check(ie.keyType),check(ie.valueType);break;case"set":check(ie.valueType);break;case"union":for(const g of ie.options)check(g);break;case"intersection":check(ie.left),check(ie.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":check(ie.innerType);break;case"pipe":check(ie.in),check(ie.out);break;case"function":check(ie.input),check(ie.output);break;case"lazy":{const R=ie._cachedInner??(L?g._zod.innerType:void 0);merge(R?isRecursive(R,v,!1):ASSUMED);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(const g in ie){const v=Object.getOwnPropertyDescriptor(ie,g);if(!v||v.get)continue;const L=v.value;if(L&&"object"==typeof L)if(L._zod)check(L);else if(Array.isArray(L))for(const g of L)check(g)}}return v.delete(g),settle(g,W)}function settle(g,v){return v!==ASSUMED&&recursive.set(g,v===PROVEN),v}function isRecursiveSchema(g){return isRecursive(g,new Set,!0)!==NONE}function bucketFor(g,v){let L=g.buckets.get(v);return L||(L=new WeakMap,g.buckets.set(v,L)),L}let handoff;const open=[],memo={alloc(g,v,L){const R=handoff;if(!R)return L;handoff=void 0;const W={value:L,issues:null};return R.set(v.value,W),open.push(W),L},guard(g){var v;(v=g._zod).deferred??(v.deferred=[]),g._zod.deferred.push(()=>{const v=g._zod.parse,wrapped=(g,L)=>{if("backward"!==L.direction&&isBackEdge(L,g.value))throw new $ZodCyclicError;return v(g,L)};g._zod.parse=wrapped,g._zod.run===v&&(g._zod.run=wrapped)})},attach(g){var v;let L,R,W,ie=!1;(v=g._zod).deferred??(v.deferred=[]),g._zod.deferred.push(()=>{const v=g._zod.parse,wrapped=(ce,le)=>{if(void 0===L){const R=isRecursive(g,new Set,!1);if(R===NONE)return g._zod.parse=v,g._zod.run===wrapped&&(g._zod.run=v),v(ce,le);R===PROVEN||ie?L=!0:ie=!0}const ue=ce.value;if(!isRef(ue))return v(ce,le);let me,ge=le[STATE];ge||(ge={buckets:new WeakMap,backEdges:void 0},le[STATE]=ge),R===le?me=W:(me=bucketFor(ge,g),R=le,W=me);const ve=me.get(ue);if(ve)return ce.value=ve.value,ve.issues?ve.issues.length&&ce.issues.push(...cloneIssues(ve.issues)):(ce.memo=!0,ge.backEdges??(ge.backEdges=new WeakSet),ge.backEdges.add(ve.value)),ce;handoff=me;const xe=open.length,_e=v(ce,le);handoff=void 0;const ke=open.length>xe?open.pop():void 0;return _e instanceof Promise?_e.then(g=>(ke&&(ke.issues=g.issues.length?cloneIssues(g.issues):NO_ISSUES),g)):(ke&&(ke.issues=_e.issues.length?cloneIssues(_e.issues):NO_ISSUES),_e)};g._zod.parse=wrapped,g._zod.run===v&&(g._zod.run=wrapped)})}};function memoizer(){return memo}function isBackEdge(g,v){const L=g[STATE]?.backEdges;return void 0!==L&&isRef(v)&&L.has(v)}const error$Y=()=>{const g={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"},map:{unit:"عنصر",verb:"أن يحوي"}};function getSizing(v){return g[v]??null}const v={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",mac:"عنوان MAC",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",credit_card:"رقم بطاقة الائتمان",iban:"IBAN",jwt:"JWT",template_literal:"مدخل"},L={nan:"NaN"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`مدخلات غير مقبولة: يفترض إدخال instanceof ${g.expected}، ولكن تم إدخال ${W}`:`مدخلات غير مقبولة: يفترض إدخال ${v}، ولكن تم إدخال ${W}`}case"invalid_value":return 1===g.values.length?`مدخلات غير مقبولة: يفترض إدخال ${stringifyPrimitive(g.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?` أكبر من اللازم: يفترض أن تكون ${g.origin??"القيمة"} ${v} ${g.maximum.toString()} ${L.unit??"عنصر"}`:`أكبر من اللازم: يفترض أن تكون ${g.origin??"القيمة"} ${v} ${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`أصغر من اللازم: يفترض لـ ${g.origin} أن يكون ${v} ${g.minimum.toString()} ${L.unit}`:`أصغر من اللازم: يفترض لـ ${g.origin} أن يكون ${v} ${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`نَص غير مقبول: يجب أن يبدأ بـ "${g.prefix}"`:"ends_with"===L.format?`نَص غير مقبول: يجب أن ينتهي بـ "${L.suffix}"`:"includes"===L.format?`نَص غير مقبول: يجب أن يتضمَّن "${L.includes}"`:"regex"===L.format?`نَص غير مقبول: يجب أن يطابق النمط ${L.pattern}`:`${v[L.format]??g.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${g.divisor}`;case"unrecognized_keys":return`معرف${g.keys.length>1?"ات":""} غريب${g.keys.length>1?"ة":""}: ${joinValues(g.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${g.origin}`;case"invalid_union":default:return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${g.origin}`}}};function ar(){return{localeError:error$Y()}}const error$X=()=>{const g={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"},map:{unit:"element",verb:"olmalıdır"}};function getSizing(v){return g[v]??null}const v={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",credit_card:"kredit kartı nömrəsi",iban:"IBAN",jwt:"JWT",template_literal:"input"},L={nan:"NaN"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`Yanlış dəyər: gözlənilən instanceof ${g.expected}, daxil olan ${W}`:`Yanlış dəyər: gözlənilən ${v}, daxil olan ${W}`}case"invalid_value":return 1===g.values.length?`Yanlış dəyər: gözlənilən ${stringifyPrimitive(g.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`Çox böyük: gözlənilən ${g.origin??"dəyər"} ${v}${g.maximum.toString()} ${L.unit??"element"}`:`Çox böyük: gözlənilən ${g.origin??"dəyər"} ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`Çox kiçik: gözlənilən ${g.origin} ${v}${g.minimum.toString()} ${L.unit}`:`Çox kiçik: gözlənilən ${g.origin} ${v}${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`Yanlış mətn: "${L.prefix}" ilə başlamalıdır`:"ends_with"===L.format?`Yanlış mətn: "${L.suffix}" ilə bitməlidir`:"includes"===L.format?`Yanlış mətn: "${L.includes}" daxil olmalıdır`:"regex"===L.format?`Yanlış mətn: ${L.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${v[L.format]??g.format}`}case"not_multiple_of":return`Yanlış ədəd: ${g.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${g.keys.length>1?"lar":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`${g.origin} daxilində yanlış açar`;case"invalid_union":default:return"Yanlış dəyər";case"invalid_element":return`${g.origin} daxilində yanlış dəyər`}}};function az(){return{localeError:error$X()}}function getBelarusianPlural(g,v,L,R){const W=Math.abs(g),ie=W%10,ce=W%100;return ce>=11&&ce<=19?R:1===ie?v:ie>=2&&ie<=4?L:R}const error$W=()=>{const g={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},map:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function getSizing(v){return g[v]??null}const v={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",mac:"MAC адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",credit_card:"нумар крэдытнай карты",iban:"IBAN",jwt:"JWT",template_literal:"увод"},L={nan:"NaN",number:"лік",array:"масіў"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`Няправільны ўвод: чакаўся instanceof ${g.expected}, атрымана ${W}`:`Няправільны ўвод: чакаўся ${v}, атрымана ${W}`}case"invalid_value":return 1===g.values.length?`Няправільны ўвод: чакалася ${stringifyPrimitive(g.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);if(L){const R=getBelarusianPlural(Number(g.maximum),L.unit.one,L.unit.few,L.unit.many);return`Занадта вялікі: чакалася, што ${g.origin??"значэнне"} павінна ${L.verb} ${v}${g.maximum.toString()} ${R}`}return`Занадта вялікі: чакалася, што ${g.origin??"значэнне"} павінна быць ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);if(L){const R=getBelarusianPlural(Number(g.minimum),L.unit.one,L.unit.few,L.unit.many);return`Занадта малы: чакалася, што ${g.origin} павінна ${L.verb} ${v}${g.minimum.toString()} ${R}`}return`Занадта малы: чакалася, што ${g.origin} павінна быць ${v}${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`Няправільны радок: павінен пачынацца з "${L.prefix}"`:"ends_with"===L.format?`Няправільны радок: павінен заканчвацца на "${L.suffix}"`:"includes"===L.format?`Няправільны радок: павінен змяшчаць "${L.includes}"`:"regex"===L.format?`Няправільны радок: павінен адпавядаць шаблону ${L.pattern}`:`Няправільны ${v[L.format]??g.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${g.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${g.keys.length>1?"ключы":"ключ"}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${g.origin}`;case"invalid_union":default:return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${g.origin}`}}};function be(){return{localeError:error$W()}}const error$V=()=>{const g={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"},map:{unit:"елемента",verb:"да съдържа"}};function getSizing(v){return g[v]??null}const v={regex:"вход",email:"имейл адрес",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO време",date:"ISO дата",time:"ISO време",duration:"ISO продължителност",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",mac:"MAC адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",credit_card:"номер на кредитна карта",iban:"IBAN",jwt:"JWT",template_literal:"вход"},L={nan:"NaN",number:"число",array:"масив"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`Невалиден вход: очакван instanceof ${g.expected}, получен ${W}`:`Невалиден вход: очакван ${v}, получен ${W}`}case"invalid_value":return 1===g.values.length?`Невалиден вход: очакван ${stringifyPrimitive(g.values[0])}`:`Невалидна опция: очаквано едно от ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`Твърде голямо: очаква се ${g.origin??"стойност"} да съдържа ${v}${g.maximum.toString()} ${L.unit??"елемента"}`:`Твърде голямо: очаква се ${g.origin??"стойност"} да бъде ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`Твърде малко: очаква се ${g.origin} да съдържа ${v}${g.minimum.toString()} ${L.unit}`:`Твърде малко: очаква се ${g.origin} да бъде ${v}${g.minimum.toString()}`}case"invalid_format":{const L=g;if("starts_with"===L.format)return`Невалиден низ: трябва да започва с "${L.prefix}"`;if("ends_with"===L.format)return`Невалиден низ: трябва да завършва с "${L.suffix}"`;if("includes"===L.format)return`Невалиден низ: трябва да включва "${L.includes}"`;if("regex"===L.format)return`Невалиден низ: трябва да съвпада с ${L.pattern}`;let R="Невалиден";return"emoji"===L.format&&(R="Невалидно"),"datetime"===L.format&&(R="Невалидно"),"date"===L.format&&(R="Невалидна"),"time"===L.format&&(R="Невалидно"),"duration"===L.format&&(R="Невалидна"),`${R} ${v[L.format]??g.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${g.divisor}`;case"unrecognized_keys":return`Неразпознат${g.keys.length>1?"и":""} ключ${g.keys.length>1?"ове":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${g.origin}`;case"invalid_union":default:return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${g.origin}`}}};function bg(){return{localeError:error$V()}}const error$U=()=>{const g={string:{unit:"অক্ষর",verb:"থাকতে হবে"},file:{unit:"বাইট",verb:"থাকতে হবে"},array:{unit:"আইটেম",verb:"থাকতে হবে"},set:{unit:"আইটেম",verb:"থাকতে হবে"},map:{unit:"এন্ট্রি",verb:"থাকতে হবে"}};function getSizing(v){return g[v]??null}const v={regex:"ইনপুট",email:"ইমেইল ঠিকানা",url:"URL",emoji:"ইমোজি",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO তারিখ ও সময়",date:"ISO তারিখ",time:"ISO সময়",duration:"ISO সময়কাল",ipv4:"IPv4 ঠিকানা",ipv6:"IPv6 ঠিকানা",mac:"MAC ঠিকানা",cidrv4:"IPv4 রেঞ্জ",cidrv6:"IPv6 রেঞ্জ",base64:"base64-এনকোডেড স্ট্রিং",base64url:"base64url-এনকোডেড স্ট্রিং",json_string:"JSON স্ট্রিং",e164:"E.164 নম্বর",credit_card:"ক্রেডিট কার্ড নম্বর",iban:"IBAN",jwt:"JWT",template_literal:"ইনপুট"},L={nan:"NaN"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input);return`অবৈধ ইনপুট: প্রত্যাশিত ${v}, প্রাপ্ত ${L[R]??R}`}case"invalid_value":return 1===g.values.length?`অবৈধ ইনপুট: প্রত্যাশিত ${stringifyPrimitive(g.values[0])}`:`অবৈধ অপশন: ${joinValues(g.values," | ")} এর মধ্যে একটি প্রত্যাশিত`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`অনেক বড়: ${g.origin??"মান"} ${v}${g.maximum.toString()} ${L.unit??"এলিমেন্ট"} হতে হবে`:`অনেক বড়: ${g.origin??"মান"} ${v}${g.maximum.toString()} হতে হবে`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`অনেক ছোট: ${g.origin} ${v}${g.minimum.toString()} ${L.unit} হতে হবে`:`অনেক ছোট: ${g.origin} ${v}${g.minimum.toString()} হতে হবে`}case"invalid_format":{const L=g;return"starts_with"===L.format?`অবৈধ স্ট্রিং: "${L.prefix}" দিয়ে শুরু হতে হবে`:"ends_with"===L.format?`অবৈধ স্ট্রিং: "${L.suffix}" দিয়ে শেষ হতে হবে`:"includes"===L.format?`অবৈধ স্ট্রিং: "${L.includes}" অন্তর্ভুক্ত থাকতে হবে`:"regex"===L.format?`অবৈধ স্ট্রিং: ${L.pattern} প্যাটার্ন মিলতে হবে`:`অবৈধ ${v[L.format]??g.format}`}case"not_multiple_of":return`অবৈধ নম্বর: ${g.divisor} এর গুণিতক হতে হবে`;case"unrecognized_keys":return`অচেনা কী${g.keys.length>1?"গুলো":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`${g.origin} এ অবৈধ কী`;case"invalid_union":if(g.options&&Array.isArray(g.options)&&g.options.length>0){const v=g.options.map(g=>`'${g}'`).join(" | ");return`অবৈধ ডিসক্রিমিনেটর মান। প্রত্যাশিত ${v}`}return"অবৈধ ইনপুট";case"invalid_element":return`${g.origin} এ অবৈধ মান`;default:return"অবৈধ ইনপুট"}}};function bn(){return{localeError:error$U()}}const error$T=()=>{const g={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"},map:{unit:"elements",verb:"contenir"}};function getSizing(v){return g[v]??null}const v={regex:"entrada",email:"adreça electrònica",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:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",mac:"adreça MAC",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",credit_card:"número de targeta de crèdit",iban:"IBAN",jwt:"JWT",template_literal:"entrada"},L={nan:"NaN"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`Tipus invàlid: s'esperava instanceof ${g.expected}, s'ha rebut ${W}`:`Tipus invàlid: s'esperava ${v}, s'ha rebut ${W}`}case"invalid_value":return 1===g.values.length?`Valor invàlid: s'esperava ${stringifyPrimitive(g.values[0])}`:`Opció invàlida: s'esperava una de ${joinValues(g.values," o ")}`;case"too_big":{const v=g.inclusive?"com a màxim":"menys de",L=getSizing(g.origin);return L?`Massa gran: s'esperava que ${g.origin??"el valor"} contingués ${v} ${g.maximum.toString()} ${L.unit??"elements"}`:`Massa gran: s'esperava que ${g.origin??"el valor"} fos ${v} ${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?"com a mínim":"més de",L=getSizing(g.origin);return L?`Massa petit: s'esperava que ${g.origin} contingués ${v} ${g.minimum.toString()} ${L.unit}`:`Massa petit: s'esperava que ${g.origin} fos ${v} ${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`Format invàlid: ha de començar amb "${L.prefix}"`:"ends_with"===L.format?`Format invàlid: ha d'acabar amb "${L.suffix}"`:"includes"===L.format?`Format invàlid: ha d'incloure "${L.includes}"`:"regex"===L.format?`Format invàlid: ha de coincidir amb el patró ${L.pattern}`:`Format invàlid per a ${v[L.format]??g.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${g.divisor}`;case"unrecognized_keys":return`Clau${g.keys.length>1?"s":""} no reconeguda${g.keys.length>1?"s":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${g.origin}`;case"invalid_union":default:return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${g.origin}`}}};function ca(){return{localeError:error$T()}}const error$S=()=>{const g={string:{unit:"پیت",verb:"بێت"},file:{unit:"بایت",verb:"بێت"},array:{unit:"دانە",verb:"بێت"},set:{unit:"دانە",verb:"بێت"},map:{unit:"دانە",verb:"بێت"}};function getSizing(v){return g[v]??null}const v={regex:"regex",email:"ئیمەیڵ",url:"بەستەر (URL)",emoji:"ئیمۆجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ڕێکەوت و کات",date:"ڕێکەوت",time:"کات",duration:"ماوە",ipv4:"ناونیشانی IPv4",ipv6:"ناونیشانی IPv6",mac:"ناونیشانی MAC",cidrv4:"مەودای IPv4",cidrv6:"مەودای IPv6",base64:"دەقی base64",base64url:"دەقی base64url",json_string:"دەقی JSON",e164:"ژمارەی E.164",credit_card:"ژمارەی کارتی کرێدیت",iban:"IBAN",jwt:"JWT",template_literal:"تێکردە"},L={nan:"NaN",string:"نووسین",number:"ژمارە",boolean:"boolean",array:"array",object:"object",date:"ڕێکەوت",integer:"ژمارە",float:"ژمارە",null:"null",undefined:"undefined",function:"function",symbol:"symbol",unknown:"unknown",promise:"promise",void:"void",never:"never",map:"map",set:"set"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R,ie=["ا","و","ۆ","وو","ە","ی","ێ"].some(g=>W.endsWith(g))?"یە":"ە",ce=/^[a-zA-Z]+$/.test(W);return"null"===R||"undefined"===R?"داواکراوە":`چاوەڕوانکراوە ${v} بێت، بەڵام ${W}${ce?"":ie}`}case"invalid_value":return 1===g.values.length?`بەهاکە نادرووستە: چاوەڕوانکراوە ${stringifyPrimitive(g.values[0])} بێت`:`هەڵبژاردەی نادروست: چاوەڕوانکراوە یەکێک بێت لە ${joinValues(g.values,"|")}`;case"too_big":{const v=getSizing(g.origin);return v?`پێویستە بە لایەنی زۆرەوە ${g.maximum.toString()} ${v.unit} ${v.verb}`:`پێویستە بە لایەنی زۆرەوە ${g.maximum.toString()} بێت`}case"too_small":{const v=getSizing(g.origin);return v?`پێویستە بە لایەنی کەمەوە ${g.minimum.toString()} ${v.unit} ${v.verb}`:`پێویستە بە لایەنی کەمەوە ${g.minimum.toString()} بێت`}case"invalid_format":{const L=g;return"starts_with"===L.format?`دەقی نادروست: پێویستە دەستپێبکات بە "${L.prefix}"`:"ends_with"===L.format?`دەقی نادروست: پێویستە کۆتاییبێت بە "${L.suffix}"`:"includes"===L.format?`دەقی نادروست: پێویستە "${L.includes}" لەخۆبگرێت`:"regex"===L.format?`دەقی نادروست: پێویستە لەگەڵ پاتێرنی ${L.pattern} بگونجێت`:`بەهای ${v[L.format]??g.format} نادروستە`}case"not_multiple_of":return`ژمارەی نادروست: دەبێت چەند هێندە بێت بۆ ${g.divisor}`;case"unrecognized_keys":return`کلیلی نەناسراو: ${joinValues(g.keys,", ")}`;case"invalid_key":return`کلیلی نادروست لە ${g.origin}`;case"invalid_union":if(g.options&&Array.isArray(g.options)&&g.options.length>0){const v=g.options.map(g=>`'${g}'`).join(" | ");return`بەهای نەناسراو هەیە. بەهای چاوەڕوانکراو: ${v}`}return"یەکگرتنی نادروست";case"invalid_element":return`${g.origin} بەهاکە نادروستە`;default:return"تێکردەی نادروست"}}};function ckb(){return{localeError:error$S()}}const error$R=()=>{const g={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"},map:{unit:"prvků",verb:"mít"}};function getSizing(v){return g[v]??null}const v={regex:"regulární výraz",email:"e-mailová adresa",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:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",credit_card:"číslo kreditní karty",iban:"IBAN",jwt:"JWT",template_literal:"vstup"},L={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`Neplatný vstup: očekáváno instanceof ${g.expected}, obdrženo ${W}`:`Neplatný vstup: očekáváno ${v}, obdrženo ${W}`}case"invalid_value":return 1===g.values.length?`Neplatný vstup: očekáváno ${stringifyPrimitive(g.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`Hodnota je příliš velká: ${g.origin??"hodnota"} musí mít ${v}${g.maximum.toString()} ${L.unit??"prvků"}`:`Hodnota je příliš velká: ${g.origin??"hodnota"} musí být ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`Hodnota je příliš malá: ${g.origin??"hodnota"} musí mít ${v}${g.minimum.toString()} ${L.unit??"prvků"}`:`Hodnota je příliš malá: ${g.origin??"hodnota"} musí být ${v}${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`Neplatný řetězec: musí začínat na "${L.prefix}"`:"ends_with"===L.format?`Neplatný řetězec: musí končit na "${L.suffix}"`:"includes"===L.format?`Neplatný řetězec: musí obsahovat "${L.includes}"`:"regex"===L.format?`Neplatný řetězec: musí odpovídat vzoru ${L.pattern}`:`Neplatný formát ${v[L.format]??g.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${g.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${g.origin}`;case"invalid_union":default:return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${g.origin}`}}};function cs(){return{localeError:error$R()}}const error$Q=()=>{const g={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"},map:{unit:"elementer",verb:"indeholdt"}};function getSizing(v){return g[v]??null}const v={regex:"input",email:"e-mailadresse",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 dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kreditkortnummer",iban:"IBAN",jwt:"JWT",template_literal:"input"},L={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`Ugyldigt input: forventede instanceof ${g.expected}, fik ${W}`:`Ugyldigt input: forventede ${v}, fik ${W}`}case"invalid_value":return 1===g.values.length?`Ugyldig værdi: forventede ${stringifyPrimitive(g.values[0])}`:`Ugyldigt valg: forventede en af følgende ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",R=getSizing(g.origin),W=L[g.origin]??g.origin;return R?`For stor: forventede ${W??"value"} ${R.verb} ${v} ${g.maximum.toString()} ${R.unit??"elementer"}`:`For stor: forventede ${W??"value"} havde ${v} ${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",R=getSizing(g.origin),W=L[g.origin]??g.origin;return R?`For lille: forventede ${W} ${R.verb} ${v} ${g.minimum.toString()} ${R.unit}`:`For lille: forventede ${W} havde ${v} ${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`Ugyldig streng: skal starte med "${L.prefix}"`:"ends_with"===L.format?`Ugyldig streng: skal ende med "${L.suffix}"`:"includes"===L.format?`Ugyldig streng: skal indeholde "${L.includes}"`:"regex"===L.format?`Ugyldig streng: skal matche mønsteret ${L.pattern}`:`Ugyldig ${v[L.format]??g.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${g.divisor}`;case"unrecognized_keys":return`${g.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${g.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${g.origin}`;default:return"Ugyldigt input"}}};function da(){return{localeError:error$Q()}}const error$P=()=>{const g={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"},map:{unit:"Elemente",verb:"zu haben"}};function getSizing(v){return g[v]??null}const v={regex:"Eingabe",email:"E-Mail-Adresse",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-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",mac:"MAC-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",credit_card:"Kreditkartennummer",iban:"IBAN",jwt:"JWT",template_literal:"Eingabe"},L={nan:"NaN",number:"Zahl",array:"Array"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`Ungültige Eingabe: erwartet instanceof ${g.expected}, erhalten ${W}`:`Ungültige Eingabe: erwartet ${v}, erhalten ${W}`}case"invalid_value":return 1===g.values.length?`Ungültige Eingabe: erwartet ${stringifyPrimitive(g.values[0])}`:`Ungültige Option: erwartet eine von ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`Zu groß: erwartet, dass ${g.origin??"Wert"} ${v}${g.maximum.toString()} ${L.unit??"Elemente"} hat`:`Zu groß: erwartet, dass ${g.origin??"Wert"} ${v}${g.maximum.toString()} ist`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`Zu klein: erwartet, dass ${g.origin} ${v}${g.minimum.toString()} ${L.unit} hat`:`Zu klein: erwartet, dass ${g.origin} ${v}${g.minimum.toString()} ist`}case"invalid_format":{const L=g;return"starts_with"===L.format?`Ungültiger String: muss mit "${L.prefix}" beginnen`:"ends_with"===L.format?`Ungültiger String: muss mit "${L.suffix}" enden`:"includes"===L.format?`Ungültiger String: muss "${L.includes}" enthalten`:"regex"===L.format?`Ungültiger String: muss dem Muster ${L.pattern} entsprechen`:`Ungültig: ${v[L.format]??g.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${g.divisor} sein`;case"unrecognized_keys":return`${g.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${g.origin}`;case"invalid_union":default:return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${g.origin}`}}};function de(){return{localeError:error$P()}}const error$O=()=>{const g={string:{unit:"χαρακτήρες",verb:"να έχει"},file:{unit:"bytes",verb:"να έχει"},array:{unit:"στοιχεία",verb:"να έχει"},set:{unit:"στοιχεία",verb:"να έχει"},map:{unit:"καταχωρήσεις",verb:"να έχει"}};function getSizing(v){return g[v]??null}const v={regex:"είσοδος",email:"διεύθυνση email",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 ημερομηνία και ώρα",date:"ISO ημερομηνία",time:"ISO ώρα",duration:"ISO διάρκεια",ipv4:"διεύθυνση IPv4",ipv6:"διεύθυνση IPv6",mac:"διεύθυνση MAC",cidrv4:"εύρος IPv4",cidrv6:"εύρος IPv6",base64:"συμβολοσειρά κωδικοποιημένη σε base64",base64url:"συμβολοσειρά κωδικοποιημένη σε base64url",json_string:"συμβολοσειρά JSON",e164:"αριθμός E.164",credit_card:"αριθμός πιστωτικής κάρτας",iban:"IBAN",jwt:"JWT",template_literal:"είσοδος"},L={nan:"NaN"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return"string"==typeof g.expected&&/^[A-Z]/.test(g.expected)?`Μη έγκυρη είσοδος: αναμενόταν instanceof ${g.expected}, λήφθηκε ${W}`:`Μη έγκυρη είσοδος: αναμενόταν ${v}, λήφθηκε ${W}`}case"invalid_value":return 1===g.values.length?`Μη έγκυρη είσοδος: αναμενόταν ${stringifyPrimitive(g.values[0])}`:`Μη έγκυρη επιλογή: αναμενόταν ένα από ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`Πολύ μεγάλο: αναμενόταν ${g.origin??"τιμή"} να έχει ${v}${g.maximum.toString()} ${L.unit??"στοιχεία"}`:`Πολύ μεγάλο: αναμενόταν ${g.origin??"τιμή"} να είναι ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`Πολύ μικρό: αναμενόταν ${g.origin} να έχει ${v}${g.minimum.toString()} ${L.unit}`:`Πολύ μικρό: αναμενόταν ${g.origin} να είναι ${v}${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`Μη έγκυρη συμβολοσειρά: πρέπει να ξεκινά με "${L.prefix}"`:"ends_with"===L.format?`Μη έγκυρη συμβολοσειρά: πρέπει να τελειώνει με "${L.suffix}"`:"includes"===L.format?`Μη έγκυρη συμβολοσειρά: πρέπει να περιέχει "${L.includes}"`:"regex"===L.format?`Μη έγκυρη συμβολοσειρά: πρέπει να ταιριάζει με το μοτίβο ${L.pattern}`:`Μη έγκυρο: ${v[L.format]??g.format}`}case"not_multiple_of":return`Μη έγκυρος αριθμός: πρέπει να είναι πολλαπλάσιο του ${g.divisor}`;case"unrecognized_keys":return`Άγνωστ${g.keys.length>1?"α":"ο"} κλειδ${g.keys.length>1?"ιά":"ί"}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Μη έγκυρο κλειδί στο ${g.origin}`;case"invalid_union":default:return"Μη έγκυρη είσοδος";case"invalid_element":return`Μη έγκυρη τιμή στο ${g.origin}`}}};function el(){return{localeError:error$O()}}const error$N=()=>{const g={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 getSizing(v){return g[v]??null}const v={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",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},L={nan:"NaN"};function getTypeName(g,v){return"number"!==g||"number"!=typeof v||Number.isFinite(v)?L[g]??g:String(v)}return g=>{switch(g.code){case"invalid_type":return`Invalid input: expected ${getTypeName(g.expected)}, received ${getTypeName(parsedType(g.input),g.input)}`;case"invalid_value":return 1===g.values.length?`Invalid input: expected ${stringifyPrimitive(g.values[0])}`:`Invalid option: expected one of ${joinValues(g.values,"|")}`;case"too_big":{const v=g.exact?"exactly ":g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`Too big: expected ${g.origin??"value"} to have ${v}${g.maximum.toString()} ${L.unit??"elements"}`:`Too big: expected ${g.origin??"value"} to be ${v}${g.maximum.toString()}`}case"too_small":{const v=g.exact?"exactly ":g.inclusive?">=":">",L=getSizing(g.origin);return L?`Too small: expected ${g.origin} to have ${v}${g.minimum.toString()} ${L.unit}`:`Too small: expected ${g.origin} to be ${v}${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`Invalid string: must start with "${L.prefix}"`:"ends_with"===L.format?`Invalid string: must end with "${L.suffix}"`:"includes"===L.format?`Invalid string: must include "${L.includes}"`:"regex"===L.format?`Invalid string: must match pattern ${L.pattern}`:`Invalid ${v[L.format]??g.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${g.divisor}`;case"unrecognized_keys":return`Unrecognized key${g.keys.length>1?"s":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Invalid key in ${g.origin}`;case"invalid_union":if(g.options&&Array.isArray(g.options)&&g.options.length>0){const v=g.options.map(g=>`'${g}'`).join(" | ");return`Invalid discriminator value. Expected ${v}`}return!1===g.inclusive?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${g.origin}`;default:return"Invalid input"}}};function en(){return{localeError:error$N()}}const error$M=()=>{const g={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"},map:{unit:"elementojn",verb:"havi"}};function getSizing(v){return g[v]??null}const v={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",mac:"MAC-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",credit_card:"kreditkarta numero",iban:"IBAN",jwt:"JWT",template_literal:"enigo"},L={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`Nevalida enigo: atendiĝis instanceof ${g.expected}, riceviĝis ${W}`:`Nevalida enigo: atendiĝis ${v}, riceviĝis ${W}`}case"invalid_value":return 1===g.values.length?`Nevalida enigo: atendiĝis ${stringifyPrimitive(g.values[0])}`:`Nevalida opcio: atendiĝis unu el ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`Tro granda: atendiĝis ke ${g.origin??"valoro"} havu ${v}${g.maximum.toString()} ${L.unit??"elementojn"}`:`Tro granda: atendiĝis ke ${g.origin??"valoro"} havu ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`Tro malgranda: atendiĝis ke ${g.origin} havu ${v}${g.minimum.toString()} ${L.unit}`:`Tro malgranda: atendiĝis ke ${g.origin} estu ${v}${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`Nevalida karaktraro: devas komenciĝi per "${L.prefix}"`:"ends_with"===L.format?`Nevalida karaktraro: devas finiĝi per "${L.suffix}"`:"includes"===L.format?`Nevalida karaktraro: devas inkluzivi "${L.includes}"`:"regex"===L.format?`Nevalida karaktraro: devas kongrui kun la modelo ${L.pattern}`:`Nevalida ${v[L.format]??g.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${g.divisor}`;case"unrecognized_keys":return`Nekonata${g.keys.length>1?"j":""} ŝlosilo${g.keys.length>1?"j":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${g.origin}`;case"invalid_union":default:return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${g.origin}`}}};function eo(){return{localeError:error$M()}}const error$L=()=>{const g={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function getSizing(v){return g[v]??null}const v={regex:"entrada",email:"dirección de correo electrónico",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:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",mac:"dirección MAC",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",credit_card:"número de tarjeta de crédito",iban:"IBAN",jwt:"JWT",template_literal:"entrada"},L={nan:"NaN",string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`Entrada inválida: se esperaba instanceof ${g.expected}, recibido ${W}`:`Entrada inválida: se esperaba ${v}, recibido ${W}`}case"invalid_value":return 1===g.values.length?`Entrada inválida: se esperaba ${stringifyPrimitive(g.values[0])}`:`Opción inválida: se esperaba una de ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",R=getSizing(g.origin),W=L[g.origin]??g.origin;return R?`Demasiado grande: se esperaba que ${W??"valor"} tuviera ${v}${g.maximum.toString()} ${R.unit??"elementos"}`:`Demasiado grande: se esperaba que ${W??"valor"} fuera ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",R=getSizing(g.origin),W=L[g.origin]??g.origin;return R?`Demasiado pequeño: se esperaba que ${W} tuviera ${v}${g.minimum.toString()} ${R.unit}`:`Demasiado pequeño: se esperaba que ${W} fuera ${v}${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`Cadena inválida: debe comenzar con "${L.prefix}"`:"ends_with"===L.format?`Cadena inválida: debe terminar en "${L.suffix}"`:"includes"===L.format?`Cadena inválida: debe incluir "${L.includes}"`:"regex"===L.format?`Cadena inválida: debe coincidir con el patrón ${L.pattern}`:`Inválido ${v[L.format]??g.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${g.divisor}`;case"unrecognized_keys":return`Llave${g.keys.length>1?"s":""} desconocida${g.keys.length>1?"s":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Llave inválida en ${L[g.origin]??g.origin}`;case"invalid_union":default:return"Entrada inválida";case"invalid_element":return`Valor inválido en ${L[g.origin]??g.origin}`}}};function es(){return{localeError:error$L()}}const error$K=()=>{const g={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"},map:{unit:"آیتم",verb:"داشته باشد"}};function getSizing(v){return g[v]??null}const v={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",mac:"MAC آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",credit_card:"شماره کارت اعتباری",iban:"IBAN",jwt:"JWT",template_literal:"ورودی"},L={nan:"NaN",number:"عدد",array:"آرایه"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`ورودی نامعتبر: می‌بایست instanceof ${g.expected} می‌بود، ${W} دریافت شد`:`ورودی نامعتبر: می‌بایست ${v} می‌بود، ${W} دریافت شد`}case"invalid_value":return 1===g.values.length?`ورودی نامعتبر: می‌بایست ${stringifyPrimitive(g.values[0])} می‌بود`:`گزینه نامعتبر: می‌بایست یکی از ${joinValues(g.values,"|")} می‌بود`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`خیلی بزرگ: ${g.origin??"مقدار"} باید ${v}${g.maximum.toString()} ${L.unit??"عنصر"} باشد`:`خیلی بزرگ: ${g.origin??"مقدار"} باید ${v}${g.maximum.toString()} باشد`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`خیلی کوچک: ${g.origin} باید ${v}${g.minimum.toString()} ${L.unit} باشد`:`خیلی کوچک: ${g.origin} باید ${v}${g.minimum.toString()} باشد`}case"invalid_format":{const L=g;return"starts_with"===L.format?`رشته نامعتبر: باید با "${L.prefix}" شروع شود`:"ends_with"===L.format?`رشته نامعتبر: باید با "${L.suffix}" تمام شود`:"includes"===L.format?`رشته نامعتبر: باید شامل "${L.includes}" باشد`:"regex"===L.format?`رشته نامعتبر: باید با الگوی ${L.pattern} مطابقت داشته باشد`:`${v[L.format]??g.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${g.divisor} باشد`;case"unrecognized_keys":return`کلید${g.keys.length>1?"های":""} ناشناس: ${joinValues(g.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${g.origin}`;case"invalid_union":default:return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${g.origin}`}}};function fa(){return{localeError:error$K()}}const error$J=()=>{const g={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},map:{unit:"alkiota",subject:"kuvauksen"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function getSizing(v){return g[v]??null}const v={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",mac:"MAC-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",credit_card:"luottokortin numero",iban:"IBAN",jwt:"JWT",template_literal:"templaattimerkkijono"},L={nan:"NaN"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`Virheellinen tyyppi: odotettiin instanceof ${g.expected}, oli ${W}`:`Virheellinen tyyppi: odotettiin ${v}, oli ${W}`}case"invalid_value":return 1===g.values.length?`Virheellinen syöte: täytyy olla ${stringifyPrimitive(g.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`Liian suuri: ${L.subject} täytyy olla ${v}${g.maximum.toString()} ${L.unit}`.trim():`Liian suuri: arvon täytyy olla ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`Liian pieni: ${L.subject} täytyy olla ${v}${g.minimum.toString()} ${L.unit}`.trim():`Liian pieni: arvon täytyy olla ${v}${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`Virheellinen syöte: täytyy alkaa "${L.prefix}"`:"ends_with"===L.format?`Virheellinen syöte: täytyy loppua "${L.suffix}"`:"includes"===L.format?`Virheellinen syöte: täytyy sisältää "${L.includes}"`:"regex"===L.format?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${L.pattern}`:`Virheellinen ${v[L.format]??g.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${g.divisor} monikerta`;case"unrecognized_keys":return`${g.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${joinValues(g.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};function fi(){return{localeError:error$J()}}const error$I=()=>{const g={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function getSizing(v){return g[v]??null}const v={regex:"expression régulière",email:"adresse e-mail",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:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",mac:"adresse MAC",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne de caractères encodée en base64",base64url:"chaîne de caractères encodée en base64url",json_string:"chaîne de caractères JSON",e164:"numéro au format E.164",credit_card:"numéro de carte de crédit",iban:"IBAN",jwt:"JWT",template_literal:"entrée"},L={string:"chaîne de caractères",number:"nombre",int:"entier",boolean:"booléen",bigint:"grand entier",symbol:"symbole",undefined:"indéfini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"record",map:"map",set:"ensemble",file:"fichier",nonoptional:"non optionnel",nan:"NaN",function:"fonction"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`Entrée invalide : instance de ${g.expected} attendu, ${W} reçu`:`Entrée invalide : ${v} attendu, ${W} reçu`}case"invalid_value":return 1===g.values.length?`Entrée invalide : ${stringifyPrimitive(g.values[0])} attendu`:`Option invalide : une valeur parmi ${joinValues(g.values,"|")} attendue`;case"too_big":{const v=g.inclusive?"<=":"<",R=getSizing(g.origin);return R?`Trop grand : ${L[g.origin]??"valeur"} doit ${R.verb} ${v}${g.maximum.toString()} ${R.unit??"élément(s)"}`:`Trop grand : ${L[g.origin]??"valeur"} doit être ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",R=getSizing(g.origin);return R?`Trop petit : ${L[g.origin]??"valeur"} doit ${R.verb} ${v}${g.minimum.toString()} ${R.unit}`:`Trop petit : ${L[g.origin]??"valeur"} doit être ${v}${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`Chaîne de caractères invalide : doit commencer par "${L.prefix}"`:"ends_with"===L.format?`Chaîne de caractères invalide : doit se terminer par "${L.suffix}"`:"includes"===L.format?`Chaîne de caractères invalide : doit inclure "${L.includes}"`:"regex"===L.format?`Chaîne de caractères invalide : doit correspondre au motif ${L.pattern}`:`${v[L.format]??g.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${g.divisor}`;case"unrecognized_keys":return`Clé${g.keys.length>1?"s":""} non reconnue${g.keys.length>1?"s":""} : ${joinValues(g.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${g.origin}`;case"invalid_union":default:return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${g.origin}`}}};function fr(){return{localeError:error$I()}}const error$H=()=>{const g={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"},map:{unit:"éléments",verb:"avoir"}};function getSizing(v){return g[v]??null}const v={regex:"entrée",email:"adresse courriel",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:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",mac:"adresse MAC",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",credit_card:"numéro de carte de crédit",iban:"IBAN",jwt:"JWT",template_literal:"entrée"},L={nan:"NaN"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`Entrée invalide : attendu instanceof ${g.expected}, reçu ${W}`:`Entrée invalide : attendu ${v}, reçu ${W}`}case"invalid_value":return 1===g.values.length?`Entrée invalide : attendu ${stringifyPrimitive(g.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"≤":"<",L=getSizing(g.origin);return L?`Trop grand : attendu que ${g.origin??"la valeur"} ait ${v}${g.maximum.toString()} ${L.unit}`:`Trop grand : attendu que ${g.origin??"la valeur"} soit ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?"≥":">",L=getSizing(g.origin);return L?`Trop petit : attendu que ${g.origin} ait ${v}${g.minimum.toString()} ${L.unit}`:`Trop petit : attendu que ${g.origin} soit ${v}${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`Chaîne invalide : doit commencer par "${L.prefix}"`:"ends_with"===L.format?`Chaîne invalide : doit se terminer par "${L.suffix}"`:"includes"===L.format?`Chaîne invalide : doit inclure "${L.includes}"`:"regex"===L.format?`Chaîne invalide : doit correspondre au motif ${L.pattern}`:`${v[L.format]??g.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${g.divisor}`;case"unrecognized_keys":return`Clé${g.keys.length>1?"s":""} non reconnue${g.keys.length>1?"s":""} : ${joinValues(g.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${g.origin}`;case"invalid_union":default:return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${g.origin}`}}};function frCA(){return{localeError:error$H()}}const error$G=()=>{const g={string:{unit:"અક્ષર",verb:"હોવા જોઈએ"},file:{unit:"બાયટ",verb:"હોવા જોઈએ"},array:{unit:"આઇટમ",verb:"હોવા જોઈએ"},set:{unit:"આઇટમ",verb:"હોવા જોઈએ"},map:{unit:"એન્ટ્રી",verb:"હોવા જોઈએ"}};function getSizing(v){return g[v]??null}const v={regex:"ઇનપુટ",email:"ઈમેઇલ એડ્રેસ",url:"URL",emoji:"ઇમોજી",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO તારીખ અને સમય",date:"ISO તારીખ",time:"ISO સમય",duration:"ISO અવધિ",ipv4:"IPv4 એડ્રેસ",ipv6:"IPv6 એડ્રેસ",mac:"MAC એડ્રેસ",cidrv4:"IPv4 શ્રેણી",cidrv6:"IPv6 શ્રેણી",base64:"base64-એન્કોડેડ સ્ટ્રિંગ",base64url:"base64url-એન્કોડેડ સ્ટ્રિંગ",json_string:"JSON સ્ટ્રિંગ",e164:"E.164 નંબર",credit_card:"ક્રેડિટ કાર્ડ નંબર",iban:"IBAN",jwt:"JWT",template_literal:"ઇનપુટ"},L={nan:"NaN"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input);return`અમાન્ય ઇનપુટ: અપેક્ષિત ${v}, પ્રાપ્ત ${L[R]??R}`}case"invalid_value":return 1===g.values.length?`અમાન્ય ઇનપુટ: અપેક્ષિત ${stringifyPrimitive(g.values[0])}`:`અમાન્ય વિકલ્પ: ${joinValues(g.values," | ")} માધ્યમથી એક અપેક્ષિત`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`ખૂબ મોટું: ${g.origin??"મૂલ્ય"} ${v}${g.maximum.toString()} ${L.unit??"એલિમેન્ટ"} હોવા જોઈએ`:`ખૂબ મોટું: ${g.origin??"મૂલ્ય"} ${v}${g.maximum.toString()} હોવું જોઈએ`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`ખૂબ નાનું: ${g.origin} ${v}${g.minimum.toString()} ${L.unit} હોવા જોઈએ`:`ખૂબ નાનું: ${g.origin} ${v}${g.minimum.toString()} હોવું જોઈએ`}case"invalid_format":{const L=g;return"starts_with"===L.format?`અમાન્ય સ્ટ્રિંગ: "${L.prefix}" થી શરૂ થવું જોઈએ`:"ends_with"===L.format?`અમાન્ય સ્ટ્રિંગ: "${L.suffix}" પર સમાપ્ત થવું જોઈએ`:"includes"===L.format?`અમાન્ય સ્ટ્રિંગ: "${L.includes}" શામેલ હોવું જોઈએ`:"regex"===L.format?`અમાન્ય સ્ટ્રિંગ: પેટર્ન ${L.pattern} સાથે મેળ ખાવું જોઈએ`:`અમાન્ય ${v[L.format]??g.format}`}case"not_multiple_of":return`અમાન્ય નંબર: ${g.divisor} નો ગુણાંક હોવો જોઈએ`;case"unrecognized_keys":return`ઓળખી શકાતા નહીં તે કી${g.keys.length>1?"ઓ":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`${g.origin} માં અમાન્ય કી`;case"invalid_union":if(g.options&&Array.isArray(g.options)&&g.options.length>0){const v=g.options.map(g=>`'${g}'`).join(" | ");return`અમાન્ય ડિસ્ક્રિમિનેટર મૂલ્ય. અપેક્ષિત ${v}`}return"અમાન્ય ઇનપુટ";case"invalid_element":return`${g.origin} માં અમાન્ય મૂલ્ય`;default:return"અમાન્ય ઇનપુટ"}}};function gu(){return{localeError:error$G()}}const error$F=()=>{const g={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},v={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},typeEntry=v=>v?g[v]:void 0,typeLabel=v=>{const L=typeEntry(v);return L?L.label:v??g.unknown.label},withDefinite=g=>`ה${typeLabel(g)}`,verbFor=g=>{const v=typeEntry(g);return"f"===(v?.gender??"m")?"צריכה להיות":"צריך להיות"},getSizing=g=>g?v[g]??null:null,L={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",gender:"m"},uuidv4:{label:"UUIDv4",gender:"m"},uuidv6:{label:"UUIDv6",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},mac:{label:"כתובת MAC",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},credit_card:{label:"מספר כרטיס אשראי",gender:"m"},iban:{label:"IBAN",gender:"m"},jwt:{label:"JWT",gender:"m"},template_literal:{label:"קלט",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}},R={nan:"NaN"};return v=>{switch(v.code){case"invalid_type":{const L=v.expected,W=R[L??""]??typeLabel(L),ie=parsedType(v.input),ce=R[ie]??g[ie]?.label??ie;return/^[A-Z]/.test(v.expected)?`קלט לא תקין: צריך להיות instanceof ${v.expected}, התקבל ${ce}`:`קלט לא תקין: צריך להיות ${W}, התקבל ${ce}`}case"invalid_value":{if(1===v.values.length)return`ערך לא תקין: הערך חייב להיות ${stringifyPrimitive(v.values[0])}`;const g=v.values.map(g=>stringifyPrimitive(g));if(2===v.values.length)return`ערך לא תקין: האפשרויות המתאימות הן ${g[0]} או ${g[1]}`;const L=g[g.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${g.slice(0,-1).join(", ")} או ${L}`}case"too_big":{const g=getSizing(v.origin),L=withDefinite(v.origin??"value");if("string"===v.origin)return`${g?.longLabel??"ארוך"} מדי: ${L} צריכה להכיל ${v.maximum.toString()} ${g?.unit??""} ${v.inclusive?"או פחות":"לכל היותר"}`.trim();if("number"===v.origin){return`גדול מדי: ${L} צריך להיות ${v.inclusive?`קטן או שווה ל-${v.maximum}`:`קטן מ-${v.maximum}`}`}if("array"===v.origin||"set"===v.origin){return`גדול מדי: ${L} ${"set"===v.origin?"צריכה":"צריך"} להכיל ${v.inclusive?`${v.maximum} ${g?.unit??""} או פחות`:`פחות מ-${v.maximum} ${g?.unit??""}`}`.trim()}const R=v.inclusive?"<=":"<",W=verbFor(v.origin??"value");return g?.unit?`${g.longLabel} מדי: ${L} ${W} ${R}${v.maximum.toString()} ${g.unit}`:`${g?.longLabel??"גדול"} מדי: ${L} ${W} ${R}${v.maximum.toString()}`}case"too_small":{const g=getSizing(v.origin),L=withDefinite(v.origin??"value");if("string"===v.origin)return`${g?.shortLabel??"קצר"} מדי: ${L} צריכה להכיל ${v.minimum.toString()} ${g?.unit??""} ${v.inclusive?"או יותר":"לפחות"}`.trim();if("number"===v.origin){return`קטן מדי: ${L} צריך להיות ${v.inclusive?`גדול או שווה ל-${v.minimum}`:`גדול מ-${v.minimum}`}`}if("array"===v.origin||"set"===v.origin){const R="set"===v.origin?"צריכה":"צריך";if(1===v.minimum&&v.inclusive){return`קטן מדי: ${L} ${R} להכיל ${v.origin,"לפחות פריט אחד"}`}return`קטן מדי: ${L} ${R} להכיל ${v.inclusive?`${v.minimum} ${g?.unit??""} או יותר`:`יותר מ-${v.minimum} ${g?.unit??""}`}`.trim()}const R=v.inclusive?">=":">",W=verbFor(v.origin??"value");return g?.unit?`${g.shortLabel} מדי: ${L} ${W} ${R}${v.minimum.toString()} ${g.unit}`:`${g?.shortLabel??"קטן"} מדי: ${L} ${W} ${R}${v.minimum.toString()}`}case"invalid_format":{const g=v;if("starts_with"===g.format)return`המחרוזת חייבת להתחיל ב "${g.prefix}"`;if("ends_with"===g.format)return`המחרוזת חייבת להסתיים ב "${g.suffix}"`;if("includes"===g.format)return`המחרוזת חייבת לכלול "${g.includes}"`;if("regex"===g.format)return`המחרוזת חייבת להתאים לתבנית ${g.pattern}`;const R=L[g.format];return`${R?.label??g.format} לא ${"f"===(R?.gender??"m")?"תקינה":"תקין"}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${v.divisor}`;case"unrecognized_keys":return`מפתח${v.keys.length>1?"ות":""} לא מזוה${v.keys.length>1?"ים":"ה"}: ${joinValues(v.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":default:return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${withDefinite(v.origin??"array")}`}}};function he(){return{localeError:error$F()}}const error$E=()=>{const g={string:{unit:"अक्षर",verb:"रखने के लिए"},file:{unit:"बाइट्स",verb:"रखने के लिए"},array:{unit:"तत्व",verb:"रखने के लिए"},set:{unit:"तत्व",verb:"रखने के लिए"},map:{unit:"प्रविष्टियाँ",verb:"रखने के लिए"}};function getSizing(v){return g[v]??null}const v={regex:"इनपुट",email:"ईमेल पता",url:"URL",emoji:"इमोजी",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO तिथि और समय",date:"ISO तिथि",time:"ISO समय",duration:"ISO अवधि",ipv4:"IPv4 पता",ipv6:"IPv6 पता",mac:"MAC पता",cidrv4:"IPv4 श्रेणी",cidrv6:"IPv6 श्रेणी",base64:"Base64-एन्कोडेड स्ट्रिंग",base64url:"Base64URL-एन्कोडेड स्ट्रिंग",json_string:"JSON स्ट्रिंग",e164:"E.164 संख्या",credit_card:"क्रेडिट कार्ड संख्या",iban:"IBAN",jwt:"JWT",template_literal:"इनपुट"},L={nan:"NaN"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input);return`अमान्य इनपुट: अपेक्षित ${v}, प्राप्त ${L[R]??R}`}case"invalid_value":return 1===g.values.length?`अमान्य इनपुट: अपेक्षित ${stringifyPrimitive(g.values[0])}`:`अमान्य विकल्प: अपेक्षित मानों में से एक ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`बहुत बड़ा: अपेक्षित था कि ${g.origin??"मान"} में ${v}${g.maximum} ${L.unit} हों`:`बहुत बड़ा: अपेक्षित था कि ${g.origin??"मान"} ${v}${g.maximum} हो`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`बहुत छोटा: अपेक्षित था कि ${g.origin} में ${v}${g.minimum} ${L.unit} हों`:`बहुत छोटा: अपेक्षित था कि ${g.origin} ${v}${g.minimum} हो`}case"invalid_format":{const L=g;return"starts_with"===L.format?`अमान्य स्ट्रिंग: "${L.prefix}" से शुरू होना चाहिए`:"ends_with"===L.format?`अमान्य स्ट्रिंग: "${L.suffix}" पर समाप्त होना चाहिए`:"includes"===L.format?`अमान्य स्ट्रिंग: इसमें "${L.includes}" शामिल होना चाहिए`:"regex"===L.format?`अमान्य स्ट्रिंग: पैटर्न ${L.pattern} से मेल खाना चाहिए`:`अमान्य ${v[L.format]??g.format}`}case"not_multiple_of":return`अमान्य संख्या: यह ${g.divisor} का गुणज होना चाहिए`;case"unrecognized_keys":return`अपरिचित कुंजी${g.keys.length>1?"याँ":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`अमान्य कुंजी: ${g.origin} में`;case"invalid_union":if(g.options&&Array.isArray(g.options)&&g.options.length>0){const v=g.options.map(g=>`'${g}'`).join(" | ");return`अमान्य डिस्क्रिमिनेटर मान: अपेक्षित ${v}`}return"अमान्य इनपुट";case"invalid_element":return`अमान्य मान: ${g.origin} में`;default:return"अमान्य इनपुट"}}};function hi(){return{localeError:error$E()}}const error$D=()=>{const g={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function getSizing(v){return g[v]??null}const v={regex:"unos",email:"email adresa",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 datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",credit_card:"broj kreditne kartice",iban:"IBAN",jwt:"JWT",template_literal:"unos"},L={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`Neispravan unos: očekuje se instanceof ${g.expected}, a primljeno je ${W}`:`Neispravan unos: očekuje se ${v}, a primljeno je ${W}`}case"invalid_value":return 1===g.values.length?`Neispravna vrijednost: očekivano ${stringifyPrimitive(g.values[0])}`:`Neispravna opcija: očekivano jedno od ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",R=getSizing(g.origin),W=L[g.origin]??g.origin;return R?`Preveliko: očekivano da ${W??"vrijednost"} ima ${v}${g.maximum.toString()} ${R.unit??"elemenata"}`:`Preveliko: očekivano da ${W??"vrijednost"} bude ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",R=getSizing(g.origin),W=L[g.origin]??g.origin;return R?`Premalo: očekivano da ${W} ima ${v}${g.minimum.toString()} ${R.unit}`:`Premalo: očekivano da ${W} bude ${v}${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`Neispravan tekst: mora započinjati s "${L.prefix}"`:"ends_with"===L.format?`Neispravan tekst: mora završavati s "${L.suffix}"`:"includes"===L.format?`Neispravan tekst: mora sadržavati "${L.includes}"`:"regex"===L.format?`Neispravan tekst: mora odgovarati uzorku ${L.pattern}`:`Neispravna ${v[L.format]??g.format}`}case"not_multiple_of":return`Neispravan broj: mora biti višekratnik od ${g.divisor}`;case"unrecognized_keys":return`Neprepoznat${g.keys.length>1?"i ključevi":" ključ"}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Neispravan ključ u ${L[g.origin]??g.origin}`;case"invalid_union":default:return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${L[g.origin]??g.origin}`}}};function hr(){return{localeError:error$D()}}const error$C=()=>{const g={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"},map:{unit:"elem",verb:"legyen"}};function getSizing(v){return g[v]??null}const v={regex:"bemenet",email:"email cím",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 időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",mac:"MAC cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",credit_card:"hitelkártyaszám",iban:"IBAN",jwt:"JWT",template_literal:"bemenet"},L={nan:"NaN",number:"szám",array:"tömb"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`Érvénytelen bemenet: a várt érték instanceof ${g.expected}, a kapott érték ${W}`:`Érvénytelen bemenet: a várt érték ${v}, a kapott érték ${W}`}case"invalid_value":return 1===g.values.length?`Érvénytelen bemenet: a várt érték ${stringifyPrimitive(g.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`Túl nagy: ${g.origin??"érték"} mérete túl nagy ${v}${g.maximum.toString()} ${L.unit??"elem"}`:`Túl nagy: a bemeneti érték ${g.origin??"érték"} túl nagy: ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`Túl kicsi: a bemeneti érték ${g.origin} mérete túl kicsi ${v}${g.minimum.toString()} ${L.unit}`:`Túl kicsi: a bemeneti érték ${g.origin} túl kicsi ${v}${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`Érvénytelen string: "${L.prefix}" értékkel kell kezdődnie`:"ends_with"===L.format?`Érvénytelen string: "${L.suffix}" értékkel kell végződnie`:"includes"===L.format?`Érvénytelen string: "${L.includes}" értéket kell tartalmaznia`:"regex"===L.format?`Érvénytelen string: ${L.pattern} mintának kell megfelelnie`:`Érvénytelen ${v[L.format]??g.format}`}case"not_multiple_of":return`Érvénytelen szám: ${g.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${g.keys.length>1?"s":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${g.origin}`;case"invalid_union":default:return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${g.origin}`}}};function hu(){return{localeError:error$C()}}function getArmenianPlural(g,v,L){return 1===Math.abs(g)?v:L}function withDefiniteArticle(g){if(!g)return"";const v=g[g.length-1];return g+(["ա","ե","ը","ի","ո","ու","օ"].includes(v)?"ն":"ը")}const error$B=()=>{const g={string:{unit:{one:"նշան",many:"նշաններ"},verb:"ունենալ"},file:{unit:{one:"բայթ",many:"բայթեր"},verb:"ունենալ"},array:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},set:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},map:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"}};function getSizing(v){return g[v]??null}const v={regex:"մուտք",email:"էլ. հասցե",url:"URL",emoji:"էմոջի",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO ամսաթիվ և ժամ",date:"ISO ամսաթիվ",time:"ISO ժամ",duration:"ISO տևողություն",ipv4:"IPv4 հասցե",ipv6:"IPv6 հասցե",mac:"MAC հասցե",cidrv4:"IPv4 միջակայք",cidrv6:"IPv6 միջակայք",base64:"base64 ձևաչափով տող",base64url:"base64url ձևաչափով տող",json_string:"JSON տող",e164:"E.164 համար",credit_card:"կրեդիտ քարտի համար",iban:"IBAN",jwt:"JWT",template_literal:"մուտք"},L={nan:"NaN",number:"թիվ",array:"զանգված"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`Սխալ մուտքագրում․ սպասվում էր instanceof ${g.expected}, ստացվել է ${W}`:`Սխալ մուտքագրում․ սպասվում էր ${v}, ստացվել է ${W}`}case"invalid_value":return 1===g.values.length?`Սխալ մուտքագրում․ սպասվում էր ${stringifyPrimitive(g.values[1])}`:`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);if(L){const R=getArmenianPlural(Number(g.maximum),L.unit.one,L.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${withDefiniteArticle(g.origin??"արժեք")} կունենա ${v}${g.maximum.toString()} ${R}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${withDefiniteArticle(g.origin??"արժեք")} լինի ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);if(L){const R=getArmenianPlural(Number(g.minimum),L.unit.one,L.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${withDefiniteArticle(g.origin)} կունենա ${v}${g.minimum.toString()} ${R}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${withDefiniteArticle(g.origin)} լինի ${v}${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`Սխալ տող․ պետք է սկսվի "${L.prefix}"-ով`:"ends_with"===L.format?`Սխալ տող․ պետք է ավարտվի "${L.suffix}"-ով`:"includes"===L.format?`Սխալ տող․ պետք է պարունակի "${L.includes}"`:"regex"===L.format?`Սխալ տող․ պետք է համապատասխանի ${L.pattern} ձևաչափին`:`Սխալ ${v[L.format]??g.format}`}case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${g.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${g.keys.length>1?"ներ":""}. ${joinValues(g.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${withDefiniteArticle(g.origin)}-ում`;case"invalid_union":default:return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${withDefiniteArticle(g.origin)}-ում`}}};function hy(){return{localeError:error$B()}}const error$A=()=>{const g={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"},map:{unit:"item",verb:"memiliki"}};function getSizing(v){return g[v]??null}const v={regex:"input",email:"alamat email",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:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",mac:"alamat MAC",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",credit_card:"nomor kartu kredit",iban:"IBAN",jwt:"JWT",template_literal:"input"},L={nan:"NaN"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`Input tidak valid: diharapkan instanceof ${g.expected}, diterima ${W}`:`Input tidak valid: diharapkan ${v}, diterima ${W}`}case"invalid_value":return 1===g.values.length?`Input tidak valid: diharapkan ${stringifyPrimitive(g.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`Terlalu besar: diharapkan ${g.origin??"value"} memiliki ${v}${g.maximum.toString()} ${L.unit??"elemen"}`:`Terlalu besar: diharapkan ${g.origin??"value"} menjadi ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`Terlalu kecil: diharapkan ${g.origin} memiliki ${v}${g.minimum.toString()} ${L.unit}`:`Terlalu kecil: diharapkan ${g.origin} menjadi ${v}${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`String tidak valid: harus dimulai dengan "${L.prefix}"`:"ends_with"===L.format?`String tidak valid: harus berakhir dengan "${L.suffix}"`:"includes"===L.format?`String tidak valid: harus menyertakan "${L.includes}"`:"regex"===L.format?`String tidak valid: harus sesuai pola ${L.pattern}`:`${v[L.format]??g.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${g.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${g.keys.length>1?"s":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${g.origin}`;case"invalid_union":default:return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${g.origin}`}}};function id(){return{localeError:error$A()}}const error$z=()=>{const g={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"},map:{unit:"hluti",verb:"að hafa"}};function getSizing(v){return g[v]??null}const v={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",credit_card:"kreditkortanúmer",iban:"IBAN",jwt:"JWT",template_literal:"gildi"},L={nan:"NaN",number:"númer",array:"fylki"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`Rangt gildi: Þú slóst inn ${W} þar sem á að vera instanceof ${g.expected}`:`Rangt gildi: Þú slóst inn ${W} þar sem á að vera ${v}`}case"invalid_value":return 1===g.values.length?`Rangt gildi: gert ráð fyrir ${stringifyPrimitive(g.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`Of stórt: gert er ráð fyrir að ${g.origin??"gildi"} hafi ${v}${g.maximum.toString()} ${L.unit??"hluti"}`:`Of stórt: gert er ráð fyrir að ${g.origin??"gildi"} sé ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`Of lítið: gert er ráð fyrir að ${g.origin} hafi ${v}${g.minimum.toString()} ${L.unit}`:`Of lítið: gert er ráð fyrir að ${g.origin} sé ${v}${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`Ógildur strengur: verður að byrja á "${L.prefix}"`:"ends_with"===L.format?`Ógildur strengur: verður að enda á "${L.suffix}"`:"includes"===L.format?`Ógildur strengur: verður að innihalda "${L.includes}"`:"regex"===L.format?`Ógildur strengur: verður að fylgja mynstri ${L.pattern}`:`Rangt ${v[L.format]??g.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${g.divisor}`;case"unrecognized_keys":return`Óþekkt ${g.keys.length>1?"ir lyklar":"ur lykill"}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${g.origin}`;case"invalid_union":default:return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${g.origin}`}}};function is(){return{localeError:error$z()}}const error$y=()=>{const g={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"},map:{unit:"elementi",verb:"avere"}};function getSizing(v){return g[v]??null}const v={regex:"input",email:"indirizzo email",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:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",mac:"indirizzo MAC",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",credit_card:"numero di carta di credito",iban:"IBAN",jwt:"JWT",template_literal:"input"},L={nan:"NaN",number:"numero",array:"vettore"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`Input non valido: atteso instanceof ${g.expected}, ricevuto ${W}`:`Input non valido: atteso ${v}, ricevuto ${W}`}case"invalid_value":return 1===g.values.length?`Input non valido: atteso ${stringifyPrimitive(g.values[0])}`:`Opzione non valida: atteso uno tra ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`Troppo grande: ${g.origin??"valore"} deve avere ${v}${g.maximum.toString()} ${L.unit??"elementi"}`:`Troppo grande: ${g.origin??"valore"} deve essere ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`Troppo piccolo: ${g.origin} deve avere ${v}${g.minimum.toString()} ${L.unit}`:`Troppo piccolo: ${g.origin} deve essere ${v}${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`Stringa non valida: deve iniziare con "${L.prefix}"`:"ends_with"===L.format?`Stringa non valida: deve terminare con "${L.suffix}"`:"includes"===L.format?`Stringa non valida: deve includere "${L.includes}"`:"regex"===L.format?`Stringa non valida: deve corrispondere al pattern ${L.pattern}`:`Input non valido: ${v[L.format]??g.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${g.divisor}`;case"unrecognized_keys":return`Chiav${g.keys.length>1?"i":"e"} non riconosciut${g.keys.length>1?"e":"a"}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${g.origin}`;case"invalid_union":default:return"Input non valido";case"invalid_element":return`Valore non valido in ${g.origin}`}}};function it(){return{localeError:error$y()}}const error$x=()=>{const g={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"},map:{unit:"要素",verb:"である"}};function getSizing(v){return g[v]??null}const v={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",mac:"MACアドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",credit_card:"クレジットカード番号",iban:"IBAN",jwt:"JWT",template_literal:"入力値"},L={nan:"NaN",number:"数値",array:"配列"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`無効な入力: instanceof ${g.expected}が期待されましたが、${W}が入力されました`:`無効な入力: ${v}が期待されましたが、${W}が入力されました`}case"invalid_value":return 1===g.values.length?`無効な入力: ${stringifyPrimitive(g.values[0])}が期待されました`:`無効な選択: ${joinValues(g.values,"、")}のいずれかである必要があります`;case"too_big":{const v=g.inclusive?"以下である":"より小さい",L=getSizing(g.origin);return L?`大きすぎる値: ${g.origin??"値"}は${g.maximum.toString()}${L.unit??"要素"}${v}必要があります`:`大きすぎる値: ${g.origin??"値"}は${g.maximum.toString()}${v}必要があります`}case"too_small":{const v=g.inclusive?"以上である":"より大きい",L=getSizing(g.origin);return L?`小さすぎる値: ${g.origin}は${g.minimum.toString()}${L.unit}${v}必要があります`:`小さすぎる値: ${g.origin}は${g.minimum.toString()}${v}必要があります`}case"invalid_format":{const L=g;return"starts_with"===L.format?`無効な文字列: "${L.prefix}"で始まる必要があります`:"ends_with"===L.format?`無効な文字列: "${L.suffix}"で終わる必要があります`:"includes"===L.format?`無効な文字列: "${L.includes}"を含む必要があります`:"regex"===L.format?`無効な文字列: パターン${L.pattern}に一致する必要があります`:`無効な${v[L.format]??g.format}`}case"not_multiple_of":return`無効な数値: ${g.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${g.keys.length>1?"群":""}: ${joinValues(g.keys,"、")}`;case"invalid_key":return`${g.origin}内の無効なキー`;case"invalid_union":default:return"無効な入力";case"invalid_element":return`${g.origin}内の無効な値`}}};function ja(){return{localeError:error$x()}}const error$w=()=>{const g={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},map:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function getSizing(v){return g[v]??null}const v={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",mac:"MAC მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული ველი",base64url:"base64url-კოდირებული ველი",json_string:"JSON ველი",e164:"E.164 ნომერი",credit_card:"საკრედიტო ბარათის ნომერი",iban:"IBAN",jwt:"JWT",template_literal:"შეყვანა"},L={nan:"NaN",number:"რიცხვი",string:"ველი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`არასწორი შეყვანა: მოსალოდნელი instanceof ${g.expected}, მიღებული ${W}`:`არასწორი შეყვანა: მოსალოდნელი ${v}, მიღებული ${W}`}case"invalid_value":return 1===g.values.length?`არასწორი შეყვანა: მოსალოდნელი ${stringifyPrimitive(g.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${joinValues(g.values,"|")}-დან`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`ზედმეტად დიდი: მოსალოდნელი ${g.origin??"მნიშვნელობა"} ${L.verb} ${v}${g.maximum.toString()} ${L.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${g.origin??"მნიშვნელობა"} იყოს ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`ზედმეტად პატარა: მოსალოდნელი ${g.origin} ${L.verb} ${v}${g.minimum.toString()} ${L.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${g.origin} იყოს ${v}${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`არასწორი ველი: უნდა იწყებოდეს "${L.prefix}"-ით`:"ends_with"===L.format?`არასწორი ველი: უნდა მთავრდებოდეს "${L.suffix}"-ით`:"includes"===L.format?`არასწორი ველი: უნდა შეიცავდეს "${L.includes}"-ს`:"regex"===L.format?`არასწორი ველი: უნდა შეესაბამებოდეს შაბლონს ${L.pattern}`:`არასწორი ${v[L.format]??g.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${g.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${g.keys.length>1?"ები":"ი"}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${g.origin}-ში`;case"invalid_union":default:return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${g.origin}-ში`}}};function ka(){return{localeError:error$w()}}const error$v=()=>{const g={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"},map:{unit:"ធាតុ",verb:"គួរមាន"}};function getSizing(v){return g[v]??null}const v={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",mac:"អាសយដ្ឋាន MAC",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",credit_card:"លេខប័ណ្ណឥណទាន",iban:"IBAN",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"},L={nan:"NaN",number:"លេខ",array:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${g.expected} ប៉ុន្តែទទួលបាន ${W}`:`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${v} ប៉ុន្តែទទួលបាន ${W}`}case"invalid_value":return 1===g.values.length?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${stringifyPrimitive(g.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`ធំពេក៖ ត្រូវការ ${g.origin??"តម្លៃ"} ${v} ${g.maximum.toString()} ${L.unit??"ធាតុ"}`:`ធំពេក៖ ត្រូវការ ${g.origin??"តម្លៃ"} ${v} ${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`តូចពេក៖ ត្រូវការ ${g.origin} ${v} ${g.minimum.toString()} ${L.unit}`:`តូចពេក៖ ត្រូវការ ${g.origin} ${v} ${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${L.prefix}"`:"ends_with"===L.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${L.suffix}"`:"includes"===L.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${L.includes}"`:"regex"===L.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${L.pattern}`:`មិនត្រឹមត្រូវ៖ ${v[L.format]??g.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${g.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${joinValues(g.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${g.origin}`;case"invalid_union":default:return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${g.origin}`}}};function km(){return{localeError:error$v()}}function kh(){return km()}const error$u=()=>{const g={string:{unit:"ಅಕ್ಷರಗಳು",verb:"ಹೊಂದಲು"},file:{unit:"ಬೈಟ್‌ಗಳು",verb:"ಹೊಂದಲು"},array:{unit:"ವಸ್ತುಗಳು",verb:"ಹೊಂದಲು"},set:{unit:"ವಸ್ತುಗಳು",verb:"ಹೊಂದಲು"},map:{unit:"entries",verb:"ಹೊಂದಲು"}};function getSizing(v){return g[v]??null}const v={regex:"ಇನ್ಪುಟ್",email:"email ವಿಳಾಸ",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 ದಿನಾಂಕದ ಸಮಯ",date:"ISO ದಿನಾಂಕ",time:"ISO ಸಮಯ",duration:"ISO ಅವಧಿ",ipv4:"IPv4 ವಿಳಾಸ",ipv6:"IPv6 ವಿಳಾಸ",mac:"MAC ವಿಳಾಸ",cidrv4:"IPv4 ವ್ಯಾಪ್ತಿಯ",cidrv6:"IPv6 ವ್ಯಾಪ್ತಿಯ",base64:"base64-encodedಸ್ಟ್ರಿಂಗ್",base64url:"base64url-encodedಸ್ಟ್ರಿಂಗ್",json_string:"JSONಸ್ಟ್ರಿಂಗ್",e164:"E.164 ಸಂಖ್ಯೆ",credit_card:"ಕ್ರೆಡಿಟ್ ಕಾರ್ಡ್ ಸಂಖ್ಯೆ",iban:"IBAN",jwt:"JWT",template_literal:"ಇನ್ಪುಟ್"},L={nan:"NaN"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input);return`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${v}, ಸ್ವೀಕರಿಸಿದನು ${L[R]??R}`}case"invalid_value":return 1===g.values.length?`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${stringifyPrimitive(g.values[0])}`:`ಅಮಾನ್ಯ ಆಯ್ಕೆ: ಇವುಗಳಲ್ಲಿ ಒಂದನ್ನು ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`ತುಂಬಾ ದೊಡ್ಡದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${g.origin??"value"} ಹೊಂದಲು ${v}${g.maximum.toString()} ${L.unit??"ಅಂಶಗಳು"}`:`ತುಂಬಾ ದೊಡ್ಡದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${g.origin??"value"} ಎಂದು ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`ತುಂಬಾ ಚಿಕ್ಕದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${g.origin} ಹೊಂದಲು ${v}${g.minimum.toString()} ${L.unit}`:`ತುಂಬಾ ಚಿಕ್ಕದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${g.origin} ಎಂದು ${v}${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`ಅಮಾನ್ಯವಾದ ಸ್ಟ್ರಿಂಗ್: ಇದರೊಂದಿಗೆ ಪ್ರಾರಂಭಿಸಬೇಕು "${L.prefix}"`:"ends_with"===L.format?`ಅಮಾನ್ಯವಾದ ಸ್ಟ್ರಿಂಗ್: ಇದರೊಂದಿಗೆ ಕೊನೆಗೊಳ್ಳಬೇಕು "${L.suffix}"`:"includes"===L.format?`ಅಮಾನ್ಯ ಸ್ಟ್ರಿಂಗ್: ಒಳಗೊಂಡಿರಬೇಕು "${L.includes}"`:"regex"===L.format?`ಅಮಾನ್ಯವಾದ ಸ್ಟ್ರಿಂಗ್: ಮಾದರಿಗೆ ಹೊಂದಿಕೆಯಾಗಬೇಕು ${L.pattern}`:`ಅಮಾನ್ಯ ${v[L.format]??g.format}`}case"not_multiple_of":return`ಅಮಾನ್ಯ ಸಂಖ್ಯೆ: ಬಹುಸಂಖ್ಯೆಯಾಗಿರಬೇಕು ${g.divisor}`;case"unrecognized_keys":return`ಗುರುತಿಸಲಾಗದ ಕೀ ${g.keys.length>1?"s":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`ಅಮಾನ್ಯವಾದ ಕೀ ಇನ್ ${g.origin}`;case"invalid_union":if(g.options&&Array.isArray(g.options)&&g.options.length>0){const v=g.options.map(g=>`'${g}'`).join(" | ");return`ಅಮಾನ್ಯ ತಾರತಮ್ಯ ಮೌಲ್ಯ. ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${v}`}return"ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್";case"invalid_element":return`ರಲ್ಲಿ ಅಮಾನ್ಯ ಮೌಲ್ಯ ${g.origin}`;default:return"ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್"}}};function kn(){return{localeError:error$u()}}const error$t=()=>{const g={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"},map:{unit:"개",verb:"to have"}};function getSizing(v){return g[v]??null}const v={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",mac:"MAC 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",credit_card:"신용카드 번호",iban:"IBAN",jwt:"JWT",template_literal:"입력"},L={nan:"NaN"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`잘못된 입력: 예상 타입은 instanceof ${g.expected}, 받은 타입은 ${W}입니다`:`잘못된 입력: 예상 타입은 ${v}, 받은 타입은 ${W}입니다`}case"invalid_value":return 1===g.values.length?`잘못된 입력: 값은 ${stringifyPrimitive(g.values[0])} 이어야 합니다`:`잘못된 옵션: ${joinValues(g.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{const v=g.inclusive?"이하":"미만",L="미만"===v?"이어야 합니다":"여야 합니다",R=getSizing(g.origin),W=R?.unit??"요소";return R?`${g.origin??"값"}이 너무 큽니다: ${g.maximum.toString()}${W} ${v}${L}`:`${g.origin??"값"}이 너무 큽니다: ${g.maximum.toString()} ${v}${L}`}case"too_small":{const v=g.inclusive?"이상":"초과",L="이상"===v?"이어야 합니다":"여야 합니다",R=getSizing(g.origin),W=R?.unit??"요소";return R?`${g.origin??"값"}이 너무 작습니다: ${g.minimum.toString()}${W} ${v}${L}`:`${g.origin??"값"}이 너무 작습니다: ${g.minimum.toString()} ${v}${L}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`잘못된 문자열: "${L.prefix}"(으)로 시작해야 합니다`:"ends_with"===L.format?`잘못된 문자열: "${L.suffix}"(으)로 끝나야 합니다`:"includes"===L.format?`잘못된 문자열: "${L.includes}"을(를) 포함해야 합니다`:"regex"===L.format?`잘못된 문자열: 정규식 ${L.pattern} 패턴과 일치해야 합니다`:`잘못된 ${v[L.format]??g.format}`}case"not_multiple_of":return`잘못된 숫자: ${g.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${joinValues(g.keys,", ")}`;case"invalid_key":return`잘못된 키: ${g.origin}`;case"invalid_union":default:return"잘못된 입력";case"invalid_element":return`잘못된 값: ${g.origin}`}}};function ko(){return{localeError:error$t()}}const capitalizeFirstCharacter=g=>g.charAt(0).toUpperCase()+g.slice(1);function getUnitTypeFromNumber(g){const v=Math.abs(g),L=v%10,R=v%100;return R>=11&&R<=19||0===L?"many":1===L?"one":"few"}const error$s=()=>{const g={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function getSizing(v,L,R,W){const ie=g[v]??null;return null===ie?ie:{unit:ie.unit[L],verb:ie.verb[W][R?"inclusive":"notInclusive"]}}const v={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",mac:"MAC adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",credit_card:"kredito kortelės numeris",iban:"IBAN",jwt:"JWT",template_literal:"įvestis"},L={nan:"NaN",number:"skaičius",bigint:"sveikasis skaičius",string:"eilutė",boolean:"loginė reikšmė",undefined:"neapibrėžta reikšmė",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulinė reikšmė"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`Gautas tipas ${W}, o tikėtasi - instanceof ${g.expected}`:`Gautas tipas ${W}, o tikėtasi - ${v}`}case"invalid_value":return 1===g.values.length?`Privalo būti ${stringifyPrimitive(g.values[0])}`:`Privalo būti vienas iš ${joinValues(g.values,"|")} pasirinkimų`;case"too_big":{const v=L[g.origin]??g.origin,R=getSizing(g.origin,getUnitTypeFromNumber(Number(g.maximum)),g.inclusive??!1,"smaller");if(R?.verb)return`${capitalizeFirstCharacter(v??g.origin??"reikšmė")} ${R.verb} ${g.maximum.toString()} ${R.unit??"elementų"}`;const W=g.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${capitalizeFirstCharacter(v??g.origin??"reikšmė")} turi būti ${W} ${g.maximum.toString()} ${R?.unit}`}case"too_small":{const v=L[g.origin]??g.origin,R=getSizing(g.origin,getUnitTypeFromNumber(Number(g.minimum)),g.inclusive??!1,"bigger");if(R?.verb)return`${capitalizeFirstCharacter(v??g.origin??"reikšmė")} ${R.verb} ${g.minimum.toString()} ${R.unit??"elementų"}`;const W=g.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${capitalizeFirstCharacter(v??g.origin??"reikšmė")} turi būti ${W} ${g.minimum.toString()} ${R?.unit}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`Eilutė privalo prasidėti "${L.prefix}"`:"ends_with"===L.format?`Eilutė privalo pasibaigti "${L.suffix}"`:"includes"===L.format?`Eilutė privalo įtraukti "${L.includes}"`:"regex"===L.format?`Eilutė privalo atitikti ${L.pattern}`:`Neteisingas ${v[L.format]??g.format}`}case"not_multiple_of":return`Skaičius privalo būti ${g.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${g.keys.length>1?"i":"as"} rakt${g.keys.length>1?"ai":"as"}: ${joinValues(g.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":default:return"Klaidinga įvestis";case"invalid_element":{const v=L[g.origin]??g.origin;return`${capitalizeFirstCharacter(v??g.origin??"reikšmė")} turi klaidingą įvestį`}}}};function lt(){return{localeError:error$s()}}const error$r=()=>{const g={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"},map:{unit:"ставки",verb:"да имаат"}};function getSizing(v){return g[v]??null}const v={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",mac:"MAC адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",credit_card:"број на кредитна картичка",iban:"IBAN",jwt:"JWT",template_literal:"внес"},L={nan:"NaN",number:"број",array:"низа"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`Грешен внес: се очекува instanceof ${g.expected}, примено ${W}`:`Грешен внес: се очекува ${v}, примено ${W}`}case"invalid_value":return 1===g.values.length?`Invalid input: expected ${stringifyPrimitive(g.values[0])}`:`Грешана опција: се очекува една ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`Премногу голем: се очекува ${g.origin??"вредноста"} да има ${v}${g.maximum.toString()} ${L.unit??"елементи"}`:`Премногу голем: се очекува ${g.origin??"вредноста"} да биде ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`Премногу мал: се очекува ${g.origin} да има ${v}${g.minimum.toString()} ${L.unit}`:`Премногу мал: се очекува ${g.origin} да биде ${v}${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`Неважечка низа: мора да започнува со "${L.prefix}"`:"ends_with"===L.format?`Неважечка низа: мора да завршува со "${L.suffix}"`:"includes"===L.format?`Неважечка низа: мора да вклучува "${L.includes}"`:"regex"===L.format?`Неважечка низа: мора да одгоара на патернот ${L.pattern}`:`Invalid ${v[L.format]??g.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${g.divisor}`;case"unrecognized_keys":return`${g.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${g.origin}`;case"invalid_union":default:return"Грешен внес";case"invalid_element":return`Грешна вредност во ${g.origin}`}}};function mk(){return{localeError:error$r()}}const error$q=()=>{const g={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"},map:{unit:"elemen",verb:"mempunyai"}};function getSizing(v){return g[v]??null}const v={regex:"input",email:"alamat e-mel",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:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",mac:"alamat MAC",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",credit_card:"nombor kad kredit",iban:"IBAN",jwt:"JWT",template_literal:"input"},L={nan:"NaN",number:"nombor"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`Input tidak sah: dijangka instanceof ${g.expected}, diterima ${W}`:`Input tidak sah: dijangka ${v}, diterima ${W}`}case"invalid_value":return 1===g.values.length?`Input tidak sah: dijangka ${stringifyPrimitive(g.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`Terlalu besar: dijangka ${g.origin??"nilai"} ${L.verb} ${v}${g.maximum.toString()} ${L.unit??"elemen"}`:`Terlalu besar: dijangka ${g.origin??"nilai"} adalah ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`Terlalu kecil: dijangka ${g.origin} ${L.verb} ${v}${g.minimum.toString()} ${L.unit}`:`Terlalu kecil: dijangka ${g.origin} adalah ${v}${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`String tidak sah: mesti bermula dengan "${L.prefix}"`:"ends_with"===L.format?`String tidak sah: mesti berakhir dengan "${L.suffix}"`:"includes"===L.format?`String tidak sah: mesti mengandungi "${L.includes}"`:"regex"===L.format?`String tidak sah: mesti sepadan dengan corak ${L.pattern}`:`${v[L.format]??g.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${g.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${g.origin}`;case"invalid_union":default:return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${g.origin}`}}};function ms(){return{localeError:error$q()}}const error$p=()=>{const g={string:{unit:"अक्षर",verb:"हुनुपर्छ"},file:{unit:"बाइट",verb:"हुनुपर्छ"},array:{unit:"तत्व",verb:"हुनुपर्छ"},set:{unit:"तत्व",verb:"हुनुपर्छ"},map:{unit:"प्रविष्टि",verb:"हुनुपर्छ"}};function getSizing(v){return g[v]??null}const v={regex:"इनपुट",email:"इमेल ठेगाना",url:"URL",emoji:"इमोजी",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO मिति र समय",date:"ISO मिति",time:"ISO समय",duration:"ISO अवधि",ipv4:"IPv4 ठेगाना",ipv6:"IPv6 ठेगाना",mac:"MAC ठेगाना",cidrv4:"IPv4 दायरा",cidrv6:"IPv6 दायरा",base64:"base64-इन्कोड गरिएको स्ट्रिङ",base64url:"base64url-इन्कोड गरिएको स्ट्रिङ",json_string:"JSON स्ट्रिङ",e164:"E.164 नम्बर",credit_card:"क्रेडिट कार्ड नम्बर",iban:"IBAN",jwt:"JWT",template_literal:"इनपुट"},L={nan:"NaN"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input);return`अमान्य इनपुट: अपेक्षित ${v}, प्राप्त ${L[R]??R}`}case"invalid_value":return 1===g.values.length?`अमान्य इनपुट: अपेक्षित ${stringifyPrimitive(g.values[0])}`:`अमान्य विकल्प: अपेक्षित मानहरू मध्ये एक ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`धेरै ठूलो: ${g.origin??"मान"} मा ${v}${g.maximum.toString()} ${L.unit} ${L.verb}`:`धेरै ठूलो: ${g.origin??"मान"} ${v}${g.maximum.toString()} हुनुपर्छ`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`धेरै सानो: ${g.origin} मा ${v}${g.minimum.toString()} ${L.unit} ${L.verb}`:`धेरै सानो: ${g.origin} ${v}${g.minimum.toString()} हुनुपर्छ`}case"invalid_format":{const L=g;return"starts_with"===L.format?`अमान्य स्ट्रिङ: "${L.prefix}" बाट सुरु हुनुपर्छ`:"ends_with"===L.format?`अमान्य स्ट्रिङ: "${L.suffix}" मा समाप्त हुनुपर्छ`:"includes"===L.format?`अमान्य स्ट्रिङ: "${L.includes}" समावेश हुनुपर्छ`:"regex"===L.format?`अमान्य स्ट्रिङ: ढाँचा ${L.pattern} सँग मेल खानुपर्छ`:`अमान्य ${v[L.format]??g.format}`}case"not_multiple_of":return`अमान्य संख्या: ${g.divisor} को गुणज हुनुपर्छ`;case"unrecognized_keys":return`अपरिचित कुञ्जी${g.keys.length>1?"हरू":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`अमान्य कुञ्जी: ${g.origin} मा`;case"invalid_union":if(g.options&&Array.isArray(g.options)&&g.options.length>0){const v=g.options.map(g=>`'${g}'`).join(" | ");return`अमान्य डिस्क्रिमिनेटर मान: अपेक्षित ${v}`}return"अमान्य इनपुट";case"invalid_element":return`अमान्य मान: ${g.origin} मा`;default:return"अमान्य इनपुट"}}};function ne(){return{localeError:error$p()}}const error$o=()=>{const g={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"},map:{unit:"elementen",verb:"heeft"}};function getSizing(v){return g[v]??null}const v={regex:"invoer",email:"emailadres",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 datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",mac:"MAC-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",credit_card:"creditcardnummer",iban:"IBAN",jwt:"JWT",template_literal:"invoer"},L={nan:"NaN",number:"getal"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`Ongeldige invoer: verwacht instanceof ${g.expected}, ontving ${W}`:`Ongeldige invoer: verwacht ${v}, ontving ${W}`}case"invalid_value":return 1===g.values.length?`Ongeldige invoer: verwacht ${stringifyPrimitive(g.values[0])}`:`Ongeldige optie: verwacht één van ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin),R="date"===g.origin?"laat":"string"===g.origin?"lang":"groot";return L?`Te ${R}: verwacht dat ${g.origin??"waarde"} ${v}${g.maximum.toString()} ${L.unit??"elementen"} ${L.verb}`:`Te ${R}: verwacht dat ${g.origin??"waarde"} ${v}${g.maximum.toString()} is`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin),R="date"===g.origin?"vroeg":"string"===g.origin?"kort":"klein";return L?`Te ${R}: verwacht dat ${g.origin} ${v}${g.minimum.toString()} ${L.unit} ${L.verb}`:`Te ${R}: verwacht dat ${g.origin} ${v}${g.minimum.toString()} is`}case"invalid_format":{const L=g;return"starts_with"===L.format?`Ongeldige tekst: moet met "${L.prefix}" beginnen`:"ends_with"===L.format?`Ongeldige tekst: moet op "${L.suffix}" eindigen`:"includes"===L.format?`Ongeldige tekst: moet "${L.includes}" bevatten`:"regex"===L.format?`Ongeldige tekst: moet overeenkomen met patroon ${L.pattern}`:`Ongeldig: ${v[L.format]??g.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${g.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${g.keys.length>1?"s":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${g.origin}`;case"invalid_union":default:return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${g.origin}`}}};function nl(){return{localeError:error$o()}}const error$n=()=>{const g={string:{unit:"teikn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"element",verb:"å innehalde"},set:{unit:"element",verb:"å innehalde"},map:{unit:"element",verb:"å innehalde"}};function getSizing(v){return g[v]??null}const v={regex:"input",email:"e-postadresse",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 dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varigheit",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkoda streng",base64url:"base64url-enkoda streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",iban:"IBAN",jwt:"JWT",template_literal:"input"},L={nan:"NaN",number:"tal",array:"liste"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`Ugyldig input: forventa instanceof ${g.expected}, fekk ${W}`:`Ugyldig input: forventa ${v}, fekk ${W}`}case"invalid_value":return 1===g.values.length?`Ugyldig verdi: forventa ${stringifyPrimitive(g.values[0])}`:`Ugyldig val: forventa eitt av ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`For stor(t): forventa ${g.origin??"value"} til å ha ${v}${g.maximum.toString()} ${L.unit??"element"}`:`For stor(t): forventa ${g.origin??"value"} til å ha ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`For lite(n): forventa ${g.origin} til å ha ${v}${g.minimum.toString()} ${L.unit}`:`For lite(n): forventa ${g.origin} til å ha ${v}${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`Ugyldig streng: må starte med "${L.prefix}"`:"ends_with"===L.format?`Ugyldig streng: må slutte med "${L.suffix}"`:"includes"===L.format?`Ugyldig streng: må innehalde "${L.includes}"`:"regex"===L.format?`Ugyldig streng: må matche mønsteret ${L.pattern}`:`Ugyldig ${v[L.format]??g.format}`}case"not_multiple_of":return`Ugyldig tal: må vere eit multiplum av ${g.divisor}`;case"unrecognized_keys":return`${g.keys.length>1?"Ukjende nøklar":"Ukjend nøkkel"}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${g.origin}`;case"invalid_union":default:return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${g.origin}`}}};function nn(){return{localeError:error$n()}}const error$m=()=>{const g={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"},map:{unit:"elementer",verb:"å inneholde"}};function getSizing(v){return g[v]??null}const v={regex:"input",email:"e-postadresse",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 dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",iban:"IBAN",jwt:"JWT",template_literal:"input"},L={nan:"NaN",number:"tall",array:"liste"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`Ugyldig input: forventet instanceof ${g.expected}, fikk ${W}`:`Ugyldig input: forventet ${v}, fikk ${W}`}case"invalid_value":return 1===g.values.length?`Ugyldig verdi: forventet ${stringifyPrimitive(g.values[0])}`:`Ugyldig valg: forventet en av ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`For stor(t): forventet ${g.origin??"value"} til å ha ${v}${g.maximum.toString()} ${L.unit??"elementer"}`:`For stor(t): forventet ${g.origin??"value"} til å ha ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`For lite(n): forventet ${g.origin} til å ha ${v}${g.minimum.toString()} ${L.unit}`:`For lite(n): forventet ${g.origin} til å ha ${v}${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`Ugyldig streng: må starte med "${L.prefix}"`:"ends_with"===L.format?`Ugyldig streng: må ende med "${L.suffix}"`:"includes"===L.format?`Ugyldig streng: må inneholde "${L.includes}"`:"regex"===L.format?`Ugyldig streng: må matche mønsteret ${L.pattern}`:`Ugyldig ${v[L.format]??g.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${g.divisor}`;case"unrecognized_keys":return`${g.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${g.origin}`;case"invalid_union":default:return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${g.origin}`}}};function no(){return{localeError:error$m()}}const error$l=()=>{const g={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"},map:{unit:"unsur",verb:"olmalıdır"}};function getSizing(v){return g[v]??null}const v={regex:"giren",email:"epostagâh",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 hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",mac:"MAC nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",credit_card:"i'tibâr kartı numarası",iban:"IBAN",jwt:"JWT",template_literal:"giren"},L={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`Fâsit giren: umulan instanceof ${g.expected}, alınan ${W}`:`Fâsit giren: umulan ${v}, alınan ${W}`}case"invalid_value":return 1===g.values.length?`Fâsit giren: umulan ${stringifyPrimitive(g.values[0])}`:`Fâsit tercih: mûteberler ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`Fazla büyük: ${g.origin??"value"}, ${v}${g.maximum.toString()} ${L.unit??"elements"} sahip olmalıydı.`:`Fazla büyük: ${g.origin??"value"}, ${v}${g.maximum.toString()} olmalıydı.`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`Fazla küçük: ${g.origin}, ${v}${g.minimum.toString()} ${L.unit} sahip olmalıydı.`:`Fazla küçük: ${g.origin}, ${v}${g.minimum.toString()} olmalıydı.`}case"invalid_format":{const L=g;return"starts_with"===L.format?`Fâsit metin: "${L.prefix}" ile başlamalı.`:"ends_with"===L.format?`Fâsit metin: "${L.suffix}" ile bitmeli.`:"includes"===L.format?`Fâsit metin: "${L.includes}" ihtivâ etmeli.`:"regex"===L.format?`Fâsit metin: ${L.pattern} nakşına uymalı.`:`Fâsit ${v[L.format]??g.format}`}case"not_multiple_of":return`Fâsit sayı: ${g.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${g.keys.length>1?"s":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`${g.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${g.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function ota(){return{localeError:error$l()}}const error$k=()=>{const g={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"},map:{unit:"توکي",verb:"ولري"}};function getSizing(v){return g[v]??null}const v={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",mac:"د MAC پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",credit_card:"د کریډیټ کارت شمیره",iban:"IBAN",jwt:"JWT",template_literal:"ورودي"},L={nan:"NaN",number:"عدد",array:"ارې"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`ناسم ورودي: باید instanceof ${g.expected} وای, مګر ${W} ترلاسه شو`:`ناسم ورودي: باید ${v} وای, مګر ${W} ترلاسه شو`}case"invalid_value":return 1===g.values.length?`ناسم ورودي: باید ${stringifyPrimitive(g.values[0])} وای`:`ناسم انتخاب: باید یو له ${joinValues(g.values,"|")} څخه وای`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`ډیر لوی: ${g.origin??"ارزښت"} باید ${v}${g.maximum.toString()} ${L.unit??"عنصرونه"} ولري`:`ډیر لوی: ${g.origin??"ارزښت"} باید ${v}${g.maximum.toString()} وي`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`ډیر کوچنی: ${g.origin} باید ${v}${g.minimum.toString()} ${L.unit} ولري`:`ډیر کوچنی: ${g.origin} باید ${v}${g.minimum.toString()} وي`}case"invalid_format":{const L=g;return"starts_with"===L.format?`ناسم متن: باید د "${L.prefix}" سره پیل شي`:"ends_with"===L.format?`ناسم متن: باید د "${L.suffix}" سره پای ته ورسيږي`:"includes"===L.format?`ناسم متن: باید "${L.includes}" ولري`:"regex"===L.format?`ناسم متن: باید د ${L.pattern} سره مطابقت ولري`:`${v[L.format]??g.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${g.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${g.keys.length>1?"کلیډونه":"کلیډ"}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${g.origin} کې`;case"invalid_union":default:return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${g.origin} کې`}}};function ps(){return{localeError:error$k()}}const error$j=()=>{const g={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"},map:{unit:"elementów",verb:"mieć"}};function getSizing(v){return g[v]??null}const v={regex:"wyrażenie",email:"adres email",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:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",mac:"adres MAC",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",credit_card:"numer karty kredytowej",iban:"IBAN",jwt:"JWT",template_literal:"wejście"},L={nan:"NaN",number:"liczba",array:"tablica"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${g.expected}, otrzymano ${W}`:`Nieprawidłowe dane wejściowe: oczekiwano ${v}, otrzymano ${W}`}case"invalid_value":return 1===g.values.length?`Nieprawidłowe dane wejściowe: oczekiwano ${stringifyPrimitive(g.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`Za duża wartość: oczekiwano, że ${g.origin??"wartość"} będzie mieć ${v}${g.maximum.toString()} ${L.unit??"elementów"}`:`Zbyt duż(y/a/e): oczekiwano, że ${g.origin??"wartość"} będzie wynosić ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`Za mała wartość: oczekiwano, że ${g.origin??"wartość"} będzie mieć ${v}${g.minimum.toString()} ${L.unit??"elementów"}`:`Zbyt mał(y/a/e): oczekiwano, że ${g.origin??"wartość"} będzie wynosić ${v}${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${L.prefix}"`:"ends_with"===L.format?`Nieprawidłowy ciąg znaków: musi kończyć się na "${L.suffix}"`:"includes"===L.format?`Nieprawidłowy ciąg znaków: musi zawierać "${L.includes}"`:"regex"===L.format?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${L.pattern}`:`Nieprawidłow(y/a/e) ${v[L.format]??g.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${g.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${g.keys.length>1?"s":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${g.origin}`;case"invalid_union":default:return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${g.origin}`}}};function pl(){return{localeError:error$j()}}const error$i=()=>{const g={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function getSizing(v){return g[v]??null}const v={regex:"a entrada",email:"o endereço de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a duração ISO",ipv4:"o endereço IPv4",ipv6:"o endereço IPv6",mac:"o endereço MAC",cidrv4:"o intervalo de endereços IPv4",cidrv6:"o intervalo de endereços IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o número E.164",credit_card:"o número de cartão de crédito",iban:"o IBAN",jwt:"o JWT",template_literal:"a entrada"},L={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},R={string:{name:"texto",articles:L.masculine},number:{name:"número",articles:L.masculine},int:{name:"número inteiro",articles:L.masculine},boolean:{name:"valor booleano",articles:L.masculine},bigint:{name:"número bigint",articles:L.masculine},symbol:{name:"símbolo",articles:L.masculine},undefined:{name:'valor "undefined"',articles:L.masculine},null:{name:'valor "nulo"',articles:L.masculine},never:{name:'valor "never"',articles:L.masculine},void:{name:'valor "void"',articles:L.masculine},date:{name:"data",articles:L.feminine},array:{name:"vetor",articles:L.masculine},object:{name:"objeto",articles:L.masculine},tuple:{name:"tuplo",articles:L.masculine},record:{name:"registo",articles:L.masculine},map:{name:"mapa",articles:L.masculine},set:{name:"conjunto",articles:L.masculine},file:{name:"ficheiro",articles:L.masculine},nonoptional:{name:"valor não opcional",articles:L.masculine},nan:{name:'valor "NaN"',articles:L.masculine},function:{name:"função",articles:L.feminine}};function translateOriginWithArticle(g,v){const W=R[g]??{name:`valor "${g}"`,articles:L.masculine};return`${W.articles[v]} ${W.name}`}return g=>{switch(g.code){case"invalid_type":return`Entrada inválida: esperava ${translateOriginWithArticle(g.expected,"indefinite")}, recebeu ${translateOriginWithArticle(parsedType(g.input),"indefinite")}`;case"invalid_value":return 1===g.values.length?`Entrada inválida: esperava ${stringifyPrimitive(g.values[0])}`:`Opção inválida: esperava uma das seguintes opções: ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`Demasiado grande: esperava que ${translateOriginWithArticle(g.origin,"definite")} tivesse ${v} ${g.maximum.toString()} ${L.unit??"elementos"}`:`Demasiado grande: esperava que ${translateOriginWithArticle(g.origin,"definite")} fosse ${v} ${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`Demasiado pequeno: esperava que ${translateOriginWithArticle(g.origin,"definite")} tivesse ${v} ${g.minimum.toString()} ${L.unit??"elementos"}`:`Demasiado pequeno: esperava que ${translateOriginWithArticle(g.origin,"definite")} fosse ${v} ${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`Texto inválido: deve começar por "${L.prefix}"`:"ends_with"===L.format?`Texto inválido: deve terminar em "${L.suffix}"`:"includes"===L.format?`Texto inválido: deve incluir "${L.includes}"`:"regex"===L.format?`Texto inválido: deve corresponder ao padrão ${L.pattern}`:`Formato d${v[L.format]??g.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${g.divisor}`;case"unrecognized_keys":{const v=g.keys.length>1?"s":"";return`Chave${v} inválida${v}: ${joinValues(g.keys,", ")}`}case"invalid_key":case"invalid_element":return`Entrada inválida n${translateOriginWithArticle(g.origin,"definite")}`;case"invalid_union":if(g.options&&Array.isArray(g.options)&&g.options.length>0){const v=g.options.map(g=>`'${g}'`).join(" | ");return`Valor de discriminação inválido. Esperava ${v}`}return"Entrada inválida";default:return"Entrada inválida"}}};function pt(){return{localeError:error$i()}}const error$h=()=>{const g={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function getSizing(v){return g[v]??null}const v={regex:"a entrada",email:"o endereço de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a duração ISO",ipv4:"o endereço IPv4",ipv6:"o endereço IPv6",mac:"o endereço MAC",cidrv4:"a faixa de endereços IPv4",cidrv6:"a faixa de endereços IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o número E.164",credit_card:"o número de cartão de crédito",iban:"o IBAN",jwt:"o JWT",template_literal:"a entrada"},L={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},R={string:{name:"texto",articles:L.masculine},number:{name:"número",articles:L.masculine},int:{name:"número inteiro",articles:L.masculine},boolean:{name:"valor booleano",articles:L.masculine},bigint:{name:"número bigint",articles:L.masculine},symbol:{name:"símbolo",articles:L.masculine},undefined:{name:'valor "undefined"',articles:L.masculine},null:{name:'valor "nulo"',articles:L.masculine},never:{name:'valor "never"',articles:L.masculine},void:{name:'valor "void"',articles:L.masculine},date:{name:"data",articles:L.feminine},array:{name:"vetor",articles:L.masculine},object:{name:"objeto",articles:L.masculine},tuple:{name:"tupla",articles:L.feminine},record:{name:"registro",articles:L.masculine},map:{name:"mapa",articles:L.masculine},set:{name:"conjunto",articles:L.masculine},file:{name:"arquivo",articles:L.masculine},nonoptional:{name:"valor não opcional",articles:L.masculine},nan:{name:'valor "NaN"',articles:L.masculine},function:{name:"função",articles:L.feminine}};function translateOriginWithArticle(g,v){const W=R[g]??{name:`valor "${g}"`,articles:L.masculine};return`${W.articles[v]} ${W.name}`}return g=>{switch(g.code){case"invalid_type":return`Entrada inválida: esperava ${translateOriginWithArticle(g.expected,"indefinite")}, recebeu ${translateOriginWithArticle(parsedType(g.input),"indefinite")}`;case"invalid_value":return 1===g.values.length?`Entrada inválida: esperava ${stringifyPrimitive(g.values[0])}`:`Opção inválida: esperava uma das seguintes opções: ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`Grande demais: esperava que ${translateOriginWithArticle(g.origin,"definite")} tivesse ${v} ${g.maximum.toString()} ${L.unit??"elementos"}`:`Grande demais: esperava que ${translateOriginWithArticle(g.origin,"definite")} fosse ${v} ${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`Pequeno demais: esperava que ${translateOriginWithArticle(g.origin,"definite")} tivesse ${v} ${g.minimum.toString()} ${L.unit??"elementos"}`:`Pequeno demais: esperava que ${translateOriginWithArticle(g.origin,"definite")} fosse ${v} ${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`Texto inválido: deve começar com "${L.prefix}"`:"ends_with"===L.format?`Texto inválido: deve terminar com "${L.suffix}"`:"includes"===L.format?`Texto inválido: deve incluir "${L.includes}"`:"regex"===L.format?`Texto inválido: deve corresponder ao padrão ${L.pattern}`:`Formato d${v[L.format]??g.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${g.divisor}`;case"unrecognized_keys":{const v=g.keys.length>1?"s":"";return`Chave${v} inválida${v}: ${joinValues(g.keys,", ")}`}case"invalid_key":case"invalid_element":return`Entrada inválida n${translateOriginWithArticle(g.origin,"definite")}`;case"invalid_union":if(g.options&&Array.isArray(g.options)&&g.options.length>0){const v=g.options.map(g=>`'${g}'`).join(" | ");return`Valor de discriminação inválido. Esperava ${v}`}return"Entrada inválida";default:return"Entrada inválida"}}};function ptBR(){return{localeError:error$h()}}const error$g=()=>{const g={string:{unit:"caractere",verb:"să aibă"},file:{unit:"octeți",verb:"să aibă"},array:{unit:"elemente",verb:"să aibă"},set:{unit:"elemente",verb:"să aibă"},map:{unit:"intrări",verb:"să aibă"}};function getSizing(v){return g[v]??null}const v={regex:"intrare",email:"adresă de email",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:"dată și oră ISO",date:"dată ISO",time:"oră ISO",duration:"durată ISO",ipv4:"adresă IPv4",ipv6:"adresă IPv6",mac:"adresă MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"șir codat base64",base64url:"șir codat base64url",json_string:"șir JSON",e164:"număr E.164",credit_card:"număr de card de credit",iban:"IBAN",jwt:"JWT",template_literal:"intrare"},L={nan:"NaN",string:"șir",number:"număr",boolean:"boolean",function:"funcție",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"număr mare",void:"void",never:"never",map:"hartă",set:"set"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input);return`Intrare invalidă: așteptat ${v}, primit ${L[R]??R}`}case"invalid_value":return 1===g.values.length?`Intrare invalidă: așteptat ${stringifyPrimitive(g.values[0])}`:`Opțiune invalidă: așteptat una dintre ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`Prea mare: așteptat ca ${g.origin??"valoarea"} ${L.verb} ${v}${g.maximum.toString()} ${L.unit??"elemente"}`:`Prea mare: așteptat ca ${g.origin??"valoarea"} să fie ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`Prea mic: așteptat ca ${g.origin} ${L.verb} ${v}${g.minimum.toString()} ${L.unit}`:`Prea mic: așteptat ca ${g.origin} să fie ${v}${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`Șir invalid: trebuie să înceapă cu "${L.prefix}"`:"ends_with"===L.format?`Șir invalid: trebuie să se termine cu "${L.suffix}"`:"includes"===L.format?`Șir invalid: trebuie să includă "${L.includes}"`:"regex"===L.format?`Șir invalid: trebuie să se potrivească cu modelul ${L.pattern}`:`Format invalid: ${v[L.format]??g.format}`}case"not_multiple_of":return`Număr invalid: trebuie să fie multiplu de ${g.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Cheie invalidă în ${g.origin}`;case"invalid_union":default:return"Intrare invalidă";case"invalid_element":return`Valoare invalidă în ${g.origin}`}}};function ro(){return{localeError:error$g()}}function getRussianPlural(g,v,L,R){const W=Math.abs(g),ie=W%10,ce=W%100;return ce>=11&&ce<=19?R:1===ie?v:ie>=2&&ie<=4?L:R}const error$f=()=>{const g={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},map:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function getSizing(v){return g[v]??null}const v={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",mac:"MAC адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",credit_card:"номер кредитной карты",iban:"IBAN",jwt:"JWT",template_literal:"ввод"},L={nan:"NaN",number:"число",array:"массив"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`Неверный ввод: ожидалось instanceof ${g.expected}, получено ${W}`:`Неверный ввод: ожидалось ${v}, получено ${W}`}case"invalid_value":return 1===g.values.length?`Неверный ввод: ожидалось ${stringifyPrimitive(g.values[0])}`:`Неверный вариант: ожидалось одно из ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);if(L){const R=getRussianPlural(Number(g.maximum),L.unit.one,L.unit.few,L.unit.many);return`Слишком большое значение: ожидалось, что ${g.origin??"значение"} будет иметь ${v}${g.maximum.toString()} ${R}`}return`Слишком большое значение: ожидалось, что ${g.origin??"значение"} будет ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);if(L){const R=getRussianPlural(Number(g.minimum),L.unit.one,L.unit.few,L.unit.many);return`Слишком маленькое значение: ожидалось, что ${g.origin} будет иметь ${v}${g.minimum.toString()} ${R}`}return`Слишком маленькое значение: ожидалось, что ${g.origin} будет ${v}${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`Неверная строка: должна начинаться с "${L.prefix}"`:"ends_with"===L.format?`Неверная строка: должна заканчиваться на "${L.suffix}"`:"includes"===L.format?`Неверная строка: должна содержать "${L.includes}"`:"regex"===L.format?`Неверная строка: должна соответствовать шаблону ${L.pattern}`:`Неверный ${v[L.format]??g.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${g.divisor}`;case"unrecognized_keys":return`Нераспознанн${g.keys.length>1?"ые":"ый"} ключ${g.keys.length>1?"и":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${g.origin}`;case"invalid_union":default:return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${g.origin}`}}};function ru(){return{localeError:error$f()}}const error$e=()=>{const g={string:{unit:"znakov",verb:"mať"},file:{unit:"bajtov",verb:"mať"},array:{unit:"prvkov",verb:"mať"},set:{unit:"prvkov",verb:"mať"},map:{unit:"položiek",verb:"mať"}};function getSizing(v){return g[v]??null}const v={regex:"regulárny výraz",email:"e-mailová adresa",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:"dátum a čas vo formáte ISO",date:"dátum vo formáte ISO",time:"čas vo formáte ISO",duration:"doba trvania ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"reťazec zakódovaný vo formáte base64",base64url:"reťazec zakódovaný vo formáte base64url",json_string:"reťazec vo formáte JSON",e164:"číslo E.164",credit_card:"číslo kreditnej karty",iban:"IBAN",jwt:"JWT",template_literal:"vstup"},L={nan:"NaN",number:"číslo",string:"reťazec",function:"funkcia",array:"pole"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`Neplatný vstup: očakávané instanceof ${g.expected}, obdržané ${W}`:`Neplatný vstup: očakávané ${v}, obdržané ${W}`}case"invalid_value":return 1===g.values.length?`Neplatný vstup: očakávané ${stringifyPrimitive(g.values[0])}`:`Neplatný vstup: očakávaná jedna z hodnôt ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`Hodnota je príliš veľká: ${g.origin??"hodnota"} musí mať ${v}${g.maximum.toString()} ${L.unit??"prvkov"}`:`Hodnota je príliš veľká: ${g.origin??"hodnota"} musí byť ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`Hodnota je príliš malá: ${g.origin??"hodnota"} musí mať ${v}${g.minimum.toString()} ${L.unit??"prvkov"}`:`Hodnota je príliš malá: ${g.origin??"hodnota"} musí byť ${v}${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`Neplatný reťazec: musí začínať na "${L.prefix}"`:"ends_with"===L.format?`Neplatný reťazec: musí končiť na "${L.suffix}"`:"includes"===L.format?`Neplatný reťazec: musí obsahovať "${L.includes}"`:"regex"===L.format?`Neplatný reťazec: musí zodpovedať vzoru ${L.pattern}`:`Neplatný formát ${v[L.format]??g.format}`}case"not_multiple_of":return`Neplatné číslo: musí byť násobkom ${g.divisor}`;case"unrecognized_keys":return`Neznáme klúče: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Neplatný klúč v ${g.origin}`;case"invalid_union":default:return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${g.origin}`}}};function sk(){return{localeError:error$e()}}const error$d=()=>{const g={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"},map:{unit:"elementov",verb:"imeti"}};function getSizing(v){return g[v]??null}const v={regex:"vnos",email:"e-poštni naslov",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 datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",mac:"MAC naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",credit_card:"številka kreditne kartice",iban:"IBAN",jwt:"JWT",template_literal:"vnos"},L={nan:"NaN",number:"število",array:"tabela"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`Neveljaven vnos: pričakovano instanceof ${g.expected}, prejeto ${W}`:`Neveljaven vnos: pričakovano ${v}, prejeto ${W}`}case"invalid_value":return 1===g.values.length?`Neveljaven vnos: pričakovano ${stringifyPrimitive(g.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`Preveliko: pričakovano, da bo ${g.origin??"vrednost"} imelo ${v}${g.maximum.toString()} ${L.unit??"elementov"}`:`Preveliko: pričakovano, da bo ${g.origin??"vrednost"} ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`Premajhno: pričakovano, da bo ${g.origin} imelo ${v}${g.minimum.toString()} ${L.unit}`:`Premajhno: pričakovano, da bo ${g.origin} ${v}${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`Neveljaven niz: mora se začeti z "${L.prefix}"`:"ends_with"===L.format?`Neveljaven niz: mora se končati z "${L.suffix}"`:"includes"===L.format?`Neveljaven niz: mora vsebovati "${L.includes}"`:"regex"===L.format?`Neveljaven niz: mora ustrezati vzorcu ${L.pattern}`:`Neveljaven ${v[L.format]??g.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${g.divisor}`;case"unrecognized_keys":return`Neprepoznan${g.keys.length>1?"i ključi":" ključ"}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${g.origin}`;case"invalid_union":default:return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${g.origin}`}}};function sl(){return{localeError:error$d()}}const error$c=()=>{const g={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"},map:{unit:"objekt",verb:"att innehålla"}};function getSizing(v){return g[v]??null}const v={regex:"reguljärt uttryck",email:"e-postadress",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-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-adress",ipv6:"IPv6-adress",mac:"MAC-adress",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",credit_card:"kreditkortsnummer",iban:"IBAN",jwt:"JWT",template_literal:"mall-literal"},L={nan:"NaN",number:"antal",array:"lista"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`Ogiltig inmatning: förväntat instanceof ${g.expected}, fick ${W}`:`Ogiltig inmatning: förväntat ${v}, fick ${W}`}case"invalid_value":return 1===g.values.length?`Ogiltig inmatning: förväntat ${stringifyPrimitive(g.values[0])}`:`Ogiltigt val: förväntade en av ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`För stor(t): förväntade ${g.origin??"värdet"} att ha ${v}${g.maximum.toString()} ${L.unit??"element"}`:`För stor(t): förväntat ${g.origin??"värdet"} att ha ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`För lite(t): förväntade ${g.origin??"värdet"} att ha ${v}${g.minimum.toString()} ${L.unit}`:`För lite(t): förväntade ${g.origin??"värdet"} att ha ${v}${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`Ogiltig sträng: måste börja med "${L.prefix}"`:"ends_with"===L.format?`Ogiltig sträng: måste sluta med "${L.suffix}"`:"includes"===L.format?`Ogiltig sträng: måste innehålla "${L.includes}"`:"regex"===L.format?`Ogiltig sträng: måste matcha mönstret "${L.pattern}"`:`Ogiltig(t) ${v[L.format]??g.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${g.divisor}`;case"unrecognized_keys":return`${g.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${g.origin??"värdet"}`;case"invalid_union":default:return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${g.origin??"värdet"}`}}};function sv(){return{localeError:error$c()}}const error$b=()=>{const g={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},map:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function getSizing(v){return g[v]??null}const v={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",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 தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",mac:"MAC முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",credit_card:"கடன் அட்டை எண்",iban:"IBAN",jwt:"JWT",template_literal:"input"},L={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${g.expected}, பெறப்பட்டது ${W}`:`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${v}, பெறப்பட்டது ${W}`}case"invalid_value":return 1===g.values.length?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${stringifyPrimitive(g.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${joinValues(g.values,"|")} இல் ஒன்று`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${g.origin??"மதிப்பு"} ${v}${g.maximum.toString()} ${L.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${g.origin??"மதிப்பு"} ${v}${g.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${g.origin} ${v}${g.minimum.toString()} ${L.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${g.origin} ${v}${g.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{const L=g;return"starts_with"===L.format?`தவறான சரம்: "${L.prefix}" இல் தொடங்க வேண்டும்`:"ends_with"===L.format?`தவறான சரம்: "${L.suffix}" இல் முடிவடைய வேண்டும்`:"includes"===L.format?`தவறான சரம்: "${L.includes}" ஐ உள்ளடக்க வேண்டும்`:"regex"===L.format?`தவறான சரம்: ${L.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${v[L.format]??g.format}`}case"not_multiple_of":return`தவறான எண்: ${g.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${g.keys.length>1?"கள்":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`${g.origin} இல் தவறான விசை`;case"invalid_union":default:return"தவறான உள்ளீடு";case"invalid_element":return`${g.origin} இல் தவறான மதிப்பு`}}};function ta(){return{localeError:error$b()}}const error$a=()=>{const g={string:{unit:"аломат",verb:"дошта бошад"},file:{unit:"байт",verb:"дошта бошад"},array:{unit:"унсур",verb:"дошта бошад"},set:{unit:"унсур",verb:"дошта бошад"},map:{unit:"сабт",verb:"дошта бошад"}};function getSizing(v){return g[v]??null}const v={regex:"вуруд",email:"суроғаи email",url:"URL",emoji:"эмоҷи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"санаву вақти ISO",date:"санаи ISO",time:"вақти ISO",duration:"давомнокии ISO",ipv4:"суроғаи IPv4",ipv6:"суроғаи IPv6",mac:"суроғаи MAC",cidrv4:"маҳдудаи IPv4",cidrv6:"маҳдудаи IPv6",base64:"сатри дар формати base64",base64url:"сатри дар формати base64url",json_string:"сатри JSON",e164:"рақами E.164",credit_card:"рақами корти кредитӣ",iban:"IBAN",jwt:"JWT",template_literal:"вуруд"},L={nan:"NaN",number:"рақам",string:"сатр",array:"массив",object:"объект",date:"сана"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input);return`Вуруди нодуруст: ${v} интизор мерафт, ${L[R]??R} гирифта шуд`}case"invalid_value":return 1===g.values.length?`Вуруди нодуруст: ${stringifyPrimitive(g.values[0])} интизор мерафт`:`Интихоби нодуруст: яке аз ${joinValues(g.values,"|")} интизор мерафт`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`Хеле калон: ${g.origin??"қимат"} бояд ${v}${g.maximum.toString()} ${L.unit} ${L.verb}`:`Хеле калон: ${g.origin??"қимат"} бояд ${v}${g.maximum.toString()} бошад`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`Хеле хурд: ${g.origin} бояд ${v}${g.minimum.toString()} ${L.unit} ${L.verb}`:`Хеле хурд: ${g.origin} бояд ${v}${g.minimum.toString()} бошад`}case"invalid_format":{const L=g;return"starts_with"===L.format?`Сатри нодуруст: бояд бо "${L.prefix}" оғоз шавад`:"ends_with"===L.format?`Сатри нодуруст: бояд бо "${L.suffix}" анҷом ёбад`:"includes"===L.format?`Сатри нодуруст: бояд "${L.includes}"-ро дар бар гирад`:"regex"===L.format?`Сатри нодуруст: бояд ба намунаи ${L.pattern} мувофиқат кунад`:`${v[L.format]??g.format}-и нодуруст`}case"not_multiple_of":return`Рақами нодуруст: бояд ба ${g.divisor} бе бақия тақсим шавад`;case"unrecognized_keys":return`Калид${g.keys.length>1?"ҳои":"и"} номаълум: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Калиди нодуруст дар ${g.origin}`;case"invalid_union":if(g.options&&Array.isArray(g.options)&&g.options.length>0){const v=g.options.map(g=>`'${g}'`).join(" | ");return`Қимати нодурусти дискриминатор: ${v} интизор мерафт`}return"Вуруди нодуруст";case"invalid_element":return`Қимати нодуруст дар ${g.origin}`;default:return"Вуруди нодуруст"}}};function tg(){return{localeError:error$a()}}const error$9=()=>{const g={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"},map:{unit:"รายการ",verb:"ควรมี"}};function getSizing(v){return g[v]??null}const v={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",mac:"ที่อยู่ MAC",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",credit_card:"หมายเลขบัตรเครดิต",iban:"IBAN",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"},L={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${g.expected} แต่ได้รับ ${W}`:`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${v} แต่ได้รับ ${W}`}case"invalid_value":return 1===g.values.length?`ค่าไม่ถูกต้อง: ควรเป็น ${stringifyPrimitive(g.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"ไม่เกิน":"น้อยกว่า",L=getSizing(g.origin);return L?`เกินกำหนด: ${g.origin??"ค่า"} ควรมี${v} ${g.maximum.toString()} ${L.unit??"รายการ"}`:`เกินกำหนด: ${g.origin??"ค่า"} ควรมี${v} ${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?"อย่างน้อย":"มากกว่า",L=getSizing(g.origin);return L?`น้อยกว่ากำหนด: ${g.origin} ควรมี${v} ${g.minimum.toString()} ${L.unit}`:`น้อยกว่ากำหนด: ${g.origin} ควรมี${v} ${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${L.prefix}"`:"ends_with"===L.format?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${L.suffix}"`:"includes"===L.format?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${L.includes}" อยู่ในข้อความ`:"regex"===L.format?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${L.pattern}`:`รูปแบบไม่ถูกต้อง: ${v[L.format]??g.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${g.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${joinValues(g.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${g.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${g.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function th(){return{localeError:error$9()}}const error$8=()=>{const g={string:{unit:"simwol",verb:"bolmaly"},file:{unit:"baýt",verb:"bolmaly"},array:{unit:"elementler",verb:"bolmaly"},set:{unit:"elementler",verb:"bolmaly"},map:{unit:"elementler",verb:"bolmaly"}};function getSizing(v){return g[v]??null}const v={regex:"giriş",email:"e-poçta salgysy",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 sene we wagt",date:"ISO sene",time:"ISO wagt",duration:"ISO wagt aralygy",ipv4:"IPv4 salgysy",ipv6:"IPv6 salgysy",mac:"MAC salgysy",cidrv4:"IPv4 aralygy",cidrv6:"IPv6 aralygy",base64:"base64 bilen şifrlenen setir",base64url:"base64url bilen şifrlenen setir",json_string:"JSON setiri",e164:"E.164 nomeri",credit_card:"kredit kartynyň nomeri",iban:"IBAN",jwt:"JWT",template_literal:"şablon"},L={nan:"NaN"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input);return`Nädogry baha: garaşylan ${v} ýerine ${L[R]??R} alyndy`}case"invalid_value":return 1===g.values.length?`Nädogry baha: ${stringifyPrimitive(g.values[0])} bolmaly`:`Nädogry saýlaw: aşakdakylardan biri bolmaly: ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`Has uly: garaşylýan ${g.origin??"baha"} ${v} ${g.maximum.toString()} ${L.unit??"element"}`:`Has uly: garaşylýan ${g.origin??"baha"} ${v} ${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`Has kiçi: garaşylýan ${g.origin} ${v} ${g.minimum.toString()} ${L.unit}`:`Has kiçi: garaşylýan ${g.origin} ${v} ${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`Nädogry setir: "${L.prefix}" bilen başlamaly`:"ends_with"===L.format?`Nädogry setir: "${L.suffix}" bilen gutarmaly`:"includes"===L.format?`Nädogry setir: "${L.includes}" saklamaly`:"regex"===L.format?`Nädogry setir: ${L.pattern} nusga laýyk bolmaly`:`Nädogry ${v[L.format]??g.format}`}case"not_multiple_of":return`Nädogry san: ${g.divisor} bilen galyndysyz bölünmeli`;case"unrecognized_keys":return`Tanalmaýan açar${g.keys.length>1?"lar":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`${g.origin} içinde nädogry açar`;case"invalid_union":default:return"Nädogry baha";case"invalid_element":return`${g.origin} içinde nädogry baha`}}};function tk(){return{localeError:error$8()}}const error$7=()=>{const g={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"},map:{unit:"öğe",verb:"olmalı"}};function getSizing(v){return g[v]??null}const v={regex:"girdi",email:"e-posta adresi",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 tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",mac:"MAC adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",credit_card:"kredi kartı numarası",iban:"IBAN",jwt:"JWT",template_literal:"Şablon dizesi"},L={nan:"NaN"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`Geçersiz değer: beklenen instanceof ${g.expected}, alınan ${W}`:`Geçersiz değer: beklenen ${v}, alınan ${W}`}case"invalid_value":return 1===g.values.length?`Geçersiz değer: beklenen ${stringifyPrimitive(g.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`Çok büyük: beklenen ${g.origin??"değer"} ${v}${g.maximum.toString()} ${L.unit??"öğe"}`:`Çok büyük: beklenen ${g.origin??"değer"} ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`Çok küçük: beklenen ${g.origin} ${v}${g.minimum.toString()} ${L.unit}`:`Çok küçük: beklenen ${g.origin} ${v}${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`Geçersiz metin: "${L.prefix}" ile başlamalı`:"ends_with"===L.format?`Geçersiz metin: "${L.suffix}" ile bitmeli`:"includes"===L.format?`Geçersiz metin: "${L.includes}" içermeli`:"regex"===L.format?`Geçersiz metin: ${L.pattern} desenine uymalı`:`Geçersiz ${v[L.format]??g.format}`}case"not_multiple_of":return`Geçersiz sayı: ${g.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${g.keys.length>1?"lar":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`${g.origin} içinde geçersiz anahtar`;case"invalid_union":default:return"Geçersiz değer";case"invalid_element":return`${g.origin} içinde geçersiz değer`}}};function tr(){return{localeError:error$7()}}const error$6=()=>{const g={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"},map:{unit:"елементів",verb:"матиме"}};function getSizing(v){return g[v]??null}const v={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",mac:"адреса MAC",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",credit_card:"номер кредитної картки",iban:"IBAN",jwt:"JWT",template_literal:"вхідні дані"},L={nan:"NaN",number:"число",array:"масив"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`Неправильні вхідні дані: очікується instanceof ${g.expected}, отримано ${W}`:`Неправильні вхідні дані: очікується ${v}, отримано ${W}`}case"invalid_value":return 1===g.values.length?`Неправильні вхідні дані: очікується ${stringifyPrimitive(g.values[0])}`:`Неправильна опція: очікується одне з ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`Занадто велике: очікується, що ${g.origin??"значення"} ${L.verb} ${v}${g.maximum.toString()} ${L.unit??"елементів"}`:`Занадто велике: очікується, що ${g.origin??"значення"} буде ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`Занадто мале: очікується, що ${g.origin} ${L.verb} ${v}${g.minimum.toString()} ${L.unit}`:`Занадто мале: очікується, що ${g.origin} буде ${v}${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`Неправильний рядок: повинен починатися з "${L.prefix}"`:"ends_with"===L.format?`Неправильний рядок: повинен закінчуватися на "${L.suffix}"`:"includes"===L.format?`Неправильний рядок: повинен містити "${L.includes}"`:"regex"===L.format?`Неправильний рядок: повинен відповідати шаблону ${L.pattern}`:`Неправильний ${v[L.format]??g.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${g.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${g.keys.length>1?"і":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${g.origin}`;case"invalid_union":default:return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${g.origin}`}}};function uk(){return{localeError:error$6()}}function ua(){return uk()}const error$5=()=>{const g={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"},map:{unit:"آئٹمز",verb:"ہونا"}};function getSizing(v){return g[v]??null}const v={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",mac:"ایم اے سی ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",credit_card:"کریڈٹ کارڈ نمبر",iban:"IBAN",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"},L={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`غلط ان پٹ: instanceof ${g.expected} متوقع تھا، ${W} موصول ہوا`:`غلط ان پٹ: ${v} متوقع تھا، ${W} موصول ہوا`}case"invalid_value":return 1===g.values.length?`غلط ان پٹ: ${stringifyPrimitive(g.values[0])} متوقع تھا`:`غلط آپشن: ${joinValues(g.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`بہت بڑا: ${g.origin??"ویلیو"} کے ${v}${g.maximum.toString()} ${L.unit??"عناصر"} ہونے متوقع تھے`:`بہت بڑا: ${g.origin??"ویلیو"} کا ${v}${g.maximum.toString()} ہونا متوقع تھا`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`بہت چھوٹا: ${g.origin} کے ${v}${g.minimum.toString()} ${L.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${g.origin} کا ${v}${g.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{const L=g;return"starts_with"===L.format?`غلط سٹرنگ: "${L.prefix}" سے شروع ہونا چاہیے`:"ends_with"===L.format?`غلط سٹرنگ: "${L.suffix}" پر ختم ہونا چاہیے`:"includes"===L.format?`غلط سٹرنگ: "${L.includes}" شامل ہونا چاہیے`:"regex"===L.format?`غلط سٹرنگ: پیٹرن ${L.pattern} سے میچ ہونا چاہیے`:`غلط ${v[L.format]??g.format}`}case"not_multiple_of":return`غلط نمبر: ${g.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${g.keys.length>1?"ز":""}: ${joinValues(g.keys,"، ")}`;case"invalid_key":return`${g.origin} میں غلط کی`;case"invalid_union":default:return"غلط ان پٹ";case"invalid_element":return`${g.origin} میں غلط ویلیو`}}};function ur(){return{localeError:error$5()}}const error$4=()=>{const g={string:{unit:"belgi",verb:"bo‘lishi kerak"},file:{unit:"bayt",verb:"bo‘lishi kerak"},array:{unit:"element",verb:"bo‘lishi kerak"},set:{unit:"element",verb:"bo‘lishi kerak"},map:{unit:"yozuv",verb:"bo‘lishi kerak"}};function getSizing(v){return g[v]??null}const v={regex:"kirish",email:"elektron pochta manzili",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 sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",credit_card:"kredit karta raqami",iban:"IBAN",jwt:"JWT",template_literal:"kirish"},L={nan:"NaN",number:"raqam",array:"massiv"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`Noto‘g‘ri kirish: kutilgan instanceof ${g.expected}, qabul qilingan ${W}`:`Noto‘g‘ri kirish: kutilgan ${v}, qabul qilingan ${W}`}case"invalid_value":return 1===g.values.length?`Noto‘g‘ri kirish: kutilgan ${stringifyPrimitive(g.values[0])}`:`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`Juda katta: kutilgan ${g.origin??"qiymat"} ${v}${g.maximum.toString()} ${L.unit} ${L.verb}`:`Juda katta: kutilgan ${g.origin??"qiymat"} ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`Juda kichik: kutilgan ${g.origin} ${v}${g.minimum.toString()} ${L.unit} ${L.verb}`:`Juda kichik: kutilgan ${g.origin} ${v}${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`Noto‘g‘ri satr: "${L.prefix}" bilan boshlanishi kerak`:"ends_with"===L.format?`Noto‘g‘ri satr: "${L.suffix}" bilan tugashi kerak`:"includes"===L.format?`Noto‘g‘ri satr: "${L.includes}" ni o‘z ichiga olishi kerak`:"regex"===L.format?`Noto‘g‘ri satr: ${L.pattern} shabloniga mos kelishi kerak`:`Noto‘g‘ri ${v[L.format]??g.format}`}case"not_multiple_of":return`Noto‘g‘ri raqam: ${g.divisor} ning karralisi bo‘lishi kerak`;case"unrecognized_keys":return`Noma’lum kalit${g.keys.length>1?"lar":""}: ${joinValues(g.keys,", ")}`;case"invalid_key":return`${g.origin} dagi kalit noto‘g‘ri`;case"invalid_union":default:return"Noto‘g‘ri kirish";case"invalid_element":return`${g.origin} da noto‘g‘ri qiymat`}}};function uz(){return{localeError:error$4()}}const error$3=()=>{const g={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"},map:{unit:"phần tử",verb:"có"}};function getSizing(v){return g[v]??null}const v={regex:"đầu vào",email:"địa chỉ email",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:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",mac:"địa chỉ MAC",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",credit_card:"số thẻ tín dụng",iban:"IBAN",jwt:"JWT",template_literal:"đầu vào"},L={nan:"NaN",number:"số",array:"mảng"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`Đầu vào không hợp lệ: mong đợi instanceof ${g.expected}, nhận được ${W}`:`Đầu vào không hợp lệ: mong đợi ${v}, nhận được ${W}`}case"invalid_value":return 1===g.values.length?`Đầu vào không hợp lệ: mong đợi ${stringifyPrimitive(g.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`Quá lớn: mong đợi ${g.origin??"giá trị"} ${L.verb} ${v}${g.maximum.toString()} ${L.unit??"phần tử"}`:`Quá lớn: mong đợi ${g.origin??"giá trị"} ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`Quá nhỏ: mong đợi ${g.origin} ${L.verb} ${v}${g.minimum.toString()} ${L.unit}`:`Quá nhỏ: mong đợi ${g.origin} ${v}${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`Chuỗi không hợp lệ: phải bắt đầu bằng "${L.prefix}"`:"ends_with"===L.format?`Chuỗi không hợp lệ: phải kết thúc bằng "${L.suffix}"`:"includes"===L.format?`Chuỗi không hợp lệ: phải bao gồm "${L.includes}"`:"regex"===L.format?`Chuỗi không hợp lệ: phải khớp với mẫu ${L.pattern}`:`${v[L.format]??g.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${g.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${g.origin}`;case"invalid_union":default:return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${g.origin}`}}};function vi(){return{localeError:error$3()}}const error$2=()=>{const g={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"},map:{unit:"项",verb:"包含"}};function getSizing(v){return g[v]??null}const v={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",mac:"MAC地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",credit_card:"信用卡号",iban:"IBAN",jwt:"JWT",template_literal:"输入"},L={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`无效输入:期望 instanceof ${g.expected},实际接收 ${W}`:`无效输入:期望 ${v},实际接收 ${W}`}case"invalid_value":return 1===g.values.length?`无效输入:期望 ${stringifyPrimitive(g.values[0])}`:`无效选项:期望以下之一 ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`数值过大:期望 ${g.origin??"值"} ${v}${g.maximum.toString()} ${L.unit??"个元素"}`:`数值过大:期望 ${g.origin??"值"} ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`数值过小:期望 ${g.origin} ${v}${g.minimum.toString()} ${L.unit}`:`数值过小:期望 ${g.origin} ${v}${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`无效字符串:必须以 "${L.prefix}" 开头`:"ends_with"===L.format?`无效字符串:必须以 "${L.suffix}" 结尾`:"includes"===L.format?`无效字符串:必须包含 "${L.includes}"`:"regex"===L.format?`无效字符串:必须满足正则表达式 ${L.pattern}`:`无效${v[L.format]??g.format}`}case"not_multiple_of":return`无效数字:必须是 ${g.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${joinValues(g.keys,", ")}`;case"invalid_key":return`${g.origin} 中的键(key)无效`;case"invalid_union":default:return"无效输入";case"invalid_element":return`${g.origin} 中包含无效值(value)`}}};function zhCN(){return{localeError:error$2()}}const error$1=()=>{const g={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"},map:{unit:"項目",verb:"擁有"}};function getSizing(v){return g[v]??null}const v={regex:"輸入",email:"郵件地址",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 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",mac:"MAC 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",credit_card:"信用卡號",iban:"IBAN",jwt:"JWT",template_literal:"輸入"},L={nan:"NaN"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`無效的輸入值:預期為 instanceof ${g.expected},但收到 ${W}`:`無效的輸入值:預期為 ${v},但收到 ${W}`}case"invalid_value":return 1===g.values.length?`無效的輸入值:預期為 ${stringifyPrimitive(g.values[0])}`:`無效的選項:預期為以下其中之一 ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`數值過大:預期 ${g.origin??"值"} 應為 ${v}${g.maximum.toString()} ${L.unit??"個元素"}`:`數值過大:預期 ${g.origin??"值"} 應為 ${v}${g.maximum.toString()}`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`數值過小:預期 ${g.origin} 應為 ${v}${g.minimum.toString()} ${L.unit}`:`數值過小:預期 ${g.origin} 應為 ${v}${g.minimum.toString()}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`無效的字串:必須以 "${L.prefix}" 開頭`:"ends_with"===L.format?`無效的字串:必須以 "${L.suffix}" 結尾`:"includes"===L.format?`無效的字串:必須包含 "${L.includes}"`:"regex"===L.format?`無效的字串:必須符合格式 ${L.pattern}`:`無效的 ${v[L.format]??g.format}`}case"not_multiple_of":return`無效的數字:必須為 ${g.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${g.keys.length>1?"們":""}:${joinValues(g.keys,"、")}`;case"invalid_key":return`${g.origin} 中有無效的鍵值`;case"invalid_union":default:return"無效的輸入值";case"invalid_element":return`${g.origin} 中有無效的值`}}};function zhTW(){return{localeError:error$1()}}const error=()=>{const g={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"},map:{unit:"nkan",verb:"ní"}};function getSizing(v){return g[v]??null}const v={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",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:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",mac:"àdírẹ́sì MAC",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",credit_card:"nọmba kaadi gbese",iban:"IBAN",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"},L={nan:"NaN",number:"nọ́mbà",array:"akopọ"};return g=>{switch(g.code){case"invalid_type":{const v=L[g.expected]??g.expected,R=parsedType(g.input),W=L[R]??R;return/^[A-Z]/.test(g.expected)?`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${g.expected}, àmọ̀ a rí ${W}`:`Ìbáwọlé aṣìṣe: a ní láti fi ${v}, àmọ̀ a rí ${W}`}case"invalid_value":return 1===g.values.length?`Ìbáwọlé aṣìṣe: a ní láti fi ${stringifyPrimitive(g.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${joinValues(g.values,"|")}`;case"too_big":{const v=g.inclusive?"<=":"<",L=getSizing(g.origin);return L?`Tó pọ̀ jù: a ní láti jẹ́ pé ${g.origin??"iye"} ${L.verb} ${v}${g.maximum} ${L.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${v}${g.maximum}`}case"too_small":{const v=g.inclusive?">=":">",L=getSizing(g.origin);return L?`Kéré ju: a ní láti jẹ́ pé ${g.origin} ${L.verb} ${v}${g.minimum} ${L.unit}`:`Kéré ju: a ní láti jẹ́ ${v}${g.minimum}`}case"invalid_format":{const L=g;return"starts_with"===L.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${L.prefix}"`:"ends_with"===L.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${L.suffix}"`:"includes"===L.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${L.includes}"`:"regex"===L.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${L.pattern}`:`Aṣìṣe: ${v[L.format]??g.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${g.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${joinValues(g.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${g.origin}`;case"invalid_union":default:return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${g.origin}`}}};function yo(){return{localeError:error()}}var index$1=Object.freeze({__proto__:null,ar:ar,az:az,be:be,bg:bg,bn:bn,ca:ca,ckb:ckb,cs:cs,da:da,de:de,el:el,en:en,eo:eo,es:es,fa:fa,fi:fi,fr:fr,frCA:frCA,gu:gu,he:he,hi:hi,hr:hr,hu:hu,hy:hy,id:id,is:is,it:it,ja:ja,ka:ka,kh:kh,km:km,kn:kn,ko:ko,lt:lt,mk:mk,ms:ms,ne:ne,nl:nl,nn:nn,no:no,ota:ota,pl:pl,ps:ps,pt:pt,ptBR:ptBR,ro:ro,ru:ru,sk:sk,sl:sl,sv:sv,ta:ta,tg:tg,th:th,tk:tk,tr:tr,ua:ua,uk:uk,ur:ur,uz:uz,vi:vi,yo:yo,zhCN:zhCN,zhTW:zhTW}),_a;const $output=Symbol("ZodOutput"),$input=Symbol("ZodInput");class $ZodRegistry{constructor(){this._map=new WeakMap,this._idmap=new Map}add(g,...v){const L=v[0];return this._map.set(g,L),L&&"object"==typeof L&&"id"in L&&this._idmap.set(L.id,g),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(g){const v=this._map.get(g);return v&&"object"==typeof v&&"id"in v&&this._idmap.delete(v.id),this._map.delete(g),this}get(g){const v=g._zod.parent;if(v){const L={...this.get(v)??{}};delete L.id;const R={...L,...this._map.get(g)};return Object.keys(R).length?R:void 0}return this._map.get(g)}has(g){return this._map.has(g)}}function registry(){return new $ZodRegistry}(_a=globalThis).__zod_globalRegistry??(_a.__zod_globalRegistry=registry());const globalRegistry=globalThis.__zod_globalRegistry,INVALID=Symbol.for("zod.compile.invalid"),FALLBACK_FLAG=Symbol.for("zod.compile.fallback");class ZodCompileAsyncError extends Error{constructor(g="z.compile does not support async refinements, transforms, or checks"){super(g),this.name="ZodCompileAsyncError"}}class ZodCompileUnsupportedError extends Error{constructor(g,v=!0){super(`z.compile does not support ${g}; this schema must use the runtime parser`),this.name="ZodCompileUnsupportedError",this.islandable=v}}function compileValidator(g,v){try{return compileFn(g,{assertOnly:!0})}catch{return v}}function compile(g,v){try{const v=compileFn(g),L=withParser(g,v);return L._zod.bag.validator=compileValidator(g,v),L}catch(L){if(v?.strict)throw L;return g}}function withParser(g,v){if(isRecursiveSchema(g))throw new ZodCompileUnsupportedError("a schema whose subtree contains a reference cycle");const L=clone(g),R=g._zod.run,W=R.__originalRun??R,wrapped=(g,L)=>{if(L?.async||"backward"===L?.direction||L?.skipChecks||L?.[FALLBACK_FLAG])return W(g,L);if(L&&isBackEdge(L,g.value))return W(g,L);const R=v(g.value);return R!==INVALID?(g.value=R,g):(L&&(L[FALLBACK_FLAG]=!0),W(g,L))};return wrapped.__originalRun=W,L._zod.bag.fallbackRun=W,L._zod.bag.validator=v,L._zod.run=wrapped,R.__originalRun||installCompiledUserMethods(L,g,v),L}function installCompiledUserMethods(g,v,L){const R=g,W=v;if("function"==typeof W.safeParse){const g=W.safeParse;R.safeParse=(v,R)=>{const W=L(v);return W!==INVALID?{success:!0,data:W}:g(v,R)}}if("function"==typeof W.parse){const g=W.parse;R.parse=(v,R)=>{const W=L(v);return W!==INVALID?W:g(v,R)}}}function compileFn(g,v){let L=!0;try{L=isRecursiveSchema(g)}catch{}if(L)throw new ZodCompileUnsupportedError("a schema whose subtree contains a reference cycle");const R={constants:new Map,constantCounter:0,varCounter:0,definite:!0},W=new Doc(["input"]),ie=generateCheck(W,R,g,"input",!v?.assertOnly);W.write(null===ie?"return true;":`return ${ie};`);const ce=["INVALID",...R.constants.keys()],le=[INVALID,...R.constants.values()],ue=W.content.join("\n"),me=v?.debug?ce.length>0?`// Constants: ${ce.join(", ")}\n${ue}`:ue:"",ge=Function,ve=`return (input) => {\n${ue}\n}`;let xe;try{xe=new ge(...ce,ve)(...le)}catch(g){throw new ZodCompileUnsupportedError(`this schema (generated code failed to evaluate: ${g.message})`)}return v?.debug&&(xe.code=me),xe.definite=R.definite,xe}function addConstant(g,v){for(const[L,R]of g.constants)if(R===v)return L;const L="c"+g.constantCounter++;return g.constants.set(L,v),L}function addUserConstant(g,v){return g.definite=!1,addConstant(g,v)}function newVar(g){return"v"+g.varCounter++}function runtimeRun(g,v){const L=g._zod.run({value:v,issues:[]},{});if(L&&"function"==typeof L.then)return INVALID;const R=L;return 0===R.issues.length?R.value:INVALID}function compileChild(g,v,L,R,W=!0){const ie=g.content.length,ce=v.constants.size,le=v.constantCounter,ue=v.varCounter;try{return generateCheck(g,v,L,R,W)}catch(W){if(!(W instanceof ZodCompileUnsupportedError&&W.islandable))throw W;if(g.content.length=ie,v.constants.size>ce){const g=Array.from(v.constants.keys()).slice(ce);for(const L of g)v.constants.delete(L)}return v.constantCounter=le,v.varCounter=ue,emitRuntimeIsland(g,v,L,R)}}function emitRuntimeIsland(g,v,L,R){v.definite=!1;const W=addConstant(v,L),ie=addConstant(v,runtimeRun),ce=newVar(v);return g.write(`const ${ce} = ${ie}(${W}, ${R});`),g.write(`if (${ce} === INVALID) return INVALID;`),ce}const WHEN_DEFAULTED_CHECKS=new Set(["max_size","min_size","size_equals","max_length","min_length","length_equals"]);function generateChecks(g,v,L,R){const W=L._zod.def.checks;if(!W||0===W.length)return R;let ie=R;for(const L of W){const R=L._zod.def;if(R.when&&!WHEN_DEFAULTED_CHECKS.has(R.check))throw new ZodCompileUnsupportedError('check with a custom "when" condition');switch(R.check){case"greater_than":generateGreaterThanCheck(g,v,R,ie);break;case"less_than":generateLessThanCheck(g,v,R,ie);break;case"multiple_of":generateMultipleOfCheck(g,v,R,ie);break;case"number_format":generateNumberFormatCheck(g,R,ie);break;case"min_length":{const L=numericOperand(R.minimum,"min_length"),W=codePointLengthVar(g,v,ie,`${ie}.length >= ${L} && ${ie}.length < ${2*R.minimum}`);g.write(`if (${W} < ${L}) return INVALID;`);break}case"max_length":{const L=numericOperand(R.maximum,"max_length"),W=codePointLengthVar(g,v,ie,`${ie}.length > ${L}`);g.write(`if (${W} > ${L}) return INVALID;`);break}case"length_equals":{const L=numericOperand(R.length,"length_equals"),W=codePointLengthVar(g,v,ie,`${ie}.length >= ${L} && ${ie}.length <= ${2*R.length}`);g.write(`if (${W} !== ${L}) return INVALID;`);break}case"min_size":g.write(`if (${ie}.size < ${numericOperand(R.minimum,"min_size")}) return INVALID;`);break;case"max_size":g.write(`if (${ie}.size > ${numericOperand(R.maximum,"max_size")}) return INVALID;`);break;case"size_equals":g.write(`if (${ie}.size !== ${numericOperand(R.size,"size_equals")}) return INVALID;`);break;case"string_format":ie=generateStringFormatCheck(g,v,R,ie);break;case"custom":ie=generateCustomRefineCheck(g,v,L,ie);break;case"bigint_format":generateBigIntFormatCheck(g,R,ie);break;case"mime_type":generateMimeTypeCheck(g,v,R,ie);break;case"property":generatePropertyCheck(g,v,R,ie);break;case"properties":generatePropertiesChecks(g,v,R,ie,!1);break;case"overwrite":{const R=newVar(v);generateOverwriteCheck(g,v,L,ie,R),ie=R;break}default:throw new ZodCompileUnsupportedError(`check type ${R.check}`)}}return ie}function codePointLengthVar(g,v,L,R){const W=addConstant(v,codePointLength),ie=newVar(v);return g.write(`const ${ie} = typeof ${L} === "string" && ${R} ? ${W}(${L}) : ${L}.length;`),ie}function numericOperand(g,v){if("number"!=typeof g||!Number.isFinite(g))throw new ZodCompileUnsupportedError(`${v} bound of type ${typeof g}`);return`${g}`}function comparisonOperand(g,v){if("bigint"==typeof v)return`${v}n`;if("number"==typeof v){if(Number.isNaN(v))throw new ZodCompileUnsupportedError("comparison check with NaN bound");return`${v}`}if(v instanceof Date){if(Number.isNaN(v.getTime()))throw new ZodCompileUnsupportedError("comparison check with Invalid Date bound");return addConstant(g,v)}throw new ZodCompileUnsupportedError("comparison check bound of type "+typeof v)}function generateGreaterThanCheck(g,v,L,R){const W=L.inclusive?"<":"<=";g.write(`if (${R} ${W} ${comparisonOperand(v,L.value)}) return INVALID;`)}function generateLessThanCheck(g,v,L,R){const W=L.inclusive?">":">=";g.write(`if (${R} ${W} ${comparisonOperand(v,L.value)}) return INVALID;`)}function generateMultipleOfCheck(g,v,L,R){if("bigint"==typeof L.value){if(L.value===BigInt(0))throw new ZodCompileUnsupportedError("multiple_of check with a zero divisor");g.write(`if (${R} % ${L.value}n !== 0n) return INVALID;`)}else{const W=addConstant(v,floatSafeRemainder);g.write(`if (${W}(${R}, ${numericOperand(L.value,"multiple_of")}) !== 0) return INVALID;`)}}function generateNumberFormatCheck(g,v,L){const R=v.format;switch(R){case"safeint":g.write(`if (!Number.isSafeInteger(${L})) return INVALID;`);break;case"int32":g.write(`if (!Number.isInteger(${L}) || ${L} < -2147483648 || ${L} > 2147483647) return INVALID;`);break;case"uint32":g.write(`if (!Number.isInteger(${L}) || ${L} < 0 || ${L} > 4294967295) return INVALID;`);break;case"float32":g.write(`if (!Number.isFinite(${L}) || ${L} < -3.4028234663852886e38 || ${L} > 3.4028234663852886e38) return INVALID;`);break;case"float64":g.write(`if (!Number.isFinite(${L})) return INVALID;`);break;default:throw new ZodCompileUnsupportedError(`number format ${R}`)}}function generateBigIntFormatCheck(g,v,L){const R=v.format;if(R)switch(R){case"int64":g.write(`if (${L} < -9223372036854775808n || ${L} > 9223372036854775807n) return INVALID;`);break;case"uint64":g.write(`if (${L} < 0n || ${L} > 18446744073709551615n) return INVALID;`);break;default:throw new ZodCompileUnsupportedError(`bigint format ${R}`)}}function generateMimeTypeCheck(g,v,L,R){const W=L.mime;if(W&&W.length>0){const L=addConstant(v,new Set(W));g.write(`if (!${L}.has(${R}.type)) return INVALID;`)}}function generatePropertiesChecks(g,v,L,R,W){if(L.when)throw new ZodCompileUnsupportedError('check with a custom "when" condition');g.write(W?`if (${R} === null || (typeof ${R} !== "object" && typeof ${R} !== "function")) return INVALID;`:`if (${R} == null) return INVALID;`);const ie=L.shape;for(const L of Reflect.ownKeys(ie)){const W="symbol"==typeof L?addConstant(v,L):esc(L),ce=newVar(v);g.write(`const ${ce} = ${R}[${W}];`),compileChild(g,v,ie[L],ce,!1)}}function generatePropertyCheck(g,v,L,R){const W=`${R}[${JSON.stringify(L.property)}]`;generateCheck(g,v,L.schema,W)}function generateOverwriteCheck(g,v,L,R,W){const ie=L._zod.def.tx;if(!ie)throw new ZodCompileUnsupportedError("overwrite check without a transform function");if(isAsyncFunction(ie))throw new ZodCompileAsyncError("z.compile: async overwrite transforms are not supported");const ce=addConstant(v,ie);g.write(`const ${W} = ${ce}(${R});`)}function throwAsync(){throw new $ZodAsyncError}function pushIssue(g){this.issues.push(g)}function generateCustomRefineCheck(g,v,L,R){const W=L._zod.def;if(W.fn){if(isAsyncFunction(W.fn))throw new ZodCompileAsyncError("z.compile: async .refine() predicates are not supported");const L=addUserConstant(v,W.fn),ie=addConstant(v,throwAsync),ce=newVar(v);return g.write(`const ${ce} = ${L}(${R});`),g.write(`if (${ce} instanceof Promise) ${ie}();`),g.write(`if (!${ce}) return INVALID;`),R}if(L._zod.check){if(isAsyncFunction(L._zod.check))throw new ZodCompileAsyncError("z.compile: async .superRefine() / check functions are not supported");const W=L._zod.check,ie=addUserConstant(v,g=>{const v={value:g,issues:[],addIssue:pushIssue};return W(v)instanceof Promise&&throwAsync(),0===v.issues.length?v.value:INVALID}),ce=newVar(v);return g.write(`const ${ce} = ${ie}(${R});`),g.write(`if (${ce} === INVALID) return INVALID;`),ce}throw new ZodCompileUnsupportedError("custom check without a predicate or check function")}const PATTERN_IS_COMPLETE=new Set(["cidrv4","cuid","cuid2","date","datetime","duration","e164","email","emoji","ends_with","guid","includes","ipv4","ksuid","lowercase","mac","nanoid","regex","starts_with","time","ulid","uppercase","uuid","xid"]);function generateStringFormatCheck(g,v,L,R){const W=L.format;if("base64"===W){const L=addConstant(v,isValidBase64);return g.write(`if (!${L}(${R})) return INVALID;`),R}if("base64url"===W){const L=addConstant(v,isValidBase64URL);return g.write(`if (!${L}(${R})) return INVALID;`),R}if("jwt"===W){const W=addConstant(v,isValidJWT),ie=addConstant(v,L.alg??null);return g.write(`if (!${W}(${R}, ${ie})) return INVALID;`),R}if("ipv6"===W){const L=addConstant(v,isValidIPv6);return g.write(`if (!${L}(${R})) return INVALID;`),R}if("cidrv6"===W){const L=addConstant(v,isValidCIDRv6);return g.write(`if (!${L}(${R})) return INVALID;`),R}if("credit_card"===W){const L=addConstant(v,isValidCreditCard);return g.write(`if (!${L}(${R})) return INVALID;`),R}if("iban"===W){const L=addConstant(v,isValidIBAN);return g.write(`if (!${L}(${R})) return INVALID;`),R}const ie=L;if("url"===W||"httpurl"===W||ie.normalize||void 0!==ie.hostname||void 0!==ie.protocol){const W=addConstant(v,parseURLObject),ce=addConstant(v,L),le=newVar(v),ue=newVar(v);if(g.write(`const ${le} = ${R}.trim();`),g.write(`const ${ue} = ${W}(${le}, ${ce});`),g.write(`if (typeof ${ue} === "number") return INVALID;`),void 0!==ie.hostname){const L=addConstant(v,urlHostnameOk);g.write(`if (!${L}(${ue}, ${ce}.hostname)) return INVALID;`)}if(void 0!==ie.protocol){const L=addConstant(v,urlProtocolOk);g.write(`if (!${L}(${ue}, ${ce}.protocol)) return INVALID;`)}const me=newVar(v),ge=ie.normalize?`${ue}.href`:`${addConstant(v,stripTabAndNewline)}(${le})`;return g.write(`const ${me} = ${ge};`),me}const ce=L.fn;if(ce){if(isAsyncFunction(ce))throw new ZodCompileUnsupportedError(`async string format ${W}`);const L=addConstant(v,ce);return g.write(`if (!${L}(${R})) return INVALID;`),R}if(PATTERN_IS_COMPLETE.has(W)&&L.pattern){const W=addConstant(v,L.pattern);return g.write(`${W}.lastIndex = 0;`),g.write(`if (!${W}.test(${R})) return INVALID;`),R}const le=L.format;switch(le){case"regex":throw new ZodCompileUnsupportedError("regex format without a pattern");case"lowercase":g.write(`if (${R} !== ${R}.toLowerCase()) return INVALID;`);break;case"uppercase":g.write(`if (${R} !== ${R}.toUpperCase()) return INVALID;`);break;case"includes":g.write(`if (!${R}.includes(${esc(L.includes)})) return INVALID;`);break;case"starts_with":{const v=L.prefix;g.write(`if (${R}.slice(0, ${v.length}) !== ${esc(v)}) return INVALID;`);break}case"ends_with":{const v=L.suffix;g.write(`if (${R}.slice(-${v.length}) !== ${esc(v)}) return INVALID;`);break}default:throw new ZodCompileUnsupportedError(`string format ${le}`)}return R}function generateCheck(g,v,L,R,W=!0){const ie=L._zod.def,ce=ie.type;if(ie.coerce)throw new ZodCompileUnsupportedError(`coercion (z.coerce.${ce}())`);const le=W||!!ie.checks?.length;let ue;switch(ce){case"string":ue=generateStringCheck(g,v,L,R);break;case"number":ue=generateNumberCheck(g,L,R);break;case"boolean":ue=generateBooleanCheck(g,R);break;case"bigint":ue=generateBigIntCheck(g,L,R);break;case"symbol":ue=generateSymbolCheck(g,R);break;case"undefined":ue=generateUndefinedCheck(g,R);break;case"null":ue=generateNullCheck(g,R);break;case"any":case"unknown":ue=R;break;case"never":g.write("return INVALID;"),ue=R;break;case"void":ue=generateVoidCheck(g,R);break;case"nan":ue=generateNaNCheck(g,R);break;case"date":ue=generateDateCheck(g,R);break;case"object":ue=generateObjectCheck(g,v,L,R,le);break;case"optional":ue=generateOptionalCheck(g,v,L,R,le);break;case"nullable":ue=generateNullableCheck(g,v,L,R,le);break;case"array":ue=generateArrayCheck(g,v,L,R,le);break;case"literal":ue=generateLiteralCheck(g,v,L,R);break;case"enum":ue=generateEnumCheck(g,v,L,R);break;case"readonly":{const W=generateWrapperCheck(g,v,L,R),ie=newVar(v);g.write(`const ${ie} = Object.freeze(${W});`),ue=ie;break}case"success":generateWrapperCheck(g,v,L,R),ue="true";break;case"default":case"prefault":ue=generateDefaultCheck(g,v,L,R);break;case"nonoptional":ue=generateNonOptionalCheck(g,v,L,R);break;case"tuple":ue=generateTupleCheck(g,v,L,R);break;case"union":ue=generateUnionCheck(g,v,L,R);break;case"intersection":ue=generateIntersectionCheck(g,v,L,R);break;case"record":ue=generateRecordCheck(g,v,L,R);break;case"map":ue=generateMapCheck(g,v,L,R);break;case"set":ue=generateSetCheck(g,v,L,R);break;case"file":ue=generateFileCheck(g,R);break;case"template_literal":ue=generateTemplateLiteralCheck(g,v,L,R);break;case"lazy":ue=generateLazyCheck(g,v,L,R);break;case"pipe":ue=generatePipeCheck(g,v,L,R);break;case"custom":ue=generateCustomCheck(g,v,L,R);break;case"properties":generatePropertiesChecks(g,v,L._zod.def,R,!0),ue=R;break;case"transform":ue=generateTransformCheck(g,v,L,R);break;case"catch":ue=generateCatchCheck(g,v,L,R);break;default:throw new ZodCompileUnsupportedError(`schema type ${ce}`)}return null===ue?null:generateChecks(g,v,L,ue)}function generateStringCheck(g,v,L,R){g.write(`if (typeof ${R} !== "string") return INVALID;`);const W=L._zod.def;return void 0===W.format?R:generateStringFormatCheck(g,v,W,R)}function generateNumberCheck(g,v,L){g.write(`if (typeof ${L} !== "number" || !Number.isFinite(${L})) return INVALID;`);const R=v._zod.def;return"number_format"===R.check&&R.format&&generateNumberFormatCheck(g,{format:R.format},L),L}function generateBooleanCheck(g,v){return g.write(`if (typeof ${v} !== "boolean") return INVALID;`),v}function generateBigIntCheck(g,v,L){g.write(`if (typeof ${L} !== "bigint") return INVALID;`);const R=v._zod.def;if(R.format)switch(R.format){case"int64":g.write(`if (${L} < -9223372036854775808n || ${L} > 9223372036854775807n) return INVALID;`);break;case"uint64":g.write(`if (${L} < 0n || ${L} > 18446744073709551615n) return INVALID;`)}return L}function generateSymbolCheck(g,v){return g.write(`if (typeof ${v} !== "symbol") return INVALID;`),v}function generateUndefinedCheck(g,v){return g.write(`if (${v} !== undefined) return INVALID;`),v}function generateNullCheck(g,v){return g.write(`if (${v} !== null) return INVALID;`),v}function generateVoidCheck(g,v){return g.write(`if (${v} !== undefined) return INVALID;`),v}function generateNaNCheck(g,v){return g.write(`if (typeof ${v} !== "number" || !Number.isNaN(${v})) return INVALID;`),v}function generateDateCheck(g,v){return g.write(`if (!(${v} instanceof Date) || Number.isNaN(${v}.getTime())) return INVALID;`),v}function generateObjectCheck(g,v,L,R,W=!0){const ie=L._zod.def;g.write(`if (typeof ${R} !== "object" || ${R} === null || Array.isArray(${R})) return INVALID;`);const ce=ie.shape,le=Object.keys(ce),ue=Object.getOwnPropertySymbols(ce),me=ue.length?[...le,...ue]:le,keyExpr=g=>"symbol"==typeof g?addConstant(v,g):esc(g),ge=ce;if(le.includes("__proto__"))throw new ZodCompileUnsupportedError('object shape key "__proto__"');const ve=new Map;for(const L of me){const ie=ge[L],ce=keyExpr(L),le=newVar(v);if(g.write(`const ${le} = ${R}[${ce}];`),void 0!==ie._zod.optin){const W=newVar(v);g.write(`let ${W} = (() => {`),g.indented(g=>{const L=compileChild(g,v,ie,le);g.write(`return ${L};`)}),g.write("})();"),"optional"===ie._zod.optout?(g.write(`if (${W} === INVALID) {`),g.indented(g=>{g.write(`if (${ce} in ${R}) return INVALID;`),g.write(`${W} = undefined;`)}),g.write("}")):g.write(`if (${W} === INVALID) return INVALID;`),ve.set(L,W)}else{requiresPresenceCheck(ie)&&g.write(`if (!(${ce} in ${R})) return INVALID;`);const ue=compileChild(g,v,ie,le,W);null!==ue&&ve.set(L,ue)}}const xe=ie.catchall;let _e="none";if(xe){const v=xe._zod.def.type;if("never"===v){const v=le.map(g=>`k !== ${esc(g)}`).join(" && ")||"true";g.write(`for (const k in ${R}) {`),g.indented(g=>{g.write(`if (${v}) return INVALID;`)}),g.write("}")}else _e="unknown"!==v&&"any"!==v||xe._zod.def.checks?.length?"schema":"passthrough"}const ke=newVar(v),Se=me.some(g=>mayOutputUndefined(ge[g])||dropsWhenAbsent(ge[g]));if(!W){if("schema"===_e){const L=le.length>0?addConstant(v,new Set(le)):null;g.write(`for (const k in ${R}) {`),g.indented(g=>{g.write('if (k === "__proto__") continue;'),L&&g.write(`if (${L}.has(k)) continue;`);const W=newVar(v);g.write(`const ${W} = ${R}[k];`),compileChild(g,v,xe,W,!1)}),g.write("}")}return null}if(Se){g.write(`const ${ke} = {};`);for(const v of me){const L=keyExpr(v),W=ve.get(v);dropsWhenAbsent(ge[v])?g.write(`if (${L} in ${R}) ${ke}[${L}] = ${W};`):mayOutputUndefined(ge[v])?g.write(`if (${W} !== undefined || ${L} in ${R}) ${ke}[${L}] = ${W};`):g.write(`${ke}[${L}] = ${W};`)}}else{const v=me.map(g=>`${(g=>"symbol"==typeof g?`[${keyExpr(g)}]`:esc(g))(g)}: ${ve.get(g)}`).join(", ");g.write(`const ${ke} = { ${v} };`)}if("none"!==_e){const L=le.length>0?addConstant(v,new Set(le)):null;g.write(`for (const k in ${R}) {`),g.indented(g=>{if(g.write('if (k === "__proto__") continue;'),L&&g.write(`if (${L}.has(k)) continue;`),"passthrough"===_e)g.write(`${ke}[k] = ${R}[k];`);else{const L=newVar(v);g.write(`const ${L} = ${R}[k];`);const W=compileChild(g,v,xe,L);g.write(`${ke}[k] = ${W};`)}}),g.write("}")}return ke}function generateOptionalCheck(g,v,L,R,W=!0){const ie=L._zod.def;if(isExactOptional(L))return generateCheck(g,v,ie.innerType,R,W);if("defaulted"===ie.innerType._zod.optin){const L=newVar(v),W=newVar(v);return g.write(`let ${L};`),g.write(`if (${R} === undefined) {`),g.indented(g=>{g.write(`const ${W} = (() => {`),g.indented(g=>{const L=generateCheck(g,v,ie.innerType,R);g.write(`return ${L};`)}),g.write("})();"),g.write(`if (${W} !== INVALID) ${L} = ${W};`)}),g.write("} else {"),g.indented(g=>{const W=generateCheck(g,v,ie.innerType,R);g.write(`${L} = ${W};`)}),g.write("}"),L}const ce=W?newVar(v):null;return ce&&g.write(`let ${ce};`),g.write(`if (${R} !== undefined) {`),g.indented(g=>{const L=generateCheck(g,v,ie.innerType,R,W);ce&&null!==L&&g.write(`${ce} = ${L};`)}),g.write("}"),ce}function isExactOptional(g){return!0===g._zod.traits?.has("$ZodExactOptional")}function requiresPresenceCheck(g){return void 0===g._zod.optin&&fastPathAcceptsAbsence(g)}function fastPathAcceptsAbsence(g){if(g._zod.def.coerce)return!0;const v=g._zod.def;switch(v.type){case"any":case"unknown":case"undefined":case"void":case"default":case"prefault":case"transform":case"custom":case"lazy":case"catch":default:return!0;case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"never":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":return!1;case"nonoptional":return!!v.innerType&&fastPathAcceptsAbsence(v.innerType);case"literal":return!!v.values?.includes(void 0);case"enum":return!!g._zod.values?.has(void 0);case"optional":case"nullable":case"readonly":case"success":return!v.innerType||fastPathAcceptsAbsence(v.innerType);case"union":return!v.options||v.options.some(fastPathAcceptsAbsence);case"intersection":return!v.left||!v.right||fastPathAcceptsAbsence(v.left)&&fastPathAcceptsAbsence(v.right);case"pipe":return!v.in||fastPathAcceptsAbsence(v.in)}}function dropsWhenAbsent(g){return"optional"===g._zod.optin&&"optional"===g._zod.optout}function mayOutputUndefined(g){const v=g._zod.def;switch(v.type){case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":case"never":case"success":return!1;case"literal":return!!v.values?.includes(void 0);case"enum":return!!g._zod.values?.has(void 0);case"optional":default:return!0;case"nullable":case"readonly":case"nonoptional":return!v.innerType||mayOutputUndefined(v.innerType);case"union":return!v.options||v.options.some(mayOutputUndefined);case"intersection":return!v.left||!v.right||mayOutputUndefined(v.left)||mayOutputUndefined(v.right);case"pipe":return!v.out||mayOutputUndefined(v.out)}}function generateNullableCheck(g,v,L,R,W=!0){const ie=L._zod.def,ce=W?newVar(v):null;return ce&&g.write(`let ${ce} = null;`),g.write(`if (${R} !== null) {`),g.indented(g=>{const L=generateCheck(g,v,ie.innerType,R,W);ce&&null!==L&&g.write(`${ce} = ${L};`)}),g.write("}"),ce}function generateArrayCheck(g,v,L,R,W=!0){const ie=L._zod.def;g.write(`if (!Array.isArray(${R})) return INVALID;`);const ce=W?newVar(v):null,le=newVar(v),ue=newVar(v);return ce&&g.write(`const ${ce} = new Array(${R}.length);`),g.write(`for (let ${le} = 0; ${le} < ${R}.length; ${le}++) {`),g.indented(g=>{g.write(`const ${ue} = ${R}[${le}];`);const L=compileChild(g,v,ie.element,ue,W);ce&&null!==L&&g.write(`${ce}[${le}] = ${L};`)}),g.write("}"),ce}function generateLiteralCheck(g,v,L,R){const W=L._zod.def.values;if(1!==W.length){const L=addConstant(v,new Set(W));return g.write(`if (!${L}.has(${R})) return INVALID;`),R}const ie=W[0];if("number"==typeof ie&&Number.isNaN(ie)){const L=addConstant(v,new Set(W));return g.write(`if (!${L}.has(${R})) return INVALID;`),R}if("string"==typeof ie)g.write(`if (${R} !== ${esc(ie)}) return INVALID;`);else if("number"==typeof ie||"boolean"==typeof ie)g.write(`if (${R} !== ${ie}) return INVALID;`);else if(null===ie)g.write(`if (${R} !== null) return INVALID;`);else if(void 0===ie)g.write(`if (${R} !== undefined) return INVALID;`);else{if("bigint"!=typeof ie)throw new ZodCompileUnsupportedError("literal type "+typeof ie);g.write(`if (${R} !== ${ie}n) return INVALID;`)}return R}function generateEnumCheck(g,v,L,R){const W=L._zod.values;if(!W)throw new ZodCompileUnsupportedError("enum schema without enumerated values");const ie=addConstant(v,W);return g.write(`if (!${ie}.has(${R})) return INVALID;`),R}function generateWrapperCheck(g,v,L,R){return generateCheck(g,v,L._zod.def.innerType,R)}function generateDefaultCheck(g,v,L,R){const W=L._zod.def,ie=Object.getOwnPropertyDescriptor(L._zod.def,"defaultValue")?()=>L._zod.def.defaultValue:void 0;if("prefault"===L._zod.def.type){if(!ie)return generateCheck(g,v,W.innerType,R);const L=addConstant(v,ie),ce=newVar(v);return g.write(`let ${ce} = ${R};`),g.write(`if (${R} === undefined) ${ce} = ${L}();`),generateCheck(g,v,W.innerType,ce)}const ce=newVar(v);if(ie){const L=addConstant(v,ie),le=addConstant(v,shallowClone);g.write(`let ${ce};`),g.write(`if (${R} === undefined) {`),g.indented(g=>{g.write(`${ce} = ${le}(${L}());`)}),g.write("} else {"),g.indented(g=>{const ie=generateCheck(g,v,W.innerType,R);g.write(`${ce} = ${ie} === undefined ? ${le}(${L}()) : ${ie};`)}),g.write("}")}else g.write(`let ${ce};`),g.write(`if (${R} !== undefined) {`),g.indented(g=>{const L=generateCheck(g,v,W.innerType,R);g.write(`${ce} = ${L};`)}),g.write("}");return ce}function generateNonOptionalCheck(g,v,L,R){const W=generateCheck(g,v,L._zod.def.innerType,R),ie=newVar(v);return g.write(`const ${ie} = ${W};`),g.write(`if (${ie} === undefined) return INVALID;`),ie}function generateTupleCheck(g,v,L,R){const W=L._zod.def,ie=W.items,ce=W.rest;g.write(`if (!Array.isArray(${R})) return INVALID;`);const le=getTupleOptStart(ie,"optin"),ue=getTupleOptStart(ie,"optout");ce?g.write(`if (${R}.length < ${le}) return INVALID;`):g.write(`if (${R}.length < ${le} || ${R}.length > ${ie.length}) return INVALID;`);const me=newVar(v);g.write(`const ${me} = [];`);for(let L=0;L<ie.length;L++){const W=ie[L];if(L>=ue)g.write(`if (${me}.length === ${L}) {`),g.indented(g=>{g.write(`if (${L} < ${R}.length) {`),g.indented(g=>{const ie=newVar(v);g.write(`const ${ie} = ${R}[${L}];`);const ce=compileChild(g,v,W,ie);g.write(`${me}[${L}] = ${ce};`)}),g.write("} else {"),g.indented(g=>{if(dropsWhenAbsent(W))return void g.write(`${me}.length = ${L};`);const R=newVar(v),ie=newVar(v);g.write(`const ${R} = undefined;`),g.write(`const ${ie} = (() => {`),g.indented(g=>{const L=compileChild(g,v,W,R);g.write(`return ${L};`)}),g.write("})();"),g.write(`if (${ie} === INVALID || ${ie} === undefined) ${me}.length = ${L};`),g.write(`else ${me}[${L}] = ${ie};`)}),g.write("}")}),g.write("}");else{const ie=newVar(v);g.write(`const ${ie} = ${R}[${L}];`);const ce=compileChild(g,v,W,ie);g.write(`${me}[${L}] = ${ce};`)}}if(ce){const L=newVar(v),W=newVar(v);g.write(`for (let ${L} = ${ie.length}; ${L} < ${R}.length; ${L}++) {`),g.indented(g=>{g.write(`const ${W} = ${R}[${L}];`);const ie=compileChild(g,v,ce,W);g.write(`${me}[${L}] = ${ie};`)}),g.write("}")}return me}function getTupleOptStart(g,v){for(let L=g.length-1;L>=0;L--){if(!("optin"===v?void 0!==g[L]._zod.optin:"optional"===g[L]._zod.optout))return L+1}return 0}function generateUnionCheck(g,v,L,R){const W=L._zod.def,ie=W.options;if(W.discriminator)return generateDiscriminatedUnionCheck(g,v,W,R);if(!1===W.inclusive)throw new ZodCompileUnsupportedError("exclusive unions (z.xor)");if(0===ie.length)return g.write("return INVALID;"),R;if(1===ie.length)return generateCheck(g,v,ie[0],R);if(ie.every(g=>"literal"===g._zod.def.type&&!g._zod.def.checks?.length)){const L=new Set(ie.flatMap(g=>g._zod.def.values)),W=addConstant(v,L);return g.write(`if (!${W}.has(${R})) return INVALID;`),R}const ce=newVar(v);g.write(`let ${ce};`);for(let L=0;L<ie.length;L++){const W=ie[L];0===L?g.write(`${ce} = (() => {`):g.write(`if (${ce} === INVALID) ${ce} = (() => {`),g.indented(g=>{const L=generateCheck(g,v,W,R);g.write(`return ${L};`)}),g.write("})();")}return g.write(`if (${ce} === INVALID) return INVALID;`),ce}function generateDiscriminatedUnionCheck(g,v,L,R){if(L.unionFallback)throw new ZodCompileUnsupportedError("discriminated union with unionFallback");if(0===L.options.length)return g.write("return INVALID;"),R;const W=newVar(v),ie=newVar(v);g.write(`const ${W} = ${R}?.[${esc(L.discriminator)}];`),g.write(`let ${ie};`);let ce=!0;const le=new Set;for(const ue of L.options){const me=ue._zod.propValues?.[L.discriminator];if(!me||0===me.size)throw new ZodCompileUnsupportedError("discriminated union option without static discriminator values");for(const g of me){if(le.has(g))throw new ZodCompileUnsupportedError(`duplicate discriminator value ${String(g)}`);le.add(g)}const ge=Array.from(me,g=>literalEquality(v,W,g)),ve=ce?"if":"else if";g.write(`${ve} (${ge.join(" || ")}) {`),g.indented(g=>{const L=generateCheck(g,v,ue,R);g.write(`${ie} = ${L};`)}),g.write("}"),ce=!1}return g.write("else { return INVALID; }"),ie}function literalEquality(g,v,L){if("string"==typeof L)return`${v} === ${esc(L)}`;if("number"==typeof L)return Number.isNaN(L)?`Number.isNaN(${v})`:`${v} === ${L}`;if("boolean"==typeof L)return`${v} === ${L}`;if(null===L)return`${v} === null`;if(void 0===L)return`${v} === undefined`;if("bigint"==typeof L)return`${v} === ${L}n`;if("symbol"==typeof L){return`${v} === ${addConstant(g,L)}`}throw new ZodCompileUnsupportedError(`literal discriminator value ${String(L)}`)}function generateIntersectionCheck(g,v,L,R){const W=L._zod.def;v.definite=!1;const ie=compileChild(g,v,W.left,R),ce=compileChild(g,v,W.right,R),le=addConstant(v,mergeValues),ue=newVar(v);return g.write(`const ${ue} = ${le}(${ie}, ${ce});`),g.write(`if (!${ue}.valid) return INVALID;`),`${ue}.data`}function generateRecordCheck(g,v,L,R){const W=L._zod.def,ie=addConstant(v,isPlainObject);g.write(`if (!${ie}(${R})) return INVALID;`);const ce=newVar(v),le=newVar(v),ue=newVar(v);g.write(`const ${ce} = {};`);const me=W,ge=me.partial?void 0:W.keyType._zod.values;if(ge){const L=[];for(const ie of ge){if("string"!=typeof ie&&"number"!=typeof ie&&"symbol"!=typeof ie)throw new ZodCompileUnsupportedError(`record key value ${String(ie)}`);const le="number"==typeof ie?ie.toString():ie;if("__proto__"===le)throw new ZodCompileUnsupportedError('record key "__proto__"');L.push(le);const ue=addConstant(v,ie),me=generateCheck(g,v,W.keyType,ue),ge=newVar(v);g.write(`const ${ge} = ${R}[${literalPropertyKey(v,le)}];`);const ve=compileChild(g,v,W.valueType,ge);g.write(`${ce}[${me}] = ${ve};`)}const ie=addConstant(v,new Set(L));return g.write(`for (const ${le} in ${R}) {`),g.indented(g=>{g.write(`if (${ie}.has(${le})) continue;`),"loose"===me.mode?g.write(`if (${le} !== "__proto__") ${ce}[${le}] = ${R}[${le}];`):g.write("return INVALID;")}),g.write("}"),ce}const ve=W.keyType._zod.def;if(!("string"===ve.type&&void 0===ve.format&&!ve.coerce&&0===(ve.checks?.length??0))){const L="loose"===W.mode,ie=compileFn(W.keyType);!1===ie.definite&&(v.definite=!1);const ue=addConstant(v,ie),me=addConstant(v,number$2),ge=newVar(v);return emitOwnKeys(g,v,R,le,g=>{g.write(`let ${ge} = ${ue}(${le});`),g.write(`if (${ge} === INVALID && typeof ${le} === "string" && ${me}.test(${le})) ${ge} = ${ue}(Number(${le}));`),L?g.write(`if (${ge} === INVALID) { ${ce}[${le}] = ${R}[${le}]; continue; }`):g.write(`if (${ge} === INVALID) return INVALID;`),g.write(`if (${ge} === "__proto__") continue;`);const ie=newVar(v);g.write(`const ${ie} = ${R}[${le}];`);const ve=compileChild(g,v,W.valueType,ie);g.write(`${ce}[${ge}] = ${ve};`)}),ce}return emitOwnKeys(g,v,R,le,g=>{g.write(`const ${ue} = ${R}[${le}];`);const L=compileChild(g,v,W.valueType,ue);g.write(`${ce}[${le}] = ${L};`)},"return INVALID;"),ce}function emitOwnKeys(g,v,L,R,W,ie){const ce=addConstant(v,Object.prototype.propertyIsEnumerable),le=newVar(v),ue=newVar(v),me=newVar(v);g.write(`const ${le} = Object.getOwnPropertySymbols(${L});`),g.write(`const ${ue} = Object.getOwnPropertyNames(${L});`),g.write(`for (let ${me} = 0; ${me} < ${ue}.length; ${me}++) {`),g.indented(g=>{g.write(`const ${R} = ${ue}[${me}];`),g.write(`if (${R} === "__proto__" || !${ce}.call(${L}, ${R})) continue;`),W(g)}),g.write("}"),g.write(`for (let ${me} = 0; ${me} < ${le}.length; ${me}++) {`),g.indented(g=>{g.write(`const ${R} = ${le}[${me}];`),g.write(`if (!${ce}.call(${L}, ${R})) continue;`),ie?g.write(ie):W(g)}),g.write("}")}function literalPropertyKey(g,v){return"string"==typeof v?esc(v):addConstant(g,v)}function generateMapCheck(g,v,L,R){const W=L._zod.def;g.write(`if (!(${R} instanceof Map)) return INVALID;`);const ie=newVar(v),ce=newVar(v),le=newVar(v);return g.write(`const ${ie} = new Map();`),g.write(`for (const [${ce}, ${le}] of ${R}) {`),g.indented(g=>{const L=generateCheck(g,v,W.keyType,ce),R=generateCheck(g,v,W.valueType,le);g.write(`${ie}.set(${L}, ${R});`)}),g.write("}"),ie}function generateSetCheck(g,v,L,R){const W=L._zod.def;g.write(`if (!(${R} instanceof Set)) return INVALID;`);const ie=newVar(v),ce=newVar(v);return g.write(`const ${ie} = new Set();`),g.write(`for (const ${ce} of ${R}) {`),g.indented(g=>{const L=generateCheck(g,v,W.valueType,ce);g.write(`${ie}.add(${L});`)}),g.write("}"),ie}function generateFileCheck(g,v){return g.write(`if (!(${v} instanceof File)) return INVALID;`),v}function generateTemplateLiteralCheck(g,v,L,R){g.write(`if (typeof ${R} !== "string") return INVALID;`);const W=L._zod.pattern;if(W){const L=addConstant(v,W);g.write(`${L}.lastIndex = 0;`),g.write(`if (!${L}.test(${R})) return INVALID;`)}return R}function generateLazyCheck(g,v,L,R){const W=addUserConstant(v,L._zod.def.getter),ie=addConstant(v,{parser:null});g.write(`if (!${ie}.parser) {`),g.indented(g=>{g.write(`const inner = ${W}();`),g.write(`${ie}.parser = function(input) {`),g.indented(g=>{g.write("const result = inner._zod.run({ value: input, issues: [] }, {});"),g.write("return result.issues.length === 0 ? result.value : INVALID;")}),g.write("};")}),g.write("}");const ce=newVar(v);return g.write(`const ${ce} = ${ie}.parser(${R});`),g.write(`if (${ce} === INVALID) return INVALID;`),ce}function generatePipeCheck(g,v,L,R){const W=L._zod.def,ie=generateCheck(g,v,W.in,R);if(W.transform){if(isAsyncFunction(W.transform))throw new ZodCompileAsyncError("z.compile: async transforms in pipes are not supported");const L=W.transform,R=addUserConstant(v,g=>{const v={value:g,issues:[],addIssue:pushIssue},R=L(g,v);return R instanceof Promise?INVALID:0===v.issues.length?R:INVALID}),ce=newVar(v);return g.write(`const ${ce} = ${R}(${ie});`),g.write(`if (${ce} === INVALID) return INVALID;`),generateCheck(g,v,W.out,ce)}return generateCheck(g,v,W.out,ie)}function isAsyncFunction(g){return"function"==typeof g&&("AsyncFunction"===g.constructor.name||"AsyncFunction"===g[Symbol.toStringTag])}function generateCustomCheck(g,v,L,R){const W=L._zod.def;if(!W.fn)throw new ZodCompileUnsupportedError("custom schema without a predicate function");{if(isAsyncFunction(W.fn))throw new ZodCompileAsyncError("z.compile: async custom predicates are not supported");const L=addUserConstant(v,W.fn),ie=addConstant(v,throwAsync),ce=newVar(v);g.write(`const ${ce} = ${L}(${R});`),g.write(`if (${ce} instanceof Promise) ${ie}();`),g.write(`if (!${ce}) return INVALID;`)}return R}function runtimeCatch(g,v,L){const R=g._zod.run({value:L,issues:[]},{});if(R&&"function"==typeof R.then)return INVALID;const W=R;return 0===W.issues.length?W.value:v()}function generateCatchCheck(g,v,L,R){const W=L._zod.def;if(!W.catchValue[CONSTANT_CATCH])throw new ZodCompileUnsupportedError("catch with a callback (only a constant catch value compiles)",!1);const ie=newVar(v);g.write(`let ${ie} = (() => {`),g.indented(g=>{const L=compileChild(g,v,W.innerType,R);g.write(`return ${L};`)}),g.write("})();");const ce=addConstant(v,W.innerType),le=addUserConstant(v,W.catchValue),ue=addConstant(v,runtimeCatch);return g.write(`if (${ie} === INVALID) {`),g.indented(g=>{g.write(`${ie} = ${ue}(${ce}, ${le}, ${R});`),g.write(`if (${ie} === INVALID) return INVALID;`)}),g.write("}"),ie}function generateTransformCheck(g,v,L,R){const W=L._zod.def;if(W.transform){if(isAsyncFunction(W.transform))throw new ZodCompileAsyncError("z.compile: async transforms are not supported");const L=W.transform,ie=addUserConstant(v,g=>{const v={value:g,issues:[],addIssue:pushIssue},R=L(g,v);return R instanceof Promise?INVALID:0===v.issues.length?R:INVALID}),ce=newVar(v);return g.write(`const ${ce} = ${ie}(${R});`),g.write(`if (${ce} === INVALID) return INVALID;`),ce}return R}function _string(g,v){return new g({type:"string",...normalizeParams(v)})}function _coercedString(g,v){return new g({type:"string",coerce:!0,...normalizeParams(v)})}function _email(g,v){return new g({type:"string",format:"email",check:"string_format",abort:!1,...normalizeParams(v)})}function _guid(g,v){return new g({type:"string",format:"guid",check:"string_format",abort:!1,...normalizeParams(v)})}function _uuid(g,v){return new g({type:"string",format:"uuid",check:"string_format",abort:!1,...normalizeParams(v)})}function _uuidv4(g,v){return new g({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...normalizeParams(v)})}function _uuidv6(g,v){return new g({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...normalizeParams(v)})}function _uuidv7(g,v){return new g({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...normalizeParams(v)})}function _url(g,v){return new g({type:"string",format:"url",check:"string_format",abort:!1,...normalizeParams(v)})}function _emoji(g,v){return new g({type:"string",format:"emoji",check:"string_format",abort:!1,...normalizeParams(v)})}function _nanoid(g,v){return new g({type:"string",format:"nanoid",check:"string_format",abort:!1,...normalizeParams(v)})}function _cuid(g,v){return new g({type:"string",format:"cuid",check:"string_format",abort:!1,...normalizeParams(v)})}function _cuid2(g,v){return new g({type:"string",format:"cuid2",check:"string_format",abort:!1,...normalizeParams(v)})}function _ulid(g,v){return new g({type:"string",format:"ulid",check:"string_format",abort:!1,...normalizeParams(v)})}function _xid(g,v){return new g({type:"string",format:"xid",check:"string_format",abort:!1,...normalizeParams(v)})}function _ksuid(g,v){return new g({type:"string",format:"ksuid",check:"string_format",abort:!1,...normalizeParams(v)})}function _ipv4(g,v){return new g({type:"string",format:"ipv4",check:"string_format",abort:!1,...normalizeParams(v)})}function _ipv6(g,v){return new g({type:"string",format:"ipv6",check:"string_format",abort:!1,...normalizeParams(v)})}function _mac(g,v){return new g({type:"string",format:"mac",check:"string_format",abort:!1,...normalizeParams(v)})}function _cidrv4(g,v){return new g({type:"string",format:"cidrv4",check:"string_format",abort:!1,...normalizeParams(v)})}function _cidrv6(g,v){return new g({type:"string",format:"cidrv6",check:"string_format",abort:!1,...normalizeParams(v)})}function _base64(g,v){return new g({type:"string",format:"base64",check:"string_format",abort:!1,...normalizeParams(v)})}function _base64url(g,v){return new g({type:"string",format:"base64url",check:"string_format",abort:!1,...normalizeParams(v)})}function _e164(g,v){return new g({type:"string",format:"e164",check:"string_format",abort:!1,...normalizeParams(v)})}function _creditCard(g,v){return new g({type:"string",format:"credit_card",check:"string_format",abort:!1,...normalizeParams(v)})}function _iban(g,v){return new g({type:"string",format:"iban",check:"string_format",abort:!1,...normalizeParams(v)})}function _jwt(g,v){return new g({type:"string",format:"jwt",check:"string_format",abort:!1,...normalizeParams(v)})}const TimePrecision={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function _isoDateTime(g,v){return new g({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...normalizeParams(v)})}function _isoDate(g,v){return new g({type:"string",format:"date",check:"string_format",...normalizeParams(v)})}function _isoTime(g,v){return new g({type:"string",format:"time",check:"string_format",precision:null,...normalizeParams(v)})}function _isoDuration(g,v){return new g({type:"string",format:"duration",check:"string_format",...normalizeParams(v)})}function _number(g,v){return new g({type:"number",checks:[],...normalizeParams(v)})}function _coercedNumber(g,v){return new g({type:"number",coerce:!0,checks:[],...normalizeParams(v)})}function _int(g,v){return new g({type:"number",check:"number_format",abort:!1,format:"safeint",...normalizeParams(v)})}function _float32(g,v){return new g({type:"number",check:"number_format",abort:!1,format:"float32",...normalizeParams(v)})}function _float64(g,v){return new g({type:"number",check:"number_format",abort:!1,format:"float64",...normalizeParams(v)})}function _int32(g,v){return new g({type:"number",check:"number_format",abort:!1,format:"int32",...normalizeParams(v)})}function _uint32(g,v){return new g({type:"number",check:"number_format",abort:!1,format:"uint32",...normalizeParams(v)})}function _boolean(g,v){return new g({type:"boolean",...normalizeParams(v)})}function _coercedBoolean(g,v){return new g({type:"boolean",coerce:!0,...normalizeParams(v)})}function _bigint(g,v){return new g({type:"bigint",...normalizeParams(v)})}function _coercedBigint(g,v){return new g({type:"bigint",coerce:!0,...normalizeParams(v)})}function _int64(g,v){return new g({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...normalizeParams(v)})}function _uint64(g,v){return new g({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...normalizeParams(v)})}function _symbol(g,v){return new g({type:"symbol",...normalizeParams(v)})}function _undefined$1(g,v){return new g({type:"undefined",...normalizeParams(v)})}function _null$1(g,v){return new g({type:"null",...normalizeParams(v)})}function _any(g){return new g({type:"any"})}function _unknown(g){return new g({type:"unknown"})}function _never(g,v){return new g({type:"never",...normalizeParams(v)})}function _void$1(g,v){return new g({type:"void",...normalizeParams(v)})}function _date(g,v){return new g({type:"date",...normalizeParams(v)})}function _coercedDate(g,v){return new g({type:"date",coerce:!0,...normalizeParams(v)})}function _nan(g,v){return new g({type:"nan",...normalizeParams(v)})}function _lt(g,v){return new $ZodCheckLessThan({check:"less_than",...normalizeParams(v),value:g,inclusive:!1})}function _lte(g,v){return new $ZodCheckLessThan({check:"less_than",...normalizeParams(v),value:g,inclusive:!0})}function _gt(g,v){return new $ZodCheckGreaterThan({check:"greater_than",...normalizeParams(v),value:g,inclusive:!1})}function _gte(g,v){return new $ZodCheckGreaterThan({check:"greater_than",...normalizeParams(v),value:g,inclusive:!0})}function _positive(g){return _gt(0,g)}function _negative(g){return _lt(0,g)}function _nonpositive(g){return _lte(0,g)}function _nonnegative(g){return _gte(0,g)}function _multipleOf(g,v){return new $ZodCheckMultipleOf({check:"multiple_of",...normalizeParams(v),value:g})}function _maxSize(g,v){return new $ZodCheckMaxSize({check:"max_size",...normalizeParams(v),maximum:g})}function _minSize(g,v){return new $ZodCheckMinSize({check:"min_size",...normalizeParams(v),minimum:g})}function _size(g,v){return new $ZodCheckSizeEquals({check:"size_equals",...normalizeParams(v),size:g})}function _maxLength(g,v){return new $ZodCheckMaxLength({check:"max_length",...normalizeParams(v),maximum:g})}function _minLength(g,v){return new $ZodCheckMinLength({check:"min_length",...normalizeParams(v),minimum:g})}function _length(g,v){return new $ZodCheckLengthEquals({check:"length_equals",...normalizeParams(v),length:g})}function _regex(g,v){return new $ZodCheckRegex({check:"string_format",format:"regex",...normalizeParams(v),pattern:g})}function _lowercase(g){return new $ZodCheckLowerCase({check:"string_format",format:"lowercase",...normalizeParams(g)})}function _uppercase(g){return new $ZodCheckUpperCase({check:"string_format",format:"uppercase",...normalizeParams(g)})}function _includes(g,v){return new $ZodCheckIncludes({check:"string_format",format:"includes",...normalizeParams(v),includes:g})}function _startsWith(g,v){return new $ZodCheckStartsWith({check:"string_format",format:"starts_with",...normalizeParams(v),prefix:g})}function _endsWith(g,v){return new $ZodCheckEndsWith({check:"string_format",format:"ends_with",...normalizeParams(v),suffix:g})}function _property(g,v,L){return new $ZodCheckProperty({check:"property",property:g,schema:v,...normalizeParams(L)})}function _properties(g,v,L){return new g({type:"properties",check:"properties",shape:v,...normalizeParams(L)})}function _mime(g,v){return new $ZodCheckMimeType({check:"mime_type",mime:g,...normalizeParams(v)})}function _overwrite(g){return new $ZodCheckOverwrite({check:"overwrite",tx:g})}function _normalize(g){return _overwrite(v=>v.normalize(g))}function _trim(){return _overwrite(g=>g.trim())}function _toLowerCase(){return _overwrite(g=>g.toLowerCase())}function _toUpperCase(){return _overwrite(g=>g.toUpperCase())}function _slugify(){return _overwrite(g=>slugify(g))}function _array(g,v,L){return new g({type:"array",element:v,...normalizeParams(L)})}function _union(g,v,L){return new g({type:"union",options:v,...normalizeParams(L)})}function _xor(g,v,L){return new g({type:"union",options:v,inclusive:!1,...normalizeParams(L)})}function _discriminatedUnion(g,v,L,R){return new g({type:"union",options:L,discriminator:v,...normalizeParams(R)})}function _intersection(g,v,L){return new g({type:"intersection",left:v,right:L})}function _tuple(g,v,L,R){const W=L instanceof $ZodType;return new g({type:"tuple",items:v,rest:W?L:null,...normalizeParams(W?R:L)})}function _record(g,v,L,R){return new g({type:"record",keyType:v,valueType:L,...normalizeParams(R)})}function _map(g,v,L,R){return new g({type:"map",keyType:v,valueType:L,...normalizeParams(R)})}function _set(g,v,L){return new g({type:"set",valueType:v,...normalizeParams(L)})}function _enum$1(g,v,L){return new g({type:"enum",entries:Array.isArray(v)?Object.fromEntries(v.map(g=>[g,g])):v,...normalizeParams(L)})}function _nativeEnum(g,v,L){return new g({type:"enum",entries:v,...normalizeParams(L)})}function _literal(g,v,L){return new g({type:"literal",values:Array.isArray(v)?v:[v],...normalizeParams(L)})}function _file(g,v){return new g({type:"file",...normalizeParams(v)})}function _transform(g,v){return new g({type:"transform",transform:v})}function _optional(g,v){return new g({type:"optional",innerType:v})}function _nullable(g,v){return new g({type:"nullable",innerType:v})}function _default$1(g,v,L){return new g({type:"default",innerType:v,get defaultValue(){return"function"==typeof L?L():shallowClone(L)}})}function _nonoptional(g,v,L){return new g({type:"nonoptional",innerType:v,...normalizeParams(L)})}function _success(g,v){return new g({type:"success",innerType:v})}function _catch$1(g,v,L){return new g({type:"catch",innerType:v,catchValue:"function"==typeof L?L:constantCatch(L)})}function _pipe(g,v,L){return new g({type:"pipe",in:v,out:L})}function _readonly(g,v){return new g({type:"readonly",innerType:v})}function _templateLiteral(g,v,L){return new g({type:"template_literal",parts:v,...normalizeParams(L)})}function _lazy(g,v){return new g({type:"lazy",getter:v})}function _promise(g,v){return new g({type:"promise",innerType:v})}function _custom(g,v,L){const R=normalizeParams(L);R.abort??(R.abort=!0);return new g({type:"custom",check:"custom",fn:v,...R})}function _refine(g,v,L){return new g({type:"custom",check:"custom",fn:v,...normalizeParams(L)})}function _superRefine(g,v){const L=_check(v=>(v.addIssue=g=>{if("string"==typeof g)v.issues.push(issue(g,v.value,L._zod.def));else{const R=g;R.fatal&&(R.continue=!1),R.code??(R.code="custom"),"input"in R||(R.input=v.value),R.inst??(R.inst=L),R.continue??(R.continue=!L._zod.def.abort),v.issues.push(issue(R))}},g(v.value,v)),v);return L}function _check(g,v){const L=new $ZodCheck({check:"custom",...normalizeParams(v)});return L._zod.check=g,L}function describe$1(g){const v=new $ZodCheck({check:"describe"});return v._zod.onattach=[v=>{const L=globalRegistry.get(v)??{};globalRegistry.add(v,{...L,description:g})}],v._zod.check=()=>{},v}function meta$1(g){const v=new $ZodCheck({check:"meta"});return v._zod.onattach=[v=>{const L=globalRegistry.get(v)??{};globalRegistry.add(v,{...L,...g})}],v._zod.check=()=>{},v}function _stringbool(g,v){const L=normalizeParams(v);let R=L.truthy??["true","1","yes","on","y","enabled"],W=L.falsy??["false","0","no","off","n","disabled"];"sensitive"!==L.case&&(R=R.map(g=>"string"==typeof g?g.toLowerCase():g),W=W.map(g=>"string"==typeof g?g.toLowerCase():g));const ie=new Set(R),ce=new Set(W),le=g.Codec??$ZodCodec,ue=g.Boolean??$ZodBoolean,me=new le({type:"pipe",in:new(g.String??$ZodString)({type:"string",error:L.error}),out:new ue({type:"boolean",error:L.error}),transform:(g,v)=>{let R=g;return"sensitive"!==L.case&&(R=R.toLowerCase()),!!ie.has(R)||!ce.has(R)&&(v.issues.push({code:"invalid_value",expected:"stringbool",values:[...ie,...ce],input:v.value,inst:me,continue:!1}),{})},reverseTransform:(g,v)=>!0===g?R[0]||"true":W[0]||"false",error:L.error});return me._zod.bag.truthy=R,me._zod.bag.falsy=W,me._zod.bag.case=L.case??"insensitive",me}function _stringFormat(g,v,L,R={}){const W=normalizeParams(R),ie={check:"string_format",type:"string",format:v,fn:"function"==typeof L?L:g=>L.test(g),...W};L instanceof RegExp&&(ie.pattern=L);return new g(ie)}function assignProps(g,...v){for(const L of v)for(const v of Reflect.ownKeys(L))Object.prototype.propertyIsEnumerable.call(L,v)&&assignProp(g,v,L[v]);return g}function initializeContext(g){let v=g?.target??"draft-2020-12";return"draft-4"===v&&(v="draft-04"),"draft-7"===v&&(v="draft-07"),{processors:g.processors??{},metadataRegistry:g?.metadata??globalRegistry,target:v,unrepresentable:g?.unrepresentable??"throw",override:g?.override??(()=>{}),io:g?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:g?.cycles??"ref",reused:g?.reused??"inline",intersections:[],deferred:[],external:g?.external??void 0}}function handleUnrepresentable(g,v,L,R,W){const ie="function"==typeof v.unrepresentable?v.unrepresentable({zodSchema:g,path:R.path,message:W}):v.unrepresentable;if("any"===ie)return!1;if(void 0===ie||"throw"===ie)throw new Error(W);return Object.assign(L,ie),!0}function processSchema(g,v,L={path:[],schemaPath:[]}){var R;const W=g._zod.def,ie=v.seen.get(g);if(ie){ie.count++;return L.schemaPath.includes(g)&&(ie.cycle=L.path),ie.schema}const ce={schema:{},count:1,cycle:void 0,path:L.path};v.seen.set(g,ce),v.sharedDefsExtractedFor=void 0,v.sharedEmitDoneFor=void 0;const le=g._zod.toJSONSchema?.();if(le)ce.schema=le;else{const R={...L,schemaPath:[...L.schemaPath,g],path:L.path};if(g._zod.processJSONSchema)g._zod.processJSONSchema(v,ce.schema,R);else{const L=ce.schema,ie=v.processors[W.type];if(!ie)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${W.type}`);ie(g,v,L,R)}const ie=g._zod.parent;ie&&(ce.ref||(ce.ref=ie),processSchema(ie,v,R),v.seen.get(ie).isParent=!0)}const ue=v.metadataRegistry.get(g);ue&&assignProps(ce.schema,ue),"input"===v.io&&isTransforming(g)&&(delete ce.schema.examples,delete ce.schema.default),"input"===v.io&&"_prefault"in ce.schema&&((R=ce.schema).default??(R.default=ce.schema._prefault)),delete ce.schema._prefault;return v.seen.get(g).schema}function encodeJSONPointerSegment(g){return g.replace(/~/g,"~0").replace(/\//g,"~1")}function extractDefs(g,v){const L=g.seen.get(v);if(!L)throw new Error("Unprocessed schema. This is a bug in Zod.");if(g.external&&g.sharedDefsExtractedFor===g.external)return;const R=new Map;for(const v of g.seen.entries()){const L=g.metadataRegistry.get(v[0])?.id;if(L){const g=R.get(L);if(g&&g!==v[0])throw new Error(`Duplicate schema id "${L}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);R.set(L,v[0])}}const extractToDef=v=>{if(v[1].schema.$ref)return;const R=v[1],{ref:W,defId:ie}=(v=>{const R="draft-2020-12"===g.target?"$defs":"definitions";if(g.external){const L=g.external.registry.get(v[0])?.id,W=g.external.uri??(g=>g);if(L)return{ref:W(L)};const ie=v[1].defId??v[1].schema.id??"schema"+g.counter++;return v[1].defId=ie,{defId:ie,ref:`${W("__shared")}#/${R}/${encodeJSONPointerSegment(ie)}`}}const W=`#/${R}/`;if(v[1]===L&&!v[1].schema.id)return{ref:"#"};const ie=v[1].schema.id??"__schema"+g.counter++;return{defId:ie,ref:W+encodeJSONPointerSegment(ie)}})(v);R.def={...R.schema},ie&&(R.defId=ie);const ce=R.schema;for(const g in ce)delete ce[g];ce.$ref=W};if("throw"===g.cycles)for(const v of g.seen.entries()){const g=v[1];if(g.cycle)throw new Error(`Cycle detected: #/${g.cycle?.join("/")}/<root>\n\nSet the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const L of g.seen.entries()){const R=L[1];if(v===L[0]){extractToDef(L);continue}if(g.external){const R=g.external.registry.get(L[0])?.id;if(v!==L[0]&&R){extractToDef(L);continue}}const W=g.metadataRegistry.get(L[0])?.id;W?extractToDef(L):(R.cycle||R.count>1&&"ref"===g.reused)&&extractToDef(L)}g.external&&(g.sharedDefsExtractedFor=g.external)}function compactTypeUnion(g){const v=g.anyOf;if(!Array.isArray(v)||0===v.length||void 0!==g.type)return;const L=[];for(const g of v){if(!g||"object"!=typeof g)return;compactTypeUnion(g);const v=Object.keys(g);if(1!==v.length||"type"!==v[0])return;const R=g.type;for(const g of Array.isArray(R)?R:[R]){if("string"!=typeof g)return;L.includes(g)||L.push(g)}}delete g.anyOf,g.type=1===L.length?L[0]:L}const FOLDABLE_KEYS=new Set(["type","properties","required","additionalProperties"]),UNION_KEYS=["oneOf","anyOf"];function undeclaredConstraint(g){const v=g.additionalProperties;return void 0===v||!1===v||"object"!=typeof v||null===v?null:Object.keys(v).length?v:null}function foldObjects(g){const v=[];for(const L of g){if("object"!=typeof L||"object"!==L.type)return null;for(const g in L)if(!FOLDABLE_KEYS.has(g))return null;v.push(L)}const L={},R=new Set;for(const g of v){for(const R in g.properties){if(Object.prototype.hasOwnProperty.call(L,R))continue;const g=[];for(const L of v){const v=L.properties?.[R]??undeclaredConstraint(L);null!=v&&(g.some(g=>JSON.stringify(g)===JSON.stringify(v))||g.push(v))}assignProp(L,R,1===g.length?g[0]:foldObjects(g)??{allOf:g})}for(const v of g.required??[])R.add(v)}const W={type:"object",properties:L};if(R.size&&(W.required=[...R]),v.every(g=>!1===g.additionalProperties))W.additionalProperties=!1;else{const g=[];for(const L of v){const v=undeclaredConstraint(L);v&&!g.some(g=>JSON.stringify(g)===JSON.stringify(v))&&g.push(v)}1===g.length?W.additionalProperties=g[0]:g.length>1&&(W.additionalProperties={allOf:g})}return W}function foldIntersection(g){const v=g.allOf;if(!Array.isArray(v)||v.length<2)return;for(const v of FOLDABLE_KEYS)if(v in g)return;const L=v.filter(g=>UNION_KEYS.some(v=>Array.isArray(g[v])));let R=null;if(L.length){const g=L[0],W=UNION_KEYS.find(v=>Array.isArray(g[v]));if(1!==Object.keys(g).length)return;const ie=v.filter(v=>v!==g),ce=g[W].map(g=>foldObjects([...ie,g]));if(ce.some(g=>!g))return;R={[W]:ce}}else R=foldObjects(v);R&&(delete g.allOf,assignProps(g,R))}function finalize(g,v){const L=g.seen.get(v);if(!L)throw new Error("Unprocessed schema. This is a bug in Zod.");const flattenRef=v=>{const L=g.seen.get(v);if(null===L.ref)return;const R=L.def??L.schema,W={...R},ie=L.ref;if(L.ref=null,ie){flattenRef(ie);const L=g.seen.get(ie),ce=L.schema;!ce.$ref||"draft-07"!==g.target&&"draft-04"!==g.target&&"openapi-3.0"!==g.target?assignProps(R,ce):(R.allOf=R.allOf??[],R.allOf.push(ce)),assignProps(R,W);if(v._zod.parent===ie)for(const g in R)"$ref"!==g&&"allOf"!==g&&(g in W||delete R[g]);if(ce.$ref&&L.def)for(const g in R)"$ref"!==g&&"allOf"!==g&&g in L.def&&JSON.stringify(R[g])===JSON.stringify(L.def[g])&&delete R[g]}const ce=v._zod.parent;if(ce&&ce!==ie){flattenRef(ce);const v=g.seen.get(ce);if(v?.schema.$ref&&(R.$ref=v.schema.$ref,v.def))for(const g in R)"$ref"!==g&&"allOf"!==g&&g in v.def&&JSON.stringify(R[g])===JSON.stringify(v.def[g])&&delete R[g]}g.override({zodSchema:v,jsonSchema:R,path:L.path??[]})};if(!g.external||g.sharedEmitDoneFor!==g.external){for(const v of[...g.seen.entries()].reverse())flattenRef(v[0]);if("openapi-3.0"!==g.target)for(const v of g.seen.entries())compactTypeUnion(v[1].def??v[1].schema);for(const v of g.deferred)v();if(g.intersections.length){const v=new Map;for(const L of g.seen.values())for(const g of[L.schema,L.def]){const L=g?.allOf;if(!Array.isArray(L))continue;const R=v.get(L);R?R.push(g):v.set(L,[g])}for(const L of g.intersections)for(const g of v.get(L)??[])foldIntersection(g)}}const R={};if("draft-2020-12"===g.target?R.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===g.target?R.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===g.target?R.$schema="http://json-schema.org/draft-04/schema#":g.target,g.external?.uri){const L=g.external.registry.get(v)?.id;if(!L)throw new Error("Schema is missing an `id` property");R.$id=g.external.uri(L)}assignProps(R,L.defId?L.schema:L.def??L.schema);const W=g.metadataRegistry.get(v)?.id;void 0!==W&&R.id===W&&delete R.id;const ie=g.external?.defs??{};if(!g.external||g.sharedEmitDoneFor!==g.external)for(const v of g.seen.entries()){const g=v[1];g.def&&g.defId&&(g.def.id===g.defId&&delete g.def.id,assignProp(ie,g.defId,g.def))}g.external&&(g.sharedEmitDoneFor=g.external),g.external||Object.keys(ie).length>0&&("draft-2020-12"===g.target?R.$defs=ie:R.definitions=ie);try{const L=JSON.parse(JSON.stringify(R));return Object.defineProperty(L,"~standard",{value:{...v["~standard"],jsonSchema:{input:createStandardJSONSchemaMethod(v,"input",g.processors),output:createStandardJSONSchemaMethod(v,"output",g.processors)}},enumerable:!1,writable:!1}),L}catch(g){throw new Error("Error converting schema to JSON.")}}function isTransforming(g,v){const L=v??{seen:new Set};if(L.seen.has(g))return!1;L.seen.add(g);const R=g._zod.def;if("transform"===R.type)return!0;if("array"===R.type)return isTransforming(R.element,L);if("set"===R.type)return isTransforming(R.valueType,L);if("lazy"===R.type)return isTransforming(R.getter(),L);if("promise"===R.type||"optional"===R.type||"nonoptional"===R.type||"nullable"===R.type||"readonly"===R.type||"default"===R.type||"prefault"===R.type||"catch"===R.type)return isTransforming(R.innerType,L);if("intersection"===R.type)return isTransforming(R.left,L)||isTransforming(R.right,L);if("record"===R.type||"map"===R.type)return isTransforming(R.keyType,L)||isTransforming(R.valueType,L);if("pipe"===R.type)return!!g._zod.traits.has("$ZodCodec")||(isTransforming(R.in,L)||isTransforming(R.out,L));if("object"===R.type){for(const g in R.shape)if(isTransforming(R.shape[g],L))return!0;return!1}if("union"===R.type){for(const g of R.options)if(isTransforming(g,L))return!0;return!1}if("tuple"===R.type){for(const g of R.items)if(isTransforming(g,L))return!0;return!(!R.rest||!isTransforming(R.rest,L))}return!1}const createToJSONSchemaMethod=(g,v={})=>L=>{const R=initializeContext({...L,processors:v});return processSchema(g,R),extractDefs(R,g),finalize(R,g)},createStandardJSONSchemaMethod=(g,v,L={})=>R=>{const{libraryOptions:W,target:ie}=R??{},ce=initializeContext({...W??{},target:ie,io:v,processors:L});return processSchema(g,ce),extractDefs(ce,g),finalize(ce,g)},narrowMin=(g,v,L)=>{(void 0===g[v]||L>g[v])&&(g[v]=L)},narrowMax=(g,v,L)=>{(void 0===g[v]||L<g[v])&&(g[v]=L)},narrowBoth=(g,v)=>{narrowMin(g,"minimum",v),narrowMax(g,"maximum",v)},addDivisor=(g,v)=>{g.multipleOf??(g.multipleOf=[]),g.multipleOf.includes(v)||g.multipleOf.push(v)},addPattern=(g,v)=>{g.patterns??(g.patterns=new Set),g.patterns.add(v)},intersectMime=(g,v)=>{g.mime=g.mime?g.mime.filter(g=>v.includes(g)):[...v]},setFormat=(g,v)=>{g.format=v,v.includes("int")&&(g.isInt=!0)},minContributor=(g,v)=>narrowMin(g,"minimum",v.minimum),maxContributor=(g,v)=>narrowMax(g,"maximum",v.maximum),formatContributor=g=>(v,L)=>{setFormat(v,L.format);const[R,W]=g[L.format];narrowMin(v,"minimum",R),narrowMax(v,"maximum",W)},contributors={greater_than:(g,v)=>narrowMin(g,v.inclusive?"minimum":"exclusiveMinimum",v.value),less_than:(g,v)=>narrowMax(g,v.inclusive?"maximum":"exclusiveMaximum",v.value),multiple_of:(g,v)=>addDivisor(g,v.value),number_format:formatContributor(NUMBER_FORMAT_RANGES),bigint_format:formatContributor(BIGINT_FORMAT_RANGES),min_length:minContributor,max_length:maxContributor,length_equals:(g,v)=>narrowBoth(g,v.length),min_size:minContributor,max_size:maxContributor,size_equals:(g,v)=>narrowBoth(g,v.size),string_format:(g,v)=>{setFormat(g,v.format),v.pattern&&addPattern(g,v.pattern),"base64"!==v.format&&"base64url"!==v.format||(g.contentEncoding=v.format),(v.local||-1===v.precision)&&(g.laxFormat=!0)},mime_type:(g,v)=>intersectMime(g,v.mime)};function aggregateChecks(g){const v={},L=g._zod.def,R=g._zod.traits.has("$ZodCheck")?[g,...L.checks??[]]:L.checks??[];for(const g of R)contributors[g._zod.def.check]?.(v,g._zod.def);const W=g._zod.bag;void 0!==W.minimum&&narrowMin(v,"minimum",W.minimum),void 0!==W.exclusiveMinimum&&narrowMin(v,"exclusiveMinimum",W.exclusiveMinimum),void 0!==W.maximum&&narrowMax(v,"maximum",W.maximum),void 0!==W.exclusiveMaximum&&narrowMax(v,"exclusiveMaximum",W.exclusiveMaximum),void 0!==W.multipleOf&&addDivisor(v,W.multipleOf),void 0!==W.format&&(v.format??(v.format=W.format),W.format.includes("int")&&(v.isInt=!0)),W.mime&&intersectMime(v,W.mime);for(const g of W.patterns??[])addPattern(v,g);return v}const formatMap={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},exactPatterns=new Map([[base64Charset,base64$1],[base64urlCharset,base64url$1]]),exactPattern=g=>exactPatterns.get(g)??g,stringProcessor=(g,v,L,R)=>{const W=L;W.type="string";const{minimum:ie,maximum:ce,format:le,patterns:ue,contentEncoding:me,laxFormat:ge}=aggregateChecks(g);if("number"==typeof ie&&(W.minLength=ie),"number"==typeof ce&&(W.maxLength=ce),le&&(W.format=formatMap[le]??le,""===W.format&&delete W.format,("time"===le||ge)&&delete W.format),me&&(W.contentEncoding=me),ue&&ue.size>0){const g=[...ue].map(exactPattern);1===g.length?W.pattern=g[0].source:g.length>1&&(W.allOf=[...g.map(g=>({..."draft-07"===v.target||"draft-04"===v.target||"openapi-3.0"===v.target?{type:"string"}:{},pattern:g.source}))])}},numberProcessor=(g,v,L,R)=>{const W=L,{minimum:ie,maximum:ce,multipleOf:le,exclusiveMaximum:ue,exclusiveMinimum:me,isInt:ge}=aggregateChecks(g);W.type=ge?"integer":"number";const ve="number"==typeof me&&me>=(ie??Number.NEGATIVE_INFINITY),xe="number"==typeof ue&&ue<=(ce??Number.POSITIVE_INFINITY),_e="draft-04"===v.target||"openapi-3.0"===v.target;if(ve?_e?(W.minimum=me,W.exclusiveMinimum=!0):W.exclusiveMinimum=me:"number"==typeof ie&&(W.minimum=ie),xe?_e?(W.maximum=ue,W.exclusiveMaximum=!0):W.exclusiveMaximum=ue:"number"==typeof ce&&(W.maximum=ce),le){const L=new Set;for(const ie of le)Number.isFinite(ie)&&0!==ie?L.add(Math.abs(ie)):handleUnrepresentable(g,v,W,R,`A multipleOf divisor of ${ie} cannot be represented in JSON Schema`);const[ie,...ce]=L;void 0!==ie&&(W.multipleOf=ie),ce.length&&(W.allOf=[...W.allOf??[],...ce.map(g=>({multipleOf:g}))])}},booleanProcessor=(g,v,L,R)=>{L.type="boolean"},bigintProcessor=(g,v,L,R)=>{handleUnrepresentable(g,v,L,R,"BigInt cannot be represented in JSON Schema")},symbolProcessor=(g,v,L,R)=>{handleUnrepresentable(g,v,L,R,"Symbols cannot be represented in JSON Schema")},nullProcessor=(g,v,L,R)=>{"openapi-3.0"===v.target?(L.type="string",L.nullable=!0,L.enum=[null]):L.type="null"},undefinedProcessor=(g,v,L,R)=>{handleUnrepresentable(g,v,L,R,"Undefined cannot be represented in JSON Schema")},voidProcessor=(g,v,L,R)=>{handleUnrepresentable(g,v,L,R,"Void cannot be represented in JSON Schema")},neverProcessor=(g,v,L,R)=>{L.not={}},anyProcessor=(g,v,L,R)=>{},unknownProcessor=(g,v,L,R)=>{},dateProcessor=(g,v,L,R)=>{handleUnrepresentable(g,v,L,R,"Date cannot be represented in JSON Schema")},enumProcessor=(g,v,L,R)=>{const W=getEnumValues(g._zod.def.entries);0!==W.length?(W.every(g=>"number"==typeof g)&&(L.type="number"),W.every(g=>"string"==typeof g)&&(L.type="string"),L.enum=W):L.not={}},literalProcessor=(g,v,L,R)=>{const W=g._zod.def;if(0===W.values.length)return void(L.not={});const ie=[];for(const ce of W.values)if(void 0===ce){if(handleUnrepresentable(g,v,L,R,"Literal `undefined` cannot be represented in JSON Schema"))return}else if("bigint"==typeof ce){if(handleUnrepresentable(g,v,L,R,"BigInt literals cannot be represented in JSON Schema"))return;ie.push(Number(ce))}else ie.push(ce);if(0===ie.length);else if(1===ie.length){const g=ie[0];L.type=null===g?"null":typeof g,"draft-04"===v.target||"openapi-3.0"===v.target?L.enum=[g]:L.const=g}else ie.every(g=>"number"==typeof g)&&(L.type="number"),ie.every(g=>"string"==typeof g)&&(L.type="string"),ie.every(g=>"boolean"==typeof g)&&(L.type="boolean"),ie.every(g=>null===g)&&(L.type="null"),L.enum=ie},nanProcessor=(g,v,L,R)=>{handleUnrepresentable(g,v,L,R,"NaN cannot be represented in JSON Schema")},templateLiteralProcessor=(g,v,L,R)=>{const W=L,ie=g._zod.pattern;if(!ie)throw new Error("Pattern not found in template literal");W.type="string",W.pattern=ie.source},fileProcessor=(g,v,L,R)=>{const W=L;W.type="string",W.format="binary",W.contentEncoding="binary";const{minimum:ie,maximum:ce,mime:le}=aggregateChecks(g);void 0!==ie&&(W.minLength=ie),void 0!==ce&&(W.maxLength=ce),le&&(0===le.length?W.not={}:1===le.length?W.contentMediaType=le[0]:W.anyOf=le.map(g=>({contentMediaType:g})))},successProcessor=(g,v,L,R)=>{L.type="boolean"},customProcessor=(g,v,L,R)=>{handleUnrepresentable(g,v,L,R,"Custom types cannot be represented in JSON Schema")},functionProcessor=(g,v,L,R)=>{handleUnrepresentable(g,v,L,R,"Function types cannot be represented in JSON Schema")},transformProcessor=(g,v,L,R)=>{handleUnrepresentable(g,v,L,R,"Transforms cannot be represented in JSON Schema")},mapProcessor=(g,v,L,R)=>{handleUnrepresentable(g,v,L,R,"Map cannot be represented in JSON Schema")},setProcessor=(g,v,L,R)=>{handleUnrepresentable(g,v,L,R,"Set cannot be represented in JSON Schema")},arrayProcessor=(g,v,L,R)=>{const W=L,ie=g._zod.def,{minimum:ce,maximum:le}=aggregateChecks(g);"number"==typeof ce&&(W.minItems=ce),"number"==typeof le&&(W.maxItems=le),W.type="array",W.items=processSchema(ie.element,v,{...R,path:[...R.path,"items"]})};function inputOptin(g){const v=g._zod.def;return"pipe"===v.type&&v.in._zod.traits.has("$ZodTransform")?inputOptin(v.out):"catch"===v.type?inputOptin(v.innerType):g._zod.optin}const objectProcessor=(g,v,L,R)=>{const W=L,ie=g._zod.def,ce=ie.shape;if(Object.getOwnPropertySymbols(ce).length&&handleUnrepresentable(g,v,W,R,"Symbol keys cannot be represented in JSON Schema"))return;W.type="object",W.properties={};for(const g in ce)assignProp(W.properties,g,processSchema(ce[g],v,{...R,path:[...R.path,"properties",g]}));const le=new Set(Object.keys(ce)),ue=new Set([...le].filter(g=>{const L=ie.shape[g];return"input"===v.io?void 0===inputOptin(L):void 0===L._zod.optout}));ue.size>0&&(W.required=Array.from(ue)),"never"===ie.catchall?._zod.def.type?W.additionalProperties=!1:ie.catchall?ie.catchall&&(W.additionalProperties=processSchema(ie.catchall,v,{...R,path:[...R.path,"additionalProperties"]})):"output"===v.io&&(W.additionalProperties=!1)},propertiesProcessor=(g,v,L,R)=>{const W=L,ie=g._zod.def;if(Object.getOwnPropertySymbols(ie.shape).length&&handleUnrepresentable(g,v,W,R,"Symbol keys cannot be represented in JSON Schema"))return;if("output"===v.io)for(const L in ie.shape)if(isTransforming(ie.shape[L])&&handleUnrepresentable(g,v,W,R,`z.properties() returns its input, so the output of a transforming schema at key "${L}" cannot be represented in JSON Schema`))return;W.type="object",W.properties={};for(const g in ie.shape)assignProp(W.properties,g,processSchema(ie.shape[g],v,{...R,path:[...R.path,"properties",g]}));const ce=Object.keys(ie.shape).filter(g=>void 0===inputOptin(ie.shape[g]));ce.length>0&&(W.required=ce)},unionProcessor=(g,v,L,R)=>{const W=g._zod.def,ie=!1===W.inclusive,ce=W.options.map((g,L)=>processSchema(g,v,{...R,path:[...R.path,ie?"oneOf":"anyOf",L]}));ie?L.oneOf=ce:L.anyOf=ce},intersectionProcessor=(g,v,L,R)=>{const W=g._zod.def,ie=processSchema(W.left,v,{...R,path:[...R.path,"allOf",0]}),ce=processSchema(W.right,v,{...R,path:[...R.path,"allOf",1]}),isSimpleIntersection=g=>"allOf"in g&&1===Object.keys(g).length,le=[...isSimpleIntersection(ie)?ie.allOf:[ie],...isSimpleIntersection(ce)?ce.allOf:[ce]];L.allOf=le,v.intersections.push(le)},tupleProcessor=(g,v,L,R)=>{const W=L,ie=g._zod.def;W.type="array";const ce="draft-2020-12"===v.target?"prefixItems":"items",le="draft-2020-12"===v.target||"openapi-3.0"===v.target?"items":"additionalItems",ue=ie.items.map((g,L)=>processSchema(g,v,{...R,path:[...R.path,ce,L]})),me=ie.rest?processSchema(ie.rest,v,{...R,path:[...R.path,le,..."openapi-3.0"===v.target?[ie.items.length]:[]]}):null;let ge=ie.items.length;for(;ge>0;){const g=ie.items[ge-1];if(!("input"===v.io?void 0!==inputOptin(g):"optional"===g._zod.optout))break;ge--}const ve=ie.items.length,xe=!ie.rest;"draft-2020-12"===v.target?(W.prefixItems=ue,xe?W.items=!1:me&&(W.items=me),ge>0&&(W.minItems=ge),xe&&(W.maxItems=ve)):"openapi-3.0"===v.target?(W.items={anyOf:ue},me&&W.items.anyOf.push(me),ge>0&&(W.minItems=ge),xe&&(W.maxItems=ve)):(W.items=ue,xe?W.additionalItems=!1:me&&(W.additionalItems=me),ge>0&&(W.minItems=ge),xe&&(W.maxItems=ve));const{minimum:_e,maximum:ke}=aggregateChecks(g);"number"==typeof _e&&(W.minItems=_e),"number"==typeof ke&&(W.maxItems=ke)};function stringifyKeyNames(g,v,L){if(v.$ref){if(L.has(v))return v;L.add(v);const R=g.get(v)?.def;if(!R)return v;const W=stringifyKeyNames(g,R,L);return W===R?v:W}for(const R of["anyOf","oneOf"]){const W=v[R];if(!Array.isArray(W))continue;const ie=W.map(v=>stringifyKeyNames(g,v,L));ie.some((g,v)=>g!==W[v])&&(v={...v,[R]:ie})}const R=Array.isArray(v.type)?v.type:[v.type],W=!R.includes("string")&&R.some(g=>"number"===g||"integer"===g),ie=v.enum??(void 0!==v.const?[v.const]:void 0);if(!W&&!ie?.some(g=>"number"==typeof g))return v;const{minimum:ce,maximum:le,exclusiveMinimum:ue,exclusiveMaximum:me,multipleOf:ge,format:ve,id:xe,..._e}=v;return _e.enum?_e.enum=_e.enum.map(g=>"number"==typeof g?String(g):g):"number"==typeof _e.const&&(_e.const=String(_e.const)),W?(_e.type="string",ie||(_e.pattern=(R.includes("number")?number$2:integer).source),_e):_e}const pendingRecords=new WeakMap;function rewriteKeyNames(g){const v=new Map;for(const L of g.seen.values())L.def&&!v.has(L.schema)&&v.set(L.schema,L);const L=new Map;for(const R of pendingRecords.get(g)??[]){const W=g.seen.get(R),ie=(W?.def??W?.schema)?.propertyNames;if(!ie||!0===ie||L.has(ie))continue;const ce=stringifyKeyNames(v,ie,new Set);ce!==ie&&L.set(ie,ce)}if(L.size)for(const v of g.seen.values())for(const g of[v.schema,v.def]){const v=g&&L.get(g.propertyNames);v&&(g.propertyNames=v)}}const recordProcessor=(g,v,L,R)=>{const W=L,ie=g._zod.def;W.type="object";const ce=ie.keyType,le=aggregateChecks(ce).patterns;if("loose"===ie.mode&&le&&le.size>0){const g=processSchema(ie.valueType,v,{...R,path:[...R.path,"patternProperties","*"]});W.patternProperties={};for(const v of le)assignProp(W.patternProperties,exactPattern(v).source,g)}else{if("draft-07"===v.target||"draft-2020-12"===v.target){W.propertyNames=processSchema(ie.keyType,v,{...R,path:[...R.path,"propertyNames"]});let L=pendingRecords.get(v);L||(L=[],pendingRecords.set(v,L),v.deferred.push(()=>rewriteKeyNames(v))),L.push(g)}W.additionalProperties=processSchema(ie.valueType,v,{...R,path:[...R.path,"additionalProperties"]})}const ue=ce._zod.values,me="input"===v.io&&void 0!==inputOptin(ie.valueType);if(ue&&!ie.partial&&!me){const g=[...ue].filter(g=>"string"==typeof g||"number"==typeof g);g.length>0&&(W.required=g.map(String))}},nullableProcessor=(g,v,L,R)=>{const W=g._zod.def,ie=processSchema(W.innerType,v,R),ce=v.seen.get(g);"openapi-3.0"===v.target?(ce.ref=W.innerType,L.nullable=!0):L.anyOf=[ie,{type:"null"}]},nonoptionalProcessor=(g,v,L,R)=>{const W=g._zod.def;processSchema(W.innerType,v,R);v.seen.get(g).ref=W.innerType},UNREPRESENTABLE_DEFAULT=Symbol();function serializeDefaultValue(g,v,L,R,W){let ie=!1;const ce=JSON.stringify(g,(g,v)=>"bigint"!=typeof v?v:(ie=!0,null));return ie?(handleUnrepresentable(v,L,R,W,"BigInt defaults cannot be represented in JSON Schema"),UNREPRESENTABLE_DEFAULT):JSON.parse(ce)}const defaultProcessor=(g,v,L,R)=>{const W=g._zod.def;processSchema(W.innerType,v,R);v.seen.get(g).ref=W.innerType;const ie=serializeDefaultValue(W.defaultValue,g,v,L,R);ie!==UNREPRESENTABLE_DEFAULT&&(L.default=ie)},prefaultProcessor=(g,v,L,R)=>{const W=g._zod.def;processSchema(W.innerType,v,R);if(v.seen.get(g).ref=W.innerType,"input"!==v.io)return;const ie=serializeDefaultValue(W.defaultValue,g,v,L,R);ie!==UNREPRESENTABLE_DEFAULT&&(L._prefault=ie)},catchProcessor=(g,v,L,R)=>{const W=g._zod.def;processSchema(W.innerType,v,R);let ie;v.seen.get(g).ref=W.innerType;try{ie=W.catchValue(void 0)}catch{return void handleUnrepresentable(g,v,L,R,"Dynamic catch values are not supported in JSON Schema")}L.default=ie},pipeProcessor=(g,v,L,R)=>{const W=g._zod.def,ie=W.in._zod.traits.has("$ZodTransform"),ce="input"===v.io?ie?W.out:W.in:W.out;processSchema(ce,v,R);v.seen.get(g).ref=ce},readonlyProcessor=(g,v,L,R)=>{const W=g._zod.def;processSchema(W.innerType,v,R);v.seen.get(g).ref=W.innerType,L.readOnly=!0},promiseProcessor=(g,v,L,R)=>{const W=g._zod.def;processSchema(W.innerType,v,R);v.seen.get(g).ref=W.innerType},optionalProcessor=(g,v,L,R)=>{const W=g._zod.def;processSchema(W.innerType,v,R);v.seen.get(g).ref=W.innerType},lazyProcessor=(g,v,L,R)=>{const W=g._zod.innerType;processSchema(W,v,R);v.seen.get(g).ref=W},allProcessors={string:stringProcessor,number:numberProcessor,boolean:booleanProcessor,bigint:bigintProcessor,symbol:symbolProcessor,null:nullProcessor,undefined:undefinedProcessor,void:voidProcessor,never:neverProcessor,any:anyProcessor,unknown:unknownProcessor,date:dateProcessor,enum:enumProcessor,literal:literalProcessor,nan:nanProcessor,template_literal:templateLiteralProcessor,file:fileProcessor,success:successProcessor,custom:customProcessor,properties:propertiesProcessor,function:functionProcessor,transform:transformProcessor,map:mapProcessor,set:setProcessor,array:arrayProcessor,object:objectProcessor,union:unionProcessor,intersection:intersectionProcessor,tuple:tupleProcessor,record:recordProcessor,nullable:nullableProcessor,nonoptional:nonoptionalProcessor,default:defaultProcessor,prefault:prefaultProcessor,catch:catchProcessor,pipe:pipeProcessor,readonly:readonlyProcessor,promise:promiseProcessor,optional:optionalProcessor,lazy:lazyProcessor};function toJSONSchema(g,v){if("_idmap"in g){const L=g,R=initializeContext({...v,processors:allProcessors}),W={};for(const g of L._idmap.entries()){const[v,L]=g;processSchema(L,R)}const ie={},ce={registry:L,uri:v?.uri,defs:W};R.external=ce;for(const g of L._idmap.entries()){const[v,L]=g;extractDefs(R,L),assignProp(ie,v,finalize(R,L))}if(Object.keys(W).length>0){const g="draft-2020-12"===R.target?"$defs":"definitions";ie.__shared={[g]:W}}return{schemas:ie}}const L=initializeContext({...v,processors:allProcessors});return processSchema(g,L),extractDefs(L,g),finalize(L,g)}class JSONSchemaGenerator{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(g){this.ctx.counter=g}get seen(){return this.ctx.seen}constructor(g){let v=g?.target??"draft-2020-12";"draft-4"===v&&(v="draft-04"),"draft-7"===v&&(v="draft-07"),this.ctx=initializeContext({processors:allProcessors,target:v,...g?.metadata&&{metadata:g.metadata},...g?.unrepresentable&&{unrepresentable:g.unrepresentable},...g?.override&&{override:g.override},...g?.io&&{io:g.io}})}process(g,v={path:[],schemaPath:[]}){return processSchema(g,this.ctx,v)}emit(g,v){v&&(v.cycles&&(this.ctx.cycles=v.cycles),v.reused&&(this.ctx.reused=v.reused),v.external&&(this.ctx.external=v.external)),this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,extractDefs(this.ctx,g);const L=finalize(this.ctx,g),{"~standard":R,...W}=L;return W}}var jsonSchema=Object.freeze({__proto__:null}),index=Object.freeze({__proto__:null,$ZodAny:$ZodAny,$ZodArray:$ZodArray,$ZodAsyncError:$ZodAsyncError,$ZodBase64:$ZodBase64,$ZodBase64URL:$ZodBase64URL,$ZodBigInt:$ZodBigInt,$ZodBigIntFormat:$ZodBigIntFormat,$ZodBoolean:$ZodBoolean,$ZodCIDRv4:$ZodCIDRv4,$ZodCIDRv6:$ZodCIDRv6,$ZodCUID:$ZodCUID,$ZodCUID2:$ZodCUID2,$ZodCatch:$ZodCatch,$ZodCheck:$ZodCheck,$ZodCheckBigIntFormat:$ZodCheckBigIntFormat,$ZodCheckEndsWith:$ZodCheckEndsWith,$ZodCheckGreaterThan:$ZodCheckGreaterThan,$ZodCheckIncludes:$ZodCheckIncludes,$ZodCheckLengthEquals:$ZodCheckLengthEquals,$ZodCheckLessThan:$ZodCheckLessThan,$ZodCheckLowerCase:$ZodCheckLowerCase,$ZodCheckMaxLength:$ZodCheckMaxLength,$ZodCheckMaxSize:$ZodCheckMaxSize,$ZodCheckMimeType:$ZodCheckMimeType,$ZodCheckMinLength:$ZodCheckMinLength,$ZodCheckMinSize:$ZodCheckMinSize,$ZodCheckMultipleOf:$ZodCheckMultipleOf,$ZodCheckNumberFormat:$ZodCheckNumberFormat,$ZodCheckOverwrite:$ZodCheckOverwrite,$ZodCheckProperty:$ZodCheckProperty,$ZodCheckRegex:$ZodCheckRegex,$ZodCheckSizeEquals:$ZodCheckSizeEquals,$ZodCheckStartsWith:$ZodCheckStartsWith,$ZodCheckStringFormat:$ZodCheckStringFormat,$ZodCheckUpperCase:$ZodCheckUpperCase,$ZodCodec:$ZodCodec,$ZodCreditCard:$ZodCreditCard,$ZodCustom:$ZodCustom,$ZodCustomStringFormat:$ZodCustomStringFormat,$ZodCyclicError:$ZodCyclicError,$ZodDate:$ZodDate,$ZodDefault:$ZodDefault,$ZodDiscriminatedUnion:$ZodDiscriminatedUnion,$ZodE164:$ZodE164,$ZodEmail:$ZodEmail,$ZodEmoji:$ZodEmoji,$ZodEncodeError:$ZodEncodeError,$ZodEnum:$ZodEnum,$ZodError:$ZodError,$ZodExactOptional:$ZodExactOptional,$ZodFile:$ZodFile,$ZodFunction:$ZodFunction,$ZodGUID:$ZodGUID,$ZodIBAN:$ZodIBAN,$ZodIPv4:$ZodIPv4,$ZodIPv6:$ZodIPv6,$ZodISODate:$ZodISODate,$ZodISODateTime:$ZodISODateTime,$ZodISODuration:$ZodISODuration,$ZodISOTime:$ZodISOTime,$ZodIntersection:$ZodIntersection,$ZodJWT:$ZodJWT,$ZodKSUID:$ZodKSUID,$ZodLazy:$ZodLazy,$ZodLiteral:$ZodLiteral,$ZodMAC:$ZodMAC,$ZodMap:$ZodMap,$ZodNaN:$ZodNaN,$ZodNanoID:$ZodNanoID,$ZodNever:$ZodNever,$ZodNonOptional:$ZodNonOptional,$ZodNull:$ZodNull,$ZodNullable:$ZodNullable,$ZodNumber:$ZodNumber,$ZodNumberFormat:$ZodNumberFormat,$ZodObject:$ZodObject,$ZodObjectJIT:$ZodObjectJIT,$ZodOptional:$ZodOptional,$ZodPipe:$ZodPipe,$ZodPrefault:$ZodPrefault,$ZodPreprocess:$ZodPreprocess,$ZodPromise:$ZodPromise,$ZodProperties:$ZodProperties,$ZodReadonly:$ZodReadonly,$ZodRealError:$ZodRealError,$ZodRecord:$ZodRecord,$ZodRegistry:$ZodRegistry,$ZodSet:$ZodSet,$ZodString:$ZodString,$ZodStringFormat:$ZodStringFormat,$ZodSuccess:$ZodSuccess,$ZodSymbol:$ZodSymbol,$ZodTemplateLiteral:$ZodTemplateLiteral,$ZodTransform:$ZodTransform,$ZodTuple:$ZodTuple,$ZodType:$ZodType,$ZodULID:$ZodULID,$ZodURL:$ZodURL,$ZodUUID:$ZodUUID,$ZodUndefined:$ZodUndefined,$ZodUnion:$ZodUnion,$ZodUnknown:$ZodUnknown,$ZodVoid:$ZodVoid,$ZodXID:$ZodXID,$ZodXor:$ZodXor,$brand:$brand,$constructor:$constructor,$input:$input,$output:$output,Doc:Doc,INVALID:INVALID,JSONSchema:jsonSchema,JSONSchemaGenerator:JSONSchemaGenerator,NEVER:NEVER,TimePrecision:TimePrecision,URL_BAD_FORMAT:URL_BAD_FORMAT,URL_UNPARSEABLE:URL_UNPARSEABLE,ZodCompileAsyncError:ZodCompileAsyncError,ZodCompileUnsupportedError:ZodCompileUnsupportedError,_any:_any,_array:_array,_base64:_base64,_base64url:_base64url,_bigint:_bigint,_boolean:_boolean,_catch:_catch$1,_check:_check,_cidrv4:_cidrv4,_cidrv6:_cidrv6,_coercedBigint:_coercedBigint,_coercedBoolean:_coercedBoolean,_coercedDate:_coercedDate,_coercedNumber:_coercedNumber,_coercedString:_coercedString,_creditCard:_creditCard,_cuid:_cuid,_cuid2:_cuid2,_custom:_custom,_date:_date,_decode:_decode,_decodeAsync:_decodeAsync,_default:_default$1,_discriminatedUnion:_discriminatedUnion,_e164:_e164,_email:_email,_emoji:_emoji,_encode:_encode,_encodeAsync:_encodeAsync,_endsWith:_endsWith,_enum:_enum$1,_file:_file,_float32:_float32,_float64:_float64,_gt:_gt,_gte:_gte,_guid:_guid,_iban:_iban,_includes:_includes,_int:_int,_int32:_int32,_int64:_int64,_intersection:_intersection,_ipv4:_ipv4,_ipv6:_ipv6,_isoDate:_isoDate,_isoDateTime:_isoDateTime,_isoDuration:_isoDuration,_isoTime:_isoTime,_jwt:_jwt,_ksuid:_ksuid,_lazy:_lazy,_length:_length,_literal:_literal,_lowercase:_lowercase,_lt:_lt,_lte:_lte,_mac:_mac,_map:_map,_max:_lte,_maxLength:_maxLength,_maxSize:_maxSize,_mime:_mime,_min:_gte,_minLength:_minLength,_minSize:_minSize,_multipleOf:_multipleOf,_nan:_nan,_nanoid:_nanoid,_nativeEnum:_nativeEnum,_negative:_negative,_never:_never,_nonnegative:_nonnegative,_nonoptional:_nonoptional,_nonpositive:_nonpositive,_normalize:_normalize,_null:_null$1,_nullable:_nullable,_number:_number,_optional:_optional,_overwrite:_overwrite,_parse:_parse,_parseAsync:_parseAsync,_pipe:_pipe,_positive:_positive,_promise:_promise,_properties:_properties,_property:_property,_readonly:_readonly,_record:_record,_refine:_refine,_regex:_regex,_safeDecode:_safeDecode,_safeDecodeAsync:_safeDecodeAsync,_safeEncode:_safeEncode,_safeEncodeAsync:_safeEncodeAsync,_safeParse:_safeParse,_safeParseAsync:_safeParseAsync,_set:_set,_size:_size,_slugify:_slugify,_startsWith:_startsWith,_string:_string,_stringFormat:_stringFormat,_stringbool:_stringbool,_success:_success,_superRefine:_superRefine,_symbol:_symbol,_templateLiteral:_templateLiteral,_toLowerCase:_toLowerCase,_toUpperCase:_toUpperCase,_transform:_transform,_trim:_trim,_tuple:_tuple,_uint32:_uint32,_uint64:_uint64,_ulid:_ulid,_undefined:_undefined$1,_union:_union,_unknown:_unknown,_uppercase:_uppercase,_url:_url,_uuid:_uuid,_uuidv4:_uuidv4,_uuidv6:_uuidv6,_uuidv7:_uuidv7,_void:_void$1,_xid:_xid,_xor:_xor,base64Charset:base64Charset,base64urlCharset:base64urlCharset,clone:clone,compile:compile,compileFn:compileFn,config:config,createStandardJSONSchemaMethod:createStandardJSONSchemaMethod,createToJSONSchemaMethod:createToJSONSchemaMethod,decode:decode$1,decodeAsync:decodeAsync$1,describe:describe$1,encode:encode$1,encodeAsync:encodeAsync$1,extractDefs:extractDefs,finalize:finalize,flattenError:flattenError,formatError:formatError,getDiscriminatedOption:getDiscriminatedOption,globalConfig:globalConfig,globalRegistry:globalRegistry,handleUnrepresentable:handleUnrepresentable,initializeContext:initializeContext,isBackEdge:isBackEdge,isRecursiveSchema:isRecursiveSchema,isTransforming:isTransforming,isValidBase64:isValidBase64,isValidBase64URL:isValidBase64URL,isValidCIDRv6:isValidCIDRv6,isValidCreditCard:isValidCreditCard,isValidIBAN:isValidIBAN,isValidIPv6:isValidIPv6,isValidJWT:isValidJWT,locales:index$1,memoizer:memoizer,mergeValues:mergeValues,meta:meta$1,parse:parse$1,parseAsync:parseAsync$1,parseURLObject:parseURLObject,prettifyError:prettifyError,process:processSchema,processSchema:processSchema,regexes:regexes,registry:registry,safeDecode:safeDecode$1,safeDecodeAsync:safeDecodeAsync$1,safeEncode:safeEncode$1,safeEncodeAsync:safeEncodeAsync$1,safeParse:safeParse$1,safeParseAsync:safeParseAsync$1,standardProps:standardProps,stripTabAndNewline:stripTabAndNewline,toDotPath:toDotPath,toJSONSchema:toJSONSchema,toZod:toZod,treeifyError:treeifyError,urlHostnameOk:urlHostnameOk,urlProtocolOk:urlProtocolOk,util:util,validate:validate,validateAsync:validateAsync$1,version:version,withParser:withParser}),_checks=Object.freeze({__proto__:null,endsWith:_endsWith,gt:_gt,gte:_gte,includes:_includes,length:_length,lowercase:_lowercase,lt:_lt,lte:_lte,maxLength:_maxLength,maxSize:_maxSize,mime:_mime,minLength:_minLength,minSize:_minSize,multipleOf:_multipleOf,negative:_negative,nonnegative:_nonnegative,nonpositive:_nonpositive,normalize:_normalize,overwrite:_overwrite,positive:_positive,property:_property,regex:_regex,size:_size,slugify:_slugify,startsWith:_startsWith,toLowerCase:_toLowerCase,toUpperCase:_toUpperCase,trim:_trim,uppercase:_uppercase});const _installedErrorProtos=new WeakSet([Object.prototype,Error.prototype]);function _lazyMethod(g,v,L){Object.defineProperty(g,v,{configurable:!0,enumerable:!1,get(){const g=L(this);return Object.defineProperty(this,v,{value:g,configurable:!0,writable:!0}),g},set(g){Object.defineProperty(this,v,{value:g,configurable:!0,writable:!0})}})}const initializer=(g,v)=>{$ZodError.init(g,v),g.name="ZodError";const L=Object.getPrototypeOf(g);_installedErrorProtos.has(L)||(_installedErrorProtos.add(L),_lazyMethod(L,"format",g=>v=>formatError(g,v)),_lazyMethod(L,"flatten",g=>v=>flattenError(g,v)),_lazyMethod(L,"addIssue",g=>v=>{g.issues.push(v),g.message=JSON.stringify(g.issues,jsonStringifyReplacer,2)}),_lazyMethod(L,"addIssues",g=>v=>{g.issues.push(...v),g.message=JSON.stringify(g.issues,jsonStringifyReplacer,2)}),Object.defineProperty(L,"isEmpty",{configurable:!0,enumerable:!1,get(){return 0===this.issues.length}}))},ZodError=$constructor("ZodError",initializer),ZodRealError=$constructor("ZodError",initializer,void 0,{Parent:Error}),parse=_parse(ZodRealError),parseAsync=_parseAsync(ZodRealError),safeParse=_safeParse(ZodRealError),safeParseAsync=_safeParseAsync(ZodRealError),encode=_encode(ZodRealError),decode=_decode(ZodRealError),encodeAsync=_encodeAsync(ZodRealError),decodeAsync=_decodeAsync(ZodRealError),safeEncode=_safeEncode(ZodRealError),safeDecode=_safeDecode(ZodRealError),safeEncodeAsync=_safeEncodeAsync(ZodRealError),safeDecodeAsync=_safeDecodeAsync(ZodRealError);function _ensureDefaultLocale(){globalConfig.localeError||config(en())}function _ensureDefaultMemoizer(){globalConfig.memoizer||config({memoizer:memoizer()})}const ZodType=$constructor("ZodType",(g,v)=>(_ensureDefaultLocale(),$ZodType.init(g,v),g.def=v,g.type=v.type,g),{check(...g){const v=this.def;return this.clone(mergeDefs(v,{checks:[...v.checks??[],...g.map(g=>"function"==typeof g?{_zod:{check:g,def:{check:"custom"},onattach:[]}}:g)]}),{parent:!0})},with(...g){return this.check(...g)},clone(g,v){return clone(this,g,v)},brand(){return this},register(g,v){return g.add(this,v),this},refine(g,v){return this.check(refine(g,v))},superRefine(g,v){return this.check(superRefine(g,v))},overwrite(g){return this.check(_overwrite(g))},optional(){return optional(this)},exactOptional(){return exactOptional(this)},nullable(){return nullable(this)},nullish(){return optional(nullable(this))},nonoptional(g){return nonoptional(this,g)},array(){return array(this)},or(g){return union([this,g])},and(g){return intersection(this,g)},transform(g){return pipe(this,transform(g))},default(g){return _default(this,g)},prefault(g){return prefault(this,g)},catch(g){return _catch(this,g)},pipe(g){return pipe(this,g)},readonly(){return readonly(this)},describe(g){const v=this.clone();return globalRegistry.add(v,{description:g}),v},meta(...g){if(0===g.length)return globalRegistry.get(this);const v=this.clone();return globalRegistry.add(v,g[0]),v},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(g,...v){return 0===v.length?g(this):g(this,...v)},get"~standard"(){return hide(this,"~standard",{...standardProps(this),jsonSchema:{input:createStandardJSONSchemaMethod(this,"input"),output:createStandardJSONSchemaMethod(this,"output")}})},set"~standard"(g){own(this,"~standard",g)},parse:function _parse(g,v){return parse(this,g,v,{callee:_parse})},parseAsync:async function _parseAsync(g,v){return await parseAsync(this,g,v,{callee:_parseAsync})},safeParse(g,v){return safeParse(this,g,v)},async safeParseAsync(g,v){return safeParseAsync(this,g,v)},get spa(){return this?.safeParseAsync},set spa(g){own(this,"spa",g)},validate(g,v){return validate(this,g,v)},validateAsync(g,v){return validateAsync$1(this,g,v)},encode:function _encode(g,v){return encode(this,g,v,{callee:_encode})},decode:function _decode(g,v){return decode(this,g,v,{callee:_decode})},encodeAsync:async function _encodeAsync(g,v){return await encodeAsync(this,g,v,{callee:_encodeAsync})},decodeAsync:async function _decodeAsync(g,v){return await decodeAsync(this,g,v,{callee:_decodeAsync})},safeEncode(g,v){return safeEncode(this,g,v)},safeDecode(g,v){return safeDecode(this,g,v)},async safeEncodeAsync(g,v){return safeEncodeAsync(this,g,v)},async safeDecodeAsync(g,v){return safeDecodeAsync(this,g,v)},toJSONSchema(g){return createToJSONSchemaMethod(this,{})(g)},get description(){return globalRegistry.get(this)?.description},get _def(){return this._zod.def}}),_ZodString=$constructor("_ZodString",(g,v)=>{$ZodString.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,L,R)=>stringProcessor(g,v,L)},derived({format:g=>aggregateChecks(g).format??null,minLength:g=>aggregateChecks(g).minimum??null,maxLength:g=>aggregateChecks(g).maximum??null},{regex(...g){return this.check(_regex(...g))},includes(...g){return this.check(_includes(...g))},startsWith(...g){return this.check(_startsWith(...g))},endsWith(...g){return this.check(_endsWith(...g))},min(...g){return this.check(_minLength(...g))},max(...g){return this.check(_maxLength(...g))},length(...g){return this.check(_length(...g))},nonempty(...g){return this.check(_minLength(1,...g))},lowercase(g){return this.check(_lowercase(g))},uppercase(g){return this.check(_uppercase(g))},trim(){return this.check(_trim())},normalize(...g){return this.check(_normalize(...g))},toLowerCase(){return this.check(_toLowerCase())},toUpperCase(){return this.check(_toUpperCase())},slugify(){return this.check(_slugify())}})),ZodString=$constructor("ZodString",(g,v)=>{$ZodString.init(g,v),_ZodString.init(g,v)},{email(g){return this.check(_email(ZodEmail,g))},url(g){return this.check(_url(ZodURL,g))},jwt(g){return this.check(_jwt(ZodJWT,g))},emoji(g){return this.check(_emoji(ZodEmoji,g))},guid(g){return this.check(_guid(ZodGUID,g))},uuid(g){return this.check(_uuid(ZodUUID,g))},uuidv4(g){return this.check(_uuidv4(ZodUUID,g))},uuidv6(g){return this.check(_uuidv6(ZodUUID,g))},uuidv7(g){return this.check(_uuidv7(ZodUUID,g))},nanoid(g){return this.check(_nanoid(ZodNanoID,g))},cuid(g){return this.check(_cuid(ZodCUID,g))},cuid2(g){return this.check(_cuid2(ZodCUID2,g))},ulid(g){return this.check(_ulid(ZodULID,g))},base64(g){return this.check(_base64(ZodBase64,g))},base64url(g){return this.check(_base64url(ZodBase64URL,g))},xid(g){return this.check(_xid(ZodXID,g))},ksuid(g){return this.check(_ksuid(ZodKSUID,g))},ipv4(g){return this.check(_ipv4(ZodIPv4,g))},ipv6(g){return this.check(_ipv6(ZodIPv6,g))},cidrv4(g){return this.check(_cidrv4(ZodCIDRv4,g))},cidrv6(g){return this.check(_cidrv6(ZodCIDRv6,g))},e164(g){return this.check(_e164(ZodE164,g))},datetime(g){return this.check(_isoDateTime(ZodISODateTime,g))},date(g){return this.check(_isoDate(ZodISODate,g))},time(g){return this.check(_isoTime(ZodISOTime,g))},duration(g){return this.check(_isoDuration(ZodISODuration,g))}});function string$1(g){return _string(ZodString,g)}const ZodStringFormat=$constructor("ZodStringFormat",(g,v)=>{$ZodStringFormat.init(g,v),_ZodString.init(g,v)}),ZodISODateTime=$constructor("ZodISODateTime",(g,v)=>{$ZodISODateTime.init(g,v),ZodStringFormat.init(g,v)}),ZodISODate=$constructor("ZodISODate",(g,v)=>{$ZodISODate.init(g,v),ZodStringFormat.init(g,v)}),ZodISOTime=$constructor("ZodISOTime",(g,v)=>{$ZodISOTime.init(g,v),ZodStringFormat.init(g,v)}),ZodISODuration=$constructor("ZodISODuration",(g,v)=>{$ZodISODuration.init(g,v),ZodStringFormat.init(g,v)}),ZodEmail=$constructor("ZodEmail",(g,v)=>{$ZodEmail.init(g,v),ZodStringFormat.init(g,v)});function email(g){return _email(ZodEmail,g)}const ZodGUID=$constructor("ZodGUID",(g,v)=>{$ZodGUID.init(g,v),ZodStringFormat.init(g,v)});function guid(g){return _guid(ZodGUID,g)}const ZodUUID=$constructor("ZodUUID",(g,v)=>{$ZodUUID.init(g,v),ZodStringFormat.init(g,v)});function uuid(g){return _uuid(ZodUUID,g)}function uuidv4(g){return _uuidv4(ZodUUID,g)}function uuidv6(g){return _uuidv6(ZodUUID,g)}function uuidv7(g){return _uuidv7(ZodUUID,g)}const ZodURL=$constructor("ZodURL",(g,v)=>{$ZodURL.init(g,v),ZodStringFormat.init(g,v)});function url(g){return _url(ZodURL,g)}function httpUrl(g){return _url(ZodURL,{protocol:httpProtocol,hostname:domain,...normalizeParams(g)})}const ZodEmoji=$constructor("ZodEmoji",(g,v)=>{$ZodEmoji.init(g,v),ZodStringFormat.init(g,v)});function emoji(g){return _emoji(ZodEmoji,g)}const ZodNanoID=$constructor("ZodNanoID",(g,v)=>{$ZodNanoID.init(g,v),ZodStringFormat.init(g,v)});function nanoid(g){return _nanoid(ZodNanoID,g)}const ZodCUID=$constructor("ZodCUID",(g,v)=>{$ZodCUID.init(g,v),ZodStringFormat.init(g,v)});function cuid(g){return _cuid(ZodCUID,g)}const ZodCUID2=$constructor("ZodCUID2",(g,v)=>{$ZodCUID2.init(g,v),ZodStringFormat.init(g,v)});function cuid2(g){return _cuid2(ZodCUID2,g)}const ZodULID=$constructor("ZodULID",(g,v)=>{$ZodULID.init(g,v),ZodStringFormat.init(g,v)});function ulid(g){return _ulid(ZodULID,g)}const ZodXID=$constructor("ZodXID",(g,v)=>{$ZodXID.init(g,v),ZodStringFormat.init(g,v)});function xid(g){return _xid(ZodXID,g)}const ZodKSUID=$constructor("ZodKSUID",(g,v)=>{$ZodKSUID.init(g,v),ZodStringFormat.init(g,v)});function ksuid(g){return _ksuid(ZodKSUID,g)}const ZodIPv4=$constructor("ZodIPv4",(g,v)=>{$ZodIPv4.init(g,v),ZodStringFormat.init(g,v)});function ipv4(g){return _ipv4(ZodIPv4,g)}const ZodMAC=$constructor("ZodMAC",(g,v)=>{$ZodMAC.init(g,v),ZodStringFormat.init(g,v)});function mac(g){return _mac(ZodMAC,g)}const ZodIPv6=$constructor("ZodIPv6",(g,v)=>{$ZodIPv6.init(g,v),ZodStringFormat.init(g,v)});function ipv6(g){return _ipv6(ZodIPv6,g)}const ZodCIDRv4=$constructor("ZodCIDRv4",(g,v)=>{$ZodCIDRv4.init(g,v),ZodStringFormat.init(g,v)});function cidrv4(g){return _cidrv4(ZodCIDRv4,g)}const ZodCIDRv6=$constructor("ZodCIDRv6",(g,v)=>{$ZodCIDRv6.init(g,v),ZodStringFormat.init(g,v)});function cidrv6(g){return _cidrv6(ZodCIDRv6,g)}const ZodBase64=$constructor("ZodBase64",(g,v)=>{$ZodBase64.init(g,v),ZodStringFormat.init(g,v)});function base64(g){return _base64(ZodBase64,g)}const ZodBase64URL=$constructor("ZodBase64URL",(g,v)=>{$ZodBase64URL.init(g,v),ZodStringFormat.init(g,v)});function base64url(g){return _base64url(ZodBase64URL,g)}const ZodE164=$constructor("ZodE164",(g,v)=>{$ZodE164.init(g,v),ZodStringFormat.init(g,v)});function e164(g){return _e164(ZodE164,g)}const ZodCreditCard=$constructor("ZodCreditCard",(g,v)=>{$ZodCreditCard.init(g,v),ZodStringFormat.init(g,v)});function creditCard(g){return _creditCard(ZodCreditCard,g)}const ZodIBAN=$constructor("ZodIBAN",(g,v)=>{$ZodIBAN.init(g,v),ZodStringFormat.init(g,v)});function iban(g){return _iban(ZodIBAN,g)}const ZodJWT=$constructor("ZodJWT",(g,v)=>{$ZodJWT.init(g,v),ZodStringFormat.init(g,v)});function jwt(g){return _jwt(ZodJWT,g)}const ZodCustomStringFormat=$constructor("ZodCustomStringFormat",(g,v)=>{$ZodCustomStringFormat.init(g,v),ZodStringFormat.init(g,v)});function stringFormat(g,v,L={}){return _stringFormat(ZodCustomStringFormat,g,v,L)}function hostname(g){return _stringFormat(ZodCustomStringFormat,"hostname",hostname$1,g)}function hex(g){return _stringFormat(ZodCustomStringFormat,"hex",hex$1,g)}function hash(g,v){const L=`${g}_${v?.enc??"hex"}`,R=regexes[L];if(!R)throw new Error(`Unrecognized hash format: ${L}`);return _stringFormat(ZodCustomStringFormat,L,R,v)}const ZodNumber=$constructor("ZodNumber",(g,v)=>{$ZodNumber.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,L,R)=>numberProcessor(g,v,L,R),g.isFinite=!0},derived({minValue:g=>{const{minimum:v,exclusiveMinimum:L}=aggregateChecks(g);return Math.max(v??Number.NEGATIVE_INFINITY,L??Number.NEGATIVE_INFINITY)},maxValue:g=>{const{maximum:v,exclusiveMaximum:L}=aggregateChecks(g);return Math.min(v??Number.POSITIVE_INFINITY,L??Number.POSITIVE_INFINITY)},isInt:g=>{const{isInt:v,multipleOf:L}=aggregateChecks(g);return!!v||!!L?.some(Number.isSafeInteger)},format:g=>aggregateChecks(g).format??null},{gt(g,v){return this.check(_gt(g,v))},gte(g,v){return this.check(_gte(g,v))},min(g,v){return this.check(_gte(g,v))},lt(g,v){return this.check(_lt(g,v))},lte(g,v){return this.check(_lte(g,v))},max(g,v){return this.check(_lte(g,v))},int(g){return this.check(int(g))},safe(g){return this.check(int(g))},positive(g){return this.check(_gt(0,g))},nonnegative(g){return this.check(_gte(0,g))},negative(g){return this.check(_lt(0,g))},nonpositive(g){return this.check(_lte(0,g))},multipleOf(g,v){return this.check(_multipleOf(g,v))},step(g,v){return this.check(_multipleOf(g,v))},finite(){return this}}));function number$1(g){return _number(ZodNumber,g)}const ZodNumberFormat=$constructor("ZodNumberFormat",(g,v)=>{$ZodNumberFormat.init(g,v),ZodNumber.init(g,v)});function int(g){return _int(ZodNumberFormat,g)}function float32(g){return _float32(ZodNumberFormat,g)}function float64(g){return _float64(ZodNumberFormat,g)}function int32(g){return _int32(ZodNumberFormat,g)}function uint32(g){return _uint32(ZodNumberFormat,g)}const ZodBoolean=$constructor("ZodBoolean",(g,v)=>{$ZodBoolean.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,L,R)=>booleanProcessor(g,v,L)});function boolean$1(g){return _boolean(ZodBoolean,g)}const ZodBigInt=$constructor("ZodBigInt",(g,v)=>{$ZodBigInt.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,L,R)=>bigintProcessor(g,v,L,R)},derived({minValue:g=>aggregateChecks(g).minimum??null,maxValue:g=>aggregateChecks(g).maximum??null,format:g=>aggregateChecks(g).format??null},{gte(g,v){return this.check(_gte(g,v))},min(g,v){return this.check(_gte(g,v))},gt(g,v){return this.check(_gt(g,v))},lt(g,v){return this.check(_lt(g,v))},lte(g,v){return this.check(_lte(g,v))},max(g,v){return this.check(_lte(g,v))},positive(g){return this.check(_gt(BigInt(0),g))},negative(g){return this.check(_lt(BigInt(0),g))},nonpositive(g){return this.check(_lte(BigInt(0),g))},nonnegative(g){return this.check(_gte(BigInt(0),g))},multipleOf(g,v){return this.check(_multipleOf(g,v))}}));function bigint$1(g){return _bigint(ZodBigInt,g)}const ZodBigIntFormat=$constructor("ZodBigIntFormat",(g,v)=>{$ZodBigIntFormat.init(g,v),ZodBigInt.init(g,v)});function int64(g){return _int64(ZodBigIntFormat,g)}function uint64(g){return _uint64(ZodBigIntFormat,g)}const ZodSymbol=$constructor("ZodSymbol",(g,v)=>{$ZodSymbol.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,L,R)=>symbolProcessor(g,v,L,R)});function symbol(g){return _symbol(ZodSymbol,g)}const ZodUndefined=$constructor("ZodUndefined",(g,v)=>{$ZodUndefined.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,L,R)=>undefinedProcessor(g,v,L,R)});function _undefined(g){return _undefined$1(ZodUndefined,g)}const ZodNull=$constructor("ZodNull",(g,v)=>{$ZodNull.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,L,R)=>nullProcessor(g,v,L)});function _null(g){return _null$1(ZodNull,g)}const ZodAny=$constructor("ZodAny",(g,v)=>{$ZodAny.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(g,v,L)=>anyProcessor()});function any(){return _any(ZodAny)}const ZodUnknown=$constructor("ZodUnknown",(g,v)=>{$ZodUnknown.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(g,v,L)=>unknownProcessor()});function unknown(){return _unknown(ZodUnknown)}const ZodNever=$constructor("ZodNever",(g,v)=>{$ZodNever.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,L,R)=>neverProcessor(g,v,L)});function never(g){return _never(ZodNever,g)}const ZodVoid=$constructor("ZodVoid",(g,v)=>{$ZodVoid.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,L,R)=>voidProcessor(g,v,L,R)});function _void(g){return _void$1(ZodVoid,g)}const ZodDate=$constructor("ZodDate",(g,v)=>{$ZodDate.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,L,R)=>dateProcessor(g,v,L,R),g.min=(v,L)=>g.check(_gte(v,L)),g.max=(v,L)=>g.check(_lte(v,L))},derived({minDate:g=>{const{minimum:v}=aggregateChecks(g);return v?new Date(v):null},maxDate:g=>{const{maximum:v}=aggregateChecks(g);return v?new Date(v):null}},{}));function date$2(g){return _date(ZodDate,g)}const ZodArray=$constructor("ZodArray",(g,v)=>{_ensureDefaultMemoizer(),$ZodArray.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,L,R)=>arrayProcessor(g,v,L,R),g.element=v.element},{min(g,v){return this.check(_minLength(g,v))},nonempty(g){return this.check(_minLength(1,g))},max(g,v){return this.check(_maxLength(g,v))},length(g,v){return this.check(_length(g,v))},unwrap(){return this.element}});function array(g,v){return _array(ZodArray,g,v)}function keyof(g){const v=g._zod.def.shape;return _enum(Object.keys(v))}const ZodObject=$constructor("ZodObject",(g,v)=>{_ensureDefaultMemoizer(),$ZodObjectJIT.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,L,R)=>objectProcessor(g,v,L,R),installLazyProp(g,"shape",g=>g._zod.def.shape,!1)},{keyof(){return _enum(Object.keys(this._zod.def.shape))},catchall(g){return this.clone(mergeDefs(this._zod.def,{catchall:g}))},passthrough(){return this.clone(mergeDefs(this._zod.def,{catchall:unknown()}))},loose(){return this.clone(mergeDefs(this._zod.def,{catchall:unknown()}))},strict(){return this.clone(mergeDefs(this._zod.def,{catchall:never()}))},strip(){return this.clone(mergeDefs(this._zod.def,{catchall:void 0}))},extend(g){return extend(this,g)},safeExtend(g){return safeExtend(this,g)},merge(g){return merge(this,g)},pick(g){return pick(this,g)},omit(g){return omit(this,g)},partial(...g){return partial(ZodOptional,this,g[0])},exactPartial(...g){return partial(ZodExactOptional,this,g[0],"exactPartial")},required(...g){return required(ZodNonOptional,this,g[0])}});function object(g,v){const L={type:"object",shape:g??{},...normalizeParams(v)};return new ZodObject(L)}function strictObject(g,v){return new ZodObject({type:"object",shape:g,catchall:never(),...normalizeParams(v)})}function looseObject(g,v){return new ZodObject({type:"object",shape:g,catchall:unknown(),...normalizeParams(v)})}const ZodUnion=$constructor("ZodUnion",(g,v)=>{$ZodUnion.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,L,R)=>unionProcessor(g,v,L,R),g.options=v.options});function union(g,v){return new ZodUnion({type:"union",options:g,...normalizeParams(v)})}const ZodXor=$constructor("ZodXor",(g,v)=>{ZodUnion.init(g,v),$ZodXor.init(g,v),g._zod.processJSONSchema=(v,L,R)=>unionProcessor(g,v,L,R),g.options=v.options});function xor(g,v){return new ZodXor({type:"union",options:g,inclusive:!1,...normalizeParams(v)})}const ZodDiscriminatedUnion=$constructor("ZodDiscriminatedUnion",(g,v)=>{ZodUnion.init(g,v),$ZodDiscriminatedUnion.init(g,v)});function discriminatedUnion(g,v,L){return new ZodDiscriminatedUnion({type:"union",options:v,discriminator:g,...normalizeParams(L)})}const ZodIntersection=$constructor("ZodIntersection",(g,v)=>{$ZodIntersection.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,L,R)=>intersectionProcessor(g,v,L,R)});function intersection(g,v){return new ZodIntersection({type:"intersection",left:g,right:v})}const ZodTuple=$constructor("ZodTuple",(g,v)=>{_ensureDefaultMemoizer(),$ZodTuple.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,L,R)=>tupleProcessor(g,v,L,R)},{rest(g){return this.clone({...this._zod.def,rest:g})},partial(){const g=this._zod.def;if(g.checks?.length)throw new Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...g,items:g.items.map(g=>new ZodOptional({type:"optional",innerType:g}))})}});function tuple(g,v,L){const R=v instanceof $ZodType;return new ZodTuple({type:"tuple",items:g,rest:R?v:null,...normalizeParams(R?L:v)})}const ZodRecord=$constructor("ZodRecord",(g,v)=>{_ensureDefaultMemoizer(),$ZodRecord.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,L,R)=>recordProcessor(g,v,L,R),g.keyType=v.keyType,g.valueType=v.valueType});function record(g,v,L){return v&&v._zod?new ZodRecord({type:"record",keyType:g,valueType:v,...normalizeParams(L)}):new ZodRecord({type:"record",keyType:string$1(),valueType:g,...normalizeParams(v)})}function partialRecord(g,v,L){return new ZodRecord({type:"record",keyType:g,valueType:v,...normalizeParams(L),partial:!0})}function looseRecord(g,v,L){return new ZodRecord({type:"record",keyType:g,valueType:v,mode:"loose",...normalizeParams(L)})}const ZodMap=$constructor("ZodMap",(g,v)=>{_ensureDefaultMemoizer(),$ZodMap.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,L,R)=>mapProcessor(g,v,L,R),g.keyType=v.keyType,g.valueType=v.valueType,g.min=(...v)=>g.check(_minSize(...v)),g.nonempty=v=>g.check(_minSize(1,v)),g.max=(...v)=>g.check(_maxSize(...v)),g.size=(...v)=>g.check(_size(...v))});function map(g,v,L){return new ZodMap({type:"map",keyType:g,valueType:v,...normalizeParams(L)})}const ZodSet=$constructor("ZodSet",(g,v)=>{_ensureDefaultMemoizer(),$ZodSet.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,L,R)=>setProcessor(g,v,L,R),g.min=(...v)=>g.check(_minSize(...v)),g.nonempty=v=>g.check(_minSize(1,v)),g.max=(...v)=>g.check(_maxSize(...v)),g.size=(...v)=>g.check(_size(...v))});function set(g,v){return new ZodSet({type:"set",valueType:g,...normalizeParams(v)})}const ZodEnum=$constructor("ZodEnum",(g,v)=>{$ZodEnum.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,L,R)=>enumProcessor(g,v,L),g.enum=v.entries,g.options=[...g._zod.values];const L=new Set(Object.keys(v.entries));g.extract=(g,R)=>{const W={};for(const R of g){if(!L.has(R))throw new Error(`Key ${R} not found in enum`);W[R]=v.entries[R]}return new ZodEnum({...v,checks:[],...normalizeParams(R),entries:W})},g.exclude=(g,R)=>{const W={...v.entries};for(const v of g){if(!L.has(v))throw new Error(`Key ${v} not found in enum`);delete W[v]}return new ZodEnum({...v,checks:[],...normalizeParams(R),entries:W})}});function _enum(g,v){const L=Array.isArray(g)?Object.fromEntries(g.map(g=>[g,g])):g;return new ZodEnum({type:"enum",entries:L,...normalizeParams(v)})}function nativeEnum(g,v){return new ZodEnum({type:"enum",entries:g,...normalizeParams(v)})}const ZodLiteral=$constructor("ZodLiteral",(g,v)=>{$ZodLiteral.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,L,R)=>literalProcessor(g,v,L,R),g.values=new Set(v.values),Object.defineProperty(g,"value",{get(){if(v.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return v.values[0]}})});function literal(g,v){return new ZodLiteral({type:"literal",values:Array.isArray(g)?g:[g],...normalizeParams(v)})}const ZodFile=$constructor("ZodFile",(g,v)=>{$ZodFile.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,L,R)=>fileProcessor(g,v,L),g.min=(v,L)=>g.check(_minSize(v,L)),g.max=(v,L)=>g.check(_maxSize(v,L)),g.mime=(v,L)=>g.check(_mime(Array.isArray(v)?v:[v],L))});function file(g){return _file(ZodFile,g)}const ZodTransform=$constructor("ZodTransform",(g,v)=>{_ensureDefaultMemoizer(),$ZodTransform.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,L,R)=>transformProcessor(g,v,L,R),g._zod.parse=(L,R)=>{if("backward"===R.direction)throw new $ZodEncodeError(g.constructor.name);L.addIssue=R=>{if("string"==typeof R)L.issues.push(issue(R,L.value,v));else{const v=R;v.fatal&&(v.continue=!1),v.code??(v.code="custom"),"input"in v||(v.input=L.value),v.inst??(v.inst=g),L.issues.push(issue(v))}};const W=v.transform(L.value,L);return W instanceof Promise?W.then(g=>(L.value=g,L)):(L.value=W,L)}});function transform(g){return new ZodTransform({type:"transform",transform:g})}const ZodOptional=$constructor("ZodOptional",(g,v)=>{$ZodOptional.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,L,R)=>optionalProcessor(g,v,L,R),g.unwrap=()=>g._zod.def.innerType});function optional(g){return new ZodOptional({type:"optional",innerType:g})}const ZodExactOptional=$constructor("ZodExactOptional",(g,v)=>{$ZodExactOptional.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,L,R)=>optionalProcessor(g,v,L,R),g.unwrap=()=>g._zod.def.innerType});function exactOptional(g){return new ZodExactOptional({type:"optional",innerType:g})}const ZodNullable=$constructor("ZodNullable",(g,v)=>{$ZodNullable.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,L,R)=>nullableProcessor(g,v,L,R),g.unwrap=()=>g._zod.def.innerType});function nullable(g){return new ZodNullable({type:"nullable",innerType:g})}function nullish(g){return optional(nullable(g))}const ZodDefault=$constructor("ZodDefault",(g,v)=>{$ZodDefault.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,L,R)=>defaultProcessor(g,v,L,R),g.unwrap=()=>g._zod.def.innerType,g.removeDefault=g.unwrap});function _default(g,v){return new ZodDefault({type:"default",innerType:g,get defaultValue(){return"function"==typeof v?v():shallowClone(v)}})}const ZodPrefault=$constructor("ZodPrefault",(g,v)=>{$ZodPrefault.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,L,R)=>prefaultProcessor(g,v,L,R),g.unwrap=()=>g._zod.def.innerType});function prefault(g,v){return new ZodPrefault({type:"prefault",innerType:g,get defaultValue(){return"function"==typeof v?v():shallowClone(v)}})}const ZodNonOptional=$constructor("ZodNonOptional",(g,v)=>{$ZodNonOptional.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,L,R)=>nonoptionalProcessor(g,v,L,R),g.unwrap=()=>g._zod.def.innerType});function nonoptional(g,v){return new ZodNonOptional({type:"nonoptional",innerType:g,...normalizeParams(v)})}const ZodSuccess=$constructor("ZodSuccess",(g,v)=>{$ZodSuccess.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,L,R)=>successProcessor(g,v,L),g.unwrap=()=>g._zod.def.innerType});function success(g){return new ZodSuccess({type:"success",innerType:g})}const ZodCatch=$constructor("ZodCatch",(g,v)=>{$ZodCatch.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,L,R)=>catchProcessor(g,v,L,R),g.unwrap=()=>g._zod.def.innerType,g.removeCatch=g.unwrap});function _catch(g,v){return new ZodCatch({type:"catch",innerType:g,catchValue:"function"==typeof v?v:constantCatch(v)})}const ZodNaN=$constructor("ZodNaN",(g,v)=>{$ZodNaN.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,L,R)=>nanProcessor(g,v,L,R)});function nan(g){return _nan(ZodNaN,g)}const ZodPipe=$constructor("ZodPipe",(g,v)=>{$ZodPipe.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,L,R)=>pipeProcessor(g,v,L,R),g.in=v.in,g.out=v.out});function pipe(g,v){return new ZodPipe({type:"pipe",in:g,out:v})}const ZodCodec=$constructor("ZodCodec",(g,v)=>{ZodPipe.init(g,v),$ZodCodec.init(g,v)});function codec(g,v,L){return new ZodCodec({type:"pipe",in:g,out:v,transform:L.decode,reverseTransform:L.encode})}function invertCodec(g){const v=g._zod.def;return new ZodCodec({type:"pipe",in:v.out,out:v.in,transform:v.reverseTransform,reverseTransform:v.transform})}const ZodPreprocess=$constructor("ZodPreprocess",(g,v)=>{ZodPipe.init(g,v),$ZodPreprocess.init(g,v)}),ZodReadonly=$constructor("ZodReadonly",(g,v)=>{$ZodReadonly.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,L,R)=>readonlyProcessor(g,v,L,R),g.unwrap=()=>g._zod.def.innerType});function readonly(g){return new ZodReadonly({type:"readonly",innerType:g})}const ZodTemplateLiteral=$constructor("ZodTemplateLiteral",(g,v)=>{$ZodTemplateLiteral.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,L,R)=>templateLiteralProcessor(g,v,L)});function templateLiteral(g,v){return new ZodTemplateLiteral({type:"template_literal",parts:g,...normalizeParams(v)})}const ZodLazy=$constructor("ZodLazy",(g,v)=>{$ZodLazy.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,L,R)=>lazyProcessor(g,v,L,R),g.unwrap=()=>g._zod.def.getter()});function lazy(g){return new ZodLazy({type:"lazy",getter:g})}const ZodPromise=$constructor("ZodPromise",(g,v)=>{$ZodPromise.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,L,R)=>promiseProcessor(g,v,L,R),g.unwrap=()=>g._zod.def.innerType});function promise(g){return new ZodPromise({type:"promise",innerType:g})}const ZodFunction=$constructor("ZodFunction",(g,v)=>{$ZodFunction.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,L,R)=>functionProcessor(g,v,L,R)});function _function(g){return new ZodFunction({type:"function",input:Array.isArray(g?.input)?tuple(g?.input):g?.input??array(unknown()),output:g?.output??unknown()})}const ZodCustom=$constructor("ZodCustom",(g,v)=>{$ZodCustom.init(g,v),ZodType.init(g,v),g._zod.processJSONSchema=(v,L,R)=>customProcessor(g,v,L,R)}),ZodProperties=$constructor("ZodProperties",(g,v)=>{_ensureDefaultMemoizer(),$ZodProperties.init(g,v),ZodType.init(g,v)});function properties(g,v){return _properties(ZodProperties,g,v)}function check(g){const v=new $ZodCheck({check:"custom"});return v._zod.check=g,v}function custom(g,v){return _custom(ZodCustom,g??(()=>!0),v)}function refine(g,v={}){return _refine(ZodCustom,g,v)}function superRefine(g,v){return _superRefine(g,v)}const describe=describe$1,meta=meta$1,ZodInstanceOf=$constructor("ZodInstanceOf",(g,v)=>{ZodCustom.init(g,v)},{properties(g,v){return this.check(properties(g,v))}});function _instanceof(g,v={}){const L=new ZodInstanceOf({type:"custom",check:"custom",fn:v=>v instanceof g,abort:!0,...normalizeParams(v)});return L._zod.bag.Class=g,L._zod.check=v=>{v.value instanceof g||v.issues.push({code:"invalid_type",expected:g.name,input:v.value,inst:L,path:[...L._zod.def.path??[]]})},L}const stringbool=(...g)=>_stringbool({Codec:ZodCodec,Boolean:ZodBoolean,String:ZodString},...g);function json$1(g){const v=lazy(()=>union([string$1(g),number$1(),boolean$1(),_null(),array(v),record(string$1(),v)]));return v}function preprocess(g,v){return new ZodPreprocess({type:"pipe",in:transform(g),out:v})}var _schemas=Object.freeze({__proto__:null,ZodAny:ZodAny,ZodArray:ZodArray,ZodBase64:ZodBase64,ZodBase64URL:ZodBase64URL,ZodBigInt:ZodBigInt,ZodBigIntFormat:ZodBigIntFormat,ZodBoolean:ZodBoolean,ZodCIDRv4:ZodCIDRv4,ZodCIDRv6:ZodCIDRv6,ZodCUID:ZodCUID,ZodCUID2:ZodCUID2,ZodCatch:ZodCatch,ZodCodec:ZodCodec,ZodCreditCard:ZodCreditCard,ZodCustom:ZodCustom,ZodCustomStringFormat:ZodCustomStringFormat,ZodDate:ZodDate,ZodDefault:ZodDefault,ZodDiscriminatedUnion:ZodDiscriminatedUnion,ZodE164:ZodE164,ZodEmail:ZodEmail,ZodEmoji:ZodEmoji,ZodEnum:ZodEnum,ZodExactOptional:ZodExactOptional,ZodFile:ZodFile,ZodFunction:ZodFunction,ZodGUID:ZodGUID,ZodIBAN:ZodIBAN,ZodIPv4:ZodIPv4,ZodIPv6:ZodIPv6,ZodISODate:ZodISODate,ZodISODateTime:ZodISODateTime,ZodISODuration:ZodISODuration,ZodISOTime:ZodISOTime,ZodInstanceOf:ZodInstanceOf,ZodIntersection:ZodIntersection,ZodJWT:ZodJWT,ZodKSUID:ZodKSUID,ZodLazy:ZodLazy,ZodLiteral:ZodLiteral,ZodMAC:ZodMAC,ZodMap:ZodMap,ZodNaN:ZodNaN,ZodNanoID:ZodNanoID,ZodNever:ZodNever,ZodNonOptional:ZodNonOptional,ZodNull:ZodNull,ZodNullable:ZodNullable,ZodNumber:ZodNumber,ZodNumberFormat:ZodNumberFormat,ZodObject:ZodObject,ZodOptional:ZodOptional,ZodPipe:ZodPipe,ZodPrefault:ZodPrefault,ZodPreprocess:ZodPreprocess,ZodPromise:ZodPromise,ZodProperties:ZodProperties,ZodReadonly:ZodReadonly,ZodRecord:ZodRecord,ZodSet:ZodSet,ZodString:ZodString,ZodStringFormat:ZodStringFormat,ZodSuccess:ZodSuccess,ZodSymbol:ZodSymbol,ZodTemplateLiteral:ZodTemplateLiteral,ZodTransform:ZodTransform,ZodTuple:ZodTuple,ZodType:ZodType,ZodULID:ZodULID,ZodURL:ZodURL,ZodUUID:ZodUUID,ZodUndefined:ZodUndefined,ZodUnion:ZodUnion,ZodUnknown:ZodUnknown,ZodVoid:ZodVoid,ZodXID:ZodXID,ZodXor:ZodXor,_ZodString:_ZodString,_default:_default,_function:_function,any:any,array:array,base64:base64,base64url:base64url,bigint:bigint$1,boolean:boolean$1,catch:_catch,check:check,cidrv4:cidrv4,cidrv6:cidrv6,codec:codec,creditCard:creditCard,cuid:cuid,cuid2:cuid2,custom:custom,date:date$2,describe:describe,discriminatedUnion:discriminatedUnion,e164:e164,email:email,emoji:emoji,enum:_enum,exactOptional:exactOptional,file:file,float32:float32,float64:float64,function:_function,guid:guid,hash:hash,hex:hex,hostname:hostname,httpUrl:httpUrl,iban:iban,instanceof:_instanceof,int:int,int32:int32,int64:int64,intersection:intersection,invertCodec:invertCodec,ipv4:ipv4,ipv6:ipv6,json:json$1,jwt:jwt,keyof:keyof,ksuid:ksuid,lazy:lazy,literal:literal,looseObject:looseObject,looseRecord:looseRecord,mac:mac,map:map,meta:meta,nan:nan,nanoid:nanoid,nativeEnum:nativeEnum,never:never,nonoptional:nonoptional,null:_null,nullable:nullable,nullish:nullish,number:number$1,object:object,optional:optional,partialRecord:partialRecord,pipe:pipe,prefault:prefault,preprocess:preprocess,promise:promise,properties:properties,readonly:readonly,record:record,refine:refine,set:set,strictObject:strictObject,string:string$1,stringFormat:stringFormat,stringbool:stringbool,success:success,superRefine:superRefine,symbol:symbol,templateLiteral:templateLiteral,transform:transform,tuple:tuple,uint32:uint32,uint64:uint64,ulid:ulid,undefined:_undefined,union:union,unknown:unknown,url:url,uuid:uuid,uuidv4:uuidv4,uuidv6:uuidv6,uuidv7:uuidv7,void:_void,xid:xid,xor:xor});const ZodIssueCode={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function setErrorMap(g){config({customError:g})}function getErrorMap(){return config().customError}var ZodFirstPartyTypeKind;function datetime(g){return _isoDateTime(ZodISODateTime,g)}function date$1(g){return _isoDate(ZodISODate,g)}function time(g){return _isoTime(ZodISOTime,g)}function duration(g){return _isoDuration(ZodISODuration,g)}ZodFirstPartyTypeKind||(ZodFirstPartyTypeKind={});var _iso=Object.freeze({__proto__:null,ZodISODate:ZodISODate,ZodISODateTime:ZodISODateTime,ZodISODuration:ZodISODuration,ZodISOTime:ZodISOTime,date:date$1,datetime:datetime,duration:duration,time:time});const z$1={..._schemas,..._checks,iso:_iso},RECOGNIZED_KEYS=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function detectVersion(g,v){const L=g.$schema;return"https://json-schema.org/draft/2020-12/schema"===L?"draft-2020-12":"http://json-schema.org/draft-07/schema#"===L?"draft-7":"http://json-schema.org/draft-04/schema#"===L?"draft-4":v??"draft-2020-12"}function applyMinItems(g,v){return g.map((g,L)=>L<v?g:g.optional())}function decodeJSONPointerSegment(g){return g.replace(/~1/g,"/").replace(/~0/g,"~")}function resolveRef(g,v){if(!g.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");const L=g.slice(1).split("/").filter(Boolean);if(0===L.length)return v.rootSchema;const R="draft-2020-12"===v.version?"$defs":"definitions";if(L[0]===R){const R=void 0===L[1]?void 0:decodeJSONPointerSegment(L[1]);if(!R||!v.defs[R])throw new Error(`Reference not found: ${g}`);return v.defs[R]}throw new Error(`Reference not found: ${g}`)}function checkObjectGuards(g,v){return z$1.transform(g=>g).check(L=>{const R=L.value;if("object"!=typeof R||null===R||Array.isArray(R))return;const W=Object.getOwnPropertyNames(R);if(void 0!==v.minProperties&&W.length<v.minProperties&&L.issues.push({origin:"object",code:"too_small",minimum:v.minProperties,inclusive:!0,message:`Too small: expected object to have >=${v.minProperties} properties`,input:R,inst:g,continue:!0}),void 0!==v.maxProperties&&W.length>v.maxProperties&&L.issues.push({origin:"object",code:"too_big",maximum:v.maxProperties,inclusive:!0,message:`Too big: expected object to have <=${v.maxProperties} properties`,input:R,inst:g,continue:!0}),v.keySchema)for(const g of W){const R=v.keySchema.safeParse(g);R.success||L.issues.push({code:"invalid_key",origin:"record",issues:R.error.issues,input:g,path:[g],continue:!0})}}).pipe(g)}function canonicalKey(g,v){if(null===g)return"z";const L=typeof g;if("object"!==L){if("number"===L&&Number.isNaN(g))return null;const v=String(g);return`${L[0]}${v.length}:${v}`}if(v.has(g))return null;v.add(g);try{if(Array.isArray(g)){const L=[];for(const R of g){const g=canonicalKey(R,v);if(null===g)return null;L.push(g)}return`a${L.length}:[${L.join(",")}]`}const L=Object.keys(g).sort(),R=[];for(const W of L){const L=canonicalKey(g[W],v);if(null===L)return null;R.push(`${W.length}:${W}=${L}`)}return`o${R.length}:{${R.join(",")}}`}finally{v.delete(g)}}const SCHEMA_KEYWORDS=new Set(["items","prefixItems","additionalItems","additionalProperties","contains","propertyNames","not","if","then","else","allOf","anyOf","oneOf","unevaluatedItems","unevaluatedProperties","contentSchema"]),SCHEMA_MAP_KEYWORDS=new Set(["properties","patternProperties","dependentSchemas","dependencies","$defs","definitions"]);function containsRef(g){return"object"==typeof g&&null!==g&&(Array.isArray(g)?g.some(containsRef):"string"==typeof g.$ref||Object.entries(g).some(([g,v])=>SCHEMA_KEYWORDS.has(g)?containsRef(v):!(!SCHEMA_MAP_KEYWORDS.has(g)||"object"!=typeof v||null===v)&&Object.values(v).some(containsRef)))}function plural(g){return 1===g?"element":"elements"}function checkArrayGuards(g,v){const L=z$1.transform(g=>g).check(g=>{const L=g.value;if(Array.isArray(L)){if(!0===v.uniqueItems){const v=new Map;for(let R=0;R<L.length;R++){const W=canonicalKey(L[R],new Set);if(null===W)continue;const ie=v.get(W);void 0!==ie?g.issues.push({code:"custom",message:`Array items must be unique: element at index ${R} duplicates the one at index ${ie}`,input:L,path:[R],continue:!0}):v.set(W,R)}}if(v.containsSchema){const R=v.minContains??1,W=void 0!==v.maxContains?v.maxContains+1:Number.POSITIVE_INFINITY;let ie=0;for(const g of L)if(v.containsSchema.safeParse(g).success&&++ie>=W)break;ie<R&&g.issues.push({code:"custom",message:`Array must contain at least ${R} matching ${plural(R)}; found ${ie}`,input:L,continue:!0}),void 0!==v.maxContains&&ie>v.maxContains&&g.issues.push({code:"custom",message:`Array must contain at most ${v.maxContains} matching ${plural(v.maxContains)}`,input:L,continue:!0})}}});return L.pipe(g)}function getTupleRest(g,v){if(!1!==g)return void 0===g||!0===g?z$1.any():convertSchema(g,v)}const fullTime=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function convertBaseSchema(g,v){if(void 0!==g.not){if("object"==typeof g.not&&0===Object.keys(g.not).length)return z$1.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(void 0!==g.unevaluatedItems)throw new Error("unevaluatedItems is not supported");if(void 0!==g.unevaluatedProperties)throw new Error("unevaluatedProperties is not supported");if(void 0!==g.if||void 0!==g.then||void 0!==g.else)throw new Error("Conditional schemas (if/then/else) are not supported");if(void 0!==g.dependentSchemas||void 0!==g.dependentRequired)throw new Error("dependentSchemas and dependentRequired are not supported");if(g.$ref){const L=g.$ref;if(v.refs.has(L))return v.refs.get(L);if(v.processing.has(L))return z$1.lazy(()=>{if(!v.refs.has(L))throw new Error(`Circular reference not resolved: ${L}`);return v.refs.get(L)});v.processing.add(L);const R=convertSchema(resolveRef(L,v),v);return v.refs.set(L,R),v.processing.delete(L),R}if(void 0!==g.enum){const L=g.enum;if("openapi-3.0"===v.version&&!0===g.nullable&&1===L.length&&null===L[0])return z$1.null();if(0===L.length)return z$1.never();if(1===L.length)return z$1.literal(L[0]);if(L.every(g=>"string"==typeof g))return z$1.enum(L);const R=L.map(g=>z$1.literal(g));return R.length<2?R[0]:z$1.union([R[0],R[1],...R.slice(2)])}if(void 0!==g.const)return z$1.literal(g.const);const L=g.type;if(Array.isArray(L)){const R=L.map(L=>convertBaseSchema({...g,type:L},v));return 0===R.length?z$1.never():1===R.length?R[0]:z$1.union(R)}if(!L)return z$1.any();let R;switch(L){case"string":{let v=z$1.string();if(g.format){const L=g.format;"email"===L?v=v.check(z$1.email()):"uri"===L||"uri-reference"===L?v=v.check(z$1.url()):"uuid"===L||"guid"===L?v=v.check(z$1.uuid()):"date-time"===L?v=v.check(z$1.iso.datetime({offset:!0})):"date"===L?v=v.check(z$1.iso.date()):"time"===L?v=v.check(z$1.regex(fullTime)):"duration"===L?v=v.check(z$1.iso.duration()):"hostname"===L?v=v.check(z$1.hostname()):"ipv4"===L?v=v.check(z$1.ipv4()):"ipv6"===L?v=v.check(z$1.ipv6()):"mac"===L?v=v.check(z$1.mac()):"cidr"===L?v=v.check(z$1.cidrv4()):"cidr-v6"===L?v=v.check(z$1.cidrv6()):"base64"===L?v=v.check(z$1.base64()):"base64url"===L?v=v.check(z$1.base64url()):"e164"===L?v=v.check(z$1.e164()):"credit_card"===L?v=v.check(z$1.creditCard()):"iban"===L?v=v.check(z$1.iban()):"jwt"===L?v=v.check(z$1.jwt()):"emoji"===L?v=v.check(z$1.emoji()):"nanoid"===L?v=v.check(z$1.nanoid()):"cuid"===L?v=v.check(z$1.cuid()):"cuid2"===L?v=v.check(z$1.cuid2()):"ulid"===L?v=v.check(z$1.ulid()):"xid"===L?v=v.check(z$1.xid()):"ksuid"===L&&(v=v.check(z$1.ksuid()))}"number"==typeof g.minLength&&(v=v.min(g.minLength)),"number"==typeof g.maxLength&&(v=v.max(g.maxLength)),g.pattern&&(v=v.regex(new RegExp(g.pattern))),R=v;break}case"number":case"integer":{let v="integer"===L?z$1.number().int():z$1.number();"number"==typeof g.minimum&&!0!==g.exclusiveMinimum&&(v=v.min(g.minimum)),"number"==typeof g.maximum&&!0!==g.exclusiveMaximum&&(v=v.max(g.maximum)),"number"==typeof g.exclusiveMinimum?v=v.gt(g.exclusiveMinimum):!0===g.exclusiveMinimum&&"number"==typeof g.minimum&&(v=v.gt(g.minimum)),"number"==typeof g.exclusiveMaximum?v=v.lt(g.exclusiveMaximum):!0===g.exclusiveMaximum&&"number"==typeof g.maximum&&(v=v.lt(g.maximum)),"number"==typeof g.multipleOf&&(v=v.multipleOf(g.multipleOf)),R=v;break}case"boolean":R=z$1.boolean();break;case"null":R=z$1.null();break;case"object":{const L={},W=g.properties||{},ie=new Set(g.required||[]),ce="object"==typeof g.additionalProperties?convertSchema(g.additionalProperties,v):void 0;for(const[g,R]of Object.entries(W)){const W=convertSchema(R,v);assignProp(L,g,ie.has(g)?W:W.optional())}if(g.patternProperties){const W=g.patternProperties,ie=Object.keys(W),ce=[];for(const g of ie){const L=convertSchema(W[g],v),R=z$1.string().regex(new RegExp(g));ce.push(z$1.looseRecord(R,L))}const le=[];if(Object.keys(L).length>0&&le.push(z$1.object(L).passthrough()),le.push(...ce),0===le.length)R=z$1.object({}).passthrough();else if(1===le.length)R=le[0];else{let g=z$1.intersection(le[0],le[1]);for(let v=2;v<le.length;v++)g=z$1.intersection(g,le[v]);R=g}if(!1===g.additionalProperties){const g=Object.keys(L),v=ie.map(g=>new RegExp(g)),W=R;R=R.check(L=>{if(!isPlainObject(L.value))return;const R=[];for(const W of Object.keys(L.value))g.includes(W)||v.some(g=>g.test(W))||R.push(W);R.length&&L.issues.push({code:"unrecognized_keys",keys:R,input:L.value,inst:W})})}}else{const v=z$1.object(L);R=!1===g.additionalProperties?v.strict():ce?v.catchall(ce):v.passthrough()}const le=void 0!==g.propertyNames&&!0!==g.propertyNames,ue="number"==typeof g.minProperties?g.minProperties:void 0,me="number"==typeof g.maxProperties?g.maxProperties:void 0;if(le||void 0!==ue||void 0!==me){let L;if(le){L=convertSchema("object"==typeof g.propertyNames&&void 0===g.propertyNames.type?{type:"string",...g.propertyNames}:g.propertyNames,v)}R=checkObjectGuards(R,{keySchema:L,minProperties:ue,maxProperties:me})}break}case"array":{const L=g.prefixItems,W=g.items;if(L&&Array.isArray(L)){const ie="number"==typeof g.minItems?g.minItems:0,ce=applyMinItems(L.map(g=>convertSchema(g,v)),ie),le=Array.isArray(W)?void 0:getTupleRest(W,v),ue=z$1.tuple(ce);R=le?ue.rest(le):ue,"number"==typeof g.minItems&&(R=R.check(z$1.minLength(g.minItems))),"number"==typeof g.maxItems&&(R=R.check(z$1.maxLength(g.maxItems)))}else if(Array.isArray(W)){const L="number"==typeof g.minItems?g.minItems:0,ie=applyMinItems(W.map(g=>convertSchema(g,v)),L),ce=getTupleRest(g.additionalItems,v),le=z$1.tuple(ie);R=ce?le.rest(ce):le,"number"==typeof g.minItems&&(R=R.check(z$1.minLength(g.minItems))),"number"==typeof g.maxItems&&(R=R.check(z$1.maxLength(g.maxItems)))}else if(void 0!==W){const L=convertSchema(W,v);let ie=z$1.array(L);"number"==typeof g.minItems&&(ie=ie.min(g.minItems)),"number"==typeof g.maxItems&&(ie=ie.max(g.maxItems)),R=ie}else R=z$1.array(z$1.any());!0!==g.uniqueItems&&void 0===g.contains||(R=checkArrayGuards(R,{uniqueItems:!0===g.uniqueItems,containsSchema:void 0!==g.contains?convertSchema(g.contains,v):void 0,minContains:"number"==typeof g.minContains?g.minContains:void 0,maxContains:"number"==typeof g.maxContains?g.maxContains:void 0}));break}default:throw new Error(`Unsupported type: ${L}`)}return R}function convertSchema(g,v){if("boolean"==typeof g)return g?z$1.any():z$1.never();let L=convertBaseSchema(g,v);const R=g.type||void 0!==g.enum||void 0!==g.const;if(g.anyOf&&Array.isArray(g.anyOf)){const W=g.anyOf.map(g=>convertSchema(g,v)),ie=z$1.union(W);L=R?z$1.intersection(L,ie):ie}if(g.oneOf&&Array.isArray(g.oneOf)){const W=g.oneOf.map(g=>convertSchema(g,v)),ie=z$1.xor(W);L=R?z$1.intersection(L,ie):ie}if(g.allOf&&Array.isArray(g.allOf))if(0===g.allOf.length)L=R?L:z$1.any();else{let W=R?L:convertSchema(g.allOf[0],v);for(let L=R?0:1;L<g.allOf.length;L++)W=z$1.intersection(W,convertSchema(g.allOf[L],v));L=W}!0===g.nullable&&"openapi-3.0"===v.version&&(L=z$1.nullable(L)),!0===g.readOnly&&(L=z$1.readonly(L)),void 0!==g.default&&(L=L.default(g.default));const W={},ie=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(const v of ie)v in g&&(W[v]=g[v]);const ce=["contentEncoding","contentMediaType","contentSchema"];for(const v of ce)v in g&&(W[v]=g[v]);if("object"===g.type&&void 0===g.$ref){void 0===g.propertyNames||containsRef(g.propertyNames)||(W.propertyNames=g.propertyNames);for(const v of["minProperties","maxProperties"])void 0!==g[v]&&(W[v]=g[v])}if("array"===g.type&&void 0===g.$ref){void 0===g.contains||containsRef(g.contains)||(W.contains=g.contains);for(const v of["uniqueItems","minContains","maxContains"])void 0!==g[v]&&(W[v]=g[v])}for(const v of Object.keys(g))RECOGNIZED_KEYS.has(v)||assignProp(W,v,g[v]);return Object.keys(W).length>0&&v.registry.add(L,W),g.description&&(L=L.describe(g.description)),L}function fromJSONSchema(g,v){if("boolean"==typeof g)return g?z$1.any():z$1.never();let L;try{L=JSON.parse(JSON.stringify(g))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}return convertSchema(L,{version:detectVersion(L,v?.defaultTarget),defs:L.$defs||L.definitions||{},refs:new Map,processing:new Set,rootSchema:L,registry:v?.registry??globalRegistry})}const RESOLVING=Symbol("z.visit/resolving");function visit(g,v){const L="function"==typeof v?v:(g,L)=>{const R=v[g._zod.def.type];return R?R(g,L):g},R=new Map;function run(g){const v=R.get(g);if(v===RESOLVING)return new $ZodLazy({type:"lazy",getter:()=>R.get(g)});if(void 0!==v)return v;R.set(g,RESOLVING);const W=function mapInner(g){const v=g._zod.def;switch(v.type){case"object":{const L=v.shape,R=Object.keys(L);let W=!1;const ie={};for(const g of R){const v=run(L[g]);v!==L[g]&&(W=!0),ie[g]=v}let ce=v.catchall;return v.catchall&&(ce=run(v.catchall),ce!==v.catchall&&(W=!0)),W?clone(g,{...v,shape:ie,catchall:ce}):g}case"array":{const L=run(v.element);return L===v.element?g:clone(g,{...v,element:L})}case"tuple":{const L=v.items;let R=!1;const W=[];for(const g of L){const v=run(g);v!==g&&(R=!0),W.push(v)}let ie=v.rest;return v.rest&&(ie=run(v.rest),ie!==v.rest&&(R=!0)),R?clone(g,{...v,items:W,rest:ie}):g}case"record":case"map":{const L=run(v.keyType),R=run(v.valueType);return L===v.keyType&&R===v.valueType?g:clone(g,{...v,keyType:L,valueType:R})}case"set":{const L=run(v.valueType);return L===v.valueType?g:clone(g,{...v,valueType:L})}case"union":{const L=v.options;let R=!1;const W=[];for(const g of L){const v=run(g);v!==g&&(R=!0),W.push(v)}return R?clone(g,{...v,options:W}):g}case"intersection":{const L=run(v.left),R=run(v.right);return L===v.left&&R===v.right?g:clone(g,{...v,left:L,right:R})}case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":{const L=run(v.innerType);return L===v.innerType?g:clone(g,{...v,innerType:L})}case"pipe":{const L=run(v.in),R=run(v.out);return L===v.in&&R===v.out?g:clone(g,{...v,in:L,out:R})}case"function":{const L=run(v.input),R=run(v.output);return L===v.input&&R===v.output?g:clone(g,{...v,input:L,output:R})}case"lazy":{const L=v.getter,{_cachedInner:R,...W}=v;return clone(g,{...W,getter:()=>run(L())})}case"properties":{const L=v.shape;let R=!1;const W={};for(const g of Reflect.ownKeys(L)){const v=run(L[g]);v!==L[g]&&(R=!0),W[g]=v}return R?clone(g,{...v,shape:W}):g}default:return g}}(g),ie=L(W,W!==g);return R.set(g,ie),ie}return run(g)}function deepPartial(g){return visit(g,{object:g=>g.partial(),union:g=>{const v=g._zod.def;return void 0===v.discriminator?g:union(v.options)}})}function withChecks(g,v){if(!v?.length)return g;const L=g._zod.def;return clone(g,mergeDefs(L,{checks:[...L.checks??[],...v]}),{parent:!0})}function outSide(g){return withChecks(g.out,g.checks)}function inSide(g){return g.in._zod.traits.has("$ZodTransform")?outSide(g):g.in}function input(g){return visit(g,{pipe:g=>inSide(g._zod.def),default:(g,v)=>v?optional(g._zod.def.innerType):g,catch:(g,v)=>v?g._zod.def.innerType:g})}function output(g){return visit(g,{pipe:g=>outSide(g._zod.def),prefault:(g,v)=>v?g._zod.def.innerType:g})}function string(g){return _coercedString(ZodString,g)}function number(g){return _coercedNumber(ZodNumber,g)}function boolean(g){return _coercedBoolean(ZodBoolean,g)}function bigint(g){return _coercedBigint(ZodBigInt,g)}function date(g){return _coercedDate(ZodDate,g)}var coerce=Object.freeze({__proto__:null,bigint:bigint,boolean:boolean,date:date,number:number,string:string}),z=Object.freeze({__proto__:null,$brand:$brand,$input:$input,$output:$output,INVALID:INVALID,NEVER:NEVER,TimePrecision:TimePrecision,ZodAny:ZodAny,ZodArray:ZodArray,ZodBase64:ZodBase64,ZodBase64URL:ZodBase64URL,ZodBigInt:ZodBigInt,ZodBigIntFormat:ZodBigIntFormat,ZodBoolean:ZodBoolean,ZodCIDRv4:ZodCIDRv4,ZodCIDRv6:ZodCIDRv6,ZodCUID:ZodCUID,ZodCUID2:ZodCUID2,ZodCatch:ZodCatch,ZodCodec:ZodCodec,ZodCompileAsyncError:ZodCompileAsyncError,ZodCompileUnsupportedError:ZodCompileUnsupportedError,ZodCreditCard:ZodCreditCard,ZodCustom:ZodCustom,ZodCustomStringFormat:ZodCustomStringFormat,ZodDate:ZodDate,ZodDefault:ZodDefault,ZodDiscriminatedUnion:ZodDiscriminatedUnion,ZodE164:ZodE164,ZodEmail:ZodEmail,ZodEmoji:ZodEmoji,ZodEnum:ZodEnum,ZodError:ZodError,ZodExactOptional:ZodExactOptional,ZodFile:ZodFile,get ZodFirstPartyTypeKind(){return ZodFirstPartyTypeKind},ZodFunction:ZodFunction,ZodGUID:ZodGUID,ZodIBAN:ZodIBAN,ZodIPv4:ZodIPv4,ZodIPv6:ZodIPv6,ZodISODate:ZodISODate,ZodISODateTime:ZodISODateTime,ZodISODuration:ZodISODuration,ZodISOTime:ZodISOTime,ZodInstanceOf:ZodInstanceOf,ZodIntersection:ZodIntersection,ZodIssueCode:ZodIssueCode,ZodJWT:ZodJWT,ZodKSUID:ZodKSUID,ZodLazy:ZodLazy,ZodLiteral:ZodLiteral,ZodMAC:ZodMAC,ZodMap:ZodMap,ZodNaN:ZodNaN,ZodNanoID:ZodNanoID,ZodNever:ZodNever,ZodNonOptional:ZodNonOptional,ZodNull:ZodNull,ZodNullable:ZodNullable,ZodNumber:ZodNumber,ZodNumberFormat:ZodNumberFormat,ZodObject:ZodObject,ZodOptional:ZodOptional,ZodPipe:ZodPipe,ZodPrefault:ZodPrefault,ZodPreprocess:ZodPreprocess,ZodPromise:ZodPromise,ZodProperties:ZodProperties,ZodReadonly:ZodReadonly,ZodRealError:ZodRealError,ZodRecord:ZodRecord,ZodSet:ZodSet,ZodString:ZodString,ZodStringFormat:ZodStringFormat,ZodSuccess:ZodSuccess,ZodSymbol:ZodSymbol,ZodTemplateLiteral:ZodTemplateLiteral,ZodTransform:ZodTransform,ZodTuple:ZodTuple,ZodType:ZodType,ZodULID:ZodULID,ZodURL:ZodURL,ZodUUID:ZodUUID,ZodUndefined:ZodUndefined,ZodUnion:ZodUnion,ZodUnknown:ZodUnknown,ZodVoid:ZodVoid,ZodXID:ZodXID,ZodXor:ZodXor,_ZodString:_ZodString,_default:_default,_function:_function,any:any,array:array,base64:base64,base64url:base64url,bigint:bigint$1,boolean:boolean$1,catch:_catch,check:check,cidrv4:cidrv4,cidrv6:cidrv6,clone:clone,codec:codec,coerce:coerce,compile:compile,config:config,core:index,creditCard:creditCard,cuid:cuid,cuid2:cuid2,custom:custom,date:date$2,decode:decode,decodeAsync:decodeAsync,deepPartial:deepPartial,describe:describe,discriminatedUnion:discriminatedUnion,e164:e164,email:email,emoji:emoji,encode:encode,encodeAsync:encodeAsync,endsWith:_endsWith,enum:_enum,exactOptional:exactOptional,file:file,flattenError:flattenError,float32:float32,float64:float64,formatError:formatError,fromJSONSchema:fromJSONSchema,function:_function,getDiscriminatedOption:getDiscriminatedOption,getErrorMap:getErrorMap,globalRegistry:globalRegistry,gt:_gt,gte:_gte,guid:guid,hash:hash,hex:hex,hostname:hostname,httpUrl:httpUrl,iban:iban,includes:_includes,input:input,instanceof:_instanceof,int:int,int32:int32,int64:int64,intersection:intersection,invertCodec:invertCodec,ipv4:ipv4,ipv6:ipv6,iso:_iso,json:json$1,jwt:jwt,keyof:keyof,ksuid:ksuid,lazy:lazy,length:_length,literal:literal,locales:index$1,looseObject:looseObject,looseRecord:looseRecord,lowercase:_lowercase,lt:_lt,lte:_lte,mac:mac,map:map,maxLength:_maxLength,maxSize:_maxSize,memoizer:memoizer,meta:meta,mime:_mime,minLength:_minLength,minSize:_minSize,multipleOf:_multipleOf,nan:nan,nanoid:nanoid,nativeEnum:nativeEnum,negative:_negative,never:never,nonnegative:_nonnegative,nonoptional:nonoptional,nonpositive:_nonpositive,normalize:_normalize,null:_null,nullable:nullable,nullish:nullish,number:number$1,object:object,optional:optional,output:output,overwrite:_overwrite,parse:parse,parseAsync:parseAsync,partialRecord:partialRecord,pipe:pipe,positive:_positive,prefault:prefault,preprocess:preprocess,prettifyError:prettifyError,promise:promise,properties:properties,property:_property,readonly:readonly,record:record,refine:refine,regex:_regex,regexes:regexes,registry:registry,safeDecode:safeDecode,safeDecodeAsync:safeDecodeAsync,safeEncode:safeEncode,safeEncodeAsync:safeEncodeAsync,safeParse:safeParse,safeParseAsync:safeParseAsync,set:set,setErrorMap:setErrorMap,size:_size,slugify:_slugify,startsWith:_startsWith,strictObject:strictObject,string:string$1,stringFormat:stringFormat,stringbool:stringbool,success:success,superRefine:superRefine,symbol:symbol,templateLiteral:templateLiteral,toJSONSchema:toJSONSchema,toLowerCase:_toLowerCase,toUpperCase:_toUpperCase,toZod:toZod,transform:transform,treeifyError:treeifyError,trim:_trim,tuple:tuple,uint32:uint32,uint64:uint64,ulid:ulid,undefined:_undefined,union:union,unknown:unknown,uppercase:_uppercase,url:url,util:util,uuid:uuid,uuidv4:uuidv4,uuidv6:uuidv6,uuidv7:uuidv7,validate:validate,validateAsync:validateAsync$1,void:_void,withParser:withParser,xid:xid,xor:xor}),NUMBER_FORMATS=new Set(["int32","uint32","float32","float64","safeint"]);function checkRef(g,v){if("$ref"in g){const L=lazy(()=>string$1());return v.$refs.push([L,g.$ref]),L}return!1}var getCustomChecks=(g,v,L)=>{if("checks"in v&&L.checks)for(const R of v.checks)g=g.check(L.checks[R.name]);return g},getError=(g,v)=>"string"==typeof g.error?g.error:g.error&&v.errors?{error:v.errors[g.error.key]}:void 0,d=dezerializeRefs,dezerializers={function:(g,v)=>{const L=_function({input:d(g.input,v),output:d(g.output,v)});return getCustomChecks(L,g,v)},number:(g,v)=>{const L=g.format&&NUMBER_FORMATS.has(g.format)?"safeint"===g.format?"int":g.format:"number";let R=g.coerce?number(getError(g,v)):z[L](getError(g,v));return void 0!==g.min&&(R=g.minInclusive?R.min(g.min):R.gt(g.min)),void 0!==g.max&&(R=g.maxInclusive?R.max(g.max):R.lt(g.max)),void 0!==g.multipleOf&&(R=R.multipleOf(g.multipleOf)),getCustomChecks(R,g,v)},string:(g,v)=>{let L=g.coerce?string(getError(g,v)):string$1(getError(g,v));return void 0!==g.min&&(L=L.min(g.min)),void 0!==g.max&&(L=L.max(g.max)),void 0!==g.length&&(L=L.length(g.length)),void 0!==g.startsWith&&(L=L.startsWith(g.startsWith)),void 0!==g.endsWith&&(L=L.endsWith(g.endsWith)),void 0!==g.toLowerCase&&(L=L.toLowerCase()),void 0!==g.toUpperCase&&(L=L.toUpperCase()),void 0!==g.trim&&(L=L.trim()),"includes"in g&&(L=L.includes(g.includes,{position:g.position})),"regex"in g&&(L=L.regex(new RegExp(g.regex,g.flags))),"kind"in g&&("ip"==g.kind?L="v6"==g.version?ipv6():ipv4():"cidr"==g.kind?L="v6"===g.version?cidrv6():cidrv4():"uuid"==g.kind?L=uuid({version:g.version}):"datetime"==g.kind?L=datetime({offset:g.offset,precision:g.precision,local:g.local}):"time"==g.kind?L=time({precision:g.precision}):"duration"===g.kind||"date"===g.kind?L=_iso[g.kind]():"jwt"===g.kind?L="algorithm"in g?jwt({alg:g.algorithm}):jwt():"email"==g.kind?L="pattern"in g&&g.pattern?email({pattern:new RegExp(g.pattern,g.flags)}):email():"nanoid"===g.kind?L="length"in g?nanoid({length:g.length}):nanoid():"credit_card"===g.kind?L=creditCard():"json_string"!==g.kind&&(L=z[g.kind]())),getCustomChecks(L,g,v)},boolean:(g,v)=>getCustomChecks(g.coerce?boolean(getError(g,v)):boolean$1(getError(g,v)),g,v),nan:(g,v)=>getCustomChecks(nan(getError(g,v)),g,v),bigInt:(g,v)=>{const L=g.format&&["uint64","int64"].includes(g.format)?g.format:"bigint";let R=g.coerce?bigint(getError(g,v)):z[L](getError(g,v));if(void 0!==g.min){const v=BigInt(g.min);R=g.minInclusive?R.min(v):R.gt(v)}if(void 0!==g.max){const v=BigInt(g.max);R=g.maxInclusive?R.max(v):R.lt(v)}if(void 0!==g.multipleOf){const v=BigInt(g.multipleOf);R=R.multipleOf(v)}return getCustomChecks(R,g,v)},file:(g,v)=>{let L=file(getError(g,v));return g.max&&(L=L.max(g.max)),g.min&&(L=L.min(g.min)),g.mime&&(L=L.mime(g.mime)),getCustomChecks(L,g,v)},date:(g,v)=>{let L=g.coerce?date(getError(g,v)):date$2(getError(g,v));return void 0!==g.min&&(L=L.min(new Date(g.min))),void 0!==g.max&&(L=L.max(new Date(g.max))),getCustomChecks(L,g,v)},undefined:(g,v)=>getCustomChecks(_undefined(getError(g,v)),g,v),null:(g,v)=>getCustomChecks(_null(getError(g,v)),g,v),any:(g,v)=>getCustomChecks(any(),g,v),unknown:(g,v)=>getCustomChecks(unknown(),g,v),never:(g,v)=>getCustomChecks(never(getError(g,v)),g,v),void:(g,v)=>getCustomChecks(_void(getError(g,v)),g,v),literal:(g,v)=>getCustomChecks(literal(g.values,getError(g,v)),g,v),templateLiteral:(g,v)=>{const L=getError(g,v);return getCustomChecks(templateLiteral(g.parts.map((g,L)=>{if("string"==typeof g)return g;return checkRef(g,v)||d(g,{...v,path:v.path+"/parts/"+L})}),"string"==typeof L?L:{...L,...g.format?{format:g.format}:{}}),g,v)},symbol:(g,v)=>getCustomChecks(symbol(getError(g,v)),g,v),tuple:(g,v)=>{let L=tuple(g.items.map((g,L)=>checkRef(g,v)||d(g,{...v,path:v.path+"/items/"+L})),getError(g,v));if(g.rest){const R=checkRef(g.rest,v)||d(g.rest,{...v,path:v.path+"/rest"});L=L.rest(R)}return v.pathToSchema.set(v.path,L),getCustomChecks(L,g,v)},set:(g,v)=>{let L=set(checkRef(g.value,v)||d(g.value,{...v,path:v.path+"/value"}),getError(g,v));return void 0!==g.minSize&&(L=L.min(g.minSize)),void 0!==g.maxSize&&(L=L.max(g.maxSize)),v.pathToSchema.set(v.path,L),getCustomChecks(L,g,v)},array:(g,v)=>{let L=array(checkRef(g.element,v)||d(g.element,{...v,path:v.path+"/element"}),getError(g,v));return void 0!==g.minLength&&(L=L.min(g.minLength)),void 0!==g.maxLength&&(L=L.max(g.maxLength)),v.pathToSchema.set(v.path,L),getCustomChecks(L,g,v)},properties:(g,v)=>{const L=properties({...Object.fromEntries(Object.entries(g.properties).map(([g,L])=>[g,checkRef(L,v)||d(L,{...v,path:v.path+"/properties/"+g})]))},getError(g,v));return v.pathToSchema.set(v.path,L),getCustomChecks(L,g,v)},object:(g,v)=>{let L=object({...Object.fromEntries(Object.entries(g.properties).map(([g,L])=>[g,checkRef(L,v)||d(L,{...v,path:v.path+"/properties/"+g})])),...Object.fromEntries(Object.entries(g.symbols??{}).map(([g,L])=>{if(!v.symbols)throw new Error("A symbol key was specified, but no `symbols` option was found");if(!(g in v.symbols))throw new Error("A symbol key was specified and a `symbols` option was found, but not at the specified index.");return[v.symbols[Number(g)],checkRef(L,v)||d(L,{...v,path:v.path+"/symbols/"+g})]}))},getError(g,v));return g.catchall&&(L=L.catchall(d(g.catchall,v))),v.pathToSchema.set(v.path,L),getCustomChecks(L,g,v)},record:(g,v)=>{const L=record(checkRef(g.key,v)||d(g.key,{...v,path:v.path+"/key"}),checkRef(g.value,v)||d(g.value,{...v,path:v.path+"/value"}),getError(g,v));return v.pathToSchema.set(v.path,L),getCustomChecks(L,g,v)},looseRecord:(g,v)=>{const L=looseRecord(checkRef(g.key,v)||d(g.key,{...v,path:v.path+"/key"}),checkRef(g.value,v)||d(g.value,{...v,path:v.path+"/value"}),getError(g,v));return v.pathToSchema.set(v.path,L),getCustomChecks(L,g,v)},map:(g,v)=>{let L=map(checkRef(g.key,v)||d(g.key,{...v,path:v.path+"/key"}),checkRef(g.value,v)||d(g.value,{...v,path:v.path+"/value"}),getError(g,v));return"min"in g&&void 0!==g.min&&(L=L.min(g.min)),"max"in g&&void 0!==g.max&&(L=L.max(g.max)),v.pathToSchema.set(v.path,L),getCustomChecks(L,g,v)},enum:(g,v)=>getCustomChecks(_enum(g.values,getError(g,v)),g,v),union:(g,v)=>{const L=union(g.options.map((g,L)=>checkRef(g,v)||d(g,{...v,path:v.path+"/options/"+L})),getError(g,v));return v.pathToSchema.set(v.path,L),getCustomChecks(L,g,v)},discriminatedUnion:(g,v)=>{const L=discriminatedUnion(g.discriminator,g.options.map((g,L)=>checkRef(g,v)||d(g,{...v,path:v.path+"/options/"+L})),getError(g,v));return v.pathToSchema.set(v.path,L),getCustomChecks(L,g,v)},xor:(g,v)=>{const L=xor(g.options.map((g,L)=>checkRef(g,v)||d(g,{...v,path:v.path+"/options/"+L})),getError(g,v));return v.pathToSchema.set(v.path,L),getCustomChecks(L,g,v)},intersection:(g,v)=>{const L=intersection(checkRef(g.left,v)||d(g.left,{...v,path:v.path+"/left"}),checkRef(g.right,v)||d(g.right,{...v,path:v.path+"/right"}));return v.pathToSchema.set(v.path,L),getCustomChecks(L,g,v)},promise:(g,v)=>{const L=promise(checkRef(g.value,v)||d(g.value,{...v,path:v.path+"/value"}));return v.pathToSchema.set(v.path,L),getCustomChecks(L,g,v)},catch:(g,v)=>{let L=checkRef(g.innerType,v)||d(g.innerType,{...v,path:v.path+"/innerType"});return L=L.catch(g.value),v.pathToSchema.set(v.path,L),getCustomChecks(L,g,v)},transform:(g,v)=>{if(!v.transforms||!(g.name in v.transforms))throw new Error("Must supply transforms for the given transform name, "+g.name);return getCustomChecks(transform(v.transforms[g.name]),g,v)},codec:(g,v)=>{const L=v.codecs?.[g.name];if(!L)throw new Error("Must supply a codec for the given codec name, "+g.name);return getCustomChecks(codec(d(g.input,{...v,path:v.path+"/input"}),d(g.output,{...v,path:v.path+"/output"}),L),g,v)},instanceof:(g,v)=>{const L=v.instances?.[g.name];if(!L)throw new Error("Must supply an instance constructor for the given name, "+g.name);const R=getError(g,v);return _instanceof(L,"string"==typeof R?{error:R}:R)},pipe:(g,v)=>{if("truthy"in g)return stringbool({truthy:g.truthy,falsy:g.falsy});const L=checkRef(g.inner,v)||d(g.inner,{...v,path:v.path+"/inner"});return getCustomChecks(L.pipe(d(g.outer,{...v,path:v.path+"/outer"})),g,v)}},es6,hasRequiredEs6;function dezerializeRefs(g,v){if("isOptional"in g){const{isOptional:L,...R}=g,W=d(R,v),ie=L?W.optional():W;return v.pathToSchema.set(v.path,ie),ie}if("isNullable"in g){const{isNullable:L,...R}=g,W=d(R,v),ie=L?W.nullable():W;return v.pathToSchema.set(v.path,ie),ie}if("defaultValue"in g){const{defaultValue:L,...R}=g,W=d(R,v).default("bigInt"===g.type?BigInt(L):"date"===g.type?new Date(L):L);return v.pathToSchema.set(v.path,W),W}if("readonly"in g){const{readonly:L,...R}=g,W=d(R,v),ie=L?W.readonly():W;return v.pathToSchema.set(v.path,ie),ie}if("description"in g&&"string"==typeof g.description){const{description:L,...R}=g,W=d(R,v).meta({description:L});return v.pathToSchema.set(v.path,W),W}if("meta"in g&&g.meta){const{meta:L,...R}=g,W=d(R,v).meta(L);return v.pathToSchema.set(v.path,W),W}return dezerializers[g.type](g,v)}function resolvePointer(g,v){return v.split("/").slice(1).reduce((g,v)=>void 0===g?g:g[v.replace(/~1/g,"/").replace(/~0/g,"~")],g)}function dezerialize(g,v={}){"path"in v||(v.path="#"),"pathToSchema"in v||(v.pathToSchema=new Map),"$refs"in v||(v.$refs=[]),"originalShape"in v||(v.originalShape=g);const L=v,R=dezerializeRefs(g,L);for(const[g,v]of L.$refs)g._zod.def.getter=()=>{const g=L.pathToSchema.get(v);if(g)return g;const R=dezerialize(resolvePointer(L.originalShape,v),L);return L.pathToSchema.set(v,R),R};return R}function requireEs6(){return hasRequiredEs6||(hasRequiredEs6=1,es6=function equal(g,v){if(g===v)return!0;if(g&&v&&"object"==typeof g&&"object"==typeof v){if(g.constructor!==v.constructor)return!1;var L,R,W;if(Array.isArray(g)){if((L=g.length)!=v.length)return!1;for(R=L;0!==R--;)if(!equal(g[R],v[R]))return!1;return!0}if(g instanceof Map&&v instanceof Map){if(g.size!==v.size)return!1;for(R of g.entries())if(!v.has(R[0]))return!1;for(R of g.entries())if(!equal(R[1],v.get(R[0])))return!1;return!0}if(g instanceof Set&&v instanceof Set){if(g.size!==v.size)return!1;for(R of g.entries())if(!v.has(R[0]))return!1;return!0}if(ArrayBuffer.isView(g)&&ArrayBuffer.isView(v)){if((L=g.length)!=v.length)return!1;for(R=L;0!==R--;)if(g[R]!==v[R])return!1;return!0}if(g.constructor===RegExp)return g.source===v.source&&g.flags===v.flags;if(g.valueOf!==Object.prototype.valueOf)return g.valueOf()===v.valueOf();if(g.toString!==Object.prototype.toString)return g.toString()===v.toString();if((L=(W=Object.keys(g)).length)!==Object.keys(v).length)return!1;for(R=L;0!==R--;)if(!Object.prototype.hasOwnProperty.call(v,W[R]))return!1;for(R=L;0!==R--;){var ie=W[R];if(!equal(g[ie],v[ie]))return!1}return!0}return g!=g&&v!=v}),es6}var es6Exports=requireEs6(),deepEqual=getDefaultExportFromCjs(es6Exports);const unescapeJSONPointerPart=g=>g.replaceAll(/~([01])/gu,(g,v)=>"0"===v?"~":"/"),getJSONPointerParts=g=>g.split("/").slice(1).map(g=>unescapeJSONPointerPart(g)),reduceJSONPointerParts=(g,v)=>{if(!Object.hasOwn(g,v))throw new TypeError("Path part not found in object");return g=g[v]},resolveJSONPointer=({path:g,obj:v})=>getJSONPointerParts(g).reduce((g,v)=>reduceJSONPointerParts(g,v),v),typesonPathToJSONPointer=g=>g?"/"+g.split(".").map(g=>g.replaceAll("~1",".").replaceAll("/","~1")).join("/"):g;function copyObject(g){const v=Array.isArray(g)?[]:{};for(const[L,R]of Object.entries(g))v[L]=R&&"object"==typeof R?copyObject(R):R;return v}class FileList{constructor(g){this._files=g,this.length=this._files.length}item(g){return this._files[g]}get[Symbol.toStringTag](){return"FileList"}}const zodexToStructuredCloningTypeMap=new Map([["boolean","boolean"],["number","number"],["nan","nan"],["bigInt","bigint"],["string","string"],["date","date"],["file","file"],["undefined","undef"],["void","undef"],["null","null"],["array","arrayNonindexKeys"],["object","object"],["properties","object"],["tuple","array"],["record","object"],["looseRecord","object"],["map","map"],["set","set"],["promise","promise"],["function","function"]]);function getValueType(g){if(null===g)return"null";switch(typeof g){case"undefined":return"undef";case"bigint":return"bigint";case"boolean":return"boolean";case"number":return"number";case"string":return"string";default:return}}function splitConstrainedSchema(g){const v="literal"===g.type?g.values:Object.values(g.values),L=new Set(v.map(g=>getValueType(g)));return new Set([...L].flatMap(L=>{if(!L)return[];const R=v.filter(g=>getValueType(g)===L),{defaultValue:W}=g;return[{...g,values:"literal"===g.type?R:Object.fromEntries(Object.entries(g.values).filter(([,g])=>getValueType(g)===L)),defaultValue:R.includes(W)?W:R[0]}]}))}function getCheckedType(g){return g.checks?.[0]?.name}function isStringboolSchema(g){return"pipe"===g.type&&"string"===g.inner?.type&&"boolean"===g.outer?.type&&"case"in g&&"falsy"in g&&"truthy"in g}function getSchemaType(g){return isStringboolSchema(g)?"string":"codec"===g.type&&"filelist"===g.name?"filelist":"instanceof"===g.type?g.name:"literal"===g.type?getValueType(g.values[0]):"enum"===g.type?getValueType(Object.values(g.values)[0]):"templateLiteral"===g.type?"string":getCheckedType(g)??zodexToStructuredCloningTypeMap.get(g.type)}const dezerializerInstances={filelist:FileList},dezerializerCodecs={filelist:{decode:g=>Array.from({length:g.length},(v,L)=>g.item(L)),encode:g=>new FileList(g)}};function parseValue(g,v,L,R){return dezerialize(v,{checks:getChecks(g),codecs:dezerializerCodecs,instances:dezerializerInstances,originalShape:L}).safeParse(R)}function getInvalidIntersectionBranch(g,v,L,R){return"intersection"===v.type?getInvalidIntersectionBranch(g,v.left,L,R)??getInvalidIntersectionBranch(g,v.right,L,R):parseValue(g,v,L,R).success?void 0:v}function recordKeyConforms(g,v,L){return!v||void 0===L||(!!parseValue(g,v,v,L).success||"string"==typeof L&&""!==L.trim()&&Number.isFinite(Number(L))&&parseValue(g,v,v,Number(L)).success)}function getXorBranchMatchInfo(g,v,L){const R=v.options??[];let W=0;for(const ie of R)parseValue(g,ie,v,L).success&&W++;return{matched:W,total:R.length}}function valueMatchesSchema(g,v,L){return parseValue(g,v,v,L).success}function getChecks(g){return Object.fromEntries(Object.entries(g.availableTypes).map(([g,v])=>[g,L=>{Array.isArray(v)||!v.valueMatch||v.valueMatch(L.value)||L.issues.push({code:"custom",input:L.value,message:`Value does not match ${g}`})}]))}const intersectionSchemas=new WeakMap,originalSchemas=new WeakMap;function rememberOriginalSchema(g,v){for(const L of g)originalSchemas.set(L,v);return g}function getValidationSchema(g){return intersectionSchemas.get(g)??g}function getComparableConstraint(g,v){return"bigInt"===g?BigInt(v):v}function mergeMeta(g,v){const L={...g};for(const[g,R]of Object.entries(v))"title"===g||"description"===g?"string"==typeof R&&"Modifiers"!==R&&(L[g]="string"==typeof L[g]&&"Modifiers"!==L[g]?L[g]+" and "+R:R):Object.hasOwn(L,g)||(L[g]=R&&"object"==typeof R?copyObject(R):R);return L}function isPropertyBagType(g){return"object"===g||"properties"===g}function mergeSchema(g,v){if(g.type!==v.type)throw new Error("Cannot merge intersection types "+g.type+" and "+v.type);const L=copyObject(g);for(const[R,W]of Object.entries(v))if("type"!==R&&"properties"!==R&&"error"!==R)if("description"===R){if("Modifiers"!==W){const g=L[R];L[R]=g?g+" and "+W:W}}else if("meta"===R)L.meta=mergeMeta(L.meta,W);else if(Object.hasOwn(L,R)){if(L[R]!==W&&!deepEqual(L[R],W)){if(isPropertyBagType(g.type))throw new Error("Duplicate property "+R+" of value "+JSON.stringify(W)+" and "+JSON.stringify(L[R]));if("min"===R||"minLength"===R){const ie=getComparableConstraint(g.type,L[R]),ce=getComparableConstraint(v.type,W);L[R]=ie>ce?L[R]:W}else if("max"===R||"maxLength"===R){const ie=getComparableConstraint(g.type,L[R]),ce=getComparableConstraint(v.type,W);L[R]=ie<ce?L[R]:W}}}else L[R]=W&&"object"==typeof W?copyObject(W):W;if(!isPropertyBagType(g.type)||!isPropertyBagType(v.type))return delete L.error,L;for(const[g,R]of Object.entries(v.properties)){if("string"!=typeof L.properties&&Object.hasOwn(L.properties,g)){if(deepEqual(L.properties[g],R))continue;throw new Error("Duplicate property "+g+" of value "+JSON.stringify(R)+" and "+JSON.stringify(L.properties[g]))}L.properties[g]=R&&"object"==typeof R?copyObject(R):R}return L}function flattenIntersection(g,v){const L=[...g],R=[...v],W=[];for(const g of L)for(const v of R)W.push(mergeSchema(g,v));return W}let unionGroupID=0;function addModifiers(g,v){if("defaultValue"in g){unionGroupID++;for(const L of v)L.$unionGroupID=unionGroupID,L.$defaultValue=g.defaultValue}if(g.isNullable&&v.push({type:"null"}),g.isOptional)for(const L of v)"isOptional"in L||(L.isOptional=g.isOptional);if(g.readonly)for(const L of v)"readonly"in L||(L.$readonlyParent=g.readonly);if(g.description)for(const L of v)L.description=L.description?L.description+" and "+g.description:g.description;if(g.meta&&"object"==typeof g.meta)for(const L of v)L.meta=mergeMeta(L.meta,g.meta)}function getTypesForSchema(g,v){for(;;){if(getCheckedType(g))return rememberOriginalSchema(new Set([g]),v);switch(g.type){case"never":return new Set;case"literal":case"enum":return rememberOriginalSchema(splitConstrainedSchema(g),v);case"catch":{const L=g,R=[...getTypesForSchema(L.innerType,v)].map(g=>({...g}));addModifiers(g,R);const W=[...getTypesForSchema({type:"literal",values:[L.value]},v)];return addModifiers(g,W),rememberOriginalSchema(new Set([...R,...W]),v)}case"properties":case"object":{const L=new Set;return L.add(g),rememberOriginalSchema(L,v)}case"discriminatedUnion":case"xor":case"union":{let L=[];for(const R of g.options)L=[...L,...getTypesForSchema(R,v)];if("discriminatedUnion"===g.type)for(const v of L)v.$discriminator=g.discriminator;return addModifiers(g,L),rememberOriginalSchema(new Set(L),v)}case"intersection":{const L=flattenIntersection(getTypesForSchema(g.left,v),getTypesForSchema(g.right,v));for(const v of L)intersectionSchemas.set(v,g);return addModifiers(g,L),rememberOriginalSchema(new Set(L),v)}case"pipe":{if(isStringboolSchema(g)){const L={...g};delete L.description;const R=[L];return addModifiers(g,R),rememberOriginalSchema(new Set(R),v)}const L=[...getTypesForSchema(g.inner,v)];return addModifiers(g,L),rememberOriginalSchema(new Set(L),v)}case"any":case"unknown":return rememberOriginalSchema(new Set([{type:"boolean"},{type:"number"},{type:"nan"},{type:"bigInt"},{type:"string"},{description:"Email",type:"string",kind:"email"},{description:"URL",type:"string",kind:"url"},{description:"Date",type:"string",kind:"date"},{type:"date"},{type:"undefined"},{type:"null"},{type:"object",properties:{},catchall:{type:"unknown"}},{type:"array",element:{type:"any"}},{type:"set",value:{type:"any"}},{type:"map",key:{type:"any"},value:{type:"any"}},{type:"any",checks:[{name:"regexp"}]},{type:"any",checks:[{name:"blob"}]},{type:"any",checks:[{name:"BooleanObject"}]},{type:"any",checks:[{name:"NumberObject"}]},{type:"any",checks:[{name:"StringObject"}]},{type:"any",checks:[{name:"SpecialRealNumber"}]},{type:"any",checks:[{name:"domexception"}]},{type:"any",checks:[{name:"error"}]},{type:"any",checks:[{name:"filelist"}]},{type:"any",checks:[{name:"file"}]},{type:"any",checks:[{name:"resurrectable"}]},{type:"any",checks:[{name:"blobHTML"}]},{type:"any",checks:[{name:"buffersource"}]},{type:"any",checks:[{name:"dommatrix"}]},{type:"any",checks:[{name:"dompoint"}]},{type:"any",checks:[{name:"domrect"}]},{type:"any",checks:[{name:"errors"}]},{description:"JSON Reference",type:"object",properties:{$ref:{type:"string"}}}]),v);default:if("$ref"in g){g=resolveJSONPointer({obj:v,path:g.$ref});continue}return rememberOriginalSchema(new Set([g]),v)}}}const schema={isValueValidationRequired:g=>!!["record","looseRecord","tuple"].includes(g.type)||!isPropertyBagType(g.type)&&intersectionSchemas.has(g),validateValue(g,v,L){const R=getValidationSchema(v),W=originalSchemas.get(v)??originalSchemas.get(R)??R,ie=parseValue(g,R,W,L);return ie.success?{valid:!0}:{valid:!1,message:ie.error.issues[0]?.message,schema:"intersection"===R.type?getInvalidIntersectionBranch(g,R,W,L):R}},iterate:(g,v)=>(v.format="schema",structuredCloning.iterate(g,v)),convertFromTypeson(g,v,L,R,W,ie){let[ce,le]=W??[];if(!ie)throw new Error("State object expected for schema");let ue=ie.schemaContent,me=!1;switch("number"==typeof le&&isUnionLike(ce?.type)&&(ce=ce.options[le]),ce?.type){case"object":case"properties":ue=ce.properties[R],ue||(me=!0,ue=ce.catchall??{type:"unknown"});break;case"array":ue=ce.element;break;case"set":case"promise":ue=ce.value;break;case"codec":"filelist"===ce.name&&"array"===ce.output.type&&(ue="file"===g?ce.output.element:ce);break;case"tuple":ue=ce.items[Number(R)]??ce.rest;break;case"record":ue=ce.value,me=!0;break;case"looseRecord":me=!0,ue=recordKeyConforms(v,ce.key,R)?ce.value:void 0}if(!ue)return{type:g};const ge=[...getTypesForSchema(ue,ie.schemaContent)];let ve,xe;for(const[g,R]of ge.entries()){const W=getSchemaType(R),ce=v.getTypeObject(W);if(!ce.valueMatch?.(L))continue;const le=dezerialize(R,{checks:getChecks(v),codecs:dezerializerCodecs,instances:dezerializerInstances,originalShape:ie.schemaContent}),ue="promise"===W?{success:!0}:le.safeParse(L),_e={type:W,schemaIdx:g,schema:!ie.rootUI||ie.readonly||1===ge.length?R:{type:"union",options:ge},mustBeOptional:me};if(ue.success){if("promise"===W||"data"in ue&&deepEqual(ue.data,L))return _e;ve??=_e}else xe??=_e}return ve||(xe||{type:g})},types:()=>structuredCloning.types(),getTypesAndSchemasForState(g,v,L,R){if(!L)throw new Error("Missing schema object");if("array"===v)return structuredCloning.getTypesAndSchemasForState(g,v,L,R);const W=[...getTypesForSchema(L,R??L)];return{schemaObjects:W,types:W.map(g=>getSchemaType(g))}}},localeStrings={submit:"Submit",cancel:"Cancel",ok:"Ok"},dialogs={localeStrings:{},setLocale(g={}){this.localeStrings={...localeStrings,...g}},makeDialog({atts:g={},children:v=[],close:L,remove:R=!0}={}){L&&(g.$on||(g.$on={}),"close"in g.$on||(g.$on.close=L));const W=jmlExports.jml("dialog",g,v,jmlExports.body);return W.showModal(),R&&W.addEventListener("close",()=>{W.remove()}),W},makeCancelDialog({cancel:g,cancelClass:v="cancel",submitClass:L="submit",...R}){const W=this.makeDialog(R);return jmlExports.jml("div",{class:L},[["br"],["br"],["button",{class:v,$on:{click(v){v.preventDefault(),g&&g.call(this,{e:v,dialog:W})||W.close()}}},[this.localeStrings.cancel]]],W),W},makeSubmitDialog({submit:g,submitText:v,submitClass:L="submit",...R}){const W=this.makeCancelDialog(R);return $e(W,`button.${R.cancelClass||"cancel"}`)?.before(jmlExports.jml("button",{class:L,$on:{click(v){g.call(this,{e:v,dialog:W})}}},[v??this.localeStrings.submit]),jmlExports.nbsp.repeat(2)),W},alert(g){g=g&&"object"==typeof g?g:{message:g};const{submitClass:v="submit"}=g,{message:L}=g;return new Promise(g=>{const R=jmlExports.jml("dialog",[L,["br"],["br"],["div",{class:v},[["button",{$on:{click(){R.close(),g()}}},[this.localeStrings.ok]]]]],jmlExports.body);R.showModal()})},confirm({atts:g={},message:v,submitClass:L="submit"}){return({message:v}="string"==typeof v?{message:v}:v),new Promise((R,W)=>{const ie=jmlExports.jml("dialog",g,[v,["br"],["br"],["div",{class:L},[["button",{$on:{click(){ie.close(),R()}}},[this.localeStrings.ok]],jmlExports.nbsp.repeat(2),["button",{$on:{click(){ie.close(),W(new Error("cancelled"))}}},[this.localeStrings.cancel]]]]],jmlExports.body);ie.showModal()})}};dialogs.setLocale();const tick=()=>new Promise(g=>{setTimeout(g,0)}),MAX_CONNECT_WAIT_TICKS=50,whenConnected=async(g,v=MAX_CONNECT_WAIT_TICKS)=>{for(let L=0;!g.isConnected&&L<v;L++)await tick();return g.isConnected},typeChoicesAPIMethods=["$getValue","$setType","$setTypeNoEditUI","$setStyles","$getTypeRoot","$addAndValidateEditUI","$addTypeAndEditUI","$addEditUI","$getContainer","$getTopRoot","$validate","$whenReady"];function deriveXorBranchLabel(g,v,L){if(g&&"description"in g&&g.description)return g.description;if(g&&"literal"===g.type){const{values:v}=g;if(Array.isArray(v)&&v.length)return String(v[0])}if(g&&("object"===g.type||"properties"===g.type)){const{properties:v}=g,L=v&&"object"==typeof v?Object.keys(v):[];if(L.length)return L.length>3?`${L.slice(0,3).join(", ")}, +${L.length-3} more`:L.join(", ")}return v||`Option ${L+1}`}function buildXorTypeChoices({typeNamespace:g,keySelectClass:v,typeOptions:L,schemaObjs:R,types:W,typeContainer:ie,xorSchema:ce,selectEl:le}){const ue=`typeChoices-${g}-xor`,me=jmlExports.jml("fieldset",{class:`typeChoices-${g} xorTypeChoices${v?" "+v:""}`,$on:{change(g){g?.stopPropagation();const v=g.target?.dataset?.idx??this.selectedOptions[0]?.dataset?.idx;this.$addAndValidateEditUI({schemaObject:void 0===v?void 0:R[Number(v)]}),this.$setStyles(),updateMatchStatus()}}},[["legend",{class:"xorTypeChoicesLegend"},["Exactly one of"]],...L.map(([g,v],L)=>["label",{class:"xorTypeChoice"},[["input",{type:"radio",name:ue,value:v?.value??"",dataset:{idx:L}}],["span",{class:"xorTypeChoiceLabel"},[deriveXorBranchLabel(R[L],g,L)]]]]),["div",{class:"xorMatchStatus",hidden:!0}]]),radios=()=>[...me.querySelectorAll('input[type="radio"]')],ge=$e(me,".xorMatchStatus");function updateMatchStatus(){const g=radios();for(const v of g)v.setCustomValidity("");const v=g.find(g=>g.checked);if(!ce||!v||!$e(ie,"div[data-type]"))return void(ge.hidden=!0);let L;try{L=xe.$getValue()}catch{return void(ge.hidden=!0)}const{matched:le,total:ue}=getXorBranchMatchInfo(W,ce,L),me=R[Number(v.dataset.idx)],ve=Boolean(me)&&valueMatchesSchema(W,me,L),_e=ve&&1===le;ge.hidden=!1,ge.textContent=ve?_e?`Matches 1 of ${ue} options`:`Matches ${le} of ${ue} — value must match exactly one`:"Value does not match the selected option",ge.classList.toggle("xorMatchOk",_e),ge.classList.toggle("xorMatchErr",!_e),v.setCustomValidity(_e?"":ve?"Value must match exactly one option":"Value does not match the selected option")}ie.addEventListener("input",updateMatchStatus),ie.addEventListener("change",updateMatchStatus);const ve=le,xe=me;for(const g of typeChoicesAPIMethods)xe[g]=ve[g];return Object.defineProperties(me,{value:{configurable:!0,get:()=>radios().find(g=>g.checked)?.value??"",set(g){const v=radios().find(v=>v.value===g);for(const g of radios())g.checked=g===v}},selectedIndex:{configurable:!0,get(){const g=radios().findIndex(g=>g.checked);return-1===g?0:g+1},set(g){radios().forEach((v,L)=>{v.checked=L===Number(g)-1})}},selectedOptions:{configurable:!0,get(){const g=radios().find(g=>g.checked);return g?[{value:g.value,dataset:{idx:g.dataset.idx}}]:[]}}}),me}const buildTypeChoices=({autoTrigger:g=!0,format:v,typeNamespace:L,value:R,setValue:W=!1,state:ie,keySelectClass:ce,requireObject:le,objectHasValue:ue,topRoot:me,formats:ge=new Formats,types:ve=new Types,schema:xe,schemaIdx:_e,schemaOriginal:ke,schemaContent:Se})=>{const we=le&&!Se?{typeOptions:[ve.getOptionForType("object")],schemaObjects:void 0}:ve.getTypeOptionsForFormatAndState(v,ie,Se,ke),{typeOptions:Ie}=we,Ee=we.schemaObjects;let Ce,Oe;const Ne=new Promise(g=>{Oe=g}),$getValue=(g,R)=>{const W=$e(Te,"div[data-type]");return ve.getValueForRoot(W,{typeNamespace:L,formats:ge,format:v,types:ve,...g},R)},Te=jmlExports.jml("div",{class:"typeContainer"}),Ae=jmlExports.jml("select",{hidden:le||1===Ie.length,class:`typeChoices-${L}${ce?" "+ce:""}`,$custom:{$getValue:$getValue,$whenReady:()=>Ne,$setType(g){const{type:v,baseValue:L,bringIntoFocus:R,avoidReport:W,specificSchema:ie}=g;if(Ee&&ie){const g=Ee.findIndex(g=>deepEqual(g,ie));-1===g?this.value=v:this.selectedIndex=g+1}else this.value=v;this.$setStyles(),this.$addAndValidateEditUI({baseValue:L,bringIntoFocus:R,schemaObject:ie,avoidReport:W})},$setTypeNoEditUI(g){const{type:v,specificSchema:L}=g;if(Ee&&L){const g=Ee.findIndex(g=>deepEqual(g,L));this.selectedIndex=g+1}else this.value=v;this.$setStyles()},$setStyles(){const{value:g}=this;this.dataset.type=g;let v=this.parentElement;v&&("fieldset"!==v.nodeName.toLowerCase()&&(v=v.parentElement),"fieldset"===v?.nodeName.toLowerCase()&&(v.dataset.type=g,DOM.filterChildElements(v,"legend").forEach(v=>{v.dataset.type=g})))},$getTypeRoot(){const g=this.$getContainer();return!!g&&$e(g,"div[data-type]")},$addAndValidateEditUI(g={}){const{baseValue:R,bringIntoFocus:W,schemaObject:ie,avoidReport:ce}=g,{value:le}=this;if(!le)return;let ue=this.$getTopRoot();Ce=ve.getUIForModeAndType({readonly:!1,typeNamespace:L,type:le,bringIntoFocus:W,hasValue:void 0!==R,value:R,buildTypeChoices:buildTypeChoices,format:v,topRoot:ue,schemaContent:ke??(void 0!==_e&&isUnionLike(Se?.type)?Se.options[_e]:Se),specificSchemaObject:ie??Ee?.[Pe.selectedIndex-1]??(void 0!==_e&&isUnionLike(Se?.type)?Se.options[_e]:Se),schemaFallingBack:Boolean(!ie&&Se)}),this.$addEditUI({editUI:Ce}),this.$validate({avoidReport:ce}),ue=this.$getTopRoot(),ve.validateAllReferences({topRoot:ue,avoidReport:ce})},$addTypeAndEditUI(g){const{type:v,editUI:L,specificSchema:R}=g;this.$setTypeNoEditUI({type:v,specificSchema:R}),this.$addEditUI({editUI:L})},$addEditUI(g){const{editUI:v}=g,L=this.$getContainer();DOM.removeChildren(L),jmlExports.jml(v,L)},$getContainer(){return this.nextElementSibling},$getTopRoot(){return me||this.$getTypeRoot()},$validate(g={}){const{avoidReport:v}=g,{value:L}=this,R=this.$getContainer();if(!R.firstElementChild)return!1;const W=R.firstElementChild;return ve.validate({type:L,root:W,topRoot:this.$getTopRoot(),avoidReport:v})}},$on:{change(g){g?.stopPropagation(),this.$addAndValidateEditUI({schemaObject:Ee?Ee[Number(g.target.selectedOptions[0].dataset.idx)]:void 0}),this.$setStyles()}}},[["option",{value:""},["(Choose a type)"]],...Ie.map(([g,v],L)=>["option",{...v,dataset:Ee?{idx:L}:{}},[g]])]),Pe=Boolean(Ee&&!le&&Ie.length>1&&("xor"===Se?.type||"xor"===ke?.type))?buildXorTypeChoices({typeNamespace:L,keySelectClass:ce,typeOptions:Ie,types:ve,typeContainer:Te,schemaObjs:Ee,xorSchema:"xor"===Se?.type?Se:ke,selectEl:Ae}):Ae;return g&&!W&&1===Ie.length?setTimeout(async()=>{try{if(!await whenConnected(Pe))return;Pe.selectedIndex=1,Pe.dispatchEvent(new Event("change"))}finally{Oe()}},0):W||le&&!ue?setTimeout(async()=>{try{if(!await whenConnected(Pe))return;W||(R={});try{const g=await ge.getControlsForFormatAndValue(ve,v,R,{readonly:!1,typeNamespace:L,schema:xe,schemaContent:Se,formats:ge,types:ve}),{rootUI:W,specificSchemas:ie}=g,ce=Types.getTypeForRoot(W);Pe.$addTypeAndEditUI({type:ce,editUI:W,specificSchema:ie?.[0]}),await g.whenBuilt}catch(g){dialogs.alert({message:"The object to be added had types not supported by the current format."}),console.log("err",g)}}finally{Oe()}},0):setTimeout(()=>{Oe()},0),{domArray:[Pe,Te],whenReady:Ne,getValue:$getValue,getType(){const g=$e(Te,"div[data-type]");return Types.getTypeForRoot(g)},validValuesSet(){const g=$e(Te,"div[data-type]");if(!g)return!1;const v=g.closest("form");return Types.validValuesSet({form:v,typeNamespace:L})},async setValue(g,L){const R=(await ge.getControlsForFormatAndValue(ve,v,g,L)).rootUI,W=Types.getTypeForRoot(R);Pe.$addTypeAndEditUI({type:W,editUI:R})}}},typesonToJson=new Map([["arrayNonindexKeys","array"]]),json={types:()=>["null","true","false","number","string","array","object"],iterate(g,v){const L=g;return v.format="json",structuredCloning.iterate(L,v)},convertFromTypeson:g=>({type:typesonToJson.get(g)}),testInvalid(g,v){if("array"===g)return Object.keys(v).length!==v.length},getTypesAndSchemasForState(g,v){if(!v||["array","object"].includes(v))return{types:this.types(),schemaObjects:[]}}},functionSpec={function:{test:g=>"function"==typeof g,replace:g=>"("+g.toString()+")",revive(o){return eval(o)}}},structuredCloningJsoe=fe.filter(g=>["imagedata","imagebitmap","domquad","quotaexceedederror","webtransporterror","cryptokey","audiodata","encodedaudiochunk","encodedvideochunk","videoframe"].every(v=>!Object.hasOwn(g,v))),MAX_PARENT_WAIT_TICKS=50;G.resurrectable.test=g=>g&&"object"==typeof g&&!Array.isArray(g)&&"Object"!==toStringTag(g);const encapsulateObserver=g=>{const{typeNamespace:v,readonly:L,format:R,schemaContent:W,formats:ie,types:ce}=g,le=R,ue=g.pendingBuilds||=[],me={},ge={},ve=[],xe=[];return R=>{const{type:_e,cyclic:ke,keypath:Se,value:we,replaced:Ie,cyclicKeypath:Ee,endIterateIn:Ce,endIterateOwn:Oe,endIterateUnsetNumeric:Ne,clone:Te}=R;if(xe.some(g=>""===g?""!==Se:Se.startsWith(`${g}.`)))return;if("replaced"in R)return;if("readonly"===ke&&!Array.isArray(R.value))return;if("readonly"===ke&&("set"===_e||"filelist"===_e))return;if(Ce||Oe)return;if(Ne||void 0===Te&&void 0===Ee&&Array.isArray(we))return;if("negativeZero"===_e&&R.replacing)return;if("sparseUndefined"===_e)return;let Ae,Pe=we;const je="structuredCloning"===le?"arrayNonindexKeys":"array",ze=Se.lastIndexOf("."),De=unescapeKeyPathComponent(Se.slice(ze+1)),Ze=-1===ze?"":Se.slice(0,ze);let Ue,Le,Re;if("string"==typeof Ee)Pe=typesonPathToJSONPointer(Ee),Ae="array"===_e?"arrayReference":"objectReference",({newType:Ae,schema:Ue,schemaIdx:Le,mustBeOptional:Re}=canonicalTypeToAvailableTypeAndSchema(ce,ie,le,je,Ae,we,De,ge[Ze],g));else try{({newType:Ae,schema:Ue,schemaIdx:Le,mustBeOptional:Re}=canonicalTypeToAvailableTypeAndSchema(ce,ie,le,je,_e,we,De,ge[Ze],g))}catch(v){return console.log("err",_e,v,we),void(g.error=v)}const Ve=["array","object","set","map","filelist","arrayNonindexKeys"].includes(Ae);"symbol"!==_e&&"file"!==_e||xe.push(Se);const Me="map"===_e&&"[object Map]"===Object.prototype.toString.call(we);if(Me&&ve.push(Se),Ue&&(g.specificSchema=Ue,g.specificSchemas||(g.specificSchemas=[]),g.specificSchemas.push(Ue)),!g.rootUI)return g.rootUI=ce?.getUIForModeAndType({readonly:L,typeNamespace:v,type:Ae,bringIntoFocus:!1,buildTypeChoices:buildTypeChoices,format:le,specificSchemaObject:Ue,schemaContent:W,value:Pe,hasValue:!0,replaced:Ie}),me[""]=g.rootUI,Ue&&(ge[""]=[Ue,Le]),void(Me&&[...we].forEach((v,L)=>{me[L]=g.rootUI}));Ue&&(ge[Se]=[Ue,Le]),ue.push((async()=>{await tick();let v=me[Ze];for(let g=0;(!v||!("$addAndSetArrayElement"in v))&&g<MAX_PARENT_WAIT_TICKS;g++)await tick(),v=me[Ze];if(!v||!("$addAndSetArrayElement"in v))return g.buildWarnings||(g.buildWarnings=[]),void g.buildWarnings.push({keypath:Se,type:Ae,reason:"no parent UI registered"});if(!Me&&ve.some(g=>{if(g===Se||""===g&&/^\d+$/u.test(Se))return!0;const v=Se.match(/\.\d+$/u);return v&&""!==g&&Se.slice(0,-v[0].length)===g}))return;const R=v.$addAndSetArrayElement({mustBeOptional:Re,propName:De,type:Ae,value:Pe,bringIntoFocus:!1,schemaIdx:Le,schemaContent:Ue??W});R&&(Ve&&(me[Se]=R,Me&&[...we].forEach((g,v)=>{me[`${Se}.${v}`]=R})),L||(await(ce?.setValue({type:Ae,root:R,value:Pe})),ce?.validate({type:Ae,root:R,topRoot:g.rootUI,avoidReport:!0})))})().catch(v=>{g.buildWarnings||(g.buildWarnings=[]),g.buildWarnings.push({keypath:Se,type:Ae,reason:v?.message??String(v)})}))}},replaceTypes=(g,v)=>{v.forEach(([v,L])=>{g.splice(g.indexOf(v),1,L)})},canonicalTypeToAvailableTypeAndSchema=(g,v,L,R,W,ie,ce,le,ue)=>{const me=v.getAvailableFormat(L),{getTypesAndSchemasForState:ge,convertFromTypeson:ve,testInvalid:xe}=me,_e=ge.call(me,g,R,ue.schemaContent)?.types;if(!_e)throw new Error("Unexpected undefined type for state");let ke;"array"===W&&_e.includes("arrayNonindexKeys")&&(W="arrayNonindexKeys");const isInvalid=g=>{const v=new Error("Invalid");throw v.newValType=g,v};let Se;if(ve){let v,L,R;if(({type:v,schema:Se,schemaIdx:R,mustBeOptional:L}=ve(W,g,ie,ce,le,ue)),"string"==typeof v){if(xe&&xe(v,ie))return isInvalid(v);if(W=v,Se)return{newType:W,schema:Se,schemaIdx:R,mustBeOptional:L}}}return _e.some(v=>{const L=g.getTypeObject(v),{valueMatch:R,superType:ce,childTypes:le}=L;return!!(ce&&R&&ce===W&&R(ie)||le&&le.includes(W))&&(ke=v,!0)}),void 0===ke&&(_e.some(g=>g===W&&(ke=g,!0)),void 0===ke)?(console.log("AALLLowableTypes",R,_e,"::",W,ie),isInvalid(W)):{newType:ke,schema:Se}},structuredCloning={async iterate(g,v){v.format||(v.format="structuredCloning"),structuredCloningJsoe.splice(1,0,G);const L=new Typeson({encapsulateObserver:encapsulateObserver(v)}).register("arbitraryJS"===v.format||"schema"===v.format?[...structuredCloningJsoe,Y,V,functionSpec]:structuredCloningJsoe);if(await L.encapsulateAsync(g,null,{throwOnBadSyncType:!1}),v.whenBuilt=(async()=>{await Promise.allSettled(v.pendingBuilds??[])})(),v.error)throw v.error;return v},getTypesAndSchemasForState(g,v){if(v&&g.getContextInfo("structuredCloning",v)){const L=this.getTypesAndSchemasForState(g)?.types||[];return g.getContextInfo("structuredCloning",v).forEach(({type:g,after:v})=>{const R=L.indexOf(v);L.splice(R+1,0,g)}),{types:L,schemaObjects:[]}}return"errorsArray"===v?{types:["error","errors"],schemaObjects:[]}:"filelistArray"===v?{types:["file"],schemaObjects:[]}:{types:this.types(),schemaObjects:[]}},types(){const g=json.types();return replaceTypes(g,[["array","arrayNonindexKeys"]]),[...g,"undef","bigint","bigintObject","SpecialNumber","date","regexp","BooleanObject","NumberObject","StringObject","error","errors","blob","blobHTML","file","set","map","filelist","domexception","domrect","dompoint","dommatrix","buffersource","resurrectable"]}},indexedDBKey={types:()=>["number","SpecialRealNumber","string","ValidDate","array","buffersource"],testInvalid(g,v){switch(g){case"SpecialRealNumber":return Number.isNaN(v);case"ValidDate":return Number.isNaN(v.getTime());case"array":return Object.keys(v).length!==v.length;default:return!1}},convertFromTypeson:g=>({type:typesonToIndexedDBKey.get(g)}),iterate:(g,v)=>(v.format="indexedDBKey",structuredCloning.iterate(g,v)),getTypesAndSchemasForState(g,v){if(!v||["array"].includes(v))return{types:this.types(),schemaObjects:[]}}},typesonToIndexedDBKey=new Map([["SpecialNumber","SpecialRealNumber"],["date","ValidDate"],["arrayNonindexKeys","array"]]),arbitraryJS={types:()=>[...structuredCloning.types(),"symbol","promise","function"],iterate(g,v){const L=g;return v.format="arbitraryJS",structuredCloning.iterate(L,v)},getTypesAndSchemasForState(g,v){return structuredCloning.getTypesAndSchemasForState.call(this,g,v)}};class Formats{constructor(){this.availableFormats={indexedDBKey:indexedDBKey,json:json,structuredCloning:structuredCloning,arbitraryJS:arbitraryJS,schema:schema}}async getControlsForFormatAndValue(g,v,L,R){return await this.availableFormats[v].iterate(L,{...R,types:g,formats:this,format:v})}getTypesAndSchemasForFormatAndState(g,v,L,R,W){return this.availableFormats[v].getTypesAndSchemasForState(g,L,R,W)}getAvailableFormat(g){return this.availableFormats[g]}}const RESERVED=new Set(["title","description","id","deprecated"]);function stringifyMetaValue(g){return"string"==typeof g?g:JSON.stringify(g)}function resolveSchemaMeta(g){const v=g&&"object"==typeof g?g:void 0,L=v&&v.meta&&"object"==typeof v.meta?v.meta:void 0,R="string"==typeof v?.description?v.description:void 0,W="string"==typeof L?.title?L.title:void 0,ie="string"==typeof L?.description?L.description:void 0,ce="string"==typeof L?.id?L.id:void 0,le="boolean"==typeof L?.deprecated||"string"==typeof L?.deprecated?L.deprecated:void 0,ue=L&&L.jsoe&&"object"==typeof L.jsoe?L.jsoe:void 0,me=L?Object.entries(L).filter(([g])=>!RESERVED.has(g)&&"jsoe"!==g):[],ge=W??ie??R,ve=W?ie:void 0,xe=[];W&&xe.push(["Title",W]);const _e=ie??R;_e&&xe.push(["Description",_e]),void 0!==ce&&xe.push(["ID",ce]),void 0!==le&&!1!==le&&xe.push(["Deprecated",!0===le?"yes":String(le)]);for(const[g,v]of me)xe.push([g,stringifyMetaValue(v)]);if(ue)for(const[g,v]of Object.entries(ue))xe.push([`jsoe.${g}`,stringifyMetaValue(v)]);return{label:ge,longText:ve,id:ce,deprecated:le,custom:me,jsoe:ue,rows:xe,hasAny:xe.length>0}}function schemaLabel(g){return resolveSchemaMeta(g).label}function isDeprecated(g){const{deprecated:v}=resolveSchemaMeta(g);return void 0!==v&&!1!==v}function deprecatedClassSuffix(g){return isDeprecated(g)?" schema-deprecated":""}function lastTypeChild(g){let v=g.lastElementChild;for(;v&&v.classList.contains("schema-meta");)v=v.previousElementSibling;return v}function metaTooltipText(g){return g.map(([g,v])=>`${g}: ${v}`).join("\n")}function metaTable(g){return["table",{class:"schema-meta-table"},[["tbody",g.map(([g,v])=>["tr",[["th",[g]],["td",[v]]]])]]]}function appendSchemaMeta(g,v){const L=resolveSchemaMeta(v);if(!L.hasAny)return;void 0!==L.deprecated&&!1!==L.deprecated&&g.classList.add("schema-deprecated");const onToggle=g=>{g.preventDefault();const v=g.target.closest(".schema-meta-toggle");let R=v.nextElementSibling;const W=!R||R.hidden;R||(R=jmlExports.jml(...metaTable(L.rows)),v.parentElement.append(R)),R.hidden=!W,v.setAttribute("aria-expanded",String(W))},R=["span",{class:"schema-meta"},[["span",{class:"schema-meta-toggle",role:"button",tabindex:"0","aria-expanded":"false","aria-label":"Schema metadata",title:metaTooltipText(L.rows),$on:{click:onToggle,keydown:g=>{"Enter"!==g.key&&" "!==g.key||onToggle(g)}}}]]];g.append(jmlExports.jml(...R))}const nullType={option:["Null"],stringRegex:/^null$/u,valueMatch:g=>null===g,toValue:()=>({value:null}),getValue:()=>null,getInput:({root:g})=>$e(g,"input"),viewUI:({specificSchemaObject:g})=>["i",{dataset:{type:"null"},title:schemaLabel(g)??"(a `null`)"},["null"]],editUI:({typeNamespace:g,specificSchemaObject:v})=>["div",{dataset:{type:"null"},title:schemaLabel(v)??"Null"},[["label",["Null",["input",{type:"checkbox",name:`${g}-null`,checked:!0,disabled:!0}]]]]]},trueType={option:["Boolean (true)",{value:"true"}],stringRegex:/^true$/u,toValue:()=>({value:!0}),valueMatch:g=>!0===g,superType:"boolean",getValue:()=>!0,viewUI:()=>["i",{dataset:{type:"true"}},["true"]],ct:0,getInput:({root:g})=>$e(g,"input"),editUI({typeNamespace:g}){return this.ct++,["div",{dataset:{type:"true"}},[["label",["True",["input",{type:"radio",name:`${g}-true${this.ct}`,value:"true",checked:!0}]]],["label",["False",["input",{type:"radio",name:`${g}-true${this.ct}`,value:"false",disabled:!0}]]]]]}},falseType={option:["Boolean (false)",{value:"false"}],stringRegex:/^false$/u,toValue:()=>({value:!1}),valueMatch:g=>!1===g,superType:"boolean",getValue:()=>!1,viewUI:()=>["i",{dataset:{type:"false"}},["false"]],ct:0,getInput:({root:g})=>$e(g,"input[value=false]"),editUI({typeNamespace:g}){return this.ct++,["div",{dataset:{type:"false"}},[["label",["True",["input",{type:"radio",name:`${g}-false${this.ct}`,value:"true",disabled:!0}]]],["label",["False",["input",{type:"radio",name:`${g}-false${this.ct}`,value:"false",checked:!0}]]]]]}},nanType={option:["NaN"],stringRegex:/^NaN$/u,valueMatch:g=>Number.isNaN(g),toValue:()=>({value:NaN}),getValue:()=>NaN,getInput:({root:g})=>$e(g,"input"),viewUI:({specificSchemaObject:g})=>["i",{dataset:{type:"nan"},title:schemaLabel(g)??"(a `NaN`)"},["NaN"]],editUI:({typeNamespace:g,specificSchemaObject:v})=>["div",{dataset:{type:"nan"},title:schemaLabel(v)??"NaN"},[["label",["NaN",["input",{type:"checkbox",name:`${g}-nan`,checked:!0}]]]]]},blobHTMLType={option:["Blob (text/html)"],stringRegex:/^data:text\/html(?:;base64)?,.*$/u,valueMatch:g=>g&&"text/html"===g.type,superType:"blob",toValue:g=>({value:function dataURIToBlob(g){const v=g.indexOf(","),L=g.slice(0,v),R=g.slice(v+1),[W,ie]=L.split(":",2)[1].split(";",2);let ce;if("base64"===ie){const g=atob(R);ce=new ArrayBuffer(g.length);const v=new Uint8Array(ce);for(let L=0;L<g.length;L++)v[L]=g.charCodeAt(L)}else ce=R;return new Blob([ce],{type:W})}(g)}),getInput:({root:g})=>$e(g,"textarea[name$=-blobHTML]"),getValue({root:g}){return this.toValue("data:text/html,"+this.getInput({root:g}).sceditorInstance.val()).value},loadBlob:async g=>await g.text(),async setValue({root:g,value:v}){const L=await this.loadBlob(v);this.getInput({root:g}).sceditorInstance.val(L)},viewUI({value:g,specificSchemaObject:v}){let L;const R=jmlExports.jml("div",{dataset:{type:"blobHTML"},title:schemaLabel(v)?"HTML":void 0},[schemaLabel(v)??"HTML",": ",["button",{$on:{click(){dialogs.alert({message:["div",["Source: ",["textarea",{class:"view-source"},[L]]]]})}}},["View source"]]]);return this.loadBlob(g).then(g=>{L=g,jmlExports.jml("iframe",{sandbox:"",srcdoc:L},R)}).catch(g=>{console.error("Err",g)}),[R]},editUI({typeNamespace:g,specificSchemaObject:v,value:L}){const R=jmlExports.jml("textarea",{name:`${g}-blobHTML`});R.sceditorInstance={val(){throw new Error("Not yet instantiated")}};const W=jmlExports.jml("div",{dataset:{type:"blobHTML"},title:schemaLabel(v)??"Blob (HTML)"},[R]);return(async()=>{await whenConnected(R,250)&&(sceditor.create(R,{width:"1000px",height:"225px",autoUpdate:!0,resizeMaxHeight:-1,resizeMaxWidth:-1,plugins:"xhtml,plaintext,undo",emoticonsRoot:"node_modules/sceditor/",style:"/node_modules/sceditor/minified/themes/content/default.min.css"}),R.sceditorInstance=sceditor.instance(R),isNullish(L)||this.setValue({root:W,value:L}))})(),[W]}},booleanType={option:["Boolean",{value:"boolean"}],stringRegex:/^(?:true|false)$/u,valueMatch:g=>"boolean"==typeof g,toValue:g=>({value:"true"===g}),getValue({root:g}){return this.getInput({root:g}).checked},getInput:({root:g})=>$e(g,"input[value=true]"),setValue({root:g,value:v}){$e(g,v?"input[value=true]":"input[value=false]").checked=!0},viewUI:({value:g,specificSchemaObject:v})=>["i",{dataset:{type:"boolean"},title:schemaLabel(v)??"(a boolean)"},[g?"true":"false"]],ct:0,editUI({typeNamespace:g,specificSchemaObject:v,value:L}){this.ct++;const R="literal"===v?.type,W=v?.values?.filter(g=>"boolean"==typeof g)??[],ie=R&&1===W.length,ce=ie?W[0]:L??v?.defaultValue;return["div",{dataset:{type:"boolean"},title:schemaLabel(v)??"Boolean"},[["label",["True",["input",{disabled:ie,type:"radio",name:`${g}-boolean${this.ct}`,value:"true",checked:"boolean"!=typeof ce||ce}]]],["label",["False",["input",{disabled:R,type:"radio",name:`${g}-boolean${this.ct}`,value:"false",checked:"boolean"==typeof ce&&!ce}]]]]]}},numberType={option:["Number"],stringRegex:new RegExp("^[-+]?"+String.raw`(?:\d{0,30}\.)?`+String.raw`\d{1,30}`+String.raw`(?:[Ee][-+]?[1-2]?\d)?`+"$","u"),valueMatch:g=>"number"==typeof g&&!Number.isNaN(g)&&g!==1/0&&g!==-1/0&&!Object.is(g,-0),toValue:g=>({value:Number(g)}),getInput:({root:g})=>$e(g,"input,select"),setValue({root:g,value:v}){this.getInput({root:g}).value=String(v)},validate({root:g}){const v=this.getInput({root:g}).value;return{message:"Not a valid (finite) number",valid:Boolean(v&&/^-?(\d+|\d*\.\d+)$/u.test(v))}},getValue({root:g}){const{value:v}=this.getInput({root:g});return""===v.trim()?NaN:Number(v)},viewUI:({value:g,specificSchemaObject:v})=>["i",{dataset:{type:"number"},title:schemaLabel(v)??"(a number)"},[String(g)]],editUI({typeNamespace:g,specificSchemaObject:v,value:L}){if("literal"===v?.type||"enum"===v?.type){const R=L??v.defaultValue;return["div",{dataset:{type:"number"},title:schemaLabel(v)??"Number"},[["select",{name:`${g}-number`},Object.values(v.values).filter(g=>"number"==typeof g).map(g=>["option",{selected:g===R},[String(g)]])]]]}const R=v,W=150*Number.EPSILON,ie=300*Number.EPSILON,isInteger=()=>R&&"format"in R&&R.format&&["int32","uint32","safeint"].includes(R.format),ce=R?.min??(R&&"format"in R&&R.format?{int32:-2147483648,uint32:0,safeint:Number.MIN_SAFE_INTEGER,float32:11754943508222875e-54,float64:Number.MIN_VALUE}[R.format]:void 0),le=R?.max??(R&&"format"in R&&R.format?{int32:2147483647,uint32:4294967295,safeint:Number.MAX_SAFE_INTEGER,float32:34028234663852886e22,float64:Number.MAX_VALUE}[R.format]:void 0);return["div",{dataset:{type:"number"},title:schemaLabel(v)??"Number"},[["input",{name:`${g}-number`,type:"number",min:ce?R?.minInclusive?ce:ce+(isInteger()?1:W):void 0,max:le?R?.maxInclusive?le:le-(isInteger()?1:ie):void 0,step:R?.multipleOf??(isInteger()?"1":"any"),value:L??v?.defaultValue??""}]]]}},bigintType={option:["BigInt"],stringRegex:new RegExp("^-?"+String.raw`\d+`+"n$","u"),valueMatch:g=>"bigint"==typeof g,toValue:g=>({value:BigInt(g.slice(0,-1))}),getInput:({root:g})=>$e(g,"input,select"),setValue({root:g,value:v}){this.getInput({root:g}).value=String(v)},validate({root:g}){const v=this.getInput({root:g}),{value:L}=v;if(!Boolean(L&&/^-?(\d+)$/u.test(L)))return{message:"Not a valid BigInt",valid:!1};const R=BigInt(L);return void 0!==v.$minBigInt&&R<BigInt(v.$minBigInt)?{message:`BigInt must be at least ${v.$minBigInt}`,valid:!1}:void 0!==v.$maxBigInt&&R>BigInt(v.$maxBigInt)?{message:`BigInt must be at most ${v.$maxBigInt}`,valid:!1}:{message:"",valid:!0}},getValue({root:g}){return BigInt(this.getInput({root:g}).value)},viewUI:({value:g,specificSchemaObject:v})=>["i",{dataset:{type:"bigint"},title:schemaLabel(v)??"(a BigInt)"},[`${String(g)}n`]],editUI({typeNamespace:g,specificSchemaObject:v,value:L}){if("literal"===v?.type){const R=L??v.defaultValue;return["div",{dataset:{type:"bigint"},title:schemaLabel(v)??"BigInt"},[["select",{name:`${g}-bigint`},v.values.filter(g=>"bigint"==typeof g).map(g=>["option",{selected:g===R},[String(g)]])]]]}const R=v,W=R?.format?{int64:{min:"-9223372036854775808",max:"9223372036854775807"},uint64:{min:"0",max:"18446744073709551615"}}[R.format]:void 0,ie=R?.min,ce=R?.max,le=ie??W?.min,ue=ce??W?.max,me=void 0!==le?void 0===ie||R?.minInclusive?le:String(BigInt(le)+1n):void 0,ge=void 0!==ue?void 0===ce||R?.maxInclusive?ue:String(BigInt(ue)-1n):void 0;return["div",{dataset:{type:"bigint"},title:schemaLabel(v)??"BigInt"},[["input",{name:`${g}-bigint`,type:"number",$custom:{$minBigInt:me,$maxBigInt:ge},value:L??v?.defaultValue??"",min:me,max:ge,step:R?.multipleOf??"1"}]]]}},bigintObjectType={option:["BigInt Object"],stringRegex:new RegExp("^BigIntObject-?"+String.raw`\d+`+"n$","u"),valueMatch:g=>"object"==typeof g&&hasConstructorOf(g,BigInt),toValue:g=>({value:new Object(BigInt(g.slice(12,-1)))}),getInput:({root:g})=>$e(g,"input"),setValue({root:g,value:v}){this.getInput({root:g}).value=String(v)},validate({root:g}){const v=this.getInput({root:g}).value;return{message:"Not a valid BigInt",valid:Boolean(v&&/^-?(\d+)$/u.test(v))}},getValue({root:g}){return new Object(BigInt(this.getInput({root:g}).value))},viewUI:({value:g,specificSchemaObject:v})=>["i",{dataset:{type:"bigintObject"},title:schemaLabel(v)??"(a BigInt Object)"},[`${String(g)}n`]],editUI:({typeNamespace:g,specificSchemaObject:v,value:L=""})=>["div",{dataset:{type:"bigintObject"},title:schemaLabel(v)??"BigInt object"},[["input",{name:`${g}-bigintObject`,type:"number",step:"1",value:L}]]]},cidrv6Schema=cidrv6(),stringType={option:["String"],stringRegex:/^"(?:[^\\"]|\\\\|\\")*"$/u,valueMatch:g=>"string"==typeof g,toValue:g=>({value:g.slice(1,-1)}),getInput:({root:g})=>$e(g,'[data-type="string"] > textarea,input,select'),setValue({root:g,value:v}){this.getInput({root:g}).value=v},getValue({root:g}){return this.getInput({root:g}).value},viewUI({value:g,specificSchemaObject:v}){const L=v&&"kind"in v&&v.kind,R=v&&"truthy"in v&&"falsy"in v;return["span",{dataset:{type:"string"},title:schemaLabel(v)??(R?"(a string boolean)":"email"===L?`(an ${L} string)`:L?`(a ${L} string)`:"(a string)")},[g]]},editUI({typeNamespace:g,specificSchemaObject:v,types:L,value:R}){const W=v??{type:"string"},ie="kind"in W?W.kind:null,ce="literal"===v?.type||"enum"===v?.type,le=W?.min??W?.length,ue=W?.max??W?.length,me=W?.startsWith,ge=W?.endsWith,ve=W?.toLowerCase,xe=W?.toUpperCase,_e=W?.trim,ke="includes"in W&&W.includes,Se="position"in W?W.position:void 0,we="regex"in W&&W.regex,Ie="email"===ie&&"pattern"in W?W.pattern:void 0,Ee="flags"in W?W.flags:void 0,Ce=W,Oe=Array.isArray(Ce.truthy)&&Array.isArray(Ce.falsy)?[...Ce.truthy,...Ce.falsy]:null,checkValue=g=>{if(Oe){const v="sensitive"===Ce.case,L=v?g:g.toLowerCase();if(!Oe.some(g=>(v?g:g.toLowerCase())===L))return`Value is not a recognized string boolean; expected one of: ${Oe.join(", ")}`}if(me&&!g.startsWith(me))return`Value doesn't start with expected: ${me}`;if(ge&&!g.endsWith(ge))return`Value doesn't end with expected: ${ge}`;if(ke&&!g.includes(ke,Se??0))return`Value doesn't include the expected: ${ke}${Se?` after position: ${Se}`:""}`;if(we&&!new RegExp(we,Ee??"").test(g))return`Value doesn't match regular expression: ${we}${Ee?` with flags: ${Ee}`:""}`;if(Ie&&!new RegExp(Ie,Ee??"").test(g))return`Value doesn't match email pattern: ${Ie}${Ee?` with flags: ${Ee}`:""}`;if(ie)switch(ie){case"credit_card":if(!creditCard$1.test(g))return"Value doesn't match credit card pattern.";break;case"iban":if(!iban$1.test(g))return"Value doesn't match iban pattern.";break;case"ip":if("v4"===("version"in W&&W.version)){if(!ipv4$1.test(g))return"Value doesn't match IP v4 pattern."}else if(!ipv6$1.test(g))return"Value doesn't match IP v6 pattern.";break;case"time":if(!time$1(W).test(g))return"Value does not match time/precision.";break;case"datetime":if(!datetime$1(W).test(g))return"Value does not match datetime/precision/offset/local";break;case"emoji":if(!emoji$1().test(g))return"Value does not match emoji pattern";break;case"uuid":if(!uuid$1("version"in W&&W.version?Number(W.version.slice(1)):void 0).test(g))return"Value does not match uuid pattern";break;case"jwt":if(!jwt("algorithm"in W?{alg:W.algorithm}:void 0).safeParse(g).success)return"Value does not match jwt pattern";break;case"e164":case"xid":case"guid":case"ksuid":if(!regexes[ie].test(g))return`Value does not match ${ie} pattern`;break;case"nanoid":if("length"in W&&W.length){if(g.length!==W.length)return`Nanoid value is not of the expected length: ${W.length}`;if(!nanoidOfLength(15).test(g))return"Value does not match nanoid pattern";break}if(!nanoid$1.test(g))return"Value does not match nanoid pattern";break;case"cuid":if(!cuid$1.test(g))return"Value does not match cuid pattern";break;case"cuid2":if(!cuid2$1.test(g))return"Value does not match cuid2 pattern";break;case"ulid":if(!ulid$1.test(g))return"Value does not match ulid pattern";break;case"duration":if(!duration$1.test(g))return"Value does not match duration pattern";break;case"base64":if(!base64$1.test(g))return"Value does not match base64 pattern";break;case"base64url":if(!base64url$1.test(g))return"Value does not match base64url pattern";break;case"cidr":if("v4"===("version"in W&&W.version)){if(!cidrv4$1.test(g))return"Value doesn't match IP v4 cidr pattern."}else if(!cidrv6Schema.safeParse(g).success)return"Value doesn't match IP v6 cidr pattern."}return null},transform=g=>(ve&&(g=g.toLowerCase()),xe&&(g=g.toUpperCase()),_e&&(g=g.trim()),g);return["div",{dataset:{type:"string"},title:schemaLabel(v)??"String"},[ie&&["email","url","date"].includes(ie)?["input",{$on:{change(){const g=this;g.value=transform(g.value);const R=checkValue(g.value);g.setCustomValidity(L.getValidationMessage({message:R,schema:v,typeSpecific:!0})??""),g.reportValidity()}},name:`${g}-string`,type:ie,value:R??v?.defaultValue??"",minlength:"date"===ie?void 0:le,maxlength:"date"===ie?void 0:ue}]:ce?["select",{name:`${g}-string`},Object.values(v.values).filter(g=>"string"==typeof g).map(g=>["option",{selected:g===(R??v.defaultValue)},[g]])]:["textarea",{$on:{change(){const g=this;g.value=transform(g.value);const R=checkValue(g.value);g.setCustomValidity(L.getValidationMessage({message:R,schema:v,typeSpecific:!0})??""),g.reportValidity()}},name:`${g}-string`,minlength:le,maxlength:ue},[R??v?.defaultValue??""]]]]}},arrayReferenceType={option:["Array reference"],type:"array",stringRegex:/^arrayRef\((?:\/[^)]*|)\)$/u,toValue(g,v){const{rootHolder:L,parent:R,parentPath:W}=v,ie=g.slice(`${this.type}Ref(`.length,-1);return L.push([this.type,R,W,ie]),{assign:!1}},resolveReference(g,v){let L=v;return""!==g&&getJSONPointerParts(g).forEach(g=>{if(L=L[g],!L)throw new Error("Bad path")}),L},stateDependent:{structuredCloning:{after:"arrayNonindexKeys",contexts:["arrayNonindexKeys","object","set"]}},getInput:({root:g})=>$e(g,"input"),setValue({root:g,value:v}){this.getInput({root:g}).value=v},getValue({root:g,stateObj:v,currentPath:L}){const R=this.getInput({root:g}).value;v&&(v.paths||(v.paths={}),v.paths[L]={referentPath:R,expectArrayReferent:"array"===this.type},v.handlingReference=!0),console.log(R)},validate({root:g,topRoot:v}){const{type:L}=this,R=this.getInput({root:g}),W=R.value,invalidMessage=g=>({valid:!1,message:g});if(R.validity.patternMismatch)return invalidMessage('You must use a path beginning with "/" (or the empty string)');if(/~([^01]|$)/u.test(W))return invalidMessage("You must use a valid JSON Pointer (with tildes followed by 0 or 1)");let ie=v||g;let ce;if(""!==W&&getJSONPointerParts(W).some((v,L)=>{const R=DOM.filterChildElements($e(ie,".arrayItems"),["fieldset","legend"]),W=R.map(g=>getPropertyValueFromLegend(g)).indexOf(v);return-1===W?(ce="Specified path doesn't exist",!0):(ie=$e(R[W].parentElement,"div[data-type]"),ie===g?(ce="Can't reference self",!0):!["array","object","arrayNonindexKeys"].includes(Types.getTypeForRoot(ie))&&(ce=`Referent portion (at segment ${L}) is not an object or array`,!0))}))return invalidMessage(ce);const le=Types.getTypeForRoot(ie);return(["array","arrayNonindexKeys"].includes(le)?"array":"object"===le?"object":null)!==L?invalidMessage("Reference must match expected reference type (array or object)"):{valid:!0}},validateAll({types:g,topRoot:v,avoidReport:L}){const R=`${this.type}Reference`;$$e(v,`div[data-type="${R}"]`).forEach(W=>{g.validate({type:R,root:W,topRoot:v,avoidReport:L})})},viewUI({value:g}){return["i",{dataset:{type:`${this.type}Reference`}},[`${this.type}Ref(${g})`]]},editUI({typeNamespace:g,value:v=""}){const{type:L}=this;return["div",{dataset:{type:`${L}Reference`}},[["label",[`JSON Pointer path to ${L} (leave blank for path to root) `,["input",{name:`${g}-${L}Reference`,type:"text",pattern:"^(|/.*)$",value:v}]]]]]}},objectReferenceType={option:["Object reference"],type:"object",stringRegex:/^objectRef\((?:\/[^)]*|)\)$/u,toValue(...g){return arrayReferenceType.toValue.apply(this,g)},resolveReference(...g){return arrayReferenceType.resolveReference?.apply(this,g)},stateDependent:{structuredCloning:{after:"object",contexts:["arrayNonindexKeys","object","set"]}},getInput(...g){return arrayReferenceType.getInput.apply(this,g)},setValue(...g){return arrayReferenceType.setValue?.apply(this,g)},getValue(...g){return arrayReferenceType.getValue.apply(this,g)},validate(...g){return arrayReferenceType.validate?.apply(this,g)},validateAll(...g){return arrayReferenceType.validateAll?.apply(this,g)},viewUI(...g){return arrayReferenceType.viewUI.apply(this,g)},editUI(...g){return arrayReferenceType.editUI.apply(this,g)}};let optionalPropertyId=0;function sameValueZero(g,v){return"number"==typeof g&&"number"==typeof v?g===v||g!=g&&v!=v:g===v}const arrayType={option:["Array"],array:!0,regexEndings:[",","]"],stringRegexBegin:/^\[/u,stringRegexEnd:/^\]/u,valueMatch:g=>Array.isArray(g),toValue(g,v){const{endMatchTypeObjs:L=[],remnant:R,rootHolder:W,schemaObject:ie}=v,ce=v.format,le=v.types,{sparse:ue}=this,me=ue?"arrayNonindexKeys":this.array?"array":"object",ge=this.array?[]:{};let ve=R;const checkEnd=g=>{if(g&&L.length){const g=ve.match(L.at(-1).stringRegexEnd);if(g)return L.pop(),ve=ve.slice(g[0].length),!0}return!1};if(this.array){let g=0;const parse=()=>{if(!ve)return;const v=ve.match(ue?/^[,\s]+/u:/^\s*,?\s*/u);if(v){const L=v[0].match(/\s/gu);if(g+=v[0].length-(L?L.length:0),ve=ve.slice(v[0].length),!ve)return}let R,xe,_e;try{[R,ve,xe,_e]=le.getValueForString(ve,{firstRun:!1,format:ce,state:me,schemaObject:ie,endMatchTypeObjs:L,rootHolder:W,parent:ge,parentPath:g})}catch(g){return void console.log("e",g)}_e&&(ge[g]=R),checkEnd(xe)||parse()};return parse(),ue&&g&&g>ge.length-1&&(ge.length=g+1),{value:this.set&&Array.isArray(ge)?new Set(ge):this.map?new Map(ge):this.filelist?new FileList(ge):ge,remnant:ve}}const parse=g=>{if(!ve)return;g&&","===ve[0]&&(ve=ve.slice(1));const v=ve.match(/^\s*(?:([^:"}]+)|"((?:[^\\"]|\\\\|\\")*)")(\s*:\s*)/u);if(!v)return;const[,R,ue]=v,xe=R??ue;let _e,ke,Se;ve=ve.slice(v[0].length);try{[_e,ve,ke,Se]=le.getValueForString(ve,{firstRun:!1,format:ce,state:me,schemaObject:ie,endMatchTypeObjs:L,rootHolder:W,parent:ge,parentPath:xe})}catch{return}Se&&(ge[xe]=_e),checkEnd(ke)||parse(!0)};return parse(),{value:ge,remnant:ve}},getValue({root:g,stateObj:v,currentPath:L=""}){if(!v)throw new Error("TS guard");const R=v.types,W=""===L,ie=$e(g,".arrayItems");if(!ie)throw new Error("Not yet instantiated");const ce=[...ie.children],le="true"===g.dataset.record,ue=le||"object"!==g.dataset.type?this.sparse?Array.from({length:Math.trunc(Number(DOM.filterChildElements(g,["div","div","label","input"])[0].value))}):[]:{};return ce.forEach(g=>{const W=g.firstElementChild,ie=getPropertyValueFromLegend(W),ce=DOM.filterChildElements(g,[".typeContainer","div[data-type]"])[0]||DOM.filterChildElements(g,["[class^=optionalProperties-placeholder]",".typeContainer","div[data-type]"])[0];if(!ce)return;const le=DOM.filterChildElements(W,["input"]),[me,ge]=((g,W)=>{const ie=R.getValueForRoot(g,v,L+"/"+W);return"handlingReference"in v&&v.handlingReference?(v.handlingReference=!1,[!1]):[!0,ie]})(ce,ie);me&&(le.length?ue[ie]=ge:ue.push(ge))}),W&&Object.entries(v.paths||[]).forEach(([g,{referentPath:v}])=>{const L=""===v?ue:resolveJSONPointer({path:v,obj:ue}),R=getJSONPointerParts(g),W=R.pop();R.reduce((g,v)=>reduceJSONPointerParts(g,v),ue)[W]=L}),this.filelist?new FileList(ue):this.set&&Array.isArray(ue)?new Set(ue):this.map?new Map(ie.$getMapKeySelects().map((g,v)=>[g.$getValue(),ue[v]])):le?ie.$getMapKeySelects().reduce((g,v,L)=>(g[v.$getValue()]=ue[L],g),{}):ue},viewUI({typeNamespace:g,type:v,types:L,value:R,topRoot:W,resultType:ie,format:ce,specificSchemaObject:le}){let ue=-1;const me=v,ge="record"===le?.type||"looseRecord"===le?.type,ve="tuple"===le?.type,buildLegend=({itemIndex:g,typeNamespace:L,propName:R})=>{const W=le?.items?.[g],ie=le?.rest;return["legend",[!ge&&this.array?schemaLabel(le?.element)??("set"===v&&schemaLabel(le?.value)?schemaLabel(le?.value):schemaLabel(W)??schemaLabel(ie))??"Item":le?"":"Property",le?"":":",jmlExports.nbsp.repeat(2),["span",{class:`propertyName-${L}`,title:ge&&schemaLabel(le?.key)?schemaLabel(le?.key):le?R:void 0},[void 0!==R?schemaLabel(le?.properties?.[R])??R:g]]]]},xe=jmlExports.jml("div",{class:"arrayHolder",dataset:{type:v,...ge?{record:"true"}:{},...ve?{tuple:"true"}:{}},$custom:{$addAndSetArrayElement(v){const{propName:R,type:ue,value:ge,bringIntoFocus:ve,schemaContent:xe}=v;if("map"===me){const v=L.getUIForModeAndType({resultType:ie,readonly:!0,typeNamespace:g,type:ue,topRoot:W,bringIntoFocus:ve,format:ce,schemaContent:xe,value:ge,hasValue:!0});if("0"===R){const g=this.$addMapElement();this._lastFieldset=g;const L=jmlExports.jml("fieldset",[["legend",{title:schemaLabel(le?.key)?"(map key)":void 0},[schemaLabel(le?.key)??"Key"]]],g);jmlExports.jml(v,L)}else{const g=jmlExports.jml("fieldset",[["legend",{title:schemaLabel(le?.value)?"(map value)":void 0},[schemaLabel(le?.value)??"Value"]]],this._lastFieldset);this._lastFieldset=null,jmlExports.jml(v,g)}return v}const _e=this.$addArrayElement({propName:R}),ke=L.getUIForModeAndType({resultType:ie,readonly:!0,typeNamespace:g,type:ue,topRoot:W,bringIntoFocus:ve,format:ce,schemaContent:xe,specificSchemaObject:xe,value:ge,hasValue:!0});return jmlExports.jml(ke,_e),ke},$addMapElement(){ue++;const v=this.$getArrayItems();return jmlExports.jml("fieldset",[buildLegend({itemIndex:ue,typeNamespace:g,propName:void 0})],v)},$addArrayElement(v){const{propName:L}=v;ue++;const R=this.$getArrayItems();return jmlExports.jml("fieldset",[buildLegend({itemIndex:ue,typeNamespace:g,propName:L})],R)},$getArrayItems(){return lastTypeChild(this).lastElementChild}}},[["span",{title:schemaLabel(le)},[le?"—":DOM.initialCaps(v).replace(/s$/u,"")]],jmlExports.nbsp.repeat(2),["button",{$on:{click(g){g.preventDefault();const{target:v}=g,L=$e(v.closest(".arrayHolder"),".arrayContents");L.hidden=!L.hidden,v.textContent=L.hidden?"+":"-"}}},["-"]],["div",{class:"arrayContents"},[!ge&&this.array?["div",{title:le?"filelist"===v?"(a FileList)":"set"===v?"(a Set)":"map"===v?"(a Map)":ve?"(a tuple)":"(an Array)":void 0},["filelist"===v?(schemaLabel(le)??"FileList")+" length: ":"set"===v?(schemaLabel(le)??"Set")+" size: ":"map"===v?(schemaLabel(le)??"Map")+" size: ":(schemaLabel(le)??"Array")+" length: ",["span",[(!R||"set"!==v&&"map"!==v?R.length:R.size)||0]]]]:ge?schemaLabel(le)??"Record":"",["div",{class:"arrayItems"}]]]]);return[xe]},getInput:({root:g})=>$e(g,"button"),editUI({typeNamespace:g,buildTypeChoices:v,format:L,formats:R,types:W,specificSchemaObject:ie,schemaFallingBack:ce,schemaContent:le,type:ue,forcedState:me,topRoot:ge,value:ve,hasValue:xe,bringIntoFocus:_e=!0}){const{sparse:ke}=this,Se=this,we="record"===ie?.type||"looseRecord"===ie?.type,Ie="tuple"===ie?.type,Ee=Se.array||we,Ce=we?"record":Ie?"tuple":ue,Oe="object"===ue?1:0;let Ne=Oe-1;const Te="array"!==ue&&"set"!==ue&&"map"!==ue&&"filelist"!==ue&&!Ie&&!we,Ae="map"===ue||we,getSchemaValidationMessage=g=>W.getValidationMessage({message:g,schema:ie,typeSpecific:!0})??g,Pe=schemaLabel(ie?.element)??("set"===ue?schemaLabel(ie?.value):"filelist"===ue?schemaLabel((ie?.output)?.element):void 0),bringFocus=(g,v)=>{(_e||v)&&(g.scrollIntoView(),g.focus())},$validateLegend=function(){const g=this.$arrayItems.$getPropertyInputs(),v=g.some(g=>this!==g&&g.value===this.value)?"Duplicate property name":"";v&&(this.setCustomValidity(v),this.reportValidity()),g.some((g,v,L)=>{const R=L.some(v=>g!==v&&g.value===v.value)?"Duplicate property name":"";return(g.validity.valid||"Invalid length"!==g.validationMessage)&&(g.setCustomValidity(R),R&&g.reportValidity()),R})},buildLegend=({className:g,splice:R,itemIndex:ce,typeNamespace:me,arrayItems:ve,propName:xe,required:_e,schema:Ee})=>{if(Ae){const R=v({value:void 0!==xe&&we?xe:void 0,setValue:void 0!==xe&&we,autoTrigger:void 0===xe||we,format:L,schemaOriginal:le,schemaContent:ie?.key,typeNamespace:"key-type-choices-only"});return["legend",[["span",{class:"mapKey",title:"map"===ue&&schemaLabel(ie?.key)?"(map key)":we&&schemaLabel(ie?.key)?"(record key)":void 0},["map"===ue?schemaLabel(ie?.key)??"Map key":schemaLabel(ie?.key)??"Record key"," "]],["span",{dataset:{prop:"true"},className:g},[String(ce)]],":",jmlExports.nbsp.repeat(2),["span",{class:"mapKeyHolder",$on:{change:[function(){this.$validateMapKey(),W.validateAllReferences({topRoot:ge})},!0]},$custom:{$validateMapKey(){const g=ve.$getMapKeySelects();setTimeout(()=>{const v=g.map(g=>g.$getValue()),L=v.findLastIndex((g,L)=>v.some((v,R)=>L!==R&&sameValueZero(g,v)));if(-1===L)return;const R=g[L];if(!R)return;const W=R.hidden?$e(R.nextElementSibling,"input,textarea"):R;W.setCustomValidity(`Duplicate ${"map"===ue?"Map":"Record"} key value`),W.reportValidity()},0)}}},R.domArray]]]}const $validateLength=async function(g){if(!ke)return;const v=ve.$inputsExceedingLength(),L=v.length;if(g||!L||!/^\d+$/u.test(this.value))return;await dialogs.confirm({message:'You are attempting to add an (integer-based) array item beyond the length. Click "Ok" to allow to permit and extend the array length or "Cancel" otherwise.'});const R=$e(ve.previousElementSibling,"input"),W=Math.max(...v.map(g=>Math.trunc(Number(g.value))));R.value=String(W+1),R.$oldvalue=String(W+1),this.$validateLength(!0)};if(Te){const v=ie?.properties?.[xe],L=schemaLabel(v),le=Object.entries(ie?.properties??{}).map(([g,v])=>v.isOptional?g:null).filter(Boolean);optionalPropertyId++;const we=ke?"append"===R?"":void 0!==xe?xe:ce:xe||"";return["legend",{class:deprecatedClassSuffix(v).trim()},[ke?Pe??"Item":{"#":_e?[["b",{className:g,title:Pe??L?xe:void 0},[Pe??L??xe]]]:[["span",{className:`${g}_propertyHolder${optionalPropertyId}`},[...ie&&xe?[["b",[(()=>{const g=ie?.properties?.[xe];return g?schemaLabel(g)??xe:schemaLabel(ie?.catchall)??xe})()]]]:["Property ",["span",{className:g},[String(ce)]],":"]]]]},jmlExports.nbsp.repeat(2),ie&&!_e?["datalist",{id:`optionalProperties_${optionalPropertyId}`},le.map(g=>["option",{value:g}])]:"",["input",{list:ie&&!_e?`optionalProperties_${optionalPropertyId}`:void 0,style:{display:_e&&"arrayNonindexKeys"!==ue?"none":"block"},disabled:_e&&"arrayNonindexKeys"===ue,value:we,dataset:{prop:!0,object:!0,optionalPropertyId:optionalPropertyId},$custom:{async $validate(){try{try{await this.$validateLength()}catch{}this.$validateLegend(),W.validateAllReferences({topRoot:ge})}catch{}},$parseInt(){return!!/^\d+$/u.test(this.value)&&Math.trunc(Number(this.value))},$validateLegend:$validateLegend,$arrayItems:ve,$validateLength:$validateLength,$resort(g){const{alwaysFocus:v}=g,L=this.$arrayItems.$getPropertyInputs();if(1===L.length)return;const getFieldset=g=>g.closest("fieldset"),R=getFieldset(this),W=this.$parseInt();if(!1===W)return L.reverse(),void L.some(g=>{if(g===this)return!0;return"number"==typeof g.$parseInt()&&(getFieldset(g).after(R),bringFocus(this,v),ve.$redrawMoveArrows(),!0)});const getNearest=g=>{let ie;if(L.some(v=>{if(v===this)return!1;const L=v.$parseInt();if("number"!=typeof L)return ie||(ie=v),!1;const cmp=(v,L)=>g?v>L:v<L;return!(!cmp(W,L)||!(!ie||/^\d+$/u.test(ie.value)&&cmp(L,Math.trunc(Number(ie.value)))))&&(ie=v,W+(g?-1:1)===L)}),!ie)return!1;const ce=g?"after":"before";return setTimeout(()=>{ie&&(getFieldset(ie)[ce](R),bringFocus(this,v),ve.$redrawMoveArrows())},0),!0};getNearest()||getNearest(!0)}},$on:{input(){if(!ie&&!Ee)return;const v=$e(ve,`.${g}_propertyHolder${this.dataset.optionalPropertyId}`);DOM.removeChildren(v);const L=ie?.properties?.[this.value];jmlExports.jml("b",[L?schemaLabel(L)??this.value:schemaLabel(ie?.catchall)??this.value],v)},change(g){let v=!1;if("never"===ie?.properties?.[this.value]?.type)this.setCustomValidity("Never value"),this.reportValidity(),this.style.backgroundColor="pink",v=!0;else if(this.list&&!Se.array){if([...this.list.options].map(({value:g})=>g).includes(this.value)||"never"!==ie.catchall?.type){this.style.backgroundColor="revert-layer",this.setCustomValidity(""),this.reportValidity();const{optionalPropertyId:g}=this.dataset;let v=$e(ve,`.optionalProperties-placeholder${g}`);v||(v=$e(this.parentElement?.parentElement,".property-placeholder")?.previousElementSibling,v.previousElementSibling?.remove()),v.replaceWith(jmlExports.jml("div",{className:`optionalProperties-placeholder${g}`},[...buildTypeChoicesForProperty({propName:this.value,schema:ie?.properties?.[this.value]??ie?.catchall??{type:"any"}})]))}else this.setCustomValidity("Bad value"),this.reportValidity(),this.style.backgroundColor="pink",v=!0}if(v){const g=$e(ve,`.optionalProperties-placeholder${optionalPropertyId}`);DOM.removeChildren(g)}else this.$validate();g.stopPropagation(),this.$resort({alwaysFocus:!0})}},class:`propertyName-${me}`}]]]}const Ce="filelist"===ue?schemaLabel(ie):void 0;return["legend",{class:deprecatedClassSuffix(Ee).trim()},[Pe?"":Ce?`${Ce} `:schemaLabel(Ee)?`${schemaLabel(Ee)} `:Ie&&schemaLabel(ie?.rest)?`${schemaLabel(ie?.rest)} `:"Item ",["span",{dataset:{prop:!0,array:!0},className:g},[Pe?`${Pe} ${ce+1}`:void 0!==xe?xe:String(ce)]]]]},decrementItemIndex=g=>{ke?Ne=g.$getPropertyInputs().reduce((g,v)=>{const L=v.$parseInt();return!1!==L&&L>g?L:g},-1):Ne--},getChildSchema=(g,v)=>{if(v)return v;if(Ie)return ie.rest;if(we){const v=ie;return"looseRecord"!==ie?.type||recordKeyConforms(W,v.key,g)?v?.value:{type:"unknown"}}if(Ae)return ie?.value;if("set"===ue)return ie?.value;if("filelist"===ue)return(ie?.output)?.element;if("array"===ue||"arrayNonindexKeys"===ue)return ie?.element;const L=ie,R=ie?.type,ce=L?.properties?.[g];return ce||"properties"!==R&&("object"!==R||L.catchall)?ce:{type:"unknown"}},buildTypeChoicesForProperty=({propName:R,schema:W,schemaIdx:ie,autoTrigger:ce})=>v({autoTrigger:ce,topRoot:ge,format:L,schemaOriginal:le,schemaIdx:ie,schemaContent:getChildSchema(R,W),state:Se.filelist?"filelistArray":Ie?"arrayNonindexKeys":me??ue,typeNamespace:g}).domArray;function preventAdding(g=0){if(Ie)return"never"===ie?.rest?.type?(dialogs.alert(getSchemaValidationMessage('Tuple has rest type "never", so one cannot add to it.')),!0):"never"===ie?.items?.[0]?.type&&(dialogs.alert(getSchemaValidationMessage('Tuple has items type "never", so one cannot add to it.')),!0);switch(ue){case"set":{if("never"===ie?.value?.type)return dialogs.alert(getSchemaValidationMessage('Set has type "never", so one cannot add to it.')),!0;const{maxSize:v}=ie??{};if(void 0!==v&&[...De.children].length+g>v)return dialogs.alert(getSchemaValidationMessage("You cannot add beyond the `maxSize` of the Set")),!0;break}case"map":{const{max:v}=ie??{};if(void 0!==v&&[...De.children].length+g>v)return dialogs.alert(getSchemaValidationMessage("You cannot add beyond the `max` of the Map")),!0;break}case"array":case"arrayNonindexKeys":{if("never"===ie?.element?.type)return dialogs.alert(getSchemaValidationMessage('Array has type "never", so one cannot add to it.')),!0;const{maxLength:v}=ie??{};if(void 0!==v&&De.$getArrayLength()+g>v)return dialogs.alert(getSchemaValidationMessage("You cannot add beyond the `maxLength` of the array")),!0;break}}return!1}const je=["button",{class:"addArrayElement",$custom:{$addArrayElement:function({propName:v,splice:L,alwaysFocus:ce,required:le,schema:me,schemaIdx:ve,autoTrigger:xe}){const _e=this.$getArrayItems();if(ke)if(v){const g=v.match(/^\d+$/u)&&Math.trunc(Number(v));"number"==typeof g&&(Ne=g)}else"number"==typeof L?Ne=L+1:"string"!=typeof L&&(Ne=_e.$getPropertyInputs().reduce((g,v)=>{const L=v.$parseInt();return!1!==L&&L>g?L:g},-1)+1);else Ne++;const Ae=this,je=`${Ce}Item`,ze=jmlExports.jml("fieldset",{dataset:le?{required:"required"}:{},$on:{change:[()=>{"set"===ue&&setTimeout(()=>{const g=Re,v=Se.getValue.call({...Se,set:!1},{root:g,stateObj:{types:W,formats:R}}),L=v.findLastIndex((g,L)=>v.some((v,R)=>L!==R&&g===v));if(-1===L)return;const ie=[..._e.children].map(g=>{const v=$e(g,"div[data-type]");return v?W.getFormControlForRoot(v):null}),ce=ie[L];ce&&(ce.setCustomValidity("Duplicate Set value"),ce.reportValidity())},10)},!0]},$custom:{$getPropertyInput(){return DOM.filterChildElements(this,["legend",`input.propertyName-${g}`]).pop()}}},[buildLegend({className:je,splice:L,itemIndex:Ne,typeNamespace:g,arrayItems:_e,propName:v,required:le,schema:me})],_e);if(jmlExports.jml({"#":[["span",{class:"mapValue",title:"map"===ue&&schemaLabel(ie?.value)?"(map value)":we&&schemaLabel(ie?.value)?"(record value)":void 0},["map"===ue?schemaLabel(ie?.value)??"Map value":we?schemaLabel(ie?.value)??"Record value":""," "]],...!ie||v||Ee?buildTypeChoicesForProperty({propName:v,schema:me,schemaIdx:ve,autoTrigger:xe}):[jmlExports.jml("span",{className:`optionalProperties-placeholder${optionalPropertyId}`})],["span",{className:"property-placeholder"}],jmlExports.nbsp.repeat(2),["button",{disabled:Ie&&le&&ie?.items?.length-1>Ne,$on:{click(g){if(g.preventDefault(),preventAdding(1))return;let v;if(ke){const g=ze.$getPropertyInput().$parseInt();v=!1===g?"append":g}Ae.$addArrayElement({splice:v,alwaysFocus:!0,schema:me});const L=_e.lastElementChild;if(ze.after(L),ke||!Ee&&(ie||me)){const g=L.$getPropertyInput();bringFocus(g,!0)}else DOM.filterChildElements(_e,["fieldset","legend","."+je]).forEach((g,v)=>{g.textContent=Pe?`${Pe} ${v+Oe+1}`:String(v+Oe)});W.validateAllReferences({topRoot:ge}),_e.$redrawMoveArrows()}}},["+"]],["button",{disabled:le,$on:{click(g){g.preventDefault(),ze.remove(),decrementItemIndex(_e),ke||ie&&!Ee||DOM.filterChildElements(_e,["fieldset","legend","."+je]).forEach((g,v)=>{g.textContent=Pe?`${Pe} ${v+Oe+1}`:String(v+Oe)}),W.validateAllReferences({topRoot:ge}),_e.$redrawMoveArrows()}}},["x"]],["span",{class:`${Ce}Item-arrowHolder-${g}`},[]]]},ze),Te){const g=_e.$getPropertyInputs();if(g.length){const v=g.pop();v.$validate(),v.$resort({alwaysFocus:ce}),bringFocus(v,ce)}}_e.$redrawMoveArrows()},$getArrayItems(){return this.previousElementSibling}},$on:{click(){preventAdding(1)||(this.$addArrayElement({alwaysFocus:!0}),W.validateAllReferences({topRoot:ge}))}}},["+ Item"]],ze=ke?["div",[["label",["Array length: ",["input",{type:"number",value:ve&&ve.length||0,step:1,size:4,class:"arrayLength",pattern:String.raw`\d`,$on:{async change(){if(preventAdding())return void(this.value=this.$oldvalue??this.defaultValue);const g=$e(this.closest(".arrayContents"),".arrayItems").$inputsExceedingLength();try{if(g.length)await dialogs.confirm({message:"Your new length will truncate the array causing items to be removed. Continue?"}),g.forEach(g=>{const v=g.closest("fieldset");if(v.matches("[data-required]")){const g=$e(Re,".arrayLength");g.value=String(Math.trunc(Number(g.value))+1)}else v.remove()}),W.validateAllReferences({topRoot:ge});else{const g=ie?.element;if(!["void","undefined"].includes(g?.type)&&(!isUnionLike(g?.type)||g?.options?.every(g=>!["void","undefined"].includes(g.type)))){const g=this.$oldvalue??this.defaultValue,v=/^\d+$/u.test(g)?Math.trunc(Number(this.value))-Math.trunc(Number(g)):0;(async()=>{for(let g=0;g<v;g++)await tick(),Re.$addArrayElement({})})()}}this.$oldvalue=this.value}catch{this.value=this.$oldvalue}}}}]]]]]:"",De=jmlExports.jml("div",{class:"arrayItems",$custom:{$swapGroup:function(g,v){const L=g.parentElement,R=L["up"===v?"previousElementSibling":"nextElementSibling"];if(R&&"fieldset"===R.nodeName.toLowerCase()){if(ke||ie&&!Ee){const g=L.$getPropertyInput(),v=R.$getPropertyInput();if("number"==typeof g.$parseInt()||"number"==typeof v.$parseInt()){const L=g.value,R=v.value;g.value=R,v.value=L}}else{const g=DOM.filterChildElements(R,["legend","span",`.${Ce}Item`])[0]??DOM.filterChildElements(R,["legend",`.${Ce}Item`])[0],v=DOM.filterChildElements(L,["legend","span",`.${Ce}Item`])[0]??DOM.filterChildElements(L,["legend",`.${Ce}Item`])[0],W=g.textContent,ie=v.textContent;g.textContent=ie,v.textContent=W}"up"===v?R.before(L):L.before(R),W.validateAllReferences({topRoot:ge}),this.$redrawMoveArrows()}},$redrawMoveArrows:function(){Ie||DOM.filterChildElements(this,["fieldset",`.${Ce}Item-arrowHolder-${g}`]).forEach((g,v,L)=>{if(DOM.removeChildren(g),1===L.length)return;let R=!0,W=!0;0===v?R=!1:v===L.length-1&&(W=!1),R&&jmlExports.jml("button",{$on:{click:()=>{this.$swapGroup(g,"up")}}},[U.upArrow],g),W&&jmlExports.jml("button",{$on:{click:()=>{this.$swapGroup(g,"down")}}},[U.downArrow],g)})},$getArrayLength:function(){return Number($e(this.previousElementSibling,"input").value)},$inputsExceedingLength:function(){const g=this.$getArrayLength()-1;return this.$getPropertyInputs().filter(g=>g.value.match(/^\d+$/u)).filter(v=>{const L=Math.trunc(Number(v.value))>g;return v.setCustomValidity(L?"Invalid length":""),v.reportValidity(),L})},$getMapKeySelects(){return DOM.filterChildElements(this,["fieldset","legend:first-child","span.mapKeyHolder","select.typeChoices-key-type-choices-only"])},$getPropertyInputs(){return DOM.filterChildElements(this,["fieldset","legend",`input.propertyName-${g}`])}}}),Ze=["button",{$on:{click(g){g.preventDefault();const{target:v}=g,L=$e(Re,".arrayContents");L.hidden=!L.hidden,v.textContent=L.hidden?"+":"-"}}},["-"]],Ue=["div",{class:"arrayContents"},[ze,De,je,["button",{$on:{click(){const g=this.closest(".arrayContents"),v=$e(g,".arrayItems"),L=v.lastElementChild;L&&!L.matches("[data-required]")&&(L.remove(),decrementItemIndex(v),$e(g,".arrayItems").$redrawMoveArrows()),W.validateAllReferences({topRoot:ge})}}},["- Last item"]],["button",{$on:{click(){const g=this.closest(".arrayContents"),v=$e(g,".arrayItems"),L=$$e(g,".arrayItems > fieldset:not([data-required])");for(const g of L)g.remove();ke?decrementItemIndex(v):Ne=-1,W.validateAllReferences({topRoot:ge})}}},["x All"]]]],Le=ue,Re=jmlExports.jml("div",{dataset:{type:ue,...we?{record:"true"}:{},...Ie?{tuple:"true"}:{}},$custom:{$addAndSetArrayElement(g){const{propName:v,type:L,value:R,bringIntoFocus:ie,setAValue:ce,schemaContent:le,schemaIdx:ue,mustBeOptional:me}=g;if("map"===Le){if("0"===v){this.$addArrayElement({propName:v,autoTrigger:!1});const g=this.$getArrayItems(),W=DOM.filterChildElements(g,["fieldset:last-of-type","legend",".mapKeyHolder","select"])[0];return W.$setType({type:L,baseValue:R,bringIntoFocus:ie,avoidReport:!0}),W.$getTypeRoot()}}else we?this.$addArrayElement({propName:v,autoTrigger:!1,required:!1}):this.$addArrayElement({propName:v,schema:le,autoTrigger:!1,schemaIdx:ue,required:!me&&le&&!le.isOptional&&"never"!==le.type});const ve=this.$getTypeChoices();ve.$setType({type:L,baseValue:R,bringIntoFocus:ie,specificSchema:void 0!==ue&&isUnionLike(le?.type)?le.options[ue]:le,avoidReport:!0});const xe=ve.$getTypeRoot();if(ce){const g=W.getTypeObject(L);g.setValue&&g.setValue({root:xe,value:R})}return W.validate({type:L,root:xe,topRoot:ge,avoidReport:!0}),xe},$getAddArrayElement(){const g=lastTypeChild(this).firstElementChild.nextElementSibling;return ke?g?.nextElementSibling:g},$addArrayElement(g){const{propName:v,splice:L,alwaysFocus:R,required:W,schema:ie,schemaIdx:ce,autoTrigger:le}=g;this.$getAddArrayElement().$addArrayElement({propName:v,splice:L,alwaysFocus:R,required:W,schema:ie,schemaIdx:ce,autoTrigger:le})},$getArrayItems(){return this.$getAddArrayElement().previousElementSibling},$getTypeChoices(){const v=this.$getArrayItems();return $e(v.lastElementChild,`fieldset > .typeChoices-${g}`)}},$on:{click(g){const v=g,L=v.target;["checkbox","radio","file","datetime-local",void 0].includes(L.type)||v.preventDefault()}}},[[ie?"span":"b",{title:schemaLabel(ie)??("properties"===ie?.type?"Properties":DOM.initialCaps(Ce).replace(/s$/u,""))},[ie?"—":DOM.initialCaps(ue).replace(/s$/u,"")]],jmlExports.nbsp.repeat(2),"filelist"===ue?["input",{name:g+"-filelist",multiple:!0,type:"file",$on:{change(){if(this.files)for(let g=0;g<this.files.length;g++){const v=this.files.item(g);Re.$addAndSetArrayElement({propName:String(g),type:"file",value:v,bringIntoFocus:!1,setAValue:!0,schemaContent:(ie?.output)?.element})}}}}]:"",Ze,Ue]);if(ge||=Re,!xe&&ie&&Ie){if(!ce){const g=ie;if("never"!==g?.items?.[0]?.type)for(const v of g.items)Re.$addArrayElement({schema:v,required:!0})}}else if(!xe&&ie)switch(ue){case"object":if(!ce)for(const[g,v]of Object.entries(ie.properties??{}))v.isOptional||"never"===v.type||Re.$addArrayElement({propName:g,required:!0});break;case"arrayNonindexKeys":{const{minLength:g=0}=ie,v=$e(Re,".arrayLength");v.value=String(g),v.$oldvalue=String(g);for(let v=0;v<g;v++)Re.$addArrayElement({required:!0});break}case"set":if(!ce){const{minSize:g=0}=ie;for(let v=0;v<g;v++)Re.$addArrayElement({required:!0})}break;case"map":if(!ce){const{min:g=0}=ie;for(let v=0;v<g;v++)Re.$addArrayElement({required:!0})}}return[Re]}},objectType={option:["Object"],regexEndings:[",","}"],stringRegexBegin:/^\{/u,stringRegexEnd:/^\}/u,valueMatch:g=>g&&"object"==typeof g&&"Object"===toStringTag(g),toValue(...g){return arrayType.toValue.apply(this,g)},getValue(...g){return arrayType.getValue.apply(this,g)},getInput(...g){return arrayType.getInput.apply(this,g)},viewUI({...g}){return arrayType.viewUI.call(this,{...g,type:"object"})},editUI({...g}){return arrayType.editUI.call(this,{...g,type:"object"})}},dateType={option:["Date"],dateRegex:/^(?:\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d)$/u,stringRegex(){const g=this.dateRegex;if(!this.valid){const{source:v}=g;return new RegExp("^(?:InvalidDate)|"+v.slice(1),"u")}return new RegExp(g,"u")},valueMatch:g=>"Date"===toStringTag(g),toValue:g=>({value:new Date(g)}),getInput:({root:g})=>$e(g,'input[type="datetime-local"]'),setValue({root:g,value:v}){if(v&&Number.isNaN(v.getTime()))return void $e(g,".invalidDate").$setValidity(!0);const L=new Date(Date.parse(v)).toISOString();this.getInput({root:g}).value=24===L.length?L.slice(0,-8):L.slice(3,13)},validate({root:g}){if(this.isInvalid({root:g}))return{valid:!0};const v=this.getInput({root:g}).value;return v?{valid:new RegExp(this.dateRegex,"u").test(v),message:"Must match a valid date"}:{valid:!1,message:"Must not be empty`"}},isInvalid({root:g}){return!this.valid&&$e(g,".invalidDate").checked},getValue({root:g}){return this.isInvalid({root:g})?this.toValue("NaN").value:this.toValue(this.getInput({root:g}).value).value},isValueInvalid:g=>g&&Number.isNaN(g.getTime()),viewUI({value:g,specificSchemaObject:v}){return!this.valid&&this.isValueInvalid(g)?["i",{dataset:{type:"date"},class:"InvalidDate",title:schemaLabel(v)??"(an InvalidDate)"},["InvalidDate"]]:["i",{dataset:{type:"date"},class:"ValidDate",title:schemaLabel(v)??"(a `Date`)"},[g.toISOString().slice(0,-8)]]},editUI({typeNamespace:g,specificSchemaObject:v,types:L,value:R}){const W=v,ie=R??(v?.defaultValue?new Date(v?.defaultValue):""),ce=this.isValueInvalid(ie),le=this.valid?"":jmlExports.jml("div",[["label",["Invalid date",["input",{type:"checkbox",class:"invalidDate",checked:ce,name:`${g}-invalidDate`,$custom:{$setValidity(g){!0===g&&(this.checked=!0);const v=le.previousElementSibling;v.hidden=Boolean(g);const R=v.parentElement;L.validate({type:"date",root:R})}},$on:{click(){this.$setValidity(this.checked)}}}]]]]);return["div",{dataset:{type:this.valid?"ValidDate":"date"},title:schemaLabel(v)??"Date"},[["label",{hidden:ce},["Date: ",["input",{name:`${g}-date`,type:"datetime-local",value:!ie||ce?"":ie.toISOString().slice(0,-8),min:W?.min?new Date(W.min).toISOString().slice(0,-8):void 0,max:W?.max?new Date(W.max).toISOString().slice(0,-8):void 0}]]],le]]}},setType={option:["Set"],array:!0,set:!0,regexEndings:[",",")"],stringRegexBegin:/^Set\(/u,stringRegexEnd:/^\)/u,valueMatch:g=>"Set"===toStringTag(g),toValue(...g){return arrayType.toValue.apply(this,g)},getValue(...g){return arrayType.getValue.apply(this,g)},getInput(...g){return arrayType.getInput.apply(this,g)},viewUI({...g}){return arrayType.viewUI.call(this,{...g,type:"set"})},editUI({...g}){return arrayType.editUI.call(this,{...g,type:"set"})}},mapType={option:["Map"],array:!0,map:!0,regexEndings:[",",")"],stringRegexBegin:/^Map\(/u,stringRegexEnd:/^\)/u,valueMatch:g=>"Map"===toStringTag(g),toValue(...g){return arrayType.toValue.apply(this,g)},getValue(...g){return arrayType.getValue.apply(this,g)},getInput(...g){return arrayType.getInput.apply(this,g)},viewUI({...g}){return arrayType.viewUI.call(this,{...g,type:"map"})},editUI({...g}){return arrayType.editUI.call(this,{...g,type:"map"})}},undefinedType={stringRegex:/^undefined$/u,option:["Explicit undefined"],valueMatch:g=>void 0===g,toValue:()=>({value:void 0}),getValue(){return this.toValue("").value},viewUI:({specificSchemaObject:g})=>["i",{dataset:{type:"undef"},title:schemaLabel(g)??"(an `undefined`)"},["undefined"]],getInput:({root:g})=>$e(g,"input"),editUI:({typeNamespace:g,specificSchemaObject:v})=>["div",{dataset:{type:"undef"},title:schemaLabel(v)??"Undefined"},[["label",["Undefined",["input",{type:"checkbox",name:`${g}-undef`,disabled:!0,checked:!0}]]]]]},regexpType={option:["RegExp"],stringRegex(g){const v=g?"(?:":"(";return new RegExp(`^/${v}.*)/${v}[${this.allowedFlags.join("")}]{0,${this.allowedFlags.length}})$`,"u")},valueMatch:g=>"RegExp"===toStringTag(g),toValue(g){if("function"!=typeof this.stringRegex)throw new TypeError("Guard for TS");const[,v,L]=g.match(this.stringRegex());return{value:new RegExp(v,L)}},getInput:({root:g})=>$e(g,"input"),setValue({root:g,value:v}){this.getInput({root:g}).value=v.source,this.getSelect({root:g}).$set([...v.flags])},getSelect:({root:g})=>$e(g,"select"),validate({root:g}){try{return this.getValue({root:g}),{valid:!0}}catch(g){return{valid:!1,message:g.message}}},getValue({root:g}){return new RegExp(this.getInput({root:g}).value,[...this.getSelect({root:g}).selectedOptions].reduce((g,v)=>g+v.value,""))},allowedFlags:["g","i","m","u","y","s","v"],viewUI:({value:g,specificSchemaObject:v})=>["i",{dataset:{type:"regexp"},title:schemaLabel(v)??"(a `RegExp`)"},[String(g)]],editUI({typeNamespace:g,specificSchemaObject:v,types:L,value:R={source:"",flags:""}}){const W=jmlExports.jml("select",{multiple:!0,size:5,$custom:{$set(g){[...this.options].forEach(v=>{v.selected=g.includes(v.value)})}}},this.allowedFlags.map(g=>["option",{selected:R.flags.includes(g)},[g]])),ie=jmlExports.jml("div",{dataset:{type:"regexp"},title:schemaLabel(v)??"RegExp"},[["label",["Source ",["input",{name:`${g}-regexp`,type:"text",value:R.source,$on:{input(){L.validate({type:"regexp",root:ie})},change(){L.validate({type:"regexp",root:ie})}}}]]],["br"],["label",["Flags ",W]]]);return W.addEventListener("change",()=>{L.validate({type:"regexp",root:ie})}),[ie]}},BooleanObjectType={option:["BooleanObject"],stringRegex:/^Boolean\((.*)\)$/u,valueMatch:g=>"Boolean"===toStringTag(g)&&"object"==typeof g,toValue:g=>({value:new Boolean("true"===g)}),getInput:({root:g})=>$e(g,"input"),getValue({root:g}){return this.toValue(String(this.getInput({root:g}).checked)).value},setValue({root:g,value:v}){$$e(g,"input")[v.valueOf()?0:1].checked=!0},viewUI:({value:g,specificSchemaObject:v})=>["i",{dataset:{type:"BooleanObject"},title:schemaLabel(v)??"(a Boolean Object)"},[v?String(g):`Boolean(${g})`]],ct:0,editUI({typeNamespace:g,specificSchemaObject:v,value:L=new Boolean(!0)}){return this.ct++,["div",{dataset:{type:"BooleanObject"},title:schemaLabel(v)??"Boolean object"},[["label",["True",["input",{type:"radio",name:`${g}-BooleanObject${this.ct}`,value:"true",checked:L.valueOf()}]]],["label",["False",["input",{type:"radio",name:`${g}-BooleanObject${this.ct}`,value:"false",checked:!L.valueOf()}]]]]]}},NumberObjectType={option:["NumberObject"],stringRegex:/^Number\((.*)\)$/u,valueMatch:g=>"Number"===toStringTag(g)&&"object"==typeof g,toValue:g=>({value:new Number(g)}),validate:({root:g})=>numberType.validate({root:g}),getInput:({root:g})=>$e(g,"input"),getValue({root:g}){return this.toValue(this.getInput({root:g}).value).value},setValue({root:g,value:v}){this.getInput({root:g}).value=String(v)},viewUI:({value:g,specificSchemaObject:v})=>["i",{dataset:{type:"NumberObject"},title:schemaLabel(v)??"(a Number Object)"},[v?String(g):`Number(${g})`]],editUI:({typeNamespace:g,specificSchemaObject:v,value:L})=>["div",{dataset:{type:"NumberObject"},title:schemaLabel(v)??"Number object"},[["input",{name:`${g}-NumberObject`,type:"number",value:L,step:"any"}]]]},StringObjectType={stringRegex:/^String\(([^)]*)\)$/u,valueMatch:g=>"String"===toStringTag(g)&&"object"==typeof g,toValue:g=>({value:new String(g)}),option:["StringObject"],getInput:({root:g})=>$e(g,"textarea"),getValue({root:g}){return this.toValue(this.getInput({root:g}).value).value},setValue({root:g,value:v}){this.getInput({root:g}).value=v},viewUI:({value:g,specificSchemaObject:v})=>["span",{dataset:{type:"StringObject"},title:schemaLabel(v)??"(a String Object)"},[v?"":["i",["String("]],["span",[g.valueOf()]],v?"":["i",[")"]]]],editUI:({typeNamespace:g,specificSchemaObject:v,value:L=""})=>["div",{dataset:{type:"StringObject"},title:schemaLabel(v)??"String object"},[["textarea",{name:`${g}-StringObject`},[L]]]]},SpecialRealNumberSuperType={option:["Special Real Number",{title:"`Infinity`, `-Infinity`, `-0`"}],childTypes:["infinity","negativeInfinity","negativeZero"],stringRegex:/^(?:-?Infinity|-0)$/u,valueMatch:g=>Object.is(g,-0)||g===1/0||g===-1/0,toValue:g=>({value:"-0"===g?-0:"Infinity"===g?1/0:-1/0}),getSelect:({root:g})=>$e(g,"select"),getValue({root:g}){return this.toValue(this.getSelect({root:g}).value).value},setValue({root:g,value:v}){this.getSelect({root:g}).value=Object.is(v,-0)?"-0":String(v)},viewUI({value:g,specificSchemaObject:v}){const L=Object.is(g,-0);return["i",{dataset:{type:"SpecialRealNumber"},title:schemaLabel(v)??(L?"(negative zero)":`(${String(g)})`)},[L?"-0":String(g)]]},getInput:({root:g})=>$e(g,"select"),editUI:({typeNamespace:g,specificSchemaObject:v,value:L=1/0})=>["div",{dataset:{type:"SpecialRealNumber"},title:schemaLabel(v)??"Special Real Number"},[["label",[["select",{name:`${g}-SpecialRealNumber`},[["option",{value:"Infinity",selected:L===1/0},["Infinity"]],["option",{value:"-Infinity",selected:L===-1/0},["-Infinity"]],["option",{value:"-0",selected:Object.is(L,-0)},["-0"]]]]]]]]},SpecialNumberSuperType={option:["Special Number",{title:"`NaN`, `Infinity`, `-Infinity`, `-0`"}],childTypes:["infinity","negativeInfinity","nan","negativeZero"],stringRegex:/^(?:NaN|-?Infinity|-0)$/u,toValue:g=>({value:"-0"===g?-0:"NaN"===g?NaN:"Infinity"===g?1/0:-1/0}),getSelect:({root:g})=>$e(g,"select"),getInput:({root:g})=>$e(g,"select"),getValue({root:g}){return this.toValue(this.getSelect({root:g}).value).value},setValue({root:g,value:v}){this.getSelect({root:g}).value=Object.is(v,-0)?"-0":String(v)},viewUI:({value:g})=>["i",{dataset:{type:"SpecialNumber"}},[Object.is(g,-0)?"-0":String(g)]],editUI:({typeNamespace:g,value:v=NaN})=>["div",{dataset:{type:"SpecialNumber"}},[["label",["Special number: ",["select",{name:`${g}-SpecialNumber`},[["option",{value:"NaN",selected:Number.isNaN(v)},["NaN"]],["option",{value:"Infinity",selected:v===1/0},["Infinity"]],["option",{value:"-Infinity",selected:v===-1/0},["-Infinity"]],["option",{value:"-0",selected:Object.is(v,-0)},["-0"]]]]]]]]},errorType={option:["Error"],stringRegex:/^Error\((.*)\)$/u,valueMatch:g=>"Error"===toStringTag(g)&&hasConstructorOf(g,Error),toValue(g){const v=JSON.parse(g);return{value:B.error.revive(v,{})}},getInput:({root:g})=>$e(g,"input:not([type])"),setValue({root:g,value:v}){return"string"==typeof v.message?$e(g,"input.message:not([type])").value=v.message:$e(g,"input.message[type=checkbox]").click(),"string"==typeof v.name?$e(g,"input.name:not([type])").value=v.name:$e(g,"input.name[type=checkbox]").click(),"string"==typeof v.fileName?$e(g,"input.fileName:not([type])").value=v.fileName:$e(g,"input.fileName[type=checkbox]").click(),"number"==typeof v.lineNumber?$e(g,"input.lineNumber[type=number]").value=v.lineNumber:$e(g,"input.lineNumber[type=number]").value="","number"==typeof v.columnNumber?$e(g,"input.columnNumber[type=number]").value=v.columnNumber:$e(g,"input.columnNumber[type=number]").value="","string"==typeof v.stack?$e(g,"textarea.stack:not([type])").value=v.stack:$e(g,"input.stack[type=checkbox]").click(),(async()=>{await tick(),"object"==typeof v.cause&&($e(g,".cause").click(),await this.setValue({root:$e(g,".causeContents"),value:v.cause}))})()},getValue({root:g}){let v;if($e(g,"input.message[type=checkbox]").checked){const L=$e(g,"input.message:not([type])").value;v=new Error(L)}else v=new Error,v.message=void 0;if($e(g,"input.name[type=checkbox]").checked){const L=$e(g,"input.name:not([type])").value;v.name=L}else v.name=void 0;if($e(g,"input.fileName[type=checkbox]").checked){const L=$e(g,"input.fileName:not([type])").value;v.fileName=L}else v.fileName=void 0;if($e(g,"input.stack[type=checkbox]").checked){const L=$e(g,"textarea.stack:not([type])").value;v.stack=L}else v.stack=void 0;const L=$e(g,"input.lineNumber[type=number]").value;v.lineNumber=""===L?void 0:Number(L);const R=$e(g,"input.columnNumber[type=number]").value;v.columnNumber=""===R?void 0:Number(R);const W=$e(g,".causeContents");return W.children.length&&(v.cause=this.getValue({root:W})),v},viewUI({value:g,specificSchemaObject:v,types:L,format:R}){return["div",{dataset:{type:"error"}},[["b",{class:"emphasis",title:schemaLabel(v)?"(an Error)":void 0},[schemaLabel(v)??"Error"]],..."string"==typeof g.message?[["div",[["b",["Message: "]],["span",[g.message]]]]]:[],..."string"==typeof g.name?[["div",[["b",["Name: "]],["span",[g.name]]]]]:[],..."string"==typeof g.fileName?[["div",[["b",["File name: "]],["span",[g.fileName]]]]]:[],..."number"==typeof g.lineNumber?[["div",[["b",["Line number: "]],["span",[g.lineNumber]]]]]:[],..."number"==typeof g.columnNumber?[["div",[["b",["Column number: "]],["span",[g.columnNumber]]]]]:[],..."string"==typeof g.stack?[["div",[["b",["Stack: "]],["span",[g.stack]]]]]:[],["b",["Cause: "]],["div",{class:"causeHolder"},[["button",{$on:{click(g){g.preventDefault();const{target:v}=g,L=v.nextElementSibling;L.hidden=!L.hidden,v.textContent=L.hidden?"+":"-"}}},["-"]],["div",{class:"causeContents"},[g.cause?this.viewUI({format:R,value:g.cause,types:L}):""]]]]]]},editUI({typeNamespace:g,types:v,specificSchemaObject:L,value:R={message:"",name:"",fileName:"",lineNumber:"",columnNumber:"",stack:"",cause:void 0}}){const click=function(g){this.parentNode.nextElementSibling.hidden=!g.target.checked},W=this;"object"==typeof R.cause&&setTimeout(()=>{$e(ie,".cause").click()},0);const ie=jmlExports.jml("div",{dataset:{type:"error"},title:schemaLabel(L)??"Error"},[["div",[["label",["Message? ",["input",{class:"message",type:"checkbox",checked:"string"==typeof R.message,$on:{click:click}}]]]," ",["label",{hidden:"string"!=typeof R.message},["Message ",["input",{class:"message",name:`${g}-error-message`,value:R.message}]]]]],["div",[["label",["Name? ",["input",{class:"name",type:"checkbox",checked:"string"==typeof R.name,$on:{click:click}}]]]," ",["label",{hidden:"string"!=typeof R.name},["Name ",["input",{class:"name",name:`${g}-error-name`,value:R.name}]]]]],["br"],["div",[["label",["File name? ",["input",{class:"fileName",type:"checkbox",checked:"string"==typeof R.fileName,$on:{click:click}}]]]," ",["label",{hidden:"string"!=typeof R.fileName},["File name ",["input",{class:"fileName",name:`${g}-error-fileName`,value:R.fileName}]]]]],["label",["Line number ",["input",{class:"lineNumber",name:`${g}-error-lineNumber`,type:"number",step:"any",value:R.lineNumber}]]],["br"],["label",["Column number ",["input",{class:"columnNumber",name:`${g}-error-columnNumber`,type:"number",step:"any",value:R.columnNumber}]]],["div",[["label",["Stack? ",["input",{class:"stack",type:"checkbox",checked:"string"==typeof R.stack,$on:{click:click}}]]],["label",{hidden:"string"!=typeof R.stack},["Stack ",["textarea",{class:"stack",name:`${g}-error-stack`},[R.stack]]]]]],["label",["Cause? ",["input",{class:"cause",type:"checkbox",$on:{click(L){click.call(this,L);const ie=this.parentElement.nextElementSibling,ce=$e(ie,".causeContents");if(!ce?.children.length){const L=W.editUI({typeNamespace:g,types:v,value:R.cause});jmlExports.jml(...L,ce)}}}}]]],["div",{class:"causeHolder",hidden:!0},[["label",["Cause "]],["button",{$on:{click(g){g.preventDefault();const{target:v}=g,L=$e(v.closest(".causeHolder"),".causeContents");L.hidden=!L.hidden,v.textContent=L.hidden?"+":"-"}}},["-"]],["div",{class:"causeContents"}]]]]);return[ie]}};function getConstructor(g){const v=Function.prototype.toString.call(g);return v.slice(9,v.indexOf("("))}const specialErrorsMap=new Map([["TypeError",TypeError],["RangeError",RangeError],["SyntaxError",SyntaxError],["ReferenceError",ReferenceError],["EvalError",EvalError],["URIError",URIError]]);"undefined"!=typeof AggregateError&&specialErrorsMap.set("AggregateError",AggregateError),"undefined"!=typeof InternalError&&specialErrorsMap.set("InternalError",InternalError);const specialErrors=[...specialErrorsMap.keys()],errorsSpecialType={option:["Special errors"],valueMatch:g=>[TypeError,RangeError,SyntaxError,ReferenceError,EvalError,URIError,AggregateError].some(v=>hasConstructorOf(g,v)),childTypes:specialErrors.map(g=>g.toLowerCase()),stringRegex:new RegExp("^(?<errorClass>"+specialErrors.join("|")+String.raw`)\((?<innerContent>.*)\)$`,"u"),toValue(g,v){const{groups:{errorClass:L}={}}=v.match,R=JSON.parse(g);return{value:C[L.toLowerCase()].revive(R,{})}},getInput:({root:g})=>$e(g,"input:not([type])"),setValue({root:g,value:v}){const L=$e(g,".errorType");return L.value=getConstructor(v.constructor),L.$hideAggregateErrorsLabel(),"string"==typeof v.message?$e(g,"input.message:not([type])").value=v.message:$e(g,"input.message[type=checkbox]").click(),"string"==typeof v.name?$e(g,"input.name:not([type])").value=v.name:$e(g,"input.name[type=checkbox]").click(),"string"==typeof v.fileName?$e(g,"input.fileName:not([type])").value=v.fileName:$e(g,"input.fileName[type=checkbox]").click(),"number"==typeof v.lineNumber?$e(g,"input.lineNumber[type=number]").value=v.lineNumber:$e(g,"input.lineNumber[type=number]").value="","number"==typeof v.columnNumber?$e(g,"input.columnNumber[type=number]").value=v.columnNumber:$e(g,"input.columnNumber[type=number]").value="","string"==typeof v.stack?$e(g,"textarea.stack:not([type])").value=v.stack:$e(g,"input.stack[type=checkbox]").click(),(async()=>{if(await tick(),"object"==typeof v.cause&&($e(g,".cause").click(),await this.setValue({root:$e(g,".causeContents"),value:v.cause})),Array.isArray(v.errors)){const L=$e(g,"input.aggregateErrors");L.click(),L.$emptyAggregateErrorsContents(),L.$populateContents(v.errors)}})()},getValue({root:g,stateObj:v}){const L=specialErrorsMap.get($e(g,".errorType").value);if(!L)throw new Error("Not yet instantiated");let R;const W=L;if($e(g,"input.message[type=checkbox]").checked){const ie=$e(g,"input.message:not([type])").value;if("AggregateError"===getConstructor(L)){const L=$e(g,".aggregateErrorsContents").firstElementChild;if(!L)throw new Error("Not yet instantiated");R=new W(arrayType.getValue({stateObj:v,root:L}),ie)}else R=new W(ie)}else{if("AggregateError"===getConstructor(L)){const L=$e(g,".aggregateErrorsContents").firstElementChild;if(!L)throw new Error("Not yet instantiated");R=new W(arrayType.getValue({stateObj:v,root:L}))}else R=new W;R.message=void 0}if($e(g,"input.name[type=checkbox]").checked){const v=$e(g,"input.name:not([type])").value;R.name=v}else R.name=void 0;if($e(g,"input.fileName[type=checkbox]").checked){const v=$e(g,"input.fileName:not([type])").value;R.fileName=v}else R.fileName=void 0;if($e(g,"input.stack[type=checkbox]").checked){const v=$e(g,"textarea.stack:not([type])").value;R.stack=v}else R.stack=void 0;const ie=$e(g,"input.lineNumber[type=number]").value;R.lineNumber=""===ie?void 0:Number(ie);const ce=$e(g,"input.columnNumber[type=number]").value;R.columnNumber=""===ce?void 0:Number(ce);const le=$e(g,".causeContents");return le.children.length&&(R.cause=this.getValue({stateObj:v,root:le})),R},viewUI({value:g,types:v,format:L,specificSchemaObject:R,typeNamespace:W,resultType:ie}){const ce=getConstructor(g.constructor);return["div",{dataset:{type:"errors"},title:schemaLabel(R)?`(an Error ${ce})`:void 0},[schemaLabel(R)??["div",[["b",["Error type: "]],["span",[ce]]]],..."string"==typeof g.message?[["div",[["b",["Message: "]],["span",[g.message]]]]]:[],..."string"==typeof g.name?[["div",[["b",["Name: "]],["span",[g.name]]]]]:[],..."string"==typeof g.fileName?[["div",[["b",["File name: "]],["span",[g.fileName]]]]]:[],..."number"==typeof g.lineNumber?[["div",[["b",["Line number: "]],["span",[g.lineNumber]]]]]:[],..."number"==typeof g.columnNumber?[["div",[["b",["Column number: "]],["span",[g.columnNumber]]]]]:[],..."string"==typeof g.stack?[["div",[["b",["Stack: "]],["span",[g.stack]]]]]:[],["b",["Cause: "]],["div",{class:"causeHolder"},[["button",{$on:{click(g){g.preventDefault();const{target:v}=g,L=v.nextElementSibling;L.hidden=!L.hidden,v.textContent=L.hidden?"+":"-"}}},["-"]],["div",{class:"causeContents"},[g.cause?this.viewUI({format:L,value:g.cause,types:v}):""]]]],"AggregateError"===ce?["div",[["b",["Errors "]],["div",{class:"aggregateErrorsHolder"},[["button",{$on:{click(g){g.preventDefault();const{target:v}=g,L=v.nextElementSibling;L.hidden=!L.hidden,v.textContent=L.hidden?"+":"-"}}},["-"]],["div",{class:"aggregateErrorsContents"},[g.errors?(()=>{const[R]=arrayType.viewUI({typeNamespace:W,resultType:ie,format:L,type:"arrayNonindexKeys",value:[],types:v});return g.errors.forEach((g,v)=>{R.$addAndSetArrayElement({propName:String(v),type:"Error"===getConstructor(g.constructor)?"error":"errors",value:g,bringIntoFocus:!1})}),R})():""]]]]]]:""]]},editUI({typeNamespace:g,specificSchemaObject:v,types:L,buildTypeChoices:R,format:W,topRoot:ie,bringIntoFocus:ce,value:le={message:"",name:"",fileName:"",lineNumber:"",columnNumber:"",stack:"",cause:void 0,errors:void 0}}){const click=function(g){this.parentNode.nextElementSibling.hidden=!g.target.checked},ue=this;"object"==typeof le.cause&&setTimeout(()=>{$e(me,".cause").click()},0),Array.isArray(le.errors)&&setTimeout(()=>{$e(me,"input.aggregateErrors").click()},0);const me=jmlExports.jml("div",{dataset:{type:"errors"},title:schemaLabel(v)??"Special error"},[["div",[["label",["Special error type ",["select",{class:"errorType",$custom:{$hideAggregateErrorsLabel(){$e(this.parentElement?.closest("div[data-type=errors]"),"label.aggregateErrors").hidden="AggregateError"!==this.value}},$on:{change(){this.$hideAggregateErrorsLabel()}}},[["option",{value:""},["Select an error type"]],...specialErrors.map(g=>["option",{selected:g===getConstructor(le.constructor)?"selected":void 0},[g]])]]]],["br"],["label",["Message? ",["input",{class:"message",type:"checkbox",checked:"string"==typeof le.message,$on:{click:click}}]]]," ",["label",{hidden:"string"!=typeof le.message},["Message ",["input",{class:"message",name:`${g}-errors-message`,value:le.message}]]]]],["div",[["label",["Name? ",["input",{class:"name",type:"checkbox",checked:"string"==typeof le.name,$on:{click:click}}]]]," ",["label",{hidden:"string"!=typeof le.name},["Name ",["input",{class:"name",name:`${g}-errors-name`,value:le.name}]]]]],["br"],["div",[["label",["File name? ",["input",{class:"fileName",type:"checkbox",checked:"string"==typeof le.fileName,$on:{click:click}}]]]," ",["label",{hidden:"string"!=typeof le.fileName},["File name ",["input",{class:"fileName",name:`${g}-errors-fileName`,value:le.fileName}]]]]],["label",["Line number ",["input",{class:"lineNumber",name:`${g}-errors-lineNumber`,type:"number",step:"any",value:le.lineNumber}]]],["br"],["label",["Column number ",["input",{class:"columnNumber",name:`${g}-errors-columnNumber`,type:"number",step:"any",value:le.columnNumber}]]],["div",[["label",["Stack? ",["input",{class:"stack",type:"checkbox",checked:"string"==typeof le.stack,$on:{click:click}}]]],["label",{hidden:"string"!=typeof le.stack},["Stack ",["textarea",{class:"stack",name:`${g}-errors-stack`},[le.stack??""]]]]]],["label",["Cause? ",["input",{class:"cause",type:"checkbox",$on:{click(v){click.call(this,v);const W=this.parentElement.nextElementSibling,ie=$e(W,".causeContents");if(!ie?.children.length){const v=ue.editUI({buildTypeChoices:R,typeNamespace:g,types:L,value:le.cause});jmlExports.jml(...v,ie)}}}}]]],["div",{class:"causeHolder",hidden:!0},[["label",["Cause "]],["button",{$on:{click(g){g.preventDefault();const{target:v}=g,L=$e(v.closest(".causeHolder"),".causeContents");L.hidden=!L.hidden,v.textContent=L.hidden?"+":"-"}}},["-"]],["div",{class:"causeContents"}]]],["br"],["label",{class:"aggregateErrors"},{hidden:!le.errors},["Aggregate errors? ",["input",{class:"aggregateErrors",type:"checkbox",$custom:{$emptyAggregateErrorsContents(){const g=this.parentElement.nextElementSibling,v=$e(g,".aggregateErrorsContents");for(;v?.firstChild;)v?.firstChild.remove()},$populateContents(v){const le=this.parentElement.nextElementSibling,ue=$e(le,".aggregateErrorsContents");if(!ue?.children.length){const[le]=arrayType.editUI({typeNamespace:g,types:L,buildTypeChoices:R,format:W,type:"array",topRoot:ie,bringIntoFocus:ce,forcedState:"errorsArray",value:[]});v.forEach((g,v)=>{le.$addAndSetArrayElement({propName:String(v),type:"Error"===getConstructor(g.constructor)?"error":"errors",value:g,bringIntoFocus:!1,setAValue:!0})}),jmlExports.jml(le,ue)}}},$on:{click(g){click.call(this,g);const v=this;le.errors?v.$populateContents(le.errors):v.$populateContents([{message:"",name:"",stack:""}])}}}]]],["div",{class:"aggregateErrorsHolder",hidden:!0},[["label",["Aggregate errors "]],["button",{$on:{click(g){g.preventDefault();const{target:v}=g,L=$e(v.closest(".aggregateErrorsHolder"),".aggregateErrorsContents");L.hidden=!L.hidden,v.textContent=L.hidden?"+":"-"}}},["-"]],["div",{class:"aggregateErrorsContents"}]]]]);return[me]}};let audioCtx;function visualize(g,v){audioCtx||(audioCtx=new AudioContext);const L=v.getContext("2d"),R=audioCtx.createMediaStreamSource(g),W=audioCtx.createAnalyser();W.fftSize=2048;const ie=W.frequencyBinCount,ce=new Uint8Array(ie);R.connect(W),function draw(){const g=v.width,R=v.height;requestAnimationFrame(draw),W.getByteTimeDomainData(ce),L.fillStyle="rgb(200, 200, 200)",L.fillRect(0,0,g,R),L.lineWidth=2,L.strokeStyle="rgb(0, 0, 0)",L.beginPath();const le=1*g/ie;let ue=0;for(let g=0;g<ie;g++){const v=ce[g]/128*R/2;0===g?L.moveTo(ue,v):L.lineTo(ue,v),ue+=le}L.lineTo(v.width,v.height/2),L.stroke()}()}async function getUserMedia(g){let v=null;try{v=await navigator.mediaDevices.getUserMedia(g)}catch(g){return console.error("err",g),null}return v}async function startScreenCapture(g){let v=null;try{v=await navigator.mediaDevices.getDisplayMedia(g)}catch(g){console.error(`Error: ${g}`)}return v}const commonMimeTypes=[...new Set([...Object.keys(types$1),...Object.keys(types)])].toSorted((g,v)=>g.localeCompare(v));let fileContentTypeListId=0;function checkFileSize(g,v,L){return void 0!==v&&g<v?`File size (${g} bytes) is below the minimum of ${v} bytes`:void 0!==L&&g>L?`File size (${g} bytes) exceeds the maximum of ${L} bytes`:null}function checkFileMimeType(g,v){return v&&v.length>0&&!v.includes(g)?`File type (${g||"(none)"}) is not among the allowed MIME types: ${v.join(", ")}`:null}function checkFile(g,v,L,R){return g?checkFileSize(g.size,v,L)??checkFileMimeType(g.type,R):"File data is required"}function getDateString(g){const v=new Date(g);return new Date(v.getTime()-6e4*v.getTimezoneOffset()).toISOString().slice(0,-1)}function createFileForBinary(g,v){const L=g.$value;return new File([void 0===v.stringContents?L&&"File"===Object.prototype.toString.call(L).slice(8,-1)?L:"":v.stringContents],void 0===v.name?L?.name??"":v.name,{type:void 0===v.type?L?.type??"":v.type,lastModified:void 0===v.lastModified?L?.lastModified??0:v.lastModified})}function newFileForBinary(g,v){const L=createFileForBinary(g,v);return g.$value=L,L}function binaryButton$1(g,v,L,R,W,ie){return["button",{class:"viewBinary",$custom:{$value:g,$min:L,$max:R,$mime:W},$on:{click(g){const v=this;g.preventDefault(),v.$value&&"File"===Object.prototype.toString.call(v.$value).slice(8,-1)||newFileForBinary(v,{});const ce=new FileReader;ce.addEventListener("load",async function(){const g=await dialogs.makeSubmitDialog({submitText:"Save",submit(){const ce=$e(g,".view-binary"),le=createFileForBinary(v,{stringContents:ce.value}),ue=checkFile(le,L,R,W);ue?dialogs.alert(ie?.(ue)??ue):($e(v.closest('[data-type="file"]'),"fieldset.fileMetaData").$setValue(le),g.close())},children:[["div",["Binary source",["br"],["textarea",{class:"view-binary"},[ce.result??""]]]]]})}),ce.addEventListener("error",async function(){console.error(ce.error),await dialogs.alert(ce.error.message)}),ce.readAsBinaryString(v.$value)}}},[v?"Edit binary data":"View binary data"]]}const fileType={option:["File"],stringRegex:/^File\((.*)\)$/u,valueMatch:g=>"File"===toStringTag(g),validate({root:g}){const v=this.getInput({root:g}),L=checkFile(v.$value,v.$min,v.$max,v.$mime);return{valid:!L,message:L??void 0}},toValue(g){const v=JSON.parse(g);return{value:new File([v.stringContents],v.name,{type:v.type,lastModified:v.lastModified})}},getInput:({root:g})=>$e(g,"button.viewBinary"),setValue({root:g,value:v}){$e(g,"fieldset.fileMetaData").$setValue(v)},getValue({root:g}){return this.getInput({root:g}).$value},viewUI:({value:g,specificSchemaObject:v})=>["div",{dataset:{type:"file"}},[["b",{class:"emphasis",title:schemaLabel(v)?"(a File)":void 0},[schemaLabel(v)??"File"]],["br"],["br"],["b",["Name "]],g.name,["br"],["b",["Size (in bytes) "]],String(g.size),["br"],["b",["Content type "]],g.type,["br"],["b",["Last modified date "]],getDateString(g.lastModified),["br"],g.type.startsWith("text/")||"application/json"===g.type?(()=>{const v=jmlExports.jml("div"),L=new FileReader;return L.addEventListener("load",function(){v.append(jmlExports.jml("div",["Text source",["br"],["textarea",{class:"view-text"},[L.result??""]]]))}),L.addEventListener("error",function(){console.error(L.error),v.append(L.error.message)}),L.readAsBinaryString(g),v})():binaryButton$1(g),g.type.startsWith("video/")?(()=>{const v=URL.createObjectURL(g),L=jmlExports.jml("video",{src:v,class:"video",$on:{loadeddata(){/iPad|iPhone|iPod|Safari/u.test(navigator.userAgent)||URL.revokeObjectURL(v)}}});return["div",[L,["button",{class:"play",$on:{click(g){g.preventDefault(),L.play()}}},["Play"]],["button",{class:"pause",$on:{click(g){g.preventDefault(),L.pause()}}},["Pause"]],["button",{class:"replay",$on:{click(g){g.preventDefault(),L.pause(),L.currentTime=0,L.play()}}},["Replay"]]]]})():"",g.type.startsWith("audio/")?(()=>{const v=URL.createObjectURL(g),L=jmlExports.jml("audio",{src:v,class:"audio",$on:{loadeddata(){URL.revokeObjectURL(v)}}});return["div",[L,["button",{class:"play",$on:{click(g){g.preventDefault(),L.play()}}},["Play"]],["button",{class:"pause",$on:{click(g){g.preventDefault(),L.pause()}}},["Pause"]],["button",{class:"replay",$on:{click(g){g.preventDefault(),L.pause(),L.currentTime=0,L.play()}}},["Replay"]]]]})():"","application/pdf"===g.type?(()=>{const v=URL.createObjectURL(g);return jmlExports.jml("iframe",{class:"PDF",src:v,$on:{load(){URL.revokeObjectURL(v)}}})})():"",g.type.startsWith("image/")?["img",{class:"imageView",src:URL.createObjectURL(g),$on:{load(){URL.revokeObjectURL(this.src)}}}]:""]],editUI({typeNamespace:g,specificSchemaObject:v,types:L,value:R={}}){const W=v,{min:ie,max:ce,mime:le}=W??{},getValidationMessage=g=>L.getValidationMessage({message:g,schema:v,typeSpecific:!0});fileContentTypeListId++;const ue=`fileContentTypes-${fileContentTypeListId}`,me=le&&le.length>0?le:commonMimeTypes;return["div",{dataset:{type:"file"},title:schemaLabel(v)??"File"},[["fieldset",{class:"fileMetaData",$custom:{$setValue(g){const v=this;$e(v,".fileName").value=g.name,$e(v,".size").value=String(g.size);const L=$e(v,".contentType");L.value=g.type,L.setCustomValidity(getValidationMessage(checkFileMimeType(g.type,le))??""),$e(v,".lastModified").value="number"==typeof g.lastModified?getDateString(g.lastModified):"";const R=$e(v,"button.viewBinary");R.$value="number"==typeof g.lastModified?g:void 0;const W=checkFile(R.$value,R.$min,R.$max,R.$mime);R.setCustomValidity(getValidationMessage(W)??"")}}},[["legend",["Current file data"]],["label",["Name ",["input",{size:50,class:"fileName",value:R.name??"",$on:{change(){newFileForBinary($e(this.parentElement?.parentElement,"button.viewBinary"),{name:this.value})}}}]]],["br"],["label",[`Size (in bytes)${void 0!==ie||void 0!==ce?` (min: ${ie??0}${void 0===ce?"":`, max: ${ce}`})`:""} `,["input",{type:"number",step:"1",disabled:!0,class:"size",value:String(R.size)}]]],["br"],["label",[`Content type${le&&le.length>0?` (allowed: ${le.join(", ")})`:""} `,["input",{class:"contentType",value:R.type??"",list:ue,$on:{change(){const g=this,v=$e(this.parentElement?.parentElement,"button.viewBinary"),L=g.value,R=checkFile(createFileForBinary(v,{type:L}),ie,ce,le),W=getValidationMessage(R);if(g.setCustomValidity(W??""),R)return dialogs.alert(W??R),void g.reportValidity();newFileForBinary(v,{type:L})}}}]]],["datalist",{id:ue,class:"contentTypeOptions"},me.map(g=>["option",[g]])],["br"],["label",["Last modified date ",["input",{type:"datetime-local",class:"lastModified",step:.001,value:R.lastModified?getDateString(R.lastModified):void 0,$on:{change(){const g=$e(this.parentElement?.parentElement,"button.viewBinary"),v=this.value;newFileForBinary(g,{lastModified:new Date(v).getTime()})}}}]]],["br"],binaryButton$1(R,!0,ie,ce,le,getValidationMessage),["button",{class:"clearData",$on:{click(g){g.preventDefault(),this.parentElement.$setValue({name:"",size:"",type:"",lastModified:""})}}},["Clear data"]]]],["fieldset",[["legend",["Supply file through upload"]],["label",["File ",["input",{$on:{change(){const g=this;if(!g.files)return;const v=g.files[0],L=checkFile(v,ie,ce,le);if(L)return dialogs.alert(getValidationMessage(L)??L),void(g.value="");const R=(this.parentElement?.parentElement)?.previousElementSibling;R.$setValue(v)}},accept:le?.join(","),name:`${g}-file`,type:"file"}]]]]],["fieldset",[["legend",["Supply file through recording"]],(()=>{const g=jmlExports.jml("select",{class:"device",$on:{async change(){const v=this.nextElementSibling?.nextElementSibling;$e(v,"img.photo").hidden=!0;const L=$e(v,"video.previewMedia"),R=jmlExports.jml("video",{class:"previewMedia"});if(L.$stream){L.$stream.getTracks().forEach(g=>{g.stop()}),L.srcObject=null}L.replaceWith(R);const W=$e(g.nextElementSibling,".takeSnapshot"),ie=$e(g.nextElementSibling,".recordMedia");$e(g.nextElementSibling?.nextElementSibling,"div.recordedMedia").hidden=!0;const ce=$e(v,"canvas.visualizer");let le,ue;switch(R.$screenShare=!1,g.value){case"audio-and-video":le={video:!0,audio:!0},R.hidden=!1,W.hidden=!1,ie.textContent="Record video/audio";break;case"video":le={video:!0},R.hidden=!1,W.hidden=!1,ie.textContent="Record video";break;case"audio":le={audio:!0},R.hidden=!0,W.hidden=!0,ie.textContent="Record audio";break;case"screenShare":ue={video:!0};case"screenShareAndVideo":ue||(ue={video:!0,audio:!0}),R.$screenShare=!0,R.hidden=!0,W.hidden=!0,ce.hidden=!0;break;default:return}if(le){const g=await getUserMedia(le);if(!g)return void await dialogs.alert("Error getting user media");if(v.hidden=!1,R.srcObject=g,R.$stream=g,le.video){const g=$e(v,"canvas.recordedImage");R.addEventListener("canplay",()=>{g.setAttribute("width",String(R.videoWidth)),g.setAttribute("height",String(R.videoHeight))})}R.addEventListener("loadedmetadata",()=>{R.play(),le?.audio?(ce.hidden=!1,visualize(g,ce)):ce.hidden=!0})}else if(ue){const g=await startScreenCapture(ue);if(!g)return void await dialogs.alert("Error getting user media");v.hidden=!1,R.srcObject=g,R.$stream=g}}}},[["option",{value:""},["Please choose a device"]]]);return(async()=>{const v=await navigator.mediaDevices.enumerateDevices();let L=!1,R=!1;v.forEach(g=>{switch(g.kind){case"audioinput":L=!0;break;case"videoinput":R=!0}}),L&&jmlExports.jml("option",{value:"audio"},["Microphone only"],g),R&&jmlExports.jml("option",{value:"video"},["Video camera only"],g),L&&R&&jmlExports.jml("option",{value:"audio-and-video"},["Video camera and microphone"],g),jmlExports.jml("option",{value:"screenShare"},["Screen share"],g),jmlExports.jml("option",{value:"screenShareAndVideo"},["Screen share and microphone"],g)})(),g})()," ",["div",[["button",{class:"recordMedia",$on:{click(g){g.preventDefault();const v=$e(this.parentElement?.nextElementSibling,"video.previewMedia");if(!v.srcObject)return void dialogs.alert("No stream found to record");const L=this.parentElement?.nextElementSibling;$e(L,"img.photo").hidden=!0;const R="video/mp4",W=new MediaRecorder(v.$stream,{mimeType:R});let ue=[];W.addEventListener("dataavailable",g=>{ue.push(g.data)});try{W.start()}catch{return void dialogs.alert("Error starting media recorder")}W.addEventListener("stop",()=>{const g=new Blob(ue,{type:R}),v=URL.createObjectURL(g),L=$e(this.parentElement?.nextElementSibling,"video.recordedMedia");L.parentElement.hidden=!1,L.src=v,L.addEventListener("loadeddata",()=>{/iPad|iPhone|iPod|Safari/u.test(navigator.userAgent)||URL.revokeObjectURL(v)});const W=new File([g],"placeholder.mp4",{type:R});console.log("file",W);const me=checkFile(W,ie,ce,le);if(me)return dialogs.alert(getValidationMessage(me)??me),void(ue=[]);const ge=this.closest('[data-type="file"]');$e(ge,"fieldset.fileMetaData").$setValue(W),ue=[]}),this.$mediaRecorder=W}}},["Record media"]],["button",{class:"stopRecording",$on:{click(g){g.preventDefault(),this.previousElementSibling.$mediaRecorder.stop()}}},["Stop recording"]],["button",{class:"takeSnapshot",hidden:!0},{$on:{click(g){g.preventDefault();const v=this.parentElement?.nextElementSibling;$e(v,".recordedMedia").hidden=!0;const L=$e(v,"canvas.recordedImage"),R=L.getContext("2d"),W=$e(v,"video.previewMedia");R.drawImage(W,0,0,L.width,L.height);const ue=$e(v,"img.photo");L.toBlob(g=>{if(!g)return void dialogs.alert("Error converting canvas to Blob");const v=jmlExports.jml("img",{class:"photo"}),L=URL.createObjectURL(g);v.addEventListener("load",()=>{URL.revokeObjectURL(L)});const R=new File([g],"placeholder.png",{type:g.type});console.log("file",R);const W=checkFile(R,ie,ce,le);if(W)return void dialogs.alert(getValidationMessage(W)??W);const me=this.closest('[data-type="file"]');$e(me,"fieldset.fileMetaData").$setValue(R),v.src=L,ue.replaceWith(v)})}}},["Take and use snapshot as file"]]]],["div",{class:"videoContainer",hidden:!0},[["canvas",{class:"visualizer",hidden:!0}],["br"],["video",{class:"previewMedia"}],["div",[["canvas",{hidden:!0,class:"recordedImage"}],["img",{class:"photo"}]]],["div",{class:"recordedMedia"},[...(()=>{const g=jmlExports.jml("video",{class:"recordedMedia"});return[g,["br"],jmlExports.jml("button",{class:"play",$on:{click(v){v.preventDefault(),g.play()}}},["Play"]),jmlExports.jml("button",{class:"pause",$on:{click(v){v.preventDefault(),g.pause()}}},["Pause"]),jmlExports.jml("button",{class:"replay",$on:{click(v){v.preventDefault(),g.pause(),g.currentTime=0,g.play()}}},["Replay"])]})()]]]]]]]]}},filelistType={option:["FileList"],array:!0,filelist:!0,regexEndings:[",",")"],stringRegexBegin:/^FileList\(/u,stringRegexEnd:/^\)/u,valueMatch:g=>"FileList"===toStringTag(g),toValue(...g){return arrayType.toValue.apply(this,g)},getValue(...g){return arrayType.getValue.apply(this,g)},getInput(...g){return arrayType.getInput.apply(this,g)},viewUI({...g}){return arrayType.viewUI.call(this,{...g,type:"filelist"})},editUI({...g}){return arrayType.editUI.call(this,{...g,type:"filelist"})}};function newBlobForBinary(g,v){const L=g.$value,R=new Blob([void 0===v.stringContents?L&&"Blob"===Object.prototype.toString.call(L).slice(8,-1)?L:"":v.stringContents],{type:void 0===v.type?L?.type??"":v.type});return g.$value=R,R}function binaryButton(g,v){return["button",{class:"viewBinary",$custom:{$value:g},$on:{click(g){const v=this;g.preventDefault(),v.$value&&"Blob"===Object.prototype.toString.call(v.$value).slice(8,-1)||newBlobForBinary(v,{});const L=new FileReader;L.addEventListener("load",async function(){const g=await dialogs.makeSubmitDialog({submitText:"Save",submit(){const L=$e(g,".view-binary"),R=newBlobForBinary(v,{stringContents:L.value});v.parentElement.$setValue(R),g.close()},children:[["div",["Binary source",["br"],["textarea",{class:"view-binary"},[L.result??""]]]]]})}),L.addEventListener("error",async function(){console.error(L.error),await dialogs.alert(L.error.message)}),L.readAsBinaryString(v.$value)}}},[v?"Edit binary data":"View binary data"]]}const blobType={option:["Blob"],stringRegex:/^Blob\((.*)\)$/u,valueMatch:g=>"Blob"===toStringTag(g),toValue(g){const v=JSON.parse(g);return{value:new Blob([v.stringContents],{type:v.type})}},getInput:({root:g})=>$e(g,"button.viewBinary"),setValue({root:g,value:v}){$e(g,"fieldset.blobMetaData").$setValue(v)},getValue({root:g}){return this.getInput({root:g}).$value},viewUI:({value:g,specificSchemaObject:v})=>["div",{dataset:{type:"blob"}},[["b",{class:"emphasis",title:schemaLabel(v)?"(a Blob)":void 0},[schemaLabel(v)??"Blob"]],["br"],["br"],["b",["Size (in bytes) "]],String(g.size),["br"],["b",["Content type "]],g.type,["br"],g.type.startsWith("text/")||"application/json"===g.type?(()=>{const v=jmlExports.jml("div"),L=new FileReader;return L.addEventListener("load",function(){v.append(jmlExports.jml("div",["Text source",["br"],["textarea",{class:"view-text"},[L.result??""]]]))}),L.addEventListener("error",function(){console.error(L.error),v.append(L.error.message)}),L.readAsBinaryString(g),v})():binaryButton(g),g.type.startsWith("video/")?(()=>{const v=URL.createObjectURL(g),L=jmlExports.jml("video",{src:v,class:"video",$on:{loadeddata(){/iPad|iPhone|iPod|Safari/u.test(navigator.userAgent)||URL.revokeObjectURL(v)}}});return["div",[L,["button",{class:"play",$on:{click(g){g.preventDefault(),L.play()}}},["Play"]],["button",{class:"pause",$on:{click(g){g.preventDefault(),L.pause()}}},["Pause"]],["button",{class:"replay",$on:{click(g){g.preventDefault(),L.pause(),L.currentTime=0,L.play()}}},["Replay"]]]]})():"",g.type.startsWith("audio/")?(()=>{const v=URL.createObjectURL(g),L=jmlExports.jml("audio",{src:v,class:"audio",$on:{loadeddata(){URL.revokeObjectURL(v)}}});return["div",[L,["button",{class:"play",$on:{click(g){g.preventDefault(),L.play()}}},["Play"]],["button",{class:"pause",$on:{click(g){g.preventDefault(),L.pause()}}},["Pause"]],["button",{class:"replay",$on:{click(g){g.preventDefault(),L.pause(),L.currentTime=0,L.play()}}},["Replay"]]]]})():"","application/pdf"===g.type?(()=>{const v=URL.createObjectURL(g);return jmlExports.jml("iframe",{class:"PDF",src:v,$on:{load(){URL.revokeObjectURL(v)}}})})():"",g.type.startsWith("image/")?["img",{class:"imageView",src:URL.createObjectURL(g),$on:{load(){URL.revokeObjectURL(this.src)}}}]:""]],editUI:({typeNamespace:g,specificSchemaObject:v,value:L={}})=>["div",{dataset:{type:"blob"},title:schemaLabel(v)??"Blob"},[["fieldset",{class:"blobMetaData",$custom:{$setValue(g){const v=this;$e(v,".size").value=String(g.size),$e(v,".contentType").value=g.type,$e(v,"button.viewBinary").$value="Blob"===Object.prototype.toString.call(g).slice(8,-1)?g:void 0}}},[["legend",["Current blob data"]],["label",["Size (in bytes) ",["input",{type:"number",step:"1",disabled:!0,class:"size",value:String(L.size)}]]],["br"],["label",["Content type ",["input",{class:"contentType",value:L.type??"",$on:{change(){newBlobForBinary($e(this.parentElement?.parentElement,"button.viewBinary"),{type:this.value})}}}]]],["br"],binaryButton(L,!0),["button",{class:"clearData",$on:{click(g){g.preventDefault(),this.parentElement.$setValue({size:"",type:""})}}},["Clear data"]]]],["fieldset",[["legend",["Supply blob through upload"]],["label",["Blob ",["input",{$on:{change(){if(!this.files)return;const g=this.files[0],v=new Blob([g],{type:g.type}),L=(this.parentElement?.parentElement)?.previousElementSibling;L.$setValue(v)}},name:`${g}-blob`,type:"file"}]]]]],["fieldset",[["legend",["Supply blob through recording"]],(()=>{const g=jmlExports.jml("select",{class:"device",$on:{async change(){const v=this.nextElementSibling?.nextElementSibling;$e(v,"img.photo").hidden=!0;const L=$e(v,"video.previewMedia"),R=jmlExports.jml("video",{class:"previewMedia"});if(L.$stream){L.$stream.getTracks().forEach(g=>{g.stop()}),L.srcObject=null}L.replaceWith(R);const W=$e(g.nextElementSibling,".takeSnapshot"),ie=$e(g.nextElementSibling,".recordMedia");$e(g.nextElementSibling?.nextElementSibling,"div.recordedMedia").hidden=!0;const ce=$e(v,"canvas.visualizer");let le,ue;switch(R.$screenShare=!1,g.value){case"audio-and-video":le={video:!0,audio:!0},R.hidden=!1,W.hidden=!1,ie.textContent="Record video/audio";break;case"video":le={video:!0},R.hidden=!1,W.hidden=!1,ie.textContent="Record video";break;case"audio":le={audio:!0},R.hidden=!0,W.hidden=!0,ie.textContent="Record audio";break;case"screenShare":ue={video:!0};case"screenShareAndVideo":ue||(ue={video:!0,audio:!0}),R.$screenShare=!0,R.hidden=!0,W.hidden=!0,ce.hidden=!0;break;default:return}if(le){const g=await getUserMedia(le);if(!g)return void await dialogs.alert("Error getting user media");if(v.hidden=!1,R.srcObject=g,R.$stream=g,le.video){const g=$e(v,"canvas.recordedImage");R.addEventListener("canplay",()=>{g.setAttribute("width",String(R.videoWidth)),g.setAttribute("height",String(R.videoHeight))})}R.addEventListener("loadedmetadata",()=>{R.play(),le?.audio?(ce.hidden=!1,visualize(g,ce)):ce.hidden=!0})}else if(ue){const g=await startScreenCapture(ue);if(!g)return void await dialogs.alert("Error getting user media");v.hidden=!1,R.srcObject=g,R.$stream=g}}}},[["option",{value:""},["Please choose a device"]]]);return(async()=>{const v=await navigator.mediaDevices.enumerateDevices();let L=!1,R=!1;v.forEach(g=>{switch(g.kind){case"audioinput":L=!0;break;case"videoinput":R=!0}}),L&&jmlExports.jml("option",{value:"audio"},["Microphone only"],g),R&&jmlExports.jml("option",{value:"video"},["Video camera only"],g),L&&R&&jmlExports.jml("option",{value:"audio-and-video"},["Video camera and microphone"],g),jmlExports.jml("option",{value:"screenShare"},["Screen share"],g),jmlExports.jml("option",{value:"screenShareAndVideo"},["Screen share and microphone"],g)})(),g})()," ",["div",[["button",{class:"recordMedia",$on:{click(g){g.preventDefault();const v=$e(this.parentElement?.nextElementSibling,"video.previewMedia");if(!v.srcObject)return void dialogs.alert("No stream found to record");const L=this.parentElement?.nextElementSibling;$e(L,"img.photo").hidden=!0;const R="video/mp4",W=new MediaRecorder(v.$stream,{mimeType:R});let ie=[];W.addEventListener("dataavailable",g=>{ie.push(g.data)});try{W.start()}catch{return void dialogs.alert("Error starting media recorder")}W.addEventListener("stop",()=>{const g=new Blob(ie,{type:R}),v=URL.createObjectURL(g),L=$e(this.parentElement?.nextElementSibling,"video.recordedMedia");L.parentElement.hidden=!1,L.src=v,L.addEventListener("loadeddata",()=>{/iPad|iPhone|iPod|Safari/u.test(navigator.userAgent)||URL.revokeObjectURL(v)});const W=this.closest('[data-type="blob"]');$e(W,"fieldset.blobMetaData").$setValue(g),ie=[]}),this.$mediaRecorder=W}}},["Record media"]],["button",{class:"stopRecording",$on:{click(g){g.preventDefault(),this.previousElementSibling.$mediaRecorder.stop()}}},["Stop recording"]],["button",{class:"takeSnapshot",hidden:!0},{$on:{click(g){g.preventDefault();const v=this.parentElement?.nextElementSibling;$e(v,".recordedMedia").hidden=!0;const L=$e(v,"canvas.recordedImage"),R=L.getContext("2d"),W=$e(v,"video.previewMedia");R.drawImage(W,0,0,L.width,L.height);const ie=$e(v,"img.photo");L.toBlob(g=>{if(!g)return void dialogs.alert("Error converting canvas to Blob");const v=jmlExports.jml("img",{class:"photo"}),L=URL.createObjectURL(g);v.addEventListener("load",()=>{URL.revokeObjectURL(L)});const R=this.closest('[data-type="blob"]');$e(R,"fieldset.blobMetaData").$setValue(g),v.src=L,ie.replaceWith(v)})}}},["Take and use snapshot as blob"]]]],["div",{class:"videoContainer",hidden:!0},[["canvas",{class:"visualizer",hidden:!0}],["br"],["video",{class:"previewMedia"}],["div",[["canvas",{hidden:!0,class:"recordedImage"}],["img",{class:"photo"}]]],["div",{class:"recordedMedia"},[...(()=>{const g=jmlExports.jml("video",{class:"recordedMedia"});return[g,["br"],jmlExports.jml("button",{class:"play",$on:{click(v){v.preventDefault(),g.play()}}},["Play"]),jmlExports.jml("button",{class:"pause",$on:{click(v){v.preventDefault(),g.pause()}}},["Pause"]),jmlExports.jml("button",{class:"replay",$on:{click(v){v.preventDefault(),g.pause(),g.currentTime=0,g.play()}}},["Replay"])]})()]]]]]]]]};let domExceptionNameId=0;const domexceptionType={option:["DOMException"],stringRegex:/^DOMException\((.*)\)$/u,valueMatch:g=>"DOMException"===toStringTag(g),toValue(g){const{message:v,name:L}=JSON.parse(g);return{value:new DOMException(v,L)}},getInput:({root:g})=>$e(g,"input"),setValue({root:g,value:v}){$e(g,".message").value=v.message,$e(g,".name").value=v.name},getValue({root:g}){const v=$e(g,".message").value,L=$e(g,".name").value;return new DOMException(v,L)},viewUI:({value:g,specificSchemaObject:v})=>["div",{dataset:{type:"domexception"},title:schemaLabel(v)??"(a `DOMException`)"},[["b",["Message "]],g.message,["br"],["b",["Name "]],g.name,["br"],["b",["Code "]],g.code]],editUI:({typeNamespace:g,specificSchemaObject:v,value:L=""})=>(domExceptionNameId++,["div",{dataset:{type:"domexception"},title:schemaLabel(v)??"DOMException"},[["label",["Name: ",["input",{class:"name",list:`domExceptionNames-${domExceptionNameId}`,name:`${g}-domexception-name`,value:L?.name??"",size:30,placeholder:"(Optional predefined name)"}]]],["datalist",{id:`domExceptionNames-${domExceptionNameId}`,class:"predefinedNames"},["IndexSizeError","HierarchyRequestError","WrongDocumentError","InvalidCharacterError","NoModificationAllowedError","NotFoundError","NotSupportedError","InvalidStateError","InUseAttributeError","SyntaxError","InvalidModificationError","NamespaceError","InvalidAccessError","TypeMismatchError","SecurityError","NetworkError","AbortError","URLMismatchError","QuotaExceededError","TimeoutError","InvalidNodeTypeError","DataCloneError","EncodingError","NotReadableError","UnknownError","ConstraintError","DataError","TransactionInactiveError","ReadOnlyErrorVersionError","OperationError","NotAllowedError"].map(g=>["option",[g]])],["br"],["label",["Message: ",["input",{class:"message",name:`${g}-domexception-message`,value:L?.message??""}]]]]])};let idx$3=0;const domrectType={option:["DOMRect"],childTypes:["domrectreadonly"],stringRegex:/^(?<domRectClass>DOMRect|DOMRectReadOnly)\((?<innerContent>.*)\)$/u,valueMatch:g=>["DOMRect","DOMRectReadOnly"].includes(toStringTag(g)),toValue(g,v){const{groups:{domRectClass:L}={}}=v.match,{x:R,y:W,width:ie,height:ce}=JSON.parse(g);return{value:new("DOMRect"===L?DOMRect:DOMRectReadOnly)(R,W,ie,ce)}},getInput:({root:g})=>$e(g,"input"),setValue({root:g,value:v}){$e(g,".x").value=String(v.x),$e(g,".y").value=String(v.y),$e(g,".width").value=String(v.width),$e(g,".height").value=String(v.height),"DOMRect"===toStringTag(v)?$e(g,".domrect-readonly-readwrite").checked=!0:$e(g,".domrect-readonly-readonly").checked=!0},getValue({root:g}){const v=Number($e(g,".x").value),L=Number($e(g,".y").value),R=Number($e(g,".width").value),W=Number($e(g,".height").value);return new($e(g,".domrect-readonly-readwrite").checked?DOMRect:DOMRectReadOnly)(v,L,R,W)},viewUI({value:g,specificSchemaObject:v}){const L="DOMRect"===toStringTag(g);return["div",{dataset:{type:"domrect"},title:schemaLabel(v)?`(a \`${L?"DOMRect":"DOMRectReadOnly"}\`)`:void 0},[["b",{class:"emphasis"},[schemaLabel(v)??(L?"DOMRect":"DOMRectReadOnly")]],["br"],["b",["x "]],g.x,["br"],["b",["y "]],g.y,["br"],["b",["width "]],g.width,["br"],["b",["height "]],g.height]]},editUI({typeNamespace:g,specificSchemaObject:v,value:L={x:"",y:"",width:"",height:""}}){idx$3++;const R="any";return["div",{dataset:{type:"domrect"},title:schemaLabel(v)??"DOMRect"},[["div",[["label",[["input",{type:"radio",class:"domrect-readonly-readwrite",name:`${g}-domrect-readonly-${idx$3}`,value:"readwrite",checked:"DOMRectReadOnly"!==toStringTag(L)}],"Readwrite"]]," ",["label",[["input",{type:"radio",class:"domrect-readonly-readonly",name:`${g}-domrect-readonly-${idx$3}`,value:"readonly",checked:"DOMRectReadOnly"===toStringTag(L)}],"Read-only"]]]],["label",["x: ",["input",{type:"number",step:R,class:"x",name:`${g}-domrect-x`,value:L.x}]]],["br"],["label",["y: ",["input",{type:"number",step:R,class:"y",name:`${g}-domrect-y`,value:L.y}]]],["br"],["label",["width: ",["input",{type:"number",step:R,class:"width",name:`${g}-domrect-width`,value:L.width}]]],["br"],["label",["height: ",["input",{type:"number",step:R,class:"height",name:`${g}-domrect-height`,value:L.height}]]]]]}};let idx$2=0;const dompointType={option:["DOMPoint"],childTypes:["dompointreadonly"],stringRegex:/^(?<domPointClass>DOMPoint|DOMPointReadOnly)\((?<innerContent>.*)\)$/u,valueMatch:g=>["DOMPoint","DOMPointReadOnly"].includes(toStringTag(g)),toValue(g,v){const{groups:{domPointClass:L}={}}=v.match,{x:R,y:W,z:ie,w:ce}=JSON.parse(g);return{value:new("DOMPoint"===L?DOMPoint:DOMPointReadOnly)(R,W,ie,ce)}},getInput:({root:g})=>$e(g,"input"),setValue({root:g,value:v}){$e(g,".x").value=String(v.x),$e(g,".y").value=String(v.y),$e(g,".z").value=String(v.z),$e(g,".w").value=String(v.w),"DOMPoint"===toStringTag(v)?$e(g,".dompoint-readonly-readwrite").checked=!0:$e(g,".dompoint-readonly-readonly").checked=!0},getValue({root:g}){const v=Number($e(g,".x").value),L=Number($e(g,".y").value),R=Number($e(g,".z").value),W=Number($e(g,".w").value);return new($e(g,".dompoint-readonly-readwrite").checked?DOMPoint:DOMPointReadOnly)(v,L,R,W)},viewUI({value:g,specificSchemaObject:v}){const L="DOMPoint"===toStringTag(g);return["div",{dataset:{type:"dompoint"},title:schemaLabel(v)?`(a \`${L?"DOMPoint":"DOMPointReadOnly"}\`)`:void 0},[["b",{class:"emphasis"},[schemaLabel(v)??(L?"DOMPoint":"DOMPointReadOnly")]],["br"],["b",["x "]],g.x,["br"],["b",["y "]],g.y,["br"],["b",["z "]],g.z,["br"],["b",["w "]],g.w]]},editUI({typeNamespace:g,specificSchemaObject:v,value:L={x:"",y:"",z:"",w:""}}){idx$2++;const R="any";return["div",{dataset:{type:"dompoint"},title:schemaLabel(v)??"DOMPoint"},[["div",[["label",[["input",{type:"radio",class:"dompoint-readonly-readwrite",name:`${g}-dompoint-readonly-${idx$2}`,value:"readwrite",checked:"DOMPointReadOnly"!==toStringTag(L)}],"Readwrite"]]," ",["label",[["input",{type:"radio",class:"dompoint-readonly-readonly",name:`${g}-dompoint-readonly-${idx$2}`,value:"readonly",checked:"DOMPointReadOnly"===toStringTag(L)}],"Read-only"]]]],["label",["x: ",["input",{type:"number",step:R,class:"x",name:`${g}-dompoint-x`,value:L.x}]]],["br"],["label",["y: ",["input",{type:"number",step:R,class:"y",name:`${g}-dompoint-y`,value:L.y}]]],["br"],["label",["z: ",["input",{type:"number",step:R,class:"z",name:`${g}-dompoint-z`,value:L.z}]]],["br"],["label",["w: ",["input",{type:"number",step:R,class:"w",name:`${g}-dompoint-w`,value:L.w}]]]]]}};let idx$1=0;const dommatrixType={option:["DOMMatrix"],childTypes:["dommatrixreadonly"],stringRegex:/^(?<domMatrixClass>DOMMatrix|DOMMatrixReadOnly)\((?<innerContent>.*)\)$/u,valueMatch:g=>["DOMMatrix","DOMMatrixReadOnly"].includes(toStringTag(g)),toValue(g,v){const{groups:{domMatrixClass:L}={}}=v.match,R=JSON.parse(g),W="DOMMatrix"===L?DOMMatrix:DOMMatrixReadOnly;return{value:Object.hasOwn(R,"a")?new W([R.a,R.b,R.c,R.d,R.e,R.f]):new W([R.m11,R.m12,R.m13,R.m14,R.m21,R.m22,R.m23,R.m24,R.m31,R.m32,R.m33,R.m34,R.m41,R.m42,R.m43,R.m44])}},getInput:({root:g})=>$e(g,"input"),setValue({root:g,value:v}){const{is2D:L}=v;$e(g,".d2").checked=L,$e(g,".d3").checked=!L,$e(g,".holder2d").hidden=!L,$e(g,".holder3d").hidden=L,L?($e(g,".a").value=v.a,$e(g,".b").value=v.b,$e(g,".c").value=v.c,$e(g,".d").value=v.d,$e(g,".e").value=v.e,$e(g,".f").value=v.f):($e(g,".m11").value=v.m11,$e(g,".m12").value=v.m12,$e(g,".m13").value=v.m13,$e(g,".m14").value=v.m14,$e(g,".m21").value=v.m21,$e(g,".m22").value=v.m22,$e(g,".m23").value=v.m23,$e(g,".m24").value=v.m24,$e(g,".m31").value=v.m31,$e(g,".m32").value=v.m32,$e(g,".m33").value=v.m33,$e(g,".m34").value=v.m34,$e(g,".m41").value=v.m41,$e(g,".m42").value=v.m42,$e(g,".m43").value=v.m43,$e(g,".m44").value=v.m44),"DOMMatrix"===toStringTag(v)?$e(g,".dommatrix-readonly-readwrite").checked=!0:$e(g,".dommatrix-readonly-readonly").checked=!0},getValue({root:g}){const v=$e(g,".dommatrix-readonly-readwrite").checked?DOMMatrix:DOMMatrixReadOnly,L=$e(g,".a").value;if(L){return new v([Number(L),Number($e(g,".b").value),Number($e(g,".c").value),Number($e(g,".d").value),Number($e(g,".e").value),Number($e(g,".f").value)])}return new v([Number($e(g,".m11").value),Number($e(g,".m12").value),Number($e(g,".m13").value),Number($e(g,".m14").value),Number($e(g,".m21").value),Number($e(g,".m22").value),Number($e(g,".m23").value),Number($e(g,".m24").value),Number($e(g,".m31").value),Number($e(g,".m32").value),Number($e(g,".m33").value),Number($e(g,".m34").value),Number($e(g,".m41").value),Number($e(g,".m42").value),Number($e(g,".m43").value),Number($e(g,".m44").value)])},viewUI({value:g,specificSchemaObject:v}){const L="DOMMatrix"===toStringTag(g);return["div",{dataset:{type:"dommatrix"}},[["b",{class:"emphasis",title:schemaLabel(v)?`(a \`${L?"DOMMatrix":"DOMMatrixReadOnly"}\`)`:void 0},[schemaLabel(v)??(L?"DOMMatrix":"DOMMatrixReadOnly")]],g.is2D?["div",[["b",["a "]],g.a,["br"],["b",["b "]],g.b,["br"],["b",["c "]],g.c,["br"],["b",["d "]],g.d,["br"],["b",["e "]],g.e,["br"],["b",["f "]],g.f]]:["div",[["b",["m11 "]],g.m11,["br"],["b",["m12 "]],g.m12,["br"],["b",["m13 "]],g.m13,["br"],["b",["m14 "]],g.m14,["br"],["b",["m21 "]],g.m21,["br"],["b",["m22 "]],g.m22,["br"],["b",["m23 "]],g.m23,["br"],["b",["m24 "]],g.m24,["br"],["b",["m31 "]],g.m31,["br"],["b",["m32 "]],g.m32,["br"],["b",["m33 "]],g.m33,["br"],["b",["m34 "]],g.m34,["br"],["b",["m41 "]],g.m41,["br"],["b",["m42 "]],g.m42,["br"],["b",["m43 "]],g.m43,["br"],["b",["m44 "]],g.m44]]]]},editUI({typeNamespace:g,specificSchemaObject:v,value:L={}}){idx$1++;const{is2D:R}=L;return["div",{dataset:{type:"dommatrix"},title:schemaLabel(v)??"DOMMatrix"},[["div",[["label",[["input",{type:"radio",class:"dommatrix-readonly-readwrite",name:`${g}-dommatrix-readonly-${idx$1}`,value:"readwrite",checked:"DOMMatrixReadOnly"!==toStringTag(L)}],"Readwrite"]]," ",["label",[["input",{type:"radio",class:"dommatrix-readonly-readonly",name:`${g}-dommatrix-readonly-${idx$1}`,value:"readonly",checked:"DOMMatrixReadOnly"===toStringTag(L)}],"Read-only"]]]],["div",{$on:{click(g){const{target:v}=g;if("radio"!==v.type)return;const L=this.parentElement;$e(L,".holder2d").hidden="3d"===v.value,$e(L,".holder3d").hidden="2d"===v.value}}},[["label",["2d",["input",{class:"d2",type:"radio",name:`${g}-dommatrix-dimension-${idx$1}`,value:"2d",checked:Boolean(R)}]]]," ",["label",["3d",["input",{class:"d3",type:"radio",name:`${g}-dommatrix-dimension-${idx$1}`,value:"3d",checked:!R}]]]]],["div",{class:"holder2d",hidden:!R},["a","b","c","d","e","f"].flatMap(v=>[["br"],["label",[v+": ",["input",{type:"number",step:"any",class:v,name:`${g}-dommatrix-${v}`,value:L[v]??""}]]]]).slice(1)],["div",{class:"holder3d",hidden:Boolean(R)},["m11","m12","m13","m14","m21","m22","m23","m24","m31","m32","m33","m34","m41","m42","m43","m44"].flatMap(v=>[["br"],["label",[v+": ",["input",{type:"number",step:"any",class:v,name:`${g}-dommatrix-${v}`,value:L[v]??""}]]]]).slice(1)]]]}},toInteger=g=>""===g.trim()?NaN:Math.trunc(Number(g)),dataViewMethods=["setInt8","setUint8","setInt16","setUint16","setInt32","setUint32","setFloat32","setFloat64","setBigInt64","setBigUint64"],typedArrays=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"],getMinMaxForTypedArray=g=>{switch(g){case"Int8Array":return{min:-128,max:127};case"Uint8Array":case"Uint8ClampedArray":return{min:0,max:255};case"Int16Array":return{min:-32768,max:32767};case"Uint16Array":return{min:0,max:65535};case"Int32Array":return{min:-2147483648,max:2147483647};case"Uint32Array":return{min:0,max:4294967295};case"Float32Array":return{min:-34e37,max:34e37};case"Float64Array":return{min:-1/0,max:1/0};case"BigInt64Array":return{min:-0x8000000000000000,max:2**63-1};case"BigUint64Array":return{min:0,max:2**64-1};default:throw new Error("Unexpected typed array type")}},getTypedArray=g=>{switch(g){case"Int8Array":return Int8Array;case"Uint8Array":return Uint8Array;case"Uint8ClampedArray":return Uint8ClampedArray;case"Int16Array":return Int16Array;case"Uint16Array":return Uint16Array;case"Int32Array":return Int32Array;case"Uint32Array":return Uint32Array;case"Float32Array":return Float32Array;case"Float64Array":return Float64Array;case"BigInt64Array":return BigInt64Array;case"BigUint64Array":return BigUint64Array;default:throw new Error("Unexpected type")}},bufferSourceClasses=new Set(["ArrayBuffer","DataView","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"]);let idx=0;const buffersourceType={option:["Buffer source (ArrayBuffer, DataView, TypedArrays)"],childTypes:["arraybuffer","dataview","int8array","uint8array","uint8clampedarray","int16array","uint16array","int32array","uint32array","float32array","float64array","bigint64array","biguint64array"],stringRegex:/^(?<bufferSourceClass>ArrayBuffer|DataView|(?:Int8|Uint8|Uint8Clamped|Int16|Uint16|Int32|Uint32|Float32|Float64|BigInt64|BigUint64)Array)\((?<innerContent>.*)\)$/u,valueMatch:g=>bufferSourceClasses.has(toStringTag(g)),toValue(g,v){const{groups:{bufferSourceClass:L}={}}=v.match,R=JSON.parse(g),{byteLength:W,maxByteLength:ie,byteOffset:ce,dataViewByteOffset:le,dataViewByteLength:ue,length:me}=R,ge=new ArrayBuffer(W,{maxByteLength:ie});let ve,xe,_e;return(L.endsWith("Array")||"typedArray"in R)&&(xe=getTypedArray(R.typedArray??L),ve=new xe(ge,ce,me),"set"in R&&(R.set[0].forEach((g,v)=>{"string"==typeof g&&(R.set[0][v]=BigInt(g))}),ve.set(...R.set))),("DataView"===L||dataViewMethods.some(g=>Object.hasOwn(R,g)))&&(_e=new DataView(ge,le,ue),dataViewMethods.forEach(g=>{R[g]?.forEach(v=>{"string"==typeof v[1]&&(v[1]=BigInt(v[1])),_e[g](...v)})})),{value:"ArrayBuffer"===L?ge:"DataView"===L?_e:ve}},getInput:({root:g})=>$e(g,".byteLength"),setValue({root:g,value:v}){const L=toStringTag(v);if("ArrayBuffer"===L||"DataView"===L)$e(g,`[value=${L}].buffersource-returnType`)?.click();else{$e(g,"[value=TypedArray].buffersource-returnType")?.click();const v=$e(g,".buffersource-typedArrays");v.value=L,v.dispatchEvent(new Event("change"))}const R=$e(g,".byteLength");R.$value=v;const W="ArrayBuffer"===L?v:v.buffer;R.value=W.byteLength,R.dispatchEvent(new Event("change"));const ie=$e(g,".maxByteLength");if(ie.value=W.maxByteLength,ie.dispatchEvent(new Event("change")),"DataView"===L){const L=$e(g,".dataViewByteLength");L.value=v.byteLength,L.dispatchEvent(new Event("change"));const R=$e(g,".dataViewByteOffset");R.value=v.byteOffset,R.dispatchEvent(new Event("change"))}else if("ArrayBuffer"!==L){const L=$e(g,".typedArrayByteOffset");L.value=v.byteOffset,L.dispatchEvent(new Event("change"));const R=$e(g,".typedArrayLength");R.value=v.length,R.dispatchEvent(new Event("change"))}},getValue({root:g}){return this.getInput({root:g}).$value},viewUI({value:g,specificSchemaObject:v}){const L=toStringTag(g),R="ArrayBuffer"===L?g:g.buffer;return["div",{dataset:{type:"buffersource"}},[["b",{class:"emphasis",title:schemaLabel(v)?/^[aeiou]/iu.test(L)?`(an ${L})`:`(a ${L})`:void 0},[schemaLabel(v)??L]],["br"],["b",["Buffer byte length: "]],R.byteLength,["br"],["b",["Buffer max byte length: "]],R.maxByteLength,..."DataView"===L?[["br"],["b",["Data View byte length: "]],g.byteLength,["br"],["b",["Data View byte offset: "]],g.byteOffset]:[""],..."DataView"!==L&&"ArrayBuffer"!==L?[["br"],["b",["Typed Array byte offset: "]],g.byteOffset,["br"],["b",["Typed Array length: "]],g.length]:[""],["br"],["button",{class:"buffersource-viewData",$on:{async click(g){g.preventDefault();const v=await dialogs.makeCancelDialog({children:[["select",{class:"buffersource-typedArrays-view","aria-label":"Typed Arrays",$on:{change(){const g=this.value,v=new(getTypedArray(g))(R),L=$e(this.parentElement,".typedArrayArea");L.textContent="",L.append(...Array.from({length:v.length},(g,L)=>{const R=v[L];return jmlExports.jml("span",[["b",[L]]," ",["span",[R?String(R):"0"]]," "])}))}}},typedArrays.map(g=>["option",{selected:L===g||void 0},[g]])],["div",{class:"typedArrayArea"}]]});$e(v,".buffersource-typedArrays-view").dispatchEvent(new Event("change"))}}},["View data"]]]]},editUI({typeNamespace:g,specificSchemaObject:v,value:L}){idx++;const R=jmlExports.jml("div",{dataset:{type:"buffersource"},title:schemaLabel(v)??"BufferSource"},[["fieldset",{class:"returnType",$on:{change(){this.$buildInstances()}},$custom:{$buildInstances(){const v=this.parentElement,{value:L}=$e(this,`[name=${g}-buffersource-returnType-${idx}]:checked`),R=$e(v,".byteLength"),W=toInteger(R.value),ie=toInteger($e(v,".maxByteLength").value),ce=new ArrayBuffer(W,ie?{maxByteLength:ie}:void 0),le=$e(v,".dataViewByteOffset").value,ue=le?toInteger(le):0,me=$e(v,".dataViewByteLength").value,ge=me?toInteger(me):void 0,ve=new DataView(ce,ue,ge),{value:xe}=$e(v,".buffersource-typedArrays-init"),_e=getTypedArray(xe),ke=$e(v,".typedArrayByteOffset").value,Se=ke?toInteger(ke):0,we=$e(v,".typedArrayLength").value,Ie=we?toInteger(we):W,Ee=new _e(ce,Se,Ie);R.$dataView=ve,R.$typedArray=Ee;const Ce=$$e(v,".typedArrayArea .typedArrayValue").map(g=>_e.name.startsWith("Big")?BigInt(g.value):Number(g.value));switch(R.$typedArray.set(Ce,0),L){case"ArrayBuffer":R.$value=ce;break;case"DataView":R.$value=ve;break;default:R.$value=Ee}}}},[["legend",["Return type"]],["label",{$on:{click(){$e(this.parentElement,".buffersource-typedArrays").hidden=!0,$e(this?.parentElement?.parentElement,".buffersource-typedArrays-init").hidden=!1}}},[["input",{type:"radio",class:"buffersource-returnType buffersource-returnType-arraybuffer",name:`${g}-buffersource-returnType-${idx}`,checked:!0,value:"ArrayBuffer"}],"ArrayBuffer"]]," ",["label",{$on:{click(){$e(this.parentElement,".buffersource-typedArrays").hidden=!0,$e(this?.parentElement?.parentElement,".buffersource-typedArrays-init").hidden=!1}}},[["input",{type:"radio",class:"buffersource-returnType buffersource-returnType-dataview",name:`${g}-buffersource-returnType-${idx}`,value:"DataView"}],"DataView"]]," ",["label",{$on:{click(){$e(this.parentElement,".buffersource-typedArrays").hidden=!1,$e(this?.parentElement?.parentElement,".buffersource-typedArrays-init").hidden=!0}}},[["input",{type:"radio",class:"buffersource-returnType buffersource-returnType-typedarray",name:`${g}-buffersource-returnType-${idx}`,value:"TypedArray"}],"Typed Array"]]," ",["select",{hidden:!0,class:"buffersource-typedArrays","aria-label":"Typed Arrays",$on:{change(g){const v=this.parentElement?.parentElement,L=$e(v,".buffersource-typedArrays-init");L.value=this.value;if(!$e(v,".typedArrayLength").$checkBufferBounds(g))return;L.$setMinsAndMaxes(this.value),L.$checkTypedArrayByteLength(g);$e(this?.parentElement?.parentElement,".typedArrayByteOffset").$checkByteOffsetMultiple(g)}}},typedArrays.map(g=>["option",[g]])]]],["fieldset",{$on:{change(){this.previousElementSibling.$buildInstances()}}},[["legend",["Construction options"]],["fieldset",[["legend",["ArrayBuffer"]],["label",["Byte length ",["input",{class:"byteLength",type:"number",step:"1",size:"4",pattern:String.raw`\d+`,min:0,$custom:{$value:L??new ArrayBuffer(0)},$on:{change(g){const v=this,L=v.parentElement?.parentElement?.parentElement?.parentElement;if(!$e(L,".typedArrayLength").$checkBufferBounds(g))return;const R=$e(v.parentElement?.parentElement,".maxByteLength"),W=v.value;if(toInteger(W)>Number.MAX_SAFE_INTEGER)return v.setCustomValidity("The ArrayBuffer length exceeds the maximum allowable size"),g.stopPropagation(),void v.reportValidity();v.setCustomValidity(""),v.reportValidity(),toInteger(W)>toInteger(R.value)&&(R.value=W);const ie=v.parentElement?.parentElement?.parentElement;$e(ie,".dataViewByteLength").$checkDataViewByteLength(g),$e(ie.parentElement,".buffersource-typedArrays-init").$checkTypedArrayByteLength(g)}}}]]]," ",["label",["Max byte length ",["input",{class:"maxByteLength",type:"number",step:"1",size:"4",pattern:String.raw`\d+`,min:0,$on:{change(g){const v=this,L=$e(v.parentElement?.parentElement,".byteLength"),R=v.value;toInteger(R)<toInteger(L.value)?(v.setCustomValidity("The max value cannot be less than the byte length"),g.stopPropagation()):v.setCustomValidity(""),v.reportValidity()}}}]]]]],["fieldset",[["legend",["DataView"]],["label",["Byte length ",["input",{class:"dataViewByteLength",type:"number",step:"1",size:"4",pattern:String.raw`\d+`,min:0,$custom:{$checkDataViewByteLength(g){const v=this,L=v.parentElement?.parentElement?.parentElement,R=toInteger($e(L,".dataViewByteOffset").value)||0,W=$e(L,".byteLength").value,ie=W?toInteger(W):0;R+(v.value?toInteger(v.value):ie)>ie?(v.setCustomValidity("The DataView byte length and offset exceed the buffer's byte length"),g.stopPropagation()):v.setCustomValidity(""),v.reportValidity()}},$on:{change(g){this.$checkDataViewByteLength(g)}}}]]]," ",["label",["Byte offset ",["input",{class:"dataViewByteOffset",type:"number",step:"1",size:"4",pattern:String.raw`\d+`,min:0,$on:{change(g){const v=this.parentElement?.parentElement?.parentElement;$e(v,".dataViewByteLength").$checkDataViewByteLength(g)}}}]]]]],["fieldset",[["legend",["Typed array"]],["label",["Byte offset ",["input",{class:"typedArrayByteOffset",type:"number",step:"1",size:"4",pattern:String.raw`\d+`,min:0,max:2**53-1,$custom:{$checkByteOffsetMultiple(g){const v=this,L=v.parentElement?.parentElement?.parentElement?.parentElement,{value:R}=$e(L,".buffersource-typedArrays-init"),W=getTypedArray(R);toInteger(v.value)%W.BYTES_PER_ELEMENT?(v.setCustomValidity(`Byte offset must be a multiple of the typed array's bytes-per-element size (${W.BYTES_PER_ELEMENT})`),g.stopPropagation()):v.setCustomValidity(""),v.reportValidity()}},$on:{change(g){const v=this.parentElement?.parentElement?.parentElement?.parentElement;$e(v,".typedArrayLength").$checkBufferBounds(g)&&this.$checkByteOffsetMultiple(g)}}}]]]]]]],["fieldset",[["legend",["Typed Array initialization (optional)"]],["select",{class:"buffersource-typedArrays-init","aria-label":"Typed Arrays",$custom:{$setMinsAndMaxes(g){const{min:v,max:L}=getMinMaxForTypedArray(g);$$e(this.parentElement,".typedArrayValue").forEach(R=>{R.className="typedArrayValue typedArray-"+g,R.min=String(v),R.max=String(L)})},$checkTypedArrayByteLength(g){const v=getTypedArray(this.value),L=$e(this.parentElement?.parentElement,".byteLength");(L.value?toInteger(L.value):0)%v.BYTES_PER_ELEMENT?(L.setCustomValidity(`Array buffer must be a multiple of the typed array's bytes-per-element size (${v.BYTES_PER_ELEMENT})`),g.stopPropagation()):L.setCustomValidity(""),L.reportValidity()}},$on:{change(g){const v=this,L=v.parentElement?.parentElement?.parentElement;$e(this.parentElement?.parentElement,".buffersource-typedArrays").value=v.value;if(!$e(L,".typedArrayLength").$checkBufferBounds(g))return;v.$checkTypedArrayByteLength(g),v.$setMinsAndMaxes(v.value);$e(v?.parentElement?.parentElement,".typedArrayByteOffset").$checkByteOffsetMultiple(g),$e(this.parentElement?.parentElement,".returnType").$buildInstances()}}},typedArrays.map(g=>["option",[g]])]," ",["label",["Array length: ",["input",{class:"typedArrayLength",type:"number",step:"1",size:"4",pattern:String.raw`\d+`,min:0,$custom:{$checkBufferBounds(g){const v=this,L=v.parentElement?.parentElement?.parentElement,R=$e(L,".byteLength").value,W=R?toInteger(R):0,ie=v.value?toInteger(v.value):W,{value:ce}=$e(L,".buffersource-typedArrays-init"),le=getTypedArray(ce),ue=$e(L,".typedArrayByteOffset").value;return(ue?toInteger(ue):0)+ie*le.BYTES_PER_ELEMENT>W?(v.setCustomValidity("The byte offset and the length times bytes per element is greater than the buffer length"),g.stopPropagation(),v.reportValidity(),!1):(v.setCustomValidity(""),v.reportValidity(),!0)},$buildTypedArray(){const g=this,v=toInteger(g.value),L=g.parentElement?.parentElement,R=g.parentElement?.parentElement?.parentElement,W=$e(R,".byteLength"),ie=$e(L,".typedArrayArea");ie.addEventListener("change",g=>{const v=g.target;W.$typedArray.set(["true"===v.dataset.bigint?BigInt(v.value):Number(v.value)],toInteger(v.dataset.key))});const{value:ce}=$e(L,".buffersource-typedArrays-init"),{min:le,max:ue}=getMinMaxForTypedArray(ce);ie.textContent="",ie.append(...Array.from({length:v},(g,v)=>{const L=W.$typedArray[v];return jmlExports.jml("label",[v," ",["input",{class:"typedArrayValue typedArray-"+ce,dataset:{key:v,bigint:String(ce.startsWith("BigInt"))},type:"number",step:"1",pattern:ce.startsWith("Float")?String.raw`\d+(?:\.\d+)?`:String.raw`\d+`,value:L?String(L):"0",min:le,max:ue}]," "])}))}},$on:{change(g){const v=this;if(!v.$checkBufferBounds(g))return;const L=this.parentElement?.parentElement,{value:R}=$e(L,".buffersource-typedArrays-init"),W=toInteger(v.value);try{new(getTypedArray(R))(W)}catch{return v.setCustomValidity("Typed Array length is too long"),g.stopPropagation(),void v.reportValidity()}v.setCustomValidity(""),v.reportValidity(),$e(this.parentElement?.parentElement?.parentElement,".returnType").$buildInstances(),v.$buildTypedArray()}}}],["div",{class:"typedArrayArea"}]]]]],["fieldset",[["legend",["DataView initialization (optional)"]],["select",{class:"dataViewMethod","aria-label":"Data View methods",$on:{change(){const g=$e(this.parentElement,".dataViewArea"),v=this.value,L=v.slice(3)+"Array";g.textContent="",g.append(jmlExports.jml("label",["Byte offset ",["input",{type:"number",class:"dataViewSetByteOffset",step:"1",size:"4",pattern:String.raw`\d+`}]])," ",jmlExports.jml("label",["Value ",["input",{type:"number",step:"1",size:"4",pattern:String.raw`\d+`,class:"typedArrayValue typedArray-"+L,...getMinMaxForTypedArray(L)}]]),"setInt8"===v||"setUint8"===v?"":jmlExports.jml("label",[["input",{class:"littleEndian",type:"checkbox"}],"Little endian"])," ",jmlExports.jml("button",{$on:{click(g){g.preventDefault();const v=this.parentElement,L=v.previousElementSibling?.value,R=toInteger($e(v,".dataViewSetByteOffset").value),W=$e(v,".typedArrayValue").value,ie=$e(v,".littleEndian")?.checked,ce=$e(v?.parentElement?.parentElement,".byteLength");"setBigInt64"===L||"setBigUint64"===L?ce.$dataView[L](R,BigInt(W),ie):ce.$dataView[L](R,Number(W),ie);$e(v.parentElement?.parentElement,".typedArrayLength").$buildTypedArray()}}},["Set"]))}}},[["option",{value:""},["(Select a data view method)"]],...dataViewMethods.map(g=>["option",[g]])]]," ",["div",{class:"dataViewArea"}]]]]);if(L&&this.setValue)this.setValue({root:R,value:L});else{$e(R,".byteLength").$value=new ArrayBuffer(0)}return[R]}},noneditableType={option:["Non-editable"],valueMatch:()=>!0,getInput:({root:g})=>$e(g,"button"),setValue({root:g,value:v}){this.getInput({root:g}).$value=v,$e(g,".stringTag").textContent=void 0===v?"(None)":toStringTag(v)},getValue({root:g}){return this.getInput({root:g}).$value},validate({root:g}){return{message:"The non-editable type is only for passing on pre-existing content that is unknown or currently unsupported",valid:void 0!==this.getInput({root:g}).$value}},viewUI({value:g,specificSchemaObject:v}){const L=toStringTag(g);return["div",{dataset:{type:"resurrectable"}},[["b",{class:"emphasis",title:schemaLabel(v)?`(a non-editable ${L})`:void 0},[schemaLabel(v)??"Non-editable"]],["span",{title:"There is no current support for editing this element's type, but its contents will be passed on transparently."},["?"]],["b",["String tag: "]],L]]},editUI:({typeNamespace:g,specificSchemaObject:v,value:L})=>["div",{dataset:{type:"resurrectable"},title:schemaLabel(v)??"Non-editable"},[["a",{href:"javascript:void(0)",$on:{click(g){g.preventDefault()}},title:"There is no current support for editing this element's type, but its contents will be passed on transparently."},["?"]]," ",["button",{$on:{click(g){g.preventDefault(),console.log(this.$value)}},name:`${g}-resurrectable`,$custom:{$value:L}},["Non-editable"]],["br"],["b",["String tag: "]],["span",{class:"stringTag"},[L?toStringTag(L):"(None)"]]]]},symbolType={option:["Symbol"],stringRegex:/^(?<symbolClassType>Symbol|Symbol.for)\((?<innerContent>[^)]*)\)$/u,ct:0,valueMatch:g=>"symbol"==typeof g,toValue(g,v){const{groups:{symbolClassType:L}={}}=v.match;return{value:("Symbol"===L?Symbol:Symbol.for.bind(Symbol))(g)}},getInput:({root:g})=>$e(g,"input.symbolInput"),setValue({root:g,value:v}){Symbol.keyFor(v)?$e(g,'input[value="Symbol.for"]').checked=!0:$e(g,'input[value="Symbol"]').checked=!0,this.getInput({root:g}).value=String(v).slice(7,-1)},getValue({root:g}){return($e(g,'input[value="Symbol"]').checked?Symbol:Symbol.for.bind(Symbol))(this.getInput({root:g}).value)},viewUI:({value:g,specificSchemaObject:v})=>["span",{dataset:{type:"symbol"},title:schemaLabel(v)??"(a Symbol)"},[void 0===Symbol.keyFor(g)?"":["b",["Global: "]],String(g).slice(7,-1)]],editUI({typeNamespace:g,specificSchemaObject:v,value:L=""}){return this.ct++,["div",{dataset:{type:"symbol"},title:schemaLabel(v)??"(a Symbol)"},[["label",["Symbol()",["input",{type:"radio",name:`${g}-symbol${this.ct}`,value:"Symbol",checked:!L||!Symbol.keyFor(L)}]]],["label",["Symbol.for()",["input",{type:"radio",name:`${g}-symbol${this.ct}`,value:"Symbol.for",checked:L&&void 0!==Symbol.keyFor(L)}]]],["br"],["input",{className:"symbolInput",name:`${g}-symbol`,value:String(L).slice(7,-1)}]]]}},getTypeson=()=>(structuredCloningJsoe.splice(1,0,G),(new Typeson).register([...structuredCloningJsoe,Y,V,functionSpec])),promiseType={option:["Promise"],regexEndings:[",",")"],stringRegexBegin:/^Promise\(/u,stringRegexEnd:/^\)/u,array:!0,valueMatch:g=>"Promise"===toStringTag(g),toValue(...g){const v=arrayType.toValue.apply(this,g);return{value:Promise.resolve(v.value[0]),remnant:v.remnant}},getInput({root:g}){const v=$e(g,"div[data-type]");return this.types?.getFormControlForRoot(v)},setValue({root:g,value:v}){return(async()=>{await tick();const L=await v,R=getTypeson(),W=await R.rootTypeName(L),ie=$e(g,"select");ie.value=W,ie.dispatchEvent(new Event("change"));const ce=$e(g,"div[data-type]");await(this.types?.setValue({type:W,root:ce,value:L}));const le=this.types?.getFormControlForRoot(ce);le?.dispatchEvent(new Event("input")),le?.blur()})()},getValue({root:g}){const v=$e(g,"div[data-type]");return Promise.resolve(this.types?.getValueForRoot(v))},viewUI({specificSchemaObject:g,types:v,value:L,...R}){const W=getTypeson(),ie=jmlExports.jml("span"),ce=jmlExports.jml("div");return(async()=>{const le=await L,ue=await W.rootTypeName(le);ie.textContent=ue;const me=v.getTypeObject(ue);ce.append(jmlExports.jml(...me.viewUI({specificSchemaObject:g,types:v,value:le,...R})))})(),["span",{dataset:{type:"promise"},title:schemaLabel(g)},["A Promise ",ie,ce]]},editUI({format:g,types:v,type:L,buildTypeChoices:R,specificSchemaObject:W,topRoot:ie,schemaContent:ce,typeNamespace:le,value:ue}){this.types=v;const me=jmlExports.jml("div",{dataset:{type:"promise"},title:schemaLabel(W)??"(a Promise)"},["Promise ",...R({topRoot:ie,format:g,schemaOriginal:ce,schemaContent:W?.value??{type:"any"},state:L,typeNamespace:le}).domArray]);return ue&&this.setValue&&this.setValue({root:me,value:ue}),[me]}},observerMap=new WeakMap,idRegex=String.raw`^(?:[$_\p{ID_Start}])(?:[$_\u200C\u200D\p{ID_Continue}])*$`,setTooltips=({root:g,specificSchemaObject:v,textareas:L,textareaBody:R})=>{R.title=`Return type:\n\n${JSON.stringify(v.output,null,2)}`;const W=v.input;if(L.forEach((g,v)=>{g.title=JSON.stringify(W.items[v]??W.rest,null,2)}),observerMap.has(g))return;const addTitles=v=>{if(v.nodeType!==Node.ELEMENT_NODE)return;if(v.querySelector("textarea")){$$e(g,"textarea").slice(0,-1).forEach((g,v)=>{g.title=JSON.stringify(W.items[v]??W.rest,null,2)})}},ie=new MutationObserver(g=>{for(const v of g)if("childList"===v.type){for(const g of v.removedNodes)addTitles(g);for(const g of v.addedNodes)addTitles(g)}});ie.observe(g,{attributes:!1,childList:!0,subtree:!0}),observerMap.set(g,ie)},getArgsAndBodyOfFunction=g=>{const v=String(g),L=`(${v.trimStart().startsWith("function")?v:`function ${v}`})`,R=L.slice(L.indexOf("{")+1,L.lastIndexOf("}")).trim();return{args:parse$2(L,{ecmaVersion:"latest",sourceType:"module"}).body[0].expression.params.map(({name:g})=>g.trim()),body:R}},setValueAndTooltips=({root:g,value:v,specificSchemaObject:L})=>{const{args:R,body:W}=getArgsAndBodyOfFunction(v);return(async()=>{await tick();let ie=$$e(g,'textarea[name$="-string"]');const ce=ie.pop();R.forEach((v,L)=>{Object.hasOwn(ie,L)||$e(g,".addArrayElement")?.click()}),await tick(),ie=$$e(g,'textarea[name$="-string"]').slice(0,-1),v&&(R.forEach((g,v)=>{Object.hasOwn(ie,v)&&(ie[v].value=g)}),ce&&(ce.value=W)),L&&setTooltips({root:g,specificSchemaObject:L,textareas:ie,textareaBody:ce})})()},functionType={option:["function"],regexEndings:["}"],stringRegexBegin:/^function\((?<args>[^)]*?)\) \{(?<returns>.*)\}$/u,stringRegexEnd:/^\}/u,array:!0,valueMatch:g=>"function"==typeof g,toValue(g,v){const{groups:{args:L,returns:R}={}}=v.match;return{value:new Function(...L.split(/\s*,\s*/u),R)}},getInput:({root:g})=>$e(g,"textarea"),setValue:({root:g,value:v})=>setValueAndTooltips({root:g,value:v}),getValue({root:g}){const v=$$e(g,"textarea"),L=v.pop();if(!L)throw new Error("Not yet instantiated");return new Function(...v.map(({value:g})=>g.trim()),L.value.trim())},viewUI({value:g,specificSchemaObject:v}){const{args:L,body:R}=getArgsAndBodyOfFunction(g);return["span",{dataset:{type:"function"},title:schemaLabel(v)??"(a function)"},[["b",["Args"]]," ",`(${L.join(", ")})`,["br"],["b",["Body"]]," ",R]]},editUI({type:g,buildTypeChoices:v,specificSchemaObject:L,topRoot:R,typeNamespace:W,value:ie}){const ce=L?copyObject(L):void 0,le=ce?.input??{items:[],rest:{}};le.description="",le.rest&&(le.rest.description="Argument");const ue=le.items.length,me=v,ge=me({topRoot:R,format:"schema",schemaContent:{type:"set",minSize:ue,maxSize:le.rest?void 0:ue,value:{type:"string",regex:idRegex,flags:"v"}},state:g,typeNamespace:W}),ve=me({topRoot:R,format:"schema",schemaContent:{type:"string"},state:g,typeNamespace:W}),xe=jmlExports.jml("div",{dataset:{type:"function"}},[["b",["Arguments"]],["br"],...ge.domArray,["b",["Function body"]],["br"],...ve.domArray]),_e=Promise.all([ge.whenReady,ve.whenReady]);return ie?(async()=>{try{await _e,await setValueAndTooltips({root:xe,value:ie,specificSchemaObject:L})}catch{}})():L&&(async()=>{await _e;const g=$$e(xe,"textarea"),v=g.pop();setTooltips({root:xe,specificSchemaObject:L,textareas:g,textareaBody:v})})(),[xe]}},getPropertyValueFromLegend=g=>{const v=$e(g,'*[data-prop="true"]');if(!v)throw new Error("No property on the supplied legend element");if("input"===v.nodeName.toLowerCase())return v.value;if(!v.textContent)throw new Error("No property with text present on the supplied legend element");return String(Math.trunc(Number(v.textContent))-1)};class Types{constructor({useZodexyErrorMessages:g=!1,useZodexyErrorMessagesInTypes:v=!1}={}){this.formats=new Formats,this.useZodexyErrorMessages=g,this.useZodexyErrorMessagesInTypes=v,this.schemasForRoots=new WeakMap,this.customValidateAllReferences=void 0,this.availableTypes={null:nullType,true:trueType,false:falseType,nan:nanType,boolean:booleanType,number:numberType,bigint:bigintType,bigintObject:bigintObjectType,string:stringType,arrayReference:arrayReferenceType,objectReference:objectReferenceType,array:arrayType,object:objectType,date:dateType,userObject:["User objects"],undef:undefinedType,SpecialRealNumber:SpecialRealNumberSuperType,SpecialNumber:SpecialNumberSuperType,error:errorType,errors:errorsSpecialType,regexp:regexpType,BooleanObject:BooleanObjectType,NumberObject:NumberObjectType,StringObject:StringObjectType,map:mapType,set:setType,file:fileType,filelist:filelistType,blob:blobType,blobHTML:blobHTMLType,domexception:domexceptionType,domrect:domrectType,dompoint:dompointType,dommatrix:dommatrixType,resurrectable:noneditableType,symbol:symbolType,promise:promiseType,function:functionType,buffersource:buffersourceType,dataview:{option:["DataView"]},imagedata:{option:["ImageData"]},imagebitmap:{option:["ImageBitmap"]},int8array:{option:["Int8Array"]},uint8array:{option:["Uint8Array"]},uint8clampedarray:{option:["Uint8ClampedArray"]},int16array:{option:["Int16Array"]},uint16array:{option:["Uint16Array"]},int32array:{option:["Int32Array"]},uint32array:{option:["Uint32Array"]},float32array:{option:["Float32Array"]},float64array:{option:["Float64Array"]},ValidDate:{valid:!0},arrayNonindexKeys:{sparse:!0}};(g=>{g.forEach(([g,v])=>{Object.assign(this.availableTypes[v],this.availableTypes[g])})})([["date","ValidDate"],["array","arrayNonindexKeys"]]),this.contexts={},Object.entries(this.availableTypes).forEach(([g,v])=>{const L=g,{stateDependent:R}=v;R&&Object.entries(R).forEach(([g,v])=>{Object.hasOwn(this.contexts,g)||(this.contexts[g]={});const{contexts:R,after:W}=v;R.forEach(v=>{Object.hasOwn(this.contexts[g],v)||(this.contexts[g][v]=[]),this.contexts[g][v].push({type:L,after:W})})})})}async getControlsForFormatAndValue(g,v,L){return(await this.formats.getControlsForFormatAndValue(this,g,v,L)).rootUI}getContextInfo(g,v){return this.contexts[g][v]}getValueForRoot(g,v,L){return this.availableTypes[Types.getTypeForRoot(g)].getValue({root:g,stateObj:v??{types:this},currentPath:L})}getFormControlForRoot(g){const v=this.availableTypes[Types.getTypeForRoot(g)];return v.getInput?v.getInput({root:g}):null}getValueFromRootAncestor(g,v){return this.getValueForRoot($e(g,"div[data-type]"),{...v,types:this,formats:this.formats})}getFormControlFromRootAncestor(g){const v=$e(g,"div[data-type]");return v?this.getFormControlForRoot(v):null}getOptionForType(g,v=void 0){const L=[...this.availableTypes[g].option];"object"===g&&"properties"===v?.type&&(L[0]="Properties");const R=resolveSchemaMeta(v).label;return R&&(L[0]=`${L[0]} (${R})`),L[1]={value:g,...L[1]},L}getTypeOptionsForFormatAndState(g,v,L,R){const W=this.formats.getTypesAndSchemasForFormatAndState(this,g,v,L,R);if(!W)throw new Error("Unexpected type for format and state");return{typeOptions:W.types.map((g,v)=>this.getOptionForType(g,W.schemaObjects[v])),schemaObjects:W.schemaObjects}}getUIForModeAndType({readonly:g,resultType:v,typeNamespace:L,type:R,topRoot:W,bringIntoFocus:ie,buildTypeChoices:ce,format:le,schemaContent:ue,value:me,hasValue:ge,replaced:ve,specificSchemaObject:xe,schemaFallingBack:_e}){const ke=this.availableTypes[R],Se=ge?{typeNamespace:L,type:R,buildTypeChoices:ce,format:le,schemaContent:ue,resultType:v,topRoot:W,bringIntoFocus:ie,value:me,replaced:ve,specificSchemaObject:xe,schemaFallingBack:_e,hasValue:ge,types:this}:{typeNamespace:L,type:R,buildTypeChoices:ce,format:le,schemaContent:ue,resultType:v,topRoot:W,bringIntoFocus:ie,replaced:ve,specificSchemaObject:xe,schemaFallingBack:_e,hasValue:ge,types:this},we=jmlExports.jml(...g?ke.viewUI(Se):ke.editUI(Se));if(xe&&this.schemasForRoots.set(we,xe),appendSchemaMeta(we,xe),!g&&ke.validate){ke.getInput({root:we}).addEventListener("input",()=>{this.validate({type:R,root:we,topRoot:W})})}return we}validateAllReferences({topRoot:g,avoidReport:v}){g?(Object.values(this.availableTypes).forEach(L=>{const R=L;R.validateAll&&R.validateAll({topRoot:g,types:this,avoidReport:v})}),this.customValidateAllReferences&&this.customValidateAllReferences({topRoot:g})):console.log("No references present")}getValidationMessage({message:g,schema:v,typeSpecific:L=!1}){if(!g)return g;const R=v?.error;return"string"!=typeof R||!this.useZodexyErrorMessages||L&&!this.useZodexyErrorMessagesInTypes?g:R}validate({type:g,root:v,topRoot:L,avoidReport:R}){if(Types.getTypeForRoot(v)!==g)return!0;const W=this.availableTypes[g],ie=W.validate?W.validate({root:v,topRoot:L}):{valid:!0,message:void 0},ce=this.schemasForRoots.get(v);let le,ue=!0;try{le=W.getValue?.({root:v,stateObj:{types:this,formats:this.formats}})}catch(g){if("Not yet instantiated"!==(g&&"object"==typeof g&&"message"in g?g.message:void 0)&&ie.valid)return!1;ue=!1}const me=this.formats.getAvailableFormat("schema"),ge=ue&&ce&&("templateLiteral"===ce.type||me.isValueValidationRequired?.(ce))?me.validateValue?.(this,ce,le)??{valid:!0,message:void 0}:{valid:!0,message:void 0},ve=ie.valid&&ge.valid,xe=ie.valid?ge.message:ie.message,_e=W.getInput?.({root:v});if(_e){const g=this.getValidationMessage({message:xe||"Invalid",schema:ge.valid?ce:ge.schema??ce});_e.setCustomValidity(ve?"":g||"Invalid"),R||_e.reportValidity()}return ve}setValue({type:g,root:v,value:L}){if(Types.getTypeForRoot(v)!==g)return;const R=this.availableTypes[g];return R.setValue?R.setValue({root:v,value:L}):void 0}getValueForString(g,{format:v,state:L,endMatchTypeObjs:R=[],firstRun:W=!0,rootHolder:ie=[],parent:ce,parentPath:le,schemaObject:ue,schemaOriginal:me}){const ge=this.formats.getTypesAndSchemasForFormatAndState(this,v,L,ue,me)?.types;if(!ge)throw new Error("Could not get types for format and state");const ve=Object.entries(this.availableTypes).filter(([g])=>ge.includes(g)),xe=ve.map(([,g])=>g).reduce((g,v)=>{const L=v;let R=g;return L.regexEndings&&(R.push(...L.regexEndings),R=[...new Set(R)]),R},[]),_e="|"+xe.map(g=>escapeRegex(g)).join("|");let ke=null,Se=ve.find(([,v])=>{const L=v;let{stringRegex:R}=L;return"function"==typeof L.stringRegex&&(R=L.stringRegex(!0)),R=R?new RegExp(R.source.slice(0,-1)+"(?=$"+_e+")","u"):R,ke=Boolean(R&&g)&&g.match(R),ke}),we=!1;void 0===Se&&(Se=ve.find(([,v])=>{const L=v,{stringRegexBegin:W}=L;return ke=Boolean(W&&g)&&g.match(W),ke&&(we=!0,R.push(L)),ke}));let Ie=!0;if(void 0!==Se){const L=ke,[me,ge]=L;let ve,xe=g.slice(me.length);g=g.slice(0,me.length);try{const W=Se[1];if(!W.toValue)throw new Error("Type has no `toValue` method");ve=W.toValue(L.groups?.innerContent||ge||g,{types:this,format:v,match:ke,endMatchTypeObjs:R,remnant:xe,rootHolder:ie,parent:ce,parentPath:le,schemaObject:ue})}catch(g){throw console.log("eee",g),g}!1===ve.assign&&(Ie=!1);const{value:_e}=ve;if(void 0!==ve.remnant&&({remnant:xe}=ve),we&&R.length){const g=xe.match(R.at(-1).stringRegexEnd);g&&(R.pop(),xe=xe.slice(g[0].length))}if(W){const g=(new Typeson).register(fe);try{const v=g.revive(_e);return ie.forEach(([g,L,R,W])=>{const ie=this.availableTypes[g+"Reference"].resolveReference(W,v);getJSONType(ie)===g&&["array","object"].includes(g)&&(L[R]=ie)}),[v,xe,we,Ie]}catch(g){console.log("failed Typeson revival",g)}}return[_e,xe,we,Ie]}throw new Error("Bad parsing data")}getTypeObject(g){return this.availableTypes[g]}}function escapeRegex(g){return g.replaceAll(/[.\\+*?^[\]$(){}=!<>|:-]/gu,String.raw`\$&`)}Types.getTypeForRoot=g=>String(g?g.dataset.type:g),Types.validValuesSet=({form:g,typeNamespace:v,keySelectClass:L})=>{if(!g.offsetParent||!g.checkValidity())return!1;return $$e(g,L?`.${L}`:`.typeChoices-${v}`).every(g=>!g.offsetParent||""!==g.value&&g.$validate())};const getFormatAndSchemaChoices=({schemas:g,selectedSchema:v,hasKeyPath:L,preselectSchema:R,arbitraryJS:W=!1}={})=>{const ie=g&&g.length;return[["JSON only",{value:"json"}],...L?[]:[["IndexedDB key",{value:"indexedDBKey"}]],["Structured Clone (via Typeson JSON)",{value:"structuredCloning",selected:!(R&&ie||W)}],...W?[["Arbitrary JavaScript Object",{value:"arbitraryJS",selected:!R||!ie}]]:[],...ie?g.map((g,L)=>[`Schema: ${g}`,{value:"schema",dataset:{schema:g},selected:R?v?g===v:0===L:void 0}]):[]].map(([g,v])=>jmlExports.jml("option",v,[g])).reduce((g,v)=>(g.append(v),g),document.createDocumentFragment())};async function formatAndTypeChoices({schemas:g,getSchemaContent:v,hasValue:L,singleValue:R,hasKeyPath:W,arbitraryJS:ie=!1,preselectSchema:ce=!0,typeNamespace:le,selectedSchema:ue,formats:me=new Formats,useZodexyErrorMessages:ge=!1,useZodexyErrorMessagesInTypes:ve=!1,types:xe=new Types({useZodexyErrorMessages:ge,useZodexyErrorMessagesInTypes:ve})}){const _e=ce&&g&&g.length?"schema":ie?"arbitraryJS":"structuredCloning";let ke=Promise.resolve();const Se=jmlExports.jml("select",{class:"formatChoices",hidden:R,$custom:{async $setFormat({valueFormat:g,autoTrigger:v,schema:L}){if(L){const g=[...this.options].findIndex(g=>g.dataset.schema===L);this.selectedIndex=-1===g?0:g}else g&&(this.value=g);await this.$buildTypeChoices(v)},$whenReady:()=>ke,async $buildTypeChoices(g){DOM.removeChildren(we);const{schema:R}=this.selectedOptions[0].dataset,ie=buildTypeChoices({autoTrigger:g,topRoot:$e(we,"div[data-type]"),format:this.value,formats:me,types:xe,typeNamespace:le,requireObject:W,objectHasValue:L,schema:R,schemaContent:R?await(v?.(R)):void 0});ke=ie.whenReady,jmlExports.jml({"#":ie.domArray},we),await ie.whenReady}},$on:{async change(){await this.$buildTypeChoices()}}},[getFormatAndSchemaChoices({schemas:g,hasKeyPath:W,selectedSchema:ue,arbitraryJS:ie,preselectSchema:ce})]),we=jmlExports.jml("div",{class:"typesHolder",$custom:{$getTypeRoot(){return $e(this,"div[data-type]")},$getTypeSelect(){return $e(this,`.typeChoices-${le}`)}}}),Ie="schema"===_e?Se.selectedOptions[0].dataset.schema:void 0,Ee=buildTypeChoices({topRoot:$e(we,"div[data-type]"),format:_e,formats:me,types:xe,typeNamespace:le,requireObject:W,objectHasValue:L,schema:Ie,schemaContent:void 0===Ie?void 0:await(v?.(Ie))});return ke=Ee.whenReady,jmlExports.jml({"#":Ee.domArray},we),{formats:me,types:xe,formatChoices:Se,typesHolder:we,domArray:[Se,we],whenReady:ke,getValue(g,v){const L=we.$getTypeRoot();return xe.getValueForRoot(L,{typeNamespace:le,format:Se.value,formats:me,types:xe,...g},v)},getType(){const g=we.$getTypeRoot();return Types.getTypeForRoot(g)},validValuesSet(){const g=we.$getTypeRoot();if(!g)return!1;const v=g.closest("form");return Types.validValuesSet({form:v,typeNamespace:le})},async setValue(g,v){const L=await me.getControlsForFormatAndValue(xe,Se.value,g,v),R=L.rootUI,W=Types.getTypeForRoot(R);we.$getTypeSelect().$addTypeAndEditUI({type:W,editUI:R}),await L.whenBuilt}}}export{Formats,Types,formatAndTypeChoices,getFormatAndSchemaChoices,getTypesForSchema,buildTypeChoices as typeChoices};
7
7
  //# sourceMappingURL=index.js.map