@openzeppelin/contracts-mcp 0.6.3 → 0.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/apps/stellar.html CHANGED
@@ -13,7 +13,7 @@
13
13
  </head>
14
14
  <body>
15
15
  <script>
16
- !function(){"use strict";var e=[],t=[];!function(n,i){if(n&&"undefined"!=typeof document){var r,o=!0===i.prepend?"prepend":"append",a=!0===i.singleTag,s="string"==typeof i.container?document.querySelector(i.container):document.getElementsByTagName("head")[0];if(a){var l=e.indexOf(s);-1===l&&(l=e.push(s)-1,t[l]={}),r=t[l]&&t[l][o]?t[l][o]:t[l][o]=c()}else r=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),r.styleSheet?r.styleSheet.cssText+=n:r.appendChild(document.createTextNode(n))}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),i.attributes)for(var t=Object.keys(i.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],i.attributes[t[n]]);var r="prepend"===o?"afterbegin":"beforeend";return s.insertAdjacentElement(r,e),e}}("pre code.hljs {\n display: block;\n overflow-x: auto;\n padding: 1em\n}\ncode.hljs {\n padding: 3px 5px\n}\n/*\n\nAtom One Dark by Daniel Gamage\nOriginal One Dark Syntax theme from https://github.com/atom/one-dark-syntax\n\nbase: #282c34\nmono-1: #abb2bf\nmono-2: #818896\nmono-3: #5c6370\nhue-1: #56b6c2\nhue-2: #61aeee\nhue-3: #c678dd\nhue-4: #98c379\nhue-5: #e06c75\nhue-5-2: #be5046\nhue-6: #d19a66\nhue-6-2: #e6c07b\n\n*/\n.hljs {\n color: #abb2bf;\n background: #282c34\n}\n.hljs-comment,\n.hljs-quote {\n color: #5c6370;\n font-style: italic\n}\n.hljs-doctag,\n.hljs-keyword,\n.hljs-formula {\n color: #c678dd\n}\n.hljs-section,\n.hljs-name,\n.hljs-selector-tag,\n.hljs-deletion,\n.hljs-subst {\n color: #e06c75\n}\n.hljs-literal {\n color: #56b6c2\n}\n.hljs-string,\n.hljs-regexp,\n.hljs-addition,\n.hljs-attribute,\n.hljs-meta .hljs-string {\n color: #98c379\n}\n.hljs-attr,\n.hljs-variable,\n.hljs-template-variable,\n.hljs-type,\n.hljs-selector-class,\n.hljs-selector-attr,\n.hljs-selector-pseudo,\n.hljs-number {\n color: #d19a66\n}\n.hljs-symbol,\n.hljs-bullet,\n.hljs-link,\n.hljs-meta,\n.hljs-selector-id,\n.hljs-title {\n color: #61aeee\n}\n.hljs-built_in,\n.hljs-title.class_,\n.hljs-class .hljs-title {\n color: #e6c07b\n}\n.hljs-emphasis {\n font-style: italic\n}\n.hljs-strong {\n font-weight: bold\n}\n.hljs-link {\n text-decoration: underline\n}\n\n.visible {\n visibility: visible\n}\n\n.invisible {\n visibility: hidden\n}\n\n.collapse {\n visibility: collapse\n}\n\n.fixed {\n position: fixed\n}\n\n.absolute {\n position: absolute\n}\n\n.relative {\n position: relative\n}\n\n.bottom-1 {\n bottom: 0.25rem\n}\n\n.bottom-4 {\n bottom: 1rem\n}\n\n.bottom-8 {\n bottom: 2rem\n}\n\n.bottom-\\[3\\.75rem\\] {\n bottom: 3.75rem\n}\n\n.left-4 {\n left: 1rem\n}\n\n.right-0 {\n right: 0px\n}\n\n.right-4 {\n right: 1rem\n}\n\n.right-8 {\n right: 2rem\n}\n\n.z-20 {\n z-index: 20\n}\n\n.z-50 {\n z-index: 50\n}\n\n.m-0 {\n margin: 0px\n}\n\n.m-\\[2px\\] {\n margin: 2px\n}\n\n.mr-2 {\n margin-right: 0.5rem\n}\n\n.block {\n display: block\n}\n\n.flex {\n display: flex\n}\n\n.grid {\n display: grid\n}\n\n.contents {\n display: contents\n}\n\n.hidden {\n display: none\n}\n\n.h-10 {\n height: 2.5rem\n}\n\n.h-14 {\n height: 3.5rem\n}\n\n.h-32 {\n height: 8rem\n}\n\n.h-6 {\n height: 1.5rem\n}\n\n.h-\\[32px\\] {\n height: 32px\n}\n\n.h-\\[36px\\] {\n height: 36px\n}\n\n.h-\\[calc\\(100\\%-188px\\)\\] {\n height: calc(100% - 188px)\n}\n\n.h-\\[calc\\(100\\%-800px\\)\\] {\n height: calc(100% - 800px)\n}\n\n.h-full {\n height: 100%\n}\n\n.max-h-full {\n max-height: 100%\n}\n\n.min-h-0 {\n min-height: 0px\n}\n\n.min-h-\\[200px\\] {\n min-height: 200px\n}\n\n.w-10 {\n width: 2.5rem\n}\n\n.w-32 {\n width: 8rem\n}\n\n.w-6 {\n width: 1.5rem\n}\n\n.w-60 {\n width: 15rem\n}\n\n.w-80 {\n width: 20rem\n}\n\n.w-\\[32px\\] {\n width: 32px\n}\n\n.w-\\[36px\\] {\n width: 36px\n}\n\n.w-\\[40rem\\] {\n width: 40rem\n}\n\n.w-full {\n width: 100%\n}\n\n.min-w-0 {\n min-width: 0px\n}\n\n.min-w-\\[14rem\\] {\n min-width: 14rem\n}\n\n.min-w-\\[40px\\] {\n min-width: 40px\n}\n\n.max-w-\\[400px\\] {\n max-width: 400px\n}\n\n.max-w-\\[42\\%\\] {\n max-width: 42%\n}\n\n.flex-1 {\n flex: 1 1 0%\n}\n\n.flex-none {\n flex: none\n}\n\n.shrink-0 {\n flex-shrink: 0\n}\n\n.grow {\n flex-grow: 1\n}\n\n.basis-0 {\n flex-basis: 0px\n}\n\n.rotate-45 {\n --tw-rotate: 45deg;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))\n}\n\n.transform {\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))\n}\n\n@keyframes fade-in {\n 0% {\n opacity: 0\n }\n 100% {\n opacity: 1\n }\n}\n\n.animate-fade-in {\n animation: fade-in 0.3s ease-out\n}\n\n@keyframes fade-up {\n 0% {\n opacity: 0;\n transform: translateY(1rem)\n }\n 100% {\n opacity: 1;\n transform: translateY(0)\n }\n}\n\n.animate-fade-up {\n animation: fade-up 0.2s ease-out\n}\n\n@keyframes spin {\n to {\n transform: rotate(360deg)\n }\n}\n\n.animate-spin-slow {\n animation: spin 2s linear infinite\n}\n\n.cursor-pointer {\n cursor: pointer\n}\n\n.resize-none {\n resize: none\n}\n\n.resize {\n resize: both\n}\n\n.grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr))\n}\n\n.grid-cols-\\[2fr\\2c 1fr\\] {\n grid-template-columns: 2fr 1fr\n}\n\n.flex-row {\n flex-direction: row\n}\n\n.flex-col {\n flex-direction: column\n}\n\n.flex-col-reverse {\n flex-direction: column-reverse\n}\n\n.flex-wrap {\n flex-wrap: wrap\n}\n\n.items-center {\n align-items: center\n}\n\n.justify-center {\n justify-content: center\n}\n\n.justify-between {\n justify-content: space-between\n}\n\n.gap-2 {\n gap: 0.5rem\n}\n\n.gap-3 {\n gap: 0.75rem\n}\n\n.gap-4 {\n gap: 1rem\n}\n\n.overflow-auto {\n overflow: auto\n}\n\n.overflow-hidden {\n overflow: hidden\n}\n\n.overflow-x-auto {\n overflow-x: auto\n}\n\n.overflow-y-auto {\n overflow-y: auto\n}\n\n.rounded-full {\n border-radius: 9999px\n}\n\n.rounded-md {\n border-radius: 0.375rem\n}\n\n.rounded-xl {\n border-radius: 0.75rem\n}\n\n.border {\n border-width: 1px\n}\n\n.border-0 {\n border-width: 0px\n}\n\n.border-b {\n border-bottom-width: 1px\n}\n\n.border-r {\n border-right-width: 1px\n}\n\n.border-solid {\n border-style: solid\n}\n\n.border-none {\n border-style: none\n}\n\n.border-\\[var\\(--gray-3\\)\\] {\n border-color: var(--gray-3)\n}\n\n.border-gray-200 {\n --tw-border-opacity: 1;\n border-color: rgb(229 231 235 / var(--tw-border-opacity, 1))\n}\n\n.bg-gray-100 {\n --tw-bg-opacity: 1;\n background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1))\n}\n\n.bg-gray-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(229 231 235 / var(--tw-bg-opacity, 1))\n}\n\n.bg-gray-400 {\n --tw-bg-opacity: 1;\n background-color: rgb(156 163 175 / var(--tw-bg-opacity, 1))\n}\n\n.bg-gray-50 {\n --tw-bg-opacity: 1;\n background-color: rgb(249 250 251 / var(--tw-bg-opacity, 1))\n}\n\n.bg-gray-900 {\n --tw-bg-opacity: 1;\n background-color: rgb(17 24 39 / var(--tw-bg-opacity, 1))\n}\n\n.bg-transparent {\n background-color: transparent\n}\n\n.p-2 {\n padding: 0.5rem\n}\n\n.p-3 {\n padding: 0.75rem\n}\n\n.p-4 {\n padding: 1rem\n}\n\n.px-1 {\n padding-left: 0.25rem;\n padding-right: 0.25rem\n}\n\n.pr-2 {\n padding-right: 0.5rem\n}\n\n.text-center {\n text-align: center\n}\n\n.text-lg {\n font-size: 1.125rem;\n line-height: 1.75rem\n}\n\n.text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem\n}\n\n.text-xs {\n font-size: 0.75rem;\n line-height: 1rem\n}\n\n.font-bold {\n font-weight: 700\n}\n\n.lowercase {\n text-transform: lowercase\n}\n\n.italic {\n font-style: italic\n}\n\n.text-gray-50 {\n --tw-text-opacity: 1;\n color: rgb(249 250 251 / var(--tw-text-opacity, 1))\n}\n\n.text-gray-500 {\n --tw-text-opacity: 1;\n color: rgb(107 114 128 / var(--tw-text-opacity, 1))\n}\n\n.text-gray-600 {\n --tw-text-opacity: 1;\n color: rgb(75 85 99 / var(--tw-text-opacity, 1))\n}\n\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1))\n}\n\n.underline {\n text-decoration-line: underline\n}\n\n.shadow-lg {\n --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)\n}\n\n.shadow-sm {\n --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);\n --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)\n}\n\n.shadow-xl {\n --tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)\n}\n\n.outline-none {\n outline: 2px solid transparent;\n outline-offset: 2px\n}\n\n.filter {\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)\n}\n\n.transition {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms\n}\n\n.ease-in-out {\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1)\n}\n\n*,\n*:before,\n*:after {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n\nhtml {\n line-height: 1.15;\n -webkit-text-size-adjust: 100%;\n}\n\ncode {\n font-family: var(--monospace);\n font-size: 1em;\n}\n\nbutton,\ninput,\nselect,\ntextarea {\n font-family: inherit;\n font-size: inherit;\n color: inherit;\n}\n:root {\n --sans-serif: system-ui, sans-serif;\n --monospace: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;\n\n /* Colors */\n\n --text-color: #333333;\n\n --gray-1: #f9fafb;\n --gray-2: #eff1f3;\n --gray-3: #d8dbe2;\n --gray-4: #818998;\n --gray-5: #575c66;\n --gray-6: #2c374b;\n\n --blue-1: #f5f6ff;\n --blue-2: #4e5de4;\n --blue-3: #343f9d;\n\n --yellow-1: #fffaeb;\n --yellow-2: #ffcc33;\n --yellow-3: #b27700;\n\n --red-1: #feecec;\n --red-2: #f53d3d;\n --red-3: #aa0909;\n\n --solidity-blue-1: #51d4ff;\n --solidity-blue-2: #4e5de4;\n\n --cairo-orange: #fe4a3c;\n\n --polkadot-pink: #ff2670;\n\n --stylus-pink: #e3066e;\n\n --stellar-black: #0f0f0f;\n\n --confidential-black: #000000;\n --confidential-yellow: #ffd208;\n\n --uniswap-pink: #f50eb4;\n\n /* Dimensions (scale taken from Tailwind) */\n\n --size-1: 0.25rem;\n --size-2: 0.5rem;\n --size-3: 0.75rem;\n --size-4: 1rem;\n --size-8: 2rem;\n --size-64: 16rem;\n\n /* Font Sizes */\n\n --text-small: 0.875rem;\n\n /* Utilities */\n\n --shadow: 0 2px 3px rgba(0, 0, 0, 0.1);\n\n --icon-adjust: 0.125em;\n}\n.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}\n[data-tippy-root]{max-width:calc(100vw - 10px)}\n.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}\n.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}\n.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}\n.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}\n.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}\n.tippy-box[data-placement^=left]>.tippy-arrow{right:0}\n.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}\n.tippy-box[data-placement^=right]>.tippy-arrow{left:0}\n.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}\n.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}\n.tippy-arrow{width:16px;height:16px;color:#333}\n.tippy-arrow:before{content:\"\";position:absolute;border-color:transparent;border-style:solid}\n.tippy-content{position:relative;padding:5px 9px;z-index:1}\n.tippy-box[data-theme~=material]{background-color:#505355;font-weight:600}\n.tippy-box[data-theme~=material][data-placement^=top]>.tippy-arrow:before{border-top-color:#505355}\n.tippy-box[data-theme~=material][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#505355}\n.tippy-box[data-theme~=material][data-placement^=left]>.tippy-arrow:before{border-left-color:#505355}\n.tippy-box[data-theme~=material][data-placement^=right]>.tippy-arrow:before{border-right-color:#505355}\n.tippy-box[data-theme~=material]>.tippy-backdrop{background-color:#505355}\n.tippy-box[data-theme~=material]>.tippy-svg-arrow{fill:#505355}\n:root {\n --tippy-background: #333;\n --tippy-text: var(--gray-3);\n --tippy-border: rgba(0, 8, 16, 0.15);\n}\n.tippy-box[data-theme~='light'] {\n --tippy-background: #fffffff5;\n --tippy-text: #333;\n}\n.tippy-box[data-theme~='light-yellow'] {\n --tippy-background: var(--yellow-1);\n --tippy-text: #333;\n}\n.tippy-box[data-theme~='light-red'] {\n --tippy-background: var(--red-1);\n --tippy-text: #333;\n}\n.tippy-box {\n background-color: var(--tippy-background);\n background-clip: padding-box;\n color: var(--tippy-text);\n box-shadow: var(--shadow);\n font-weight: initial;\n font-variant: initial;\n text-transform: none;\n}\n.tippy-box[data-theme~='border'] {\n border: 1px solid var(--tippy-border);\n}\n.tippy-box > .tippy-backdrop {\n background-color: var(--tippy-background);\n}\n.tippy-box[data-theme~='border'] > .tippy-arrow:after {\n content: '';\n position: absolute;\n z-index: -1;\n border-color: transparent;\n border-style: solid;\n}\n.tippy-box[data-placement^='top'] > .tippy-arrow:before {\n border-top-color: var(--tippy-background);\n}\n.tippy-box[data-placement^='bottom'] > .tippy-arrow:before {\n border-bottom-color: var(--tippy-background);\n bottom: 16px;\n}\n.tippy-box[data-placement^='left'] > .tippy-arrow:before {\n border-left-color: var(--tippy-background);\n}\n.tippy-box[data-placement^='right'] > .tippy-arrow:before {\n border-right-color: var(--tippy-background);\n right: 16px;\n}\n.tippy-box[data-theme~='border'][data-placement^='top'] > .tippy-arrow:after {\n border-top-color: var(--tippy-border);\n border-width: 7px 7px 0;\n top: 17px;\n left: 1px;\n}\n.tippy-box[data-theme~='border'][data-placement^='bottom'] > .tippy-arrow:after {\n border-bottom-color: var(--tippy-border);\n border-width: 0 7px 7px;\n bottom: 17px;\n left: 1px;\n}\n.tippy-box[data-theme~='border'][data-placement^='left'] > .tippy-arrow:after {\n border-left-color: var(--tippy-border);\n border-width: 7px 0 7px 7px;\n left: 17px;\n top: 1px;\n}\n.tippy-box[data-theme~='border'][data-placement^='right'] > .tippy-arrow:after {\n border-width: 7px 7px 7px 0;\n right: 17px;\n top: 1px;\n border-right-color: var(--tippy-border);\n}\n.container {\n background-color: var(--gray-1);\n min-width: 32rem;\n}\n.header {\n font-size: var(--text-small);\n}\n.tab {\n color: var(--gray-5);\n}\n.tab button:hover,\n.overflow-btn:hover {\n background-color: var(--gray-2);\n}\n/* Global .overflow-menu button with .selected class */\n.overflow-menu button.selected {\n order: unset;\n}\n.tab button,\n.overflow-btn {\n border: 0;\n background-color: transparent;\n padding: var(--size-2) var(--size-4);\n border-radius: 20px;\n cursor: pointer;\n transition: background-color ease-in-out 0.2s;\n}\n/* Global .action-button */\n.action-button {\n padding: 7px;\n border-radius: 20px;\n transition: background-color ease-in-out 0.2s;\n background-color: var(--gray-1);\n border: 1px solid var(--gray-3);\n color: var(--gray-6);\n cursor: pointer;\n}\n/* Hover and active states for .action-button */\n.action-button:hover {\n background-color: var(--gray-2);\n}\n.action-button:active,\n.action-button.active {\n background-color: var(--gray-2);\n}\n/* .icon inside .action-button */\n.action-button .icon {\n margin: 0 var(--size-1);\n}\n/* Disabled state */\n.action-button.disabled {\n color: var(--gray-4);\n}\n/* Button with text */\n.with-text {\n padding-right: var(--size-3);\n}\n/* Controls container */\n.controls {\n background-color: white;\n padding: var(--size-4);\n}\n/* Controls footer */\n.controls-footer {\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n color: var(--gray-5);\n margin-top: var(--size-3);\n padding: 0 var(--size-2);\n font-size: var(--text-small);\n}\n/* Apply left margin to every element after the first child */\n.controls-footer > * + * {\n margin-left: var(--size-3);\n}\n/* .icon inside .controls-footer */\n.controls-footer .icon {\n margin-right: 0.2em;\n opacity: 0.8;\n}\n/* Links inside .controls-footer */\n.controls-footer a {\n color: inherit;\n text-decoration: none;\n}\n/* Hover effect for links */\n.controls-footer a:hover {\n color: var(--text-color);\n}\n.download-option-content {\n margin-left: var(--size-3);\n font-size: var(--text-small);\n}\n.download-option-content > :first-child {\n margin-bottom: var(--size-2);\n color: var(--gray-6);\n font-weight: bold;\n}\n.download-option-content > :not(:first-child) {\n margin-top: var(--size-1);\n color: var(--gray-5);\n}\n.download-option {\n display: flex;\n padding: var(--size-2);\n text-align: left;\n background: none;\n border: 1px solid transparent;\n border-radius: 4px;\n cursor: pointer;\n}\n/* The .icon inside .download-option */\n.download-option :global(.icon) {\n margin-top: var(--icon-adjust);\n}\n/* When the previous sibling is not hovered */\n:not(:hover) + .download-option {\n border-top: 1px solid var(--gray-2);\n}\n/* Hover and focus states */\n.download-option:hover,\n.download-option:focus {\n background-color: var(--gray-1);\n border: 1px solid var(--gray-3);\n}\n/* Direct or nested div inside .download-option */\n.download-option div {\n display: block;\n}\n\n/* General */\n\nbody {\n color: var(--text-color);\n font-family: var(--sans-serif);\n}\n\nsvg.vertical-align {\n vertical-align: calc(-1 * var(--icon-adjust));\n}\n\nsvg.keepcolor {\n fill: currentColor;\n}\n\nsvg.icon {\n vertical-align: calc(-1 * var(--icon-adjust));\n flex: 0 0 auto;\n height: 1em;\n width: 1em;\n fill: currentColor;\n}\n\ninput:not([type]),\ninput[type='text'],\ninput[type='number'],\ninput[type='datetime-local'] {\n border: 1px solid var(--gray-3);\n padding: var(--size-2) var(--size-3);\n border-radius: 6px;\n}\n\n/* Hide up and down arrows in numeric input fields */\n\ninput[type='number']::-webkit-outer-spin-button,\ninput[type='number']::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\ninput[type='number'] {\n -moz-appearance: textfield;\n -webkit-appearance: textfield;\n appearance: textfield;\n}\n\n/* Components */\n\n.controls-section {\n display: flex;\n flex-direction: column;\n}\n\n.controls-section + .controls-section {\n margin-top: var(--size-4);\n padding-top: var(--size-4);\n border-top: 1px solid var(--gray-3);\n }\n\n.controls-section > * + * {\n margin-top: var(--size-3);\n }\n\n.controls-section h1 {\n margin-top: 0;\n margin-bottom: 0;\n text-transform: lowercase;\n font-variant: small-caps;\n font-size: var(--text-small);\n color: var(--gray-4);\n font-weight: 600;\n }\n\n.subcontrol::before {\n content: '└';\n color: var(--gray-3);\n}\n\n.checkbox-group {\n display: flex;\n flex-direction: column;\n}\n\n.checkbox-group > * {\n display: flex;\n align-items: center;\n padding: var(--size-2);\n }\n\n.checkbox-group input {\n margin-right: var(--size-2);\n }\n\n.checkbox-group .tooltip {\n margin-left: auto;\n }\n\n.checkbox-group .checked {\n background-color: var(--blue-1);\n }\n\n.labeled-input {\n display: flex;\n flex-direction: column;\n}\n\n.labeled-input > span {\n font-size: var(--text-small);\n }\n\n.labeled-input > input {\n margin-top: var(--size-1);\n width: 100%;\n }\n\n.tooltip-container,\n.checkbox-group > *,\n.labeled-input {\n --tooltip-opacity: 0.15;\n}\n\n.tooltip-container:hover, .checkbox-group > *:hover, .labeled-input:hover {\n --tooltip-opacity: 0.5;\n }\n\ninput.input-inline {\n padding: 0.25em;\n height: 1.5em;\n width: 2em;\n max-width: 100%;\n text-align: center;\n}\n\n.has-error {\n box-shadow: 0 0 var(--size-1) var(--red-2);\n}\n\n.import-link {\n color: inherit;\n}\n\n.comment-link {\n color: #7d828d;\n}\n\n.glimmery {\n background: conic-gradient(rgb(196, 181, 253), rgb(110, 231, 183), rgb(249, 168, 212));\n}\n\n.hljs.-solidity {\n background: linear-gradient(30deg, #151a24, #2b323e);\n}\n\n.hljs.-cairo {\n background: linear-gradient(30deg, #191717, #2a0f0f);\n}\n\n.hljs.-stylus {\n background: linear-gradient(30deg, #181215, #360c1f);\n}\n\n.light-link {\n color: white;\n}\n\n.hover\\:bg-gray-200:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(229 231 235 / var(--tw-bg-opacity, 1))\n}\n\n.hover\\:bg-white:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1))\n}\n",{});const n=Object.freeze({status:"aborted"});function i(e,t,n){function i(n,i){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:i,constr:a,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,i);const r=a.prototype,o=Object.keys(r);for(let e=0;e<o.length;e++){const t=o[e];t in n||(n[t]=r[t].bind(n))}}const r=n?.Parent??Object;class o extends r{}function a(e){var t;const r=n?.Parent?new o:this;i(r,e),(t=r._zod).deferred??(t.deferred=[]);for(const e of r._zod.deferred)e();return r}return Object.defineProperty(o,"name",{value:e}),Object.defineProperty(a,"init",{value:i}),Object.defineProperty(a,Symbol.hasInstance,{value:t=>!!(n?.Parent&&t instanceof n.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}const r=Symbol("zod_brand");class o extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class a extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const s={};function l(e){return e&&Object.assign(s,e),s}function c(e){const t=Object.values(e).filter(e=>"number"==typeof e),n=Object.entries(e).filter(([e,n])=>-1===t.indexOf(+e)).map(([e,t])=>t);return n}function u(e,t="|"){return e.map(e=>U(e)).join(t)}function d(e,t){return"bigint"==typeof t?t.toString():t}function p(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function m(e){return null==e}function f(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function h(e,t){const n=(e.toString().split(".")[1]||"").length,i=t.toString();let r=(i.split(".")[1]||"").length;if(0===r&&/\d?e-\d?/.test(i)){const e=i.match(/\d?e-(\d?)/);e?.[1]&&(r=Number.parseInt(e[1]))}const o=n>r?n:r;return Number.parseInt(e.toFixed(o).replace(".",""))%Number.parseInt(t.toFixed(o).replace(".",""))/10**o}const g=Symbol("evaluating");function v(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==g)return void 0===i&&(i=g,i=n()),i},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function b(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function y(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function $(e){return JSON.stringify(e)}function _(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const k="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function w(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const x=p(()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function I(e){if(!1===w(e))return!1;const t=e.constructor;if(void 0===t)return!0;if("function"!=typeof t)return!0;const n=t.prototype;return!1!==w(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function S(e){return I(e)?{...e}:Array.isArray(e)?[...e]:e}const E=new Set(["string","number","symbol"]),T=new Set(["string","number","bigint","boolean","symbol","undefined"]);function z(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function C(e,t,n){const i=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(i._zod.parent=e),i}function O(e){const t=e;if(!t)return{};if("string"==typeof t)return{error:()=>t};if(void 0!==t?.message){if(void 0!==t?.error)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,"string"==typeof t.error?{...t,error:()=>t.error}:t}function U(e){return"bigint"==typeof e?e.toString()+"n":"string"==typeof e?`"${e}"`:`${e}`}function N(e){return Object.keys(e).filter(t=>"optional"===e[t]._zod.optin&&"optional"===e[t]._zod.optout)}const D={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]},A={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function j(e,t){const n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");return C(e,y(e._zod.def,{get shape(){const e={};for(const i in t){if(!(i in n.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&(e[i]=n.shape[i])}return b(this,"shape",e),e},checks:[]}))}function P(e,t){const n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const r=y(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const e in t){if(!(e in n.shape))throw new Error(`Unrecognized key: "${e}"`);t[e]&&delete i[e]}return b(this,"shape",i),i},checks:[]});return C(e,r)}function Z(e,t){if(!I(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const n=e._zod.def.shape;for(const e in t)if(void 0!==Object.getOwnPropertyDescriptor(n,e))throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const i=y(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return b(this,"shape",n),n}});return C(e,i)}function R(e,t){if(!I(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=y(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return b(this,"shape",n),n}});return C(e,n)}function q(e,t){const n=y(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return b(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return C(e,n)}function M(e,t,n){const i=t._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const r=y(t._zod.def,{get shape(){const i=t._zod.def.shape,r={...i};if(n)for(const t in n){if(!(t in i))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(r[t]=e?new e({type:"optional",innerType:i[t]}):i[t])}else for(const t in i)r[t]=e?new e({type:"optional",innerType:i[t]}):i[t];return b(this,"shape",r),r},checks:[]});return C(t,r)}function L(e,t,n){const i=y(t._zod.def,{get shape(){const i=t._zod.def.shape,r={...i};if(n)for(const t in n){if(!(t in r))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(r[t]=new e({type:"nonoptional",innerType:i[t]}))}else for(const t in i)r[t]=new e({type:"nonoptional",innerType:i[t]});return b(this,"shape",r),r}});return C(t,i)}function F(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(!0!==e.issues[n]?.continue)return!0;return!1}function V(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function B(e){return"string"==typeof e?e:e?.message}function H(e,t,n){const i={...e,path:e.path??[]};if(!e.message){const r=B(e.inst?._zod.def?.error?.(e))??B(t?.error?.(e))??B(n.customError?.(e))??B(n.localeError?.(e))??"Invalid input";i.message=r}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function W(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function J(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function G(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(null===e)return"null";if(Array.isArray(e))return"array";const t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&"constructor"in t&&t.constructor)return t.constructor.name}}return t}function K(...e){const[t,n,i]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:i}:{...t}}function X(e){const t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}function Y(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}var Q=Object.freeze({__proto__:null,BIGINT_FORMAT_RANGES:A,Class:class{constructor(...e){}},NUMBER_FORMAT_RANGES:D,aborted:F,allowsEval:x,assert:function(e){},assertEqual:function(e){return e},assertIs:function(e){},assertNever:function(e){throw new Error("Unexpected value in exhaustive check")},assertNotEqual:function(e){return e},assignProp:b,base64ToUint8Array:X,base64urlToUint8Array:function(e){const t=e.replace(/-/g,"+").replace(/_/g,"/");return X(t+"=".repeat((4-t.length%4)%4))},cached:p,captureStackTrace:k,cleanEnum:function(e){return Object.entries(e).filter(([e,t])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])},cleanRegex:f,clone:C,cloneDef:function(e){return y(e._zod.def)},createTransparentProxy:function(e){let t;return new Proxy({},{get:(n,i,r)=>(t??(t=e()),Reflect.get(t,i,r)),set:(n,i,r,o)=>(t??(t=e()),Reflect.set(t,i,r,o)),has:(n,i)=>(t??(t=e()),Reflect.has(t,i)),deleteProperty:(n,i)=>(t??(t=e()),Reflect.deleteProperty(t,i)),ownKeys:n=>(t??(t=e()),Reflect.ownKeys(t)),getOwnPropertyDescriptor:(n,i)=>(t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)),defineProperty:(n,i,r)=>(t??(t=e()),Reflect.defineProperty(t,i,r))})},defineLazy:v,esc:$,escapeRegex:z,extend:Z,finalizeIssue:H,floatSafeRemainder:h,getElementAtPath:function(e,t){return t?t.reduce((e,t)=>e?.[t],e):e},getEnumValues:c,getLengthableOrigin:J,getParsedType:e=>{const t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":null===e?"null":e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?"promise":"undefined"!=typeof Map&&e instanceof Map?"map":"undefined"!=typeof Set&&e instanceof Set?"set":"undefined"!=typeof Date&&e instanceof Date?"date":"undefined"!=typeof File&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},getSizableOrigin:W,hexToUint8Array:function(e){const t=e.replace(/^0x/,"");if(t.length%2!=0)throw new Error("Invalid hex string length");const n=new Uint8Array(t.length/2);for(let e=0;e<t.length;e+=2)n[e/2]=Number.parseInt(t.slice(e,e+2),16);return n},isObject:w,isPlainObject:I,issue:K,joinValues:u,jsonStringifyReplacer:d,merge:q,mergeDefs:y,normalizeParams:O,nullish:m,numKeys:function(e){let t=0;for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t},objectClone:function(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))},omit:P,optionalKeys:N,parsedType:G,partial:M,pick:j,prefixIssues:V,primitiveTypes:T,promiseAllObject:function(e){const t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{const n={};for(let i=0;i<t.length;i++)n[t[i]]=e[i];return n})},propertyKeyTypes:E,randomString:function(e=10){const t="abcdefghijklmnopqrstuvwxyz";let n="";for(let i=0;i<e;i++)n+=t[Math.floor(26*Math.random())];return n},required:L,safeExtend:R,shallowClone:S,slugify:_,stringifyPrimitive:U,uint8ArrayToBase64:Y,uint8ArrayToBase64url:function(e){return Y(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},uint8ArrayToHex:function(e){return Array.from(e).map(e=>e.toString(16).padStart(2,"0")).join("")},unwrapMessage:B});const ee=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,d,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},te=i("$ZodError",ee),ne=i("$ZodError",ee,{Parent:Error});function ie(e,t=e=>e.message){const n={},i=[];for(const r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):i.push(t(r));return{formErrors:i,fieldErrors:n}}function re(e,t=e=>e.message){const n={_errors:[]},i=e=>{for(const r of e.issues)if("invalid_union"===r.code&&r.errors.length)r.errors.map(e=>i({issues:e}));else if("invalid_key"===r.code)i({issues:r.issues});else if("invalid_element"===r.code)i({issues:r.issues});else if(0===r.path.length)n._errors.push(t(r));else{let e=n,i=0;for(;i<r.path.length;){const n=r.path[i];i===r.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(r))):e[n]=e[n]||{_errors:[]},e=e[n],i++}}};return i(e),n}function oe(e,t=e=>e.message){const n={errors:[]},i=(e,r=[])=>{var o,a;for(const s of e.issues)if("invalid_union"===s.code&&s.errors.length)s.errors.map(e=>i({issues:e},s.path));else if("invalid_key"===s.code)i({issues:s.issues},s.path);else if("invalid_element"===s.code)i({issues:s.issues},s.path);else{const e=[...r,...s.path];if(0===e.length){n.errors.push(t(s));continue}let i=n,l=0;for(;l<e.length;){const n=e[l],r=l===e.length-1;"string"==typeof n?(i.properties??(i.properties={}),(o=i.properties)[n]??(o[n]={errors:[]}),i=i.properties[n]):(i.items??(i.items=[]),(a=i.items)[n]??(a[n]={errors:[]}),i=i.items[n]),r&&i.errors.push(t(s)),l++}}};return i(e),n}function ae(e){const t=[],n=e.map(e=>"object"==typeof e?e.key:e);for(const e of n)"number"==typeof e?t.push(`[${e}]`):"symbol"==typeof e?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push("."),t.push(e));return t.join("")}function se(e){const t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(const e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${ae(e.path)}`);return t.join("\n")}const le=e=>(t,n,i,r)=>{const a=i?Object.assign(i,{async:!1}):{async:!1},s=t._zod.run({value:n,issues:[]},a);if(s instanceof Promise)throw new o;if(s.issues.length){const t=new(r?.Err??e)(s.issues.map(e=>H(e,a,l())));throw k(t,r?.callee),t}return s.value},ce=le(ne),ue=e=>async(t,n,i,r)=>{const o=i?Object.assign(i,{async:!0}):{async:!0};let a=t._zod.run({value:n,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){const t=new(r?.Err??e)(a.issues.map(e=>H(e,o,l())));throw k(t,r?.callee),t}return a.value},de=ue(ne),pe=e=>(t,n,i)=>{const r=i?{...i,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},r);if(a instanceof Promise)throw new o;return a.issues.length?{success:!1,error:new(e??te)(a.issues.map(e=>H(e,r,l())))}:{success:!0,data:a.value}},me=pe(ne),fe=e=>async(t,n,i)=>{const r=i?Object.assign(i,{async:!0}):{async:!0};let o=t._zod.run({value:n,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(e=>H(e,r,l())))}:{success:!0,data:o.value}},he=fe(ne),ge=e=>(t,n,i)=>{const r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return le(e)(t,n,r)},ve=ge(ne),be=e=>(t,n,i)=>le(e)(t,n,i),ye=be(ne),$e=e=>async(t,n,i)=>{const r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return ue(e)(t,n,r)},_e=$e(ne),ke=e=>async(t,n,i)=>ue(e)(t,n,i),we=ke(ne),xe=e=>(t,n,i)=>{const r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return pe(e)(t,n,r)},Ie=xe(ne),Se=e=>(t,n,i)=>pe(e)(t,n,i),Ee=Se(ne),Te=e=>async(t,n,i)=>{const r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return fe(e)(t,n,r)},ze=Te(ne),Ce=e=>async(t,n,i)=>fe(e)(t,n,i),Oe=Ce(ne),Ue=/^[cC][^\s-]{8,}$/,Ne=/^[0-9a-z]+$/,De=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ae=/^[0-9a-vA-V]{20}$/,je=/^[A-Za-z0-9]{27}$/,Pe=/^[a-zA-Z0-9_-]{21}$/,Ze=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Re=/^([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})$/,qe=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Me=qe(4),Le=qe(6),Fe=qe(7),Ve=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Be=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,He=Be;function We(){return new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")}const Je=/^(?:(?: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])$/,Ge=/^(([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}|:))$/,Ke=e=>{const t=z(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Xe=/^((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])$/,Ye=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Qe=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,et=/^[A-Za-z0-9_-]*$/,tt=/^(?=.{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])?)*\.?$/,nt=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,it=/^\+[1-9]\d{6,14}$/,rt="(?:(?:\\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])))",ot=new RegExp(`^${rt}$`);function at(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function st(e){return new RegExp(`^${at(e)}$`)}function lt(e){const t=at({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${t}(?:${n.join("|")})`;return new RegExp(`^${rt}T(?:${i})$`)}const ct=e=>new RegExp(`^${e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*"}$`),ut=/^-?\d+n?$/,dt=/^-?\d+$/,pt=/^-?\d+(?:\.\d+)?$/,mt=/^(?:true|false)$/i,ft=/^null$/i,ht=/^undefined$/i,gt=/^[^A-Z]*$/,vt=/^[^a-z]*$/,bt=/^[0-9a-fA-F]*$/;function yt(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function $t(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}const _t=yt(22,"=="),kt=$t(22),wt=yt(27,"="),xt=$t(27),It=yt(43,"="),St=$t(43),Et=yt(64,""),Tt=$t(64),zt=yt(86,"=="),Ct=$t(86);var Ot=Object.freeze({__proto__:null,base64:Qe,base64url:et,bigint:ut,boolean:mt,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])?)*$/,cidrv4:Xe,cidrv6:Ye,cuid:Ue,cuid2:Ne,date:ot,datetime:lt,domain:nt,duration:Ze,e164:it,email:Ve,emoji:We,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:Re,hex:bt,hostname:tt,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])?)*$/,idnEmail:He,integer:dt,ipv4:Je,ipv6:Ge,ksuid:je,lowercase:gt,mac:Ke,md5_base64:_t,md5_base64url:kt,md5_hex:/^[0-9a-fA-F]{32}$/,nanoid:Pe,null:ft,number:pt,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,}))$/,sha1_base64:wt,sha1_base64url:xt,sha1_hex:/^[0-9a-fA-F]{40}$/,sha256_base64:It,sha256_base64url:St,sha256_hex:/^[0-9a-fA-F]{64}$/,sha384_base64:Et,sha384_base64url:Tt,sha384_hex:/^[0-9a-fA-F]{96}$/,sha512_base64:zt,sha512_base64url:Ct,sha512_hex:/^[0-9a-fA-F]{128}$/,string:ct,time:st,ulid:De,undefined:ht,unicodeEmail:Be,uppercase:vt,uuid:qe,uuid4:Me,uuid6:Le,uuid7:Fe,xid:Ae});const Ut=i("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Nt={number:"number",bigint:"bigint",object:"date"},Dt=i("$ZodCheckLessThan",(e,t)=>{Ut.init(e,t);const n=Nt[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,i=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:n,code:"too_big",maximum:"object"==typeof t.value?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),At=i("$ZodCheckGreaterThan",(e,t)=>{Ut.init(e,t);const n=Nt[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,i=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:n,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),jt=i("$ZodCheckMultipleOf",(e,t)=>{Ut.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?n.value%t.value===BigInt(0):0===h(n.value,t.value))||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Pt=i("$ZodCheckNumberFormat",(e,t)=>{Ut.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),i=n?"int":"number",[r,o]=D[t.format];e._zod.onattach.push(e=>{const i=e._zod.bag;i.format=t.format,i.minimum=r,i.maximum=o,n&&(i.pattern=dt)}),e._zod.check=a=>{const s=a.value;if(n){if(!Number.isInteger(s))return void a.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});if(!Number.isSafeInteger(s))return void(s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}))}s<r&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),s>o&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),Zt=i("$ZodCheckBigIntFormat",(e,t)=>{Ut.init(e,t);const[n,i]=A[t.format];e._zod.onattach.push(e=>{const r=e._zod.bag;r.format=t.format,r.minimum=n,r.maximum=i}),e._zod.check=r=>{const o=r.value;o<n&&r.issues.push({origin:"bigint",input:o,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),o>i&&r.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Rt=i("$ZodCheckMaxSize",(e,t)=>{var n;Ut.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!m(t)&&void 0!==t.size}),e._zod.onattach.push(e=>{const n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const i=n.value;i.size<=t.maximum||n.issues.push({origin:W(i),code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),qt=i("$ZodCheckMinSize",(e,t)=>{var n;Ut.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!m(t)&&void 0!==t.size}),e._zod.onattach.push(e=>{const n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const i=n.value;i.size>=t.minimum||n.issues.push({origin:W(i),code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Mt=i("$ZodCheckSizeEquals",(e,t)=>{var n;Ut.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!m(t)&&void 0!==t.size}),e._zod.onattach.push(e=>{const n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=n=>{const i=n.value,r=i.size;if(r===t.size)return;const o=r>t.size;n.issues.push({origin:W(i),...o?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Lt=i("$ZodCheckMaxLength",(e,t)=>{var n;Ut.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!m(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const i=n.value;if(i.length<=t.maximum)return;const r=J(i);n.issues.push({origin:r,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Ft=i("$ZodCheckMinLength",(e,t)=>{var n;Ut.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!m(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const i=n.value;if(i.length>=t.minimum)return;const r=J(i);n.issues.push({origin:r,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Vt=i("$ZodCheckLengthEquals",(e,t)=>{var n;Ut.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!m(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{const i=n.value,r=i.length;if(r===t.length)return;const o=J(i),a=r>t.length;n.issues.push({origin:o,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Bt=i("$ZodCheckStringFormat",(e,t)=>{var n,i;Ut.init(e,t),e._zod.onattach.push(e=>{const n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),Ht=i("$ZodCheckRegex",(e,t)=>{Bt.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Wt=i("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=gt),Bt.init(e,t)}),Jt=i("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=vt),Bt.init(e,t)}),Gt=i("$ZodCheckIncludes",(e,t)=>{Ut.init(e,t);const n=z(t.includes),i=new RegExp("number"==typeof t.position?`^.{${t.position}}${n}`:n);t.pattern=i,e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(i)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Kt=i("$ZodCheckStartsWith",(e,t)=>{Ut.init(e,t);const n=new RegExp(`^${z(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Xt=i("$ZodCheckEndsWith",(e,t)=>{Ut.init(e,t);const n=new RegExp(`.*${z(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});function Yt(e,t,n){e.issues.length&&t.issues.push(...V(n,e.issues))}const Qt=i("$ZodCheckProperty",(e,t)=>{Ut.init(e,t),e._zod.check=e=>{const n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(n=>Yt(n,e,t.property));Yt(n,e,t.property)}}),en=i("$ZodCheckMimeType",(e,t)=>{Ut.init(e,t);const n=new Set(t.mime);e._zod.onattach.push(e=>{e._zod.bag.mime=t.mime}),e._zod.check=i=>{n.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),tn=i("$ZodCheckOverwrite",(e,t)=>{Ut.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class nn{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});const t=e.split("\n").filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),i=t.map(e=>e.slice(n)).map(e=>" ".repeat(2*this.indent)+e);for(const e of i)this.content.push(e)}compile(){const e=Function,t=this?.args;return new e(...t,[...(this?.content??[""]).map(e=>` ${e}`)].join("\n"))}}const rn={major:4,minor:3,patch:6},on=i("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=rn;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const t of i)for(const n of t._zod.onattach)n(e);if(0===i.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const t=(e,t,n)=>{let i,r=F(e);for(const a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;const t=e.issues.length,s=a._zod.check(e);if(s instanceof Promise&&!1===n?.async)throw new o;if(i||s instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await s;e.issues.length!==t&&(r||(r=F(e,t)))});else{if(e.issues.length===t)continue;r||(r=F(e,t))}}return i?i.then(()=>e):e},n=(n,r,a)=>{if(F(n))return n.aborted=!0,n;const s=t(r,i,a);if(s instanceof Promise){if(!1===a.async)throw new o;return s.then(t=>e._zod.parse(t,a))}return e._zod.parse(s,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if("backward"===a.direction){const t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}const s=e._zod.parse(r,a);if(s instanceof Promise){if(!1===a.async)throw new o;return s.then(e=>t(e,i,a))}return t(s,i,a)}}v(e,"~standard",()=>({validate:t=>{try{const n=me(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return he(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}))}),an=i("$ZodString",(e,t)=>{on.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??ct(e._zod.bag),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=String(n.value)}catch(i){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),sn=i("$ZodStringFormat",(e,t)=>{Bt.init(e,t),an.init(e,t)}),ln=i("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Re),sn.init(e,t)}),cn=i("$ZodUUID",(e,t)=>{if(t.version){const e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=qe(e))}else t.pattern??(t.pattern=qe());sn.init(e,t)}),un=i("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Ve),sn.init(e,t)}),dn=i("$ZodURL",(e,t)=>{sn.init(e,t),e._zod.check=n=>{try{const i=n.value.trim(),r=new URL(i);return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),void(t.normalize?n.value=r.href:n.value=i)}catch(i){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),pn=i("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=We()),sn.init(e,t)}),mn=i("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Pe),sn.init(e,t)}),fn=i("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Ue),sn.init(e,t)}),hn=i("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Ne),sn.init(e,t)}),gn=i("$ZodULID",(e,t)=>{t.pattern??(t.pattern=De),sn.init(e,t)}),vn=i("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Ae),sn.init(e,t)}),bn=i("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=je),sn.init(e,t)}),yn=i("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=lt(t)),sn.init(e,t)}),$n=i("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=ot),sn.init(e,t)}),_n=i("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=st(t)),sn.init(e,t)}),kn=i("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Ze),sn.init(e,t)}),wn=i("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Je),sn.init(e,t),e._zod.bag.format="ipv4"}),xn=i("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Ge),sn.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),In=i("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Ke(t.delimiter)),sn.init(e,t),e._zod.bag.format="mac"}),Sn=i("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Xe),sn.init(e,t)}),En=i("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Ye),sn.init(e,t),e._zod.check=n=>{const i=n.value.split("/");try{if(2!==i.length)throw new Error;const[e,t]=i;if(!t)throw new Error;const n=Number(t);if(`${n}`!==t)throw new Error;if(n<0||n>128)throw new Error;new URL(`http://[${e}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Tn(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const zn=i("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Qe),sn.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Tn(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Cn(e){if(!et.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return Tn(t.padEnd(4*Math.ceil(t.length/4),"="))}const On=i("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=et),sn.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Cn(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Un=i("$ZodE164",(e,t)=>{t.pattern??(t.pattern=it),sn.init(e,t)});function Nn(e,t=null){try{const n=e.split(".");if(3!==n.length)return!1;const[i]=n;if(!i)return!1;const r=JSON.parse(atob(i));return(!("typ"in r)||"JWT"===r?.typ)&&(!!r.alg&&(!t||"alg"in r&&r.alg===t))}catch{return!1}}const Dn=i("$ZodJWT",(e,t)=>{sn.init(e,t),e._zod.check=n=>{Nn(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),An=i("$ZodCustomStringFormat",(e,t)=>{sn.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),jn=i("$ZodNumber",(e,t)=>{on.init(e,t),e._zod.pattern=e._zod.bag.pattern??pt,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Number(n.value)}catch(e){}const r=n.value;if("number"==typeof r&&!Number.isNaN(r)&&Number.isFinite(r))return n;const o="number"==typeof r?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...o?{received:o}:{}}),n}}),Pn=i("$ZodNumberFormat",(e,t)=>{Pt.init(e,t),jn.init(e,t)}),Zn=i("$ZodBoolean",(e,t)=>{on.init(e,t),e._zod.pattern=mt,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Boolean(n.value)}catch(e){}const r=n.value;return"boolean"==typeof r||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}}),Rn=i("$ZodBigInt",(e,t)=>{on.init(e,t),e._zod.pattern=ut,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch(e){}return"bigint"==typeof n.value||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),qn=i("$ZodBigIntFormat",(e,t)=>{Zt.init(e,t),Rn.init(e,t)}),Mn=i("$ZodSymbol",(e,t)=>{on.init(e,t),e._zod.parse=(t,n)=>{const i=t.value;return"symbol"==typeof i||t.issues.push({expected:"symbol",code:"invalid_type",input:i,inst:e}),t}}),Ln=i("$ZodUndefined",(e,t)=>{on.init(e,t),e._zod.pattern=ht,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(t,n)=>{const i=t.value;return void 0===i||t.issues.push({expected:"undefined",code:"invalid_type",input:i,inst:e}),t}}),Fn=i("$ZodNull",(e,t)=>{on.init(e,t),e._zod.pattern=ft,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{const i=t.value;return null===i||t.issues.push({expected:"null",code:"invalid_type",input:i,inst:e}),t}}),Vn=i("$ZodAny",(e,t)=>{on.init(e,t),e._zod.parse=e=>e}),Bn=i("$ZodUnknown",(e,t)=>{on.init(e,t),e._zod.parse=e=>e}),Hn=i("$ZodNever",(e,t)=>{on.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)}),Wn=i("$ZodVoid",(e,t)=>{on.init(e,t),e._zod.parse=(t,n)=>{const i=t.value;return void 0===i||t.issues.push({expected:"void",code:"invalid_type",input:i,inst:e}),t}}),Jn=i("$ZodDate",(e,t)=>{on.init(e,t),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=new Date(n.value)}catch(e){}const r=n.value,o=r instanceof Date;return o&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...o?{received:"Invalid Date"}:{},inst:e}),n}});function Gn(e,t,n){e.issues.length&&t.issues.push(...V(n,e.issues)),t.value[n]=e.value}const Kn=i("$ZodArray",(e,t)=>{on.init(e,t),e._zod.parse=(n,i)=>{const r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);const o=[];for(let e=0;e<r.length;e++){const a=r[e],s=t.element._zod.run({value:a,issues:[]},i);s instanceof Promise?o.push(s.then(t=>Gn(t,n,e))):Gn(s,n,e)}return o.length?Promise.all(o).then(()=>n):n}});function Xn(e,t,n,i,r){if(e.issues.length){if(r&&!(n in i))return;t.issues.push(...V(n,e.issues))}void 0===e.value?n in i&&(t.value[n]=void 0):t.value[n]=e.value}function Yn(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const n=N(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Qn(e,t,n,i,r,o){const a=[],s=r.keySet,l=r.catchall._zod,c=l.def.type,u="optional"===l.optout;for(const r in t){if(s.has(r))continue;if("never"===c){a.push(r);continue}const o=l.run({value:t[r],issues:[]},i);o instanceof Promise?e.push(o.then(e=>Xn(e,n,r,t,u))):Xn(o,n,r,t,u)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}const ei=i("$ZodObject",(e,t)=>{on.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!n?.get){const e=t.shape;Object.defineProperty(t,"shape",{get:()=>{const n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}const i=p(()=>Yn(t));v(e._zod,"propValues",()=>{const e=t.shape,n={};for(const t in e){const i=e[t]._zod;if(i.values){n[t]??(n[t]=new Set);for(const e of i.values)n[t].add(e)}}return n});const r=w,o=t.catchall;let a;e._zod.parse=(t,n)=>{a??(a=i.value);const s=t.value;if(!r(s))return t.issues.push({expected:"object",code:"invalid_type",input:s,inst:e}),t;t.value={};const l=[],c=a.shape;for(const e of a.keys){const i=c[e],r="optional"===i._zod.optout,o=i._zod.run({value:s[e],issues:[]},n);o instanceof Promise?l.push(o.then(n=>Xn(n,t,e,s,r))):Xn(o,t,e,s,r)}return o?Qn(l,s,t,n,i.value,e):l.length?Promise.all(l).then(()=>t):t}}),ti=i("$ZodObjectJIT",(e,t)=>{ei.init(e,t);const n=e._zod.parse,i=p(()=>Yn(t));let r;const o=w,a=!s.jitless,l=a&&x.value,c=t.catchall;let u;e._zod.parse=(s,d)=>{u??(u=i.value);const p=s.value;return o(p)?a&&l&&!1===d?.async&&!0!==d.jitless?(r||(r=(e=>{const t=new nn(["shape","payload","ctx"]),n=i.value,r=e=>{const t=$(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");const o=Object.create(null);let a=0;for(const e of n.keys)o[e]="key_"+a++;t.write("const newResult = {};");for(const i of n.keys){const n=o[i],a=$(i),s=e[i],l="optional"===s?._zod?.optout;t.write(`const ${n} = ${r(i)};`),l?t.write(`\n if (${n}.issues.length) {\n if (${a} in input) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${a}, ...iss.path] : [${a}]\n })));\n }\n }\n \n if (${n}.value === undefined) {\n if (${a} in input) {\n newResult[${a}] = undefined;\n }\n } else {\n newResult[${a}] = ${n}.value;\n }\n \n `):t.write(`\n if (${n}.issues.length) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${a}, ...iss.path] : [${a}]\n })));\n }\n \n if (${n}.value === undefined) {\n if (${a} in input) {\n newResult[${a}] = undefined;\n }\n } else {\n newResult[${a}] = ${n}.value;\n }\n \n `)}t.write("payload.value = newResult;"),t.write("return payload;");const s=t.compile();return(t,n)=>s(e,t,n)})(t.shape)),s=r(s,d),c?Qn([],p,s,d,u,e):s):n(s,d):(s.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),s)}});function ni(e,t,n,i){for(const n of e)if(0===n.issues.length)return t.value=n.value,t;const r=e.filter(e=>!F(e));return 1===r.length?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>H(e,i,l())))}),t)}const ii=i("$ZodUnion",(e,t)=>{on.init(e,t),v(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),v(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),v(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),v(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){const e=t.options.map(e=>e._zod.pattern);return new RegExp(`^(${e.map(e=>f(e.source)).join("|")})$`)}});const n=1===t.options.length,i=t.options[0]._zod.run;e._zod.parse=(r,o)=>{if(n)return i(r,o);let a=!1;const s=[];for(const e of t.options){const t=e._zod.run({value:r.value,issues:[]},o);if(t instanceof Promise)s.push(t),a=!0;else{if(0===t.issues.length)return t;s.push(t)}}return a?Promise.all(s).then(t=>ni(t,r,e,o)):ni(s,r,e,o)}});function ri(e,t,n,i){const r=e.filter(e=>0===e.issues.length);return 1===r.length?(t.value=r[0].value,t):(0===r.length?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>H(e,i,l())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t)}const oi=i("$ZodXor",(e,t)=>{ii.init(e,t),t.inclusive=!1;const n=1===t.options.length,i=t.options[0]._zod.run;e._zod.parse=(r,o)=>{if(n)return i(r,o);let a=!1;const s=[];for(const e of t.options){const t=e._zod.run({value:r.value,issues:[]},o);t instanceof Promise?(s.push(t),a=!0):s.push(t)}return a?Promise.all(s).then(t=>ri(t,r,e,o)):ri(s,r,e,o)}}),ai=i("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,ii.init(e,t);const n=e._zod.parse;v(e._zod,"propValues",()=>{const e={};for(const n of t.options){const i=n._zod.propValues;if(!i||0===Object.keys(i).length)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(const[t,n]of Object.entries(i)){e[t]||(e[t]=new Set);for(const i of n)e[t].add(i)}}return e});const i=p(()=>{const e=t.options,n=new Map;for(const i of e){const e=i._zod.propValues?.[t.discriminator];if(!e||0===e.size)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const t of e){if(n.has(t))throw new Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,i)}}return n});e._zod.parse=(r,o)=>{const a=r.value;if(!w(a))return r.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),r;const s=i.value.get(a?.[t.discriminator]);return s?s._zod.run(r,o):t.unionFallback?n(r,o):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:a,path:[t.discriminator],inst:e}),r)}}),si=i("$ZodIntersection",(e,t)=>{on.init(e,t),e._zod.parse=(e,n)=>{const i=e.value,r=t.left._zod.run({value:i,issues:[]},n),o=t.right._zod.run({value:i,issues:[]},n);return r instanceof Promise||o instanceof Promise?Promise.all([r,o]).then(([t,n])=>ci(e,t,n)):ci(e,r,o)}});function li(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e===+t)return{valid:!0,data:e};if(I(e)&&I(t)){const n=Object.keys(t),i=Object.keys(e).filter(e=>-1!==n.indexOf(e)),r={...e,...t};for(const n of i){const i=li(e[n],t[n]);if(!i.valid)return{valid:!1,mergeErrorPath:[n,...i.mergeErrorPath]};r[n]=i.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let i=0;i<e.length;i++){const r=li(e[i],t[i]);if(!r.valid)return{valid:!1,mergeErrorPath:[i,...r.mergeErrorPath]};n.push(r.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function ci(e,t,n){const i=new Map;let r;for(const n of t.issues)if("unrecognized_keys"===n.code){r??(r=n);for(const e of n.keys)i.has(e)||i.set(e,{}),i.get(e).l=!0}else e.issues.push(n);for(const t of n.issues)if("unrecognized_keys"===t.code)for(const e of t.keys)i.has(e)||i.set(e,{}),i.get(e).r=!0;else e.issues.push(t);const o=[...i].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(o.length&&r&&e.issues.push({...r,keys:o}),F(e))return e;const a=li(t.value,n.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}const ui=i("$ZodTuple",(e,t)=>{on.init(e,t);const n=t.items;e._zod.parse=(i,r)=>{const o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];const a=[],s=[...n].reverse().findIndex(e=>"optional"!==e._zod.optin),l=-1===s?0:n.length-s;if(!t.rest){const t=o.length>n.length,r=o.length<l-1;if(t||r)return i.issues.push({...t?{code:"too_big",maximum:n.length,inclusive:!0}:{code:"too_small",minimum:n.length},input:o,inst:e,origin:"array"}),i}let c=-1;for(const e of n){if(c++,c>=o.length&&c>=l)continue;const t=e._zod.run({value:o[c],issues:[]},r);t instanceof Promise?a.push(t.then(e=>di(e,i,c))):di(t,i,c)}if(t.rest){const e=o.slice(n.length);for(const n of e){c++;const e=t.rest._zod.run({value:n,issues:[]},r);e instanceof Promise?a.push(e.then(e=>di(e,i,c))):di(e,i,c)}}return a.length?Promise.all(a).then(()=>i):i}});function di(e,t,n){e.issues.length&&t.issues.push(...V(n,e.issues)),t.value[n]=e.value}const pi=i("$ZodRecord",(e,t)=>{on.init(e,t),e._zod.parse=(n,i)=>{const r=n.value;if(!I(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;const o=[],a=t.keyType._zod.values;if(a){n.value={};const s=new Set;for(const e of a)if("string"==typeof e||"number"==typeof e||"symbol"==typeof e){s.add("number"==typeof e?e.toString():e);const a=t.valueType._zod.run({value:r[e],issues:[]},i);a instanceof Promise?o.push(a.then(t=>{t.issues.length&&n.issues.push(...V(e,t.issues)),n.value[e]=t.value})):(a.issues.length&&n.issues.push(...V(e,a.issues)),n.value[e]=a.value)}let l;for(const e in r)s.has(e)||(l=l??[],l.push(e));l&&l.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:l})}else{n.value={};for(const a of Reflect.ownKeys(r)){if("__proto__"===a)continue;let s=t.keyType._zod.run({value:a,issues:[]},i);if(s instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if("string"==typeof a&&pt.test(a)&&s.issues.length){const e=t.keyType._zod.run({value:Number(a),issues:[]},i);if(e instanceof Promise)throw new Error("Async schemas not supported in object keys currently");0===e.issues.length&&(s=e)}if(s.issues.length){"loose"===t.mode?n.value[a]=r[a]:n.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map(e=>H(e,i,l())),input:a,path:[a],inst:e});continue}const c=t.valueType._zod.run({value:r[a],issues:[]},i);c instanceof Promise?o.push(c.then(e=>{e.issues.length&&n.issues.push(...V(a,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...V(a,c.issues)),n.value[s.value]=c.value)}}return o.length?Promise.all(o).then(()=>n):n}}),mi=i("$ZodMap",(e,t)=>{on.init(e,t),e._zod.parse=(n,i)=>{const r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:e}),n;const o=[];n.value=new Map;for(const[a,s]of r){const l=t.keyType._zod.run({value:a,issues:[]},i),c=t.valueType._zod.run({value:s,issues:[]},i);l instanceof Promise||c instanceof Promise?o.push(Promise.all([l,c]).then(([t,o])=>{fi(t,o,n,a,r,e,i)})):fi(l,c,n,a,r,e,i)}return o.length?Promise.all(o).then(()=>n):n}});function fi(e,t,n,i,r,o,a){e.issues.length&&(E.has(typeof i)?n.issues.push(...V(i,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:o,issues:e.issues.map(e=>H(e,a,l()))})),t.issues.length&&(E.has(typeof i)?n.issues.push(...V(i,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:o,key:i,issues:t.issues.map(e=>H(e,a,l()))})),n.value.set(e.value,t.value)}const hi=i("$ZodSet",(e,t)=>{on.init(e,t),e._zod.parse=(n,i)=>{const r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:e,expected:"set",code:"invalid_type"}),n;const o=[];n.value=new Set;for(const e of r){const r=t.valueType._zod.run({value:e,issues:[]},i);r instanceof Promise?o.push(r.then(e=>gi(e,n))):gi(r,n)}return o.length?Promise.all(o).then(()=>n):n}});function gi(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}const vi=i("$ZodEnum",(e,t)=>{on.init(e,t);const n=c(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(e=>E.has(typeof e)).map(e=>"string"==typeof e?z(e):e.toString()).join("|")})$`),e._zod.parse=(t,r)=>{const o=t.value;return i.has(o)||t.issues.push({code:"invalid_value",values:n,input:o,inst:e}),t}}),bi=i("$ZodLiteral",(e,t)=>{if(on.init(e,t),0===t.values.length)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(e=>"string"==typeof e?z(e):e?z(e.toString()):String(e)).join("|")})$`),e._zod.parse=(i,r)=>{const o=i.value;return n.has(o)||i.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),i}}),yi=i("$ZodFile",(e,t)=>{on.init(e,t),e._zod.parse=(t,n)=>{const i=t.value;return i instanceof File||t.issues.push({expected:"file",code:"invalid_type",input:i,inst:e}),t}}),$i=i("$ZodTransform",(e,t)=>{on.init(e,t),e._zod.parse=(n,i)=>{if("backward"===i.direction)throw new a(e.constructor.name);const r=t.transform(n.value,n);if(i.async){return(r instanceof Promise?r:Promise.resolve(r)).then(e=>(n.value=e,n))}if(r instanceof Promise)throw new o;return n.value=r,n}});function _i(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}const ki=i("$ZodOptional",(e,t)=>{on.init(e,t),e._zod.optin="optional",e._zod.optout="optional",v(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),v(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${f(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if("optional"===t.innerType._zod.optin){const i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(t=>_i(t,e.value)):_i(i,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),wi=i("$ZodExactOptional",(e,t)=>{ki.init(e,t),v(e._zod,"values",()=>t.innerType._zod.values),v(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),xi=i("$ZodNullable",(e,t)=>{on.init(e,t),v(e._zod,"optin",()=>t.innerType._zod.optin),v(e._zod,"optout",()=>t.innerType._zod.optout),v(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${f(e.source)}|null)$`):void 0}),v(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)}),Ii=i("$ZodDefault",(e,t)=>{on.init(e,t),e._zod.optin="optional",v(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;const i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>Si(e,t)):Si(i,t)}});function Si(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const Ei=i("$ZodPrefault",(e,t)=>{on.init(e,t),e._zod.optin="optional",v(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>("backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Ti=i("$ZodNonOptional",(e,t)=>{on.init(e,t),v(e._zod,"values",()=>{const e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(n,i)=>{const r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(t=>zi(t,e)):zi(r,e)}});function zi(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Ci=i("$ZodSuccess",(e,t)=>{on.init(e,t),e._zod.parse=(e,n)=>{if("backward"===n.direction)throw new a("ZodSuccess");const i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(t=>(e.value=0===t.issues.length,e)):(e.value=0===i.issues.length,e)}}),Oi=i("$ZodCatch",(e,t)=>{on.init(e,t),v(e._zod,"optin",()=>t.innerType._zod.optin),v(e._zod,"optout",()=>t.innerType._zod.optout),v(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(i=>(e.value=i.value,i.issues.length&&(e.value=t.catchValue({...e,error:{issues:i.issues.map(e=>H(e,n,l()))},input:e.value}),e.issues=[]),e)):(e.value=i.value,i.issues.length&&(e.value=t.catchValue({...e,error:{issues:i.issues.map(e=>H(e,n,l()))},input:e.value}),e.issues=[]),e)}}),Ui=i("$ZodNaN",(e,t)=>{on.init(e,t),e._zod.parse=(t,n)=>("number"==typeof t.value&&Number.isNaN(t.value)||t.issues.push({input:t.value,inst:e,expected:"nan",code:"invalid_type"}),t)}),Ni=i("$ZodPipe",(e,t)=>{on.init(e,t),v(e._zod,"values",()=>t.in._zod.values),v(e._zod,"optin",()=>t.in._zod.optin),v(e._zod,"optout",()=>t.out._zod.optout),v(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("backward"===n.direction){const i=t.out._zod.run(e,n);return i instanceof Promise?i.then(e=>Di(e,t.in,n)):Di(i,t.in,n)}const i=t.in._zod.run(e,n);return i instanceof Promise?i.then(e=>Di(e,t.out,n)):Di(i,t.out,n)}});function Di(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const Ai=i("$ZodCodec",(e,t)=>{on.init(e,t),v(e._zod,"values",()=>t.in._zod.values),v(e._zod,"optin",()=>t.in._zod.optin),v(e._zod,"optout",()=>t.out._zod.optout),v(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("forward"===(n.direction||"forward")){const i=t.in._zod.run(e,n);return i instanceof Promise?i.then(e=>ji(e,t,n)):ji(i,t,n)}{const i=t.out._zod.run(e,n);return i instanceof Promise?i.then(e=>ji(e,t,n)):ji(i,t,n)}}});function ji(e,t,n){if(e.issues.length)return e.aborted=!0,e;if("forward"===(n.direction||"forward")){const i=t.transform(e.value,e);return i instanceof Promise?i.then(i=>Pi(e,i,t.out,n)):Pi(e,i,t.out,n)}{const i=t.reverseTransform(e.value,e);return i instanceof Promise?i.then(i=>Pi(e,i,t.in,n)):Pi(e,i,t.in,n)}}function Pi(e,t,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},i)}const Zi=i("$ZodReadonly",(e,t)=>{on.init(e,t),v(e._zod,"propValues",()=>t.innerType._zod.propValues),v(e._zod,"values",()=>t.innerType._zod.values),v(e._zod,"optin",()=>t.innerType?._zod?.optin),v(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(Ri):Ri(i)}});function Ri(e){return e.value=Object.freeze(e.value),e}const qi=i("$ZodTemplateLiteral",(e,t)=>{on.init(e,t);const n=[];for(const e of t.parts)if("object"==typeof e&&null!==e){if(!e._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);const t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw new Error(`Invalid template literal part: ${e._zod.traits}`);const i=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;n.push(t.slice(i,r))}else{if(null!==e&&!T.has(typeof e))throw new Error(`Invalid template literal part: ${e}`);n.push(z(`${e}`))}e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(n,i)=>"string"!=typeof n.value?(n.issues.push({input:n.value,inst:e,expected:"string",code:"invalid_type"}),n):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),n)}),Mi=i("$ZodFunction",(e,t)=>(on.init(e,t),e._def=t,e._zod.def=t,e.implement=t=>{if("function"!=typeof t)throw new Error("implement() must be called with a function");return function(...n){const i=e._def.input?ce(e._def.input,n):n,r=Reflect.apply(t,this,i);return e._def.output?ce(e._def.output,r):r}},e.implementAsync=t=>{if("function"!=typeof t)throw new Error("implementAsync() must be called with a function");return async function(...n){const i=e._def.input?await de(e._def.input,n):n,r=await Reflect.apply(t,this,i);return e._def.output?await de(e._def.output,r):r}},e._zod.parse=(t,n)=>{if("function"!=typeof t.value)return t.issues.push({code:"invalid_type",expected:"function",input:t.value,inst:e}),t;const i=e._def.output&&"promise"===e._def.output._zod.def.type;return t.value=i?e.implementAsync(t.value):e.implement(t.value),t},e.input=(...t)=>{const n=e.constructor;return Array.isArray(t[0])?new n({type:"function",input:new ui({type:"tuple",items:t[0],rest:t[1]}),output:e._def.output}):new n({type:"function",input:t[0],output:e._def.output})},e.output=t=>new(0,e.constructor)({type:"function",input:e._def.input,output:t}),e)),Li=i("$ZodPromise",(e,t)=>{on.init(e,t),e._zod.parse=(e,n)=>Promise.resolve(e.value).then(e=>t.innerType._zod.run({value:e,issues:[]},n))}),Fi=i("$ZodLazy",(e,t)=>{on.init(e,t),v(e._zod,"innerType",()=>t.getter()),v(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),v(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),v(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),v(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),Vi=i("$ZodCustom",(e,t)=>{Ut.init(e,t),on.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{const i=n.value,r=t.fn(i);if(r instanceof Promise)return r.then(t=>Bi(t,n,i,e));Bi(r,n,i,e)}});function Bi(e,t,n,i){if(!e){const e={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(e.params=i._zod.def.params),t.issues.push(K(e))}}const Hi=()=>{const e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function t(t){return e[t]??null}const n={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",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`مدخلات غير مقبولة: يفترض إدخال instanceof ${e.expected}، ولكن تم إدخال ${r}`:`مدخلات غير مقبولة: يفترض إدخال ${t}، ولكن تم إدخال ${r}`}case"invalid_value":return 1===e.values.length?`مدخلات غير مقبولة: يفترض إدخال ${U(e.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?` أكبر من اللازم: يفترض أن تكون ${e.origin??"القيمة"} ${n} ${e.maximum.toString()} ${i.unit??"عنصر"}`:`أكبر من اللازم: يفترض أن تكون ${e.origin??"القيمة"} ${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()} ${i.unit}`:`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`نَص غير مقبول: يجب أن يبدأ بـ "${e.prefix}"`:"ends_with"===t.format?`نَص غير مقبول: يجب أن ينتهي بـ "${t.suffix}"`:"includes"===t.format?`نَص غير مقبول: يجب أن يتضمَّن "${t.includes}"`:"regex"===t.format?`نَص غير مقبول: يجب أن يطابق النمط ${t.pattern}`:`${n[t.format]??e.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${e.divisor}`;case"unrecognized_keys":return`معرف${e.keys.length>1?"ات":""} غريب${e.keys.length>1?"ة":""}: ${u(e.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${e.origin}`;case"invalid_union":default:return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${e.origin}`}}};const Wi=()=>{const e={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"}};function t(t){return e[t]??null}const n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Yanlış dəyər: gözlənilən instanceof ${e.expected}, daxil olan ${r}`:`Yanlış dəyər: gözlənilən ${t}, daxil olan ${r}`}case"invalid_value":return 1===e.values.length?`Yanlış dəyər: gözlənilən ${U(e.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Çox böyük: gözlənilən ${e.origin??"dəyər"} ${n}${e.maximum.toString()} ${i.unit??"element"}`:`Çox böyük: gözlənilən ${e.origin??"dəyər"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()} ${i.unit}`:`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Yanlış mətn: "${t.prefix}" ilə başlamalıdır`:"ends_with"===t.format?`Yanlış mətn: "${t.suffix}" ilə bitməlidir`:"includes"===t.format?`Yanlış mətn: "${t.includes}" daxil olmalıdır`:"regex"===t.format?`Yanlış mətn: ${t.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${n[t.format]??e.format}`}case"not_multiple_of":return`Yanlış ədəd: ${e.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${e.keys.length>1?"lar":""}: ${u(e.keys,", ")}`;case"invalid_key":return`${e.origin} daxilində yanlış açar`;case"invalid_union":default:return"Yanlış dəyər";case"invalid_element":return`${e.origin} daxilində yanlış dəyər`}}};function Ji(e,t,n,i){const r=Math.abs(e),o=r%10,a=r%100;return a>=11&&a<=19?i:1===o?t:o>=2&&o<=4?n:i}const Gi=()=>{const e={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function t(t){return e[t]??null}const n={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 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"},i={nan:"NaN",number:"лік",array:"масіў"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Няправільны ўвод: чакаўся instanceof ${e.expected}, атрымана ${r}`:`Няправільны ўвод: чакаўся ${t}, атрымана ${r}`}case"invalid_value":return 1===e.values.length?`Няправільны ўвод: чакалася ${U(e.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);if(i){const t=Ji(Number(e.maximum),i.unit.one,i.unit.few,i.unit.many);return`Занадта вялікі: чакалася, што ${e.origin??"значэнне"} павінна ${i.verb} ${n}${e.maximum.toString()} ${t}`}return`Занадта вялікі: чакалася, што ${e.origin??"значэнне"} павінна быць ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);if(i){const t=Ji(Number(e.minimum),i.unit.one,i.unit.few,i.unit.many);return`Занадта малы: чакалася, што ${e.origin} павінна ${i.verb} ${n}${e.minimum.toString()} ${t}`}return`Занадта малы: чакалася, што ${e.origin} павінна быць ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Няправільны радок: павінен пачынацца з "${t.prefix}"`:"ends_with"===t.format?`Няправільны радок: павінен заканчвацца на "${t.suffix}"`:"includes"===t.format?`Няправільны радок: павінен змяшчаць "${t.includes}"`:"regex"===t.format?`Няправільны радок: павінен адпавядаць шаблону ${t.pattern}`:`Няправільны ${n[t.format]??e.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${e.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${e.keys.length>1?"ключы":"ключ"}: ${u(e.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${e.origin}`;case"invalid_union":default:return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${e.origin}`}}};const Ki=()=>{const e={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function t(t){return e[t]??null}const n={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 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",jwt:"JWT",template_literal:"вход"},i={nan:"NaN",number:"число",array:"масив"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Невалиден вход: очакван instanceof ${e.expected}, получен ${r}`:`Невалиден вход: очакван ${t}, получен ${r}`}case"invalid_value":return 1===e.values.length?`Невалиден вход: очакван ${U(e.values[0])}`:`Невалидна опция: очаквано едно от ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Твърде голямо: очаква се ${e.origin??"стойност"} да съдържа ${n}${e.maximum.toString()} ${i.unit??"елемента"}`:`Твърде голямо: очаква се ${e.origin??"стойност"} да бъде ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Твърде малко: очаква се ${e.origin} да съдържа ${n}${e.minimum.toString()} ${i.unit}`:`Твърде малко: очаква се ${e.origin} да бъде ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;if("starts_with"===t.format)return`Невалиден низ: трябва да започва с "${t.prefix}"`;if("ends_with"===t.format)return`Невалиден низ: трябва да завършва с "${t.suffix}"`;if("includes"===t.format)return`Невалиден низ: трябва да включва "${t.includes}"`;if("regex"===t.format)return`Невалиден низ: трябва да съвпада с ${t.pattern}`;let i="Невалиден";return"emoji"===t.format&&(i="Невалидно"),"datetime"===t.format&&(i="Невалидно"),"date"===t.format&&(i="Невалидна"),"time"===t.format&&(i="Невалидно"),"duration"===t.format&&(i="Невалидна"),`${i} ${n[t.format]??e.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${e.divisor}`;case"unrecognized_keys":return`Неразпознат${e.keys.length>1?"и":""} ключ${e.keys.length>1?"ове":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${e.origin}`;case"invalid_union":default:return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${e.origin}`}}};const Xi=()=>{const e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(t){return e[t]??null}const n={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",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",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Tipus invàlid: s'esperava instanceof ${e.expected}, s'ha rebut ${r}`:`Tipus invàlid: s'esperava ${t}, s'ha rebut ${r}`}case"invalid_value":return 1===e.values.length?`Valor invàlid: s'esperava ${U(e.values[0])}`:`Opció invàlida: s'esperava una de ${u(e.values," o ")}`;case"too_big":{const n=e.inclusive?"com a màxim":"menys de",i=t(e.origin);return i?`Massa gran: s'esperava que ${e.origin??"el valor"} contingués ${n} ${e.maximum.toString()} ${i.unit??"elements"}`:`Massa gran: s'esperava que ${e.origin??"el valor"} fos ${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?"com a mínim":"més de",i=t(e.origin);return i?`Massa petit: s'esperava que ${e.origin} contingués ${n} ${e.minimum.toString()} ${i.unit}`:`Massa petit: s'esperava que ${e.origin} fos ${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Format invàlid: ha de començar amb "${t.prefix}"`:"ends_with"===t.format?`Format invàlid: ha d'acabar amb "${t.suffix}"`:"includes"===t.format?`Format invàlid: ha d'incloure "${t.includes}"`:"regex"===t.format?`Format invàlid: ha de coincidir amb el patró ${t.pattern}`:`Format invàlid per a ${n[t.format]??e.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${e.divisor}`;case"unrecognized_keys":return`Clau${e.keys.length>1?"s":""} no reconeguda${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${e.origin}`;case"invalid_union":default:return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${e.origin}`}}};const Yi=()=>{const e={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function t(t){return e[t]??null}const n={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",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",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Neplatný vstup: očekáváno instanceof ${e.expected}, obdrženo ${r}`:`Neplatný vstup: očekáváno ${t}, obdrženo ${r}`}case"invalid_value":return 1===e.values.length?`Neplatný vstup: očekáváno ${U(e.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Hodnota je příliš velká: ${e.origin??"hodnota"} musí mít ${n}${e.maximum.toString()} ${i.unit??"prvků"}`:`Hodnota je příliš velká: ${e.origin??"hodnota"} musí být ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Hodnota je příliš malá: ${e.origin??"hodnota"} musí mít ${n}${e.minimum.toString()} ${i.unit??"prvků"}`:`Hodnota je příliš malá: ${e.origin??"hodnota"} musí být ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Neplatný řetězec: musí začínat na "${t.prefix}"`:"ends_with"===t.format?`Neplatný řetězec: musí končit na "${t.suffix}"`:"includes"===t.format?`Neplatný řetězec: musí obsahovat "${t.includes}"`:"regex"===t.format?`Neplatný řetězec: musí odpovídat vzoru ${t.pattern}`:`Neplatný formát ${n[t.format]??e.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${e.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${u(e.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${e.origin}`;case"invalid_union":default:return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${e.origin}`}}};const Qi=()=>{const e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(t){return e[t]??null}const n={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-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldigt input: forventede instanceof ${e.expected}, fik ${r}`:`Ugyldigt input: forventede ${t}, fik ${r}`}case"invalid_value":return 1===e.values.length?`Ugyldig værdi: forventede ${U(e.values[0])}`:`Ugyldigt valg: forventede en af følgende ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",r=t(e.origin),o=i[e.origin]??e.origin;return r?`For stor: forventede ${o??"value"} ${r.verb} ${n} ${e.maximum.toString()} ${r.unit??"elementer"}`:`For stor: forventede ${o??"value"} havde ${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",r=t(e.origin),o=i[e.origin]??e.origin;return r?`For lille: forventede ${o} ${r.verb} ${n} ${e.minimum.toString()} ${r.unit}`:`For lille: forventede ${o} havde ${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ugyldig streng: skal starte med "${t.prefix}"`:"ends_with"===t.format?`Ugyldig streng: skal ende med "${t.suffix}"`:"includes"===t.format?`Ugyldig streng: skal indeholde "${t.includes}"`:"regex"===t.format?`Ugyldig streng: skal matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${u(e.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${e.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${e.origin}`;default:return"Ugyldigt input"}}};const er=()=>{const e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(t){return e[t]??null}const n={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",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Ungültige Eingabe: erwartet instanceof ${e.expected}, erhalten ${r}`:`Ungültige Eingabe: erwartet ${t}, erhalten ${r}`}case"invalid_value":return 1===e.values.length?`Ungültige Eingabe: erwartet ${U(e.values[0])}`:`Ungültige Option: erwartet eine von ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Zu groß: erwartet, dass ${e.origin??"Wert"} ${n}${e.maximum.toString()} ${i.unit??"Elemente"} hat`:`Zu groß: erwartet, dass ${e.origin??"Wert"} ${n}${e.maximum.toString()} ist`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ${i.unit} hat`:`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ist`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ungültiger String: muss mit "${t.prefix}" beginnen`:"ends_with"===t.format?`Ungültiger String: muss mit "${t.suffix}" enden`:"includes"===t.format?`Ungültiger String: muss "${t.includes}" enthalten`:"regex"===t.format?`Ungültiger String: muss dem Muster ${t.pattern} entsprechen`:`Ungültig: ${n[t.format]??e.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${e.divisor} sein`;case"unrecognized_keys":return`${e.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${u(e.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${e.origin}`;case"invalid_union":default:return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${e.origin}`}}};const tr=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(t){return e[t]??null}const n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input);return`Invalid input: expected ${t}, received ${i[n]??n}`}case"invalid_value":return 1===e.values.length?`Invalid input: expected ${U(e.values[0])}`:`Invalid option: expected one of ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Too big: expected ${e.origin??"value"} to have ${n}${e.maximum.toString()} ${i.unit??"elements"}`:`Too big: expected ${e.origin??"value"} to be ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${i.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Invalid string: must start with "${t.prefix}"`:"ends_with"===t.format?`Invalid string: must end with "${t.suffix}"`:"includes"===t.format?`Invalid string: must include "${t.includes}"`:"regex"===t.format?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${e.divisor}`;case"unrecognized_keys":return`Unrecognized key${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Invalid key in ${e.origin}`;case"invalid_union":default:return"Invalid input";case"invalid_element":return`Invalid value in ${e.origin}`}}};function nr(){return{localeError:tr()}}const ir=()=>{const e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(t){return e[t]??null}const n={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",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",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Nevalida enigo: atendiĝis instanceof ${e.expected}, riceviĝis ${r}`:`Nevalida enigo: atendiĝis ${t}, riceviĝis ${r}`}case"invalid_value":return 1===e.values.length?`Nevalida enigo: atendiĝis ${U(e.values[0])}`:`Nevalida opcio: atendiĝis unu el ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Tro granda: atendiĝis ke ${e.origin??"valoro"} havu ${n}${e.maximum.toString()} ${i.unit??"elementojn"}`:`Tro granda: atendiĝis ke ${e.origin??"valoro"} havu ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Tro malgranda: atendiĝis ke ${e.origin} havu ${n}${e.minimum.toString()} ${i.unit}`:`Tro malgranda: atendiĝis ke ${e.origin} estu ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Nevalida karaktraro: devas komenciĝi per "${t.prefix}"`:"ends_with"===t.format?`Nevalida karaktraro: devas finiĝi per "${t.suffix}"`:"includes"===t.format?`Nevalida karaktraro: devas inkluzivi "${t.includes}"`:"regex"===t.format?`Nevalida karaktraro: devas kongrui kun la modelo ${t.pattern}`:`Nevalida ${n[t.format]??e.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${e.divisor}`;case"unrecognized_keys":return`Nekonata${e.keys.length>1?"j":""} ŝlosilo${e.keys.length>1?"j":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${e.origin}`;case"invalid_union":default:return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${e.origin}`}}};const rr=()=>{const e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(t){return e[t]??null}const n={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",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",jwt:"JWT",template_literal:"entrada"},i={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 e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Entrada inválida: se esperaba instanceof ${e.expected}, recibido ${r}`:`Entrada inválida: se esperaba ${t}, recibido ${r}`}case"invalid_value":return 1===e.values.length?`Entrada inválida: se esperaba ${U(e.values[0])}`:`Opción inválida: se esperaba una de ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",r=t(e.origin),o=i[e.origin]??e.origin;return r?`Demasiado grande: se esperaba que ${o??"valor"} tuviera ${n}${e.maximum.toString()} ${r.unit??"elementos"}`:`Demasiado grande: se esperaba que ${o??"valor"} fuera ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",r=t(e.origin),o=i[e.origin]??e.origin;return r?`Demasiado pequeño: se esperaba que ${o} tuviera ${n}${e.minimum.toString()} ${r.unit}`:`Demasiado pequeño: se esperaba que ${o} fuera ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Cadena inválida: debe comenzar con "${t.prefix}"`:"ends_with"===t.format?`Cadena inválida: debe terminar en "${t.suffix}"`:"includes"===t.format?`Cadena inválida: debe incluir "${t.includes}"`:"regex"===t.format?`Cadena inválida: debe coincidir con el patrón ${t.pattern}`:`Inválido ${n[t.format]??e.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${e.divisor}`;case"unrecognized_keys":return`Llave${e.keys.length>1?"s":""} desconocida${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Llave inválida en ${i[e.origin]??e.origin}`;case"invalid_union":default:return"Entrada inválida";case"invalid_element":return`Valor inválido en ${i[e.origin]??e.origin}`}}};const or=()=>{const e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function t(t){return e[t]??null}const n={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 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"},i={nan:"NaN",number:"عدد",array:"آرایه"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`ورودی نامعتبر: می‌بایست instanceof ${e.expected} می‌بود، ${r} دریافت شد`:`ورودی نامعتبر: می‌بایست ${t} می‌بود، ${r} دریافت شد`}case"invalid_value":return 1===e.values.length?`ورودی نامعتبر: می‌بایست ${U(e.values[0])} می‌بود`:`گزینه نامعتبر: می‌بایست یکی از ${u(e.values,"|")} می‌بود`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`خیلی بزرگ: ${e.origin??"مقدار"} باید ${n}${e.maximum.toString()} ${i.unit??"عنصر"} باشد`:`خیلی بزرگ: ${e.origin??"مقدار"} باید ${n}${e.maximum.toString()} باشد`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} ${i.unit} باشد`:`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} باشد`}case"invalid_format":{const t=e;return"starts_with"===t.format?`رشته نامعتبر: باید با "${t.prefix}" شروع شود`:"ends_with"===t.format?`رشته نامعتبر: باید با "${t.suffix}" تمام شود`:"includes"===t.format?`رشته نامعتبر: باید شامل "${t.includes}" باشد`:"regex"===t.format?`رشته نامعتبر: باید با الگوی ${t.pattern} مطابقت داشته باشد`:`${n[t.format]??e.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${e.divisor} باشد`;case"unrecognized_keys":return`کلید${e.keys.length>1?"های":""} ناشناس: ${u(e.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${e.origin}`;case"invalid_union":default:return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${e.origin}`}}};const ar=()=>{const e={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function t(t){return e[t]??null}const n={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",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Virheellinen tyyppi: odotettiin instanceof ${e.expected}, oli ${r}`:`Virheellinen tyyppi: odotettiin ${t}, oli ${r}`}case"invalid_value":return 1===e.values.length?`Virheellinen syöte: täytyy olla ${U(e.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Liian suuri: ${i.subject} täytyy olla ${n}${e.maximum.toString()} ${i.unit}`.trim():`Liian suuri: arvon täytyy olla ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Liian pieni: ${i.subject} täytyy olla ${n}${e.minimum.toString()} ${i.unit}`.trim():`Liian pieni: arvon täytyy olla ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Virheellinen syöte: täytyy alkaa "${t.prefix}"`:"ends_with"===t.format?`Virheellinen syöte: täytyy loppua "${t.suffix}"`:"includes"===t.format?`Virheellinen syöte: täytyy sisältää "${t.includes}"`:"regex"===t.format?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${t.pattern}`:`Virheellinen ${n[t.format]??e.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${e.divisor} monikerta`;case"unrecognized_keys":return`${e.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${u(e.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"}}};const sr=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(t){return e[t]??null}const n={regex:"entrée",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",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",jwt:"JWT",template_literal:"entrée"},i={nan:"NaN",number:"nombre",array:"tableau"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : instanceof ${e.expected} attendu, ${r} reçu`:`Entrée invalide : ${t} attendu, ${r} reçu`}case"invalid_value":return 1===e.values.length?`Entrée invalide : ${U(e.values[0])} attendu`:`Option invalide : une valeur parmi ${u(e.values,"|")} attendue`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Trop grand : ${e.origin??"valeur"} doit ${i.verb} ${n}${e.maximum.toString()} ${i.unit??"élément(s)"}`:`Trop grand : ${e.origin??"valeur"} doit être ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Trop petit : ${e.origin} doit ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`Trop petit : ${e.origin} doit être ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Chaîne invalide : doit commencer par "${t.prefix}"`:"ends_with"===t.format?`Chaîne invalide : doit se terminer par "${t.suffix}"`:"includes"===t.format?`Chaîne invalide : doit inclure "${t.includes}"`:"regex"===t.format?`Chaîne invalide : doit correspondre au modèle ${t.pattern}`:`${n[t.format]??e.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${e.divisor}`;case"unrecognized_keys":return`Clé${e.keys.length>1?"s":""} non reconnue${e.keys.length>1?"s":""} : ${u(e.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${e.origin}`;case"invalid_union":default:return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${e.origin}`}}};const lr=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(t){return e[t]??null}const n={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",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",jwt:"JWT",template_literal:"entrée"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : attendu instanceof ${e.expected}, reçu ${r}`:`Entrée invalide : attendu ${t}, reçu ${r}`}case"invalid_value":return 1===e.values.length?`Entrée invalide : attendu ${U(e.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"≤":"<",i=t(e.origin);return i?`Trop grand : attendu que ${e.origin??"la valeur"} ait ${n}${e.maximum.toString()} ${i.unit}`:`Trop grand : attendu que ${e.origin??"la valeur"} soit ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?"≥":">",i=t(e.origin);return i?`Trop petit : attendu que ${e.origin} ait ${n}${e.minimum.toString()} ${i.unit}`:`Trop petit : attendu que ${e.origin} soit ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Chaîne invalide : doit commencer par "${t.prefix}"`:"ends_with"===t.format?`Chaîne invalide : doit se terminer par "${t.suffix}"`:"includes"===t.format?`Chaîne invalide : doit inclure "${t.includes}"`:"regex"===t.format?`Chaîne invalide : doit correspondre au motif ${t.pattern}`:`${n[t.format]??e.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${e.divisor}`;case"unrecognized_keys":return`Clé${e.keys.length>1?"s":""} non reconnue${e.keys.length>1?"s":""} : ${u(e.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${e.origin}`;case"invalid_union":default:return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${e.origin}`}}};const cr=()=>{const e={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"}},t={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},n=t=>t?e[t]:void 0,i=t=>{const i=n(t);return i?i.label:t??e.unknown.label},r=e=>`ה${i(e)}`,o=e=>{const t=n(e);return"f"===(t?.gender??"m")?"צריכה להיות":"צריך להיות"},a=e=>e?t[e]??null:null,s={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",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"},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"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}},l={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{const n=t.expected,r=l[n??""]??i(n),o=G(t.input),a=l[o]??e[o]?.label??o;return/^[A-Z]/.test(t.expected)?`קלט לא תקין: צריך להיות instanceof ${t.expected}, התקבל ${a}`:`קלט לא תקין: צריך להיות ${r}, התקבל ${a}`}case"invalid_value":{if(1===t.values.length)return`ערך לא תקין: הערך חייב להיות ${U(t.values[0])}`;const e=t.values.map(e=>U(e));if(2===t.values.length)return`ערך לא תקין: האפשרויות המתאימות הן ${e[0]} או ${e[1]}`;const n=e[e.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${e.slice(0,-1).join(", ")} או ${n}`}case"too_big":{const e=a(t.origin),n=r(t.origin??"value");if("string"===t.origin)return`${e?.longLabel??"ארוך"} מדי: ${n} צריכה להכיל ${t.maximum.toString()} ${e?.unit??""} ${t.inclusive?"או פחות":"לכל היותר"}`.trim();if("number"===t.origin){return`גדול מדי: ${n} צריך להיות ${t.inclusive?`קטן או שווה ל-${t.maximum}`:`קטן מ-${t.maximum}`}`}if("array"===t.origin||"set"===t.origin){return`גדול מדי: ${n} ${"set"===t.origin?"צריכה":"צריך"} להכיל ${t.inclusive?`${t.maximum} ${e?.unit??""} או פחות`:`פחות מ-${t.maximum} ${e?.unit??""}`}`.trim()}const i=t.inclusive?"<=":"<",s=o(t.origin??"value");return e?.unit?`${e.longLabel} מדי: ${n} ${s} ${i}${t.maximum.toString()} ${e.unit}`:`${e?.longLabel??"גדול"} מדי: ${n} ${s} ${i}${t.maximum.toString()}`}case"too_small":{const e=a(t.origin),n=r(t.origin??"value");if("string"===t.origin)return`${e?.shortLabel??"קצר"} מדי: ${n} צריכה להכיל ${t.minimum.toString()} ${e?.unit??""} ${t.inclusive?"או יותר":"לפחות"}`.trim();if("number"===t.origin){return`קטן מדי: ${n} צריך להיות ${t.inclusive?`גדול או שווה ל-${t.minimum}`:`גדול מ-${t.minimum}`}`}if("array"===t.origin||"set"===t.origin){const i="set"===t.origin?"צריכה":"צריך";if(1===t.minimum&&t.inclusive){return`קטן מדי: ${n} ${i} להכיל ${t.origin,"לפחות פריט אחד"}`}return`קטן מדי: ${n} ${i} להכיל ${t.inclusive?`${t.minimum} ${e?.unit??""} או יותר`:`יותר מ-${t.minimum} ${e?.unit??""}`}`.trim()}const i=t.inclusive?">=":">",s=o(t.origin??"value");return e?.unit?`${e.shortLabel} מדי: ${n} ${s} ${i}${t.minimum.toString()} ${e.unit}`:`${e?.shortLabel??"קטן"} מדי: ${n} ${s} ${i}${t.minimum.toString()}`}case"invalid_format":{const e=t;if("starts_with"===e.format)return`המחרוזת חייבת להתחיל ב "${e.prefix}"`;if("ends_with"===e.format)return`המחרוזת חייבת להסתיים ב "${e.suffix}"`;if("includes"===e.format)return`המחרוזת חייבת לכלול "${e.includes}"`;if("regex"===e.format)return`המחרוזת חייבת להתאים לתבנית ${e.pattern}`;const n=s[e.format];return`${n?.label??e.format} לא ${"f"===(n?.gender??"m")?"תקינה":"תקין"}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${t.divisor}`;case"unrecognized_keys":return`מפתח${t.keys.length>1?"ות":""} לא מזוה${t.keys.length>1?"ים":"ה"}: ${u(t.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":default:return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${r(t.origin??"array")}`}}};const ur=()=>{const e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(t){return e[t]??null}const n={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",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",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"szám",array:"tömb"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Érvénytelen bemenet: a várt érték instanceof ${e.expected}, a kapott érték ${r}`:`Érvénytelen bemenet: a várt érték ${t}, a kapott érték ${r}`}case"invalid_value":return 1===e.values.length?`Érvénytelen bemenet: a várt érték ${U(e.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Túl nagy: ${e.origin??"érték"} mérete túl nagy ${n}${e.maximum.toString()} ${i.unit??"elem"}`:`Túl nagy: a bemeneti érték ${e.origin??"érték"} túl nagy: ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Túl kicsi: a bemeneti érték ${e.origin} mérete túl kicsi ${n}${e.minimum.toString()} ${i.unit}`:`Túl kicsi: a bemeneti érték ${e.origin} túl kicsi ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Érvénytelen string: "${t.prefix}" értékkel kell kezdődnie`:"ends_with"===t.format?`Érvénytelen string: "${t.suffix}" értékkel kell végződnie`:"includes"===t.format?`Érvénytelen string: "${t.includes}" értéket kell tartalmaznia`:"regex"===t.format?`Érvénytelen string: ${t.pattern} mintának kell megfelelnie`:`Érvénytelen ${n[t.format]??e.format}`}case"not_multiple_of":return`Érvénytelen szám: ${e.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${e.origin}`;case"invalid_union":default:return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${e.origin}`}}};function dr(e,t,n){return 1===Math.abs(e)?t:n}function pr(e){if(!e)return"";const t=e[e.length-1];return e+(["ա","ե","ը","ի","ո","ու","օ"].includes(t)?"ն":"ը")}const mr=()=>{const e={string:{unit:{one:"նշան",many:"նշաններ"},verb:"ունենալ"},file:{unit:{one:"բայթ",many:"բայթեր"},verb:"ունենալ"},array:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},set:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"}};function t(t){return e[t]??null}const n={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 հասցե",cidrv4:"IPv4 միջակայք",cidrv6:"IPv6 միջակայք",base64:"base64 ձևաչափով տող",base64url:"base64url ձևաչափով տող",json_string:"JSON տող",e164:"E.164 համար",jwt:"JWT",template_literal:"մուտք"},i={nan:"NaN",number:"թիվ",array:"զանգված"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Սխալ մուտքագրում․ սպասվում էր instanceof ${e.expected}, ստացվել է ${r}`:`Սխալ մուտքագրում․ սպասվում էր ${t}, ստացվել է ${r}`}case"invalid_value":return 1===e.values.length?`Սխալ մուտքագրում․ սպասվում էր ${U(e.values[1])}`:`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);if(i){const t=dr(Number(e.maximum),i.unit.one,i.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${pr(e.origin??"արժեք")} կունենա ${n}${e.maximum.toString()} ${t}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${pr(e.origin??"արժեք")} լինի ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);if(i){const t=dr(Number(e.minimum),i.unit.one,i.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${pr(e.origin)} կունենա ${n}${e.minimum.toString()} ${t}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${pr(e.origin)} լինի ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Սխալ տող․ պետք է սկսվի "${t.prefix}"-ով`:"ends_with"===t.format?`Սխալ տող․ պետք է ավարտվի "${t.suffix}"-ով`:"includes"===t.format?`Սխալ տող․ պետք է պարունակի "${t.includes}"`:"regex"===t.format?`Սխալ տող․ պետք է համապատասխանի ${t.pattern} ձևաչափին`:`Սխալ ${n[t.format]??e.format}`}case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${e.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${e.keys.length>1?"ներ":""}. ${u(e.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${pr(e.origin)}-ում`;case"invalid_union":default:return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${pr(e.origin)}-ում`}}};const fr=()=>{const e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(t){return e[t]??null}const n={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",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",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak valid: diharapkan instanceof ${e.expected}, diterima ${r}`:`Input tidak valid: diharapkan ${t}, diterima ${r}`}case"invalid_value":return 1===e.values.length?`Input tidak valid: diharapkan ${U(e.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Terlalu besar: diharapkan ${e.origin??"value"} memiliki ${n}${e.maximum.toString()} ${i.unit??"elemen"}`:`Terlalu besar: diharapkan ${e.origin??"value"} menjadi ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Terlalu kecil: diharapkan ${e.origin} memiliki ${n}${e.minimum.toString()} ${i.unit}`:`Terlalu kecil: diharapkan ${e.origin} menjadi ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`String tidak valid: harus dimulai dengan "${t.prefix}"`:"ends_with"===t.format?`String tidak valid: harus berakhir dengan "${t.suffix}"`:"includes"===t.format?`String tidak valid: harus menyertakan "${t.includes}"`:"regex"===t.format?`String tidak valid: harus sesuai pola ${t.pattern}`:`${n[t.format]??e.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${e.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${e.origin}`;case"invalid_union":default:return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${e.origin}`}}};const hr=()=>{const e={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"}};function t(t){return e[t]??null}const n={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",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"númer",array:"fylki"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Rangt gildi: Þú slóst inn ${r} þar sem á að vera instanceof ${e.expected}`:`Rangt gildi: Þú slóst inn ${r} þar sem á að vera ${t}`}case"invalid_value":return 1===e.values.length?`Rangt gildi: gert ráð fyrir ${U(e.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Of stórt: gert er ráð fyrir að ${e.origin??"gildi"} hafi ${n}${e.maximum.toString()} ${i.unit??"hluti"}`:`Of stórt: gert er ráð fyrir að ${e.origin??"gildi"} sé ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Of lítið: gert er ráð fyrir að ${e.origin} hafi ${n}${e.minimum.toString()} ${i.unit}`:`Of lítið: gert er ráð fyrir að ${e.origin} sé ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ógildur strengur: verður að byrja á "${t.prefix}"`:"ends_with"===t.format?`Ógildur strengur: verður að enda á "${t.suffix}"`:"includes"===t.format?`Ógildur strengur: verður að innihalda "${t.includes}"`:"regex"===t.format?`Ógildur strengur: verður að fylgja mynstri ${t.pattern}`:`Rangt ${n[t.format]??e.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${e.divisor}`;case"unrecognized_keys":return`Óþekkt ${e.keys.length>1?"ir lyklar":"ur lykill"}: ${u(e.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${e.origin}`;case"invalid_union":default:return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${e.origin}`}}};const gr=()=>{const e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(t){return e[t]??null}const n={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",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Input non valido: atteso instanceof ${e.expected}, ricevuto ${r}`:`Input non valido: atteso ${t}, ricevuto ${r}`}case"invalid_value":return 1===e.values.length?`Input non valido: atteso ${U(e.values[0])}`:`Opzione non valida: atteso uno tra ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Troppo grande: ${e.origin??"valore"} deve avere ${n}${e.maximum.toString()} ${i.unit??"elementi"}`:`Troppo grande: ${e.origin??"valore"} deve essere ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Troppo piccolo: ${e.origin} deve avere ${n}${e.minimum.toString()} ${i.unit}`:`Troppo piccolo: ${e.origin} deve essere ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Stringa non valida: deve iniziare con "${t.prefix}"`:"ends_with"===t.format?`Stringa non valida: deve terminare con "${t.suffix}"`:"includes"===t.format?`Stringa non valida: deve includere "${t.includes}"`:"regex"===t.format?`Stringa non valida: deve corrispondere al pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${e.divisor}`;case"unrecognized_keys":return`Chiav${e.keys.length>1?"i":"e"} non riconosciut${e.keys.length>1?"e":"a"}: ${u(e.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${e.origin}`;case"invalid_union":default:return"Input non valido";case"invalid_element":return`Valore non valido in ${e.origin}`}}};const vr=()=>{const e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function t(t){return e[t]??null}const n={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アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"},i={nan:"NaN",number:"数値",array:"配列"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`無効な入力: instanceof ${e.expected}が期待されましたが、${r}が入力されました`:`無効な入力: ${t}が期待されましたが、${r}が入力されました`}case"invalid_value":return 1===e.values.length?`無効な入力: ${U(e.values[0])}が期待されました`:`無効な選択: ${u(e.values,"、")}のいずれかである必要があります`;case"too_big":{const n=e.inclusive?"以下である":"より小さい",i=t(e.origin);return i?`大きすぎる値: ${e.origin??"値"}は${e.maximum.toString()}${i.unit??"要素"}${n}必要があります`:`大きすぎる値: ${e.origin??"値"}は${e.maximum.toString()}${n}必要があります`}case"too_small":{const n=e.inclusive?"以上である":"より大きい",i=t(e.origin);return i?`小さすぎる値: ${e.origin}は${e.minimum.toString()}${i.unit}${n}必要があります`:`小さすぎる値: ${e.origin}は${e.minimum.toString()}${n}必要があります`}case"invalid_format":{const t=e;return"starts_with"===t.format?`無効な文字列: "${t.prefix}"で始まる必要があります`:"ends_with"===t.format?`無効な文字列: "${t.suffix}"で終わる必要があります`:"includes"===t.format?`無効な文字列: "${t.includes}"を含む必要があります`:"regex"===t.format?`無効な文字列: パターン${t.pattern}に一致する必要があります`:`無効な${n[t.format]??e.format}`}case"not_multiple_of":return`無効な数値: ${e.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${e.keys.length>1?"群":""}: ${u(e.keys,"、")}`;case"invalid_key":return`${e.origin}内の無効なキー`;case"invalid_union":default:return"無効な入力";case"invalid_element":return`${e.origin}内の無効な値`}}};const br=()=>{const e={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function t(t){return e[t]??null}const n={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 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული სტრინგი",base64url:"base64url-კოდირებული სტრინგი",json_string:"JSON სტრინგი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"},i={nan:"NaN",number:"რიცხვი",string:"სტრინგი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`არასწორი შეყვანა: მოსალოდნელი instanceof ${e.expected}, მიღებული ${r}`:`არასწორი შეყვანა: მოსალოდნელი ${t}, მიღებული ${r}`}case"invalid_value":return 1===e.values.length?`არასწორი შეყვანა: მოსალოდნელი ${U(e.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${u(e.values,"|")}-დან`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`ზედმეტად დიდი: მოსალოდნელი ${e.origin??"მნიშვნელობა"} ${i.verb} ${n}${e.maximum.toString()} ${i.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${e.origin??"მნიშვნელობა"} იყოს ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`ზედმეტად პატარა: მოსალოდნელი ${e.origin} ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${e.origin} იყოს ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`არასწორი სტრინგი: უნდა იწყებოდეს "${t.prefix}"-ით`:"ends_with"===t.format?`არასწორი სტრინგი: უნდა მთავრდებოდეს "${t.suffix}"-ით`:"includes"===t.format?`არასწორი სტრინგი: უნდა შეიცავდეს "${t.includes}"-ს`:"regex"===t.format?`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${t.pattern}`:`არასწორი ${n[t.format]??e.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${e.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${e.keys.length>1?"ები":"ი"}: ${u(e.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${e.origin}-ში`;case"invalid_union":default:return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${e.origin}-ში`}}};const yr=()=>{const e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function t(t){return e[t]??null}const n={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",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"},i={nan:"NaN",number:"លេខ",array:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${e.expected} ប៉ុន្តែទទួលបាន ${r}`:`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${t} ប៉ុន្តែទទួលបាន ${r}`}case"invalid_value":return 1===e.values.length?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${U(e.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`ធំពេក៖ ត្រូវការ ${e.origin??"តម្លៃ"} ${n} ${e.maximum.toString()} ${i.unit??"ធាតុ"}`:`ធំពេក៖ ត្រូវការ ${e.origin??"តម្លៃ"} ${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()} ${i.unit}`:`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${t.prefix}"`:"ends_with"===t.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${t.suffix}"`:"includes"===t.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${t.includes}"`:"regex"===t.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${t.pattern}`:`មិនត្រឹមត្រូវ៖ ${n[t.format]??e.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${e.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${u(e.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;case"invalid_union":default:return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`}}};function $r(){return{localeError:yr()}}const _r=()=>{const e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function t(t){return e[t]??null}const n={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 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`잘못된 입력: 예상 타입은 instanceof ${e.expected}, 받은 타입은 ${r}입니다`:`잘못된 입력: 예상 타입은 ${t}, 받은 타입은 ${r}입니다`}case"invalid_value":return 1===e.values.length?`잘못된 입력: 값은 ${U(e.values[0])} 이어야 합니다`:`잘못된 옵션: ${u(e.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{const n=e.inclusive?"이하":"미만",i="미만"===n?"이어야 합니다":"여야 합니다",r=t(e.origin),o=r?.unit??"요소";return r?`${e.origin??"값"}이 너무 큽니다: ${e.maximum.toString()}${o} ${n}${i}`:`${e.origin??"값"}이 너무 큽니다: ${e.maximum.toString()} ${n}${i}`}case"too_small":{const n=e.inclusive?"이상":"초과",i="이상"===n?"이어야 합니다":"여야 합니다",r=t(e.origin),o=r?.unit??"요소";return r?`${e.origin??"값"}이 너무 작습니다: ${e.minimum.toString()}${o} ${n}${i}`:`${e.origin??"값"}이 너무 작습니다: ${e.minimum.toString()} ${n}${i}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`잘못된 문자열: "${t.prefix}"(으)로 시작해야 합니다`:"ends_with"===t.format?`잘못된 문자열: "${t.suffix}"(으)로 끝나야 합니다`:"includes"===t.format?`잘못된 문자열: "${t.includes}"을(를) 포함해야 합니다`:"regex"===t.format?`잘못된 문자열: 정규식 ${t.pattern} 패턴과 일치해야 합니다`:`잘못된 ${n[t.format]??e.format}`}case"not_multiple_of":return`잘못된 숫자: ${e.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${u(e.keys,", ")}`;case"invalid_key":return`잘못된 키: ${e.origin}`;case"invalid_union":default:return"잘못된 입력";case"invalid_element":return`잘못된 값: ${e.origin}`}}};const kr=e=>e.charAt(0).toUpperCase()+e.slice(1);function wr(e){const t=Math.abs(e),n=t%10,i=t%100;return i>=11&&i<=19||0===n?"many":1===n?"one":"few"}const xr=()=>{const e={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 t(t,n,i,r){const o=e[t]??null;return null===o?o:{unit:o.unit[n],verb:o.verb[r][i?"inclusive":"notInclusive"]}}const n={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",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",jwt:"JWT",template_literal:"įvestis"},i={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 e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Gautas tipas ${r}, o tikėtasi - instanceof ${e.expected}`:`Gautas tipas ${r}, o tikėtasi - ${t}`}case"invalid_value":return 1===e.values.length?`Privalo būti ${U(e.values[0])}`:`Privalo būti vienas iš ${u(e.values,"|")} pasirinkimų`;case"too_big":{const n=i[e.origin]??e.origin,r=t(e.origin,wr(Number(e.maximum)),e.inclusive??!1,"smaller");if(r?.verb)return`${kr(n??e.origin??"reikšmė")} ${r.verb} ${e.maximum.toString()} ${r.unit??"elementų"}`;const o=e.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${kr(n??e.origin??"reikšmė")} turi būti ${o} ${e.maximum.toString()} ${r?.unit}`}case"too_small":{const n=i[e.origin]??e.origin,r=t(e.origin,wr(Number(e.minimum)),e.inclusive??!1,"bigger");if(r?.verb)return`${kr(n??e.origin??"reikšmė")} ${r.verb} ${e.minimum.toString()} ${r.unit??"elementų"}`;const o=e.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${kr(n??e.origin??"reikšmė")} turi būti ${o} ${e.minimum.toString()} ${r?.unit}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Eilutė privalo prasidėti "${t.prefix}"`:"ends_with"===t.format?`Eilutė privalo pasibaigti "${t.suffix}"`:"includes"===t.format?`Eilutė privalo įtraukti "${t.includes}"`:"regex"===t.format?`Eilutė privalo atitikti ${t.pattern}`:`Neteisingas ${n[t.format]??e.format}`}case"not_multiple_of":return`Skaičius privalo būti ${e.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${e.keys.length>1?"i":"as"} rakt${e.keys.length>1?"ai":"as"}: ${u(e.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":default:return"Klaidinga įvestis";case"invalid_element":{const t=i[e.origin]??e.origin;return`${kr(t??e.origin??"reikšmė")} turi klaidingą įvestį`}}}};const Ir=()=>{const e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function t(t){return e[t]??null}const n={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 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"},i={nan:"NaN",number:"број",array:"низа"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Грешен внес: се очекува instanceof ${e.expected}, примено ${r}`:`Грешен внес: се очекува ${t}, примено ${r}`}case"invalid_value":return 1===e.values.length?`Invalid input: expected ${U(e.values[0])}`:`Грешана опција: се очекува една ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Премногу голем: се очекува ${e.origin??"вредноста"} да има ${n}${e.maximum.toString()} ${i.unit??"елементи"}`:`Премногу голем: се очекува ${e.origin??"вредноста"} да биде ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Премногу мал: се очекува ${e.origin} да има ${n}${e.minimum.toString()} ${i.unit}`:`Премногу мал: се очекува ${e.origin} да биде ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Неважечка низа: мора да започнува со "${t.prefix}"`:"ends_with"===t.format?`Неважечка низа: мора да завршува со "${t.suffix}"`:"includes"===t.format?`Неважечка низа: мора да вклучува "${t.includes}"`:"regex"===t.format?`Неважечка низа: мора да одгоара на патернот ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${u(e.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${e.origin}`;case"invalid_union":default:return"Грешен внес";case"invalid_element":return`Грешна вредност во ${e.origin}`}}};const Sr=()=>{const e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(t){return e[t]??null}const n={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",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak sah: dijangka instanceof ${e.expected}, diterima ${r}`:`Input tidak sah: dijangka ${t}, diterima ${r}`}case"invalid_value":return 1===e.values.length?`Input tidak sah: dijangka ${U(e.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Terlalu besar: dijangka ${e.origin??"nilai"} ${i.verb} ${n}${e.maximum.toString()} ${i.unit??"elemen"}`:`Terlalu besar: dijangka ${e.origin??"nilai"} adalah ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Terlalu kecil: dijangka ${e.origin} ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`Terlalu kecil: dijangka ${e.origin} adalah ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`String tidak sah: mesti bermula dengan "${t.prefix}"`:"ends_with"===t.format?`String tidak sah: mesti berakhir dengan "${t.suffix}"`:"includes"===t.format?`String tidak sah: mesti mengandungi "${t.includes}"`:"regex"===t.format?`String tidak sah: mesti sepadan dengan corak ${t.pattern}`:`${n[t.format]??e.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${e.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${u(e.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${e.origin}`;case"invalid_union":default:return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${e.origin}`}}};const Er=()=>{const e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(t){return e[t]??null}const n={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",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Ongeldige invoer: verwacht instanceof ${e.expected}, ontving ${r}`:`Ongeldige invoer: verwacht ${t}, ontving ${r}`}case"invalid_value":return 1===e.values.length?`Ongeldige invoer: verwacht ${U(e.values[0])}`:`Ongeldige optie: verwacht één van ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin),r="date"===e.origin?"laat":"string"===e.origin?"lang":"groot";return i?`Te ${r}: verwacht dat ${e.origin??"waarde"} ${n}${e.maximum.toString()} ${i.unit??"elementen"} ${i.verb}`:`Te ${r}: verwacht dat ${e.origin??"waarde"} ${n}${e.maximum.toString()} is`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin),r="date"===e.origin?"vroeg":"string"===e.origin?"kort":"klein";return i?`Te ${r}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} ${i.unit} ${i.verb}`:`Te ${r}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} is`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ongeldige tekst: moet met "${t.prefix}" beginnen`:"ends_with"===t.format?`Ongeldige tekst: moet op "${t.suffix}" eindigen`:"includes"===t.format?`Ongeldige tekst: moet "${t.includes}" bevatten`:"regex"===t.format?`Ongeldige tekst: moet overeenkomen met patroon ${t.pattern}`:`Ongeldig: ${n[t.format]??e.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${e.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${e.origin}`;case"invalid_union":default:return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${e.origin}`}}};const Tr=()=>{const e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function t(t){return e[t]??null}const n={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-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldig input: forventet instanceof ${e.expected}, fikk ${r}`:`Ugyldig input: forventet ${t}, fikk ${r}`}case"invalid_value":return 1===e.values.length?`Ugyldig verdi: forventet ${U(e.values[0])}`:`Ugyldig valg: forventet en av ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`For stor(t): forventet ${e.origin??"value"} til å ha ${n}${e.maximum.toString()} ${i.unit??"elementer"}`:`For stor(t): forventet ${e.origin??"value"} til å ha ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()} ${i.unit}`:`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ugyldig streng: må starte med "${t.prefix}"`:"ends_with"===t.format?`Ugyldig streng: må ende med "${t.suffix}"`:"includes"===t.format?`Ugyldig streng: må inneholde "${t.includes}"`:"regex"===t.format?`Ugyldig streng: må matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${u(e.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${e.origin}`;case"invalid_union":default:return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${e.origin}`}}};const zr=()=>{const e={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"}};function t(t){return e[t]??null}const n={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ı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Fâsit giren: umulan instanceof ${e.expected}, alınan ${r}`:`Fâsit giren: umulan ${t}, alınan ${r}`}case"invalid_value":return 1===e.values.length?`Fâsit giren: umulan ${U(e.values[0])}`:`Fâsit tercih: mûteberler ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Fazla büyük: ${e.origin??"value"}, ${n}${e.maximum.toString()} ${i.unit??"elements"} sahip olmalıydı.`:`Fazla büyük: ${e.origin??"value"}, ${n}${e.maximum.toString()} olmalıydı.`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} ${i.unit} sahip olmalıydı.`:`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} olmalıydı.`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Fâsit metin: "${t.prefix}" ile başlamalı.`:"ends_with"===t.format?`Fâsit metin: "${t.suffix}" ile bitmeli.`:"includes"===t.format?`Fâsit metin: "${t.includes}" ihtivâ etmeli.`:"regex"===t.format?`Fâsit metin: ${t.pattern} nakşına uymalı.`:`Fâsit ${n[t.format]??e.format}`}case"not_multiple_of":return`Fâsit sayı: ${e.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`${e.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${e.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};const Cr=()=>{const e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function t(t){return e[t]??null}const n={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 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"},i={nan:"NaN",number:"عدد",array:"ارې"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`ناسم ورودي: باید instanceof ${e.expected} وای, مګر ${r} ترلاسه شو`:`ناسم ورودي: باید ${t} وای, مګر ${r} ترلاسه شو`}case"invalid_value":return 1===e.values.length?`ناسم ورودي: باید ${U(e.values[0])} وای`:`ناسم انتخاب: باید یو له ${u(e.values,"|")} څخه وای`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`ډیر لوی: ${e.origin??"ارزښت"} باید ${n}${e.maximum.toString()} ${i.unit??"عنصرونه"} ولري`:`ډیر لوی: ${e.origin??"ارزښت"} باید ${n}${e.maximum.toString()} وي`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} ${i.unit} ولري`:`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} وي`}case"invalid_format":{const t=e;return"starts_with"===t.format?`ناسم متن: باید د "${t.prefix}" سره پیل شي`:"ends_with"===t.format?`ناسم متن: باید د "${t.suffix}" سره پای ته ورسيږي`:"includes"===t.format?`ناسم متن: باید "${t.includes}" ولري`:"regex"===t.format?`ناسم متن: باید د ${t.pattern} سره مطابقت ولري`:`${n[t.format]??e.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${e.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${e.keys.length>1?"کلیډونه":"کلیډ"}: ${u(e.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${e.origin} کې`;case"invalid_union":default:return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${e.origin} کې`}}};const Or=()=>{const e={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function t(t){return e[t]??null}const n={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",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",jwt:"JWT",template_literal:"wejście"},i={nan:"NaN",number:"liczba",array:"tablica"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${e.expected}, otrzymano ${r}`:`Nieprawidłowe dane wejściowe: oczekiwano ${t}, otrzymano ${r}`}case"invalid_value":return 1===e.values.length?`Nieprawidłowe dane wejściowe: oczekiwano ${U(e.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Za duża wartość: oczekiwano, że ${e.origin??"wartość"} będzie mieć ${n}${e.maximum.toString()} ${i.unit??"elementów"}`:`Zbyt duż(y/a/e): oczekiwano, że ${e.origin??"wartość"} będzie wynosić ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Za mała wartość: oczekiwano, że ${e.origin??"wartość"} będzie mieć ${n}${e.minimum.toString()} ${i.unit??"elementów"}`:`Zbyt mał(y/a/e): oczekiwano, że ${e.origin??"wartość"} będzie wynosić ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${t.prefix}"`:"ends_with"===t.format?`Nieprawidłowy ciąg znaków: musi kończyć się na "${t.suffix}"`:"includes"===t.format?`Nieprawidłowy ciąg znaków: musi zawierać "${t.includes}"`:"regex"===t.format?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${t.pattern}`:`Nieprawidłow(y/a/e) ${n[t.format]??e.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${e.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${e.origin}`;case"invalid_union":default:return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${e.origin}`}}};const Ur=()=>{const e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(t){return e[t]??null}const n={regex:"padrão",email:"endereço de 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:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",number:"número",null:"nulo"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Tipo inválido: esperado instanceof ${e.expected}, recebido ${r}`:`Tipo inválido: esperado ${t}, recebido ${r}`}case"invalid_value":return 1===e.values.length?`Entrada inválida: esperado ${U(e.values[0])}`:`Opção inválida: esperada uma das ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Muito grande: esperado que ${e.origin??"valor"} tivesse ${n}${e.maximum.toString()} ${i.unit??"elementos"}`:`Muito grande: esperado que ${e.origin??"valor"} fosse ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Muito pequeno: esperado que ${e.origin} tivesse ${n}${e.minimum.toString()} ${i.unit}`:`Muito pequeno: esperado que ${e.origin} fosse ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Texto inválido: deve começar com "${t.prefix}"`:"ends_with"===t.format?`Texto inválido: deve terminar com "${t.suffix}"`:"includes"===t.format?`Texto inválido: deve incluir "${t.includes}"`:"regex"===t.format?`Texto inválido: deve corresponder ao padrão ${t.pattern}`:`${n[t.format]??e.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${e.divisor}`;case"unrecognized_keys":return`Chave${e.keys.length>1?"s":""} desconhecida${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Chave inválida em ${e.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${e.origin}`;default:return"Campo inválido"}}};function Nr(e,t,n,i){const r=Math.abs(e),o=r%10,a=r%100;return a>=11&&a<=19?i:1===o?t:o>=2&&o<=4?n:i}const Dr=()=>{const e={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function t(t){return e[t]??null}const n={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 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"},i={nan:"NaN",number:"число",array:"массив"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Неверный ввод: ожидалось instanceof ${e.expected}, получено ${r}`:`Неверный ввод: ожидалось ${t}, получено ${r}`}case"invalid_value":return 1===e.values.length?`Неверный ввод: ожидалось ${U(e.values[0])}`:`Неверный вариант: ожидалось одно из ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);if(i){const t=Nr(Number(e.maximum),i.unit.one,i.unit.few,i.unit.many);return`Слишком большое значение: ожидалось, что ${e.origin??"значение"} будет иметь ${n}${e.maximum.toString()} ${t}`}return`Слишком большое значение: ожидалось, что ${e.origin??"значение"} будет ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);if(i){const t=Nr(Number(e.minimum),i.unit.one,i.unit.few,i.unit.many);return`Слишком маленькое значение: ожидалось, что ${e.origin} будет иметь ${n}${e.minimum.toString()} ${t}`}return`Слишком маленькое значение: ожидалось, что ${e.origin} будет ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Неверная строка: должна начинаться с "${t.prefix}"`:"ends_with"===t.format?`Неверная строка: должна заканчиваться на "${t.suffix}"`:"includes"===t.format?`Неверная строка: должна содержать "${t.includes}"`:"regex"===t.format?`Неверная строка: должна соответствовать шаблону ${t.pattern}`:`Неверный ${n[t.format]??e.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${e.divisor}`;case"unrecognized_keys":return`Нераспознанн${e.keys.length>1?"ые":"ый"} ключ${e.keys.length>1?"и":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${e.origin}`;case"invalid_union":default:return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${e.origin}`}}};const Ar=()=>{const e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(t){return e[t]??null}const n={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",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"število",array:"tabela"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Neveljaven vnos: pričakovano instanceof ${e.expected}, prejeto ${r}`:`Neveljaven vnos: pričakovano ${t}, prejeto ${r}`}case"invalid_value":return 1===e.values.length?`Neveljaven vnos: pričakovano ${U(e.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Preveliko: pričakovano, da bo ${e.origin??"vrednost"} imelo ${n}${e.maximum.toString()} ${i.unit??"elementov"}`:`Preveliko: pričakovano, da bo ${e.origin??"vrednost"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Premajhno: pričakovano, da bo ${e.origin} imelo ${n}${e.minimum.toString()} ${i.unit}`:`Premajhno: pričakovano, da bo ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Neveljaven niz: mora se začeti z "${t.prefix}"`:"ends_with"===t.format?`Neveljaven niz: mora se končati z "${t.suffix}"`:"includes"===t.format?`Neveljaven niz: mora vsebovati "${t.includes}"`:"regex"===t.format?`Neveljaven niz: mora ustrezati vzorcu ${t.pattern}`:`Neveljaven ${n[t.format]??e.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${e.divisor}`;case"unrecognized_keys":return`Neprepoznan${e.keys.length>1?"i ključi":" ključ"}: ${u(e.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${e.origin}`;case"invalid_union":default:return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${e.origin}`}}};const jr=()=>{const e={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"}};function t(t){return e[t]??null}const n={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-intervall",ipv6:"IPv6-intervall",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",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Ogiltig inmatning: förväntat instanceof ${e.expected}, fick ${r}`:`Ogiltig inmatning: förväntat ${t}, fick ${r}`}case"invalid_value":return 1===e.values.length?`Ogiltig inmatning: förväntat ${U(e.values[0])}`:`Ogiltigt val: förväntade en av ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`För stor(t): förväntade ${e.origin??"värdet"} att ha ${n}${e.maximum.toString()} ${i.unit??"element"}`:`För stor(t): förväntat ${e.origin??"värdet"} att ha ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`För lite(t): förväntade ${e.origin??"värdet"} att ha ${n}${e.minimum.toString()} ${i.unit}`:`För lite(t): förväntade ${e.origin??"värdet"} att ha ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ogiltig sträng: måste börja med "${t.prefix}"`:"ends_with"===t.format?`Ogiltig sträng: måste sluta med "${t.suffix}"`:"includes"===t.format?`Ogiltig sträng: måste innehålla "${t.includes}"`:"regex"===t.format?`Ogiltig sträng: måste matcha mönstret "${t.pattern}"`:`Ogiltig(t) ${n[t.format]??e.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${u(e.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${e.origin??"värdet"}`;case"invalid_union":default:return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${e.origin??"värdet"}`}}};const Pr=()=>{const e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function t(t){return e[t]??null}const n={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 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${e.expected}, பெறப்பட்டது ${r}`:`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${t}, பெறப்பட்டது ${r}`}case"invalid_value":return 1===e.values.length?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${U(e.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${u(e.values,"|")} இல் ஒன்று`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??"மதிப்பு"} ${n}${e.maximum.toString()} ${i.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??"மதிப்பு"} ${n}${e.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ${i.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{const t=e;return"starts_with"===t.format?`தவறான சரம்: "${t.prefix}" இல் தொடங்க வேண்டும்`:"ends_with"===t.format?`தவறான சரம்: "${t.suffix}" இல் முடிவடைய வேண்டும்`:"includes"===t.format?`தவறான சரம்: "${t.includes}" ஐ உள்ளடக்க வேண்டும்`:"regex"===t.format?`தவறான சரம்: ${t.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${n[t.format]??e.format}`}case"not_multiple_of":return`தவறான எண்: ${e.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${e.keys.length>1?"கள்":""}: ${u(e.keys,", ")}`;case"invalid_key":return`${e.origin} இல் தவறான விசை`;case"invalid_union":default:return"தவறான உள்ளீடு";case"invalid_element":return`${e.origin} இல் தவறான மதிப்பு`}}};const Zr=()=>{const e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function t(t){return e[t]??null}const n={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",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"},i={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${e.expected} แต่ได้รับ ${r}`:`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${t} แต่ได้รับ ${r}`}case"invalid_value":return 1===e.values.length?`ค่าไม่ถูกต้อง: ควรเป็น ${U(e.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"ไม่เกิน":"น้อยกว่า",i=t(e.origin);return i?`เกินกำหนด: ${e.origin??"ค่า"} ควรมี${n} ${e.maximum.toString()} ${i.unit??"รายการ"}`:`เกินกำหนด: ${e.origin??"ค่า"} ควรมี${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?"อย่างน้อย":"มากกว่า",i=t(e.origin);return i?`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()} ${i.unit}`:`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${t.prefix}"`:"ends_with"===t.format?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${t.suffix}"`:"includes"===t.format?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${t.includes}" อยู่ในข้อความ`:"regex"===t.format?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${t.pattern}`:`รูปแบบไม่ถูกต้อง: ${n[t.format]??e.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${e.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${u(e.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${e.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${e.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};const Rr=()=>{const e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function t(t){return e[t]??null}const n={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",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ı",jwt:"JWT",template_literal:"Şablon dizesi"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Geçersiz değer: beklenen instanceof ${e.expected}, alınan ${r}`:`Geçersiz değer: beklenen ${t}, alınan ${r}`}case"invalid_value":return 1===e.values.length?`Geçersiz değer: beklenen ${U(e.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Çok büyük: beklenen ${e.origin??"değer"} ${n}${e.maximum.toString()} ${i.unit??"öğe"}`:`Çok büyük: beklenen ${e.origin??"değer"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()} ${i.unit}`:`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Geçersiz metin: "${t.prefix}" ile başlamalı`:"ends_with"===t.format?`Geçersiz metin: "${t.suffix}" ile bitmeli`:"includes"===t.format?`Geçersiz metin: "${t.includes}" içermeli`:"regex"===t.format?`Geçersiz metin: ${t.pattern} desenine uymalı`:`Geçersiz ${n[t.format]??e.format}`}case"not_multiple_of":return`Geçersiz sayı: ${e.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${e.keys.length>1?"lar":""}: ${u(e.keys,", ")}`;case"invalid_key":return`${e.origin} içinde geçersiz anahtar`;case"invalid_union":default:return"Geçersiz değer";case"invalid_element":return`${e.origin} içinde geçersiz değer`}}};const qr=()=>{const e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function t(t){return e[t]??null}const n={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",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"},i={nan:"NaN",number:"число",array:"масив"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Неправильні вхідні дані: очікується instanceof ${e.expected}, отримано ${r}`:`Неправильні вхідні дані: очікується ${t}, отримано ${r}`}case"invalid_value":return 1===e.values.length?`Неправильні вхідні дані: очікується ${U(e.values[0])}`:`Неправильна опція: очікується одне з ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Занадто велике: очікується, що ${e.origin??"значення"} ${i.verb} ${n}${e.maximum.toString()} ${i.unit??"елементів"}`:`Занадто велике: очікується, що ${e.origin??"значення"} буде ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Занадто мале: очікується, що ${e.origin} ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`Занадто мале: очікується, що ${e.origin} буде ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Неправильний рядок: повинен починатися з "${t.prefix}"`:"ends_with"===t.format?`Неправильний рядок: повинен закінчуватися на "${t.suffix}"`:"includes"===t.format?`Неправильний рядок: повинен містити "${t.includes}"`:"regex"===t.format?`Неправильний рядок: повинен відповідати шаблону ${t.pattern}`:`Неправильний ${n[t.format]??e.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${e.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${e.keys.length>1?"і":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${e.origin}`;case"invalid_union":default:return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${e.origin}`}}};function Mr(){return{localeError:qr()}}const Lr=()=>{const e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function t(t){return e[t]??null}const n={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 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"},i={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`غلط ان پٹ: instanceof ${e.expected} متوقع تھا، ${r} موصول ہوا`:`غلط ان پٹ: ${t} متوقع تھا، ${r} موصول ہوا`}case"invalid_value":return 1===e.values.length?`غلط ان پٹ: ${U(e.values[0])} متوقع تھا`:`غلط آپشن: ${u(e.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`بہت بڑا: ${e.origin??"ویلیو"} کے ${n}${e.maximum.toString()} ${i.unit??"عناصر"} ہونے متوقع تھے`:`بہت بڑا: ${e.origin??"ویلیو"} کا ${n}${e.maximum.toString()} ہونا متوقع تھا`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`بہت چھوٹا: ${e.origin} کے ${n}${e.minimum.toString()} ${i.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${e.origin} کا ${n}${e.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{const t=e;return"starts_with"===t.format?`غلط سٹرنگ: "${t.prefix}" سے شروع ہونا چاہیے`:"ends_with"===t.format?`غلط سٹرنگ: "${t.suffix}" پر ختم ہونا چاہیے`:"includes"===t.format?`غلط سٹرنگ: "${t.includes}" شامل ہونا چاہیے`:"regex"===t.format?`غلط سٹرنگ: پیٹرن ${t.pattern} سے میچ ہونا چاہیے`:`غلط ${n[t.format]??e.format}`}case"not_multiple_of":return`غلط نمبر: ${e.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${e.keys.length>1?"ز":""}: ${u(e.keys,"، ")}`;case"invalid_key":return`${e.origin} میں غلط کی`;case"invalid_union":default:return"غلط ان پٹ";case"invalid_element":return`${e.origin} میں غلط ویلیو`}}};const Fr=()=>{const e={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"}};function t(t){return e[t]??null}const n={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",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Noto‘g‘ri kirish: kutilgan instanceof ${e.expected}, qabul qilingan ${r}`:`Noto‘g‘ri kirish: kutilgan ${t}, qabul qilingan ${r}`}case"invalid_value":return 1===e.values.length?`Noto‘g‘ri kirish: kutilgan ${U(e.values[0])}`:`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Juda katta: kutilgan ${e.origin??"qiymat"} ${n}${e.maximum.toString()} ${i.unit} ${i.verb}`:`Juda katta: kutilgan ${e.origin??"qiymat"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()} ${i.unit} ${i.verb}`:`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Noto‘g‘ri satr: "${t.prefix}" bilan boshlanishi kerak`:"ends_with"===t.format?`Noto‘g‘ri satr: "${t.suffix}" bilan tugashi kerak`:"includes"===t.format?`Noto‘g‘ri satr: "${t.includes}" ni o‘z ichiga olishi kerak`:"regex"===t.format?`Noto‘g‘ri satr: ${t.pattern} shabloniga mos kelishi kerak`:`Noto‘g‘ri ${n[t.format]??e.format}`}case"not_multiple_of":return`Noto‘g‘ri raqam: ${e.divisor} ning karralisi bo‘lishi kerak`;case"unrecognized_keys":return`Noma’lum kalit${e.keys.length>1?"lar":""}: ${u(e.keys,", ")}`;case"invalid_key":return`${e.origin} dagi kalit noto‘g‘ri`;case"invalid_union":default:return"Noto‘g‘ri kirish";case"invalid_element":return`${e.origin} da noto‘g‘ri qiymat`}}};const Vr=()=>{const e={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ó"}};function t(t){return e[t]??null}const n={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",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",jwt:"JWT",template_literal:"đầu vào"},i={nan:"NaN",number:"số",array:"mảng"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Đầu vào không hợp lệ: mong đợi instanceof ${e.expected}, nhận được ${r}`:`Đầu vào không hợp lệ: mong đợi ${t}, nhận được ${r}`}case"invalid_value":return 1===e.values.length?`Đầu vào không hợp lệ: mong đợi ${U(e.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Quá lớn: mong đợi ${e.origin??"giá trị"} ${i.verb} ${n}${e.maximum.toString()} ${i.unit??"phần tử"}`:`Quá lớn: mong đợi ${e.origin??"giá trị"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Quá nhỏ: mong đợi ${e.origin} ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`Quá nhỏ: mong đợi ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Chuỗi không hợp lệ: phải bắt đầu bằng "${t.prefix}"`:"ends_with"===t.format?`Chuỗi không hợp lệ: phải kết thúc bằng "${t.suffix}"`:"includes"===t.format?`Chuỗi không hợp lệ: phải bao gồm "${t.includes}"`:"regex"===t.format?`Chuỗi không hợp lệ: phải khớp với mẫu ${t.pattern}`:`${n[t.format]??e.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 ${e.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${u(e.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${e.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 ${e.origin}`}}};const Br=()=>{const e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function t(t){return e[t]??null}const n={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地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"},i={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`无效输入:期望 instanceof ${e.expected},实际接收 ${r}`:`无效输入:期望 ${t},实际接收 ${r}`}case"invalid_value":return 1===e.values.length?`无效输入:期望 ${U(e.values[0])}`:`无效选项:期望以下之一 ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`数值过大:期望 ${e.origin??"值"} ${n}${e.maximum.toString()} ${i.unit??"个元素"}`:`数值过大:期望 ${e.origin??"值"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()} ${i.unit}`:`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`无效字符串:必须以 "${t.prefix}" 开头`:"ends_with"===t.format?`无效字符串:必须以 "${t.suffix}" 结尾`:"includes"===t.format?`无效字符串:必须包含 "${t.includes}"`:"regex"===t.format?`无效字符串:必须满足正则表达式 ${t.pattern}`:`无效${n[t.format]??e.format}`}case"not_multiple_of":return`无效数字:必须是 ${e.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${u(e.keys,", ")}`;case"invalid_key":return`${e.origin} 中的键(key)无效`;case"invalid_union":default:return"无效输入";case"invalid_element":return`${e.origin} 中包含无效值(value)`}}};const Hr=()=>{const e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function t(t){return e[t]??null}const n={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 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`無效的輸入值:預期為 instanceof ${e.expected},但收到 ${r}`:`無效的輸入值:預期為 ${t},但收到 ${r}`}case"invalid_value":return 1===e.values.length?`無效的輸入值:預期為 ${U(e.values[0])}`:`無效的選項:預期為以下其中之一 ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`數值過大:預期 ${e.origin??"值"} 應為 ${n}${e.maximum.toString()} ${i.unit??"個元素"}`:`數值過大:預期 ${e.origin??"值"} 應為 ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()} ${i.unit}`:`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`無效的字串:必須以 "${t.prefix}" 開頭`:"ends_with"===t.format?`無效的字串:必須以 "${t.suffix}" 結尾`:"includes"===t.format?`無效的字串:必須包含 "${t.includes}"`:"regex"===t.format?`無效的字串:必須符合格式 ${t.pattern}`:`無效的 ${n[t.format]??e.format}`}case"not_multiple_of":return`無效的數字:必須為 ${e.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${e.keys.length>1?"們":""}:${u(e.keys,"、")}`;case"invalid_key":return`${e.origin} 中有無效的鍵值`;case"invalid_union":default:return"無效的輸入值";case"invalid_element":return`${e.origin} 中有無效的值`}}};const Wr=()=>{const e={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function t(t){return e[t]??null}const n={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",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",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"},i={nan:"NaN",number:"nọ́mbà",array:"akopọ"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${e.expected}, àmọ̀ a rí ${r}`:`Ìbáwọlé aṣìṣe: a ní láti fi ${t}, àmọ̀ a rí ${r}`}case"invalid_value":return 1===e.values.length?`Ìbáwọlé aṣìṣe: a ní láti fi ${U(e.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Tó pọ̀ jù: a ní láti jẹ́ pé ${e.origin??"iye"} ${i.verb} ${n}${e.maximum} ${i.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${n}${e.maximum}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Kéré ju: a ní láti jẹ́ pé ${e.origin} ${i.verb} ${n}${e.minimum} ${i.unit}`:`Kéré ju: a ní láti jẹ́ ${n}${e.minimum}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${t.prefix}"`:"ends_with"===t.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${t.suffix}"`:"includes"===t.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${t.includes}"`:"regex"===t.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${t.pattern}`:`Aṣìṣe: ${n[t.format]??e.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${e.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${u(e.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${e.origin}`;case"invalid_union":default:return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${e.origin}`}}};var Jr,Gr=Object.freeze({__proto__:null,ar:function(){return{localeError:Hi()}},az:function(){return{localeError:Wi()}},be:function(){return{localeError:Gi()}},bg:function(){return{localeError:Ki()}},ca:function(){return{localeError:Xi()}},cs:function(){return{localeError:Yi()}},da:function(){return{localeError:Qi()}},de:function(){return{localeError:er()}},en:nr,eo:function(){return{localeError:ir()}},es:function(){return{localeError:rr()}},fa:function(){return{localeError:or()}},fi:function(){return{localeError:ar()}},fr:function(){return{localeError:sr()}},frCA:function(){return{localeError:lr()}},he:function(){return{localeError:cr()}},hu:function(){return{localeError:ur()}},hy:function(){return{localeError:mr()}},id:function(){return{localeError:fr()}},is:function(){return{localeError:hr()}},it:function(){return{localeError:gr()}},ja:function(){return{localeError:vr()}},ka:function(){return{localeError:br()}},kh:function(){return $r()},km:$r,ko:function(){return{localeError:_r()}},lt:function(){return{localeError:xr()}},mk:function(){return{localeError:Ir()}},ms:function(){return{localeError:Sr()}},nl:function(){return{localeError:Er()}},no:function(){return{localeError:Tr()}},ota:function(){return{localeError:zr()}},pl:function(){return{localeError:Or()}},ps:function(){return{localeError:Cr()}},pt:function(){return{localeError:Ur()}},ru:function(){return{localeError:Dr()}},sl:function(){return{localeError:Ar()}},sv:function(){return{localeError:jr()}},ta:function(){return{localeError:Pr()}},th:function(){return{localeError:Zr()}},tr:function(){return{localeError:Rr()}},ua:function(){return Mr()},uk:Mr,ur:function(){return{localeError:Lr()}},uz:function(){return{localeError:Fr()}},vi:function(){return{localeError:Vr()}},yo:function(){return{localeError:Wr()}},zhCN:function(){return{localeError:Br()}},zhTW:function(){return{localeError:Hr()}}});const Kr=Symbol("ZodOutput"),Xr=Symbol("ZodInput");class Yr{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const n=t[0];return this._map.set(e,n),n&&"object"==typeof n&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const n={...this.get(t)??{}};delete n.id;const i={...n,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function Qr(){return new Yr}(Jr=globalThis).__zod_globalRegistry??(Jr.__zod_globalRegistry=Qr());const eo=globalThis.__zod_globalRegistry;function to(e,t){return new e({type:"string",...O(t)})}function no(e,t){return new e({type:"string",coerce:!0,...O(t)})}function io(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...O(t)})}function ro(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...O(t)})}function oo(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...O(t)})}function ao(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...O(t)})}function so(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...O(t)})}function lo(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...O(t)})}function co(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...O(t)})}function uo(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...O(t)})}function po(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...O(t)})}function mo(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...O(t)})}function fo(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...O(t)})}function ho(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...O(t)})}function go(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...O(t)})}function vo(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...O(t)})}function bo(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...O(t)})}function yo(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...O(t)})}function $o(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...O(t)})}function _o(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...O(t)})}function ko(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...O(t)})}function wo(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...O(t)})}function xo(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...O(t)})}function Io(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...O(t)})}function So(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...O(t)})}const Eo={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function To(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...O(t)})}function zo(e,t){return new e({type:"string",format:"date",check:"string_format",...O(t)})}function Co(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...O(t)})}function Oo(e,t){return new e({type:"string",format:"duration",check:"string_format",...O(t)})}function Uo(e,t){return new e({type:"number",checks:[],...O(t)})}function No(e,t){return new e({type:"number",coerce:!0,checks:[],...O(t)})}function Do(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...O(t)})}function Ao(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...O(t)})}function jo(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...O(t)})}function Po(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...O(t)})}function Zo(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...O(t)})}function Ro(e,t){return new e({type:"boolean",...O(t)})}function qo(e,t){return new e({type:"boolean",coerce:!0,...O(t)})}function Mo(e,t){return new e({type:"bigint",...O(t)})}function Lo(e,t){return new e({type:"bigint",coerce:!0,...O(t)})}function Fo(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...O(t)})}function Vo(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...O(t)})}function Bo(e,t){return new e({type:"symbol",...O(t)})}function Ho(e,t){return new e({type:"undefined",...O(t)})}function Wo(e,t){return new e({type:"null",...O(t)})}function Jo(e){return new e({type:"any"})}function Go(e){return new e({type:"unknown"})}function Ko(e,t){return new e({type:"never",...O(t)})}function Xo(e,t){return new e({type:"void",...O(t)})}function Yo(e,t){return new e({type:"date",...O(t)})}function Qo(e,t){return new e({type:"date",coerce:!0,...O(t)})}function ea(e,t){return new e({type:"nan",...O(t)})}function ta(e,t){return new Dt({check:"less_than",...O(t),value:e,inclusive:!1})}function na(e,t){return new Dt({check:"less_than",...O(t),value:e,inclusive:!0})}function ia(e,t){return new At({check:"greater_than",...O(t),value:e,inclusive:!1})}function ra(e,t){return new At({check:"greater_than",...O(t),value:e,inclusive:!0})}function oa(e){return ia(0,e)}function aa(e){return ta(0,e)}function sa(e){return na(0,e)}function la(e){return ra(0,e)}function ca(e,t){return new jt({check:"multiple_of",...O(t),value:e})}function ua(e,t){return new Rt({check:"max_size",...O(t),maximum:e})}function da(e,t){return new qt({check:"min_size",...O(t),minimum:e})}function pa(e,t){return new Mt({check:"size_equals",...O(t),size:e})}function ma(e,t){return new Lt({check:"max_length",...O(t),maximum:e})}function fa(e,t){return new Ft({check:"min_length",...O(t),minimum:e})}function ha(e,t){return new Vt({check:"length_equals",...O(t),length:e})}function ga(e,t){return new Ht({check:"string_format",format:"regex",...O(t),pattern:e})}function va(e){return new Wt({check:"string_format",format:"lowercase",...O(e)})}function ba(e){return new Jt({check:"string_format",format:"uppercase",...O(e)})}function ya(e,t){return new Gt({check:"string_format",format:"includes",...O(t),includes:e})}function $a(e,t){return new Kt({check:"string_format",format:"starts_with",...O(t),prefix:e})}function _a(e,t){return new Xt({check:"string_format",format:"ends_with",...O(t),suffix:e})}function ka(e,t,n){return new Qt({check:"property",property:e,schema:t,...O(n)})}function wa(e,t){return new en({check:"mime_type",mime:e,...O(t)})}function xa(e){return new tn({check:"overwrite",tx:e})}function Ia(e){return xa(t=>t.normalize(e))}function Sa(){return xa(e=>e.trim())}function Ea(){return xa(e=>e.toLowerCase())}function Ta(){return xa(e=>e.toUpperCase())}function za(){return xa(e=>_(e))}function Ca(e,t,n){return new e({type:"array",element:t,...O(n)})}function Oa(e,t){return new e({type:"file",...O(t)})}function Ua(e,t,n){const i=O(n);i.abort??(i.abort=!0);return new e({type:"custom",check:"custom",fn:t,...i})}function Na(e,t,n){return new e({type:"custom",check:"custom",fn:t,...O(n)})}function Da(e){const t=Aa(n=>(n.addIssue=e=>{if("string"==typeof e)n.issues.push(K(e,n.value,t._zod.def));else{const i=e;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=t),i.continue??(i.continue=!t._zod.def.abort),n.issues.push(K(i))}},e(n.value,n)));return t}function Aa(e,t){const n=new Ut({check:"custom",...O(t)});return n._zod.check=e,n}function ja(e){const t=new Ut({check:"describe"});return t._zod.onattach=[t=>{const n=eo.get(t)??{};eo.add(t,{...n,description:e})}],t._zod.check=()=>{},t}function Pa(e){const t=new Ut({check:"meta"});return t._zod.onattach=[t=>{const n=eo.get(t)??{};eo.add(t,{...n,...e})}],t._zod.check=()=>{},t}function Za(e,t){const n=O(t);let i=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];"sensitive"!==n.case&&(i=i.map(e=>"string"==typeof e?e.toLowerCase():e),r=r.map(e=>"string"==typeof e?e.toLowerCase():e));const o=new Set(i),a=new Set(r),s=e.Codec??Ai,l=e.Boolean??Zn,c=new s({type:"pipe",in:new(e.String??an)({type:"string",error:n.error}),out:new l({type:"boolean",error:n.error}),transform:(e,t)=>{let i=e;return"sensitive"!==n.case&&(i=i.toLowerCase()),!!o.has(i)||!a.has(i)&&(t.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:t.value,inst:c,continue:!1}),{})},reverseTransform:(e,t)=>!0===e?i[0]||"true":r[0]||"false",error:n.error});return c}function Ra(e,t,n,i={}){const r=O(i),o={...O(i),check:"string_format",type:"string",format:t,fn:"function"==typeof n?n:e=>n.test(e),...r};n instanceof RegExp&&(o.pattern=n);return new e(o)}function qa(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??eo,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Ma(e,t,n={path:[],schemaPath:[]}){var i;const r=e._zod.def,o=t.seen.get(e);if(o){o.count++;return n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema}const a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a);const s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{const i={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,i);else{const n=a.schema,o=t.processors[r.type];if(!o)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);o(e,t,n,i)}const o=e._zod.parent;o&&(a.ref||(a.ref=o),Ma(o,t,i),t.seen.get(o).isParent=!0)}const l=t.metadataRegistry.get(e);l&&Object.assign(a.schema,l),"input"===t.io&&Va(e)&&(delete a.schema.examples,delete a.schema.default),"input"===t.io&&a.schema._prefault&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault;return t.seen.get(e).schema}function La(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=new Map;for(const t of e.seen.entries()){const n=e.metadataRegistry.get(t[0])?.id;if(n){const e=i.get(n);if(e&&e!==t[0])throw new Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(n,t[0])}}const r=t=>{if(t[1].schema.$ref)return;const i=t[1],{ref:r,defId:o}=(t=>{const i="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){const n=e.external.registry.get(t[0])?.id,r=e.external.uri??(e=>e);if(n)return{ref:r(n)};const o=t[1].defId??t[1].schema.id??"schema"+e.counter++;return t[1].defId=o,{defId:o,ref:`${r("__shared")}#/${i}/${o}`}}if(t[1]===n)return{ref:"#"};const r=`#/${i}/`,o=t[1].schema.id??"__schema"+e.counter++;return{defId:o,ref:r+o}})(t);i.def={...i.schema},o&&(i.defId=o);const a=i.schema;for(const e in a)delete a[e];a.$ref=r};if("throw"===e.cycles)for(const t of e.seen.entries()){const e=t[1];if(e.cycle)throw new Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>\n\nSet the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const n of e.seen.entries()){const i=n[1];if(t===n[0]){r(n);continue}if(e.external){const i=e.external.registry.get(n[0])?.id;if(t!==n[0]&&i){r(n);continue}}const o=e.metadataRegistry.get(n[0])?.id;o?r(n):(i.cycle||i.count>1&&"ref"===e.reused)&&r(n)}}function Fa(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=t=>{const n=e.seen.get(t);if(null===n.ref)return;const r=n.def??n.schema,o={...r},a=n.ref;if(n.ref=null,a){i(a);const n=e.seen.get(a),s=n.schema;!s.$ref||"draft-07"!==e.target&&"draft-04"!==e.target&&"openapi-3.0"!==e.target?Object.assign(r,s):(r.allOf=r.allOf??[],r.allOf.push(s)),Object.assign(r,o);if(t._zod.parent===a)for(const e in r)"$ref"!==e&&"allOf"!==e&&(e in o||delete r[e]);if(s.$ref&&n.def)for(const e in r)"$ref"!==e&&"allOf"!==e&&e in n.def&&JSON.stringify(r[e])===JSON.stringify(n.def[e])&&delete r[e]}const s=t._zod.parent;if(s&&s!==a){i(s);const t=e.seen.get(s);if(t?.schema.$ref&&(r.$ref=t.schema.$ref,t.def))for(const e in r)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(r[e])===JSON.stringify(t.def[e])&&delete r[e]}e.override({zodSchema:t,jsonSchema:r,path:n.path??[]})};for(const t of[...e.seen.entries()].reverse())i(t[0]);const r={};if("draft-2020-12"===e.target?r.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?r.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?r.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const n=e.external.registry.get(t)?.id;if(!n)throw new Error("Schema is missing an `id` property");r.$id=e.external.uri(n)}Object.assign(r,n.def??n.schema);const o=e.external?.defs??{};for(const t of e.seen.entries()){const e=t[1];e.def&&e.defId&&(o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&("draft-2020-12"===e.target?r.$defs=o:r.definitions=o);try{const n=JSON.parse(JSON.stringify(r));return Object.defineProperty(n,"~standard",{value:{...t["~standard"],jsonSchema:{input:Ha(t,"input",e.processors),output:Ha(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch(e){throw new Error("Error converting schema to JSON.")}}function Va(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const i=e._zod.def;if("transform"===i.type)return!0;if("array"===i.type)return Va(i.element,n);if("set"===i.type)return Va(i.valueType,n);if("lazy"===i.type)return Va(i.getter(),n);if("promise"===i.type||"optional"===i.type||"nonoptional"===i.type||"nullable"===i.type||"readonly"===i.type||"default"===i.type||"prefault"===i.type)return Va(i.innerType,n);if("intersection"===i.type)return Va(i.left,n)||Va(i.right,n);if("record"===i.type||"map"===i.type)return Va(i.keyType,n)||Va(i.valueType,n);if("pipe"===i.type)return Va(i.in,n)||Va(i.out,n);if("object"===i.type){for(const e in i.shape)if(Va(i.shape[e],n))return!0;return!1}if("union"===i.type){for(const e of i.options)if(Va(e,n))return!0;return!1}if("tuple"===i.type){for(const e of i.items)if(Va(e,n))return!0;return!(!i.rest||!Va(i.rest,n))}return!1}const Ba=(e,t={})=>n=>{const i=qa({...n,processors:t});return Ma(e,i),La(i,e),Fa(i,e)},Ha=(e,t,n={})=>i=>{const{libraryOptions:r,target:o}=i??{},a=qa({...r??{},target:o,io:t,processors:n});return Ma(e,a),La(a,e),Fa(a,e)},Wa={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Ja=(e,t,n,i)=>{const r=n;r.type="string";const{minimum:o,maximum:a,format:s,patterns:l,contentEncoding:c}=e._zod.bag;if("number"==typeof o&&(r.minLength=o),"number"==typeof a&&(r.maxLength=a),s&&(r.format=Wa[s]??s,""===r.format&&delete r.format,"time"===s&&delete r.format),c&&(r.contentEncoding=c),l&&l.size>0){const e=[...l];1===e.length?r.pattern=e[0].source:e.length>1&&(r.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}},Ga=(e,t,n,i)=>{const r=n,{minimum:o,maximum:a,format:s,multipleOf:l,exclusiveMaximum:c,exclusiveMinimum:u}=e._zod.bag;"string"==typeof s&&s.includes("int")?r.type="integer":r.type="number","number"==typeof u&&("draft-04"===t.target||"openapi-3.0"===t.target?(r.minimum=u,r.exclusiveMinimum=!0):r.exclusiveMinimum=u),"number"==typeof o&&(r.minimum=o,"number"==typeof u&&"draft-04"!==t.target&&(u>=o?delete r.minimum:delete r.exclusiveMinimum)),"number"==typeof c&&("draft-04"===t.target||"openapi-3.0"===t.target?(r.maximum=c,r.exclusiveMaximum=!0):r.exclusiveMaximum=c),"number"==typeof a&&(r.maximum=a,"number"==typeof c&&"draft-04"!==t.target&&(c<=a?delete r.maximum:delete r.exclusiveMaximum)),"number"==typeof l&&(r.multipleOf=l)},Ka=(e,t,n,i)=>{n.type="boolean"},Xa=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("BigInt cannot be represented in JSON Schema")},Ya=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("Symbols cannot be represented in JSON Schema")},Qa=(e,t,n,i)=>{"openapi-3.0"===t.target?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},es=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("Undefined cannot be represented in JSON Schema")},ts=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("Void cannot be represented in JSON Schema")},ns=(e,t,n,i)=>{n.not={}},is=(e,t,n,i)=>{},rs=(e,t,n,i)=>{},os=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("Date cannot be represented in JSON Schema")},as=(e,t,n,i)=>{const r=c(e._zod.def.entries);r.every(e=>"number"==typeof e)&&(n.type="number"),r.every(e=>"string"==typeof e)&&(n.type="string"),n.enum=r},ss=(e,t,n,i)=>{const r=e._zod.def,o=[];for(const e of r.values)if(void 0===e){if("throw"===t.unrepresentable)throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if("bigint"==typeof e){if("throw"===t.unrepresentable)throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(e))}else o.push(e);if(0===o.length);else if(1===o.length){const e=o[0];n.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?n.enum=[e]:n.const=e}else o.every(e=>"number"==typeof e)&&(n.type="number"),o.every(e=>"string"==typeof e)&&(n.type="string"),o.every(e=>"boolean"==typeof e)&&(n.type="boolean"),o.every(e=>null===e)&&(n.type="null"),n.enum=o},ls=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("NaN cannot be represented in JSON Schema")},cs=(e,t,n,i)=>{const r=n,o=e._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");r.type="string",r.pattern=o.source},us=(e,t,n,i)=>{const r=n,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:l}=e._zod.bag;void 0!==a&&(o.minLength=a),void 0!==s&&(o.maxLength=s),l?1===l.length?(o.contentMediaType=l[0],Object.assign(r,o)):(Object.assign(r,o),r.anyOf=l.map(e=>({contentMediaType:e}))):Object.assign(r,o)},ds=(e,t,n,i)=>{n.type="boolean"},ps=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("Custom types cannot be represented in JSON Schema")},ms=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("Function types cannot be represented in JSON Schema")},fs=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("Transforms cannot be represented in JSON Schema")},hs=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("Map cannot be represented in JSON Schema")},gs=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("Set cannot be represented in JSON Schema")},vs=(e,t,n,i)=>{const r=n,o=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;"number"==typeof a&&(r.minItems=a),"number"==typeof s&&(r.maxItems=s),r.type="array",r.items=Ma(o.element,t,{...i,path:[...i.path,"items"]})},bs=(e,t,n,i)=>{const r=n,o=e._zod.def;r.type="object",r.properties={};const a=o.shape;for(const e in a)r.properties[e]=Ma(a[e],t,{...i,path:[...i.path,"properties",e]});const s=new Set(Object.keys(a)),l=new Set([...s].filter(e=>{const n=o.shape[e]._zod;return"input"===t.io?void 0===n.optin:void 0===n.optout}));l.size>0&&(r.required=Array.from(l)),"never"===o.catchall?._zod.def.type?r.additionalProperties=!1:o.catchall?o.catchall&&(r.additionalProperties=Ma(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):"output"===t.io&&(r.additionalProperties=!1)},ys=(e,t,n,i)=>{const r=e._zod.def,o=!1===r.inclusive,a=r.options.map((e,n)=>Ma(e,t,{...i,path:[...i.path,o?"oneOf":"anyOf",n]}));o?n.oneOf=a:n.anyOf=a},$s=(e,t,n,i)=>{const r=e._zod.def,o=Ma(r.left,t,{...i,path:[...i.path,"allOf",0]}),a=Ma(r.right,t,{...i,path:[...i.path,"allOf",1]}),s=e=>"allOf"in e&&1===Object.keys(e).length,l=[...s(o)?o.allOf:[o],...s(a)?a.allOf:[a]];n.allOf=l},_s=(e,t,n,i)=>{const r=n,o=e._zod.def;r.type="array";const a="draft-2020-12"===t.target?"prefixItems":"items",s="draft-2020-12"===t.target||"openapi-3.0"===t.target?"items":"additionalItems",l=o.items.map((e,n)=>Ma(e,t,{...i,path:[...i.path,a,n]})),c=o.rest?Ma(o.rest,t,{...i,path:[...i.path,s,..."openapi-3.0"===t.target?[o.items.length]:[]]}):null;"draft-2020-12"===t.target?(r.prefixItems=l,c&&(r.items=c)):"openapi-3.0"===t.target?(r.items={anyOf:l},c&&r.items.anyOf.push(c),r.minItems=l.length,c||(r.maxItems=l.length)):(r.items=l,c&&(r.additionalItems=c));const{minimum:u,maximum:d}=e._zod.bag;"number"==typeof u&&(r.minItems=u),"number"==typeof d&&(r.maxItems=d)},ks=(e,t,n,i)=>{const r=n,o=e._zod.def;r.type="object";const a=o.keyType,s=a._zod.bag,l=s?.patterns;if("loose"===o.mode&&l&&l.size>0){const e=Ma(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});r.patternProperties={};for(const t of l)r.patternProperties[t.source]=e}else"draft-07"!==t.target&&"draft-2020-12"!==t.target||(r.propertyNames=Ma(o.keyType,t,{...i,path:[...i.path,"propertyNames"]})),r.additionalProperties=Ma(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]});const c=a._zod.values;if(c){const e=[...c].filter(e=>"string"==typeof e||"number"==typeof e);e.length>0&&(r.required=e)}},ws=(e,t,n,i)=>{const r=e._zod.def,o=Ma(r.innerType,t,i),a=t.seen.get(e);"openapi-3.0"===t.target?(a.ref=r.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},xs=(e,t,n,i)=>{const r=e._zod.def;Ma(r.innerType,t,i);t.seen.get(e).ref=r.innerType},Is=(e,t,n,i)=>{const r=e._zod.def;Ma(r.innerType,t,i);t.seen.get(e).ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},Ss=(e,t,n,i)=>{const r=e._zod.def;Ma(r.innerType,t,i);t.seen.get(e).ref=r.innerType,"input"===t.io&&(n._prefault=JSON.parse(JSON.stringify(r.defaultValue)))},Es=(e,t,n,i)=>{const r=e._zod.def;Ma(r.innerType,t,i);let o;t.seen.get(e).ref=r.innerType;try{o=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=o},Ts=(e,t,n,i)=>{const r=e._zod.def,o="input"===t.io?"transform"===r.in._zod.def.type?r.out:r.in:r.out;Ma(o,t,i);t.seen.get(e).ref=o},zs=(e,t,n,i)=>{const r=e._zod.def;Ma(r.innerType,t,i);t.seen.get(e).ref=r.innerType,n.readOnly=!0},Cs=(e,t,n,i)=>{const r=e._zod.def;Ma(r.innerType,t,i);t.seen.get(e).ref=r.innerType},Os=(e,t,n,i)=>{const r=e._zod.def;Ma(r.innerType,t,i);t.seen.get(e).ref=r.innerType},Us=(e,t,n,i)=>{const r=e._zod.innerType;Ma(r,t,i);t.seen.get(e).ref=r},Ns={string:Ja,number:Ga,boolean:Ka,bigint:Xa,symbol:Ya,null:Qa,undefined:es,void:ts,never:ns,any:is,unknown:rs,date:os,enum:as,literal:ss,nan:ls,template_literal:cs,file:us,success:ds,custom:ps,function:ms,transform:fs,map:hs,set:gs,array:vs,object:bs,union:ys,intersection:$s,tuple:_s,record:ks,nullable:ws,nonoptional:xs,default:Is,prefault:Ss,catch:Es,pipe:Ts,readonly:zs,promise:Cs,optional:Os,lazy:Us};function Ds(e,t){if("_idmap"in e){const n=e,i=qa({...t,processors:Ns}),r={};for(const e of n._idmap.entries()){const[t,n]=e;Ma(n,i)}const o={},a={registry:n,uri:t?.uri,defs:r};i.external=a;for(const e of n._idmap.entries()){const[t,n]=e;La(i,n),o[t]=Fa(i,n)}if(Object.keys(r).length>0){const e="draft-2020-12"===i.target?"$defs":"definitions";o.__shared={[e]:r}}return{schemas:o}}const n=qa({...t,processors:Ns});return Ma(e,n),La(n,e),Fa(n,e)}var As=Object.freeze({__proto__:null}),js=Object.freeze({__proto__:null,$ZodAny:Vn,$ZodArray:Kn,$ZodAsyncError:o,$ZodBase64:zn,$ZodBase64URL:On,$ZodBigInt:Rn,$ZodBigIntFormat:qn,$ZodBoolean:Zn,$ZodCIDRv4:Sn,$ZodCIDRv6:En,$ZodCUID:fn,$ZodCUID2:hn,$ZodCatch:Oi,$ZodCheck:Ut,$ZodCheckBigIntFormat:Zt,$ZodCheckEndsWith:Xt,$ZodCheckGreaterThan:At,$ZodCheckIncludes:Gt,$ZodCheckLengthEquals:Vt,$ZodCheckLessThan:Dt,$ZodCheckLowerCase:Wt,$ZodCheckMaxLength:Lt,$ZodCheckMaxSize:Rt,$ZodCheckMimeType:en,$ZodCheckMinLength:Ft,$ZodCheckMinSize:qt,$ZodCheckMultipleOf:jt,$ZodCheckNumberFormat:Pt,$ZodCheckOverwrite:tn,$ZodCheckProperty:Qt,$ZodCheckRegex:Ht,$ZodCheckSizeEquals:Mt,$ZodCheckStartsWith:Kt,$ZodCheckStringFormat:Bt,$ZodCheckUpperCase:Jt,$ZodCodec:Ai,$ZodCustom:Vi,$ZodCustomStringFormat:An,$ZodDate:Jn,$ZodDefault:Ii,$ZodDiscriminatedUnion:ai,$ZodE164:Un,$ZodEmail:un,$ZodEmoji:pn,$ZodEncodeError:a,$ZodEnum:vi,$ZodError:te,$ZodExactOptional:wi,$ZodFile:yi,$ZodFunction:Mi,$ZodGUID:ln,$ZodIPv4:wn,$ZodIPv6:xn,$ZodISODate:$n,$ZodISODateTime:yn,$ZodISODuration:kn,$ZodISOTime:_n,$ZodIntersection:si,$ZodJWT:Dn,$ZodKSUID:bn,$ZodLazy:Fi,$ZodLiteral:bi,$ZodMAC:In,$ZodMap:mi,$ZodNaN:Ui,$ZodNanoID:mn,$ZodNever:Hn,$ZodNonOptional:Ti,$ZodNull:Fn,$ZodNullable:xi,$ZodNumber:jn,$ZodNumberFormat:Pn,$ZodObject:ei,$ZodObjectJIT:ti,$ZodOptional:ki,$ZodPipe:Ni,$ZodPrefault:Ei,$ZodPromise:Li,$ZodReadonly:Zi,$ZodRealError:ne,$ZodRecord:pi,$ZodRegistry:Yr,$ZodSet:hi,$ZodString:an,$ZodStringFormat:sn,$ZodSuccess:Ci,$ZodSymbol:Mn,$ZodTemplateLiteral:qi,$ZodTransform:$i,$ZodTuple:ui,$ZodType:on,$ZodULID:gn,$ZodURL:dn,$ZodUUID:cn,$ZodUndefined:Ln,$ZodUnion:ii,$ZodUnknown:Bn,$ZodVoid:Wn,$ZodXID:vn,$ZodXor:oi,$brand:r,$constructor:i,$input:Xr,$output:Kr,Doc:nn,JSONSchema:As,JSONSchemaGenerator:class{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(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??"draft-2020-12";"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),this.ctx=qa({processors:Ns,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return Ma(e,this.ctx,t)}emit(e,t){t&&(t.cycles&&(this.ctx.cycles=t.cycles),t.reused&&(this.ctx.reused=t.reused),t.external&&(this.ctx.external=t.external)),La(this.ctx,e);const n=Fa(this.ctx,e),{"~standard":i,...r}=n;return r}},NEVER:n,TimePrecision:Eo,_any:Jo,_array:Ca,_base64:wo,_base64url:xo,_bigint:Mo,_boolean:Ro,_catch:function(e,t,n){return new e({type:"catch",innerType:t,catchValue:"function"==typeof n?n:()=>n})},_check:Aa,_cidrv4:_o,_cidrv6:ko,_coercedBigint:Lo,_coercedBoolean:qo,_coercedDate:Qo,_coercedNumber:No,_coercedString:no,_cuid:mo,_cuid2:fo,_custom:Ua,_date:Yo,_decode:be,_decodeAsync:ke,_default:function(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return"function"==typeof n?n():S(n)}})},_discriminatedUnion:function(e,t,n,i){return new e({type:"union",options:n,discriminator:t,...O(i)})},_e164:Io,_email:io,_emoji:uo,_encode:ge,_encodeAsync:$e,_endsWith:_a,_enum:function(e,t,n){const i=Array.isArray(t)?Object.fromEntries(t.map(e=>[e,e])):t;return new e({type:"enum",entries:i,...O(n)})},_file:Oa,_float32:Ao,_float64:jo,_gt:ia,_gte:ra,_guid:ro,_includes:ya,_int:Do,_int32:Po,_int64:Fo,_intersection:function(e,t,n){return new e({type:"intersection",left:t,right:n})},_ipv4:bo,_ipv6:yo,_isoDate:zo,_isoDateTime:To,_isoDuration:Oo,_isoTime:Co,_jwt:So,_ksuid:vo,_lazy:function(e,t){return new e({type:"lazy",getter:t})},_length:ha,_literal:function(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...O(n)})},_lowercase:va,_lt:ta,_lte:na,_mac:$o,_map:function(e,t,n,i){return new e({type:"map",keyType:t,valueType:n,...O(i)})},_max:na,_maxLength:ma,_maxSize:ua,_mime:wa,_min:ra,_minLength:fa,_minSize:da,_multipleOf:ca,_nan:ea,_nanoid:po,_nativeEnum:function(e,t,n){return new e({type:"enum",entries:t,...O(n)})},_negative:aa,_never:Ko,_nonnegative:la,_nonoptional:function(e,t,n){return new e({type:"nonoptional",innerType:t,...O(n)})},_nonpositive:sa,_normalize:Ia,_null:Wo,_nullable:function(e,t){return new e({type:"nullable",innerType:t})},_number:Uo,_optional:function(e,t){return new e({type:"optional",innerType:t})},_overwrite:xa,_parse:le,_parseAsync:ue,_pipe:function(e,t,n){return new e({type:"pipe",in:t,out:n})},_positive:oa,_promise:function(e,t){return new e({type:"promise",innerType:t})},_property:ka,_readonly:function(e,t){return new e({type:"readonly",innerType:t})},_record:function(e,t,n,i){return new e({type:"record",keyType:t,valueType:n,...O(i)})},_refine:Na,_regex:ga,_safeDecode:Se,_safeDecodeAsync:Ce,_safeEncode:xe,_safeEncodeAsync:Te,_safeParse:pe,_safeParseAsync:fe,_set:function(e,t,n){return new e({type:"set",valueType:t,...O(n)})},_size:pa,_slugify:za,_startsWith:$a,_string:to,_stringFormat:Ra,_stringbool:Za,_success:function(e,t){return new e({type:"success",innerType:t})},_superRefine:Da,_symbol:Bo,_templateLiteral:function(e,t,n){return new e({type:"template_literal",parts:t,...O(n)})},_toLowerCase:Ea,_toUpperCase:Ta,_transform:function(e,t){return new e({type:"transform",transform:t})},_trim:Sa,_tuple:function(e,t,n,i){const r=n instanceof on;return new e({type:"tuple",items:t,rest:r?n:null,...O(r?i:n)})},_uint32:Zo,_uint64:Vo,_ulid:ho,_undefined:Ho,_union:function(e,t,n){return new e({type:"union",options:t,...O(n)})},_unknown:Go,_uppercase:ba,_url:co,_uuid:oo,_uuidv4:ao,_uuidv6:so,_uuidv7:lo,_void:Xo,_xid:go,_xor:function(e,t,n){return new e({type:"union",options:t,inclusive:!1,...O(n)})},clone:C,config:l,createStandardJSONSchemaMethod:Ha,createToJSONSchemaMethod:Ba,decode:ye,decodeAsync:we,describe:ja,encode:ve,encodeAsync:_e,extractDefs:La,finalize:Fa,flattenError:ie,formatError:re,globalConfig:s,globalRegistry:eo,initializeContext:qa,isValidBase64:Tn,isValidBase64URL:Cn,isValidJWT:Nn,locales:Gr,meta:Pa,parse:ce,parseAsync:de,prettifyError:se,process:Ma,regexes:Ot,registry:Qr,safeDecode:Ee,safeDecodeAsync:Oe,safeEncode:Ie,safeEncodeAsync:ze,safeParse:me,safeParseAsync:he,toDotPath:ae,toJSONSchema:Ds,treeifyError:oe,util:Q,version:rn});function Ps(e){return!!e._zod}function Zs(e,t){if(Ps(e)){return me(e,t)}return e.safeParse(t)}var Rs=Object.freeze({__proto__:null,endsWith:_a,gt:ia,gte:ra,includes:ya,length:ha,lowercase:va,lt:ta,lte:na,maxLength:ma,maxSize:ua,mime:wa,minLength:fa,minSize:da,multipleOf:ca,negative:aa,nonnegative:la,nonpositive:sa,normalize:Ia,overwrite:xa,positive:oa,property:ka,regex:ga,size:pa,slugify:za,startsWith:$a,toLowerCase:Ea,toUpperCase:Ta,trim:Sa,uppercase:ba});const qs=i("ZodISODateTime",(e,t)=>{yn.init(e,t),fl.init(e,t)});function Ms(e){return To(qs,e)}const Ls=i("ZodISODate",(e,t)=>{$n.init(e,t),fl.init(e,t)});function Fs(e){return zo(Ls,e)}const Vs=i("ZodISOTime",(e,t)=>{_n.init(e,t),fl.init(e,t)});function Bs(e){return Co(Vs,e)}const Hs=i("ZodISODuration",(e,t)=>{kn.init(e,t),fl.init(e,t)});function Ws(e){return Oo(Hs,e)}var Js=Object.freeze({__proto__:null,ZodISODate:Ls,ZodISODateTime:qs,ZodISODuration:Hs,ZodISOTime:Vs,date:Fs,datetime:Ms,duration:Ws,time:Bs});const Gs=(e,t)=>{te.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>re(e,t)},flatten:{value:t=>ie(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,d,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,d,2)}},isEmpty:{get:()=>0===e.issues.length}})},Ks=i("ZodError",Gs),Xs=i("ZodError",Gs,{Parent:Error}),Ys=le(Xs),Qs=ue(Xs),el=pe(Xs),tl=fe(Xs),nl=ge(Xs),il=be(Xs),rl=$e(Xs),ol=ke(Xs),al=xe(Xs),sl=Se(Xs),ll=Te(Xs),cl=Ce(Xs),ul=i("ZodType",(e,t)=>(on.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Ha(e,"input"),output:Ha(e,"output")}}),e.toJSONSchema=Ba(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(y(t,{checks:[...t.checks??[],...n.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>C(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>Ys(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>el(e,t,n),e.parseAsync=async(t,n)=>Qs(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>tl(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>nl(e,t,n),e.decode=(t,n)=>il(e,t,n),e.encodeAsync=async(t,n)=>rl(e,t,n),e.decodeAsync=async(t,n)=>ol(e,t,n),e.safeEncode=(t,n)=>al(e,t,n),e.safeDecode=(t,n)=>sl(e,t,n),e.safeEncodeAsync=async(t,n)=>ll(e,t,n),e.safeDecodeAsync=async(t,n)=>cl(e,t,n),e.refine=(t,n)=>e.check(id(t,n)),e.superRefine=t=>e.check(rd(t)),e.overwrite=t=>e.check(xa(t)),e.optional=()=>ku(e),e.exactOptional=()=>xu(e),e.nullable=()=>Su(e),e.nullish=()=>ku(Su(e)),e.nonoptional=t=>Nu(e,t),e.array=()=>Lc(e),e.or=t=>Gc([e,t]),e.and=t=>tu(e,t),e.transform=t=>Mu(e,$u(t)),e.default=t=>zu(e,t),e.prefault=t=>Ou(e,t),e.catch=t=>Pu(e,t),e.pipe=t=>Mu(e,t),e.readonly=()=>Bu(e),e.describe=t=>{const n=e.clone();return eo.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>eo.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return eo.get(e);const n=e.clone();return eo.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),dl=i("_ZodString",(e,t)=>{an.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Ja(e,t,n);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(ga(...t)),e.includes=(...t)=>e.check(ya(...t)),e.startsWith=(...t)=>e.check($a(...t)),e.endsWith=(...t)=>e.check(_a(...t)),e.min=(...t)=>e.check(fa(...t)),e.max=(...t)=>e.check(ma(...t)),e.length=(...t)=>e.check(ha(...t)),e.nonempty=(...t)=>e.check(fa(1,...t)),e.lowercase=t=>e.check(va(t)),e.uppercase=t=>e.check(ba(t)),e.trim=()=>e.check(Sa()),e.normalize=(...t)=>e.check(Ia(...t)),e.toLowerCase=()=>e.check(Ea()),e.toUpperCase=()=>e.check(Ta()),e.slugify=()=>e.check(za())}),pl=i("ZodString",(e,t)=>{an.init(e,t),dl.init(e,t),e.email=t=>e.check(io(hl,t)),e.url=t=>e.check(co(xl,t)),e.jwt=t=>e.check(So(ic,t)),e.emoji=t=>e.check(uo(El,t)),e.guid=t=>e.check(ro(vl,t)),e.uuid=t=>e.check(oo(yl,t)),e.uuidv4=t=>e.check(ao(yl,t)),e.uuidv6=t=>e.check(so(yl,t)),e.uuidv7=t=>e.check(lo(yl,t)),e.nanoid=t=>e.check(po(zl,t)),e.guid=t=>e.check(ro(vl,t)),e.cuid=t=>e.check(mo(Ol,t)),e.cuid2=t=>e.check(fo(Nl,t)),e.ulid=t=>e.check(ho(Al,t)),e.base64=t=>e.check(wo(Xl,t)),e.base64url=t=>e.check(xo(Ql,t)),e.xid=t=>e.check(go(Pl,t)),e.ksuid=t=>e.check(vo(Rl,t)),e.ipv4=t=>e.check(bo(Ml,t)),e.ipv6=t=>e.check(yo(Bl,t)),e.cidrv4=t=>e.check(_o(Wl,t)),e.cidrv6=t=>e.check(ko(Gl,t)),e.e164=t=>e.check(Io(tc,t)),e.datetime=t=>e.check(Ms(t)),e.date=t=>e.check(Fs(t)),e.time=t=>e.check(Bs(t)),e.duration=t=>e.check(Ws(t))});function ml(e){return to(pl,e)}const fl=i("ZodStringFormat",(e,t)=>{sn.init(e,t),dl.init(e,t)}),hl=i("ZodEmail",(e,t)=>{un.init(e,t),fl.init(e,t)});function gl(e){return io(hl,e)}const vl=i("ZodGUID",(e,t)=>{ln.init(e,t),fl.init(e,t)});function bl(e){return ro(vl,e)}const yl=i("ZodUUID",(e,t)=>{cn.init(e,t),fl.init(e,t)});function $l(e){return oo(yl,e)}function _l(e){return ao(yl,e)}function kl(e){return so(yl,e)}function wl(e){return lo(yl,e)}const xl=i("ZodURL",(e,t)=>{dn.init(e,t),fl.init(e,t)});function Il(e){return co(xl,e)}function Sl(e){return co(xl,{protocol:/^https?$/,hostname:nt,...O(e)})}const El=i("ZodEmoji",(e,t)=>{pn.init(e,t),fl.init(e,t)});function Tl(e){return uo(El,e)}const zl=i("ZodNanoID",(e,t)=>{mn.init(e,t),fl.init(e,t)});function Cl(e){return po(zl,e)}const Ol=i("ZodCUID",(e,t)=>{fn.init(e,t),fl.init(e,t)});function Ul(e){return mo(Ol,e)}const Nl=i("ZodCUID2",(e,t)=>{hn.init(e,t),fl.init(e,t)});function Dl(e){return fo(Nl,e)}const Al=i("ZodULID",(e,t)=>{gn.init(e,t),fl.init(e,t)});function jl(e){return ho(Al,e)}const Pl=i("ZodXID",(e,t)=>{vn.init(e,t),fl.init(e,t)});function Zl(e){return go(Pl,e)}const Rl=i("ZodKSUID",(e,t)=>{bn.init(e,t),fl.init(e,t)});function ql(e){return vo(Rl,e)}const Ml=i("ZodIPv4",(e,t)=>{wn.init(e,t),fl.init(e,t)});function Ll(e){return bo(Ml,e)}const Fl=i("ZodMAC",(e,t)=>{In.init(e,t),fl.init(e,t)});function Vl(e){return $o(Fl,e)}const Bl=i("ZodIPv6",(e,t)=>{xn.init(e,t),fl.init(e,t)});function Hl(e){return yo(Bl,e)}const Wl=i("ZodCIDRv4",(e,t)=>{Sn.init(e,t),fl.init(e,t)});function Jl(e){return _o(Wl,e)}const Gl=i("ZodCIDRv6",(e,t)=>{En.init(e,t),fl.init(e,t)});function Kl(e){return ko(Gl,e)}const Xl=i("ZodBase64",(e,t)=>{zn.init(e,t),fl.init(e,t)});function Yl(e){return wo(Xl,e)}const Ql=i("ZodBase64URL",(e,t)=>{On.init(e,t),fl.init(e,t)});function ec(e){return xo(Ql,e)}const tc=i("ZodE164",(e,t)=>{Un.init(e,t),fl.init(e,t)});function nc(e){return Io(tc,e)}const ic=i("ZodJWT",(e,t)=>{Dn.init(e,t),fl.init(e,t)});function rc(e){return So(ic,e)}const oc=i("ZodCustomStringFormat",(e,t)=>{An.init(e,t),fl.init(e,t)});function ac(e,t,n={}){return Ra(oc,e,t,n)}function sc(e){return Ra(oc,"hostname",tt,e)}function lc(e){return Ra(oc,"hex",bt,e)}function cc(e,t){const n=`${e}_${t?.enc??"hex"}`,i=Ot[n];if(!i)throw new Error(`Unrecognized hash format: ${n}`);return Ra(oc,n,i,t)}const uc=i("ZodNumber",(e,t)=>{jn.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Ga(e,t,n),e.gt=(t,n)=>e.check(ia(t,n)),e.gte=(t,n)=>e.check(ra(t,n)),e.min=(t,n)=>e.check(ra(t,n)),e.lt=(t,n)=>e.check(ta(t,n)),e.lte=(t,n)=>e.check(na(t,n)),e.max=(t,n)=>e.check(na(t,n)),e.int=t=>e.check(mc(t)),e.safe=t=>e.check(mc(t)),e.positive=t=>e.check(ia(0,t)),e.nonnegative=t=>e.check(ra(0,t)),e.negative=t=>e.check(ta(0,t)),e.nonpositive=t=>e.check(na(0,t)),e.multipleOf=(t,n)=>e.check(ca(t,n)),e.step=(t,n)=>e.check(ca(t,n)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function dc(e){return Uo(uc,e)}const pc=i("ZodNumberFormat",(e,t)=>{Pn.init(e,t),uc.init(e,t)});function mc(e){return Do(pc,e)}function fc(e){return Ao(pc,e)}function hc(e){return jo(pc,e)}function gc(e){return Po(pc,e)}function vc(e){return Zo(pc,e)}const bc=i("ZodBoolean",(e,t)=>{Zn.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(e,t,n)=>Ka(0,0,t)});function yc(e){return Ro(bc,e)}const $c=i("ZodBigInt",(e,t)=>{Rn.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(e,t,n)=>Xa(0,e),e.gte=(t,n)=>e.check(ra(t,n)),e.min=(t,n)=>e.check(ra(t,n)),e.gt=(t,n)=>e.check(ia(t,n)),e.gte=(t,n)=>e.check(ra(t,n)),e.min=(t,n)=>e.check(ra(t,n)),e.lt=(t,n)=>e.check(ta(t,n)),e.lte=(t,n)=>e.check(na(t,n)),e.max=(t,n)=>e.check(na(t,n)),e.positive=t=>e.check(ia(BigInt(0),t)),e.negative=t=>e.check(ta(BigInt(0),t)),e.nonpositive=t=>e.check(na(BigInt(0),t)),e.nonnegative=t=>e.check(ra(BigInt(0),t)),e.multipleOf=(t,n)=>e.check(ca(t,n));const n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function _c(e){return Mo($c,e)}const kc=i("ZodBigIntFormat",(e,t)=>{qn.init(e,t),$c.init(e,t)});function wc(e){return Fo(kc,e)}function xc(e){return Vo(kc,e)}const Ic=i("ZodSymbol",(e,t)=>{Mn.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(e,t,n)=>Ya(0,e)});function Sc(e){return Bo(Ic,e)}const Ec=i("ZodUndefined",(e,t)=>{Ln.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(e,t,n)=>es(0,e)});function Tc(e){return Ho(Ec,e)}const zc=i("ZodNull",(e,t)=>{Fn.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(e,t,n)=>Qa(0,e,t)});function Cc(e){return Wo(zc,e)}const Oc=i("ZodAny",(e,t)=>{Vn.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function Uc(){return Jo(Oc)}const Nc=i("ZodUnknown",(e,t)=>{Bn.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function Dc(){return Go(Nc)}const Ac=i("ZodNever",(e,t)=>{Hn.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ns(0,0,t)});function jc(e){return Ko(Ac,e)}const Pc=i("ZodVoid",(e,t)=>{Wn.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ts(0,e)});function Zc(e){return Xo(Pc,e)}const Rc=i("ZodDate",(e,t)=>{Jn.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(e,t,n)=>os(0,e),e.min=(t,n)=>e.check(ra(t,n)),e.max=(t,n)=>e.check(na(t,n));const n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function qc(e){return Yo(Rc,e)}const Mc=i("ZodArray",(e,t)=>{Kn.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>vs(e,t,n,i),e.element=t.element,e.min=(t,n)=>e.check(fa(t,n)),e.nonempty=t=>e.check(fa(1,t)),e.max=(t,n)=>e.check(ma(t,n)),e.length=(t,n)=>e.check(ha(t,n)),e.unwrap=()=>e.element});function Lc(e,t){return Ca(Mc,e,t)}function Fc(e){const t=e._zod.def.shape;return mu(Object.keys(t))}const Vc=i("ZodObject",(e,t)=>{ti.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>bs(e,t,n,i),v(e,"shape",()=>t.shape),e.keyof=()=>mu(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Dc()}),e.loose=()=>e.clone({...e._zod.def,catchall:Dc()}),e.strict=()=>e.clone({...e._zod.def,catchall:jc()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>Z(e,t),e.safeExtend=t=>R(e,t),e.merge=t=>q(e,t),e.pick=t=>j(e,t),e.omit=t=>P(e,t),e.partial=(...t)=>M(_u,e,t[0]),e.required=(...t)=>L(Uu,e,t[0])});function Bc(e,t){const n={type:"object",shape:e??{},...O(t)};return new Vc(n)}function Hc(e,t){return new Vc({type:"object",shape:e,catchall:jc(),...O(t)})}function Wc(e,t){return new Vc({type:"object",shape:e,catchall:Dc(),...O(t)})}const Jc=i("ZodUnion",(e,t)=>{ii.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>ys(e,t,n,i),e.options=t.options});function Gc(e,t){return new Jc({type:"union",options:e,...O(t)})}const Kc=i("ZodXor",(e,t)=>{Jc.init(e,t),oi.init(e,t),e._zod.processJSONSchema=(t,n,i)=>ys(e,t,n,i),e.options=t.options});function Xc(e,t){return new Kc({type:"union",options:e,inclusive:!1,...O(t)})}const Yc=i("ZodDiscriminatedUnion",(e,t)=>{Jc.init(e,t),ai.init(e,t)});function Qc(e,t,n){return new Yc({type:"union",options:t,discriminator:e,...O(n)})}const eu=i("ZodIntersection",(e,t)=>{si.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>$s(e,t,n,i)});function tu(e,t){return new eu({type:"intersection",left:e,right:t})}const nu=i("ZodTuple",(e,t)=>{ui.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>_s(e,t,n,i),e.rest=t=>e.clone({...e._zod.def,rest:t})});function iu(e,t,n){const i=t instanceof on;return new nu({type:"tuple",items:e,rest:i?t:null,...O(i?n:t)})}const ru=i("ZodRecord",(e,t)=>{pi.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>ks(e,t,n,i),e.keyType=t.keyType,e.valueType=t.valueType});function ou(e,t,n){return new ru({type:"record",keyType:e,valueType:t,...O(n)})}function au(e,t,n){const i=C(e);return i._zod.values=void 0,new ru({type:"record",keyType:i,valueType:t,...O(n)})}function su(e,t,n){return new ru({type:"record",keyType:e,valueType:t,mode:"loose",...O(n)})}const lu=i("ZodMap",(e,t)=>{mi.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(e,t,n)=>hs(0,e),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...t)=>e.check(da(...t)),e.nonempty=t=>e.check(da(1,t)),e.max=(...t)=>e.check(ua(...t)),e.size=(...t)=>e.check(pa(...t))});function cu(e,t,n){return new lu({type:"map",keyType:e,valueType:t,...O(n)})}const uu=i("ZodSet",(e,t)=>{hi.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(e,t,n)=>gs(0,e),e.min=(...t)=>e.check(da(...t)),e.nonempty=t=>e.check(da(1,t)),e.max=(...t)=>e.check(ua(...t)),e.size=(...t)=>e.check(pa(...t))});function du(e,t){return new uu({type:"set",valueType:e,...O(t)})}const pu=i("ZodEnum",(e,t)=>{vi.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>as(e,0,n),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(e,i)=>{const r={};for(const i of e){if(!n.has(i))throw new Error(`Key ${i} not found in enum`);r[i]=t.entries[i]}return new pu({...t,checks:[],...O(i),entries:r})},e.exclude=(e,i)=>{const r={...t.entries};for(const t of e){if(!n.has(t))throw new Error(`Key ${t} not found in enum`);delete r[t]}return new pu({...t,checks:[],...O(i),entries:r})}});function mu(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new pu({type:"enum",entries:n,...O(t)})}function fu(e,t){return new pu({type:"enum",entries:e,...O(t)})}const hu=i("ZodLiteral",(e,t)=>{bi.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>ss(e,t,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function gu(e,t){return new hu({type:"literal",values:Array.isArray(e)?e:[e],...O(t)})}const vu=i("ZodFile",(e,t)=>{yi.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>us(e,0,n),e.min=(t,n)=>e.check(da(t,n)),e.max=(t,n)=>e.check(ua(t,n)),e.mime=(t,n)=>e.check(wa(Array.isArray(t)?t:[t],n))});function bu(e){return Oa(vu,e)}const yu=i("ZodTransform",(e,t)=>{$i.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(e,t,n)=>fs(0,e),e._zod.parse=(n,i)=>{if("backward"===i.direction)throw new a(e.constructor.name);n.addIssue=i=>{if("string"==typeof i)n.issues.push(K(i,n.value,t));else{const t=i;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=n.value),t.inst??(t.inst=e),n.issues.push(K(t))}};const r=t.transform(n.value,n);return r instanceof Promise?r.then(e=>(n.value=e,n)):(n.value=r,n)}});function $u(e){return new yu({type:"transform",transform:e})}const _u=i("ZodOptional",(e,t)=>{ki.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Os(e,t,0,i),e.unwrap=()=>e._zod.def.innerType});function ku(e){return new _u({type:"optional",innerType:e})}const wu=i("ZodExactOptional",(e,t)=>{wi.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Os(e,t,0,i),e.unwrap=()=>e._zod.def.innerType});function xu(e){return new wu({type:"optional",innerType:e})}const Iu=i("ZodNullable",(e,t)=>{xi.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>ws(e,t,n,i),e.unwrap=()=>e._zod.def.innerType});function Su(e){return new Iu({type:"nullable",innerType:e})}function Eu(e){return ku(Su(e))}const Tu=i("ZodDefault",(e,t)=>{Ii.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Is(e,t,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function zu(e,t){return new Tu({type:"default",innerType:e,get defaultValue(){return"function"==typeof t?t():S(t)}})}const Cu=i("ZodPrefault",(e,t)=>{Ei.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Ss(e,t,n,i),e.unwrap=()=>e._zod.def.innerType});function Ou(e,t){return new Cu({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof t?t():S(t)}})}const Uu=i("ZodNonOptional",(e,t)=>{Ti.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>xs(e,t,0,i),e.unwrap=()=>e._zod.def.innerType});function Nu(e,t){return new Uu({type:"nonoptional",innerType:e,...O(t)})}const Du=i("ZodSuccess",(e,t)=>{Ci.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ds(0,0,t),e.unwrap=()=>e._zod.def.innerType});function Au(e){return new Du({type:"success",innerType:e})}const ju=i("ZodCatch",(e,t)=>{Oi.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Es(e,t,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Pu(e,t){return new ju({type:"catch",innerType:e,catchValue:"function"==typeof t?t:()=>t})}const Zu=i("ZodNaN",(e,t)=>{Ui.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ls(0,e)});function Ru(e){return ea(Zu,e)}const qu=i("ZodPipe",(e,t)=>{Ni.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Ts(e,t,0,i),e.in=t.in,e.out=t.out});function Mu(e,t){return new qu({type:"pipe",in:e,out:t})}const Lu=i("ZodCodec",(e,t)=>{qu.init(e,t),Ai.init(e,t)});function Fu(e,t,n){return new Lu({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}const Vu=i("ZodReadonly",(e,t)=>{Zi.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>zs(e,t,n,i),e.unwrap=()=>e._zod.def.innerType});function Bu(e){return new Vu({type:"readonly",innerType:e})}const Hu=i("ZodTemplateLiteral",(e,t)=>{qi.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>cs(e,0,n)});function Wu(e,t){return new Hu({type:"template_literal",parts:e,...O(t)})}const Ju=i("ZodLazy",(e,t)=>{Fi.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Us(e,t,0,i),e.unwrap=()=>e._zod.def.getter()});function Gu(e){return new Ju({type:"lazy",getter:e})}const Ku=i("ZodPromise",(e,t)=>{Li.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Cs(e,t,0,i),e.unwrap=()=>e._zod.def.innerType});function Xu(e){return new Ku({type:"promise",innerType:e})}const Yu=i("ZodFunction",(e,t)=>{Mi.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ms(0,e)});function Qu(e){return new Yu({type:"function",input:Array.isArray(e?.input)?iu(e?.input):e?.input??Lc(Dc()),output:e?.output??Dc()})}const ed=i("ZodCustom",(e,t)=>{Vi.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ps(0,e)});function td(e){const t=new Ut({check:"custom"});return t._zod.check=e,t}function nd(e,t){return Ua(ed,e??(()=>!0),t)}function id(e,t={}){return Na(ed,e,t)}function rd(e){return Da(e)}const od=ja,ad=Pa;function sd(e,t={}){const n=new ed({type:"custom",check:"custom",fn:t=>t instanceof e,abort:!0,...O(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:"invalid_type",expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}const ld=(...e)=>Za({Codec:Lu,Boolean:bc,String:pl},...e);function cd(e){const t=Gu(()=>Gc([ml(e),dc(),yc(),Cc(),Lc(t),ou(ml(),t)]));return t}function ud(e,t){return Mu($u(e),t)}const dd={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 pd(e){l({customError:e})}function md(){return l().customError}var fd;fd||(fd={});const hd={...Object.freeze({__proto__:null,ZodAny:Oc,ZodArray:Mc,ZodBase64:Xl,ZodBase64URL:Ql,ZodBigInt:$c,ZodBigIntFormat:kc,ZodBoolean:bc,ZodCIDRv4:Wl,ZodCIDRv6:Gl,ZodCUID:Ol,ZodCUID2:Nl,ZodCatch:ju,ZodCodec:Lu,ZodCustom:ed,ZodCustomStringFormat:oc,ZodDate:Rc,ZodDefault:Tu,ZodDiscriminatedUnion:Yc,ZodE164:tc,ZodEmail:hl,ZodEmoji:El,ZodEnum:pu,ZodExactOptional:wu,ZodFile:vu,ZodFunction:Yu,ZodGUID:vl,ZodIPv4:Ml,ZodIPv6:Bl,ZodIntersection:eu,ZodJWT:ic,ZodKSUID:Rl,ZodLazy:Ju,ZodLiteral:hu,ZodMAC:Fl,ZodMap:lu,ZodNaN:Zu,ZodNanoID:zl,ZodNever:Ac,ZodNonOptional:Uu,ZodNull:zc,ZodNullable:Iu,ZodNumber:uc,ZodNumberFormat:pc,ZodObject:Vc,ZodOptional:_u,ZodPipe:qu,ZodPrefault:Cu,ZodPromise:Ku,ZodReadonly:Vu,ZodRecord:ru,ZodSet:uu,ZodString:pl,ZodStringFormat:fl,ZodSuccess:Du,ZodSymbol:Ic,ZodTemplateLiteral:Hu,ZodTransform:yu,ZodTuple:nu,ZodType:ul,ZodULID:Al,ZodURL:xl,ZodUUID:yl,ZodUndefined:Ec,ZodUnion:Jc,ZodUnknown:Nc,ZodVoid:Pc,ZodXID:Pl,ZodXor:Kc,_ZodString:dl,_default:zu,_function:Qu,any:Uc,array:Lc,base64:Yl,base64url:ec,bigint:_c,boolean:yc,catch:Pu,check:td,cidrv4:Jl,cidrv6:Kl,codec:Fu,cuid:Ul,cuid2:Dl,custom:nd,date:qc,describe:od,discriminatedUnion:Qc,e164:nc,email:gl,emoji:Tl,enum:mu,exactOptional:xu,file:bu,float32:fc,float64:hc,function:Qu,guid:bl,hash:cc,hex:lc,hostname:sc,httpUrl:Sl,instanceof:sd,int:mc,int32:gc,int64:wc,intersection:tu,ipv4:Ll,ipv6:Hl,json:cd,jwt:rc,keyof:Fc,ksuid:ql,lazy:Gu,literal:gu,looseObject:Wc,looseRecord:su,mac:Vl,map:cu,meta:ad,nan:Ru,nanoid:Cl,nativeEnum:fu,never:jc,nonoptional:Nu,null:Cc,nullable:Su,nullish:Eu,number:dc,object:Bc,optional:ku,partialRecord:au,pipe:Mu,prefault:Ou,preprocess:ud,promise:Xu,readonly:Bu,record:ou,refine:id,set:du,strictObject:Hc,string:ml,stringFormat:ac,stringbool:ld,success:Au,superRefine:rd,symbol:Sc,templateLiteral:Wu,transform:$u,tuple:iu,uint32:vc,uint64:xc,ulid:jl,undefined:Tc,union:Gc,unknown:Dc,url:Il,uuid:$l,uuidv4:_l,uuidv6:kl,uuidv7:wl,void:Zc,xid:Zl,xor:Xc}),...Rs,iso:Js},gd=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 vd(e,t){if(void 0!==e.not){if("object"==typeof e.not&&0===Object.keys(e.not).length)return hd.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(void 0!==e.unevaluatedItems)throw new Error("unevaluatedItems is not supported");if(void 0!==e.unevaluatedProperties)throw new Error("unevaluatedProperties is not supported");if(void 0!==e.if||void 0!==e.then||void 0!==e.else)throw new Error("Conditional schemas (if/then/else) are not supported");if(void 0!==e.dependentSchemas||void 0!==e.dependentRequired)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){const n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return hd.lazy(()=>{if(!t.refs.has(n))throw new Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);const i=function(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");const n=e.slice(1).split("/").filter(Boolean);if(0===n.length)return t.rootSchema;const i="draft-2020-12"===t.version?"$defs":"definitions";if(n[0]===i){const i=n[1];if(!i||!t.defs[i])throw new Error(`Reference not found: ${e}`);return t.defs[i]}throw new Error(`Reference not found: ${e}`)}(n,t),r=bd(i,t);return t.refs.set(n,r),t.processing.delete(n),r}if(void 0!==e.enum){const n=e.enum;if("openapi-3.0"===t.version&&!0===e.nullable&&1===n.length&&null===n[0])return hd.null();if(0===n.length)return hd.never();if(1===n.length)return hd.literal(n[0]);if(n.every(e=>"string"==typeof e))return hd.enum(n);const i=n.map(e=>hd.literal(e));return i.length<2?i[0]:hd.union([i[0],i[1],...i.slice(2)])}if(void 0!==e.const)return hd.literal(e.const);const n=e.type;if(Array.isArray(n)){const i=n.map(n=>vd({...e,type:n},t));return 0===i.length?hd.never():1===i.length?i[0]:hd.union(i)}if(!n)return hd.any();let i;switch(n){case"string":{let t=hd.string();if(e.format){const n=e.format;"email"===n?t=t.check(hd.email()):"uri"===n||"uri-reference"===n?t=t.check(hd.url()):"uuid"===n||"guid"===n?t=t.check(hd.uuid()):"date-time"===n?t=t.check(hd.iso.datetime()):"date"===n?t=t.check(hd.iso.date()):"time"===n?t=t.check(hd.iso.time()):"duration"===n?t=t.check(hd.iso.duration()):"ipv4"===n?t=t.check(hd.ipv4()):"ipv6"===n?t=t.check(hd.ipv6()):"mac"===n?t=t.check(hd.mac()):"cidr"===n?t=t.check(hd.cidrv4()):"cidr-v6"===n?t=t.check(hd.cidrv6()):"base64"===n?t=t.check(hd.base64()):"base64url"===n?t=t.check(hd.base64url()):"e164"===n?t=t.check(hd.e164()):"jwt"===n?t=t.check(hd.jwt()):"emoji"===n?t=t.check(hd.emoji()):"nanoid"===n?t=t.check(hd.nanoid()):"cuid"===n?t=t.check(hd.cuid()):"cuid2"===n?t=t.check(hd.cuid2()):"ulid"===n?t=t.check(hd.ulid()):"xid"===n?t=t.check(hd.xid()):"ksuid"===n&&(t=t.check(hd.ksuid()))}"number"==typeof e.minLength&&(t=t.min(e.minLength)),"number"==typeof e.maxLength&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),i=t;break}case"number":case"integer":{let t="integer"===n?hd.number().int():hd.number();"number"==typeof e.minimum&&(t=t.min(e.minimum)),"number"==typeof e.maximum&&(t=t.max(e.maximum)),"number"==typeof e.exclusiveMinimum?t=t.gt(e.exclusiveMinimum):!0===e.exclusiveMinimum&&"number"==typeof e.minimum&&(t=t.gt(e.minimum)),"number"==typeof e.exclusiveMaximum?t=t.lt(e.exclusiveMaximum):!0===e.exclusiveMaximum&&"number"==typeof e.maximum&&(t=t.lt(e.maximum)),"number"==typeof e.multipleOf&&(t=t.multipleOf(e.multipleOf)),i=t;break}case"boolean":i=hd.boolean();break;case"null":i=hd.null();break;case"object":{const n={},r=e.properties||{},o=new Set(e.required||[]);for(const[e,i]of Object.entries(r)){const r=bd(i,t);n[e]=o.has(e)?r:r.optional()}if(e.propertyNames){const r=bd(e.propertyNames,t),o=e.additionalProperties&&"object"==typeof e.additionalProperties?bd(e.additionalProperties,t):hd.any();if(0===Object.keys(n).length){i=hd.record(r,o);break}const a=hd.object(n).passthrough(),s=hd.looseRecord(r,o);i=hd.intersection(a,s);break}if(e.patternProperties){const r=e.patternProperties,o=Object.keys(r),a=[];for(const e of o){const n=bd(r[e],t),i=hd.string().regex(new RegExp(e));a.push(hd.looseRecord(i,n))}const s=[];if(Object.keys(n).length>0&&s.push(hd.object(n).passthrough()),s.push(...a),0===s.length)i=hd.object({}).passthrough();else if(1===s.length)i=s[0];else{let e=hd.intersection(s[0],s[1]);for(let t=2;t<s.length;t++)e=hd.intersection(e,s[t]);i=e}break}const a=hd.object(n);i=!1===e.additionalProperties?a.strict():"object"==typeof e.additionalProperties?a.catchall(bd(e.additionalProperties,t)):a.passthrough();break}case"array":{const n=e.prefixItems,r=e.items;if(n&&Array.isArray(n)){const o=n.map(e=>bd(e,t)),a=r&&"object"==typeof r&&!Array.isArray(r)?bd(r,t):void 0;i=a?hd.tuple(o).rest(a):hd.tuple(o),"number"==typeof e.minItems&&(i=i.check(hd.minLength(e.minItems))),"number"==typeof e.maxItems&&(i=i.check(hd.maxLength(e.maxItems)))}else if(Array.isArray(r)){const n=r.map(e=>bd(e,t)),o=e.additionalItems&&"object"==typeof e.additionalItems?bd(e.additionalItems,t):void 0;i=o?hd.tuple(n).rest(o):hd.tuple(n),"number"==typeof e.minItems&&(i=i.check(hd.minLength(e.minItems))),"number"==typeof e.maxItems&&(i=i.check(hd.maxLength(e.maxItems)))}else if(void 0!==r){const n=bd(r,t);let o=hd.array(n);"number"==typeof e.minItems&&(o=o.min(e.minItems)),"number"==typeof e.maxItems&&(o=o.max(e.maxItems)),i=o}else i=hd.array(hd.any());break}default:throw new Error(`Unsupported type: ${n}`)}return e.description&&(i=i.describe(e.description)),void 0!==e.default&&(i=i.default(e.default)),i}function bd(e,t){if("boolean"==typeof e)return e?hd.any():hd.never();let n=vd(e,t);const i=e.type||void 0!==e.enum||void 0!==e.const;if(e.anyOf&&Array.isArray(e.anyOf)){const r=e.anyOf.map(e=>bd(e,t)),o=hd.union(r);n=i?hd.intersection(n,o):o}if(e.oneOf&&Array.isArray(e.oneOf)){const r=e.oneOf.map(e=>bd(e,t)),o=hd.xor(r);n=i?hd.intersection(n,o):o}if(e.allOf&&Array.isArray(e.allOf))if(0===e.allOf.length)n=i?n:hd.any();else{let r=i?n:bd(e.allOf[0],t);for(let n=i?0:1;n<e.allOf.length;n++)r=hd.intersection(r,bd(e.allOf[n],t));n=r}!0===e.nullable&&"openapi-3.0"===t.version&&(n=hd.nullable(n)),!0===e.readOnly&&(n=hd.readonly(n));const r={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(const t of o)t in e&&(r[t]=e[t]);const a=["contentEncoding","contentMediaType","contentSchema"];for(const t of a)t in e&&(r[t]=e[t]);for(const t of Object.keys(e))gd.has(t)||(r[t]=e[t]);return Object.keys(r).length>0&&t.registry.add(n,r),n}function yd(e,t){if("boolean"==typeof e)return e?hd.any():hd.never();const n=function(e,t){const n=e.$schema;return"https://json-schema.org/draft/2020-12/schema"===n?"draft-2020-12":"http://json-schema.org/draft-07/schema#"===n?"draft-7":"http://json-schema.org/draft-04/schema#"===n?"draft-4":t??"draft-2020-12"}(e,t?.defaultTarget);return bd(e,{version:n,defs:e.$defs||e.definitions||{},refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??eo})}var $d=Object.freeze({__proto__:null,bigint:function(e){return Lo($c,e)},boolean:function(e){return qo(bc,e)},date:function(e){return Qo(Rc,e)},number:function(e){return No(uc,e)},string:function(e){return no(pl,e)}});l(nr());var _d=Object.freeze({__proto__:null,$brand:r,$input:Xr,$output:Kr,NEVER:n,TimePrecision:Eo,ZodAny:Oc,ZodArray:Mc,ZodBase64:Xl,ZodBase64URL:Ql,ZodBigInt:$c,ZodBigIntFormat:kc,ZodBoolean:bc,ZodCIDRv4:Wl,ZodCIDRv6:Gl,ZodCUID:Ol,ZodCUID2:Nl,ZodCatch:ju,ZodCodec:Lu,ZodCustom:ed,ZodCustomStringFormat:oc,ZodDate:Rc,ZodDefault:Tu,ZodDiscriminatedUnion:Yc,ZodE164:tc,ZodEmail:hl,ZodEmoji:El,ZodEnum:pu,ZodError:Ks,ZodExactOptional:wu,ZodFile:vu,get ZodFirstPartyTypeKind(){return fd},ZodFunction:Yu,ZodGUID:vl,ZodIPv4:Ml,ZodIPv6:Bl,ZodISODate:Ls,ZodISODateTime:qs,ZodISODuration:Hs,ZodISOTime:Vs,ZodIntersection:eu,ZodIssueCode:dd,ZodJWT:ic,ZodKSUID:Rl,ZodLazy:Ju,ZodLiteral:hu,ZodMAC:Fl,ZodMap:lu,ZodNaN:Zu,ZodNanoID:zl,ZodNever:Ac,ZodNonOptional:Uu,ZodNull:zc,ZodNullable:Iu,ZodNumber:uc,ZodNumberFormat:pc,ZodObject:Vc,ZodOptional:_u,ZodPipe:qu,ZodPrefault:Cu,ZodPromise:Ku,ZodReadonly:Vu,ZodRealError:Xs,ZodRecord:ru,ZodSet:uu,ZodString:pl,ZodStringFormat:fl,ZodSuccess:Du,ZodSymbol:Ic,ZodTemplateLiteral:Hu,ZodTransform:yu,ZodTuple:nu,ZodType:ul,ZodULID:Al,ZodURL:xl,ZodUUID:yl,ZodUndefined:Ec,ZodUnion:Jc,ZodUnknown:Nc,ZodVoid:Pc,ZodXID:Pl,ZodXor:Kc,_ZodString:dl,_default:zu,_function:Qu,any:Uc,array:Lc,base64:Yl,base64url:ec,bigint:_c,boolean:yc,catch:Pu,check:td,cidrv4:Jl,cidrv6:Kl,clone:C,codec:Fu,coerce:$d,config:l,core:js,cuid:Ul,cuid2:Dl,custom:nd,date:qc,decode:il,decodeAsync:ol,describe:od,discriminatedUnion:Qc,e164:nc,email:gl,emoji:Tl,encode:nl,encodeAsync:rl,endsWith:_a,enum:mu,exactOptional:xu,file:bu,flattenError:ie,float32:fc,float64:hc,formatError:re,fromJSONSchema:yd,function:Qu,getErrorMap:md,globalRegistry:eo,gt:ia,gte:ra,guid:bl,hash:cc,hex:lc,hostname:sc,httpUrl:Sl,includes:ya,instanceof:sd,int:mc,int32:gc,int64:wc,intersection:tu,ipv4:Ll,ipv6:Hl,iso:Js,json:cd,jwt:rc,keyof:Fc,ksuid:ql,lazy:Gu,length:ha,literal:gu,locales:Gr,looseObject:Wc,looseRecord:su,lowercase:va,lt:ta,lte:na,mac:Vl,map:cu,maxLength:ma,maxSize:ua,meta:ad,mime:wa,minLength:fa,minSize:da,multipleOf:ca,nan:Ru,nanoid:Cl,nativeEnum:fu,negative:aa,never:jc,nonnegative:la,nonoptional:Nu,nonpositive:sa,normalize:Ia,null:Cc,nullable:Su,nullish:Eu,number:dc,object:Bc,optional:ku,overwrite:xa,parse:Ys,parseAsync:Qs,partialRecord:au,pipe:Mu,positive:oa,prefault:Ou,preprocess:ud,prettifyError:se,promise:Xu,property:ka,readonly:Bu,record:ou,refine:id,regex:ga,regexes:Ot,registry:Qr,safeDecode:sl,safeDecodeAsync:cl,safeEncode:al,safeEncodeAsync:ll,safeParse:el,safeParseAsync:tl,set:du,setErrorMap:pd,size:pa,slugify:za,startsWith:$a,strictObject:Hc,string:ml,stringFormat:ac,stringbool:ld,success:Au,superRefine:rd,symbol:Sc,templateLiteral:Wu,toJSONSchema:Ds,toLowerCase:Ea,toUpperCase:Ta,transform:$u,treeifyError:oe,trim:Sa,tuple:iu,uint32:vc,uint64:xc,ulid:jl,undefined:Tc,union:Gc,unknown:Dc,uppercase:ba,url:Il,util:Q,uuid:$l,uuidv4:_l,uuidv6:kl,uuidv7:wl,void:Zc,xid:Zl,xor:Xc}),kd=Object.freeze({__proto__:null,$brand:r,$input:Xr,$output:Kr,NEVER:n,TimePrecision:Eo,ZodAny:Oc,ZodArray:Mc,ZodBase64:Xl,ZodBase64URL:Ql,ZodBigInt:$c,ZodBigIntFormat:kc,ZodBoolean:bc,ZodCIDRv4:Wl,ZodCIDRv6:Gl,ZodCUID:Ol,ZodCUID2:Nl,ZodCatch:ju,ZodCodec:Lu,ZodCustom:ed,ZodCustomStringFormat:oc,ZodDate:Rc,ZodDefault:Tu,ZodDiscriminatedUnion:Yc,ZodE164:tc,ZodEmail:hl,ZodEmoji:El,ZodEnum:pu,ZodError:Ks,ZodExactOptional:wu,ZodFile:vu,get ZodFirstPartyTypeKind(){return fd},ZodFunction:Yu,ZodGUID:vl,ZodIPv4:Ml,ZodIPv6:Bl,ZodISODate:Ls,ZodISODateTime:qs,ZodISODuration:Hs,ZodISOTime:Vs,ZodIntersection:eu,ZodIssueCode:dd,ZodJWT:ic,ZodKSUID:Rl,ZodLazy:Ju,ZodLiteral:hu,ZodMAC:Fl,ZodMap:lu,ZodNaN:Zu,ZodNanoID:zl,ZodNever:Ac,ZodNonOptional:Uu,ZodNull:zc,ZodNullable:Iu,ZodNumber:uc,ZodNumberFormat:pc,ZodObject:Vc,ZodOptional:_u,ZodPipe:qu,ZodPrefault:Cu,ZodPromise:Ku,ZodReadonly:Vu,ZodRealError:Xs,ZodRecord:ru,ZodSet:uu,ZodString:pl,ZodStringFormat:fl,ZodSuccess:Du,ZodSymbol:Ic,ZodTemplateLiteral:Hu,ZodTransform:yu,ZodTuple:nu,ZodType:ul,ZodULID:Al,ZodURL:xl,ZodUUID:yl,ZodUndefined:Ec,ZodUnion:Jc,ZodUnknown:Nc,ZodVoid:Pc,ZodXID:Pl,ZodXor:Kc,_ZodString:dl,_default:zu,_function:Qu,any:Uc,array:Lc,base64:Yl,base64url:ec,bigint:_c,boolean:yc,catch:Pu,check:td,cidrv4:Jl,cidrv6:Kl,clone:C,codec:Fu,coerce:$d,config:l,core:js,cuid:Ul,cuid2:Dl,custom:nd,date:qc,decode:il,decodeAsync:ol,describe:od,discriminatedUnion:Qc,e164:nc,email:gl,emoji:Tl,encode:nl,encodeAsync:rl,endsWith:_a,enum:mu,exactOptional:xu,file:bu,flattenError:ie,float32:fc,float64:hc,formatError:re,fromJSONSchema:yd,function:Qu,getErrorMap:md,globalRegistry:eo,gt:ia,gte:ra,guid:bl,hash:cc,hex:lc,hostname:sc,httpUrl:Sl,includes:ya,instanceof:sd,int:mc,int32:gc,int64:wc,intersection:tu,ipv4:Ll,ipv6:Hl,iso:Js,json:cd,jwt:rc,keyof:Fc,ksuid:ql,lazy:Gu,length:ha,literal:gu,locales:Gr,looseObject:Wc,looseRecord:su,lowercase:va,lt:ta,lte:na,mac:Vl,map:cu,maxLength:ma,maxSize:ua,meta:ad,mime:wa,minLength:fa,minSize:da,multipleOf:ca,nan:Ru,nanoid:Cl,nativeEnum:fu,negative:aa,never:jc,nonnegative:la,nonoptional:Nu,nonpositive:sa,normalize:Ia,null:Cc,nullable:Su,nullish:Eu,number:dc,object:Bc,optional:ku,overwrite:xa,parse:Ys,parseAsync:Qs,partialRecord:au,pipe:Mu,positive:oa,prefault:Ou,preprocess:ud,prettifyError:se,promise:Xu,property:ka,readonly:Bu,record:ou,refine:id,regex:ga,regexes:Ot,registry:Qr,safeDecode:sl,safeDecodeAsync:cl,safeEncode:al,safeEncodeAsync:ll,safeParse:el,safeParseAsync:tl,set:du,setErrorMap:pd,size:pa,slugify:za,startsWith:$a,strictObject:Hc,string:ml,stringFormat:ac,stringbool:ld,success:Au,superRefine:rd,symbol:Sc,templateLiteral:Wu,toJSONSchema:Ds,toLowerCase:Ea,toUpperCase:Ta,transform:$u,treeifyError:oe,trim:Sa,tuple:iu,uint32:vc,uint64:xc,ulid:jl,undefined:Tc,union:Gc,unknown:Dc,uppercase:ba,url:Il,util:Q,uuid:$l,uuidv4:_l,uuidv6:kl,uuidv7:wl,void:Zc,xid:Zl,xor:Xc,z:_d});const wd="io.modelcontextprotocol/related-task",xd="2.0",Id=nd(e=>null!==e&&("object"==typeof e||"function"==typeof e)),Sd=Gc([ml(),dc().int()]),Ed=ml();Wc({ttl:dc().optional(),pollInterval:dc().optional()});const Td=Bc({ttl:dc().optional()}),zd=Bc({taskId:ml()}),Cd=Wc({progressToken:Sd.optional(),[wd]:zd.optional()}),Od=Bc({_meta:Cd.optional()}),Ud=Od.extend({task:Td.optional()}),Nd=Bc({method:ml(),params:Od.loose().optional()}),Dd=Bc({_meta:Cd.optional()}),Ad=Bc({method:ml(),params:Dd.loose().optional()}),jd=Wc({_meta:Cd.optional()}),Pd=Gc([ml(),dc().int()]),Zd=Bc({jsonrpc:gu(xd),id:Pd,...Nd.shape}).strict(),Rd=e=>Zd.safeParse(e).success,qd=Bc({jsonrpc:gu(xd),...Ad.shape}).strict(),Md=Bc({jsonrpc:gu(xd),id:Pd,result:jd}).strict(),Ld=e=>Md.safeParse(e).success;var Fd;!function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"}(Fd||(Fd={}));const Vd=Bc({jsonrpc:gu(xd),id:Pd.optional(),error:Bc({code:dc().int(),message:ml(),data:Dc().optional()})}).strict(),Bd=Gc([Zd,qd,Md,Vd]);Gc([Md,Vd]);const Hd=jd.strict(),Wd=Dd.extend({requestId:Pd.optional(),reason:ml().optional()}),Jd=Ad.extend({method:gu("notifications/cancelled"),params:Wd}),Gd=Bc({src:ml(),mimeType:ml().optional(),sizes:Lc(ml()).optional(),theme:mu(["light","dark"]).optional()}),Kd=Bc({icons:Lc(Gd).optional()}),Xd=Bc({name:ml(),title:ml().optional()}),Yd=Xd.extend({...Xd.shape,...Kd.shape,version:ml(),websiteUrl:ml().optional(),description:ml().optional()}),Qd=tu(Bc({applyDefaults:yc().optional()}),ou(ml(),Dc())),ep=ud(e=>e&&"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length?{form:{}}:e,tu(Bc({form:Qd.optional(),url:Id.optional()}),ou(ml(),Dc()).optional())),tp=Wc({list:Id.optional(),cancel:Id.optional(),requests:Wc({sampling:Wc({createMessage:Id.optional()}).optional(),elicitation:Wc({create:Id.optional()}).optional()}).optional()}),np=Wc({list:Id.optional(),cancel:Id.optional(),requests:Wc({tools:Wc({call:Id.optional()}).optional()}).optional()}),ip=Bc({experimental:ou(ml(),Id).optional(),sampling:Bc({context:Id.optional(),tools:Id.optional()}).optional(),elicitation:ep.optional(),roots:Bc({listChanged:yc().optional()}).optional(),tasks:tp.optional(),extensions:ou(ml(),Id).optional()}),rp=Od.extend({protocolVersion:ml(),capabilities:ip,clientInfo:Yd}),op=Nd.extend({method:gu("initialize"),params:rp}),ap=Bc({experimental:ou(ml(),Id).optional(),logging:Id.optional(),completions:Id.optional(),prompts:Bc({listChanged:yc().optional()}).optional(),resources:Bc({subscribe:yc().optional(),listChanged:yc().optional()}).optional(),tools:Bc({listChanged:yc().optional()}).optional(),tasks:np.optional(),extensions:ou(ml(),Id).optional()}),sp=jd.extend({protocolVersion:ml(),capabilities:ap,serverInfo:Yd,instructions:ml().optional()}),lp=Ad.extend({method:gu("notifications/initialized"),params:Dd.optional()}),cp=Nd.extend({method:gu("ping"),params:Od.optional()}),up=Bc({progress:dc(),total:ku(dc()),message:ku(ml())}),dp=Bc({...Dd.shape,...up.shape,progressToken:Sd}),pp=Ad.extend({method:gu("notifications/progress"),params:dp}),mp=Od.extend({cursor:Ed.optional()}),fp=Nd.extend({params:mp.optional()}),hp=jd.extend({nextCursor:Ed.optional()}),gp=mu(["working","input_required","completed","failed","cancelled"]),vp=Bc({taskId:ml(),status:gp,ttl:Gc([dc(),Cc()]),createdAt:ml(),lastUpdatedAt:ml(),pollInterval:ku(dc()),statusMessage:ku(ml())}),bp=jd.extend({task:vp}),yp=Dd.merge(vp),$p=Ad.extend({method:gu("notifications/tasks/status"),params:yp}),_p=Nd.extend({method:gu("tasks/get"),params:Od.extend({taskId:ml()})}),kp=jd.merge(vp),wp=Nd.extend({method:gu("tasks/result"),params:Od.extend({taskId:ml()})});jd.loose();const xp=fp.extend({method:gu("tasks/list")}),Ip=hp.extend({tasks:Lc(vp)}),Sp=Nd.extend({method:gu("tasks/cancel"),params:Od.extend({taskId:ml()})}),Ep=jd.merge(vp),Tp=Bc({uri:ml(),mimeType:ku(ml()),_meta:ou(ml(),Dc()).optional()}),zp=Tp.extend({text:ml()}),Cp=ml().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),Op=Tp.extend({blob:Cp}),Up=mu(["user","assistant"]),Np=Bc({audience:Lc(Up).optional(),priority:dc().min(0).max(1).optional(),lastModified:Ms({offset:!0}).optional()}),Dp=Bc({...Xd.shape,...Kd.shape,uri:ml(),description:ku(ml()),mimeType:ku(ml()),size:ku(dc()),annotations:Np.optional(),_meta:ku(Wc({}))}),Ap=Bc({...Xd.shape,...Kd.shape,uriTemplate:ml(),description:ku(ml()),mimeType:ku(ml()),annotations:Np.optional(),_meta:ku(Wc({}))}),jp=fp.extend({method:gu("resources/list")}),Pp=hp.extend({resources:Lc(Dp)}),Zp=fp.extend({method:gu("resources/templates/list")}),Rp=hp.extend({resourceTemplates:Lc(Ap)}),qp=Od.extend({uri:ml()}),Mp=qp,Lp=Nd.extend({method:gu("resources/read"),params:Mp}),Fp=jd.extend({contents:Lc(Gc([zp,Op]))}),Vp=Ad.extend({method:gu("notifications/resources/list_changed"),params:Dd.optional()}),Bp=qp,Hp=Nd.extend({method:gu("resources/subscribe"),params:Bp}),Wp=qp,Jp=Nd.extend({method:gu("resources/unsubscribe"),params:Wp}),Gp=Dd.extend({uri:ml()}),Kp=Ad.extend({method:gu("notifications/resources/updated"),params:Gp}),Xp=Bc({name:ml(),description:ku(ml()),required:ku(yc())}),Yp=Bc({...Xd.shape,...Kd.shape,description:ku(ml()),arguments:ku(Lc(Xp)),_meta:ku(Wc({}))}),Qp=fp.extend({method:gu("prompts/list")}),em=hp.extend({prompts:Lc(Yp)}),tm=Od.extend({name:ml(),arguments:ou(ml(),ml()).optional()}),nm=Nd.extend({method:gu("prompts/get"),params:tm}),im=Bc({type:gu("text"),text:ml(),annotations:Np.optional(),_meta:ou(ml(),Dc()).optional()}),rm=Bc({type:gu("image"),data:Cp,mimeType:ml(),annotations:Np.optional(),_meta:ou(ml(),Dc()).optional()}),om=Bc({type:gu("audio"),data:Cp,mimeType:ml(),annotations:Np.optional(),_meta:ou(ml(),Dc()).optional()}),am=Bc({type:gu("tool_use"),name:ml(),id:ml(),input:ou(ml(),Dc()),_meta:ou(ml(),Dc()).optional()}),sm=Bc({type:gu("resource"),resource:Gc([zp,Op]),annotations:Np.optional(),_meta:ou(ml(),Dc()).optional()}),lm=Dp.extend({type:gu("resource_link")}),cm=Gc([im,rm,om,lm,sm]),um=Bc({role:Up,content:cm}),dm=jd.extend({description:ml().optional(),messages:Lc(um)}),pm=Ad.extend({method:gu("notifications/prompts/list_changed"),params:Dd.optional()}),mm=Bc({title:ml().optional(),readOnlyHint:yc().optional(),destructiveHint:yc().optional(),idempotentHint:yc().optional(),openWorldHint:yc().optional()}),fm=Bc({taskSupport:mu(["required","optional","forbidden"]).optional()}),hm=Bc({...Xd.shape,...Kd.shape,description:ml().optional(),inputSchema:Bc({type:gu("object"),properties:ou(ml(),Id).optional(),required:Lc(ml()).optional()}).catchall(Dc()),outputSchema:Bc({type:gu("object"),properties:ou(ml(),Id).optional(),required:Lc(ml()).optional()}).catchall(Dc()).optional(),annotations:mm.optional(),execution:fm.optional(),_meta:ou(ml(),Dc()).optional()}),gm=fp.extend({method:gu("tools/list")}),vm=hp.extend({tools:Lc(hm)}),bm=jd.extend({content:Lc(cm).default([]),structuredContent:ou(ml(),Dc()).optional(),isError:yc().optional()});bm.or(jd.extend({toolResult:Dc()}));const ym=Ud.extend({name:ml(),arguments:ou(ml(),Dc()).optional()}),$m=Nd.extend({method:gu("tools/call"),params:ym}),_m=Ad.extend({method:gu("notifications/tools/list_changed"),params:Dd.optional()});Bc({autoRefresh:yc().default(!0),debounceMs:dc().int().nonnegative().default(300)});const km=mu(["debug","info","notice","warning","error","critical","alert","emergency"]),wm=Od.extend({level:km}),xm=Nd.extend({method:gu("logging/setLevel"),params:wm}),Im=Dd.extend({level:km,logger:ml().optional(),data:Dc()}),Sm=Ad.extend({method:gu("notifications/message"),params:Im}),Em=Bc({name:ml().optional()}),Tm=Bc({hints:Lc(Em).optional(),costPriority:dc().min(0).max(1).optional(),speedPriority:dc().min(0).max(1).optional(),intelligencePriority:dc().min(0).max(1).optional()}),zm=Bc({mode:mu(["auto","required","none"]).optional()}),Cm=Bc({type:gu("tool_result"),toolUseId:ml().describe("The unique identifier for the corresponding tool call."),content:Lc(cm).default([]),structuredContent:Bc({}).loose().optional(),isError:yc().optional(),_meta:ou(ml(),Dc()).optional()}),Om=Qc("type",[im,rm,om]),Um=Qc("type",[im,rm,om,am,Cm]),Nm=Bc({role:Up,content:Gc([Um,Lc(Um)]),_meta:ou(ml(),Dc()).optional()}),Dm=Ud.extend({messages:Lc(Nm),modelPreferences:Tm.optional(),systemPrompt:ml().optional(),includeContext:mu(["none","thisServer","allServers"]).optional(),temperature:dc().optional(),maxTokens:dc().int(),stopSequences:Lc(ml()).optional(),metadata:Id.optional(),tools:Lc(hm).optional(),toolChoice:zm.optional()}),Am=Nd.extend({method:gu("sampling/createMessage"),params:Dm}),jm=jd.extend({model:ml(),stopReason:ku(mu(["endTurn","stopSequence","maxTokens"]).or(ml())),role:Up,content:Om}),Pm=jd.extend({model:ml(),stopReason:ku(mu(["endTurn","stopSequence","maxTokens","toolUse"]).or(ml())),role:Up,content:Gc([Um,Lc(Um)])}),Zm=Bc({type:gu("boolean"),title:ml().optional(),description:ml().optional(),default:yc().optional()}),Rm=Bc({type:gu("string"),title:ml().optional(),description:ml().optional(),minLength:dc().optional(),maxLength:dc().optional(),format:mu(["email","uri","date","date-time"]).optional(),default:ml().optional()}),qm=Bc({type:mu(["number","integer"]),title:ml().optional(),description:ml().optional(),minimum:dc().optional(),maximum:dc().optional(),default:dc().optional()}),Mm=Bc({type:gu("string"),title:ml().optional(),description:ml().optional(),enum:Lc(ml()),default:ml().optional()}),Lm=Bc({type:gu("string"),title:ml().optional(),description:ml().optional(),oneOf:Lc(Bc({const:ml(),title:ml()})),default:ml().optional()}),Fm=Bc({type:gu("string"),title:ml().optional(),description:ml().optional(),enum:Lc(ml()),enumNames:Lc(ml()).optional(),default:ml().optional()}),Vm=Gc([Mm,Lm]),Bm=Gc([Bc({type:gu("array"),title:ml().optional(),description:ml().optional(),minItems:dc().optional(),maxItems:dc().optional(),items:Bc({type:gu("string"),enum:Lc(ml())}),default:Lc(ml()).optional()}),Bc({type:gu("array"),title:ml().optional(),description:ml().optional(),minItems:dc().optional(),maxItems:dc().optional(),items:Bc({anyOf:Lc(Bc({const:ml(),title:ml()}))}),default:Lc(ml()).optional()})]),Hm=Gc([Fm,Vm,Bm]),Wm=Gc([Hm,Zm,Rm,qm]),Jm=Gc([Ud.extend({mode:gu("form").optional(),message:ml(),requestedSchema:Bc({type:gu("object"),properties:ou(ml(),Wm),required:Lc(ml()).optional()})}),Ud.extend({mode:gu("url"),message:ml(),elicitationId:ml(),url:ml().url()})]),Gm=Nd.extend({method:gu("elicitation/create"),params:Jm}),Km=Dd.extend({elicitationId:ml()}),Xm=Ad.extend({method:gu("notifications/elicitation/complete"),params:Km}),Ym=jd.extend({action:mu(["accept","decline","cancel"]),content:ud(e=>null===e?void 0:e,ou(ml(),Gc([ml(),dc(),yc(),Lc(ml())])).optional())}),Qm=Bc({type:gu("ref/resource"),uri:ml()}),ef=Bc({type:gu("ref/prompt"),name:ml()}),tf=Od.extend({ref:Gc([ef,Qm]),argument:Bc({name:ml(),value:ml()}),context:Bc({arguments:ou(ml(),ml()).optional()}).optional()}),nf=Nd.extend({method:gu("completion/complete"),params:tf}),rf=jd.extend({completion:Wc({values:Lc(ml()).max(100),total:ku(dc().int()),hasMore:ku(yc())})}),of=Bc({uri:ml().startsWith("file://"),name:ml().optional(),_meta:ou(ml(),Dc()).optional()}),af=Nd.extend({method:gu("roots/list"),params:Od.optional()}),sf=jd.extend({roots:Lc(of)}),lf=Ad.extend({method:gu("notifications/roots/list_changed"),params:Dd.optional()});Gc([cp,op,nf,xm,nm,Qp,jp,Zp,Lp,Hp,Jp,$m,gm,_p,wp,xp,Sp]),Gc([Jd,pp,lp,lf,$p]),Gc([Hd,jm,Pm,Ym,sf,kp,Ip,bp]),Gc([cp,Am,Gm,af,_p,wp,xp,Sp]),Gc([Jd,pp,Sm,Kp,Vp,_m,pm,$p,Xm]),Gc([Hd,sp,rf,dm,em,Pp,Rp,Fp,bm,vm,kp,Ip,bp]);class cf extends Error{constructor(e,t,n){super(`MCP error ${e}: ${t}`),this.code=e,this.data=n,this.name="McpError"}static fromError(e,t,n){if(e===Fd.UrlElicitationRequired&&n){const e=n;if(e.elicitations)return new uf(e.elicitations,t)}return new cf(e,t,n)}}class uf extends cf{constructor(e,t=`URL elicitation${e.length>1?"s":""} required`){super(Fd.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}}function df(e){return"completed"===e||"failed"===e||"cancelled"===e}function pf(e){const t=function(e){if(!e)return;let t;if(Ps(e)){const n=e;t=n._zod?.def?.shape}else t=e.shape;if(t){if("function"==typeof t)try{return t()}catch{return}return t}}(e),n=t?.method;if(!n)throw new Error("Schema is missing a method literal");const i=function(e){if(Ps(e)){const t=e,n=t._zod?.def;if(n){if(void 0!==n.value)return n.value;if(Array.isArray(n.values)&&n.values.length>0)return n.values[0]}}const t=e._def;if(t){if(void 0!==t.value)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}const n=e.value;if(void 0!==n)return n}(n);if("string"!=typeof i)throw new Error("Schema method literal must be a string");return i}function mf(e,t){const n=Zs(e,t);if(!n.success)throw n.error;return n.data}new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");class ff{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(Jd,e=>{this._oncancel(e)}),this.setNotificationHandler(pp,e=>{this._onprogress(e)}),this.setRequestHandler(cp,e=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(_p,async(e,t)=>{const n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new cf(Fd.InvalidParams,"Failed to retrieve task: Task not found");return{...n}}),this.setRequestHandler(wp,async(e,t)=>{const n=async()=>{const i=e.params.taskId;if(this._taskMessageQueue){let e;for(;e=await this._taskMessageQueue.dequeue(i,t.sessionId);){if("response"===e.type||"error"===e.type){const t=e.message,n=t.id,i=this._requestResolvers.get(n);if(i)if(this._requestResolvers.delete(n),"response"===e.type)i(t);else{const e=t;i(new cf(e.error.code,e.error.message,e.error.data))}else{const t="response"===e.type?"Response":"Error";this._onerror(new Error(`${t} handler missing for request ${n}`))}continue}await(this._transport?.send(e.message,{relatedRequestId:t.requestId}))}}const r=await this._taskStore.getTask(i,t.sessionId);if(!r)throw new cf(Fd.InvalidParams,`Task not found: ${i}`);if(!df(r.status))return await this._waitForTaskUpdate(i,t.signal),await n();if(df(r.status)){const e=await this._taskStore.getTaskResult(i,t.sessionId);return this._clearTaskQueue(i),{...e,_meta:{...e._meta,[wd]:{taskId:i}}}}return await n()};return await n()}),this.setRequestHandler(xp,async(e,t)=>{try{const{tasks:n,nextCursor:i}=await this._taskStore.listTasks(e.params?.cursor,t.sessionId);return{tasks:n,nextCursor:i,_meta:{}}}catch(e){throw new cf(Fd.InvalidParams,`Failed to list tasks: ${e instanceof Error?e.message:String(e)}`)}}),this.setRequestHandler(Sp,async(e,t)=>{try{const n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new cf(Fd.InvalidParams,`Task not found: ${e.params.taskId}`);if(df(n.status))throw new cf(Fd.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(e.params.taskId,"cancelled","Client cancelled task execution.",t.sessionId),this._clearTaskQueue(e.params.taskId);const i=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!i)throw new cf(Fd.InvalidParams,`Task not found after cancellation: ${e.params.taskId}`);return{_meta:{},...i}}catch(e){if(e instanceof cf)throw e;throw new cf(Fd.InvalidRequest,`Failed to cancel task: ${e instanceof Error?e.message:String(e)}`)}}))}async _oncancel(e){if(!e.params.requestId)return;const t=this._requestHandlerAbortControllers.get(e.params.requestId);t?.abort(e.params.reason)}_setupTimeout(e,t,n,i,r=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(i,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:r,onTimeout:i})}_resetTimeout(e){const t=this._timeoutInfo.get(e);if(!t)return!1;const n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),cf.fromError(Fd.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){const t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=e;const t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),this._onclose()};const n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};const i=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{var n;i?.(e,t),Ld(e)||(n=e,Vd.safeParse(n).success)?this._onresponse(e):Rd(e)?this._onrequest(e,t):(e=>qd.safeParse(e).success)(e)?this._onnotification(e):this._onerror(new Error(`Unknown message type: ${JSON.stringify(e)}`))},await this._transport.start()}_onclose(){const e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(const e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();for(const e of this._requestHandlerAbortControllers.values())e.abort();this._requestHandlerAbortControllers.clear();const t=cf.fromError(Fd.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(const n of e.values())n(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){const t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;void 0!==t&&Promise.resolve().then(()=>t(e)).catch(e=>this._onerror(new Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){const n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,i=this._transport,r=e.params?._meta?.[wd]?.taskId;if(void 0===n){const t={jsonrpc:"2.0",id:e.id,error:{code:Fd.MethodNotFound,message:"Method not found"}};return void(r&&this._taskMessageQueue?this._enqueueTaskMessage(r,{type:"error",message:t,timestamp:Date.now()},i?.sessionId).catch(e=>this._onerror(new Error(`Failed to enqueue error response: ${e}`))):i?.send(t).catch(e=>this._onerror(new Error(`Failed to send an error response: ${e}`))))}const o=new AbortController;this._requestHandlerAbortControllers.set(e.id,o);const a=(s=e.params,Ud.safeParse(s).success?e.params.task:void 0);var s;const l=this._taskStore?this.requestTaskStore(e,i?.sessionId):void 0,c={signal:o.signal,sessionId:i?.sessionId,_meta:e.params?._meta,sendNotification:async t=>{if(o.signal.aborted)return;const n={relatedRequestId:e.id};r&&(n.relatedTask={taskId:r}),await this.notification(t,n)},sendRequest:async(t,n,i)=>{if(o.signal.aborted)throw new cf(Fd.ConnectionClosed,"Request was cancelled");const a={...i,relatedRequestId:e.id};r&&!a.relatedTask&&(a.relatedTask={taskId:r});const s=a.relatedTask?.taskId??r;return s&&l&&await l.updateTaskStatus(s,"input_required"),await this.request(t,n,a)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:r,taskStore:l,taskRequestedTtl:a?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{a&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,c)).then(async t=>{if(o.signal.aborted)return;const n={result:t,jsonrpc:"2.0",id:e.id};r&&this._taskMessageQueue?await this._enqueueTaskMessage(r,{type:"response",message:n,timestamp:Date.now()},i?.sessionId):await(i?.send(n))},async t=>{if(o.signal.aborted)return;const n={jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(t.code)?t.code:Fd.InternalError,message:t.message??"Internal error",...void 0!==t.data&&{data:t.data}}};r&&this._taskMessageQueue?await this._enqueueTaskMessage(r,{type:"error",message:n,timestamp:Date.now()},i?.sessionId):await(i?.send(n))}).catch(e=>this._onerror(new Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===o&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){const{progressToken:t,...n}=e.params,i=Number(t),r=this._progressHandlers.get(i);if(!r)return void this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));const o=this._responseHandlers.get(i),a=this._timeoutInfo.get(i);if(a&&o&&a.resetTimeoutOnProgress)try{this._resetTimeout(i)}catch(e){return this._responseHandlers.delete(i),this._progressHandlers.delete(i),this._cleanupTimeout(i),void o(e)}r(n)}_onresponse(e){const t=Number(e.id),n=this._requestResolvers.get(t);if(n){if(this._requestResolvers.delete(t),Ld(e))n(e);else{n(new cf(e.error.code,e.error.message,e.error.data))}return}const i=this._responseHandlers.get(t);if(void 0===i)return void this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));this._responseHandlers.delete(t),this._cleanupTimeout(t);let r=!1;if(Ld(e)&&e.result&&"object"==typeof e.result){const n=e.result;if(n.task&&"object"==typeof n.task){const e=n.task;"string"==typeof e.taskId&&(r=!0,this._taskProgressTokens.set(e.taskId,t))}}if(r||this._progressHandlers.delete(t),Ld(e))i(e);else{i(cf.fromError(e.error.code,e.error.message,e.error.data))}}get transport(){return this._transport}async close(){await(this._transport?.close())}async*requestStream(e,t,n){const{task:i}=n??{};if(!i){try{const i=await this.request(e,t,n);yield{type:"result",result:i}}catch(e){yield{type:"error",error:e instanceof cf?e:new cf(Fd.InternalError,String(e))}}return}let r;try{const i=await this.request(e,bp,n);if(!i.task)throw new cf(Fd.InternalError,"Task creation did not return a task");for(r=i.task.taskId,yield{type:"taskCreated",task:i.task};;){const e=await this.getTask({taskId:r},n);if(yield{type:"taskStatus",task:e},df(e.status)){if("completed"===e.status){const e=await this.getTaskResult({taskId:r},t,n);yield{type:"result",result:e}}else"failed"===e.status?yield{type:"error",error:new cf(Fd.InternalError,`Task ${r} failed`)}:"cancelled"===e.status&&(yield{type:"error",error:new cf(Fd.InternalError,`Task ${r} was cancelled`)});return}if("input_required"===e.status){const e=await this.getTaskResult({taskId:r},t,n);return void(yield{type:"result",result:e})}const i=e.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(e=>setTimeout(e,i)),n?.signal?.throwIfAborted()}}catch(e){yield{type:"error",error:e instanceof cf?e:new cf(Fd.InternalError,String(e))}}}request(e,t,n){const{relatedRequestId:i,resumptionToken:r,onresumptiontoken:o,task:a,relatedTask:s}=n??{};return new Promise((l,c)=>{const u=e=>{c(e)};if(!this._transport)return void u(new Error("Not connected"));if(!0===this._options?.enforceStrictCapabilities)try{this.assertCapabilityForMethod(e.method),a&&this.assertTaskCapability(e.method)}catch(e){return void u(e)}n?.signal?.throwIfAborted();const d=this._requestMessageId++,p={...e,jsonrpc:"2.0",id:d};n?.onprogress&&(this._progressHandlers.set(d,n.onprogress),p.params={...e.params,_meta:{...e.params?._meta||{},progressToken:d}}),a&&(p.params={...p.params,task:a}),s&&(p.params={...p.params,_meta:{...p.params?._meta||{},[wd]:s}});const m=e=>{this._responseHandlers.delete(d),this._progressHandlers.delete(d),this._cleanupTimeout(d),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:d,reason:String(e)}},{relatedRequestId:i,resumptionToken:r,onresumptiontoken:o}).catch(e=>this._onerror(new Error(`Failed to send cancellation: ${e}`)));const t=e instanceof cf?e:new cf(Fd.RequestTimeout,String(e));c(t)};this._responseHandlers.set(d,e=>{if(!n?.signal?.aborted){if(e instanceof Error)return c(e);try{const n=Zs(t,e.result);n.success?l(n.data):c(n.error)}catch(e){c(e)}}}),n?.signal?.addEventListener("abort",()=>{m(n?.signal?.reason)});const f=n?.timeout??6e4;this._setupTimeout(d,f,n?.maxTotalTimeout,()=>m(cf.fromError(Fd.RequestTimeout,"Request timed out",{timeout:f})),n?.resetTimeoutOnProgress??!1);const h=s?.taskId;if(h){const e=e=>{const t=this._responseHandlers.get(d);t?t(e):this._onerror(new Error(`Response handler missing for side-channeled request ${d}`))};this._requestResolvers.set(d,e),this._enqueueTaskMessage(h,{type:"request",message:p,timestamp:Date.now()}).catch(e=>{this._cleanupTimeout(d),c(e)})}else this._transport.send(p,{relatedRequestId:i,resumptionToken:r,onresumptiontoken:o}).catch(e=>{this._cleanupTimeout(d),c(e)})})}async getTask(e,t){return this.request({method:"tasks/get",params:e},kp,t)}async getTaskResult(e,t,n){return this.request({method:"tasks/result",params:e},t,n)}async listTasks(e,t){return this.request({method:"tasks/list",params:e},Ip,t)}async cancelTask(e,t){return this.request({method:"tasks/cancel",params:e},Ep,t)}async notification(e,t){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(e.method);const n=t?.relatedTask?.taskId;if(n){const i={...e,jsonrpc:"2.0",params:{...e.params,_meta:{...e.params?._meta||{},[wd]:t.relatedTask}}};return void await this._enqueueTaskMessage(n,{type:"notification",message:i,timestamp:Date.now()})}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;return this._pendingDebouncedNotifications.add(e.method),void Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let n={...e,jsonrpc:"2.0"};t?.relatedTask&&(n={...n,params:{...n.params,_meta:{...n.params?._meta||{},[wd]:t.relatedTask}}}),this._transport?.send(n,t).catch(e=>this._onerror(e))})}let i={...e,jsonrpc:"2.0"};t?.relatedTask&&(i={...i,params:{...i.params,_meta:{...i.params?._meta||{},[wd]:t.relatedTask}}}),await this._transport.send(i,t)}setRequestHandler(e,t){const n=pf(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(n,i)=>{const r=mf(e,n);return Promise.resolve(t(r,i))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){const n=pf(e);this._notificationHandlers.set(n,n=>{const i=mf(e,n);return Promise.resolve(t(i))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){const t=this._taskProgressTokens.get(e);void 0!==t&&(this._progressHandlers.delete(t),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,t,n){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");const i=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,n,i)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){const n=await this._taskMessageQueue.dequeueAll(e,t);for(const t of n)if("request"===t.type&&Rd(t.message)){const n=t.message.id,i=this._requestResolvers.get(n);i?(i(new cf(Fd.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(n)):this._onerror(new Error(`Resolver missing for request ${n} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t){let n=this._options?.defaultTaskPollInterval??1e3;try{const t=await(this._taskStore?.getTask(e));t?.pollInterval&&(n=t.pollInterval)}catch{}return new Promise((e,i)=>{if(t.aborted)return void i(new cf(Fd.InvalidRequest,"Request cancelled"));const r=setTimeout(e,n);t.addEventListener("abort",()=>{clearTimeout(r),i(new cf(Fd.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(e,t){const n=this._taskStore;if(!n)throw new Error("No task store configured");return{createTask:async i=>{if(!e)throw new Error("No request provided");return await n.createTask(i,e.id,{method:e.method,params:e.params},t)},getTask:async e=>{const i=await n.getTask(e,t);if(!i)throw new cf(Fd.InvalidParams,"Failed to retrieve task: Task not found");return i},storeTaskResult:async(e,i,r)=>{await n.storeTaskResult(e,i,r,t);const o=await n.getTask(e,t);if(o){const t=$p.parse({method:"notifications/tasks/status",params:o});await this.notification(t),df(o.status)&&this._cleanupTaskProgressHandler(e)}},getTaskResult:e=>n.getTaskResult(e,t),updateTaskStatus:async(e,i,r)=>{const o=await n.getTask(e,t);if(!o)throw new cf(Fd.InvalidParams,`Task "${e}" not found - it may have been cleaned up`);if(df(o.status))throw new cf(Fd.InvalidParams,`Cannot update task "${e}" from terminal status "${o.status}" to "${i}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(e,i,r,t);const a=await n.getTask(e,t);if(a){const t=$p.parse({method:"notifications/tasks/status",params:a});await this.notification(t),df(a.status)&&this._cleanupTaskProgressHandler(e)}},listTasks:e=>n.listTasks(e,t)}}}function hf(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}var gf;gf=function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')},typeof require<"u"?require:typeof Proxy<"u"&&new Proxy(gf,{get:(e,t)=>(typeof require<"u"?require:e)[t]});class vf extends ff{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(e,t){}_ensureEventSlot(e){let t=this._eventSlots.get(e);if(!t){let n=this.eventSchemas[e];if(!n)throw Error(`Unknown event: ${String(e)}`);t={listeners:[]},this._eventSlots.set(e,t);let i=n.shape.method.value;this._registeredMethods.add(i);let r=t;super.setNotificationHandler(n,t=>{let n=t.params;this.onEventDispatch(e,n),r.onHandler?.(n);for(let e of[...r.listeners])e(n)})}return t}setEventHandler(e,t){let n=this._ensureEventSlot(e);n.onHandler&&t&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", …) to add multiple listeners without replacing.`),n.onHandler=t}getEventHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let i=n.listeners.indexOf(t);-1!==i&&n.listeners.splice(i,1)}setRequestHandler=(e,t)=>{this._assertMethodNotRegistered(e,"setRequestHandler"),super.setRequestHandler(e,t)};setNotificationHandler=(e,t)=>{this._assertMethodNotRegistered(e,"setNotificationHandler"),super.setNotificationHandler(e,t)};warnIfRequestHandlerReplaced(e,t,n){t&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(e,t)=>{let n=e.shape.method.value;this._registeredMethods.add(n),super.setRequestHandler(e,t)};_assertMethodNotRegistered(e,t){let n=e.shape.method.value;if(this._registeredMethods.has(n))throw Error(`Handler for "${n}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(n)}}class bf{eventTarget;eventSource;messageListener;constructor(e=window.parent,t){this.eventTarget=e,this.eventSource=t,this.messageListener=e=>{if(t&&e.source!==this.eventSource)return void console.debug("Ignoring message from unknown source",e);let n=Bd.safeParse(e.data);n.success?(console.debug("Parsed message",n.data),this.onmessage?.(n.data)):"2.0"!==e.data?.jsonrpc?console.debug("Ignoring non-JSON-RPC message",n.error.message,e):(console.error("Failed to parse message",n.error.message,e),this.onerror?.(Error("Invalid JSON-RPC message received: "+n.error.message)))}}async start(){window.addEventListener("message",this.messageListener)}async send(e,t){"ui/notifications/tool-input-partial"!==e.method&&console.debug("Sending message",e),this.eventTarget.postMessage(e,"*")}async close(){window.removeEventListener("message",this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion}var yf=Gc([gu("light"),gu("dark")]).describe("Color theme preference for the host environment."),$f=Gc([gu("inline"),gu("fullscreen"),gu("pip")]).describe("Display mode for UI presentation."),_f=ou(Gc([gu("--color-background-primary"),gu("--color-background-secondary"),gu("--color-background-tertiary"),gu("--color-background-inverse"),gu("--color-background-ghost"),gu("--color-background-info"),gu("--color-background-danger"),gu("--color-background-success"),gu("--color-background-warning"),gu("--color-background-disabled"),gu("--color-text-primary"),gu("--color-text-secondary"),gu("--color-text-tertiary"),gu("--color-text-inverse"),gu("--color-text-ghost"),gu("--color-text-info"),gu("--color-text-danger"),gu("--color-text-success"),gu("--color-text-warning"),gu("--color-text-disabled"),gu("--color-border-primary"),gu("--color-border-secondary"),gu("--color-border-tertiary"),gu("--color-border-inverse"),gu("--color-border-ghost"),gu("--color-border-info"),gu("--color-border-danger"),gu("--color-border-success"),gu("--color-border-warning"),gu("--color-border-disabled"),gu("--color-ring-primary"),gu("--color-ring-secondary"),gu("--color-ring-inverse"),gu("--color-ring-info"),gu("--color-ring-danger"),gu("--color-ring-success"),gu("--color-ring-warning"),gu("--font-sans"),gu("--font-mono"),gu("--font-weight-normal"),gu("--font-weight-medium"),gu("--font-weight-semibold"),gu("--font-weight-bold"),gu("--font-text-xs-size"),gu("--font-text-sm-size"),gu("--font-text-md-size"),gu("--font-text-lg-size"),gu("--font-heading-xs-size"),gu("--font-heading-sm-size"),gu("--font-heading-md-size"),gu("--font-heading-lg-size"),gu("--font-heading-xl-size"),gu("--font-heading-2xl-size"),gu("--font-heading-3xl-size"),gu("--font-text-xs-line-height"),gu("--font-text-sm-line-height"),gu("--font-text-md-line-height"),gu("--font-text-lg-line-height"),gu("--font-heading-xs-line-height"),gu("--font-heading-sm-line-height"),gu("--font-heading-md-line-height"),gu("--font-heading-lg-line-height"),gu("--font-heading-xl-line-height"),gu("--font-heading-2xl-line-height"),gu("--font-heading-3xl-line-height"),gu("--border-radius-xs"),gu("--border-radius-sm"),gu("--border-radius-md"),gu("--border-radius-lg"),gu("--border-radius-xl"),gu("--border-radius-full"),gu("--border-width-regular"),gu("--shadow-hairline"),gu("--shadow-sm"),gu("--shadow-md"),gu("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming.").describe("Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record<K, string | undefined>` rather than `Partial<Record<K, string>>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation."),Gc([ml(),Tc()]).describe("Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record<K, string | undefined>` rather than `Partial<Record<K, string>>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.")).describe("Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record<K, string | undefined>` rather than `Partial<Record<K, string>>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.");Bc({method:gu("ui/open-link"),params:Bc({url:ml().describe("URL to open in the host's browser")})});var kf=Bc({isError:yc().optional().describe("True if the host failed to open the URL (e.g., due to security policy).")}).passthrough(),wf=Bc({isError:yc().optional().describe("True if the download failed (e.g., user cancelled or host denied).")}).passthrough(),xf=Bc({isError:yc().optional().describe("True if the host rejected or failed to deliver the message.")}).passthrough();Bc({method:gu("ui/notifications/sandbox-proxy-ready"),params:Bc({})});var If=Bc({connectDomains:Lc(ml()).optional().describe("Origins for network requests (fetch/XHR/WebSocket).\n\n- Maps to CSP `connect-src` directive\n- Empty or omitted → no network connections (secure default)"),resourceDomains:Lc(ml()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted → no network resources (secure default)"),frameDomains:Lc(ml()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:Lc(ml()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)")}),Sf=Bc({camera:Bc({}).optional().describe("Request camera access.\n\nMaps to Permission Policy `camera` feature."),microphone:Bc({}).optional().describe("Request microphone access.\n\nMaps to Permission Policy `microphone` feature."),geolocation:Bc({}).optional().describe("Request geolocation access.\n\nMaps to Permission Policy `geolocation` feature."),clipboardWrite:Bc({}).optional().describe("Request clipboard write access.\n\nMaps to Permission Policy `clipboard-write` feature.")});Bc({method:gu("ui/notifications/size-changed"),params:Bc({width:dc().optional().describe("New width in pixels."),height:dc().optional().describe("New height in pixels.")})});var Ef=Bc({method:gu("ui/notifications/tool-input"),params:Bc({arguments:ou(ml(),Dc().describe("Complete tool call arguments as key-value pairs.")).optional().describe("Complete tool call arguments as key-value pairs.")})}),Tf=Bc({method:gu("ui/notifications/tool-input-partial"),params:Bc({arguments:ou(ml(),Dc().describe("Partial tool call arguments (incomplete, may change).")).optional().describe("Partial tool call arguments (incomplete, may change).")})}),zf=Bc({method:gu("ui/notifications/tool-cancelled"),params:Bc({reason:ml().optional().describe('Optional reason for the cancellation (e.g., "user action", "timeout").')})}),Cf=Bc({fonts:ml().optional()}),Of=Bc({variables:_f.optional().describe("CSS variables for theming the app."),css:Cf.optional().describe("CSS blocks that apps can inject.")}),Uf=Bc({method:gu("ui/resource-teardown"),params:Bc({})});ou(ml(),Dc());var Nf=Bc({text:Bc({}).optional().describe("Host supports text content blocks."),image:Bc({}).optional().describe("Host supports image content blocks."),audio:Bc({}).optional().describe("Host supports audio content blocks."),resource:Bc({}).optional().describe("Host supports resource content blocks."),resourceLink:Bc({}).optional().describe("Host supports resource link content blocks."),structuredContent:Bc({}).optional().describe("Host supports structured content.")});Bc({method:gu("ui/notifications/request-teardown"),params:Bc({}).optional()});var Df=Bc({experimental:ou(ml(),ou(ml(),Uc()).describe("Experimental features keyed by identifier.")).optional().describe("Experimental features keyed by identifier."),openLinks:Bc({}).optional().describe("Host supports opening external URLs."),downloadFile:Bc({}).optional().describe("Host supports file downloads via ui/download-file."),serverTools:Bc({listChanged:yc().optional().describe("Host supports tools/list_changed notifications.")}).optional().describe("Host can proxy tool calls to the MCP server."),serverResources:Bc({listChanged:yc().optional().describe("Host supports resources/list_changed notifications.")}).optional().describe("Host can proxy resource reads to the MCP server."),logging:Bc({}).optional().describe("Host accepts log messages."),sandbox:Bc({permissions:Sf.optional().describe("Permissions granted by the host (camera, microphone, geolocation)."),csp:If.optional().describe("CSP domains approved by the host.")}).optional().describe("Sandbox configuration applied by the host."),updateModelContext:Nf.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."),message:Nf.optional().describe("Host supports receiving content messages (ui/message) from the view."),sampling:Bc({tools:Bc({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),Af=Bc({experimental:ou(ml(),ou(ml(),Uc()).describe("Experimental features keyed by identifier.")).optional().describe("Experimental features keyed by identifier."),tools:Bc({listChanged:yc().optional().describe("App supports tools/list_changed notifications.")}).optional().describe("App exposes MCP-style tools that the host can call."),availableDisplayModes:Lc($f).optional().describe("Display modes the app supports.")});Bc({method:gu("ui/notifications/initialized"),params:Bc({}).optional()}),Bc({csp:If.optional().describe("Content Security Policy configuration for UI resources."),permissions:Sf.optional().describe("Sandbox permissions requested by the UI resource."),domain:ml().optional().describe("Dedicated origin for view sandbox.\n\nUseful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.\n\n**Host-dependent:** The format and validation rules for this field are determined by each host. Servers MUST consult host-specific documentation for the expected domain format. Common patterns include:\n- Hash-based subdomains (e.g., `{hash}.claudemcpcontent.com`)\n- URL-derived subdomains (e.g., `www-example-com.oaiusercontent.com`)\n\nIf omitted, host uses default sandbox origin (typically per-conversation)."),prefersBorder:yc().optional().describe("Visual boundary preference - true if view prefers a visible border.\n\nBoolean requesting whether a visible border and background is provided by the host. Specifying an explicit value for this is recommended because hosts' defaults may vary.\n\n- `true`: request visible border + background\n- `false`: request no visible border + background\n- omitted: host decides border")}),Bc({method:gu("ui/request-display-mode"),params:Bc({mode:$f.describe("The display mode being requested.")})});var jf=Bc({mode:$f.describe("The display mode that was actually set. May differ from requested if not supported.")}).passthrough(),Pf=Gc([gu("model"),gu("app")]).describe("Tool visibility scope - who can access the tool.");Bc({resourceUri:ml().optional(),visibility:Lc(Pf).optional().describe('Who can access this tool. Default: ["model", "app"]\n- "model": Tool visible to and callable by the agent\n- "app": Tool callable by the app from this server only'),csp:jc().optional(),permissions:jc().optional()}),Bc({mimeTypes:Lc(ml()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),Bc({method:gu("ui/download-file"),params:Bc({contents:Lc(Gc([sm,lm])).describe("Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.")})}),Bc({method:gu("ui/message"),params:Bc({role:gu("user").describe('Message role, currently only "user" is supported.'),content:Lc(cm).describe("Message content blocks (text, image, etc.).")})}),Bc({method:gu("ui/notifications/sandbox-resource-ready"),params:Bc({html:ml().describe("HTML content to load into the inner iframe."),sandbox:ml().optional().describe("Optional override for the inner iframe's sandbox attribute."),csp:If.optional().describe("CSP configuration from resource metadata."),permissions:Sf.optional().describe("Sandbox permissions from resource metadata.")})});var Zf=Bc({method:gu("ui/notifications/tool-result"),params:bm.describe("Standard MCP tool execution result.")}),Rf=Bc({toolInfo:Bc({id:Pd.optional().describe("JSON-RPC id of the tools/call request."),tool:hm.describe("Tool definition including name, inputSchema, etc.")}).optional().describe("Metadata of the tool call that instantiated this App."),theme:yf.optional().describe("Current color theme preference."),styles:Of.optional().describe("Style configuration for theming the app."),displayMode:$f.optional().describe("How the UI is currently displayed."),availableDisplayModes:Lc($f).optional().describe("Display modes the host supports."),containerDimensions:Gc([Bc({height:dc().describe("Fixed container height in pixels.")}),Bc({maxHeight:Gc([dc(),Tc()]).optional().describe("Maximum container height in pixels.")})]).and(Gc([Bc({width:dc().describe("Fixed container width in pixels.")}),Bc({maxWidth:Gc([dc(),Tc()]).optional().describe("Maximum container width in pixels.")})])).optional().describe("Container dimensions. Represents the dimensions of the iframe or other\ncontainer holding the app. Specify either width or maxWidth, and either height or maxHeight."),locale:ml().optional().describe("User's language and region preference in BCP 47 format."),timeZone:ml().optional().describe("User's timezone in IANA format."),userAgent:ml().optional().describe("Host application identifier."),platform:Gc([gu("web"),gu("desktop"),gu("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:Bc({touch:yc().optional().describe("Whether the device supports touch input."),hover:yc().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:Bc({top:dc().describe("Top safe area inset in pixels."),right:dc().describe("Right safe area inset in pixels."),bottom:dc().describe("Bottom safe area inset in pixels."),left:dc().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),qf=Bc({method:gu("ui/notifications/host-context-changed"),params:Rf.describe("Partial context update containing only changed fields.")});Bc({method:gu("ui/update-model-context"),params:Bc({content:Lc(cm).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:ou(ml(),Dc().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})}),Bc({method:gu("ui/initialize"),params:Bc({appInfo:Yd.describe("App identification (name and version)."),appCapabilities:Af.describe("Features and capabilities this app provides."),protocolVersion:ml().describe("Protocol version this app supports.")})});var Mf=Bc({protocolVersion:ml().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:Yd.describe("Host application identification and version."),hostCapabilities:Df.describe("Features and capabilities provided by the host."),hostContext:Rf.describe("Rich context about the host environment.")}).passthrough(),Lf={target:"draft-2020-12"};async function Ff(e,t){let n=e["~standard"];if(n.jsonSchema)return n.jsonSchema[t](Lf);if("zod"===n.vendor){let{z:n}=await Promise.resolve().then(function(){return kd});return n.toJSONSchema(e,{io:t})}throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function Vf(e,t,n=""){let i=await e["~standard"].validate(t);if(i.issues){let e=i.issues.map(e=>{let t=e.path?.map(e=>"object"==typeof e?e.key:e).join(".");return t?`${t}: ${e.message}`:e.message}).join("; ");throw Error(n+e)}return i.value}class Bf extends vf{_appInfo;_capabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_assertInitialized(e){if(this._initializedSent)return;let t=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(t);console.warn(`${t}. This will throw in a future release.`)}eventSchemas={toolinput:Ef,toolinputpartial:Tf,toolresult:Zf,toolcancelled:zf,hostcontextchanged:qf};static ONE_SHOT_EVENTS=new Set(["toolinput","toolinputpartial","toolresult","toolcancelled"]);_everHadListener=new Set;_assertHandlerTiming(e){if(!Bf.ONE_SHOT_EVENTS.has(e)||this._everHadListener.has(e))return;if(this._everHadListener.add(e),!this._initializedSent)return;let t=`[ext-apps] "${String(e)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(t);console.warn(t)}setEventHandler(e,t){t&&this._assertHandlerTiming(e),super.setEventHandler(e,t)}addEventListener(e,t){this._assertHandlerTiming(e),super.addEventListener(e,t)}onEventDispatch(e,t){"hostcontextchanged"===e&&(this._hostContext={...this._hostContext,...t})}constructor(e,t={},n={autoResize:!0}){super(n),this._appInfo=e,this._capabilities=t,this.options=n,n.allowUnsafeEval||l({jitless:!0}),this.setRequestHandler(cp,e=>(console.log("Received ping:",e.params),{})),this.setEventHandler("hostcontextchanged",void 0)}registerCapabilities(e){if(this.transport)throw Error("Cannot register capabilities after transport is established");this._capabilities=function(e,t){const n={...e};for(const e in t){const i=e,r=t[i];if(void 0===r)continue;const o=n[i];hf(o)&&hf(r)?n[i]={...o,...r}:n[i]=r}return n}(this._capabilities,e)}registerTool(e,t,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let i=this,r=()=>{i._initializedSent&&i._capabilities.tools?.listChanged&&i.sendToolListChanged()},o=void 0!==t.inputSchema,a={title:t.title,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema,annotations:t.annotations,_meta:t._meta,enabled:!0,enable(){this.enabled=!0,r()},disable(){this.enabled=!1,r()},update(e){Object.assign(this,e),r()},remove(){i._registeredTools[e]===a&&(delete i._registeredTools[e],r())},handler:async(t,i)=>{if(!a.enabled)throw Error(`Tool ${e} is disabled`);let r;if(o){let o=a.inputSchema,s=o?await Vf(o,t??{},`Invalid input for tool ${e}: `):t??{};r=await n(s,i)}else r=await n(i);return a.outputSchema&&!r.isError&&(r.structuredContent=await Vf(a.outputSchema,r.structuredContent,`Invalid output for tool ${e}: `)),r}};return this._registeredTools[e]=a,this._capabilities.tools||this.transport||this.registerCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),r(),a}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,t)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,t)},this.onlisttools=async(e,t)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([e,t])=>t.enabled).map(async([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?await Ff(t.inputSchema,"input"):{type:"object",properties:{}}};return t.outputSchema&&(n.outputSchema=await Ff(t.outputSchema,"output")),t.annotations&&(n.annotations=t.annotations),t._meta&&(n._meta=t._meta),n}))}))}async sendToolListChanged(e={}){this._assertInitialized("sendToolListChanged"),await this.notification({method:"notifications/tools/list_changed",params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler("toolinput")}set ontoolinput(e){this.setEventHandler("toolinput",e)}get ontoolinputpartial(){return this.getEventHandler("toolinputpartial")}set ontoolinputpartial(e){this.setEventHandler("toolinputpartial",e)}get ontoolresult(){return this.getEventHandler("toolresult")}set ontoolresult(e){this.setEventHandler("toolresult",e)}get ontoolcancelled(){return this.getEventHandler("toolcancelled")}set ontoolcancelled(e){this.setEventHandler("toolcancelled",e)}get onhostcontextchanged(){return this.getEventHandler("hostcontextchanged")}set onhostcontextchanged(e){this.setEventHandler("hostcontextchanged",e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced("onteardown",this._onteardown,e),this._onteardown=e,this.replaceRequestHandler(Uf,(e,t)=>{if(!this._onteardown)throw Error("No onteardown handler set");return this._onteardown(e.params,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced("oncalltool",this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler($m,(e,t)=>{if(!this._oncalltool)throw Error("No oncalltool handler set");return this._oncalltool(e.params,t)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced("onlisttools",this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler(gm,(e,t)=>{if(!this._onlisttools)throw Error("No onlisttools handler set");return this._onlisttools(e.params,t)})}assertCapabilityForMethod(e){if("sampling/createMessage"===e)if(!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`)}assertRequestHandlerCapability(e){switch(e){case"tools/call":case"tools/list":if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;case"ping":case"ui/resource-teardown":return;default:throw Error(`No handler for method ${e} registered`)}}assertNotificationCapability(e){}assertTaskCapability(e){throw Error("Tasks are not supported in MCP Apps")}assertTaskHandlerCapability(e){throw Error("Task handlers are not supported in MCP Apps")}async callServerTool(e,t){if(this._assertInitialized("callServerTool"),"string"==typeof e)throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:"tools/call",params:e},bm,{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async readServerResource(e,t){return this._assertInitialized("readServerResource"),await this.request({method:"resources/read",params:e},Fp,t)}async listServerResources(e,t){return this._assertInitialized("listServerResources"),await this.request({method:"resources/list",params:e},Pp,t)}async createSamplingMessage(e,t){this._assertInitialized("createSamplingMessage");let n=e.tools?Pm:jm;return await this.request({method:"sampling/createMessage",params:e},n,t)}sendMessage(e,t){return this._assertInitialized("sendMessage"),this.request({method:"ui/message",params:e},xf,t)}sendLog(e){return this.notification({method:"notifications/message",params:e})}updateModelContext(e,t){return this._assertInitialized("updateModelContext"),this.request({method:"ui/update-model-context",params:e},Hd,t)}openLink(e,t){return this._assertInitialized("openLink"),this.request({method:"ui/open-link",params:e},kf,t)}sendOpenLink=this.openLink;downloadFile(e,t){return this._assertInitialized("downloadFile"),this.request({method:"ui/download-file",params:e},wf,t)}requestTeardown(e={}){return this.notification({method:"ui/notifications/request-teardown",params:e})}requestDisplayMode(e,t){return this._assertInitialized("requestDisplayMode"),this.request({method:"ui/request-display-mode",params:e},jf,t)}sendSizeChanged(e){return this.notification({method:"ui/notifications/size-changed",params:e})}setupSizeChangedNotifications(){let e=!1,t=0,n=0,i=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let i=document.documentElement,r=i.style.height;i.style.height="max-content";let o=Math.ceil(i.getBoundingClientRect().height);i.style.height=r;let a=Math.ceil(window.innerWidth);a===t&&o===n||(t=a,n=o,this.sendSizeChanged({width:a,height:o}))}))};i();let r=new ResizeObserver(i);return r.observe(document.documentElement),r.observe(document.body),()=>r.disconnect()}async connect(e=new bf(window.parent,window.parent),t){if(this.transport)throw Error("App is already connected. Call close() before connecting again.");this._initializedSent=!1,await super.connect(e);try{let e=await this.request({method:"ui/initialize",params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:"2026-01-26"}},Mf,t);if(void 0===e)throw Error(`Server sent invalid initialize result: ${e}`);this._hostCapabilities=e.hostCapabilities,this._hostInfo=e.hostInfo,this._hostContext=e.hostContext,await this.notification({method:"ui/notifications/initialized"}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(e){throw this.close(),e}}}function Hf(){}function Wf(e,t){for(const n in t)e[n]=t[n];return e}function Jf(e){return e()}function Gf(){return Object.create(null)}function Kf(e){e.forEach(Jf)}function Xf(e){return"function"==typeof e}function Yf(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function Qf(e,t,n){e.$$.on_destroy.push(function(e,...t){if(null==e)return Hf;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}(t,n))}function eh(e,t,n,i){if(e){const r=th(e,t,n,i);return e[0](r)}}function th(e,t,n,i){return e[1]&&i?Wf(n.ctx.slice(),e[1](i(t))):n.ctx}function nh(e,t,n,i){if(e[2]&&i){const r=e[2](i(n));if(void 0===t.dirty)return r;if("object"==typeof r){const e=[],n=Math.max(t.dirty.length,r.length);for(let i=0;i<n;i+=1)e[i]=t.dirty[i]|r[i];return e}return t.dirty|r}return t.dirty}function ih(e,t,n,i,r,o){if(r){const a=th(t,n,i,o);e.p(a,r)}}function rh(e){if(e.ctx.length>32){const t=[],n=e.ctx.length/32;for(let e=0;e<n;e++)t[e]=-1;return t}return-1}function oh(e,t){const n={};t=new Set(t);for(const i in e)t.has(i)||"$"===i[0]||(n[i]=e[i]);return n}function ah(e){return e&&Xf(e.destroy)?e.destroy:Hf}function sh(e,t){e.appendChild(t)}function lh(e,t,n){const i=function(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;if(t&&t.host)return t;return e.ownerDocument}(e);if(!i.getElementById(t)){const e=dh("style");e.id=t,e.textContent=n,function(e,t){sh(e.head||e,t),t.sheet}(i,e)}}function ch(e,t,n){e.insertBefore(t,n||null)}function uh(e){e.parentNode&&e.parentNode.removeChild(e)}function dh(e){return document.createElement(e)}function ph(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function mh(e){return document.createTextNode(e)}function fh(){return mh(" ")}function hh(){return mh("")}function gh(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function vh(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function bh(e){let t;return{p(...n){t=n,t.forEach(t=>e.push(t))},r(){t.forEach(t=>e.splice(e.indexOf(t),1))}}}function yh(e,t){t=""+t,e.data!==t&&(e.data=t)}function $h(e,t){e.value=null==t?"":t}function _h(e,t,n,i){null==n?e.style.removeProperty(t):e.style.setProperty(t,n,"")}function kh(e,t,n){e.classList[n?"add":"remove"](t)}class wh{constructor(e=!1){this.is_svg=!1,this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,t,n=null){this.e||(this.is_svg?this.e=ph(t.nodeName):this.e=dh(11===t.nodeType?"TEMPLATE":t.nodeName),this.t="TEMPLATE"!==t.tagName?t:t.content,this.c(e)),this.i(n)}h(e){this.e.innerHTML=e,this.n=Array.from("TEMPLATE"===this.e.nodeName?this.e.content.childNodes:this.e.childNodes)}i(e){for(let t=0;t<this.n.length;t+=1)ch(this.t,this.n[t],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(uh)}}function xh(e,t){return new e(t)}let Ih;function Sh(e){Ih=e}function Eh(){if(!Ih)throw new Error("Function called outside component initialization");return Ih}function Th(e){Eh().$$.on_mount.push(e)}const zh=[],Ch=[];let Oh=[];const Uh=[],Nh=Promise.resolve();let Dh=!1;function Ah(e){Oh.push(e)}function jh(e){Uh.push(e)}const Ph=new Set;let Zh=0;function Rh(){if(0!==Zh)return;const e=Ih;do{try{for(;Zh<zh.length;){const e=zh[Zh];Zh++,Sh(e),qh(e.$$)}}catch(e){throw zh.length=0,Zh=0,e}for(Sh(null),zh.length=0,Zh=0;Ch.length;)Ch.pop()();for(let e=0;e<Oh.length;e+=1){const t=Oh[e];Ph.has(t)||(Ph.add(t),t())}Oh.length=0}while(zh.length);for(;Uh.length;)Uh.pop()();Dh=!1,Ph.clear(),Sh(e)}function qh(e){if(null!==e.fragment){e.update(),Kf(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(Ah)}}const Mh=new Set;let Lh;function Fh(){Lh={r:0,c:[],p:Lh}}function Vh(){Lh.r||Kf(Lh.c),Lh=Lh.p}function Bh(e,t){e&&e.i&&(Mh.delete(e),e.i(t))}function Hh(e,t,n,i){if(e&&e.o){if(Mh.has(e))return;Mh.add(e),Lh.c.push(()=>{Mh.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function Wh(e,t,n){const i=e.$$.props[t];void 0!==i&&(e.$$.bound[i]=n,n(e.$$.ctx[i]))}function Jh(e){e&&e.c()}function Gh(e,t,n,i){const{fragment:r,after_update:o}=e.$$;r&&r.m(t,n),i||Ah(()=>{const t=e.$$.on_mount.map(Jf).filter(Xf);e.$$.on_destroy?e.$$.on_destroy.push(...t):Kf(t),e.$$.on_mount=[]}),o.forEach(Ah)}function Kh(e,t){const n=e.$$;null!==n.fragment&&(!function(e){const t=[],n=[];Oh.forEach(i=>-1===e.indexOf(i)?t.push(i):n.push(i)),n.forEach(e=>e()),Oh=t}(n.after_update),Kf(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Xh(e,t){-1===e.$$.dirty[0]&&(zh.push(e),Dh||(Dh=!0,Nh.then(Rh)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Yh(e,t,n,i,r,o,a,s=[-1]){const l=Ih;Sh(e);const c=e.$$={fragment:null,ctx:[],props:o,update:Hf,not_equal:r,bound:Gf(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(l?l.$$.context:[])),callbacks:Gf(),dirty:s,skip_bound:!1,root:t.target||l.$$.root};a&&a(c.root);let u=!1;if(c.ctx=n?n(e,t.props||{},(t,n,...i)=>{const o=i.length?i[0]:n;return c.ctx&&r(c.ctx[t],c.ctx[t]=o)&&(!c.skip_bound&&c.bound[t]&&c.bound[t](o),u&&Xh(e,t)),n}):[],c.update(),u=!0,Kf(c.before_update),c.fragment=!!i&&i(c.ctx),t.target){if(t.hydrate){const e=function(e){return Array.from(e.childNodes)}(t.target);c.fragment&&c.fragment.l(e),e.forEach(uh)}else c.fragment&&c.fragment.c();t.intro&&Bh(e.$$.fragment),Gh(e,t.target,t.anchor,t.customElement),Rh()}Sh(l)}class Qh{$destroy(){Kh(this,1),this.$destroy=Hf}$on(e,t){if(!Xf(t))return Hf;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const eg=[];function tg(e,t=Hf){let n;const i=new Set;function r(t){if(Yf(e,t)&&(e=t,n)){const t=!eg.length;for(const t of i)t[1](),eg.push(t,e);if(t){for(let e=0;e<eg.length;e+=2)eg[e][0](eg[e+1]);eg.length=0}}}return{set:r,update:function(t){r(t(e))},subscribe:function(o,a=Hf){const s=[o,a];return i.add(s),1===i.size&&(n=t(r)||Hf),o(e),()=>{i.delete(s),0===i.size&&n&&(n(),n=null)}}}}const ng={message:!1,updateModelContext:!1,openLinks:!1};class ig extends Error{constructor(e="Update cancelled"){super(e),this.name="HandoffCancelledError"}}function rg(e){const t=e.getHostCapabilities();return{message:null!=t?.message,updateModelContext:null!=t?.updateModelContext,openLinks:null!=t?.openLinks}}function og(e){return e.message}function ag(e,t){return`I refined this contract in the Wizard UI beyond the initial MCP tool result. Here is the current generated source.\n\n\`\`\`${e}\n${t.trimEnd()}\n\`\`\``}async function sg(e){if(!navigator.clipboard?.writeText)throw new Error("Clipboard is not available in this host.");await navigator.clipboard.writeText(e)}const lg="mcp-external-links";function cg(e){lh(e,"svelte-h4n0sq",".mcp-shell.svelte-h4n0sq{height:var(--mcp-app-height);min-height:var(--mcp-app-height);background-color:var(--gray-1);box-sizing:border-box;font-size:12px;--text-small:0.75rem;--size-1:0.2rem;--size-2:0.35rem;--size-3:0.55rem;--size-4:0.7rem}.mcp-shell.svelte-h4n0sq .controls{padding:var(--size-3)}.mcp-shell.svelte-h4n0sq pre code.hljs{font-size:0.7rem;line-height:1.35}.footer.svelte-h4n0sq{display:flex;flex-direction:column;gap:0.35rem}.drift-notice.svelte-h4n0sq{padding:0.4rem 0.55rem;border:1px solid var(--gray-3);border-radius:8px;background:color-mix(in srgb, var(--gray-2) 65%, transparent)}.drift-text.svelte-h4n0sq{margin:0;font-size:0.75rem;line-height:1.4;color:var(--gray-5);text-align:left}.actions.svelte-h4n0sq{display:flex;justify-content:flex-end;align-items:center;gap:0.75rem}.actions.drifted.svelte-h4n0sq{justify-content:space-between}.restore-link.svelte-h4n0sq{padding:0;border:none;background:none;color:var(--gray-4);font:inherit;font-size:0.75rem;text-decoration:underline;cursor:pointer}.restore-link.svelte-h4n0sq:hover{color:var(--gray-5)}.restore-confirm.svelte-h4n0sq{display:inline-flex;flex-wrap:wrap;align-items:center;gap:0.35rem 0.5rem;font-size:0.75rem;color:var(--gray-5)}.restore-confirm-btn.svelte-h4n0sq{padding:0;border:none;background:none;color:var(--solidity-blue-2);font:inherit;font-size:0.75rem;font-weight:600;text-decoration:underline;cursor:pointer}.restore-confirm-btn.cancel.svelte-h4n0sq{color:var(--gray-4);font-weight:500}.use-button.svelte-h4n0sq{padding:0.45rem 0.9rem;border-radius:16px;border:1px solid var(--gray-3);background-color:var(--solidity-blue-2);color:white;font-weight:600;font-size:0.75rem;cursor:pointer}.use-button.drifted.svelte-h4n0sq:not(.disabled):not(:disabled){box-shadow:0 0 0 2px color-mix(in srgb, var(--solidity-blue-2) 35%, transparent)}.use-button.disabled.svelte-h4n0sq,.use-button.svelte-h4n0sq:disabled{opacity:0.5;cursor:not-allowed}.status.svelte-h4n0sq{margin:0;max-width:100%;font-size:0.75rem;text-align:right}.status.hint.svelte-h4n0sq{color:var(--gray-4)}.status.error.svelte-h4n0sq{color:var(--red-3)}.no-select.svelte-h4n0sq{-webkit-user-select:none;-moz-user-select:none;user-select:none}.tippy-box{font-size:12px;line-height:1.35}.tippy-box .tippy-content{padding:0.35rem 0.5rem}html.mcp-no-open-links .tippy-box a[href]{display:none}")}const ug=e=>({}),dg=e=>({});function pg(e){let t;return{c(){t=dh("div"),t.innerHTML='<p class="drift-text svelte-h4n0sq">Preview differs from the original tool run. The agent&#39;s reply from that run still matches the original\n settings. Send updates to the agent for it to see the new code.</p>',vh(t,"class","drift-notice svelte-h4n0sq")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function mg(e){let t;function n(e,t){return e[11]?hg:fg}let i=n(e),r=i(e);return{c(){r.c(),t=hh()},m(e,n){r.m(e,n),ch(e,t,n)},p(e,o){i===(i=n(e))&&r?r.p(e,o):(r.d(1),r=i(e),r&&(r.c(),r.m(t.parentNode,t)))},d(e){r.d(e),e&&uh(t)}}}function fg(e){let t,n,i;return{c(){t=dh("button"),t.textContent="Restore original",vh(t,"type","button"),vh(t,"class","restore-link svelte-h4n0sq")},m(r,o){ch(r,t,o),n||(i=gh(t,"click",e[25]),n=!0)},p:Hf,d(e){e&&uh(t),n=!1,i()}}}function hg(e){let t,n,i,r,o,a,s;return{c(){t=dh("span"),n=mh("Restore original settings?\n "),i=dh("button"),i.textContent="Confirm",r=fh(),o=dh("button"),o.textContent="Cancel",vh(i,"type","button"),vh(i,"class","restore-confirm-btn svelte-h4n0sq"),vh(o,"type","button"),vh(o,"class","restore-confirm-btn cancel svelte-h4n0sq"),vh(t,"class","restore-confirm svelte-h4n0sq")},m(l,c){ch(l,t,c),sh(t,n),sh(t,i),sh(t,r),sh(t,o),a||(s=[gh(i,"click",e[23]),gh(o,"click",e[24])],a=!0)},p:Hf,d(e){e&&uh(t),a=!1,Kf(s)}}}function gg(e){let t;return{c(){t=mh("Send Updates to Agent")},m(e,n){ch(e,t,n)},p:Hf,d(e){e&&uh(t)}}}function vg(e){let t;return{c(){t=mh("Copy to Clipboard")},m(e,n){ch(e,t,n)},p:Hf,d(e){e&&uh(t)}}}function bg(e){let t;return{c(){t=mh(e[8])},m(e,n){ch(e,t,n)},p(e,n){256&n&&yh(t,e[8])},d(e){e&&uh(t)}}}function yg(e){let t,n=e[12]?"Copying…":"Sending…";return{c(){t=mh(n)},m(e,n){ch(e,t,n)},p(e,i){4096&i&&n!==(n=e[12]?"Copying…":"Sending…")&&yh(t,n)},d(e){e&&uh(t)}}}function $g(e){let t;return{c(){t=mh("Connecting…")},m(e,n){ch(e,t,n)},p:Hf,d(e){e&&uh(t)}}}function _g(e){let t,n;return{c(){t=dh("p"),n=mh(e[10]),vh(t,"class","status hint svelte-h4n0sq")},m(e,i){ch(e,t,i),sh(t,n)},p(e,t){1024&t&&yh(n,e[10])},d(e){e&&uh(t)}}}function kg(e){let t,n;return{c(){t=dh("p"),n=mh(e[9]),vh(t,"class","status error svelte-h4n0sq")},m(e,i){ch(e,t,i),sh(t,n)},p(e,t){512&t&&yh(n,e[9])},d(e){e&&uh(t)}}}function wg(e){let t,n,i;return{c(){t=dh("p"),n=mh("Could not connect to host: "),i=mh(e[4]),vh(t,"class","status error svelte-h4n0sq")},m(e,r){ch(e,t,r),sh(t,n),sh(t,i)},p(e,t){16&t&&yh(i,e[4])},d(e){e&&uh(t)}}}function xg(e){let t,n,i,r,o,a,s,l,c,u,d,p,m,f,h,g,v,b,y,$,_;const k=e[22].controls,w=eh(k,e,e[21],dg);let x=e[5]&&pg(),I=e[5]&&e[6]&&mg(e);function S(e,t){return e[3]||e[4]?e[7]?yg:e[8]?bg:e[12]?vg:gg:$g}let E=S(e),T=E(e);function z(e,t){return e[4]?wg:e[9]?kg:e[10]?_g:void 0}let C=z(e),O=C&&C(e);return{c(){t=dh("div"),n=dh("div"),i=dh("div"),w&&w.c(),r=fh(),o=dh("div"),a=dh("pre"),s=mh(" "),l=dh("code"),u=mh("\n "),d=fh(),p=dh("div"),x&&x.c(),m=fh(),f=dh("div"),I&&I.c(),h=fh(),g=dh("button"),T.c(),b=fh(),O&&O.c(),vh(i,"class","controls min-w-[14rem] w-60 max-w-[42%] flex flex-col shrink-0 overflow-auto border-r border-[var(--gray-3)]"),vh(l,"class",c="hljs "+e[2]+" grow overflow-auto p-2 "+(e[1]?"no-select":"")+" svelte-h4n0sq"),vh(a,"class","flex flex-col grow basis-0 overflow-auto m-0"),vh(o,"class","output flex flex-col grow min-w-0 overflow-hidden"),vh(n,"class","flex flex-row grow min-h-0 overflow-hidden rounded-xl border border-[var(--gray-3)]"),vh(g,"class","use-button svelte-h4n0sq"),g.disabled=e[13],vh(g,"title",v=e[12]?"Copy to Clipboard":void 0),kh(g,"disabled",e[13]),kh(g,"drifted",e[5]),vh(f,"class","actions svelte-h4n0sq"),kh(f,"drifted",e[5]),vh(p,"class","footer shrink-0 svelte-h4n0sq"),vh(t,"class","mcp-shell flex flex-col gap-2 p-2 min-h-0 svelte-h4n0sq")},m(c,v){ch(c,t,v),sh(t,n),sh(n,i),w&&w.m(i,null),sh(n,r),sh(n,o),sh(o,a),sh(a,s),sh(a,l),l.innerHTML=e[0],sh(a,u),sh(t,d),sh(t,p),x&&x.m(p,null),sh(p,m),sh(p,f),I&&I.m(f,null),sh(f,h),sh(f,g),T.m(g,null),sh(p,b),O&&O.m(p,null),y=!0,$||(_=[gh(a,"click",e[15]),gh(g,"click",e[14])],$=!0)},p(e,[t]){w&&w.p&&(!y||2097152&t)&&ih(w,k,e,e[21],y?nh(k,e[21],t,ug):rh(e[21]),dg),(!y||1&t)&&(l.innerHTML=e[0]),(!y||6&t&&c!==(c="hljs "+e[2]+" grow overflow-auto p-2 "+(e[1]?"no-select":"")+" svelte-h4n0sq"))&&vh(l,"class",c),e[5]?x||(x=pg(),x.c(),x.m(p,m)):x&&(x.d(1),x=null),e[5]&&e[6]?I?I.p(e,t):(I=mg(e),I.c(),I.m(f,h)):I&&(I.d(1),I=null),E===(E=S(e))&&T?T.p(e,t):(T.d(1),T=E(e),T&&(T.c(),T.m(g,null))),(!y||8192&t)&&(g.disabled=e[13]),(!y||4096&t&&v!==(v=e[12]?"Copy to Clipboard":void 0))&&vh(g,"title",v),(!y||8192&t)&&kh(g,"disabled",e[13]),(!y||32&t)&&kh(g,"drifted",e[5]),(!y||32&t)&&kh(f,"drifted",e[5]),C===(C=z(e))&&O?O.p(e,t):(O&&O.d(1),O=C&&C(e),O&&(O.c(),O.m(p,null)))},i(e){y||(Bh(w,e),y=!0)},o(e){Hh(w,e),y=!1},d(e){e&&uh(t),w&&w.d(e),x&&x.d(),I&&I.d(),T.d(),O&&O.d(),$=!1,Kf(_)}}}function Ig(e,t,n){let i,r,o,a,s,l,c,{$$slots:u={},$$scope:d}=t,{highlightedCode:p}=t,{hasErrors:m=!1}=t,{highlightClass:f="-solidity"}=t,{code:h=""}=t,{fence:g}=t,{hostConnected:v=!1}=t,{hostConnectError:b}=t,{hostSendCaps:y=ng}=t,{mcpApp:$}=t,{drifted:_=!1}=t,{onRestoreOriginal:k}=t,w=!1,x=!1;const I=tg({canOpen:!1});var S,E;function T(e){c&&clearTimeout(c),n(8,a=e),c=setTimeout(()=>{n(8,a=void 0),c=void 0},1e3)}function z(e,t){return n=>{const i=n.target,r=i instanceof Element?i.closest(e)?.getAttribute("href"):void 0;r&&!r.startsWith("#")&&(n.preventDefault(),n.stopPropagation(),y.openLinks&&async function(e,t){if((await e.openLink({url:t})).isError)throw new Error("Host denied opening the link.")}($,r).catch(e=>console.warn(`[mcp-apps] ${t} openLink failed`,e)))}}S=lg,E=I,Eh().$$.context.set(S,E);const C=z("a[href]","code preview"),O=z(".tippy-box a[href]","tippy");Th(()=>(document.addEventListener("click",O,!0),()=>document.removeEventListener("click",O,!0)));return e.$$set=e=>{"highlightedCode"in e&&n(0,p=e.highlightedCode),"hasErrors"in e&&n(1,m=e.hasErrors),"highlightClass"in e&&n(2,f=e.highlightClass),"code"in e&&n(16,h=e.code),"fence"in e&&n(17,g=e.fence),"hostConnected"in e&&n(3,v=e.hostConnected),"hostConnectError"in e&&n(4,b=e.hostConnectError),"hostSendCaps"in e&&n(18,y=e.hostSendCaps),"mcpApp"in e&&n(19,$=e.mcpApp),"drifted"in e&&n(5,_=e.drifted),"onRestoreOriginal"in e&&n(6,k=e.onRestoreOriginal),"$$scope"in e&&n(21,d=e.$$scope)},e.$$.update=()=>{32&e.$$.dirty&&(_||n(11,x=!1)),262144&e.$$.dirty&&I.set({canOpen:y.openLinks}),262144&e.$$.dirty&&document.documentElement.classList.toggle("mcp-no-open-links",!y.openLinks),262144&e.$$.dirty&&n(20,i=og(y)),1048584&e.$$.dirty&&n(12,r=v&&!i),65946&e.$$.dirty&&n(13,o=m||w||!h||!v||!!b||!!a)},[p,m,f,v,b,_,k,w,a,s,l,x,r,o,async function(){if(!o){n(9,s=void 0),n(10,l=void 0),n(7,w=!0);try{if(r)return await sg(h),void T("Copied");await async function(e,t,n){const i=rg(e);if(!og(i))throw new Error("This host does not support sending the contract to the agent.");if(i.updateModelContext)try{await e.updateModelContext({content:[{type:"text",text:t}]})}catch(e){console.warn("[mcp-apps] updateModelContext failed",e)}if((await e.sendMessage({role:"user",content:[{type:"text",text:ag(n,t)}]})).isError)throw new ig}($,h,g),T("Sent")}catch(e){if(e instanceof ig)return void n(10,l=e.message);console.error("[mcp-apps] Send Updates to Agent failed",e),n(9,s=e instanceof Error?e.message:String(e));try{await sg(h),T("Copied")}catch{}}finally{n(7,w=!1)}}},C,h,g,y,$,i,d,u,()=>{n(11,x=!1),k()},()=>n(11,x=!1),()=>n(11,x=!0)]}class Sg extends Qh{constructor(e){super(),Yh(this,e,Ig,xg,Yf,{highlightedCode:0,hasErrors:1,highlightClass:2,code:16,fence:17,hostConnected:3,hostConnectError:4,hostSendCaps:18,mcpApp:19,drifted:5,onRestoreOriginal:6},cg)}}function Eg(e){return structuredClone(e)}function Tg(e){let t,n,i,r;const o=[{errors:e[7]},e[1].controlProps?.(e[2],e[6])??{}];function a(t){e[15](t)}var s=e[1].controls[e[2]];function l(e){let t={};for(let e=0;e<o.length;e+=1)t=Wf(t,o[e]);return void 0!==e[6]&&(t.opts=e[6]),{props:t}}return s&&(t=xh(s,l(e)),Ch.push(()=>Wh(t,"opts",a))),{c(){t&&Jh(t.$$.fragment),i=hh()},m(e,n){t&&Gh(t,e,n),ch(e,i,n),r=!0},p(e,r){const c=198&r?function(e,t){const n={},i={},r={$$scope:1};let o=e.length;for(;o--;){const a=e[o],s=t[o];if(s){for(const e in a)e in s||(i[e]=1);for(const e in s)r[e]||(n[e]=s[e],r[e]=1);e[o]=s}else for(const e in a)r[e]=1}for(const e in i)e in n||(n[e]=void 0);return n}(o,[128&r&&{errors:e[7]},70&r&&(u=e[1].controlProps?.(e[2],e[6])??{},"object"==typeof u&&null!==u?u:{})]):{};var u;if(!n&&64&r&&(n=!0,c.opts=e[6],jh(()=>n=!1)),6&r&&s!==(s=e[1].controls[e[2]])){if(t){Fh();const e=t;Hh(e.$$.fragment,1,0,()=>{Kh(e,1)}),Vh()}s?(t=xh(s,l(e)),Ch.push(()=>Wh(t,"opts",a)),Jh(t.$$.fragment),Bh(t.$$.fragment,1),Gh(t,i.parentNode,i)):t=null}else s&&t.$set(c)},i(e){r||(t&&Bh(t.$$.fragment,e),r=!0)},o(e){t&&Hh(t.$$.fragment,e),r=!1},d(e){e&&uh(i),t&&Kh(t,e)}}}function zg(e){let t,n;return t=new Sg({props:{highlightedCode:e[11],hasErrors:e[8],code:e[9],highlightClass:e[1].highlightClass,fence:e[1].fence,hostConnected:e[3],hostConnectError:e[4],hostSendCaps:e[5],mcpApp:e[0],drifted:e[10],onRestoreOriginal:e[12],$$slots:{controls:[Tg]},$$scope:{ctx:e}}}),{c(){Jh(t.$$.fragment)},m(e,i){Gh(t,e,i),n=!0},p(e,[n]){const i={};2048&n&&(i.highlightedCode=e[11]),256&n&&(i.hasErrors=e[8]),512&n&&(i.code=e[9]),2&n&&(i.highlightClass=e[1].highlightClass),2&n&&(i.fence=e[1].fence),8&n&&(i.hostConnected=e[3]),16&n&&(i.hostConnectError=e[4]),32&n&&(i.hostSendCaps=e[5]),1&n&&(i.mcpApp=e[0]),1024&n&&(i.drifted=e[10]),524486&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(Bh(t.$$.fragment,e),n=!0)},o(e){Hh(t.$$.fragment,e),n=!1},d(e){Kh(t,e)}}}function Cg(e,t,n){let i,r,o,a,s,l,c,u,{adapter:d}=t,{kind:p}=t,{mcpApp:m}=t,{hostConnected:f=!1}=t,{hostConnectError:h}=t,{hostSendCaps:g=ng}=t,v=d.emptyContract();function b(e){try{return d.print(d.build(e))}catch{return}}function y(e,t){if(!e)return;const i=function(e,t,n){return void 0===e||"result"===n&&!t}(c,a,t),r={...s??{},...e,kind:p};if(n(6,s=r),!i)return;const o=function(e,t,n){const i=n(e);if(void 0!==i)return{opts:Eg(e),code:i,supersedesOpts:!1};const r=n(t);return void 0!==r?{opts:Eg(t),code:r,supersedesOpts:!0}:void 0}(r,{...e,kind:p},b);void 0!==o&&(l=o.opts,n(13,c=o.code),o.supersedesOpts&&n(6,s=Eg(o.opts)))}return m.ontoolinput=e=>{y(e.arguments,"input")},m.ontoolresult=e=>{const t=e.structuredContent;t?.opts&&y(t.opts,"result")},e.$$set=e=>{"adapter"in e&&n(1,d=e.adapter),"kind"in e&&n(2,p=e.kind),"mcpApp"in e&&n(0,m=e.mcpApp),"hostConnected"in e&&n(3,f=e.hostConnected),"hostConnectError"in e&&n(4,h=e.hostConnectError),"hostSendCaps"in e&&n(5,g=e.hostSendCaps)},e.$$.update=()=>{if(66&e.$$.dirty&&s)try{n(14,v=d.build(s)),n(7,u=void 0)}catch(e){const t=e instanceof Error?e.message:String(e);n(7,u=d.optionsErrors(e)??{_:t||"Failed to build contract"})}16386&e.$$.dirty&&n(9,i=d.print(v)),546&e.$$.dirty&&n(11,r=g.openLinks?d.injectHyperlinks(d.highlight(i)):d.highlight(i)),128&e.$$.dirty&&n(8,o=void 0!==u),8960&e.$$.dirty&&n(10,a=function(e){const{originalCode:t,code:n,hasErrors:i}=e;return void 0!==t&&(i||n!==t)}({originalCode:c,code:i,hasErrors:o}))},[m,d,p,f,h,g,s,u,o,i,a,r,function(){null!=l&&n(6,s=Eg(l))},c,v,function(e){s=e,n(6,s)}]}class Og extends Qh{constructor(e){super(),Yh(this,e,Cg,zg,Yf,{adapter:1,kind:2,mcpApp:0,hostConnected:3,hostConnectError:4,hostSendCaps:5})}}const Ug=560;class Ng extends Error{constructor(e){super("Invalid options"),this.messages=e}}function Dg(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]+/g,"").replace(/(\\|")/g,(e,t)=>"\\"+t)}function Ag(e){if(e<=0)throw new Error(`Number of bits must be positive (actual '${e}').`);if(e%8!=0)throw new Error(`The number of bits must be a multiple of 8 (actual '${e}').`);return BigInt("0x"+"ff".repeat(e/8))}const jg={u8:Ag(8),u16:Ag(16),u32:Ag(32),u64:Ag(64),u128:Ag(128),u256:Ag(256)};function Pg(e,t,n){const i=e.toString();if(!/^\d+$/.test(i))throw new Ng({[t]:"Not a valid number"});const r=BigInt(i);if(r>jg[n])throw new Ng({[t]:`Value is greater than ${n} max value`});return r}class Zg{constructor(e){this.license="MIT",this.metadata=new Map,this.ownable=!1,this.documentations=[],this.constructorArgs=[],this.constructorCode=[],this.topLevelDeclarations=[],this.implementedTraitsMap=new Map,this.freeFunctionsMap=new Map,this.variablesMap=new Map,this.useClausesMap=new Map,this.errorsMap=new Map,this.derivesSet=new Set,this.name=function(e,t=!1){const n=e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/^[^a-zA-Z_]+/,"").replace(/^(.)/,e=>t?e.toUpperCase():e).replace(/[^\w]+(.?)/g,(e,t)=>t.toUpperCase());if(0===n.length)throw new Ng({name:"Identifier is empty or does not have valid characters"});return n}(e,!0)}get implementedTraits(){return[...this.implementedTraitsMap.values()]}get freeFunctions(){return[...this.freeFunctionsMap.values()]}get variables(){return[...this.variablesMap.values()]}get useClauses(){return[...this.useClausesMap.values()]}get errors(){return[...this.errorsMap.values()]}get derives(){return[...this.derivesSet]}addError(e,t){return!this.errorsMap.has(e)&&(this.addUseClause("soroban_sdk","contracterror"),this.errorsMap.set(e,{name:e,num:t}),!0)}addUseClause(e,t,n){const i=n?.groupable??!0,r=n?.alias??"",o=r.length>0?r:t;this.useClausesMap.has(o)||this.useClausesMap.set(o,{containerPath:e,name:t,groupable:i,alias:r})}addVariable(e){return!this.variablesMap.has(e.name)&&(this.variablesMap.set(e.name,e),!0)}addTraitImplBlock(e){const t=e.traitName,n=this.implementedTraitsMap.get(t);if(void 0!==n)return n;{const n={traitName:e.traitName,structName:e.structName,tags:[...e.tags],assocType:e.assocType,functions:[],section:e.section,priority:e.priority};return this.implementedTraitsMap.set(t,n),n}}addFreeFunction(e){const t=this.getFunctionSignature(e),n=this.freeFunctionsMap.get(t);if(void 0!==n)return n;{const n={...e,pub:!0,tags:[],codeBefore:[]};return this.freeFunctionsMap.set(t,n),n}}addTraitForEachFunctions(e,t){Object.values(t).forEach(t=>this.addTraitFunction(e,t))}addTraitFunction(e,t){const n=this.addTraitImplBlock(e),i=this.getFunctionSignature(t);for(let e=0;e<n.functions.length;e++){const t=n.functions[e];if(void 0!==t&&this.getFunctionSignature(t)===i)return t}const r={...t,tags:[],codeBefore:[]};return n.functions.push(r),r}overrideAssocType(e,t){const n=this.implementedTraitsMap.get(e);if(!n)throw new Error(`Trait '${e}' does not exist and cannot be overridden.`);n.assocType=t}getFunctionSignature(e){return[e.name,"(",...e.args.map(e=>e.name),")"].join("")}getOrCreateFunction(e,t){return void 0===t?this.addFreeFunction(e):(this.addTraitImplBlock(t),this.addTraitFunction(t,e))}addFunctionCodeBefore(e,t,n){const i=this.getOrCreateFunction(e,n);i.codeBefore=[...i.codeBefore??[],...t]}addFunctionTag(e,t,n){const i=this.getOrCreateFunction(e,n);i.tags=[...i.tags??[],t]}setFunctionCode(e,t,n){this.getOrCreateFunction(e,n).code=[...t]}addTopLevelDeclaration(e){this.topLevelDeclarations.push(e)}addConstructorArgument(e){for(const t of this.constructorArgs)if(t.name==e.name)return;this.constructorArgs.push(e)}addConstructorCode(e){for(const t of this.constructorCode)if(t===e)return;this.constructorCode.push(e)}addDerives(e){this.derivesSet.add(e)}addDocumentation(e){this.documentations.push(e)}addContractMetadata(e){(Array.isArray(e)?e:[e]).forEach(({key:e,value:t})=>{if(this.metadata.has(e))throw new Error(`Setting metadata failed: ${e} is already set`);this.metadata.set(e,Dg(t))}),this.metadata.size>0&&this.addUseClause("soroban_sdk","contractmeta")}}const Rg=/[\n\r\u2028\u2029]/u;function qg(e,t){if(Rg.test(e))throw new Ng({[t]:"Must not contain line breaks"})}const Mg={license:"MIT"};function Lg(e,{securityContact:t,license:n}){t&&(qg(t,"securityContact"),e.addContractMetadata({key:"security_contact",value:t})),n&&(qg(n,"license"),e.license=n)}const Fg={info:Mg},Vg={...Fg,access:!1,explicitImplementations:!1};function Bg(e){return{info:e.info??Fg.info}}function Hg(e){return{...Bg(e),access:e.access??Vg.access,explicitImplementations:e.explicitImplementations??Vg.explicitImplementations}}function Wg(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Object.assign({name:t.name??e},t)]))}const Jg="ownable";function Gg(e,t,n=!1){switch(t){case!1:break;case"ownable":if(!e.ownable){e.ownable=!0,e.addUseClause("soroban_sdk","Address"),e.addUseClause("stellar_access::ownable","self",{alias:"ownable"}),e.addUseClause("stellar_access::ownable","Ownable");const t={traitName:"Ownable",structName:e.name,tags:n?["contractimpl"]:["contractimpl(contracttrait)"],section:"Utils"};n?e.addTraitForEachFunctions(t,Xg):e.addTraitImplBlock(t),e.addConstructorArgument({name:"owner",type:"Address"}),e.addConstructorCode("ownable::set_owner(e, &owner);")}break;case"roles":{e.addUseClause("soroban_sdk","Address"),e.addUseClause("stellar_access::access_control","self",{alias:"access_control"}),e.addUseClause("stellar_access::access_control","AccessControl");const t={traitName:"AccessControl",structName:e.name,tags:n?["contractimpl"]:["contractimpl(contracttrait)"],section:"Utils"};n?(e.addUseClause("soroban_sdk","Symbol"),e.addTraitForEachFunctions(t,Yg)):e.addTraitImplBlock(t),e.addConstructorArgument({name:"admin",type:"Address"}),e.addConstructorCode("access_control::set_admin(e, &admin);");break}default:throw new Error("Unknown value for `access`")}}function Kg(e,t,n,i,r={useMacro:!0},o=!1){switch(!1===i&&(i=Jg),Gg(e,i,o),i){case"ownable":e.addUseClause("stellar_macros","only_owner"),r.useMacro?e.addFunctionTag(n,"only_owner",t):e.addFunctionCodeBefore(n,["ownable::enforce_owner_auth(e);"],t);break;case"roles":{const{useMacro:i,caller:o,role:a}=r;o&&a?(e.addUseClause("soroban_sdk","Symbol"),e.addUseClause("soroban_sdk","Vec"),e.addConstructorArgument({name:a,type:"Address"}),e.addConstructorCode(`access_control::grant_role_no_auth(e, &${a}, &Symbol::new(e, "${a}"), &admin);`),i?(e.addUseClause("stellar_macros","only_role"),e.addFunctionTag(n,`only_role(${o}, "${a}")`,t)):e.addFunctionCodeBefore(n,[`access_control::ensure_role(e, &Symbol::new(e, "${a}"), ${o});`],t)):i?(e.addUseClause("stellar_macros","only_admin"),e.addFunctionTag(n,"only_admin",t)):e.addFunctionCodeBefore(n,["access_control::enforce_admin_auth(e);"],t);break}default:throw new Error("Unknown value for `access`")}}const Xg=Wg({get_owner:{args:[{name:"e",type:"&Env"}],returns:"Option<Address>",code:["ownable::get_owner(e)"]},transfer_ownership:{args:[{name:"e",type:"&Env"},{name:"new_owner",type:"Address"},{name:"live_until_ledger",type:"u32"}],code:["ownable::transfer_ownership(e, &new_owner, live_until_ledger);"]},accept_ownership:{args:[{name:"e",type:"&Env"}],code:["ownable::accept_ownership(e);"]},renounce_ownership:{args:[{name:"e",type:"&Env"}],code:["ownable::renounce_ownership(e);"]}}),Yg=Wg({has_role:{args:[{name:"e",type:"&Env"},{name:"account",type:"Address"},{name:"role",type:"Symbol"}],returns:"Option<u32>",code:["access_control::has_role(e, &account, &role)"]},get_existing_roles:{args:[{name:"e",type:"&Env"}],returns:"Vec<Symbol>",code:["access_control::get_existing_roles(e)"]},get_role_member_count:{args:[{name:"e",type:"&Env"},{name:"role",type:"Symbol"}],returns:"u32",code:["access_control::get_role_member_count(e, &role)"]},get_role_member:{args:[{name:"e",type:"&Env"},{name:"role",type:"Symbol"},{name:"index",type:"u32"}],returns:"Address",code:["access_control::get_role_member(e, &role, index)"]},get_role_admin:{args:[{name:"e",type:"&Env"},{name:"role",type:"Symbol"}],returns:"Option<Symbol>",code:["access_control::get_role_admin(e, &role)"]},get_admin:{args:[{name:"e",type:"&Env"}],returns:"Option<Address>",code:["access_control::get_admin(e)"]},grant_role:{args:[{name:"e",type:"&Env"},{name:"account",type:"Address"},{name:"role",type:"Symbol"},{name:"caller",type:"Address"}],code:["access_control::grant_role(e, &account, &role, &caller);"]},revoke_role:{args:[{name:"e",type:"&Env"},{name:"account",type:"Address"},{name:"role",type:"Symbol"},{name:"caller",type:"Address"}],code:["access_control::revoke_role(e, &account, &role, &caller);"]},renounce_role:{args:[{name:"e",type:"&Env"},{name:"role",type:"Symbol"},{name:"caller",type:"Address"}],code:["access_control::renounce_role(e, &role, &caller);"]},transfer_admin_role:{args:[{name:"e",type:"&Env"},{name:"new_admin",type:"Address"},{name:"live_until_ledger",type:"u32"}],code:["access_control::transfer_admin_role(e, &new_admin, live_until_ledger);"]},accept_admin_transfer:{args:[{name:"e",type:"&Env"}],code:["access_control::accept_admin_transfer(e);"]},set_role_admin:{args:[{name:"e",type:"&Env"},{name:"role",type:"Symbol"},{name:"admin_role",type:"Symbol"}],code:["access_control::set_role_admin(e, &role, &admin_role);"]},renounce_admin:{args:[{name:"e",type:"&Env"}],code:["access_control::renounce_admin(e);"]}});function Qg(e,t,n){e.addUseClause("stellar_contract_utils::pausable","self",{alias:"pausable"}),e.addUseClause("stellar_contract_utils::pausable","Pausable");const i={traitName:"Pausable",structName:e.name,tags:["contractimpl"],section:"Utils"},r=!1===t?Jg:t,o="ownable"===r?ev.pause_unused_caller:ev.pause,a="ownable"===r?ev.unpause_unused_caller:ev.unpause;e.addTraitFunction(i,ev.paused),e.addTraitFunction(i,o),e.addTraitFunction(i,a),Kg(e,i,o,r,{useMacro:!0,role:"pauser",caller:"caller"},n),Kg(e,i,a,r,{useMacro:!0,role:"pauser",caller:"caller"},n)}const ev=Wg({paused:{args:[{name:"e",type:"&Env"}],returns:"bool",code:["pausable::paused(e)"]},pause:{args:[{name:"e",type:"&Env"},{name:"caller",type:"Address"}],code:["pausable::pause(e)"]},pause_unused_caller:{name:"pause",args:[{name:"e",type:"&Env"},{name:"_caller",type:"Address"}],code:["pausable::pause(e)"]},unpause:{args:[{name:"e",type:"&Env"},{name:"caller",type:"Address"}],code:["pausable::unpause(e)"]},unpause_unused_caller:{name:"unpause",args:[{name:"e",type:"&Env"},{name:"_caller",type:"Address"}],code:["pausable::unpause(e)"]}});function tv(e,t,n){const i=Wg({upgrade:{args:[{name:"e",type:"&Env"},{name:"new_wasm_hash",type:"BytesN<32>"},{name:"operator",type:"Address"}],code:["upgradeable::upgrade(e, &new_wasm_hash)"]},upgrade_unused_operator:{name:"upgrade",args:[{name:"e",type:"&Env"},{name:"new_wasm_hash",type:"BytesN<32>"},{name:"_operator",type:"Address"}],code:["upgradeable::upgrade(e, &new_wasm_hash)"]}});e.addUseClause("soroban_sdk","Address"),e.addUseClause("soroban_sdk","BytesN"),e.addUseClause("stellar_contract_utils::upgradeable","self",{alias:"upgradeable"}),e.addUseClause("stellar_contract_utils::upgradeable","Upgradeable");const r={traitName:"Upgradeable",structName:e.name,tags:["contractimpl"],section:"Utils"},o="ownable"===t?i.upgrade_unused_operator:i.upgrade;e.addTraitFunction(r,o),Kg(e,r,o,t,{useMacro:!0,role:"upgrader",caller:"operator"},n)}const nv=Symbol("whitespace");function*iv(e,t){for(const n of t)n===nv?yield"":Array.isArray(n)?yield*iv(e+1,n):yield" ".repeat(e)+n}function rv(...e){return e.filter(e=>e.length>0).flatMap(e=>[nv,...e]).slice(1)}const ov="1. with no section",av="Standalone Imports",sv=" ",lv=["#![no_std]"];function cv(e){return function(...e){return[...iv(0,e)].join("\n")+"\n"}(...rv([`// SPDX-License-Identifier: ${e.license}`,"// Compatible with OpenZeppelin Stellar Soroban Contracts ^0.7.2",...e.documentations.length?["",...(t=e.documentations,t.map(e=>`//! ${e}`))]:[],...lv],rv(function(e){const t=function(e){return e.useClauses.sort((e,t)=>e.containerPath===t.containerPath?"self"===e.name&&"self"!==t.name?-1:"self"!==e.name&&"self"===t.name?1:dv(e).localeCompare(dv(t)):e.containerPath.localeCompare(t.containerPath))}(e),n=t.reduce((e,t)=>(t.groupable?(e[t.containerPath]=e[t.containerPath]||[]).push(t):(e[av]=e[av]||[]).push(t),e),{});return Object.entries(n).flatMap(([e,t])=>function(e,t){const n=[];if(t===av)for(const t of e)n.push(`use ${t.containerPath}::${dv(t)};`);else if(1==e.length)n.push(`use ${t}::${dv(e[0])};`);else if(e.length>1){const i=e.map(e=>dv(e)).join(", ");n.push(`use ${t}::{${i}};`)}return n}(t,e)).flatMap(e=>function(e){const t=[],n=-1!==e.indexOf("{");n&&e.length>90?(t.push(e.slice(0,e.indexOf("{")+1)),t.push(...pv(e.slice(e.indexOf("{")+1,-2))),t.push("};")):t.push(e);return t}(e.toString()))}(e),function(e){return Array.from(e.metadata.entries()).map(([e,t])=>`contractmeta!(key="${e}", val="${t}");`)}(e),function(e){return uv(e.variables.map(e=>`const ${e.name}: ${e.type} = ${e.value}`))}(e),function(e){return 0===e.topLevelDeclarations.length?[]:rv(...e.topLevelDeclarations)}(e),function(e){const t=[];e.derives.length>0&&t.push(`#[derive(${e.derives.sort().join(", ")})]`);return t.push("#[contract]"),t.push(`pub struct ${e.name};`),t}(e),function(e){if(0===e.errors.length)return[];return["#[contracterror]","#[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd, Ord)]","#[repr(u32)]",`pub enum ${e.name}Error {`,e.errors.map(e=>`${e.name} = ${e.num},`),"}"]}(e),function(e){const t=function(e){if(e.constructorCode.length>0){const t="fn __constructor",n=[{name:"e",type:"&Env"},...e.constructorArgs],i=rv(uv(e.constructorCode));return fv(!0,t,n.map(e=>hv(e)),[],void 0,void 0,i)}return[]}(e),n=e.freeFunctions.map(e=>mv(e));if(0===t.length&&0===n.length)return[];const i=["#[contractimpl]",`impl ${e.name} {`];t.length>0&&i.push(t);t.length>0&&n.length>0&&i.push("");n.length>0&&i.push(rv(...n));return i.push("}"),i}(e),function(e){const t=e.implementedTraits.sort((e,t)=>e.priority!==t.priority?(e.priority??1/0)-(t.priority??1/0):e.tags.length!==t.tags.length?e.tags.length-t.tags.length:e.traitName.localeCompare(t.traitName)),n=t.reduce((e,t)=>{const n=t.section??ov;return(e[n]=e[n]||[]).push(t),e},{}),i=Object.entries(n).sort((e,t)=>e[0].localeCompare(t[0])).map(([e,t])=>function(e,t){const n=[],i=e===ov;i||(n.push("//"),n.push(`// ${e}`),n.push("//"));return t.forEach((e,t)=>{(t>0||!i)&&n.push(""),n.push(...function(e){const t=[];t.push(...e.tags.map(e=>`#[${e}]`));const n=`impl ${e.traitName} for ${e.structName}`,i=void 0!==e.assocType&&e.assocType.trim().length>0?[sv+e.assocType.trim(),""]:[],r=e.functions.map(e=>mv(e));i.length>0||r.length>0?(t.push(`${n} {`),i.length>0&&t.push(...i),r.length>0&&t.push(rv(...r)),t.push("}")):t.push(`${n} {}`);return t}(e))}),n}(e,t));return rv(...i)}(e))));var t}function uv(e){return e.map(e=>e.endsWith(";")?e:e+";")}function dv(e){return e.alias?`${e.name} as ${e.alias}`:e.name}function pv(e){const t=[];if(e.length>90){const n=e.slice(0,90),i=n.lastIndexOf(",");-1!==i?(t.push(sv+n.slice(0,i+1)),t.push(...pv(e.slice(i+2)))):t.push(sv+n)}else t.push(sv+e);return t}function mv(e){const t=`fn ${e.name}`,n=e.args.map(e=>hv(e)),i=e.codeBefore?.concat(e.code)??e.code;for(let t=0;t<i.length;t++){const n=i[t],r=t<i.length-1||void 0===e.returns;void 0!==n&&n.length>0&&(r&&!["{","}",";"].includes(n.charAt(n.length-1))?i[t]+=";":!r&&n.endsWith(";")&&(i[t]=n.slice(0,n.length-1)))}return fv(e.pub,t,n,e.tags,e.returns,void 0,i)}function fv(e,t,n,i,r,o,a){const s=[];for(let e=0;e<i.length;e++)s.push(`#[${i[e]}]`);let l="";if(e&&(l+="pub "),l+=`${t}(`,n.length>0){const e=n.join(", ");e.length>80?(s.push(l),l="",s.push(n.map(e=>`${e},`))):l+=`${e}`}return l+=")",l+=void 0===r?" {":` -> ${r} {`,s.push(l),s.push(a),s.push("}"),s}function hv(e){if(void 0!==e.type){const t=e.type;return`${e.name}: ${t}`}return`${e.name}`}function gv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vv,bv={},yv={};var $v,_v={};var kv,wv={};var xv,Iv={};var Sv,Ev={};var Tv,zv={};var Cv,Ov={};var Uv,Nv,Dv={};var Av,jv,Pv,Zv=(Nv||(Nv=1,Av=bv,jv=bv&&bv.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),Pv=bv&&bv.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||jv(t,e,n)},Object.defineProperty(Av,"__esModule",{value:!0}),Pv((vv||(vv=1,Object.defineProperty(yv,"__esModule",{value:!0}),yv.cairoMultisigDescriptions=yv.cairoAccountDescriptions=yv.cairoVestingDescriptions=yv.cairoGovernorDescriptions=yv.cairoERC6909Descriptions=yv.cairoERC1155Descriptions=yv.cairoERC721Descriptions=yv.cairoERC20Descriptions=yv.cairoRoyaltyInfoDescriptions=yv.cairoAccessDescriptions=yv.cairoMacrosDescriptions=yv.cairoCommonDescriptions=yv.cairoPrompts=void 0,yv.cairoPrompts={ERC20:"Make a fungible token per the ERC-20 standard.",ERC721:"Make a non-fungible token per the ERC-721 standard.",ERC1155:"Make a non-fungible token per the ERC-1155 standard.",ERC6909:"Make a minimal multi-token per the ERC-6909 standard.",Governor:"Make a contract to implement governance, such as for a DAO.",Multisig:"Make a multi-signature smart contract, requiring a quorum of registered signers to approve and collectively execute transactions.",Vesting:"Make a vesting smart contract that manages the gradual release of ERC-20 tokens to a designated beneficiary based on a predefined vesting schedule.",Account:"Make a custom smart contract that represents an account that can be deployed and interacted with other contracts, and can be extended to implement custom logic. An account is a special type of contract that is used to validate and execute transactions.",Custom:"Make a custom smart contract."},yv.cairoCommonDescriptions={upgradeable:"Whether the smart contract is upgradeable.",appName:"Required when votes is enabled, for hashing and signing typed structured data. Name for domain separator implementing SNIP12Metadata trait. Prevents two applications from producing the same hash.",appVersion:"Required when votes is enabled, for hashing and signing typed structured data. Version for domain separator implementing SNIP12Metadata trait. Prevents two versions of the same application from producing the same hash.",royaltyInfo:"Provides information for how much royalty is owed and to whom, based on a sale price. Follows ERC-2981 standard."},yv.cairoMacrosDescriptions={macros:"The macros to use for the contract.",withComponents:'Whether to use the "with_components" macro for simplified contract structure.'},yv.cairoAccessDescriptions={accessType:"The type of access control to provision. Ownable is a simple mechanism with a single account authorized for all privileged actions. Roles is a flexible mechanism with a separate role for each privileged action. A role can have many authorized accounts. Roles (Default Admin Rules) provides additional enforced security measures on top of standard Roles mechanism for managing the most privileged role: default admin.",darInitialDelay:'The initial delay for the default admin role (in case Roles (Default Admin Rules) is used). Default is "1 day".',darDefaultDelayIncrease:'The default delay increase for the default admin role (in case Roles (Default Admin Rules) is used). Default is "5 days".',darMaxTransferDelay:'The maximum delay for a default admin transfer (in case Roles (Default Admin Rules) is used). Default is "30 days".'},yv.cairoRoyaltyInfoDescriptions={enabled:"Whether to enable royalty feature for the contract",defaultRoyaltyFraction:"The royalty fraction that will be default for all tokens. It will be used for a token if there's no custom royalty fraction set for it.",feeDenominator:"The denominator used to interpret a token's fee and to calculate the result fee fraction."},yv.cairoERC20Descriptions={premint:"The number of tokens to premint for the deployer.",decimals:"The number of decimals to use for the contract. Defaults to 18.",wrapper:"Whether to include ERC20Wrapper functionality for depositing and withdrawing an underlying token.",votes:"Whether to keep track of historical balances for voting in on-chain governance, with a way to delegate one's voting power to a trusted account."},yv.cairoERC721Descriptions={baseUri:"A base uri for the non-fungible token.",enumerable:"Whether to allow on-chain enumeration of all tokens or those owned by an account. Increases gas cost of transfers.",wrapper:"Whether to include ERC721Wrapper functionality for wrapping an underlying ERC721.",uriStorage:"Allows updating token URIs for individual token IDs.",votes:"Whether to keep track of individual units for voting in on-chain governance. Voting durations can be expressed as block numbers or timestamps.",consecutive:"Enables gas-efficient batch minting of consecutive token IDs during construction (ERC-2309). The contract owner must call `mint_consecutive` from the constructor to issue the initial batch. Cannot be combined with enumerable."},yv.cairoERC1155Descriptions={baseUri:"The location of the metadata for the token. Clients will replace any instance of {id} in this string with the tokenId.",updatableUri:"Whether privileged accounts will be able to set a new URI for all token types.",supply:"Whether to keep track of total supply of tokens.",uriStorage:"Allows updating token URIs for individual token IDs."},yv.cairoERC6909Descriptions={contentUri:"Whether to include Content URI extension for contract-level and per-token URI metadata.",tokenSupply:"Whether to keep track of total supply per token ID.",metadata:"Whether to include per-token metadata extension providing name, symbol, and decimals per token ID."},yv.cairoGovernorDescriptions={delay:'The delay since proposal is created until voting starts, in readable date time format matching /^(\\d+(?:\\.\\d+)?) +(second|minute|hour|day|week|month|year)s?$/, default is "1 day".',period:'The length of period during which people can cast their vote, in readable date time format matching /^(\\d+(?:\\.\\d+)?) +(second|minute|hour|day|week|month|year)s?$/, default is "1 week".',proposalThreshold:"Minimum number of votes an account must have to create a proposal, default is 0.",decimals:"The number of decimals to use for the contract, default is 18 for ERC20Votes and 0 for ERC721Votes (because it does not apply to ERC721Votes).",quorumMode:"The type of quorum mode to use, either by percentage or absolute value.",quorumPercent:"The percent required, in cases of quorumMode equals percent.",quorumAbsolute:"The absolute quorum required, in cases of quorumMode equals absolute.",votes:"The type of voting to use. Either erc20votes, meaning voting power with a votes-enabled ERC20 token. Either erc721votes, meaning voting power with a votes-enabled ERC721 token. Voters can entrust their voting power to a delegate.",clockMode:"The clock mode used by the voting token. For now, only timestamp mode where the token uses voting durations expressed as timestamps is supported. For Governor, this must be chosen to match what the ERC20 or ERC721 voting token uses.",timelock:'Whether to add a delay to actions taken by the Governor. Gives users time to exit the system if they disagree with governance decisions. If "openzeppelin", Module compatible with OpenZeppelin\'s TimelockController.',settings:"Whether to allow governance to update voting settings (delay, period, proposal threshold)."},yv.cairoVestingDescriptions={startDate:'The timestamp marking the beginning of the vesting period. In HTML input datetime-local format, e.g. "2026-03-15T14:30".',duration:"The total duration of the vesting period. In readable date time format matching /^(\\d+(?:\\.\\d+)?) +(second|minute|hour|day|week|month|year)s?$/",cliffDuration:"The duration of the cliff period. Must be less than or equal to the total duration. In readable date time format matching /^(\\d+(?:\\.\\d+)?) +(second|minute|hour|day|week|month|year)s?$/",schedule:"A vesting schedule implementation, tokens can either be vested gradually following a linear curve or with custom vesting schedule that requires the implementation of the VestingSchedule trait."},yv.cairoAccountDescriptions={type:"Type of signature used for signature checking by the Account contract, Starknet account uses the STARK curve, Ethereum-flavored account uses the Secp256k1 curve.",declare:"Whether to enable the account to declare other contract classes.",deploy:"Whether to enables the account to be counterfactually deployed.",pubkey:"Whether to enables the account to change its own public key.",outsideExecution:"Whether to allow a protocol to submit transactions on behalf of the account, as long as it has the relevant signatures."},yv.cairoMultisigDescriptions={quorum:"The minimal number of confirmations required by the Multisig to approve a transaction."}),yv),Av),Pv(($v||($v=1,Object.defineProperty(_v,"__esModule",{value:!0}),_v.infoDescriptions=_v.commonDescriptions=void 0,_v.commonDescriptions={name:"The name of the contract",symbol:"The short symbol for the token",burnable:"Whether token holders will be able to destroy their tokens",pausable:"Whether privileged accounts will be able to pause specifically marked functionality. Useful for emergency response.",mintable:"Whether privileged accounts will be able to create more supply or emit more tokens"},_v.infoDescriptions={info:"Metadata about the contract and author",securityContact:"Email where people can contact you to report security issues. Will only be visible if contract source code is verified.",license:'The license used by the contract, default is "MIT"'}),_v),Av),Pv((kv||(kv=1,Object.defineProperty(wv,"__esModule",{value:!0}),wv.confidentialERC7984Descriptions=wv.confidentialPrompts=void 0,wv.confidentialPrompts={ERC7984:"Make a confidential fungible token in Solidity according to the ERC-7984 standard, similar to ERC-20 but with confidentiality."},wv.confidentialERC7984Descriptions={contractURI:"The metadata URI for the token. Should follow the schema defined in [ERC-7572](https://eips.ethereum.org/EIPS/eip-7572).",decimals:"The number of decimals used to represent token amounts. Defaults to 6, with a maximum of 10, since confidential token amounts are represented as uint64 and higher decimals would make the maximum total supply too limited. Incompatible with wrappable, which derives its decimals from the underlying token (capped at 6).",premint:"The number of tokens to premint for the deployer. Cannot be used with wrappable, since preminted tokens would not be backed by the underlying token.",networkConfig:"Specify the provider and network configuration to use for FHEVM contracts.",wrappable:"Whether to allow wrapping an ERC20 token into a confidential fungible token. Derives its decimals from the underlying token (capped at 6), so it cannot be used with custom decimals. Cannot be used with premint, since preminted tokens would not be backed by the underlying token.",votes:"Whether to keep track of historical balances for voting in on-chain governance. Voting durations must be expressed as block numbers or timestamps."}),wv),Av),Pv(function(){if(xv)return Iv;xv=1,Object.defineProperty(Iv,"__esModule",{value:!0}),Iv.solidityGovernorDescriptions=Iv.solidityAccountDescriptions=Iv.solidityStablecoinDescriptions=Iv.solidityERC1155Descriptions=Iv.solidityERC721Descriptions=Iv.solidityERC20Descriptions=Iv.solidityCommonDescriptions=Iv.solidityPrompts=void 0,Iv.solidityPrompts={ERC20:"Make a fungible token per the ERC-20 standard.",ERC721:"Make a non-fungible token per the ERC-721 standard.",ERC1155:"Make a non-fungible token per the ERC-1155 standard.",Stablecoin:"Make a stablecoin token that uses the ERC-20 standard. Experimental, some features are not audited and are subject to change.",RWA:"Make a real-world asset token that uses the ERC-20 standard. Experimental, some features are not audited and are subject to change.",Account:"Make an account contract that follows the ERC-4337 standard.",Governor:"Make a contract to implement governance, such as for a DAO.",Custom:"Make a custom smart contract."};const e='Whether to allow replacing a crosschain link that has already been registered. Only used if crossChainBridging is set to "erc7786native".';return Iv.solidityCommonDescriptions={access:"The type of access control to provision. Ownable is a simple mechanism with a single account authorized for all privileged actions. Roles is a flexible mechanism with a separate role for each privileged action. A role can have many authorized accounts. Managed enables a central contract to define a policy that allows certain callers to access certain functions.",upgradeable:"Whether the smart contract is upgradeable. Transparent uses more complex proxy with higher overhead, requires less changes in your contract. Can also be used with beacons. UUPS uses simpler proxy with less overhead, requires including extra code in your contract. Allows flexibility for authorizing upgrades.",namespacePrefix:'The prefix for ERC-7201 namespace identifiers. It should be derived from the project name or a unique naming convention specific to the project. Used only if the contract includes storage variables and upgradeability is enabled. Default is "myProject".'},Iv.solidityERC20Descriptions={decimals:"The number of decimals used to represent token amounts. Defaults to 18.",premint:"The number of tokens to premint for the deployer.",permit:"Whether without paying gas, token holders will be able to allow third parties to transfer from their account.",votes:"Whether to keep track of historical balances for voting in on-chain governance. Voting durations can be expressed as block numbers or timestamps.",flashmint:"Whether to include built-in flash loans to allow lending tokens without requiring collateral as long as they're returned in the same transaction.",crossChainBridging:"Whether to allow authorized bridge contracts to mint and burn tokens for crosschain transfers. Options are to use custom bridges on any chain, to embed an ERC-7786 based bridge directly in the token contract, or to use the SuperchainERC20 standard with the predeployed SuperchainTokenBridge. The SuperchainERC20 feature is only available on chains in the Superchain, and requires deploying your contract to the same address on every chain in the Superchain.",crossChainLinkAllowOverride:e,premintChainId:"The chain ID of the network on which to premint tokens.",callback:"Whether to include support for code execution after transfers and approvals on recipient contracts in a single transaction."},Iv.solidityERC721Descriptions={baseUri:"A base uri for the token",enumerable:"Whether to allow on-chain enumeration of all tokens or those owned by an account. Increases gas cost of transfers.",uriStorage:"Allows updating token URIs for individual token IDs",incremental:"Whether new tokens will be automatically assigned an incremental id",votes:"Whether to keep track of individual units for voting in on-chain governance. Voting durations can be expressed as block numbers or timestamps (defaulting to block number if not specified).",crossChainBridging:"Whether to embed an ERC-7786 based bridge directly in the token contract, making it natively crosschain. Crosschain transfers with registered counterparts burn the token on the source chain and mint it on the destination chain. If also using incremental token ids, mint only on a single chain and link counterparts without minting, otherwise colliding ids can strand bridged tokens.",crossChainLinkAllowOverride:e},Iv.solidityERC1155Descriptions={uri:"The location of the metadata for the token. Clients will replace any instance of {id} in this string with the tokenId.",supply:"Whether to keep track of total supply of tokens",updatableUri:"Whether privileged accounts will be able to set a new URI for all token types",crossChainBridging:"Whether to embed an ERC-7786 based bridge directly in the token contract, making it natively crosschain. Crosschain transfers with registered counterparts burn the tokens on the source chain and mint them on the destination chain.",crossChainLinkAllowOverride:e},Iv.solidityStablecoinDescriptions={freezable:"Whether authorized accounts can freeze and unfreeze accounts for regulatory or security purposes. This feature is experimental, not audited and is subject to change.",restrictions:"Whether to restrict certain users from transferring tokens, either via allowing or blocking them. This feature is experimental, not audited and is subject to change."},Iv.solidityAccountDescriptions={signatureValidation:"Whether to implement the ERC-1271 standard for validating signatures. This is useful for the account to verify signatures.",ERC721Holder:"Whether to implement the `onERC721Received` function to allow the account to receive ERC721 tokens.",ERC1155Holder:"Whether to implement the `onERC1155Received` function to allow the account to receive ERC1155 tokens.",signer:"Defines the signature verification algorithm used by the account to verify user operations. Options:\n - ECDSA: Standard Ethereum signature validation using secp256k1, validates signatures against a specified owner address\n - EIP7702: Special ECDSA validation using account's own address as signer, enables EOAs to delegate execution rights\n - Multisig: ERC-7913 multisignature requiring minimum number of signatures from authorized signers\n - MultisigWeighted: ERC-7913 weighted multisignature where signers have different voting weights\n - P256: NIST P-256 curve (secp256r1) validation for integration with Passkeys and HSMs\n - RSA: RSA PKCS#1 v1.5 signature validation (RFC8017) for PKI systems and HSMs\n - WebAuthn: Web Authentication (WebAuthn) assertion validation for integration with Passkeys and HSMs on top of P256",batchedExecution:"Whether to implement a minimal batching interface for the account to allow multiple operations to be executed in a single transaction following the ERC-7821 standard.",ERC7579Modules:"Whether to implement the ERC-7579 compatibility to enable functionality on the account with modules."},Iv.solidityGovernorDescriptions={delay:'The delay since proposal is created until voting starts, default is "1 day"',period:'The length of period during which people can cast their vote, default is "1 week"',blockTime:"The block time of the chain in seconds, default is 12",proposalThreshold:"Minimum number of votes an account must have to create a proposal, default is 0.",decimals:"The number of decimals to use for the contract, default is 18 for ERC20Votes and 0 for ERC721Votes (because it does not apply to ERC721Votes)",quorumMode:"The type of quorum mode to use",quorumPercent:"The percent required, in cases of quorumMode equals percent",quorumAbsolute:"The absolute quorum required, in cases of quorumMode equals absolute",votes:"The type of voting to use",clockMode:"The clock mode used by the voting token. For Governor, this must be chosen to match what the ERC20 or ERC721 voting token uses.",timelock:"The type of timelock to use",storage:"Enable storage of proposal details and enumerability of proposals",settings:"Allow governance to update voting settings (delay, period, proposal threshold)",crossChainExecution:"Whether passed proposals can relay execution to other chains through ERC-7786 gateways. Requires a CrosschainRemoteExecutor contract, controlled by this governor, deployed on each target chain. The gateway and executor are chosen per proposal as arguments to the relayCrosschain function."},Iv}(),Av),Pv((Sv||(Sv=1,Object.defineProperty(Ev,"__esModule",{value:!0}),Ev.stellarGovernorDescriptions=Ev.stellarVaultDescriptions=Ev.stellarStablecoinDescriptions=Ev.stellarNonFungibleDescriptions=Ev.stellarFungibleDescriptions=Ev.stellarCommonDescriptions=Ev.stellarPrompts=void 0,Ev.stellarPrompts={Fungible:"Make a fungible token per the Fungible Token Standard, compatible with SEP-41, similar to ERC-20.",Governor:"Make a governor contract for on-chain governance using token-based voting.",NonFungible:"Make a non-fungible token per the Non-Fungible Token Standard, compatible with SEP-50, similar to ERC-721.",Stablecoin:"Make a stablecoin that uses Fungible Token Standard, compatible with SEP-41.",Vault:"Make a tokenized vault that issues Fungible Token shares for an underlying asset, similar to ERC-4626."},Ev.stellarCommonDescriptions={upgradeable:"Whether the contract can be upgraded.",access:"The type of access control to provision. Ownable is a simple mechanism with a single account authorized for all privileged actions. Roles is a flexible mechanism with a separate role for each privileged action. A role can have many authorized accounts.",explicitImplementations:"Whether the contract should use explicit trait implementations instead of using the default ones provided by the library."},Ev.stellarFungibleDescriptions={decimals:"The number of decimals used to represent token amounts. Defaults to 7.",premint:"The number of tokens to premint for the deployer.",votes:"Whether to enable vote checkpoints and delegation for governance."},Ev.stellarNonFungibleDescriptions={enumerable:"Whether the NFTs are enumerable (can be iterated over).",consecutive:"To batch mint NFTs instead of minting them individually (sequential minting is mandatory).",sequential:"Whether the IDs of the minted NFTs will be sequential.",tokenUri:"The metadata URI returned by the token contract for every NFT.",votes:"Whether to enable vote checkpoints and delegation for governance."},Ev.stellarStablecoinDescriptions={limitations:"Whether to restrict certain users from transferring tokens, either via allowing or blocking them.",decimals:"The number of decimals used to represent token amounts. Defaults to 7.",premint:"The number of tokens to premint for the deployer.",votes:"Whether to enable vote checkpoints and delegation for governance."},Ev.stellarVaultDescriptions={decimalsOffset:"Virtual decimals offset added to the underlying asset decimals to derive the vault share decimals, used to mitigate inflation (donation) attacks via virtual shares. The default of 0 is already safe: it makes such attacks non-profitable. Higher values make attacks orders of magnitude more costly, at the cost of virtual shares absorbing a tiny portion of the value accrued to the vault. Must be between 0 and 10."},Ev.stellarGovernorDescriptions={version:"The semantic version label returned by the governor contract.",votingDelay:"Number of ledgers between proposal creation and voting start (17,000 ledgers are approx. 1 day).",votingPeriod:"Number of ledgers during which voting remains open (120,000 ledgers are approx. 1 week).",proposalThreshold:"Minimum voting power required for creating a proposal, default is 100.",quorum:"Minimum number of votes required for a proposal to pass, default is 500.",timelock:"Whether to add a timelock mechanism that enforces a delay between proposal queuing and execution."}),Ev),Av),Pv((Tv||(Tv=1,Object.defineProperty(zv,"__esModule",{value:!0}),zv.stylusERC1155Descriptions=zv.stylusERC721Descriptions=zv.stylusERC20Descriptions=zv.stylusPrompts=void 0,zv.stylusPrompts={ERC20:"Make a fungible token per the ERC-20 standard.",ERC721:"Make a non-fungible token per the ERC-721 standard.",ERC1155:"Make a non-fungible token per the ERC-1155 standard."},zv.stylusERC20Descriptions={permit:"Whether without paying gas, token holders will be able to allow third parties to transfer from their account.",flashmint:"Whether to include built-in flash loans to allow lending tokens without requiring collateral as long as they're returned in the same transaction."},zv.stylusERC721Descriptions={enumerable:"Whether to allow on-chain enumeration of all tokens or those owned by an account. Increases gas cost of transfers."},zv.stylusERC1155Descriptions={supply:"Whether to keep track of total supply of tokens"}),zv),Av),Pv(function(){return Cv||(Cv=1,e=Ov,Object.defineProperty(e,"__esModule",{value:!0}),e.uniswapHooksInputsDescriptions=e.uniswapHooksPermissionDescriptions=e.uniswapHooksDescriptions=e.uniswapHooksSharesDescriptions=e.uniswapHooksPrompts=e.byHooksDescriptions=void 0,e.byHooksDescriptions={BaseHook:"Base hook implementation that defines all hook entry points, security and permission helpers. Based on the Uniswap v4 periphery implementation. Hook entry points must be overridden and implemented by the inheriting hook to be used, with respective flags set in getHookPermissions.",BaseAsyncSwap:"Base implementation for async swaps that skip the v3-like swap implementation by taking the full swap input amount and returning a delta that nets out the specified amount to 0. Allows developers to implement arbitrary logic for executing swaps, including asynchronous swaps and custom swap-ordering. Mints ERC-6909 claim tokens for the specified currency and amount.",BaseCustomAccounting:"Base implementation for custom accounting and hook-owned liquidity. Enables tokens to be deposited via the hook to allow control and flexibility over how liquidity is computed. The hook is the sole owner of the liquidity and manages fees over liquidity shares accordingly. Designed to work with a single pool key.",BaseCustomCurve:"Base implementation for custom curves that overrides the default v3-like concentrated liquidity implementation. During a swap, calls a function to get the amount of tokens to be sent to the receiver. The return delta is then consumed and applied by the PoolManager. Does not include fee or salt mechanisms by default.",BaseDynamicFee:"Base implementation to apply a dynamic fee via the PoolManager's updateDynamicLPFee function. Allows hooks to update LP fees dynamically based on external conditions. Includes a poke function that can be called by anyone to update the fee. Alternative names to refer to the hook: 'Dynamic pool fee'.",BaseOverrideFee:"Base implementation for automatic dynamic fees applied before swaps. Allows hooks to override the pool's fee before a swap is processed using the override fee flag. The fee is calculated dynamically and applied to the swap. Alternative names to refer to the hook: 'Dynamic swap fee'.",BaseDynamicAfterFee:"Base implementation for dynamic target hook fees applied after swaps. Enforces a dynamic target for the unspecified currency during beforeSwap, where if the swap outcome is better than the target, any positive difference is taken as a hook fee. Fees are handled or distributed by the hook via afterSwapHandler. Alternative names to refer to the hook: 'Swap target enforcer'.",BaseHookFee:"Base implementation for applying hook fees to the unspecified currency of the swap. These fees are independent of the pool's LP fee and are charged as a percentage of the output amount after the swap completes. Fees are taken as ERC-6909 claims.",AntiSandwichHook:"Implements sandwich-resistant AMM design that guarantees no swaps get filled at a price better than the price at the beginning of the slot window. Within a slot window, swaps impact the pool asymmetrically for buys and sells. Only protects swaps in the zeroForOne direction. Alternative names to refer to the hook: 'Sandwich resistance'.",LiquidityPenaltyHook:"Just-in-Time (JIT) liquidity provisioning resistant hook that disincentivizes JIT attacks by penalizing LP fee collection during liquidity removal and disabling it during liquidity addition if liquidity was recently added. The penalty is donated to the pool's liquidity providers in range at the time of removal. Alternative names to refer to the hook: 'JIT liquidity resistance'.",LimitOrderHook:"Limit Order Mechanism hook that allows users to place limit orders at specific ticks outside of the current price range. Orders will be filled if the pool's price crosses the order's tick. Orders can be cancelled at any time until filled. Once completely filled, the resulting liquidity can be withdrawn from the pool.",ReHypothecationHook:"A Uniswap V4 hook that enables rehypothecation of liquidity positions. Allows users to deposit assets into yield-generating sources while providing liquidity to Uniswap pools Just-in-Time during swaps. Assets earn yield when idle and are temporarily injected as pool liquidity only when needed for swap execution, then immediately withdrawn back to yield sources. Users receive ERC20 shares representing their rehypothecated position. Alternative names to refer to the hook: 'Liquidity rehypothecation'.",BaseOracleHook:"A hook that enables a Uniswap V4 pool to record price observations and expose an oracle interface. Records cumulative tick values and provides time-weighted average price data. Allows increasing observation cardinality to store more historical price data. Provides observe function to get cumulative tick values for specified time periods.",OracleHookWithV3Adapters:"A hook that enables a Uniswap V4 pool to record price observations and expose an oracle interface with Uniswap V3-compatible adapters. Extends BaseOracleHook by automatically deploying standard and truncated V3 oracle adapters for each pool, making the oracle data compatible with existing V3 oracle interfaces and tools."},e.uniswapHooksPrompts={Hooks:"Make a Uniswap v4 hook contract using the OpenZeppelin Uniswap Hooks library."},e.uniswapHooksSharesDescriptions={options:"The implementation used to represent position shares. Options include disabling shares or issuing ERC20, ERC6909, or ERC1155 tokens.",name:"The name of the share token when ERC20 shares are enabled.",symbol:"The symbol of the share token when ERC20 shares are enabled.",uri:"The metadata URI used when ERC1155 shares are enabled."},e.uniswapHooksDescriptions={hook:`The name of the Uniswap hook. Available hooks:\n${Object.entries(e.byHooksDescriptions).map(([e,t])=>` - ${e}: ${t}`).join("\n")}`,currencySettler:"Whether to include the CurrencySettler utility to settle pending deltas with the PoolManager during flash accounting.",safeCast:"Whether to include the SafeCast library for safe integer conversions when handling balances or fees.",transientStorage:"Whether to include the TransientSlot and SlotDerivation helpers for temporary state that clears at the end of the transaction.",shares:"Configuration for optional share tokens exposed by the hook.",permissions:"Toggle lifecycle permissions to enable specific core hook callbacks. Required permissions are enforced automatically.",inputs:"Hook-specific configuration inputs used by certain templates."},e.uniswapHooksPermissionDescriptions={beforeInitialize:"Whether to enable the `_beforeInitialize` callback to run before pools are initialized.",afterInitialize:"Whether to enable the `_afterInitialize` callback to react after pool initialization.",beforeAddLiquidity:"Whether to enable the `_beforeAddLiquidity` callback to validate or modify adds before liquidity is deposited.",afterAddLiquidity:"Whether to enable the `_afterAddLiquidity` callback to update accounting after liquidity is added.",beforeRemoveLiquidity:"Whether to enable the `_beforeRemoveLiquidity` callback to validate removals before liquidity is withdrawn.",afterRemoveLiquidity:"Whether to enable the `_afterRemoveLiquidity` callback to update accounting after liquidity is withdrawn.",beforeSwap:"Whether to enable the `_beforeSwap` callback to inspect and optionally modify swap parameters.",afterSwap:"Whether to enable the `_afterSwap` callback to perform post-swap accounting or logic.",beforeDonate:"Whether to enable the `_beforeDonate` callback to run before donations are processed.",afterDonate:"Whether to enable the `_afterDonate` callback to run after donations are processed.",beforeSwapReturnDelta:"Whether to allow `_beforeSwap` to return a `BeforeSwapDelta`, adjusting the assets that must be provided for the swap.",afterSwapReturnDelta:"Whether to allow `_afterSwap` to return an additional delta that adjusts the final swap settlement.",afterAddLiquidityReturnDelta:"Whether to allow `_afterAddLiquidity` to return a `BalanceDelta` that adjusts how liquidity addition balances are settled.",afterRemoveLiquidityReturnDelta:"Whether to allow `_afterRemoveLiquidity` to return a `BalanceDelta` that adjusts how liquidity removal balances are settled."},e.uniswapHooksInputsDescriptions={blockNumberOffset:"The number of blocks that must elapse after liquidity is added before it can be removed without penalties. Used by liquidity protection hooks.",maxAbsTickDelta:"The maximum absolute tick change that can be recorded per oracle observation. Lower values resist manipulation but lag during volatility."}),Ov;var e}(),Av),Pv((Uv||(Uv=1,Object.defineProperty(Dv,"__esModule",{value:!0}),Dv.pickKeys=void 0,Dv.pickKeys=(e,t)=>Object.fromEntries(t.map(t=>[t,e[t]]))),Dv),Av)),bv);const Rv={name:"MyToken",symbol:"MTK",decimals:7..toString(),burnable:!1,votes:!1,pausable:!1,upgradeable:!1,premint:"0",mintable:!1,access:Vg.access,info:Vg.info,explicitImplementations:Vg.explicitImplementations};function qv(e){return{...e,...Hg(e),decimals:e.decimals??Rv.decimals,burnable:e.burnable??Rv.burnable,votes:e.votes??Rv.votes,pausable:e.pausable??Rv.pausable,upgradeable:e.upgradeable??Rv.upgradeable,premint:e.premint||Rv.premint,mintable:e.mintable??Rv.mintable}}function Mv(e){return!0===e.mintable||!0===e.pausable||!0===e.upgradeable}function Lv(e){const t=new Zg(e.name),n=qv(e),i=Pg(n.decimals,"decimals","u32");return function(e,t,n,i,r,o,a){e.addConstructorCode(`Base::set_metadata(e, ${i}, String::from_str(e, "${t}"), String::from_str(e, "${n}"));`),e.addUseClause("stellar_tokens::fungible","Base"),e.addUseClause("stellar_tokens::fungible","FungibleToken"),r&&(e.addUseClause("stellar_tokens::fungible","ContractOverrides"),e.addUseClause("stellar_governance::votes","Votes"),e.addUseClause("stellar_tokens::fungible","votes::FungibleVotes"));e.addUseClause("soroban_sdk","contract"),e.addUseClause("soroban_sdk","contractimpl"),e.addUseClause("soroban_sdk","String"),e.addUseClause("soroban_sdk","Symbol"),e.addUseClause("soroban_sdk","Env"),e.addUseClause("soroban_sdk","Address"),e.addUseClause("soroban_sdk","MuxedAddress"),e.addUseClause("soroban_sdk","Vec");const s={traitName:"FungibleToken",structName:e.name,tags:a?["contractimpl"]:["contractimpl(contracttrait)"],assocType:`type ContractType = ${r?"FungibleVotes":"Base"};`};e.addTraitImplBlock(s),a&&e.addTraitForEachFunctions(s,Hv);o&&(e.addUseClause("stellar_macros","when_not_paused"),e.addTraitFunction(s,Vv.transfer),e.addFunctionTag(Vv.transfer,"when_not_paused",s),e.addTraitFunction(s,Vv.transfer_from),e.addFunctionTag(Vv.transfer_from,"when_not_paused",s));r&&e.addTraitImplBlock({traitName:"Votes",structName:e.name,tags:a?["contractimpl"]:["contractimpl(contracttrait)"],section:"Extensions"})}(t,Dg(n.name),Dg(n.symbol),i,n.votes,n.pausable,n.explicitImplementations),n.premint&&function(e,t,n,i){if(void 0!==t&&"0"!==t){if(!Fv.test(t))throw new Ng({premint:"Not a valid number"});const r=Pg(function(e,t){let n;const i=e.split(".");if(i.length>2)throw new Ng({premint:"Not a valid number"});{const e=i[0]??"";let r=i[1]??"";if(t>r.length)try{r+="0".repeat(t-r.length)}catch{throw new Ng({premint:"Decimals number too large"})}else if(t<r.length)throw new Ng({premint:"Too many decimals"});n=e.concat(r).replace(/^0+/,"")}0===n.length&&(n="0");return n}(t,Number(n)),"premint","u128");e.addConstructorArgument({name:"recipient",type:"Address"}),e.addConstructorCode(`${i?"FungibleVotes":"Base"}::mint(e, &recipient, ${r});`)}}(t,n.premint,i,n.votes),n.pausable&&Qg(t,n.access,n.explicitImplementations),n.upgradeable&&tv(t,n.access,n.explicitImplementations),n.burnable&&function(e,t,n,i){e.addUseClause("stellar_tokens::fungible","burnable::FungibleBurnable");const r={traitName:"FungibleBurnable",structName:e.name,tags:i?["contractimpl"]:["contractimpl(contracttrait)"],section:"Extensions"},o=t?Bv.burn:Vv.burn,a=t?Bv.burn_from:Vv.burn_from;n||t||i?(n&&e.addUseClause("stellar_macros","when_not_paused"),e.addTraitFunction(r,o),e.addTraitFunction(r,a),n&&(e.addFunctionTag(o,"when_not_paused",r),e.addFunctionTag(a,"when_not_paused",r))):e.addTraitImplBlock(r)}(t,n.votes,n.pausable,n.explicitImplementations),n.mintable&&function(e,t,n,i,r){const o=n?Bv.mint:Vv.mint,a=n?Bv.mint_with_caller:Vv.mint_with_caller;switch(t){case!1:break;case"ownable":e.addFreeFunction(o),Kg(e,void 0,o,t,void 0,r),i&&e.addFunctionTag(o,"when_not_paused");break;case"roles":e.addFreeFunction(a),Kg(e,void 0,a,t,{useMacro:!0,caller:"caller",role:"minter"},r),i&&e.addFunctionTag(a,"when_not_paused");break;default:throw new Error("Unknown value for `access`")}}(t,n.access,n.votes,n.pausable,n.explicitImplementations),Gg(t,n.access,n.explicitImplementations),Lg(t,n.info),t}const Fv=/^(\d*\.?\d*)$/;const Vv=Wg({total_supply:{args:[{name:"e",type:"&Env"}],returns:"i128",code:["Self::ContractType::total_supply(e)"]},balance:{args:[{name:"e",type:"&Env"},{name:"account",type:"Address"}],returns:"i128",code:["Self::ContractType::balance(e, &account)"]},allowance:{args:[{name:"e",type:"&Env"},{name:"owner",type:"Address"},{name:"spender",type:"Address"}],returns:"i128",code:["Self::ContractType::allowance(e, &owner, &spender)"]},transfer:{args:[{name:"e",type:"&Env"},{name:"from",type:"Address"},{name:"to",type:"MuxedAddress"},{name:"amount",type:"i128"}],code:["Self::ContractType::transfer(e, &from, &to, amount)"]},transfer_from:{args:[{name:"e",type:"&Env"},{name:"spender",type:"Address"},{name:"from",type:"Address"},{name:"to",type:"Address"},{name:"amount",type:"i128"}],code:["Self::ContractType::transfer_from(e, &spender, &from, &to, amount)"]},approve:{args:[{name:"e",type:"&Env"},{name:"owner",type:"Address"},{name:"spender",type:"Address"},{name:"amount",type:"i128"},{name:"live_until_ledger",type:"u32"}],code:["Self::ContractType::approve(e, &owner, &spender, amount, live_until_ledger)"]},decimals:{args:[{name:"e",type:"&Env"}],returns:"u32",code:["Self::ContractType::decimals(e)"]},name:{args:[{name:"e",type:"&Env"}],returns:"String",code:["Self::ContractType::name(e)"]},symbol:{args:[{name:"e",type:"&Env"}],returns:"String",code:["Self::ContractType::symbol(e)"]},burn:{args:[{name:"e",type:"&Env"},{name:"from",type:"Address"},{name:"amount",type:"i128"}],code:["Base::burn(e, &from, amount)"]},burn_from:{args:[{name:"e",type:"&Env"},{name:"spender",type:"Address"},{name:"from",type:"Address"},{name:"amount",type:"i128"}],code:["Base::burn_from(e, &spender, &from, amount)"]},mint:{args:[{name:"e",type:"&Env"},{name:"account",type:"Address"},{name:"amount",type:"i128"}],code:["Base::mint(e, &account, amount);"]},mint_with_caller:{name:"mint",args:[{name:"e",type:"&Env"},{name:"account",type:"Address"},{name:"amount",type:"i128"},{name:"caller",type:"Address"}],code:["Base::mint(e, &account, amount);"]}}),Bv=Wg({burn:{args:[{name:"e",type:"&Env"},{name:"from",type:"Address"},{name:"amount",type:"i128"}],code:["FungibleVotes::burn(e, &from, amount)"]},burn_from:{args:[{name:"e",type:"&Env"},{name:"spender",type:"Address"},{name:"from",type:"Address"},{name:"amount",type:"i128"}],code:["FungibleVotes::burn_from(e, &spender, &from, amount)"]},mint:{args:[{name:"e",type:"&Env"},{name:"account",type:"Address"},{name:"amount",type:"i128"}],code:["FungibleVotes::mint(e, &account, amount);"]},mint_with_caller:{name:"mint",args:[{name:"e",type:"&Env"},{name:"account",type:"Address"},{name:"amount",type:"i128"},{name:"caller",type:"Address"}],code:["FungibleVotes::mint(e, &account, amount);"]}}),Hv=Zv.pickKeys(Vv,["total_supply","balance","allowance","transfer","transfer_from","approve","decimals","name","symbol"]),Wv={name:"MyGovernor",version:"1.0.0",votingDelay:"17000",votingPeriod:"120000",proposalThreshold:"100",quorum:"500",upgradeable:!1,timelock:!1,access:Vg.access,info:Vg.info,explicitImplementations:Vg.explicitImplementations};function Jv(e){const t=function(e){return{...e,...Hg(e),version:e.version??Wv.version,votingDelay:e.votingDelay??Wv.votingDelay,votingPeriod:e.votingPeriod??Wv.votingPeriod,proposalThreshold:e.proposalThreshold??Wv.proposalThreshold,quorum:e.quorum??Wv.quorum,upgradeable:e.upgradeable??Wv.upgradeable,timelock:e.timelock??Wv.timelock}}(e),n=new Zg(t.name);return function(e,t,n,i,r,o,a,s,l){e.addUseClause("stellar_governance::governor","Governor"),e.addUseClause("stellar_governance::governor","ProposalState"),e.addUseClause("stellar_governance::governor","self",{alias:"governor"}),e.addUseClause("soroban_sdk","contract"),e.addUseClause("soroban_sdk","contractimpl"),e.addUseClause("soroban_sdk","Address"),e.addUseClause("soroban_sdk","BytesN"),e.addUseClause("soroban_sdk","Env"),e.addUseClause("soroban_sdk","String"),e.addUseClause("soroban_sdk","Symbol"),e.addUseClause("soroban_sdk","Val"),e.addUseClause("soroban_sdk","Vec"),e.addConstructorArgument({name:"token_contract",type:"Address"}),e.addConstructorCode(`governor::set_name(e, String::from_str(e, "${t}"));`),e.addConstructorCode(`governor::set_version(e, String::from_str(e, "${n}"));`),e.addConstructorCode(`governor::set_voting_delay(e, ${i});`),e.addConstructorCode(`governor::set_voting_period(e, ${r});`),e.addConstructorCode(`governor::set_proposal_threshold(e, ${o});`),e.addConstructorCode(`governor::set_quorum(e, ${a});`),e.addConstructorCode("governor::set_token_contract(e, &token_contract);");const c={traitName:"Governor",structName:e.name,tags:l?["contractimpl"]:["contractimpl(contracttrait)"]};s?function(e,t){e.addUseClause("soroban_sdk","contracttype"),e.addUseClause("soroban_sdk","IntoVal"),e.addUseClause("stellar_governance::timelock","TimelockClient"),e.addTopLevelDeclaration(["#[contracttype]","enum GovernorTimelockKey {"," Timelock,"," OperationID(BytesN<32>),","}"]),e.addConstructorArgument({name:"timelock_contract",type:"Address"}),e.addConstructorCode("e.storage().instance().set(&GovernorTimelockKey::Timelock, &timelock_contract);"),e.addFreeFunction(Kv.timelock),e.addTraitFunction(t,Xv.proposals_need_queuing),e.addTraitFunction(t,Xv.queue),e.addTraitFunction(t,Xv.execute),e.addTraitFunction(t,Xv.cancel)}(e,c):(e.addTraitFunction(c,Gv.execute),e.addTraitFunction(c,Gv.cancel));l&&e.addTraitForEachFunctions(c,Yv)}(n,Dg(t.name),Dg(t.version),Pg(t.votingDelay,"votingDelay","u32"),Pg(t.votingPeriod,"votingPeriod","u32"),Pg(t.proposalThreshold,"proposalThreshold","u128"),Pg(t.quorum,"quorum","u128"),t.timelock,t.explicitImplementations),t.upgradeable&&tv(n,t.access,t.explicitImplementations),Gg(n,t.access,t.explicitImplementations),Lg(n,t.info),n}const Gv=Wg({execute:{args:[{name:"e",type:"&Env"},{name:"targets",type:"Vec<Address>"},{name:"functions",type:"Vec<Symbol>"},{name:"args",type:"Vec<Vec<Val>>"},{name:"description_hash",type:"BytesN<32>"},{name:"executor",type:"Address"}],returns:"BytesN<32>",code:["executor.require_auth()","let proposal_id = governor::hash_proposal(e, &targets, &functions, &args, &description_hash)","let snapshot = governor::get_proposal_snapshot(e, &proposal_id)","let quorum = Self::quorum(e, snapshot)","governor::execute(e, targets, functions, args, &description_hash, Self::proposals_need_queuing(e), quorum)"]},cancel:{args:[{name:"e",type:"&Env"},{name:"targets",type:"Vec<Address>"},{name:"functions",type:"Vec<Symbol>"},{name:"args",type:"Vec<Vec<Val>>"},{name:"description_hash",type:"BytesN<32>"},{name:"operator",type:"Address"}],returns:"BytesN<32>",code:["let proposal_id = governor::hash_proposal(e, &targets, &functions, &args, &description_hash)","let proposer = governor::get_proposal_proposer(e, &proposal_id)","assert!(operator == proposer)","operator.require_auth()","governor::cancel(e, targets, functions, args, &description_hash)"]}}),Kv=Wg({timelock:{args:[{name:"e",type:"&Env"}],returns:"Address",code:['e.storage().instance().get(&GovernorTimelockKey::Timelock).expect("timelock not set")']}}),Xv=Wg({proposals_need_queuing:{args:[{name:"_e",type:"&Env"}],returns:"bool",code:["true"]},queue:{args:[{name:"e",type:"&Env"},{name:"targets",type:"Vec<Address>"},{name:"functions",type:"Vec<Symbol>"},{name:"args",type:"Vec<Vec<Val>>"},{name:"description_hash",type:"BytesN<32>"},{name:"eta",type:"u32"},{name:"_operator",type:"Address"}],returns:"BytesN<32>",code:["let proposal_id = governor::hash_proposal(e, &targets, &functions, &args, &description_hash)","let snapshot = governor::get_proposal_snapshot(e, &proposal_id)","let quorum = Self::quorum(e, snapshot)","let proposal_id = governor::queue(e, targets.clone(), functions.clone(), args.clone(), &description_hash, eta, quorum)","let timelock = Self::timelock(e)","let delay = eta.saturating_sub(e.ledger().sequence())","let execute_args: Vec<Val> = (targets, functions, args, description_hash.clone(), timelock.clone()).into_val(e)","let timelock_client = TimelockClient::new(e, &timelock)","let zero_predecessor = BytesN::from_array(e, &[0u8; 32])",'let op_id = timelock_client.schedule(&e.current_contract_address(), &Symbol::new(e, "execute"), &execute_args, &zero_predecessor, &description_hash, &delay, &e.current_contract_address())',"e.storage().persistent().set(&GovernorTimelockKey::OperationID(proposal_id.clone()), &op_id);","proposal_id"]},execute:{args:[{name:"e",type:"&Env"},{name:"targets",type:"Vec<Address>"},{name:"functions",type:"Vec<Symbol>"},{name:"args",type:"Vec<Vec<Val>>"},{name:"description_hash",type:"BytesN<32>"},{name:"executor",type:"Address"}],returns:"BytesN<32>",code:["let timelock = Self::timelock(e)","assert!(executor == timelock)","executor.require_auth()","let proposal_id = governor::hash_proposal(e, &targets, &functions, &args, &description_hash)","let snapshot = governor::get_proposal_snapshot(e, &proposal_id)","let quorum = Self::quorum(e, snapshot)","governor::execute(e, targets, functions, args, &description_hash, Self::proposals_need_queuing(e), quorum)"]},cancel:{args:[{name:"e",type:"&Env"},{name:"targets",type:"Vec<Address>"},{name:"functions",type:"Vec<Symbol>"},{name:"args",type:"Vec<Vec<Val>>"},{name:"description_hash",type:"BytesN<32>"},{name:"operator",type:"Address"}],returns:"BytesN<32>",code:["let proposal_id = governor::hash_proposal(e, &targets, &functions, &args, &description_hash)","let proposer = governor::get_proposal_proposer(e, &proposal_id)","assert!(operator == proposer)","operator.require_auth()","if let Some(op_id) = e.storage().persistent().get::<_, BytesN<32>>(&GovernorTimelockKey::OperationID(proposal_id)) {"," let timelock = Self::timelock(e);"," let timelock_client = TimelockClient::new(e, &timelock);"," timelock_client.cancel(&op_id, &e.current_contract_address());","}","governor::cancel(e, targets, functions, args, &description_hash)"]}}),Yv=Wg({name:{args:[{name:"e",type:"&Env"}],returns:"String",code:["governor::get_name(e)"]},version:{args:[{name:"e",type:"&Env"}],returns:"String",code:["governor::get_version(e)"]},voting_delay:{args:[{name:"e",type:"&Env"}],returns:"u32",code:["governor::get_voting_delay(e)"]},voting_period:{args:[{name:"e",type:"&Env"}],returns:"u32",code:["governor::get_voting_period(e)"]},proposal_threshold:{args:[{name:"e",type:"&Env"}],returns:"u128",code:["governor::get_proposal_threshold(e)"]},get_token_contract:{args:[{name:"e",type:"&Env"}],returns:"Address",code:["governor::get_token_contract(e)"]},counting_mode:{args:[{name:"e",type:"&Env"}],returns:"Symbol",code:["governor::counting_mode(e)"]},has_voted:{args:[{name:"e",type:"&Env"},{name:"proposal_id",type:"BytesN<32>"},{name:"account",type:"Address"}],returns:"bool",code:["governor::has_voted(e, &proposal_id, &account)"]},quorum:{args:[{name:"e",type:"&Env"},{name:"ledger",type:"u32"}],returns:"u128",code:["governor::get_quorum(e, ledger)"]},proposal_state:{args:[{name:"e",type:"&Env"},{name:"proposal_id",type:"BytesN<32>"}],returns:"ProposalState",code:["let snapshot = governor::get_proposal_snapshot(e, &proposal_id)","let quorum = Self::quorum(e, snapshot)","governor::get_proposal_state(e, &proposal_id, quorum)"]},proposal_snapshot:{args:[{name:"e",type:"&Env"},{name:"proposal_id",type:"BytesN<32>"}],returns:"u32",code:["governor::get_proposal_snapshot(e, &proposal_id)"]},proposal_deadline:{args:[{name:"e",type:"&Env"},{name:"proposal_id",type:"BytesN<32>"}],returns:"u32",code:["governor::get_proposal_deadline(e, &proposal_id)"]},proposal_proposer:{args:[{name:"e",type:"&Env"},{name:"proposal_id",type:"BytesN<32>"}],returns:"Address",code:["governor::get_proposal_proposer(e, &proposal_id)"]},get_proposal_id:{args:[{name:"e",type:"&Env"},{name:"targets",type:"Vec<Address>"},{name:"functions",type:"Vec<Symbol>"},{name:"args",type:"Vec<Vec<Val>>"},{name:"description_hash",type:"BytesN<32>"}],returns:"BytesN<32>",code:["governor::hash_proposal(e, &targets, &functions, &args, &description_hash)"]},propose:{args:[{name:"e",type:"&Env"},{name:"targets",type:"Vec<Address>"},{name:"functions",type:"Vec<Symbol>"},{name:"args",type:"Vec<Vec<Val>>"},{name:"description",type:"String"},{name:"proposer",type:"Address"}],returns:"BytesN<32>",code:["proposer.require_auth()","governor::propose(e, targets, functions, args, description, &proposer)"]},cast_vote:{args:[{name:"e",type:"&Env"},{name:"proposal_id",type:"BytesN<32>"},{name:"vote_type",type:"u32"},{name:"reason",type:"String"},{name:"voter",type:"Address"}],returns:"u128",code:["voter.require_auth()","let snapshot = governor::get_proposal_snapshot(e, &proposal_id)","let quorum = Self::quorum(e, snapshot)","governor::cast_vote(e, &proposal_id, vote_type, &reason, &voter, quorum)"]},queue:{args:[{name:"e",type:"&Env"},{name:"targets",type:"Vec<Address>"},{name:"functions",type:"Vec<Symbol>"},{name:"args",type:"Vec<Vec<Val>>"},{name:"description_hash",type:"BytesN<32>"},{name:"eta",type:"u32"},{name:"_operator",type:"Address"}],returns:"BytesN<32>",code:["if !Self::proposals_need_queuing(e) {"," soroban_sdk::panic_with_error!(e, governor::GovernorError::QueueNotEnabled);","}","let proposal_id = governor::hash_proposal(e, &targets, &functions, &args, &description_hash)","let snapshot = governor::get_proposal_snapshot(e, &proposal_id)","let quorum = Self::quorum(e, snapshot)","governor::queue(e, targets, functions, args, &description_hash, eta, quorum)"]},proposals_need_queuing:{args:[{name:"_e",type:"&Env"}],returns:"bool",code:["false"]}}),Qv={name:"MyToken",symbol:"MTK",tokenUri:"https://www.mytoken.com",burnable:!1,votes:!1,enumerable:!1,consecutive:!1,pausable:!1,upgradeable:!1,mintable:!1,sequential:!1,access:Vg.access,info:Vg.info,explicitImplementations:Vg.explicitImplementations};function eb(e){const t=new Zg(e.name),n=function(e){return{...e,...Hg(e),tokenUri:e.tokenUri??Qv.tokenUri,burnable:e.burnable??Qv.burnable,votes:e.votes??Qv.votes,consecutive:e.consecutive??Qv.consecutive,enumerable:e.enumerable??Qv.enumerable,pausable:e.pausable??Qv.pausable,upgradeable:e.upgradeable??Qv.upgradeable,mintable:e.mintable??Qv.mintable,sequential:e.sequential??Qv.sequential}}(e),i={};if(n.enumerable&&n.consecutive&&(i.enumerable="Enumerable cannot be used with Consecutive extension",i.consecutive="Consecutive cannot be used with Enumerable extension"),n.consecutive&&n.mintable&&(i.consecutive="Consecutive cannot be used with Mintable extension",i.mintable="Mintable cannot be used with Consecutive extension"),n.consecutive&&n.sequential&&(i.consecutive="Consecutive cannot be used with Sequential minting",i.sequential="Sequential minting cannot be used with Consecutive extension"),n.votes&&n.enumerable&&(i.votes="Votes extension cannot be used with Enumerable extension",i.enumerable="Enumerable extension cannot be used with Votes extension"),n.votes&&n.consecutive&&(i.votes="Votes extension cannot be used with Consecutive extension",i.consecutive="Consecutive extension cannot be used with Votes extension"),Object.keys(i).length>0)throw new Ng(i);return function(e,t,n,i,r,o,a){e.addConstructorCode(`let uri = String::from_str(e, "${i}");`),e.addConstructorCode(`let name = String::from_str(e, "${t}");`),e.addConstructorCode(`let symbol = String::from_str(e, "${n}");`),e.addConstructorCode("Base::set_metadata(e, uri, name, symbol);"),e.addUseClause("stellar_tokens::non_fungible","Base"),e.addUseClause("stellar_tokens::non_fungible","NonFungibleToken"),r&&(e.addUseClause("stellar_governance::votes","Votes"),e.addUseClause("stellar_tokens::non_fungible","votes::NonFungibleVotes"));a&&e.addUseClause("stellar_tokens::non_fungible","ContractOverrides");e.addUseClause("soroban_sdk","contract"),e.addUseClause("soroban_sdk","contractimpl"),e.addUseClause("soroban_sdk","String"),e.addUseClause("soroban_sdk","Env"),e.addUseClause("soroban_sdk","Address");const s={traitName:"NonFungibleToken",structName:e.name,tags:a?["contractimpl"]:["contractimpl(contracttrait)"],assocType:`type ContractType = ${r?"NonFungibleVotes":"Base"};`};e.addTraitImplBlock(s),a&&e.addTraitForEachFunctions(s,ib);o&&(e.addUseClause("stellar_macros","when_not_paused"),e.addTraitFunction(s,tb.transfer),e.addFunctionTag(tb.transfer,"when_not_paused",s),e.addFunctionTag(tb.transfer_from,"when_not_paused",s),e.addTraitFunction(s,tb.transfer_from));r&&e.addTraitImplBlock({traitName:"Votes",structName:e.name,tags:a?["contractimpl"]:["contractimpl(contracttrait)"],section:"Extensions"})}(t,Dg(n.name),Dg(n.symbol),Dg(n.tokenUri),n.votes,n.pausable,n.explicitImplementations),n.pausable&&Qg(t,n.access,n.explicitImplementations),n.upgradeable&&tv(t,n.access,n.explicitImplementations),n.burnable&&function(e,t,n){e.addUseClause("stellar_tokens::non_fungible","burnable::NonFungibleBurnable");const i={traitName:"NonFungibleBurnable",structName:e.name,tags:n?["contractimpl"]:["contractimpl(contracttrait)"],section:"Extensions"};t?(e.addUseClause("stellar_macros","when_not_paused"),e.addTraitFunction(i,rb.burn),e.addFunctionTag(rb.burn,"when_not_paused",i),e.addTraitFunction(i,rb.burn_from),e.addFunctionTag(rb.burn_from,"when_not_paused",i)):n?e.addTraitForEachFunctions(i,ob):e.addTraitImplBlock(i)}(t,n.pausable,n.explicitImplementations),n.enumerable&&function(e,t){e.addUseClause("stellar_tokens::non_fungible","enumerable::{NonFungibleEnumerable, Enumerable}");const n={traitName:"NonFungibleEnumerable",structName:e.name,tags:t?["contractimpl"]:["contractimpl(contracttrait)"],section:"Extensions"};t?e.addTraitForEachFunctions(n,sb):e.addTraitImplBlock(n);e.overrideAssocType("NonFungibleToken","type ContractType = Enumerable;")}(t,n.explicitImplementations),n.consecutive&&function(e,t,n,i){e.addUseClause("stellar_tokens::non_fungible","consecutive::{NonFungibleConsecutive, Consecutive}");const r=!1===n?Jg:n,o={traitName:"NonFungibleConsecutive",structName:e.name,tags:["contractimpl"],section:"Extensions"};e.addTraitImplBlock(o),e.overrideAssocType("NonFungibleToken","type ContractType = Consecutive;");const a="ownable"===r?lb.batch_mint:lb.batch_mint_with_caller;e.addFreeFunction(a),t&&e.addFunctionTag(a,"when_not_paused");Kg(e,void 0,a,r,{useMacro:!0,role:"minter",caller:"caller"},i)}(t,n.pausable,n.access,n.explicitImplementations),n.mintable&&function(e,t,n,i,r,o,a){const s={useMacro:!0,role:"minter",caller:"caller"},l=!1===o?Jg:o;let c;c=t?r?"ownable"===l?ab.sequential_mint:ab.sequential_mint_with_caller:"ownable"===l?ab.non_sequential_mint:ab.non_sequential_mint_with_caller:r?"ownable"===l?n?nb.sequential_mint:tb.sequential_mint:n?nb.sequential_mint_with_caller:tb.sequential_mint_with_caller:"ownable"===l?n?nb.mint:tb.mint:n?nb.mint_with_caller:tb.mint_with_caller;e.addFreeFunction(c),Kg(e,void 0,c,l,s,a),i&&e.addFunctionTag(c,"when_not_paused")}(t,n.enumerable,n.votes,n.pausable,n.sequential,n.access,n.explicitImplementations),Gg(t,n.access,n.explicitImplementations),Lg(t,n.info),t}const tb=Wg({balance:{args:[{name:"e",type:"&Env"},{name:"owner",type:"Address"}],returns:"u32",code:["Self::ContractType::balance(e, &owner)"]},owner_of:{args:[{name:"e",type:"&Env"},{name:"token_id",type:"u32"}],returns:"Address",code:["Self::ContractType::owner_of(e, token_id)"]},transfer:{args:[{name:"e",type:"&Env"},{name:"from",type:"Address"},{name:"to",type:"Address"},{name:"token_id",type:"u32"}],code:["Self::ContractType::transfer(e, &from, &to, token_id);"]},transfer_from:{args:[{name:"e",type:"&Env"},{name:"spender",type:"Address"},{name:"from",type:"Address"},{name:"to",type:"Address"},{name:"token_id",type:"u32"}],code:["Self::ContractType::transfer_from(e, &spender, &from, &to, token_id);"]},approve:{args:[{name:"e",type:"&Env"},{name:"approver",type:"Address"},{name:"approved",type:"Address"},{name:"token_id",type:"u32"},{name:"live_until_ledger",type:"u32"}],code:["Self::ContractType::approve(e, &approver, &approved, token_id, live_until_ledger)"]},approve_for_all:{args:[{name:"e",type:"&Env"},{name:"owner",type:"Address"},{name:"operator",type:"Address"},{name:"live_until_ledger",type:"u32"}],code:["Self::ContractType::approve_for_all(e, &owner, &operator, live_until_ledger)"]},get_approved:{args:[{name:"e",type:"&Env"},{name:"token_id",type:"u32"}],returns:"Option<Address>",code:["Self::ContractType::get_approved(e, token_id)"]},is_approved_for_all:{args:[{name:"e",type:"&Env"},{name:"owner",type:"Address"},{name:"operator",type:"Address"}],returns:"bool",code:["Self::ContractType::is_approved_for_all(e, &owner, &operator)"]},name:{args:[{name:"e",type:"&Env"}],returns:"String",code:["Self::ContractType::name(e)"]},symbol:{args:[{name:"e",type:"&Env"}],returns:"String",code:["Self::ContractType::symbol(e)"]},token_uri:{args:[{name:"e",type:"&Env"},{name:"token_id",type:"u32"}],returns:"String",code:["Self::ContractType::token_uri(e, token_id)"]},mint:{args:[{name:"e",type:"&Env"},{name:"to",type:"Address"},{name:"token_id",type:"u32"}],code:["Base::mint(e, &to, token_id);"]},mint_with_caller:{name:"mint",args:[{name:"e",type:"&Env"},{name:"to",type:"Address"},{name:"token_id",type:"u32"},{name:"caller",type:"Address"}],code:["Base::mint(e, &to, token_id);"]},sequential_mint:{name:"mint",args:[{name:"e",type:"&Env"},{name:"to",type:"Address"}],code:["Base::sequential_mint(e, &to);"]},sequential_mint_with_caller:{name:"mint",args:[{name:"e",type:"&Env"},{name:"to",type:"Address"},{name:"caller",type:"Address"}],code:["Base::sequential_mint(e, &to);"]}}),nb=Wg({mint:{args:[{name:"e",type:"&Env"},{name:"to",type:"Address"},{name:"token_id",type:"u32"}],code:["NonFungibleVotes::mint(e, &to, token_id);"]},mint_with_caller:{name:"mint",args:[{name:"e",type:"&Env"},{name:"to",type:"Address"},{name:"token_id",type:"u32"},{name:"caller",type:"Address"}],code:["NonFungibleVotes::mint(e, &to, token_id);"]},sequential_mint:{name:"mint",args:[{name:"e",type:"&Env"},{name:"to",type:"Address"}],code:["NonFungibleVotes::sequential_mint(e, &to);"]},sequential_mint_with_caller:{name:"mint",args:[{name:"e",type:"&Env"},{name:"to",type:"Address"},{name:"caller",type:"Address"}],code:["NonFungibleVotes::sequential_mint(e, &to);"]}}),ib=Zv.pickKeys(tb,["balance","owner_of","transfer","transfer_from","approve","approve_for_all","get_approved","is_approved_for_all","name","symbol","token_uri"]),rb=Wg({burn:{args:[{name:"e",type:"&Env"},{name:"from",type:"Address"},{name:"token_id",type:"u32"}],code:["Self::ContractType::burn(e, &from, token_id)"]},burn_from:{args:[{name:"e",type:"&Env"},{name:"spender",type:"Address"},{name:"from",type:"Address"},{name:"token_id",type:"u32"}],code:["Self::ContractType::burn_from(e, &spender, &from, token_id)"]}}),ob=Zv.pickKeys(rb,["burn","burn_from"]),ab=Wg({total_supply:{args:[{name:"e",type:"&Env"}],returns:"u32",code:["Enumerable::total_supply(e)"]},get_owner_token_id:{args:[{name:"e",type:"&Env"},{name:"owner",type:"Address"},{name:"index",type:"u32"}],returns:"u32",code:["Enumerable::get_owner_token_id(e, &owner, index)"]},get_token_id:{args:[{name:"e",type:"&Env"},{name:"index",type:"u32"}],returns:"u32",code:["Enumerable::get_token_id(e, index)"]},non_sequential_mint:{name:"mint",args:[{name:"e",type:"&Env"},{name:"to",type:"Address"},{name:"token_id",type:"u32"}],code:["Enumerable::non_sequential_mint(e, &to, token_id);"]},non_sequential_mint_with_caller:{name:"mint",args:[{name:"e",type:"&Env"},{name:"to",type:"Address"},{name:"token_id",type:"u32"},{name:"caller",type:"Address"}],code:["Enumerable::non_sequential_mint(e, &to, token_id);"]},sequential_mint:{name:"mint",args:[{name:"e",type:"&Env"},{name:"to",type:"Address"}],code:["Enumerable::sequential_mint(e, &to);"]},sequential_mint_with_caller:{name:"mint",args:[{name:"e",type:"&Env"},{name:"to",type:"Address"},{name:"caller",type:"Address"}],code:["Enumerable::sequential_mint(e, &to);"]}}),sb=Zv.pickKeys(ab,["total_supply","get_owner_token_id","get_token_id"]),lb=Wg({batch_mint:{name:"batch_mint",args:[{name:"e",type:"&Env"},{name:"to",type:"Address"},{name:"amount",type:"u32"}],returns:"u32",code:["Consecutive::batch_mint(e, &to, amount)"]},batch_mint_with_caller:{name:"batch_mint",args:[{name:"e",type:"&Env"},{name:"to",type:"Address"},{name:"amount",type:"u32"},{name:"caller",type:"Address"}],returns:"u32",code:["Consecutive::batch_mint(e, &to, amount)"]}}),cb={...Rv,name:"MyStablecoin",symbol:"MST",limitations:!1};function ub(e){const t=function(e){return{...qv(e),name:e.name??cb.name,symbol:e.symbol??cb.symbol,limitations:e.limitations??cb.limitations}}(e);if(t.votes&&t.limitations)throw new Ng({votes:"Votes extension cannot be used with stablecoin limitations",limitations:"Stablecoin limitations cannot be used with Votes extension"});const n=Lv(t);return t.limitations&&function(e,t,n,i){const r="allowlist"===n,o={traitName:r?"FungibleAllowList":"FungibleBlockList",structName:e.name,tags:["contractimpl"],section:"Extensions"};r?(e.addUseClause("stellar_tokens::fungible","allowlist::{AllowList, FungibleAllowList}"),e.overrideAssocType("FungibleToken","type ContractType = AllowList;")):(e.addUseClause("stellar_tokens::fungible","blocklist::{BlockList, FungibleBlockList}"),e.overrideAssocType("FungibleToken","type ContractType = BlockList;"));i&&function(e){e.addUseClause("stellar_tokens::fungible","ContractOverrides");const t={traitName:"FungibleToken",structName:e.name,tags:[]},n=[[Vv.total_supply,["Self::ContractType::total_supply(e)"]],[Vv.balance,["Self::ContractType::balance(e, &account)"]],[Vv.allowance,["Self::ContractType::allowance(e, &owner, &spender)"]],[Vv.decimals,["Self::ContractType::decimals(e)"]],[Vv.name,["Self::ContractType::name(e)"]],[Vv.symbol,["Self::ContractType::symbol(e)"]]];for(const[i,r]of n)e.setFunctionCode(i,r,t)}(e);const[a,s,l]=r?[db.allowed,db.allow_user,db.disallow_user]:[db.blocked,db.block_user,db.unblock_user];e.addTraitFunction(o,a);const c={useMacro:!0,role:"manager",caller:"operator"};e.addTraitFunction(o,s),Kg(e,o,s,t,c,i),e.addTraitFunction(o,l),Kg(e,o,l,t,c,i)}(n,t.access,t.limitations,t.explicitImplementations),n}const db={...Vv,...Wg({allowed:{args:[{name:"e",type:"&Env"},{name:"account",type:"Address"}],returns:"bool",code:["AllowList::allowed(e, &account)"]},allow_user:{args:[{name:"e",type:"&Env"},{name:"user",type:"Address"},{name:"operator",type:"Address"}],code:["AllowList::allow_user(e, &user)"]},disallow_user:{args:[{name:"e",type:"&Env"},{name:"user",type:"Address"},{name:"operator",type:"Address"}],code:["AllowList::disallow_user(e, &user)"]},blocked:{args:[{name:"e",type:"&Env"},{name:"account",type:"Address"}],returns:"bool",code:["BlockList::blocked(e, &account)"]},block_user:{args:[{name:"e",type:"&Env"},{name:"user",type:"Address"},{name:"operator",type:"Address"}],code:["BlockList::block_user(e, &user)"]},unblock_user:{args:[{name:"e",type:"&Env"},{name:"user",type:"Address"},{name:"operator",type:"Address"}],code:["BlockList::unblock_user(e, &user)"]}})},pb={name:"MyVault",symbol:"MTK",decimalsOffset:"0",pausable:!1,upgradeable:!1,access:Vg.access,info:Vg.info,explicitImplementations:Vg.explicitImplementations};function mb(e){const t=new Zg(e.name),n=function(e){return{...e,...Hg(e),decimalsOffset:e.decimalsOffset??pb.decimalsOffset,pausable:e.pausable??pb.pausable,upgradeable:e.upgradeable??pb.upgradeable}}(e),i=Pg(n.decimalsOffset,"decimalsOffset","u32");if(i>10)throw new Ng({decimalsOffset:"Maximum decimals offset is 10"});return function(e,t,n,i,r,o){e.addConstructorArgument({name:"asset",type:"Address"}),e.addConstructorCode("Vault::set_asset(e, asset);"),e.addConstructorCode(`Vault::set_decimals_offset(e, ${i});`),e.addConstructorCode(`Base::set_metadata(e, Self::decimals(e), String::from_str(e, "${t}"), String::from_str(e, "${n}"));`),e.addUseClause("stellar_tokens::fungible","Base"),e.addUseClause("stellar_tokens::fungible","FungibleToken"),e.addUseClause("stellar_tokens::vault","FungibleVault"),e.addUseClause("stellar_tokens::vault","Vault"),(o||r)&&e.addUseClause("stellar_tokens::fungible","ContractOverrides");e.addUseClause("soroban_sdk","contract"),e.addUseClause("soroban_sdk","contractimpl"),e.addUseClause("soroban_sdk","String"),e.addUseClause("soroban_sdk","Env"),e.addUseClause("soroban_sdk","Address"),e.addUseClause("soroban_sdk","MuxedAddress");const a={traitName:"FungibleToken",structName:e.name,tags:o?["contractimpl"]:["contractimpl(contracttrait)"],assocType:"type ContractType = Vault;"};e.addTraitImplBlock(a),o?e.addTraitForEachFunctions(a,hb):e.addTraitFunction(a,fb.decimals);r&&(e.addUseClause("stellar_macros","when_not_paused"),e.addTraitFunction(a,fb.transfer),e.addFunctionTag(fb.transfer,"when_not_paused",a),e.addTraitFunction(a,fb.transfer_from),e.addFunctionTag(fb.transfer_from,"when_not_paused",a));const s={traitName:"FungibleVault",structName:e.name,tags:o?["contractimpl"]:["contractimpl(contracttrait)"],section:"Extensions"};o?e.addTraitForEachFunctions(s,gb):e.addTraitImplBlock(s)}(t,Dg(n.name),Dg(n.symbol),i,n.pausable,n.explicitImplementations),n.pausable&&Qg(t,n.access,n.explicitImplementations),n.upgradeable&&tv(t,n.access,n.explicitImplementations),Gg(t,n.access,n.explicitImplementations),"roles"===n.access&&(t.addUseClause("soroban_sdk","Symbol"),t.addUseClause("soroban_sdk","Vec")),Lg(t,n.info),t}const fb=Wg({total_supply:{args:[{name:"e",type:"&Env"}],returns:"i128",code:["Self::ContractType::total_supply(e)"]},balance:{args:[{name:"e",type:"&Env"},{name:"account",type:"Address"}],returns:"i128",code:["Self::ContractType::balance(e, &account)"]},allowance:{args:[{name:"e",type:"&Env"},{name:"owner",type:"Address"},{name:"spender",type:"Address"}],returns:"i128",code:["Self::ContractType::allowance(e, &owner, &spender)"]},transfer:{args:[{name:"e",type:"&Env"},{name:"from",type:"Address"},{name:"to",type:"MuxedAddress"},{name:"amount",type:"i128"}],code:["Self::ContractType::transfer(e, &from, &to, amount)"]},transfer_from:{args:[{name:"e",type:"&Env"},{name:"spender",type:"Address"},{name:"from",type:"Address"},{name:"to",type:"Address"},{name:"amount",type:"i128"}],code:["Self::ContractType::transfer_from(e, &spender, &from, &to, amount)"]},approve:{args:[{name:"e",type:"&Env"},{name:"owner",type:"Address"},{name:"spender",type:"Address"},{name:"amount",type:"i128"},{name:"live_until_ledger",type:"u32"}],code:["Self::ContractType::approve(e, &owner, &spender, amount, live_until_ledger)"]},decimals:{args:[{name:"e",type:"&Env"}],returns:"u32",code:["Vault::decimals(e)"]},name:{args:[{name:"e",type:"&Env"}],returns:"String",code:["Self::ContractType::name(e)"]},symbol:{args:[{name:"e",type:"&Env"}],returns:"String",code:["Self::ContractType::symbol(e)"]},query_asset:{args:[{name:"e",type:"&Env"}],returns:"Address",code:["Self::ContractType::query_asset(e)"]},total_assets:{args:[{name:"e",type:"&Env"}],returns:"i128",code:["Self::ContractType::total_assets(e)"]},convert_to_shares:{args:[{name:"e",type:"&Env"},{name:"assets",type:"i128"}],returns:"i128",code:["Self::ContractType::convert_to_shares(e, assets)"]},convert_to_assets:{args:[{name:"e",type:"&Env"},{name:"shares",type:"i128"}],returns:"i128",code:["Self::ContractType::convert_to_assets(e, shares)"]},max_deposit:{args:[{name:"e",type:"&Env"},{name:"receiver",type:"Address"}],returns:"i128",code:["Self::ContractType::max_deposit(e, receiver)"]},preview_deposit:{args:[{name:"e",type:"&Env"},{name:"assets",type:"i128"}],returns:"i128",code:["Self::ContractType::preview_deposit(e, assets)"]},deposit:{args:[{name:"e",type:"&Env"},{name:"assets",type:"i128"},{name:"receiver",type:"Address"},{name:"from",type:"Address"},{name:"operator",type:"Address"}],returns:"i128",code:["Self::ContractType::deposit(e, assets, receiver, from, operator)"]},max_mint:{args:[{name:"e",type:"&Env"},{name:"receiver",type:"Address"}],returns:"i128",code:["Self::ContractType::max_mint(e, receiver)"]},preview_mint:{args:[{name:"e",type:"&Env"},{name:"shares",type:"i128"}],returns:"i128",code:["Self::ContractType::preview_mint(e, shares)"]},mint:{args:[{name:"e",type:"&Env"},{name:"shares",type:"i128"},{name:"receiver",type:"Address"},{name:"from",type:"Address"},{name:"operator",type:"Address"}],returns:"i128",code:["Self::ContractType::mint(e, shares, receiver, from, operator)"]},max_withdraw:{args:[{name:"e",type:"&Env"},{name:"owner",type:"Address"}],returns:"i128",code:["Self::ContractType::max_withdraw(e, owner)"]},preview_withdraw:{args:[{name:"e",type:"&Env"},{name:"assets",type:"i128"}],returns:"i128",code:["Self::ContractType::preview_withdraw(e, assets)"]},withdraw:{args:[{name:"e",type:"&Env"},{name:"assets",type:"i128"},{name:"receiver",type:"Address"},{name:"owner",type:"Address"},{name:"operator",type:"Address"}],returns:"i128",code:["Self::ContractType::withdraw(e, assets, receiver, owner, operator)"]},max_redeem:{args:[{name:"e",type:"&Env"},{name:"owner",type:"Address"}],returns:"i128",code:["Self::ContractType::max_redeem(e, owner)"]},preview_redeem:{args:[{name:"e",type:"&Env"},{name:"shares",type:"i128"}],returns:"i128",code:["Self::ContractType::preview_redeem(e, shares)"]},redeem:{args:[{name:"e",type:"&Env"},{name:"shares",type:"i128"},{name:"receiver",type:"Address"},{name:"owner",type:"Address"},{name:"operator",type:"Address"}],returns:"i128",code:["Self::ContractType::redeem(e, shares, receiver, owner, operator)"]}}),hb=Zv.pickKeys(fb,["total_supply","balance","allowance","transfer","transfer_from","approve","decimals","name","symbol"]),gb=Zv.pickKeys(fb,["query_asset","total_assets","convert_to_shares","convert_to_assets","max_deposit","preview_deposit","deposit","max_mint","preview_mint","mint","max_withdraw","preview_withdraw","withdraw","max_redeem","preview_redeem","redeem"]);const vb={print:function(e=Rv){return cv(Lv(e))},defaults:Rv,isAccessControlRequired:Mv},bb={print:function(e=Wv){return cv(Jv(e))},defaults:Wv,isAccessControlRequired:function(e){return!0===e.upgradeable}},yb={print:function(e=Qv){return cv(eb(e))},defaults:Qv,isAccessControlRequired:function(e){return!0===e.mintable||!0===e.pausable||!0===e.upgradeable||!0===e.consecutive}},$b={print:function(e=cb){return cv(ub(e))},defaults:cb,isAccessControlRequired:function(e){return Mv(e)||!1!==e.limitations}},_b={print:function(e=pb){return cv(mb(e))},defaults:pb,isAccessControlRequired:function(e){return!0===e.pausable||!0===e.upgradeable}};var kb,wb;function xb(){if(wb)return kb;function e(t){return t instanceof Map?t.clear=t.delete=t.set=function(){throw new Error("map is read-only")}:t instanceof Set&&(t.add=t.clear=t.delete=function(){throw new Error("set is read-only")}),Object.freeze(t),Object.getOwnPropertyNames(t).forEach(n=>{const i=t[n],r=typeof i;"object"!==r&&"function"!==r||Object.isFrozen(i)||e(i)}),t}wb=1;class t{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function i(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t];return t.forEach(function(e){for(const t in e)n[t]=e[t]}),n}const r=e=>!!e.scope;class o{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=n(e)}openNode(e){if(!r(e))return;const t=((e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map((e,t)=>`${e}${"_".repeat(t+1)}`)].join(" ")}return`${t}${e}`})(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){r(e)&&(this.buffer+="</span>")}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const a=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class s{constructor(){this.rootNode=a(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t=a({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(t=>this._walk(e,t)),e.closeNode(t)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every(e=>"string"==typeof e)?e.children=[e.children.join("")]:e.children.forEach(e=>{s._collapse(e)}))}}class l extends s{constructor(e){super(),this.options=e}addText(e){""!==e&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){const n=e.root;t&&(n.scope=`language:${t}`),this.add(n)}toHTML(){return new o(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function c(e){return e?"string"==typeof e?e:e.source:null}function u(e){return m("(?=",e,")")}function d(e){return m("(?:",e,")*")}function p(e){return m("(?:",e,")?")}function m(...e){return e.map(e=>c(e)).join("")}function f(...e){const t=function(e){const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}(e);return"("+(t.capture?"":"?:")+e.map(e=>c(e)).join("|")+")"}function h(e){return new RegExp(e.toString()+"|").exec("").length-1}const g=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function v(e,{joinWith:t}){let n=0;return e.map(e=>{n+=1;const t=n;let i=c(e),r="";for(;i.length>0;){const e=g.exec(i);if(!e){r+=i;break}r+=i.substring(0,e.index),i=i.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?r+="\\"+String(Number(e[1])+t):(r+=e[0],"("===e[0]&&n++)}return r}).map(e=>`(${e})`).join(t)}const b="[a-zA-Z]\\w*",y="[a-zA-Z_]\\w*",$="\\b\\d+(\\.\\d+)?",_="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",k="\\b(0b[01]+)",w={begin:"\\\\[\\s\\S]",relevance:0},x={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[w]},I={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[w]},S=function(e,t,n={}){const r=i({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const o=f("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:m(/[ ]+/,"(",o,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},E=S("//","$"),T=S("/\\*","\\*/"),z=S("#","$"),C={scope:"number",begin:$,relevance:0},O={scope:"number",begin:_,relevance:0},U={scope:"number",begin:k,relevance:0},N={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[w,{begin:/\[/,end:/\]/,relevance:0,contains:[w]}]},D={scope:"title",begin:b,relevance:0},A={scope:"title",begin:y,relevance:0},j={begin:"\\.\\s*"+y,relevance:0};var P=Object.freeze({__proto__:null,APOS_STRING_MODE:x,BACKSLASH_ESCAPE:w,BINARY_NUMBER_MODE:U,BINARY_NUMBER_RE:k,COMMENT:S,C_BLOCK_COMMENT_MODE:T,C_LINE_COMMENT_MODE:E,C_NUMBER_MODE:O,C_NUMBER_RE:_,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})},HASH_COMMENT_MODE:z,IDENT_RE:b,MATCH_NOTHING_RE:/\b\B/,METHOD_GUARD:j,NUMBER_MODE:C,NUMBER_RE:$,PHRASAL_WORDS_MODE:{begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},QUOTE_STRING_MODE:I,REGEXP_MODE:N,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=m(t,/.*\b/,e.binary,/\b.*/)),i({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},TITLE_MODE:D,UNDERSCORE_IDENT_RE:y,UNDERSCORE_TITLE_MODE:A});function Z(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function R(e,t){void 0!==e.className&&(e.scope=e.className,delete e.className)}function q(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=Z,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function M(e,t){Array.isArray(e.illegal)&&(e.illegal=f(...e.illegal))}function L(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function F(e,t){void 0===e.relevance&&(e.relevance=1)}const V=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach(t=>{delete e[t]}),e.keywords=n.keywords,e.begin=m(n.beforeMatch,u(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},B=["of","and","for","in","not","or","if","then","parent","list","value"];function H(e,t,n="keyword"){const i=Object.create(null);return"string"==typeof e?r(n,e.split(" ")):Array.isArray(e)?r(n,e):Object.keys(e).forEach(function(n){Object.assign(i,H(e[n],t,n))}),i;function r(e,n){t&&(n=n.map(e=>e.toLowerCase())),n.forEach(function(t){const n=t.split("|");i[n[0]]=[e,W(n[0],n[1])]})}}function W(e,t){return t?Number(t):function(e){return B.includes(e.toLowerCase())}(e)?0:1}const J={},G=e=>{console.error(e)},K=(e,...t)=>{console.log(`WARN: ${e}`,...t)},X=(e,t)=>{J[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),J[`${e}/${t}`]=!0)},Y=new Error;function Q(e,t,{key:n}){let i=0;const r=e[n],o={},a={};for(let e=1;e<=t.length;e++)a[e+i]=r[e],o[e+i]=!0,i+=h(t[e-1]);e[n]=a,e[n]._emit=o,e[n]._multi=!0}function ee(e){!function(e){e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope,delete e.scope)}(e),"string"==typeof e.beginScope&&(e.beginScope={_wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope}),function(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw G("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Y;if("object"!=typeof e.beginScope||null===e.beginScope)throw G("beginScope must be object"),Y;Q(e,e.begin,{key:"beginScope"}),e.begin=v(e.begin,{joinWith:""})}}(e),function(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw G("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Y;if("object"!=typeof e.endScope||null===e.endScope)throw G("endScope must be object"),Y;Q(e,e.end,{key:"endScope"}),e.end=v(e.end,{joinWith:""})}}(e)}function te(e){function t(t,n){return new RegExp(c(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(n?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=h(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map(e=>e[1]);this.matcherRe=t(v(e,{joinWith:"|"}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const n=t.findIndex((e,t)=>t>0&&void 0!==e),i=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,i)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const t=new n;return this.rules.slice(e).forEach(([e,n])=>t.addRule(e,n)),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=i(e.classNameAliases||{}),function n(o,a){const s=o;if(o.isCompiled)return s;[R,L,ee,V].forEach(e=>e(o,a)),e.compilerExtensions.forEach(e=>e(o,a)),o.__beforeBegin=null,[q,M,F].forEach(e=>e(o,a)),o.isCompiled=!0;let l=null;return"object"==typeof o.keywords&&o.keywords.$pattern&&(o.keywords=Object.assign({},o.keywords),l=o.keywords.$pattern,delete o.keywords.$pattern),l=l||/\w+/,o.keywords&&(o.keywords=H(o.keywords,e.case_insensitive)),s.keywordPatternRe=t(l,!0),a&&(o.begin||(o.begin=/\B|\b/),s.beginRe=t(s.begin),o.end||o.endsWithParent||(o.end=/\B|\b/),o.end&&(s.endRe=t(s.end)),s.terminatorEnd=c(s.end)||"",o.endsWithParent&&a.terminatorEnd&&(s.terminatorEnd+=(o.end?"|":"")+a.terminatorEnd)),o.illegal&&(s.illegalRe=t(o.illegal)),o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map(function(e){return function(e){e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return i(e,{variants:null},t)}));if(e.cachedVariants)return e.cachedVariants;if(ne(e))return i(e,{starts:e.starts?i(e.starts):null});if(Object.isFrozen(e))return i(e);return e}("self"===e?o:e)})),o.contains.forEach(function(e){n(e,s)}),o.starts&&n(o.starts,a),s.matcher=function(e){const t=new r;return e.contains.forEach(e=>t.addRule(e.begin,{rule:e,type:"begin"})),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t}(s),s}(e)}function ne(e){return!!e&&(e.endsWithParent||ne(e.starts))}class ie extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const re=n,oe=i,ae=Symbol("nomatch"),se=function(n){const i=Object.create(null),r=Object.create(null),o=[];let a=!0;const s="Could not find the language '{}', did you forget to load/include a language module?",c={disableAutodetect:!0,name:"Plain text",contains:[]};let h={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:l};function g(e){return h.noHighlightRe.test(e)}function v(e,t,n){let i="",r="";"object"==typeof t?(i=e,n=t.ignoreIllegals,r=t.language):(X("10.7.0","highlight(lang, code, ...args) has been deprecated."),X("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),r=e,i=t),void 0===n&&(n=!0);const o={code:i,language:r};S("before:highlight",o);const a=o.result?o.result:b(o.language,o.code,n);return a.code=o.code,S("after:highlight",a),a}function b(e,n,r,o){const l=Object.create(null);function c(e,t){return e.keywords[t]}function u(){if(!E.keywords)return void z.addText(C);let e=0;E.keywordPatternRe.lastIndex=0;let t=E.keywordPatternRe.exec(C),n="";for(;t;){n+=C.substring(e,t.index);const i=x.case_insensitive?t[0].toLowerCase():t[0],r=c(E,i);if(r){const[e,o]=r;if(z.addText(n),n="",l[i]=(l[i]||0)+1,l[i]<=7&&(O+=o),e.startsWith("_"))n+=t[0];else{const n=x.classNameAliases[e]||e;p(t[0],n)}}else n+=t[0];e=E.keywordPatternRe.lastIndex,t=E.keywordPatternRe.exec(C)}n+=C.substring(e),z.addText(n)}function d(){null!=E.subLanguage?function(){if(""===C)return;let e=null;if("string"==typeof E.subLanguage){if(!i[E.subLanguage])return void z.addText(C);e=b(E.subLanguage,C,!0,T[E.subLanguage]),T[E.subLanguage]=e._top}else e=y(C,E.subLanguage.length?E.subLanguage:null);E.relevance>0&&(O+=e.relevance),z.__addSublanguage(e._emitter,e.language)}():u(),C=""}function p(e,t){""!==e&&(z.startScope(t),z.addText(e),z.endScope())}function m(e,t){let n=1;const i=t.length-1;for(;n<=i;){if(!e._emit[n]){n++;continue}const i=x.classNameAliases[e[n]]||e[n],r=t[n];i?p(r,i):(C=r,u(),C=""),n++}}function f(e,t){return e.scope&&"string"==typeof e.scope&&z.openNode(x.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(p(C,x.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),C=""):e.beginScope._multi&&(m(e.beginScope,t),C="")),E=Object.create(e,{parent:{value:E}}),E}function g(e,n,i){let r=function(e,t){const n=e&&e.exec(t);return n&&0===n.index}(e.endRe,i);if(r){if(e["on:end"]){const i=new t(e);e["on:end"](n,i),i.isMatchIgnored&&(r=!1)}if(r){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return g(e.parent,n,i)}function v(e){return 0===E.matcher.regexIndex?(C+=e[0],1):(D=!0,0)}function $(e){const t=e[0],i=n.substring(e.index),r=g(E,e,i);if(!r)return ae;const o=E;E.endScope&&E.endScope._wrap?(d(),p(t,E.endScope._wrap)):E.endScope&&E.endScope._multi?(d(),m(E.endScope,e)):o.skip?C+=t:(o.returnEnd||o.excludeEnd||(C+=t),d(),o.excludeEnd&&(C=t));do{E.scope&&z.closeNode(),E.skip||E.subLanguage||(O+=E.relevance),E=E.parent}while(E!==r.parent);return r.starts&&f(r.starts,e),o.returnEnd?0:t.length}let _={};function k(i,o){const s=o&&o[0];if(C+=i,null==s)return d(),0;if("begin"===_.type&&"end"===o.type&&_.index===o.index&&""===s){if(C+=n.slice(o.index,o.index+1),!a){const t=new Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=_.rule,t}return 1}if(_=o,"begin"===o.type)return function(e){const n=e[0],i=e.rule,r=new t(i),o=[i.__beforeBegin,i["on:begin"]];for(const t of o)if(t&&(t(e,r),r.isMatchIgnored))return v(n);return i.skip?C+=n:(i.excludeBegin&&(C+=n),d(),i.returnBegin||i.excludeBegin||(C=n)),f(i,e),i.returnBegin?0:n.length}(o);if("illegal"===o.type&&!r){const e=new Error('Illegal lexeme "'+s+'" for mode "'+(E.scope||"<unnamed>")+'"');throw e.mode=E,e}if("end"===o.type){const e=$(o);if(e!==ae)return e}if("illegal"===o.type&&""===s)return C+="\n",1;if(N>1e5&&N>3*o.index){throw new Error("potential infinite loop, way more iterations than matches")}return C+=s,s.length}const x=w(e);if(!x)throw G(s.replace("{}",e)),new Error('Unknown language: "'+e+'"');const I=te(x);let S="",E=o||I;const T={},z=new h.__emitter(h);!function(){const e=[];for(let t=E;t!==x;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach(e=>z.openNode(e))}();let C="",O=0,U=0,N=0,D=!1;try{if(x.__emitTokens)x.__emitTokens(n,z);else{for(E.matcher.considerAll();;){N++,D?D=!1:E.matcher.considerAll(),E.matcher.lastIndex=U;const e=E.matcher.exec(n);if(!e)break;const t=k(n.substring(U,e.index),e);U=e.index+t}k(n.substring(U))}return z.finalize(),S=z.toHTML(),{language:e,value:S,relevance:O,illegal:!1,_emitter:z,_top:E}}catch(t){if(t.message&&t.message.includes("Illegal"))return{language:e,value:re(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:U,context:n.slice(U-100,U+100),mode:t.mode,resultSoFar:S},_emitter:z};if(a)return{language:e,value:re(n),illegal:!1,relevance:0,errorRaised:t,_emitter:z,_top:E};throw t}}function y(e,t){t=t||h.languages||Object.keys(i);const n=function(e){const t={value:re(e),illegal:!1,relevance:0,_top:c,_emitter:new h.__emitter(h)};return t._emitter.addText(e),t}(e),r=t.filter(w).filter(I).map(t=>b(t,e,!1));r.unshift(n);const o=r.sort((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(w(e.language).supersetOf===t.language)return 1;if(w(t.language).supersetOf===e.language)return-1}return 0}),[a,s]=o,l=a;return l.secondBest=s,l}function $(e){let t=null;const n=function(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const n=h.languageDetectRe.exec(t);if(n){const t=w(n[1]);return t||(K(s.replace("{}",n[1])),K("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}return t.split(/\s+/).find(e=>g(e)||w(e))}(e);if(g(n))return;if(S("before:highlightElement",{el:e,language:n}),e.dataset.highlighted)return void console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",e);if(e.children.length>0&&(h.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(e)),h.throwUnescapedHTML)){throw new ie("One of your code blocks includes unescaped HTML.",e.innerHTML)}t=e;const i=t.textContent,o=n?v(i,{language:n,ignoreIllegals:!0}):y(i);e.innerHTML=o.value,e.dataset.highlighted="yes",function(e,t,n){const i=t&&r[t]||n;e.classList.add("hljs"),e.classList.add(`language-${i}`)}(e,n,o.language),e.result={language:o.language,re:o.relevance,relevance:o.relevance},o.secondBest&&(e.secondBest={language:o.secondBest.language,relevance:o.secondBest.relevance}),S("after:highlightElement",{el:e,result:o,text:i})}let _=!1;function k(){if("loading"===document.readyState)return _||window.addEventListener("DOMContentLoaded",function(){k()},!1),void(_=!0);document.querySelectorAll(h.cssSelector).forEach($)}function w(e){return e=(e||"").toLowerCase(),i[e]||i[r[e]]}function x(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach(e=>{r[e.toLowerCase()]=t})}function I(e){const t=w(e);return t&&!t.disableAutodetect}function S(e,t){const n=e;o.forEach(function(e){e[n]&&e[n](t)})}Object.assign(n,{highlight:v,highlightAuto:y,highlightAll:k,highlightElement:$,highlightBlock:function(e){return X("10.7.0","highlightBlock will be removed entirely in v12.0"),X("10.7.0","Please use highlightElement now."),$(e)},configure:function(e){h=oe(h,e)},initHighlighting:()=>{k(),X("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:function(){k(),X("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:function(e,t){let r=null;try{r=t(n)}catch(t){if(G("Language definition for '{}' could not be registered.".replace("{}",e)),!a)throw t;G(t),r=c}r.name||(r.name=e),i[e]=r,r.rawDefinition=t.bind(null,n),r.aliases&&x(r.aliases,{languageName:e})},unregisterLanguage:function(e){delete i[e];for(const t of Object.keys(r))r[t]===e&&delete r[t]},listLanguages:function(){return Object.keys(i)},getLanguage:w,registerAliases:x,autoDetection:I,inherit:oe,addPlugin:function(e){!function(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{e["before:highlightBlock"](Object.assign({block:t.el},t))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{e["after:highlightBlock"](Object.assign({block:t.el},t))})}(e),o.push(e)},removePlugin:function(e){const t=o.indexOf(e);-1!==t&&o.splice(t,1)}}),n.debugMode=function(){a=!1},n.safeMode=function(){a=!0},n.versionString="11.11.1",n.regex={concat:m,lookahead:u,either:f,optional:p,anyNumberOfTimes:d};for(const t in P)"object"==typeof P[t]&&e(P[t]);return Object.assign(n,P),n},le=se({});return le.newInstance=()=>se({}),kb=le,le.HighlightJS=le,le.default=le,kb}var Ib=gv(xb());Ib.registerLanguage("rust",function(e){const t=e.regex,n=/(r#)?/,i=t.concat(n,e.UNDERSCORE_IDENT_RE),r=t.concat(n,e.IDENT_RE),o={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,r,t.lookahead(/\s*\(/))},a="([ui](8|16|32|64|128|size)|f(32|64))?",s=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],l=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:l,keyword:["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],literal:["true","false","Some","None","Ok","Err"],built_in:s},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+a},{begin:"\\b0o([0-7_]+)"+a},{begin:"\\b0x([A-Fa-f0-9_]+)"+a},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+a}],relevance:0},{begin:[/fn/,/\s+/,i],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,i],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,i,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,i],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,i],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:s,type:l}},{className:"punctuation",begin:"->"},o]}});const Sb={stellar_fungible:"tokens/fungible/src",stellar_non_fungible:"tokens/non-fungible/src",stellar_pausable:"utils/pausable/src",stellar_pausable_macros:"utils/pausable-macros/src",stellar_upgradeable:"utils/upgradeable/src",stellar_upgradeable_macros:"utils/upgradeable-macros/src"};var Eb="top",Tb="bottom",zb="right",Cb="left",Ob="auto",Ub=[Eb,Tb,zb,Cb],Nb="start",Db="end",Ab="viewport",jb="popper",Pb=Ub.reduce(function(e,t){return e.concat([t+"-"+Nb,t+"-"+Db])},[]),Zb=[].concat(Ub,[Ob]).reduce(function(e,t){return e.concat([t,t+"-"+Nb,t+"-"+Db])},[]),Rb=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function qb(e){return e?(e.nodeName||"").toLowerCase():null}function Mb(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Lb(e){return e instanceof Mb(e).Element||e instanceof Element}function Fb(e){return e instanceof Mb(e).HTMLElement||e instanceof HTMLElement}function Vb(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Mb(e).ShadowRoot||e instanceof ShadowRoot)}var Bb={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},i=t.attributes[e]||{},r=t.elements[e];Fb(r)&&qb(r)&&(Object.assign(r.style,n),Object.keys(i).forEach(function(e){var t=i[e];!1===t?r.removeAttribute(e):r.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var i=t.elements[e],r=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]="",e},{});Fb(i)&&qb(i)&&(Object.assign(i.style,o),Object.keys(r).forEach(function(e){i.removeAttribute(e)}))})}},requires:["computeStyles"]};function Hb(e){return e.split("-")[0]}var Wb=Math.max,Jb=Math.min,Gb=Math.round;function Kb(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Xb(){return!/^((?!chrome|android).)*safari/i.test(Kb())}function Yb(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var i=e.getBoundingClientRect(),r=1,o=1;t&&Fb(e)&&(r=e.offsetWidth>0&&Gb(i.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Gb(i.height)/e.offsetHeight||1);var a=(Lb(e)?Mb(e):window).visualViewport,s=!Xb()&&n,l=(i.left+(s&&a?a.offsetLeft:0))/r,c=(i.top+(s&&a?a.offsetTop:0))/o,u=i.width/r,d=i.height/o;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l,x:l,y:c}}function Qb(e){var t=Yb(e),n=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:i}}function ey(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Vb(n)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function ty(e){return Mb(e).getComputedStyle(e)}function ny(e){return["table","td","th"].indexOf(qb(e))>=0}function iy(e){return((Lb(e)?e.ownerDocument:e.document)||window.document).documentElement}function ry(e){return"html"===qb(e)?e:e.assignedSlot||e.parentNode||(Vb(e)?e.host:null)||iy(e)}function oy(e){return Fb(e)&&"fixed"!==ty(e).position?e.offsetParent:null}function ay(e){for(var t=Mb(e),n=oy(e);n&&ny(n)&&"static"===ty(n).position;)n=oy(n);return n&&("html"===qb(n)||"body"===qb(n)&&"static"===ty(n).position)?t:n||function(e){var t=/firefox/i.test(Kb());if(/Trident/i.test(Kb())&&Fb(e)&&"fixed"===ty(e).position)return null;var n=ry(e);for(Vb(n)&&(n=n.host);Fb(n)&&["html","body"].indexOf(qb(n))<0;){var i=ty(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||t&&"filter"===i.willChange||t&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(e)||t}function sy(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ly(e,t,n){return Wb(e,Jb(t,n))}function cy(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function uy(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var dy={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,i=e.name,r=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Hb(n.placement),l=sy(s),c=[Cb,zb].indexOf(s)>=0?"height":"width";if(o&&a){var u=function(e,t){return cy("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:uy(e,Ub))}(r.padding,n),d=Qb(o),p="y"===l?Eb:Cb,m="y"===l?Tb:zb,f=n.rects.reference[c]+n.rects.reference[l]-a[l]-n.rects.popper[c],h=a[l]-n.rects.reference[l],g=ay(o),v=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,b=f/2-h/2,y=u[p],$=v-d[c]-u[m],_=v/2-d[c]/2+b,k=ly(y,_,$),w=l;n.modifiersData[i]=((t={})[w]=k,t.centerOffset=k-_,t)}},effect:function(e){var t=e.state,n=e.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=t.elements.popper.querySelector(i)))&&ey(t.elements.popper,i)&&(t.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function py(e){return e.split("-")[1]}var my={top:"auto",right:"auto",bottom:"auto",left:"auto"};function fy(e){var t,n=e.popper,i=e.popperRect,r=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,p=a.x,m=void 0===p?0:p,f=a.y,h=void 0===f?0:f,g="function"==typeof u?u({x:m,y:h}):{x:m,y:h};m=g.x,h=g.y;var v=a.hasOwnProperty("x"),b=a.hasOwnProperty("y"),y=Cb,$=Eb,_=window;if(c){var k=ay(n),w="clientHeight",x="clientWidth";if(k===Mb(n)&&"static"!==ty(k=iy(n)).position&&"absolute"===s&&(w="scrollHeight",x="scrollWidth"),r===Eb||(r===Cb||r===zb)&&o===Db)$=Tb,h-=(d&&k===_&&_.visualViewport?_.visualViewport.height:k[w])-i.height,h*=l?1:-1;if(r===Cb||(r===Eb||r===Tb)&&o===Db)y=zb,m-=(d&&k===_&&_.visualViewport?_.visualViewport.width:k[x])-i.width,m*=l?1:-1}var I,S=Object.assign({position:s},c&&my),E=!0===u?function(e,t){var n=e.x,i=e.y,r=t.devicePixelRatio||1;return{x:Gb(n*r)/r||0,y:Gb(i*r)/r||0}}({x:m,y:h},Mb(n)):{x:m,y:h};return m=E.x,h=E.y,l?Object.assign({},S,((I={})[$]=b?"0":"",I[y]=v?"0":"",I.transform=(_.devicePixelRatio||1)<=1?"translate("+m+"px, "+h+"px)":"translate3d("+m+"px, "+h+"px, 0)",I)):Object.assign({},S,((t={})[$]=b?h+"px":"",t[y]=v?m+"px":"",t.transform="",t))}var hy={passive:!0};var gy={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,i=e.options,r=i.scroll,o=void 0===r||r,a=i.resize,s=void 0===a||a,l=Mb(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(e){e.addEventListener("scroll",n.update,hy)}),s&&l.addEventListener("resize",n.update,hy),function(){o&&c.forEach(function(e){e.removeEventListener("scroll",n.update,hy)}),s&&l.removeEventListener("resize",n.update,hy)}},data:{}},vy={left:"right",right:"left",bottom:"top",top:"bottom"};function by(e){return e.replace(/left|right|bottom|top/g,function(e){return vy[e]})}var yy={start:"end",end:"start"};function $y(e){return e.replace(/start|end/g,function(e){return yy[e]})}function _y(e){var t=Mb(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function ky(e){return Yb(iy(e)).left+_y(e).scrollLeft}function wy(e){var t=ty(e),n=t.overflow,i=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+i)}function xy(e){return["html","body","#document"].indexOf(qb(e))>=0?e.ownerDocument.body:Fb(e)&&wy(e)?e:xy(ry(e))}function Iy(e,t){var n;void 0===t&&(t=[]);var i=xy(e),r=i===(null==(n=e.ownerDocument)?void 0:n.body),o=Mb(i),a=r?[o].concat(o.visualViewport||[],wy(i)?i:[]):i,s=t.concat(a);return r?s:s.concat(Iy(ry(a)))}function Sy(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Ey(e,t,n){return t===Ab?Sy(function(e,t){var n=Mb(e),i=iy(e),r=n.visualViewport,o=i.clientWidth,a=i.clientHeight,s=0,l=0;if(r){o=r.width,a=r.height;var c=Xb();(c||!c&&"fixed"===t)&&(s=r.offsetLeft,l=r.offsetTop)}return{width:o,height:a,x:s+ky(e),y:l}}(e,n)):Lb(t)?function(e,t){var n=Yb(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):Sy(function(e){var t,n=iy(e),i=_y(e),r=null==(t=e.ownerDocument)?void 0:t.body,o=Wb(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=Wb(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),s=-i.scrollLeft+ky(e),l=-i.scrollTop;return"rtl"===ty(r||n).direction&&(s+=Wb(n.clientWidth,r?r.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}(iy(e)))}function Ty(e,t,n,i){var r="clippingParents"===t?function(e){var t=Iy(ry(e)),n=["absolute","fixed"].indexOf(ty(e).position)>=0&&Fb(e)?ay(e):e;return Lb(n)?t.filter(function(e){return Lb(e)&&ey(e,n)&&"body"!==qb(e)}):[]}(e):[].concat(t),o=[].concat(r,[n]),a=o[0],s=o.reduce(function(t,n){var r=Ey(e,n,i);return t.top=Wb(r.top,t.top),t.right=Jb(r.right,t.right),t.bottom=Jb(r.bottom,t.bottom),t.left=Wb(r.left,t.left),t},Ey(e,a,i));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function zy(e){var t,n=e.reference,i=e.element,r=e.placement,o=r?Hb(r):null,a=r?py(r):null,s=n.x+n.width/2-i.width/2,l=n.y+n.height/2-i.height/2;switch(o){case Eb:t={x:s,y:n.y-i.height};break;case Tb:t={x:s,y:n.y+n.height};break;case zb:t={x:n.x+n.width,y:l};break;case Cb:t={x:n.x-i.width,y:l};break;default:t={x:n.x,y:n.y}}var c=o?sy(o):null;if(null!=c){var u="y"===c?"height":"width";switch(a){case Nb:t[c]=t[c]-(n[u]/2-i[u]/2);break;case Db:t[c]=t[c]+(n[u]/2-i[u]/2)}}return t}function Cy(e,t){void 0===t&&(t={});var n=t,i=n.placement,r=void 0===i?e.placement:i,o=n.strategy,a=void 0===o?e.strategy:o,s=n.boundary,l=void 0===s?"clippingParents":s,c=n.rootBoundary,u=void 0===c?Ab:c,d=n.elementContext,p=void 0===d?jb:d,m=n.altBoundary,f=void 0!==m&&m,h=n.padding,g=void 0===h?0:h,v=cy("number"!=typeof g?g:uy(g,Ub)),b=p===jb?"reference":jb,y=e.rects.popper,$=e.elements[f?b:p],_=Ty(Lb($)?$:$.contextElement||iy(e.elements.popper),l,u,a),k=Yb(e.elements.reference),w=zy({reference:k,element:y,placement:r}),x=Sy(Object.assign({},y,w)),I=p===jb?x:k,S={top:_.top-I.top+v.top,bottom:I.bottom-_.bottom+v.bottom,left:_.left-I.left+v.left,right:I.right-_.right+v.right},E=e.modifiersData.offset;if(p===jb&&E){var T=E[r];Object.keys(S).forEach(function(e){var t=[zb,Tb].indexOf(e)>=0?1:-1,n=[Eb,Tb].indexOf(e)>=0?"y":"x";S[e]+=T[n]*t})}return S}function Oy(e,t){void 0===t&&(t={});var n=t,i=n.placement,r=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?Zb:l,u=py(i),d=u?s?Pb:Pb.filter(function(e){return py(e)===u}):Ub,p=d.filter(function(e){return c.indexOf(e)>=0});0===p.length&&(p=d);var m=p.reduce(function(t,n){return t[n]=Cy(e,{placement:n,boundary:r,rootBoundary:o,padding:a})[Hb(n)],t},{});return Object.keys(m).sort(function(e,t){return m[e]-m[t]})}var Uy={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var r=n.mainAxis,o=void 0===r||r,a=n.altAxis,s=void 0===a||a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,p=n.altBoundary,m=n.flipVariations,f=void 0===m||m,h=n.allowedAutoPlacements,g=t.options.placement,v=Hb(g),b=l||(v===g||!f?[by(g)]:function(e){if(Hb(e)===Ob)return[];var t=by(e);return[$y(e),t,$y(t)]}(g)),y=[g].concat(b).reduce(function(e,n){return e.concat(Hb(n)===Ob?Oy(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:f,allowedAutoPlacements:h}):n)},[]),$=t.rects.reference,_=t.rects.popper,k=new Map,w=!0,x=y[0],I=0;I<y.length;I++){var S=y[I],E=Hb(S),T=py(S)===Nb,z=[Eb,Tb].indexOf(E)>=0,C=z?"width":"height",O=Cy(t,{placement:S,boundary:u,rootBoundary:d,altBoundary:p,padding:c}),U=z?T?zb:Cb:T?Tb:Eb;$[C]>_[C]&&(U=by(U));var N=by(U),D=[];if(o&&D.push(O[E]<=0),s&&D.push(O[U]<=0,O[N]<=0),D.every(function(e){return e})){x=S,w=!1;break}k.set(S,D)}if(w)for(var A=function(e){var t=y.find(function(t){var n=k.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return x=t,"break"},j=f?3:1;j>0;j--){if("break"===A(j))break}t.placement!==x&&(t.modifiersData[i]._skip=!0,t.placement=x,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Ny(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Dy(e){return[Eb,zb,Tb,Cb].some(function(t){return e[t]>=0})}var Ay={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,i=e.name,r=n.offset,o=void 0===r?[0,0]:r,a=Zb.reduce(function(e,n){return e[n]=function(e,t,n){var i=Hb(e),r=[Cb,Eb].indexOf(i)>=0?-1:1,o="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*r,[Cb,zb].indexOf(i)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,o),e},{}),s=a[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[i]=a}};var jy={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,i=e.name,r=n.mainAxis,o=void 0===r||r,a=n.altAxis,s=void 0!==a&&a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,p=n.tether,m=void 0===p||p,f=n.tetherOffset,h=void 0===f?0:f,g=Cy(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),v=Hb(t.placement),b=py(t.placement),y=!b,$=sy(v),_="x"===$?"y":"x",k=t.modifiersData.popperOffsets,w=t.rects.reference,x=t.rects.popper,I="function"==typeof h?h(Object.assign({},t.rects,{placement:t.placement})):h,S="number"==typeof I?{mainAxis:I,altAxis:I}:Object.assign({mainAxis:0,altAxis:0},I),E=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,T={x:0,y:0};if(k){if(o){var z,C="y"===$?Eb:Cb,O="y"===$?Tb:zb,U="y"===$?"height":"width",N=k[$],D=N+g[C],A=N-g[O],j=m?-x[U]/2:0,P=b===Nb?w[U]:x[U],Z=b===Nb?-x[U]:-w[U],R=t.elements.arrow,q=m&&R?Qb(R):{width:0,height:0},M=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},L=M[C],F=M[O],V=ly(0,w[U],q[U]),B=y?w[U]/2-j-V-L-S.mainAxis:P-V-L-S.mainAxis,H=y?-w[U]/2+j+V+F+S.mainAxis:Z+V+F+S.mainAxis,W=t.elements.arrow&&ay(t.elements.arrow),J=W?"y"===$?W.clientTop||0:W.clientLeft||0:0,G=null!=(z=null==E?void 0:E[$])?z:0,K=N+H-G,X=ly(m?Jb(D,N+B-G-J):D,N,m?Wb(A,K):A);k[$]=X,T[$]=X-N}if(s){var Y,Q="x"===$?Eb:Cb,ee="x"===$?Tb:zb,te=k[_],ne="y"===_?"height":"width",ie=te+g[Q],re=te-g[ee],oe=-1!==[Eb,Cb].indexOf(v),ae=null!=(Y=null==E?void 0:E[_])?Y:0,se=oe?ie:te-w[ne]-x[ne]-ae+S.altAxis,le=oe?te+w[ne]+x[ne]-ae-S.altAxis:re,ce=m&&oe?function(e,t,n){var i=ly(e,t,n);return i>n?n:i}(se,te,le):ly(m?se:ie,te,m?le:re);k[_]=ce,T[_]=ce-te}t.modifiersData[i]=T}},requiresIfExists:["offset"]};function Py(e,t,n){void 0===n&&(n=!1);var i,r=Fb(t),o=Fb(t)&&function(e){var t=e.getBoundingClientRect(),n=Gb(t.width)/e.offsetWidth||1,i=Gb(t.height)/e.offsetHeight||1;return 1!==n||1!==i}(t),a=iy(t),s=Yb(e,o,n),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&(("body"!==qb(t)||wy(a))&&(l=(i=t)!==Mb(i)&&Fb(i)?function(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}(i):_y(i)),Fb(t)?((c=Yb(t,!0)).x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=ky(a))),{x:s.left+l.scrollLeft-c.x,y:s.top+l.scrollTop-c.y,width:s.width,height:s.height}}function Zy(e){var t=new Map,n=new Set,i=[];function r(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var i=t.get(e);i&&r(i)}}),i.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){n.has(e.name)||r(e)}),i}var Ry={placement:"bottom",modifiers:[],strategy:"absolute"};function qy(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}function My(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,i=void 0===n?[]:n,r=t.defaultOptions,o=void 0===r?Ry:r;return function(e,t,n){void 0===n&&(n=o);var r,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ry,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],c=!1,u={state:s,setOptions:function(n){var r="function"==typeof n?n(s.options):n;d(),s.options=Object.assign({},o,s.options,r),s.scrollParents={reference:Lb(e)?Iy(e):e.contextElement?Iy(e.contextElement):[],popper:Iy(t)};var a,c,p=function(e){var t=Zy(e);return Rb.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}((a=[].concat(i,s.options.modifiers),c=a.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{}),Object.keys(c).map(function(e){return c[e]})));return s.orderedModifiers=p.filter(function(e){return e.enabled}),s.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,i=void 0===n?{}:n,r=e.effect;if("function"==typeof r){var o=r({state:s,name:t,instance:u,options:i}),a=function(){};l.push(o||a)}}),u.update()},forceUpdate:function(){if(!c){var e=s.elements,t=e.reference,n=e.popper;if(qy(t,n)){s.rects={reference:Py(t,ay(n),"fixed"===s.options.strategy),popper:Qb(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach(function(e){return s.modifiersData[e.name]=Object.assign({},e.data)});for(var i=0;i<s.orderedModifiers.length;i++)if(!0!==s.reset){var r=s.orderedModifiers[i],o=r.fn,a=r.options,l=void 0===a?{}:a,d=r.name;"function"==typeof o&&(s=o({state:s,options:l,name:d,instance:u})||s)}else s.reset=!1,i=-1}}},update:(r=function(){return new Promise(function(e){u.forceUpdate(),e(s)})},function(){return a||(a=new Promise(function(e){Promise.resolve().then(function(){a=void 0,e(r())})})),a}),destroy:function(){d(),c=!0}};if(!qy(e,t))return u;function d(){l.forEach(function(e){return e()}),l=[]}return u.setOptions(n).then(function(e){!c&&n.onFirstUpdate&&n.onFirstUpdate(e)}),u}}var Ly=My({defaultModifiers:[gy,{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=zy({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,i=n.gpuAcceleration,r=void 0===i||i,o=n.adaptive,a=void 0===o||o,s=n.roundOffsets,l=void 0===s||s,c={placement:Hb(t.placement),variation:py(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,fy(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,fy(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},Bb,Ay,Uy,jy,dy,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,i=t.rects.reference,r=t.rects.popper,o=t.modifiersData.preventOverflow,a=Cy(t,{elementContext:"reference"}),s=Cy(t,{altBoundary:!0}),l=Ny(a,i),c=Ny(s,r,o),u=Dy(l),d=Dy(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}]}),Fy="tippy-content",Vy="tippy-arrow",By="tippy-svg-arrow",Hy={passive:!0,capture:!0},Wy=function(){return document.body};function Jy(e,t,n){if(Array.isArray(e)){var i=e[t];return null==i?Array.isArray(n)?n[t]:n:i}return e}function Gy(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function Ky(e,t){return"function"==typeof e?e.apply(void 0,t):e}function Xy(e,t){return 0===t?e:function(i){clearTimeout(n),n=setTimeout(function(){e(i)},t)};var n}function Yy(e){return[].concat(e)}function Qy(e,t){-1===e.indexOf(t)&&e.push(t)}function e$(e){return[].slice.call(e)}function t$(e){return Object.keys(e).reduce(function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t},{})}function n$(){return document.createElement("div")}function i$(e){return["Element","Fragment"].some(function(t){return Gy(e,t)})}function r$(e){return i$(e)?[e]:function(e){return Gy(e,"NodeList")}(e)?e$(e):Array.isArray(e)?e:e$(document.querySelectorAll(e))}function o$(e,t){e.forEach(function(e){e&&(e.style.transitionDuration=t+"ms")})}function a$(e,t){e.forEach(function(e){e&&e.setAttribute("data-state",t)})}function s$(e,t,n){var i=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(t){e[i](t,n)})}function l$(e,t){for(var n=t;n;){var i;if(e.contains(n))return!0;n=null==n.getRootNode||null==(i=n.getRootNode())?void 0:i.host}return!1}var c$={isTouch:!1},u$=0;function d$(){c$.isTouch||(c$.isTouch=!0,window.performance&&document.addEventListener("mousemove",p$))}function p$(){var e=performance.now();e-u$<20&&(c$.isTouch=!1,document.removeEventListener("mousemove",p$)),u$=e}function m$(){var e,t=document.activeElement;if((e=t)&&e._tippy&&e._tippy.reference===e){var n=t._tippy;t.blur&&!n.state.isVisible&&t.blur()}}var f$=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto,h$=Object.assign({appendTo:Wy,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),g$=Object.keys(h$);function v$(e){var t=(e.plugins||[]).reduce(function(t,n){var i,r=n.name,o=n.defaultValue;r&&(t[r]=void 0!==e[r]?e[r]:null!=(i=h$[r])?i:o);return t},{});return Object.assign({},e,t)}function b$(e,t){var n=Object.assign({},t,{content:Ky(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(v$(Object.assign({},h$,{plugins:t}))):g$).reduce(function(t,n){var i=(e.getAttribute("data-tippy-"+n)||"").trim();if(!i)return t;if("content"===n)t[n]=i;else try{t[n]=JSON.parse(i)}catch(e){t[n]=i}return t},{})}(e,t.plugins));return n.aria=Object.assign({},h$.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function y$(e,t){e.innerHTML=t}function $$(e){var t=n$();return!0===e?t.className=Vy:(t.className=By,i$(e)?t.appendChild(e):y$(t,e)),t}function _$(e,t){i$(t.content)?(y$(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?y$(e,t.content):e.textContent=t.content)}function k$(e){var t=e.firstElementChild,n=e$(t.children);return{box:t,content:n.find(function(e){return e.classList.contains(Fy)}),arrow:n.find(function(e){return e.classList.contains(Vy)||e.classList.contains(By)}),backdrop:n.find(function(e){return e.classList.contains("tippy-backdrop")})}}function w$(e){var t=n$(),n=n$();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var i=n$();function r(n,i){var r=k$(t),o=r.box,a=r.content,s=r.arrow;i.theme?o.setAttribute("data-theme",i.theme):o.removeAttribute("data-theme"),"string"==typeof i.animation?o.setAttribute("data-animation",i.animation):o.removeAttribute("data-animation"),i.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof i.maxWidth?i.maxWidth+"px":i.maxWidth,i.role?o.setAttribute("role",i.role):o.removeAttribute("role"),n.content===i.content&&n.allowHTML===i.allowHTML||_$(a,e.props),i.arrow?s?n.arrow!==i.arrow&&(o.removeChild(s),o.appendChild($$(i.arrow))):o.appendChild($$(i.arrow)):s&&o.removeChild(s)}return i.className=Fy,i.setAttribute("data-state","hidden"),_$(i,e.props),t.appendChild(n),n.appendChild(i),r(e.props,e.props),{popper:t,onUpdate:r}}w$.$$tippy=!0;var x$=1,I$=[],S$=[];function E$(e,t){var n,i,r,o,a,s,l,c,u=b$(e,Object.assign({},h$,v$(t$(t)))),d=!1,p=!1,m=!1,f=!1,h=[],g=Xy(W,u.interactiveDebounce),v=x$++,b=(c=u.plugins).filter(function(e,t){return c.indexOf(e)===t}),y={id:v,reference:e,popper:n$(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:b,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(i),cancelAnimationFrame(r)},setProps:function(t){if(y.state.isDestroyed)return;N("onBeforeUpdate",[y,t]),B();var n=y.props,i=b$(e,Object.assign({},n,t$(t),{ignoreAttributes:!0}));y.props=i,V(),n.interactiveDebounce!==i.interactiveDebounce&&(j(),g=Xy(W,i.interactiveDebounce));n.triggerTarget&&!i.triggerTarget?Yy(n.triggerTarget).forEach(function(e){e.removeAttribute("aria-expanded")}):i.triggerTarget&&e.removeAttribute("aria-expanded");A(),U(),k&&k(n,i);y.popperInstance&&(X(),Q().forEach(function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)}));N("onAfterUpdate",[y,t])},setContent:function(e){y.setProps({content:e})},show:function(){var e=y.state.isVisible,t=y.state.isDestroyed,n=!y.state.isEnabled,i=c$.isTouch&&!y.props.touch,r=Jy(y.props.duration,0,h$.duration);if(e||t||n||i)return;if(T().hasAttribute("disabled"))return;if(N("onShow",[y],!1),!1===y.props.onShow(y))return;y.state.isVisible=!0,E()&&(_.style.visibility="visible");U(),q(),y.state.isMounted||(_.style.transition="none");if(E()){var o=C();o$([o.box,o.content],0)}s=function(){var e;if(y.state.isVisible&&!f){if(f=!0,_.offsetHeight,_.style.transition=y.props.moveTransition,E()&&y.props.animation){var t=C(),n=t.box,i=t.content;o$([n,i],r),a$([n,i],"visible")}D(),A(),Qy(S$,y),null==(e=y.popperInstance)||e.forceUpdate(),N("onMount",[y]),y.props.animation&&E()&&function(e,t){L(e,t)}(r,function(){y.state.isShown=!0,N("onShown",[y])})}},function(){var e,t=y.props.appendTo,n=T();e=y.props.interactive&&t===Wy||"parent"===t?n.parentNode:Ky(t,[n]);e.contains(_)||e.appendChild(_);y.state.isMounted=!0,X()}()},hide:function(){var e=!y.state.isVisible,t=y.state.isDestroyed,n=!y.state.isEnabled,i=Jy(y.props.duration,1,h$.duration);if(e||t||n)return;if(N("onHide",[y],!1),!1===y.props.onHide(y))return;y.state.isVisible=!1,y.state.isShown=!1,f=!1,d=!1,E()&&(_.style.visibility="hidden");if(j(),M(),U(!0),E()){var r=C(),o=r.box,a=r.content;y.props.animation&&(o$([o,a],i),a$([o,a],"hidden"))}D(),A(),y.props.animation?E()&&function(e,t){L(e,function(){!y.state.isVisible&&_.parentNode&&_.parentNode.contains(_)&&t()})}(i,y.unmount):y.unmount()},hideWithInteractivity:function(e){z().addEventListener("mousemove",g),Qy(I$,g),g(e)},enable:function(){y.state.isEnabled=!0},disable:function(){y.hide(),y.state.isEnabled=!1},unmount:function(){y.state.isVisible&&y.hide();if(!y.state.isMounted)return;Y(),Q().forEach(function(e){e._tippy.unmount()}),_.parentNode&&_.parentNode.removeChild(_);S$=S$.filter(function(e){return e!==y}),y.state.isMounted=!1,N("onHidden",[y])},destroy:function(){if(y.state.isDestroyed)return;y.clearDelayTimeouts(),y.unmount(),B(),delete e._tippy,y.state.isDestroyed=!0,N("onDestroy",[y])}};if(!u.render)return y;var $=u.render(y),_=$.popper,k=$.onUpdate;_.setAttribute("data-tippy-root",""),_.id="tippy-"+y.id,y.popper=_,e._tippy=y,_._tippy=y;var w=b.map(function(e){return e.fn(y)}),x=e.hasAttribute("aria-expanded");return V(),A(),U(),N("onCreate",[y]),u.showOnCreate&&ee(),_.addEventListener("mouseenter",function(){y.props.interactive&&y.state.isVisible&&y.clearDelayTimeouts()}),_.addEventListener("mouseleave",function(){y.props.interactive&&y.props.trigger.indexOf("mouseenter")>=0&&z().addEventListener("mousemove",g)}),y;function I(){var e=y.props.touch;return Array.isArray(e)?e:[e,0]}function S(){return"hold"===I()[0]}function E(){var e;return!(null==(e=y.props.render)||!e.$$tippy)}function T(){return l||e}function z(){var e=T().parentNode;return e?function(e){var t,n=Yy(e)[0];return null!=n&&null!=(t=n.ownerDocument)&&t.body?n.ownerDocument:document}(e):document}function C(){return k$(_)}function O(e){return y.state.isMounted&&!y.state.isVisible||c$.isTouch||o&&"focus"===o.type?0:Jy(y.props.delay,e?0:1,h$.delay)}function U(e){void 0===e&&(e=!1),_.style.pointerEvents=y.props.interactive&&!e?"":"none",_.style.zIndex=""+y.props.zIndex}function N(e,t,n){var i;(void 0===n&&(n=!0),w.forEach(function(n){n[e]&&n[e].apply(n,t)}),n)&&(i=y.props)[e].apply(i,t)}function D(){var t=y.props.aria;if(t.content){var n="aria-"+t.content,i=_.id;Yy(y.props.triggerTarget||e).forEach(function(e){var t=e.getAttribute(n);if(y.state.isVisible)e.setAttribute(n,t?t+" "+i:i);else{var r=t&&t.replace(i,"").trim();r?e.setAttribute(n,r):e.removeAttribute(n)}})}}function A(){!x&&y.props.aria.expanded&&Yy(y.props.triggerTarget||e).forEach(function(e){y.props.interactive?e.setAttribute("aria-expanded",y.state.isVisible&&e===T()?"true":"false"):e.removeAttribute("aria-expanded")})}function j(){z().removeEventListener("mousemove",g),I$=I$.filter(function(e){return e!==g})}function P(t){if(!c$.isTouch||!m&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!y.props.interactive||!l$(_,n)){if(Yy(y.props.triggerTarget||e).some(function(e){return l$(e,n)})){if(c$.isTouch)return;if(y.state.isVisible&&y.props.trigger.indexOf("click")>=0)return}else N("onClickOutside",[y,t]);!0===y.props.hideOnClick&&(y.clearDelayTimeouts(),y.hide(),p=!0,setTimeout(function(){p=!1}),y.state.isMounted||M())}}}function Z(){m=!0}function R(){m=!1}function q(){var e=z();e.addEventListener("mousedown",P,!0),e.addEventListener("touchend",P,Hy),e.addEventListener("touchstart",R,Hy),e.addEventListener("touchmove",Z,Hy)}function M(){var e=z();e.removeEventListener("mousedown",P,!0),e.removeEventListener("touchend",P,Hy),e.removeEventListener("touchstart",R,Hy),e.removeEventListener("touchmove",Z,Hy)}function L(e,t){var n=C().box;function i(e){e.target===n&&(s$(n,"remove",i),t())}if(0===e)return t();s$(n,"remove",a),s$(n,"add",i),a=i}function F(t,n,i){void 0===i&&(i=!1),Yy(y.props.triggerTarget||e).forEach(function(e){e.addEventListener(t,n,i),h.push({node:e,eventType:t,handler:n,options:i})})}function V(){var e;S()&&(F("touchstart",H,{passive:!0}),F("touchend",J,{passive:!0})),(e=y.props.trigger,e.split(/\s+/).filter(Boolean)).forEach(function(e){if("manual"!==e)switch(F(e,H),e){case"mouseenter":F("mouseleave",J);break;case"focus":F(f$?"focusout":"blur",G);break;case"focusin":F("focusout",G)}})}function B(){h.forEach(function(e){var t=e.node,n=e.eventType,i=e.handler,r=e.options;t.removeEventListener(n,i,r)}),h=[]}function H(e){var t,n=!1;if(y.state.isEnabled&&!K(e)&&!p){var i="focus"===(null==(t=o)?void 0:t.type);o=e,l=e.currentTarget,A(),!y.state.isVisible&&Gy(e,"MouseEvent")&&I$.forEach(function(t){return t(e)}),"click"===e.type&&(y.props.trigger.indexOf("mouseenter")<0||d)&&!1!==y.props.hideOnClick&&y.state.isVisible?n=!0:ee(e),"click"===e.type&&(d=!n),n&&!i&&te(e)}}function W(e){var t=e.target,n=T().contains(t)||_.contains(t);if("mousemove"!==e.type||!n){var i=Q().concat(_).map(function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:u}:null}).filter(Boolean);(function(e,t){var n=t.clientX,i=t.clientY;return e.every(function(e){var t=e.popperRect,r=e.popperState,o=e.props.interactiveBorder,a=r.placement.split("-")[0],s=r.modifiersData.offset;if(!s)return!0;var l="bottom"===a?s.top.y:0,c="top"===a?s.bottom.y:0,u="right"===a?s.left.x:0,d="left"===a?s.right.x:0,p=t.top-i+l>o,m=i-t.bottom-c>o,f=t.left-n+u>o,h=n-t.right-d>o;return p||m||f||h})})(i,e)&&(j(),te(e))}}function J(e){K(e)||y.props.trigger.indexOf("click")>=0&&d||(y.props.interactive?y.hideWithInteractivity(e):te(e))}function G(e){y.props.trigger.indexOf("focusin")<0&&e.target!==T()||y.props.interactive&&e.relatedTarget&&_.contains(e.relatedTarget)||te(e)}function K(e){return!!c$.isTouch&&S()!==e.type.indexOf("touch")>=0}function X(){Y();var t=y.props,n=t.popperOptions,i=t.placement,r=t.offset,o=t.getReferenceClientRect,a=t.moveTransition,l=E()?k$(_).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||T()}:e,u={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(E()){var n=C().box;["placement","reference-hidden","escaped"].forEach(function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)}),t.attributes.popper={}}}},d=[{name:"offset",options:{offset:r}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},u];E()&&l&&d.push({name:"arrow",options:{element:l,padding:3}}),d.push.apply(d,(null==n?void 0:n.modifiers)||[]),y.popperInstance=Ly(c,_,Object.assign({},n,{placement:i,onFirstUpdate:s,modifiers:d}))}function Y(){y.popperInstance&&(y.popperInstance.destroy(),y.popperInstance=null)}function Q(){return e$(_.querySelectorAll("[data-tippy-root]"))}function ee(e){y.clearDelayTimeouts(),e&&N("onTrigger",[y,e]),q();var t=O(!0),i=I(),r=i[0],o=i[1];c$.isTouch&&"hold"===r&&o&&(t=o),t?n=setTimeout(function(){y.show()},t):y.show()}function te(e){if(y.clearDelayTimeouts(),N("onUntrigger",[y,e]),y.state.isVisible){if(!(y.props.trigger.indexOf("mouseenter")>=0&&y.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&d)){var t=O(!1);t?i=setTimeout(function(){y.state.isVisible&&y.hide()},t):r=requestAnimationFrame(function(){y.hide()})}}else M()}}function T$(e,t){void 0===t&&(t={});var n=h$.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",d$,Hy),window.addEventListener("blur",m$);var i=Object.assign({},t,{plugins:n}),r=r$(e).reduce(function(e,t){var n=t&&E$(t,i);return n&&e.push(n),e},[]);return i$(e)?r[0]:r}T$.defaultProps=h$,T$.setDefaultProps=function(e){Object.keys(e).forEach(function(t){h$[t]=e[t]})},T$.currentInput=c$,Object.assign({},Bb,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}}),T$.setDefaultProps({render:w$});const z$=e=>({}),C$=e=>({trigger:e[2]}),O$=e=>({}),U$=e=>({trigger:e[2]});function N$(e){let t,n,i;const r=e[6].default,o=eh(r,e,e[5],U$),a=e[6].content,s=eh(a,e,e[5],C$),l=s||function(e){let t;return{c(){t=mh(e[0])},m(e,n){ch(e,t,n)},p(e,n){1&n&&yh(t,e[0])},d(e){e&&uh(t)}}}(e);return{c(){o&&o.c(),t=fh(),n=dh("div"),l&&l.c(),_h(n,"display","none")},m(r,a){o&&o.m(r,a),ch(r,t,a),ch(r,n,a),l&&l.m(n,null),e[7](n),i=!0},p(e,[t]){o&&o.p&&(!i||32&t)&&ih(o,r,e,e[5],i?nh(r,e[5],t,O$):rh(e[5]),U$),s?s.p&&(!i||32&t)&&ih(s,a,e,e[5],i?nh(a,e[5],t,z$):rh(e[5]),C$):l&&l.p&&(!i||1&t)&&l.p(e,i?t:-1)},i(e){i||(Bh(o,e),Bh(l,e),i=!0)},o(e){Hh(o,e),Hh(l,e),i=!1},d(i){o&&o.d(i),i&&uh(t),i&&uh(n),l&&l.d(i),e[7](null)}}}function D$(e,t,n){const i=["text","disabled"];let r,o,a,s=oh(t,i),{$$slots:l={},$$scope:c}=t,{text:u=""}=t,{disabled:d=!1}=t;return Th(()=>{r&&(n(4,a=T$(r,{...s,content:o})),o.style.removeProperty("display"))}),e.$$set=e=>{t=Wf(Wf({},t),function(e){const t={};for(const n in e)"$"!==n[0]&&(t[n]=e[n]);return t}(e)),n(9,s=oh(t,i)),"text"in e&&n(0,u=e.text),"disabled"in e&&n(3,d=e.disabled),"$$scope"in e&&n(5,c=e.$$scope)},e.$$.update=()=>{24&e.$$.dirty&&a&&(d?a.disable():a.enable())},[u,o,e=>{r=e},d,a,c,l,function(e){Ch[e?"unshift":"push"](()=>{o=e,n(1,o)})}]}class A$ extends Qh{constructor(e){super(),Yh(this,e,D$,N$,Yf,{text:0,disabled:3})}}function j$(e){lh(e,"svelte-wb18kg","svg.svelte-wb18kg{opacity:var(--tooltip-opacity, 1);color:var(--text-color)}")}function P$(e){let t,n,i,r;return{c(){t=ph("svg"),n=ph("path"),vh(n,"fill","currentColor"),vh(n,"d","M15.07,11.25L14.17,12.17C13.45,12.89 13,13.5 13,15H11V14.5C11,13.39 11.45,12.39 12.17,11.67L13.41,10.41C13.78,10.05 14,9.55 14,9C14,7.89 13.1,7 12,7A2,2 0 0,0 10,9H8A4,4 0 0,1 12,5A4,4 0 0,1 16,9C16,9.88 15.64,10.67 15.07,11.25M13,19H11V17H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z"),vh(t,"class","tooltip svelte-wb18kg"),_h(t,"width","1rem"),_h(t,"height","1rem"),vh(t,"viewBox","0 0 24 24")},m(o,a){ch(o,t,a),sh(t,n),i||(r=ah(e[9].call(null,t)),i=!0)},p:Hf,d(e){e&&uh(t),i=!1,r()}}}function Z$(e){let t,n,i,r;return{c(){t=dh("br"),n=fh(),i=dh("a"),r=mh("Read more."),vh(i,"href",e[0]),vh(i,"target",e[3]?void 0:"_blank"),vh(i,"rel",e[3]?void 0:"noopener noreferrer")},m(e,o){ch(e,t,o),ch(e,n,o),ch(e,i,o),sh(i,r)},p(e,t){1&t&&vh(i,"href",e[0])},d(e){e&&uh(t),e&&uh(n),e&&uh(i)}}}function R$(e){let t,n,i;const r=e[6].default,o=eh(r,e,e[7],null);let a=e[2]&&Z$(e);return{c(){t=dh("div"),o&&o.c(),n=fh(),a&&a.c(),vh(t,"slot","content")},m(e,r){ch(e,t,r),o&&o.m(t,null),sh(t,n),a&&a.m(t,null),i=!0},p(e,n){o&&o.p&&(!i||128&n)&&ih(o,r,e,e[7],i?nh(r,e[7],n,null):rh(e[7]),null),e[2]?a?a.p(e,n):(a=Z$(e),a.c(),a.m(t,null)):a&&(a.d(1),a=null)},i(e){i||(Bh(o,e),i=!0)},o(e){Hh(o,e),i=!1},d(e){e&&uh(t),o&&o.d(e),a&&a.d()}}}function q$(e){let t,n;return t=new A$({props:{interactive:!0,placement:e[1],theme:"light border",maxWidth:"22em",$$slots:{content:[R$,({trigger:e})=>({9:e}),({trigger:e})=>e?512:0],default:[P$,({trigger:e})=>({9:e}),({trigger:e})=>e?512:0]},$$scope:{ctx:e}}}),{c(){Jh(t.$$.fragment)},m(e,i){Gh(t,e,i),n=!0},p(e,[n]){const i={};2&n&&(i.placement=e[1]),133&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(Bh(t.$$.fragment,e),n=!0)},o(e){Hh(t.$$.fragment,e),n=!1},d(e){Kh(t,e)}}}function M$(e,t,n){let i,r,{$$slots:o={},$$scope:a}=t,{link:s}=t,{placement:l="right"}=t;const c=(u=lg,Eh().$$.context.get(u));var u;const d=null!=c,p=c??function(e,t){return{subscribe:tg(e,t).subscribe}}({canOpen:!1});return Qf(e,p,e=>n(5,r=e)),e.$$set=e=>{"link"in e&&n(0,s=e.link),"placement"in e&&n(1,l=e.placement),"$$scope"in e&&n(7,a=e.$$scope)},e.$$.update=()=>{33&e.$$.dirty&&n(2,i=null!=s&&(!d||r.canOpen))},[s,l,i,d,p,r,o,a]}class L$ extends Qh{constructor(e){super(),Yh(this,e,M$,q$,Yf,{link:0,placement:1},j$)}}function F$(e){let t,n,i;return{c(){t=dh("input"),vh(t,"type","checkbox"),t.disabled=e[1]},m(r,o){ch(r,t,o),t.checked=e[0],n||(i=gh(t,"change",e[6]),n=!0)},p(e,[n]){2&n&&(t.disabled=e[1]),1&n&&(t.checked=e[0])},i:Hf,o:Hf,d(e){e&&uh(t),n=!1,i()}}}function V$(e,t,n){let{value:i=!1}=t,{checked:r=!1!==i}=t,{defaultValue:o}=t,{disabled:a}=t,s=r,l=i||o;return e.$$set=e=>{"value"in e&&n(2,i=e.value),"checked"in e&&n(0,r=e.checked),"defaultValue"in e&&n(3,o=e.defaultValue),"disabled"in e&&n(1,a=e.disabled)},e.$$.update=()=>{53&e.$$.dirty&&(s?r?!1===i&&n(0,r=!1):n(2,i=!1):r?n(2,i=l):!1!==i&&n(0,r=!0),n(4,s=r),n(5,l=i||l))},[r,a,i,o,s,l,function(){r=this.checked,n(0,r),n(4,s),n(5,l),n(2,i)}]}class B$ extends Qh{constructor(e){super(),Yh(this,e,V$,F$,Yf,{value:2,checked:0,defaultValue:3,disabled:1})}}function H$(e){let t,n;return{c(){t=ph("svg"),n=ph("path"),vh(n,"d","M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"),vh(t,"class","keepcolor"),vh(t,"width","9"),vh(t,"height","9"),vh(t,"xmlns","http://www.w3.org/2000/svg"),vh(t,"viewBox","0 0 320 512")},m(e,i){ch(e,t,i),sh(t,n)},p:Hf,i:Hf,o:Hf,d(e){e&&uh(t)}}}class W$ extends Qh{constructor(e){super(),Yh(this,e,null,H$,Yf,{})}}function J$(e){let t,n;return{c(){t=ph("svg"),n=ph("path"),vh(n,"d","M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"),vh(t,"class","keepcolor"),vh(t,"width","9"),vh(t,"height","9"),vh(t,"xmlns","http://www.w3.org/2000/svg"),vh(t,"viewBox","0 0 512 512")},m(e,i){ch(e,t,i),sh(t,n)},p:Hf,i:Hf,o:Hf,d(e){e&&uh(t)}}}class G$ extends Qh{constructor(e){super(),Yh(this,e,null,J$,Yf,{})}}function K$(e){let t,n,i,r;const o=[Y$,X$],a=[];function s(e,t){return"checkbox"===e[3]?0:"toggleradio"===e[3]?1:-1}return~(n=s(e))&&(i=a[n]=o[n](e)),{c(){t=dh("span"),i&&i.c(),vh(t,"class","mr-2")},m(e,i){ch(e,t,i),~n&&a[n].m(t,null),r=!0},p(e,r){let l=n;n=s(e),n===l?~n&&a[n].p(e,r):(i&&(Fh(),Hh(a[l],1,1,()=>{a[l]=null}),Vh()),~n?(i=a[n],i?i.p(e,r):(i=a[n]=o[n](e),i.c()),Bh(i,1),i.m(t,null)):i=null)},i(e){r||(Bh(i),r=!0)},o(e){Hh(i),r=!1},d(e){e&&uh(t),~n&&a[n].d()}}}function X$(e){let t,n,i;function r(t){e[19](t)}let o={defaultValue:e[4],disabled:e[7]||e[9]};return void 0!==e[1]&&(o.value=e[1]),t=new B$({props:o}),Ch.push(()=>Wh(t,"value",r)),{c(){Jh(t.$$.fragment)},m(e,n){Gh(t,e,n),i=!0},p(e,i){const r={};16&i&&(r.defaultValue=e[4]),640&i&&(r.disabled=e[7]||e[9]),!n&&2&i&&(n=!0,r.value=e[1],jh(()=>n=!1)),t.$set(r)},i(e){i||(Bh(t.$$.fragment,e),i=!0)},o(e){Hh(t.$$.fragment,e),i=!1},d(e){Kh(t,e)}}}function Y$(e){let t,n,i,r;return{c(){t=dh("input"),vh(t,"type","checkbox"),t.disabled=n=e[7]||e[9]},m(n,o){ch(n,t,o),t.checked=e[0],i||(r=gh(t,"change",e[18]),i=!0)},p(e,i){640&i&&n!==(n=e[7]||e[9])&&(t.disabled=n),1&i&&(t.checked=e[0])},i:Hf,o:Hf,d(e){e&&uh(t),i=!1,r()}}}function Q$(e){let t,n;return t=new W$({}),{c(){Jh(t.$$.fragment)},m(e,i){Gh(t,e,i),n=!0},i(e){n||(Bh(t.$$.fragment,e),n=!0)},o(e){Hh(t.$$.fragment,e),n=!1},d(e){Kh(t,e)}}}function e_(e){let t,n;return t=new G$({}),{c(){Jh(t.$$.fragment)},m(e,i){Gh(t,e,i),n=!0},i(e){n||(Bh(t.$$.fragment,e),n=!0)},o(e){Hh(t.$$.fragment,e),n=!1},d(e){Kh(t,e)}}}function t_(e){let t,n;return{c(){t=new wh(!1),n=hh(),t.a=n},m(i,r){t.m(e[5],i,r),ch(i,n,r)},p(e,n){32&n&&t.p(e[5])},d(e){e&&uh(n),e&&t.d()}}}function n_(e){let t,n,i,r,o,a,s,l,c,u,d,p,m,f,h,g,v,b,y,$,_,k,w,x,I,S="section"!==e[3]&&K$(e);const E=[e_,Q$],T=[];function z(e,t){return e[10]?0:1}d=z(e),p=T[d]=E[d](e),h=new L$({props:{link:e[6],$$slots:{default:[t_]},$$scope:{ctx:e}}});const C=e[17].default,O=eh(C,e,e[20],null);return{c(){t=dh("section"),n=dh("h1"),i=dh("label"),r=dh("div"),S&&S.c(),o=fh(),a=dh("span"),s=mh(e[2]),l=fh(),c=dh("div"),u=dh("button"),p.c(),f=fh(),Jh(h.$$.fragment),g=fh(),v=dh("div"),b=dh("span"),$=fh(),_=dh("div"),O&&O.c(),vh(r,"class","flex items-center"),vh(u,"class","px-1 bg-transparent border-0 mr-2"),vh(u,"aria-label",m=e[10]?"Collapse section":"Expand section"),vh(c,"class","flex items-center"),vh(i,"class","items-center tooltip-container pr-2 flex justify-between"),vh(b,"class","italic"),vh(v,"class","text-sm text-gray-500"),v.hidden=y=!e[7]||void 0===e[8],_.hidden=k=!e[10],vh(t,"class","controls-section")},m(p,m){var y;ch(p,t,m),sh(t,n),sh(n,i),sh(i,r),S&&S.m(r,null),sh(r,o),sh(r,a),sh(a,s),sh(i,l),sh(i,c),sh(c,u),T[d].m(u,null),sh(c,f),Gh(h,c,null),sh(t,g),sh(t,v),sh(v,b),b.innerHTML=e[8],sh(t,$),sh(t,_),O&&O.m(_,null),w=!0,x||(I=gh(u,"click",(y=e[11],function(e){return e.preventDefault(),y.call(this,e)})),x=!0)},p(e,[t]){"section"!==e[3]?S?(S.p(e,t),8&t&&Bh(S,1)):(S=K$(e),S.c(),Bh(S,1),S.m(r,o)):S&&(Fh(),Hh(S,1,1,()=>{S=null}),Vh()),(!w||4&t)&&yh(s,e[2]);let n=d;d=z(e),d!==n&&(Fh(),Hh(T[n],1,1,()=>{T[n]=null}),Vh(),p=T[d],p||(p=T[d]=E[d](e),p.c()),Bh(p,1),p.m(u,null)),(!w||1024&t&&m!==(m=e[10]?"Collapse section":"Expand section"))&&vh(u,"aria-label",m);const i={};64&t&&(i.link=e[6]),1048608&t&&(i.$$scope={dirty:t,ctx:e}),h.$set(i),(!w||256&t)&&(b.innerHTML=e[8]),(!w||384&t&&y!==(y=!e[7]||void 0===e[8]))&&(v.hidden=y),O&&O.p&&(!w||1048576&t)&&ih(O,C,e,e[20],w?nh(C,e[20],t,null):rh(e[20]),null),(!w||1024&t&&k!==(k=!e[10]))&&(_.hidden=k)},i(e){w||(Bh(S),Bh(p),Bh(h.$$.fragment,e),Bh(O,e),w=!0)},o(e){Hh(S),Hh(p),Hh(h.$$.fragment,e),Hh(O,e),w=!1},d(e){e&&uh(t),S&&S.d(),T[d].d(),Kh(h),O&&O.d(e),x=!1,I()}}}function i_(e,t,n){let i,r,{$$slots:o={},$$scope:a}=t,{label:s}=t,{type:l}=t,{checkboxChecked:c}=t,{toggleRadioValue:u}=t,{toggleRadioDefaultValue:d}=t,{helpContent:p}=t,{helpLink:m}=t,{disabled:f}=t,{disabledReason:h}=t,{required:g}=t,{error:v}=t,b=!1,y=g,$=r;return e.$$set=e=>{"label"in e&&n(2,s=e.label),"type"in e&&n(3,l=e.type),"checkboxChecked"in e&&n(0,c=e.checkboxChecked),"toggleRadioValue"in e&&n(1,u=e.toggleRadioValue),"toggleRadioDefaultValue"in e&&n(4,d=e.toggleRadioDefaultValue),"helpContent"in e&&n(5,p=e.helpContent),"helpLink"in e&&n(6,m=e.helpLink),"disabled"in e&&n(7,f=e.disabled),"disabledReason"in e&&n(8,h=e.disabledReason),"required"in e&&n(9,g=e.required),"error"in e&&n(12,v=e.error),"$$scope"in e&&n(20,a=e.$$scope)},e.$$.update=()=>{4096&e.$$.dirty&&n(16,i=void 0!==v),3&e.$$.dirty&&n(15,r=!(!c&&!u)),123392&e.$$.dirty&&((i||!$&&r||!y&&g)&&n(10,b=!0),n(13,y=g),n(14,$=r))},[c,u,s,l,d,p,m,f,h,g,b,function(){n(10,b=!b||i)},v,y,$,r,i,o,function(){c=this.checked,n(0,c)},function(e){u=e,n(1,u)},a]}class r_ extends Qh{constructor(e){super(),Yh(this,e,i_,n_,Yf,{label:2,type:3,checkboxChecked:0,toggleRadioValue:1,toggleRadioDefaultValue:4,helpContent:5,helpLink:6,disabled:7,disabledReason:8,required:9,error:12})}}function o_(e){let t;const n=e[9].default,i=eh(n,e,e[11],null);return{c(){i&&i.c()},m(e,n){i&&i.m(e,n),t=!0},p(e,r){i&&i.p&&(!t||2048&r)&&ih(i,n,e,e[11],t?nh(n,e[11],r,null):rh(e[11]),null)},i(e){t||(Bh(i,e),t=!0)},o(e){Hh(i,e),t=!1},d(e){i&&i.d(e)}}}function a_(e){let t,n,i;function r(t){e[10](t)}let o={type:"toggleradio",label:e[1],toggleRadioDefaultValue:e[2],helpContent:e[3],helpLink:e[4],disabled:e[5],disabledReason:e[6],required:e[7],error:e[8],$$slots:{default:[o_]},$$scope:{ctx:e}};return void 0!==e[0]&&(o.toggleRadioValue=e[0]),t=new r_({props:o}),Ch.push(()=>Wh(t,"toggleRadioValue",r)),{c(){Jh(t.$$.fragment)},m(e,n){Gh(t,e,n),i=!0},p(e,[i]){const r={};2&i&&(r.label=e[1]),4&i&&(r.toggleRadioDefaultValue=e[2]),8&i&&(r.helpContent=e[3]),16&i&&(r.helpLink=e[4]),32&i&&(r.disabled=e[5]),64&i&&(r.disabledReason=e[6]),128&i&&(r.required=e[7]),256&i&&(r.error=e[8]),2048&i&&(r.$$scope={dirty:i,ctx:e}),!n&&1&i&&(n=!0,r.toggleRadioValue=e[0],jh(()=>n=!1)),t.$set(r)},i(e){i||(Bh(t.$$.fragment,e),i=!0)},o(e){Hh(t.$$.fragment,e),i=!1},d(e){Kh(t,e)}}}function s_(e,t,n){let{$$slots:i={},$$scope:r}=t,{label:o}=t,{value:a}=t,{defaultValue:s}=t,{helpContent:l}=t,{helpLink:c}=t,{disabled:u=!1}=t,{disabledReason:d}=t,{required:p=!1}=t,{error:m}=t;return e.$$set=e=>{"label"in e&&n(1,o=e.label),"value"in e&&n(0,a=e.value),"defaultValue"in e&&n(2,s=e.defaultValue),"helpContent"in e&&n(3,l=e.helpContent),"helpLink"in e&&n(4,c=e.helpLink),"disabled"in e&&n(5,u=e.disabled),"disabledReason"in e&&n(6,d=e.disabledReason),"required"in e&&n(7,p=e.required),"error"in e&&n(8,m=e.error),"$$scope"in e&&n(11,r=e.$$scope)},[a,o,s,l,c,u,d,p,m,i,function(e){a=e,n(0,a)},r]}class l_ extends Qh{constructor(e){super(),Yh(this,e,s_,a_,Yf,{label:1,value:0,defaultValue:2,helpContent:3,helpLink:4,disabled:5,disabledReason:6,required:7,error:8})}}function c_(e){let t;return{c(){t=mh("Simple mechanism with a single account authorized for all privileged actions.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function u_(e){let t;return{c(){t=mh("Flexible mechanism with a separate role for each privileged action. A role can have many authorized accounts.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function d_(e){let t,n,i,r,o,a,s,l,c,u,d,p,m,f;return o=new L$({props:{link:"https://docs.openzeppelin.com/stellar-contracts/access/ownable",$$slots:{default:[c_]},$$scope:{ctx:e}}}),u=new L$({props:{link:"https://docs.openzeppelin.com/stellar-contracts/access/access-control",$$slots:{default:[u_]},$$scope:{ctx:e}}}),p=bh(e[6][0]),{c(){t=dh("div"),n=dh("label"),i=dh("input"),r=mh("\n Ownable\n "),Jh(o.$$.fragment),a=fh(),s=dh("label"),l=dh("input"),c=mh("\n Roles\n "),Jh(u.$$.fragment),vh(i,"type","radio"),i.__value="ownable",i.value=i.__value,kh(n,"checked","ownable"===e[0]),vh(l,"type","radio"),l.__value="roles",l.value=l.__value,kh(s,"checked","roles"===e[0]),vh(t,"class","checkbox-group"),p.p(i,l)},m(p,h){ch(p,t,h),sh(t,n),sh(n,i),i.checked=i.__value===e[0],sh(n,r),Gh(o,n,null),sh(t,a),sh(t,s),sh(s,l),l.checked=l.__value===e[0],sh(s,c),Gh(u,s,null),d=!0,m||(f=[gh(i,"change",e[5]),gh(l,"change",e[7])],m=!0)},p(e,t){1&t&&(i.checked=i.__value===e[0]);const r={};512&t&&(r.$$scope={dirty:t,ctx:e}),o.$set(r),(!d||1&t)&&kh(n,"checked","ownable"===e[0]),1&t&&(l.checked=l.__value===e[0]);const a={};512&t&&(a.$$scope={dirty:t,ctx:e}),u.$set(a),(!d||1&t)&&kh(s,"checked","roles"===e[0])},i(e){d||(Bh(o.$$.fragment,e),Bh(u.$$.fragment,e),d=!0)},o(e){Hh(o.$$.fragment,e),Hh(u.$$.fragment,e),d=!1},d(e){e&&uh(t),Kh(o),Kh(u),p.r(),m=!1,Kf(f)}}}function p_(e){let t,n,i;function r(t){e[8](t)}let o={label:"Access Control",defaultValue:"ownable",helpContent:"Restrict who can access the functions of a contract or when they can do it.",required:e[1],$$slots:{default:[d_]},$$scope:{ctx:e}};return void 0!==e[0]&&(o.value=e[0]),t=new l_({props:o}),Ch.push(()=>Wh(t,"value",r)),{c(){Jh(t.$$.fragment)},m(e,n){Gh(t,e,n),i=!0},p(e,[i]){const r={};2&i&&(r.required=e[1]),513&i&&(r.$$scope={dirty:i,ctx:e}),!n&&1&i&&(n=!0,r.value=e[0],jh(()=>n=!1)),t.$set(r)},i(e){i||(Bh(t.$$.fragment,e),i=!0)},o(e){Hh(t.$$.fragment,e),i=!1},d(e){Kh(t,e)}}}function m_(e,t,n){let{access:i}=t,{required:r}=t,o="ownable",a=r,s=i;return e.$$set=e=>{"access"in e&&n(0,i=e.access),"required"in e&&n(1,r=e.required)},e.$$.update=()=>{31&e.$$.dirty&&(a&&!r?n(0,i=s):(n(4,s=i),!1===i&&r&&n(0,i=o)),n(3,a=r),!1!==i&&n(2,o=i))},[i,r,o,a,s,function(){i=this.__value,n(0,i),n(3,a),n(1,r),n(4,s),n(2,o)},[[]],function(){i=this.__value,n(0,i),n(3,a),n(1,r),n(4,s),n(2,o)},function(e){i=e,n(0,i),n(3,a),n(1,r),n(4,s),n(2,o)}]}class f_ extends Qh{constructor(e){super(),Yh(this,e,m_,p_,Yf,{access:0,required:1})}}const h_="has-error";function g_(e,t){const n=T$(e,{placement:"right",theme:"light-red border",trigger:"manual",hideOnClick:!1,interactive:!0});function i(t){t?(n.setContent(t),n.show(),e.classList.add(h_)):(n.hide(),e.classList.remove(h_))}return i(t),{update:i,destroy:n.destroy}}function v_(e){let t;return{c(){t=mh("Where people can contact you to report security issues. Will only be visible if contract metadata is verified.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function b_(e){let t,n,i,r,o,a,s,l,c,u,d,p,m,f,h,g,v,b,y;return s=new L$({props:{$$slots:{default:[v_]},$$scope:{ctx:e}}}),{c(){t=dh("section"),n=dh("h1"),n.innerHTML='<label class="flex items-center tooltip-container pr-2"><span>Info</span></label>',i=fh(),r=dh("label"),o=dh("span"),a=mh("Security Contact\n "),Jh(s.$$.fragment),l=fh(),c=dh("input"),d=fh(),p=dh("label"),m=dh("span"),m.textContent="License",f=fh(),h=dh("input"),vh(o,"class","flex justify-between pr-2"),vh(c,"placeholder","security@example.com"),vh(r,"class","labeled-input"),vh(h,"placeholder",Mg.license),vh(p,"class","labeled-input"),vh(t,"class","controls-section")},m($,_){ch($,t,_),sh(t,n),sh(t,i),sh(t,r),sh(r,o),sh(o,a),Gh(s,o,null),sh(r,l),sh(r,c),$h(c,e[0].securityContact),sh(t,d),sh(t,p),sh(p,m),sh(p,f),sh(p,h),$h(h,e[0].license),v=!0,b||(y=[gh(c,"input",e[2]),ah(u=g_.call(null,c,e[1]?.securityContact)),gh(h,"input",e[3]),ah(g=g_.call(null,h,e[1]?.license))],b=!0)},p(e,[t]){const n={};16&t&&(n.$$scope={dirty:t,ctx:e}),s.$set(n),1&t&&c.value!==e[0].securityContact&&$h(c,e[0].securityContact),u&&Xf(u.update)&&2&t&&u.update.call(null,e[1]?.securityContact),1&t&&h.value!==e[0].license&&$h(h,e[0].license),g&&Xf(g.update)&&2&t&&g.update.call(null,e[1]?.license)},i(e){v||(Bh(s.$$.fragment,e),v=!0)},o(e){Hh(s.$$.fragment,e),v=!1},d(e){e&&uh(t),Kh(s),b=!1,Kf(y)}}}function y_(e,t,n){let{info:i}=t,{errors:r}=t;return e.$$set=e=>{"info"in e&&n(0,i=e.info),"errors"in e&&n(1,r=e.errors)},[i,r,function(){i.securityContact=this.value,n(0,i)},function(){i.license=this.value,n(0,i)}]}class $_ extends Qh{constructor(e){super(),Yh(this,e,y_,b_,Yf,{info:0,errors:1})}}function __(e){let t;return{c(){t=mh("Whether the contract functions should be explicitly implemented or be auto-generated with the defaults provided by\n the library.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function k_(e){let t,n,i;return{c(){t=mh("The "),n=dh("code"),n.textContent="#[contractimpl(contracttrait)]",i=mh(" attribute generates the contract functions with the defaults provided\n in the trait. You can re-implement some of the functions with custom logic if needed.")},m(e,r){ch(e,t,r),ch(e,n,r),ch(e,i,r)},p:Hf,d(e){e&&uh(t),e&&uh(n),e&&uh(i)}}}function w_(e){let t;return{c(){t=mh("Include every trait function body explicitly. Useful when all of them need to be customized.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function x_(e){let t,n,i,r,o,a,s,l,c,u,d,p,m,f,h,g,v,b,y;return r=new L$({props:{$$slots:{default:[__]},$$scope:{ctx:e}}}),u=new L$({props:{$$slots:{default:[k_]},$$scope:{ctx:e}}}),h=new L$({props:{$$slots:{default:[w_]},$$scope:{ctx:e}}}),v=bh(e[4][0]),{c(){t=dh("section"),n=dh("h1"),i=mh("Trait Implementations\n "),Jh(r.$$.fragment),o=fh(),a=dh("div"),s=dh("label"),l=dh("input"),c=mh("\n Default\n "),Jh(u.$$.fragment),d=fh(),p=dh("label"),m=dh("input"),f=mh("\n Explicit\n "),Jh(h.$$.fragment),vh(n,"class","flex justify-between pr-2"),vh(l,"type","radio"),l.__value="default",l.value=l.__value,kh(s,"checked","default"===e[0]),vh(m,"type","radio"),m.__value="explicit",m.value=m.__value,kh(p,"checked","explicit"===e[0]),vh(a,"class","checkbox-group"),vh(t,"class","controls-section"),v.p(l,m)},m(v,$){ch(v,t,$),sh(t,n),sh(n,i),Gh(r,n,null),sh(t,o),sh(t,a),sh(a,s),sh(s,l),l.checked=l.__value===e[0],sh(s,c),Gh(u,s,null),sh(a,d),sh(a,p),sh(p,m),m.checked=m.__value===e[0],sh(p,f),Gh(h,p,null),g=!0,b||(y=[gh(l,"change",e[3]),gh(l,"change",e[1]),gh(m,"change",e[5]),gh(m,"change",e[1])],b=!0)},p(e,[t]){const n={};64&t&&(n.$$scope={dirty:t,ctx:e}),r.$set(n),1&t&&(l.checked=l.__value===e[0]);const i={};64&t&&(i.$$scope={dirty:t,ctx:e}),u.$set(i),(!g||1&t)&&kh(s,"checked","default"===e[0]),1&t&&(m.checked=m.__value===e[0]);const o={};64&t&&(o.$$scope={dirty:t,ctx:e}),h.$set(o),(!g||1&t)&&kh(p,"checked","explicit"===e[0])},i(e){g||(Bh(r.$$.fragment,e),Bh(u.$$.fragment,e),Bh(h.$$.fragment,e),g=!0)},o(e){Hh(r.$$.fragment,e),Hh(u.$$.fragment,e),Hh(h.$$.fragment,e),g=!1},d(e){e&&uh(t),Kh(r),Kh(u),Kh(h),v.r(),b=!1,Kf(y)}}}function I_(e,t,n){let i,{explicitImplementations:r=!1}=t;return e.$$set=e=>{"explicitImplementations"in e&&n(2,r=e.explicitImplementations)},e.$$.update=()=>{4&e.$$.dirty&&n(0,i=r?"explicit":"default")},[i,function(){n(2,r="explicit"===i)},r,function(){i=this.__value,n(0,i),n(2,r)},[[]],function(){i=this.__value,n(0,i),n(2,r)}]}class S_ extends Qh{constructor(e){super(),Yh(this,e,I_,x_,Yf,{explicitImplementations:2})}}function E_(e){let t;return{c(){t=mh("The number of decimals used to represent token amounts. Defaults to 7.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function T_(e){let t;return{c(){t=mh("Create an initial amount of tokens for the owner.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function z_(e){let t;return{c(){t=mh("Privileged accounts will be able to create more supply.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function C_(e){let t;return{c(){t=mh("Token holders will be able to destroy their tokens.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function O_(e){let t;return{c(){t=mh("Adds vote checkpoints and delegation support for governance usage.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function U_(e){let t,n,i;return{c(){t=mh("Privileged accounts will be able to pause the functionality marked with "),n=dh("code"),n.textContent="when_not_paused",i=mh(". Useful for\n emergency response.")},m(e,r){ch(e,t,r),ch(e,n,r),ch(e,i,r)},p:Hf,d(e){e&&uh(t),e&&uh(n),e&&uh(i)}}}function N_(e){let t;return{c(){t=mh("Allows the contract to be upgraded by the owner.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function D_(e){let t,n,i,r,o,a,s,l,c,u,d,p,m,f,h,g,v,b,y,$,_,k,w,x,I,S,E,T,z,C,O,U,N,D,A,j,P,Z,R,q,M,L,F,V,B,H,W,J,G,K,X,Y,Q,ee,te,ne,ie,re,oe,ae,se,le,ce,ue,de,pe,me,fe,he,ge,ve,be;function ye(t){e[12](t)}$=new L$({props:{$$slots:{default:[E_]},$$scope:{ctx:e}}}),T=new L$({props:{$$slots:{default:[T_]},$$scope:{ctx:e}}}),q=new L$({props:{$$slots:{default:[z_]},$$scope:{ctx:e}}}),B=new L$({props:{$$slots:{default:[C_]},$$scope:{ctx:e}}}),K=new L$({props:{$$slots:{default:[O_]},$$scope:{ctx:e}}}),te=new L$({props:{$$slots:{default:[U_]},$$scope:{ctx:e}}}),ae=new L$({props:{$$slots:{default:[N_]},$$scope:{ctx:e}}});let $e={required:e[2]};function _e(t){e[13](t)}void 0!==e[0].access&&($e.access=e[0].access),le=new f_({props:$e}),Ch.push(()=>Wh(le,"access",ye));let ke={};function we(t){e[14](t)}void 0!==e[0].explicitImplementations&&(ke.explicitImplementations=e[0].explicitImplementations),de=new S_({props:ke}),Ch.push(()=>Wh(de,"explicitImplementations",_e));let xe={errors:e[1]};return void 0!==e[0].info&&(xe.info=e[0].info),fe=new $_({props:xe}),Ch.push(()=>Wh(fe,"info",we)),{c(){t=dh("section"),n=dh("h1"),n.textContent="Settings",i=fh(),r=dh("div"),o=dh("label"),a=dh("span"),a.textContent="Name",s=fh(),l=dh("input"),u=fh(),d=dh("label"),p=dh("span"),p.textContent="Symbol",m=fh(),f=dh("input"),g=fh(),v=dh("label"),b=dh("span"),y=mh("Decimals\n "),Jh($.$$.fragment),_=fh(),k=dh("input"),x=fh(),I=dh("label"),S=dh("span"),E=mh("Premint\n "),Jh(T.$$.fragment),z=fh(),C=dh("input"),U=fh(),N=dh("section"),D=dh("h1"),D.textContent="Features",A=fh(),j=dh("div"),P=dh("label"),Z=dh("input"),R=mh("\n Mintable\n "),Jh(q.$$.fragment),M=fh(),L=dh("label"),F=dh("input"),V=mh("\n Burnable\n "),Jh(B.$$.fragment),H=fh(),W=dh("label"),J=dh("input"),G=mh("\n Votes\n "),Jh(K.$$.fragment),X=fh(),Y=dh("label"),Q=dh("input"),ee=mh("\n Pausable\n "),Jh(te.$$.fragment),ne=fh(),ie=dh("label"),re=dh("input"),oe=mh("\n Upgradeable\n "),Jh(ae.$$.fragment),se=fh(),Jh(le.$$.fragment),ue=fh(),Jh(de.$$.fragment),me=fh(),Jh(fe.$$.fragment),vh(o,"class","labeled-input"),vh(d,"class","labeled-input"),vh(r,"class","grid grid-cols-[2fr,1fr] gap-2"),vh(b,"class","flex justify-between pr-2"),vh(v,"class","labeled-input"),vh(S,"class","flex justify-between pr-2"),vh(C,"placeholder","0"),vh(C,"pattern",Fv.source),vh(I,"class","labeled-input"),vh(t,"class","controls-section"),vh(Z,"type","checkbox"),kh(P,"checked",e[0].mintable),vh(F,"type","checkbox"),kh(L,"checked",e[0].burnable),vh(J,"type","checkbox"),kh(W,"checked",e[0].votes),vh(Q,"type","checkbox"),kh(Y,"checked",e[0].pausable),vh(re,"type","checkbox"),kh(ie,"checked",e[0].upgradeable),vh(j,"class","checkbox-group"),vh(N,"class","controls-section")},m(ce,pe){ch(ce,t,pe),sh(t,n),sh(t,i),sh(t,r),sh(r,o),sh(o,a),sh(o,s),sh(o,l),$h(l,e[0].name),sh(r,u),sh(r,d),sh(d,p),sh(d,m),sh(d,f),$h(f,e[0].symbol),sh(t,g),sh(t,v),sh(v,b),sh(b,y),Gh($,b,null),sh(v,_),sh(v,k),$h(k,e[0].decimals),sh(t,x),sh(t,I),sh(I,S),sh(S,E),Gh(T,S,null),sh(I,z),sh(I,C),$h(C,e[0].premint),ch(ce,U,pe),ch(ce,N,pe),sh(N,D),sh(N,A),sh(N,j),sh(j,P),sh(P,Z),Z.checked=e[0].mintable,sh(P,R),Gh(q,P,null),sh(j,M),sh(j,L),sh(L,F),F.checked=e[0].burnable,sh(L,V),Gh(B,L,null),sh(j,H),sh(j,W),sh(W,J),J.checked=e[0].votes,sh(W,G),Gh(K,W,null),sh(j,X),sh(j,Y),sh(Y,Q),Q.checked=e[0].pausable,sh(Y,ee),Gh(te,Y,null),sh(j,ne),sh(j,ie),sh(ie,re),re.checked=e[0].upgradeable,sh(ie,oe),Gh(ae,ie,null),ch(ce,se,pe),Gh(le,ce,pe),ch(ce,ue,pe),Gh(de,ce,pe),ch(ce,me,pe),Gh(fe,ce,pe),ge=!0,ve||(be=[gh(l,"input",e[3]),ah(c=g_.call(null,l,e[1]?.name)),gh(f,"input",e[4]),ah(h=g_.call(null,f,e[1]?.symbol)),gh(k,"input",e[5]),ah(w=g_.call(null,k,e[1]?.decimals)),gh(C,"input",e[6]),ah(O=g_.call(null,C,e[1]?.premint)),gh(Z,"change",e[7]),gh(F,"change",e[8]),gh(J,"change",e[9]),gh(Q,"change",e[10]),gh(re,"change",e[11])],ve=!0)},p(e,[t]){1&t&&l.value!==e[0].name&&$h(l,e[0].name),c&&Xf(c.update)&&2&t&&c.update.call(null,e[1]?.name),1&t&&f.value!==e[0].symbol&&$h(f,e[0].symbol),h&&Xf(h.update)&&2&t&&h.update.call(null,e[1]?.symbol);const n={};32768&t&&(n.$$scope={dirty:t,ctx:e}),$.$set(n),1&t&&k.value!==e[0].decimals&&$h(k,e[0].decimals),w&&Xf(w.update)&&2&t&&w.update.call(null,e[1]?.decimals);const i={};32768&t&&(i.$$scope={dirty:t,ctx:e}),T.$set(i),1&t&&C.value!==e[0].premint&&$h(C,e[0].premint),O&&Xf(O.update)&&2&t&&O.update.call(null,e[1]?.premint),1&t&&(Z.checked=e[0].mintable);const r={};32768&t&&(r.$$scope={dirty:t,ctx:e}),q.$set(r),(!ge||1&t)&&kh(P,"checked",e[0].mintable),1&t&&(F.checked=e[0].burnable);const o={};32768&t&&(o.$$scope={dirty:t,ctx:e}),B.$set(o),(!ge||1&t)&&kh(L,"checked",e[0].burnable),1&t&&(J.checked=e[0].votes);const a={};32768&t&&(a.$$scope={dirty:t,ctx:e}),K.$set(a),(!ge||1&t)&&kh(W,"checked",e[0].votes),1&t&&(Q.checked=e[0].pausable);const s={};32768&t&&(s.$$scope={dirty:t,ctx:e}),te.$set(s),(!ge||1&t)&&kh(Y,"checked",e[0].pausable),1&t&&(re.checked=e[0].upgradeable);const u={};32768&t&&(u.$$scope={dirty:t,ctx:e}),ae.$set(u),(!ge||1&t)&&kh(ie,"checked",e[0].upgradeable);const d={};4&t&&(d.required=e[2]),!ce&&1&t&&(ce=!0,d.access=e[0].access,jh(()=>ce=!1)),le.$set(d);const p={};!pe&&1&t&&(pe=!0,p.explicitImplementations=e[0].explicitImplementations,jh(()=>pe=!1)),de.$set(p);const m={};2&t&&(m.errors=e[1]),!he&&1&t&&(he=!0,m.info=e[0].info,jh(()=>he=!1)),fe.$set(m)},i(e){ge||(Bh($.$$.fragment,e),Bh(T.$$.fragment,e),Bh(q.$$.fragment,e),Bh(B.$$.fragment,e),Bh(K.$$.fragment,e),Bh(te.$$.fragment,e),Bh(ae.$$.fragment,e),Bh(le.$$.fragment,e),Bh(de.$$.fragment,e),Bh(fe.$$.fragment,e),ge=!0)},o(e){Hh($.$$.fragment,e),Hh(T.$$.fragment,e),Hh(q.$$.fragment,e),Hh(B.$$.fragment,e),Hh(K.$$.fragment,e),Hh(te.$$.fragment,e),Hh(ae.$$.fragment,e),Hh(le.$$.fragment,e),Hh(de.$$.fragment,e),Hh(fe.$$.fragment,e),ge=!1},d(e){e&&uh(t),Kh($),Kh(T),e&&uh(U),e&&uh(N),Kh(q),Kh(B),Kh(K),Kh(te),Kh(ae),e&&uh(se),Kh(le,e),e&&uh(ue),Kh(de,e),e&&uh(me),Kh(fe,e),ve=!1,Kf(be)}}}function A_(e,t,n){let i,{opts:r={kind:"Fungible",...vb.defaults,premint:"",info:{...Mg}}}=t,{errors:o}=t;return e.$$set=e=>{"opts"in e&&n(0,r=e.opts),"errors"in e&&n(1,o=e.errors)},e.$$.update=()=>{1&e.$$.dirty&&n(2,i=vb.isAccessControlRequired(r))},[r,o,i,function(){r.name=this.value,n(0,r)},function(){r.symbol=this.value,n(0,r)},function(){r.decimals=this.value,n(0,r)},function(){r.premint=this.value,n(0,r)},function(){r.mintable=this.checked,n(0,r)},function(){r.burnable=this.checked,n(0,r)},function(){r.votes=this.checked,n(0,r)},function(){r.pausable=this.checked,n(0,r)},function(){r.upgradeable=this.checked,n(0,r)},function(t){e.$$.not_equal(r.access,t)&&(r.access=t,n(0,r))},function(t){e.$$.not_equal(r.explicitImplementations,t)&&(r.explicitImplementations=t,n(0,r))},function(t){e.$$.not_equal(r.info,t)&&(r.info=t,n(0,r))}]}function j_(e){let t;return{c(){t=mh("Tokens can be minted with arbitrary IDs.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function P_(e){let t;return{c(){t=mh("Tokens will be minted with sequential IDs.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function Z_(e){let t,n,i,r,o,a,s,l,c,u,d,p,m,f,h,g,v,b;return a=new L$({props:{$$slots:{default:[j_]},$$scope:{ctx:e}}}),m=new L$({props:{$$slots:{default:[P_]},$$scope:{ctx:e}}}),g=bh(e[7][0]),{c(){t=dh("div"),n=dh("label"),i=dh("input"),o=mh("\n Non-Sequential\n "),Jh(a.$$.fragment),l=fh(),c=dh("label"),u=dh("input"),p=mh("\n Sequential\n "),Jh(m.$$.fragment),vh(i,"type","radio"),vh(i,"name","minting-mode"),i.__value="non_sequential",i.value=i.__value,i.disabled=r=e[1]||!e[0],kh(n,"checked","non_sequential"===e[3]),vh(u,"type","radio"),vh(u,"name","minting-mode"),u.__value="sequential",u.value=u.__value,u.disabled=d=e[1]||!e[0],kh(c,"checked","sequential"===e[3]),vh(t,"class","checkbox-group"),g.p(i,u)},m(r,d){ch(r,t,d),sh(t,n),sh(n,i),i.checked=i.__value===e[3],sh(n,o),Gh(a,n,null),sh(t,l),sh(t,c),sh(c,u),u.checked=u.__value===e[3],sh(c,p),Gh(m,c,null),h=!0,v||(b=[gh(i,"change",e[6]),ah(s=g_.call(null,n,e[2]?.mintable)),gh(u,"change",e[8]),ah(f=g_.call(null,c,e[2]?.sequential))],v=!0)},p(e,t){(!h||3&t&&r!==(r=e[1]||!e[0]))&&(i.disabled=r),8&t&&(i.checked=i.__value===e[3]);const o={};1024&t&&(o.$$scope={dirty:t,ctx:e}),a.$set(o),s&&Xf(s.update)&&4&t&&s.update.call(null,e[2]?.mintable),(!h||8&t)&&kh(n,"checked","non_sequential"===e[3]),(!h||3&t&&d!==(d=e[1]||!e[0]))&&(u.disabled=d),8&t&&(u.checked=u.__value===e[3]);const l={};1024&t&&(l.$$scope={dirty:t,ctx:e}),m.$set(l),f&&Xf(f.update)&&4&t&&f.update.call(null,e[2]?.sequential),(!h||8&t)&&kh(c,"checked","sequential"===e[3])},i(e){h||(Bh(a.$$.fragment,e),Bh(m.$$.fragment,e),h=!0)},o(e){Hh(a.$$.fragment,e),Hh(m.$$.fragment,e),h=!1},d(e){e&&uh(t),Kh(a),Kh(m),g.r(),v=!1,Kf(b)}}}function R_(e){let t,n,i;function r(t){e[9](t)}let o={label:"Minting",defaultValue:"non_sequential",helpContent:"Configure minting mode for NFTs.",disabled:e[1],error:e[2]?.mintable||e[2]?.sequential,$$slots:{default:[Z_]},$$scope:{ctx:e}};return void 0!==e[3]&&(o.value=e[3]),t=new l_({props:o}),Ch.push(()=>Wh(t,"value",r)),{c(){Jh(t.$$.fragment)},m(e,n){Gh(t,e,n),i=!0},p(e,[i]){const r={};2&i&&(r.disabled=e[1]),4&i&&(r.error=e[2]?.mintable||e[2]?.sequential),1039&i&&(r.$$scope={dirty:i,ctx:e}),!n&&8&i&&(n=!0,r.value=e[3],jh(()=>n=!1)),t.$set(r)},i(e){i||(Bh(t.$$.fragment,e),i=!0)},o(e){Hh(t.$$.fragment,e),i=!1},d(e){Kh(t,e)}}}function q_(e,t,n){let{mintable:i}=t,{sequential:r}=t,{consecutive:o}=t,{errors:a}=t,s=o,l=!1;return e.$$set=e=>{"mintable"in e&&n(0,i=e.mintable),"sequential"in e&&n(4,r=e.sequential),"consecutive"in e&&n(1,o=e.consecutive),"errors"in e&&n(2,a=e.errors)},e.$$.update=()=>{if(2&e.$$.dirty&&n(5,s=o),34&e.$$.dirty&&!s&&o&&n(3,l=!1),8&e.$$.dirty)switch(l){case"sequential":n(4,r=!0),n(0,i=!0);break;case"non_sequential":n(4,r=!1),n(0,i=!0);break;case!1:n(4,r=!1),n(0,i=!1)}},[i,o,a,l,r,s,function(){l=this.__value,n(3,l),n(5,s),n(1,o)},[[]],function(){l=this.__value,n(3,l),n(5,s),n(1,o)},function(e){l=e,n(3,l),n(5,s),n(1,o)}]}class M_ extends Qh{constructor(e){super(),Yh(this,e,q_,R_,Yf,{mintable:0,sequential:4,consecutive:1,errors:2})}}function L_(e){let t,n,i;return{c(){t=mh("Sets the metadata URI that the contract returns from "),n=dh("code"),n.textContent="token_uri",i=mh(".")},m(e,r){ch(e,t,r),ch(e,n,r),ch(e,i,r)},p:Hf,d(e){e&&uh(t),e&&uh(n),e&&uh(i)}}}function F_(e){let t;return{c(){t=mh("Token holders will be able to destroy their NFTs.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function V_(e){let t;return{c(){t=mh("Adds vote checkpoints and delegation support. Incompatible with Enumerable and Consecutive.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function B_(e){let t;return{c(){t=mh("Enable on-chain enumeration of tokens. Cannot be used with Consecutive extensions.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function H_(e){let t;return{c(){t=mh("Use consecutive token IDs instead of unique UUIDs. Incompatible with Enumerable extension.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function W_(e){let t;return{c(){t=mh("Privileged accounts can pause core functionality.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function J_(e){let t;return{c(){t=mh("Allows the contract to be upgraded by the owner.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function G_(e){let t,n,i,r,o,a,s,l,c,u,d,p,m,f,h,g,v,b,y,$,_,k,w,x,I,S,E,T,z,C,O,U,N,D,A,j,P,Z,R,q,M,L,F,V,B,H,W,J,G,K,X,Y,Q,ee,te,ne,ie,re,oe,ae,se,le,ce,ue,de,pe,me,fe,he,ge,ve,be,ye,$e,_e,ke,we,xe,Ie,Se,Ee,Te;function ze(t){e[15](t)}function Ce(t){e[16](t)}$=new L$({props:{$$slots:{default:[L_]},$$scope:{ctx:e}}}),U=new L$({props:{$$slots:{default:[F_]},$$scope:{ctx:e}}}),R=new L$({props:{$$slots:{default:[V_]},$$scope:{ctx:e}}}),W=new L$({props:{$$slots:{default:[B_]},$$scope:{ctx:e}}}),te=new L$({props:{$$slots:{default:[H_]},$$scope:{ctx:e}}}),se=new L$({props:{$$slots:{default:[W_]},$$scope:{ctx:e}}}),pe=new L$({props:{$$slots:{default:[J_]},$$scope:{ctx:e}}});let Oe={consecutive:e[0].consecutive,errors:{mintable:e[1]?.mintable,sequential:e[1]?.sequential}};function Ue(t){e[17](t)}void 0!==e[0].mintable&&(Oe.mintable=e[0].mintable),void 0!==e[0].sequential&&(Oe.sequential=e[0].sequential),fe=new M_({props:Oe}),Ch.push(()=>Wh(fe,"mintable",ze)),Ch.push(()=>Wh(fe,"sequential",Ce));let Ne={required:e[2]};function De(t){e[18](t)}void 0!==e[0].access&&(Ne.access=e[0].access),be=new f_({props:Ne}),Ch.push(()=>Wh(be,"access",Ue));let Ae={};function je(t){e[19](t)}void 0!==e[0].explicitImplementations&&(Ae.explicitImplementations=e[0].explicitImplementations),_e=new S_({props:Ae}),Ch.push(()=>Wh(_e,"explicitImplementations",De));let Pe={errors:e[1]};return void 0!==e[0].info&&(Pe.info=e[0].info),xe=new $_({props:Pe}),Ch.push(()=>Wh(xe,"info",je)),{c(){t=dh("section"),n=dh("h1"),n.textContent="Settings",i=fh(),r=dh("div"),o=dh("label"),a=dh("span"),a.textContent="Name",s=fh(),l=dh("input"),u=fh(),d=dh("label"),p=dh("span"),p.textContent="Symbol",m=fh(),f=dh("input"),g=fh(),v=dh("label"),b=dh("span"),y=mh("Token URI\n "),Jh($.$$.fragment),_=fh(),k=dh("input"),x=fh(),I=dh("section"),S=dh("h1"),S.textContent="Features",E=fh(),T=dh("div"),z=dh("label"),C=dh("input"),O=mh("\n Burnable\n "),Jh(U.$$.fragment),N=fh(),D=dh("label"),A=dh("input"),Z=mh("\n Votes\n "),Jh(R.$$.fragment),M=fh(),L=dh("label"),F=dh("input"),H=mh("\n Enumerable\n "),Jh(W.$$.fragment),G=fh(),K=dh("label"),X=dh("input"),ee=mh("\n Consecutive\n "),Jh(te.$$.fragment),ie=fh(),re=dh("label"),oe=dh("input"),ae=mh("\n Pausable\n "),Jh(se.$$.fragment),le=fh(),ce=dh("label"),ue=dh("input"),de=mh("\n Upgradeable\n "),Jh(pe.$$.fragment),me=fh(),Jh(fe.$$.fragment),ve=fh(),Jh(be.$$.fragment),$e=fh(),Jh(_e.$$.fragment),we=fh(),Jh(xe.$$.fragment),vh(o,"class","labeled-input"),vh(d,"class","labeled-input"),vh(r,"class","grid grid-cols-[2fr,1fr] gap-2"),vh(b,"class","flex justify-between pr-2"),vh(k,"placeholder","https://..."),vh(v,"class","labeled-input"),vh(t,"class","controls-section"),vh(C,"type","checkbox"),kh(z,"checked",e[0].burnable),vh(A,"type","checkbox"),A.checked=j=e[0].votes,A.disabled=P=e[0].enumerable||e[0].consecutive,kh(D,"checked",e[0].votes),kh(D,"disabled",e[0].enumerable||e[0].consecutive),vh(F,"type","checkbox"),F.checked=V=e[0].enumerable,F.disabled=B=e[0].votes||e[0].consecutive,kh(L,"checked",e[0].enumerable),kh(L,"disabled",e[0].votes||e[0].consecutive),vh(X,"type","checkbox"),X.checked=Y=e[0].consecutive,X.disabled=Q=e[0].votes||e[0].enumerable,kh(K,"checked",e[0].consecutive),kh(K,"disabled",e[0].votes||e[0].enumerable),vh(oe,"type","checkbox"),kh(re,"checked",e[0].pausable),vh(ue,"type","checkbox"),kh(ce,"checked",e[0].upgradeable),vh(T,"class","checkbox-group"),vh(I,"class","controls-section")},m(j,P){ch(j,t,P),sh(t,n),sh(t,i),sh(t,r),sh(r,o),sh(o,a),sh(o,s),sh(o,l),$h(l,e[0].name),sh(r,u),sh(r,d),sh(d,p),sh(d,m),sh(d,f),$h(f,e[0].symbol),sh(t,g),sh(t,v),sh(v,b),sh(b,y),Gh($,b,null),sh(v,_),sh(v,k),$h(k,e[0].tokenUri),ch(j,x,P),ch(j,I,P),sh(I,S),sh(I,E),sh(I,T),sh(T,z),sh(z,C),C.checked=e[0].burnable,sh(z,O),Gh(U,z,null),sh(T,N),sh(T,D),sh(D,A),sh(D,Z),Gh(R,D,null),sh(T,M),sh(T,L),sh(L,F),sh(L,H),Gh(W,L,null),sh(T,G),sh(T,K),sh(K,X),sh(K,ee),Gh(te,K,null),sh(T,ie),sh(T,re),sh(re,oe),oe.checked=e[0].pausable,sh(re,ae),Gh(se,re,null),sh(T,le),sh(T,ce),sh(ce,ue),ue.checked=e[0].upgradeable,sh(ce,de),Gh(pe,ce,null),ch(j,me,P),Gh(fe,j,P),ch(j,ve,P),Gh(be,j,P),ch(j,$e,P),Gh(_e,j,P),ch(j,we,P),Gh(xe,j,P),Se=!0,Ee||(Te=[gh(l,"input",e[6]),ah(c=g_.call(null,l,e[1]?.name)),gh(f,"input",e[7]),ah(h=g_.call(null,f,e[1]?.symbol)),gh(k,"input",e[8]),ah(w=g_.call(null,k,e[1]?.tokenUri)),gh(C,"change",e[9]),gh(A,"change",e[10]),ah(q=g_.call(null,D,e[1]?.votes)),gh(F,"change",e[11]),ah(J=g_.call(null,L,e[1]?.enumerable)),gh(X,"change",e[12]),ah(ne=g_.call(null,K,e[1]?.consecutive)),gh(oe,"change",e[13]),gh(ue,"change",e[14])],Ee=!0)},p(e,[t]){1&t&&l.value!==e[0].name&&$h(l,e[0].name),c&&Xf(c.update)&&2&t&&c.update.call(null,e[1]?.name),1&t&&f.value!==e[0].symbol&&$h(f,e[0].symbol),h&&Xf(h.update)&&2&t&&h.update.call(null,e[1]?.symbol);const n={};1048576&t&&(n.$$scope={dirty:t,ctx:e}),$.$set(n),1&t&&k.value!==e[0].tokenUri&&$h(k,e[0].tokenUri),w&&Xf(w.update)&&2&t&&w.update.call(null,e[1]?.tokenUri),1&t&&(C.checked=e[0].burnable);const i={};1048576&t&&(i.$$scope={dirty:t,ctx:e}),U.$set(i),(!Se||1&t)&&kh(z,"checked",e[0].burnable),(!Se||1&t&&j!==(j=e[0].votes))&&(A.checked=j),(!Se||1&t&&P!==(P=e[0].enumerable||e[0].consecutive))&&(A.disabled=P);const r={};1048576&t&&(r.$$scope={dirty:t,ctx:e}),R.$set(r),q&&Xf(q.update)&&2&t&&q.update.call(null,e[1]?.votes),(!Se||1&t)&&kh(D,"checked",e[0].votes),(!Se||1&t)&&kh(D,"disabled",e[0].enumerable||e[0].consecutive),(!Se||1&t&&V!==(V=e[0].enumerable))&&(F.checked=V),(!Se||1&t&&B!==(B=e[0].votes||e[0].consecutive))&&(F.disabled=B);const o={};1048576&t&&(o.$$scope={dirty:t,ctx:e}),W.$set(o),J&&Xf(J.update)&&2&t&&J.update.call(null,e[1]?.enumerable),(!Se||1&t)&&kh(L,"checked",e[0].enumerable),(!Se||1&t)&&kh(L,"disabled",e[0].votes||e[0].consecutive),(!Se||1&t&&Y!==(Y=e[0].consecutive))&&(X.checked=Y),(!Se||1&t&&Q!==(Q=e[0].votes||e[0].enumerable))&&(X.disabled=Q);const a={};1048576&t&&(a.$$scope={dirty:t,ctx:e}),te.$set(a),ne&&Xf(ne.update)&&2&t&&ne.update.call(null,e[1]?.consecutive),(!Se||1&t)&&kh(K,"checked",e[0].consecutive),(!Se||1&t)&&kh(K,"disabled",e[0].votes||e[0].enumerable),1&t&&(oe.checked=e[0].pausable);const s={};1048576&t&&(s.$$scope={dirty:t,ctx:e}),se.$set(s),(!Se||1&t)&&kh(re,"checked",e[0].pausable),1&t&&(ue.checked=e[0].upgradeable);const u={};1048576&t&&(u.$$scope={dirty:t,ctx:e}),pe.$set(u),(!Se||1&t)&&kh(ce,"checked",e[0].upgradeable);const d={};1&t&&(d.consecutive=e[0].consecutive),2&t&&(d.errors={mintable:e[1]?.mintable,sequential:e[1]?.sequential}),!he&&1&t&&(he=!0,d.mintable=e[0].mintable,jh(()=>he=!1)),!ge&&1&t&&(ge=!0,d.sequential=e[0].sequential,jh(()=>ge=!1)),fe.$set(d);const p={};4&t&&(p.required=e[2]),!ye&&1&t&&(ye=!0,p.access=e[0].access,jh(()=>ye=!1)),be.$set(p);const m={};!ke&&1&t&&(ke=!0,m.explicitImplementations=e[0].explicitImplementations,jh(()=>ke=!1)),_e.$set(m);const g={};2&t&&(g.errors=e[1]),!Ie&&1&t&&(Ie=!0,g.info=e[0].info,jh(()=>Ie=!1)),xe.$set(g)},i(e){Se||(Bh($.$$.fragment,e),Bh(U.$$.fragment,e),Bh(R.$$.fragment,e),Bh(W.$$.fragment,e),Bh(te.$$.fragment,e),Bh(se.$$.fragment,e),Bh(pe.$$.fragment,e),Bh(fe.$$.fragment,e),Bh(be.$$.fragment,e),Bh(_e.$$.fragment,e),Bh(xe.$$.fragment,e),Se=!0)},o(e){Hh($.$$.fragment,e),Hh(U.$$.fragment,e),Hh(R.$$.fragment,e),Hh(W.$$.fragment,e),Hh(te.$$.fragment,e),Hh(se.$$.fragment,e),Hh(pe.$$.fragment,e),Hh(fe.$$.fragment,e),Hh(be.$$.fragment,e),Hh(_e.$$.fragment,e),Hh(xe.$$.fragment,e),Se=!1},d(e){e&&uh(t),Kh($),e&&uh(x),e&&uh(I),Kh(U),Kh(R),Kh(W),Kh(te),Kh(se),Kh(pe),e&&uh(me),Kh(fe,e),e&&uh(ve),Kh(be,e),e&&uh($e),Kh(_e,e),e&&uh(we),Kh(xe,e),Ee=!1,Kf(Te)}}}function K_(e,t,n){let i,{opts:r={kind:"NonFungible",...yb.defaults,info:{...Mg}}}=t,{errors:o}=t;function a(e){e&&(n(0,r.mintable=!1,r),n(0,r.enumerable=!1,r),n(0,r.votes=!1,r)),n(0,r.consecutive=e,r)}function s(e){e&&(n(0,r.enumerable=!1,r),n(0,r.consecutive=!1,r)),n(0,r.votes=e,r)}function l(e){e&&(n(0,r.consecutive=!1,r),n(0,r.votes=!1,r)),n(0,r.enumerable=e,r)}return e.$$set=e=>{"opts"in e&&n(0,r=e.opts),"errors"in e&&n(1,o=e.errors)},e.$$.update=()=>{1&e.$$.dirty&&n(2,i=yb.isAccessControlRequired(r))},[r,o,i,a,s,l,function(){r.name=this.value,n(0,r)},function(){r.symbol=this.value,n(0,r)},function(){r.tokenUri=this.value,n(0,r)},function(){r.burnable=this.checked,n(0,r)},e=>s(e.currentTarget.checked),e=>l(e.currentTarget.checked),e=>a(e.currentTarget.checked),function(){r.pausable=this.checked,n(0,r)},function(){r.upgradeable=this.checked,n(0,r)},function(t){e.$$.not_equal(r.mintable,t)&&(r.mintable=t,n(0,r))},function(t){e.$$.not_equal(r.sequential,t)&&(r.sequential=t,n(0,r))},function(t){e.$$.not_equal(r.access,t)&&(r.access=t,n(0,r))},function(t){e.$$.not_equal(r.explicitImplementations,t)&&(r.explicitImplementations=t,n(0,r))},function(t){e.$$.not_equal(r.info,t)&&(r.info=t,n(0,r))}]}function X_(e){let t;return{c(){t=mh("The number of decimals used to represent token amounts. Defaults to 7.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function Y_(e){let t;return{c(){t=mh("Create an initial amount of tokens for the owner.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function Q_(e){let t;return{c(){t=mh("Privileged accounts will be able to create more supply.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function ek(e){let t;return{c(){t=mh("Token holders will be able to destroy their tokens.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function tk(e){let t;return{c(){t=mh("Adds vote checkpoints and delegation support. Incompatible with stablecoin limitations.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function nk(e){let t,n,i;return{c(){t=mh("Privileged accounts will be able to pause the functionality marked with "),n=dh("code"),n.textContent="when_not_paused",i=mh(". Useful for\n emergency response.")},m(e,r){ch(e,t,r),ch(e,n,r),ch(e,i,r)},p:Hf,d(e){e&&uh(t),e&&uh(n),e&&uh(i)}}}function ik(e){let t;return{c(){t=mh("Allows the contract to be upgraded by the owner.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function rk(e){let t;return{c(){t=mh("Allows a list of addresses to transfer tokens.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function ok(e){let t;return{c(){t=mh("Blocks a list of addresses from transferring tokens.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function ak(e){let t,n,i,r,o,a,s,l,c,u,d,p,m,f;return o=new L$({props:{$$slots:{default:[rk]},$$scope:{ctx:e}}}),u=new L$({props:{$$slots:{default:[ok]},$$scope:{ctx:e}}}),p=bh(e[13][0]),{c(){t=dh("div"),n=dh("label"),i=dh("input"),r=mh("\n Allowlist\n "),Jh(o.$$.fragment),a=fh(),s=dh("label"),l=dh("input"),c=mh("\n Blocklist\n "),Jh(u.$$.fragment),vh(i,"type","radio"),i.__value="allowlist",i.value=i.__value,kh(n,"checked","allowlist"===e[0].limitations),vh(l,"type","radio"),l.__value="blocklist",l.value=l.__value,kh(s,"checked","blocklist"===e[0].limitations),vh(t,"class","checkbox-group"),p.p(i,l)},m(p,h){ch(p,t,h),sh(t,n),sh(n,i),i.checked=i.__value===e[0].limitations,sh(n,r),Gh(o,n,null),sh(t,a),sh(t,s),sh(s,l),l.checked=l.__value===e[0].limitations,sh(s,c),Gh(u,s,null),d=!0,m||(f=[gh(i,"change",e[12]),gh(l,"change",e[14])],m=!0)},p(e,t){1&t&&(i.checked=i.__value===e[0].limitations);const r={};524288&t&&(r.$$scope={dirty:t,ctx:e}),o.$set(r),(!d||1&t)&&kh(n,"checked","allowlist"===e[0].limitations),1&t&&(l.checked=l.__value===e[0].limitations);const a={};524288&t&&(a.$$scope={dirty:t,ctx:e}),u.$set(a),(!d||1&t)&&kh(s,"checked","blocklist"===e[0].limitations)},i(e){d||(Bh(o.$$.fragment,e),Bh(u.$$.fragment,e),d=!0)},o(e){Hh(o.$$.fragment,e),Hh(u.$$.fragment,e),d=!1},d(e){e&&uh(t),Kh(o),Kh(u),p.r(),m=!1,Kf(f)}}}function sk(e){let t,n,i,r,o,a,s,l,c,u,d,p,m,f,h,g,v,b,y,$,_,k,w,x,I,S,E,T,z,C,O,U,N,D,A,j,P,Z,R,q,M,L,F,V,B,H,W,J,G,K,X,Y,Q,ee,te,ne,ie,re,oe,ae,se,le,ce,ue,de,pe,me,fe,he,ge,ve,be,ye,$e,_e,ke;function we(t){e[15](t)}$=new L$({props:{$$slots:{default:[X_]},$$scope:{ctx:e}}}),T=new L$({props:{$$slots:{default:[Y_]},$$scope:{ctx:e}}}),q=new L$({props:{$$slots:{default:[Q_]},$$scope:{ctx:e}}}),B=new L$({props:{$$slots:{default:[ek]},$$scope:{ctx:e}}}),K=new L$({props:{$$slots:{default:[tk]},$$scope:{ctx:e}}}),ne=new L$({props:{$$slots:{default:[nk]},$$scope:{ctx:e}}}),se=new L$({props:{$$slots:{default:[ik]},$$scope:{ctx:e}}});let xe={label:"Limitations",defaultValue:"allowlist",helpContent:"Restricts certain users from transferring tokens, either via allowing or blocking them.",$$slots:{default:[ak]},$$scope:{ctx:e}};function Ie(t){e[16](t)}void 0!==e[0].limitations&&(xe.value=e[0].limitations),ce=new l_({props:xe}),Ch.push(()=>Wh(ce,"value",we));let Se={required:e[2]};function Ee(t){e[17](t)}void 0!==e[0].access&&(Se.access=e[0].access),pe=new f_({props:Se}),Ch.push(()=>Wh(pe,"access",Ie));let Te={};function ze(t){e[18](t)}void 0!==e[0].explicitImplementations&&(Te.explicitImplementations=e[0].explicitImplementations),he=new S_({props:Te}),Ch.push(()=>Wh(he,"explicitImplementations",Ee));let Ce={errors:e[1]};return void 0!==e[0].info&&(Ce.info=e[0].info),be=new $_({props:Ce}),Ch.push(()=>Wh(be,"info",ze)),{c(){t=dh("section"),n=dh("h1"),n.textContent="Settings",i=fh(),r=dh("div"),o=dh("label"),a=dh("span"),a.textContent="Name",s=fh(),l=dh("input"),u=fh(),d=dh("label"),p=dh("span"),p.textContent="Symbol",m=fh(),f=dh("input"),g=fh(),v=dh("label"),b=dh("span"),y=mh("Decimals\n "),Jh($.$$.fragment),_=fh(),k=dh("input"),x=fh(),I=dh("label"),S=dh("span"),E=mh("Premint\n "),Jh(T.$$.fragment),z=fh(),C=dh("input"),U=fh(),N=dh("section"),D=dh("h1"),D.textContent="Features",A=fh(),j=dh("div"),P=dh("label"),Z=dh("input"),R=mh("\n Mintable\n "),Jh(q.$$.fragment),M=fh(),L=dh("label"),F=dh("input"),V=mh("\n Burnable\n "),Jh(B.$$.fragment),H=fh(),W=dh("label"),J=dh("input"),G=mh("\n Votes\n "),Jh(K.$$.fragment),Y=fh(),Q=dh("label"),ee=dh("input"),te=mh("\n Pausable\n "),Jh(ne.$$.fragment),ie=fh(),re=dh("label"),oe=dh("input"),ae=mh("\n Upgradeable\n "),Jh(se.$$.fragment),le=fh(),Jh(ce.$$.fragment),de=fh(),Jh(pe.$$.fragment),fe=fh(),Jh(he.$$.fragment),ve=fh(),Jh(be.$$.fragment),vh(o,"class","labeled-input"),vh(d,"class","labeled-input"),vh(r,"class","grid grid-cols-[2fr,1fr] gap-2"),vh(b,"class","flex justify-between pr-2"),vh(v,"class","labeled-input"),vh(S,"class","flex justify-between pr-2"),vh(C,"placeholder","0"),vh(C,"pattern",Fv.source),vh(I,"class","labeled-input"),vh(t,"class","controls-section"),vh(Z,"type","checkbox"),kh(P,"checked",e[0].mintable),vh(F,"type","checkbox"),kh(L,"checked",e[0].burnable),vh(J,"type","checkbox"),kh(W,"checked",e[0].votes),vh(ee,"type","checkbox"),kh(Q,"checked",e[0].pausable),vh(oe,"type","checkbox"),kh(re,"checked",e[0].upgradeable),vh(j,"class","checkbox-group"),vh(N,"class","controls-section")},m(ue,me){ch(ue,t,me),sh(t,n),sh(t,i),sh(t,r),sh(r,o),sh(o,a),sh(o,s),sh(o,l),$h(l,e[0].name),sh(r,u),sh(r,d),sh(d,p),sh(d,m),sh(d,f),$h(f,e[0].symbol),sh(t,g),sh(t,v),sh(v,b),sh(b,y),Gh($,b,null),sh(v,_),sh(v,k),$h(k,e[0].decimals),sh(t,x),sh(t,I),sh(I,S),sh(S,E),Gh(T,S,null),sh(I,z),sh(I,C),$h(C,e[0].premint),ch(ue,U,me),ch(ue,N,me),sh(N,D),sh(N,A),sh(N,j),sh(j,P),sh(P,Z),Z.checked=e[0].mintable,sh(P,R),Gh(q,P,null),sh(j,M),sh(j,L),sh(L,F),F.checked=e[0].burnable,sh(L,V),Gh(B,L,null),sh(j,H),sh(j,W),sh(W,J),J.checked=e[0].votes,sh(W,G),Gh(K,W,null),sh(j,Y),sh(j,Q),sh(Q,ee),ee.checked=e[0].pausable,sh(Q,te),Gh(ne,Q,null),sh(j,ie),sh(j,re),sh(re,oe),oe.checked=e[0].upgradeable,sh(re,ae),Gh(se,re,null),ch(ue,le,me),Gh(ce,ue,me),ch(ue,de,me),Gh(pe,ue,me),ch(ue,fe,me),Gh(he,ue,me),ch(ue,ve,me),Gh(be,ue,me),$e=!0,_e||(ke=[gh(l,"input",e[3]),ah(c=g_.call(null,l,e[1]?.name)),gh(f,"input",e[4]),ah(h=g_.call(null,f,e[1]?.symbol)),gh(k,"input",e[5]),ah(w=g_.call(null,k,e[1]?.decimals)),gh(C,"input",e[6]),ah(O=g_.call(null,C,e[1]?.premint)),gh(Z,"change",e[7]),gh(F,"change",e[8]),gh(J,"change",e[9]),ah(X=g_.call(null,W,e[1]?.votes)),gh(ee,"change",e[10]),gh(oe,"change",e[11])],_e=!0)},p(e,[t]){1&t&&l.value!==e[0].name&&$h(l,e[0].name),c&&Xf(c.update)&&2&t&&c.update.call(null,e[1]?.name),1&t&&f.value!==e[0].symbol&&$h(f,e[0].symbol),h&&Xf(h.update)&&2&t&&h.update.call(null,e[1]?.symbol);const n={};524288&t&&(n.$$scope={dirty:t,ctx:e}),$.$set(n),1&t&&k.value!==e[0].decimals&&$h(k,e[0].decimals),w&&Xf(w.update)&&2&t&&w.update.call(null,e[1]?.decimals);const i={};524288&t&&(i.$$scope={dirty:t,ctx:e}),T.$set(i),1&t&&C.value!==e[0].premint&&$h(C,e[0].premint),O&&Xf(O.update)&&2&t&&O.update.call(null,e[1]?.premint),1&t&&(Z.checked=e[0].mintable);const r={};524288&t&&(r.$$scope={dirty:t,ctx:e}),q.$set(r),(!$e||1&t)&&kh(P,"checked",e[0].mintable),1&t&&(F.checked=e[0].burnable);const o={};524288&t&&(o.$$scope={dirty:t,ctx:e}),B.$set(o),(!$e||1&t)&&kh(L,"checked",e[0].burnable),1&t&&(J.checked=e[0].votes);const a={};524288&t&&(a.$$scope={dirty:t,ctx:e}),K.$set(a),X&&Xf(X.update)&&2&t&&X.update.call(null,e[1]?.votes),(!$e||1&t)&&kh(W,"checked",e[0].votes),1&t&&(ee.checked=e[0].pausable);const s={};524288&t&&(s.$$scope={dirty:t,ctx:e}),ne.$set(s),(!$e||1&t)&&kh(Q,"checked",e[0].pausable),1&t&&(oe.checked=e[0].upgradeable);const u={};524288&t&&(u.$$scope={dirty:t,ctx:e}),se.$set(u),(!$e||1&t)&&kh(re,"checked",e[0].upgradeable);const d={};524289&t&&(d.$$scope={dirty:t,ctx:e}),!ue&&1&t&&(ue=!0,d.value=e[0].limitations,jh(()=>ue=!1)),ce.$set(d);const p={};4&t&&(p.required=e[2]),!me&&1&t&&(me=!0,p.access=e[0].access,jh(()=>me=!1)),pe.$set(p);const m={};!ge&&1&t&&(ge=!0,m.explicitImplementations=e[0].explicitImplementations,jh(()=>ge=!1)),he.$set(m);const g={};2&t&&(g.errors=e[1]),!ye&&1&t&&(ye=!0,g.info=e[0].info,jh(()=>ye=!1)),be.$set(g)},i(e){$e||(Bh($.$$.fragment,e),Bh(T.$$.fragment,e),Bh(q.$$.fragment,e),Bh(B.$$.fragment,e),Bh(K.$$.fragment,e),Bh(ne.$$.fragment,e),Bh(se.$$.fragment,e),Bh(ce.$$.fragment,e),Bh(pe.$$.fragment,e),Bh(he.$$.fragment,e),Bh(be.$$.fragment,e),$e=!0)},o(e){Hh($.$$.fragment,e),Hh(T.$$.fragment,e),Hh(q.$$.fragment,e),Hh(B.$$.fragment,e),Hh(K.$$.fragment,e),Hh(ne.$$.fragment,e),Hh(se.$$.fragment,e),Hh(ce.$$.fragment,e),Hh(pe.$$.fragment,e),Hh(he.$$.fragment,e),Hh(be.$$.fragment,e),$e=!1},d(e){e&&uh(t),Kh($),Kh(T),e&&uh(U),e&&uh(N),Kh(q),Kh(B),Kh(K),Kh(ne),Kh(se),e&&uh(le),Kh(ce,e),e&&uh(de),Kh(pe,e),e&&uh(fe),Kh(he,e),e&&uh(ve),Kh(be,e),_e=!1,Kf(ke)}}}function lk(e,t,n){let i,{opts:r={kind:"Stablecoin",...$b.defaults,premint:"",info:{...Mg}}}=t,{errors:o}=t;return e.$$set=e=>{"opts"in e&&n(0,r=e.opts),"errors"in e&&n(1,o=e.errors)},e.$$.update=()=>{1&e.$$.dirty&&n(2,i=$b.isAccessControlRequired(r))},[r,o,i,function(){r.name=this.value,n(0,r)},function(){r.symbol=this.value,n(0,r)},function(){r.decimals=this.value,n(0,r)},function(){r.premint=this.value,n(0,r)},function(){r.mintable=this.checked,n(0,r)},function(){r.burnable=this.checked,n(0,r)},function(){r.votes=this.checked,n(0,r)},function(){r.pausable=this.checked,n(0,r)},function(){r.upgradeable=this.checked,n(0,r)},function(){r.limitations=this.__value,n(0,r)},[[]],function(){r.limitations=this.__value,n(0,r)},function(t){e.$$.not_equal(r.limitations,t)&&(r.limitations=t,n(0,r))},function(t){e.$$.not_equal(r.access,t)&&(r.access=t,n(0,r))},function(t){e.$$.not_equal(r.explicitImplementations,t)&&(r.explicitImplementations=t,n(0,r))},function(t){e.$$.not_equal(r.info,t)&&(r.info=t,n(0,r))}]}function ck(e){let t,n,i;return{c(){t=mh("Semantic version label exposed by the governor's "),n=dh("code"),n.textContent="version()",i=mh(" function. It is informational; has no\n effect on contract behavior.")},m(e,r){ch(e,t,r),ch(e,n,r),ch(e,i,r)},p:Hf,d(e){e&&uh(t),e&&uh(n),e&&uh(i)}}}function uk(e){let t;return{c(){t=mh("Number of ledgers before voting starts after a proposal is created (17,000 ledgers are approx. 1 day).")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function dk(e){let t;return{c(){t=mh("Number of ledgers voting remains open (120,000 ledgers are approx. 1 week).")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function pk(e){let t;return{c(){t=mh("Minimum voting power required to create proposals.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function mk(e){let t;return{c(){t=mh("Minimum number of votes required for a proposal to pass.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function fk(e){let t;return{c(){t=mh("Adds a timelock mechanism that enforces a delay between proposal queuing and execution.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function hk(e){let t;return{c(){t=mh("Allows the contract to be upgraded by the configured authority (owner or accounts with the upgrader role).")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function gk(e){let t,n,i,r,o,a,s,l,c,u,d,p,m,f,h,g,v,b,y,$,_,k,w,x,I,S,E,T,z,C,O,U,N,D,A,j,P,Z,R,q,M,L,F,V,B,H,W,J,G,K,X,Y,Q,ee,te,ne,ie,re,oe,ae,se,le,ce,ue,de,pe,me,fe,he,ge,ve,be,ye,$e,_e,ke,we,xe;function Ie(t){e[11](t)}f=new L$({props:{$$slots:{default:[ck]},$$scope:{ctx:e}}}),I=new L$({props:{$$slots:{default:[uk]},$$scope:{ctx:e}}}),N=new L$({props:{$$slots:{default:[dk]},$$scope:{ctx:e}}}),M=new L$({props:{$$slots:{default:[pk]},$$scope:{ctx:e}}}),G=new L$({props:{$$slots:{default:[mk]},$$scope:{ctx:e}}}),se=new L$({props:{$$slots:{default:[fk]},$$scope:{ctx:e}}}),pe=new L$({props:{$$slots:{default:[hk]},$$scope:{ctx:e}}});let Se={required:e[2]};function Ee(t){e[12](t)}void 0!==e[0].access&&(Se.access=e[0].access),fe=new f_({props:Se}),Ch.push(()=>Wh(fe,"access",Ie));let Te={};function ze(t){e[13](t)}void 0!==e[0].explicitImplementations&&(Te.explicitImplementations=e[0].explicitImplementations),ve=new S_({props:Te}),Ch.push(()=>Wh(ve,"explicitImplementations",Ee));let Ce={errors:e[1]};return void 0!==e[0].info&&(Ce.info=e[0].info),$e=new $_({props:Ce}),Ch.push(()=>Wh($e,"info",ze)),{c(){t=dh("section"),n=dh("h1"),n.textContent="Settings",i=fh(),r=dh("div"),o=dh("label"),a=dh("span"),a.textContent="Name",s=fh(),l=dh("input"),u=fh(),d=dh("label"),p=dh("span"),m=mh("Version\n "),Jh(f.$$.fragment),h=fh(),g=dh("input"),b=fh(),y=dh("section"),$=dh("h1"),$.textContent="Governance Parameters",_=fh(),k=dh("label"),w=dh("span"),x=mh("Voting Delay\n "),Jh(I.$$.fragment),S=fh(),E=dh("input"),z=fh(),C=dh("label"),O=dh("span"),U=mh("Voting Period\n "),Jh(N.$$.fragment),D=fh(),A=dh("input"),P=fh(),Z=dh("label"),R=dh("span"),q=mh("Proposal Threshold\n "),Jh(M.$$.fragment),L=fh(),F=dh("input"),B=fh(),H=dh("label"),W=dh("span"),J=mh("Quorum\n "),Jh(G.$$.fragment),K=fh(),X=dh("input"),Q=fh(),ee=dh("section"),te=dh("h1"),te.textContent="Features",ne=fh(),ie=dh("div"),re=dh("label"),oe=dh("input"),ae=mh("\n Timelock\n "),Jh(se.$$.fragment),le=fh(),ce=dh("label"),ue=dh("input"),de=mh("\n Upgradeable\n "),Jh(pe.$$.fragment),me=fh(),Jh(fe.$$.fragment),ge=fh(),Jh(ve.$$.fragment),ye=fh(),Jh($e.$$.fragment),vh(o,"class","labeled-input"),vh(p,"class","flex justify-between pr-2"),vh(d,"class","labeled-input"),vh(r,"class","grid grid-cols-[2fr,1fr] gap-2"),vh(t,"class","controls-section"),vh(w,"class","flex justify-between pr-2"),vh(k,"class","labeled-input"),vh(O,"class","flex justify-between pr-2"),vh(C,"class","labeled-input"),vh(R,"class","flex justify-between pr-2"),vh(Z,"class","labeled-input"),vh(W,"class","flex justify-between pr-2"),vh(H,"class","labeled-input"),vh(y,"class","controls-section"),vh(oe,"type","checkbox"),kh(re,"checked",e[0].timelock),vh(ue,"type","checkbox"),kh(ce,"checked",e[0].upgradeable),vh(ie,"class","checkbox-group"),vh(ee,"class","controls-section")},m(he,be){ch(he,t,be),sh(t,n),sh(t,i),sh(t,r),sh(r,o),sh(o,a),sh(o,s),sh(o,l),$h(l,e[0].name),sh(r,u),sh(r,d),sh(d,p),sh(p,m),Gh(f,p,null),sh(d,h),sh(d,g),$h(g,e[0].version),ch(he,b,be),ch(he,y,be),sh(y,$),sh(y,_),sh(y,k),sh(k,w),sh(w,x),Gh(I,w,null),sh(k,S),sh(k,E),$h(E,e[0].votingDelay),sh(y,z),sh(y,C),sh(C,O),sh(O,U),Gh(N,O,null),sh(C,D),sh(C,A),$h(A,e[0].votingPeriod),sh(y,P),sh(y,Z),sh(Z,R),sh(R,q),Gh(M,R,null),sh(Z,L),sh(Z,F),$h(F,e[0].proposalThreshold),sh(y,B),sh(y,H),sh(H,W),sh(W,J),Gh(G,W,null),sh(H,K),sh(H,X),$h(X,e[0].quorum),ch(he,Q,be),ch(he,ee,be),sh(ee,te),sh(ee,ne),sh(ee,ie),sh(ie,re),sh(re,oe),oe.checked=e[0].timelock,sh(re,ae),Gh(se,re,null),sh(ie,le),sh(ie,ce),sh(ce,ue),ue.checked=e[0].upgradeable,sh(ce,de),Gh(pe,ce,null),ch(he,me,be),Gh(fe,he,be),ch(he,ge,be),Gh(ve,he,be),ch(he,ye,be),Gh($e,he,be),ke=!0,we||(xe=[gh(l,"input",e[3]),ah(c=g_.call(null,l,e[1]?.name)),gh(g,"input",e[4]),ah(v=g_.call(null,g,e[1]?.version)),gh(E,"input",e[5]),ah(T=g_.call(null,E,e[1]?.votingDelay)),gh(A,"input",e[6]),ah(j=g_.call(null,A,e[1]?.votingPeriod)),gh(F,"input",e[7]),ah(V=g_.call(null,F,e[1]?.proposalThreshold)),gh(X,"input",e[8]),ah(Y=g_.call(null,X,e[1]?.quorum)),gh(oe,"change",e[9]),gh(ue,"change",e[10])],we=!0)},p(e,[t]){1&t&&l.value!==e[0].name&&$h(l,e[0].name),c&&Xf(c.update)&&2&t&&c.update.call(null,e[1]?.name);const n={};16384&t&&(n.$$scope={dirty:t,ctx:e}),f.$set(n),1&t&&g.value!==e[0].version&&$h(g,e[0].version),v&&Xf(v.update)&&2&t&&v.update.call(null,e[1]?.version);const i={};16384&t&&(i.$$scope={dirty:t,ctx:e}),I.$set(i),1&t&&E.value!==e[0].votingDelay&&$h(E,e[0].votingDelay),T&&Xf(T.update)&&2&t&&T.update.call(null,e[1]?.votingDelay);const r={};16384&t&&(r.$$scope={dirty:t,ctx:e}),N.$set(r),1&t&&A.value!==e[0].votingPeriod&&$h(A,e[0].votingPeriod),j&&Xf(j.update)&&2&t&&j.update.call(null,e[1]?.votingPeriod);const o={};16384&t&&(o.$$scope={dirty:t,ctx:e}),M.$set(o),1&t&&F.value!==e[0].proposalThreshold&&$h(F,e[0].proposalThreshold),V&&Xf(V.update)&&2&t&&V.update.call(null,e[1]?.proposalThreshold);const a={};16384&t&&(a.$$scope={dirty:t,ctx:e}),G.$set(a),1&t&&X.value!==e[0].quorum&&$h(X,e[0].quorum),Y&&Xf(Y.update)&&2&t&&Y.update.call(null,e[1]?.quorum),1&t&&(oe.checked=e[0].timelock);const s={};16384&t&&(s.$$scope={dirty:t,ctx:e}),se.$set(s),(!ke||1&t)&&kh(re,"checked",e[0].timelock),1&t&&(ue.checked=e[0].upgradeable);const u={};16384&t&&(u.$$scope={dirty:t,ctx:e}),pe.$set(u),(!ke||1&t)&&kh(ce,"checked",e[0].upgradeable);const d={};4&t&&(d.required=e[2]),!he&&1&t&&(he=!0,d.access=e[0].access,jh(()=>he=!1)),fe.$set(d);const p={};!be&&1&t&&(be=!0,p.explicitImplementations=e[0].explicitImplementations,jh(()=>be=!1)),ve.$set(p);const m={};2&t&&(m.errors=e[1]),!_e&&1&t&&(_e=!0,m.info=e[0].info,jh(()=>_e=!1)),$e.$set(m)},i(e){ke||(Bh(f.$$.fragment,e),Bh(I.$$.fragment,e),Bh(N.$$.fragment,e),Bh(M.$$.fragment,e),Bh(G.$$.fragment,e),Bh(se.$$.fragment,e),Bh(pe.$$.fragment,e),Bh(fe.$$.fragment,e),Bh(ve.$$.fragment,e),Bh($e.$$.fragment,e),ke=!0)},o(e){Hh(f.$$.fragment,e),Hh(I.$$.fragment,e),Hh(N.$$.fragment,e),Hh(M.$$.fragment,e),Hh(G.$$.fragment,e),Hh(se.$$.fragment,e),Hh(pe.$$.fragment,e),Hh(fe.$$.fragment,e),Hh(ve.$$.fragment,e),Hh($e.$$.fragment,e),ke=!1},d(e){e&&uh(t),Kh(f),e&&uh(b),e&&uh(y),Kh(I),Kh(N),Kh(M),Kh(G),e&&uh(Q),e&&uh(ee),Kh(se),Kh(pe),e&&uh(me),Kh(fe,e),e&&uh(ge),Kh(ve,e),e&&uh(ye),Kh($e,e),we=!1,Kf(xe)}}}function vk(e,t,n){let i,{opts:r={kind:"Governor",...bb.defaults,info:{...Mg}}}=t,{errors:o}=t;return e.$$set=e=>{"opts"in e&&n(0,r=e.opts),"errors"in e&&n(1,o=e.errors)},e.$$.update=()=>{1&e.$$.dirty&&n(2,i=bb.isAccessControlRequired(r))},[r,o,i,function(){r.name=this.value,n(0,r)},function(){r.version=this.value,n(0,r)},function(){r.votingDelay=this.value,n(0,r)},function(){r.votingPeriod=this.value,n(0,r)},function(){r.proposalThreshold=this.value,n(0,r)},function(){r.quorum=this.value,n(0,r)},function(){r.timelock=this.checked,n(0,r)},function(){r.upgradeable=this.checked,n(0,r)},function(t){e.$$.not_equal(r.access,t)&&(r.access=t,n(0,r))},function(t){e.$$.not_equal(r.explicitImplementations,t)&&(r.explicitImplementations=t,n(0,r))},function(t){e.$$.not_equal(r.info,t)&&(r.info=t,n(0,r))}]}function bk(e){let t;return{c(){t=mh("Virtual offset added to the underlying asset's decimals to derive the vault share decimals, mitigating inflation\n (donation) attacks. The default of 0 is already safe (it makes such attacks non-profitable); higher values add\n more margin, at the cost of virtual shares absorbing a tiny part of the vault's accrued value. Must be between 0\n and 10.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function yk(e){let t,n,i;return{c(){t=mh("Privileged accounts will be able to pause the functionality marked with "),n=dh("code"),n.textContent="when_not_paused",i=mh(". Useful for\n emergency response.")},m(e,r){ch(e,t,r),ch(e,n,r),ch(e,i,r)},p:Hf,d(e){e&&uh(t),e&&uh(n),e&&uh(i)}}}function $k(e){let t;return{c(){t=mh("Allows the contract to be upgraded by the owner.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function _k(e){let t,n,i,r,o,a,s,l,c,u,d,p,m,f,h,g,v,b,y,$,_,k,w,x,I,S,E,T,z,C,O,U,N,D,A,j,P,Z,R,q,M,L,F,V,B,H,W,J,G;function K(t){e[8](t)}$=new L$({props:{$$slots:{default:[bk]},$$scope:{ctx:e}}}),U=new L$({props:{$$slots:{default:[yk]},$$scope:{ctx:e}}}),P=new L$({props:{$$slots:{default:[$k]},$$scope:{ctx:e}}});let X={required:e[2]};function Y(t){e[9](t)}void 0!==e[0].access&&(X.access=e[0].access),R=new f_({props:X}),Ch.push(()=>Wh(R,"access",K));let Q={};function ee(t){e[10](t)}void 0!==e[0].explicitImplementations&&(Q.explicitImplementations=e[0].explicitImplementations),L=new S_({props:Q}),Ch.push(()=>Wh(L,"explicitImplementations",Y));let te={errors:e[1]};return void 0!==e[0].info&&(te.info=e[0].info),B=new $_({props:te}),Ch.push(()=>Wh(B,"info",ee)),{c(){t=dh("section"),n=dh("h1"),n.textContent="Settings",i=fh(),r=dh("div"),o=dh("label"),a=dh("span"),a.textContent="Name",s=fh(),l=dh("input"),u=fh(),d=dh("label"),p=dh("span"),p.textContent="Symbol",m=fh(),f=dh("input"),g=fh(),v=dh("label"),b=dh("span"),y=mh("Decimals offset\n "),Jh($.$$.fragment),_=fh(),k=dh("input"),x=fh(),I=dh("section"),S=dh("h1"),S.textContent="Features",E=fh(),T=dh("div"),z=dh("label"),C=dh("input"),O=mh("\n Pausable\n "),Jh(U.$$.fragment),N=fh(),D=dh("label"),A=dh("input"),j=mh("\n Upgradeable\n "),Jh(P.$$.fragment),Z=fh(),Jh(R.$$.fragment),M=fh(),Jh(L.$$.fragment),V=fh(),Jh(B.$$.fragment),vh(o,"class","labeled-input"),vh(d,"class","labeled-input"),vh(r,"class","grid grid-cols-[2fr,1fr] gap-2"),vh(b,"class","flex justify-between pr-2"),vh(v,"class","labeled-input"),vh(t,"class","controls-section"),vh(C,"type","checkbox"),kh(z,"checked",e[0].pausable),vh(A,"type","checkbox"),kh(D,"checked",e[0].upgradeable),vh(T,"class","checkbox-group"),vh(I,"class","controls-section")},m(q,F){ch(q,t,F),sh(t,n),sh(t,i),sh(t,r),sh(r,o),sh(o,a),sh(o,s),sh(o,l),$h(l,e[0].name),sh(r,u),sh(r,d),sh(d,p),sh(d,m),sh(d,f),$h(f,e[0].symbol),sh(t,g),sh(t,v),sh(v,b),sh(b,y),Gh($,b,null),sh(v,_),sh(v,k),$h(k,e[0].decimalsOffset),ch(q,x,F),ch(q,I,F),sh(I,S),sh(I,E),sh(I,T),sh(T,z),sh(z,C),C.checked=e[0].pausable,sh(z,O),Gh(U,z,null),sh(T,N),sh(T,D),sh(D,A),A.checked=e[0].upgradeable,sh(D,j),Gh(P,D,null),ch(q,Z,F),Gh(R,q,F),ch(q,M,F),Gh(L,q,F),ch(q,V,F),Gh(B,q,F),W=!0,J||(G=[gh(l,"input",e[3]),ah(c=g_.call(null,l,e[1]?.name)),gh(f,"input",e[4]),ah(h=g_.call(null,f,e[1]?.symbol)),gh(k,"input",e[5]),ah(w=g_.call(null,k,e[1]?.decimalsOffset)),gh(C,"change",e[6]),gh(A,"change",e[7])],J=!0)},p(e,[t]){1&t&&l.value!==e[0].name&&$h(l,e[0].name),c&&Xf(c.update)&&2&t&&c.update.call(null,e[1]?.name),1&t&&f.value!==e[0].symbol&&$h(f,e[0].symbol),h&&Xf(h.update)&&2&t&&h.update.call(null,e[1]?.symbol);const n={};2048&t&&(n.$$scope={dirty:t,ctx:e}),$.$set(n),1&t&&k.value!==e[0].decimalsOffset&&$h(k,e[0].decimalsOffset),w&&Xf(w.update)&&2&t&&w.update.call(null,e[1]?.decimalsOffset),1&t&&(C.checked=e[0].pausable);const i={};2048&t&&(i.$$scope={dirty:t,ctx:e}),U.$set(i),(!W||1&t)&&kh(z,"checked",e[0].pausable),1&t&&(A.checked=e[0].upgradeable);const r={};2048&t&&(r.$$scope={dirty:t,ctx:e}),P.$set(r),(!W||1&t)&&kh(D,"checked",e[0].upgradeable);const o={};4&t&&(o.required=e[2]),!q&&1&t&&(q=!0,o.access=e[0].access,jh(()=>q=!1)),R.$set(o);const a={};!F&&1&t&&(F=!0,a.explicitImplementations=e[0].explicitImplementations,jh(()=>F=!1)),L.$set(a);const s={};2&t&&(s.errors=e[1]),!H&&1&t&&(H=!0,s.info=e[0].info,jh(()=>H=!1)),B.$set(s)},i(e){W||(Bh($.$$.fragment,e),Bh(U.$$.fragment,e),Bh(P.$$.fragment,e),Bh(R.$$.fragment,e),Bh(L.$$.fragment,e),Bh(B.$$.fragment,e),W=!0)},o(e){Hh($.$$.fragment,e),Hh(U.$$.fragment,e),Hh(P.$$.fragment,e),Hh(R.$$.fragment,e),Hh(L.$$.fragment,e),Hh(B.$$.fragment,e),W=!1},d(e){e&&uh(t),Kh($),e&&uh(x),e&&uh(I),Kh(U),Kh(P),e&&uh(Z),Kh(R,e),e&&uh(M),Kh(L,e),e&&uh(V),Kh(B,e),J=!1,Kf(G)}}}function kk(e,t,n){let i,{opts:r={kind:"Vault",..._b.defaults,info:{...Mg}}}=t,{errors:o}=t;return e.$$set=e=>{"opts"in e&&n(0,r=e.opts),"errors"in e&&n(1,o=e.errors)},e.$$.update=()=>{1&e.$$.dirty&&n(2,i=_b.isAccessControlRequired(r))},[r,o,i,function(){r.name=this.value,n(0,r)},function(){r.symbol=this.value,n(0,r)},function(){r.decimalsOffset=this.value,n(0,r)},function(){r.pausable=this.checked,n(0,r)},function(){r.upgradeable=this.checked,n(0,r)},function(t){e.$$.not_equal(r.access,t)&&(r.access=t,n(0,r))},function(t){e.$$.not_equal(r.explicitImplementations,t)&&(r.explicitImplementations=t,n(0,r))},function(t){e.$$.not_equal(r.info,t)&&(r.info=t,n(0,r))}]}const wk={emptyContract:()=>new Zg("MyToken"),build:e=>function(e){switch(e.kind){case"Fungible":return Lv(e);case"Governor":return Jv(e);case"NonFungible":return eb(e);case"Stablecoin":return ub(e);case"Vault":return mb(e);default:throw new Error("Unknown kind")}}(e),print:e=>cv(e),optionsErrors:e=>e instanceof Ng?e.messages:void 0,highlight:e=>Ib.highlight("rust",e).value,injectHyperlinks:function(e){const t=/use<\/span> (openzeppelin_[a-zA-Z0-9_]*)/g;let n=e,i=t.exec(e);for(;null!=i;){const[r,o]=i;if(void 0!==r&&void 0!==o){const e="https://github.com/OpenZeppelin/stellar-contracts/blob/v0.7.2/contracts/",t=Sb[o];if(void 0!==t){const i=`use</span> <a class="import-link" href='${e}${t}' target='_blank' rel='noopener noreferrer'>${o}</a>`;n=n.replace(r,i)}}i=t.exec(e)}return n},highlightClass:"-stellar",fence:"rust",controls:{Fungible:class extends Qh{constructor(e){super(),Yh(this,e,A_,D_,Yf,{opts:0,errors:1})}},NonFungible:class extends Qh{constructor(e){super(),Yh(this,e,K_,G_,Yf,{opts:0,errors:1})}},Stablecoin:class extends Qh{constructor(e){super(),Yh(this,e,lk,sk,Yf,{opts:0,errors:1})}},Governor:class extends Qh{constructor(e){super(),Yh(this,e,vk,gk,Yf,{opts:0,errors:1})}},Vault:class extends Qh{constructor(e){super(),Yh(this,e,kk,_k,Yf,{opts:0,errors:1})}}}};!function(e,t=document.body){(async function(e,t,n=document.body){const i=new Bf({name:`OpenZeppelin ${t}`,version:"1.0.0"},{},{autoResize:!1});document.documentElement.style.setProperty("--mcp-app-height","560px");const r=new Og({target:n,props:{adapter:e,kind:t,mcpApp:i}}),o=new bf(window.parent,window.parent);i.connect(o).then(async()=>{const e=rg(i);console.info(`[mcp-apps] connected (${t}) hostCapabilities`,i.getHostCapabilities()),r.$set({hostConnected:!0,hostConnectError:void 0,hostSendCaps:e}),await i.sendSizeChanged({height:Ug})}).catch(e=>{const n=e instanceof Error?e.message:String(e);console.error(`[mcp-apps] connect failed for ${t}`,e),r.$set({hostConnected:!1,hostConnectError:n})})})(e,"__OZ_MCP_KIND__",t)}(wk)}();
16
+ !function(){"use strict";var e=[],t=[];!function(n,i){if(n&&"undefined"!=typeof document){var r,o=!0===i.prepend?"prepend":"append",a=!0===i.singleTag,s="string"==typeof i.container?document.querySelector(i.container):document.getElementsByTagName("head")[0];if(a){var l=e.indexOf(s);-1===l&&(l=e.push(s)-1,t[l]={}),r=t[l]&&t[l][o]?t[l][o]:t[l][o]=c()}else r=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),r.styleSheet?r.styleSheet.cssText+=n:r.appendChild(document.createTextNode(n))}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),i.attributes)for(var t=Object.keys(i.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],i.attributes[t[n]]);var r="prepend"===o?"afterbegin":"beforeend";return s.insertAdjacentElement(r,e),e}}("pre code.hljs {\n display: block;\n overflow-x: auto;\n padding: 1em\n}\ncode.hljs {\n padding: 3px 5px\n}\n/*\n\nAtom One Dark by Daniel Gamage\nOriginal One Dark Syntax theme from https://github.com/atom/one-dark-syntax\n\nbase: #282c34\nmono-1: #abb2bf\nmono-2: #818896\nmono-3: #5c6370\nhue-1: #56b6c2\nhue-2: #61aeee\nhue-3: #c678dd\nhue-4: #98c379\nhue-5: #e06c75\nhue-5-2: #be5046\nhue-6: #d19a66\nhue-6-2: #e6c07b\n\n*/\n.hljs {\n color: #abb2bf;\n background: #282c34\n}\n.hljs-comment,\n.hljs-quote {\n color: #5c6370;\n font-style: italic\n}\n.hljs-doctag,\n.hljs-keyword,\n.hljs-formula {\n color: #c678dd\n}\n.hljs-section,\n.hljs-name,\n.hljs-selector-tag,\n.hljs-deletion,\n.hljs-subst {\n color: #e06c75\n}\n.hljs-literal {\n color: #56b6c2\n}\n.hljs-string,\n.hljs-regexp,\n.hljs-addition,\n.hljs-attribute,\n.hljs-meta .hljs-string {\n color: #98c379\n}\n.hljs-attr,\n.hljs-variable,\n.hljs-template-variable,\n.hljs-type,\n.hljs-selector-class,\n.hljs-selector-attr,\n.hljs-selector-pseudo,\n.hljs-number {\n color: #d19a66\n}\n.hljs-symbol,\n.hljs-bullet,\n.hljs-link,\n.hljs-meta,\n.hljs-selector-id,\n.hljs-title {\n color: #61aeee\n}\n.hljs-built_in,\n.hljs-title.class_,\n.hljs-class .hljs-title {\n color: #e6c07b\n}\n.hljs-emphasis {\n font-style: italic\n}\n.hljs-strong {\n font-weight: bold\n}\n.hljs-link {\n text-decoration: underline\n}\n\n.visible {\n visibility: visible\n}\n\n.invisible {\n visibility: hidden\n}\n\n.collapse {\n visibility: collapse\n}\n\n.fixed {\n position: fixed\n}\n\n.absolute {\n position: absolute\n}\n\n.relative {\n position: relative\n}\n\n.bottom-1 {\n bottom: 0.25rem\n}\n\n.bottom-4 {\n bottom: 1rem\n}\n\n.bottom-8 {\n bottom: 2rem\n}\n\n.bottom-\\[3\\.75rem\\] {\n bottom: 3.75rem\n}\n\n.left-4 {\n left: 1rem\n}\n\n.right-0 {\n right: 0px\n}\n\n.right-4 {\n right: 1rem\n}\n\n.right-8 {\n right: 2rem\n}\n\n.z-20 {\n z-index: 20\n}\n\n.z-50 {\n z-index: 50\n}\n\n.m-0 {\n margin: 0px\n}\n\n.m-\\[2px\\] {\n margin: 2px\n}\n\n.mr-2 {\n margin-right: 0.5rem\n}\n\n.block {\n display: block\n}\n\n.flex {\n display: flex\n}\n\n.grid {\n display: grid\n}\n\n.contents {\n display: contents\n}\n\n.hidden {\n display: none\n}\n\n.h-10 {\n height: 2.5rem\n}\n\n.h-14 {\n height: 3.5rem\n}\n\n.h-32 {\n height: 8rem\n}\n\n.h-6 {\n height: 1.5rem\n}\n\n.h-\\[32px\\] {\n height: 32px\n}\n\n.h-\\[36px\\] {\n height: 36px\n}\n\n.h-\\[calc\\(100\\%-188px\\)\\] {\n height: calc(100% - 188px)\n}\n\n.h-\\[calc\\(100\\%-800px\\)\\] {\n height: calc(100% - 800px)\n}\n\n.h-full {\n height: 100%\n}\n\n.max-h-full {\n max-height: 100%\n}\n\n.min-h-0 {\n min-height: 0px\n}\n\n.min-h-\\[200px\\] {\n min-height: 200px\n}\n\n.w-10 {\n width: 2.5rem\n}\n\n.w-32 {\n width: 8rem\n}\n\n.w-6 {\n width: 1.5rem\n}\n\n.w-60 {\n width: 15rem\n}\n\n.w-80 {\n width: 20rem\n}\n\n.w-\\[32px\\] {\n width: 32px\n}\n\n.w-\\[36px\\] {\n width: 36px\n}\n\n.w-\\[40rem\\] {\n width: 40rem\n}\n\n.w-full {\n width: 100%\n}\n\n.min-w-0 {\n min-width: 0px\n}\n\n.min-w-\\[14rem\\] {\n min-width: 14rem\n}\n\n.min-w-\\[40px\\] {\n min-width: 40px\n}\n\n.max-w-\\[400px\\] {\n max-width: 400px\n}\n\n.max-w-\\[42\\%\\] {\n max-width: 42%\n}\n\n.flex-1 {\n flex: 1 1 0%\n}\n\n.flex-none {\n flex: none\n}\n\n.shrink-0 {\n flex-shrink: 0\n}\n\n.grow {\n flex-grow: 1\n}\n\n.basis-0 {\n flex-basis: 0px\n}\n\n.rotate-45 {\n --tw-rotate: 45deg;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))\n}\n\n.transform {\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))\n}\n\n@keyframes fade-in {\n 0% {\n opacity: 0\n }\n 100% {\n opacity: 1\n }\n}\n\n.animate-fade-in {\n animation: fade-in 0.3s ease-out\n}\n\n@keyframes fade-up {\n 0% {\n opacity: 0;\n transform: translateY(1rem)\n }\n 100% {\n opacity: 1;\n transform: translateY(0)\n }\n}\n\n.animate-fade-up {\n animation: fade-up 0.2s ease-out\n}\n\n@keyframes spin {\n to {\n transform: rotate(360deg)\n }\n}\n\n.animate-spin-slow {\n animation: spin 2s linear infinite\n}\n\n.cursor-pointer {\n cursor: pointer\n}\n\n.resize-none {\n resize: none\n}\n\n.resize {\n resize: both\n}\n\n.grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr))\n}\n\n.grid-cols-\\[2fr\\2c 1fr\\] {\n grid-template-columns: 2fr 1fr\n}\n\n.flex-row {\n flex-direction: row\n}\n\n.flex-col {\n flex-direction: column\n}\n\n.flex-col-reverse {\n flex-direction: column-reverse\n}\n\n.flex-wrap {\n flex-wrap: wrap\n}\n\n.items-center {\n align-items: center\n}\n\n.justify-center {\n justify-content: center\n}\n\n.justify-between {\n justify-content: space-between\n}\n\n.gap-2 {\n gap: 0.5rem\n}\n\n.gap-3 {\n gap: 0.75rem\n}\n\n.gap-4 {\n gap: 1rem\n}\n\n.overflow-auto {\n overflow: auto\n}\n\n.overflow-hidden {\n overflow: hidden\n}\n\n.overflow-x-auto {\n overflow-x: auto\n}\n\n.overflow-y-auto {\n overflow-y: auto\n}\n\n.rounded-full {\n border-radius: 9999px\n}\n\n.rounded-md {\n border-radius: 0.375rem\n}\n\n.rounded-xl {\n border-radius: 0.75rem\n}\n\n.border {\n border-width: 1px\n}\n\n.border-0 {\n border-width: 0px\n}\n\n.border-b {\n border-bottom-width: 1px\n}\n\n.border-r {\n border-right-width: 1px\n}\n\n.border-solid {\n border-style: solid\n}\n\n.border-none {\n border-style: none\n}\n\n.border-\\[var\\(--gray-3\\)\\] {\n border-color: var(--gray-3)\n}\n\n.border-gray-200 {\n --tw-border-opacity: 1;\n border-color: rgb(229 231 235 / var(--tw-border-opacity, 1))\n}\n\n.bg-gray-100 {\n --tw-bg-opacity: 1;\n background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1))\n}\n\n.bg-gray-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(229 231 235 / var(--tw-bg-opacity, 1))\n}\n\n.bg-gray-400 {\n --tw-bg-opacity: 1;\n background-color: rgb(156 163 175 / var(--tw-bg-opacity, 1))\n}\n\n.bg-gray-50 {\n --tw-bg-opacity: 1;\n background-color: rgb(249 250 251 / var(--tw-bg-opacity, 1))\n}\n\n.bg-gray-900 {\n --tw-bg-opacity: 1;\n background-color: rgb(17 24 39 / var(--tw-bg-opacity, 1))\n}\n\n.bg-transparent {\n background-color: transparent\n}\n\n.p-2 {\n padding: 0.5rem\n}\n\n.p-3 {\n padding: 0.75rem\n}\n\n.p-4 {\n padding: 1rem\n}\n\n.px-1 {\n padding-left: 0.25rem;\n padding-right: 0.25rem\n}\n\n.pr-2 {\n padding-right: 0.5rem\n}\n\n.text-center {\n text-align: center\n}\n\n.text-lg {\n font-size: 1.125rem;\n line-height: 1.75rem\n}\n\n.text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem\n}\n\n.text-xs {\n font-size: 0.75rem;\n line-height: 1rem\n}\n\n.font-bold {\n font-weight: 700\n}\n\n.lowercase {\n text-transform: lowercase\n}\n\n.italic {\n font-style: italic\n}\n\n.text-gray-50 {\n --tw-text-opacity: 1;\n color: rgb(249 250 251 / var(--tw-text-opacity, 1))\n}\n\n.text-gray-500 {\n --tw-text-opacity: 1;\n color: rgb(107 114 128 / var(--tw-text-opacity, 1))\n}\n\n.text-gray-600 {\n --tw-text-opacity: 1;\n color: rgb(75 85 99 / var(--tw-text-opacity, 1))\n}\n\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1))\n}\n\n.underline {\n text-decoration-line: underline\n}\n\n.shadow-lg {\n --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)\n}\n\n.shadow-sm {\n --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);\n --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)\n}\n\n.shadow-xl {\n --tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)\n}\n\n.outline-none {\n outline: 2px solid transparent;\n outline-offset: 2px\n}\n\n.filter {\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)\n}\n\n.transition {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms\n}\n\n.ease-in-out {\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1)\n}\n\n*,\n*:before,\n*:after {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n\nhtml {\n line-height: 1.15;\n -webkit-text-size-adjust: 100%;\n}\n\ncode {\n font-family: var(--monospace);\n font-size: 1em;\n}\n\nbutton,\ninput,\nselect,\ntextarea {\n font-family: inherit;\n font-size: inherit;\n color: inherit;\n}\n:root {\n --sans-serif: system-ui, sans-serif;\n --monospace: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;\n\n /* Colors */\n\n --text-color: #333333;\n\n --gray-1: #f9fafb;\n --gray-2: #eff1f3;\n --gray-3: #d8dbe2;\n --gray-4: #818998;\n --gray-5: #575c66;\n --gray-6: #2c374b;\n\n --blue-1: #f5f6ff;\n --blue-2: #4e5de4;\n --blue-3: #343f9d;\n\n --yellow-1: #fffaeb;\n --yellow-2: #ffcc33;\n --yellow-3: #b27700;\n\n --red-1: #feecec;\n --red-2: #f53d3d;\n --red-3: #aa0909;\n\n --solidity-blue-1: #51d4ff;\n --solidity-blue-2: #4e5de4;\n\n --cairo-orange: #fe4a3c;\n\n --polkadot-pink: #ff2670;\n\n --stylus-pink: #e3066e;\n\n --stellar-black: #0f0f0f;\n\n --confidential-black: #000000;\n --confidential-yellow: #ffd208;\n\n --uniswap-pink: #f50eb4;\n\n /* Dimensions (scale taken from Tailwind) */\n\n --size-1: 0.25rem;\n --size-2: 0.5rem;\n --size-3: 0.75rem;\n --size-4: 1rem;\n --size-8: 2rem;\n --size-64: 16rem;\n\n /* Font Sizes */\n\n --text-small: 0.875rem;\n\n /* Utilities */\n\n --shadow: 0 2px 3px rgba(0, 0, 0, 0.1);\n\n --icon-adjust: 0.125em;\n}\n.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}\n[data-tippy-root]{max-width:calc(100vw - 10px)}\n.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}\n.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}\n.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}\n.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}\n.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}\n.tippy-box[data-placement^=left]>.tippy-arrow{right:0}\n.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}\n.tippy-box[data-placement^=right]>.tippy-arrow{left:0}\n.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}\n.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}\n.tippy-arrow{width:16px;height:16px;color:#333}\n.tippy-arrow:before{content:\"\";position:absolute;border-color:transparent;border-style:solid}\n.tippy-content{position:relative;padding:5px 9px;z-index:1}\n.tippy-box[data-theme~=material]{background-color:#505355;font-weight:600}\n.tippy-box[data-theme~=material][data-placement^=top]>.tippy-arrow:before{border-top-color:#505355}\n.tippy-box[data-theme~=material][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#505355}\n.tippy-box[data-theme~=material][data-placement^=left]>.tippy-arrow:before{border-left-color:#505355}\n.tippy-box[data-theme~=material][data-placement^=right]>.tippy-arrow:before{border-right-color:#505355}\n.tippy-box[data-theme~=material]>.tippy-backdrop{background-color:#505355}\n.tippy-box[data-theme~=material]>.tippy-svg-arrow{fill:#505355}\n:root {\n --tippy-background: #333;\n --tippy-text: var(--gray-3);\n --tippy-border: rgba(0, 8, 16, 0.15);\n}\n.tippy-box[data-theme~='light'] {\n --tippy-background: #fffffff5;\n --tippy-text: #333;\n}\n.tippy-box[data-theme~='light-yellow'] {\n --tippy-background: var(--yellow-1);\n --tippy-text: #333;\n}\n.tippy-box[data-theme~='light-red'] {\n --tippy-background: var(--red-1);\n --tippy-text: #333;\n}\n.tippy-box {\n background-color: var(--tippy-background);\n background-clip: padding-box;\n color: var(--tippy-text);\n box-shadow: var(--shadow);\n font-weight: initial;\n font-variant: initial;\n text-transform: none;\n}\n.tippy-box[data-theme~='border'] {\n border: 1px solid var(--tippy-border);\n}\n.tippy-box > .tippy-backdrop {\n background-color: var(--tippy-background);\n}\n.tippy-box[data-theme~='border'] > .tippy-arrow:after {\n content: '';\n position: absolute;\n z-index: -1;\n border-color: transparent;\n border-style: solid;\n}\n.tippy-box[data-placement^='top'] > .tippy-arrow:before {\n border-top-color: var(--tippy-background);\n}\n.tippy-box[data-placement^='bottom'] > .tippy-arrow:before {\n border-bottom-color: var(--tippy-background);\n bottom: 16px;\n}\n.tippy-box[data-placement^='left'] > .tippy-arrow:before {\n border-left-color: var(--tippy-background);\n}\n.tippy-box[data-placement^='right'] > .tippy-arrow:before {\n border-right-color: var(--tippy-background);\n right: 16px;\n}\n.tippy-box[data-theme~='border'][data-placement^='top'] > .tippy-arrow:after {\n border-top-color: var(--tippy-border);\n border-width: 7px 7px 0;\n top: 17px;\n left: 1px;\n}\n.tippy-box[data-theme~='border'][data-placement^='bottom'] > .tippy-arrow:after {\n border-bottom-color: var(--tippy-border);\n border-width: 0 7px 7px;\n bottom: 17px;\n left: 1px;\n}\n.tippy-box[data-theme~='border'][data-placement^='left'] > .tippy-arrow:after {\n border-left-color: var(--tippy-border);\n border-width: 7px 0 7px 7px;\n left: 17px;\n top: 1px;\n}\n.tippy-box[data-theme~='border'][data-placement^='right'] > .tippy-arrow:after {\n border-width: 7px 7px 7px 0;\n right: 17px;\n top: 1px;\n border-right-color: var(--tippy-border);\n}\n.container {\n background-color: var(--gray-1);\n min-width: 32rem;\n}\n.header {\n font-size: var(--text-small);\n}\n.tab {\n color: var(--gray-5);\n}\n.tab button:hover,\n.overflow-btn:hover {\n background-color: var(--gray-2);\n}\n/* Global .overflow-menu button with .selected class */\n.overflow-menu button.selected {\n order: unset;\n}\n.tab button,\n.overflow-btn {\n border: 0;\n background-color: transparent;\n padding: var(--size-2) var(--size-4);\n border-radius: 20px;\n cursor: pointer;\n transition: background-color ease-in-out 0.2s;\n}\n/* Global .action-button */\n.action-button {\n padding: 7px;\n border-radius: 20px;\n transition: background-color ease-in-out 0.2s;\n background-color: var(--gray-1);\n border: 1px solid var(--gray-3);\n color: var(--gray-6);\n cursor: pointer;\n}\n/* Hover and active states for .action-button */\n.action-button:hover {\n background-color: var(--gray-2);\n}\n.action-button:active,\n.action-button.active {\n background-color: var(--gray-2);\n}\n/* .icon inside .action-button */\n.action-button .icon {\n margin: 0 var(--size-1);\n}\n/* Disabled state */\n.action-button.disabled {\n color: var(--gray-4);\n}\n/* Button with text */\n.with-text {\n padding-right: var(--size-3);\n}\n/* Controls container */\n.controls {\n background-color: white;\n padding: var(--size-4);\n}\n/* Controls footer */\n.controls-footer {\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n color: var(--gray-5);\n margin-top: var(--size-3);\n padding: 0 var(--size-2);\n font-size: var(--text-small);\n}\n/* Apply left margin to every element after the first child */\n.controls-footer > * + * {\n margin-left: var(--size-3);\n}\n/* .icon inside .controls-footer */\n.controls-footer .icon {\n margin-right: 0.2em;\n opacity: 0.8;\n}\n/* Links inside .controls-footer */\n.controls-footer a {\n color: inherit;\n text-decoration: none;\n}\n/* Hover effect for links */\n.controls-footer a:hover {\n color: var(--text-color);\n}\n.download-option-content {\n margin-left: var(--size-3);\n font-size: var(--text-small);\n}\n.download-option-content > :first-child {\n margin-bottom: var(--size-2);\n color: var(--gray-6);\n font-weight: bold;\n}\n.download-option-content > :not(:first-child) {\n margin-top: var(--size-1);\n color: var(--gray-5);\n}\n.download-option {\n display: flex;\n padding: var(--size-2);\n text-align: left;\n background: none;\n border: 1px solid transparent;\n border-radius: 4px;\n cursor: pointer;\n}\n/* The .icon inside .download-option */\n.download-option :global(.icon) {\n margin-top: var(--icon-adjust);\n}\n/* When the previous sibling is not hovered */\n:not(:hover) + .download-option {\n border-top: 1px solid var(--gray-2);\n}\n/* Hover and focus states */\n.download-option:hover,\n.download-option:focus {\n background-color: var(--gray-1);\n border: 1px solid var(--gray-3);\n}\n/* Direct or nested div inside .download-option */\n.download-option div {\n display: block;\n}\n\n/* General */\n\nbody {\n color: var(--text-color);\n font-family: var(--sans-serif);\n}\n\nsvg.vertical-align {\n vertical-align: calc(-1 * var(--icon-adjust));\n}\n\nsvg.keepcolor {\n fill: currentColor;\n}\n\nsvg.icon {\n vertical-align: calc(-1 * var(--icon-adjust));\n flex: 0 0 auto;\n height: 1em;\n width: 1em;\n fill: currentColor;\n}\n\ninput:not([type]),\ninput[type='text'],\ninput[type='number'],\ninput[type='datetime-local'] {\n border: 1px solid var(--gray-3);\n padding: var(--size-2) var(--size-3);\n border-radius: 6px;\n}\n\n/* Hide up and down arrows in numeric input fields */\n\ninput[type='number']::-webkit-outer-spin-button,\ninput[type='number']::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\ninput[type='number'] {\n -moz-appearance: textfield;\n -webkit-appearance: textfield;\n appearance: textfield;\n}\n\n/* Components */\n\n.controls-section {\n display: flex;\n flex-direction: column;\n}\n\n.controls-section + .controls-section {\n margin-top: var(--size-4);\n padding-top: var(--size-4);\n border-top: 1px solid var(--gray-3);\n }\n\n.controls-section > * + * {\n margin-top: var(--size-3);\n }\n\n.controls-section h1 {\n margin-top: 0;\n margin-bottom: 0;\n text-transform: lowercase;\n font-variant: small-caps;\n font-size: var(--text-small);\n color: var(--gray-4);\n font-weight: 600;\n }\n\n.subcontrol::before {\n content: '└';\n color: var(--gray-3);\n}\n\n.checkbox-group {\n display: flex;\n flex-direction: column;\n}\n\n.checkbox-group > * {\n display: flex;\n align-items: center;\n padding: var(--size-2);\n }\n\n.checkbox-group input {\n margin-right: var(--size-2);\n }\n\n.checkbox-group .tooltip {\n margin-left: auto;\n }\n\n.checkbox-group .checked {\n background-color: var(--blue-1);\n }\n\n.labeled-input {\n display: flex;\n flex-direction: column;\n}\n\n.labeled-input > span {\n font-size: var(--text-small);\n }\n\n.labeled-input > input {\n margin-top: var(--size-1);\n width: 100%;\n }\n\n.tooltip-container,\n.checkbox-group > *,\n.labeled-input {\n --tooltip-opacity: 0.15;\n}\n\n.tooltip-container:hover, .checkbox-group > *:hover, .labeled-input:hover {\n --tooltip-opacity: 0.5;\n }\n\ninput.input-inline {\n padding: 0.25em;\n height: 1.5em;\n width: 2em;\n max-width: 100%;\n text-align: center;\n}\n\n.has-error {\n box-shadow: 0 0 var(--size-1) var(--red-2);\n}\n\n.import-link {\n color: inherit;\n}\n\n.comment-link {\n color: #7d828d;\n}\n\n.glimmery {\n background: conic-gradient(rgb(196, 181, 253), rgb(110, 231, 183), rgb(249, 168, 212));\n}\n\n.hljs.-solidity {\n background: linear-gradient(30deg, #151a24, #2b323e);\n}\n\n.hljs.-cairo {\n background: linear-gradient(30deg, #191717, #2a0f0f);\n}\n\n.hljs.-stylus {\n background: linear-gradient(30deg, #181215, #360c1f);\n}\n\n.light-link {\n color: white;\n}\n\n.hover\\:bg-gray-200:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(229 231 235 / var(--tw-bg-opacity, 1))\n}\n\n.hover\\:bg-white:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1))\n}\n",{});const n=Object.freeze({status:"aborted"});function i(e,t,n){function i(n,i){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:i,constr:a,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,i);const r=a.prototype,o=Object.keys(r);for(let e=0;e<o.length;e++){const t=o[e];t in n||(n[t]=r[t].bind(n))}}const r=n?.Parent??Object;class o extends r{}function a(e){var t;const r=n?.Parent?new o:this;i(r,e),(t=r._zod).deferred??(t.deferred=[]);for(const e of r._zod.deferred)e();return r}return Object.defineProperty(o,"name",{value:e}),Object.defineProperty(a,"init",{value:i}),Object.defineProperty(a,Symbol.hasInstance,{value:t=>!!(n?.Parent&&t instanceof n.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}const r=Symbol("zod_brand");class o extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class a extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const s={};function l(e){return e&&Object.assign(s,e),s}function c(e){const t=Object.values(e).filter(e=>"number"==typeof e),n=Object.entries(e).filter(([e,n])=>-1===t.indexOf(+e)).map(([e,t])=>t);return n}function u(e,t="|"){return e.map(e=>U(e)).join(t)}function d(e,t){return"bigint"==typeof t?t.toString():t}function p(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function m(e){return null==e}function f(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function h(e,t){const n=(e.toString().split(".")[1]||"").length,i=t.toString();let r=(i.split(".")[1]||"").length;if(0===r&&/\d?e-\d?/.test(i)){const e=i.match(/\d?e-(\d?)/);e?.[1]&&(r=Number.parseInt(e[1]))}const o=n>r?n:r;return Number.parseInt(e.toFixed(o).replace(".",""))%Number.parseInt(t.toFixed(o).replace(".",""))/10**o}const g=Symbol("evaluating");function v(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==g)return void 0===i&&(i=g,i=n()),i},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function b(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function y(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function $(e){return JSON.stringify(e)}function _(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const k="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function w(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const x=p(()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function S(e){if(!1===w(e))return!1;const t=e.constructor;if(void 0===t)return!0;if("function"!=typeof t)return!0;const n=t.prototype;return!1!==w(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function I(e){return S(e)?{...e}:Array.isArray(e)?[...e]:e}const E=new Set(["string","number","symbol"]),T=new Set(["string","number","bigint","boolean","symbol","undefined"]);function z(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function C(e,t,n){const i=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(i._zod.parent=e),i}function O(e){const t=e;if(!t)return{};if("string"==typeof t)return{error:()=>t};if(void 0!==t?.message){if(void 0!==t?.error)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,"string"==typeof t.error?{...t,error:()=>t.error}:t}function U(e){return"bigint"==typeof e?e.toString()+"n":"string"==typeof e?`"${e}"`:`${e}`}function A(e){return Object.keys(e).filter(t=>"optional"===e[t]._zod.optin&&"optional"===e[t]._zod.optout)}const N={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]},D={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function j(e,t){const n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");return C(e,y(e._zod.def,{get shape(){const e={};for(const i in t){if(!(i in n.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&(e[i]=n.shape[i])}return b(this,"shape",e),e},checks:[]}))}function P(e,t){const n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const r=y(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const e in t){if(!(e in n.shape))throw new Error(`Unrecognized key: "${e}"`);t[e]&&delete i[e]}return b(this,"shape",i),i},checks:[]});return C(e,r)}function Z(e,t){if(!S(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const n=e._zod.def.shape;for(const e in t)if(void 0!==Object.getOwnPropertyDescriptor(n,e))throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const i=y(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return b(this,"shape",n),n}});return C(e,i)}function R(e,t){if(!S(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=y(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return b(this,"shape",n),n}});return C(e,n)}function q(e,t){const n=y(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return b(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return C(e,n)}function M(e,t,n){const i=t._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const r=y(t._zod.def,{get shape(){const i=t._zod.def.shape,r={...i};if(n)for(const t in n){if(!(t in i))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(r[t]=e?new e({type:"optional",innerType:i[t]}):i[t])}else for(const t in i)r[t]=e?new e({type:"optional",innerType:i[t]}):i[t];return b(this,"shape",r),r},checks:[]});return C(t,r)}function L(e,t,n){const i=y(t._zod.def,{get shape(){const i=t._zod.def.shape,r={...i};if(n)for(const t in n){if(!(t in r))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(r[t]=new e({type:"nonoptional",innerType:i[t]}))}else for(const t in i)r[t]=new e({type:"nonoptional",innerType:i[t]});return b(this,"shape",r),r}});return C(t,i)}function F(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(!0!==e.issues[n]?.continue)return!0;return!1}function V(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function B(e){return"string"==typeof e?e:e?.message}function H(e,t,n){const i={...e,path:e.path??[]};if(!e.message){const r=B(e.inst?._zod.def?.error?.(e))??B(t?.error?.(e))??B(n.customError?.(e))??B(n.localeError?.(e))??"Invalid input";i.message=r}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function W(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function J(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function G(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(null===e)return"null";if(Array.isArray(e))return"array";const t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&"constructor"in t&&t.constructor)return t.constructor.name}}return t}function K(...e){const[t,n,i]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:i}:{...t}}function X(e){const t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}function Y(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}var Q=Object.freeze({__proto__:null,BIGINT_FORMAT_RANGES:D,Class:class{constructor(...e){}},NUMBER_FORMAT_RANGES:N,aborted:F,allowsEval:x,assert:function(e){},assertEqual:function(e){return e},assertIs:function(e){},assertNever:function(e){throw new Error("Unexpected value in exhaustive check")},assertNotEqual:function(e){return e},assignProp:b,base64ToUint8Array:X,base64urlToUint8Array:function(e){const t=e.replace(/-/g,"+").replace(/_/g,"/");return X(t+"=".repeat((4-t.length%4)%4))},cached:p,captureStackTrace:k,cleanEnum:function(e){return Object.entries(e).filter(([e,t])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])},cleanRegex:f,clone:C,cloneDef:function(e){return y(e._zod.def)},createTransparentProxy:function(e){let t;return new Proxy({},{get:(n,i,r)=>(t??(t=e()),Reflect.get(t,i,r)),set:(n,i,r,o)=>(t??(t=e()),Reflect.set(t,i,r,o)),has:(n,i)=>(t??(t=e()),Reflect.has(t,i)),deleteProperty:(n,i)=>(t??(t=e()),Reflect.deleteProperty(t,i)),ownKeys:n=>(t??(t=e()),Reflect.ownKeys(t)),getOwnPropertyDescriptor:(n,i)=>(t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)),defineProperty:(n,i,r)=>(t??(t=e()),Reflect.defineProperty(t,i,r))})},defineLazy:v,esc:$,escapeRegex:z,extend:Z,finalizeIssue:H,floatSafeRemainder:h,getElementAtPath:function(e,t){return t?t.reduce((e,t)=>e?.[t],e):e},getEnumValues:c,getLengthableOrigin:J,getParsedType:e=>{const t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":null===e?"null":e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?"promise":"undefined"!=typeof Map&&e instanceof Map?"map":"undefined"!=typeof Set&&e instanceof Set?"set":"undefined"!=typeof Date&&e instanceof Date?"date":"undefined"!=typeof File&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},getSizableOrigin:W,hexToUint8Array:function(e){const t=e.replace(/^0x/,"");if(t.length%2!=0)throw new Error("Invalid hex string length");const n=new Uint8Array(t.length/2);for(let e=0;e<t.length;e+=2)n[e/2]=Number.parseInt(t.slice(e,e+2),16);return n},isObject:w,isPlainObject:S,issue:K,joinValues:u,jsonStringifyReplacer:d,merge:q,mergeDefs:y,normalizeParams:O,nullish:m,numKeys:function(e){let t=0;for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t},objectClone:function(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))},omit:P,optionalKeys:A,parsedType:G,partial:M,pick:j,prefixIssues:V,primitiveTypes:T,promiseAllObject:function(e){const t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{const n={};for(let i=0;i<t.length;i++)n[t[i]]=e[i];return n})},propertyKeyTypes:E,randomString:function(e=10){const t="abcdefghijklmnopqrstuvwxyz";let n="";for(let i=0;i<e;i++)n+=t[Math.floor(26*Math.random())];return n},required:L,safeExtend:R,shallowClone:I,slugify:_,stringifyPrimitive:U,uint8ArrayToBase64:Y,uint8ArrayToBase64url:function(e){return Y(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},uint8ArrayToHex:function(e){return Array.from(e).map(e=>e.toString(16).padStart(2,"0")).join("")},unwrapMessage:B});const ee=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,d,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},te=i("$ZodError",ee),ne=i("$ZodError",ee,{Parent:Error});function ie(e,t=e=>e.message){const n={},i=[];for(const r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):i.push(t(r));return{formErrors:i,fieldErrors:n}}function re(e,t=e=>e.message){const n={_errors:[]},i=e=>{for(const r of e.issues)if("invalid_union"===r.code&&r.errors.length)r.errors.map(e=>i({issues:e}));else if("invalid_key"===r.code)i({issues:r.issues});else if("invalid_element"===r.code)i({issues:r.issues});else if(0===r.path.length)n._errors.push(t(r));else{let e=n,i=0;for(;i<r.path.length;){const n=r.path[i];i===r.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(r))):e[n]=e[n]||{_errors:[]},e=e[n],i++}}};return i(e),n}function oe(e,t=e=>e.message){const n={errors:[]},i=(e,r=[])=>{var o,a;for(const s of e.issues)if("invalid_union"===s.code&&s.errors.length)s.errors.map(e=>i({issues:e},s.path));else if("invalid_key"===s.code)i({issues:s.issues},s.path);else if("invalid_element"===s.code)i({issues:s.issues},s.path);else{const e=[...r,...s.path];if(0===e.length){n.errors.push(t(s));continue}let i=n,l=0;for(;l<e.length;){const n=e[l],r=l===e.length-1;"string"==typeof n?(i.properties??(i.properties={}),(o=i.properties)[n]??(o[n]={errors:[]}),i=i.properties[n]):(i.items??(i.items=[]),(a=i.items)[n]??(a[n]={errors:[]}),i=i.items[n]),r&&i.errors.push(t(s)),l++}}};return i(e),n}function ae(e){const t=[],n=e.map(e=>"object"==typeof e?e.key:e);for(const e of n)"number"==typeof e?t.push(`[${e}]`):"symbol"==typeof e?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push("."),t.push(e));return t.join("")}function se(e){const t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(const e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${ae(e.path)}`);return t.join("\n")}const le=e=>(t,n,i,r)=>{const a=i?Object.assign(i,{async:!1}):{async:!1},s=t._zod.run({value:n,issues:[]},a);if(s instanceof Promise)throw new o;if(s.issues.length){const t=new(r?.Err??e)(s.issues.map(e=>H(e,a,l())));throw k(t,r?.callee),t}return s.value},ce=le(ne),ue=e=>async(t,n,i,r)=>{const o=i?Object.assign(i,{async:!0}):{async:!0};let a=t._zod.run({value:n,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){const t=new(r?.Err??e)(a.issues.map(e=>H(e,o,l())));throw k(t,r?.callee),t}return a.value},de=ue(ne),pe=e=>(t,n,i)=>{const r=i?{...i,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},r);if(a instanceof Promise)throw new o;return a.issues.length?{success:!1,error:new(e??te)(a.issues.map(e=>H(e,r,l())))}:{success:!0,data:a.value}},me=pe(ne),fe=e=>async(t,n,i)=>{const r=i?Object.assign(i,{async:!0}):{async:!0};let o=t._zod.run({value:n,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(e=>H(e,r,l())))}:{success:!0,data:o.value}},he=fe(ne),ge=e=>(t,n,i)=>{const r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return le(e)(t,n,r)},ve=ge(ne),be=e=>(t,n,i)=>le(e)(t,n,i),ye=be(ne),$e=e=>async(t,n,i)=>{const r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return ue(e)(t,n,r)},_e=$e(ne),ke=e=>async(t,n,i)=>ue(e)(t,n,i),we=ke(ne),xe=e=>(t,n,i)=>{const r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return pe(e)(t,n,r)},Se=xe(ne),Ie=e=>(t,n,i)=>pe(e)(t,n,i),Ee=Ie(ne),Te=e=>async(t,n,i)=>{const r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return fe(e)(t,n,r)},ze=Te(ne),Ce=e=>async(t,n,i)=>fe(e)(t,n,i),Oe=Ce(ne),Ue=/^[cC][^\s-]{8,}$/,Ae=/^[0-9a-z]+$/,Ne=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,De=/^[0-9a-vA-V]{20}$/,je=/^[A-Za-z0-9]{27}$/,Pe=/^[a-zA-Z0-9_-]{21}$/,Ze=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Re=/^([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})$/,qe=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Me=qe(4),Le=qe(6),Fe=qe(7),Ve=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Be=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,He=Be;function We(){return new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")}const Je=/^(?:(?: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])$/,Ge=/^(([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}|:))$/,Ke=e=>{const t=z(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Xe=/^((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])$/,Ye=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Qe=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,et=/^[A-Za-z0-9_-]*$/,tt=/^(?=.{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])?)*\.?$/,nt=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,it=/^\+[1-9]\d{6,14}$/,rt="(?:(?:\\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])))",ot=new RegExp(`^${rt}$`);function at(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function st(e){return new RegExp(`^${at(e)}$`)}function lt(e){const t=at({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${t}(?:${n.join("|")})`;return new RegExp(`^${rt}T(?:${i})$`)}const ct=e=>new RegExp(`^${e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*"}$`),ut=/^-?\d+n?$/,dt=/^-?\d+$/,pt=/^-?\d+(?:\.\d+)?$/,mt=/^(?:true|false)$/i,ft=/^null$/i,ht=/^undefined$/i,gt=/^[^A-Z]*$/,vt=/^[^a-z]*$/,bt=/^[0-9a-fA-F]*$/;function yt(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function $t(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}const _t=yt(22,"=="),kt=$t(22),wt=yt(27,"="),xt=$t(27),St=yt(43,"="),It=$t(43),Et=yt(64,""),Tt=$t(64),zt=yt(86,"=="),Ct=$t(86);var Ot=Object.freeze({__proto__:null,base64:Qe,base64url:et,bigint:ut,boolean:mt,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])?)*$/,cidrv4:Xe,cidrv6:Ye,cuid:Ue,cuid2:Ae,date:ot,datetime:lt,domain:nt,duration:Ze,e164:it,email:Ve,emoji:We,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:Re,hex:bt,hostname:tt,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])?)*$/,idnEmail:He,integer:dt,ipv4:Je,ipv6:Ge,ksuid:je,lowercase:gt,mac:Ke,md5_base64:_t,md5_base64url:kt,md5_hex:/^[0-9a-fA-F]{32}$/,nanoid:Pe,null:ft,number:pt,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,}))$/,sha1_base64:wt,sha1_base64url:xt,sha1_hex:/^[0-9a-fA-F]{40}$/,sha256_base64:St,sha256_base64url:It,sha256_hex:/^[0-9a-fA-F]{64}$/,sha384_base64:Et,sha384_base64url:Tt,sha384_hex:/^[0-9a-fA-F]{96}$/,sha512_base64:zt,sha512_base64url:Ct,sha512_hex:/^[0-9a-fA-F]{128}$/,string:ct,time:st,ulid:Ne,undefined:ht,unicodeEmail:Be,uppercase:vt,uuid:qe,uuid4:Me,uuid6:Le,uuid7:Fe,xid:De});const Ut=i("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),At={number:"number",bigint:"bigint",object:"date"},Nt=i("$ZodCheckLessThan",(e,t)=>{Ut.init(e,t);const n=At[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,i=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:n,code:"too_big",maximum:"object"==typeof t.value?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Dt=i("$ZodCheckGreaterThan",(e,t)=>{Ut.init(e,t);const n=At[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,i=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:n,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),jt=i("$ZodCheckMultipleOf",(e,t)=>{Ut.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?n.value%t.value===BigInt(0):0===h(n.value,t.value))||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Pt=i("$ZodCheckNumberFormat",(e,t)=>{Ut.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),i=n?"int":"number",[r,o]=N[t.format];e._zod.onattach.push(e=>{const i=e._zod.bag;i.format=t.format,i.minimum=r,i.maximum=o,n&&(i.pattern=dt)}),e._zod.check=a=>{const s=a.value;if(n){if(!Number.isInteger(s))return void a.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});if(!Number.isSafeInteger(s))return void(s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}))}s<r&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),s>o&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),Zt=i("$ZodCheckBigIntFormat",(e,t)=>{Ut.init(e,t);const[n,i]=D[t.format];e._zod.onattach.push(e=>{const r=e._zod.bag;r.format=t.format,r.minimum=n,r.maximum=i}),e._zod.check=r=>{const o=r.value;o<n&&r.issues.push({origin:"bigint",input:o,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),o>i&&r.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Rt=i("$ZodCheckMaxSize",(e,t)=>{var n;Ut.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!m(t)&&void 0!==t.size}),e._zod.onattach.push(e=>{const n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const i=n.value;i.size<=t.maximum||n.issues.push({origin:W(i),code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),qt=i("$ZodCheckMinSize",(e,t)=>{var n;Ut.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!m(t)&&void 0!==t.size}),e._zod.onattach.push(e=>{const n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const i=n.value;i.size>=t.minimum||n.issues.push({origin:W(i),code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Mt=i("$ZodCheckSizeEquals",(e,t)=>{var n;Ut.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!m(t)&&void 0!==t.size}),e._zod.onattach.push(e=>{const n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=n=>{const i=n.value,r=i.size;if(r===t.size)return;const o=r>t.size;n.issues.push({origin:W(i),...o?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Lt=i("$ZodCheckMaxLength",(e,t)=>{var n;Ut.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!m(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const i=n.value;if(i.length<=t.maximum)return;const r=J(i);n.issues.push({origin:r,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Ft=i("$ZodCheckMinLength",(e,t)=>{var n;Ut.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!m(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const i=n.value;if(i.length>=t.minimum)return;const r=J(i);n.issues.push({origin:r,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Vt=i("$ZodCheckLengthEquals",(e,t)=>{var n;Ut.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!m(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{const i=n.value,r=i.length;if(r===t.length)return;const o=J(i),a=r>t.length;n.issues.push({origin:o,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Bt=i("$ZodCheckStringFormat",(e,t)=>{var n,i;Ut.init(e,t),e._zod.onattach.push(e=>{const n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),Ht=i("$ZodCheckRegex",(e,t)=>{Bt.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Wt=i("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=gt),Bt.init(e,t)}),Jt=i("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=vt),Bt.init(e,t)}),Gt=i("$ZodCheckIncludes",(e,t)=>{Ut.init(e,t);const n=z(t.includes),i=new RegExp("number"==typeof t.position?`^.{${t.position}}${n}`:n);t.pattern=i,e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(i)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Kt=i("$ZodCheckStartsWith",(e,t)=>{Ut.init(e,t);const n=new RegExp(`^${z(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Xt=i("$ZodCheckEndsWith",(e,t)=>{Ut.init(e,t);const n=new RegExp(`.*${z(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});function Yt(e,t,n){e.issues.length&&t.issues.push(...V(n,e.issues))}const Qt=i("$ZodCheckProperty",(e,t)=>{Ut.init(e,t),e._zod.check=e=>{const n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(n=>Yt(n,e,t.property));Yt(n,e,t.property)}}),en=i("$ZodCheckMimeType",(e,t)=>{Ut.init(e,t);const n=new Set(t.mime);e._zod.onattach.push(e=>{e._zod.bag.mime=t.mime}),e._zod.check=i=>{n.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),tn=i("$ZodCheckOverwrite",(e,t)=>{Ut.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class nn{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});const t=e.split("\n").filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),i=t.map(e=>e.slice(n)).map(e=>" ".repeat(2*this.indent)+e);for(const e of i)this.content.push(e)}compile(){const e=Function,t=this?.args;return new e(...t,[...(this?.content??[""]).map(e=>` ${e}`)].join("\n"))}}const rn={major:4,minor:3,patch:6},on=i("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=rn;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const t of i)for(const n of t._zod.onattach)n(e);if(0===i.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const t=(e,t,n)=>{let i,r=F(e);for(const a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;const t=e.issues.length,s=a._zod.check(e);if(s instanceof Promise&&!1===n?.async)throw new o;if(i||s instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await s;e.issues.length!==t&&(r||(r=F(e,t)))});else{if(e.issues.length===t)continue;r||(r=F(e,t))}}return i?i.then(()=>e):e},n=(n,r,a)=>{if(F(n))return n.aborted=!0,n;const s=t(r,i,a);if(s instanceof Promise){if(!1===a.async)throw new o;return s.then(t=>e._zod.parse(t,a))}return e._zod.parse(s,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if("backward"===a.direction){const t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}const s=e._zod.parse(r,a);if(s instanceof Promise){if(!1===a.async)throw new o;return s.then(e=>t(e,i,a))}return t(s,i,a)}}v(e,"~standard",()=>({validate:t=>{try{const n=me(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return he(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}))}),an=i("$ZodString",(e,t)=>{on.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??ct(e._zod.bag),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=String(n.value)}catch(i){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),sn=i("$ZodStringFormat",(e,t)=>{Bt.init(e,t),an.init(e,t)}),ln=i("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Re),sn.init(e,t)}),cn=i("$ZodUUID",(e,t)=>{if(t.version){const e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=qe(e))}else t.pattern??(t.pattern=qe());sn.init(e,t)}),un=i("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Ve),sn.init(e,t)}),dn=i("$ZodURL",(e,t)=>{sn.init(e,t),e._zod.check=n=>{try{const i=n.value.trim(),r=new URL(i);return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),void(t.normalize?n.value=r.href:n.value=i)}catch(i){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),pn=i("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=We()),sn.init(e,t)}),mn=i("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Pe),sn.init(e,t)}),fn=i("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Ue),sn.init(e,t)}),hn=i("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Ae),sn.init(e,t)}),gn=i("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Ne),sn.init(e,t)}),vn=i("$ZodXID",(e,t)=>{t.pattern??(t.pattern=De),sn.init(e,t)}),bn=i("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=je),sn.init(e,t)}),yn=i("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=lt(t)),sn.init(e,t)}),$n=i("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=ot),sn.init(e,t)}),_n=i("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=st(t)),sn.init(e,t)}),kn=i("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Ze),sn.init(e,t)}),wn=i("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Je),sn.init(e,t),e._zod.bag.format="ipv4"}),xn=i("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Ge),sn.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),Sn=i("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Ke(t.delimiter)),sn.init(e,t),e._zod.bag.format="mac"}),In=i("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Xe),sn.init(e,t)}),En=i("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Ye),sn.init(e,t),e._zod.check=n=>{const i=n.value.split("/");try{if(2!==i.length)throw new Error;const[e,t]=i;if(!t)throw new Error;const n=Number(t);if(`${n}`!==t)throw new Error;if(n<0||n>128)throw new Error;new URL(`http://[${e}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Tn(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const zn=i("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Qe),sn.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Tn(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Cn(e){if(!et.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return Tn(t.padEnd(4*Math.ceil(t.length/4),"="))}const On=i("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=et),sn.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Cn(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Un=i("$ZodE164",(e,t)=>{t.pattern??(t.pattern=it),sn.init(e,t)});function An(e,t=null){try{const n=e.split(".");if(3!==n.length)return!1;const[i]=n;if(!i)return!1;const r=JSON.parse(atob(i));return(!("typ"in r)||"JWT"===r?.typ)&&(!!r.alg&&(!t||"alg"in r&&r.alg===t))}catch{return!1}}const Nn=i("$ZodJWT",(e,t)=>{sn.init(e,t),e._zod.check=n=>{An(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Dn=i("$ZodCustomStringFormat",(e,t)=>{sn.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),jn=i("$ZodNumber",(e,t)=>{on.init(e,t),e._zod.pattern=e._zod.bag.pattern??pt,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Number(n.value)}catch(e){}const r=n.value;if("number"==typeof r&&!Number.isNaN(r)&&Number.isFinite(r))return n;const o="number"==typeof r?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...o?{received:o}:{}}),n}}),Pn=i("$ZodNumberFormat",(e,t)=>{Pt.init(e,t),jn.init(e,t)}),Zn=i("$ZodBoolean",(e,t)=>{on.init(e,t),e._zod.pattern=mt,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Boolean(n.value)}catch(e){}const r=n.value;return"boolean"==typeof r||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}}),Rn=i("$ZodBigInt",(e,t)=>{on.init(e,t),e._zod.pattern=ut,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch(e){}return"bigint"==typeof n.value||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),qn=i("$ZodBigIntFormat",(e,t)=>{Zt.init(e,t),Rn.init(e,t)}),Mn=i("$ZodSymbol",(e,t)=>{on.init(e,t),e._zod.parse=(t,n)=>{const i=t.value;return"symbol"==typeof i||t.issues.push({expected:"symbol",code:"invalid_type",input:i,inst:e}),t}}),Ln=i("$ZodUndefined",(e,t)=>{on.init(e,t),e._zod.pattern=ht,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(t,n)=>{const i=t.value;return void 0===i||t.issues.push({expected:"undefined",code:"invalid_type",input:i,inst:e}),t}}),Fn=i("$ZodNull",(e,t)=>{on.init(e,t),e._zod.pattern=ft,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{const i=t.value;return null===i||t.issues.push({expected:"null",code:"invalid_type",input:i,inst:e}),t}}),Vn=i("$ZodAny",(e,t)=>{on.init(e,t),e._zod.parse=e=>e}),Bn=i("$ZodUnknown",(e,t)=>{on.init(e,t),e._zod.parse=e=>e}),Hn=i("$ZodNever",(e,t)=>{on.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)}),Wn=i("$ZodVoid",(e,t)=>{on.init(e,t),e._zod.parse=(t,n)=>{const i=t.value;return void 0===i||t.issues.push({expected:"void",code:"invalid_type",input:i,inst:e}),t}}),Jn=i("$ZodDate",(e,t)=>{on.init(e,t),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=new Date(n.value)}catch(e){}const r=n.value,o=r instanceof Date;return o&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...o?{received:"Invalid Date"}:{},inst:e}),n}});function Gn(e,t,n){e.issues.length&&t.issues.push(...V(n,e.issues)),t.value[n]=e.value}const Kn=i("$ZodArray",(e,t)=>{on.init(e,t),e._zod.parse=(n,i)=>{const r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);const o=[];for(let e=0;e<r.length;e++){const a=r[e],s=t.element._zod.run({value:a,issues:[]},i);s instanceof Promise?o.push(s.then(t=>Gn(t,n,e))):Gn(s,n,e)}return o.length?Promise.all(o).then(()=>n):n}});function Xn(e,t,n,i,r){if(e.issues.length){if(r&&!(n in i))return;t.issues.push(...V(n,e.issues))}void 0===e.value?n in i&&(t.value[n]=void 0):t.value[n]=e.value}function Yn(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const n=A(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Qn(e,t,n,i,r,o){const a=[],s=r.keySet,l=r.catchall._zod,c=l.def.type,u="optional"===l.optout;for(const r in t){if(s.has(r))continue;if("never"===c){a.push(r);continue}const o=l.run({value:t[r],issues:[]},i);o instanceof Promise?e.push(o.then(e=>Xn(e,n,r,t,u))):Xn(o,n,r,t,u)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}const ei=i("$ZodObject",(e,t)=>{on.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!n?.get){const e=t.shape;Object.defineProperty(t,"shape",{get:()=>{const n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}const i=p(()=>Yn(t));v(e._zod,"propValues",()=>{const e=t.shape,n={};for(const t in e){const i=e[t]._zod;if(i.values){n[t]??(n[t]=new Set);for(const e of i.values)n[t].add(e)}}return n});const r=w,o=t.catchall;let a;e._zod.parse=(t,n)=>{a??(a=i.value);const s=t.value;if(!r(s))return t.issues.push({expected:"object",code:"invalid_type",input:s,inst:e}),t;t.value={};const l=[],c=a.shape;for(const e of a.keys){const i=c[e],r="optional"===i._zod.optout,o=i._zod.run({value:s[e],issues:[]},n);o instanceof Promise?l.push(o.then(n=>Xn(n,t,e,s,r))):Xn(o,t,e,s,r)}return o?Qn(l,s,t,n,i.value,e):l.length?Promise.all(l).then(()=>t):t}}),ti=i("$ZodObjectJIT",(e,t)=>{ei.init(e,t);const n=e._zod.parse,i=p(()=>Yn(t));let r;const o=w,a=!s.jitless,l=a&&x.value,c=t.catchall;let u;e._zod.parse=(s,d)=>{u??(u=i.value);const p=s.value;return o(p)?a&&l&&!1===d?.async&&!0!==d.jitless?(r||(r=(e=>{const t=new nn(["shape","payload","ctx"]),n=i.value,r=e=>{const t=$(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");const o=Object.create(null);let a=0;for(const e of n.keys)o[e]="key_"+a++;t.write("const newResult = {};");for(const i of n.keys){const n=o[i],a=$(i),s=e[i],l="optional"===s?._zod?.optout;t.write(`const ${n} = ${r(i)};`),l?t.write(`\n if (${n}.issues.length) {\n if (${a} in input) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${a}, ...iss.path] : [${a}]\n })));\n }\n }\n \n if (${n}.value === undefined) {\n if (${a} in input) {\n newResult[${a}] = undefined;\n }\n } else {\n newResult[${a}] = ${n}.value;\n }\n \n `):t.write(`\n if (${n}.issues.length) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${a}, ...iss.path] : [${a}]\n })));\n }\n \n if (${n}.value === undefined) {\n if (${a} in input) {\n newResult[${a}] = undefined;\n }\n } else {\n newResult[${a}] = ${n}.value;\n }\n \n `)}t.write("payload.value = newResult;"),t.write("return payload;");const s=t.compile();return(t,n)=>s(e,t,n)})(t.shape)),s=r(s,d),c?Qn([],p,s,d,u,e):s):n(s,d):(s.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),s)}});function ni(e,t,n,i){for(const n of e)if(0===n.issues.length)return t.value=n.value,t;const r=e.filter(e=>!F(e));return 1===r.length?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>H(e,i,l())))}),t)}const ii=i("$ZodUnion",(e,t)=>{on.init(e,t),v(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),v(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),v(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),v(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){const e=t.options.map(e=>e._zod.pattern);return new RegExp(`^(${e.map(e=>f(e.source)).join("|")})$`)}});const n=1===t.options.length,i=t.options[0]._zod.run;e._zod.parse=(r,o)=>{if(n)return i(r,o);let a=!1;const s=[];for(const e of t.options){const t=e._zod.run({value:r.value,issues:[]},o);if(t instanceof Promise)s.push(t),a=!0;else{if(0===t.issues.length)return t;s.push(t)}}return a?Promise.all(s).then(t=>ni(t,r,e,o)):ni(s,r,e,o)}});function ri(e,t,n,i){const r=e.filter(e=>0===e.issues.length);return 1===r.length?(t.value=r[0].value,t):(0===r.length?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>H(e,i,l())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t)}const oi=i("$ZodXor",(e,t)=>{ii.init(e,t),t.inclusive=!1;const n=1===t.options.length,i=t.options[0]._zod.run;e._zod.parse=(r,o)=>{if(n)return i(r,o);let a=!1;const s=[];for(const e of t.options){const t=e._zod.run({value:r.value,issues:[]},o);t instanceof Promise?(s.push(t),a=!0):s.push(t)}return a?Promise.all(s).then(t=>ri(t,r,e,o)):ri(s,r,e,o)}}),ai=i("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,ii.init(e,t);const n=e._zod.parse;v(e._zod,"propValues",()=>{const e={};for(const n of t.options){const i=n._zod.propValues;if(!i||0===Object.keys(i).length)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(const[t,n]of Object.entries(i)){e[t]||(e[t]=new Set);for(const i of n)e[t].add(i)}}return e});const i=p(()=>{const e=t.options,n=new Map;for(const i of e){const e=i._zod.propValues?.[t.discriminator];if(!e||0===e.size)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const t of e){if(n.has(t))throw new Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,i)}}return n});e._zod.parse=(r,o)=>{const a=r.value;if(!w(a))return r.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),r;const s=i.value.get(a?.[t.discriminator]);return s?s._zod.run(r,o):t.unionFallback?n(r,o):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:a,path:[t.discriminator],inst:e}),r)}}),si=i("$ZodIntersection",(e,t)=>{on.init(e,t),e._zod.parse=(e,n)=>{const i=e.value,r=t.left._zod.run({value:i,issues:[]},n),o=t.right._zod.run({value:i,issues:[]},n);return r instanceof Promise||o instanceof Promise?Promise.all([r,o]).then(([t,n])=>ci(e,t,n)):ci(e,r,o)}});function li(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e===+t)return{valid:!0,data:e};if(S(e)&&S(t)){const n=Object.keys(t),i=Object.keys(e).filter(e=>-1!==n.indexOf(e)),r={...e,...t};for(const n of i){const i=li(e[n],t[n]);if(!i.valid)return{valid:!1,mergeErrorPath:[n,...i.mergeErrorPath]};r[n]=i.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let i=0;i<e.length;i++){const r=li(e[i],t[i]);if(!r.valid)return{valid:!1,mergeErrorPath:[i,...r.mergeErrorPath]};n.push(r.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function ci(e,t,n){const i=new Map;let r;for(const n of t.issues)if("unrecognized_keys"===n.code){r??(r=n);for(const e of n.keys)i.has(e)||i.set(e,{}),i.get(e).l=!0}else e.issues.push(n);for(const t of n.issues)if("unrecognized_keys"===t.code)for(const e of t.keys)i.has(e)||i.set(e,{}),i.get(e).r=!0;else e.issues.push(t);const o=[...i].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(o.length&&r&&e.issues.push({...r,keys:o}),F(e))return e;const a=li(t.value,n.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}const ui=i("$ZodTuple",(e,t)=>{on.init(e,t);const n=t.items;e._zod.parse=(i,r)=>{const o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];const a=[],s=[...n].reverse().findIndex(e=>"optional"!==e._zod.optin),l=-1===s?0:n.length-s;if(!t.rest){const t=o.length>n.length,r=o.length<l-1;if(t||r)return i.issues.push({...t?{code:"too_big",maximum:n.length,inclusive:!0}:{code:"too_small",minimum:n.length},input:o,inst:e,origin:"array"}),i}let c=-1;for(const e of n){if(c++,c>=o.length&&c>=l)continue;const t=e._zod.run({value:o[c],issues:[]},r);t instanceof Promise?a.push(t.then(e=>di(e,i,c))):di(t,i,c)}if(t.rest){const e=o.slice(n.length);for(const n of e){c++;const e=t.rest._zod.run({value:n,issues:[]},r);e instanceof Promise?a.push(e.then(e=>di(e,i,c))):di(e,i,c)}}return a.length?Promise.all(a).then(()=>i):i}});function di(e,t,n){e.issues.length&&t.issues.push(...V(n,e.issues)),t.value[n]=e.value}const pi=i("$ZodRecord",(e,t)=>{on.init(e,t),e._zod.parse=(n,i)=>{const r=n.value;if(!S(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;const o=[],a=t.keyType._zod.values;if(a){n.value={};const s=new Set;for(const e of a)if("string"==typeof e||"number"==typeof e||"symbol"==typeof e){s.add("number"==typeof e?e.toString():e);const a=t.valueType._zod.run({value:r[e],issues:[]},i);a instanceof Promise?o.push(a.then(t=>{t.issues.length&&n.issues.push(...V(e,t.issues)),n.value[e]=t.value})):(a.issues.length&&n.issues.push(...V(e,a.issues)),n.value[e]=a.value)}let l;for(const e in r)s.has(e)||(l=l??[],l.push(e));l&&l.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:l})}else{n.value={};for(const a of Reflect.ownKeys(r)){if("__proto__"===a)continue;let s=t.keyType._zod.run({value:a,issues:[]},i);if(s instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if("string"==typeof a&&pt.test(a)&&s.issues.length){const e=t.keyType._zod.run({value:Number(a),issues:[]},i);if(e instanceof Promise)throw new Error("Async schemas not supported in object keys currently");0===e.issues.length&&(s=e)}if(s.issues.length){"loose"===t.mode?n.value[a]=r[a]:n.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map(e=>H(e,i,l())),input:a,path:[a],inst:e});continue}const c=t.valueType._zod.run({value:r[a],issues:[]},i);c instanceof Promise?o.push(c.then(e=>{e.issues.length&&n.issues.push(...V(a,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...V(a,c.issues)),n.value[s.value]=c.value)}}return o.length?Promise.all(o).then(()=>n):n}}),mi=i("$ZodMap",(e,t)=>{on.init(e,t),e._zod.parse=(n,i)=>{const r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:e}),n;const o=[];n.value=new Map;for(const[a,s]of r){const l=t.keyType._zod.run({value:a,issues:[]},i),c=t.valueType._zod.run({value:s,issues:[]},i);l instanceof Promise||c instanceof Promise?o.push(Promise.all([l,c]).then(([t,o])=>{fi(t,o,n,a,r,e,i)})):fi(l,c,n,a,r,e,i)}return o.length?Promise.all(o).then(()=>n):n}});function fi(e,t,n,i,r,o,a){e.issues.length&&(E.has(typeof i)?n.issues.push(...V(i,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:o,issues:e.issues.map(e=>H(e,a,l()))})),t.issues.length&&(E.has(typeof i)?n.issues.push(...V(i,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:o,key:i,issues:t.issues.map(e=>H(e,a,l()))})),n.value.set(e.value,t.value)}const hi=i("$ZodSet",(e,t)=>{on.init(e,t),e._zod.parse=(n,i)=>{const r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:e,expected:"set",code:"invalid_type"}),n;const o=[];n.value=new Set;for(const e of r){const r=t.valueType._zod.run({value:e,issues:[]},i);r instanceof Promise?o.push(r.then(e=>gi(e,n))):gi(r,n)}return o.length?Promise.all(o).then(()=>n):n}});function gi(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}const vi=i("$ZodEnum",(e,t)=>{on.init(e,t);const n=c(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(e=>E.has(typeof e)).map(e=>"string"==typeof e?z(e):e.toString()).join("|")})$`),e._zod.parse=(t,r)=>{const o=t.value;return i.has(o)||t.issues.push({code:"invalid_value",values:n,input:o,inst:e}),t}}),bi=i("$ZodLiteral",(e,t)=>{if(on.init(e,t),0===t.values.length)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(e=>"string"==typeof e?z(e):e?z(e.toString()):String(e)).join("|")})$`),e._zod.parse=(i,r)=>{const o=i.value;return n.has(o)||i.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),i}}),yi=i("$ZodFile",(e,t)=>{on.init(e,t),e._zod.parse=(t,n)=>{const i=t.value;return i instanceof File||t.issues.push({expected:"file",code:"invalid_type",input:i,inst:e}),t}}),$i=i("$ZodTransform",(e,t)=>{on.init(e,t),e._zod.parse=(n,i)=>{if("backward"===i.direction)throw new a(e.constructor.name);const r=t.transform(n.value,n);if(i.async){return(r instanceof Promise?r:Promise.resolve(r)).then(e=>(n.value=e,n))}if(r instanceof Promise)throw new o;return n.value=r,n}});function _i(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}const ki=i("$ZodOptional",(e,t)=>{on.init(e,t),e._zod.optin="optional",e._zod.optout="optional",v(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),v(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${f(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if("optional"===t.innerType._zod.optin){const i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(t=>_i(t,e.value)):_i(i,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),wi=i("$ZodExactOptional",(e,t)=>{ki.init(e,t),v(e._zod,"values",()=>t.innerType._zod.values),v(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),xi=i("$ZodNullable",(e,t)=>{on.init(e,t),v(e._zod,"optin",()=>t.innerType._zod.optin),v(e._zod,"optout",()=>t.innerType._zod.optout),v(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${f(e.source)}|null)$`):void 0}),v(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)}),Si=i("$ZodDefault",(e,t)=>{on.init(e,t),e._zod.optin="optional",v(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;const i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>Ii(e,t)):Ii(i,t)}});function Ii(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const Ei=i("$ZodPrefault",(e,t)=>{on.init(e,t),e._zod.optin="optional",v(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>("backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Ti=i("$ZodNonOptional",(e,t)=>{on.init(e,t),v(e._zod,"values",()=>{const e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(n,i)=>{const r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(t=>zi(t,e)):zi(r,e)}});function zi(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Ci=i("$ZodSuccess",(e,t)=>{on.init(e,t),e._zod.parse=(e,n)=>{if("backward"===n.direction)throw new a("ZodSuccess");const i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(t=>(e.value=0===t.issues.length,e)):(e.value=0===i.issues.length,e)}}),Oi=i("$ZodCatch",(e,t)=>{on.init(e,t),v(e._zod,"optin",()=>t.innerType._zod.optin),v(e._zod,"optout",()=>t.innerType._zod.optout),v(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(i=>(e.value=i.value,i.issues.length&&(e.value=t.catchValue({...e,error:{issues:i.issues.map(e=>H(e,n,l()))},input:e.value}),e.issues=[]),e)):(e.value=i.value,i.issues.length&&(e.value=t.catchValue({...e,error:{issues:i.issues.map(e=>H(e,n,l()))},input:e.value}),e.issues=[]),e)}}),Ui=i("$ZodNaN",(e,t)=>{on.init(e,t),e._zod.parse=(t,n)=>("number"==typeof t.value&&Number.isNaN(t.value)||t.issues.push({input:t.value,inst:e,expected:"nan",code:"invalid_type"}),t)}),Ai=i("$ZodPipe",(e,t)=>{on.init(e,t),v(e._zod,"values",()=>t.in._zod.values),v(e._zod,"optin",()=>t.in._zod.optin),v(e._zod,"optout",()=>t.out._zod.optout),v(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("backward"===n.direction){const i=t.out._zod.run(e,n);return i instanceof Promise?i.then(e=>Ni(e,t.in,n)):Ni(i,t.in,n)}const i=t.in._zod.run(e,n);return i instanceof Promise?i.then(e=>Ni(e,t.out,n)):Ni(i,t.out,n)}});function Ni(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const Di=i("$ZodCodec",(e,t)=>{on.init(e,t),v(e._zod,"values",()=>t.in._zod.values),v(e._zod,"optin",()=>t.in._zod.optin),v(e._zod,"optout",()=>t.out._zod.optout),v(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("forward"===(n.direction||"forward")){const i=t.in._zod.run(e,n);return i instanceof Promise?i.then(e=>ji(e,t,n)):ji(i,t,n)}{const i=t.out._zod.run(e,n);return i instanceof Promise?i.then(e=>ji(e,t,n)):ji(i,t,n)}}});function ji(e,t,n){if(e.issues.length)return e.aborted=!0,e;if("forward"===(n.direction||"forward")){const i=t.transform(e.value,e);return i instanceof Promise?i.then(i=>Pi(e,i,t.out,n)):Pi(e,i,t.out,n)}{const i=t.reverseTransform(e.value,e);return i instanceof Promise?i.then(i=>Pi(e,i,t.in,n)):Pi(e,i,t.in,n)}}function Pi(e,t,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},i)}const Zi=i("$ZodReadonly",(e,t)=>{on.init(e,t),v(e._zod,"propValues",()=>t.innerType._zod.propValues),v(e._zod,"values",()=>t.innerType._zod.values),v(e._zod,"optin",()=>t.innerType?._zod?.optin),v(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(Ri):Ri(i)}});function Ri(e){return e.value=Object.freeze(e.value),e}const qi=i("$ZodTemplateLiteral",(e,t)=>{on.init(e,t);const n=[];for(const e of t.parts)if("object"==typeof e&&null!==e){if(!e._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);const t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw new Error(`Invalid template literal part: ${e._zod.traits}`);const i=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;n.push(t.slice(i,r))}else{if(null!==e&&!T.has(typeof e))throw new Error(`Invalid template literal part: ${e}`);n.push(z(`${e}`))}e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(n,i)=>"string"!=typeof n.value?(n.issues.push({input:n.value,inst:e,expected:"string",code:"invalid_type"}),n):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),n)}),Mi=i("$ZodFunction",(e,t)=>(on.init(e,t),e._def=t,e._zod.def=t,e.implement=t=>{if("function"!=typeof t)throw new Error("implement() must be called with a function");return function(...n){const i=e._def.input?ce(e._def.input,n):n,r=Reflect.apply(t,this,i);return e._def.output?ce(e._def.output,r):r}},e.implementAsync=t=>{if("function"!=typeof t)throw new Error("implementAsync() must be called with a function");return async function(...n){const i=e._def.input?await de(e._def.input,n):n,r=await Reflect.apply(t,this,i);return e._def.output?await de(e._def.output,r):r}},e._zod.parse=(t,n)=>{if("function"!=typeof t.value)return t.issues.push({code:"invalid_type",expected:"function",input:t.value,inst:e}),t;const i=e._def.output&&"promise"===e._def.output._zod.def.type;return t.value=i?e.implementAsync(t.value):e.implement(t.value),t},e.input=(...t)=>{const n=e.constructor;return Array.isArray(t[0])?new n({type:"function",input:new ui({type:"tuple",items:t[0],rest:t[1]}),output:e._def.output}):new n({type:"function",input:t[0],output:e._def.output})},e.output=t=>new(0,e.constructor)({type:"function",input:e._def.input,output:t}),e)),Li=i("$ZodPromise",(e,t)=>{on.init(e,t),e._zod.parse=(e,n)=>Promise.resolve(e.value).then(e=>t.innerType._zod.run({value:e,issues:[]},n))}),Fi=i("$ZodLazy",(e,t)=>{on.init(e,t),v(e._zod,"innerType",()=>t.getter()),v(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),v(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),v(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),v(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),Vi=i("$ZodCustom",(e,t)=>{Ut.init(e,t),on.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{const i=n.value,r=t.fn(i);if(r instanceof Promise)return r.then(t=>Bi(t,n,i,e));Bi(r,n,i,e)}});function Bi(e,t,n,i){if(!e){const e={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(e.params=i._zod.def.params),t.issues.push(K(e))}}const Hi=()=>{const e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function t(t){return e[t]??null}const n={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",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`مدخلات غير مقبولة: يفترض إدخال instanceof ${e.expected}، ولكن تم إدخال ${r}`:`مدخلات غير مقبولة: يفترض إدخال ${t}، ولكن تم إدخال ${r}`}case"invalid_value":return 1===e.values.length?`مدخلات غير مقبولة: يفترض إدخال ${U(e.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?` أكبر من اللازم: يفترض أن تكون ${e.origin??"القيمة"} ${n} ${e.maximum.toString()} ${i.unit??"عنصر"}`:`أكبر من اللازم: يفترض أن تكون ${e.origin??"القيمة"} ${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()} ${i.unit}`:`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`نَص غير مقبول: يجب أن يبدأ بـ "${e.prefix}"`:"ends_with"===t.format?`نَص غير مقبول: يجب أن ينتهي بـ "${t.suffix}"`:"includes"===t.format?`نَص غير مقبول: يجب أن يتضمَّن "${t.includes}"`:"regex"===t.format?`نَص غير مقبول: يجب أن يطابق النمط ${t.pattern}`:`${n[t.format]??e.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${e.divisor}`;case"unrecognized_keys":return`معرف${e.keys.length>1?"ات":""} غريب${e.keys.length>1?"ة":""}: ${u(e.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${e.origin}`;case"invalid_union":default:return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${e.origin}`}}};const Wi=()=>{const e={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"}};function t(t){return e[t]??null}const n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Yanlış dəyər: gözlənilən instanceof ${e.expected}, daxil olan ${r}`:`Yanlış dəyər: gözlənilən ${t}, daxil olan ${r}`}case"invalid_value":return 1===e.values.length?`Yanlış dəyər: gözlənilən ${U(e.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Çox böyük: gözlənilən ${e.origin??"dəyər"} ${n}${e.maximum.toString()} ${i.unit??"element"}`:`Çox böyük: gözlənilən ${e.origin??"dəyər"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()} ${i.unit}`:`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Yanlış mətn: "${t.prefix}" ilə başlamalıdır`:"ends_with"===t.format?`Yanlış mətn: "${t.suffix}" ilə bitməlidir`:"includes"===t.format?`Yanlış mətn: "${t.includes}" daxil olmalıdır`:"regex"===t.format?`Yanlış mətn: ${t.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${n[t.format]??e.format}`}case"not_multiple_of":return`Yanlış ədəd: ${e.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${e.keys.length>1?"lar":""}: ${u(e.keys,", ")}`;case"invalid_key":return`${e.origin} daxilində yanlış açar`;case"invalid_union":default:return"Yanlış dəyər";case"invalid_element":return`${e.origin} daxilində yanlış dəyər`}}};function Ji(e,t,n,i){const r=Math.abs(e),o=r%10,a=r%100;return a>=11&&a<=19?i:1===o?t:o>=2&&o<=4?n:i}const Gi=()=>{const e={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function t(t){return e[t]??null}const n={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 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"},i={nan:"NaN",number:"лік",array:"масіў"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Няправільны ўвод: чакаўся instanceof ${e.expected}, атрымана ${r}`:`Няправільны ўвод: чакаўся ${t}, атрымана ${r}`}case"invalid_value":return 1===e.values.length?`Няправільны ўвод: чакалася ${U(e.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);if(i){const t=Ji(Number(e.maximum),i.unit.one,i.unit.few,i.unit.many);return`Занадта вялікі: чакалася, што ${e.origin??"значэнне"} павінна ${i.verb} ${n}${e.maximum.toString()} ${t}`}return`Занадта вялікі: чакалася, што ${e.origin??"значэнне"} павінна быць ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);if(i){const t=Ji(Number(e.minimum),i.unit.one,i.unit.few,i.unit.many);return`Занадта малы: чакалася, што ${e.origin} павінна ${i.verb} ${n}${e.minimum.toString()} ${t}`}return`Занадта малы: чакалася, што ${e.origin} павінна быць ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Няправільны радок: павінен пачынацца з "${t.prefix}"`:"ends_with"===t.format?`Няправільны радок: павінен заканчвацца на "${t.suffix}"`:"includes"===t.format?`Няправільны радок: павінен змяшчаць "${t.includes}"`:"regex"===t.format?`Няправільны радок: павінен адпавядаць шаблону ${t.pattern}`:`Няправільны ${n[t.format]??e.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${e.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${e.keys.length>1?"ключы":"ключ"}: ${u(e.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${e.origin}`;case"invalid_union":default:return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${e.origin}`}}};const Ki=()=>{const e={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function t(t){return e[t]??null}const n={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 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",jwt:"JWT",template_literal:"вход"},i={nan:"NaN",number:"число",array:"масив"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Невалиден вход: очакван instanceof ${e.expected}, получен ${r}`:`Невалиден вход: очакван ${t}, получен ${r}`}case"invalid_value":return 1===e.values.length?`Невалиден вход: очакван ${U(e.values[0])}`:`Невалидна опция: очаквано едно от ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Твърде голямо: очаква се ${e.origin??"стойност"} да съдържа ${n}${e.maximum.toString()} ${i.unit??"елемента"}`:`Твърде голямо: очаква се ${e.origin??"стойност"} да бъде ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Твърде малко: очаква се ${e.origin} да съдържа ${n}${e.minimum.toString()} ${i.unit}`:`Твърде малко: очаква се ${e.origin} да бъде ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;if("starts_with"===t.format)return`Невалиден низ: трябва да започва с "${t.prefix}"`;if("ends_with"===t.format)return`Невалиден низ: трябва да завършва с "${t.suffix}"`;if("includes"===t.format)return`Невалиден низ: трябва да включва "${t.includes}"`;if("regex"===t.format)return`Невалиден низ: трябва да съвпада с ${t.pattern}`;let i="Невалиден";return"emoji"===t.format&&(i="Невалидно"),"datetime"===t.format&&(i="Невалидно"),"date"===t.format&&(i="Невалидна"),"time"===t.format&&(i="Невалидно"),"duration"===t.format&&(i="Невалидна"),`${i} ${n[t.format]??e.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${e.divisor}`;case"unrecognized_keys":return`Неразпознат${e.keys.length>1?"и":""} ключ${e.keys.length>1?"ове":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${e.origin}`;case"invalid_union":default:return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${e.origin}`}}};const Xi=()=>{const e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(t){return e[t]??null}const n={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",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",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Tipus invàlid: s'esperava instanceof ${e.expected}, s'ha rebut ${r}`:`Tipus invàlid: s'esperava ${t}, s'ha rebut ${r}`}case"invalid_value":return 1===e.values.length?`Valor invàlid: s'esperava ${U(e.values[0])}`:`Opció invàlida: s'esperava una de ${u(e.values," o ")}`;case"too_big":{const n=e.inclusive?"com a màxim":"menys de",i=t(e.origin);return i?`Massa gran: s'esperava que ${e.origin??"el valor"} contingués ${n} ${e.maximum.toString()} ${i.unit??"elements"}`:`Massa gran: s'esperava que ${e.origin??"el valor"} fos ${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?"com a mínim":"més de",i=t(e.origin);return i?`Massa petit: s'esperava que ${e.origin} contingués ${n} ${e.minimum.toString()} ${i.unit}`:`Massa petit: s'esperava que ${e.origin} fos ${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Format invàlid: ha de començar amb "${t.prefix}"`:"ends_with"===t.format?`Format invàlid: ha d'acabar amb "${t.suffix}"`:"includes"===t.format?`Format invàlid: ha d'incloure "${t.includes}"`:"regex"===t.format?`Format invàlid: ha de coincidir amb el patró ${t.pattern}`:`Format invàlid per a ${n[t.format]??e.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${e.divisor}`;case"unrecognized_keys":return`Clau${e.keys.length>1?"s":""} no reconeguda${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${e.origin}`;case"invalid_union":default:return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${e.origin}`}}};const Yi=()=>{const e={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function t(t){return e[t]??null}const n={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",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",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Neplatný vstup: očekáváno instanceof ${e.expected}, obdrženo ${r}`:`Neplatný vstup: očekáváno ${t}, obdrženo ${r}`}case"invalid_value":return 1===e.values.length?`Neplatný vstup: očekáváno ${U(e.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Hodnota je příliš velká: ${e.origin??"hodnota"} musí mít ${n}${e.maximum.toString()} ${i.unit??"prvků"}`:`Hodnota je příliš velká: ${e.origin??"hodnota"} musí být ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Hodnota je příliš malá: ${e.origin??"hodnota"} musí mít ${n}${e.minimum.toString()} ${i.unit??"prvků"}`:`Hodnota je příliš malá: ${e.origin??"hodnota"} musí být ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Neplatný řetězec: musí začínat na "${t.prefix}"`:"ends_with"===t.format?`Neplatný řetězec: musí končit na "${t.suffix}"`:"includes"===t.format?`Neplatný řetězec: musí obsahovat "${t.includes}"`:"regex"===t.format?`Neplatný řetězec: musí odpovídat vzoru ${t.pattern}`:`Neplatný formát ${n[t.format]??e.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${e.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${u(e.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${e.origin}`;case"invalid_union":default:return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${e.origin}`}}};const Qi=()=>{const e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(t){return e[t]??null}const n={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-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldigt input: forventede instanceof ${e.expected}, fik ${r}`:`Ugyldigt input: forventede ${t}, fik ${r}`}case"invalid_value":return 1===e.values.length?`Ugyldig værdi: forventede ${U(e.values[0])}`:`Ugyldigt valg: forventede en af følgende ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",r=t(e.origin),o=i[e.origin]??e.origin;return r?`For stor: forventede ${o??"value"} ${r.verb} ${n} ${e.maximum.toString()} ${r.unit??"elementer"}`:`For stor: forventede ${o??"value"} havde ${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",r=t(e.origin),o=i[e.origin]??e.origin;return r?`For lille: forventede ${o} ${r.verb} ${n} ${e.minimum.toString()} ${r.unit}`:`For lille: forventede ${o} havde ${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ugyldig streng: skal starte med "${t.prefix}"`:"ends_with"===t.format?`Ugyldig streng: skal ende med "${t.suffix}"`:"includes"===t.format?`Ugyldig streng: skal indeholde "${t.includes}"`:"regex"===t.format?`Ugyldig streng: skal matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${u(e.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${e.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${e.origin}`;default:return"Ugyldigt input"}}};const er=()=>{const e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(t){return e[t]??null}const n={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",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Ungültige Eingabe: erwartet instanceof ${e.expected}, erhalten ${r}`:`Ungültige Eingabe: erwartet ${t}, erhalten ${r}`}case"invalid_value":return 1===e.values.length?`Ungültige Eingabe: erwartet ${U(e.values[0])}`:`Ungültige Option: erwartet eine von ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Zu groß: erwartet, dass ${e.origin??"Wert"} ${n}${e.maximum.toString()} ${i.unit??"Elemente"} hat`:`Zu groß: erwartet, dass ${e.origin??"Wert"} ${n}${e.maximum.toString()} ist`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ${i.unit} hat`:`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ist`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ungültiger String: muss mit "${t.prefix}" beginnen`:"ends_with"===t.format?`Ungültiger String: muss mit "${t.suffix}" enden`:"includes"===t.format?`Ungültiger String: muss "${t.includes}" enthalten`:"regex"===t.format?`Ungültiger String: muss dem Muster ${t.pattern} entsprechen`:`Ungültig: ${n[t.format]??e.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${e.divisor} sein`;case"unrecognized_keys":return`${e.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${u(e.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${e.origin}`;case"invalid_union":default:return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${e.origin}`}}};const tr=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(t){return e[t]??null}const n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input);return`Invalid input: expected ${t}, received ${i[n]??n}`}case"invalid_value":return 1===e.values.length?`Invalid input: expected ${U(e.values[0])}`:`Invalid option: expected one of ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Too big: expected ${e.origin??"value"} to have ${n}${e.maximum.toString()} ${i.unit??"elements"}`:`Too big: expected ${e.origin??"value"} to be ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${i.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Invalid string: must start with "${t.prefix}"`:"ends_with"===t.format?`Invalid string: must end with "${t.suffix}"`:"includes"===t.format?`Invalid string: must include "${t.includes}"`:"regex"===t.format?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${e.divisor}`;case"unrecognized_keys":return`Unrecognized key${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Invalid key in ${e.origin}`;case"invalid_union":default:return"Invalid input";case"invalid_element":return`Invalid value in ${e.origin}`}}};function nr(){return{localeError:tr()}}const ir=()=>{const e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(t){return e[t]??null}const n={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",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",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Nevalida enigo: atendiĝis instanceof ${e.expected}, riceviĝis ${r}`:`Nevalida enigo: atendiĝis ${t}, riceviĝis ${r}`}case"invalid_value":return 1===e.values.length?`Nevalida enigo: atendiĝis ${U(e.values[0])}`:`Nevalida opcio: atendiĝis unu el ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Tro granda: atendiĝis ke ${e.origin??"valoro"} havu ${n}${e.maximum.toString()} ${i.unit??"elementojn"}`:`Tro granda: atendiĝis ke ${e.origin??"valoro"} havu ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Tro malgranda: atendiĝis ke ${e.origin} havu ${n}${e.minimum.toString()} ${i.unit}`:`Tro malgranda: atendiĝis ke ${e.origin} estu ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Nevalida karaktraro: devas komenciĝi per "${t.prefix}"`:"ends_with"===t.format?`Nevalida karaktraro: devas finiĝi per "${t.suffix}"`:"includes"===t.format?`Nevalida karaktraro: devas inkluzivi "${t.includes}"`:"regex"===t.format?`Nevalida karaktraro: devas kongrui kun la modelo ${t.pattern}`:`Nevalida ${n[t.format]??e.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${e.divisor}`;case"unrecognized_keys":return`Nekonata${e.keys.length>1?"j":""} ŝlosilo${e.keys.length>1?"j":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${e.origin}`;case"invalid_union":default:return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${e.origin}`}}};const rr=()=>{const e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(t){return e[t]??null}const n={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",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",jwt:"JWT",template_literal:"entrada"},i={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 e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Entrada inválida: se esperaba instanceof ${e.expected}, recibido ${r}`:`Entrada inválida: se esperaba ${t}, recibido ${r}`}case"invalid_value":return 1===e.values.length?`Entrada inválida: se esperaba ${U(e.values[0])}`:`Opción inválida: se esperaba una de ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",r=t(e.origin),o=i[e.origin]??e.origin;return r?`Demasiado grande: se esperaba que ${o??"valor"} tuviera ${n}${e.maximum.toString()} ${r.unit??"elementos"}`:`Demasiado grande: se esperaba que ${o??"valor"} fuera ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",r=t(e.origin),o=i[e.origin]??e.origin;return r?`Demasiado pequeño: se esperaba que ${o} tuviera ${n}${e.minimum.toString()} ${r.unit}`:`Demasiado pequeño: se esperaba que ${o} fuera ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Cadena inválida: debe comenzar con "${t.prefix}"`:"ends_with"===t.format?`Cadena inválida: debe terminar en "${t.suffix}"`:"includes"===t.format?`Cadena inválida: debe incluir "${t.includes}"`:"regex"===t.format?`Cadena inválida: debe coincidir con el patrón ${t.pattern}`:`Inválido ${n[t.format]??e.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${e.divisor}`;case"unrecognized_keys":return`Llave${e.keys.length>1?"s":""} desconocida${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Llave inválida en ${i[e.origin]??e.origin}`;case"invalid_union":default:return"Entrada inválida";case"invalid_element":return`Valor inválido en ${i[e.origin]??e.origin}`}}};const or=()=>{const e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function t(t){return e[t]??null}const n={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 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"},i={nan:"NaN",number:"عدد",array:"آرایه"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`ورودی نامعتبر: می‌بایست instanceof ${e.expected} می‌بود، ${r} دریافت شد`:`ورودی نامعتبر: می‌بایست ${t} می‌بود، ${r} دریافت شد`}case"invalid_value":return 1===e.values.length?`ورودی نامعتبر: می‌بایست ${U(e.values[0])} می‌بود`:`گزینه نامعتبر: می‌بایست یکی از ${u(e.values,"|")} می‌بود`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`خیلی بزرگ: ${e.origin??"مقدار"} باید ${n}${e.maximum.toString()} ${i.unit??"عنصر"} باشد`:`خیلی بزرگ: ${e.origin??"مقدار"} باید ${n}${e.maximum.toString()} باشد`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} ${i.unit} باشد`:`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} باشد`}case"invalid_format":{const t=e;return"starts_with"===t.format?`رشته نامعتبر: باید با "${t.prefix}" شروع شود`:"ends_with"===t.format?`رشته نامعتبر: باید با "${t.suffix}" تمام شود`:"includes"===t.format?`رشته نامعتبر: باید شامل "${t.includes}" باشد`:"regex"===t.format?`رشته نامعتبر: باید با الگوی ${t.pattern} مطابقت داشته باشد`:`${n[t.format]??e.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${e.divisor} باشد`;case"unrecognized_keys":return`کلید${e.keys.length>1?"های":""} ناشناس: ${u(e.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${e.origin}`;case"invalid_union":default:return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${e.origin}`}}};const ar=()=>{const e={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function t(t){return e[t]??null}const n={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",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Virheellinen tyyppi: odotettiin instanceof ${e.expected}, oli ${r}`:`Virheellinen tyyppi: odotettiin ${t}, oli ${r}`}case"invalid_value":return 1===e.values.length?`Virheellinen syöte: täytyy olla ${U(e.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Liian suuri: ${i.subject} täytyy olla ${n}${e.maximum.toString()} ${i.unit}`.trim():`Liian suuri: arvon täytyy olla ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Liian pieni: ${i.subject} täytyy olla ${n}${e.minimum.toString()} ${i.unit}`.trim():`Liian pieni: arvon täytyy olla ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Virheellinen syöte: täytyy alkaa "${t.prefix}"`:"ends_with"===t.format?`Virheellinen syöte: täytyy loppua "${t.suffix}"`:"includes"===t.format?`Virheellinen syöte: täytyy sisältää "${t.includes}"`:"regex"===t.format?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${t.pattern}`:`Virheellinen ${n[t.format]??e.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${e.divisor} monikerta`;case"unrecognized_keys":return`${e.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${u(e.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"}}};const sr=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(t){return e[t]??null}const n={regex:"entrée",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",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",jwt:"JWT",template_literal:"entrée"},i={nan:"NaN",number:"nombre",array:"tableau"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : instanceof ${e.expected} attendu, ${r} reçu`:`Entrée invalide : ${t} attendu, ${r} reçu`}case"invalid_value":return 1===e.values.length?`Entrée invalide : ${U(e.values[0])} attendu`:`Option invalide : une valeur parmi ${u(e.values,"|")} attendue`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Trop grand : ${e.origin??"valeur"} doit ${i.verb} ${n}${e.maximum.toString()} ${i.unit??"élément(s)"}`:`Trop grand : ${e.origin??"valeur"} doit être ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Trop petit : ${e.origin} doit ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`Trop petit : ${e.origin} doit être ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Chaîne invalide : doit commencer par "${t.prefix}"`:"ends_with"===t.format?`Chaîne invalide : doit se terminer par "${t.suffix}"`:"includes"===t.format?`Chaîne invalide : doit inclure "${t.includes}"`:"regex"===t.format?`Chaîne invalide : doit correspondre au modèle ${t.pattern}`:`${n[t.format]??e.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${e.divisor}`;case"unrecognized_keys":return`Clé${e.keys.length>1?"s":""} non reconnue${e.keys.length>1?"s":""} : ${u(e.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${e.origin}`;case"invalid_union":default:return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${e.origin}`}}};const lr=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(t){return e[t]??null}const n={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",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",jwt:"JWT",template_literal:"entrée"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : attendu instanceof ${e.expected}, reçu ${r}`:`Entrée invalide : attendu ${t}, reçu ${r}`}case"invalid_value":return 1===e.values.length?`Entrée invalide : attendu ${U(e.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"≤":"<",i=t(e.origin);return i?`Trop grand : attendu que ${e.origin??"la valeur"} ait ${n}${e.maximum.toString()} ${i.unit}`:`Trop grand : attendu que ${e.origin??"la valeur"} soit ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?"≥":">",i=t(e.origin);return i?`Trop petit : attendu que ${e.origin} ait ${n}${e.minimum.toString()} ${i.unit}`:`Trop petit : attendu que ${e.origin} soit ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Chaîne invalide : doit commencer par "${t.prefix}"`:"ends_with"===t.format?`Chaîne invalide : doit se terminer par "${t.suffix}"`:"includes"===t.format?`Chaîne invalide : doit inclure "${t.includes}"`:"regex"===t.format?`Chaîne invalide : doit correspondre au motif ${t.pattern}`:`${n[t.format]??e.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${e.divisor}`;case"unrecognized_keys":return`Clé${e.keys.length>1?"s":""} non reconnue${e.keys.length>1?"s":""} : ${u(e.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${e.origin}`;case"invalid_union":default:return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${e.origin}`}}};const cr=()=>{const e={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"}},t={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},n=t=>t?e[t]:void 0,i=t=>{const i=n(t);return i?i.label:t??e.unknown.label},r=e=>`ה${i(e)}`,o=e=>{const t=n(e);return"f"===(t?.gender??"m")?"צריכה להיות":"צריך להיות"},a=e=>e?t[e]??null:null,s={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",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"},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"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}},l={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{const n=t.expected,r=l[n??""]??i(n),o=G(t.input),a=l[o]??e[o]?.label??o;return/^[A-Z]/.test(t.expected)?`קלט לא תקין: צריך להיות instanceof ${t.expected}, התקבל ${a}`:`קלט לא תקין: צריך להיות ${r}, התקבל ${a}`}case"invalid_value":{if(1===t.values.length)return`ערך לא תקין: הערך חייב להיות ${U(t.values[0])}`;const e=t.values.map(e=>U(e));if(2===t.values.length)return`ערך לא תקין: האפשרויות המתאימות הן ${e[0]} או ${e[1]}`;const n=e[e.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${e.slice(0,-1).join(", ")} או ${n}`}case"too_big":{const e=a(t.origin),n=r(t.origin??"value");if("string"===t.origin)return`${e?.longLabel??"ארוך"} מדי: ${n} צריכה להכיל ${t.maximum.toString()} ${e?.unit??""} ${t.inclusive?"או פחות":"לכל היותר"}`.trim();if("number"===t.origin){return`גדול מדי: ${n} צריך להיות ${t.inclusive?`קטן או שווה ל-${t.maximum}`:`קטן מ-${t.maximum}`}`}if("array"===t.origin||"set"===t.origin){return`גדול מדי: ${n} ${"set"===t.origin?"צריכה":"צריך"} להכיל ${t.inclusive?`${t.maximum} ${e?.unit??""} או פחות`:`פחות מ-${t.maximum} ${e?.unit??""}`}`.trim()}const i=t.inclusive?"<=":"<",s=o(t.origin??"value");return e?.unit?`${e.longLabel} מדי: ${n} ${s} ${i}${t.maximum.toString()} ${e.unit}`:`${e?.longLabel??"גדול"} מדי: ${n} ${s} ${i}${t.maximum.toString()}`}case"too_small":{const e=a(t.origin),n=r(t.origin??"value");if("string"===t.origin)return`${e?.shortLabel??"קצר"} מדי: ${n} צריכה להכיל ${t.minimum.toString()} ${e?.unit??""} ${t.inclusive?"או יותר":"לפחות"}`.trim();if("number"===t.origin){return`קטן מדי: ${n} צריך להיות ${t.inclusive?`גדול או שווה ל-${t.minimum}`:`גדול מ-${t.minimum}`}`}if("array"===t.origin||"set"===t.origin){const i="set"===t.origin?"צריכה":"צריך";if(1===t.minimum&&t.inclusive){return`קטן מדי: ${n} ${i} להכיל ${t.origin,"לפחות פריט אחד"}`}return`קטן מדי: ${n} ${i} להכיל ${t.inclusive?`${t.minimum} ${e?.unit??""} או יותר`:`יותר מ-${t.minimum} ${e?.unit??""}`}`.trim()}const i=t.inclusive?">=":">",s=o(t.origin??"value");return e?.unit?`${e.shortLabel} מדי: ${n} ${s} ${i}${t.minimum.toString()} ${e.unit}`:`${e?.shortLabel??"קטן"} מדי: ${n} ${s} ${i}${t.minimum.toString()}`}case"invalid_format":{const e=t;if("starts_with"===e.format)return`המחרוזת חייבת להתחיל ב "${e.prefix}"`;if("ends_with"===e.format)return`המחרוזת חייבת להסתיים ב "${e.suffix}"`;if("includes"===e.format)return`המחרוזת חייבת לכלול "${e.includes}"`;if("regex"===e.format)return`המחרוזת חייבת להתאים לתבנית ${e.pattern}`;const n=s[e.format];return`${n?.label??e.format} לא ${"f"===(n?.gender??"m")?"תקינה":"תקין"}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${t.divisor}`;case"unrecognized_keys":return`מפתח${t.keys.length>1?"ות":""} לא מזוה${t.keys.length>1?"ים":"ה"}: ${u(t.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":default:return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${r(t.origin??"array")}`}}};const ur=()=>{const e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(t){return e[t]??null}const n={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",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",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"szám",array:"tömb"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Érvénytelen bemenet: a várt érték instanceof ${e.expected}, a kapott érték ${r}`:`Érvénytelen bemenet: a várt érték ${t}, a kapott érték ${r}`}case"invalid_value":return 1===e.values.length?`Érvénytelen bemenet: a várt érték ${U(e.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Túl nagy: ${e.origin??"érték"} mérete túl nagy ${n}${e.maximum.toString()} ${i.unit??"elem"}`:`Túl nagy: a bemeneti érték ${e.origin??"érték"} túl nagy: ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Túl kicsi: a bemeneti érték ${e.origin} mérete túl kicsi ${n}${e.minimum.toString()} ${i.unit}`:`Túl kicsi: a bemeneti érték ${e.origin} túl kicsi ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Érvénytelen string: "${t.prefix}" értékkel kell kezdődnie`:"ends_with"===t.format?`Érvénytelen string: "${t.suffix}" értékkel kell végződnie`:"includes"===t.format?`Érvénytelen string: "${t.includes}" értéket kell tartalmaznia`:"regex"===t.format?`Érvénytelen string: ${t.pattern} mintának kell megfelelnie`:`Érvénytelen ${n[t.format]??e.format}`}case"not_multiple_of":return`Érvénytelen szám: ${e.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${e.origin}`;case"invalid_union":default:return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${e.origin}`}}};function dr(e,t,n){return 1===Math.abs(e)?t:n}function pr(e){if(!e)return"";const t=e[e.length-1];return e+(["ա","ե","ը","ի","ո","ու","օ"].includes(t)?"ն":"ը")}const mr=()=>{const e={string:{unit:{one:"նշան",many:"նշաններ"},verb:"ունենալ"},file:{unit:{one:"բայթ",many:"բայթեր"},verb:"ունենալ"},array:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},set:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"}};function t(t){return e[t]??null}const n={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 հասցե",cidrv4:"IPv4 միջակայք",cidrv6:"IPv6 միջակայք",base64:"base64 ձևաչափով տող",base64url:"base64url ձևաչափով տող",json_string:"JSON տող",e164:"E.164 համար",jwt:"JWT",template_literal:"մուտք"},i={nan:"NaN",number:"թիվ",array:"զանգված"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Սխալ մուտքագրում․ սպասվում էր instanceof ${e.expected}, ստացվել է ${r}`:`Սխալ մուտքագրում․ սպասվում էր ${t}, ստացվել է ${r}`}case"invalid_value":return 1===e.values.length?`Սխալ մուտքագրում․ սպասվում էր ${U(e.values[1])}`:`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);if(i){const t=dr(Number(e.maximum),i.unit.one,i.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${pr(e.origin??"արժեք")} կունենա ${n}${e.maximum.toString()} ${t}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${pr(e.origin??"արժեք")} լինի ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);if(i){const t=dr(Number(e.minimum),i.unit.one,i.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${pr(e.origin)} կունենա ${n}${e.minimum.toString()} ${t}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${pr(e.origin)} լինի ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Սխալ տող․ պետք է սկսվի "${t.prefix}"-ով`:"ends_with"===t.format?`Սխալ տող․ պետք է ավարտվի "${t.suffix}"-ով`:"includes"===t.format?`Սխալ տող․ պետք է պարունակի "${t.includes}"`:"regex"===t.format?`Սխալ տող․ պետք է համապատասխանի ${t.pattern} ձևաչափին`:`Սխալ ${n[t.format]??e.format}`}case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${e.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${e.keys.length>1?"ներ":""}. ${u(e.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${pr(e.origin)}-ում`;case"invalid_union":default:return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${pr(e.origin)}-ում`}}};const fr=()=>{const e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(t){return e[t]??null}const n={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",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",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak valid: diharapkan instanceof ${e.expected}, diterima ${r}`:`Input tidak valid: diharapkan ${t}, diterima ${r}`}case"invalid_value":return 1===e.values.length?`Input tidak valid: diharapkan ${U(e.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Terlalu besar: diharapkan ${e.origin??"value"} memiliki ${n}${e.maximum.toString()} ${i.unit??"elemen"}`:`Terlalu besar: diharapkan ${e.origin??"value"} menjadi ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Terlalu kecil: diharapkan ${e.origin} memiliki ${n}${e.minimum.toString()} ${i.unit}`:`Terlalu kecil: diharapkan ${e.origin} menjadi ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`String tidak valid: harus dimulai dengan "${t.prefix}"`:"ends_with"===t.format?`String tidak valid: harus berakhir dengan "${t.suffix}"`:"includes"===t.format?`String tidak valid: harus menyertakan "${t.includes}"`:"regex"===t.format?`String tidak valid: harus sesuai pola ${t.pattern}`:`${n[t.format]??e.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${e.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${e.origin}`;case"invalid_union":default:return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${e.origin}`}}};const hr=()=>{const e={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"}};function t(t){return e[t]??null}const n={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",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"númer",array:"fylki"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Rangt gildi: Þú slóst inn ${r} þar sem á að vera instanceof ${e.expected}`:`Rangt gildi: Þú slóst inn ${r} þar sem á að vera ${t}`}case"invalid_value":return 1===e.values.length?`Rangt gildi: gert ráð fyrir ${U(e.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Of stórt: gert er ráð fyrir að ${e.origin??"gildi"} hafi ${n}${e.maximum.toString()} ${i.unit??"hluti"}`:`Of stórt: gert er ráð fyrir að ${e.origin??"gildi"} sé ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Of lítið: gert er ráð fyrir að ${e.origin} hafi ${n}${e.minimum.toString()} ${i.unit}`:`Of lítið: gert er ráð fyrir að ${e.origin} sé ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ógildur strengur: verður að byrja á "${t.prefix}"`:"ends_with"===t.format?`Ógildur strengur: verður að enda á "${t.suffix}"`:"includes"===t.format?`Ógildur strengur: verður að innihalda "${t.includes}"`:"regex"===t.format?`Ógildur strengur: verður að fylgja mynstri ${t.pattern}`:`Rangt ${n[t.format]??e.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${e.divisor}`;case"unrecognized_keys":return`Óþekkt ${e.keys.length>1?"ir lyklar":"ur lykill"}: ${u(e.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${e.origin}`;case"invalid_union":default:return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${e.origin}`}}};const gr=()=>{const e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(t){return e[t]??null}const n={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",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Input non valido: atteso instanceof ${e.expected}, ricevuto ${r}`:`Input non valido: atteso ${t}, ricevuto ${r}`}case"invalid_value":return 1===e.values.length?`Input non valido: atteso ${U(e.values[0])}`:`Opzione non valida: atteso uno tra ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Troppo grande: ${e.origin??"valore"} deve avere ${n}${e.maximum.toString()} ${i.unit??"elementi"}`:`Troppo grande: ${e.origin??"valore"} deve essere ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Troppo piccolo: ${e.origin} deve avere ${n}${e.minimum.toString()} ${i.unit}`:`Troppo piccolo: ${e.origin} deve essere ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Stringa non valida: deve iniziare con "${t.prefix}"`:"ends_with"===t.format?`Stringa non valida: deve terminare con "${t.suffix}"`:"includes"===t.format?`Stringa non valida: deve includere "${t.includes}"`:"regex"===t.format?`Stringa non valida: deve corrispondere al pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${e.divisor}`;case"unrecognized_keys":return`Chiav${e.keys.length>1?"i":"e"} non riconosciut${e.keys.length>1?"e":"a"}: ${u(e.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${e.origin}`;case"invalid_union":default:return"Input non valido";case"invalid_element":return`Valore non valido in ${e.origin}`}}};const vr=()=>{const e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function t(t){return e[t]??null}const n={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アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"},i={nan:"NaN",number:"数値",array:"配列"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`無効な入力: instanceof ${e.expected}が期待されましたが、${r}が入力されました`:`無効な入力: ${t}が期待されましたが、${r}が入力されました`}case"invalid_value":return 1===e.values.length?`無効な入力: ${U(e.values[0])}が期待されました`:`無効な選択: ${u(e.values,"、")}のいずれかである必要があります`;case"too_big":{const n=e.inclusive?"以下である":"より小さい",i=t(e.origin);return i?`大きすぎる値: ${e.origin??"値"}は${e.maximum.toString()}${i.unit??"要素"}${n}必要があります`:`大きすぎる値: ${e.origin??"値"}は${e.maximum.toString()}${n}必要があります`}case"too_small":{const n=e.inclusive?"以上である":"より大きい",i=t(e.origin);return i?`小さすぎる値: ${e.origin}は${e.minimum.toString()}${i.unit}${n}必要があります`:`小さすぎる値: ${e.origin}は${e.minimum.toString()}${n}必要があります`}case"invalid_format":{const t=e;return"starts_with"===t.format?`無効な文字列: "${t.prefix}"で始まる必要があります`:"ends_with"===t.format?`無効な文字列: "${t.suffix}"で終わる必要があります`:"includes"===t.format?`無効な文字列: "${t.includes}"を含む必要があります`:"regex"===t.format?`無効な文字列: パターン${t.pattern}に一致する必要があります`:`無効な${n[t.format]??e.format}`}case"not_multiple_of":return`無効な数値: ${e.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${e.keys.length>1?"群":""}: ${u(e.keys,"、")}`;case"invalid_key":return`${e.origin}内の無効なキー`;case"invalid_union":default:return"無効な入力";case"invalid_element":return`${e.origin}内の無効な値`}}};const br=()=>{const e={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function t(t){return e[t]??null}const n={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 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული სტრინგი",base64url:"base64url-კოდირებული სტრინგი",json_string:"JSON სტრინგი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"},i={nan:"NaN",number:"რიცხვი",string:"სტრინგი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`არასწორი შეყვანა: მოსალოდნელი instanceof ${e.expected}, მიღებული ${r}`:`არასწორი შეყვანა: მოსალოდნელი ${t}, მიღებული ${r}`}case"invalid_value":return 1===e.values.length?`არასწორი შეყვანა: მოსალოდნელი ${U(e.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${u(e.values,"|")}-დან`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`ზედმეტად დიდი: მოსალოდნელი ${e.origin??"მნიშვნელობა"} ${i.verb} ${n}${e.maximum.toString()} ${i.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${e.origin??"მნიშვნელობა"} იყოს ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`ზედმეტად პატარა: მოსალოდნელი ${e.origin} ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${e.origin} იყოს ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`არასწორი სტრინგი: უნდა იწყებოდეს "${t.prefix}"-ით`:"ends_with"===t.format?`არასწორი სტრინგი: უნდა მთავრდებოდეს "${t.suffix}"-ით`:"includes"===t.format?`არასწორი სტრინგი: უნდა შეიცავდეს "${t.includes}"-ს`:"regex"===t.format?`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${t.pattern}`:`არასწორი ${n[t.format]??e.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${e.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${e.keys.length>1?"ები":"ი"}: ${u(e.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${e.origin}-ში`;case"invalid_union":default:return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${e.origin}-ში`}}};const yr=()=>{const e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function t(t){return e[t]??null}const n={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",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"},i={nan:"NaN",number:"លេខ",array:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${e.expected} ប៉ុន្តែទទួលបាន ${r}`:`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${t} ប៉ុន្តែទទួលបាន ${r}`}case"invalid_value":return 1===e.values.length?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${U(e.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`ធំពេក៖ ត្រូវការ ${e.origin??"តម្លៃ"} ${n} ${e.maximum.toString()} ${i.unit??"ធាតុ"}`:`ធំពេក៖ ត្រូវការ ${e.origin??"តម្លៃ"} ${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()} ${i.unit}`:`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${t.prefix}"`:"ends_with"===t.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${t.suffix}"`:"includes"===t.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${t.includes}"`:"regex"===t.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${t.pattern}`:`មិនត្រឹមត្រូវ៖ ${n[t.format]??e.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${e.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${u(e.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;case"invalid_union":default:return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`}}};function $r(){return{localeError:yr()}}const _r=()=>{const e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function t(t){return e[t]??null}const n={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 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`잘못된 입력: 예상 타입은 instanceof ${e.expected}, 받은 타입은 ${r}입니다`:`잘못된 입력: 예상 타입은 ${t}, 받은 타입은 ${r}입니다`}case"invalid_value":return 1===e.values.length?`잘못된 입력: 값은 ${U(e.values[0])} 이어야 합니다`:`잘못된 옵션: ${u(e.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{const n=e.inclusive?"이하":"미만",i="미만"===n?"이어야 합니다":"여야 합니다",r=t(e.origin),o=r?.unit??"요소";return r?`${e.origin??"값"}이 너무 큽니다: ${e.maximum.toString()}${o} ${n}${i}`:`${e.origin??"값"}이 너무 큽니다: ${e.maximum.toString()} ${n}${i}`}case"too_small":{const n=e.inclusive?"이상":"초과",i="이상"===n?"이어야 합니다":"여야 합니다",r=t(e.origin),o=r?.unit??"요소";return r?`${e.origin??"값"}이 너무 작습니다: ${e.minimum.toString()}${o} ${n}${i}`:`${e.origin??"값"}이 너무 작습니다: ${e.minimum.toString()} ${n}${i}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`잘못된 문자열: "${t.prefix}"(으)로 시작해야 합니다`:"ends_with"===t.format?`잘못된 문자열: "${t.suffix}"(으)로 끝나야 합니다`:"includes"===t.format?`잘못된 문자열: "${t.includes}"을(를) 포함해야 합니다`:"regex"===t.format?`잘못된 문자열: 정규식 ${t.pattern} 패턴과 일치해야 합니다`:`잘못된 ${n[t.format]??e.format}`}case"not_multiple_of":return`잘못된 숫자: ${e.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${u(e.keys,", ")}`;case"invalid_key":return`잘못된 키: ${e.origin}`;case"invalid_union":default:return"잘못된 입력";case"invalid_element":return`잘못된 값: ${e.origin}`}}};const kr=e=>e.charAt(0).toUpperCase()+e.slice(1);function wr(e){const t=Math.abs(e),n=t%10,i=t%100;return i>=11&&i<=19||0===n?"many":1===n?"one":"few"}const xr=()=>{const e={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 t(t,n,i,r){const o=e[t]??null;return null===o?o:{unit:o.unit[n],verb:o.verb[r][i?"inclusive":"notInclusive"]}}const n={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",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",jwt:"JWT",template_literal:"įvestis"},i={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 e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Gautas tipas ${r}, o tikėtasi - instanceof ${e.expected}`:`Gautas tipas ${r}, o tikėtasi - ${t}`}case"invalid_value":return 1===e.values.length?`Privalo būti ${U(e.values[0])}`:`Privalo būti vienas iš ${u(e.values,"|")} pasirinkimų`;case"too_big":{const n=i[e.origin]??e.origin,r=t(e.origin,wr(Number(e.maximum)),e.inclusive??!1,"smaller");if(r?.verb)return`${kr(n??e.origin??"reikšmė")} ${r.verb} ${e.maximum.toString()} ${r.unit??"elementų"}`;const o=e.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${kr(n??e.origin??"reikšmė")} turi būti ${o} ${e.maximum.toString()} ${r?.unit}`}case"too_small":{const n=i[e.origin]??e.origin,r=t(e.origin,wr(Number(e.minimum)),e.inclusive??!1,"bigger");if(r?.verb)return`${kr(n??e.origin??"reikšmė")} ${r.verb} ${e.minimum.toString()} ${r.unit??"elementų"}`;const o=e.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${kr(n??e.origin??"reikšmė")} turi būti ${o} ${e.minimum.toString()} ${r?.unit}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Eilutė privalo prasidėti "${t.prefix}"`:"ends_with"===t.format?`Eilutė privalo pasibaigti "${t.suffix}"`:"includes"===t.format?`Eilutė privalo įtraukti "${t.includes}"`:"regex"===t.format?`Eilutė privalo atitikti ${t.pattern}`:`Neteisingas ${n[t.format]??e.format}`}case"not_multiple_of":return`Skaičius privalo būti ${e.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${e.keys.length>1?"i":"as"} rakt${e.keys.length>1?"ai":"as"}: ${u(e.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":default:return"Klaidinga įvestis";case"invalid_element":{const t=i[e.origin]??e.origin;return`${kr(t??e.origin??"reikšmė")} turi klaidingą įvestį`}}}};const Sr=()=>{const e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function t(t){return e[t]??null}const n={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 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"},i={nan:"NaN",number:"број",array:"низа"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Грешен внес: се очекува instanceof ${e.expected}, примено ${r}`:`Грешен внес: се очекува ${t}, примено ${r}`}case"invalid_value":return 1===e.values.length?`Invalid input: expected ${U(e.values[0])}`:`Грешана опција: се очекува една ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Премногу голем: се очекува ${e.origin??"вредноста"} да има ${n}${e.maximum.toString()} ${i.unit??"елементи"}`:`Премногу голем: се очекува ${e.origin??"вредноста"} да биде ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Премногу мал: се очекува ${e.origin} да има ${n}${e.minimum.toString()} ${i.unit}`:`Премногу мал: се очекува ${e.origin} да биде ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Неважечка низа: мора да започнува со "${t.prefix}"`:"ends_with"===t.format?`Неважечка низа: мора да завршува со "${t.suffix}"`:"includes"===t.format?`Неважечка низа: мора да вклучува "${t.includes}"`:"regex"===t.format?`Неважечка низа: мора да одгоара на патернот ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${u(e.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${e.origin}`;case"invalid_union":default:return"Грешен внес";case"invalid_element":return`Грешна вредност во ${e.origin}`}}};const Ir=()=>{const e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(t){return e[t]??null}const n={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",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak sah: dijangka instanceof ${e.expected}, diterima ${r}`:`Input tidak sah: dijangka ${t}, diterima ${r}`}case"invalid_value":return 1===e.values.length?`Input tidak sah: dijangka ${U(e.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Terlalu besar: dijangka ${e.origin??"nilai"} ${i.verb} ${n}${e.maximum.toString()} ${i.unit??"elemen"}`:`Terlalu besar: dijangka ${e.origin??"nilai"} adalah ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Terlalu kecil: dijangka ${e.origin} ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`Terlalu kecil: dijangka ${e.origin} adalah ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`String tidak sah: mesti bermula dengan "${t.prefix}"`:"ends_with"===t.format?`String tidak sah: mesti berakhir dengan "${t.suffix}"`:"includes"===t.format?`String tidak sah: mesti mengandungi "${t.includes}"`:"regex"===t.format?`String tidak sah: mesti sepadan dengan corak ${t.pattern}`:`${n[t.format]??e.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${e.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${u(e.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${e.origin}`;case"invalid_union":default:return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${e.origin}`}}};const Er=()=>{const e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(t){return e[t]??null}const n={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",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Ongeldige invoer: verwacht instanceof ${e.expected}, ontving ${r}`:`Ongeldige invoer: verwacht ${t}, ontving ${r}`}case"invalid_value":return 1===e.values.length?`Ongeldige invoer: verwacht ${U(e.values[0])}`:`Ongeldige optie: verwacht één van ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin),r="date"===e.origin?"laat":"string"===e.origin?"lang":"groot";return i?`Te ${r}: verwacht dat ${e.origin??"waarde"} ${n}${e.maximum.toString()} ${i.unit??"elementen"} ${i.verb}`:`Te ${r}: verwacht dat ${e.origin??"waarde"} ${n}${e.maximum.toString()} is`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin),r="date"===e.origin?"vroeg":"string"===e.origin?"kort":"klein";return i?`Te ${r}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} ${i.unit} ${i.verb}`:`Te ${r}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} is`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ongeldige tekst: moet met "${t.prefix}" beginnen`:"ends_with"===t.format?`Ongeldige tekst: moet op "${t.suffix}" eindigen`:"includes"===t.format?`Ongeldige tekst: moet "${t.includes}" bevatten`:"regex"===t.format?`Ongeldige tekst: moet overeenkomen met patroon ${t.pattern}`:`Ongeldig: ${n[t.format]??e.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${e.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${e.origin}`;case"invalid_union":default:return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${e.origin}`}}};const Tr=()=>{const e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function t(t){return e[t]??null}const n={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-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldig input: forventet instanceof ${e.expected}, fikk ${r}`:`Ugyldig input: forventet ${t}, fikk ${r}`}case"invalid_value":return 1===e.values.length?`Ugyldig verdi: forventet ${U(e.values[0])}`:`Ugyldig valg: forventet en av ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`For stor(t): forventet ${e.origin??"value"} til å ha ${n}${e.maximum.toString()} ${i.unit??"elementer"}`:`For stor(t): forventet ${e.origin??"value"} til å ha ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()} ${i.unit}`:`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ugyldig streng: må starte med "${t.prefix}"`:"ends_with"===t.format?`Ugyldig streng: må ende med "${t.suffix}"`:"includes"===t.format?`Ugyldig streng: må inneholde "${t.includes}"`:"regex"===t.format?`Ugyldig streng: må matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${u(e.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${e.origin}`;case"invalid_union":default:return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${e.origin}`}}};const zr=()=>{const e={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"}};function t(t){return e[t]??null}const n={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ı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Fâsit giren: umulan instanceof ${e.expected}, alınan ${r}`:`Fâsit giren: umulan ${t}, alınan ${r}`}case"invalid_value":return 1===e.values.length?`Fâsit giren: umulan ${U(e.values[0])}`:`Fâsit tercih: mûteberler ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Fazla büyük: ${e.origin??"value"}, ${n}${e.maximum.toString()} ${i.unit??"elements"} sahip olmalıydı.`:`Fazla büyük: ${e.origin??"value"}, ${n}${e.maximum.toString()} olmalıydı.`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} ${i.unit} sahip olmalıydı.`:`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} olmalıydı.`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Fâsit metin: "${t.prefix}" ile başlamalı.`:"ends_with"===t.format?`Fâsit metin: "${t.suffix}" ile bitmeli.`:"includes"===t.format?`Fâsit metin: "${t.includes}" ihtivâ etmeli.`:"regex"===t.format?`Fâsit metin: ${t.pattern} nakşına uymalı.`:`Fâsit ${n[t.format]??e.format}`}case"not_multiple_of":return`Fâsit sayı: ${e.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`${e.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${e.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};const Cr=()=>{const e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function t(t){return e[t]??null}const n={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 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"},i={nan:"NaN",number:"عدد",array:"ارې"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`ناسم ورودي: باید instanceof ${e.expected} وای, مګر ${r} ترلاسه شو`:`ناسم ورودي: باید ${t} وای, مګر ${r} ترلاسه شو`}case"invalid_value":return 1===e.values.length?`ناسم ورودي: باید ${U(e.values[0])} وای`:`ناسم انتخاب: باید یو له ${u(e.values,"|")} څخه وای`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`ډیر لوی: ${e.origin??"ارزښت"} باید ${n}${e.maximum.toString()} ${i.unit??"عنصرونه"} ولري`:`ډیر لوی: ${e.origin??"ارزښت"} باید ${n}${e.maximum.toString()} وي`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} ${i.unit} ولري`:`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} وي`}case"invalid_format":{const t=e;return"starts_with"===t.format?`ناسم متن: باید د "${t.prefix}" سره پیل شي`:"ends_with"===t.format?`ناسم متن: باید د "${t.suffix}" سره پای ته ورسيږي`:"includes"===t.format?`ناسم متن: باید "${t.includes}" ولري`:"regex"===t.format?`ناسم متن: باید د ${t.pattern} سره مطابقت ولري`:`${n[t.format]??e.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${e.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${e.keys.length>1?"کلیډونه":"کلیډ"}: ${u(e.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${e.origin} کې`;case"invalid_union":default:return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${e.origin} کې`}}};const Or=()=>{const e={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function t(t){return e[t]??null}const n={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",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",jwt:"JWT",template_literal:"wejście"},i={nan:"NaN",number:"liczba",array:"tablica"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${e.expected}, otrzymano ${r}`:`Nieprawidłowe dane wejściowe: oczekiwano ${t}, otrzymano ${r}`}case"invalid_value":return 1===e.values.length?`Nieprawidłowe dane wejściowe: oczekiwano ${U(e.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Za duża wartość: oczekiwano, że ${e.origin??"wartość"} będzie mieć ${n}${e.maximum.toString()} ${i.unit??"elementów"}`:`Zbyt duż(y/a/e): oczekiwano, że ${e.origin??"wartość"} będzie wynosić ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Za mała wartość: oczekiwano, że ${e.origin??"wartość"} będzie mieć ${n}${e.minimum.toString()} ${i.unit??"elementów"}`:`Zbyt mał(y/a/e): oczekiwano, że ${e.origin??"wartość"} będzie wynosić ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${t.prefix}"`:"ends_with"===t.format?`Nieprawidłowy ciąg znaków: musi kończyć się na "${t.suffix}"`:"includes"===t.format?`Nieprawidłowy ciąg znaków: musi zawierać "${t.includes}"`:"regex"===t.format?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${t.pattern}`:`Nieprawidłow(y/a/e) ${n[t.format]??e.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${e.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${e.origin}`;case"invalid_union":default:return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${e.origin}`}}};const Ur=()=>{const e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(t){return e[t]??null}const n={regex:"padrão",email:"endereço de 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:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",number:"número",null:"nulo"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Tipo inválido: esperado instanceof ${e.expected}, recebido ${r}`:`Tipo inválido: esperado ${t}, recebido ${r}`}case"invalid_value":return 1===e.values.length?`Entrada inválida: esperado ${U(e.values[0])}`:`Opção inválida: esperada uma das ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Muito grande: esperado que ${e.origin??"valor"} tivesse ${n}${e.maximum.toString()} ${i.unit??"elementos"}`:`Muito grande: esperado que ${e.origin??"valor"} fosse ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Muito pequeno: esperado que ${e.origin} tivesse ${n}${e.minimum.toString()} ${i.unit}`:`Muito pequeno: esperado que ${e.origin} fosse ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Texto inválido: deve começar com "${t.prefix}"`:"ends_with"===t.format?`Texto inválido: deve terminar com "${t.suffix}"`:"includes"===t.format?`Texto inválido: deve incluir "${t.includes}"`:"regex"===t.format?`Texto inválido: deve corresponder ao padrão ${t.pattern}`:`${n[t.format]??e.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${e.divisor}`;case"unrecognized_keys":return`Chave${e.keys.length>1?"s":""} desconhecida${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Chave inválida em ${e.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${e.origin}`;default:return"Campo inválido"}}};function Ar(e,t,n,i){const r=Math.abs(e),o=r%10,a=r%100;return a>=11&&a<=19?i:1===o?t:o>=2&&o<=4?n:i}const Nr=()=>{const e={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function t(t){return e[t]??null}const n={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 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"},i={nan:"NaN",number:"число",array:"массив"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Неверный ввод: ожидалось instanceof ${e.expected}, получено ${r}`:`Неверный ввод: ожидалось ${t}, получено ${r}`}case"invalid_value":return 1===e.values.length?`Неверный ввод: ожидалось ${U(e.values[0])}`:`Неверный вариант: ожидалось одно из ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);if(i){const t=Ar(Number(e.maximum),i.unit.one,i.unit.few,i.unit.many);return`Слишком большое значение: ожидалось, что ${e.origin??"значение"} будет иметь ${n}${e.maximum.toString()} ${t}`}return`Слишком большое значение: ожидалось, что ${e.origin??"значение"} будет ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);if(i){const t=Ar(Number(e.minimum),i.unit.one,i.unit.few,i.unit.many);return`Слишком маленькое значение: ожидалось, что ${e.origin} будет иметь ${n}${e.minimum.toString()} ${t}`}return`Слишком маленькое значение: ожидалось, что ${e.origin} будет ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Неверная строка: должна начинаться с "${t.prefix}"`:"ends_with"===t.format?`Неверная строка: должна заканчиваться на "${t.suffix}"`:"includes"===t.format?`Неверная строка: должна содержать "${t.includes}"`:"regex"===t.format?`Неверная строка: должна соответствовать шаблону ${t.pattern}`:`Неверный ${n[t.format]??e.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${e.divisor}`;case"unrecognized_keys":return`Нераспознанн${e.keys.length>1?"ые":"ый"} ключ${e.keys.length>1?"и":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${e.origin}`;case"invalid_union":default:return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${e.origin}`}}};const Dr=()=>{const e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(t){return e[t]??null}const n={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",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"število",array:"tabela"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Neveljaven vnos: pričakovano instanceof ${e.expected}, prejeto ${r}`:`Neveljaven vnos: pričakovano ${t}, prejeto ${r}`}case"invalid_value":return 1===e.values.length?`Neveljaven vnos: pričakovano ${U(e.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Preveliko: pričakovano, da bo ${e.origin??"vrednost"} imelo ${n}${e.maximum.toString()} ${i.unit??"elementov"}`:`Preveliko: pričakovano, da bo ${e.origin??"vrednost"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Premajhno: pričakovano, da bo ${e.origin} imelo ${n}${e.minimum.toString()} ${i.unit}`:`Premajhno: pričakovano, da bo ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Neveljaven niz: mora se začeti z "${t.prefix}"`:"ends_with"===t.format?`Neveljaven niz: mora se končati z "${t.suffix}"`:"includes"===t.format?`Neveljaven niz: mora vsebovati "${t.includes}"`:"regex"===t.format?`Neveljaven niz: mora ustrezati vzorcu ${t.pattern}`:`Neveljaven ${n[t.format]??e.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${e.divisor}`;case"unrecognized_keys":return`Neprepoznan${e.keys.length>1?"i ključi":" ključ"}: ${u(e.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${e.origin}`;case"invalid_union":default:return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${e.origin}`}}};const jr=()=>{const e={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"}};function t(t){return e[t]??null}const n={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-intervall",ipv6:"IPv6-intervall",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",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Ogiltig inmatning: förväntat instanceof ${e.expected}, fick ${r}`:`Ogiltig inmatning: förväntat ${t}, fick ${r}`}case"invalid_value":return 1===e.values.length?`Ogiltig inmatning: förväntat ${U(e.values[0])}`:`Ogiltigt val: förväntade en av ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`För stor(t): förväntade ${e.origin??"värdet"} att ha ${n}${e.maximum.toString()} ${i.unit??"element"}`:`För stor(t): förväntat ${e.origin??"värdet"} att ha ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`För lite(t): förväntade ${e.origin??"värdet"} att ha ${n}${e.minimum.toString()} ${i.unit}`:`För lite(t): förväntade ${e.origin??"värdet"} att ha ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ogiltig sträng: måste börja med "${t.prefix}"`:"ends_with"===t.format?`Ogiltig sträng: måste sluta med "${t.suffix}"`:"includes"===t.format?`Ogiltig sträng: måste innehålla "${t.includes}"`:"regex"===t.format?`Ogiltig sträng: måste matcha mönstret "${t.pattern}"`:`Ogiltig(t) ${n[t.format]??e.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${u(e.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${e.origin??"värdet"}`;case"invalid_union":default:return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${e.origin??"värdet"}`}}};const Pr=()=>{const e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function t(t){return e[t]??null}const n={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 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${e.expected}, பெறப்பட்டது ${r}`:`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${t}, பெறப்பட்டது ${r}`}case"invalid_value":return 1===e.values.length?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${U(e.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${u(e.values,"|")} இல் ஒன்று`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??"மதிப்பு"} ${n}${e.maximum.toString()} ${i.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??"மதிப்பு"} ${n}${e.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ${i.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{const t=e;return"starts_with"===t.format?`தவறான சரம்: "${t.prefix}" இல் தொடங்க வேண்டும்`:"ends_with"===t.format?`தவறான சரம்: "${t.suffix}" இல் முடிவடைய வேண்டும்`:"includes"===t.format?`தவறான சரம்: "${t.includes}" ஐ உள்ளடக்க வேண்டும்`:"regex"===t.format?`தவறான சரம்: ${t.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${n[t.format]??e.format}`}case"not_multiple_of":return`தவறான எண்: ${e.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${e.keys.length>1?"கள்":""}: ${u(e.keys,", ")}`;case"invalid_key":return`${e.origin} இல் தவறான விசை`;case"invalid_union":default:return"தவறான உள்ளீடு";case"invalid_element":return`${e.origin} இல் தவறான மதிப்பு`}}};const Zr=()=>{const e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function t(t){return e[t]??null}const n={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",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"},i={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${e.expected} แต่ได้รับ ${r}`:`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${t} แต่ได้รับ ${r}`}case"invalid_value":return 1===e.values.length?`ค่าไม่ถูกต้อง: ควรเป็น ${U(e.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"ไม่เกิน":"น้อยกว่า",i=t(e.origin);return i?`เกินกำหนด: ${e.origin??"ค่า"} ควรมี${n} ${e.maximum.toString()} ${i.unit??"รายการ"}`:`เกินกำหนด: ${e.origin??"ค่า"} ควรมี${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?"อย่างน้อย":"มากกว่า",i=t(e.origin);return i?`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()} ${i.unit}`:`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${t.prefix}"`:"ends_with"===t.format?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${t.suffix}"`:"includes"===t.format?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${t.includes}" อยู่ในข้อความ`:"regex"===t.format?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${t.pattern}`:`รูปแบบไม่ถูกต้อง: ${n[t.format]??e.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${e.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${u(e.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${e.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${e.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};const Rr=()=>{const e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function t(t){return e[t]??null}const n={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",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ı",jwt:"JWT",template_literal:"Şablon dizesi"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Geçersiz değer: beklenen instanceof ${e.expected}, alınan ${r}`:`Geçersiz değer: beklenen ${t}, alınan ${r}`}case"invalid_value":return 1===e.values.length?`Geçersiz değer: beklenen ${U(e.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Çok büyük: beklenen ${e.origin??"değer"} ${n}${e.maximum.toString()} ${i.unit??"öğe"}`:`Çok büyük: beklenen ${e.origin??"değer"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()} ${i.unit}`:`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Geçersiz metin: "${t.prefix}" ile başlamalı`:"ends_with"===t.format?`Geçersiz metin: "${t.suffix}" ile bitmeli`:"includes"===t.format?`Geçersiz metin: "${t.includes}" içermeli`:"regex"===t.format?`Geçersiz metin: ${t.pattern} desenine uymalı`:`Geçersiz ${n[t.format]??e.format}`}case"not_multiple_of":return`Geçersiz sayı: ${e.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${e.keys.length>1?"lar":""}: ${u(e.keys,", ")}`;case"invalid_key":return`${e.origin} içinde geçersiz anahtar`;case"invalid_union":default:return"Geçersiz değer";case"invalid_element":return`${e.origin} içinde geçersiz değer`}}};const qr=()=>{const e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function t(t){return e[t]??null}const n={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",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"},i={nan:"NaN",number:"число",array:"масив"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Неправильні вхідні дані: очікується instanceof ${e.expected}, отримано ${r}`:`Неправильні вхідні дані: очікується ${t}, отримано ${r}`}case"invalid_value":return 1===e.values.length?`Неправильні вхідні дані: очікується ${U(e.values[0])}`:`Неправильна опція: очікується одне з ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Занадто велике: очікується, що ${e.origin??"значення"} ${i.verb} ${n}${e.maximum.toString()} ${i.unit??"елементів"}`:`Занадто велике: очікується, що ${e.origin??"значення"} буде ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Занадто мале: очікується, що ${e.origin} ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`Занадто мале: очікується, що ${e.origin} буде ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Неправильний рядок: повинен починатися з "${t.prefix}"`:"ends_with"===t.format?`Неправильний рядок: повинен закінчуватися на "${t.suffix}"`:"includes"===t.format?`Неправильний рядок: повинен містити "${t.includes}"`:"regex"===t.format?`Неправильний рядок: повинен відповідати шаблону ${t.pattern}`:`Неправильний ${n[t.format]??e.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${e.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${e.keys.length>1?"і":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${e.origin}`;case"invalid_union":default:return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${e.origin}`}}};function Mr(){return{localeError:qr()}}const Lr=()=>{const e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function t(t){return e[t]??null}const n={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 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"},i={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`غلط ان پٹ: instanceof ${e.expected} متوقع تھا، ${r} موصول ہوا`:`غلط ان پٹ: ${t} متوقع تھا، ${r} موصول ہوا`}case"invalid_value":return 1===e.values.length?`غلط ان پٹ: ${U(e.values[0])} متوقع تھا`:`غلط آپشن: ${u(e.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`بہت بڑا: ${e.origin??"ویلیو"} کے ${n}${e.maximum.toString()} ${i.unit??"عناصر"} ہونے متوقع تھے`:`بہت بڑا: ${e.origin??"ویلیو"} کا ${n}${e.maximum.toString()} ہونا متوقع تھا`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`بہت چھوٹا: ${e.origin} کے ${n}${e.minimum.toString()} ${i.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${e.origin} کا ${n}${e.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{const t=e;return"starts_with"===t.format?`غلط سٹرنگ: "${t.prefix}" سے شروع ہونا چاہیے`:"ends_with"===t.format?`غلط سٹرنگ: "${t.suffix}" پر ختم ہونا چاہیے`:"includes"===t.format?`غلط سٹرنگ: "${t.includes}" شامل ہونا چاہیے`:"regex"===t.format?`غلط سٹرنگ: پیٹرن ${t.pattern} سے میچ ہونا چاہیے`:`غلط ${n[t.format]??e.format}`}case"not_multiple_of":return`غلط نمبر: ${e.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${e.keys.length>1?"ز":""}: ${u(e.keys,"، ")}`;case"invalid_key":return`${e.origin} میں غلط کی`;case"invalid_union":default:return"غلط ان پٹ";case"invalid_element":return`${e.origin} میں غلط ویلیو`}}};const Fr=()=>{const e={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"}};function t(t){return e[t]??null}const n={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",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Noto‘g‘ri kirish: kutilgan instanceof ${e.expected}, qabul qilingan ${r}`:`Noto‘g‘ri kirish: kutilgan ${t}, qabul qilingan ${r}`}case"invalid_value":return 1===e.values.length?`Noto‘g‘ri kirish: kutilgan ${U(e.values[0])}`:`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Juda katta: kutilgan ${e.origin??"qiymat"} ${n}${e.maximum.toString()} ${i.unit} ${i.verb}`:`Juda katta: kutilgan ${e.origin??"qiymat"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()} ${i.unit} ${i.verb}`:`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Noto‘g‘ri satr: "${t.prefix}" bilan boshlanishi kerak`:"ends_with"===t.format?`Noto‘g‘ri satr: "${t.suffix}" bilan tugashi kerak`:"includes"===t.format?`Noto‘g‘ri satr: "${t.includes}" ni o‘z ichiga olishi kerak`:"regex"===t.format?`Noto‘g‘ri satr: ${t.pattern} shabloniga mos kelishi kerak`:`Noto‘g‘ri ${n[t.format]??e.format}`}case"not_multiple_of":return`Noto‘g‘ri raqam: ${e.divisor} ning karralisi bo‘lishi kerak`;case"unrecognized_keys":return`Noma’lum kalit${e.keys.length>1?"lar":""}: ${u(e.keys,", ")}`;case"invalid_key":return`${e.origin} dagi kalit noto‘g‘ri`;case"invalid_union":default:return"Noto‘g‘ri kirish";case"invalid_element":return`${e.origin} da noto‘g‘ri qiymat`}}};const Vr=()=>{const e={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ó"}};function t(t){return e[t]??null}const n={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",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",jwt:"JWT",template_literal:"đầu vào"},i={nan:"NaN",number:"số",array:"mảng"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Đầu vào không hợp lệ: mong đợi instanceof ${e.expected}, nhận được ${r}`:`Đầu vào không hợp lệ: mong đợi ${t}, nhận được ${r}`}case"invalid_value":return 1===e.values.length?`Đầu vào không hợp lệ: mong đợi ${U(e.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Quá lớn: mong đợi ${e.origin??"giá trị"} ${i.verb} ${n}${e.maximum.toString()} ${i.unit??"phần tử"}`:`Quá lớn: mong đợi ${e.origin??"giá trị"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Quá nhỏ: mong đợi ${e.origin} ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`Quá nhỏ: mong đợi ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Chuỗi không hợp lệ: phải bắt đầu bằng "${t.prefix}"`:"ends_with"===t.format?`Chuỗi không hợp lệ: phải kết thúc bằng "${t.suffix}"`:"includes"===t.format?`Chuỗi không hợp lệ: phải bao gồm "${t.includes}"`:"regex"===t.format?`Chuỗi không hợp lệ: phải khớp với mẫu ${t.pattern}`:`${n[t.format]??e.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 ${e.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${u(e.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${e.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 ${e.origin}`}}};const Br=()=>{const e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function t(t){return e[t]??null}const n={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地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"},i={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`无效输入:期望 instanceof ${e.expected},实际接收 ${r}`:`无效输入:期望 ${t},实际接收 ${r}`}case"invalid_value":return 1===e.values.length?`无效输入:期望 ${U(e.values[0])}`:`无效选项:期望以下之一 ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`数值过大:期望 ${e.origin??"值"} ${n}${e.maximum.toString()} ${i.unit??"个元素"}`:`数值过大:期望 ${e.origin??"值"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()} ${i.unit}`:`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`无效字符串:必须以 "${t.prefix}" 开头`:"ends_with"===t.format?`无效字符串:必须以 "${t.suffix}" 结尾`:"includes"===t.format?`无效字符串:必须包含 "${t.includes}"`:"regex"===t.format?`无效字符串:必须满足正则表达式 ${t.pattern}`:`无效${n[t.format]??e.format}`}case"not_multiple_of":return`无效数字:必须是 ${e.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${u(e.keys,", ")}`;case"invalid_key":return`${e.origin} 中的键(key)无效`;case"invalid_union":default:return"无效输入";case"invalid_element":return`${e.origin} 中包含无效值(value)`}}};const Hr=()=>{const e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function t(t){return e[t]??null}const n={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 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`無效的輸入值:預期為 instanceof ${e.expected},但收到 ${r}`:`無效的輸入值:預期為 ${t},但收到 ${r}`}case"invalid_value":return 1===e.values.length?`無效的輸入值:預期為 ${U(e.values[0])}`:`無效的選項:預期為以下其中之一 ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`數值過大:預期 ${e.origin??"值"} 應為 ${n}${e.maximum.toString()} ${i.unit??"個元素"}`:`數值過大:預期 ${e.origin??"值"} 應為 ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()} ${i.unit}`:`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`無效的字串:必須以 "${t.prefix}" 開頭`:"ends_with"===t.format?`無效的字串:必須以 "${t.suffix}" 結尾`:"includes"===t.format?`無效的字串:必須包含 "${t.includes}"`:"regex"===t.format?`無效的字串:必須符合格式 ${t.pattern}`:`無效的 ${n[t.format]??e.format}`}case"not_multiple_of":return`無效的數字:必須為 ${e.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${e.keys.length>1?"們":""}:${u(e.keys,"、")}`;case"invalid_key":return`${e.origin} 中有無效的鍵值`;case"invalid_union":default:return"無效的輸入值";case"invalid_element":return`${e.origin} 中有無效的值`}}};const Wr=()=>{const e={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function t(t){return e[t]??null}const n={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",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",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"},i={nan:"NaN",number:"nọ́mbà",array:"akopọ"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=G(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${e.expected}, àmọ̀ a rí ${r}`:`Ìbáwọlé aṣìṣe: a ní láti fi ${t}, àmọ̀ a rí ${r}`}case"invalid_value":return 1===e.values.length?`Ìbáwọlé aṣìṣe: a ní láti fi ${U(e.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Tó pọ̀ jù: a ní láti jẹ́ pé ${e.origin??"iye"} ${i.verb} ${n}${e.maximum} ${i.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${n}${e.maximum}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Kéré ju: a ní láti jẹ́ pé ${e.origin} ${i.verb} ${n}${e.minimum} ${i.unit}`:`Kéré ju: a ní láti jẹ́ ${n}${e.minimum}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${t.prefix}"`:"ends_with"===t.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${t.suffix}"`:"includes"===t.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${t.includes}"`:"regex"===t.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${t.pattern}`:`Aṣìṣe: ${n[t.format]??e.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${e.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${u(e.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${e.origin}`;case"invalid_union":default:return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${e.origin}`}}};var Jr,Gr=Object.freeze({__proto__:null,ar:function(){return{localeError:Hi()}},az:function(){return{localeError:Wi()}},be:function(){return{localeError:Gi()}},bg:function(){return{localeError:Ki()}},ca:function(){return{localeError:Xi()}},cs:function(){return{localeError:Yi()}},da:function(){return{localeError:Qi()}},de:function(){return{localeError:er()}},en:nr,eo:function(){return{localeError:ir()}},es:function(){return{localeError:rr()}},fa:function(){return{localeError:or()}},fi:function(){return{localeError:ar()}},fr:function(){return{localeError:sr()}},frCA:function(){return{localeError:lr()}},he:function(){return{localeError:cr()}},hu:function(){return{localeError:ur()}},hy:function(){return{localeError:mr()}},id:function(){return{localeError:fr()}},is:function(){return{localeError:hr()}},it:function(){return{localeError:gr()}},ja:function(){return{localeError:vr()}},ka:function(){return{localeError:br()}},kh:function(){return $r()},km:$r,ko:function(){return{localeError:_r()}},lt:function(){return{localeError:xr()}},mk:function(){return{localeError:Sr()}},ms:function(){return{localeError:Ir()}},nl:function(){return{localeError:Er()}},no:function(){return{localeError:Tr()}},ota:function(){return{localeError:zr()}},pl:function(){return{localeError:Or()}},ps:function(){return{localeError:Cr()}},pt:function(){return{localeError:Ur()}},ru:function(){return{localeError:Nr()}},sl:function(){return{localeError:Dr()}},sv:function(){return{localeError:jr()}},ta:function(){return{localeError:Pr()}},th:function(){return{localeError:Zr()}},tr:function(){return{localeError:Rr()}},ua:function(){return Mr()},uk:Mr,ur:function(){return{localeError:Lr()}},uz:function(){return{localeError:Fr()}},vi:function(){return{localeError:Vr()}},yo:function(){return{localeError:Wr()}},zhCN:function(){return{localeError:Br()}},zhTW:function(){return{localeError:Hr()}}});const Kr=Symbol("ZodOutput"),Xr=Symbol("ZodInput");class Yr{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const n=t[0];return this._map.set(e,n),n&&"object"==typeof n&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const n={...this.get(t)??{}};delete n.id;const i={...n,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function Qr(){return new Yr}(Jr=globalThis).__zod_globalRegistry??(Jr.__zod_globalRegistry=Qr());const eo=globalThis.__zod_globalRegistry;function to(e,t){return new e({type:"string",...O(t)})}function no(e,t){return new e({type:"string",coerce:!0,...O(t)})}function io(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...O(t)})}function ro(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...O(t)})}function oo(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...O(t)})}function ao(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...O(t)})}function so(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...O(t)})}function lo(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...O(t)})}function co(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...O(t)})}function uo(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...O(t)})}function po(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...O(t)})}function mo(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...O(t)})}function fo(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...O(t)})}function ho(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...O(t)})}function go(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...O(t)})}function vo(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...O(t)})}function bo(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...O(t)})}function yo(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...O(t)})}function $o(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...O(t)})}function _o(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...O(t)})}function ko(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...O(t)})}function wo(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...O(t)})}function xo(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...O(t)})}function So(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...O(t)})}function Io(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...O(t)})}const Eo={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function To(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...O(t)})}function zo(e,t){return new e({type:"string",format:"date",check:"string_format",...O(t)})}function Co(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...O(t)})}function Oo(e,t){return new e({type:"string",format:"duration",check:"string_format",...O(t)})}function Uo(e,t){return new e({type:"number",checks:[],...O(t)})}function Ao(e,t){return new e({type:"number",coerce:!0,checks:[],...O(t)})}function No(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...O(t)})}function Do(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...O(t)})}function jo(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...O(t)})}function Po(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...O(t)})}function Zo(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...O(t)})}function Ro(e,t){return new e({type:"boolean",...O(t)})}function qo(e,t){return new e({type:"boolean",coerce:!0,...O(t)})}function Mo(e,t){return new e({type:"bigint",...O(t)})}function Lo(e,t){return new e({type:"bigint",coerce:!0,...O(t)})}function Fo(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...O(t)})}function Vo(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...O(t)})}function Bo(e,t){return new e({type:"symbol",...O(t)})}function Ho(e,t){return new e({type:"undefined",...O(t)})}function Wo(e,t){return new e({type:"null",...O(t)})}function Jo(e){return new e({type:"any"})}function Go(e){return new e({type:"unknown"})}function Ko(e,t){return new e({type:"never",...O(t)})}function Xo(e,t){return new e({type:"void",...O(t)})}function Yo(e,t){return new e({type:"date",...O(t)})}function Qo(e,t){return new e({type:"date",coerce:!0,...O(t)})}function ea(e,t){return new e({type:"nan",...O(t)})}function ta(e,t){return new Nt({check:"less_than",...O(t),value:e,inclusive:!1})}function na(e,t){return new Nt({check:"less_than",...O(t),value:e,inclusive:!0})}function ia(e,t){return new Dt({check:"greater_than",...O(t),value:e,inclusive:!1})}function ra(e,t){return new Dt({check:"greater_than",...O(t),value:e,inclusive:!0})}function oa(e){return ia(0,e)}function aa(e){return ta(0,e)}function sa(e){return na(0,e)}function la(e){return ra(0,e)}function ca(e,t){return new jt({check:"multiple_of",...O(t),value:e})}function ua(e,t){return new Rt({check:"max_size",...O(t),maximum:e})}function da(e,t){return new qt({check:"min_size",...O(t),minimum:e})}function pa(e,t){return new Mt({check:"size_equals",...O(t),size:e})}function ma(e,t){return new Lt({check:"max_length",...O(t),maximum:e})}function fa(e,t){return new Ft({check:"min_length",...O(t),minimum:e})}function ha(e,t){return new Vt({check:"length_equals",...O(t),length:e})}function ga(e,t){return new Ht({check:"string_format",format:"regex",...O(t),pattern:e})}function va(e){return new Wt({check:"string_format",format:"lowercase",...O(e)})}function ba(e){return new Jt({check:"string_format",format:"uppercase",...O(e)})}function ya(e,t){return new Gt({check:"string_format",format:"includes",...O(t),includes:e})}function $a(e,t){return new Kt({check:"string_format",format:"starts_with",...O(t),prefix:e})}function _a(e,t){return new Xt({check:"string_format",format:"ends_with",...O(t),suffix:e})}function ka(e,t,n){return new Qt({check:"property",property:e,schema:t,...O(n)})}function wa(e,t){return new en({check:"mime_type",mime:e,...O(t)})}function xa(e){return new tn({check:"overwrite",tx:e})}function Sa(e){return xa(t=>t.normalize(e))}function Ia(){return xa(e=>e.trim())}function Ea(){return xa(e=>e.toLowerCase())}function Ta(){return xa(e=>e.toUpperCase())}function za(){return xa(e=>_(e))}function Ca(e,t,n){return new e({type:"array",element:t,...O(n)})}function Oa(e,t){return new e({type:"file",...O(t)})}function Ua(e,t,n){const i=O(n);i.abort??(i.abort=!0);return new e({type:"custom",check:"custom",fn:t,...i})}function Aa(e,t,n){return new e({type:"custom",check:"custom",fn:t,...O(n)})}function Na(e){const t=Da(n=>(n.addIssue=e=>{if("string"==typeof e)n.issues.push(K(e,n.value,t._zod.def));else{const i=e;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=t),i.continue??(i.continue=!t._zod.def.abort),n.issues.push(K(i))}},e(n.value,n)));return t}function Da(e,t){const n=new Ut({check:"custom",...O(t)});return n._zod.check=e,n}function ja(e){const t=new Ut({check:"describe"});return t._zod.onattach=[t=>{const n=eo.get(t)??{};eo.add(t,{...n,description:e})}],t._zod.check=()=>{},t}function Pa(e){const t=new Ut({check:"meta"});return t._zod.onattach=[t=>{const n=eo.get(t)??{};eo.add(t,{...n,...e})}],t._zod.check=()=>{},t}function Za(e,t){const n=O(t);let i=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];"sensitive"!==n.case&&(i=i.map(e=>"string"==typeof e?e.toLowerCase():e),r=r.map(e=>"string"==typeof e?e.toLowerCase():e));const o=new Set(i),a=new Set(r),s=e.Codec??Di,l=e.Boolean??Zn,c=new s({type:"pipe",in:new(e.String??an)({type:"string",error:n.error}),out:new l({type:"boolean",error:n.error}),transform:(e,t)=>{let i=e;return"sensitive"!==n.case&&(i=i.toLowerCase()),!!o.has(i)||!a.has(i)&&(t.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:t.value,inst:c,continue:!1}),{})},reverseTransform:(e,t)=>!0===e?i[0]||"true":r[0]||"false",error:n.error});return c}function Ra(e,t,n,i={}){const r=O(i),o={...O(i),check:"string_format",type:"string",format:t,fn:"function"==typeof n?n:e=>n.test(e),...r};n instanceof RegExp&&(o.pattern=n);return new e(o)}function qa(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??eo,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Ma(e,t,n={path:[],schemaPath:[]}){var i;const r=e._zod.def,o=t.seen.get(e);if(o){o.count++;return n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema}const a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a);const s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{const i={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,i);else{const n=a.schema,o=t.processors[r.type];if(!o)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);o(e,t,n,i)}const o=e._zod.parent;o&&(a.ref||(a.ref=o),Ma(o,t,i),t.seen.get(o).isParent=!0)}const l=t.metadataRegistry.get(e);l&&Object.assign(a.schema,l),"input"===t.io&&Va(e)&&(delete a.schema.examples,delete a.schema.default),"input"===t.io&&a.schema._prefault&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault;return t.seen.get(e).schema}function La(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=new Map;for(const t of e.seen.entries()){const n=e.metadataRegistry.get(t[0])?.id;if(n){const e=i.get(n);if(e&&e!==t[0])throw new Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(n,t[0])}}const r=t=>{if(t[1].schema.$ref)return;const i=t[1],{ref:r,defId:o}=(t=>{const i="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){const n=e.external.registry.get(t[0])?.id,r=e.external.uri??(e=>e);if(n)return{ref:r(n)};const o=t[1].defId??t[1].schema.id??"schema"+e.counter++;return t[1].defId=o,{defId:o,ref:`${r("__shared")}#/${i}/${o}`}}if(t[1]===n)return{ref:"#"};const r=`#/${i}/`,o=t[1].schema.id??"__schema"+e.counter++;return{defId:o,ref:r+o}})(t);i.def={...i.schema},o&&(i.defId=o);const a=i.schema;for(const e in a)delete a[e];a.$ref=r};if("throw"===e.cycles)for(const t of e.seen.entries()){const e=t[1];if(e.cycle)throw new Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>\n\nSet the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const n of e.seen.entries()){const i=n[1];if(t===n[0]){r(n);continue}if(e.external){const i=e.external.registry.get(n[0])?.id;if(t!==n[0]&&i){r(n);continue}}const o=e.metadataRegistry.get(n[0])?.id;o?r(n):(i.cycle||i.count>1&&"ref"===e.reused)&&r(n)}}function Fa(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=t=>{const n=e.seen.get(t);if(null===n.ref)return;const r=n.def??n.schema,o={...r},a=n.ref;if(n.ref=null,a){i(a);const n=e.seen.get(a),s=n.schema;!s.$ref||"draft-07"!==e.target&&"draft-04"!==e.target&&"openapi-3.0"!==e.target?Object.assign(r,s):(r.allOf=r.allOf??[],r.allOf.push(s)),Object.assign(r,o);if(t._zod.parent===a)for(const e in r)"$ref"!==e&&"allOf"!==e&&(e in o||delete r[e]);if(s.$ref&&n.def)for(const e in r)"$ref"!==e&&"allOf"!==e&&e in n.def&&JSON.stringify(r[e])===JSON.stringify(n.def[e])&&delete r[e]}const s=t._zod.parent;if(s&&s!==a){i(s);const t=e.seen.get(s);if(t?.schema.$ref&&(r.$ref=t.schema.$ref,t.def))for(const e in r)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(r[e])===JSON.stringify(t.def[e])&&delete r[e]}e.override({zodSchema:t,jsonSchema:r,path:n.path??[]})};for(const t of[...e.seen.entries()].reverse())i(t[0]);const r={};if("draft-2020-12"===e.target?r.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?r.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?r.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const n=e.external.registry.get(t)?.id;if(!n)throw new Error("Schema is missing an `id` property");r.$id=e.external.uri(n)}Object.assign(r,n.def??n.schema);const o=e.external?.defs??{};for(const t of e.seen.entries()){const e=t[1];e.def&&e.defId&&(o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&("draft-2020-12"===e.target?r.$defs=o:r.definitions=o);try{const n=JSON.parse(JSON.stringify(r));return Object.defineProperty(n,"~standard",{value:{...t["~standard"],jsonSchema:{input:Ha(t,"input",e.processors),output:Ha(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch(e){throw new Error("Error converting schema to JSON.")}}function Va(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const i=e._zod.def;if("transform"===i.type)return!0;if("array"===i.type)return Va(i.element,n);if("set"===i.type)return Va(i.valueType,n);if("lazy"===i.type)return Va(i.getter(),n);if("promise"===i.type||"optional"===i.type||"nonoptional"===i.type||"nullable"===i.type||"readonly"===i.type||"default"===i.type||"prefault"===i.type)return Va(i.innerType,n);if("intersection"===i.type)return Va(i.left,n)||Va(i.right,n);if("record"===i.type||"map"===i.type)return Va(i.keyType,n)||Va(i.valueType,n);if("pipe"===i.type)return Va(i.in,n)||Va(i.out,n);if("object"===i.type){for(const e in i.shape)if(Va(i.shape[e],n))return!0;return!1}if("union"===i.type){for(const e of i.options)if(Va(e,n))return!0;return!1}if("tuple"===i.type){for(const e of i.items)if(Va(e,n))return!0;return!(!i.rest||!Va(i.rest,n))}return!1}const Ba=(e,t={})=>n=>{const i=qa({...n,processors:t});return Ma(e,i),La(i,e),Fa(i,e)},Ha=(e,t,n={})=>i=>{const{libraryOptions:r,target:o}=i??{},a=qa({...r??{},target:o,io:t,processors:n});return Ma(e,a),La(a,e),Fa(a,e)},Wa={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Ja=(e,t,n,i)=>{const r=n;r.type="string";const{minimum:o,maximum:a,format:s,patterns:l,contentEncoding:c}=e._zod.bag;if("number"==typeof o&&(r.minLength=o),"number"==typeof a&&(r.maxLength=a),s&&(r.format=Wa[s]??s,""===r.format&&delete r.format,"time"===s&&delete r.format),c&&(r.contentEncoding=c),l&&l.size>0){const e=[...l];1===e.length?r.pattern=e[0].source:e.length>1&&(r.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}},Ga=(e,t,n,i)=>{const r=n,{minimum:o,maximum:a,format:s,multipleOf:l,exclusiveMaximum:c,exclusiveMinimum:u}=e._zod.bag;"string"==typeof s&&s.includes("int")?r.type="integer":r.type="number","number"==typeof u&&("draft-04"===t.target||"openapi-3.0"===t.target?(r.minimum=u,r.exclusiveMinimum=!0):r.exclusiveMinimum=u),"number"==typeof o&&(r.minimum=o,"number"==typeof u&&"draft-04"!==t.target&&(u>=o?delete r.minimum:delete r.exclusiveMinimum)),"number"==typeof c&&("draft-04"===t.target||"openapi-3.0"===t.target?(r.maximum=c,r.exclusiveMaximum=!0):r.exclusiveMaximum=c),"number"==typeof a&&(r.maximum=a,"number"==typeof c&&"draft-04"!==t.target&&(c<=a?delete r.maximum:delete r.exclusiveMaximum)),"number"==typeof l&&(r.multipleOf=l)},Ka=(e,t,n,i)=>{n.type="boolean"},Xa=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("BigInt cannot be represented in JSON Schema")},Ya=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("Symbols cannot be represented in JSON Schema")},Qa=(e,t,n,i)=>{"openapi-3.0"===t.target?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},es=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("Undefined cannot be represented in JSON Schema")},ts=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("Void cannot be represented in JSON Schema")},ns=(e,t,n,i)=>{n.not={}},is=(e,t,n,i)=>{},rs=(e,t,n,i)=>{},os=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("Date cannot be represented in JSON Schema")},as=(e,t,n,i)=>{const r=c(e._zod.def.entries);r.every(e=>"number"==typeof e)&&(n.type="number"),r.every(e=>"string"==typeof e)&&(n.type="string"),n.enum=r},ss=(e,t,n,i)=>{const r=e._zod.def,o=[];for(const e of r.values)if(void 0===e){if("throw"===t.unrepresentable)throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if("bigint"==typeof e){if("throw"===t.unrepresentable)throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(e))}else o.push(e);if(0===o.length);else if(1===o.length){const e=o[0];n.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?n.enum=[e]:n.const=e}else o.every(e=>"number"==typeof e)&&(n.type="number"),o.every(e=>"string"==typeof e)&&(n.type="string"),o.every(e=>"boolean"==typeof e)&&(n.type="boolean"),o.every(e=>null===e)&&(n.type="null"),n.enum=o},ls=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("NaN cannot be represented in JSON Schema")},cs=(e,t,n,i)=>{const r=n,o=e._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");r.type="string",r.pattern=o.source},us=(e,t,n,i)=>{const r=n,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:l}=e._zod.bag;void 0!==a&&(o.minLength=a),void 0!==s&&(o.maxLength=s),l?1===l.length?(o.contentMediaType=l[0],Object.assign(r,o)):(Object.assign(r,o),r.anyOf=l.map(e=>({contentMediaType:e}))):Object.assign(r,o)},ds=(e,t,n,i)=>{n.type="boolean"},ps=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("Custom types cannot be represented in JSON Schema")},ms=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("Function types cannot be represented in JSON Schema")},fs=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("Transforms cannot be represented in JSON Schema")},hs=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("Map cannot be represented in JSON Schema")},gs=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("Set cannot be represented in JSON Schema")},vs=(e,t,n,i)=>{const r=n,o=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;"number"==typeof a&&(r.minItems=a),"number"==typeof s&&(r.maxItems=s),r.type="array",r.items=Ma(o.element,t,{...i,path:[...i.path,"items"]})},bs=(e,t,n,i)=>{const r=n,o=e._zod.def;r.type="object",r.properties={};const a=o.shape;for(const e in a)r.properties[e]=Ma(a[e],t,{...i,path:[...i.path,"properties",e]});const s=new Set(Object.keys(a)),l=new Set([...s].filter(e=>{const n=o.shape[e]._zod;return"input"===t.io?void 0===n.optin:void 0===n.optout}));l.size>0&&(r.required=Array.from(l)),"never"===o.catchall?._zod.def.type?r.additionalProperties=!1:o.catchall?o.catchall&&(r.additionalProperties=Ma(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):"output"===t.io&&(r.additionalProperties=!1)},ys=(e,t,n,i)=>{const r=e._zod.def,o=!1===r.inclusive,a=r.options.map((e,n)=>Ma(e,t,{...i,path:[...i.path,o?"oneOf":"anyOf",n]}));o?n.oneOf=a:n.anyOf=a},$s=(e,t,n,i)=>{const r=e._zod.def,o=Ma(r.left,t,{...i,path:[...i.path,"allOf",0]}),a=Ma(r.right,t,{...i,path:[...i.path,"allOf",1]}),s=e=>"allOf"in e&&1===Object.keys(e).length,l=[...s(o)?o.allOf:[o],...s(a)?a.allOf:[a]];n.allOf=l},_s=(e,t,n,i)=>{const r=n,o=e._zod.def;r.type="array";const a="draft-2020-12"===t.target?"prefixItems":"items",s="draft-2020-12"===t.target||"openapi-3.0"===t.target?"items":"additionalItems",l=o.items.map((e,n)=>Ma(e,t,{...i,path:[...i.path,a,n]})),c=o.rest?Ma(o.rest,t,{...i,path:[...i.path,s,..."openapi-3.0"===t.target?[o.items.length]:[]]}):null;"draft-2020-12"===t.target?(r.prefixItems=l,c&&(r.items=c)):"openapi-3.0"===t.target?(r.items={anyOf:l},c&&r.items.anyOf.push(c),r.minItems=l.length,c||(r.maxItems=l.length)):(r.items=l,c&&(r.additionalItems=c));const{minimum:u,maximum:d}=e._zod.bag;"number"==typeof u&&(r.minItems=u),"number"==typeof d&&(r.maxItems=d)},ks=(e,t,n,i)=>{const r=n,o=e._zod.def;r.type="object";const a=o.keyType,s=a._zod.bag,l=s?.patterns;if("loose"===o.mode&&l&&l.size>0){const e=Ma(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});r.patternProperties={};for(const t of l)r.patternProperties[t.source]=e}else"draft-07"!==t.target&&"draft-2020-12"!==t.target||(r.propertyNames=Ma(o.keyType,t,{...i,path:[...i.path,"propertyNames"]})),r.additionalProperties=Ma(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]});const c=a._zod.values;if(c){const e=[...c].filter(e=>"string"==typeof e||"number"==typeof e);e.length>0&&(r.required=e)}},ws=(e,t,n,i)=>{const r=e._zod.def,o=Ma(r.innerType,t,i),a=t.seen.get(e);"openapi-3.0"===t.target?(a.ref=r.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},xs=(e,t,n,i)=>{const r=e._zod.def;Ma(r.innerType,t,i);t.seen.get(e).ref=r.innerType},Ss=(e,t,n,i)=>{const r=e._zod.def;Ma(r.innerType,t,i);t.seen.get(e).ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},Is=(e,t,n,i)=>{const r=e._zod.def;Ma(r.innerType,t,i);t.seen.get(e).ref=r.innerType,"input"===t.io&&(n._prefault=JSON.parse(JSON.stringify(r.defaultValue)))},Es=(e,t,n,i)=>{const r=e._zod.def;Ma(r.innerType,t,i);let o;t.seen.get(e).ref=r.innerType;try{o=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=o},Ts=(e,t,n,i)=>{const r=e._zod.def,o="input"===t.io?"transform"===r.in._zod.def.type?r.out:r.in:r.out;Ma(o,t,i);t.seen.get(e).ref=o},zs=(e,t,n,i)=>{const r=e._zod.def;Ma(r.innerType,t,i);t.seen.get(e).ref=r.innerType,n.readOnly=!0},Cs=(e,t,n,i)=>{const r=e._zod.def;Ma(r.innerType,t,i);t.seen.get(e).ref=r.innerType},Os=(e,t,n,i)=>{const r=e._zod.def;Ma(r.innerType,t,i);t.seen.get(e).ref=r.innerType},Us=(e,t,n,i)=>{const r=e._zod.innerType;Ma(r,t,i);t.seen.get(e).ref=r},As={string:Ja,number:Ga,boolean:Ka,bigint:Xa,symbol:Ya,null:Qa,undefined:es,void:ts,never:ns,any:is,unknown:rs,date:os,enum:as,literal:ss,nan:ls,template_literal:cs,file:us,success:ds,custom:ps,function:ms,transform:fs,map:hs,set:gs,array:vs,object:bs,union:ys,intersection:$s,tuple:_s,record:ks,nullable:ws,nonoptional:xs,default:Ss,prefault:Is,catch:Es,pipe:Ts,readonly:zs,promise:Cs,optional:Os,lazy:Us};function Ns(e,t){if("_idmap"in e){const n=e,i=qa({...t,processors:As}),r={};for(const e of n._idmap.entries()){const[t,n]=e;Ma(n,i)}const o={},a={registry:n,uri:t?.uri,defs:r};i.external=a;for(const e of n._idmap.entries()){const[t,n]=e;La(i,n),o[t]=Fa(i,n)}if(Object.keys(r).length>0){const e="draft-2020-12"===i.target?"$defs":"definitions";o.__shared={[e]:r}}return{schemas:o}}const n=qa({...t,processors:As});return Ma(e,n),La(n,e),Fa(n,e)}var Ds=Object.freeze({__proto__:null}),js=Object.freeze({__proto__:null,$ZodAny:Vn,$ZodArray:Kn,$ZodAsyncError:o,$ZodBase64:zn,$ZodBase64URL:On,$ZodBigInt:Rn,$ZodBigIntFormat:qn,$ZodBoolean:Zn,$ZodCIDRv4:In,$ZodCIDRv6:En,$ZodCUID:fn,$ZodCUID2:hn,$ZodCatch:Oi,$ZodCheck:Ut,$ZodCheckBigIntFormat:Zt,$ZodCheckEndsWith:Xt,$ZodCheckGreaterThan:Dt,$ZodCheckIncludes:Gt,$ZodCheckLengthEquals:Vt,$ZodCheckLessThan:Nt,$ZodCheckLowerCase:Wt,$ZodCheckMaxLength:Lt,$ZodCheckMaxSize:Rt,$ZodCheckMimeType:en,$ZodCheckMinLength:Ft,$ZodCheckMinSize:qt,$ZodCheckMultipleOf:jt,$ZodCheckNumberFormat:Pt,$ZodCheckOverwrite:tn,$ZodCheckProperty:Qt,$ZodCheckRegex:Ht,$ZodCheckSizeEquals:Mt,$ZodCheckStartsWith:Kt,$ZodCheckStringFormat:Bt,$ZodCheckUpperCase:Jt,$ZodCodec:Di,$ZodCustom:Vi,$ZodCustomStringFormat:Dn,$ZodDate:Jn,$ZodDefault:Si,$ZodDiscriminatedUnion:ai,$ZodE164:Un,$ZodEmail:un,$ZodEmoji:pn,$ZodEncodeError:a,$ZodEnum:vi,$ZodError:te,$ZodExactOptional:wi,$ZodFile:yi,$ZodFunction:Mi,$ZodGUID:ln,$ZodIPv4:wn,$ZodIPv6:xn,$ZodISODate:$n,$ZodISODateTime:yn,$ZodISODuration:kn,$ZodISOTime:_n,$ZodIntersection:si,$ZodJWT:Nn,$ZodKSUID:bn,$ZodLazy:Fi,$ZodLiteral:bi,$ZodMAC:Sn,$ZodMap:mi,$ZodNaN:Ui,$ZodNanoID:mn,$ZodNever:Hn,$ZodNonOptional:Ti,$ZodNull:Fn,$ZodNullable:xi,$ZodNumber:jn,$ZodNumberFormat:Pn,$ZodObject:ei,$ZodObjectJIT:ti,$ZodOptional:ki,$ZodPipe:Ai,$ZodPrefault:Ei,$ZodPromise:Li,$ZodReadonly:Zi,$ZodRealError:ne,$ZodRecord:pi,$ZodRegistry:Yr,$ZodSet:hi,$ZodString:an,$ZodStringFormat:sn,$ZodSuccess:Ci,$ZodSymbol:Mn,$ZodTemplateLiteral:qi,$ZodTransform:$i,$ZodTuple:ui,$ZodType:on,$ZodULID:gn,$ZodURL:dn,$ZodUUID:cn,$ZodUndefined:Ln,$ZodUnion:ii,$ZodUnknown:Bn,$ZodVoid:Wn,$ZodXID:vn,$ZodXor:oi,$brand:r,$constructor:i,$input:Xr,$output:Kr,Doc:nn,JSONSchema:Ds,JSONSchemaGenerator:class{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(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??"draft-2020-12";"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),this.ctx=qa({processors:As,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return Ma(e,this.ctx,t)}emit(e,t){t&&(t.cycles&&(this.ctx.cycles=t.cycles),t.reused&&(this.ctx.reused=t.reused),t.external&&(this.ctx.external=t.external)),La(this.ctx,e);const n=Fa(this.ctx,e),{"~standard":i,...r}=n;return r}},NEVER:n,TimePrecision:Eo,_any:Jo,_array:Ca,_base64:wo,_base64url:xo,_bigint:Mo,_boolean:Ro,_catch:function(e,t,n){return new e({type:"catch",innerType:t,catchValue:"function"==typeof n?n:()=>n})},_check:Da,_cidrv4:_o,_cidrv6:ko,_coercedBigint:Lo,_coercedBoolean:qo,_coercedDate:Qo,_coercedNumber:Ao,_coercedString:no,_cuid:mo,_cuid2:fo,_custom:Ua,_date:Yo,_decode:be,_decodeAsync:ke,_default:function(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return"function"==typeof n?n():I(n)}})},_discriminatedUnion:function(e,t,n,i){return new e({type:"union",options:n,discriminator:t,...O(i)})},_e164:So,_email:io,_emoji:uo,_encode:ge,_encodeAsync:$e,_endsWith:_a,_enum:function(e,t,n){const i=Array.isArray(t)?Object.fromEntries(t.map(e=>[e,e])):t;return new e({type:"enum",entries:i,...O(n)})},_file:Oa,_float32:Do,_float64:jo,_gt:ia,_gte:ra,_guid:ro,_includes:ya,_int:No,_int32:Po,_int64:Fo,_intersection:function(e,t,n){return new e({type:"intersection",left:t,right:n})},_ipv4:bo,_ipv6:yo,_isoDate:zo,_isoDateTime:To,_isoDuration:Oo,_isoTime:Co,_jwt:Io,_ksuid:vo,_lazy:function(e,t){return new e({type:"lazy",getter:t})},_length:ha,_literal:function(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...O(n)})},_lowercase:va,_lt:ta,_lte:na,_mac:$o,_map:function(e,t,n,i){return new e({type:"map",keyType:t,valueType:n,...O(i)})},_max:na,_maxLength:ma,_maxSize:ua,_mime:wa,_min:ra,_minLength:fa,_minSize:da,_multipleOf:ca,_nan:ea,_nanoid:po,_nativeEnum:function(e,t,n){return new e({type:"enum",entries:t,...O(n)})},_negative:aa,_never:Ko,_nonnegative:la,_nonoptional:function(e,t,n){return new e({type:"nonoptional",innerType:t,...O(n)})},_nonpositive:sa,_normalize:Sa,_null:Wo,_nullable:function(e,t){return new e({type:"nullable",innerType:t})},_number:Uo,_optional:function(e,t){return new e({type:"optional",innerType:t})},_overwrite:xa,_parse:le,_parseAsync:ue,_pipe:function(e,t,n){return new e({type:"pipe",in:t,out:n})},_positive:oa,_promise:function(e,t){return new e({type:"promise",innerType:t})},_property:ka,_readonly:function(e,t){return new e({type:"readonly",innerType:t})},_record:function(e,t,n,i){return new e({type:"record",keyType:t,valueType:n,...O(i)})},_refine:Aa,_regex:ga,_safeDecode:Ie,_safeDecodeAsync:Ce,_safeEncode:xe,_safeEncodeAsync:Te,_safeParse:pe,_safeParseAsync:fe,_set:function(e,t,n){return new e({type:"set",valueType:t,...O(n)})},_size:pa,_slugify:za,_startsWith:$a,_string:to,_stringFormat:Ra,_stringbool:Za,_success:function(e,t){return new e({type:"success",innerType:t})},_superRefine:Na,_symbol:Bo,_templateLiteral:function(e,t,n){return new e({type:"template_literal",parts:t,...O(n)})},_toLowerCase:Ea,_toUpperCase:Ta,_transform:function(e,t){return new e({type:"transform",transform:t})},_trim:Ia,_tuple:function(e,t,n,i){const r=n instanceof on;return new e({type:"tuple",items:t,rest:r?n:null,...O(r?i:n)})},_uint32:Zo,_uint64:Vo,_ulid:ho,_undefined:Ho,_union:function(e,t,n){return new e({type:"union",options:t,...O(n)})},_unknown:Go,_uppercase:ba,_url:co,_uuid:oo,_uuidv4:ao,_uuidv6:so,_uuidv7:lo,_void:Xo,_xid:go,_xor:function(e,t,n){return new e({type:"union",options:t,inclusive:!1,...O(n)})},clone:C,config:l,createStandardJSONSchemaMethod:Ha,createToJSONSchemaMethod:Ba,decode:ye,decodeAsync:we,describe:ja,encode:ve,encodeAsync:_e,extractDefs:La,finalize:Fa,flattenError:ie,formatError:re,globalConfig:s,globalRegistry:eo,initializeContext:qa,isValidBase64:Tn,isValidBase64URL:Cn,isValidJWT:An,locales:Gr,meta:Pa,parse:ce,parseAsync:de,prettifyError:se,process:Ma,regexes:Ot,registry:Qr,safeDecode:Ee,safeDecodeAsync:Oe,safeEncode:Se,safeEncodeAsync:ze,safeParse:me,safeParseAsync:he,toDotPath:ae,toJSONSchema:Ns,treeifyError:oe,util:Q,version:rn});function Ps(e){return!!e._zod}function Zs(e,t){if(Ps(e)){return me(e,t)}return e.safeParse(t)}var Rs=Object.freeze({__proto__:null,endsWith:_a,gt:ia,gte:ra,includes:ya,length:ha,lowercase:va,lt:ta,lte:na,maxLength:ma,maxSize:ua,mime:wa,minLength:fa,minSize:da,multipleOf:ca,negative:aa,nonnegative:la,nonpositive:sa,normalize:Sa,overwrite:xa,positive:oa,property:ka,regex:ga,size:pa,slugify:za,startsWith:$a,toLowerCase:Ea,toUpperCase:Ta,trim:Ia,uppercase:ba});const qs=i("ZodISODateTime",(e,t)=>{yn.init(e,t),fl.init(e,t)});function Ms(e){return To(qs,e)}const Ls=i("ZodISODate",(e,t)=>{$n.init(e,t),fl.init(e,t)});function Fs(e){return zo(Ls,e)}const Vs=i("ZodISOTime",(e,t)=>{_n.init(e,t),fl.init(e,t)});function Bs(e){return Co(Vs,e)}const Hs=i("ZodISODuration",(e,t)=>{kn.init(e,t),fl.init(e,t)});function Ws(e){return Oo(Hs,e)}var Js=Object.freeze({__proto__:null,ZodISODate:Ls,ZodISODateTime:qs,ZodISODuration:Hs,ZodISOTime:Vs,date:Fs,datetime:Ms,duration:Ws,time:Bs});const Gs=(e,t)=>{te.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>re(e,t)},flatten:{value:t=>ie(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,d,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,d,2)}},isEmpty:{get:()=>0===e.issues.length}})},Ks=i("ZodError",Gs),Xs=i("ZodError",Gs,{Parent:Error}),Ys=le(Xs),Qs=ue(Xs),el=pe(Xs),tl=fe(Xs),nl=ge(Xs),il=be(Xs),rl=$e(Xs),ol=ke(Xs),al=xe(Xs),sl=Ie(Xs),ll=Te(Xs),cl=Ce(Xs),ul=i("ZodType",(e,t)=>(on.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Ha(e,"input"),output:Ha(e,"output")}}),e.toJSONSchema=Ba(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(y(t,{checks:[...t.checks??[],...n.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>C(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>Ys(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>el(e,t,n),e.parseAsync=async(t,n)=>Qs(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>tl(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>nl(e,t,n),e.decode=(t,n)=>il(e,t,n),e.encodeAsync=async(t,n)=>rl(e,t,n),e.decodeAsync=async(t,n)=>ol(e,t,n),e.safeEncode=(t,n)=>al(e,t,n),e.safeDecode=(t,n)=>sl(e,t,n),e.safeEncodeAsync=async(t,n)=>ll(e,t,n),e.safeDecodeAsync=async(t,n)=>cl(e,t,n),e.refine=(t,n)=>e.check(id(t,n)),e.superRefine=t=>e.check(rd(t)),e.overwrite=t=>e.check(xa(t)),e.optional=()=>ku(e),e.exactOptional=()=>xu(e),e.nullable=()=>Iu(e),e.nullish=()=>ku(Iu(e)),e.nonoptional=t=>Au(e,t),e.array=()=>Lc(e),e.or=t=>Gc([e,t]),e.and=t=>tu(e,t),e.transform=t=>Mu(e,$u(t)),e.default=t=>zu(e,t),e.prefault=t=>Ou(e,t),e.catch=t=>Pu(e,t),e.pipe=t=>Mu(e,t),e.readonly=()=>Bu(e),e.describe=t=>{const n=e.clone();return eo.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>eo.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return eo.get(e);const n=e.clone();return eo.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),dl=i("_ZodString",(e,t)=>{an.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Ja(e,t,n);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(ga(...t)),e.includes=(...t)=>e.check(ya(...t)),e.startsWith=(...t)=>e.check($a(...t)),e.endsWith=(...t)=>e.check(_a(...t)),e.min=(...t)=>e.check(fa(...t)),e.max=(...t)=>e.check(ma(...t)),e.length=(...t)=>e.check(ha(...t)),e.nonempty=(...t)=>e.check(fa(1,...t)),e.lowercase=t=>e.check(va(t)),e.uppercase=t=>e.check(ba(t)),e.trim=()=>e.check(Ia()),e.normalize=(...t)=>e.check(Sa(...t)),e.toLowerCase=()=>e.check(Ea()),e.toUpperCase=()=>e.check(Ta()),e.slugify=()=>e.check(za())}),pl=i("ZodString",(e,t)=>{an.init(e,t),dl.init(e,t),e.email=t=>e.check(io(hl,t)),e.url=t=>e.check(co(xl,t)),e.jwt=t=>e.check(Io(ic,t)),e.emoji=t=>e.check(uo(El,t)),e.guid=t=>e.check(ro(vl,t)),e.uuid=t=>e.check(oo(yl,t)),e.uuidv4=t=>e.check(ao(yl,t)),e.uuidv6=t=>e.check(so(yl,t)),e.uuidv7=t=>e.check(lo(yl,t)),e.nanoid=t=>e.check(po(zl,t)),e.guid=t=>e.check(ro(vl,t)),e.cuid=t=>e.check(mo(Ol,t)),e.cuid2=t=>e.check(fo(Al,t)),e.ulid=t=>e.check(ho(Dl,t)),e.base64=t=>e.check(wo(Xl,t)),e.base64url=t=>e.check(xo(Ql,t)),e.xid=t=>e.check(go(Pl,t)),e.ksuid=t=>e.check(vo(Rl,t)),e.ipv4=t=>e.check(bo(Ml,t)),e.ipv6=t=>e.check(yo(Bl,t)),e.cidrv4=t=>e.check(_o(Wl,t)),e.cidrv6=t=>e.check(ko(Gl,t)),e.e164=t=>e.check(So(tc,t)),e.datetime=t=>e.check(Ms(t)),e.date=t=>e.check(Fs(t)),e.time=t=>e.check(Bs(t)),e.duration=t=>e.check(Ws(t))});function ml(e){return to(pl,e)}const fl=i("ZodStringFormat",(e,t)=>{sn.init(e,t),dl.init(e,t)}),hl=i("ZodEmail",(e,t)=>{un.init(e,t),fl.init(e,t)});function gl(e){return io(hl,e)}const vl=i("ZodGUID",(e,t)=>{ln.init(e,t),fl.init(e,t)});function bl(e){return ro(vl,e)}const yl=i("ZodUUID",(e,t)=>{cn.init(e,t),fl.init(e,t)});function $l(e){return oo(yl,e)}function _l(e){return ao(yl,e)}function kl(e){return so(yl,e)}function wl(e){return lo(yl,e)}const xl=i("ZodURL",(e,t)=>{dn.init(e,t),fl.init(e,t)});function Sl(e){return co(xl,e)}function Il(e){return co(xl,{protocol:/^https?$/,hostname:nt,...O(e)})}const El=i("ZodEmoji",(e,t)=>{pn.init(e,t),fl.init(e,t)});function Tl(e){return uo(El,e)}const zl=i("ZodNanoID",(e,t)=>{mn.init(e,t),fl.init(e,t)});function Cl(e){return po(zl,e)}const Ol=i("ZodCUID",(e,t)=>{fn.init(e,t),fl.init(e,t)});function Ul(e){return mo(Ol,e)}const Al=i("ZodCUID2",(e,t)=>{hn.init(e,t),fl.init(e,t)});function Nl(e){return fo(Al,e)}const Dl=i("ZodULID",(e,t)=>{gn.init(e,t),fl.init(e,t)});function jl(e){return ho(Dl,e)}const Pl=i("ZodXID",(e,t)=>{vn.init(e,t),fl.init(e,t)});function Zl(e){return go(Pl,e)}const Rl=i("ZodKSUID",(e,t)=>{bn.init(e,t),fl.init(e,t)});function ql(e){return vo(Rl,e)}const Ml=i("ZodIPv4",(e,t)=>{wn.init(e,t),fl.init(e,t)});function Ll(e){return bo(Ml,e)}const Fl=i("ZodMAC",(e,t)=>{Sn.init(e,t),fl.init(e,t)});function Vl(e){return $o(Fl,e)}const Bl=i("ZodIPv6",(e,t)=>{xn.init(e,t),fl.init(e,t)});function Hl(e){return yo(Bl,e)}const Wl=i("ZodCIDRv4",(e,t)=>{In.init(e,t),fl.init(e,t)});function Jl(e){return _o(Wl,e)}const Gl=i("ZodCIDRv6",(e,t)=>{En.init(e,t),fl.init(e,t)});function Kl(e){return ko(Gl,e)}const Xl=i("ZodBase64",(e,t)=>{zn.init(e,t),fl.init(e,t)});function Yl(e){return wo(Xl,e)}const Ql=i("ZodBase64URL",(e,t)=>{On.init(e,t),fl.init(e,t)});function ec(e){return xo(Ql,e)}const tc=i("ZodE164",(e,t)=>{Un.init(e,t),fl.init(e,t)});function nc(e){return So(tc,e)}const ic=i("ZodJWT",(e,t)=>{Nn.init(e,t),fl.init(e,t)});function rc(e){return Io(ic,e)}const oc=i("ZodCustomStringFormat",(e,t)=>{Dn.init(e,t),fl.init(e,t)});function ac(e,t,n={}){return Ra(oc,e,t,n)}function sc(e){return Ra(oc,"hostname",tt,e)}function lc(e){return Ra(oc,"hex",bt,e)}function cc(e,t){const n=`${e}_${t?.enc??"hex"}`,i=Ot[n];if(!i)throw new Error(`Unrecognized hash format: ${n}`);return Ra(oc,n,i,t)}const uc=i("ZodNumber",(e,t)=>{jn.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Ga(e,t,n),e.gt=(t,n)=>e.check(ia(t,n)),e.gte=(t,n)=>e.check(ra(t,n)),e.min=(t,n)=>e.check(ra(t,n)),e.lt=(t,n)=>e.check(ta(t,n)),e.lte=(t,n)=>e.check(na(t,n)),e.max=(t,n)=>e.check(na(t,n)),e.int=t=>e.check(mc(t)),e.safe=t=>e.check(mc(t)),e.positive=t=>e.check(ia(0,t)),e.nonnegative=t=>e.check(ra(0,t)),e.negative=t=>e.check(ta(0,t)),e.nonpositive=t=>e.check(na(0,t)),e.multipleOf=(t,n)=>e.check(ca(t,n)),e.step=(t,n)=>e.check(ca(t,n)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function dc(e){return Uo(uc,e)}const pc=i("ZodNumberFormat",(e,t)=>{Pn.init(e,t),uc.init(e,t)});function mc(e){return No(pc,e)}function fc(e){return Do(pc,e)}function hc(e){return jo(pc,e)}function gc(e){return Po(pc,e)}function vc(e){return Zo(pc,e)}const bc=i("ZodBoolean",(e,t)=>{Zn.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(e,t,n)=>Ka(0,0,t)});function yc(e){return Ro(bc,e)}const $c=i("ZodBigInt",(e,t)=>{Rn.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(e,t,n)=>Xa(0,e),e.gte=(t,n)=>e.check(ra(t,n)),e.min=(t,n)=>e.check(ra(t,n)),e.gt=(t,n)=>e.check(ia(t,n)),e.gte=(t,n)=>e.check(ra(t,n)),e.min=(t,n)=>e.check(ra(t,n)),e.lt=(t,n)=>e.check(ta(t,n)),e.lte=(t,n)=>e.check(na(t,n)),e.max=(t,n)=>e.check(na(t,n)),e.positive=t=>e.check(ia(BigInt(0),t)),e.negative=t=>e.check(ta(BigInt(0),t)),e.nonpositive=t=>e.check(na(BigInt(0),t)),e.nonnegative=t=>e.check(ra(BigInt(0),t)),e.multipleOf=(t,n)=>e.check(ca(t,n));const n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function _c(e){return Mo($c,e)}const kc=i("ZodBigIntFormat",(e,t)=>{qn.init(e,t),$c.init(e,t)});function wc(e){return Fo(kc,e)}function xc(e){return Vo(kc,e)}const Sc=i("ZodSymbol",(e,t)=>{Mn.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(e,t,n)=>Ya(0,e)});function Ic(e){return Bo(Sc,e)}const Ec=i("ZodUndefined",(e,t)=>{Ln.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(e,t,n)=>es(0,e)});function Tc(e){return Ho(Ec,e)}const zc=i("ZodNull",(e,t)=>{Fn.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(e,t,n)=>Qa(0,e,t)});function Cc(e){return Wo(zc,e)}const Oc=i("ZodAny",(e,t)=>{Vn.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function Uc(){return Jo(Oc)}const Ac=i("ZodUnknown",(e,t)=>{Bn.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function Nc(){return Go(Ac)}const Dc=i("ZodNever",(e,t)=>{Hn.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ns(0,0,t)});function jc(e){return Ko(Dc,e)}const Pc=i("ZodVoid",(e,t)=>{Wn.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ts(0,e)});function Zc(e){return Xo(Pc,e)}const Rc=i("ZodDate",(e,t)=>{Jn.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(e,t,n)=>os(0,e),e.min=(t,n)=>e.check(ra(t,n)),e.max=(t,n)=>e.check(na(t,n));const n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function qc(e){return Yo(Rc,e)}const Mc=i("ZodArray",(e,t)=>{Kn.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>vs(e,t,n,i),e.element=t.element,e.min=(t,n)=>e.check(fa(t,n)),e.nonempty=t=>e.check(fa(1,t)),e.max=(t,n)=>e.check(ma(t,n)),e.length=(t,n)=>e.check(ha(t,n)),e.unwrap=()=>e.element});function Lc(e,t){return Ca(Mc,e,t)}function Fc(e){const t=e._zod.def.shape;return mu(Object.keys(t))}const Vc=i("ZodObject",(e,t)=>{ti.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>bs(e,t,n,i),v(e,"shape",()=>t.shape),e.keyof=()=>mu(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Nc()}),e.loose=()=>e.clone({...e._zod.def,catchall:Nc()}),e.strict=()=>e.clone({...e._zod.def,catchall:jc()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>Z(e,t),e.safeExtend=t=>R(e,t),e.merge=t=>q(e,t),e.pick=t=>j(e,t),e.omit=t=>P(e,t),e.partial=(...t)=>M(_u,e,t[0]),e.required=(...t)=>L(Uu,e,t[0])});function Bc(e,t){const n={type:"object",shape:e??{},...O(t)};return new Vc(n)}function Hc(e,t){return new Vc({type:"object",shape:e,catchall:jc(),...O(t)})}function Wc(e,t){return new Vc({type:"object",shape:e,catchall:Nc(),...O(t)})}const Jc=i("ZodUnion",(e,t)=>{ii.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>ys(e,t,n,i),e.options=t.options});function Gc(e,t){return new Jc({type:"union",options:e,...O(t)})}const Kc=i("ZodXor",(e,t)=>{Jc.init(e,t),oi.init(e,t),e._zod.processJSONSchema=(t,n,i)=>ys(e,t,n,i),e.options=t.options});function Xc(e,t){return new Kc({type:"union",options:e,inclusive:!1,...O(t)})}const Yc=i("ZodDiscriminatedUnion",(e,t)=>{Jc.init(e,t),ai.init(e,t)});function Qc(e,t,n){return new Yc({type:"union",options:t,discriminator:e,...O(n)})}const eu=i("ZodIntersection",(e,t)=>{si.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>$s(e,t,n,i)});function tu(e,t){return new eu({type:"intersection",left:e,right:t})}const nu=i("ZodTuple",(e,t)=>{ui.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>_s(e,t,n,i),e.rest=t=>e.clone({...e._zod.def,rest:t})});function iu(e,t,n){const i=t instanceof on;return new nu({type:"tuple",items:e,rest:i?t:null,...O(i?n:t)})}const ru=i("ZodRecord",(e,t)=>{pi.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>ks(e,t,n,i),e.keyType=t.keyType,e.valueType=t.valueType});function ou(e,t,n){return new ru({type:"record",keyType:e,valueType:t,...O(n)})}function au(e,t,n){const i=C(e);return i._zod.values=void 0,new ru({type:"record",keyType:i,valueType:t,...O(n)})}function su(e,t,n){return new ru({type:"record",keyType:e,valueType:t,mode:"loose",...O(n)})}const lu=i("ZodMap",(e,t)=>{mi.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(e,t,n)=>hs(0,e),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...t)=>e.check(da(...t)),e.nonempty=t=>e.check(da(1,t)),e.max=(...t)=>e.check(ua(...t)),e.size=(...t)=>e.check(pa(...t))});function cu(e,t,n){return new lu({type:"map",keyType:e,valueType:t,...O(n)})}const uu=i("ZodSet",(e,t)=>{hi.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(e,t,n)=>gs(0,e),e.min=(...t)=>e.check(da(...t)),e.nonempty=t=>e.check(da(1,t)),e.max=(...t)=>e.check(ua(...t)),e.size=(...t)=>e.check(pa(...t))});function du(e,t){return new uu({type:"set",valueType:e,...O(t)})}const pu=i("ZodEnum",(e,t)=>{vi.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>as(e,0,n),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(e,i)=>{const r={};for(const i of e){if(!n.has(i))throw new Error(`Key ${i} not found in enum`);r[i]=t.entries[i]}return new pu({...t,checks:[],...O(i),entries:r})},e.exclude=(e,i)=>{const r={...t.entries};for(const t of e){if(!n.has(t))throw new Error(`Key ${t} not found in enum`);delete r[t]}return new pu({...t,checks:[],...O(i),entries:r})}});function mu(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new pu({type:"enum",entries:n,...O(t)})}function fu(e,t){return new pu({type:"enum",entries:e,...O(t)})}const hu=i("ZodLiteral",(e,t)=>{bi.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>ss(e,t,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function gu(e,t){return new hu({type:"literal",values:Array.isArray(e)?e:[e],...O(t)})}const vu=i("ZodFile",(e,t)=>{yi.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>us(e,0,n),e.min=(t,n)=>e.check(da(t,n)),e.max=(t,n)=>e.check(ua(t,n)),e.mime=(t,n)=>e.check(wa(Array.isArray(t)?t:[t],n))});function bu(e){return Oa(vu,e)}const yu=i("ZodTransform",(e,t)=>{$i.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(e,t,n)=>fs(0,e),e._zod.parse=(n,i)=>{if("backward"===i.direction)throw new a(e.constructor.name);n.addIssue=i=>{if("string"==typeof i)n.issues.push(K(i,n.value,t));else{const t=i;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=n.value),t.inst??(t.inst=e),n.issues.push(K(t))}};const r=t.transform(n.value,n);return r instanceof Promise?r.then(e=>(n.value=e,n)):(n.value=r,n)}});function $u(e){return new yu({type:"transform",transform:e})}const _u=i("ZodOptional",(e,t)=>{ki.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Os(e,t,0,i),e.unwrap=()=>e._zod.def.innerType});function ku(e){return new _u({type:"optional",innerType:e})}const wu=i("ZodExactOptional",(e,t)=>{wi.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Os(e,t,0,i),e.unwrap=()=>e._zod.def.innerType});function xu(e){return new wu({type:"optional",innerType:e})}const Su=i("ZodNullable",(e,t)=>{xi.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>ws(e,t,n,i),e.unwrap=()=>e._zod.def.innerType});function Iu(e){return new Su({type:"nullable",innerType:e})}function Eu(e){return ku(Iu(e))}const Tu=i("ZodDefault",(e,t)=>{Si.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Ss(e,t,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function zu(e,t){return new Tu({type:"default",innerType:e,get defaultValue(){return"function"==typeof t?t():I(t)}})}const Cu=i("ZodPrefault",(e,t)=>{Ei.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Is(e,t,n,i),e.unwrap=()=>e._zod.def.innerType});function Ou(e,t){return new Cu({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof t?t():I(t)}})}const Uu=i("ZodNonOptional",(e,t)=>{Ti.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>xs(e,t,0,i),e.unwrap=()=>e._zod.def.innerType});function Au(e,t){return new Uu({type:"nonoptional",innerType:e,...O(t)})}const Nu=i("ZodSuccess",(e,t)=>{Ci.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ds(0,0,t),e.unwrap=()=>e._zod.def.innerType});function Du(e){return new Nu({type:"success",innerType:e})}const ju=i("ZodCatch",(e,t)=>{Oi.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Es(e,t,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Pu(e,t){return new ju({type:"catch",innerType:e,catchValue:"function"==typeof t?t:()=>t})}const Zu=i("ZodNaN",(e,t)=>{Ui.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ls(0,e)});function Ru(e){return ea(Zu,e)}const qu=i("ZodPipe",(e,t)=>{Ai.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Ts(e,t,0,i),e.in=t.in,e.out=t.out});function Mu(e,t){return new qu({type:"pipe",in:e,out:t})}const Lu=i("ZodCodec",(e,t)=>{qu.init(e,t),Di.init(e,t)});function Fu(e,t,n){return new Lu({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}const Vu=i("ZodReadonly",(e,t)=>{Zi.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>zs(e,t,n,i),e.unwrap=()=>e._zod.def.innerType});function Bu(e){return new Vu({type:"readonly",innerType:e})}const Hu=i("ZodTemplateLiteral",(e,t)=>{qi.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>cs(e,0,n)});function Wu(e,t){return new Hu({type:"template_literal",parts:e,...O(t)})}const Ju=i("ZodLazy",(e,t)=>{Fi.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Us(e,t,0,i),e.unwrap=()=>e._zod.def.getter()});function Gu(e){return new Ju({type:"lazy",getter:e})}const Ku=i("ZodPromise",(e,t)=>{Li.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Cs(e,t,0,i),e.unwrap=()=>e._zod.def.innerType});function Xu(e){return new Ku({type:"promise",innerType:e})}const Yu=i("ZodFunction",(e,t)=>{Mi.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ms(0,e)});function Qu(e){return new Yu({type:"function",input:Array.isArray(e?.input)?iu(e?.input):e?.input??Lc(Nc()),output:e?.output??Nc()})}const ed=i("ZodCustom",(e,t)=>{Vi.init(e,t),ul.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ps(0,e)});function td(e){const t=new Ut({check:"custom"});return t._zod.check=e,t}function nd(e,t){return Ua(ed,e??(()=>!0),t)}function id(e,t={}){return Aa(ed,e,t)}function rd(e){return Na(e)}const od=ja,ad=Pa;function sd(e,t={}){const n=new ed({type:"custom",check:"custom",fn:t=>t instanceof e,abort:!0,...O(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:"invalid_type",expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}const ld=(...e)=>Za({Codec:Lu,Boolean:bc,String:pl},...e);function cd(e){const t=Gu(()=>Gc([ml(e),dc(),yc(),Cc(),Lc(t),ou(ml(),t)]));return t}function ud(e,t){return Mu($u(e),t)}const dd={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 pd(e){l({customError:e})}function md(){return l().customError}var fd;fd||(fd={});const hd={...Object.freeze({__proto__:null,ZodAny:Oc,ZodArray:Mc,ZodBase64:Xl,ZodBase64URL:Ql,ZodBigInt:$c,ZodBigIntFormat:kc,ZodBoolean:bc,ZodCIDRv4:Wl,ZodCIDRv6:Gl,ZodCUID:Ol,ZodCUID2:Al,ZodCatch:ju,ZodCodec:Lu,ZodCustom:ed,ZodCustomStringFormat:oc,ZodDate:Rc,ZodDefault:Tu,ZodDiscriminatedUnion:Yc,ZodE164:tc,ZodEmail:hl,ZodEmoji:El,ZodEnum:pu,ZodExactOptional:wu,ZodFile:vu,ZodFunction:Yu,ZodGUID:vl,ZodIPv4:Ml,ZodIPv6:Bl,ZodIntersection:eu,ZodJWT:ic,ZodKSUID:Rl,ZodLazy:Ju,ZodLiteral:hu,ZodMAC:Fl,ZodMap:lu,ZodNaN:Zu,ZodNanoID:zl,ZodNever:Dc,ZodNonOptional:Uu,ZodNull:zc,ZodNullable:Su,ZodNumber:uc,ZodNumberFormat:pc,ZodObject:Vc,ZodOptional:_u,ZodPipe:qu,ZodPrefault:Cu,ZodPromise:Ku,ZodReadonly:Vu,ZodRecord:ru,ZodSet:uu,ZodString:pl,ZodStringFormat:fl,ZodSuccess:Nu,ZodSymbol:Sc,ZodTemplateLiteral:Hu,ZodTransform:yu,ZodTuple:nu,ZodType:ul,ZodULID:Dl,ZodURL:xl,ZodUUID:yl,ZodUndefined:Ec,ZodUnion:Jc,ZodUnknown:Ac,ZodVoid:Pc,ZodXID:Pl,ZodXor:Kc,_ZodString:dl,_default:zu,_function:Qu,any:Uc,array:Lc,base64:Yl,base64url:ec,bigint:_c,boolean:yc,catch:Pu,check:td,cidrv4:Jl,cidrv6:Kl,codec:Fu,cuid:Ul,cuid2:Nl,custom:nd,date:qc,describe:od,discriminatedUnion:Qc,e164:nc,email:gl,emoji:Tl,enum:mu,exactOptional:xu,file:bu,float32:fc,float64:hc,function:Qu,guid:bl,hash:cc,hex:lc,hostname:sc,httpUrl:Il,instanceof:sd,int:mc,int32:gc,int64:wc,intersection:tu,ipv4:Ll,ipv6:Hl,json:cd,jwt:rc,keyof:Fc,ksuid:ql,lazy:Gu,literal:gu,looseObject:Wc,looseRecord:su,mac:Vl,map:cu,meta:ad,nan:Ru,nanoid:Cl,nativeEnum:fu,never:jc,nonoptional:Au,null:Cc,nullable:Iu,nullish:Eu,number:dc,object:Bc,optional:ku,partialRecord:au,pipe:Mu,prefault:Ou,preprocess:ud,promise:Xu,readonly:Bu,record:ou,refine:id,set:du,strictObject:Hc,string:ml,stringFormat:ac,stringbool:ld,success:Du,superRefine:rd,symbol:Ic,templateLiteral:Wu,transform:$u,tuple:iu,uint32:vc,uint64:xc,ulid:jl,undefined:Tc,union:Gc,unknown:Nc,url:Sl,uuid:$l,uuidv4:_l,uuidv6:kl,uuidv7:wl,void:Zc,xid:Zl,xor:Xc}),...Rs,iso:Js},gd=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 vd(e,t){if(void 0!==e.not){if("object"==typeof e.not&&0===Object.keys(e.not).length)return hd.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(void 0!==e.unevaluatedItems)throw new Error("unevaluatedItems is not supported");if(void 0!==e.unevaluatedProperties)throw new Error("unevaluatedProperties is not supported");if(void 0!==e.if||void 0!==e.then||void 0!==e.else)throw new Error("Conditional schemas (if/then/else) are not supported");if(void 0!==e.dependentSchemas||void 0!==e.dependentRequired)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){const n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return hd.lazy(()=>{if(!t.refs.has(n))throw new Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);const i=function(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");const n=e.slice(1).split("/").filter(Boolean);if(0===n.length)return t.rootSchema;const i="draft-2020-12"===t.version?"$defs":"definitions";if(n[0]===i){const i=n[1];if(!i||!t.defs[i])throw new Error(`Reference not found: ${e}`);return t.defs[i]}throw new Error(`Reference not found: ${e}`)}(n,t),r=bd(i,t);return t.refs.set(n,r),t.processing.delete(n),r}if(void 0!==e.enum){const n=e.enum;if("openapi-3.0"===t.version&&!0===e.nullable&&1===n.length&&null===n[0])return hd.null();if(0===n.length)return hd.never();if(1===n.length)return hd.literal(n[0]);if(n.every(e=>"string"==typeof e))return hd.enum(n);const i=n.map(e=>hd.literal(e));return i.length<2?i[0]:hd.union([i[0],i[1],...i.slice(2)])}if(void 0!==e.const)return hd.literal(e.const);const n=e.type;if(Array.isArray(n)){const i=n.map(n=>vd({...e,type:n},t));return 0===i.length?hd.never():1===i.length?i[0]:hd.union(i)}if(!n)return hd.any();let i;switch(n){case"string":{let t=hd.string();if(e.format){const n=e.format;"email"===n?t=t.check(hd.email()):"uri"===n||"uri-reference"===n?t=t.check(hd.url()):"uuid"===n||"guid"===n?t=t.check(hd.uuid()):"date-time"===n?t=t.check(hd.iso.datetime()):"date"===n?t=t.check(hd.iso.date()):"time"===n?t=t.check(hd.iso.time()):"duration"===n?t=t.check(hd.iso.duration()):"ipv4"===n?t=t.check(hd.ipv4()):"ipv6"===n?t=t.check(hd.ipv6()):"mac"===n?t=t.check(hd.mac()):"cidr"===n?t=t.check(hd.cidrv4()):"cidr-v6"===n?t=t.check(hd.cidrv6()):"base64"===n?t=t.check(hd.base64()):"base64url"===n?t=t.check(hd.base64url()):"e164"===n?t=t.check(hd.e164()):"jwt"===n?t=t.check(hd.jwt()):"emoji"===n?t=t.check(hd.emoji()):"nanoid"===n?t=t.check(hd.nanoid()):"cuid"===n?t=t.check(hd.cuid()):"cuid2"===n?t=t.check(hd.cuid2()):"ulid"===n?t=t.check(hd.ulid()):"xid"===n?t=t.check(hd.xid()):"ksuid"===n&&(t=t.check(hd.ksuid()))}"number"==typeof e.minLength&&(t=t.min(e.minLength)),"number"==typeof e.maxLength&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),i=t;break}case"number":case"integer":{let t="integer"===n?hd.number().int():hd.number();"number"==typeof e.minimum&&(t=t.min(e.minimum)),"number"==typeof e.maximum&&(t=t.max(e.maximum)),"number"==typeof e.exclusiveMinimum?t=t.gt(e.exclusiveMinimum):!0===e.exclusiveMinimum&&"number"==typeof e.minimum&&(t=t.gt(e.minimum)),"number"==typeof e.exclusiveMaximum?t=t.lt(e.exclusiveMaximum):!0===e.exclusiveMaximum&&"number"==typeof e.maximum&&(t=t.lt(e.maximum)),"number"==typeof e.multipleOf&&(t=t.multipleOf(e.multipleOf)),i=t;break}case"boolean":i=hd.boolean();break;case"null":i=hd.null();break;case"object":{const n={},r=e.properties||{},o=new Set(e.required||[]);for(const[e,i]of Object.entries(r)){const r=bd(i,t);n[e]=o.has(e)?r:r.optional()}if(e.propertyNames){const r=bd(e.propertyNames,t),o=e.additionalProperties&&"object"==typeof e.additionalProperties?bd(e.additionalProperties,t):hd.any();if(0===Object.keys(n).length){i=hd.record(r,o);break}const a=hd.object(n).passthrough(),s=hd.looseRecord(r,o);i=hd.intersection(a,s);break}if(e.patternProperties){const r=e.patternProperties,o=Object.keys(r),a=[];for(const e of o){const n=bd(r[e],t),i=hd.string().regex(new RegExp(e));a.push(hd.looseRecord(i,n))}const s=[];if(Object.keys(n).length>0&&s.push(hd.object(n).passthrough()),s.push(...a),0===s.length)i=hd.object({}).passthrough();else if(1===s.length)i=s[0];else{let e=hd.intersection(s[0],s[1]);for(let t=2;t<s.length;t++)e=hd.intersection(e,s[t]);i=e}break}const a=hd.object(n);i=!1===e.additionalProperties?a.strict():"object"==typeof e.additionalProperties?a.catchall(bd(e.additionalProperties,t)):a.passthrough();break}case"array":{const n=e.prefixItems,r=e.items;if(n&&Array.isArray(n)){const o=n.map(e=>bd(e,t)),a=r&&"object"==typeof r&&!Array.isArray(r)?bd(r,t):void 0;i=a?hd.tuple(o).rest(a):hd.tuple(o),"number"==typeof e.minItems&&(i=i.check(hd.minLength(e.minItems))),"number"==typeof e.maxItems&&(i=i.check(hd.maxLength(e.maxItems)))}else if(Array.isArray(r)){const n=r.map(e=>bd(e,t)),o=e.additionalItems&&"object"==typeof e.additionalItems?bd(e.additionalItems,t):void 0;i=o?hd.tuple(n).rest(o):hd.tuple(n),"number"==typeof e.minItems&&(i=i.check(hd.minLength(e.minItems))),"number"==typeof e.maxItems&&(i=i.check(hd.maxLength(e.maxItems)))}else if(void 0!==r){const n=bd(r,t);let o=hd.array(n);"number"==typeof e.minItems&&(o=o.min(e.minItems)),"number"==typeof e.maxItems&&(o=o.max(e.maxItems)),i=o}else i=hd.array(hd.any());break}default:throw new Error(`Unsupported type: ${n}`)}return e.description&&(i=i.describe(e.description)),void 0!==e.default&&(i=i.default(e.default)),i}function bd(e,t){if("boolean"==typeof e)return e?hd.any():hd.never();let n=vd(e,t);const i=e.type||void 0!==e.enum||void 0!==e.const;if(e.anyOf&&Array.isArray(e.anyOf)){const r=e.anyOf.map(e=>bd(e,t)),o=hd.union(r);n=i?hd.intersection(n,o):o}if(e.oneOf&&Array.isArray(e.oneOf)){const r=e.oneOf.map(e=>bd(e,t)),o=hd.xor(r);n=i?hd.intersection(n,o):o}if(e.allOf&&Array.isArray(e.allOf))if(0===e.allOf.length)n=i?n:hd.any();else{let r=i?n:bd(e.allOf[0],t);for(let n=i?0:1;n<e.allOf.length;n++)r=hd.intersection(r,bd(e.allOf[n],t));n=r}!0===e.nullable&&"openapi-3.0"===t.version&&(n=hd.nullable(n)),!0===e.readOnly&&(n=hd.readonly(n));const r={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(const t of o)t in e&&(r[t]=e[t]);const a=["contentEncoding","contentMediaType","contentSchema"];for(const t of a)t in e&&(r[t]=e[t]);for(const t of Object.keys(e))gd.has(t)||(r[t]=e[t]);return Object.keys(r).length>0&&t.registry.add(n,r),n}function yd(e,t){if("boolean"==typeof e)return e?hd.any():hd.never();const n=function(e,t){const n=e.$schema;return"https://json-schema.org/draft/2020-12/schema"===n?"draft-2020-12":"http://json-schema.org/draft-07/schema#"===n?"draft-7":"http://json-schema.org/draft-04/schema#"===n?"draft-4":t??"draft-2020-12"}(e,t?.defaultTarget);return bd(e,{version:n,defs:e.$defs||e.definitions||{},refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??eo})}var $d=Object.freeze({__proto__:null,bigint:function(e){return Lo($c,e)},boolean:function(e){return qo(bc,e)},date:function(e){return Qo(Rc,e)},number:function(e){return Ao(uc,e)},string:function(e){return no(pl,e)}});l(nr());var _d=Object.freeze({__proto__:null,$brand:r,$input:Xr,$output:Kr,NEVER:n,TimePrecision:Eo,ZodAny:Oc,ZodArray:Mc,ZodBase64:Xl,ZodBase64URL:Ql,ZodBigInt:$c,ZodBigIntFormat:kc,ZodBoolean:bc,ZodCIDRv4:Wl,ZodCIDRv6:Gl,ZodCUID:Ol,ZodCUID2:Al,ZodCatch:ju,ZodCodec:Lu,ZodCustom:ed,ZodCustomStringFormat:oc,ZodDate:Rc,ZodDefault:Tu,ZodDiscriminatedUnion:Yc,ZodE164:tc,ZodEmail:hl,ZodEmoji:El,ZodEnum:pu,ZodError:Ks,ZodExactOptional:wu,ZodFile:vu,get ZodFirstPartyTypeKind(){return fd},ZodFunction:Yu,ZodGUID:vl,ZodIPv4:Ml,ZodIPv6:Bl,ZodISODate:Ls,ZodISODateTime:qs,ZodISODuration:Hs,ZodISOTime:Vs,ZodIntersection:eu,ZodIssueCode:dd,ZodJWT:ic,ZodKSUID:Rl,ZodLazy:Ju,ZodLiteral:hu,ZodMAC:Fl,ZodMap:lu,ZodNaN:Zu,ZodNanoID:zl,ZodNever:Dc,ZodNonOptional:Uu,ZodNull:zc,ZodNullable:Su,ZodNumber:uc,ZodNumberFormat:pc,ZodObject:Vc,ZodOptional:_u,ZodPipe:qu,ZodPrefault:Cu,ZodPromise:Ku,ZodReadonly:Vu,ZodRealError:Xs,ZodRecord:ru,ZodSet:uu,ZodString:pl,ZodStringFormat:fl,ZodSuccess:Nu,ZodSymbol:Sc,ZodTemplateLiteral:Hu,ZodTransform:yu,ZodTuple:nu,ZodType:ul,ZodULID:Dl,ZodURL:xl,ZodUUID:yl,ZodUndefined:Ec,ZodUnion:Jc,ZodUnknown:Ac,ZodVoid:Pc,ZodXID:Pl,ZodXor:Kc,_ZodString:dl,_default:zu,_function:Qu,any:Uc,array:Lc,base64:Yl,base64url:ec,bigint:_c,boolean:yc,catch:Pu,check:td,cidrv4:Jl,cidrv6:Kl,clone:C,codec:Fu,coerce:$d,config:l,core:js,cuid:Ul,cuid2:Nl,custom:nd,date:qc,decode:il,decodeAsync:ol,describe:od,discriminatedUnion:Qc,e164:nc,email:gl,emoji:Tl,encode:nl,encodeAsync:rl,endsWith:_a,enum:mu,exactOptional:xu,file:bu,flattenError:ie,float32:fc,float64:hc,formatError:re,fromJSONSchema:yd,function:Qu,getErrorMap:md,globalRegistry:eo,gt:ia,gte:ra,guid:bl,hash:cc,hex:lc,hostname:sc,httpUrl:Il,includes:ya,instanceof:sd,int:mc,int32:gc,int64:wc,intersection:tu,ipv4:Ll,ipv6:Hl,iso:Js,json:cd,jwt:rc,keyof:Fc,ksuid:ql,lazy:Gu,length:ha,literal:gu,locales:Gr,looseObject:Wc,looseRecord:su,lowercase:va,lt:ta,lte:na,mac:Vl,map:cu,maxLength:ma,maxSize:ua,meta:ad,mime:wa,minLength:fa,minSize:da,multipleOf:ca,nan:Ru,nanoid:Cl,nativeEnum:fu,negative:aa,never:jc,nonnegative:la,nonoptional:Au,nonpositive:sa,normalize:Sa,null:Cc,nullable:Iu,nullish:Eu,number:dc,object:Bc,optional:ku,overwrite:xa,parse:Ys,parseAsync:Qs,partialRecord:au,pipe:Mu,positive:oa,prefault:Ou,preprocess:ud,prettifyError:se,promise:Xu,property:ka,readonly:Bu,record:ou,refine:id,regex:ga,regexes:Ot,registry:Qr,safeDecode:sl,safeDecodeAsync:cl,safeEncode:al,safeEncodeAsync:ll,safeParse:el,safeParseAsync:tl,set:du,setErrorMap:pd,size:pa,slugify:za,startsWith:$a,strictObject:Hc,string:ml,stringFormat:ac,stringbool:ld,success:Du,superRefine:rd,symbol:Ic,templateLiteral:Wu,toJSONSchema:Ns,toLowerCase:Ea,toUpperCase:Ta,transform:$u,treeifyError:oe,trim:Ia,tuple:iu,uint32:vc,uint64:xc,ulid:jl,undefined:Tc,union:Gc,unknown:Nc,uppercase:ba,url:Sl,util:Q,uuid:$l,uuidv4:_l,uuidv6:kl,uuidv7:wl,void:Zc,xid:Zl,xor:Xc}),kd=Object.freeze({__proto__:null,$brand:r,$input:Xr,$output:Kr,NEVER:n,TimePrecision:Eo,ZodAny:Oc,ZodArray:Mc,ZodBase64:Xl,ZodBase64URL:Ql,ZodBigInt:$c,ZodBigIntFormat:kc,ZodBoolean:bc,ZodCIDRv4:Wl,ZodCIDRv6:Gl,ZodCUID:Ol,ZodCUID2:Al,ZodCatch:ju,ZodCodec:Lu,ZodCustom:ed,ZodCustomStringFormat:oc,ZodDate:Rc,ZodDefault:Tu,ZodDiscriminatedUnion:Yc,ZodE164:tc,ZodEmail:hl,ZodEmoji:El,ZodEnum:pu,ZodError:Ks,ZodExactOptional:wu,ZodFile:vu,get ZodFirstPartyTypeKind(){return fd},ZodFunction:Yu,ZodGUID:vl,ZodIPv4:Ml,ZodIPv6:Bl,ZodISODate:Ls,ZodISODateTime:qs,ZodISODuration:Hs,ZodISOTime:Vs,ZodIntersection:eu,ZodIssueCode:dd,ZodJWT:ic,ZodKSUID:Rl,ZodLazy:Ju,ZodLiteral:hu,ZodMAC:Fl,ZodMap:lu,ZodNaN:Zu,ZodNanoID:zl,ZodNever:Dc,ZodNonOptional:Uu,ZodNull:zc,ZodNullable:Su,ZodNumber:uc,ZodNumberFormat:pc,ZodObject:Vc,ZodOptional:_u,ZodPipe:qu,ZodPrefault:Cu,ZodPromise:Ku,ZodReadonly:Vu,ZodRealError:Xs,ZodRecord:ru,ZodSet:uu,ZodString:pl,ZodStringFormat:fl,ZodSuccess:Nu,ZodSymbol:Sc,ZodTemplateLiteral:Hu,ZodTransform:yu,ZodTuple:nu,ZodType:ul,ZodULID:Dl,ZodURL:xl,ZodUUID:yl,ZodUndefined:Ec,ZodUnion:Jc,ZodUnknown:Ac,ZodVoid:Pc,ZodXID:Pl,ZodXor:Kc,_ZodString:dl,_default:zu,_function:Qu,any:Uc,array:Lc,base64:Yl,base64url:ec,bigint:_c,boolean:yc,catch:Pu,check:td,cidrv4:Jl,cidrv6:Kl,clone:C,codec:Fu,coerce:$d,config:l,core:js,cuid:Ul,cuid2:Nl,custom:nd,date:qc,decode:il,decodeAsync:ol,describe:od,discriminatedUnion:Qc,e164:nc,email:gl,emoji:Tl,encode:nl,encodeAsync:rl,endsWith:_a,enum:mu,exactOptional:xu,file:bu,flattenError:ie,float32:fc,float64:hc,formatError:re,fromJSONSchema:yd,function:Qu,getErrorMap:md,globalRegistry:eo,gt:ia,gte:ra,guid:bl,hash:cc,hex:lc,hostname:sc,httpUrl:Il,includes:ya,instanceof:sd,int:mc,int32:gc,int64:wc,intersection:tu,ipv4:Ll,ipv6:Hl,iso:Js,json:cd,jwt:rc,keyof:Fc,ksuid:ql,lazy:Gu,length:ha,literal:gu,locales:Gr,looseObject:Wc,looseRecord:su,lowercase:va,lt:ta,lte:na,mac:Vl,map:cu,maxLength:ma,maxSize:ua,meta:ad,mime:wa,minLength:fa,minSize:da,multipleOf:ca,nan:Ru,nanoid:Cl,nativeEnum:fu,negative:aa,never:jc,nonnegative:la,nonoptional:Au,nonpositive:sa,normalize:Sa,null:Cc,nullable:Iu,nullish:Eu,number:dc,object:Bc,optional:ku,overwrite:xa,parse:Ys,parseAsync:Qs,partialRecord:au,pipe:Mu,positive:oa,prefault:Ou,preprocess:ud,prettifyError:se,promise:Xu,property:ka,readonly:Bu,record:ou,refine:id,regex:ga,regexes:Ot,registry:Qr,safeDecode:sl,safeDecodeAsync:cl,safeEncode:al,safeEncodeAsync:ll,safeParse:el,safeParseAsync:tl,set:du,setErrorMap:pd,size:pa,slugify:za,startsWith:$a,strictObject:Hc,string:ml,stringFormat:ac,stringbool:ld,success:Du,superRefine:rd,symbol:Ic,templateLiteral:Wu,toJSONSchema:Ns,toLowerCase:Ea,toUpperCase:Ta,transform:$u,treeifyError:oe,trim:Ia,tuple:iu,uint32:vc,uint64:xc,ulid:jl,undefined:Tc,union:Gc,unknown:Nc,uppercase:ba,url:Sl,util:Q,uuid:$l,uuidv4:_l,uuidv6:kl,uuidv7:wl,void:Zc,xid:Zl,xor:Xc,z:_d});const wd="io.modelcontextprotocol/related-task",xd="2.0",Sd=nd(e=>null!==e&&("object"==typeof e||"function"==typeof e)),Id=Gc([ml(),dc().int()]),Ed=ml();Wc({ttl:dc().optional(),pollInterval:dc().optional()});const Td=Bc({ttl:dc().optional()}),zd=Bc({taskId:ml()}),Cd=Wc({progressToken:Id.optional(),[wd]:zd.optional()}),Od=Bc({_meta:Cd.optional()}),Ud=Od.extend({task:Td.optional()}),Ad=Bc({method:ml(),params:Od.loose().optional()}),Nd=Bc({_meta:Cd.optional()}),Dd=Bc({method:ml(),params:Nd.loose().optional()}),jd=Wc({_meta:Cd.optional()}),Pd=Gc([ml(),dc().int()]),Zd=Bc({jsonrpc:gu(xd),id:Pd,...Ad.shape}).strict(),Rd=e=>Zd.safeParse(e).success,qd=Bc({jsonrpc:gu(xd),...Dd.shape}).strict(),Md=Bc({jsonrpc:gu(xd),id:Pd,result:jd}).strict(),Ld=e=>Md.safeParse(e).success;var Fd;!function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"}(Fd||(Fd={}));const Vd=Bc({jsonrpc:gu(xd),id:Pd.optional(),error:Bc({code:dc().int(),message:ml(),data:Nc().optional()})}).strict(),Bd=Gc([Zd,qd,Md,Vd]);Gc([Md,Vd]);const Hd=jd.strict(),Wd=Nd.extend({requestId:Pd.optional(),reason:ml().optional()}),Jd=Dd.extend({method:gu("notifications/cancelled"),params:Wd}),Gd=Bc({src:ml(),mimeType:ml().optional(),sizes:Lc(ml()).optional(),theme:mu(["light","dark"]).optional()}),Kd=Bc({icons:Lc(Gd).optional()}),Xd=Bc({name:ml(),title:ml().optional()}),Yd=Xd.extend({...Xd.shape,...Kd.shape,version:ml(),websiteUrl:ml().optional(),description:ml().optional()}),Qd=tu(Bc({applyDefaults:yc().optional()}),ou(ml(),Nc())),ep=ud(e=>e&&"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length?{form:{}}:e,tu(Bc({form:Qd.optional(),url:Sd.optional()}),ou(ml(),Nc()).optional())),tp=Wc({list:Sd.optional(),cancel:Sd.optional(),requests:Wc({sampling:Wc({createMessage:Sd.optional()}).optional(),elicitation:Wc({create:Sd.optional()}).optional()}).optional()}),np=Wc({list:Sd.optional(),cancel:Sd.optional(),requests:Wc({tools:Wc({call:Sd.optional()}).optional()}).optional()}),ip=Bc({experimental:ou(ml(),Sd).optional(),sampling:Bc({context:Sd.optional(),tools:Sd.optional()}).optional(),elicitation:ep.optional(),roots:Bc({listChanged:yc().optional()}).optional(),tasks:tp.optional(),extensions:ou(ml(),Sd).optional()}),rp=Od.extend({protocolVersion:ml(),capabilities:ip,clientInfo:Yd}),op=Ad.extend({method:gu("initialize"),params:rp}),ap=Bc({experimental:ou(ml(),Sd).optional(),logging:Sd.optional(),completions:Sd.optional(),prompts:Bc({listChanged:yc().optional()}).optional(),resources:Bc({subscribe:yc().optional(),listChanged:yc().optional()}).optional(),tools:Bc({listChanged:yc().optional()}).optional(),tasks:np.optional(),extensions:ou(ml(),Sd).optional()}),sp=jd.extend({protocolVersion:ml(),capabilities:ap,serverInfo:Yd,instructions:ml().optional()}),lp=Dd.extend({method:gu("notifications/initialized"),params:Nd.optional()}),cp=Ad.extend({method:gu("ping"),params:Od.optional()}),up=Bc({progress:dc(),total:ku(dc()),message:ku(ml())}),dp=Bc({...Nd.shape,...up.shape,progressToken:Id}),pp=Dd.extend({method:gu("notifications/progress"),params:dp}),mp=Od.extend({cursor:Ed.optional()}),fp=Ad.extend({params:mp.optional()}),hp=jd.extend({nextCursor:Ed.optional()}),gp=mu(["working","input_required","completed","failed","cancelled"]),vp=Bc({taskId:ml(),status:gp,ttl:Gc([dc(),Cc()]),createdAt:ml(),lastUpdatedAt:ml(),pollInterval:ku(dc()),statusMessage:ku(ml())}),bp=jd.extend({task:vp}),yp=Nd.merge(vp),$p=Dd.extend({method:gu("notifications/tasks/status"),params:yp}),_p=Ad.extend({method:gu("tasks/get"),params:Od.extend({taskId:ml()})}),kp=jd.merge(vp),wp=Ad.extend({method:gu("tasks/result"),params:Od.extend({taskId:ml()})});jd.loose();const xp=fp.extend({method:gu("tasks/list")}),Sp=hp.extend({tasks:Lc(vp)}),Ip=Ad.extend({method:gu("tasks/cancel"),params:Od.extend({taskId:ml()})}),Ep=jd.merge(vp),Tp=Bc({uri:ml(),mimeType:ku(ml()),_meta:ou(ml(),Nc()).optional()}),zp=Tp.extend({text:ml()}),Cp=ml().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),Op=Tp.extend({blob:Cp}),Up=mu(["user","assistant"]),Ap=Bc({audience:Lc(Up).optional(),priority:dc().min(0).max(1).optional(),lastModified:Ms({offset:!0}).optional()}),Np=Bc({...Xd.shape,...Kd.shape,uri:ml(),description:ku(ml()),mimeType:ku(ml()),size:ku(dc()),annotations:Ap.optional(),_meta:ku(Wc({}))}),Dp=Bc({...Xd.shape,...Kd.shape,uriTemplate:ml(),description:ku(ml()),mimeType:ku(ml()),annotations:Ap.optional(),_meta:ku(Wc({}))}),jp=fp.extend({method:gu("resources/list")}),Pp=hp.extend({resources:Lc(Np)}),Zp=fp.extend({method:gu("resources/templates/list")}),Rp=hp.extend({resourceTemplates:Lc(Dp)}),qp=Od.extend({uri:ml()}),Mp=qp,Lp=Ad.extend({method:gu("resources/read"),params:Mp}),Fp=jd.extend({contents:Lc(Gc([zp,Op]))}),Vp=Dd.extend({method:gu("notifications/resources/list_changed"),params:Nd.optional()}),Bp=qp,Hp=Ad.extend({method:gu("resources/subscribe"),params:Bp}),Wp=qp,Jp=Ad.extend({method:gu("resources/unsubscribe"),params:Wp}),Gp=Nd.extend({uri:ml()}),Kp=Dd.extend({method:gu("notifications/resources/updated"),params:Gp}),Xp=Bc({name:ml(),description:ku(ml()),required:ku(yc())}),Yp=Bc({...Xd.shape,...Kd.shape,description:ku(ml()),arguments:ku(Lc(Xp)),_meta:ku(Wc({}))}),Qp=fp.extend({method:gu("prompts/list")}),em=hp.extend({prompts:Lc(Yp)}),tm=Od.extend({name:ml(),arguments:ou(ml(),ml()).optional()}),nm=Ad.extend({method:gu("prompts/get"),params:tm}),im=Bc({type:gu("text"),text:ml(),annotations:Ap.optional(),_meta:ou(ml(),Nc()).optional()}),rm=Bc({type:gu("image"),data:Cp,mimeType:ml(),annotations:Ap.optional(),_meta:ou(ml(),Nc()).optional()}),om=Bc({type:gu("audio"),data:Cp,mimeType:ml(),annotations:Ap.optional(),_meta:ou(ml(),Nc()).optional()}),am=Bc({type:gu("tool_use"),name:ml(),id:ml(),input:ou(ml(),Nc()),_meta:ou(ml(),Nc()).optional()}),sm=Bc({type:gu("resource"),resource:Gc([zp,Op]),annotations:Ap.optional(),_meta:ou(ml(),Nc()).optional()}),lm=Np.extend({type:gu("resource_link")}),cm=Gc([im,rm,om,lm,sm]),um=Bc({role:Up,content:cm}),dm=jd.extend({description:ml().optional(),messages:Lc(um)}),pm=Dd.extend({method:gu("notifications/prompts/list_changed"),params:Nd.optional()}),mm=Bc({title:ml().optional(),readOnlyHint:yc().optional(),destructiveHint:yc().optional(),idempotentHint:yc().optional(),openWorldHint:yc().optional()}),fm=Bc({taskSupport:mu(["required","optional","forbidden"]).optional()}),hm=Bc({...Xd.shape,...Kd.shape,description:ml().optional(),inputSchema:Bc({type:gu("object"),properties:ou(ml(),Sd).optional(),required:Lc(ml()).optional()}).catchall(Nc()),outputSchema:Bc({type:gu("object"),properties:ou(ml(),Sd).optional(),required:Lc(ml()).optional()}).catchall(Nc()).optional(),annotations:mm.optional(),execution:fm.optional(),_meta:ou(ml(),Nc()).optional()}),gm=fp.extend({method:gu("tools/list")}),vm=hp.extend({tools:Lc(hm)}),bm=jd.extend({content:Lc(cm).default([]),structuredContent:ou(ml(),Nc()).optional(),isError:yc().optional()});bm.or(jd.extend({toolResult:Nc()}));const ym=Ud.extend({name:ml(),arguments:ou(ml(),Nc()).optional()}),$m=Ad.extend({method:gu("tools/call"),params:ym}),_m=Dd.extend({method:gu("notifications/tools/list_changed"),params:Nd.optional()});Bc({autoRefresh:yc().default(!0),debounceMs:dc().int().nonnegative().default(300)});const km=mu(["debug","info","notice","warning","error","critical","alert","emergency"]),wm=Od.extend({level:km}),xm=Ad.extend({method:gu("logging/setLevel"),params:wm}),Sm=Nd.extend({level:km,logger:ml().optional(),data:Nc()}),Im=Dd.extend({method:gu("notifications/message"),params:Sm}),Em=Bc({name:ml().optional()}),Tm=Bc({hints:Lc(Em).optional(),costPriority:dc().min(0).max(1).optional(),speedPriority:dc().min(0).max(1).optional(),intelligencePriority:dc().min(0).max(1).optional()}),zm=Bc({mode:mu(["auto","required","none"]).optional()}),Cm=Bc({type:gu("tool_result"),toolUseId:ml().describe("The unique identifier for the corresponding tool call."),content:Lc(cm).default([]),structuredContent:Bc({}).loose().optional(),isError:yc().optional(),_meta:ou(ml(),Nc()).optional()}),Om=Qc("type",[im,rm,om]),Um=Qc("type",[im,rm,om,am,Cm]),Am=Bc({role:Up,content:Gc([Um,Lc(Um)]),_meta:ou(ml(),Nc()).optional()}),Nm=Ud.extend({messages:Lc(Am),modelPreferences:Tm.optional(),systemPrompt:ml().optional(),includeContext:mu(["none","thisServer","allServers"]).optional(),temperature:dc().optional(),maxTokens:dc().int(),stopSequences:Lc(ml()).optional(),metadata:Sd.optional(),tools:Lc(hm).optional(),toolChoice:zm.optional()}),Dm=Ad.extend({method:gu("sampling/createMessage"),params:Nm}),jm=jd.extend({model:ml(),stopReason:ku(mu(["endTurn","stopSequence","maxTokens"]).or(ml())),role:Up,content:Om}),Pm=jd.extend({model:ml(),stopReason:ku(mu(["endTurn","stopSequence","maxTokens","toolUse"]).or(ml())),role:Up,content:Gc([Um,Lc(Um)])}),Zm=Bc({type:gu("boolean"),title:ml().optional(),description:ml().optional(),default:yc().optional()}),Rm=Bc({type:gu("string"),title:ml().optional(),description:ml().optional(),minLength:dc().optional(),maxLength:dc().optional(),format:mu(["email","uri","date","date-time"]).optional(),default:ml().optional()}),qm=Bc({type:mu(["number","integer"]),title:ml().optional(),description:ml().optional(),minimum:dc().optional(),maximum:dc().optional(),default:dc().optional()}),Mm=Bc({type:gu("string"),title:ml().optional(),description:ml().optional(),enum:Lc(ml()),default:ml().optional()}),Lm=Bc({type:gu("string"),title:ml().optional(),description:ml().optional(),oneOf:Lc(Bc({const:ml(),title:ml()})),default:ml().optional()}),Fm=Bc({type:gu("string"),title:ml().optional(),description:ml().optional(),enum:Lc(ml()),enumNames:Lc(ml()).optional(),default:ml().optional()}),Vm=Gc([Mm,Lm]),Bm=Gc([Bc({type:gu("array"),title:ml().optional(),description:ml().optional(),minItems:dc().optional(),maxItems:dc().optional(),items:Bc({type:gu("string"),enum:Lc(ml())}),default:Lc(ml()).optional()}),Bc({type:gu("array"),title:ml().optional(),description:ml().optional(),minItems:dc().optional(),maxItems:dc().optional(),items:Bc({anyOf:Lc(Bc({const:ml(),title:ml()}))}),default:Lc(ml()).optional()})]),Hm=Gc([Fm,Vm,Bm]),Wm=Gc([Hm,Zm,Rm,qm]),Jm=Gc([Ud.extend({mode:gu("form").optional(),message:ml(),requestedSchema:Bc({type:gu("object"),properties:ou(ml(),Wm),required:Lc(ml()).optional()})}),Ud.extend({mode:gu("url"),message:ml(),elicitationId:ml(),url:ml().url()})]),Gm=Ad.extend({method:gu("elicitation/create"),params:Jm}),Km=Nd.extend({elicitationId:ml()}),Xm=Dd.extend({method:gu("notifications/elicitation/complete"),params:Km}),Ym=jd.extend({action:mu(["accept","decline","cancel"]),content:ud(e=>null===e?void 0:e,ou(ml(),Gc([ml(),dc(),yc(),Lc(ml())])).optional())}),Qm=Bc({type:gu("ref/resource"),uri:ml()}),ef=Bc({type:gu("ref/prompt"),name:ml()}),tf=Od.extend({ref:Gc([ef,Qm]),argument:Bc({name:ml(),value:ml()}),context:Bc({arguments:ou(ml(),ml()).optional()}).optional()}),nf=Ad.extend({method:gu("completion/complete"),params:tf}),rf=jd.extend({completion:Wc({values:Lc(ml()).max(100),total:ku(dc().int()),hasMore:ku(yc())})}),of=Bc({uri:ml().startsWith("file://"),name:ml().optional(),_meta:ou(ml(),Nc()).optional()}),af=Ad.extend({method:gu("roots/list"),params:Od.optional()}),sf=jd.extend({roots:Lc(of)}),lf=Dd.extend({method:gu("notifications/roots/list_changed"),params:Nd.optional()});Gc([cp,op,nf,xm,nm,Qp,jp,Zp,Lp,Hp,Jp,$m,gm,_p,wp,xp,Ip]),Gc([Jd,pp,lp,lf,$p]),Gc([Hd,jm,Pm,Ym,sf,kp,Sp,bp]),Gc([cp,Dm,Gm,af,_p,wp,xp,Ip]),Gc([Jd,pp,Im,Kp,Vp,_m,pm,$p,Xm]),Gc([Hd,sp,rf,dm,em,Pp,Rp,Fp,bm,vm,kp,Sp,bp]);class cf extends Error{constructor(e,t,n){super(`MCP error ${e}: ${t}`),this.code=e,this.data=n,this.name="McpError"}static fromError(e,t,n){if(e===Fd.UrlElicitationRequired&&n){const e=n;if(e.elicitations)return new uf(e.elicitations,t)}return new cf(e,t,n)}}class uf extends cf{constructor(e,t=`URL elicitation${e.length>1?"s":""} required`){super(Fd.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}}function df(e){return"completed"===e||"failed"===e||"cancelled"===e}function pf(e){const t=function(e){if(!e)return;let t;if(Ps(e)){const n=e;t=n._zod?.def?.shape}else t=e.shape;if(t){if("function"==typeof t)try{return t()}catch{return}return t}}(e),n=t?.method;if(!n)throw new Error("Schema is missing a method literal");const i=function(e){if(Ps(e)){const t=e,n=t._zod?.def;if(n){if(void 0!==n.value)return n.value;if(Array.isArray(n.values)&&n.values.length>0)return n.values[0]}}const t=e._def;if(t){if(void 0!==t.value)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}const n=e.value;if(void 0!==n)return n}(n);if("string"!=typeof i)throw new Error("Schema method literal must be a string");return i}function mf(e,t){const n=Zs(e,t);if(!n.success)throw n.error;return n.data}new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");class ff{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(Jd,e=>{this._oncancel(e)}),this.setNotificationHandler(pp,e=>{this._onprogress(e)}),this.setRequestHandler(cp,e=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(_p,async(e,t)=>{const n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new cf(Fd.InvalidParams,"Failed to retrieve task: Task not found");return{...n}}),this.setRequestHandler(wp,async(e,t)=>{const n=async()=>{const i=e.params.taskId;if(this._taskMessageQueue){let e;for(;e=await this._taskMessageQueue.dequeue(i,t.sessionId);){if("response"===e.type||"error"===e.type){const t=e.message,n=t.id,i=this._requestResolvers.get(n);if(i)if(this._requestResolvers.delete(n),"response"===e.type)i(t);else{const e=t;i(new cf(e.error.code,e.error.message,e.error.data))}else{const t="response"===e.type?"Response":"Error";this._onerror(new Error(`${t} handler missing for request ${n}`))}continue}await(this._transport?.send(e.message,{relatedRequestId:t.requestId}))}}const r=await this._taskStore.getTask(i,t.sessionId);if(!r)throw new cf(Fd.InvalidParams,`Task not found: ${i}`);if(!df(r.status))return await this._waitForTaskUpdate(i,t.signal),await n();if(df(r.status)){const e=await this._taskStore.getTaskResult(i,t.sessionId);return this._clearTaskQueue(i),{...e,_meta:{...e._meta,[wd]:{taskId:i}}}}return await n()};return await n()}),this.setRequestHandler(xp,async(e,t)=>{try{const{tasks:n,nextCursor:i}=await this._taskStore.listTasks(e.params?.cursor,t.sessionId);return{tasks:n,nextCursor:i,_meta:{}}}catch(e){throw new cf(Fd.InvalidParams,`Failed to list tasks: ${e instanceof Error?e.message:String(e)}`)}}),this.setRequestHandler(Ip,async(e,t)=>{try{const n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new cf(Fd.InvalidParams,`Task not found: ${e.params.taskId}`);if(df(n.status))throw new cf(Fd.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(e.params.taskId,"cancelled","Client cancelled task execution.",t.sessionId),this._clearTaskQueue(e.params.taskId);const i=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!i)throw new cf(Fd.InvalidParams,`Task not found after cancellation: ${e.params.taskId}`);return{_meta:{},...i}}catch(e){if(e instanceof cf)throw e;throw new cf(Fd.InvalidRequest,`Failed to cancel task: ${e instanceof Error?e.message:String(e)}`)}}))}async _oncancel(e){if(!e.params.requestId)return;const t=this._requestHandlerAbortControllers.get(e.params.requestId);t?.abort(e.params.reason)}_setupTimeout(e,t,n,i,r=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(i,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:r,onTimeout:i})}_resetTimeout(e){const t=this._timeoutInfo.get(e);if(!t)return!1;const n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),cf.fromError(Fd.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){const t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=e;const t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),this._onclose()};const n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};const i=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{var n;i?.(e,t),Ld(e)||(n=e,Vd.safeParse(n).success)?this._onresponse(e):Rd(e)?this._onrequest(e,t):(e=>qd.safeParse(e).success)(e)?this._onnotification(e):this._onerror(new Error(`Unknown message type: ${JSON.stringify(e)}`))},await this._transport.start()}_onclose(){const e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(const e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();for(const e of this._requestHandlerAbortControllers.values())e.abort();this._requestHandlerAbortControllers.clear();const t=cf.fromError(Fd.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(const n of e.values())n(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){const t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;void 0!==t&&Promise.resolve().then(()=>t(e)).catch(e=>this._onerror(new Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){const n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,i=this._transport,r=e.params?._meta?.[wd]?.taskId;if(void 0===n){const t={jsonrpc:"2.0",id:e.id,error:{code:Fd.MethodNotFound,message:"Method not found"}};return void(r&&this._taskMessageQueue?this._enqueueTaskMessage(r,{type:"error",message:t,timestamp:Date.now()},i?.sessionId).catch(e=>this._onerror(new Error(`Failed to enqueue error response: ${e}`))):i?.send(t).catch(e=>this._onerror(new Error(`Failed to send an error response: ${e}`))))}const o=new AbortController;this._requestHandlerAbortControllers.set(e.id,o);const a=(s=e.params,Ud.safeParse(s).success?e.params.task:void 0);var s;const l=this._taskStore?this.requestTaskStore(e,i?.sessionId):void 0,c={signal:o.signal,sessionId:i?.sessionId,_meta:e.params?._meta,sendNotification:async t=>{if(o.signal.aborted)return;const n={relatedRequestId:e.id};r&&(n.relatedTask={taskId:r}),await this.notification(t,n)},sendRequest:async(t,n,i)=>{if(o.signal.aborted)throw new cf(Fd.ConnectionClosed,"Request was cancelled");const a={...i,relatedRequestId:e.id};r&&!a.relatedTask&&(a.relatedTask={taskId:r});const s=a.relatedTask?.taskId??r;return s&&l&&await l.updateTaskStatus(s,"input_required"),await this.request(t,n,a)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:r,taskStore:l,taskRequestedTtl:a?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{a&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,c)).then(async t=>{if(o.signal.aborted)return;const n={result:t,jsonrpc:"2.0",id:e.id};r&&this._taskMessageQueue?await this._enqueueTaskMessage(r,{type:"response",message:n,timestamp:Date.now()},i?.sessionId):await(i?.send(n))},async t=>{if(o.signal.aborted)return;const n={jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(t.code)?t.code:Fd.InternalError,message:t.message??"Internal error",...void 0!==t.data&&{data:t.data}}};r&&this._taskMessageQueue?await this._enqueueTaskMessage(r,{type:"error",message:n,timestamp:Date.now()},i?.sessionId):await(i?.send(n))}).catch(e=>this._onerror(new Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===o&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){const{progressToken:t,...n}=e.params,i=Number(t),r=this._progressHandlers.get(i);if(!r)return void this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));const o=this._responseHandlers.get(i),a=this._timeoutInfo.get(i);if(a&&o&&a.resetTimeoutOnProgress)try{this._resetTimeout(i)}catch(e){return this._responseHandlers.delete(i),this._progressHandlers.delete(i),this._cleanupTimeout(i),void o(e)}r(n)}_onresponse(e){const t=Number(e.id),n=this._requestResolvers.get(t);if(n){if(this._requestResolvers.delete(t),Ld(e))n(e);else{n(new cf(e.error.code,e.error.message,e.error.data))}return}const i=this._responseHandlers.get(t);if(void 0===i)return void this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));this._responseHandlers.delete(t),this._cleanupTimeout(t);let r=!1;if(Ld(e)&&e.result&&"object"==typeof e.result){const n=e.result;if(n.task&&"object"==typeof n.task){const e=n.task;"string"==typeof e.taskId&&(r=!0,this._taskProgressTokens.set(e.taskId,t))}}if(r||this._progressHandlers.delete(t),Ld(e))i(e);else{i(cf.fromError(e.error.code,e.error.message,e.error.data))}}get transport(){return this._transport}async close(){await(this._transport?.close())}async*requestStream(e,t,n){const{task:i}=n??{};if(!i){try{const i=await this.request(e,t,n);yield{type:"result",result:i}}catch(e){yield{type:"error",error:e instanceof cf?e:new cf(Fd.InternalError,String(e))}}return}let r;try{const i=await this.request(e,bp,n);if(!i.task)throw new cf(Fd.InternalError,"Task creation did not return a task");for(r=i.task.taskId,yield{type:"taskCreated",task:i.task};;){const e=await this.getTask({taskId:r},n);if(yield{type:"taskStatus",task:e},df(e.status)){if("completed"===e.status){const e=await this.getTaskResult({taskId:r},t,n);yield{type:"result",result:e}}else"failed"===e.status?yield{type:"error",error:new cf(Fd.InternalError,`Task ${r} failed`)}:"cancelled"===e.status&&(yield{type:"error",error:new cf(Fd.InternalError,`Task ${r} was cancelled`)});return}if("input_required"===e.status){const e=await this.getTaskResult({taskId:r},t,n);return void(yield{type:"result",result:e})}const i=e.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(e=>setTimeout(e,i)),n?.signal?.throwIfAborted()}}catch(e){yield{type:"error",error:e instanceof cf?e:new cf(Fd.InternalError,String(e))}}}request(e,t,n){const{relatedRequestId:i,resumptionToken:r,onresumptiontoken:o,task:a,relatedTask:s}=n??{};return new Promise((l,c)=>{const u=e=>{c(e)};if(!this._transport)return void u(new Error("Not connected"));if(!0===this._options?.enforceStrictCapabilities)try{this.assertCapabilityForMethod(e.method),a&&this.assertTaskCapability(e.method)}catch(e){return void u(e)}n?.signal?.throwIfAborted();const d=this._requestMessageId++,p={...e,jsonrpc:"2.0",id:d};n?.onprogress&&(this._progressHandlers.set(d,n.onprogress),p.params={...e.params,_meta:{...e.params?._meta||{},progressToken:d}}),a&&(p.params={...p.params,task:a}),s&&(p.params={...p.params,_meta:{...p.params?._meta||{},[wd]:s}});const m=e=>{this._responseHandlers.delete(d),this._progressHandlers.delete(d),this._cleanupTimeout(d),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:d,reason:String(e)}},{relatedRequestId:i,resumptionToken:r,onresumptiontoken:o}).catch(e=>this._onerror(new Error(`Failed to send cancellation: ${e}`)));const t=e instanceof cf?e:new cf(Fd.RequestTimeout,String(e));c(t)};this._responseHandlers.set(d,e=>{if(!n?.signal?.aborted){if(e instanceof Error)return c(e);try{const n=Zs(t,e.result);n.success?l(n.data):c(n.error)}catch(e){c(e)}}}),n?.signal?.addEventListener("abort",()=>{m(n?.signal?.reason)});const f=n?.timeout??6e4;this._setupTimeout(d,f,n?.maxTotalTimeout,()=>m(cf.fromError(Fd.RequestTimeout,"Request timed out",{timeout:f})),n?.resetTimeoutOnProgress??!1);const h=s?.taskId;if(h){const e=e=>{const t=this._responseHandlers.get(d);t?t(e):this._onerror(new Error(`Response handler missing for side-channeled request ${d}`))};this._requestResolvers.set(d,e),this._enqueueTaskMessage(h,{type:"request",message:p,timestamp:Date.now()}).catch(e=>{this._cleanupTimeout(d),c(e)})}else this._transport.send(p,{relatedRequestId:i,resumptionToken:r,onresumptiontoken:o}).catch(e=>{this._cleanupTimeout(d),c(e)})})}async getTask(e,t){return this.request({method:"tasks/get",params:e},kp,t)}async getTaskResult(e,t,n){return this.request({method:"tasks/result",params:e},t,n)}async listTasks(e,t){return this.request({method:"tasks/list",params:e},Sp,t)}async cancelTask(e,t){return this.request({method:"tasks/cancel",params:e},Ep,t)}async notification(e,t){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(e.method);const n=t?.relatedTask?.taskId;if(n){const i={...e,jsonrpc:"2.0",params:{...e.params,_meta:{...e.params?._meta||{},[wd]:t.relatedTask}}};return void await this._enqueueTaskMessage(n,{type:"notification",message:i,timestamp:Date.now()})}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;return this._pendingDebouncedNotifications.add(e.method),void Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let n={...e,jsonrpc:"2.0"};t?.relatedTask&&(n={...n,params:{...n.params,_meta:{...n.params?._meta||{},[wd]:t.relatedTask}}}),this._transport?.send(n,t).catch(e=>this._onerror(e))})}let i={...e,jsonrpc:"2.0"};t?.relatedTask&&(i={...i,params:{...i.params,_meta:{...i.params?._meta||{},[wd]:t.relatedTask}}}),await this._transport.send(i,t)}setRequestHandler(e,t){const n=pf(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(n,i)=>{const r=mf(e,n);return Promise.resolve(t(r,i))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){const n=pf(e);this._notificationHandlers.set(n,n=>{const i=mf(e,n);return Promise.resolve(t(i))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){const t=this._taskProgressTokens.get(e);void 0!==t&&(this._progressHandlers.delete(t),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,t,n){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");const i=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,n,i)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){const n=await this._taskMessageQueue.dequeueAll(e,t);for(const t of n)if("request"===t.type&&Rd(t.message)){const n=t.message.id,i=this._requestResolvers.get(n);i?(i(new cf(Fd.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(n)):this._onerror(new Error(`Resolver missing for request ${n} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t){let n=this._options?.defaultTaskPollInterval??1e3;try{const t=await(this._taskStore?.getTask(e));t?.pollInterval&&(n=t.pollInterval)}catch{}return new Promise((e,i)=>{if(t.aborted)return void i(new cf(Fd.InvalidRequest,"Request cancelled"));const r=setTimeout(e,n);t.addEventListener("abort",()=>{clearTimeout(r),i(new cf(Fd.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(e,t){const n=this._taskStore;if(!n)throw new Error("No task store configured");return{createTask:async i=>{if(!e)throw new Error("No request provided");return await n.createTask(i,e.id,{method:e.method,params:e.params},t)},getTask:async e=>{const i=await n.getTask(e,t);if(!i)throw new cf(Fd.InvalidParams,"Failed to retrieve task: Task not found");return i},storeTaskResult:async(e,i,r)=>{await n.storeTaskResult(e,i,r,t);const o=await n.getTask(e,t);if(o){const t=$p.parse({method:"notifications/tasks/status",params:o});await this.notification(t),df(o.status)&&this._cleanupTaskProgressHandler(e)}},getTaskResult:e=>n.getTaskResult(e,t),updateTaskStatus:async(e,i,r)=>{const o=await n.getTask(e,t);if(!o)throw new cf(Fd.InvalidParams,`Task "${e}" not found - it may have been cleaned up`);if(df(o.status))throw new cf(Fd.InvalidParams,`Cannot update task "${e}" from terminal status "${o.status}" to "${i}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(e,i,r,t);const a=await n.getTask(e,t);if(a){const t=$p.parse({method:"notifications/tasks/status",params:a});await this.notification(t),df(a.status)&&this._cleanupTaskProgressHandler(e)}},listTasks:e=>n.listTasks(e,t)}}}function hf(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}var gf;gf=function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')},typeof require<"u"?require:typeof Proxy<"u"&&new Proxy(gf,{get:(e,t)=>(typeof require<"u"?require:e)[t]});class vf extends ff{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(e,t){}_ensureEventSlot(e){let t=this._eventSlots.get(e);if(!t){let n=this.eventSchemas[e];if(!n)throw Error(`Unknown event: ${String(e)}`);t={listeners:[]},this._eventSlots.set(e,t);let i=n.shape.method.value;this._registeredMethods.add(i);let r=t;super.setNotificationHandler(n,t=>{let n=t.params;this.onEventDispatch(e,n),r.onHandler?.(n);for(let e of[...r.listeners])e(n)})}return t}setEventHandler(e,t){let n=this._ensureEventSlot(e);n.onHandler&&t&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", …) to add multiple listeners without replacing.`),n.onHandler=t}getEventHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let i=n.listeners.indexOf(t);-1!==i&&n.listeners.splice(i,1)}setRequestHandler=(e,t)=>{this._assertMethodNotRegistered(e,"setRequestHandler"),super.setRequestHandler(e,t)};setNotificationHandler=(e,t)=>{this._assertMethodNotRegistered(e,"setNotificationHandler"),super.setNotificationHandler(e,t)};warnIfRequestHandlerReplaced(e,t,n){t&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(e,t)=>{let n=e.shape.method.value;this._registeredMethods.add(n),super.setRequestHandler(e,t)};_assertMethodNotRegistered(e,t){let n=e.shape.method.value;if(this._registeredMethods.has(n))throw Error(`Handler for "${n}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(n)}}class bf{eventTarget;eventSource;messageListener;constructor(e=window.parent,t){this.eventTarget=e,this.eventSource=t,this.messageListener=e=>{if(t&&e.source!==this.eventSource)return void console.debug("Ignoring message from unknown source",e);let n=Bd.safeParse(e.data);n.success?(console.debug("Parsed message",n.data),this.onmessage?.(n.data)):"2.0"!==e.data?.jsonrpc?console.debug("Ignoring non-JSON-RPC message",n.error.message,e):(console.error("Failed to parse message",n.error.message,e),this.onerror?.(Error("Invalid JSON-RPC message received: "+n.error.message)))}}async start(){window.addEventListener("message",this.messageListener)}async send(e,t){"ui/notifications/tool-input-partial"!==e.method&&console.debug("Sending message",e),this.eventTarget.postMessage(e,"*")}async close(){window.removeEventListener("message",this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion}var yf=Gc([gu("light"),gu("dark")]).describe("Color theme preference for the host environment."),$f=Gc([gu("inline"),gu("fullscreen"),gu("pip")]).describe("Display mode for UI presentation."),_f=ou(Gc([gu("--color-background-primary"),gu("--color-background-secondary"),gu("--color-background-tertiary"),gu("--color-background-inverse"),gu("--color-background-ghost"),gu("--color-background-info"),gu("--color-background-danger"),gu("--color-background-success"),gu("--color-background-warning"),gu("--color-background-disabled"),gu("--color-text-primary"),gu("--color-text-secondary"),gu("--color-text-tertiary"),gu("--color-text-inverse"),gu("--color-text-ghost"),gu("--color-text-info"),gu("--color-text-danger"),gu("--color-text-success"),gu("--color-text-warning"),gu("--color-text-disabled"),gu("--color-border-primary"),gu("--color-border-secondary"),gu("--color-border-tertiary"),gu("--color-border-inverse"),gu("--color-border-ghost"),gu("--color-border-info"),gu("--color-border-danger"),gu("--color-border-success"),gu("--color-border-warning"),gu("--color-border-disabled"),gu("--color-ring-primary"),gu("--color-ring-secondary"),gu("--color-ring-inverse"),gu("--color-ring-info"),gu("--color-ring-danger"),gu("--color-ring-success"),gu("--color-ring-warning"),gu("--font-sans"),gu("--font-mono"),gu("--font-weight-normal"),gu("--font-weight-medium"),gu("--font-weight-semibold"),gu("--font-weight-bold"),gu("--font-text-xs-size"),gu("--font-text-sm-size"),gu("--font-text-md-size"),gu("--font-text-lg-size"),gu("--font-heading-xs-size"),gu("--font-heading-sm-size"),gu("--font-heading-md-size"),gu("--font-heading-lg-size"),gu("--font-heading-xl-size"),gu("--font-heading-2xl-size"),gu("--font-heading-3xl-size"),gu("--font-text-xs-line-height"),gu("--font-text-sm-line-height"),gu("--font-text-md-line-height"),gu("--font-text-lg-line-height"),gu("--font-heading-xs-line-height"),gu("--font-heading-sm-line-height"),gu("--font-heading-md-line-height"),gu("--font-heading-lg-line-height"),gu("--font-heading-xl-line-height"),gu("--font-heading-2xl-line-height"),gu("--font-heading-3xl-line-height"),gu("--border-radius-xs"),gu("--border-radius-sm"),gu("--border-radius-md"),gu("--border-radius-lg"),gu("--border-radius-xl"),gu("--border-radius-full"),gu("--border-width-regular"),gu("--shadow-hairline"),gu("--shadow-sm"),gu("--shadow-md"),gu("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming.").describe("Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record<K, string | undefined>` rather than `Partial<Record<K, string>>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation."),Gc([ml(),Tc()]).describe("Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record<K, string | undefined>` rather than `Partial<Record<K, string>>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.")).describe("Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record<K, string | undefined>` rather than `Partial<Record<K, string>>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.");Bc({method:gu("ui/open-link"),params:Bc({url:ml().describe("URL to open in the host's browser")})});var kf=Bc({isError:yc().optional().describe("True if the host failed to open the URL (e.g., due to security policy).")}).passthrough(),wf=Bc({isError:yc().optional().describe("True if the download failed (e.g., user cancelled or host denied).")}).passthrough(),xf=Bc({isError:yc().optional().describe("True if the host rejected or failed to deliver the message.")}).passthrough();Bc({method:gu("ui/notifications/sandbox-proxy-ready"),params:Bc({})});var Sf=Bc({connectDomains:Lc(ml()).optional().describe("Origins for network requests (fetch/XHR/WebSocket).\n\n- Maps to CSP `connect-src` directive\n- Empty or omitted → no network connections (secure default)"),resourceDomains:Lc(ml()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted → no network resources (secure default)"),frameDomains:Lc(ml()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:Lc(ml()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)")}),If=Bc({camera:Bc({}).optional().describe("Request camera access.\n\nMaps to Permission Policy `camera` feature."),microphone:Bc({}).optional().describe("Request microphone access.\n\nMaps to Permission Policy `microphone` feature."),geolocation:Bc({}).optional().describe("Request geolocation access.\n\nMaps to Permission Policy `geolocation` feature."),clipboardWrite:Bc({}).optional().describe("Request clipboard write access.\n\nMaps to Permission Policy `clipboard-write` feature.")});Bc({method:gu("ui/notifications/size-changed"),params:Bc({width:dc().optional().describe("New width in pixels."),height:dc().optional().describe("New height in pixels.")})});var Ef=Bc({method:gu("ui/notifications/tool-input"),params:Bc({arguments:ou(ml(),Nc().describe("Complete tool call arguments as key-value pairs.")).optional().describe("Complete tool call arguments as key-value pairs.")})}),Tf=Bc({method:gu("ui/notifications/tool-input-partial"),params:Bc({arguments:ou(ml(),Nc().describe("Partial tool call arguments (incomplete, may change).")).optional().describe("Partial tool call arguments (incomplete, may change).")})}),zf=Bc({method:gu("ui/notifications/tool-cancelled"),params:Bc({reason:ml().optional().describe('Optional reason for the cancellation (e.g., "user action", "timeout").')})}),Cf=Bc({fonts:ml().optional()}),Of=Bc({variables:_f.optional().describe("CSS variables for theming the app."),css:Cf.optional().describe("CSS blocks that apps can inject.")}),Uf=Bc({method:gu("ui/resource-teardown"),params:Bc({})});ou(ml(),Nc());var Af=Bc({text:Bc({}).optional().describe("Host supports text content blocks."),image:Bc({}).optional().describe("Host supports image content blocks."),audio:Bc({}).optional().describe("Host supports audio content blocks."),resource:Bc({}).optional().describe("Host supports resource content blocks."),resourceLink:Bc({}).optional().describe("Host supports resource link content blocks."),structuredContent:Bc({}).optional().describe("Host supports structured content.")});Bc({method:gu("ui/notifications/request-teardown"),params:Bc({}).optional()});var Nf=Bc({experimental:ou(ml(),ou(ml(),Uc()).describe("Experimental features keyed by identifier.")).optional().describe("Experimental features keyed by identifier."),openLinks:Bc({}).optional().describe("Host supports opening external URLs."),downloadFile:Bc({}).optional().describe("Host supports file downloads via ui/download-file."),serverTools:Bc({listChanged:yc().optional().describe("Host supports tools/list_changed notifications.")}).optional().describe("Host can proxy tool calls to the MCP server."),serverResources:Bc({listChanged:yc().optional().describe("Host supports resources/list_changed notifications.")}).optional().describe("Host can proxy resource reads to the MCP server."),logging:Bc({}).optional().describe("Host accepts log messages."),sandbox:Bc({permissions:If.optional().describe("Permissions granted by the host (camera, microphone, geolocation)."),csp:Sf.optional().describe("CSP domains approved by the host.")}).optional().describe("Sandbox configuration applied by the host."),updateModelContext:Af.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."),message:Af.optional().describe("Host supports receiving content messages (ui/message) from the view."),sampling:Bc({tools:Bc({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),Df=Bc({experimental:ou(ml(),ou(ml(),Uc()).describe("Experimental features keyed by identifier.")).optional().describe("Experimental features keyed by identifier."),tools:Bc({listChanged:yc().optional().describe("App supports tools/list_changed notifications.")}).optional().describe("App exposes MCP-style tools that the host can call."),availableDisplayModes:Lc($f).optional().describe("Display modes the app supports.")});Bc({method:gu("ui/notifications/initialized"),params:Bc({}).optional()}),Bc({csp:Sf.optional().describe("Content Security Policy configuration for UI resources."),permissions:If.optional().describe("Sandbox permissions requested by the UI resource."),domain:ml().optional().describe("Dedicated origin for view sandbox.\n\nUseful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.\n\n**Host-dependent:** The format and validation rules for this field are determined by each host. Servers MUST consult host-specific documentation for the expected domain format. Common patterns include:\n- Hash-based subdomains (e.g., `{hash}.claudemcpcontent.com`)\n- URL-derived subdomains (e.g., `www-example-com.oaiusercontent.com`)\n\nIf omitted, host uses default sandbox origin (typically per-conversation)."),prefersBorder:yc().optional().describe("Visual boundary preference - true if view prefers a visible border.\n\nBoolean requesting whether a visible border and background is provided by the host. Specifying an explicit value for this is recommended because hosts' defaults may vary.\n\n- `true`: request visible border + background\n- `false`: request no visible border + background\n- omitted: host decides border")}),Bc({method:gu("ui/request-display-mode"),params:Bc({mode:$f.describe("The display mode being requested.")})});var jf=Bc({mode:$f.describe("The display mode that was actually set. May differ from requested if not supported.")}).passthrough(),Pf=Gc([gu("model"),gu("app")]).describe("Tool visibility scope - who can access the tool.");Bc({resourceUri:ml().optional(),visibility:Lc(Pf).optional().describe('Who can access this tool. Default: ["model", "app"]\n- "model": Tool visible to and callable by the agent\n- "app": Tool callable by the app from this server only'),csp:jc().optional(),permissions:jc().optional()}),Bc({mimeTypes:Lc(ml()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),Bc({method:gu("ui/download-file"),params:Bc({contents:Lc(Gc([sm,lm])).describe("Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.")})}),Bc({method:gu("ui/message"),params:Bc({role:gu("user").describe('Message role, currently only "user" is supported.'),content:Lc(cm).describe("Message content blocks (text, image, etc.).")})}),Bc({method:gu("ui/notifications/sandbox-resource-ready"),params:Bc({html:ml().describe("HTML content to load into the inner iframe."),sandbox:ml().optional().describe("Optional override for the inner iframe's sandbox attribute."),csp:Sf.optional().describe("CSP configuration from resource metadata."),permissions:If.optional().describe("Sandbox permissions from resource metadata.")})});var Zf=Bc({method:gu("ui/notifications/tool-result"),params:bm.describe("Standard MCP tool execution result.")}),Rf=Bc({toolInfo:Bc({id:Pd.optional().describe("JSON-RPC id of the tools/call request."),tool:hm.describe("Tool definition including name, inputSchema, etc.")}).optional().describe("Metadata of the tool call that instantiated this App."),theme:yf.optional().describe("Current color theme preference."),styles:Of.optional().describe("Style configuration for theming the app."),displayMode:$f.optional().describe("How the UI is currently displayed."),availableDisplayModes:Lc($f).optional().describe("Display modes the host supports."),containerDimensions:Gc([Bc({height:dc().describe("Fixed container height in pixels.")}),Bc({maxHeight:Gc([dc(),Tc()]).optional().describe("Maximum container height in pixels.")})]).and(Gc([Bc({width:dc().describe("Fixed container width in pixels.")}),Bc({maxWidth:Gc([dc(),Tc()]).optional().describe("Maximum container width in pixels.")})])).optional().describe("Container dimensions. Represents the dimensions of the iframe or other\ncontainer holding the app. Specify either width or maxWidth, and either height or maxHeight."),locale:ml().optional().describe("User's language and region preference in BCP 47 format."),timeZone:ml().optional().describe("User's timezone in IANA format."),userAgent:ml().optional().describe("Host application identifier."),platform:Gc([gu("web"),gu("desktop"),gu("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:Bc({touch:yc().optional().describe("Whether the device supports touch input."),hover:yc().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:Bc({top:dc().describe("Top safe area inset in pixels."),right:dc().describe("Right safe area inset in pixels."),bottom:dc().describe("Bottom safe area inset in pixels."),left:dc().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),qf=Bc({method:gu("ui/notifications/host-context-changed"),params:Rf.describe("Partial context update containing only changed fields.")});Bc({method:gu("ui/update-model-context"),params:Bc({content:Lc(cm).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:ou(ml(),Nc().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})}),Bc({method:gu("ui/initialize"),params:Bc({appInfo:Yd.describe("App identification (name and version)."),appCapabilities:Df.describe("Features and capabilities this app provides."),protocolVersion:ml().describe("Protocol version this app supports.")})});var Mf=Bc({protocolVersion:ml().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:Yd.describe("Host application identification and version."),hostCapabilities:Nf.describe("Features and capabilities provided by the host."),hostContext:Rf.describe("Rich context about the host environment.")}).passthrough(),Lf={target:"draft-2020-12"};async function Ff(e,t){let n=e["~standard"];if(n.jsonSchema)return n.jsonSchema[t](Lf);if("zod"===n.vendor){let{z:n}=await Promise.resolve().then(function(){return kd});return n.toJSONSchema(e,{io:t})}throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function Vf(e,t,n=""){let i=await e["~standard"].validate(t);if(i.issues){let e=i.issues.map(e=>{let t=e.path?.map(e=>"object"==typeof e?e.key:e).join(".");return t?`${t}: ${e.message}`:e.message}).join("; ");throw Error(n+e)}return i.value}class Bf extends vf{_appInfo;_capabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_assertInitialized(e){if(this._initializedSent)return;let t=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(t);console.warn(`${t}. This will throw in a future release.`)}eventSchemas={toolinput:Ef,toolinputpartial:Tf,toolresult:Zf,toolcancelled:zf,hostcontextchanged:qf};static ONE_SHOT_EVENTS=new Set(["toolinput","toolinputpartial","toolresult","toolcancelled"]);_everHadListener=new Set;_assertHandlerTiming(e){if(!Bf.ONE_SHOT_EVENTS.has(e)||this._everHadListener.has(e))return;if(this._everHadListener.add(e),!this._initializedSent)return;let t=`[ext-apps] "${String(e)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(t);console.warn(t)}setEventHandler(e,t){t&&this._assertHandlerTiming(e),super.setEventHandler(e,t)}addEventListener(e,t){this._assertHandlerTiming(e),super.addEventListener(e,t)}onEventDispatch(e,t){"hostcontextchanged"===e&&(this._hostContext={...this._hostContext,...t})}constructor(e,t={},n={autoResize:!0}){super(n),this._appInfo=e,this._capabilities=t,this.options=n,n.allowUnsafeEval||l({jitless:!0}),this.setRequestHandler(cp,e=>(console.log("Received ping:",e.params),{})),this.setEventHandler("hostcontextchanged",void 0)}registerCapabilities(e){if(this.transport)throw Error("Cannot register capabilities after transport is established");this._capabilities=function(e,t){const n={...e};for(const e in t){const i=e,r=t[i];if(void 0===r)continue;const o=n[i];hf(o)&&hf(r)?n[i]={...o,...r}:n[i]=r}return n}(this._capabilities,e)}registerTool(e,t,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let i=this,r=()=>{i._initializedSent&&i._capabilities.tools?.listChanged&&i.sendToolListChanged()},o=void 0!==t.inputSchema,a={title:t.title,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema,annotations:t.annotations,_meta:t._meta,enabled:!0,enable(){this.enabled=!0,r()},disable(){this.enabled=!1,r()},update(e){Object.assign(this,e),r()},remove(){i._registeredTools[e]===a&&(delete i._registeredTools[e],r())},handler:async(t,i)=>{if(!a.enabled)throw Error(`Tool ${e} is disabled`);let r;if(o){let o=a.inputSchema,s=o?await Vf(o,t??{},`Invalid input for tool ${e}: `):t??{};r=await n(s,i)}else r=await n(i);return a.outputSchema&&!r.isError&&(r.structuredContent=await Vf(a.outputSchema,r.structuredContent,`Invalid output for tool ${e}: `)),r}};return this._registeredTools[e]=a,this._capabilities.tools||this.transport||this.registerCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),r(),a}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,t)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,t)},this.onlisttools=async(e,t)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([e,t])=>t.enabled).map(async([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?await Ff(t.inputSchema,"input"):{type:"object",properties:{}}};return t.outputSchema&&(n.outputSchema=await Ff(t.outputSchema,"output")),t.annotations&&(n.annotations=t.annotations),t._meta&&(n._meta=t._meta),n}))}))}async sendToolListChanged(e={}){this._assertInitialized("sendToolListChanged"),await this.notification({method:"notifications/tools/list_changed",params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler("toolinput")}set ontoolinput(e){this.setEventHandler("toolinput",e)}get ontoolinputpartial(){return this.getEventHandler("toolinputpartial")}set ontoolinputpartial(e){this.setEventHandler("toolinputpartial",e)}get ontoolresult(){return this.getEventHandler("toolresult")}set ontoolresult(e){this.setEventHandler("toolresult",e)}get ontoolcancelled(){return this.getEventHandler("toolcancelled")}set ontoolcancelled(e){this.setEventHandler("toolcancelled",e)}get onhostcontextchanged(){return this.getEventHandler("hostcontextchanged")}set onhostcontextchanged(e){this.setEventHandler("hostcontextchanged",e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced("onteardown",this._onteardown,e),this._onteardown=e,this.replaceRequestHandler(Uf,(e,t)=>{if(!this._onteardown)throw Error("No onteardown handler set");return this._onteardown(e.params,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced("oncalltool",this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler($m,(e,t)=>{if(!this._oncalltool)throw Error("No oncalltool handler set");return this._oncalltool(e.params,t)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced("onlisttools",this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler(gm,(e,t)=>{if(!this._onlisttools)throw Error("No onlisttools handler set");return this._onlisttools(e.params,t)})}assertCapabilityForMethod(e){if("sampling/createMessage"===e)if(!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`)}assertRequestHandlerCapability(e){switch(e){case"tools/call":case"tools/list":if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;case"ping":case"ui/resource-teardown":return;default:throw Error(`No handler for method ${e} registered`)}}assertNotificationCapability(e){}assertTaskCapability(e){throw Error("Tasks are not supported in MCP Apps")}assertTaskHandlerCapability(e){throw Error("Task handlers are not supported in MCP Apps")}async callServerTool(e,t){if(this._assertInitialized("callServerTool"),"string"==typeof e)throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:"tools/call",params:e},bm,{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async readServerResource(e,t){return this._assertInitialized("readServerResource"),await this.request({method:"resources/read",params:e},Fp,t)}async listServerResources(e,t){return this._assertInitialized("listServerResources"),await this.request({method:"resources/list",params:e},Pp,t)}async createSamplingMessage(e,t){this._assertInitialized("createSamplingMessage");let n=e.tools?Pm:jm;return await this.request({method:"sampling/createMessage",params:e},n,t)}sendMessage(e,t){return this._assertInitialized("sendMessage"),this.request({method:"ui/message",params:e},xf,t)}sendLog(e){return this.notification({method:"notifications/message",params:e})}updateModelContext(e,t){return this._assertInitialized("updateModelContext"),this.request({method:"ui/update-model-context",params:e},Hd,t)}openLink(e,t){return this._assertInitialized("openLink"),this.request({method:"ui/open-link",params:e},kf,t)}sendOpenLink=this.openLink;downloadFile(e,t){return this._assertInitialized("downloadFile"),this.request({method:"ui/download-file",params:e},wf,t)}requestTeardown(e={}){return this.notification({method:"ui/notifications/request-teardown",params:e})}requestDisplayMode(e,t){return this._assertInitialized("requestDisplayMode"),this.request({method:"ui/request-display-mode",params:e},jf,t)}sendSizeChanged(e){return this.notification({method:"ui/notifications/size-changed",params:e})}setupSizeChangedNotifications(){let e=!1,t=0,n=0,i=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let i=document.documentElement,r=i.style.height;i.style.height="max-content";let o=Math.ceil(i.getBoundingClientRect().height);i.style.height=r;let a=Math.ceil(window.innerWidth);a===t&&o===n||(t=a,n=o,this.sendSizeChanged({width:a,height:o}))}))};i();let r=new ResizeObserver(i);return r.observe(document.documentElement),r.observe(document.body),()=>r.disconnect()}async connect(e=new bf(window.parent,window.parent),t){if(this.transport)throw Error("App is already connected. Call close() before connecting again.");this._initializedSent=!1,await super.connect(e);try{let e=await this.request({method:"ui/initialize",params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:"2026-01-26"}},Mf,t);if(void 0===e)throw Error(`Server sent invalid initialize result: ${e}`);this._hostCapabilities=e.hostCapabilities,this._hostInfo=e.hostInfo,this._hostContext=e.hostContext,await this.notification({method:"ui/notifications/initialized"}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(e){throw this.close(),e}}}function Hf(){}function Wf(e,t){for(const n in t)e[n]=t[n];return e}function Jf(e){return e()}function Gf(){return Object.create(null)}function Kf(e){e.forEach(Jf)}function Xf(e){return"function"==typeof e}function Yf(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function Qf(e,t,n){e.$$.on_destroy.push(function(e,...t){if(null==e)return Hf;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}(t,n))}function eh(e,t,n,i){if(e){const r=th(e,t,n,i);return e[0](r)}}function th(e,t,n,i){return e[1]&&i?Wf(n.ctx.slice(),e[1](i(t))):n.ctx}function nh(e,t,n,i){if(e[2]&&i){const r=e[2](i(n));if(void 0===t.dirty)return r;if("object"==typeof r){const e=[],n=Math.max(t.dirty.length,r.length);for(let i=0;i<n;i+=1)e[i]=t.dirty[i]|r[i];return e}return t.dirty|r}return t.dirty}function ih(e,t,n,i,r,o){if(r){const a=th(t,n,i,o);e.p(a,r)}}function rh(e){if(e.ctx.length>32){const t=[],n=e.ctx.length/32;for(let e=0;e<n;e++)t[e]=-1;return t}return-1}function oh(e,t){const n={};t=new Set(t);for(const i in e)t.has(i)||"$"===i[0]||(n[i]=e[i]);return n}function ah(e){return e&&Xf(e.destroy)?e.destroy:Hf}function sh(e,t){e.appendChild(t)}function lh(e,t,n){const i=function(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;if(t&&t.host)return t;return e.ownerDocument}(e);if(!i.getElementById(t)){const e=dh("style");e.id=t,e.textContent=n,function(e,t){sh(e.head||e,t),t.sheet}(i,e)}}function ch(e,t,n){e.insertBefore(t,n||null)}function uh(e){e.parentNode&&e.parentNode.removeChild(e)}function dh(e){return document.createElement(e)}function ph(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function mh(e){return document.createTextNode(e)}function fh(){return mh(" ")}function hh(){return mh("")}function gh(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function vh(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function bh(e){let t;return{p(...n){t=n,t.forEach(t=>e.push(t))},r(){t.forEach(t=>e.splice(e.indexOf(t),1))}}}function yh(e,t){t=""+t,e.data!==t&&(e.data=t)}function $h(e,t){e.value=null==t?"":t}function _h(e,t,n,i){null==n?e.style.removeProperty(t):e.style.setProperty(t,n,"")}function kh(e,t,n){e.classList[n?"add":"remove"](t)}class wh{constructor(e=!1){this.is_svg=!1,this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,t,n=null){this.e||(this.is_svg?this.e=ph(t.nodeName):this.e=dh(11===t.nodeType?"TEMPLATE":t.nodeName),this.t="TEMPLATE"!==t.tagName?t:t.content,this.c(e)),this.i(n)}h(e){this.e.innerHTML=e,this.n=Array.from("TEMPLATE"===this.e.nodeName?this.e.content.childNodes:this.e.childNodes)}i(e){for(let t=0;t<this.n.length;t+=1)ch(this.t,this.n[t],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(uh)}}function xh(e,t){return new e(t)}let Sh;function Ih(e){Sh=e}function Eh(){if(!Sh)throw new Error("Function called outside component initialization");return Sh}function Th(e){Eh().$$.on_mount.push(e)}const zh=[],Ch=[];let Oh=[];const Uh=[],Ah=Promise.resolve();let Nh=!1;function Dh(e){Oh.push(e)}function jh(e){Uh.push(e)}const Ph=new Set;let Zh=0;function Rh(){if(0!==Zh)return;const e=Sh;do{try{for(;Zh<zh.length;){const e=zh[Zh];Zh++,Ih(e),qh(e.$$)}}catch(e){throw zh.length=0,Zh=0,e}for(Ih(null),zh.length=0,Zh=0;Ch.length;)Ch.pop()();for(let e=0;e<Oh.length;e+=1){const t=Oh[e];Ph.has(t)||(Ph.add(t),t())}Oh.length=0}while(zh.length);for(;Uh.length;)Uh.pop()();Nh=!1,Ph.clear(),Ih(e)}function qh(e){if(null!==e.fragment){e.update(),Kf(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(Dh)}}const Mh=new Set;let Lh;function Fh(){Lh={r:0,c:[],p:Lh}}function Vh(){Lh.r||Kf(Lh.c),Lh=Lh.p}function Bh(e,t){e&&e.i&&(Mh.delete(e),e.i(t))}function Hh(e,t,n,i){if(e&&e.o){if(Mh.has(e))return;Mh.add(e),Lh.c.push(()=>{Mh.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function Wh(e,t,n){const i=e.$$.props[t];void 0!==i&&(e.$$.bound[i]=n,n(e.$$.ctx[i]))}function Jh(e){e&&e.c()}function Gh(e,t,n,i){const{fragment:r,after_update:o}=e.$$;r&&r.m(t,n),i||Dh(()=>{const t=e.$$.on_mount.map(Jf).filter(Xf);e.$$.on_destroy?e.$$.on_destroy.push(...t):Kf(t),e.$$.on_mount=[]}),o.forEach(Dh)}function Kh(e,t){const n=e.$$;null!==n.fragment&&(!function(e){const t=[],n=[];Oh.forEach(i=>-1===e.indexOf(i)?t.push(i):n.push(i)),n.forEach(e=>e()),Oh=t}(n.after_update),Kf(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Xh(e,t){-1===e.$$.dirty[0]&&(zh.push(e),Nh||(Nh=!0,Ah.then(Rh)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Yh(e,t,n,i,r,o,a,s=[-1]){const l=Sh;Ih(e);const c=e.$$={fragment:null,ctx:[],props:o,update:Hf,not_equal:r,bound:Gf(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(l?l.$$.context:[])),callbacks:Gf(),dirty:s,skip_bound:!1,root:t.target||l.$$.root};a&&a(c.root);let u=!1;if(c.ctx=n?n(e,t.props||{},(t,n,...i)=>{const o=i.length?i[0]:n;return c.ctx&&r(c.ctx[t],c.ctx[t]=o)&&(!c.skip_bound&&c.bound[t]&&c.bound[t](o),u&&Xh(e,t)),n}):[],c.update(),u=!0,Kf(c.before_update),c.fragment=!!i&&i(c.ctx),t.target){if(t.hydrate){const e=function(e){return Array.from(e.childNodes)}(t.target);c.fragment&&c.fragment.l(e),e.forEach(uh)}else c.fragment&&c.fragment.c();t.intro&&Bh(e.$$.fragment),Gh(e,t.target,t.anchor,t.customElement),Rh()}Ih(l)}class Qh{$destroy(){Kh(this,1),this.$destroy=Hf}$on(e,t){if(!Xf(t))return Hf;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const eg=[];function tg(e,t=Hf){let n;const i=new Set;function r(t){if(Yf(e,t)&&(e=t,n)){const t=!eg.length;for(const t of i)t[1](),eg.push(t,e);if(t){for(let e=0;e<eg.length;e+=2)eg[e][0](eg[e+1]);eg.length=0}}}return{set:r,update:function(t){r(t(e))},subscribe:function(o,a=Hf){const s=[o,a];return i.add(s),1===i.size&&(n=t(r)||Hf),o(e),()=>{i.delete(s),0===i.size&&n&&(n(),n=null)}}}}const ng={message:!1,updateModelContext:!1,openLinks:!1};class ig extends Error{constructor(e="Update cancelled"){super(e),this.name="HandoffCancelledError"}}function rg(e){const t=e.getHostCapabilities();return{message:null!=t?.message,updateModelContext:null!=t?.updateModelContext,openLinks:null!=t?.openLinks}}function og(e){return e.message}function ag(e,t){return`I refined this contract in the Wizard UI beyond the initial MCP tool result. Here is the current generated source.\n\n\`\`\`${e}\n${t.trimEnd()}\n\`\`\``}async function sg(e){if(!navigator.clipboard?.writeText)throw new Error("Clipboard is not available in this host.");await navigator.clipboard.writeText(e)}const lg="mcp-external-links";function cg(e){lh(e,"svelte-h4n0sq",".mcp-shell.svelte-h4n0sq{height:var(--mcp-app-height);min-height:var(--mcp-app-height);background-color:var(--gray-1);box-sizing:border-box;font-size:12px;--text-small:0.75rem;--size-1:0.2rem;--size-2:0.35rem;--size-3:0.55rem;--size-4:0.7rem}.mcp-shell.svelte-h4n0sq .controls{padding:var(--size-3)}.mcp-shell.svelte-h4n0sq pre code.hljs{font-size:0.7rem;line-height:1.35}.footer.svelte-h4n0sq{display:flex;flex-direction:column;gap:0.35rem}.drift-notice.svelte-h4n0sq{padding:0.4rem 0.55rem;border:1px solid var(--gray-3);border-radius:8px;background:color-mix(in srgb, var(--gray-2) 65%, transparent)}.drift-text.svelte-h4n0sq{margin:0;font-size:0.75rem;line-height:1.4;color:var(--gray-5);text-align:left}.actions.svelte-h4n0sq{display:flex;justify-content:flex-end;align-items:center;gap:0.75rem}.actions.drifted.svelte-h4n0sq{justify-content:space-between}.restore-link.svelte-h4n0sq{padding:0;border:none;background:none;color:var(--gray-4);font:inherit;font-size:0.75rem;text-decoration:underline;cursor:pointer}.restore-link.svelte-h4n0sq:hover{color:var(--gray-5)}.restore-confirm.svelte-h4n0sq{display:inline-flex;flex-wrap:wrap;align-items:center;gap:0.35rem 0.5rem;font-size:0.75rem;color:var(--gray-5)}.restore-confirm-btn.svelte-h4n0sq{padding:0;border:none;background:none;color:var(--solidity-blue-2);font:inherit;font-size:0.75rem;font-weight:600;text-decoration:underline;cursor:pointer}.restore-confirm-btn.cancel.svelte-h4n0sq{color:var(--gray-4);font-weight:500}.use-button.svelte-h4n0sq{padding:0.45rem 0.9rem;border-radius:16px;border:1px solid var(--gray-3);background-color:var(--solidity-blue-2);color:white;font-weight:600;font-size:0.75rem;cursor:pointer}.use-button.drifted.svelte-h4n0sq:not(.disabled):not(:disabled){box-shadow:0 0 0 2px color-mix(in srgb, var(--solidity-blue-2) 35%, transparent)}.use-button.disabled.svelte-h4n0sq,.use-button.svelte-h4n0sq:disabled{opacity:0.5;cursor:not-allowed}.status.svelte-h4n0sq{margin:0;max-width:100%;font-size:0.75rem;text-align:right}.status.hint.svelte-h4n0sq{color:var(--gray-4)}.status.error.svelte-h4n0sq{color:var(--red-3)}.no-select.svelte-h4n0sq{-webkit-user-select:none;-moz-user-select:none;user-select:none}.tippy-box{font-size:12px;line-height:1.35}.tippy-box .tippy-content{padding:0.35rem 0.5rem}html.mcp-no-open-links .tippy-box a[href]{display:none}")}const ug=e=>({}),dg=e=>({});function pg(e){let t;return{c(){t=dh("div"),t.innerHTML='<p class="drift-text svelte-h4n0sq">Preview differs from the original tool run. The agent&#39;s reply from that run still matches the original\n settings. Send updates to the agent for it to see the new code.</p>',vh(t,"class","drift-notice svelte-h4n0sq")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function mg(e){let t;function n(e,t){return e[11]?hg:fg}let i=n(e),r=i(e);return{c(){r.c(),t=hh()},m(e,n){r.m(e,n),ch(e,t,n)},p(e,o){i===(i=n(e))&&r?r.p(e,o):(r.d(1),r=i(e),r&&(r.c(),r.m(t.parentNode,t)))},d(e){r.d(e),e&&uh(t)}}}function fg(e){let t,n,i;return{c(){t=dh("button"),t.textContent="Restore original",vh(t,"type","button"),vh(t,"class","restore-link svelte-h4n0sq")},m(r,o){ch(r,t,o),n||(i=gh(t,"click",e[25]),n=!0)},p:Hf,d(e){e&&uh(t),n=!1,i()}}}function hg(e){let t,n,i,r,o,a,s;return{c(){t=dh("span"),n=mh("Restore original settings?\n "),i=dh("button"),i.textContent="Confirm",r=fh(),o=dh("button"),o.textContent="Cancel",vh(i,"type","button"),vh(i,"class","restore-confirm-btn svelte-h4n0sq"),vh(o,"type","button"),vh(o,"class","restore-confirm-btn cancel svelte-h4n0sq"),vh(t,"class","restore-confirm svelte-h4n0sq")},m(l,c){ch(l,t,c),sh(t,n),sh(t,i),sh(t,r),sh(t,o),a||(s=[gh(i,"click",e[23]),gh(o,"click",e[24])],a=!0)},p:Hf,d(e){e&&uh(t),a=!1,Kf(s)}}}function gg(e){let t;return{c(){t=mh("Send Updates to Agent")},m(e,n){ch(e,t,n)},p:Hf,d(e){e&&uh(t)}}}function vg(e){let t;return{c(){t=mh("Copy to Clipboard")},m(e,n){ch(e,t,n)},p:Hf,d(e){e&&uh(t)}}}function bg(e){let t;return{c(){t=mh(e[8])},m(e,n){ch(e,t,n)},p(e,n){256&n&&yh(t,e[8])},d(e){e&&uh(t)}}}function yg(e){let t,n=e[12]?"Copying…":"Sending…";return{c(){t=mh(n)},m(e,n){ch(e,t,n)},p(e,i){4096&i&&n!==(n=e[12]?"Copying…":"Sending…")&&yh(t,n)},d(e){e&&uh(t)}}}function $g(e){let t;return{c(){t=mh("Connecting…")},m(e,n){ch(e,t,n)},p:Hf,d(e){e&&uh(t)}}}function _g(e){let t,n;return{c(){t=dh("p"),n=mh(e[10]),vh(t,"class","status hint svelte-h4n0sq")},m(e,i){ch(e,t,i),sh(t,n)},p(e,t){1024&t&&yh(n,e[10])},d(e){e&&uh(t)}}}function kg(e){let t,n;return{c(){t=dh("p"),n=mh(e[9]),vh(t,"class","status error svelte-h4n0sq")},m(e,i){ch(e,t,i),sh(t,n)},p(e,t){512&t&&yh(n,e[9])},d(e){e&&uh(t)}}}function wg(e){let t,n,i;return{c(){t=dh("p"),n=mh("Could not connect to host: "),i=mh(e[4]),vh(t,"class","status error svelte-h4n0sq")},m(e,r){ch(e,t,r),sh(t,n),sh(t,i)},p(e,t){16&t&&yh(i,e[4])},d(e){e&&uh(t)}}}function xg(e){let t,n,i,r,o,a,s,l,c,u,d,p,m,f,h,g,v,b,y,$,_;const k=e[22].controls,w=eh(k,e,e[21],dg);let x=e[5]&&pg(),S=e[5]&&e[6]&&mg(e);function I(e,t){return e[3]||e[4]?e[7]?yg:e[8]?bg:e[12]?vg:gg:$g}let E=I(e),T=E(e);function z(e,t){return e[4]?wg:e[9]?kg:e[10]?_g:void 0}let C=z(e),O=C&&C(e);return{c(){t=dh("div"),n=dh("div"),i=dh("div"),w&&w.c(),r=fh(),o=dh("div"),a=dh("pre"),s=mh(" "),l=dh("code"),u=mh("\n "),d=fh(),p=dh("div"),x&&x.c(),m=fh(),f=dh("div"),S&&S.c(),h=fh(),g=dh("button"),T.c(),b=fh(),O&&O.c(),vh(i,"class","controls min-w-[14rem] w-60 max-w-[42%] flex flex-col shrink-0 overflow-auto border-r border-[var(--gray-3)]"),vh(l,"class",c="hljs "+e[2]+" grow overflow-auto p-2 "+(e[1]?"no-select":"")+" svelte-h4n0sq"),vh(a,"class","flex flex-col grow basis-0 overflow-auto m-0"),vh(o,"class","output flex flex-col grow min-w-0 overflow-hidden"),vh(n,"class","flex flex-row grow min-h-0 overflow-hidden rounded-xl border border-[var(--gray-3)]"),vh(g,"class","use-button svelte-h4n0sq"),g.disabled=e[13],vh(g,"title",v=e[12]?"Copy to Clipboard":void 0),kh(g,"disabled",e[13]),kh(g,"drifted",e[5]),vh(f,"class","actions svelte-h4n0sq"),kh(f,"drifted",e[5]),vh(p,"class","footer shrink-0 svelte-h4n0sq"),vh(t,"class","mcp-shell flex flex-col gap-2 p-2 min-h-0 svelte-h4n0sq")},m(c,v){ch(c,t,v),sh(t,n),sh(n,i),w&&w.m(i,null),sh(n,r),sh(n,o),sh(o,a),sh(a,s),sh(a,l),l.innerHTML=e[0],sh(a,u),sh(t,d),sh(t,p),x&&x.m(p,null),sh(p,m),sh(p,f),S&&S.m(f,null),sh(f,h),sh(f,g),T.m(g,null),sh(p,b),O&&O.m(p,null),y=!0,$||(_=[gh(a,"click",e[15]),gh(g,"click",e[14])],$=!0)},p(e,[t]){w&&w.p&&(!y||2097152&t)&&ih(w,k,e,e[21],y?nh(k,e[21],t,ug):rh(e[21]),dg),(!y||1&t)&&(l.innerHTML=e[0]),(!y||6&t&&c!==(c="hljs "+e[2]+" grow overflow-auto p-2 "+(e[1]?"no-select":"")+" svelte-h4n0sq"))&&vh(l,"class",c),e[5]?x||(x=pg(),x.c(),x.m(p,m)):x&&(x.d(1),x=null),e[5]&&e[6]?S?S.p(e,t):(S=mg(e),S.c(),S.m(f,h)):S&&(S.d(1),S=null),E===(E=I(e))&&T?T.p(e,t):(T.d(1),T=E(e),T&&(T.c(),T.m(g,null))),(!y||8192&t)&&(g.disabled=e[13]),(!y||4096&t&&v!==(v=e[12]?"Copy to Clipboard":void 0))&&vh(g,"title",v),(!y||8192&t)&&kh(g,"disabled",e[13]),(!y||32&t)&&kh(g,"drifted",e[5]),(!y||32&t)&&kh(f,"drifted",e[5]),C===(C=z(e))&&O?O.p(e,t):(O&&O.d(1),O=C&&C(e),O&&(O.c(),O.m(p,null)))},i(e){y||(Bh(w,e),y=!0)},o(e){Hh(w,e),y=!1},d(e){e&&uh(t),w&&w.d(e),x&&x.d(),S&&S.d(),T.d(),O&&O.d(),$=!1,Kf(_)}}}function Sg(e,t,n){let i,r,o,a,s,l,c,{$$slots:u={},$$scope:d}=t,{highlightedCode:p}=t,{hasErrors:m=!1}=t,{highlightClass:f="-solidity"}=t,{code:h=""}=t,{fence:g}=t,{hostConnected:v=!1}=t,{hostConnectError:b}=t,{hostSendCaps:y=ng}=t,{mcpApp:$}=t,{drifted:_=!1}=t,{onRestoreOriginal:k}=t,w=!1,x=!1;const S=tg({canOpen:!1});var I,E;function T(e){c&&clearTimeout(c),n(8,a=e),c=setTimeout(()=>{n(8,a=void 0),c=void 0},1e3)}function z(e,t){return n=>{const i=n.target,r=i instanceof Element?i.closest(e)?.getAttribute("href"):void 0;r&&!r.startsWith("#")&&(n.preventDefault(),n.stopPropagation(),y.openLinks&&async function(e,t){if((await e.openLink({url:t})).isError)throw new Error("Host denied opening the link.")}($,r).catch(e=>console.warn(`[mcp-apps] ${t} openLink failed`,e)))}}I=lg,E=S,Eh().$$.context.set(I,E);const C=z("a[href]","code preview"),O=z(".tippy-box a[href]","tippy");Th(()=>(document.addEventListener("click",O,!0),()=>document.removeEventListener("click",O,!0)));return e.$$set=e=>{"highlightedCode"in e&&n(0,p=e.highlightedCode),"hasErrors"in e&&n(1,m=e.hasErrors),"highlightClass"in e&&n(2,f=e.highlightClass),"code"in e&&n(16,h=e.code),"fence"in e&&n(17,g=e.fence),"hostConnected"in e&&n(3,v=e.hostConnected),"hostConnectError"in e&&n(4,b=e.hostConnectError),"hostSendCaps"in e&&n(18,y=e.hostSendCaps),"mcpApp"in e&&n(19,$=e.mcpApp),"drifted"in e&&n(5,_=e.drifted),"onRestoreOriginal"in e&&n(6,k=e.onRestoreOriginal),"$$scope"in e&&n(21,d=e.$$scope)},e.$$.update=()=>{32&e.$$.dirty&&(_||n(11,x=!1)),262144&e.$$.dirty&&S.set({canOpen:y.openLinks}),262144&e.$$.dirty&&document.documentElement.classList.toggle("mcp-no-open-links",!y.openLinks),262144&e.$$.dirty&&n(20,i=og(y)),1048584&e.$$.dirty&&n(12,r=v&&!i),65946&e.$$.dirty&&n(13,o=m||w||!h||!v||!!b||!!a)},[p,m,f,v,b,_,k,w,a,s,l,x,r,o,async function(){if(!o){n(9,s=void 0),n(10,l=void 0),n(7,w=!0);try{if(r)return await sg(h),void T("Copied");await async function(e,t,n){const i=rg(e);if(!og(i))throw new Error("This host does not support sending the contract to the agent.");if(i.updateModelContext)try{await e.updateModelContext({content:[{type:"text",text:t}]})}catch(e){console.warn("[mcp-apps] updateModelContext failed",e)}if((await e.sendMessage({role:"user",content:[{type:"text",text:ag(n,t)}]})).isError)throw new ig}($,h,g),T("Sent")}catch(e){if(e instanceof ig)return void n(10,l=e.message);console.error("[mcp-apps] Send Updates to Agent failed",e),n(9,s=e instanceof Error?e.message:String(e));try{await sg(h),T("Copied")}catch{}}finally{n(7,w=!1)}}},C,h,g,y,$,i,d,u,()=>{n(11,x=!1),k()},()=>n(11,x=!1),()=>n(11,x=!0)]}class Ig extends Qh{constructor(e){super(),Yh(this,e,Sg,xg,Yf,{highlightedCode:0,hasErrors:1,highlightClass:2,code:16,fence:17,hostConnected:3,hostConnectError:4,hostSendCaps:18,mcpApp:19,drifted:5,onRestoreOriginal:6},cg)}}function Eg(e){return structuredClone(e)}function Tg(e){let t,n,i,r;const o=[{errors:e[7]},e[1].controlProps?.(e[2],e[6])??{}];function a(t){e[15](t)}var s=e[1].controls[e[2]];function l(e){let t={};for(let e=0;e<o.length;e+=1)t=Wf(t,o[e]);return void 0!==e[6]&&(t.opts=e[6]),{props:t}}return s&&(t=xh(s,l(e)),Ch.push(()=>Wh(t,"opts",a))),{c(){t&&Jh(t.$$.fragment),i=hh()},m(e,n){t&&Gh(t,e,n),ch(e,i,n),r=!0},p(e,r){const c=198&r?function(e,t){const n={},i={},r={$$scope:1};let o=e.length;for(;o--;){const a=e[o],s=t[o];if(s){for(const e in a)e in s||(i[e]=1);for(const e in s)r[e]||(n[e]=s[e],r[e]=1);e[o]=s}else for(const e in a)r[e]=1}for(const e in i)e in n||(n[e]=void 0);return n}(o,[128&r&&{errors:e[7]},70&r&&(u=e[1].controlProps?.(e[2],e[6])??{},"object"==typeof u&&null!==u?u:{})]):{};var u;if(!n&&64&r&&(n=!0,c.opts=e[6],jh(()=>n=!1)),6&r&&s!==(s=e[1].controls[e[2]])){if(t){Fh();const e=t;Hh(e.$$.fragment,1,0,()=>{Kh(e,1)}),Vh()}s?(t=xh(s,l(e)),Ch.push(()=>Wh(t,"opts",a)),Jh(t.$$.fragment),Bh(t.$$.fragment,1),Gh(t,i.parentNode,i)):t=null}else s&&t.$set(c)},i(e){r||(t&&Bh(t.$$.fragment,e),r=!0)},o(e){t&&Hh(t.$$.fragment,e),r=!1},d(e){e&&uh(i),t&&Kh(t,e)}}}function zg(e){let t,n;return t=new Ig({props:{highlightedCode:e[11],hasErrors:e[8],code:e[9],highlightClass:e[1].highlightClass,fence:e[1].fence,hostConnected:e[3],hostConnectError:e[4],hostSendCaps:e[5],mcpApp:e[0],drifted:e[10],onRestoreOriginal:e[12],$$slots:{controls:[Tg]},$$scope:{ctx:e}}}),{c(){Jh(t.$$.fragment)},m(e,i){Gh(t,e,i),n=!0},p(e,[n]){const i={};2048&n&&(i.highlightedCode=e[11]),256&n&&(i.hasErrors=e[8]),512&n&&(i.code=e[9]),2&n&&(i.highlightClass=e[1].highlightClass),2&n&&(i.fence=e[1].fence),8&n&&(i.hostConnected=e[3]),16&n&&(i.hostConnectError=e[4]),32&n&&(i.hostSendCaps=e[5]),1&n&&(i.mcpApp=e[0]),1024&n&&(i.drifted=e[10]),524486&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(Bh(t.$$.fragment,e),n=!0)},o(e){Hh(t.$$.fragment,e),n=!1},d(e){Kh(t,e)}}}function Cg(e,t,n){let i,r,o,a,s,l,c,u,{adapter:d}=t,{kind:p}=t,{mcpApp:m}=t,{hostConnected:f=!1}=t,{hostConnectError:h}=t,{hostSendCaps:g=ng}=t,v=d.emptyContract();function b(e){try{return d.print(d.build(e))}catch{return}}function y(e,t){if(!e)return;const i=function(e,t,n){return void 0===e||"result"===n&&!t}(c,a,t),r={...s??{},...e,kind:p};if(n(6,s=r),!i)return;const o=function(e,t,n){const i=n(e);if(void 0!==i)return{opts:Eg(e),code:i,supersedesOpts:!1};const r=n(t);return void 0!==r?{opts:Eg(t),code:r,supersedesOpts:!0}:void 0}(r,{...e,kind:p},b);void 0!==o&&(l=o.opts,n(13,c=o.code),o.supersedesOpts&&n(6,s=Eg(o.opts)))}return m.ontoolinput=e=>{y(e.arguments,"input")},m.ontoolresult=e=>{const t=e.structuredContent;t?.opts&&y(t.opts,"result")},e.$$set=e=>{"adapter"in e&&n(1,d=e.adapter),"kind"in e&&n(2,p=e.kind),"mcpApp"in e&&n(0,m=e.mcpApp),"hostConnected"in e&&n(3,f=e.hostConnected),"hostConnectError"in e&&n(4,h=e.hostConnectError),"hostSendCaps"in e&&n(5,g=e.hostSendCaps)},e.$$.update=()=>{if(66&e.$$.dirty&&s)try{n(14,v=d.build(s)),n(7,u=void 0)}catch(e){const t=e instanceof Error?e.message:String(e);n(7,u=d.optionsErrors(e)??{_:t||"Failed to build contract"})}16386&e.$$.dirty&&n(9,i=d.print(v)),546&e.$$.dirty&&n(11,r=g.openLinks?d.injectHyperlinks(d.highlight(i)):d.highlight(i)),128&e.$$.dirty&&n(8,o=void 0!==u),8960&e.$$.dirty&&n(10,a=function(e){const{originalCode:t,code:n,hasErrors:i}=e;return void 0!==t&&(i||n!==t)}({originalCode:c,code:i,hasErrors:o}))},[m,d,p,f,h,g,s,u,o,i,a,r,function(){null!=l&&n(6,s=Eg(l))},c,v,function(e){s=e,n(6,s)}]}class Og extends Qh{constructor(e){super(),Yh(this,e,Cg,zg,Yf,{adapter:1,kind:2,mcpApp:0,hostConnected:3,hostConnectError:4,hostSendCaps:5})}}const Ug=560;class Ag extends Error{constructor(e){super("Invalid options"),this.messages=e}}function Ng(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]+/g,"").replace(/(\\|")/g,(e,t)=>"\\"+t)}function Dg(e){if(e<=0)throw new Error(`Number of bits must be positive (actual '${e}').`);if(e%8!=0)throw new Error(`The number of bits must be a multiple of 8 (actual '${e}').`);return BigInt("0x"+"ff".repeat(e/8))}const jg={u8:Dg(8),u16:Dg(16),u32:Dg(32),u64:Dg(64),u128:Dg(128),u256:Dg(256)};function Pg(e,t,n){const i=e.toString();if(!/^\d+$/.test(i))throw new Ag({[t]:"Not a valid number"});const r=BigInt(i);if(r>jg[n])throw new Ag({[t]:`Value is greater than ${n} max value`});return r}class Zg{constructor(e){this.license="MIT",this.metadata=new Map,this.ownable=!1,this.documentations=[],this.constructorArgs=[],this.constructorCode=[],this.topLevelDeclarations=[],this.implementedTraitsMap=new Map,this.freeFunctionsMap=new Map,this.variablesMap=new Map,this.useClausesMap=new Map,this.errorsMap=new Map,this.derivesSet=new Set,this.name=function(e,t=!1){const n=e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/^[^a-zA-Z_]+/,"").replace(/^(.)/,e=>t?e.toUpperCase():e).replace(/[^\w]+(.?)/g,(e,t)=>t.toUpperCase());if(0===n.length)throw new Ag({name:"Identifier is empty or does not have valid characters"});return n}(e,!0)}get implementedTraits(){return[...this.implementedTraitsMap.values()]}get freeFunctions(){return[...this.freeFunctionsMap.values()]}get variables(){return[...this.variablesMap.values()]}get useClauses(){return[...this.useClausesMap.values()]}get errors(){return[...this.errorsMap.values()]}get derives(){return[...this.derivesSet]}addError(e,t){return!this.errorsMap.has(e)&&(this.addUseClause("soroban_sdk","contracterror"),this.errorsMap.set(e,{name:e,num:t}),!0)}addUseClause(e,t,n){const i=n?.groupable??!0,r=n?.alias??"",o=r.length>0?r:t;this.useClausesMap.has(o)||this.useClausesMap.set(o,{containerPath:e,name:t,groupable:i,alias:r})}addVariable(e){return!this.variablesMap.has(e.name)&&(this.variablesMap.set(e.name,e),!0)}addTraitImplBlock(e){const t=e.traitName,n=this.implementedTraitsMap.get(t);if(void 0!==n)return n;{const n={traitName:e.traitName,structName:e.structName,tags:[...e.tags],assocType:e.assocType,functions:[],section:e.section,priority:e.priority};return this.implementedTraitsMap.set(t,n),n}}addFreeFunction(e){const t=this.getFunctionSignature(e),n=this.freeFunctionsMap.get(t);if(void 0!==n)return n;{const n={...e,pub:!0,tags:[],codeBefore:[]};return this.freeFunctionsMap.set(t,n),n}}addTraitForEachFunctions(e,t){Object.values(t).forEach(t=>this.addTraitFunction(e,t))}addTraitFunction(e,t){const n=this.addTraitImplBlock(e),i=this.getFunctionSignature(t);for(let e=0;e<n.functions.length;e++){const t=n.functions[e];if(void 0!==t&&this.getFunctionSignature(t)===i)return t}const r={...t,tags:[],codeBefore:[]};return n.functions.push(r),r}overrideAssocType(e,t){const n=this.implementedTraitsMap.get(e);if(!n)throw new Error(`Trait '${e}' does not exist and cannot be overridden.`);n.assocType=t}getFunctionSignature(e){return[e.name,"(",...e.args.map(e=>e.name),")"].join("")}getOrCreateFunction(e,t){return void 0===t?this.addFreeFunction(e):(this.addTraitImplBlock(t),this.addTraitFunction(t,e))}addFunctionCodeBefore(e,t,n){const i=this.getOrCreateFunction(e,n);i.codeBefore=[...i.codeBefore??[],...t]}addFunctionTag(e,t,n){const i=this.getOrCreateFunction(e,n);i.tags=[...i.tags??[],t]}setFunctionCode(e,t,n){this.getOrCreateFunction(e,n).code=[...t]}addTopLevelDeclaration(e){this.topLevelDeclarations.push(e)}addConstructorArgument(e){for(const t of this.constructorArgs)if(t.name==e.name)return;this.constructorArgs.push(e)}addConstructorCode(e){for(const t of this.constructorCode)if(t===e)return;this.constructorCode.push(e)}addConstructorCodeBlock(e){this.constructorCode.push(...e)}addDerives(e){this.derivesSet.add(e)}addDocumentation(e){this.documentations.push(e)}addContractMetadata(e){(Array.isArray(e)?e:[e]).forEach(({key:e,value:t})=>{if(this.metadata.has(e))throw new Error(`Setting metadata failed: ${e} is already set`);this.metadata.set(e,Ng(t))}),this.metadata.size>0&&this.addUseClause("soroban_sdk","contractmeta")}}const Rg=/[\n\r\u2028\u2029]/u;function qg(e,t){if(Rg.test(e))throw new Ag({[t]:"Must not contain line breaks"})}const Mg={license:"MIT"};function Lg(e,{securityContact:t,license:n}){t&&(qg(t,"securityContact"),e.addContractMetadata({key:"security_contact",value:t})),n&&(qg(n,"license"),e.license=n)}const Fg={info:Mg},Vg={...Fg,access:!1,explicitImplementations:!1};function Bg(e){return{info:e.info??Fg.info}}function Hg(e){return{...Bg(e),access:e.access??Vg.access,explicitImplementations:e.explicitImplementations??Vg.explicitImplementations}}function Wg(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Object.assign({name:t.name??e},t)]))}const Jg="ownable";function Gg(e,t,n=!1){switch(t){case!1:break;case"ownable":if(!e.ownable){e.ownable=!0,e.addUseClause("soroban_sdk","Address"),e.addUseClause("stellar_access::ownable","self",{alias:"ownable"}),e.addUseClause("stellar_access::ownable","Ownable");const t={traitName:"Ownable",structName:e.name,tags:n?["contractimpl"]:["contractimpl(contracttrait)"],section:"Utils"};n?e.addTraitForEachFunctions(t,Xg):e.addTraitImplBlock(t),e.addConstructorArgument({name:"owner",type:"Address"}),e.addConstructorCode("ownable::set_owner(e, &owner);")}break;case"roles":{e.addUseClause("soroban_sdk","Address"),e.addUseClause("stellar_access::access_control","self",{alias:"access_control"}),e.addUseClause("stellar_access::access_control","AccessControl");const t={traitName:"AccessControl",structName:e.name,tags:n?["contractimpl"]:["contractimpl(contracttrait)"],section:"Utils"};n?(e.addUseClause("soroban_sdk","Symbol"),e.addTraitForEachFunctions(t,Yg)):e.addTraitImplBlock(t),e.addConstructorArgument({name:"admin",type:"Address"}),e.addConstructorCode("access_control::set_admin(e, &admin);");break}default:throw new Error("Unknown value for `access`")}}function Kg(e,t,n,i,r={useMacro:!0},o=!1){switch(!1===i&&(i=Jg),Gg(e,i,o),i){case"ownable":e.addUseClause("stellar_macros","only_owner"),r.useMacro?e.addFunctionTag(n,"only_owner",t):e.addFunctionCodeBefore(n,["ownable::enforce_owner_auth(e);"],t);break;case"roles":{const{useMacro:i,caller:o,role:a}=r;o&&a?(e.addUseClause("soroban_sdk","Symbol"),e.addUseClause("soroban_sdk","Vec"),e.addConstructorArgument({name:a,type:"Address"}),e.addConstructorCode(`access_control::grant_role_no_auth(e, &${a}, &Symbol::new(e, "${a}"), &admin);`),i?(e.addUseClause("stellar_macros","only_role"),e.addFunctionTag(n,`only_role(${o}, "${a}")`,t)):e.addFunctionCodeBefore(n,[`access_control::ensure_role(e, &Symbol::new(e, "${a}"), ${o});`],t)):i?(e.addUseClause("stellar_macros","only_admin"),e.addFunctionTag(n,"only_admin",t)):e.addFunctionCodeBefore(n,["access_control::enforce_admin_auth(e);"],t);break}default:throw new Error("Unknown value for `access`")}}const Xg=Wg({get_owner:{args:[{name:"e",type:"&Env"}],returns:"Option<Address>",code:["ownable::get_owner(e)"]},transfer_ownership:{args:[{name:"e",type:"&Env"},{name:"new_owner",type:"Address"},{name:"live_until_ledger",type:"u32"}],code:["ownable::transfer_ownership(e, &new_owner, live_until_ledger);"]},accept_ownership:{args:[{name:"e",type:"&Env"}],code:["ownable::accept_ownership(e);"]},renounce_ownership:{args:[{name:"e",type:"&Env"}],code:["ownable::renounce_ownership(e);"]}}),Yg=Wg({has_role:{args:[{name:"e",type:"&Env"},{name:"account",type:"Address"},{name:"role",type:"Symbol"}],returns:"Option<u32>",code:["access_control::has_role(e, &account, &role)"]},get_existing_roles:{args:[{name:"e",type:"&Env"}],returns:"Vec<Symbol>",code:["access_control::get_existing_roles(e)"]},get_role_member_count:{args:[{name:"e",type:"&Env"},{name:"role",type:"Symbol"}],returns:"u32",code:["access_control::get_role_member_count(e, &role)"]},get_role_member:{args:[{name:"e",type:"&Env"},{name:"role",type:"Symbol"},{name:"index",type:"u32"}],returns:"Address",code:["access_control::get_role_member(e, &role, index)"]},get_role_admin:{args:[{name:"e",type:"&Env"},{name:"role",type:"Symbol"}],returns:"Option<Symbol>",code:["access_control::get_role_admin(e, &role)"]},get_admin:{args:[{name:"e",type:"&Env"}],returns:"Option<Address>",code:["access_control::get_admin(e)"]},grant_role:{args:[{name:"e",type:"&Env"},{name:"account",type:"Address"},{name:"role",type:"Symbol"},{name:"caller",type:"Address"}],code:["access_control::grant_role(e, &account, &role, &caller);"]},revoke_role:{args:[{name:"e",type:"&Env"},{name:"account",type:"Address"},{name:"role",type:"Symbol"},{name:"caller",type:"Address"}],code:["access_control::revoke_role(e, &account, &role, &caller);"]},renounce_role:{args:[{name:"e",type:"&Env"},{name:"role",type:"Symbol"},{name:"caller",type:"Address"}],code:["access_control::renounce_role(e, &role, &caller);"]},transfer_admin_role:{args:[{name:"e",type:"&Env"},{name:"new_admin",type:"Address"},{name:"live_until_ledger",type:"u32"}],code:["access_control::transfer_admin_role(e, &new_admin, live_until_ledger);"]},accept_admin_transfer:{args:[{name:"e",type:"&Env"}],code:["access_control::accept_admin_transfer(e);"]},set_role_admin:{args:[{name:"e",type:"&Env"},{name:"role",type:"Symbol"},{name:"admin_role",type:"Symbol"}],code:["access_control::set_role_admin(e, &role, &admin_role);"]},renounce_admin:{args:[{name:"e",type:"&Env"}],code:["access_control::renounce_admin(e);"]}});function Qg(e,t,n){const i=Wg({upgrade:{args:[{name:"e",type:"&Env"},{name:"new_wasm_hash",type:"BytesN<32>"},{name:"operator",type:"Address"}],code:["upgradeable::upgrade(e, &new_wasm_hash)"]},upgrade_unused_operator:{name:"upgrade",args:[{name:"e",type:"&Env"},{name:"new_wasm_hash",type:"BytesN<32>"},{name:"_operator",type:"Address"}],code:["upgradeable::upgrade(e, &new_wasm_hash)"]}});e.addUseClause("soroban_sdk","Address"),e.addUseClause("soroban_sdk","BytesN"),e.addUseClause("stellar_contract_utils::upgradeable","self",{alias:"upgradeable"}),e.addUseClause("stellar_contract_utils::upgradeable","Upgradeable");const r={traitName:"Upgradeable",structName:e.name,tags:["contractimpl"],section:"Utils"},o="ownable"===t?i.upgrade_unused_operator:i.upgrade;e.addTraitFunction(r,o),Kg(e,r,o,t,{useMacro:!0,role:"upgrader",caller:"operator"},n)}const ev=Symbol("whitespace");function*tv(e,t){for(const n of t)n===ev?yield"":Array.isArray(n)?yield*tv(e+1,n):yield" ".repeat(e)+n}function nv(...e){return e.filter(e=>e.length>0).flatMap(e=>[ev,...e]).slice(1)}const iv="1. with no section",rv="Standalone Imports",ov=" ",av=["#![no_std]"];function sv(e){return function(...e){return[...tv(0,e)].join("\n")+"\n"}(...nv([`// SPDX-License-Identifier: ${e.license}`,"// Compatible with OpenZeppelin Stellar Soroban Contracts ^0.7.2",...e.documentations.length?["",...(t=e.documentations,t.map(e=>e.length>0?`//! ${e}`:"//!"))]:[],...av],nv(function(e){const t=function(e){return e.useClauses.sort((e,t)=>e.containerPath===t.containerPath?"self"===e.name&&"self"!==t.name?-1:"self"!==e.name&&"self"===t.name?1:dv(e).localeCompare(dv(t)):e.containerPath.localeCompare(t.containerPath))}(e),n=t.reduce((e,t)=>(t.groupable?(e[t.containerPath]=e[t.containerPath]||[]).push(t):(e[rv]=e[rv]||[]).push(t),e),{});return Object.entries(n).flatMap(([e,t])=>function(e,t){const n=[];if(t===rv)for(const t of e)n.push(`use ${t.containerPath}::${dv(t)};`);else if(1==e.length)n.push(`use ${t}::${dv(e[0])};`);else if(e.length>1){const i=e.map(e=>dv(e)).join(", ");n.push(`use ${t}::{${i}};`)}return n}(t,e)).flatMap(e=>function(e){const t=[],n=-1!==e.indexOf("{");n&&e.length>90?(t.push(e.slice(0,e.indexOf("{")+1)),t.push(...pv(e.slice(e.indexOf("{")+1,-2))),t.push("};")):t.push(e);return t}(e.toString()))}(e),function(e){return Array.from(e.metadata.entries()).map(([e,t])=>`contractmeta!(key="${e}", val="${t}");`)}(e),function(e){return uv(e.variables.map(e=>`const ${e.name}: ${e.type} = ${e.value}`))}(e),function(e){return 0===e.topLevelDeclarations.length?[]:nv(...e.topLevelDeclarations)}(e),function(e){const t=[];e.derives.length>0&&t.push(`#[derive(${e.derives.sort().join(", ")})]`);return t.push("#[contract]"),t.push(`pub struct ${e.name};`),t}(e),function(e){if(0===e.errors.length)return[];return["#[contracterror]","#[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd, Ord)]","#[repr(u32)]",`pub enum ${e.name}Error {`,e.errors.map(e=>`${e.name} = ${e.num},`),"}"]}(e),function(e){const t=function(e){if(e.constructorCode.length>0){const t="fn __constructor",n=[{name:"e",type:"&Env"},...e.constructorArgs],i=nv(...e.constructorCode.reduce((e,t)=>(0===t.length?e.push([]):e[e.length-1].push(t),e),[[]]).map(e=>uv(e)));return fv(!0,t,gv(n),[],void 0,void 0,i)}return[]}(e),n=e.freeFunctions.map(e=>mv(e));if(0===t.length&&0===n.length)return[];const i=["#[contractimpl]",`impl ${e.name} {`];t.length>0&&i.push(t);t.length>0&&n.length>0&&i.push("");n.length>0&&i.push(nv(...n));return i.push("}"),i}(e),function(e){const t=e.implementedTraits.sort((e,t)=>e.priority!==t.priority?(e.priority??1/0)-(t.priority??1/0):e.tags.length!==t.tags.length?e.tags.length-t.tags.length:e.traitName.localeCompare(t.traitName)),n=t.reduce((e,t)=>{const n=t.section??iv;return(e[n]=e[n]||[]).push(t),e},{}),i=Object.entries(n).sort((e,t)=>e[0].localeCompare(t[0])).map(([e,t])=>function(e,t){const n=[],i=e===iv;i||(n.push("//"),n.push(`// ${e}`),n.push("//"));return t.forEach((e,t)=>{(t>0||!i)&&n.push(""),n.push(...function(e){const t=[];t.push(...e.tags.map(e=>`#[${e}]`));const n=`impl ${e.traitName} for ${e.structName}`,i=(Array.isArray(e.assocType)?e.assocType:[e.assocType??""]).map(e=>e.trim()).filter(e=>e.length>0),r=i.length>0?[...i.map(e=>ov+e),""]:[],o=e.functions.map(e=>mv(e));r.length>0||o.length>0?(t.push(`${n} {`),r.length>0&&t.push(...r),o.length>0&&t.push(nv(...o)),t.push("}")):t.push(`${n} {}`);return t}(e))}),n}(e,t));return nv(...i)}(e))));var t}const lv=["{","}",";",",","("];function cv(e){return e.length>0&&!lv.includes(e.at(-1))}function uv(e){return e.map(e=>cv(e)?e+";":e)}function dv(e){return e.alias?`${e.name} as ${e.alias}`:e.name}function pv(e){const t=[];if(e.length>90){const n=e.slice(0,90),i=n.lastIndexOf(",");-1!==i?(t.push(ov+n.slice(0,i+1)),t.push(...pv(e.slice(i+2)))):t.push(ov+n)}else t.push(ov+e);return t}function mv(e){const t=`fn ${e.name}`,n=gv(e.args),i=e.codeBefore?.concat(e.code)??e.code;for(let t=0;t<i.length;t++){const n=i[t],r=t<i.length-1||void 0===e.returns;void 0!==n&&n.length>0&&(r&&cv(n)?i[t]+=";":!r&&n.endsWith(";")&&(i[t]=n.slice(0,n.length-1)))}return fv(e.pub,t,n,e.tags,e.returns,void 0,i)}function fv(e,t,n,i,r,o,a){const s=[];for(let e=0;e<i.length;e++)s.push(`#[${i[e]}]`);let l="";if(e&&(l+="pub "),l+=`${t}(`,n.length>0){const e=n.join(", ");e.length>80||n.some(vv)?(s.push(l),l="",s.push(n.map(e=>vv(e)?e:`${e},`))):l+=`${e}`}return l+=")",l+=void 0===r?" {":` -> ${r} {`,s.push(l),s.push(a),s.push("}"),s}function hv(e){if(void 0!==e.type){const t=e.type;return`${e.name}: ${t}`}return`${e.name}`}function gv(e){return e.flatMap(e=>[...(e.comment??[]).map(e=>`// ${e}`),hv(e)])}function vv(e){return e.startsWith("//")}const bv=["Take one you trust from the Stellar Registry:","https://testnet.rgstry.xyz (testnet) or https://stellar.rgstry.xyz (mainnet)."],yv={name:"MyAccount",delegatedSigners:!0,ed25519Signers:!1,webauthnSigners:!1,policy:"simple-threshold",executionEntryPoint:!0,upgradeable:!1,info:Fg.info};function $v(e){const t=new Zg(e.name),n=function(e){return{...e,...Bg(e),delegatedSigners:e.delegatedSigners??yv.delegatedSigners,ed25519Signers:e.ed25519Signers??yv.ed25519Signers,webauthnSigners:e.webauthnSigners??yv.webauthnSigners,policy:e.policy??yv.policy,executionEntryPoint:e.executionEntryPoint??yv.executionEntryPoint,upgradeable:e.upgradeable??yv.upgradeable}}(e);if(!n.delegatedSigners&&!n.ed25519Signers&&!n.webauthnSigners)throw new Ag({delegatedSigners:"At least one signer type is required"});return function(e,t){e.addUseClause("soroban_sdk","contract"),e.addUseClause("soroban_sdk","contractimpl"),e.addUseClause("soroban_sdk","Address"),e.addUseClause("soroban_sdk","Env"),e.addUseClause("soroban_sdk","Map"),e.addUseClause("soroban_sdk","String"),e.addUseClause("soroban_sdk","Val"),e.addUseClause("soroban_sdk","Vec"),e.addUseClause("soroban_sdk::auth","Context"),e.addUseClause("soroban_sdk::auth","CustomAccountInterface"),e.addUseClause("soroban_sdk::crypto","Hash"),e.addUseClause("stellar_accounts::smart_account","self",{alias:"smart_account"}),e.addUseClause("stellar_accounts::smart_account","AuthPayload"),e.addUseClause("stellar_accounts::smart_account","ContextRule"),e.addUseClause("stellar_accounts::smart_account","ContextRuleType"),e.addUseClause("stellar_accounts::smart_account","Signer"),e.addUseClause("stellar_accounts::smart_account","SmartAccount"),e.addUseClause("stellar_accounts::smart_account","SmartAccountError");const n=[],i=["let mut signers = Vec::new(e);"];t.delegatedSigners&&(n.push("delegated_signers"),e.addConstructorArgument({name:"delegated_signers",type:"Vec<Address>"}),i.push("for account in delegated_signers.iter() {"," signers.push_back(Signer::Delegated(account));","}"));for(const{option:r,prefix:o,label:a}of _v)t[r]&&(n.push(`${o}_keys`),e.addUseClause("soroban_sdk","Bytes"),e.addConstructorArgument({name:`${o}_verifier`,type:"Address",comment:[`${a} verifier contract, shared by every ${a} key.`,...bv]}),e.addConstructorArgument({name:`${o}_keys`,type:"Vec<Bytes>"}),i.push(`for key in ${o}_keys.iter() {`,` signers.push_back(Signer::External(${o}_verifier.clone(), key));`,"}"));const r=function(e,t,n){if(!1===t.policy)return["let policies: Map<Address, Val> = Map::new(e);"];e.addUseClause("soroban_sdk","IntoVal");const i=[];let r;"weighted-threshold"===t.policy?(e.addUseClause("soroban_sdk","panic_with_error"),e.addUseClause("stellar_accounts::policies::weighted_threshold","WeightedThresholdAccountParams"),e.addError("WeightsLengthMismatch",1),e.addConstructorArgument({name:"weights",type:"Vec<u32>",comment:1===n.length?[`One weight per signer, positionally aligned with \`${n[0]}\`.`]:["One weight per signer, positionally aligned with the signers assembled",`from ${n.join(", ")}, in that order.`]}),i.push("if weights.len() != signers.len() {",` panic_with_error!(e, ${e.name}Error::WeightsLengthMismatch);`,"}","","let mut signer_weights: Map<Signer, u32> = Map::new(e);","for (i, signer) in signers.iter().enumerate() {"," signer_weights.set(signer, weights.get_unchecked(i as u32));","}",""),r="WeightedThresholdAccountParams { signer_weights, threshold }"):(e.addUseClause("stellar_accounts::policies::simple_threshold","SimpleThresholdAccountParams"),r="SimpleThresholdAccountParams { threshold }");return e.addConstructorArgument({name:"threshold",type:"u32"}),e.addConstructorArgument({name:"threshold_policy",type:"Address",comment:[("weighted-threshold"===t.policy?"Weighted threshold":"Simple threshold")+" policy contract.",...bv]}),i.push("let mut policies: Map<Address, Val> = Map::new(e);","policies.set("," threshold_policy,",` ${r}.into_val(e),`,");"),i}(e,t,n);e.addConstructorCodeBlock([...i,""]),e.addConstructorCodeBlock([...r,""]),e.addConstructorCodeBlock(["smart_account::add_context_rule("," e,"," &ContextRuleType::Default,",` &String::from_str(e, "${kv(t.policy)}"),`," None,"," &signers,"," &policies,",");"]),e.addTraitFunction({traitName:"CustomAccountInterface",structName:e.name,tags:["contractimpl"],assocType:["type Error = SmartAccountError;","type Signature = AuthPayload;"],priority:0},wv.__check_auth),e.addTraitImplBlock({traitName:"SmartAccount",structName:e.name,tags:["contractimpl(contracttrait)"],priority:1})}(t,n),n.executionEntryPoint&&function(e){e.addUseClause("stellar_accounts::smart_account","ExecutionEntryPoint"),e.addUseClause("soroban_sdk","Symbol"),e.addTraitImplBlock({traitName:"ExecutionEntryPoint",structName:e.name,tags:["contractimpl(contracttrait)"],priority:2})}(t),n.upgradeable&&function(e){e.addUseClause("soroban_sdk","Address"),e.addUseClause("soroban_sdk","BytesN"),e.addUseClause("stellar_contract_utils::upgradeable","self",{alias:"upgradeable"}),e.addUseClause("stellar_contract_utils::upgradeable","Upgradeable"),e.addTraitFunction({traitName:"Upgradeable",structName:e.name,tags:["contractimpl"],section:"Utils"},{name:"upgrade",args:[{name:"e",type:"&Env"},{name:"new_wasm_hash",type:"BytesN<32>"},{name:"_operator",type:"Address"}],code:["e.current_contract_address().require_auth()","upgradeable::upgrade(e, &new_wasm_hash)"]})}(t),Lg(t,n.info),t}const _v=[{option:"ed25519Signers",prefix:"ed25519",label:"Ed25519"},{option:"webauthnSigners",prefix:"webauthn",label:"WebAuthn"}];function kv(e){switch(e){case!1:return"default";case"simple-threshold":return"multisig";case"weighted-threshold":return"weighted-multisig";default:throw new Error("Unknown value for `policy`")}}const wv=Wg({__check_auth:{args:[{name:"e",type:"Env"},{name:"signature_payload",type:"Hash<32>"},{name:"signatures",type:"AuthPayload"},{name:"auth_contexts",type:"Vec<Context>"}],returns:"Result<(), Self::Error>",code:["smart_account::do_check_auth(&e, &signature_payload, &signatures, &auth_contexts)"]}});function xv(e,t,n){e.addUseClause("stellar_contract_utils::pausable","self",{alias:"pausable"}),e.addUseClause("stellar_contract_utils::pausable","Pausable");const i={traitName:"Pausable",structName:e.name,tags:["contractimpl"],section:"Utils"},r=!1===t?Jg:t,o="ownable"===r?Sv.pause_unused_caller:Sv.pause,a="ownable"===r?Sv.unpause_unused_caller:Sv.unpause;e.addTraitFunction(i,Sv.paused),e.addTraitFunction(i,o),e.addTraitFunction(i,a),Kg(e,i,o,r,{useMacro:!0,role:"pauser",caller:"caller"},n),Kg(e,i,a,r,{useMacro:!0,role:"pauser",caller:"caller"},n)}const Sv=Wg({paused:{args:[{name:"e",type:"&Env"}],returns:"bool",code:["pausable::paused(e)"]},pause:{args:[{name:"e",type:"&Env"},{name:"caller",type:"Address"}],code:["pausable::pause(e)"]},pause_unused_caller:{name:"pause",args:[{name:"e",type:"&Env"},{name:"_caller",type:"Address"}],code:["pausable::pause(e)"]},unpause:{args:[{name:"e",type:"&Env"},{name:"caller",type:"Address"}],code:["pausable::unpause(e)"]},unpause_unused_caller:{name:"unpause",args:[{name:"e",type:"&Env"},{name:"_caller",type:"Address"}],code:["pausable::unpause(e)"]}});function Iv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ev,Tv={},zv={};var Cv,Ov={};var Uv,Av={};var Nv,Dv={};var jv,Pv={};var Zv,Rv={};var qv,Mv={};var Lv,Fv,Vv={};var Bv,Hv,Wv,Jv=(Fv||(Fv=1,Bv=Tv,Hv=Tv&&Tv.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),Wv=Tv&&Tv.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||Hv(t,e,n)},Object.defineProperty(Bv,"__esModule",{value:!0}),Wv((Ev||(Ev=1,Object.defineProperty(zv,"__esModule",{value:!0}),zv.cairoMultisigDescriptions=zv.cairoAccountDescriptions=zv.cairoVestingDescriptions=zv.cairoGovernorDescriptions=zv.cairoERC6909Descriptions=zv.cairoERC1155Descriptions=zv.cairoERC721Descriptions=zv.cairoERC20Descriptions=zv.cairoRoyaltyInfoDescriptions=zv.cairoAccessDescriptions=zv.cairoMacrosDescriptions=zv.cairoCommonDescriptions=zv.cairoPrompts=void 0,zv.cairoPrompts={ERC20:"Make a fungible token per the ERC-20 standard.",ERC721:"Make a non-fungible token per the ERC-721 standard.",ERC1155:"Make a non-fungible token per the ERC-1155 standard.",ERC6909:"Make a minimal multi-token per the ERC-6909 standard.",Governor:"Make a contract to implement governance, such as for a DAO.",Multisig:"Make a multi-signature smart contract, requiring a quorum of registered signers to approve and collectively execute transactions.",Vesting:"Make a vesting smart contract that manages the gradual release of ERC-20 tokens to a designated beneficiary based on a predefined vesting schedule.",Account:"Make a custom smart contract that represents an account that can be deployed and interacted with other contracts, and can be extended to implement custom logic. An account is a special type of contract that is used to validate and execute transactions.",Custom:"Make a custom smart contract."},zv.cairoCommonDescriptions={upgradeable:"Whether the smart contract is upgradeable.",appName:"Required when votes is enabled, for hashing and signing typed structured data. Name for domain separator implementing SNIP12Metadata trait. Prevents two applications from producing the same hash.",appVersion:"Required when votes is enabled, for hashing and signing typed structured data. Version for domain separator implementing SNIP12Metadata trait. Prevents two versions of the same application from producing the same hash.",royaltyInfo:"Provides information for how much royalty is owed and to whom, based on a sale price. Follows ERC-2981 standard."},zv.cairoMacrosDescriptions={macros:"The macros to use for the contract.",withComponents:'Whether to use the "with_components" macro for simplified contract structure.'},zv.cairoAccessDescriptions={accessType:"The type of access control to provision. Ownable is a simple mechanism with a single account authorized for all privileged actions. Roles is a flexible mechanism with a separate role for each privileged action. A role can have many authorized accounts. Roles (Default Admin Rules) provides additional enforced security measures on top of standard Roles mechanism for managing the most privileged role: default admin.",darInitialDelay:'The initial delay for the default admin role (in case Roles (Default Admin Rules) is used). Default is "1 day".',darDefaultDelayIncrease:'The default delay increase for the default admin role (in case Roles (Default Admin Rules) is used). Default is "5 days".',darMaxTransferDelay:'The maximum delay for a default admin transfer (in case Roles (Default Admin Rules) is used). Default is "30 days".'},zv.cairoRoyaltyInfoDescriptions={enabled:"Whether to enable royalty feature for the contract",defaultRoyaltyFraction:"The royalty fraction that will be default for all tokens. It will be used for a token if there's no custom royalty fraction set for it.",feeDenominator:"The denominator used to interpret a token's fee and to calculate the result fee fraction."},zv.cairoERC20Descriptions={premint:"The number of tokens to premint for the deployer.",decimals:"The number of decimals to use for the contract. Defaults to 18.",wrapper:"Whether to include ERC20Wrapper functionality for depositing and withdrawing an underlying token.",votes:"Whether to keep track of historical balances for voting in on-chain governance, with a way to delegate one's voting power to a trusted account."},zv.cairoERC721Descriptions={baseUri:"A base uri for the non-fungible token.",enumerable:"Whether to allow on-chain enumeration of all tokens or those owned by an account. Increases gas cost of transfers.",wrapper:"Whether to include ERC721Wrapper functionality for wrapping an underlying ERC721.",uriStorage:"Allows updating token URIs for individual token IDs.",votes:"Whether to keep track of individual units for voting in on-chain governance. Voting durations can be expressed as block numbers or timestamps.",consecutive:"Enables gas-efficient batch minting of consecutive token IDs during construction (ERC-2309). The contract owner must call `mint_consecutive` from the constructor to issue the initial batch. Cannot be combined with enumerable."},zv.cairoERC1155Descriptions={baseUri:"The location of the metadata for the token. Clients will replace any instance of {id} in this string with the tokenId.",updatableUri:"Whether privileged accounts will be able to set a new URI for all token types.",supply:"Whether to keep track of total supply of tokens.",uriStorage:"Allows updating token URIs for individual token IDs."},zv.cairoERC6909Descriptions={contentUri:"Whether to include Content URI extension for contract-level and per-token URI metadata.",tokenSupply:"Whether to keep track of total supply per token ID.",metadata:"Whether to include per-token metadata extension providing name, symbol, and decimals per token ID."},zv.cairoGovernorDescriptions={delay:'The delay since proposal is created until voting starts, in readable date time format matching /^(\\d+(?:\\.\\d+)?) +(second|minute|hour|day|week|month|year)s?$/, default is "1 day".',period:'The length of period during which people can cast their vote, in readable date time format matching /^(\\d+(?:\\.\\d+)?) +(second|minute|hour|day|week|month|year)s?$/, default is "1 week".',proposalThreshold:"Minimum number of votes an account must have to create a proposal, default is 0.",decimals:"The number of decimals to use for the contract, default is 18 for ERC20Votes and 0 for ERC721Votes (because it does not apply to ERC721Votes).",quorumMode:"The type of quorum mode to use, either by percentage or absolute value.",quorumPercent:"The percent required, in cases of quorumMode equals percent.",quorumAbsolute:"The absolute quorum required, in cases of quorumMode equals absolute.",votes:"The type of voting to use. Either erc20votes, meaning voting power with a votes-enabled ERC20 token. Either erc721votes, meaning voting power with a votes-enabled ERC721 token. Voters can entrust their voting power to a delegate.",clockMode:"The clock mode used by the voting token. For now, only timestamp mode where the token uses voting durations expressed as timestamps is supported. For Governor, this must be chosen to match what the ERC20 or ERC721 voting token uses.",timelock:'Whether to add a delay to actions taken by the Governor. Gives users time to exit the system if they disagree with governance decisions. If "openzeppelin", Module compatible with OpenZeppelin\'s TimelockController.',settings:"Whether to allow governance to update voting settings (delay, period, proposal threshold)."},zv.cairoVestingDescriptions={startDate:'The timestamp marking the beginning of the vesting period. In HTML input datetime-local format, e.g. "2026-03-15T14:30".',duration:"The total duration of the vesting period. In readable date time format matching /^(\\d+(?:\\.\\d+)?) +(second|minute|hour|day|week|month|year)s?$/",cliffDuration:"The duration of the cliff period. Must be less than or equal to the total duration. In readable date time format matching /^(\\d+(?:\\.\\d+)?) +(second|minute|hour|day|week|month|year)s?$/",schedule:"A vesting schedule implementation, tokens can either be vested gradually following a linear curve or with custom vesting schedule that requires the implementation of the VestingSchedule trait."},zv.cairoAccountDescriptions={type:"Type of signature used for signature checking by the Account contract, Starknet account uses the STARK curve, Ethereum-flavored account uses the Secp256k1 curve.",declare:"Whether to enable the account to declare other contract classes.",deploy:"Whether to enables the account to be counterfactually deployed.",pubkey:"Whether to enables the account to change its own public key.",outsideExecution:"Whether to allow a protocol to submit transactions on behalf of the account, as long as it has the relevant signatures."},zv.cairoMultisigDescriptions={quorum:"The minimal number of confirmations required by the Multisig to approve a transaction."}),zv),Bv),Wv((Cv||(Cv=1,Object.defineProperty(Ov,"__esModule",{value:!0}),Ov.infoDescriptions=Ov.commonDescriptions=void 0,Ov.commonDescriptions={name:"The name of the contract",symbol:"The short symbol for the token",burnable:"Whether token holders will be able to destroy their tokens",pausable:"Whether privileged accounts will be able to pause specifically marked functionality. Useful for emergency response.",mintable:"Whether privileged accounts will be able to create more supply or emit more tokens"},Ov.infoDescriptions={info:"Metadata about the contract and author",securityContact:"Email where people can contact you to report security issues. Will only be visible if contract source code is verified.",license:'The license used by the contract, default is "MIT"'}),Ov),Bv),Wv((Uv||(Uv=1,Object.defineProperty(Av,"__esModule",{value:!0}),Av.confidentialERC7984Descriptions=Av.confidentialPrompts=void 0,Av.confidentialPrompts={ERC7984:"Make a confidential fungible token in Solidity according to the ERC-7984 standard, similar to ERC-20 but with confidentiality."},Av.confidentialERC7984Descriptions={contractURI:"The metadata URI for the token. Should follow the schema defined in [ERC-7572](https://eips.ethereum.org/EIPS/eip-7572).",decimals:"The number of decimals used to represent token amounts. Defaults to 6, with a maximum of 10, since confidential token amounts are represented as uint64 and higher decimals would make the maximum total supply too limited. Incompatible with wrappable, which derives its decimals from the underlying token (capped at 6).",premint:"The number of tokens to premint for the deployer. Cannot be used with wrappable, since preminted tokens would not be backed by the underlying token.",networkConfig:"Specify the provider and network configuration to use for FHEVM contracts.",wrappable:"Whether to allow wrapping an ERC20 token into a confidential fungible token. Derives its decimals from the underlying token (capped at 6), so it cannot be used with custom decimals. Cannot be used with premint, since preminted tokens would not be backed by the underlying token.",votes:"Whether to keep track of historical balances for voting in on-chain governance. Voting durations must be expressed as block numbers or timestamps."}),Av),Bv),Wv(function(){if(Nv)return Dv;Nv=1,Object.defineProperty(Dv,"__esModule",{value:!0}),Dv.solidityGovernorDescriptions=Dv.solidityAccountDescriptions=Dv.solidityStablecoinDescriptions=Dv.solidityERC1155Descriptions=Dv.solidityERC721Descriptions=Dv.solidityERC20Descriptions=Dv.solidityCommonDescriptions=Dv.solidityPrompts=void 0,Dv.solidityPrompts={ERC20:"Make a fungible token per the ERC-20 standard.",ERC721:"Make a non-fungible token per the ERC-721 standard.",ERC1155:"Make a non-fungible token per the ERC-1155 standard.",Stablecoin:"Make a stablecoin token that uses the ERC-20 standard. Experimental, some features are not audited and are subject to change.",RWA:"Make a real-world asset token that uses the ERC-20 standard. Experimental, some features are not audited and are subject to change.",Account:"Make an account contract that follows the ERC-4337 standard.",Governor:"Make a contract to implement governance, such as for a DAO.",Custom:"Make a custom smart contract."};const e='Whether to allow replacing a crosschain link that has already been registered. Only used if crossChainBridging is set to "erc7786native".';return Dv.solidityCommonDescriptions={access:"The type of access control to provision. Ownable is a simple mechanism with a single account authorized for all privileged actions. Roles is a flexible mechanism with a separate role for each privileged action. A role can have many authorized accounts. Managed enables a central contract to define a policy that allows certain callers to access certain functions.",upgradeable:"Whether the smart contract is upgradeable. Transparent uses more complex proxy with higher overhead, requires less changes in your contract. Can also be used with beacons. UUPS uses simpler proxy with less overhead, requires including extra code in your contract. Allows flexibility for authorizing upgrades.",namespacePrefix:'The prefix for ERC-7201 namespace identifiers. It should be derived from the project name or a unique naming convention specific to the project. Used only if the contract includes storage variables and upgradeability is enabled. Default is "myProject".'},Dv.solidityERC20Descriptions={decimals:"The number of decimals used to represent token amounts. Defaults to 18.",premint:"The number of tokens to premint for the deployer.",permit:"Whether without paying gas, token holders will be able to allow third parties to transfer from their account.",votes:"Whether to keep track of historical balances for voting in on-chain governance. Voting durations can be expressed as block numbers or timestamps.",flashmint:"Whether to include built-in flash loans to allow lending tokens without requiring collateral as long as they're returned in the same transaction.",crossChainBridging:"Whether to allow authorized bridge contracts to mint and burn tokens for crosschain transfers. Options are to use custom bridges on any chain, to embed an ERC-7786 based bridge directly in the token contract, or to use the SuperchainERC20 standard with the predeployed SuperchainTokenBridge. The SuperchainERC20 feature is only available on chains in the Superchain, and requires deploying your contract to the same address on every chain in the Superchain.",crossChainLinkAllowOverride:e,premintChainId:"The chain ID of the network on which to premint tokens.",callback:"Whether to include support for code execution after transfers and approvals on recipient contracts in a single transaction."},Dv.solidityERC721Descriptions={baseUri:"A base uri for the token",enumerable:"Whether to allow on-chain enumeration of all tokens or those owned by an account. Increases gas cost of transfers.",uriStorage:"Allows updating token URIs for individual token IDs",incremental:"Whether new tokens will be automatically assigned an incremental id",votes:"Whether to keep track of individual units for voting in on-chain governance. Voting durations can be expressed as block numbers or timestamps (defaulting to block number if not specified).",crossChainBridging:"Whether to embed an ERC-7786 based bridge directly in the token contract, making it natively crosschain. Crosschain transfers with registered counterparts burn the token on the source chain and mint it on the destination chain. If also using incremental token ids, mint only on a single chain and link counterparts without minting, otherwise colliding ids can strand bridged tokens.",crossChainLinkAllowOverride:e},Dv.solidityERC1155Descriptions={uri:"The location of the metadata for the token. Clients will replace any instance of {id} in this string with the tokenId.",supply:"Whether to keep track of total supply of tokens",updatableUri:"Whether privileged accounts will be able to set a new URI for all token types",crossChainBridging:"Whether to embed an ERC-7786 based bridge directly in the token contract, making it natively crosschain. Crosschain transfers with registered counterparts burn the tokens on the source chain and mint them on the destination chain.",crossChainLinkAllowOverride:e},Dv.solidityStablecoinDescriptions={freezable:"Whether authorized accounts can freeze and unfreeze accounts for regulatory or security purposes. This feature is experimental, not audited and is subject to change.",restrictions:"Whether to restrict certain users from transferring tokens, either via allowing or blocking them. This feature is experimental, not audited and is subject to change."},Dv.solidityAccountDescriptions={signatureValidation:"Whether to implement the ERC-1271 standard for validating signatures. This is useful for the account to verify signatures.",ERC721Holder:"Whether to implement the `onERC721Received` function to allow the account to receive ERC721 tokens.",ERC1155Holder:"Whether to implement the `onERC1155Received` function to allow the account to receive ERC1155 tokens.",signer:"Defines the signature verification algorithm used by the account to verify user operations. Options:\n - ECDSA: Standard Ethereum signature validation using secp256k1, validates signatures against a specified owner address\n - EIP7702: Special ECDSA validation using account's own address as signer, enables EOAs to delegate execution rights\n - Multisig: ERC-7913 multisignature requiring minimum number of signatures from authorized signers\n - MultisigWeighted: ERC-7913 weighted multisignature where signers have different voting weights\n - P256: NIST P-256 curve (secp256r1) validation for integration with Passkeys and HSMs\n - RSA: RSA PKCS#1 v1.5 signature validation (RFC8017) for PKI systems and HSMs\n - WebAuthn: Web Authentication (WebAuthn) assertion validation for integration with Passkeys and HSMs on top of P256",batchedExecution:"Whether to implement a minimal batching interface for the account to allow multiple operations to be executed in a single transaction following the ERC-7821 standard.",ERC7579Modules:"Whether to implement the ERC-7579 compatibility to enable functionality on the account with modules."},Dv.solidityGovernorDescriptions={delay:'The delay since proposal is created until voting starts, default is "1 day"',period:'The length of period during which people can cast their vote, default is "1 week"',blockTime:"The block time of the chain in seconds, default is 12",proposalThreshold:"Minimum number of votes an account must have to create a proposal, default is 0.",decimals:"The number of decimals to use for the contract, default is 18 for ERC20Votes and 0 for ERC721Votes (because it does not apply to ERC721Votes)",quorumMode:"The type of quorum mode to use",quorumPercent:"The percent required, in cases of quorumMode equals percent",quorumAbsolute:"The absolute quorum required, in cases of quorumMode equals absolute",votes:"The type of voting to use",clockMode:"The clock mode used by the voting token. For Governor, this must be chosen to match what the ERC20 or ERC721 voting token uses.",timelock:"The type of timelock to use",storage:"Enable storage of proposal details and enumerability of proposals",settings:"Allow governance to update voting settings (delay, period, proposal threshold)",crossChainExecution:"Whether passed proposals can relay execution to other chains through ERC-7786 gateways. Requires a CrosschainRemoteExecutor contract, controlled by this governor, deployed on each target chain. The gateway and executor are chosen per proposal as arguments to the relayCrosschain function."},Dv}(),Bv),Wv((jv||(jv=1,Object.defineProperty(Pv,"__esModule",{value:!0}),Pv.stellarGovernorDescriptions=Pv.stellarVaultDescriptions=Pv.stellarStablecoinDescriptions=Pv.stellarNonFungibleDescriptions=Pv.stellarFungibleDescriptions=Pv.stellarAccountDescriptions=Pv.stellarCommonDescriptions=Pv.stellarPrompts=void 0,Pv.stellarPrompts={Account:"Make a smart account contract that authorizes operations through configurable signers and policies, for example a multisig with passkey, Ed25519 and delegated signers.",Fungible:"Make a fungible token per the Fungible Token Standard, compatible with SEP-41, similar to ERC-20.",Governor:"Make a governor contract for on-chain governance using token-based voting.",NonFungible:"Make a non-fungible token per the Non-Fungible Token Standard, compatible with SEP-50, similar to ERC-721.",Stablecoin:"Make a stablecoin that uses Fungible Token Standard, compatible with SEP-41.",Vault:"Make a tokenized vault that issues Fungible Token shares for an underlying asset, similar to ERC-4626."},Pv.stellarCommonDescriptions={upgradeable:"Whether the contract can be upgraded.",access:"The type of access control to provision. Ownable is a simple mechanism with a single account authorized for all privileged actions. Roles is a flexible mechanism with a separate role for each privileged action. A role can have many authorized accounts.",explicitImplementations:"Whether the contract should use explicit trait implementations instead of using the default ones provided by the library."},Pv.stellarAccountDescriptions={delegatedSigners:"Whether the account accepts delegated signers, meaning Stellar addresses whose signatures the host verifies. Enabled by default.",ed25519Signers:"Whether the account accepts raw Ed25519 public keys, verified by an Ed25519 verifier contract supplied at deployment.",webauthnSigners:"Whether the account accepts WebAuthn (passkey) keys, verified by a WebAuthn verifier contract supplied at deployment.",policy:"How authorization is decided. False requires every configured signer to sign (n-of-n). Simple threshold requires any m of the n signers (a standard multisig). Weighted threshold gives each signer a weight and requires the authorized weights to reach a threshold. Both threshold policies need the address of a deployed policy contract at deployment.",executionEntryPoint:"Whether the account can call other contracts on its own behalf. Needed to manage contracts the account owns, such as its own policies, and enabled by default.",upgradeable:"Whether the account can be upgraded. The upgrade is authorized by the account itself through its context rules, not by an access control role."},Pv.stellarFungibleDescriptions={decimals:"The number of decimals used to represent token amounts. Defaults to 7.",premint:"The number of tokens to premint for the deployer.",votes:"Whether to enable vote checkpoints and delegation for governance."},Pv.stellarNonFungibleDescriptions={enumerable:"Whether the NFTs are enumerable (can be iterated over).",consecutive:"To batch mint NFTs instead of minting them individually (sequential minting is mandatory).",sequential:"Whether the IDs of the minted NFTs will be sequential.",tokenUri:"The metadata URI returned by the token contract for every NFT.",votes:"Whether to enable vote checkpoints and delegation for governance."},Pv.stellarStablecoinDescriptions={limitations:"Whether to restrict certain users from transferring tokens, either via allowing or blocking them.",decimals:"The number of decimals used to represent token amounts. Defaults to 7.",premint:"The number of tokens to premint for the deployer.",votes:"Whether to enable vote checkpoints and delegation for governance."},Pv.stellarVaultDescriptions={decimalsOffset:"Virtual decimals offset added to the underlying asset decimals to derive the vault share decimals, used to mitigate inflation (donation) attacks via virtual shares. The default of 0 is already safe: it makes such attacks non-profitable. Higher values make attacks orders of magnitude more costly, at the cost of virtual shares absorbing a tiny portion of the value accrued to the vault. Must be between 0 and 10."},Pv.stellarGovernorDescriptions={version:"The semantic version label returned by the governor contract.",votingDelay:"Number of ledgers between proposal creation and voting start (17,000 ledgers are approx. 1 day).",votingPeriod:"Number of ledgers during which voting remains open (120,000 ledgers are approx. 1 week).",proposalThreshold:"Minimum voting power required for creating a proposal, default is 100.",quorum:"Minimum number of votes required for a proposal to pass, default is 500.",timelock:"Whether to add a timelock mechanism that enforces a delay between proposal queuing and execution."}),Pv),Bv),Wv((Zv||(Zv=1,Object.defineProperty(Rv,"__esModule",{value:!0}),Rv.stylusERC1155Descriptions=Rv.stylusERC721Descriptions=Rv.stylusERC20Descriptions=Rv.stylusPrompts=void 0,Rv.stylusPrompts={ERC20:"Make a fungible token per the ERC-20 standard.",ERC721:"Make a non-fungible token per the ERC-721 standard.",ERC1155:"Make a non-fungible token per the ERC-1155 standard."},Rv.stylusERC20Descriptions={permit:"Whether without paying gas, token holders will be able to allow third parties to transfer from their account.",flashmint:"Whether to include built-in flash loans to allow lending tokens without requiring collateral as long as they're returned in the same transaction."},Rv.stylusERC721Descriptions={enumerable:"Whether to allow on-chain enumeration of all tokens or those owned by an account. Increases gas cost of transfers."},Rv.stylusERC1155Descriptions={supply:"Whether to keep track of total supply of tokens"}),Rv),Bv),Wv(function(){return qv||(qv=1,e=Mv,Object.defineProperty(e,"__esModule",{value:!0}),e.uniswapHooksInputsDescriptions=e.uniswapHooksPermissionDescriptions=e.uniswapHooksDescriptions=e.uniswapHooksSharesDescriptions=e.uniswapHooksPrompts=e.byHooksDescriptions=void 0,e.byHooksDescriptions={BaseHook:"Base hook implementation that defines all hook entry points, security and permission helpers. Based on the Uniswap v4 periphery implementation. Hook entry points must be overridden and implemented by the inheriting hook to be used, with respective flags set in getHookPermissions.",BaseAsyncSwap:"Base implementation for async swaps that skip the v3-like swap implementation by taking the full swap input amount and returning a delta that nets out the specified amount to 0. Allows developers to implement arbitrary logic for executing swaps, including asynchronous swaps and custom swap-ordering. Mints ERC-6909 claim tokens for the specified currency and amount.",BaseCustomAccounting:"Base implementation for custom accounting and hook-owned liquidity. Enables tokens to be deposited via the hook to allow control and flexibility over how liquidity is computed. The hook is the sole owner of the liquidity and manages fees over liquidity shares accordingly. Designed to work with a single pool key.",BaseCustomCurve:"Base implementation for custom curves that overrides the default v3-like concentrated liquidity implementation. During a swap, calls a function to get the amount of tokens to be sent to the receiver. The return delta is then consumed and applied by the PoolManager. Does not include fee or salt mechanisms by default.",BaseDynamicFee:"Base implementation to apply a dynamic fee via the PoolManager's updateDynamicLPFee function. Allows hooks to update LP fees dynamically based on external conditions. Includes a poke function that can be called by anyone to update the fee. Alternative names to refer to the hook: 'Dynamic pool fee'.",BaseOverrideFee:"Base implementation for automatic dynamic fees applied before swaps. Allows hooks to override the pool's fee before a swap is processed using the override fee flag. The fee is calculated dynamically and applied to the swap. Alternative names to refer to the hook: 'Dynamic swap fee'.",BaseDynamicAfterFee:"Base implementation for dynamic target hook fees applied after swaps. Enforces a dynamic target for the unspecified currency during beforeSwap, where if the swap outcome is better than the target, any positive difference is taken as a hook fee. Fees are handled or distributed by the hook via afterSwapHandler. Alternative names to refer to the hook: 'Swap target enforcer'.",BaseHookFee:"Base implementation for applying hook fees to the unspecified currency of the swap. These fees are independent of the pool's LP fee and are charged as a percentage of the output amount after the swap completes. Fees are taken as ERC-6909 claims.",AntiSandwichHook:"Implements sandwich-resistant AMM design that guarantees no swaps get filled at a price better than the price at the beginning of the slot window. Within a slot window, swaps impact the pool asymmetrically for buys and sells. Only protects swaps in the zeroForOne direction. Alternative names to refer to the hook: 'Sandwich resistance'.",LiquidityPenaltyHook:"Just-in-Time (JIT) liquidity provisioning resistant hook that disincentivizes JIT attacks by penalizing LP fee collection during liquidity removal and disabling it during liquidity addition if liquidity was recently added. The penalty is donated to the pool's liquidity providers in range at the time of removal. Alternative names to refer to the hook: 'JIT liquidity resistance'.",LimitOrderHook:"Limit Order Mechanism hook that allows users to place limit orders at specific ticks outside of the current price range. Orders will be filled if the pool's price crosses the order's tick. Orders can be cancelled at any time until filled. Once completely filled, the resulting liquidity can be withdrawn from the pool.",ReHypothecationHook:"A Uniswap V4 hook that enables rehypothecation of liquidity positions. Allows users to deposit assets into yield-generating sources while providing liquidity to Uniswap pools Just-in-Time during swaps. Assets earn yield when idle and are temporarily injected as pool liquidity only when needed for swap execution, then immediately withdrawn back to yield sources. Users receive ERC20 shares representing their rehypothecated position. Alternative names to refer to the hook: 'Liquidity rehypothecation'.",BaseOracleHook:"A hook that enables a Uniswap V4 pool to record price observations and expose an oracle interface. Records cumulative tick values and provides time-weighted average price data. Allows increasing observation cardinality to store more historical price data. Provides observe function to get cumulative tick values for specified time periods.",OracleHookWithV3Adapters:"A hook that enables a Uniswap V4 pool to record price observations and expose an oracle interface with Uniswap V3-compatible adapters. Extends BaseOracleHook by automatically deploying standard and truncated V3 oracle adapters for each pool, making the oracle data compatible with existing V3 oracle interfaces and tools."},e.uniswapHooksPrompts={Hooks:"Make a Uniswap v4 hook contract using the OpenZeppelin Uniswap Hooks library."},e.uniswapHooksSharesDescriptions={options:"The implementation used to represent position shares. Options include disabling shares or issuing ERC20, ERC6909, or ERC1155 tokens.",name:"The name of the share token when ERC20 shares are enabled.",symbol:"The symbol of the share token when ERC20 shares are enabled.",uri:"The metadata URI used when ERC1155 shares are enabled."},e.uniswapHooksDescriptions={hook:`The name of the Uniswap hook. Available hooks:\n${Object.entries(e.byHooksDescriptions).map(([e,t])=>` - ${e}: ${t}`).join("\n")}`,currencySettler:"Whether to include the CurrencySettler utility to settle pending deltas with the PoolManager during flash accounting.",safeCast:"Whether to include the SafeCast library for safe integer conversions when handling balances or fees.",transientStorage:"Whether to include the TransientSlot and SlotDerivation helpers for temporary state that clears at the end of the transaction.",shares:"Configuration for optional share tokens exposed by the hook.",permissions:"Toggle lifecycle permissions to enable specific core hook callbacks. Required permissions are enforced automatically.",inputs:"Hook-specific configuration inputs used by certain templates."},e.uniswapHooksPermissionDescriptions={beforeInitialize:"Whether to enable the `_beforeInitialize` callback to run before pools are initialized.",afterInitialize:"Whether to enable the `_afterInitialize` callback to react after pool initialization.",beforeAddLiquidity:"Whether to enable the `_beforeAddLiquidity` callback to validate or modify adds before liquidity is deposited.",afterAddLiquidity:"Whether to enable the `_afterAddLiquidity` callback to update accounting after liquidity is added.",beforeRemoveLiquidity:"Whether to enable the `_beforeRemoveLiquidity` callback to validate removals before liquidity is withdrawn.",afterRemoveLiquidity:"Whether to enable the `_afterRemoveLiquidity` callback to update accounting after liquidity is withdrawn.",beforeSwap:"Whether to enable the `_beforeSwap` callback to inspect and optionally modify swap parameters.",afterSwap:"Whether to enable the `_afterSwap` callback to perform post-swap accounting or logic.",beforeDonate:"Whether to enable the `_beforeDonate` callback to run before donations are processed.",afterDonate:"Whether to enable the `_afterDonate` callback to run after donations are processed.",beforeSwapReturnDelta:"Whether to allow `_beforeSwap` to return a `BeforeSwapDelta`, adjusting the assets that must be provided for the swap.",afterSwapReturnDelta:"Whether to allow `_afterSwap` to return an additional delta that adjusts the final swap settlement.",afterAddLiquidityReturnDelta:"Whether to allow `_afterAddLiquidity` to return a `BalanceDelta` that adjusts how liquidity addition balances are settled.",afterRemoveLiquidityReturnDelta:"Whether to allow `_afterRemoveLiquidity` to return a `BalanceDelta` that adjusts how liquidity removal balances are settled."},e.uniswapHooksInputsDescriptions={blockNumberOffset:"The number of blocks that must elapse after liquidity is added before it can be removed without penalties. Used by liquidity protection hooks.",maxAbsTickDelta:"The maximum absolute tick change that can be recorded per oracle observation. Lower values resist manipulation but lag during volatility."}),Mv;var e}(),Bv),Wv((Lv||(Lv=1,Object.defineProperty(Vv,"__esModule",{value:!0}),Vv.pickKeys=void 0,Vv.pickKeys=(e,t)=>Object.fromEntries(t.map(t=>[t,e[t]]))),Vv),Bv)),Tv);const Gv={name:"MyToken",symbol:"MTK",decimals:7..toString(),burnable:!1,votes:!1,pausable:!1,upgradeable:!1,premint:"0",mintable:!1,access:Vg.access,info:Vg.info,explicitImplementations:Vg.explicitImplementations};function Kv(e){return{...e,...Hg(e),decimals:e.decimals??Gv.decimals,burnable:e.burnable??Gv.burnable,votes:e.votes??Gv.votes,pausable:e.pausable??Gv.pausable,upgradeable:e.upgradeable??Gv.upgradeable,premint:e.premint||Gv.premint,mintable:e.mintable??Gv.mintable}}function Xv(e){return!0===e.mintable||!0===e.pausable||!0===e.upgradeable}function Yv(e){const t=new Zg(e.name),n=Kv(e),i=Pg(n.decimals,"decimals","u32");return function(e,t,n,i,r,o,a){e.addConstructorCode(`Base::set_metadata(e, ${i}, String::from_str(e, "${t}"), String::from_str(e, "${n}"));`),e.addUseClause("stellar_tokens::fungible","Base"),e.addUseClause("stellar_tokens::fungible","FungibleToken"),r&&(e.addUseClause("stellar_tokens::fungible","ContractOverrides"),e.addUseClause("stellar_governance::votes","Votes"),e.addUseClause("stellar_tokens::fungible","votes::FungibleVotes"));e.addUseClause("soroban_sdk","contract"),e.addUseClause("soroban_sdk","contractimpl"),e.addUseClause("soroban_sdk","String"),e.addUseClause("soroban_sdk","Symbol"),e.addUseClause("soroban_sdk","Env"),e.addUseClause("soroban_sdk","Address"),e.addUseClause("soroban_sdk","MuxedAddress"),e.addUseClause("soroban_sdk","Vec");const s={traitName:"FungibleToken",structName:e.name,tags:a?["contractimpl"]:["contractimpl(contracttrait)"],assocType:`type ContractType = ${r?"FungibleVotes":"Base"};`};e.addTraitImplBlock(s),a&&e.addTraitForEachFunctions(s,nb);o&&(e.addUseClause("stellar_macros","when_not_paused"),e.addTraitFunction(s,eb.transfer),e.addFunctionTag(eb.transfer,"when_not_paused",s),e.addTraitFunction(s,eb.transfer_from),e.addFunctionTag(eb.transfer_from,"when_not_paused",s));r&&e.addTraitImplBlock({traitName:"Votes",structName:e.name,tags:a?["contractimpl"]:["contractimpl(contracttrait)"],section:"Extensions"})}(t,Ng(n.name),Ng(n.symbol),i,n.votes,n.pausable,n.explicitImplementations),n.premint&&function(e,t,n,i){if(void 0!==t&&"0"!==t){if(!Qv.test(t))throw new Ag({premint:"Not a valid number"});const r=Pg(function(e,t){let n;const i=e.split(".");if(i.length>2)throw new Ag({premint:"Not a valid number"});{const e=i[0]??"";let r=i[1]??"";if(t>r.length)try{r+="0".repeat(t-r.length)}catch{throw new Ag({premint:"Decimals number too large"})}else if(t<r.length)throw new Ag({premint:"Too many decimals"});n=e.concat(r).replace(/^0+/,"")}0===n.length&&(n="0");return n}(t,Number(n)),"premint","u128");e.addConstructorArgument({name:"recipient",type:"Address"}),e.addConstructorCode(`${i?"FungibleVotes":"Base"}::mint(e, &recipient, ${r});`)}}(t,n.premint,i,n.votes),n.pausable&&xv(t,n.access,n.explicitImplementations),n.upgradeable&&Qg(t,n.access,n.explicitImplementations),n.burnable&&function(e,t,n,i){e.addUseClause("stellar_tokens::fungible","burnable::FungibleBurnable");const r={traitName:"FungibleBurnable",structName:e.name,tags:i?["contractimpl"]:["contractimpl(contracttrait)"],section:"Extensions"},o=t?tb.burn:eb.burn,a=t?tb.burn_from:eb.burn_from;n||t||i?(n&&e.addUseClause("stellar_macros","when_not_paused"),e.addTraitFunction(r,o),e.addTraitFunction(r,a),n&&(e.addFunctionTag(o,"when_not_paused",r),e.addFunctionTag(a,"when_not_paused",r))):e.addTraitImplBlock(r)}(t,n.votes,n.pausable,n.explicitImplementations),n.mintable&&function(e,t,n,i,r){const o=n?tb.mint:eb.mint,a=n?tb.mint_with_caller:eb.mint_with_caller;switch(t){case!1:break;case"ownable":e.addFreeFunction(o),Kg(e,void 0,o,t,void 0,r),i&&e.addFunctionTag(o,"when_not_paused");break;case"roles":e.addFreeFunction(a),Kg(e,void 0,a,t,{useMacro:!0,caller:"caller",role:"minter"},r),i&&e.addFunctionTag(a,"when_not_paused");break;default:throw new Error("Unknown value for `access`")}}(t,n.access,n.votes,n.pausable,n.explicitImplementations),Gg(t,n.access,n.explicitImplementations),Lg(t,n.info),t}const Qv=/^(\d*\.?\d*)$/;const eb=Wg({total_supply:{args:[{name:"e",type:"&Env"}],returns:"i128",code:["Self::ContractType::total_supply(e)"]},balance:{args:[{name:"e",type:"&Env"},{name:"account",type:"Address"}],returns:"i128",code:["Self::ContractType::balance(e, &account)"]},allowance:{args:[{name:"e",type:"&Env"},{name:"owner",type:"Address"},{name:"spender",type:"Address"}],returns:"i128",code:["Self::ContractType::allowance(e, &owner, &spender)"]},transfer:{args:[{name:"e",type:"&Env"},{name:"from",type:"Address"},{name:"to",type:"MuxedAddress"},{name:"amount",type:"i128"}],code:["Self::ContractType::transfer(e, &from, &to, amount)"]},transfer_from:{args:[{name:"e",type:"&Env"},{name:"spender",type:"Address"},{name:"from",type:"Address"},{name:"to",type:"Address"},{name:"amount",type:"i128"}],code:["Self::ContractType::transfer_from(e, &spender, &from, &to, amount)"]},approve:{args:[{name:"e",type:"&Env"},{name:"owner",type:"Address"},{name:"spender",type:"Address"},{name:"amount",type:"i128"},{name:"live_until_ledger",type:"u32"}],code:["Self::ContractType::approve(e, &owner, &spender, amount, live_until_ledger)"]},decimals:{args:[{name:"e",type:"&Env"}],returns:"u32",code:["Self::ContractType::decimals(e)"]},name:{args:[{name:"e",type:"&Env"}],returns:"String",code:["Self::ContractType::name(e)"]},symbol:{args:[{name:"e",type:"&Env"}],returns:"String",code:["Self::ContractType::symbol(e)"]},burn:{args:[{name:"e",type:"&Env"},{name:"from",type:"Address"},{name:"amount",type:"i128"}],code:["Base::burn(e, &from, amount)"]},burn_from:{args:[{name:"e",type:"&Env"},{name:"spender",type:"Address"},{name:"from",type:"Address"},{name:"amount",type:"i128"}],code:["Base::burn_from(e, &spender, &from, amount)"]},mint:{args:[{name:"e",type:"&Env"},{name:"account",type:"Address"},{name:"amount",type:"i128"}],code:["Base::mint(e, &account, amount);"]},mint_with_caller:{name:"mint",args:[{name:"e",type:"&Env"},{name:"account",type:"Address"},{name:"amount",type:"i128"},{name:"caller",type:"Address"}],code:["Base::mint(e, &account, amount);"]}}),tb=Wg({burn:{args:[{name:"e",type:"&Env"},{name:"from",type:"Address"},{name:"amount",type:"i128"}],code:["FungibleVotes::burn(e, &from, amount)"]},burn_from:{args:[{name:"e",type:"&Env"},{name:"spender",type:"Address"},{name:"from",type:"Address"},{name:"amount",type:"i128"}],code:["FungibleVotes::burn_from(e, &spender, &from, amount)"]},mint:{args:[{name:"e",type:"&Env"},{name:"account",type:"Address"},{name:"amount",type:"i128"}],code:["FungibleVotes::mint(e, &account, amount);"]},mint_with_caller:{name:"mint",args:[{name:"e",type:"&Env"},{name:"account",type:"Address"},{name:"amount",type:"i128"},{name:"caller",type:"Address"}],code:["FungibleVotes::mint(e, &account, amount);"]}}),nb=Jv.pickKeys(eb,["total_supply","balance","allowance","transfer","transfer_from","approve","decimals","name","symbol"]),ib={name:"MyGovernor",version:"1.0.0",votingDelay:"17000",votingPeriod:"120000",proposalThreshold:"100",quorum:"500",upgradeable:!1,timelock:!1,access:Vg.access,info:Vg.info,explicitImplementations:Vg.explicitImplementations};function rb(e){const t=function(e){return{...e,...Hg(e),version:e.version??ib.version,votingDelay:e.votingDelay??ib.votingDelay,votingPeriod:e.votingPeriod??ib.votingPeriod,proposalThreshold:e.proposalThreshold??ib.proposalThreshold,quorum:e.quorum??ib.quorum,upgradeable:e.upgradeable??ib.upgradeable,timelock:e.timelock??ib.timelock}}(e),n=new Zg(t.name);return function(e,t,n,i,r,o,a,s,l){e.addUseClause("stellar_governance::governor","Governor"),e.addUseClause("stellar_governance::governor","ProposalState"),e.addUseClause("stellar_governance::governor","self",{alias:"governor"}),e.addUseClause("soroban_sdk","contract"),e.addUseClause("soroban_sdk","contractimpl"),e.addUseClause("soroban_sdk","Address"),e.addUseClause("soroban_sdk","BytesN"),e.addUseClause("soroban_sdk","Env"),e.addUseClause("soroban_sdk","String"),e.addUseClause("soroban_sdk","Symbol"),e.addUseClause("soroban_sdk","Val"),e.addUseClause("soroban_sdk","Vec"),e.addConstructorArgument({name:"token_contract",type:"Address"}),e.addConstructorCode(`governor::set_name(e, String::from_str(e, "${t}"));`),e.addConstructorCode(`governor::set_version(e, String::from_str(e, "${n}"));`),e.addConstructorCode(`governor::set_voting_delay(e, ${i});`),e.addConstructorCode(`governor::set_voting_period(e, ${r});`),e.addConstructorCode(`governor::set_proposal_threshold(e, ${o});`),e.addConstructorCode(`governor::set_quorum(e, ${a});`),e.addConstructorCode("governor::set_token_contract(e, &token_contract);");const c={traitName:"Governor",structName:e.name,tags:l?["contractimpl"]:["contractimpl(contracttrait)"]};s?function(e,t){e.addUseClause("soroban_sdk","contracttype"),e.addUseClause("soroban_sdk","IntoVal"),e.addUseClause("stellar_governance::timelock","TimelockClient"),e.addTopLevelDeclaration(["#[contracttype]","enum GovernorTimelockKey {"," Timelock,"," OperationID(BytesN<32>),","}"]),e.addConstructorArgument({name:"timelock_contract",type:"Address"}),e.addConstructorCode("e.storage().instance().set(&GovernorTimelockKey::Timelock, &timelock_contract);"),e.addFreeFunction(ab.timelock),e.addTraitFunction(t,sb.proposals_need_queuing),e.addTraitFunction(t,sb.queue),e.addTraitFunction(t,sb.execute),e.addTraitFunction(t,sb.cancel)}(e,c):(e.addTraitFunction(c,ob.execute),e.addTraitFunction(c,ob.cancel));l&&e.addTraitForEachFunctions(c,lb)}(n,Ng(t.name),Ng(t.version),Pg(t.votingDelay,"votingDelay","u32"),Pg(t.votingPeriod,"votingPeriod","u32"),Pg(t.proposalThreshold,"proposalThreshold","u128"),Pg(t.quorum,"quorum","u128"),t.timelock,t.explicitImplementations),t.upgradeable&&Qg(n,t.access,t.explicitImplementations),Gg(n,t.access,t.explicitImplementations),Lg(n,t.info),n}const ob=Wg({execute:{args:[{name:"e",type:"&Env"},{name:"targets",type:"Vec<Address>"},{name:"functions",type:"Vec<Symbol>"},{name:"args",type:"Vec<Vec<Val>>"},{name:"description_hash",type:"BytesN<32>"},{name:"executor",type:"Address"}],returns:"BytesN<32>",code:["executor.require_auth()","let proposal_id = governor::hash_proposal(e, &targets, &functions, &args, &description_hash)","let snapshot = governor::get_proposal_snapshot(e, &proposal_id)","let quorum = Self::quorum(e, snapshot)","governor::execute(e, targets, functions, args, &description_hash, Self::proposals_need_queuing(e), quorum)"]},cancel:{args:[{name:"e",type:"&Env"},{name:"targets",type:"Vec<Address>"},{name:"functions",type:"Vec<Symbol>"},{name:"args",type:"Vec<Vec<Val>>"},{name:"description_hash",type:"BytesN<32>"},{name:"operator",type:"Address"}],returns:"BytesN<32>",code:["let proposal_id = governor::hash_proposal(e, &targets, &functions, &args, &description_hash)","let proposer = governor::get_proposal_proposer(e, &proposal_id)","assert!(operator == proposer)","operator.require_auth()","governor::cancel(e, targets, functions, args, &description_hash)"]}}),ab=Wg({timelock:{args:[{name:"e",type:"&Env"}],returns:"Address",code:['e.storage().instance().get(&GovernorTimelockKey::Timelock).expect("timelock not set")']}}),sb=Wg({proposals_need_queuing:{args:[{name:"_e",type:"&Env"}],returns:"bool",code:["true"]},queue:{args:[{name:"e",type:"&Env"},{name:"targets",type:"Vec<Address>"},{name:"functions",type:"Vec<Symbol>"},{name:"args",type:"Vec<Vec<Val>>"},{name:"description_hash",type:"BytesN<32>"},{name:"eta",type:"u32"},{name:"_operator",type:"Address"}],returns:"BytesN<32>",code:["let proposal_id = governor::hash_proposal(e, &targets, &functions, &args, &description_hash)","let snapshot = governor::get_proposal_snapshot(e, &proposal_id)","let quorum = Self::quorum(e, snapshot)","let proposal_id = governor::queue(e, targets.clone(), functions.clone(), args.clone(), &description_hash, eta, quorum)","let timelock = Self::timelock(e)","let delay = eta.saturating_sub(e.ledger().sequence())","let execute_args: Vec<Val> = (targets, functions, args, description_hash.clone(), timelock.clone()).into_val(e)","let timelock_client = TimelockClient::new(e, &timelock)","let zero_predecessor = BytesN::from_array(e, &[0u8; 32])",'let op_id = timelock_client.schedule(&e.current_contract_address(), &Symbol::new(e, "execute"), &execute_args, &zero_predecessor, &description_hash, &delay, &e.current_contract_address())',"e.storage().persistent().set(&GovernorTimelockKey::OperationID(proposal_id.clone()), &op_id);","proposal_id"]},execute:{args:[{name:"e",type:"&Env"},{name:"targets",type:"Vec<Address>"},{name:"functions",type:"Vec<Symbol>"},{name:"args",type:"Vec<Vec<Val>>"},{name:"description_hash",type:"BytesN<32>"},{name:"executor",type:"Address"}],returns:"BytesN<32>",code:["let timelock = Self::timelock(e)","assert!(executor == timelock)","executor.require_auth()","let proposal_id = governor::hash_proposal(e, &targets, &functions, &args, &description_hash)","let snapshot = governor::get_proposal_snapshot(e, &proposal_id)","let quorum = Self::quorum(e, snapshot)","governor::execute(e, targets, functions, args, &description_hash, Self::proposals_need_queuing(e), quorum)"]},cancel:{args:[{name:"e",type:"&Env"},{name:"targets",type:"Vec<Address>"},{name:"functions",type:"Vec<Symbol>"},{name:"args",type:"Vec<Vec<Val>>"},{name:"description_hash",type:"BytesN<32>"},{name:"operator",type:"Address"}],returns:"BytesN<32>",code:["let proposal_id = governor::hash_proposal(e, &targets, &functions, &args, &description_hash)","let proposer = governor::get_proposal_proposer(e, &proposal_id)","assert!(operator == proposer)","operator.require_auth()","if let Some(op_id) = e.storage().persistent().get::<_, BytesN<32>>(&GovernorTimelockKey::OperationID(proposal_id)) {"," let timelock = Self::timelock(e);"," let timelock_client = TimelockClient::new(e, &timelock);"," timelock_client.cancel(&op_id, &e.current_contract_address());","}","governor::cancel(e, targets, functions, args, &description_hash)"]}}),lb=Wg({name:{args:[{name:"e",type:"&Env"}],returns:"String",code:["governor::get_name(e)"]},version:{args:[{name:"e",type:"&Env"}],returns:"String",code:["governor::get_version(e)"]},voting_delay:{args:[{name:"e",type:"&Env"}],returns:"u32",code:["governor::get_voting_delay(e)"]},voting_period:{args:[{name:"e",type:"&Env"}],returns:"u32",code:["governor::get_voting_period(e)"]},proposal_threshold:{args:[{name:"e",type:"&Env"}],returns:"u128",code:["governor::get_proposal_threshold(e)"]},get_token_contract:{args:[{name:"e",type:"&Env"}],returns:"Address",code:["governor::get_token_contract(e)"]},counting_mode:{args:[{name:"e",type:"&Env"}],returns:"Symbol",code:["governor::counting_mode(e)"]},has_voted:{args:[{name:"e",type:"&Env"},{name:"proposal_id",type:"BytesN<32>"},{name:"account",type:"Address"}],returns:"bool",code:["governor::has_voted(e, &proposal_id, &account)"]},quorum:{args:[{name:"e",type:"&Env"},{name:"ledger",type:"u32"}],returns:"u128",code:["governor::get_quorum(e, ledger)"]},proposal_state:{args:[{name:"e",type:"&Env"},{name:"proposal_id",type:"BytesN<32>"}],returns:"ProposalState",code:["let snapshot = governor::get_proposal_snapshot(e, &proposal_id)","let quorum = Self::quorum(e, snapshot)","governor::get_proposal_state(e, &proposal_id, quorum)"]},proposal_snapshot:{args:[{name:"e",type:"&Env"},{name:"proposal_id",type:"BytesN<32>"}],returns:"u32",code:["governor::get_proposal_snapshot(e, &proposal_id)"]},proposal_deadline:{args:[{name:"e",type:"&Env"},{name:"proposal_id",type:"BytesN<32>"}],returns:"u32",code:["governor::get_proposal_deadline(e, &proposal_id)"]},proposal_proposer:{args:[{name:"e",type:"&Env"},{name:"proposal_id",type:"BytesN<32>"}],returns:"Address",code:["governor::get_proposal_proposer(e, &proposal_id)"]},get_proposal_id:{args:[{name:"e",type:"&Env"},{name:"targets",type:"Vec<Address>"},{name:"functions",type:"Vec<Symbol>"},{name:"args",type:"Vec<Vec<Val>>"},{name:"description_hash",type:"BytesN<32>"}],returns:"BytesN<32>",code:["governor::hash_proposal(e, &targets, &functions, &args, &description_hash)"]},propose:{args:[{name:"e",type:"&Env"},{name:"targets",type:"Vec<Address>"},{name:"functions",type:"Vec<Symbol>"},{name:"args",type:"Vec<Vec<Val>>"},{name:"description",type:"String"},{name:"proposer",type:"Address"}],returns:"BytesN<32>",code:["proposer.require_auth()","governor::propose(e, targets, functions, args, description, &proposer)"]},cast_vote:{args:[{name:"e",type:"&Env"},{name:"proposal_id",type:"BytesN<32>"},{name:"vote_type",type:"u32"},{name:"reason",type:"String"},{name:"voter",type:"Address"}],returns:"u128",code:["voter.require_auth()","let snapshot = governor::get_proposal_snapshot(e, &proposal_id)","let quorum = Self::quorum(e, snapshot)","governor::cast_vote(e, &proposal_id, vote_type, &reason, &voter, quorum)"]},queue:{args:[{name:"e",type:"&Env"},{name:"targets",type:"Vec<Address>"},{name:"functions",type:"Vec<Symbol>"},{name:"args",type:"Vec<Vec<Val>>"},{name:"description_hash",type:"BytesN<32>"},{name:"eta",type:"u32"},{name:"_operator",type:"Address"}],returns:"BytesN<32>",code:["if !Self::proposals_need_queuing(e) {"," soroban_sdk::panic_with_error!(e, governor::GovernorError::QueueNotEnabled);","}","let proposal_id = governor::hash_proposal(e, &targets, &functions, &args, &description_hash)","let snapshot = governor::get_proposal_snapshot(e, &proposal_id)","let quorum = Self::quorum(e, snapshot)","governor::queue(e, targets, functions, args, &description_hash, eta, quorum)"]},proposals_need_queuing:{args:[{name:"_e",type:"&Env"}],returns:"bool",code:["false"]}}),cb={name:"MyToken",symbol:"MTK",tokenUri:"https://www.mytoken.com",burnable:!1,votes:!1,enumerable:!1,consecutive:!1,pausable:!1,upgradeable:!1,mintable:!1,sequential:!1,access:Vg.access,info:Vg.info,explicitImplementations:Vg.explicitImplementations};function ub(e){const t=new Zg(e.name),n=function(e){return{...e,...Hg(e),tokenUri:e.tokenUri??cb.tokenUri,burnable:e.burnable??cb.burnable,votes:e.votes??cb.votes,consecutive:e.consecutive??cb.consecutive,enumerable:e.enumerable??cb.enumerable,pausable:e.pausable??cb.pausable,upgradeable:e.upgradeable??cb.upgradeable,mintable:e.mintable??cb.mintable,sequential:e.sequential??cb.sequential}}(e),i={};if(n.enumerable&&n.consecutive&&(i.enumerable="Enumerable cannot be used with Consecutive extension",i.consecutive="Consecutive cannot be used with Enumerable extension"),n.consecutive&&n.mintable&&(i.consecutive="Consecutive cannot be used with Mintable extension",i.mintable="Mintable cannot be used with Consecutive extension"),n.consecutive&&n.sequential&&(i.consecutive="Consecutive cannot be used with Sequential minting",i.sequential="Sequential minting cannot be used with Consecutive extension"),n.votes&&n.enumerable&&(i.votes="Votes extension cannot be used with Enumerable extension",i.enumerable="Enumerable extension cannot be used with Votes extension"),n.votes&&n.consecutive&&(i.votes="Votes extension cannot be used with Consecutive extension",i.consecutive="Consecutive extension cannot be used with Votes extension"),Object.keys(i).length>0)throw new Ag(i);return function(e,t,n,i,r,o,a){e.addConstructorCode(`let uri = String::from_str(e, "${i}");`),e.addConstructorCode(`let name = String::from_str(e, "${t}");`),e.addConstructorCode(`let symbol = String::from_str(e, "${n}");`),e.addConstructorCode("Base::set_metadata(e, uri, name, symbol);"),e.addUseClause("stellar_tokens::non_fungible","Base"),e.addUseClause("stellar_tokens::non_fungible","NonFungibleToken"),r&&(e.addUseClause("stellar_governance::votes","Votes"),e.addUseClause("stellar_tokens::non_fungible","votes::NonFungibleVotes"));a&&e.addUseClause("stellar_tokens::non_fungible","ContractOverrides");e.addUseClause("soroban_sdk","contract"),e.addUseClause("soroban_sdk","contractimpl"),e.addUseClause("soroban_sdk","String"),e.addUseClause("soroban_sdk","Env"),e.addUseClause("soroban_sdk","Address");const s={traitName:"NonFungibleToken",structName:e.name,tags:a?["contractimpl"]:["contractimpl(contracttrait)"],assocType:`type ContractType = ${r?"NonFungibleVotes":"Base"};`};e.addTraitImplBlock(s),a&&e.addTraitForEachFunctions(s,mb);o&&(e.addUseClause("stellar_macros","when_not_paused"),e.addTraitFunction(s,db.transfer),e.addFunctionTag(db.transfer,"when_not_paused",s),e.addFunctionTag(db.transfer_from,"when_not_paused",s),e.addTraitFunction(s,db.transfer_from));r&&e.addTraitImplBlock({traitName:"Votes",structName:e.name,tags:a?["contractimpl"]:["contractimpl(contracttrait)"],section:"Extensions"})}(t,Ng(n.name),Ng(n.symbol),Ng(n.tokenUri),n.votes,n.pausable,n.explicitImplementations),n.pausable&&xv(t,n.access,n.explicitImplementations),n.upgradeable&&Qg(t,n.access,n.explicitImplementations),n.burnable&&function(e,t,n){e.addUseClause("stellar_tokens::non_fungible","burnable::NonFungibleBurnable");const i={traitName:"NonFungibleBurnable",structName:e.name,tags:n?["contractimpl"]:["contractimpl(contracttrait)"],section:"Extensions"};t?(e.addUseClause("stellar_macros","when_not_paused"),e.addTraitFunction(i,fb.burn),e.addFunctionTag(fb.burn,"when_not_paused",i),e.addTraitFunction(i,fb.burn_from),e.addFunctionTag(fb.burn_from,"when_not_paused",i)):n?e.addTraitForEachFunctions(i,hb):e.addTraitImplBlock(i)}(t,n.pausable,n.explicitImplementations),n.enumerable&&function(e,t){e.addUseClause("stellar_tokens::non_fungible","enumerable::{NonFungibleEnumerable, Enumerable}");const n={traitName:"NonFungibleEnumerable",structName:e.name,tags:t?["contractimpl"]:["contractimpl(contracttrait)"],section:"Extensions"};t?e.addTraitForEachFunctions(n,vb):e.addTraitImplBlock(n);e.overrideAssocType("NonFungibleToken","type ContractType = Enumerable;")}(t,n.explicitImplementations),n.consecutive&&function(e,t,n,i){e.addUseClause("stellar_tokens::non_fungible","consecutive::{NonFungibleConsecutive, Consecutive}");const r=!1===n?Jg:n,o={traitName:"NonFungibleConsecutive",structName:e.name,tags:["contractimpl"],section:"Extensions"};e.addTraitImplBlock(o),e.overrideAssocType("NonFungibleToken","type ContractType = Consecutive;");const a="ownable"===r?bb.batch_mint:bb.batch_mint_with_caller;e.addFreeFunction(a),t&&e.addFunctionTag(a,"when_not_paused");Kg(e,void 0,a,r,{useMacro:!0,role:"minter",caller:"caller"},i)}(t,n.pausable,n.access,n.explicitImplementations),n.mintable&&function(e,t,n,i,r,o,a){const s={useMacro:!0,role:"minter",caller:"caller"},l=!1===o?Jg:o;let c;c=t?r?"ownable"===l?gb.sequential_mint:gb.sequential_mint_with_caller:"ownable"===l?gb.non_sequential_mint:gb.non_sequential_mint_with_caller:r?"ownable"===l?n?pb.sequential_mint:db.sequential_mint:n?pb.sequential_mint_with_caller:db.sequential_mint_with_caller:"ownable"===l?n?pb.mint:db.mint:n?pb.mint_with_caller:db.mint_with_caller;e.addFreeFunction(c),Kg(e,void 0,c,l,s,a),i&&e.addFunctionTag(c,"when_not_paused")}(t,n.enumerable,n.votes,n.pausable,n.sequential,n.access,n.explicitImplementations),Gg(t,n.access,n.explicitImplementations),Lg(t,n.info),t}const db=Wg({balance:{args:[{name:"e",type:"&Env"},{name:"owner",type:"Address"}],returns:"u32",code:["Self::ContractType::balance(e, &owner)"]},owner_of:{args:[{name:"e",type:"&Env"},{name:"token_id",type:"u32"}],returns:"Address",code:["Self::ContractType::owner_of(e, token_id)"]},transfer:{args:[{name:"e",type:"&Env"},{name:"from",type:"Address"},{name:"to",type:"Address"},{name:"token_id",type:"u32"}],code:["Self::ContractType::transfer(e, &from, &to, token_id);"]},transfer_from:{args:[{name:"e",type:"&Env"},{name:"spender",type:"Address"},{name:"from",type:"Address"},{name:"to",type:"Address"},{name:"token_id",type:"u32"}],code:["Self::ContractType::transfer_from(e, &spender, &from, &to, token_id);"]},approve:{args:[{name:"e",type:"&Env"},{name:"approver",type:"Address"},{name:"approved",type:"Address"},{name:"token_id",type:"u32"},{name:"live_until_ledger",type:"u32"}],code:["Self::ContractType::approve(e, &approver, &approved, token_id, live_until_ledger)"]},approve_for_all:{args:[{name:"e",type:"&Env"},{name:"owner",type:"Address"},{name:"operator",type:"Address"},{name:"live_until_ledger",type:"u32"}],code:["Self::ContractType::approve_for_all(e, &owner, &operator, live_until_ledger)"]},get_approved:{args:[{name:"e",type:"&Env"},{name:"token_id",type:"u32"}],returns:"Option<Address>",code:["Self::ContractType::get_approved(e, token_id)"]},is_approved_for_all:{args:[{name:"e",type:"&Env"},{name:"owner",type:"Address"},{name:"operator",type:"Address"}],returns:"bool",code:["Self::ContractType::is_approved_for_all(e, &owner, &operator)"]},name:{args:[{name:"e",type:"&Env"}],returns:"String",code:["Self::ContractType::name(e)"]},symbol:{args:[{name:"e",type:"&Env"}],returns:"String",code:["Self::ContractType::symbol(e)"]},token_uri:{args:[{name:"e",type:"&Env"},{name:"token_id",type:"u32"}],returns:"String",code:["Self::ContractType::token_uri(e, token_id)"]},mint:{args:[{name:"e",type:"&Env"},{name:"to",type:"Address"},{name:"token_id",type:"u32"}],code:["Base::mint(e, &to, token_id);"]},mint_with_caller:{name:"mint",args:[{name:"e",type:"&Env"},{name:"to",type:"Address"},{name:"token_id",type:"u32"},{name:"caller",type:"Address"}],code:["Base::mint(e, &to, token_id);"]},sequential_mint:{name:"mint",args:[{name:"e",type:"&Env"},{name:"to",type:"Address"}],code:["Base::sequential_mint(e, &to);"]},sequential_mint_with_caller:{name:"mint",args:[{name:"e",type:"&Env"},{name:"to",type:"Address"},{name:"caller",type:"Address"}],code:["Base::sequential_mint(e, &to);"]}}),pb=Wg({mint:{args:[{name:"e",type:"&Env"},{name:"to",type:"Address"},{name:"token_id",type:"u32"}],code:["NonFungibleVotes::mint(e, &to, token_id);"]},mint_with_caller:{name:"mint",args:[{name:"e",type:"&Env"},{name:"to",type:"Address"},{name:"token_id",type:"u32"},{name:"caller",type:"Address"}],code:["NonFungibleVotes::mint(e, &to, token_id);"]},sequential_mint:{name:"mint",args:[{name:"e",type:"&Env"},{name:"to",type:"Address"}],code:["NonFungibleVotes::sequential_mint(e, &to);"]},sequential_mint_with_caller:{name:"mint",args:[{name:"e",type:"&Env"},{name:"to",type:"Address"},{name:"caller",type:"Address"}],code:["NonFungibleVotes::sequential_mint(e, &to);"]}}),mb=Jv.pickKeys(db,["balance","owner_of","transfer","transfer_from","approve","approve_for_all","get_approved","is_approved_for_all","name","symbol","token_uri"]),fb=Wg({burn:{args:[{name:"e",type:"&Env"},{name:"from",type:"Address"},{name:"token_id",type:"u32"}],code:["Self::ContractType::burn(e, &from, token_id)"]},burn_from:{args:[{name:"e",type:"&Env"},{name:"spender",type:"Address"},{name:"from",type:"Address"},{name:"token_id",type:"u32"}],code:["Self::ContractType::burn_from(e, &spender, &from, token_id)"]}}),hb=Jv.pickKeys(fb,["burn","burn_from"]),gb=Wg({total_supply:{args:[{name:"e",type:"&Env"}],returns:"u32",code:["Enumerable::total_supply(e)"]},get_owner_token_id:{args:[{name:"e",type:"&Env"},{name:"owner",type:"Address"},{name:"index",type:"u32"}],returns:"u32",code:["Enumerable::get_owner_token_id(e, &owner, index)"]},get_token_id:{args:[{name:"e",type:"&Env"},{name:"index",type:"u32"}],returns:"u32",code:["Enumerable::get_token_id(e, index)"]},non_sequential_mint:{name:"mint",args:[{name:"e",type:"&Env"},{name:"to",type:"Address"},{name:"token_id",type:"u32"}],code:["Enumerable::non_sequential_mint(e, &to, token_id);"]},non_sequential_mint_with_caller:{name:"mint",args:[{name:"e",type:"&Env"},{name:"to",type:"Address"},{name:"token_id",type:"u32"},{name:"caller",type:"Address"}],code:["Enumerable::non_sequential_mint(e, &to, token_id);"]},sequential_mint:{name:"mint",args:[{name:"e",type:"&Env"},{name:"to",type:"Address"}],code:["Enumerable::sequential_mint(e, &to);"]},sequential_mint_with_caller:{name:"mint",args:[{name:"e",type:"&Env"},{name:"to",type:"Address"},{name:"caller",type:"Address"}],code:["Enumerable::sequential_mint(e, &to);"]}}),vb=Jv.pickKeys(gb,["total_supply","get_owner_token_id","get_token_id"]),bb=Wg({batch_mint:{name:"batch_mint",args:[{name:"e",type:"&Env"},{name:"to",type:"Address"},{name:"amount",type:"u32"}],returns:"u32",code:["Consecutive::batch_mint(e, &to, amount)"]},batch_mint_with_caller:{name:"batch_mint",args:[{name:"e",type:"&Env"},{name:"to",type:"Address"},{name:"amount",type:"u32"},{name:"caller",type:"Address"}],returns:"u32",code:["Consecutive::batch_mint(e, &to, amount)"]}}),yb={...Gv,name:"MyStablecoin",symbol:"MST",limitations:!1};function $b(e){const t=function(e){return{...Kv(e),name:e.name??yb.name,symbol:e.symbol??yb.symbol,limitations:e.limitations??yb.limitations}}(e);if(t.votes&&t.limitations)throw new Ag({votes:"Votes extension cannot be used with stablecoin limitations",limitations:"Stablecoin limitations cannot be used with Votes extension"});const n=Yv(t);return t.limitations&&function(e,t,n,i){const r="allowlist"===n,o={traitName:r?"FungibleAllowList":"FungibleBlockList",structName:e.name,tags:["contractimpl"],section:"Extensions"};r?(e.addUseClause("stellar_tokens::fungible","allowlist::{AllowList, FungibleAllowList}"),e.overrideAssocType("FungibleToken","type ContractType = AllowList;")):(e.addUseClause("stellar_tokens::fungible","blocklist::{BlockList, FungibleBlockList}"),e.overrideAssocType("FungibleToken","type ContractType = BlockList;"));i&&function(e){e.addUseClause("stellar_tokens::fungible","ContractOverrides");const t={traitName:"FungibleToken",structName:e.name,tags:[]},n=[[eb.total_supply,["Self::ContractType::total_supply(e)"]],[eb.balance,["Self::ContractType::balance(e, &account)"]],[eb.allowance,["Self::ContractType::allowance(e, &owner, &spender)"]],[eb.decimals,["Self::ContractType::decimals(e)"]],[eb.name,["Self::ContractType::name(e)"]],[eb.symbol,["Self::ContractType::symbol(e)"]]];for(const[i,r]of n)e.setFunctionCode(i,r,t)}(e);const[a,s,l]=r?[_b.allowed,_b.allow_user,_b.disallow_user]:[_b.blocked,_b.block_user,_b.unblock_user];e.addTraitFunction(o,a);const c={useMacro:!0,role:"manager",caller:"operator"};e.addTraitFunction(o,s),Kg(e,o,s,t,c,i),e.addTraitFunction(o,l),Kg(e,o,l,t,c,i)}(n,t.access,t.limitations,t.explicitImplementations),n}const _b={...eb,...Wg({allowed:{args:[{name:"e",type:"&Env"},{name:"account",type:"Address"}],returns:"bool",code:["AllowList::allowed(e, &account)"]},allow_user:{args:[{name:"e",type:"&Env"},{name:"user",type:"Address"},{name:"operator",type:"Address"}],code:["AllowList::allow_user(e, &user)"]},disallow_user:{args:[{name:"e",type:"&Env"},{name:"user",type:"Address"},{name:"operator",type:"Address"}],code:["AllowList::disallow_user(e, &user)"]},blocked:{args:[{name:"e",type:"&Env"},{name:"account",type:"Address"}],returns:"bool",code:["BlockList::blocked(e, &account)"]},block_user:{args:[{name:"e",type:"&Env"},{name:"user",type:"Address"},{name:"operator",type:"Address"}],code:["BlockList::block_user(e, &user)"]},unblock_user:{args:[{name:"e",type:"&Env"},{name:"user",type:"Address"},{name:"operator",type:"Address"}],code:["BlockList::unblock_user(e, &user)"]}})},kb={name:"MyVault",symbol:"MTK",decimalsOffset:"0",pausable:!1,upgradeable:!1,access:Vg.access,info:Vg.info,explicitImplementations:Vg.explicitImplementations};function wb(e){const t=new Zg(e.name),n=function(e){return{...e,...Hg(e),decimalsOffset:e.decimalsOffset??kb.decimalsOffset,pausable:e.pausable??kb.pausable,upgradeable:e.upgradeable??kb.upgradeable}}(e),i=Pg(n.decimalsOffset,"decimalsOffset","u32");if(i>10)throw new Ag({decimalsOffset:"Maximum decimals offset is 10"});return function(e,t,n,i,r,o){e.addConstructorArgument({name:"asset",type:"Address"}),e.addConstructorCode("Vault::set_asset(e, asset);"),e.addConstructorCode(`Vault::set_decimals_offset(e, ${i});`),e.addConstructorCode(`Base::set_metadata(e, Self::decimals(e), String::from_str(e, "${t}"), String::from_str(e, "${n}"));`),e.addUseClause("stellar_tokens::fungible","Base"),e.addUseClause("stellar_tokens::fungible","FungibleToken"),e.addUseClause("stellar_tokens::vault","FungibleVault"),e.addUseClause("stellar_tokens::vault","Vault"),(o||r)&&e.addUseClause("stellar_tokens::fungible","ContractOverrides");e.addUseClause("soroban_sdk","contract"),e.addUseClause("soroban_sdk","contractimpl"),e.addUseClause("soroban_sdk","String"),e.addUseClause("soroban_sdk","Env"),e.addUseClause("soroban_sdk","Address"),e.addUseClause("soroban_sdk","MuxedAddress");const a={traitName:"FungibleToken",structName:e.name,tags:o?["contractimpl"]:["contractimpl(contracttrait)"],assocType:"type ContractType = Vault;"};e.addTraitImplBlock(a),o?e.addTraitForEachFunctions(a,Sb):e.addTraitFunction(a,xb.decimals);r&&(e.addUseClause("stellar_macros","when_not_paused"),e.addTraitFunction(a,xb.transfer),e.addFunctionTag(xb.transfer,"when_not_paused",a),e.addTraitFunction(a,xb.transfer_from),e.addFunctionTag(xb.transfer_from,"when_not_paused",a));const s={traitName:"FungibleVault",structName:e.name,tags:o?["contractimpl"]:["contractimpl(contracttrait)"],section:"Extensions"};o?e.addTraitForEachFunctions(s,Ib):e.addTraitImplBlock(s)}(t,Ng(n.name),Ng(n.symbol),i,n.pausable,n.explicitImplementations),n.pausable&&xv(t,n.access,n.explicitImplementations),n.upgradeable&&Qg(t,n.access,n.explicitImplementations),Gg(t,n.access,n.explicitImplementations),"roles"===n.access&&(t.addUseClause("soroban_sdk","Symbol"),t.addUseClause("soroban_sdk","Vec")),Lg(t,n.info),t}const xb=Wg({total_supply:{args:[{name:"e",type:"&Env"}],returns:"i128",code:["Self::ContractType::total_supply(e)"]},balance:{args:[{name:"e",type:"&Env"},{name:"account",type:"Address"}],returns:"i128",code:["Self::ContractType::balance(e, &account)"]},allowance:{args:[{name:"e",type:"&Env"},{name:"owner",type:"Address"},{name:"spender",type:"Address"}],returns:"i128",code:["Self::ContractType::allowance(e, &owner, &spender)"]},transfer:{args:[{name:"e",type:"&Env"},{name:"from",type:"Address"},{name:"to",type:"MuxedAddress"},{name:"amount",type:"i128"}],code:["Self::ContractType::transfer(e, &from, &to, amount)"]},transfer_from:{args:[{name:"e",type:"&Env"},{name:"spender",type:"Address"},{name:"from",type:"Address"},{name:"to",type:"Address"},{name:"amount",type:"i128"}],code:["Self::ContractType::transfer_from(e, &spender, &from, &to, amount)"]},approve:{args:[{name:"e",type:"&Env"},{name:"owner",type:"Address"},{name:"spender",type:"Address"},{name:"amount",type:"i128"},{name:"live_until_ledger",type:"u32"}],code:["Self::ContractType::approve(e, &owner, &spender, amount, live_until_ledger)"]},decimals:{args:[{name:"e",type:"&Env"}],returns:"u32",code:["Vault::decimals(e)"]},name:{args:[{name:"e",type:"&Env"}],returns:"String",code:["Self::ContractType::name(e)"]},symbol:{args:[{name:"e",type:"&Env"}],returns:"String",code:["Self::ContractType::symbol(e)"]},query_asset:{args:[{name:"e",type:"&Env"}],returns:"Address",code:["Self::ContractType::query_asset(e)"]},total_assets:{args:[{name:"e",type:"&Env"}],returns:"i128",code:["Self::ContractType::total_assets(e)"]},convert_to_shares:{args:[{name:"e",type:"&Env"},{name:"assets",type:"i128"}],returns:"i128",code:["Self::ContractType::convert_to_shares(e, assets)"]},convert_to_assets:{args:[{name:"e",type:"&Env"},{name:"shares",type:"i128"}],returns:"i128",code:["Self::ContractType::convert_to_assets(e, shares)"]},max_deposit:{args:[{name:"e",type:"&Env"},{name:"receiver",type:"Address"}],returns:"i128",code:["Self::ContractType::max_deposit(e, receiver)"]},preview_deposit:{args:[{name:"e",type:"&Env"},{name:"assets",type:"i128"}],returns:"i128",code:["Self::ContractType::preview_deposit(e, assets)"]},deposit:{args:[{name:"e",type:"&Env"},{name:"assets",type:"i128"},{name:"receiver",type:"Address"},{name:"from",type:"Address"},{name:"operator",type:"Address"}],returns:"i128",code:["Self::ContractType::deposit(e, assets, receiver, from, operator)"]},max_mint:{args:[{name:"e",type:"&Env"},{name:"receiver",type:"Address"}],returns:"i128",code:["Self::ContractType::max_mint(e, receiver)"]},preview_mint:{args:[{name:"e",type:"&Env"},{name:"shares",type:"i128"}],returns:"i128",code:["Self::ContractType::preview_mint(e, shares)"]},mint:{args:[{name:"e",type:"&Env"},{name:"shares",type:"i128"},{name:"receiver",type:"Address"},{name:"from",type:"Address"},{name:"operator",type:"Address"}],returns:"i128",code:["Self::ContractType::mint(e, shares, receiver, from, operator)"]},max_withdraw:{args:[{name:"e",type:"&Env"},{name:"owner",type:"Address"}],returns:"i128",code:["Self::ContractType::max_withdraw(e, owner)"]},preview_withdraw:{args:[{name:"e",type:"&Env"},{name:"assets",type:"i128"}],returns:"i128",code:["Self::ContractType::preview_withdraw(e, assets)"]},withdraw:{args:[{name:"e",type:"&Env"},{name:"assets",type:"i128"},{name:"receiver",type:"Address"},{name:"owner",type:"Address"},{name:"operator",type:"Address"}],returns:"i128",code:["Self::ContractType::withdraw(e, assets, receiver, owner, operator)"]},max_redeem:{args:[{name:"e",type:"&Env"},{name:"owner",type:"Address"}],returns:"i128",code:["Self::ContractType::max_redeem(e, owner)"]},preview_redeem:{args:[{name:"e",type:"&Env"},{name:"shares",type:"i128"}],returns:"i128",code:["Self::ContractType::preview_redeem(e, shares)"]},redeem:{args:[{name:"e",type:"&Env"},{name:"shares",type:"i128"},{name:"receiver",type:"Address"},{name:"owner",type:"Address"},{name:"operator",type:"Address"}],returns:"i128",code:["Self::ContractType::redeem(e, shares, receiver, owner, operator)"]}}),Sb=Jv.pickKeys(xb,["total_supply","balance","allowance","transfer","transfer_from","approve","decimals","name","symbol"]),Ib=Jv.pickKeys(xb,["query_asset","total_assets","convert_to_shares","convert_to_assets","max_deposit","preview_deposit","deposit","max_mint","preview_mint","mint","max_withdraw","preview_withdraw","withdraw","max_redeem","preview_redeem","redeem"]);const Eb={defaults:yv},Tb={print:function(e=Gv){return sv(Yv(e))},defaults:Gv,isAccessControlRequired:Xv},zb={print:function(e=ib){return sv(rb(e))},defaults:ib,isAccessControlRequired:function(e){return!0===e.upgradeable}},Cb={print:function(e=cb){return sv(ub(e))},defaults:cb,isAccessControlRequired:function(e){return!0===e.mintable||!0===e.pausable||!0===e.upgradeable||!0===e.consecutive}},Ob={print:function(e=yb){return sv($b(e))},defaults:yb,isAccessControlRequired:function(e){return Xv(e)||!1!==e.limitations}},Ub={print:function(e=kb){return sv(wb(e))},defaults:kb,isAccessControlRequired:function(e){return!0===e.pausable||!0===e.upgradeable}};var Ab,Nb;function Db(){if(Nb)return Ab;function e(t){return t instanceof Map?t.clear=t.delete=t.set=function(){throw new Error("map is read-only")}:t instanceof Set&&(t.add=t.clear=t.delete=function(){throw new Error("set is read-only")}),Object.freeze(t),Object.getOwnPropertyNames(t).forEach(n=>{const i=t[n],r=typeof i;"object"!==r&&"function"!==r||Object.isFrozen(i)||e(i)}),t}Nb=1;class t{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function i(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t];return t.forEach(function(e){for(const t in e)n[t]=e[t]}),n}const r=e=>!!e.scope;class o{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=n(e)}openNode(e){if(!r(e))return;const t=((e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map((e,t)=>`${e}${"_".repeat(t+1)}`)].join(" ")}return`${t}${e}`})(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){r(e)&&(this.buffer+="</span>")}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const a=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class s{constructor(){this.rootNode=a(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t=a({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(t=>this._walk(e,t)),e.closeNode(t)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every(e=>"string"==typeof e)?e.children=[e.children.join("")]:e.children.forEach(e=>{s._collapse(e)}))}}class l extends s{constructor(e){super(),this.options=e}addText(e){""!==e&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){const n=e.root;t&&(n.scope=`language:${t}`),this.add(n)}toHTML(){return new o(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function c(e){return e?"string"==typeof e?e:e.source:null}function u(e){return m("(?=",e,")")}function d(e){return m("(?:",e,")*")}function p(e){return m("(?:",e,")?")}function m(...e){return e.map(e=>c(e)).join("")}function f(...e){const t=function(e){const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}(e);return"("+(t.capture?"":"?:")+e.map(e=>c(e)).join("|")+")"}function h(e){return new RegExp(e.toString()+"|").exec("").length-1}const g=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function v(e,{joinWith:t}){let n=0;return e.map(e=>{n+=1;const t=n;let i=c(e),r="";for(;i.length>0;){const e=g.exec(i);if(!e){r+=i;break}r+=i.substring(0,e.index),i=i.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?r+="\\"+String(Number(e[1])+t):(r+=e[0],"("===e[0]&&n++)}return r}).map(e=>`(${e})`).join(t)}const b="[a-zA-Z]\\w*",y="[a-zA-Z_]\\w*",$="\\b\\d+(\\.\\d+)?",_="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",k="\\b(0b[01]+)",w={begin:"\\\\[\\s\\S]",relevance:0},x={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[w]},S={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[w]},I=function(e,t,n={}){const r=i({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const o=f("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:m(/[ ]+/,"(",o,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},E=I("//","$"),T=I("/\\*","\\*/"),z=I("#","$"),C={scope:"number",begin:$,relevance:0},O={scope:"number",begin:_,relevance:0},U={scope:"number",begin:k,relevance:0},A={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[w,{begin:/\[/,end:/\]/,relevance:0,contains:[w]}]},N={scope:"title",begin:b,relevance:0},D={scope:"title",begin:y,relevance:0},j={begin:"\\.\\s*"+y,relevance:0};var P=Object.freeze({__proto__:null,APOS_STRING_MODE:x,BACKSLASH_ESCAPE:w,BINARY_NUMBER_MODE:U,BINARY_NUMBER_RE:k,COMMENT:I,C_BLOCK_COMMENT_MODE:T,C_LINE_COMMENT_MODE:E,C_NUMBER_MODE:O,C_NUMBER_RE:_,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})},HASH_COMMENT_MODE:z,IDENT_RE:b,MATCH_NOTHING_RE:/\b\B/,METHOD_GUARD:j,NUMBER_MODE:C,NUMBER_RE:$,PHRASAL_WORDS_MODE:{begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},QUOTE_STRING_MODE:S,REGEXP_MODE:A,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=m(t,/.*\b/,e.binary,/\b.*/)),i({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},TITLE_MODE:N,UNDERSCORE_IDENT_RE:y,UNDERSCORE_TITLE_MODE:D});function Z(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function R(e,t){void 0!==e.className&&(e.scope=e.className,delete e.className)}function q(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=Z,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function M(e,t){Array.isArray(e.illegal)&&(e.illegal=f(...e.illegal))}function L(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function F(e,t){void 0===e.relevance&&(e.relevance=1)}const V=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach(t=>{delete e[t]}),e.keywords=n.keywords,e.begin=m(n.beforeMatch,u(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},B=["of","and","for","in","not","or","if","then","parent","list","value"];function H(e,t,n="keyword"){const i=Object.create(null);return"string"==typeof e?r(n,e.split(" ")):Array.isArray(e)?r(n,e):Object.keys(e).forEach(function(n){Object.assign(i,H(e[n],t,n))}),i;function r(e,n){t&&(n=n.map(e=>e.toLowerCase())),n.forEach(function(t){const n=t.split("|");i[n[0]]=[e,W(n[0],n[1])]})}}function W(e,t){return t?Number(t):function(e){return B.includes(e.toLowerCase())}(e)?0:1}const J={},G=e=>{console.error(e)},K=(e,...t)=>{console.log(`WARN: ${e}`,...t)},X=(e,t)=>{J[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),J[`${e}/${t}`]=!0)},Y=new Error;function Q(e,t,{key:n}){let i=0;const r=e[n],o={},a={};for(let e=1;e<=t.length;e++)a[e+i]=r[e],o[e+i]=!0,i+=h(t[e-1]);e[n]=a,e[n]._emit=o,e[n]._multi=!0}function ee(e){!function(e){e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope,delete e.scope)}(e),"string"==typeof e.beginScope&&(e.beginScope={_wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope}),function(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw G("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Y;if("object"!=typeof e.beginScope||null===e.beginScope)throw G("beginScope must be object"),Y;Q(e,e.begin,{key:"beginScope"}),e.begin=v(e.begin,{joinWith:""})}}(e),function(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw G("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Y;if("object"!=typeof e.endScope||null===e.endScope)throw G("endScope must be object"),Y;Q(e,e.end,{key:"endScope"}),e.end=v(e.end,{joinWith:""})}}(e)}function te(e){function t(t,n){return new RegExp(c(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(n?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=h(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map(e=>e[1]);this.matcherRe=t(v(e,{joinWith:"|"}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const n=t.findIndex((e,t)=>t>0&&void 0!==e),i=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,i)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const t=new n;return this.rules.slice(e).forEach(([e,n])=>t.addRule(e,n)),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=i(e.classNameAliases||{}),function n(o,a){const s=o;if(o.isCompiled)return s;[R,L,ee,V].forEach(e=>e(o,a)),e.compilerExtensions.forEach(e=>e(o,a)),o.__beforeBegin=null,[q,M,F].forEach(e=>e(o,a)),o.isCompiled=!0;let l=null;return"object"==typeof o.keywords&&o.keywords.$pattern&&(o.keywords=Object.assign({},o.keywords),l=o.keywords.$pattern,delete o.keywords.$pattern),l=l||/\w+/,o.keywords&&(o.keywords=H(o.keywords,e.case_insensitive)),s.keywordPatternRe=t(l,!0),a&&(o.begin||(o.begin=/\B|\b/),s.beginRe=t(s.begin),o.end||o.endsWithParent||(o.end=/\B|\b/),o.end&&(s.endRe=t(s.end)),s.terminatorEnd=c(s.end)||"",o.endsWithParent&&a.terminatorEnd&&(s.terminatorEnd+=(o.end?"|":"")+a.terminatorEnd)),o.illegal&&(s.illegalRe=t(o.illegal)),o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map(function(e){return function(e){e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return i(e,{variants:null},t)}));if(e.cachedVariants)return e.cachedVariants;if(ne(e))return i(e,{starts:e.starts?i(e.starts):null});if(Object.isFrozen(e))return i(e);return e}("self"===e?o:e)})),o.contains.forEach(function(e){n(e,s)}),o.starts&&n(o.starts,a),s.matcher=function(e){const t=new r;return e.contains.forEach(e=>t.addRule(e.begin,{rule:e,type:"begin"})),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t}(s),s}(e)}function ne(e){return!!e&&(e.endsWithParent||ne(e.starts))}class ie extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const re=n,oe=i,ae=Symbol("nomatch"),se=function(n){const i=Object.create(null),r=Object.create(null),o=[];let a=!0;const s="Could not find the language '{}', did you forget to load/include a language module?",c={disableAutodetect:!0,name:"Plain text",contains:[]};let h={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:l};function g(e){return h.noHighlightRe.test(e)}function v(e,t,n){let i="",r="";"object"==typeof t?(i=e,n=t.ignoreIllegals,r=t.language):(X("10.7.0","highlight(lang, code, ...args) has been deprecated."),X("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),r=e,i=t),void 0===n&&(n=!0);const o={code:i,language:r};I("before:highlight",o);const a=o.result?o.result:b(o.language,o.code,n);return a.code=o.code,I("after:highlight",a),a}function b(e,n,r,o){const l=Object.create(null);function c(e,t){return e.keywords[t]}function u(){if(!E.keywords)return void z.addText(C);let e=0;E.keywordPatternRe.lastIndex=0;let t=E.keywordPatternRe.exec(C),n="";for(;t;){n+=C.substring(e,t.index);const i=x.case_insensitive?t[0].toLowerCase():t[0],r=c(E,i);if(r){const[e,o]=r;if(z.addText(n),n="",l[i]=(l[i]||0)+1,l[i]<=7&&(O+=o),e.startsWith("_"))n+=t[0];else{const n=x.classNameAliases[e]||e;p(t[0],n)}}else n+=t[0];e=E.keywordPatternRe.lastIndex,t=E.keywordPatternRe.exec(C)}n+=C.substring(e),z.addText(n)}function d(){null!=E.subLanguage?function(){if(""===C)return;let e=null;if("string"==typeof E.subLanguage){if(!i[E.subLanguage])return void z.addText(C);e=b(E.subLanguage,C,!0,T[E.subLanguage]),T[E.subLanguage]=e._top}else e=y(C,E.subLanguage.length?E.subLanguage:null);E.relevance>0&&(O+=e.relevance),z.__addSublanguage(e._emitter,e.language)}():u(),C=""}function p(e,t){""!==e&&(z.startScope(t),z.addText(e),z.endScope())}function m(e,t){let n=1;const i=t.length-1;for(;n<=i;){if(!e._emit[n]){n++;continue}const i=x.classNameAliases[e[n]]||e[n],r=t[n];i?p(r,i):(C=r,u(),C=""),n++}}function f(e,t){return e.scope&&"string"==typeof e.scope&&z.openNode(x.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(p(C,x.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),C=""):e.beginScope._multi&&(m(e.beginScope,t),C="")),E=Object.create(e,{parent:{value:E}}),E}function g(e,n,i){let r=function(e,t){const n=e&&e.exec(t);return n&&0===n.index}(e.endRe,i);if(r){if(e["on:end"]){const i=new t(e);e["on:end"](n,i),i.isMatchIgnored&&(r=!1)}if(r){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return g(e.parent,n,i)}function v(e){return 0===E.matcher.regexIndex?(C+=e[0],1):(N=!0,0)}function $(e){const t=e[0],i=n.substring(e.index),r=g(E,e,i);if(!r)return ae;const o=E;E.endScope&&E.endScope._wrap?(d(),p(t,E.endScope._wrap)):E.endScope&&E.endScope._multi?(d(),m(E.endScope,e)):o.skip?C+=t:(o.returnEnd||o.excludeEnd||(C+=t),d(),o.excludeEnd&&(C=t));do{E.scope&&z.closeNode(),E.skip||E.subLanguage||(O+=E.relevance),E=E.parent}while(E!==r.parent);return r.starts&&f(r.starts,e),o.returnEnd?0:t.length}let _={};function k(i,o){const s=o&&o[0];if(C+=i,null==s)return d(),0;if("begin"===_.type&&"end"===o.type&&_.index===o.index&&""===s){if(C+=n.slice(o.index,o.index+1),!a){const t=new Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=_.rule,t}return 1}if(_=o,"begin"===o.type)return function(e){const n=e[0],i=e.rule,r=new t(i),o=[i.__beforeBegin,i["on:begin"]];for(const t of o)if(t&&(t(e,r),r.isMatchIgnored))return v(n);return i.skip?C+=n:(i.excludeBegin&&(C+=n),d(),i.returnBegin||i.excludeBegin||(C=n)),f(i,e),i.returnBegin?0:n.length}(o);if("illegal"===o.type&&!r){const e=new Error('Illegal lexeme "'+s+'" for mode "'+(E.scope||"<unnamed>")+'"');throw e.mode=E,e}if("end"===o.type){const e=$(o);if(e!==ae)return e}if("illegal"===o.type&&""===s)return C+="\n",1;if(A>1e5&&A>3*o.index){throw new Error("potential infinite loop, way more iterations than matches")}return C+=s,s.length}const x=w(e);if(!x)throw G(s.replace("{}",e)),new Error('Unknown language: "'+e+'"');const S=te(x);let I="",E=o||S;const T={},z=new h.__emitter(h);!function(){const e=[];for(let t=E;t!==x;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach(e=>z.openNode(e))}();let C="",O=0,U=0,A=0,N=!1;try{if(x.__emitTokens)x.__emitTokens(n,z);else{for(E.matcher.considerAll();;){A++,N?N=!1:E.matcher.considerAll(),E.matcher.lastIndex=U;const e=E.matcher.exec(n);if(!e)break;const t=k(n.substring(U,e.index),e);U=e.index+t}k(n.substring(U))}return z.finalize(),I=z.toHTML(),{language:e,value:I,relevance:O,illegal:!1,_emitter:z,_top:E}}catch(t){if(t.message&&t.message.includes("Illegal"))return{language:e,value:re(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:U,context:n.slice(U-100,U+100),mode:t.mode,resultSoFar:I},_emitter:z};if(a)return{language:e,value:re(n),illegal:!1,relevance:0,errorRaised:t,_emitter:z,_top:E};throw t}}function y(e,t){t=t||h.languages||Object.keys(i);const n=function(e){const t={value:re(e),illegal:!1,relevance:0,_top:c,_emitter:new h.__emitter(h)};return t._emitter.addText(e),t}(e),r=t.filter(w).filter(S).map(t=>b(t,e,!1));r.unshift(n);const o=r.sort((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(w(e.language).supersetOf===t.language)return 1;if(w(t.language).supersetOf===e.language)return-1}return 0}),[a,s]=o,l=a;return l.secondBest=s,l}function $(e){let t=null;const n=function(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const n=h.languageDetectRe.exec(t);if(n){const t=w(n[1]);return t||(K(s.replace("{}",n[1])),K("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}return t.split(/\s+/).find(e=>g(e)||w(e))}(e);if(g(n))return;if(I("before:highlightElement",{el:e,language:n}),e.dataset.highlighted)return void console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",e);if(e.children.length>0&&(h.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(e)),h.throwUnescapedHTML)){throw new ie("One of your code blocks includes unescaped HTML.",e.innerHTML)}t=e;const i=t.textContent,o=n?v(i,{language:n,ignoreIllegals:!0}):y(i);e.innerHTML=o.value,e.dataset.highlighted="yes",function(e,t,n){const i=t&&r[t]||n;e.classList.add("hljs"),e.classList.add(`language-${i}`)}(e,n,o.language),e.result={language:o.language,re:o.relevance,relevance:o.relevance},o.secondBest&&(e.secondBest={language:o.secondBest.language,relevance:o.secondBest.relevance}),I("after:highlightElement",{el:e,result:o,text:i})}let _=!1;function k(){if("loading"===document.readyState)return _||window.addEventListener("DOMContentLoaded",function(){k()},!1),void(_=!0);document.querySelectorAll(h.cssSelector).forEach($)}function w(e){return e=(e||"").toLowerCase(),i[e]||i[r[e]]}function x(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach(e=>{r[e.toLowerCase()]=t})}function S(e){const t=w(e);return t&&!t.disableAutodetect}function I(e,t){const n=e;o.forEach(function(e){e[n]&&e[n](t)})}Object.assign(n,{highlight:v,highlightAuto:y,highlightAll:k,highlightElement:$,highlightBlock:function(e){return X("10.7.0","highlightBlock will be removed entirely in v12.0"),X("10.7.0","Please use highlightElement now."),$(e)},configure:function(e){h=oe(h,e)},initHighlighting:()=>{k(),X("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:function(){k(),X("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:function(e,t){let r=null;try{r=t(n)}catch(t){if(G("Language definition for '{}' could not be registered.".replace("{}",e)),!a)throw t;G(t),r=c}r.name||(r.name=e),i[e]=r,r.rawDefinition=t.bind(null,n),r.aliases&&x(r.aliases,{languageName:e})},unregisterLanguage:function(e){delete i[e];for(const t of Object.keys(r))r[t]===e&&delete r[t]},listLanguages:function(){return Object.keys(i)},getLanguage:w,registerAliases:x,autoDetection:S,inherit:oe,addPlugin:function(e){!function(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{e["before:highlightBlock"](Object.assign({block:t.el},t))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{e["after:highlightBlock"](Object.assign({block:t.el},t))})}(e),o.push(e)},removePlugin:function(e){const t=o.indexOf(e);-1!==t&&o.splice(t,1)}}),n.debugMode=function(){a=!1},n.safeMode=function(){a=!0},n.versionString="11.11.1",n.regex={concat:m,lookahead:u,either:f,optional:p,anyNumberOfTimes:d};for(const t in P)"object"==typeof P[t]&&e(P[t]);return Object.assign(n,P),n},le=se({});return le.newInstance=()=>se({}),Ab=le,le.HighlightJS=le,le.default=le,Ab}var jb=Iv(Db());jb.registerLanguage("rust",function(e){const t=e.regex,n=/(r#)?/,i=t.concat(n,e.UNDERSCORE_IDENT_RE),r=t.concat(n,e.IDENT_RE),o={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,r,t.lookahead(/\s*\(/))},a="([ui](8|16|32|64|128|size)|f(32|64))?",s=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],l=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:l,keyword:["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],literal:["true","false","Some","None","Ok","Err"],built_in:s},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+a},{begin:"\\b0o([0-7_]+)"+a},{begin:"\\b0x([A-Fa-f0-9_]+)"+a},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+a}],relevance:0},{begin:[/fn/,/\s+/,i],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,i],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,i,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,i],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,i],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:s,type:l}},{className:"punctuation",begin:"->"},o]}});const Pb={stellar_fungible:"tokens/fungible/src",stellar_non_fungible:"tokens/non-fungible/src",stellar_pausable:"utils/pausable/src",stellar_pausable_macros:"utils/pausable-macros/src",stellar_upgradeable:"utils/upgradeable/src",stellar_upgradeable_macros:"utils/upgradeable-macros/src"};var Zb="top",Rb="bottom",qb="right",Mb="left",Lb="auto",Fb=[Zb,Rb,qb,Mb],Vb="start",Bb="end",Hb="viewport",Wb="popper",Jb=Fb.reduce(function(e,t){return e.concat([t+"-"+Vb,t+"-"+Bb])},[]),Gb=[].concat(Fb,[Lb]).reduce(function(e,t){return e.concat([t,t+"-"+Vb,t+"-"+Bb])},[]),Kb=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Xb(e){return e?(e.nodeName||"").toLowerCase():null}function Yb(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Qb(e){return e instanceof Yb(e).Element||e instanceof Element}function ey(e){return e instanceof Yb(e).HTMLElement||e instanceof HTMLElement}function ty(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Yb(e).ShadowRoot||e instanceof ShadowRoot)}var ny={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},i=t.attributes[e]||{},r=t.elements[e];ey(r)&&Xb(r)&&(Object.assign(r.style,n),Object.keys(i).forEach(function(e){var t=i[e];!1===t?r.removeAttribute(e):r.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var i=t.elements[e],r=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]="",e},{});ey(i)&&Xb(i)&&(Object.assign(i.style,o),Object.keys(r).forEach(function(e){i.removeAttribute(e)}))})}},requires:["computeStyles"]};function iy(e){return e.split("-")[0]}var ry=Math.max,oy=Math.min,ay=Math.round;function sy(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function ly(){return!/^((?!chrome|android).)*safari/i.test(sy())}function cy(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var i=e.getBoundingClientRect(),r=1,o=1;t&&ey(e)&&(r=e.offsetWidth>0&&ay(i.width)/e.offsetWidth||1,o=e.offsetHeight>0&&ay(i.height)/e.offsetHeight||1);var a=(Qb(e)?Yb(e):window).visualViewport,s=!ly()&&n,l=(i.left+(s&&a?a.offsetLeft:0))/r,c=(i.top+(s&&a?a.offsetTop:0))/o,u=i.width/r,d=i.height/o;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l,x:l,y:c}}function uy(e){var t=cy(e),n=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:i}}function dy(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&ty(n)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function py(e){return Yb(e).getComputedStyle(e)}function my(e){return["table","td","th"].indexOf(Xb(e))>=0}function fy(e){return((Qb(e)?e.ownerDocument:e.document)||window.document).documentElement}function hy(e){return"html"===Xb(e)?e:e.assignedSlot||e.parentNode||(ty(e)?e.host:null)||fy(e)}function gy(e){return ey(e)&&"fixed"!==py(e).position?e.offsetParent:null}function vy(e){for(var t=Yb(e),n=gy(e);n&&my(n)&&"static"===py(n).position;)n=gy(n);return n&&("html"===Xb(n)||"body"===Xb(n)&&"static"===py(n).position)?t:n||function(e){var t=/firefox/i.test(sy());if(/Trident/i.test(sy())&&ey(e)&&"fixed"===py(e).position)return null;var n=hy(e);for(ty(n)&&(n=n.host);ey(n)&&["html","body"].indexOf(Xb(n))<0;){var i=py(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||t&&"filter"===i.willChange||t&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(e)||t}function by(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function yy(e,t,n){return ry(e,oy(t,n))}function $y(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function _y(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var ky={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,i=e.name,r=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=iy(n.placement),l=by(s),c=[Mb,qb].indexOf(s)>=0?"height":"width";if(o&&a){var u=function(e,t){return $y("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:_y(e,Fb))}(r.padding,n),d=uy(o),p="y"===l?Zb:Mb,m="y"===l?Rb:qb,f=n.rects.reference[c]+n.rects.reference[l]-a[l]-n.rects.popper[c],h=a[l]-n.rects.reference[l],g=vy(o),v=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,b=f/2-h/2,y=u[p],$=v-d[c]-u[m],_=v/2-d[c]/2+b,k=yy(y,_,$),w=l;n.modifiersData[i]=((t={})[w]=k,t.centerOffset=k-_,t)}},effect:function(e){var t=e.state,n=e.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=t.elements.popper.querySelector(i)))&&dy(t.elements.popper,i)&&(t.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function wy(e){return e.split("-")[1]}var xy={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Sy(e){var t,n=e.popper,i=e.popperRect,r=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,p=a.x,m=void 0===p?0:p,f=a.y,h=void 0===f?0:f,g="function"==typeof u?u({x:m,y:h}):{x:m,y:h};m=g.x,h=g.y;var v=a.hasOwnProperty("x"),b=a.hasOwnProperty("y"),y=Mb,$=Zb,_=window;if(c){var k=vy(n),w="clientHeight",x="clientWidth";if(k===Yb(n)&&"static"!==py(k=fy(n)).position&&"absolute"===s&&(w="scrollHeight",x="scrollWidth"),r===Zb||(r===Mb||r===qb)&&o===Bb)$=Rb,h-=(d&&k===_&&_.visualViewport?_.visualViewport.height:k[w])-i.height,h*=l?1:-1;if(r===Mb||(r===Zb||r===Rb)&&o===Bb)y=qb,m-=(d&&k===_&&_.visualViewport?_.visualViewport.width:k[x])-i.width,m*=l?1:-1}var S,I=Object.assign({position:s},c&&xy),E=!0===u?function(e,t){var n=e.x,i=e.y,r=t.devicePixelRatio||1;return{x:ay(n*r)/r||0,y:ay(i*r)/r||0}}({x:m,y:h},Yb(n)):{x:m,y:h};return m=E.x,h=E.y,l?Object.assign({},I,((S={})[$]=b?"0":"",S[y]=v?"0":"",S.transform=(_.devicePixelRatio||1)<=1?"translate("+m+"px, "+h+"px)":"translate3d("+m+"px, "+h+"px, 0)",S)):Object.assign({},I,((t={})[$]=b?h+"px":"",t[y]=v?m+"px":"",t.transform="",t))}var Iy={passive:!0};var Ey={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,i=e.options,r=i.scroll,o=void 0===r||r,a=i.resize,s=void 0===a||a,l=Yb(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(e){e.addEventListener("scroll",n.update,Iy)}),s&&l.addEventListener("resize",n.update,Iy),function(){o&&c.forEach(function(e){e.removeEventListener("scroll",n.update,Iy)}),s&&l.removeEventListener("resize",n.update,Iy)}},data:{}},Ty={left:"right",right:"left",bottom:"top",top:"bottom"};function zy(e){return e.replace(/left|right|bottom|top/g,function(e){return Ty[e]})}var Cy={start:"end",end:"start"};function Oy(e){return e.replace(/start|end/g,function(e){return Cy[e]})}function Uy(e){var t=Yb(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Ay(e){return cy(fy(e)).left+Uy(e).scrollLeft}function Ny(e){var t=py(e),n=t.overflow,i=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+i)}function Dy(e){return["html","body","#document"].indexOf(Xb(e))>=0?e.ownerDocument.body:ey(e)&&Ny(e)?e:Dy(hy(e))}function jy(e,t){var n;void 0===t&&(t=[]);var i=Dy(e),r=i===(null==(n=e.ownerDocument)?void 0:n.body),o=Yb(i),a=r?[o].concat(o.visualViewport||[],Ny(i)?i:[]):i,s=t.concat(a);return r?s:s.concat(jy(hy(a)))}function Py(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Zy(e,t,n){return t===Hb?Py(function(e,t){var n=Yb(e),i=fy(e),r=n.visualViewport,o=i.clientWidth,a=i.clientHeight,s=0,l=0;if(r){o=r.width,a=r.height;var c=ly();(c||!c&&"fixed"===t)&&(s=r.offsetLeft,l=r.offsetTop)}return{width:o,height:a,x:s+Ay(e),y:l}}(e,n)):Qb(t)?function(e,t){var n=cy(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):Py(function(e){var t,n=fy(e),i=Uy(e),r=null==(t=e.ownerDocument)?void 0:t.body,o=ry(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=ry(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),s=-i.scrollLeft+Ay(e),l=-i.scrollTop;return"rtl"===py(r||n).direction&&(s+=ry(n.clientWidth,r?r.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}(fy(e)))}function Ry(e,t,n,i){var r="clippingParents"===t?function(e){var t=jy(hy(e)),n=["absolute","fixed"].indexOf(py(e).position)>=0&&ey(e)?vy(e):e;return Qb(n)?t.filter(function(e){return Qb(e)&&dy(e,n)&&"body"!==Xb(e)}):[]}(e):[].concat(t),o=[].concat(r,[n]),a=o[0],s=o.reduce(function(t,n){var r=Zy(e,n,i);return t.top=ry(r.top,t.top),t.right=oy(r.right,t.right),t.bottom=oy(r.bottom,t.bottom),t.left=ry(r.left,t.left),t},Zy(e,a,i));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function qy(e){var t,n=e.reference,i=e.element,r=e.placement,o=r?iy(r):null,a=r?wy(r):null,s=n.x+n.width/2-i.width/2,l=n.y+n.height/2-i.height/2;switch(o){case Zb:t={x:s,y:n.y-i.height};break;case Rb:t={x:s,y:n.y+n.height};break;case qb:t={x:n.x+n.width,y:l};break;case Mb:t={x:n.x-i.width,y:l};break;default:t={x:n.x,y:n.y}}var c=o?by(o):null;if(null!=c){var u="y"===c?"height":"width";switch(a){case Vb:t[c]=t[c]-(n[u]/2-i[u]/2);break;case Bb:t[c]=t[c]+(n[u]/2-i[u]/2)}}return t}function My(e,t){void 0===t&&(t={});var n=t,i=n.placement,r=void 0===i?e.placement:i,o=n.strategy,a=void 0===o?e.strategy:o,s=n.boundary,l=void 0===s?"clippingParents":s,c=n.rootBoundary,u=void 0===c?Hb:c,d=n.elementContext,p=void 0===d?Wb:d,m=n.altBoundary,f=void 0!==m&&m,h=n.padding,g=void 0===h?0:h,v=$y("number"!=typeof g?g:_y(g,Fb)),b=p===Wb?"reference":Wb,y=e.rects.popper,$=e.elements[f?b:p],_=Ry(Qb($)?$:$.contextElement||fy(e.elements.popper),l,u,a),k=cy(e.elements.reference),w=qy({reference:k,element:y,placement:r}),x=Py(Object.assign({},y,w)),S=p===Wb?x:k,I={top:_.top-S.top+v.top,bottom:S.bottom-_.bottom+v.bottom,left:_.left-S.left+v.left,right:S.right-_.right+v.right},E=e.modifiersData.offset;if(p===Wb&&E){var T=E[r];Object.keys(I).forEach(function(e){var t=[qb,Rb].indexOf(e)>=0?1:-1,n=[Zb,Rb].indexOf(e)>=0?"y":"x";I[e]+=T[n]*t})}return I}function Ly(e,t){void 0===t&&(t={});var n=t,i=n.placement,r=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?Gb:l,u=wy(i),d=u?s?Jb:Jb.filter(function(e){return wy(e)===u}):Fb,p=d.filter(function(e){return c.indexOf(e)>=0});0===p.length&&(p=d);var m=p.reduce(function(t,n){return t[n]=My(e,{placement:n,boundary:r,rootBoundary:o,padding:a})[iy(n)],t},{});return Object.keys(m).sort(function(e,t){return m[e]-m[t]})}var Fy={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var r=n.mainAxis,o=void 0===r||r,a=n.altAxis,s=void 0===a||a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,p=n.altBoundary,m=n.flipVariations,f=void 0===m||m,h=n.allowedAutoPlacements,g=t.options.placement,v=iy(g),b=l||(v===g||!f?[zy(g)]:function(e){if(iy(e)===Lb)return[];var t=zy(e);return[Oy(e),t,Oy(t)]}(g)),y=[g].concat(b).reduce(function(e,n){return e.concat(iy(n)===Lb?Ly(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:f,allowedAutoPlacements:h}):n)},[]),$=t.rects.reference,_=t.rects.popper,k=new Map,w=!0,x=y[0],S=0;S<y.length;S++){var I=y[S],E=iy(I),T=wy(I)===Vb,z=[Zb,Rb].indexOf(E)>=0,C=z?"width":"height",O=My(t,{placement:I,boundary:u,rootBoundary:d,altBoundary:p,padding:c}),U=z?T?qb:Mb:T?Rb:Zb;$[C]>_[C]&&(U=zy(U));var A=zy(U),N=[];if(o&&N.push(O[E]<=0),s&&N.push(O[U]<=0,O[A]<=0),N.every(function(e){return e})){x=I,w=!1;break}k.set(I,N)}if(w)for(var D=function(e){var t=y.find(function(t){var n=k.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return x=t,"break"},j=f?3:1;j>0;j--){if("break"===D(j))break}t.placement!==x&&(t.modifiersData[i]._skip=!0,t.placement=x,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Vy(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function By(e){return[Zb,qb,Rb,Mb].some(function(t){return e[t]>=0})}var Hy={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,i=e.name,r=n.offset,o=void 0===r?[0,0]:r,a=Gb.reduce(function(e,n){return e[n]=function(e,t,n){var i=iy(e),r=[Mb,Zb].indexOf(i)>=0?-1:1,o="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*r,[Mb,qb].indexOf(i)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,o),e},{}),s=a[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[i]=a}};var Wy={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,i=e.name,r=n.mainAxis,o=void 0===r||r,a=n.altAxis,s=void 0!==a&&a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,p=n.tether,m=void 0===p||p,f=n.tetherOffset,h=void 0===f?0:f,g=My(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),v=iy(t.placement),b=wy(t.placement),y=!b,$=by(v),_="x"===$?"y":"x",k=t.modifiersData.popperOffsets,w=t.rects.reference,x=t.rects.popper,S="function"==typeof h?h(Object.assign({},t.rects,{placement:t.placement})):h,I="number"==typeof S?{mainAxis:S,altAxis:S}:Object.assign({mainAxis:0,altAxis:0},S),E=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,T={x:0,y:0};if(k){if(o){var z,C="y"===$?Zb:Mb,O="y"===$?Rb:qb,U="y"===$?"height":"width",A=k[$],N=A+g[C],D=A-g[O],j=m?-x[U]/2:0,P=b===Vb?w[U]:x[U],Z=b===Vb?-x[U]:-w[U],R=t.elements.arrow,q=m&&R?uy(R):{width:0,height:0},M=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},L=M[C],F=M[O],V=yy(0,w[U],q[U]),B=y?w[U]/2-j-V-L-I.mainAxis:P-V-L-I.mainAxis,H=y?-w[U]/2+j+V+F+I.mainAxis:Z+V+F+I.mainAxis,W=t.elements.arrow&&vy(t.elements.arrow),J=W?"y"===$?W.clientTop||0:W.clientLeft||0:0,G=null!=(z=null==E?void 0:E[$])?z:0,K=A+H-G,X=yy(m?oy(N,A+B-G-J):N,A,m?ry(D,K):D);k[$]=X,T[$]=X-A}if(s){var Y,Q="x"===$?Zb:Mb,ee="x"===$?Rb:qb,te=k[_],ne="y"===_?"height":"width",ie=te+g[Q],re=te-g[ee],oe=-1!==[Zb,Mb].indexOf(v),ae=null!=(Y=null==E?void 0:E[_])?Y:0,se=oe?ie:te-w[ne]-x[ne]-ae+I.altAxis,le=oe?te+w[ne]+x[ne]-ae-I.altAxis:re,ce=m&&oe?function(e,t,n){var i=yy(e,t,n);return i>n?n:i}(se,te,le):yy(m?se:ie,te,m?le:re);k[_]=ce,T[_]=ce-te}t.modifiersData[i]=T}},requiresIfExists:["offset"]};function Jy(e,t,n){void 0===n&&(n=!1);var i,r=ey(t),o=ey(t)&&function(e){var t=e.getBoundingClientRect(),n=ay(t.width)/e.offsetWidth||1,i=ay(t.height)/e.offsetHeight||1;return 1!==n||1!==i}(t),a=fy(t),s=cy(e,o,n),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&(("body"!==Xb(t)||Ny(a))&&(l=(i=t)!==Yb(i)&&ey(i)?function(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}(i):Uy(i)),ey(t)?((c=cy(t,!0)).x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=Ay(a))),{x:s.left+l.scrollLeft-c.x,y:s.top+l.scrollTop-c.y,width:s.width,height:s.height}}function Gy(e){var t=new Map,n=new Set,i=[];function r(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var i=t.get(e);i&&r(i)}}),i.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){n.has(e.name)||r(e)}),i}var Ky={placement:"bottom",modifiers:[],strategy:"absolute"};function Xy(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}function Yy(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,i=void 0===n?[]:n,r=t.defaultOptions,o=void 0===r?Ky:r;return function(e,t,n){void 0===n&&(n=o);var r,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ky,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],c=!1,u={state:s,setOptions:function(n){var r="function"==typeof n?n(s.options):n;d(),s.options=Object.assign({},o,s.options,r),s.scrollParents={reference:Qb(e)?jy(e):e.contextElement?jy(e.contextElement):[],popper:jy(t)};var a,c,p=function(e){var t=Gy(e);return Kb.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}((a=[].concat(i,s.options.modifiers),c=a.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{}),Object.keys(c).map(function(e){return c[e]})));return s.orderedModifiers=p.filter(function(e){return e.enabled}),s.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,i=void 0===n?{}:n,r=e.effect;if("function"==typeof r){var o=r({state:s,name:t,instance:u,options:i}),a=function(){};l.push(o||a)}}),u.update()},forceUpdate:function(){if(!c){var e=s.elements,t=e.reference,n=e.popper;if(Xy(t,n)){s.rects={reference:Jy(t,vy(n),"fixed"===s.options.strategy),popper:uy(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach(function(e){return s.modifiersData[e.name]=Object.assign({},e.data)});for(var i=0;i<s.orderedModifiers.length;i++)if(!0!==s.reset){var r=s.orderedModifiers[i],o=r.fn,a=r.options,l=void 0===a?{}:a,d=r.name;"function"==typeof o&&(s=o({state:s,options:l,name:d,instance:u})||s)}else s.reset=!1,i=-1}}},update:(r=function(){return new Promise(function(e){u.forceUpdate(),e(s)})},function(){return a||(a=new Promise(function(e){Promise.resolve().then(function(){a=void 0,e(r())})})),a}),destroy:function(){d(),c=!0}};if(!Xy(e,t))return u;function d(){l.forEach(function(e){return e()}),l=[]}return u.setOptions(n).then(function(e){!c&&n.onFirstUpdate&&n.onFirstUpdate(e)}),u}}var Qy=Yy({defaultModifiers:[Ey,{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=qy({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,i=n.gpuAcceleration,r=void 0===i||i,o=n.adaptive,a=void 0===o||o,s=n.roundOffsets,l=void 0===s||s,c={placement:iy(t.placement),variation:wy(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Sy(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Sy(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},ny,Hy,Fy,Wy,ky,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,i=t.rects.reference,r=t.rects.popper,o=t.modifiersData.preventOverflow,a=My(t,{elementContext:"reference"}),s=My(t,{altBoundary:!0}),l=Vy(a,i),c=Vy(s,r,o),u=By(l),d=By(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}]}),e$="tippy-content",t$="tippy-arrow",n$="tippy-svg-arrow",i$={passive:!0,capture:!0},r$=function(){return document.body};function o$(e,t,n){if(Array.isArray(e)){var i=e[t];return null==i?Array.isArray(n)?n[t]:n:i}return e}function a$(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function s$(e,t){return"function"==typeof e?e.apply(void 0,t):e}function l$(e,t){return 0===t?e:function(i){clearTimeout(n),n=setTimeout(function(){e(i)},t)};var n}function c$(e){return[].concat(e)}function u$(e,t){-1===e.indexOf(t)&&e.push(t)}function d$(e){return[].slice.call(e)}function p$(e){return Object.keys(e).reduce(function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t},{})}function m$(){return document.createElement("div")}function f$(e){return["Element","Fragment"].some(function(t){return a$(e,t)})}function h$(e){return f$(e)?[e]:function(e){return a$(e,"NodeList")}(e)?d$(e):Array.isArray(e)?e:d$(document.querySelectorAll(e))}function g$(e,t){e.forEach(function(e){e&&(e.style.transitionDuration=t+"ms")})}function v$(e,t){e.forEach(function(e){e&&e.setAttribute("data-state",t)})}function b$(e,t,n){var i=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(t){e[i](t,n)})}function y$(e,t){for(var n=t;n;){var i;if(e.contains(n))return!0;n=null==n.getRootNode||null==(i=n.getRootNode())?void 0:i.host}return!1}var $$={isTouch:!1},_$=0;function k$(){$$.isTouch||($$.isTouch=!0,window.performance&&document.addEventListener("mousemove",w$))}function w$(){var e=performance.now();e-_$<20&&($$.isTouch=!1,document.removeEventListener("mousemove",w$)),_$=e}function x$(){var e,t=document.activeElement;if((e=t)&&e._tippy&&e._tippy.reference===e){var n=t._tippy;t.blur&&!n.state.isVisible&&t.blur()}}var S$=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto,I$=Object.assign({appendTo:r$,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),E$=Object.keys(I$);function T$(e){var t=(e.plugins||[]).reduce(function(t,n){var i,r=n.name,o=n.defaultValue;r&&(t[r]=void 0!==e[r]?e[r]:null!=(i=I$[r])?i:o);return t},{});return Object.assign({},e,t)}function z$(e,t){var n=Object.assign({},t,{content:s$(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(T$(Object.assign({},I$,{plugins:t}))):E$).reduce(function(t,n){var i=(e.getAttribute("data-tippy-"+n)||"").trim();if(!i)return t;if("content"===n)t[n]=i;else try{t[n]=JSON.parse(i)}catch(e){t[n]=i}return t},{})}(e,t.plugins));return n.aria=Object.assign({},I$.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function C$(e,t){e.innerHTML=t}function O$(e){var t=m$();return!0===e?t.className=t$:(t.className=n$,f$(e)?t.appendChild(e):C$(t,e)),t}function U$(e,t){f$(t.content)?(C$(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?C$(e,t.content):e.textContent=t.content)}function A$(e){var t=e.firstElementChild,n=d$(t.children);return{box:t,content:n.find(function(e){return e.classList.contains(e$)}),arrow:n.find(function(e){return e.classList.contains(t$)||e.classList.contains(n$)}),backdrop:n.find(function(e){return e.classList.contains("tippy-backdrop")})}}function N$(e){var t=m$(),n=m$();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var i=m$();function r(n,i){var r=A$(t),o=r.box,a=r.content,s=r.arrow;i.theme?o.setAttribute("data-theme",i.theme):o.removeAttribute("data-theme"),"string"==typeof i.animation?o.setAttribute("data-animation",i.animation):o.removeAttribute("data-animation"),i.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof i.maxWidth?i.maxWidth+"px":i.maxWidth,i.role?o.setAttribute("role",i.role):o.removeAttribute("role"),n.content===i.content&&n.allowHTML===i.allowHTML||U$(a,e.props),i.arrow?s?n.arrow!==i.arrow&&(o.removeChild(s),o.appendChild(O$(i.arrow))):o.appendChild(O$(i.arrow)):s&&o.removeChild(s)}return i.className=e$,i.setAttribute("data-state","hidden"),U$(i,e.props),t.appendChild(n),n.appendChild(i),r(e.props,e.props),{popper:t,onUpdate:r}}N$.$$tippy=!0;var D$=1,j$=[],P$=[];function Z$(e,t){var n,i,r,o,a,s,l,c,u=z$(e,Object.assign({},I$,T$(p$(t)))),d=!1,p=!1,m=!1,f=!1,h=[],g=l$(W,u.interactiveDebounce),v=D$++,b=(c=u.plugins).filter(function(e,t){return c.indexOf(e)===t}),y={id:v,reference:e,popper:m$(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:b,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(i),cancelAnimationFrame(r)},setProps:function(t){if(y.state.isDestroyed)return;A("onBeforeUpdate",[y,t]),B();var n=y.props,i=z$(e,Object.assign({},n,p$(t),{ignoreAttributes:!0}));y.props=i,V(),n.interactiveDebounce!==i.interactiveDebounce&&(j(),g=l$(W,i.interactiveDebounce));n.triggerTarget&&!i.triggerTarget?c$(n.triggerTarget).forEach(function(e){e.removeAttribute("aria-expanded")}):i.triggerTarget&&e.removeAttribute("aria-expanded");D(),U(),k&&k(n,i);y.popperInstance&&(X(),Q().forEach(function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)}));A("onAfterUpdate",[y,t])},setContent:function(e){y.setProps({content:e})},show:function(){var e=y.state.isVisible,t=y.state.isDestroyed,n=!y.state.isEnabled,i=$$.isTouch&&!y.props.touch,r=o$(y.props.duration,0,I$.duration);if(e||t||n||i)return;if(T().hasAttribute("disabled"))return;if(A("onShow",[y],!1),!1===y.props.onShow(y))return;y.state.isVisible=!0,E()&&(_.style.visibility="visible");U(),q(),y.state.isMounted||(_.style.transition="none");if(E()){var o=C();g$([o.box,o.content],0)}s=function(){var e;if(y.state.isVisible&&!f){if(f=!0,_.offsetHeight,_.style.transition=y.props.moveTransition,E()&&y.props.animation){var t=C(),n=t.box,i=t.content;g$([n,i],r),v$([n,i],"visible")}N(),D(),u$(P$,y),null==(e=y.popperInstance)||e.forceUpdate(),A("onMount",[y]),y.props.animation&&E()&&function(e,t){L(e,t)}(r,function(){y.state.isShown=!0,A("onShown",[y])})}},function(){var e,t=y.props.appendTo,n=T();e=y.props.interactive&&t===r$||"parent"===t?n.parentNode:s$(t,[n]);e.contains(_)||e.appendChild(_);y.state.isMounted=!0,X()}()},hide:function(){var e=!y.state.isVisible,t=y.state.isDestroyed,n=!y.state.isEnabled,i=o$(y.props.duration,1,I$.duration);if(e||t||n)return;if(A("onHide",[y],!1),!1===y.props.onHide(y))return;y.state.isVisible=!1,y.state.isShown=!1,f=!1,d=!1,E()&&(_.style.visibility="hidden");if(j(),M(),U(!0),E()){var r=C(),o=r.box,a=r.content;y.props.animation&&(g$([o,a],i),v$([o,a],"hidden"))}N(),D(),y.props.animation?E()&&function(e,t){L(e,function(){!y.state.isVisible&&_.parentNode&&_.parentNode.contains(_)&&t()})}(i,y.unmount):y.unmount()},hideWithInteractivity:function(e){z().addEventListener("mousemove",g),u$(j$,g),g(e)},enable:function(){y.state.isEnabled=!0},disable:function(){y.hide(),y.state.isEnabled=!1},unmount:function(){y.state.isVisible&&y.hide();if(!y.state.isMounted)return;Y(),Q().forEach(function(e){e._tippy.unmount()}),_.parentNode&&_.parentNode.removeChild(_);P$=P$.filter(function(e){return e!==y}),y.state.isMounted=!1,A("onHidden",[y])},destroy:function(){if(y.state.isDestroyed)return;y.clearDelayTimeouts(),y.unmount(),B(),delete e._tippy,y.state.isDestroyed=!0,A("onDestroy",[y])}};if(!u.render)return y;var $=u.render(y),_=$.popper,k=$.onUpdate;_.setAttribute("data-tippy-root",""),_.id="tippy-"+y.id,y.popper=_,e._tippy=y,_._tippy=y;var w=b.map(function(e){return e.fn(y)}),x=e.hasAttribute("aria-expanded");return V(),D(),U(),A("onCreate",[y]),u.showOnCreate&&ee(),_.addEventListener("mouseenter",function(){y.props.interactive&&y.state.isVisible&&y.clearDelayTimeouts()}),_.addEventListener("mouseleave",function(){y.props.interactive&&y.props.trigger.indexOf("mouseenter")>=0&&z().addEventListener("mousemove",g)}),y;function S(){var e=y.props.touch;return Array.isArray(e)?e:[e,0]}function I(){return"hold"===S()[0]}function E(){var e;return!(null==(e=y.props.render)||!e.$$tippy)}function T(){return l||e}function z(){var e=T().parentNode;return e?function(e){var t,n=c$(e)[0];return null!=n&&null!=(t=n.ownerDocument)&&t.body?n.ownerDocument:document}(e):document}function C(){return A$(_)}function O(e){return y.state.isMounted&&!y.state.isVisible||$$.isTouch||o&&"focus"===o.type?0:o$(y.props.delay,e?0:1,I$.delay)}function U(e){void 0===e&&(e=!1),_.style.pointerEvents=y.props.interactive&&!e?"":"none",_.style.zIndex=""+y.props.zIndex}function A(e,t,n){var i;(void 0===n&&(n=!0),w.forEach(function(n){n[e]&&n[e].apply(n,t)}),n)&&(i=y.props)[e].apply(i,t)}function N(){var t=y.props.aria;if(t.content){var n="aria-"+t.content,i=_.id;c$(y.props.triggerTarget||e).forEach(function(e){var t=e.getAttribute(n);if(y.state.isVisible)e.setAttribute(n,t?t+" "+i:i);else{var r=t&&t.replace(i,"").trim();r?e.setAttribute(n,r):e.removeAttribute(n)}})}}function D(){!x&&y.props.aria.expanded&&c$(y.props.triggerTarget||e).forEach(function(e){y.props.interactive?e.setAttribute("aria-expanded",y.state.isVisible&&e===T()?"true":"false"):e.removeAttribute("aria-expanded")})}function j(){z().removeEventListener("mousemove",g),j$=j$.filter(function(e){return e!==g})}function P(t){if(!$$.isTouch||!m&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!y.props.interactive||!y$(_,n)){if(c$(y.props.triggerTarget||e).some(function(e){return y$(e,n)})){if($$.isTouch)return;if(y.state.isVisible&&y.props.trigger.indexOf("click")>=0)return}else A("onClickOutside",[y,t]);!0===y.props.hideOnClick&&(y.clearDelayTimeouts(),y.hide(),p=!0,setTimeout(function(){p=!1}),y.state.isMounted||M())}}}function Z(){m=!0}function R(){m=!1}function q(){var e=z();e.addEventListener("mousedown",P,!0),e.addEventListener("touchend",P,i$),e.addEventListener("touchstart",R,i$),e.addEventListener("touchmove",Z,i$)}function M(){var e=z();e.removeEventListener("mousedown",P,!0),e.removeEventListener("touchend",P,i$),e.removeEventListener("touchstart",R,i$),e.removeEventListener("touchmove",Z,i$)}function L(e,t){var n=C().box;function i(e){e.target===n&&(b$(n,"remove",i),t())}if(0===e)return t();b$(n,"remove",a),b$(n,"add",i),a=i}function F(t,n,i){void 0===i&&(i=!1),c$(y.props.triggerTarget||e).forEach(function(e){e.addEventListener(t,n,i),h.push({node:e,eventType:t,handler:n,options:i})})}function V(){var e;I()&&(F("touchstart",H,{passive:!0}),F("touchend",J,{passive:!0})),(e=y.props.trigger,e.split(/\s+/).filter(Boolean)).forEach(function(e){if("manual"!==e)switch(F(e,H),e){case"mouseenter":F("mouseleave",J);break;case"focus":F(S$?"focusout":"blur",G);break;case"focusin":F("focusout",G)}})}function B(){h.forEach(function(e){var t=e.node,n=e.eventType,i=e.handler,r=e.options;t.removeEventListener(n,i,r)}),h=[]}function H(e){var t,n=!1;if(y.state.isEnabled&&!K(e)&&!p){var i="focus"===(null==(t=o)?void 0:t.type);o=e,l=e.currentTarget,D(),!y.state.isVisible&&a$(e,"MouseEvent")&&j$.forEach(function(t){return t(e)}),"click"===e.type&&(y.props.trigger.indexOf("mouseenter")<0||d)&&!1!==y.props.hideOnClick&&y.state.isVisible?n=!0:ee(e),"click"===e.type&&(d=!n),n&&!i&&te(e)}}function W(e){var t=e.target,n=T().contains(t)||_.contains(t);if("mousemove"!==e.type||!n){var i=Q().concat(_).map(function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:u}:null}).filter(Boolean);(function(e,t){var n=t.clientX,i=t.clientY;return e.every(function(e){var t=e.popperRect,r=e.popperState,o=e.props.interactiveBorder,a=r.placement.split("-")[0],s=r.modifiersData.offset;if(!s)return!0;var l="bottom"===a?s.top.y:0,c="top"===a?s.bottom.y:0,u="right"===a?s.left.x:0,d="left"===a?s.right.x:0,p=t.top-i+l>o,m=i-t.bottom-c>o,f=t.left-n+u>o,h=n-t.right-d>o;return p||m||f||h})})(i,e)&&(j(),te(e))}}function J(e){K(e)||y.props.trigger.indexOf("click")>=0&&d||(y.props.interactive?y.hideWithInteractivity(e):te(e))}function G(e){y.props.trigger.indexOf("focusin")<0&&e.target!==T()||y.props.interactive&&e.relatedTarget&&_.contains(e.relatedTarget)||te(e)}function K(e){return!!$$.isTouch&&I()!==e.type.indexOf("touch")>=0}function X(){Y();var t=y.props,n=t.popperOptions,i=t.placement,r=t.offset,o=t.getReferenceClientRect,a=t.moveTransition,l=E()?A$(_).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||T()}:e,u={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(E()){var n=C().box;["placement","reference-hidden","escaped"].forEach(function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)}),t.attributes.popper={}}}},d=[{name:"offset",options:{offset:r}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},u];E()&&l&&d.push({name:"arrow",options:{element:l,padding:3}}),d.push.apply(d,(null==n?void 0:n.modifiers)||[]),y.popperInstance=Qy(c,_,Object.assign({},n,{placement:i,onFirstUpdate:s,modifiers:d}))}function Y(){y.popperInstance&&(y.popperInstance.destroy(),y.popperInstance=null)}function Q(){return d$(_.querySelectorAll("[data-tippy-root]"))}function ee(e){y.clearDelayTimeouts(),e&&A("onTrigger",[y,e]),q();var t=O(!0),i=S(),r=i[0],o=i[1];$$.isTouch&&"hold"===r&&o&&(t=o),t?n=setTimeout(function(){y.show()},t):y.show()}function te(e){if(y.clearDelayTimeouts(),A("onUntrigger",[y,e]),y.state.isVisible){if(!(y.props.trigger.indexOf("mouseenter")>=0&&y.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&d)){var t=O(!1);t?i=setTimeout(function(){y.state.isVisible&&y.hide()},t):r=requestAnimationFrame(function(){y.hide()})}}else M()}}function R$(e,t){void 0===t&&(t={});var n=I$.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",k$,i$),window.addEventListener("blur",x$);var i=Object.assign({},t,{plugins:n}),r=h$(e).reduce(function(e,t){var n=t&&Z$(t,i);return n&&e.push(n),e},[]);return f$(e)?r[0]:r}R$.defaultProps=I$,R$.setDefaultProps=function(e){Object.keys(e).forEach(function(t){I$[t]=e[t]})},R$.currentInput=$$,Object.assign({},ny,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}}),R$.setDefaultProps({render:N$});const q$=e=>({}),M$=e=>({trigger:e[2]}),L$=e=>({}),F$=e=>({trigger:e[2]});function V$(e){let t,n,i;const r=e[6].default,o=eh(r,e,e[5],F$),a=e[6].content,s=eh(a,e,e[5],M$),l=s||function(e){let t;return{c(){t=mh(e[0])},m(e,n){ch(e,t,n)},p(e,n){1&n&&yh(t,e[0])},d(e){e&&uh(t)}}}(e);return{c(){o&&o.c(),t=fh(),n=dh("div"),l&&l.c(),_h(n,"display","none")},m(r,a){o&&o.m(r,a),ch(r,t,a),ch(r,n,a),l&&l.m(n,null),e[7](n),i=!0},p(e,[t]){o&&o.p&&(!i||32&t)&&ih(o,r,e,e[5],i?nh(r,e[5],t,L$):rh(e[5]),F$),s?s.p&&(!i||32&t)&&ih(s,a,e,e[5],i?nh(a,e[5],t,q$):rh(e[5]),M$):l&&l.p&&(!i||1&t)&&l.p(e,i?t:-1)},i(e){i||(Bh(o,e),Bh(l,e),i=!0)},o(e){Hh(o,e),Hh(l,e),i=!1},d(i){o&&o.d(i),i&&uh(t),i&&uh(n),l&&l.d(i),e[7](null)}}}function B$(e,t,n){const i=["text","disabled"];let r,o,a,s=oh(t,i),{$$slots:l={},$$scope:c}=t,{text:u=""}=t,{disabled:d=!1}=t;return Th(()=>{r&&(n(4,a=R$(r,{...s,content:o})),o.style.removeProperty("display"))}),e.$$set=e=>{t=Wf(Wf({},t),function(e){const t={};for(const n in e)"$"!==n[0]&&(t[n]=e[n]);return t}(e)),n(9,s=oh(t,i)),"text"in e&&n(0,u=e.text),"disabled"in e&&n(3,d=e.disabled),"$$scope"in e&&n(5,c=e.$$scope)},e.$$.update=()=>{24&e.$$.dirty&&a&&(d?a.disable():a.enable())},[u,o,e=>{r=e},d,a,c,l,function(e){Ch[e?"unshift":"push"](()=>{o=e,n(1,o)})}]}class H$ extends Qh{constructor(e){super(),Yh(this,e,B$,V$,Yf,{text:0,disabled:3})}}function W$(e){lh(e,"svelte-wb18kg","svg.svelte-wb18kg{opacity:var(--tooltip-opacity, 1);color:var(--text-color)}")}function J$(e){let t,n,i,r;return{c(){t=ph("svg"),n=ph("path"),vh(n,"fill","currentColor"),vh(n,"d","M15.07,11.25L14.17,12.17C13.45,12.89 13,13.5 13,15H11V14.5C11,13.39 11.45,12.39 12.17,11.67L13.41,10.41C13.78,10.05 14,9.55 14,9C14,7.89 13.1,7 12,7A2,2 0 0,0 10,9H8A4,4 0 0,1 12,5A4,4 0 0,1 16,9C16,9.88 15.64,10.67 15.07,11.25M13,19H11V17H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z"),vh(t,"class","tooltip svelte-wb18kg"),_h(t,"width","1rem"),_h(t,"height","1rem"),vh(t,"viewBox","0 0 24 24")},m(o,a){ch(o,t,a),sh(t,n),i||(r=ah(e[9].call(null,t)),i=!0)},p:Hf,d(e){e&&uh(t),i=!1,r()}}}function G$(e){let t,n,i,r;return{c(){t=dh("br"),n=fh(),i=dh("a"),r=mh("Read more."),vh(i,"href",e[0]),vh(i,"target",e[3]?void 0:"_blank"),vh(i,"rel",e[3]?void 0:"noopener noreferrer")},m(e,o){ch(e,t,o),ch(e,n,o),ch(e,i,o),sh(i,r)},p(e,t){1&t&&vh(i,"href",e[0])},d(e){e&&uh(t),e&&uh(n),e&&uh(i)}}}function K$(e){let t,n,i;const r=e[6].default,o=eh(r,e,e[7],null);let a=e[2]&&G$(e);return{c(){t=dh("div"),o&&o.c(),n=fh(),a&&a.c(),vh(t,"slot","content")},m(e,r){ch(e,t,r),o&&o.m(t,null),sh(t,n),a&&a.m(t,null),i=!0},p(e,n){o&&o.p&&(!i||128&n)&&ih(o,r,e,e[7],i?nh(r,e[7],n,null):rh(e[7]),null),e[2]?a?a.p(e,n):(a=G$(e),a.c(),a.m(t,null)):a&&(a.d(1),a=null)},i(e){i||(Bh(o,e),i=!0)},o(e){Hh(o,e),i=!1},d(e){e&&uh(t),o&&o.d(e),a&&a.d()}}}function X$(e){let t,n;return t=new H$({props:{interactive:!0,placement:e[1],theme:"light border",maxWidth:"22em",$$slots:{content:[K$,({trigger:e})=>({9:e}),({trigger:e})=>e?512:0],default:[J$,({trigger:e})=>({9:e}),({trigger:e})=>e?512:0]},$$scope:{ctx:e}}}),{c(){Jh(t.$$.fragment)},m(e,i){Gh(t,e,i),n=!0},p(e,[n]){const i={};2&n&&(i.placement=e[1]),133&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(Bh(t.$$.fragment,e),n=!0)},o(e){Hh(t.$$.fragment,e),n=!1},d(e){Kh(t,e)}}}function Y$(e,t,n){let i,r,{$$slots:o={},$$scope:a}=t,{link:s}=t,{placement:l="right"}=t;const c=(u=lg,Eh().$$.context.get(u));var u;const d=null!=c,p=c??function(e,t){return{subscribe:tg(e,t).subscribe}}({canOpen:!1});return Qf(e,p,e=>n(5,r=e)),e.$$set=e=>{"link"in e&&n(0,s=e.link),"placement"in e&&n(1,l=e.placement),"$$scope"in e&&n(7,a=e.$$scope)},e.$$.update=()=>{33&e.$$.dirty&&n(2,i=null!=s&&(!d||r.canOpen))},[s,l,i,d,p,r,o,a]}class Q$ extends Qh{constructor(e){super(),Yh(this,e,Y$,X$,Yf,{link:0,placement:1},W$)}}function e_(e){let t,n,i;return{c(){t=dh("input"),vh(t,"type","checkbox"),t.disabled=e[1]},m(r,o){ch(r,t,o),t.checked=e[0],n||(i=gh(t,"change",e[6]),n=!0)},p(e,[n]){2&n&&(t.disabled=e[1]),1&n&&(t.checked=e[0])},i:Hf,o:Hf,d(e){e&&uh(t),n=!1,i()}}}function t_(e,t,n){let{value:i=!1}=t,{checked:r=!1!==i}=t,{defaultValue:o}=t,{disabled:a}=t,s=r,l=i||o;return e.$$set=e=>{"value"in e&&n(2,i=e.value),"checked"in e&&n(0,r=e.checked),"defaultValue"in e&&n(3,o=e.defaultValue),"disabled"in e&&n(1,a=e.disabled)},e.$$.update=()=>{53&e.$$.dirty&&(s?r?!1===i&&n(0,r=!1):n(2,i=!1):r?n(2,i=l):!1!==i&&n(0,r=!0),n(4,s=r),n(5,l=i||l))},[r,a,i,o,s,l,function(){r=this.checked,n(0,r),n(4,s),n(5,l),n(2,i)}]}class n_ extends Qh{constructor(e){super(),Yh(this,e,t_,e_,Yf,{value:2,checked:0,defaultValue:3,disabled:1})}}function i_(e){let t,n;return{c(){t=ph("svg"),n=ph("path"),vh(n,"d","M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"),vh(t,"class","keepcolor"),vh(t,"width","9"),vh(t,"height","9"),vh(t,"xmlns","http://www.w3.org/2000/svg"),vh(t,"viewBox","0 0 320 512")},m(e,i){ch(e,t,i),sh(t,n)},p:Hf,i:Hf,o:Hf,d(e){e&&uh(t)}}}class r_ extends Qh{constructor(e){super(),Yh(this,e,null,i_,Yf,{})}}function o_(e){let t,n;return{c(){t=ph("svg"),n=ph("path"),vh(n,"d","M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"),vh(t,"class","keepcolor"),vh(t,"width","9"),vh(t,"height","9"),vh(t,"xmlns","http://www.w3.org/2000/svg"),vh(t,"viewBox","0 0 512 512")},m(e,i){ch(e,t,i),sh(t,n)},p:Hf,i:Hf,o:Hf,d(e){e&&uh(t)}}}class a_ extends Qh{constructor(e){super(),Yh(this,e,null,o_,Yf,{})}}function s_(e){let t,n,i,r;const o=[c_,l_],a=[];function s(e,t){return"checkbox"===e[3]?0:"toggleradio"===e[3]?1:-1}return~(n=s(e))&&(i=a[n]=o[n](e)),{c(){t=dh("span"),i&&i.c(),vh(t,"class","mr-2")},m(e,i){ch(e,t,i),~n&&a[n].m(t,null),r=!0},p(e,r){let l=n;n=s(e),n===l?~n&&a[n].p(e,r):(i&&(Fh(),Hh(a[l],1,1,()=>{a[l]=null}),Vh()),~n?(i=a[n],i?i.p(e,r):(i=a[n]=o[n](e),i.c()),Bh(i,1),i.m(t,null)):i=null)},i(e){r||(Bh(i),r=!0)},o(e){Hh(i),r=!1},d(e){e&&uh(t),~n&&a[n].d()}}}function l_(e){let t,n,i;function r(t){e[19](t)}let o={defaultValue:e[4],disabled:e[7]||e[9]};return void 0!==e[1]&&(o.value=e[1]),t=new n_({props:o}),Ch.push(()=>Wh(t,"value",r)),{c(){Jh(t.$$.fragment)},m(e,n){Gh(t,e,n),i=!0},p(e,i){const r={};16&i&&(r.defaultValue=e[4]),640&i&&(r.disabled=e[7]||e[9]),!n&&2&i&&(n=!0,r.value=e[1],jh(()=>n=!1)),t.$set(r)},i(e){i||(Bh(t.$$.fragment,e),i=!0)},o(e){Hh(t.$$.fragment,e),i=!1},d(e){Kh(t,e)}}}function c_(e){let t,n,i,r;return{c(){t=dh("input"),vh(t,"type","checkbox"),t.disabled=n=e[7]||e[9]},m(n,o){ch(n,t,o),t.checked=e[0],i||(r=gh(t,"change",e[18]),i=!0)},p(e,i){640&i&&n!==(n=e[7]||e[9])&&(t.disabled=n),1&i&&(t.checked=e[0])},i:Hf,o:Hf,d(e){e&&uh(t),i=!1,r()}}}function u_(e){let t,n;return t=new r_({}),{c(){Jh(t.$$.fragment)},m(e,i){Gh(t,e,i),n=!0},i(e){n||(Bh(t.$$.fragment,e),n=!0)},o(e){Hh(t.$$.fragment,e),n=!1},d(e){Kh(t,e)}}}function d_(e){let t,n;return t=new a_({}),{c(){Jh(t.$$.fragment)},m(e,i){Gh(t,e,i),n=!0},i(e){n||(Bh(t.$$.fragment,e),n=!0)},o(e){Hh(t.$$.fragment,e),n=!1},d(e){Kh(t,e)}}}function p_(e){let t,n;return{c(){t=new wh(!1),n=hh(),t.a=n},m(i,r){t.m(e[5],i,r),ch(i,n,r)},p(e,n){32&n&&t.p(e[5])},d(e){e&&uh(n),e&&t.d()}}}function m_(e){let t,n,i,r,o,a,s,l,c,u,d,p,m,f,h,g,v,b,y,$,_,k,w,x,S,I="section"!==e[3]&&s_(e);const E=[d_,u_],T=[];function z(e,t){return e[10]?0:1}d=z(e),p=T[d]=E[d](e),h=new Q$({props:{link:e[6],$$slots:{default:[p_]},$$scope:{ctx:e}}});const C=e[17].default,O=eh(C,e,e[20],null);return{c(){t=dh("section"),n=dh("h1"),i=dh("label"),r=dh("div"),I&&I.c(),o=fh(),a=dh("span"),s=mh(e[2]),l=fh(),c=dh("div"),u=dh("button"),p.c(),f=fh(),Jh(h.$$.fragment),g=fh(),v=dh("div"),b=dh("span"),$=fh(),_=dh("div"),O&&O.c(),vh(r,"class","flex items-center"),vh(u,"class","px-1 bg-transparent border-0 mr-2"),vh(u,"aria-label",m=e[10]?"Collapse section":"Expand section"),vh(c,"class","flex items-center"),vh(i,"class","items-center tooltip-container pr-2 flex justify-between"),vh(b,"class","italic"),vh(v,"class","text-sm text-gray-500"),v.hidden=y=!e[7]||void 0===e[8],_.hidden=k=!e[10],vh(t,"class","controls-section")},m(p,m){var y;ch(p,t,m),sh(t,n),sh(n,i),sh(i,r),I&&I.m(r,null),sh(r,o),sh(r,a),sh(a,s),sh(i,l),sh(i,c),sh(c,u),T[d].m(u,null),sh(c,f),Gh(h,c,null),sh(t,g),sh(t,v),sh(v,b),b.innerHTML=e[8],sh(t,$),sh(t,_),O&&O.m(_,null),w=!0,x||(S=gh(u,"click",(y=e[11],function(e){return e.preventDefault(),y.call(this,e)})),x=!0)},p(e,[t]){"section"!==e[3]?I?(I.p(e,t),8&t&&Bh(I,1)):(I=s_(e),I.c(),Bh(I,1),I.m(r,o)):I&&(Fh(),Hh(I,1,1,()=>{I=null}),Vh()),(!w||4&t)&&yh(s,e[2]);let n=d;d=z(e),d!==n&&(Fh(),Hh(T[n],1,1,()=>{T[n]=null}),Vh(),p=T[d],p||(p=T[d]=E[d](e),p.c()),Bh(p,1),p.m(u,null)),(!w||1024&t&&m!==(m=e[10]?"Collapse section":"Expand section"))&&vh(u,"aria-label",m);const i={};64&t&&(i.link=e[6]),1048608&t&&(i.$$scope={dirty:t,ctx:e}),h.$set(i),(!w||256&t)&&(b.innerHTML=e[8]),(!w||384&t&&y!==(y=!e[7]||void 0===e[8]))&&(v.hidden=y),O&&O.p&&(!w||1048576&t)&&ih(O,C,e,e[20],w?nh(C,e[20],t,null):rh(e[20]),null),(!w||1024&t&&k!==(k=!e[10]))&&(_.hidden=k)},i(e){w||(Bh(I),Bh(p),Bh(h.$$.fragment,e),Bh(O,e),w=!0)},o(e){Hh(I),Hh(p),Hh(h.$$.fragment,e),Hh(O,e),w=!1},d(e){e&&uh(t),I&&I.d(),T[d].d(),Kh(h),O&&O.d(e),x=!1,S()}}}function f_(e,t,n){let i,r,{$$slots:o={},$$scope:a}=t,{label:s}=t,{type:l}=t,{checkboxChecked:c}=t,{toggleRadioValue:u}=t,{toggleRadioDefaultValue:d}=t,{helpContent:p}=t,{helpLink:m}=t,{disabled:f}=t,{disabledReason:h}=t,{required:g}=t,{error:v}=t,b=!1,y=g,$=r;return e.$$set=e=>{"label"in e&&n(2,s=e.label),"type"in e&&n(3,l=e.type),"checkboxChecked"in e&&n(0,c=e.checkboxChecked),"toggleRadioValue"in e&&n(1,u=e.toggleRadioValue),"toggleRadioDefaultValue"in e&&n(4,d=e.toggleRadioDefaultValue),"helpContent"in e&&n(5,p=e.helpContent),"helpLink"in e&&n(6,m=e.helpLink),"disabled"in e&&n(7,f=e.disabled),"disabledReason"in e&&n(8,h=e.disabledReason),"required"in e&&n(9,g=e.required),"error"in e&&n(12,v=e.error),"$$scope"in e&&n(20,a=e.$$scope)},e.$$.update=()=>{4096&e.$$.dirty&&n(16,i=void 0!==v),3&e.$$.dirty&&n(15,r=!(!c&&!u)),123392&e.$$.dirty&&((i||!$&&r||!y&&g)&&n(10,b=!0),n(13,y=g),n(14,$=r))},[c,u,s,l,d,p,m,f,h,g,b,function(){n(10,b=!b||i)},v,y,$,r,i,o,function(){c=this.checked,n(0,c)},function(e){u=e,n(1,u)},a]}class h_ extends Qh{constructor(e){super(),Yh(this,e,f_,m_,Yf,{label:2,type:3,checkboxChecked:0,toggleRadioValue:1,toggleRadioDefaultValue:4,helpContent:5,helpLink:6,disabled:7,disabledReason:8,required:9,error:12})}}function g_(e){let t;const n=e[9].default,i=eh(n,e,e[11],null);return{c(){i&&i.c()},m(e,n){i&&i.m(e,n),t=!0},p(e,r){i&&i.p&&(!t||2048&r)&&ih(i,n,e,e[11],t?nh(n,e[11],r,null):rh(e[11]),null)},i(e){t||(Bh(i,e),t=!0)},o(e){Hh(i,e),t=!1},d(e){i&&i.d(e)}}}function v_(e){let t,n,i;function r(t){e[10](t)}let o={type:"toggleradio",label:e[1],toggleRadioDefaultValue:e[2],helpContent:e[3],helpLink:e[4],disabled:e[5],disabledReason:e[6],required:e[7],error:e[8],$$slots:{default:[g_]},$$scope:{ctx:e}};return void 0!==e[0]&&(o.toggleRadioValue=e[0]),t=new h_({props:o}),Ch.push(()=>Wh(t,"toggleRadioValue",r)),{c(){Jh(t.$$.fragment)},m(e,n){Gh(t,e,n),i=!0},p(e,[i]){const r={};2&i&&(r.label=e[1]),4&i&&(r.toggleRadioDefaultValue=e[2]),8&i&&(r.helpContent=e[3]),16&i&&(r.helpLink=e[4]),32&i&&(r.disabled=e[5]),64&i&&(r.disabledReason=e[6]),128&i&&(r.required=e[7]),256&i&&(r.error=e[8]),2048&i&&(r.$$scope={dirty:i,ctx:e}),!n&&1&i&&(n=!0,r.toggleRadioValue=e[0],jh(()=>n=!1)),t.$set(r)},i(e){i||(Bh(t.$$.fragment,e),i=!0)},o(e){Hh(t.$$.fragment,e),i=!1},d(e){Kh(t,e)}}}function b_(e,t,n){let{$$slots:i={},$$scope:r}=t,{label:o}=t,{value:a}=t,{defaultValue:s}=t,{helpContent:l}=t,{helpLink:c}=t,{disabled:u=!1}=t,{disabledReason:d}=t,{required:p=!1}=t,{error:m}=t;return e.$$set=e=>{"label"in e&&n(1,o=e.label),"value"in e&&n(0,a=e.value),"defaultValue"in e&&n(2,s=e.defaultValue),"helpContent"in e&&n(3,l=e.helpContent),"helpLink"in e&&n(4,c=e.helpLink),"disabled"in e&&n(5,u=e.disabled),"disabledReason"in e&&n(6,d=e.disabledReason),"required"in e&&n(7,p=e.required),"error"in e&&n(8,m=e.error),"$$scope"in e&&n(11,r=e.$$scope)},[a,o,s,l,c,u,d,p,m,i,function(e){a=e,n(0,a)},r]}class y_ extends Qh{constructor(e){super(),Yh(this,e,b_,v_,Yf,{label:1,value:0,defaultValue:2,helpContent:3,helpLink:4,disabled:5,disabledReason:6,required:7,error:8})}}function $_(e){let t;return{c(){t=mh("Simple mechanism with a single account authorized for all privileged actions.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function __(e){let t;return{c(){t=mh("Flexible mechanism with a separate role for each privileged action. A role can have many authorized accounts.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function k_(e){let t,n,i,r,o,a,s,l,c,u,d,p,m,f;return o=new Q$({props:{link:"https://docs.openzeppelin.com/stellar-contracts/access/ownable",$$slots:{default:[$_]},$$scope:{ctx:e}}}),u=new Q$({props:{link:"https://docs.openzeppelin.com/stellar-contracts/access/access-control",$$slots:{default:[__]},$$scope:{ctx:e}}}),p=bh(e[6][0]),{c(){t=dh("div"),n=dh("label"),i=dh("input"),r=mh("\n Ownable\n "),Jh(o.$$.fragment),a=fh(),s=dh("label"),l=dh("input"),c=mh("\n Roles\n "),Jh(u.$$.fragment),vh(i,"type","radio"),i.__value="ownable",i.value=i.__value,kh(n,"checked","ownable"===e[0]),vh(l,"type","radio"),l.__value="roles",l.value=l.__value,kh(s,"checked","roles"===e[0]),vh(t,"class","checkbox-group"),p.p(i,l)},m(p,h){ch(p,t,h),sh(t,n),sh(n,i),i.checked=i.__value===e[0],sh(n,r),Gh(o,n,null),sh(t,a),sh(t,s),sh(s,l),l.checked=l.__value===e[0],sh(s,c),Gh(u,s,null),d=!0,m||(f=[gh(i,"change",e[5]),gh(l,"change",e[7])],m=!0)},p(e,t){1&t&&(i.checked=i.__value===e[0]);const r={};512&t&&(r.$$scope={dirty:t,ctx:e}),o.$set(r),(!d||1&t)&&kh(n,"checked","ownable"===e[0]),1&t&&(l.checked=l.__value===e[0]);const a={};512&t&&(a.$$scope={dirty:t,ctx:e}),u.$set(a),(!d||1&t)&&kh(s,"checked","roles"===e[0])},i(e){d||(Bh(o.$$.fragment,e),Bh(u.$$.fragment,e),d=!0)},o(e){Hh(o.$$.fragment,e),Hh(u.$$.fragment,e),d=!1},d(e){e&&uh(t),Kh(o),Kh(u),p.r(),m=!1,Kf(f)}}}function w_(e){let t,n,i;function r(t){e[8](t)}let o={label:"Access Control",defaultValue:"ownable",helpContent:"Restrict who can access the functions of a contract or when they can do it.",required:e[1],$$slots:{default:[k_]},$$scope:{ctx:e}};return void 0!==e[0]&&(o.value=e[0]),t=new y_({props:o}),Ch.push(()=>Wh(t,"value",r)),{c(){Jh(t.$$.fragment)},m(e,n){Gh(t,e,n),i=!0},p(e,[i]){const r={};2&i&&(r.required=e[1]),513&i&&(r.$$scope={dirty:i,ctx:e}),!n&&1&i&&(n=!0,r.value=e[0],jh(()=>n=!1)),t.$set(r)},i(e){i||(Bh(t.$$.fragment,e),i=!0)},o(e){Hh(t.$$.fragment,e),i=!1},d(e){Kh(t,e)}}}function x_(e,t,n){let{access:i}=t,{required:r}=t,o="ownable",a=r,s=i;return e.$$set=e=>{"access"in e&&n(0,i=e.access),"required"in e&&n(1,r=e.required)},e.$$.update=()=>{31&e.$$.dirty&&(a&&!r?n(0,i=s):(n(4,s=i),!1===i&&r&&n(0,i=o)),n(3,a=r),!1!==i&&n(2,o=i))},[i,r,o,a,s,function(){i=this.__value,n(0,i),n(3,a),n(1,r),n(4,s),n(2,o)},[[]],function(){i=this.__value,n(0,i),n(3,a),n(1,r),n(4,s),n(2,o)},function(e){i=e,n(0,i),n(3,a),n(1,r),n(4,s),n(2,o)}]}class S_ extends Qh{constructor(e){super(),Yh(this,e,x_,w_,Yf,{access:0,required:1})}}const I_="has-error";function E_(e,t){const n=R$(e,{placement:"right",theme:"light-red border",trigger:"manual",hideOnClick:!1,interactive:!0});function i(t){t?(n.setContent(t),n.show(),e.classList.add(I_)):(n.hide(),e.classList.remove(I_))}return i(t),{update:i,destroy:n.destroy}}function T_(e){let t;return{c(){t=mh("Where people can contact you to report security issues. Will only be visible if contract metadata is verified.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function z_(e){let t,n,i,r,o,a,s,l,c,u,d,p,m,f,h,g,v,b,y;return s=new Q$({props:{$$slots:{default:[T_]},$$scope:{ctx:e}}}),{c(){t=dh("section"),n=dh("h1"),n.innerHTML='<label class="flex items-center tooltip-container pr-2"><span>Info</span></label>',i=fh(),r=dh("label"),o=dh("span"),a=mh("Security Contact\n "),Jh(s.$$.fragment),l=fh(),c=dh("input"),d=fh(),p=dh("label"),m=dh("span"),m.textContent="License",f=fh(),h=dh("input"),vh(o,"class","flex justify-between pr-2"),vh(c,"placeholder","security@example.com"),vh(r,"class","labeled-input"),vh(h,"placeholder",Mg.license),vh(p,"class","labeled-input"),vh(t,"class","controls-section")},m($,_){ch($,t,_),sh(t,n),sh(t,i),sh(t,r),sh(r,o),sh(o,a),Gh(s,o,null),sh(r,l),sh(r,c),$h(c,e[0].securityContact),sh(t,d),sh(t,p),sh(p,m),sh(p,f),sh(p,h),$h(h,e[0].license),v=!0,b||(y=[gh(c,"input",e[2]),ah(u=E_.call(null,c,e[1]?.securityContact)),gh(h,"input",e[3]),ah(g=E_.call(null,h,e[1]?.license))],b=!0)},p(e,[t]){const n={};16&t&&(n.$$scope={dirty:t,ctx:e}),s.$set(n),1&t&&c.value!==e[0].securityContact&&$h(c,e[0].securityContact),u&&Xf(u.update)&&2&t&&u.update.call(null,e[1]?.securityContact),1&t&&h.value!==e[0].license&&$h(h,e[0].license),g&&Xf(g.update)&&2&t&&g.update.call(null,e[1]?.license)},i(e){v||(Bh(s.$$.fragment,e),v=!0)},o(e){Hh(s.$$.fragment,e),v=!1},d(e){e&&uh(t),Kh(s),b=!1,Kf(y)}}}function C_(e,t,n){let{info:i}=t,{errors:r}=t;return e.$$set=e=>{"info"in e&&n(0,i=e.info),"errors"in e&&n(1,r=e.errors)},[i,r,function(){i.securityContact=this.value,n(0,i)},function(){i.license=this.value,n(0,i)}]}class O_ extends Qh{constructor(e){super(),Yh(this,e,C_,z_,Yf,{info:0,errors:1})}}function U_(e){let t;return{c(){t=mh("Whether the contract functions should be explicitly implemented or be auto-generated with the defaults provided by\n the library.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function A_(e){let t,n,i;return{c(){t=mh("The "),n=dh("code"),n.textContent="#[contractimpl(contracttrait)]",i=mh(" attribute generates the contract functions with the defaults provided\n in the trait. You can re-implement some of the functions with custom logic if needed.")},m(e,r){ch(e,t,r),ch(e,n,r),ch(e,i,r)},p:Hf,d(e){e&&uh(t),e&&uh(n),e&&uh(i)}}}function N_(e){let t;return{c(){t=mh("Include every trait function body explicitly. Useful when all of them need to be customized.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function D_(e){let t,n,i,r,o,a,s,l,c,u,d,p,m,f,h,g,v,b,y;return r=new Q$({props:{$$slots:{default:[U_]},$$scope:{ctx:e}}}),u=new Q$({props:{$$slots:{default:[A_]},$$scope:{ctx:e}}}),h=new Q$({props:{$$slots:{default:[N_]},$$scope:{ctx:e}}}),v=bh(e[4][0]),{c(){t=dh("section"),n=dh("h1"),i=mh("Trait Implementations\n "),Jh(r.$$.fragment),o=fh(),a=dh("div"),s=dh("label"),l=dh("input"),c=mh("\n Default\n "),Jh(u.$$.fragment),d=fh(),p=dh("label"),m=dh("input"),f=mh("\n Explicit\n "),Jh(h.$$.fragment),vh(n,"class","flex justify-between pr-2"),vh(l,"type","radio"),l.__value="default",l.value=l.__value,kh(s,"checked","default"===e[0]),vh(m,"type","radio"),m.__value="explicit",m.value=m.__value,kh(p,"checked","explicit"===e[0]),vh(a,"class","checkbox-group"),vh(t,"class","controls-section"),v.p(l,m)},m(v,$){ch(v,t,$),sh(t,n),sh(n,i),Gh(r,n,null),sh(t,o),sh(t,a),sh(a,s),sh(s,l),l.checked=l.__value===e[0],sh(s,c),Gh(u,s,null),sh(a,d),sh(a,p),sh(p,m),m.checked=m.__value===e[0],sh(p,f),Gh(h,p,null),g=!0,b||(y=[gh(l,"change",e[3]),gh(l,"change",e[1]),gh(m,"change",e[5]),gh(m,"change",e[1])],b=!0)},p(e,[t]){const n={};64&t&&(n.$$scope={dirty:t,ctx:e}),r.$set(n),1&t&&(l.checked=l.__value===e[0]);const i={};64&t&&(i.$$scope={dirty:t,ctx:e}),u.$set(i),(!g||1&t)&&kh(s,"checked","default"===e[0]),1&t&&(m.checked=m.__value===e[0]);const o={};64&t&&(o.$$scope={dirty:t,ctx:e}),h.$set(o),(!g||1&t)&&kh(p,"checked","explicit"===e[0])},i(e){g||(Bh(r.$$.fragment,e),Bh(u.$$.fragment,e),Bh(h.$$.fragment,e),g=!0)},o(e){Hh(r.$$.fragment,e),Hh(u.$$.fragment,e),Hh(h.$$.fragment,e),g=!1},d(e){e&&uh(t),Kh(r),Kh(u),Kh(h),v.r(),b=!1,Kf(y)}}}function j_(e,t,n){let i,{explicitImplementations:r=!1}=t;return e.$$set=e=>{"explicitImplementations"in e&&n(2,r=e.explicitImplementations)},e.$$.update=()=>{4&e.$$.dirty&&n(0,i=r?"explicit":"default")},[i,function(){n(2,r="explicit"===i)},r,function(){i=this.__value,n(0,i),n(2,r)},[[]],function(){i=this.__value,n(0,i),n(2,r)}]}class P_ extends Qh{constructor(e){super(),Yh(this,e,j_,D_,Yf,{explicitImplementations:2})}}function Z_(e){let t;return{c(){t=mh("The number of decimals used to represent token amounts. Defaults to 7.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function R_(e){let t;return{c(){t=mh("Create an initial amount of tokens for the owner.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function q_(e){let t;return{c(){t=mh("Privileged accounts will be able to create more supply.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function M_(e){let t;return{c(){t=mh("Token holders will be able to destroy their tokens.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function L_(e){let t;return{c(){t=mh("Adds vote checkpoints and delegation support for governance usage.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function F_(e){let t,n,i;return{c(){t=mh("Privileged accounts will be able to pause the functionality marked with "),n=dh("code"),n.textContent="when_not_paused",i=mh(". Useful for\n emergency response.")},m(e,r){ch(e,t,r),ch(e,n,r),ch(e,i,r)},p:Hf,d(e){e&&uh(t),e&&uh(n),e&&uh(i)}}}function V_(e){let t;return{c(){t=mh("Allows the contract to be upgraded by the owner.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function B_(e){let t,n,i,r,o,a,s,l,c,u,d,p,m,f,h,g,v,b,y,$,_,k,w,x,S,I,E,T,z,C,O,U,A,N,D,j,P,Z,R,q,M,L,F,V,B,H,W,J,G,K,X,Y,Q,ee,te,ne,ie,re,oe,ae,se,le,ce,ue,de,pe,me,fe,he,ge,ve,be;function ye(t){e[12](t)}$=new Q$({props:{$$slots:{default:[Z_]},$$scope:{ctx:e}}}),T=new Q$({props:{$$slots:{default:[R_]},$$scope:{ctx:e}}}),q=new Q$({props:{$$slots:{default:[q_]},$$scope:{ctx:e}}}),B=new Q$({props:{$$slots:{default:[M_]},$$scope:{ctx:e}}}),K=new Q$({props:{$$slots:{default:[L_]},$$scope:{ctx:e}}}),te=new Q$({props:{$$slots:{default:[F_]},$$scope:{ctx:e}}}),ae=new Q$({props:{$$slots:{default:[V_]},$$scope:{ctx:e}}});let $e={required:e[2]};function _e(t){e[13](t)}void 0!==e[0].access&&($e.access=e[0].access),le=new S_({props:$e}),Ch.push(()=>Wh(le,"access",ye));let ke={};function we(t){e[14](t)}void 0!==e[0].explicitImplementations&&(ke.explicitImplementations=e[0].explicitImplementations),de=new P_({props:ke}),Ch.push(()=>Wh(de,"explicitImplementations",_e));let xe={errors:e[1]};return void 0!==e[0].info&&(xe.info=e[0].info),fe=new O_({props:xe}),Ch.push(()=>Wh(fe,"info",we)),{c(){t=dh("section"),n=dh("h1"),n.textContent="Settings",i=fh(),r=dh("div"),o=dh("label"),a=dh("span"),a.textContent="Name",s=fh(),l=dh("input"),u=fh(),d=dh("label"),p=dh("span"),p.textContent="Symbol",m=fh(),f=dh("input"),g=fh(),v=dh("label"),b=dh("span"),y=mh("Decimals\n "),Jh($.$$.fragment),_=fh(),k=dh("input"),x=fh(),S=dh("label"),I=dh("span"),E=mh("Premint\n "),Jh(T.$$.fragment),z=fh(),C=dh("input"),U=fh(),A=dh("section"),N=dh("h1"),N.textContent="Features",D=fh(),j=dh("div"),P=dh("label"),Z=dh("input"),R=mh("\n Mintable\n "),Jh(q.$$.fragment),M=fh(),L=dh("label"),F=dh("input"),V=mh("\n Burnable\n "),Jh(B.$$.fragment),H=fh(),W=dh("label"),J=dh("input"),G=mh("\n Votes\n "),Jh(K.$$.fragment),X=fh(),Y=dh("label"),Q=dh("input"),ee=mh("\n Pausable\n "),Jh(te.$$.fragment),ne=fh(),ie=dh("label"),re=dh("input"),oe=mh("\n Upgradeable\n "),Jh(ae.$$.fragment),se=fh(),Jh(le.$$.fragment),ue=fh(),Jh(de.$$.fragment),me=fh(),Jh(fe.$$.fragment),vh(o,"class","labeled-input"),vh(d,"class","labeled-input"),vh(r,"class","grid grid-cols-[2fr,1fr] gap-2"),vh(b,"class","flex justify-between pr-2"),vh(v,"class","labeled-input"),vh(I,"class","flex justify-between pr-2"),vh(C,"placeholder","0"),vh(C,"pattern",Qv.source),vh(S,"class","labeled-input"),vh(t,"class","controls-section"),vh(Z,"type","checkbox"),kh(P,"checked",e[0].mintable),vh(F,"type","checkbox"),kh(L,"checked",e[0].burnable),vh(J,"type","checkbox"),kh(W,"checked",e[0].votes),vh(Q,"type","checkbox"),kh(Y,"checked",e[0].pausable),vh(re,"type","checkbox"),kh(ie,"checked",e[0].upgradeable),vh(j,"class","checkbox-group"),vh(A,"class","controls-section")},m(ce,pe){ch(ce,t,pe),sh(t,n),sh(t,i),sh(t,r),sh(r,o),sh(o,a),sh(o,s),sh(o,l),$h(l,e[0].name),sh(r,u),sh(r,d),sh(d,p),sh(d,m),sh(d,f),$h(f,e[0].symbol),sh(t,g),sh(t,v),sh(v,b),sh(b,y),Gh($,b,null),sh(v,_),sh(v,k),$h(k,e[0].decimals),sh(t,x),sh(t,S),sh(S,I),sh(I,E),Gh(T,I,null),sh(S,z),sh(S,C),$h(C,e[0].premint),ch(ce,U,pe),ch(ce,A,pe),sh(A,N),sh(A,D),sh(A,j),sh(j,P),sh(P,Z),Z.checked=e[0].mintable,sh(P,R),Gh(q,P,null),sh(j,M),sh(j,L),sh(L,F),F.checked=e[0].burnable,sh(L,V),Gh(B,L,null),sh(j,H),sh(j,W),sh(W,J),J.checked=e[0].votes,sh(W,G),Gh(K,W,null),sh(j,X),sh(j,Y),sh(Y,Q),Q.checked=e[0].pausable,sh(Y,ee),Gh(te,Y,null),sh(j,ne),sh(j,ie),sh(ie,re),re.checked=e[0].upgradeable,sh(ie,oe),Gh(ae,ie,null),ch(ce,se,pe),Gh(le,ce,pe),ch(ce,ue,pe),Gh(de,ce,pe),ch(ce,me,pe),Gh(fe,ce,pe),ge=!0,ve||(be=[gh(l,"input",e[3]),ah(c=E_.call(null,l,e[1]?.name)),gh(f,"input",e[4]),ah(h=E_.call(null,f,e[1]?.symbol)),gh(k,"input",e[5]),ah(w=E_.call(null,k,e[1]?.decimals)),gh(C,"input",e[6]),ah(O=E_.call(null,C,e[1]?.premint)),gh(Z,"change",e[7]),gh(F,"change",e[8]),gh(J,"change",e[9]),gh(Q,"change",e[10]),gh(re,"change",e[11])],ve=!0)},p(e,[t]){1&t&&l.value!==e[0].name&&$h(l,e[0].name),c&&Xf(c.update)&&2&t&&c.update.call(null,e[1]?.name),1&t&&f.value!==e[0].symbol&&$h(f,e[0].symbol),h&&Xf(h.update)&&2&t&&h.update.call(null,e[1]?.symbol);const n={};32768&t&&(n.$$scope={dirty:t,ctx:e}),$.$set(n),1&t&&k.value!==e[0].decimals&&$h(k,e[0].decimals),w&&Xf(w.update)&&2&t&&w.update.call(null,e[1]?.decimals);const i={};32768&t&&(i.$$scope={dirty:t,ctx:e}),T.$set(i),1&t&&C.value!==e[0].premint&&$h(C,e[0].premint),O&&Xf(O.update)&&2&t&&O.update.call(null,e[1]?.premint),1&t&&(Z.checked=e[0].mintable);const r={};32768&t&&(r.$$scope={dirty:t,ctx:e}),q.$set(r),(!ge||1&t)&&kh(P,"checked",e[0].mintable),1&t&&(F.checked=e[0].burnable);const o={};32768&t&&(o.$$scope={dirty:t,ctx:e}),B.$set(o),(!ge||1&t)&&kh(L,"checked",e[0].burnable),1&t&&(J.checked=e[0].votes);const a={};32768&t&&(a.$$scope={dirty:t,ctx:e}),K.$set(a),(!ge||1&t)&&kh(W,"checked",e[0].votes),1&t&&(Q.checked=e[0].pausable);const s={};32768&t&&(s.$$scope={dirty:t,ctx:e}),te.$set(s),(!ge||1&t)&&kh(Y,"checked",e[0].pausable),1&t&&(re.checked=e[0].upgradeable);const u={};32768&t&&(u.$$scope={dirty:t,ctx:e}),ae.$set(u),(!ge||1&t)&&kh(ie,"checked",e[0].upgradeable);const d={};4&t&&(d.required=e[2]),!ce&&1&t&&(ce=!0,d.access=e[0].access,jh(()=>ce=!1)),le.$set(d);const p={};!pe&&1&t&&(pe=!0,p.explicitImplementations=e[0].explicitImplementations,jh(()=>pe=!1)),de.$set(p);const m={};2&t&&(m.errors=e[1]),!he&&1&t&&(he=!0,m.info=e[0].info,jh(()=>he=!1)),fe.$set(m)},i(e){ge||(Bh($.$$.fragment,e),Bh(T.$$.fragment,e),Bh(q.$$.fragment,e),Bh(B.$$.fragment,e),Bh(K.$$.fragment,e),Bh(te.$$.fragment,e),Bh(ae.$$.fragment,e),Bh(le.$$.fragment,e),Bh(de.$$.fragment,e),Bh(fe.$$.fragment,e),ge=!0)},o(e){Hh($.$$.fragment,e),Hh(T.$$.fragment,e),Hh(q.$$.fragment,e),Hh(B.$$.fragment,e),Hh(K.$$.fragment,e),Hh(te.$$.fragment,e),Hh(ae.$$.fragment,e),Hh(le.$$.fragment,e),Hh(de.$$.fragment,e),Hh(fe.$$.fragment,e),ge=!1},d(e){e&&uh(t),Kh($),Kh(T),e&&uh(U),e&&uh(A),Kh(q),Kh(B),Kh(K),Kh(te),Kh(ae),e&&uh(se),Kh(le,e),e&&uh(ue),Kh(de,e),e&&uh(me),Kh(fe,e),ve=!1,Kf(be)}}}function H_(e,t,n){let i,{opts:r={kind:"Fungible",...Tb.defaults,premint:"",info:{...Mg}}}=t,{errors:o}=t;return e.$$set=e=>{"opts"in e&&n(0,r=e.opts),"errors"in e&&n(1,o=e.errors)},e.$$.update=()=>{1&e.$$.dirty&&n(2,i=Tb.isAccessControlRequired(r))},[r,o,i,function(){r.name=this.value,n(0,r)},function(){r.symbol=this.value,n(0,r)},function(){r.decimals=this.value,n(0,r)},function(){r.premint=this.value,n(0,r)},function(){r.mintable=this.checked,n(0,r)},function(){r.burnable=this.checked,n(0,r)},function(){r.votes=this.checked,n(0,r)},function(){r.pausable=this.checked,n(0,r)},function(){r.upgradeable=this.checked,n(0,r)},function(t){e.$$.not_equal(r.access,t)&&(r.access=t,n(0,r))},function(t){e.$$.not_equal(r.explicitImplementations,t)&&(r.explicitImplementations=t,n(0,r))},function(t){e.$$.not_equal(r.info,t)&&(r.info=t,n(0,r))}]}function W_(e){let t;return{c(){t=mh("Tokens can be minted with arbitrary IDs.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function J_(e){let t;return{c(){t=mh("Tokens will be minted with sequential IDs.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function G_(e){let t,n,i,r,o,a,s,l,c,u,d,p,m,f,h,g,v,b;return a=new Q$({props:{$$slots:{default:[W_]},$$scope:{ctx:e}}}),m=new Q$({props:{$$slots:{default:[J_]},$$scope:{ctx:e}}}),g=bh(e[7][0]),{c(){t=dh("div"),n=dh("label"),i=dh("input"),o=mh("\n Non-Sequential\n "),Jh(a.$$.fragment),l=fh(),c=dh("label"),u=dh("input"),p=mh("\n Sequential\n "),Jh(m.$$.fragment),vh(i,"type","radio"),vh(i,"name","minting-mode"),i.__value="non_sequential",i.value=i.__value,i.disabled=r=e[1]||!e[0],kh(n,"checked","non_sequential"===e[3]),vh(u,"type","radio"),vh(u,"name","minting-mode"),u.__value="sequential",u.value=u.__value,u.disabled=d=e[1]||!e[0],kh(c,"checked","sequential"===e[3]),vh(t,"class","checkbox-group"),g.p(i,u)},m(r,d){ch(r,t,d),sh(t,n),sh(n,i),i.checked=i.__value===e[3],sh(n,o),Gh(a,n,null),sh(t,l),sh(t,c),sh(c,u),u.checked=u.__value===e[3],sh(c,p),Gh(m,c,null),h=!0,v||(b=[gh(i,"change",e[6]),ah(s=E_.call(null,n,e[2]?.mintable)),gh(u,"change",e[8]),ah(f=E_.call(null,c,e[2]?.sequential))],v=!0)},p(e,t){(!h||3&t&&r!==(r=e[1]||!e[0]))&&(i.disabled=r),8&t&&(i.checked=i.__value===e[3]);const o={};1024&t&&(o.$$scope={dirty:t,ctx:e}),a.$set(o),s&&Xf(s.update)&&4&t&&s.update.call(null,e[2]?.mintable),(!h||8&t)&&kh(n,"checked","non_sequential"===e[3]),(!h||3&t&&d!==(d=e[1]||!e[0]))&&(u.disabled=d),8&t&&(u.checked=u.__value===e[3]);const l={};1024&t&&(l.$$scope={dirty:t,ctx:e}),m.$set(l),f&&Xf(f.update)&&4&t&&f.update.call(null,e[2]?.sequential),(!h||8&t)&&kh(c,"checked","sequential"===e[3])},i(e){h||(Bh(a.$$.fragment,e),Bh(m.$$.fragment,e),h=!0)},o(e){Hh(a.$$.fragment,e),Hh(m.$$.fragment,e),h=!1},d(e){e&&uh(t),Kh(a),Kh(m),g.r(),v=!1,Kf(b)}}}function K_(e){let t,n,i;function r(t){e[9](t)}let o={label:"Minting",defaultValue:"non_sequential",helpContent:"Configure minting mode for NFTs.",disabled:e[1],error:e[2]?.mintable||e[2]?.sequential,$$slots:{default:[G_]},$$scope:{ctx:e}};return void 0!==e[3]&&(o.value=e[3]),t=new y_({props:o}),Ch.push(()=>Wh(t,"value",r)),{c(){Jh(t.$$.fragment)},m(e,n){Gh(t,e,n),i=!0},p(e,[i]){const r={};2&i&&(r.disabled=e[1]),4&i&&(r.error=e[2]?.mintable||e[2]?.sequential),1039&i&&(r.$$scope={dirty:i,ctx:e}),!n&&8&i&&(n=!0,r.value=e[3],jh(()=>n=!1)),t.$set(r)},i(e){i||(Bh(t.$$.fragment,e),i=!0)},o(e){Hh(t.$$.fragment,e),i=!1},d(e){Kh(t,e)}}}function X_(e,t,n){let{mintable:i}=t,{sequential:r}=t,{consecutive:o}=t,{errors:a}=t,s=o,l=!1;return e.$$set=e=>{"mintable"in e&&n(0,i=e.mintable),"sequential"in e&&n(4,r=e.sequential),"consecutive"in e&&n(1,o=e.consecutive),"errors"in e&&n(2,a=e.errors)},e.$$.update=()=>{if(2&e.$$.dirty&&n(5,s=o),34&e.$$.dirty&&!s&&o&&n(3,l=!1),8&e.$$.dirty)switch(l){case"sequential":n(4,r=!0),n(0,i=!0);break;case"non_sequential":n(4,r=!1),n(0,i=!0);break;case!1:n(4,r=!1),n(0,i=!1)}},[i,o,a,l,r,s,function(){l=this.__value,n(3,l),n(5,s),n(1,o)},[[]],function(){l=this.__value,n(3,l),n(5,s),n(1,o)},function(e){l=e,n(3,l),n(5,s),n(1,o)}]}class Y_ extends Qh{constructor(e){super(),Yh(this,e,X_,K_,Yf,{mintable:0,sequential:4,consecutive:1,errors:2})}}function Q_(e){let t,n,i;return{c(){t=mh("Sets the metadata URI that the contract returns from "),n=dh("code"),n.textContent="token_uri",i=mh(".")},m(e,r){ch(e,t,r),ch(e,n,r),ch(e,i,r)},p:Hf,d(e){e&&uh(t),e&&uh(n),e&&uh(i)}}}function ek(e){let t;return{c(){t=mh("Token holders will be able to destroy their NFTs.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function tk(e){let t;return{c(){t=mh("Adds vote checkpoints and delegation support. Incompatible with Enumerable and Consecutive.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function nk(e){let t;return{c(){t=mh("Enable on-chain enumeration of tokens. Cannot be used with Consecutive extensions.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function ik(e){let t;return{c(){t=mh("Use consecutive token IDs instead of unique UUIDs. Incompatible with Enumerable extension.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function rk(e){let t;return{c(){t=mh("Privileged accounts can pause core functionality.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function ok(e){let t;return{c(){t=mh("Allows the contract to be upgraded by the owner.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function ak(e){let t,n,i,r,o,a,s,l,c,u,d,p,m,f,h,g,v,b,y,$,_,k,w,x,S,I,E,T,z,C,O,U,A,N,D,j,P,Z,R,q,M,L,F,V,B,H,W,J,G,K,X,Y,Q,ee,te,ne,ie,re,oe,ae,se,le,ce,ue,de,pe,me,fe,he,ge,ve,be,ye,$e,_e,ke,we,xe,Se,Ie,Ee,Te;function ze(t){e[15](t)}function Ce(t){e[16](t)}$=new Q$({props:{$$slots:{default:[Q_]},$$scope:{ctx:e}}}),U=new Q$({props:{$$slots:{default:[ek]},$$scope:{ctx:e}}}),R=new Q$({props:{$$slots:{default:[tk]},$$scope:{ctx:e}}}),W=new Q$({props:{$$slots:{default:[nk]},$$scope:{ctx:e}}}),te=new Q$({props:{$$slots:{default:[ik]},$$scope:{ctx:e}}}),se=new Q$({props:{$$slots:{default:[rk]},$$scope:{ctx:e}}}),pe=new Q$({props:{$$slots:{default:[ok]},$$scope:{ctx:e}}});let Oe={consecutive:e[0].consecutive,errors:{mintable:e[1]?.mintable,sequential:e[1]?.sequential}};function Ue(t){e[17](t)}void 0!==e[0].mintable&&(Oe.mintable=e[0].mintable),void 0!==e[0].sequential&&(Oe.sequential=e[0].sequential),fe=new Y_({props:Oe}),Ch.push(()=>Wh(fe,"mintable",ze)),Ch.push(()=>Wh(fe,"sequential",Ce));let Ae={required:e[2]};function Ne(t){e[18](t)}void 0!==e[0].access&&(Ae.access=e[0].access),be=new S_({props:Ae}),Ch.push(()=>Wh(be,"access",Ue));let De={};function je(t){e[19](t)}void 0!==e[0].explicitImplementations&&(De.explicitImplementations=e[0].explicitImplementations),_e=new P_({props:De}),Ch.push(()=>Wh(_e,"explicitImplementations",Ne));let Pe={errors:e[1]};return void 0!==e[0].info&&(Pe.info=e[0].info),xe=new O_({props:Pe}),Ch.push(()=>Wh(xe,"info",je)),{c(){t=dh("section"),n=dh("h1"),n.textContent="Settings",i=fh(),r=dh("div"),o=dh("label"),a=dh("span"),a.textContent="Name",s=fh(),l=dh("input"),u=fh(),d=dh("label"),p=dh("span"),p.textContent="Symbol",m=fh(),f=dh("input"),g=fh(),v=dh("label"),b=dh("span"),y=mh("Token URI\n "),Jh($.$$.fragment),_=fh(),k=dh("input"),x=fh(),S=dh("section"),I=dh("h1"),I.textContent="Features",E=fh(),T=dh("div"),z=dh("label"),C=dh("input"),O=mh("\n Burnable\n "),Jh(U.$$.fragment),A=fh(),N=dh("label"),D=dh("input"),Z=mh("\n Votes\n "),Jh(R.$$.fragment),M=fh(),L=dh("label"),F=dh("input"),H=mh("\n Enumerable\n "),Jh(W.$$.fragment),G=fh(),K=dh("label"),X=dh("input"),ee=mh("\n Consecutive\n "),Jh(te.$$.fragment),ie=fh(),re=dh("label"),oe=dh("input"),ae=mh("\n Pausable\n "),Jh(se.$$.fragment),le=fh(),ce=dh("label"),ue=dh("input"),de=mh("\n Upgradeable\n "),Jh(pe.$$.fragment),me=fh(),Jh(fe.$$.fragment),ve=fh(),Jh(be.$$.fragment),$e=fh(),Jh(_e.$$.fragment),we=fh(),Jh(xe.$$.fragment),vh(o,"class","labeled-input"),vh(d,"class","labeled-input"),vh(r,"class","grid grid-cols-[2fr,1fr] gap-2"),vh(b,"class","flex justify-between pr-2"),vh(k,"placeholder","https://..."),vh(v,"class","labeled-input"),vh(t,"class","controls-section"),vh(C,"type","checkbox"),kh(z,"checked",e[0].burnable),vh(D,"type","checkbox"),D.checked=j=e[0].votes,D.disabled=P=e[0].enumerable||e[0].consecutive,kh(N,"checked",e[0].votes),kh(N,"disabled",e[0].enumerable||e[0].consecutive),vh(F,"type","checkbox"),F.checked=V=e[0].enumerable,F.disabled=B=e[0].votes||e[0].consecutive,kh(L,"checked",e[0].enumerable),kh(L,"disabled",e[0].votes||e[0].consecutive),vh(X,"type","checkbox"),X.checked=Y=e[0].consecutive,X.disabled=Q=e[0].votes||e[0].enumerable,kh(K,"checked",e[0].consecutive),kh(K,"disabled",e[0].votes||e[0].enumerable),vh(oe,"type","checkbox"),kh(re,"checked",e[0].pausable),vh(ue,"type","checkbox"),kh(ce,"checked",e[0].upgradeable),vh(T,"class","checkbox-group"),vh(S,"class","controls-section")},m(j,P){ch(j,t,P),sh(t,n),sh(t,i),sh(t,r),sh(r,o),sh(o,a),sh(o,s),sh(o,l),$h(l,e[0].name),sh(r,u),sh(r,d),sh(d,p),sh(d,m),sh(d,f),$h(f,e[0].symbol),sh(t,g),sh(t,v),sh(v,b),sh(b,y),Gh($,b,null),sh(v,_),sh(v,k),$h(k,e[0].tokenUri),ch(j,x,P),ch(j,S,P),sh(S,I),sh(S,E),sh(S,T),sh(T,z),sh(z,C),C.checked=e[0].burnable,sh(z,O),Gh(U,z,null),sh(T,A),sh(T,N),sh(N,D),sh(N,Z),Gh(R,N,null),sh(T,M),sh(T,L),sh(L,F),sh(L,H),Gh(W,L,null),sh(T,G),sh(T,K),sh(K,X),sh(K,ee),Gh(te,K,null),sh(T,ie),sh(T,re),sh(re,oe),oe.checked=e[0].pausable,sh(re,ae),Gh(se,re,null),sh(T,le),sh(T,ce),sh(ce,ue),ue.checked=e[0].upgradeable,sh(ce,de),Gh(pe,ce,null),ch(j,me,P),Gh(fe,j,P),ch(j,ve,P),Gh(be,j,P),ch(j,$e,P),Gh(_e,j,P),ch(j,we,P),Gh(xe,j,P),Ie=!0,Ee||(Te=[gh(l,"input",e[6]),ah(c=E_.call(null,l,e[1]?.name)),gh(f,"input",e[7]),ah(h=E_.call(null,f,e[1]?.symbol)),gh(k,"input",e[8]),ah(w=E_.call(null,k,e[1]?.tokenUri)),gh(C,"change",e[9]),gh(D,"change",e[10]),ah(q=E_.call(null,N,e[1]?.votes)),gh(F,"change",e[11]),ah(J=E_.call(null,L,e[1]?.enumerable)),gh(X,"change",e[12]),ah(ne=E_.call(null,K,e[1]?.consecutive)),gh(oe,"change",e[13]),gh(ue,"change",e[14])],Ee=!0)},p(e,[t]){1&t&&l.value!==e[0].name&&$h(l,e[0].name),c&&Xf(c.update)&&2&t&&c.update.call(null,e[1]?.name),1&t&&f.value!==e[0].symbol&&$h(f,e[0].symbol),h&&Xf(h.update)&&2&t&&h.update.call(null,e[1]?.symbol);const n={};1048576&t&&(n.$$scope={dirty:t,ctx:e}),$.$set(n),1&t&&k.value!==e[0].tokenUri&&$h(k,e[0].tokenUri),w&&Xf(w.update)&&2&t&&w.update.call(null,e[1]?.tokenUri),1&t&&(C.checked=e[0].burnable);const i={};1048576&t&&(i.$$scope={dirty:t,ctx:e}),U.$set(i),(!Ie||1&t)&&kh(z,"checked",e[0].burnable),(!Ie||1&t&&j!==(j=e[0].votes))&&(D.checked=j),(!Ie||1&t&&P!==(P=e[0].enumerable||e[0].consecutive))&&(D.disabled=P);const r={};1048576&t&&(r.$$scope={dirty:t,ctx:e}),R.$set(r),q&&Xf(q.update)&&2&t&&q.update.call(null,e[1]?.votes),(!Ie||1&t)&&kh(N,"checked",e[0].votes),(!Ie||1&t)&&kh(N,"disabled",e[0].enumerable||e[0].consecutive),(!Ie||1&t&&V!==(V=e[0].enumerable))&&(F.checked=V),(!Ie||1&t&&B!==(B=e[0].votes||e[0].consecutive))&&(F.disabled=B);const o={};1048576&t&&(o.$$scope={dirty:t,ctx:e}),W.$set(o),J&&Xf(J.update)&&2&t&&J.update.call(null,e[1]?.enumerable),(!Ie||1&t)&&kh(L,"checked",e[0].enumerable),(!Ie||1&t)&&kh(L,"disabled",e[0].votes||e[0].consecutive),(!Ie||1&t&&Y!==(Y=e[0].consecutive))&&(X.checked=Y),(!Ie||1&t&&Q!==(Q=e[0].votes||e[0].enumerable))&&(X.disabled=Q);const a={};1048576&t&&(a.$$scope={dirty:t,ctx:e}),te.$set(a),ne&&Xf(ne.update)&&2&t&&ne.update.call(null,e[1]?.consecutive),(!Ie||1&t)&&kh(K,"checked",e[0].consecutive),(!Ie||1&t)&&kh(K,"disabled",e[0].votes||e[0].enumerable),1&t&&(oe.checked=e[0].pausable);const s={};1048576&t&&(s.$$scope={dirty:t,ctx:e}),se.$set(s),(!Ie||1&t)&&kh(re,"checked",e[0].pausable),1&t&&(ue.checked=e[0].upgradeable);const u={};1048576&t&&(u.$$scope={dirty:t,ctx:e}),pe.$set(u),(!Ie||1&t)&&kh(ce,"checked",e[0].upgradeable);const d={};1&t&&(d.consecutive=e[0].consecutive),2&t&&(d.errors={mintable:e[1]?.mintable,sequential:e[1]?.sequential}),!he&&1&t&&(he=!0,d.mintable=e[0].mintable,jh(()=>he=!1)),!ge&&1&t&&(ge=!0,d.sequential=e[0].sequential,jh(()=>ge=!1)),fe.$set(d);const p={};4&t&&(p.required=e[2]),!ye&&1&t&&(ye=!0,p.access=e[0].access,jh(()=>ye=!1)),be.$set(p);const m={};!ke&&1&t&&(ke=!0,m.explicitImplementations=e[0].explicitImplementations,jh(()=>ke=!1)),_e.$set(m);const g={};2&t&&(g.errors=e[1]),!Se&&1&t&&(Se=!0,g.info=e[0].info,jh(()=>Se=!1)),xe.$set(g)},i(e){Ie||(Bh($.$$.fragment,e),Bh(U.$$.fragment,e),Bh(R.$$.fragment,e),Bh(W.$$.fragment,e),Bh(te.$$.fragment,e),Bh(se.$$.fragment,e),Bh(pe.$$.fragment,e),Bh(fe.$$.fragment,e),Bh(be.$$.fragment,e),Bh(_e.$$.fragment,e),Bh(xe.$$.fragment,e),Ie=!0)},o(e){Hh($.$$.fragment,e),Hh(U.$$.fragment,e),Hh(R.$$.fragment,e),Hh(W.$$.fragment,e),Hh(te.$$.fragment,e),Hh(se.$$.fragment,e),Hh(pe.$$.fragment,e),Hh(fe.$$.fragment,e),Hh(be.$$.fragment,e),Hh(_e.$$.fragment,e),Hh(xe.$$.fragment,e),Ie=!1},d(e){e&&uh(t),Kh($),e&&uh(x),e&&uh(S),Kh(U),Kh(R),Kh(W),Kh(te),Kh(se),Kh(pe),e&&uh(me),Kh(fe,e),e&&uh(ve),Kh(be,e),e&&uh($e),Kh(_e,e),e&&uh(we),Kh(xe,e),Ee=!1,Kf(Te)}}}function sk(e,t,n){let i,{opts:r={kind:"NonFungible",...Cb.defaults,info:{...Mg}}}=t,{errors:o}=t;function a(e){e&&(n(0,r.mintable=!1,r),n(0,r.enumerable=!1,r),n(0,r.votes=!1,r)),n(0,r.consecutive=e,r)}function s(e){e&&(n(0,r.enumerable=!1,r),n(0,r.consecutive=!1,r)),n(0,r.votes=e,r)}function l(e){e&&(n(0,r.consecutive=!1,r),n(0,r.votes=!1,r)),n(0,r.enumerable=e,r)}return e.$$set=e=>{"opts"in e&&n(0,r=e.opts),"errors"in e&&n(1,o=e.errors)},e.$$.update=()=>{1&e.$$.dirty&&n(2,i=Cb.isAccessControlRequired(r))},[r,o,i,a,s,l,function(){r.name=this.value,n(0,r)},function(){r.symbol=this.value,n(0,r)},function(){r.tokenUri=this.value,n(0,r)},function(){r.burnable=this.checked,n(0,r)},e=>s(e.currentTarget.checked),e=>l(e.currentTarget.checked),e=>a(e.currentTarget.checked),function(){r.pausable=this.checked,n(0,r)},function(){r.upgradeable=this.checked,n(0,r)},function(t){e.$$.not_equal(r.mintable,t)&&(r.mintable=t,n(0,r))},function(t){e.$$.not_equal(r.sequential,t)&&(r.sequential=t,n(0,r))},function(t){e.$$.not_equal(r.access,t)&&(r.access=t,n(0,r))},function(t){e.$$.not_equal(r.explicitImplementations,t)&&(r.explicitImplementations=t,n(0,r))},function(t){e.$$.not_equal(r.info,t)&&(r.info=t,n(0,r))}]}function lk(e){let t;return{c(){t=mh("The number of decimals used to represent token amounts. Defaults to 7.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function ck(e){let t;return{c(){t=mh("Create an initial amount of tokens for the owner.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function uk(e){let t;return{c(){t=mh("Privileged accounts will be able to create more supply.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function dk(e){let t;return{c(){t=mh("Token holders will be able to destroy their tokens.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function pk(e){let t;return{c(){t=mh("Adds vote checkpoints and delegation support. Incompatible with stablecoin limitations.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function mk(e){let t,n,i;return{c(){t=mh("Privileged accounts will be able to pause the functionality marked with "),n=dh("code"),n.textContent="when_not_paused",i=mh(". Useful for\n emergency response.")},m(e,r){ch(e,t,r),ch(e,n,r),ch(e,i,r)},p:Hf,d(e){e&&uh(t),e&&uh(n),e&&uh(i)}}}function fk(e){let t;return{c(){t=mh("Allows the contract to be upgraded by the owner.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function hk(e){let t;return{c(){t=mh("Allows a list of addresses to transfer tokens.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function gk(e){let t;return{c(){t=mh("Blocks a list of addresses from transferring tokens.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function vk(e){let t,n,i,r,o,a,s,l,c,u,d,p,m,f;return o=new Q$({props:{$$slots:{default:[hk]},$$scope:{ctx:e}}}),u=new Q$({props:{$$slots:{default:[gk]},$$scope:{ctx:e}}}),p=bh(e[13][0]),{c(){t=dh("div"),n=dh("label"),i=dh("input"),r=mh("\n Allowlist\n "),Jh(o.$$.fragment),a=fh(),s=dh("label"),l=dh("input"),c=mh("\n Blocklist\n "),Jh(u.$$.fragment),vh(i,"type","radio"),i.__value="allowlist",i.value=i.__value,kh(n,"checked","allowlist"===e[0].limitations),vh(l,"type","radio"),l.__value="blocklist",l.value=l.__value,kh(s,"checked","blocklist"===e[0].limitations),vh(t,"class","checkbox-group"),p.p(i,l)},m(p,h){ch(p,t,h),sh(t,n),sh(n,i),i.checked=i.__value===e[0].limitations,sh(n,r),Gh(o,n,null),sh(t,a),sh(t,s),sh(s,l),l.checked=l.__value===e[0].limitations,sh(s,c),Gh(u,s,null),d=!0,m||(f=[gh(i,"change",e[12]),gh(l,"change",e[14])],m=!0)},p(e,t){1&t&&(i.checked=i.__value===e[0].limitations);const r={};524288&t&&(r.$$scope={dirty:t,ctx:e}),o.$set(r),(!d||1&t)&&kh(n,"checked","allowlist"===e[0].limitations),1&t&&(l.checked=l.__value===e[0].limitations);const a={};524288&t&&(a.$$scope={dirty:t,ctx:e}),u.$set(a),(!d||1&t)&&kh(s,"checked","blocklist"===e[0].limitations)},i(e){d||(Bh(o.$$.fragment,e),Bh(u.$$.fragment,e),d=!0)},o(e){Hh(o.$$.fragment,e),Hh(u.$$.fragment,e),d=!1},d(e){e&&uh(t),Kh(o),Kh(u),p.r(),m=!1,Kf(f)}}}function bk(e){let t,n,i,r,o,a,s,l,c,u,d,p,m,f,h,g,v,b,y,$,_,k,w,x,S,I,E,T,z,C,O,U,A,N,D,j,P,Z,R,q,M,L,F,V,B,H,W,J,G,K,X,Y,Q,ee,te,ne,ie,re,oe,ae,se,le,ce,ue,de,pe,me,fe,he,ge,ve,be,ye,$e,_e,ke;function we(t){e[15](t)}$=new Q$({props:{$$slots:{default:[lk]},$$scope:{ctx:e}}}),T=new Q$({props:{$$slots:{default:[ck]},$$scope:{ctx:e}}}),q=new Q$({props:{$$slots:{default:[uk]},$$scope:{ctx:e}}}),B=new Q$({props:{$$slots:{default:[dk]},$$scope:{ctx:e}}}),K=new Q$({props:{$$slots:{default:[pk]},$$scope:{ctx:e}}}),ne=new Q$({props:{$$slots:{default:[mk]},$$scope:{ctx:e}}}),se=new Q$({props:{$$slots:{default:[fk]},$$scope:{ctx:e}}});let xe={label:"Limitations",defaultValue:"allowlist",helpContent:"Restricts certain users from transferring tokens, either via allowing or blocking them.",$$slots:{default:[vk]},$$scope:{ctx:e}};function Se(t){e[16](t)}void 0!==e[0].limitations&&(xe.value=e[0].limitations),ce=new y_({props:xe}),Ch.push(()=>Wh(ce,"value",we));let Ie={required:e[2]};function Ee(t){e[17](t)}void 0!==e[0].access&&(Ie.access=e[0].access),pe=new S_({props:Ie}),Ch.push(()=>Wh(pe,"access",Se));let Te={};function ze(t){e[18](t)}void 0!==e[0].explicitImplementations&&(Te.explicitImplementations=e[0].explicitImplementations),he=new P_({props:Te}),Ch.push(()=>Wh(he,"explicitImplementations",Ee));let Ce={errors:e[1]};return void 0!==e[0].info&&(Ce.info=e[0].info),be=new O_({props:Ce}),Ch.push(()=>Wh(be,"info",ze)),{c(){t=dh("section"),n=dh("h1"),n.textContent="Settings",i=fh(),r=dh("div"),o=dh("label"),a=dh("span"),a.textContent="Name",s=fh(),l=dh("input"),u=fh(),d=dh("label"),p=dh("span"),p.textContent="Symbol",m=fh(),f=dh("input"),g=fh(),v=dh("label"),b=dh("span"),y=mh("Decimals\n "),Jh($.$$.fragment),_=fh(),k=dh("input"),x=fh(),S=dh("label"),I=dh("span"),E=mh("Premint\n "),Jh(T.$$.fragment),z=fh(),C=dh("input"),U=fh(),A=dh("section"),N=dh("h1"),N.textContent="Features",D=fh(),j=dh("div"),P=dh("label"),Z=dh("input"),R=mh("\n Mintable\n "),Jh(q.$$.fragment),M=fh(),L=dh("label"),F=dh("input"),V=mh("\n Burnable\n "),Jh(B.$$.fragment),H=fh(),W=dh("label"),J=dh("input"),G=mh("\n Votes\n "),Jh(K.$$.fragment),Y=fh(),Q=dh("label"),ee=dh("input"),te=mh("\n Pausable\n "),Jh(ne.$$.fragment),ie=fh(),re=dh("label"),oe=dh("input"),ae=mh("\n Upgradeable\n "),Jh(se.$$.fragment),le=fh(),Jh(ce.$$.fragment),de=fh(),Jh(pe.$$.fragment),fe=fh(),Jh(he.$$.fragment),ve=fh(),Jh(be.$$.fragment),vh(o,"class","labeled-input"),vh(d,"class","labeled-input"),vh(r,"class","grid grid-cols-[2fr,1fr] gap-2"),vh(b,"class","flex justify-between pr-2"),vh(v,"class","labeled-input"),vh(I,"class","flex justify-between pr-2"),vh(C,"placeholder","0"),vh(C,"pattern",Qv.source),vh(S,"class","labeled-input"),vh(t,"class","controls-section"),vh(Z,"type","checkbox"),kh(P,"checked",e[0].mintable),vh(F,"type","checkbox"),kh(L,"checked",e[0].burnable),vh(J,"type","checkbox"),kh(W,"checked",e[0].votes),vh(ee,"type","checkbox"),kh(Q,"checked",e[0].pausable),vh(oe,"type","checkbox"),kh(re,"checked",e[0].upgradeable),vh(j,"class","checkbox-group"),vh(A,"class","controls-section")},m(ue,me){ch(ue,t,me),sh(t,n),sh(t,i),sh(t,r),sh(r,o),sh(o,a),sh(o,s),sh(o,l),$h(l,e[0].name),sh(r,u),sh(r,d),sh(d,p),sh(d,m),sh(d,f),$h(f,e[0].symbol),sh(t,g),sh(t,v),sh(v,b),sh(b,y),Gh($,b,null),sh(v,_),sh(v,k),$h(k,e[0].decimals),sh(t,x),sh(t,S),sh(S,I),sh(I,E),Gh(T,I,null),sh(S,z),sh(S,C),$h(C,e[0].premint),ch(ue,U,me),ch(ue,A,me),sh(A,N),sh(A,D),sh(A,j),sh(j,P),sh(P,Z),Z.checked=e[0].mintable,sh(P,R),Gh(q,P,null),sh(j,M),sh(j,L),sh(L,F),F.checked=e[0].burnable,sh(L,V),Gh(B,L,null),sh(j,H),sh(j,W),sh(W,J),J.checked=e[0].votes,sh(W,G),Gh(K,W,null),sh(j,Y),sh(j,Q),sh(Q,ee),ee.checked=e[0].pausable,sh(Q,te),Gh(ne,Q,null),sh(j,ie),sh(j,re),sh(re,oe),oe.checked=e[0].upgradeable,sh(re,ae),Gh(se,re,null),ch(ue,le,me),Gh(ce,ue,me),ch(ue,de,me),Gh(pe,ue,me),ch(ue,fe,me),Gh(he,ue,me),ch(ue,ve,me),Gh(be,ue,me),$e=!0,_e||(ke=[gh(l,"input",e[3]),ah(c=E_.call(null,l,e[1]?.name)),gh(f,"input",e[4]),ah(h=E_.call(null,f,e[1]?.symbol)),gh(k,"input",e[5]),ah(w=E_.call(null,k,e[1]?.decimals)),gh(C,"input",e[6]),ah(O=E_.call(null,C,e[1]?.premint)),gh(Z,"change",e[7]),gh(F,"change",e[8]),gh(J,"change",e[9]),ah(X=E_.call(null,W,e[1]?.votes)),gh(ee,"change",e[10]),gh(oe,"change",e[11])],_e=!0)},p(e,[t]){1&t&&l.value!==e[0].name&&$h(l,e[0].name),c&&Xf(c.update)&&2&t&&c.update.call(null,e[1]?.name),1&t&&f.value!==e[0].symbol&&$h(f,e[0].symbol),h&&Xf(h.update)&&2&t&&h.update.call(null,e[1]?.symbol);const n={};524288&t&&(n.$$scope={dirty:t,ctx:e}),$.$set(n),1&t&&k.value!==e[0].decimals&&$h(k,e[0].decimals),w&&Xf(w.update)&&2&t&&w.update.call(null,e[1]?.decimals);const i={};524288&t&&(i.$$scope={dirty:t,ctx:e}),T.$set(i),1&t&&C.value!==e[0].premint&&$h(C,e[0].premint),O&&Xf(O.update)&&2&t&&O.update.call(null,e[1]?.premint),1&t&&(Z.checked=e[0].mintable);const r={};524288&t&&(r.$$scope={dirty:t,ctx:e}),q.$set(r),(!$e||1&t)&&kh(P,"checked",e[0].mintable),1&t&&(F.checked=e[0].burnable);const o={};524288&t&&(o.$$scope={dirty:t,ctx:e}),B.$set(o),(!$e||1&t)&&kh(L,"checked",e[0].burnable),1&t&&(J.checked=e[0].votes);const a={};524288&t&&(a.$$scope={dirty:t,ctx:e}),K.$set(a),X&&Xf(X.update)&&2&t&&X.update.call(null,e[1]?.votes),(!$e||1&t)&&kh(W,"checked",e[0].votes),1&t&&(ee.checked=e[0].pausable);const s={};524288&t&&(s.$$scope={dirty:t,ctx:e}),ne.$set(s),(!$e||1&t)&&kh(Q,"checked",e[0].pausable),1&t&&(oe.checked=e[0].upgradeable);const u={};524288&t&&(u.$$scope={dirty:t,ctx:e}),se.$set(u),(!$e||1&t)&&kh(re,"checked",e[0].upgradeable);const d={};524289&t&&(d.$$scope={dirty:t,ctx:e}),!ue&&1&t&&(ue=!0,d.value=e[0].limitations,jh(()=>ue=!1)),ce.$set(d);const p={};4&t&&(p.required=e[2]),!me&&1&t&&(me=!0,p.access=e[0].access,jh(()=>me=!1)),pe.$set(p);const m={};!ge&&1&t&&(ge=!0,m.explicitImplementations=e[0].explicitImplementations,jh(()=>ge=!1)),he.$set(m);const g={};2&t&&(g.errors=e[1]),!ye&&1&t&&(ye=!0,g.info=e[0].info,jh(()=>ye=!1)),be.$set(g)},i(e){$e||(Bh($.$$.fragment,e),Bh(T.$$.fragment,e),Bh(q.$$.fragment,e),Bh(B.$$.fragment,e),Bh(K.$$.fragment,e),Bh(ne.$$.fragment,e),Bh(se.$$.fragment,e),Bh(ce.$$.fragment,e),Bh(pe.$$.fragment,e),Bh(he.$$.fragment,e),Bh(be.$$.fragment,e),$e=!0)},o(e){Hh($.$$.fragment,e),Hh(T.$$.fragment,e),Hh(q.$$.fragment,e),Hh(B.$$.fragment,e),Hh(K.$$.fragment,e),Hh(ne.$$.fragment,e),Hh(se.$$.fragment,e),Hh(ce.$$.fragment,e),Hh(pe.$$.fragment,e),Hh(he.$$.fragment,e),Hh(be.$$.fragment,e),$e=!1},d(e){e&&uh(t),Kh($),Kh(T),e&&uh(U),e&&uh(A),Kh(q),Kh(B),Kh(K),Kh(ne),Kh(se),e&&uh(le),Kh(ce,e),e&&uh(de),Kh(pe,e),e&&uh(fe),Kh(he,e),e&&uh(ve),Kh(be,e),_e=!1,Kf(ke)}}}function yk(e,t,n){let i,{opts:r={kind:"Stablecoin",...Ob.defaults,premint:"",info:{...Mg}}}=t,{errors:o}=t;return e.$$set=e=>{"opts"in e&&n(0,r=e.opts),"errors"in e&&n(1,o=e.errors)},e.$$.update=()=>{1&e.$$.dirty&&n(2,i=Ob.isAccessControlRequired(r))},[r,o,i,function(){r.name=this.value,n(0,r)},function(){r.symbol=this.value,n(0,r)},function(){r.decimals=this.value,n(0,r)},function(){r.premint=this.value,n(0,r)},function(){r.mintable=this.checked,n(0,r)},function(){r.burnable=this.checked,n(0,r)},function(){r.votes=this.checked,n(0,r)},function(){r.pausable=this.checked,n(0,r)},function(){r.upgradeable=this.checked,n(0,r)},function(){r.limitations=this.__value,n(0,r)},[[]],function(){r.limitations=this.__value,n(0,r)},function(t){e.$$.not_equal(r.limitations,t)&&(r.limitations=t,n(0,r))},function(t){e.$$.not_equal(r.access,t)&&(r.access=t,n(0,r))},function(t){e.$$.not_equal(r.explicitImplementations,t)&&(r.explicitImplementations=t,n(0,r))},function(t){e.$$.not_equal(r.info,t)&&(r.info=t,n(0,r))}]}function $k(e){let t,n,i;return{c(){t=mh("Semantic version label exposed by the governor's "),n=dh("code"),n.textContent="version()",i=mh(" function. It is informational; has no\n effect on contract behavior.")},m(e,r){ch(e,t,r),ch(e,n,r),ch(e,i,r)},p:Hf,d(e){e&&uh(t),e&&uh(n),e&&uh(i)}}}function _k(e){let t;return{c(){t=mh("Number of ledgers before voting starts after a proposal is created (17,000 ledgers are approx. 1 day).")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function kk(e){let t;return{c(){t=mh("Number of ledgers voting remains open (120,000 ledgers are approx. 1 week).")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function wk(e){let t;return{c(){t=mh("Minimum voting power required to create proposals.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function xk(e){let t;return{c(){t=mh("Minimum number of votes required for a proposal to pass.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function Sk(e){let t;return{c(){t=mh("Adds a timelock mechanism that enforces a delay between proposal queuing and execution.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function Ik(e){let t;return{c(){t=mh("Allows the contract to be upgraded by the configured authority (owner or accounts with the upgrader role).")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function Ek(e){let t,n,i,r,o,a,s,l,c,u,d,p,m,f,h,g,v,b,y,$,_,k,w,x,S,I,E,T,z,C,O,U,A,N,D,j,P,Z,R,q,M,L,F,V,B,H,W,J,G,K,X,Y,Q,ee,te,ne,ie,re,oe,ae,se,le,ce,ue,de,pe,me,fe,he,ge,ve,be,ye,$e,_e,ke,we,xe;function Se(t){e[11](t)}f=new Q$({props:{$$slots:{default:[$k]},$$scope:{ctx:e}}}),S=new Q$({props:{$$slots:{default:[_k]},$$scope:{ctx:e}}}),A=new Q$({props:{$$slots:{default:[kk]},$$scope:{ctx:e}}}),M=new Q$({props:{$$slots:{default:[wk]},$$scope:{ctx:e}}}),G=new Q$({props:{$$slots:{default:[xk]},$$scope:{ctx:e}}}),se=new Q$({props:{$$slots:{default:[Sk]},$$scope:{ctx:e}}}),pe=new Q$({props:{$$slots:{default:[Ik]},$$scope:{ctx:e}}});let Ie={required:e[2]};function Ee(t){e[12](t)}void 0!==e[0].access&&(Ie.access=e[0].access),fe=new S_({props:Ie}),Ch.push(()=>Wh(fe,"access",Se));let Te={};function ze(t){e[13](t)}void 0!==e[0].explicitImplementations&&(Te.explicitImplementations=e[0].explicitImplementations),ve=new P_({props:Te}),Ch.push(()=>Wh(ve,"explicitImplementations",Ee));let Ce={errors:e[1]};return void 0!==e[0].info&&(Ce.info=e[0].info),$e=new O_({props:Ce}),Ch.push(()=>Wh($e,"info",ze)),{c(){t=dh("section"),n=dh("h1"),n.textContent="Settings",i=fh(),r=dh("div"),o=dh("label"),a=dh("span"),a.textContent="Name",s=fh(),l=dh("input"),u=fh(),d=dh("label"),p=dh("span"),m=mh("Version\n "),Jh(f.$$.fragment),h=fh(),g=dh("input"),b=fh(),y=dh("section"),$=dh("h1"),$.textContent="Governance Parameters",_=fh(),k=dh("label"),w=dh("span"),x=mh("Voting Delay\n "),Jh(S.$$.fragment),I=fh(),E=dh("input"),z=fh(),C=dh("label"),O=dh("span"),U=mh("Voting Period\n "),Jh(A.$$.fragment),N=fh(),D=dh("input"),P=fh(),Z=dh("label"),R=dh("span"),q=mh("Proposal Threshold\n "),Jh(M.$$.fragment),L=fh(),F=dh("input"),B=fh(),H=dh("label"),W=dh("span"),J=mh("Quorum\n "),Jh(G.$$.fragment),K=fh(),X=dh("input"),Q=fh(),ee=dh("section"),te=dh("h1"),te.textContent="Features",ne=fh(),ie=dh("div"),re=dh("label"),oe=dh("input"),ae=mh("\n Timelock\n "),Jh(se.$$.fragment),le=fh(),ce=dh("label"),ue=dh("input"),de=mh("\n Upgradeable\n "),Jh(pe.$$.fragment),me=fh(),Jh(fe.$$.fragment),ge=fh(),Jh(ve.$$.fragment),ye=fh(),Jh($e.$$.fragment),vh(o,"class","labeled-input"),vh(p,"class","flex justify-between pr-2"),vh(d,"class","labeled-input"),vh(r,"class","grid grid-cols-[2fr,1fr] gap-2"),vh(t,"class","controls-section"),vh(w,"class","flex justify-between pr-2"),vh(k,"class","labeled-input"),vh(O,"class","flex justify-between pr-2"),vh(C,"class","labeled-input"),vh(R,"class","flex justify-between pr-2"),vh(Z,"class","labeled-input"),vh(W,"class","flex justify-between pr-2"),vh(H,"class","labeled-input"),vh(y,"class","controls-section"),vh(oe,"type","checkbox"),kh(re,"checked",e[0].timelock),vh(ue,"type","checkbox"),kh(ce,"checked",e[0].upgradeable),vh(ie,"class","checkbox-group"),vh(ee,"class","controls-section")},m(he,be){ch(he,t,be),sh(t,n),sh(t,i),sh(t,r),sh(r,o),sh(o,a),sh(o,s),sh(o,l),$h(l,e[0].name),sh(r,u),sh(r,d),sh(d,p),sh(p,m),Gh(f,p,null),sh(d,h),sh(d,g),$h(g,e[0].version),ch(he,b,be),ch(he,y,be),sh(y,$),sh(y,_),sh(y,k),sh(k,w),sh(w,x),Gh(S,w,null),sh(k,I),sh(k,E),$h(E,e[0].votingDelay),sh(y,z),sh(y,C),sh(C,O),sh(O,U),Gh(A,O,null),sh(C,N),sh(C,D),$h(D,e[0].votingPeriod),sh(y,P),sh(y,Z),sh(Z,R),sh(R,q),Gh(M,R,null),sh(Z,L),sh(Z,F),$h(F,e[0].proposalThreshold),sh(y,B),sh(y,H),sh(H,W),sh(W,J),Gh(G,W,null),sh(H,K),sh(H,X),$h(X,e[0].quorum),ch(he,Q,be),ch(he,ee,be),sh(ee,te),sh(ee,ne),sh(ee,ie),sh(ie,re),sh(re,oe),oe.checked=e[0].timelock,sh(re,ae),Gh(se,re,null),sh(ie,le),sh(ie,ce),sh(ce,ue),ue.checked=e[0].upgradeable,sh(ce,de),Gh(pe,ce,null),ch(he,me,be),Gh(fe,he,be),ch(he,ge,be),Gh(ve,he,be),ch(he,ye,be),Gh($e,he,be),ke=!0,we||(xe=[gh(l,"input",e[3]),ah(c=E_.call(null,l,e[1]?.name)),gh(g,"input",e[4]),ah(v=E_.call(null,g,e[1]?.version)),gh(E,"input",e[5]),ah(T=E_.call(null,E,e[1]?.votingDelay)),gh(D,"input",e[6]),ah(j=E_.call(null,D,e[1]?.votingPeriod)),gh(F,"input",e[7]),ah(V=E_.call(null,F,e[1]?.proposalThreshold)),gh(X,"input",e[8]),ah(Y=E_.call(null,X,e[1]?.quorum)),gh(oe,"change",e[9]),gh(ue,"change",e[10])],we=!0)},p(e,[t]){1&t&&l.value!==e[0].name&&$h(l,e[0].name),c&&Xf(c.update)&&2&t&&c.update.call(null,e[1]?.name);const n={};16384&t&&(n.$$scope={dirty:t,ctx:e}),f.$set(n),1&t&&g.value!==e[0].version&&$h(g,e[0].version),v&&Xf(v.update)&&2&t&&v.update.call(null,e[1]?.version);const i={};16384&t&&(i.$$scope={dirty:t,ctx:e}),S.$set(i),1&t&&E.value!==e[0].votingDelay&&$h(E,e[0].votingDelay),T&&Xf(T.update)&&2&t&&T.update.call(null,e[1]?.votingDelay);const r={};16384&t&&(r.$$scope={dirty:t,ctx:e}),A.$set(r),1&t&&D.value!==e[0].votingPeriod&&$h(D,e[0].votingPeriod),j&&Xf(j.update)&&2&t&&j.update.call(null,e[1]?.votingPeriod);const o={};16384&t&&(o.$$scope={dirty:t,ctx:e}),M.$set(o),1&t&&F.value!==e[0].proposalThreshold&&$h(F,e[0].proposalThreshold),V&&Xf(V.update)&&2&t&&V.update.call(null,e[1]?.proposalThreshold);const a={};16384&t&&(a.$$scope={dirty:t,ctx:e}),G.$set(a),1&t&&X.value!==e[0].quorum&&$h(X,e[0].quorum),Y&&Xf(Y.update)&&2&t&&Y.update.call(null,e[1]?.quorum),1&t&&(oe.checked=e[0].timelock);const s={};16384&t&&(s.$$scope={dirty:t,ctx:e}),se.$set(s),(!ke||1&t)&&kh(re,"checked",e[0].timelock),1&t&&(ue.checked=e[0].upgradeable);const u={};16384&t&&(u.$$scope={dirty:t,ctx:e}),pe.$set(u),(!ke||1&t)&&kh(ce,"checked",e[0].upgradeable);const d={};4&t&&(d.required=e[2]),!he&&1&t&&(he=!0,d.access=e[0].access,jh(()=>he=!1)),fe.$set(d);const p={};!be&&1&t&&(be=!0,p.explicitImplementations=e[0].explicitImplementations,jh(()=>be=!1)),ve.$set(p);const m={};2&t&&(m.errors=e[1]),!_e&&1&t&&(_e=!0,m.info=e[0].info,jh(()=>_e=!1)),$e.$set(m)},i(e){ke||(Bh(f.$$.fragment,e),Bh(S.$$.fragment,e),Bh(A.$$.fragment,e),Bh(M.$$.fragment,e),Bh(G.$$.fragment,e),Bh(se.$$.fragment,e),Bh(pe.$$.fragment,e),Bh(fe.$$.fragment,e),Bh(ve.$$.fragment,e),Bh($e.$$.fragment,e),ke=!0)},o(e){Hh(f.$$.fragment,e),Hh(S.$$.fragment,e),Hh(A.$$.fragment,e),Hh(M.$$.fragment,e),Hh(G.$$.fragment,e),Hh(se.$$.fragment,e),Hh(pe.$$.fragment,e),Hh(fe.$$.fragment,e),Hh(ve.$$.fragment,e),Hh($e.$$.fragment,e),ke=!1},d(e){e&&uh(t),Kh(f),e&&uh(b),e&&uh(y),Kh(S),Kh(A),Kh(M),Kh(G),e&&uh(Q),e&&uh(ee),Kh(se),Kh(pe),e&&uh(me),Kh(fe,e),e&&uh(ge),Kh(ve,e),e&&uh(ye),Kh($e,e),we=!1,Kf(xe)}}}function Tk(e,t,n){let i,{opts:r={kind:"Governor",...zb.defaults,info:{...Mg}}}=t,{errors:o}=t;return e.$$set=e=>{"opts"in e&&n(0,r=e.opts),"errors"in e&&n(1,o=e.errors)},e.$$.update=()=>{1&e.$$.dirty&&n(2,i=zb.isAccessControlRequired(r))},[r,o,i,function(){r.name=this.value,n(0,r)},function(){r.version=this.value,n(0,r)},function(){r.votingDelay=this.value,n(0,r)},function(){r.votingPeriod=this.value,n(0,r)},function(){r.proposalThreshold=this.value,n(0,r)},function(){r.quorum=this.value,n(0,r)},function(){r.timelock=this.checked,n(0,r)},function(){r.upgradeable=this.checked,n(0,r)},function(t){e.$$.not_equal(r.access,t)&&(r.access=t,n(0,r))},function(t){e.$$.not_equal(r.explicitImplementations,t)&&(r.explicitImplementations=t,n(0,r))},function(t){e.$$.not_equal(r.info,t)&&(r.info=t,n(0,r))}]}function zk(e){let t;return{c(){t=mh("Virtual offset added to the underlying asset's decimals to derive the vault share decimals, mitigating inflation\n (donation) attacks. The default of 0 is already safe (it makes such attacks non-profitable); higher values add\n more margin, at the cost of virtual shares absorbing a tiny part of the vault's accrued value. Must be between 0\n and 10.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function Ck(e){let t,n,i;return{c(){t=mh("Privileged accounts will be able to pause the functionality marked with "),n=dh("code"),n.textContent="when_not_paused",i=mh(". Useful for\n emergency response.")},m(e,r){ch(e,t,r),ch(e,n,r),ch(e,i,r)},p:Hf,d(e){e&&uh(t),e&&uh(n),e&&uh(i)}}}function Ok(e){let t;return{c(){t=mh("Allows the contract to be upgraded by the owner.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function Uk(e){let t,n,i,r,o,a,s,l,c,u,d,p,m,f,h,g,v,b,y,$,_,k,w,x,S,I,E,T,z,C,O,U,A,N,D,j,P,Z,R,q,M,L,F,V,B,H,W,J,G;function K(t){e[8](t)}$=new Q$({props:{$$slots:{default:[zk]},$$scope:{ctx:e}}}),U=new Q$({props:{$$slots:{default:[Ck]},$$scope:{ctx:e}}}),P=new Q$({props:{$$slots:{default:[Ok]},$$scope:{ctx:e}}});let X={required:e[2]};function Y(t){e[9](t)}void 0!==e[0].access&&(X.access=e[0].access),R=new S_({props:X}),Ch.push(()=>Wh(R,"access",K));let Q={};function ee(t){e[10](t)}void 0!==e[0].explicitImplementations&&(Q.explicitImplementations=e[0].explicitImplementations),L=new P_({props:Q}),Ch.push(()=>Wh(L,"explicitImplementations",Y));let te={errors:e[1]};return void 0!==e[0].info&&(te.info=e[0].info),B=new O_({props:te}),Ch.push(()=>Wh(B,"info",ee)),{c(){t=dh("section"),n=dh("h1"),n.textContent="Settings",i=fh(),r=dh("div"),o=dh("label"),a=dh("span"),a.textContent="Name",s=fh(),l=dh("input"),u=fh(),d=dh("label"),p=dh("span"),p.textContent="Symbol",m=fh(),f=dh("input"),g=fh(),v=dh("label"),b=dh("span"),y=mh("Decimals offset\n "),Jh($.$$.fragment),_=fh(),k=dh("input"),x=fh(),S=dh("section"),I=dh("h1"),I.textContent="Features",E=fh(),T=dh("div"),z=dh("label"),C=dh("input"),O=mh("\n Pausable\n "),Jh(U.$$.fragment),A=fh(),N=dh("label"),D=dh("input"),j=mh("\n Upgradeable\n "),Jh(P.$$.fragment),Z=fh(),Jh(R.$$.fragment),M=fh(),Jh(L.$$.fragment),V=fh(),Jh(B.$$.fragment),vh(o,"class","labeled-input"),vh(d,"class","labeled-input"),vh(r,"class","grid grid-cols-[2fr,1fr] gap-2"),vh(b,"class","flex justify-between pr-2"),vh(v,"class","labeled-input"),vh(t,"class","controls-section"),vh(C,"type","checkbox"),kh(z,"checked",e[0].pausable),vh(D,"type","checkbox"),kh(N,"checked",e[0].upgradeable),vh(T,"class","checkbox-group"),vh(S,"class","controls-section")},m(q,F){ch(q,t,F),sh(t,n),sh(t,i),sh(t,r),sh(r,o),sh(o,a),sh(o,s),sh(o,l),$h(l,e[0].name),sh(r,u),sh(r,d),sh(d,p),sh(d,m),sh(d,f),$h(f,e[0].symbol),sh(t,g),sh(t,v),sh(v,b),sh(b,y),Gh($,b,null),sh(v,_),sh(v,k),$h(k,e[0].decimalsOffset),ch(q,x,F),ch(q,S,F),sh(S,I),sh(S,E),sh(S,T),sh(T,z),sh(z,C),C.checked=e[0].pausable,sh(z,O),Gh(U,z,null),sh(T,A),sh(T,N),sh(N,D),D.checked=e[0].upgradeable,sh(N,j),Gh(P,N,null),ch(q,Z,F),Gh(R,q,F),ch(q,M,F),Gh(L,q,F),ch(q,V,F),Gh(B,q,F),W=!0,J||(G=[gh(l,"input",e[3]),ah(c=E_.call(null,l,e[1]?.name)),gh(f,"input",e[4]),ah(h=E_.call(null,f,e[1]?.symbol)),gh(k,"input",e[5]),ah(w=E_.call(null,k,e[1]?.decimalsOffset)),gh(C,"change",e[6]),gh(D,"change",e[7])],J=!0)},p(e,[t]){1&t&&l.value!==e[0].name&&$h(l,e[0].name),c&&Xf(c.update)&&2&t&&c.update.call(null,e[1]?.name),1&t&&f.value!==e[0].symbol&&$h(f,e[0].symbol),h&&Xf(h.update)&&2&t&&h.update.call(null,e[1]?.symbol);const n={};2048&t&&(n.$$scope={dirty:t,ctx:e}),$.$set(n),1&t&&k.value!==e[0].decimalsOffset&&$h(k,e[0].decimalsOffset),w&&Xf(w.update)&&2&t&&w.update.call(null,e[1]?.decimalsOffset),1&t&&(C.checked=e[0].pausable);const i={};2048&t&&(i.$$scope={dirty:t,ctx:e}),U.$set(i),(!W||1&t)&&kh(z,"checked",e[0].pausable),1&t&&(D.checked=e[0].upgradeable);const r={};2048&t&&(r.$$scope={dirty:t,ctx:e}),P.$set(r),(!W||1&t)&&kh(N,"checked",e[0].upgradeable);const o={};4&t&&(o.required=e[2]),!q&&1&t&&(q=!0,o.access=e[0].access,jh(()=>q=!1)),R.$set(o);const a={};!F&&1&t&&(F=!0,a.explicitImplementations=e[0].explicitImplementations,jh(()=>F=!1)),L.$set(a);const s={};2&t&&(s.errors=e[1]),!H&&1&t&&(H=!0,s.info=e[0].info,jh(()=>H=!1)),B.$set(s)},i(e){W||(Bh($.$$.fragment,e),Bh(U.$$.fragment,e),Bh(P.$$.fragment,e),Bh(R.$$.fragment,e),Bh(L.$$.fragment,e),Bh(B.$$.fragment,e),W=!0)},o(e){Hh($.$$.fragment,e),Hh(U.$$.fragment,e),Hh(P.$$.fragment,e),Hh(R.$$.fragment,e),Hh(L.$$.fragment,e),Hh(B.$$.fragment,e),W=!1},d(e){e&&uh(t),Kh($),e&&uh(x),e&&uh(S),Kh(U),Kh(P),e&&uh(Z),Kh(R,e),e&&uh(M),Kh(L,e),e&&uh(V),Kh(B,e),J=!1,Kf(G)}}}function Ak(e,t,n){let i,{opts:r={kind:"Vault",...Ub.defaults,info:{...Mg}}}=t,{errors:o}=t;return e.$$set=e=>{"opts"in e&&n(0,r=e.opts),"errors"in e&&n(1,o=e.errors)},e.$$.update=()=>{1&e.$$.dirty&&n(2,i=Ub.isAccessControlRequired(r))},[r,o,i,function(){r.name=this.value,n(0,r)},function(){r.symbol=this.value,n(0,r)},function(){r.decimalsOffset=this.value,n(0,r)},function(){r.pausable=this.checked,n(0,r)},function(){r.upgradeable=this.checked,n(0,r)},function(t){e.$$.not_equal(r.access,t)&&(r.access=t,n(0,r))},function(t){e.$$.not_equal(r.explicitImplementations,t)&&(r.explicitImplementations=t,n(0,r))},function(t){e.$$.not_equal(r.info,t)&&(r.info=t,n(0,r))}]}function Nk(e){let t,n,i,r,o;return{c(){t=mh("The kinds of key the account accepts. Ed25519 and WebAuthn keys are checked by a verifier contract whose address\n you pass when deploying: pick one you trust, for example from the Stellar Registry on\n "),n=dh("a"),n.textContent="testnet",i=mh("\n or\n "),r=dh("a"),r.textContent="mainnet",o=mh(". The address must be a\n live verifier contract, otherwise deployment fails: the account canonicalizes every key through its verifier while\n it is being constructed. One verifier serves all keys of its kind."),vh(n,"href","https://testnet.rgstry.xyz/"),vh(n,"target","_blank"),vh(n,"rel","noopener noreferrer"),vh(r,"href","https://stellar.rgstry.xyz/"),vh(r,"target","_blank"),vh(r,"rel","noopener noreferrer")},m(e,a){ch(e,t,a),ch(e,n,a),ch(e,i,a),ch(e,r,a),ch(e,o,a)},p:Hf,d(e){e&&uh(t),e&&uh(n),e&&uh(i),e&&uh(r),e&&uh(o)}}}function Dk(e){let t;return{c(){t=mh("Stellar addresses, either accounts or contracts. The host verifies their signatures, so they need no verifier\n contract.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function jk(e){let t;return{c(){t=mh("Raw 32-byte Ed25519 public keys, checked by an Ed25519 verifier contract. Useful for keys held outside a Stellar\n account.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function Pk(e){let t;return{c(){t=mh("Passkeys, checked by a WebAuthn verifier contract. Each key is the 65-byte secp256r1 public key followed by the\n credential id. Passkeys are bound to the domain that created them.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function Zk(e){let t;return{c(){t=mh("Any m of the n signers can authorize an operation, the usual multisig. The threshold is set at deployment and\n can be changed afterwards through the policy.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function Rk(e){let t;return{c(){t=mh("Each signer carries a weight and the authorizing weights must reach the threshold. Weights are passed at\n deployment as one list, aligned with the signer order the generated contract documents.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function qk(e){let t,n,i,r,o,a,s,l,c,u,d,p,m,f;return o=new Q$({props:{$$slots:{default:[Zk]},$$scope:{ctx:e}}}),u=new Q$({props:{$$slots:{default:[Rk]},$$scope:{ctx:e}}}),p=bh(e[7][0]),{c(){t=dh("div"),n=dh("label"),i=dh("input"),r=mh("\n Simple threshold\n "),Jh(o.$$.fragment),a=fh(),s=dh("label"),l=dh("input"),c=mh("\n Weighted threshold\n "),Jh(u.$$.fragment),vh(i,"type","radio"),i.__value="simple-threshold",i.value=i.__value,kh(n,"checked","simple-threshold"===e[0].policy),vh(l,"type","radio"),l.__value="weighted-threshold",l.value=l.__value,kh(s,"checked","weighted-threshold"===e[0].policy),vh(t,"class","checkbox-group"),p.p(i,l)},m(p,h){ch(p,t,h),sh(t,n),sh(n,i),i.checked=i.__value===e[0].policy,sh(n,r),Gh(o,n,null),sh(t,a),sh(t,s),sh(s,l),l.checked=l.__value===e[0].policy,sh(s,c),Gh(u,s,null),d=!0,m||(f=[gh(i,"change",e[6]),gh(l,"change",e[8])],m=!0)},p(e,t){1&t&&(i.checked=i.__value===e[0].policy);const r={};8192&t&&(r.$$scope={dirty:t,ctx:e}),o.$set(r),(!d||1&t)&&kh(n,"checked","simple-threshold"===e[0].policy),1&t&&(l.checked=l.__value===e[0].policy);const a={};8192&t&&(a.$$scope={dirty:t,ctx:e}),u.$set(a),(!d||1&t)&&kh(s,"checked","weighted-threshold"===e[0].policy)},i(e){d||(Bh(o.$$.fragment,e),Bh(u.$$.fragment,e),d=!0)},o(e){Hh(o.$$.fragment,e),Hh(u.$$.fragment,e),d=!1},d(e){e&&uh(t),Kh(o),Kh(u),p.r(),m=!1,Kf(f)}}}function Mk(e){let t;return{c(){t=mh("Lets the account call other contracts on its own behalf, which is how it manages contracts it owns such as its\n own policy. Keep this on unless you know the account never needs to initiate a call.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function Lk(e){let t;return{c(){t=mh("Allows the contract to be upgraded. The account authorizes its own upgrade through its signers and policy, so\n there is no separate owner or role.")},m(e,n){ch(e,t,n)},d(e){e&&uh(t)}}}function Fk(e){let t,n,i,r,o,a,s,l,c,u,d,p,m,f,h,g,v,b,y,$,_,k,w,x,S,I,E,T,z,C,O,U,A,N,D,j,P,Z,R,q,M,L,F,V,B,H,W,J,G,K,X,Y,Q;function ee(t){e[9](t)}m=new Q$({props:{placement:"left",$$slots:{default:[Nk]},$$scope:{ctx:e}}}),$=new Q$({props:{$$slots:{default:[Dk]},$$scope:{ctx:e}}}),S=new Q$({props:{$$slots:{default:[jk]},$$scope:{ctx:e}}}),C=new Q$({props:{$$slots:{default:[Pk]},$$scope:{ctx:e}}});let te={label:"Policy",defaultValue:"simple-threshold",helpContent:"How the account decides that an operation is authorized. Turned off, every signer must sign (n-of-n). Each threshold policy is a separate contract whose address you pass when deploying, along with the threshold itself; take one you trust, for example from the Stellar Registry at testnet.rgstry.xyz or stellar.rgstry.xyz.",helpLink:"https://docs.openzeppelin.com/stellar-contracts/accounts/policies",$$slots:{default:[qk]},$$scope:{ctx:e}};function ne(t){e[12](t)}void 0!==e[0].policy&&(te.value=e[0].policy),U=new y_({props:te}),Ch.push(()=>Wh(U,"value",ee)),L=new Q$({props:{$$slots:{default:[Mk]},$$scope:{ctx:e}}}),W=new Q$({props:{$$slots:{default:[Lk]},$$scope:{ctx:e}}});let ie={errors:e[1]};return void 0!==e[0].info&&(ie.info=e[0].info),G=new O_({props:ie}),Ch.push(()=>Wh(G,"info",ne)),{c(){t=dh("section"),n=dh("h1"),n.textContent="Settings",i=fh(),r=dh("label"),o=dh("span"),o.textContent="Name",a=fh(),s=dh("input"),c=fh(),u=dh("section"),d=dh("h1"),p=mh("Signers\n "),Jh(m.$$.fragment),f=fh(),h=dh("div"),g=dh("label"),v=dh("input"),y=mh("\n Delegated\n "),Jh($.$$.fragment),_=fh(),k=dh("label"),w=dh("input"),x=mh("\n Ed25519\n "),Jh(S.$$.fragment),I=fh(),E=dh("label"),T=dh("input"),z=mh("\n WebAuthn (passkey)\n "),Jh(C.$$.fragment),O=fh(),Jh(U.$$.fragment),N=fh(),D=dh("section"),j=dh("h1"),j.textContent="Features",P=fh(),Z=dh("div"),R=dh("label"),q=dh("input"),M=mh("\n Execution entry point\n "),Jh(L.$$.fragment),F=fh(),V=dh("label"),B=dh("input"),H=mh("\n Upgradeable\n "),Jh(W.$$.fragment),J=fh(),Jh(G.$$.fragment),vh(r,"class","labeled-input"),vh(t,"class","controls-section"),vh(d,"class","flex justify-between"),vh(v,"type","checkbox"),kh(g,"checked",e[0].delegatedSigners),vh(w,"type","checkbox"),kh(k,"checked",e[0].ed25519Signers),vh(T,"type","checkbox"),kh(E,"checked",e[0].webauthnSigners),vh(h,"class","checkbox-group"),vh(u,"class","controls-section"),vh(q,"type","checkbox"),kh(R,"checked",e[0].executionEntryPoint),vh(B,"type","checkbox"),kh(V,"checked",e[0].upgradeable),vh(Z,"class","checkbox-group"),vh(D,"class","controls-section")},m(A,K){ch(A,t,K),sh(t,n),sh(t,i),sh(t,r),sh(r,o),sh(r,a),sh(r,s),$h(s,e[0].name),ch(A,c,K),ch(A,u,K),sh(u,d),sh(d,p),Gh(m,d,null),sh(u,f),sh(u,h),sh(h,g),sh(g,v),v.checked=e[0].delegatedSigners,sh(g,y),Gh($,g,null),sh(h,_),sh(h,k),sh(k,w),w.checked=e[0].ed25519Signers,sh(k,x),Gh(S,k,null),sh(h,I),sh(h,E),sh(E,T),T.checked=e[0].webauthnSigners,sh(E,z),Gh(C,E,null),ch(A,O,K),Gh(U,A,K),ch(A,N,K),ch(A,D,K),sh(D,j),sh(D,P),sh(D,Z),sh(Z,R),sh(R,q),q.checked=e[0].executionEntryPoint,sh(R,M),Gh(L,R,null),sh(Z,F),sh(Z,V),sh(V,B),B.checked=e[0].upgradeable,sh(V,H),Gh(W,V,null),ch(A,J,K),Gh(G,A,K),X=!0,Y||(Q=[gh(s,"input",e[2]),ah(l=E_.call(null,s,e[1]?.name)),gh(v,"change",e[3]),ah(b=E_.call(null,v,e[1]?.delegatedSigners)),gh(w,"change",e[4]),gh(T,"change",e[5]),gh(q,"change",e[10]),gh(B,"change",e[11])],Y=!0)},p(e,[t]){1&t&&s.value!==e[0].name&&$h(s,e[0].name),l&&Xf(l.update)&&2&t&&l.update.call(null,e[1]?.name);const n={};8192&t&&(n.$$scope={dirty:t,ctx:e}),m.$set(n),1&t&&(v.checked=e[0].delegatedSigners),b&&Xf(b.update)&&2&t&&b.update.call(null,e[1]?.delegatedSigners);const i={};8192&t&&(i.$$scope={dirty:t,ctx:e}),$.$set(i),(!X||1&t)&&kh(g,"checked",e[0].delegatedSigners),1&t&&(w.checked=e[0].ed25519Signers);const r={};8192&t&&(r.$$scope={dirty:t,ctx:e}),S.$set(r),(!X||1&t)&&kh(k,"checked",e[0].ed25519Signers),1&t&&(T.checked=e[0].webauthnSigners);const o={};8192&t&&(o.$$scope={dirty:t,ctx:e}),C.$set(o),(!X||1&t)&&kh(E,"checked",e[0].webauthnSigners);const a={};8193&t&&(a.$$scope={dirty:t,ctx:e}),!A&&1&t&&(A=!0,a.value=e[0].policy,jh(()=>A=!1)),U.$set(a),1&t&&(q.checked=e[0].executionEntryPoint);const c={};8192&t&&(c.$$scope={dirty:t,ctx:e}),L.$set(c),(!X||1&t)&&kh(R,"checked",e[0].executionEntryPoint),1&t&&(B.checked=e[0].upgradeable);const u={};8192&t&&(u.$$scope={dirty:t,ctx:e}),W.$set(u),(!X||1&t)&&kh(V,"checked",e[0].upgradeable);const d={};2&t&&(d.errors=e[1]),!K&&1&t&&(K=!0,d.info=e[0].info,jh(()=>K=!1)),G.$set(d)},i(e){X||(Bh(m.$$.fragment,e),Bh($.$$.fragment,e),Bh(S.$$.fragment,e),Bh(C.$$.fragment,e),Bh(U.$$.fragment,e),Bh(L.$$.fragment,e),Bh(W.$$.fragment,e),Bh(G.$$.fragment,e),X=!0)},o(e){Hh(m.$$.fragment,e),Hh($.$$.fragment,e),Hh(S.$$.fragment,e),Hh(C.$$.fragment,e),Hh(U.$$.fragment,e),Hh(L.$$.fragment,e),Hh(W.$$.fragment,e),Hh(G.$$.fragment,e),X=!1},d(e){e&&uh(t),e&&uh(c),e&&uh(u),Kh(m),Kh($),Kh(S),Kh(C),e&&uh(O),Kh(U,e),e&&uh(N),e&&uh(D),Kh(L),Kh(W),e&&uh(J),Kh(G,e),Y=!1,Kf(Q)}}}function Vk(e,t,n){let{opts:i={kind:"Account",...Eb.defaults,info:{...Mg}}}=t,{errors:r}=t;return e.$$set=e=>{"opts"in e&&n(0,i=e.opts),"errors"in e&&n(1,r=e.errors)},[i,r,function(){i.name=this.value,n(0,i)},function(){i.delegatedSigners=this.checked,n(0,i)},function(){i.ed25519Signers=this.checked,n(0,i)},function(){i.webauthnSigners=this.checked,n(0,i)},function(){i.policy=this.__value,n(0,i)},[[]],function(){i.policy=this.__value,n(0,i)},function(t){e.$$.not_equal(i.policy,t)&&(i.policy=t,n(0,i))},function(){i.executionEntryPoint=this.checked,n(0,i)},function(){i.upgradeable=this.checked,n(0,i)},function(t){e.$$.not_equal(i.info,t)&&(i.info=t,n(0,i))}]}const Bk={emptyContract:()=>new Zg("MyToken"),build:e=>function(e){switch(e.kind){case"Account":return $v(e);case"Fungible":return Yv(e);case"Governor":return rb(e);case"NonFungible":return ub(e);case"Stablecoin":return $b(e);case"Vault":return wb(e);default:throw new Error("Unknown kind")}}(e),print:e=>sv(e),optionsErrors:e=>e instanceof Ag?e.messages:void 0,highlight:e=>jb.highlight("rust",e).value,injectHyperlinks:function(e){const t=/use<\/span> (openzeppelin_[a-zA-Z0-9_]*)/g;let n=e,i=t.exec(e);for(;null!=i;){const[r,o]=i;if(void 0!==r&&void 0!==o){const e="https://github.com/OpenZeppelin/stellar-contracts/blob/v0.7.2/contracts/",t=Pb[o];if(void 0!==t){const i=`use</span> <a class="import-link" href='${e}${t}' target='_blank' rel='noopener noreferrer'>${o}</a>`;n=n.replace(r,i)}}i=t.exec(e)}return n},highlightClass:"-stellar",fence:"rust",controls:{Fungible:class extends Qh{constructor(e){super(),Yh(this,e,H_,B_,Yf,{opts:0,errors:1})}},NonFungible:class extends Qh{constructor(e){super(),Yh(this,e,sk,ak,Yf,{opts:0,errors:1})}},Stablecoin:class extends Qh{constructor(e){super(),Yh(this,e,yk,bk,Yf,{opts:0,errors:1})}},Governor:class extends Qh{constructor(e){super(),Yh(this,e,Tk,Ek,Yf,{opts:0,errors:1})}},Vault:class extends Qh{constructor(e){super(),Yh(this,e,Ak,Uk,Yf,{opts:0,errors:1})}},Account:class extends Qh{constructor(e){super(),Yh(this,e,Vk,Fk,Yf,{opts:0,errors:1})}}}};!function(e,t=document.body){(async function(e,t,n=document.body){const i=new Bf({name:`OpenZeppelin ${t}`,version:"1.0.0"},{},{autoResize:!1});document.documentElement.style.setProperty("--mcp-app-height","560px");const r=new Og({target:n,props:{adapter:e,kind:t,mcpApp:i}}),o=new bf(window.parent,window.parent);i.connect(o).then(async()=>{const e=rg(i);console.info(`[mcp-apps] connected (${t}) hostCapabilities`,i.getHostCapabilities()),r.$set({hostConnected:!0,hostConnectError:void 0,hostSendCaps:e}),await i.sendSizeChanged({height:Ug})}).catch(e=>{const n=e instanceof Error?e.message:String(e);console.error(`[mcp-apps] connect failed for ${t}`,e),r.$set({hostConnected:!1,hostConnectError:n})})})(e,"__OZ_MCP_KIND__",t)}(Bk)}();
17
17
 
18
18
  </script>
19
19
  </body>