@openzeppelin/contracts-mcp 0.7.0 → 0.7.2

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.
@@ -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 u=e.indexOf(s);-1===u&&(u=e.push(s)-1,t[u]={}),r=t[u]&&t[u][o]?t[u][o]:t[u][o]=l()}else r=l();65279===n.charCodeAt(0)&&(n=n.substring(1)),r.styleSheet?r.styleSheet.cssText+=n:r.appendChild(document.createTextNode(n))}function l(){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 /* TRON Red, per the official brand palette (PANTONE 185C). */\n --tron-red: #dc062b;\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 u(e){return e&&Object.assign(s,e),s}function l(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 c(e,t="|"){return e.map(e=>C(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 y(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function b(...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 O=new Set(["string","number","symbol"]),z=new Set(["string","number","bigint","boolean","symbol","undefined"]);function E(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function D(e,t,n){const i=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(i._zod.parent=e),i}function T(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 C(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 A={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]},U={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function P(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 D(e,b(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 y(this,"shape",e),e},checks:[]}))}function j(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=b(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 y(this,"shape",i),i},checks:[]});return D(e,r)}function L(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=b(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return y(this,"shape",n),n}});return D(e,i)}function R(e,t){if(!I(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=b(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return y(this,"shape",n),n}});return D(e,n)}function Z(e,t){const n=b(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return y(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return D(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=b(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 y(this,"shape",r),r},checks:[]});return D(t,r)}function q(e,t,n){const i=b(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 y(this,"shape",r),r}});return D(t,i)}function B(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 H(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function F(e){return"string"==typeof e?e:e?.message}function J(e,t,n){const i={...e,path:e.path??[]};if(!e.message){const r=F(e.inst?._zod.def?.error?.(e))??F(t?.error?.(e))??F(n.customError?.(e))??F(n.localeError?.(e))??"Invalid input";i.message=r}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function V(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function W(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function K(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 G(...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:U,Class:class{constructor(...e){}},NUMBER_FORMAT_RANGES:A,aborted:B,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:y,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:D,cloneDef:function(e){return b(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:E,extend:L,finalizeIssue:J,floatSafeRemainder:h,getElementAtPath:function(e,t){return t?t.reduce((e,t)=>e?.[t],e):e},getEnumValues:l,getLengthableOrigin:W,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:V,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:G,joinValues:c,jsonStringifyReplacer:d,merge:Z,mergeDefs:b,normalizeParams:T,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:j,optionalKeys:N,parsedType:K,partial:M,pick:P,prefixIssues:H,primitiveTypes:z,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:O,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:q,safeExtend:R,shallowClone:S,slugify:_,stringifyPrimitive:C,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:F});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,u=0;for(;u<e.length;){const n=e[u],r=u===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)),u++}}};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 ue=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=>J(e,a,u())));throw k(t,r?.callee),t}return s.value},le=ue(ne),ce=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=>J(e,o,u())));throw k(t,r?.callee),t}return a.value},de=ce(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=>J(e,r,u())))}:{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=>J(e,r,u())))}:{success:!0,data:o.value}},he=fe(ne),ge=e=>(t,n,i)=>{const r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return ue(e)(t,n,r)},ve=ge(ne),ye=e=>(t,n,i)=>ue(e)(t,n,i),be=ye(ne),$e=e=>async(t,n,i)=>{const r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return ce(e)(t,n,r)},_e=$e(ne),ke=e=>async(t,n,i)=>ce(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),Oe=Se(ne),ze=e=>async(t,n,i)=>{const r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return fe(e)(t,n,r)},Ee=ze(ne),De=e=>async(t,n,i)=>fe(e)(t,n,i),Te=De(ne),Ce=/^[cC][^\s-]{8,}$/,Ne=/^[0-9a-z]+$/,Ae=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ue=/^[0-9a-vA-V]{20}$/,Pe=/^[A-Za-z0-9]{27}$/,je=/^[a-zA-Z0-9_-]{21}$/,Le=/^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})$/,Ze=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=Ze(4),qe=Ze(6),Be=Ze(7),He=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Fe=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Je=Fe;function Ve(){return new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")}const We=/^(?:(?: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])$/,Ke=/^(([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}|:))$/,Ge=e=>{const t=E(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 ut(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 lt=e=>new RegExp(`^${e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*"}$`),ct=/^-?\d+n?$/,dt=/^-?\d+$/,pt=/^-?\d+(?:\.\d+)?$/,mt=/^(?:true|false)$/i,ft=/^null$/i,ht=/^undefined$/i,gt=/^[^A-Z]*$/,vt=/^[^a-z]*$/,yt=/^[0-9a-fA-F]*$/;function bt(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function $t(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}const _t=bt(22,"=="),kt=$t(22),wt=bt(27,"="),xt=$t(27),It=bt(43,"="),St=$t(43),Ot=bt(64,""),zt=$t(64),Et=bt(86,"=="),Dt=$t(86);var Tt=Object.freeze({__proto__:null,base64:Qe,base64url:et,bigint:ct,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:Ce,cuid2:Ne,date:ot,datetime:ut,domain:nt,duration:Le,e164:it,email:He,emoji:Ve,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:yt,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:Je,integer:dt,ipv4:We,ipv6:Ke,ksuid:Pe,lowercase:gt,mac:Ge,md5_base64:_t,md5_base64url:kt,md5_hex:/^[0-9a-fA-F]{32}$/,nanoid:je,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:Ot,sha384_base64url:zt,sha384_hex:/^[0-9a-fA-F]{96}$/,sha512_base64:Et,sha512_base64url:Dt,sha512_hex:/^[0-9a-fA-F]{128}$/,string:lt,time:st,ulid:Ae,undefined:ht,unicodeEmail:Fe,uppercase:vt,uuid:Ze,uuid4:Me,uuid6:qe,uuid7:Be,xid:Ue});const Ct=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"},At=i("$ZodCheckLessThan",(e,t)=>{Ct.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})}}),Ut=i("$ZodCheckGreaterThan",(e,t)=>{Ct.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})}}),Pt=i("$ZodCheckMultipleOf",(e,t)=>{Ct.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})}}),jt=i("$ZodCheckNumberFormat",(e,t)=>{Ct.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),i=n?"int":"number",[r,o]=A[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})}}),Lt=i("$ZodCheckBigIntFormat",(e,t)=>{Ct.init(e,t);const[n,i]=U[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;Ct.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:V(i),code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Zt=i("$ZodCheckMinSize",(e,t)=>{var n;Ct.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:V(i),code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Mt=i("$ZodCheckSizeEquals",(e,t)=>{var n;Ct.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:V(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})}}),qt=i("$ZodCheckMaxLength",(e,t)=>{var n;Ct.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=W(i);n.issues.push({origin:r,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Bt=i("$ZodCheckMinLength",(e,t)=>{var n;Ct.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=W(i);n.issues.push({origin:r,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Ht=i("$ZodCheckLengthEquals",(e,t)=>{var n;Ct.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=W(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})}}),Ft=i("$ZodCheckStringFormat",(e,t)=>{var n,i;Ct.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=()=>{})}),Jt=i("$ZodCheckRegex",(e,t)=>{Ft.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})}}),Vt=i("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=gt),Ft.init(e,t)}),Wt=i("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=vt),Ft.init(e,t)}),Kt=i("$ZodCheckIncludes",(e,t)=>{Ct.init(e,t);const n=E(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})}}),Gt=i("$ZodCheckStartsWith",(e,t)=>{Ct.init(e,t);const n=new RegExp(`^${E(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)=>{Ct.init(e,t);const n=new RegExp(`.*${E(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(...H(n,e.issues))}const Qt=i("$ZodCheckProperty",(e,t)=>{Ct.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)=>{Ct.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)=>{Ct.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=B(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=B(e,t)))});else{if(e.issues.length===t)continue;r||(r=B(e,t))}}return i?i.then(()=>e):e},n=(n,r,a)=>{if(B(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()??lt(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)=>{Ft.init(e,t),an.init(e,t)}),un=i("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Re),sn.init(e,t)}),ln=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=Ze(e))}else t.pattern??(t.pattern=Ze());sn.init(e,t)}),cn=i("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=He),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=Ve()),sn.init(e,t)}),mn=i("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=je),sn.init(e,t)}),fn=i("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Ce),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=Ae),sn.init(e,t)}),vn=i("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Ue),sn.init(e,t)}),yn=i("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Pe),sn.init(e,t)}),bn=i("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=ut(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=Le),sn.init(e,t)}),wn=i("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=We),sn.init(e,t),e._zod.bag.format="ipv4"}),xn=i("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Ke),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=Ge(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)}),On=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 zn(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const En=i("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Qe),sn.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{zn(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Dn(e){if(!et.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return zn(t.padEnd(4*Math.ceil(t.length/4),"="))}const Tn=i("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=et),sn.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Dn(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Cn=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 An=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})}}),Un=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})}}),Pn=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}}),jn=i("$ZodNumberFormat",(e,t)=>{jt.init(e,t),Pn.init(e,t)}),Ln=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=ct,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}}),Zn=i("$ZodBigIntFormat",(e,t)=>{Lt.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}}),qn=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}}),Bn=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}}),Hn=i("$ZodAny",(e,t)=>{on.init(e,t),e._zod.parse=e=>e}),Fn=i("$ZodUnknown",(e,t)=>{on.init(e,t),e._zod.parse=e=>e}),Jn=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)}),Vn=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}}),Wn=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 Kn(e,t,n){e.issues.length&&t.issues.push(...H(n,e.issues)),t.value[n]=e.value}const Gn=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=>Kn(t,n,e))):Kn(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(...H(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,u=r.catchall._zod,l=u.def.type,c="optional"===u.optout;for(const r in t){if(s.has(r))continue;if("never"===l){a.push(r);continue}const o=u.run({value:t[r],issues:[]},i);o instanceof Promise?e.push(o.then(e=>Xn(e,n,r,t,c))):Xn(o,n,r,t,c)}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 u=[],l=a.shape;for(const e of a.keys){const i=l[e],r="optional"===i._zod.optout,o=i._zod.run({value:s[e],issues:[]},n);o instanceof Promise?u.push(o.then(n=>Xn(n,t,e,s,r))):Xn(o,t,e,s,r)}return o?Qn(u,s,t,n,i.value,e):u.length?Promise.all(u).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,u=a&&x.value,l=t.catchall;let c;e._zod.parse=(s,d)=>{c??(c=i.value);const p=s.value;return o(p)?a&&u&&!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],u="optional"===s?._zod?.optout;t.write(`const ${n} = ${r(i)};`),u?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),l?Qn([],p,s,d,c,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=>!B(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=>J(e,i,u())))}),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=>J(e,i,u())))}):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])=>li(e,t,n)):li(e,r,o)}});function ui(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=ui(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=ui(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 li(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}),B(e))return e;const a=ui(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 ci=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),u=-1===s?0:n.length-s;if(!t.rest){const t=o.length>n.length,r=o.length<u-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 l=-1;for(const e of n){if(l++,l>=o.length&&l>=u)continue;const t=e._zod.run({value:o[l],issues:[]},r);t instanceof Promise?a.push(t.then(e=>di(e,i,l))):di(t,i,l)}if(t.rest){const e=o.slice(n.length);for(const n of e){l++;const e=t.rest._zod.run({value:n,issues:[]},r);e instanceof Promise?a.push(e.then(e=>di(e,i,l))):di(e,i,l)}}return a.length?Promise.all(a).then(()=>i):i}});function di(e,t,n){e.issues.length&&t.issues.push(...H(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(...H(e,t.issues)),n.value[e]=t.value})):(a.issues.length&&n.issues.push(...H(e,a.issues)),n.value[e]=a.value)}let u;for(const e in r)s.has(e)||(u=u??[],u.push(e));u&&u.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:u})}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=>J(e,i,u())),input:a,path:[a],inst:e});continue}const l=t.valueType._zod.run({value:r[a],issues:[]},i);l instanceof Promise?o.push(l.then(e=>{e.issues.length&&n.issues.push(...H(a,e.issues)),n.value[s.value]=e.value})):(l.issues.length&&n.issues.push(...H(a,l.issues)),n.value[s.value]=l.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 u=t.keyType._zod.run({value:a,issues:[]},i),l=t.valueType._zod.run({value:s,issues:[]},i);u instanceof Promise||l instanceof Promise?o.push(Promise.all([u,l]).then(([t,o])=>{fi(t,o,n,a,r,e,i)})):fi(u,l,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&&(O.has(typeof i)?n.issues.push(...H(i,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:o,issues:e.issues.map(e=>J(e,a,u()))})),t.issues.length&&(O.has(typeof i)?n.issues.push(...H(i,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:o,key:i,issues:t.issues.map(e=>J(e,a,u()))})),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=l(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(e=>O.has(typeof e)).map(e=>"string"==typeof e?E(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}}),yi=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?E(e):e?E(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}}),bi=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 Oi=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))}),zi=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=>Ei(t,e)):Ei(r,e)}});function Ei(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 Di=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)}}),Ti=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=>J(e,n,u()))},input:e.value}),e.issues=[]),e)):(e.value=i.value,i.issues.length&&(e.value=t.catchValue({...e,error:{issues:i.issues.map(e=>J(e,n,u()))},input:e.value}),e.issues=[]),e)}}),Ci=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=>Ai(e,t.in,n)):Ai(i,t.in,n)}const i=t.in._zod.run(e,n);return i instanceof Promise?i.then(e=>Ai(e,t.out,n)):Ai(i,t.out,n)}});function Ai(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const Ui=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=>Pi(e,t,n)):Pi(i,t,n)}{const i=t.out._zod.run(e,n);return i instanceof Promise?i.then(e=>Pi(e,t,n)):Pi(i,t,n)}}});function Pi(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=>ji(e,i,t.out,n)):ji(e,i,t.out,n)}{const i=t.reverseTransform(e.value,e);return i instanceof Promise?i.then(i=>ji(e,i,t.in,n)):ji(e,i,t.in,n)}}function ji(e,t,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},i)}const Li=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 Zi=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&&!z.has(typeof e))throw new Error(`Invalid template literal part: ${e}`);n.push(E(`${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?le(e._def.input,n):n,r=Reflect.apply(t,this,i);return e._def.output?le(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 ci({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)),qi=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))}),Bi=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)}),Hi=i("$ZodCustom",(e,t)=>{Ct.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=>Fi(t,n,i,e));Fi(r,n,i,e)}});function Fi(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(G(e))}}const Ji=()=>{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=K(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?`مدخلات غير مقبولة: يفترض إدخال ${C(e.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${c(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?"ة":""}: ${c(e.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${e.origin}`;case"invalid_union":default:return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${e.origin}`}}};const Vi=()=>{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=K(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 ${C(e.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${c(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":""}: ${c(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 Wi(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 Ki=()=>{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=K(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?`Няправільны ўвод: чакалася ${C(e.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${c(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);if(i){const t=Wi(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=Wi(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?"ключы":"ключ"}: ${c(e.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${e.origin}`;case"invalid_union":default:return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${e.origin}`}}};const Gi=()=>{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=K(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?`Невалиден вход: очакван ${C(e.values[0])}`:`Невалидна опция: очаквано едно от ${c(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?"ове":""}: ${c(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=K(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 ${C(e.values[0])}`:`Opció invàlida: s'esperava una de ${c(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":""}: ${c(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=K(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 ${C(e.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${c(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: ${c(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=K(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 ${C(e.values[0])}`:`Ugyldigt valg: forventede en af følgende ${c(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"}: ${c(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=K(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 ${C(e.values[0])}`:`Ungültige Option: erwartet eine von ${c(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"}: ${c(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=K(e.input);return`Invalid input: expected ${t}, received ${i[n]??n}`}case"invalid_value":return 1===e.values.length?`Invalid input: expected ${C(e.values[0])}`:`Invalid option: expected one of ${c(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":""}: ${c(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=K(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 ${C(e.values[0])}`:`Nevalida opcio: atendiĝis unu el ${c(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":""}: ${c(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=K(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 ${C(e.values[0])}`:`Opción inválida: se esperaba una de ${c(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":""}: ${c(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=K(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?`ورودی نامعتبر: می‌بایست ${C(e.values[0])} می‌بود`:`گزینه نامعتبر: می‌بایست یکی از ${c(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?"های":""} ناشناس: ${c(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=K(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 ${C(e.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${c(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"}: ${c(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=K(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 : ${C(e.values[0])} attendu`:`Option invalide : une valeur parmi ${c(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":""} : ${c(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 ur=()=>{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=K(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 ${C(e.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${c(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":""} : ${c(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:{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"}},u={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{const n=t.expected,r=u[n??""]??i(n),o=K(t.input),a=u[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`ערך לא תקין: הערך חייב להיות ${C(t.values[0])}`;const e=t.values.map(e=>C(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?"ים":"ה"}: ${c(t.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":default:return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${r(t.origin??"array")}`}}};const cr=()=>{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=K(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 ${C(e.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${c(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":""}: ${c(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=K(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?`Սխալ մուտքագրում․ սպասվում էր ${C(e.values[1])}`:`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${c(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?"ներ":""}. ${c(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=K(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 ${C(e.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${c(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":""}: ${c(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=K(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 ${C(e.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${c(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"}: ${c(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=K(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 ${C(e.values[0])}`:`Opzione non valida: atteso uno tra ${c(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"}: ${c(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=K(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?`無効な入力: ${C(e.values[0])}が期待されました`:`無効な選択: ${c(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?"群":""}: ${c(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:"თარიღი-დრო",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=K(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?`არასწორი შეყვანა: მოსალოდნელი ${C(e.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${c(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?"ები":"ი"}: ${c(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:"កាលបរិច្ឆេទ និងម៉ោង 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=K(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?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${C(e.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${c(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`រកឃើញសោមិនស្គាល់៖ ${c(e.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;case"invalid_union":default:return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`}}};function $r(){return{localeError:br()}}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=K(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?`잘못된 입력: 값은 ${C(e.values[0])} 이어야 합니다`:`잘못된 옵션: ${c(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`인식할 수 없는 키: ${c(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=K(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 ${C(e.values[0])}`:`Privalo būti vienas iš ${c(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"}: ${c(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=K(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 ${C(e.values[0])}`:`Грешана опција: се очекува една ${c(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?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${c(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=K(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 ${C(e.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${c(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: ${c(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 Or=()=>{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=K(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 ${C(e.values[0])}`:`Ongeldige optie: verwacht één van ${c(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":""}: ${c(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 zr=()=>{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=K(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 ${C(e.values[0])}`:`Ugyldig valg: forventet en av ${c(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"}: ${c(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 Er=()=>{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=K(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 ${C(e.values[0])}`:`Fâsit tercih: mûteberler ${c(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":""}: ${c(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 Dr=()=>{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=K(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?`ناسم ورودي: باید ${C(e.values[0])} وای`:`ناسم انتخاب: باید یو له ${c(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?"کلیډونه":"کلیډ"}: ${c(e.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${e.origin} کې`;case"invalid_union":default:return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${e.origin} کې`}}};const Tr=()=>{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=K(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 ${C(e.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${c(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":""}: ${c(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 Cr=()=>{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=K(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 ${C(e.values[0])}`:`Opção inválida: esperada uma das ${c(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":""}: ${c(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 Ar=()=>{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=K(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?`Неверный ввод: ожидалось ${C(e.values[0])}`:`Неверный вариант: ожидалось одно из ${c(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?"и":""}: ${c(e.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${e.origin}`;case"invalid_union":default:return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${e.origin}`}}};const Ur=()=>{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=K(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 ${C(e.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${c(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č"}: ${c(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 Pr=()=>{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=K(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 ${C(e.values[0])}`:`Ogiltigt val: förväntade en av ${c(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"}: ${c(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 jr=()=>{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=K(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?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${C(e.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${c(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?"கள்":""}: ${c(e.keys,", ")}`;case"invalid_key":return`${e.origin} இல் தவறான விசை`;case"invalid_union":default:return"தவறான உள்ளீடு";case"invalid_element":return`${e.origin} இல் தவறான மதிப்பு`}}};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:"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=K(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?`ค่าไม่ถูกต้อง: ควรเป็น ${C(e.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${c(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`พบคีย์ที่ไม่รู้จัก: ${c(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=K(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 ${C(e.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${c(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":""}: ${c(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 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:"діапазон 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=K(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?`Неправильні вхідні дані: очікується ${C(e.values[0])}`:`Неправильна опція: очікується одне з ${c(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?"і":""}: ${c(e.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${e.origin}`;case"invalid_union":default:return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${e.origin}`}}};function Mr(){return{localeError:Zr()}}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:"یو آر ایل",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=K(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?`غلط ان پٹ: ${C(e.values[0])} متوقع تھا`:`غلط آپشن: ${c(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?"ز":""}: ${c(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:"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=K(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 ${C(e.values[0])}`:`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${c(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":""}: ${c(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 Hr=()=>{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=K(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 ${C(e.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${c(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: ${c(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 Fr=()=>{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=K(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?`无效输入:期望 ${C(e.values[0])}`:`无效选项:期望以下之一 ${c(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): ${c(e.keys,", ")}`;case"invalid_key":return`${e.origin} 中的键(key)无效`;case"invalid_union":default:return"无效输入";case"invalid_element":return`${e.origin} 中包含无效值(value)`}}};const Jr=()=>{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=K(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?`無效的輸入值:預期為 ${C(e.values[0])}`:`無效的選項:預期為以下其中之一 ${c(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?"們":""}:${c(e.keys,"、")}`;case"invalid_key":return`${e.origin} 中有無效的鍵值`;case"invalid_union":default:return"無效的輸入值";case"invalid_element":return`${e.origin} 中有無效的值`}}};const Vr=()=>{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=K(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 ${C(e.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${c(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ọ̀: ${c(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 Wr,Kr=Object.freeze({__proto__:null,ar:function(){return{localeError:Ji()}},az:function(){return{localeError:Vi()}},be:function(){return{localeError:Ki()}},bg:function(){return{localeError:Gi()}},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:ur()}},he:function(){return{localeError:lr()}},hu:function(){return{localeError:cr()}},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:yr()}},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:Or()}},no:function(){return{localeError:zr()}},ota:function(){return{localeError:Er()}},pl:function(){return{localeError:Tr()}},ps:function(){return{localeError:Dr()}},pt:function(){return{localeError:Cr()}},ru:function(){return{localeError:Ar()}},sl:function(){return{localeError:Ur()}},sv:function(){return{localeError:Pr()}},ta:function(){return{localeError:jr()}},th:function(){return{localeError:Lr()}},tr:function(){return{localeError:Rr()}},ua:function(){return Mr()},uk:Mr,ur:function(){return{localeError:qr()}},uz:function(){return{localeError:Br()}},vi:function(){return{localeError:Hr()}},yo:function(){return{localeError:Vr()}},zhCN:function(){return{localeError:Fr()}},zhTW:function(){return{localeError:Jr()}}});const Gr=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}(Wr=globalThis).__zod_globalRegistry??(Wr.__zod_globalRegistry=Qr());const eo=globalThis.__zod_globalRegistry;function to(e,t){return new e({type:"string",...T(t)})}function no(e,t){return new e({type:"string",coerce:!0,...T(t)})}function io(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...T(t)})}function ro(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...T(t)})}function oo(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...T(t)})}function ao(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...T(t)})}function so(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...T(t)})}function uo(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...T(t)})}function lo(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...T(t)})}function co(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...T(t)})}function po(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...T(t)})}function mo(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...T(t)})}function fo(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...T(t)})}function ho(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...T(t)})}function go(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...T(t)})}function vo(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...T(t)})}function yo(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...T(t)})}function bo(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...T(t)})}function $o(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...T(t)})}function _o(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...T(t)})}function ko(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...T(t)})}function wo(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...T(t)})}function xo(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...T(t)})}function Io(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...T(t)})}function So(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...T(t)})}const Oo={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function zo(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...T(t)})}function Eo(e,t){return new e({type:"string",format:"date",check:"string_format",...T(t)})}function Do(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...T(t)})}function To(e,t){return new e({type:"string",format:"duration",check:"string_format",...T(t)})}function Co(e,t){return new e({type:"number",checks:[],...T(t)})}function No(e,t){return new e({type:"number",coerce:!0,checks:[],...T(t)})}function Ao(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...T(t)})}function Uo(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...T(t)})}function Po(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...T(t)})}function jo(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...T(t)})}function Lo(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...T(t)})}function Ro(e,t){return new e({type:"boolean",...T(t)})}function Zo(e,t){return new e({type:"boolean",coerce:!0,...T(t)})}function Mo(e,t){return new e({type:"bigint",...T(t)})}function qo(e,t){return new e({type:"bigint",coerce:!0,...T(t)})}function Bo(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...T(t)})}function Ho(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...T(t)})}function Fo(e,t){return new e({type:"symbol",...T(t)})}function Jo(e,t){return new e({type:"undefined",...T(t)})}function Vo(e,t){return new e({type:"null",...T(t)})}function Wo(e){return new e({type:"any"})}function Ko(e){return new e({type:"unknown"})}function Go(e,t){return new e({type:"never",...T(t)})}function Xo(e,t){return new e({type:"void",...T(t)})}function Yo(e,t){return new e({type:"date",...T(t)})}function Qo(e,t){return new e({type:"date",coerce:!0,...T(t)})}function ea(e,t){return new e({type:"nan",...T(t)})}function ta(e,t){return new At({check:"less_than",...T(t),value:e,inclusive:!1})}function na(e,t){return new At({check:"less_than",...T(t),value:e,inclusive:!0})}function ia(e,t){return new Ut({check:"greater_than",...T(t),value:e,inclusive:!1})}function ra(e,t){return new Ut({check:"greater_than",...T(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 ua(e){return ra(0,e)}function la(e,t){return new Pt({check:"multiple_of",...T(t),value:e})}function ca(e,t){return new Rt({check:"max_size",...T(t),maximum:e})}function da(e,t){return new Zt({check:"min_size",...T(t),minimum:e})}function pa(e,t){return new Mt({check:"size_equals",...T(t),size:e})}function ma(e,t){return new qt({check:"max_length",...T(t),maximum:e})}function fa(e,t){return new Bt({check:"min_length",...T(t),minimum:e})}function ha(e,t){return new Ht({check:"length_equals",...T(t),length:e})}function ga(e,t){return new Jt({check:"string_format",format:"regex",...T(t),pattern:e})}function va(e){return new Vt({check:"string_format",format:"lowercase",...T(e)})}function ya(e){return new Wt({check:"string_format",format:"uppercase",...T(e)})}function ba(e,t){return new Kt({check:"string_format",format:"includes",...T(t),includes:e})}function $a(e,t){return new Gt({check:"string_format",format:"starts_with",...T(t),prefix:e})}function _a(e,t){return new Xt({check:"string_format",format:"ends_with",...T(t),suffix:e})}function ka(e,t,n){return new Qt({check:"property",property:e,schema:t,...T(n)})}function wa(e,t){return new en({check:"mime_type",mime:e,...T(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 Oa(){return xa(e=>e.toLowerCase())}function za(){return xa(e=>e.toUpperCase())}function Ea(){return xa(e=>_(e))}function Da(e,t,n){return new e({type:"array",element:t,...T(n)})}function Ta(e,t){return new e({type:"file",...T(t)})}function Ca(e,t,n){const i=T(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,...T(n)})}function Aa(e){const t=Ua(n=>(n.addIssue=e=>{if("string"==typeof e)n.issues.push(G(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(G(i))}},e(n.value,n)));return t}function Ua(e,t){const n=new Ct({check:"custom",...T(t)});return n._zod.check=e,n}function Pa(e){const t=new Ct({check:"describe"});return t._zod.onattach=[t=>{const n=eo.get(t)??{};eo.add(t,{...n,description:e})}],t._zod.check=()=>{},t}function ja(e){const t=new Ct({check:"meta"});return t._zod.onattach=[t=>{const n=eo.get(t)??{};eo.add(t,{...n,...e})}],t._zod.check=()=>{},t}function La(e,t){const n=T(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??Ui,u=e.Boolean??Ln,l=new s({type:"pipe",in:new(e.String??an)({type:"string",error:n.error}),out:new u({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:l,continue:!1}),{})},reverseTransform:(e,t)=>!0===e?i[0]||"true":r[0]||"false",error:n.error});return l}function Ra(e,t,n,i={}){const r=T(i),o={...T(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 Za(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 u=t.metadataRegistry.get(e);u&&Object.assign(a.schema,u),"input"===t.io&&Ha(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 qa(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 Ba(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:Ja(t,"input",e.processors),output:Ja(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch(e){throw new Error("Error converting schema to JSON.")}}function Ha(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 Ha(i.element,n);if("set"===i.type)return Ha(i.valueType,n);if("lazy"===i.type)return Ha(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 Ha(i.innerType,n);if("intersection"===i.type)return Ha(i.left,n)||Ha(i.right,n);if("record"===i.type||"map"===i.type)return Ha(i.keyType,n)||Ha(i.valueType,n);if("pipe"===i.type)return Ha(i.in,n)||Ha(i.out,n);if("object"===i.type){for(const e in i.shape)if(Ha(i.shape[e],n))return!0;return!1}if("union"===i.type){for(const e of i.options)if(Ha(e,n))return!0;return!1}if("tuple"===i.type){for(const e of i.items)if(Ha(e,n))return!0;return!(!i.rest||!Ha(i.rest,n))}return!1}const Fa=(e,t={})=>n=>{const i=Za({...n,processors:t});return Ma(e,i),qa(i,e),Ba(i,e)},Ja=(e,t,n={})=>i=>{const{libraryOptions:r,target:o}=i??{},a=Za({...r??{},target:o,io:t,processors:n});return Ma(e,a),qa(a,e),Ba(a,e)},Va={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Wa=(e,t,n,i)=>{const r=n;r.type="string";const{minimum:o,maximum:a,format:s,patterns:u,contentEncoding:l}=e._zod.bag;if("number"==typeof o&&(r.minLength=o),"number"==typeof a&&(r.maxLength=a),s&&(r.format=Va[s]??s,""===r.format&&delete r.format,"time"===s&&delete r.format),l&&(r.contentEncoding=l),u&&u.size>0){const e=[...u];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}))])}},Ka=(e,t,n,i)=>{const r=n,{minimum:o,maximum:a,format:s,multipleOf:u,exclusiveMaximum:l,exclusiveMinimum:c}=e._zod.bag;"string"==typeof s&&s.includes("int")?r.type="integer":r.type="number","number"==typeof c&&("draft-04"===t.target||"openapi-3.0"===t.target?(r.minimum=c,r.exclusiveMinimum=!0):r.exclusiveMinimum=c),"number"==typeof o&&(r.minimum=o,"number"==typeof c&&"draft-04"!==t.target&&(c>=o?delete r.minimum:delete r.exclusiveMinimum)),"number"==typeof l&&("draft-04"===t.target||"openapi-3.0"===t.target?(r.maximum=l,r.exclusiveMaximum=!0):r.exclusiveMaximum=l),"number"==typeof a&&(r.maximum=a,"number"==typeof l&&"draft-04"!==t.target&&(l<=a?delete r.maximum:delete r.exclusiveMaximum)),"number"==typeof u&&(r.multipleOf=u)},Ga=(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=l(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},us=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("NaN cannot be represented in JSON Schema")},ls=(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},cs=(e,t,n,i)=>{const r=n,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:u}=e._zod.bag;void 0!==a&&(o.minLength=a),void 0!==s&&(o.maxLength=s),u?1===u.length?(o.contentMediaType=u[0],Object.assign(r,o)):(Object.assign(r,o),r.anyOf=u.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"]})},ys=(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)),u=new Set([...s].filter(e=>{const n=o.shape[e]._zod;return"input"===t.io?void 0===n.optin:void 0===n.optout}));u.size>0&&(r.required=Array.from(u)),"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)},bs=(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,u=[...s(o)?o.allOf:[o],...s(a)?a.allOf:[a]];n.allOf=u},_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",u=o.items.map((e,n)=>Ma(e,t,{...i,path:[...i.path,a,n]})),l=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=u,l&&(r.items=l)):"openapi-3.0"===t.target?(r.items={anyOf:u},l&&r.items.anyOf.push(l),r.minItems=u.length,l||(r.maxItems=u.length)):(r.items=u,l&&(r.additionalItems=l));const{minimum:c,maximum:d}=e._zod.bag;"number"==typeof c&&(r.minItems=c),"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,u=s?.patterns;if("loose"===o.mode&&u&&u.size>0){const e=Ma(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});r.patternProperties={};for(const t of u)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 l=a._zod.values;if(l){const e=[...l].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)))},Os=(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},zs=(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},Es=(e,t,n,i)=>{const r=e._zod.def;Ma(r.innerType,t,i);t.seen.get(e).ref=r.innerType,n.readOnly=!0},Ds=(e,t,n,i)=>{const r=e._zod.def;Ma(r.innerType,t,i);t.seen.get(e).ref=r.innerType},Ts=(e,t,n,i)=>{const r=e._zod.def;Ma(r.innerType,t,i);t.seen.get(e).ref=r.innerType},Cs=(e,t,n,i)=>{const r=e._zod.innerType;Ma(r,t,i);t.seen.get(e).ref=r},Ns={string:Wa,number:Ka,boolean:Ga,bigint:Xa,symbol:Ya,null:Qa,undefined:es,void:ts,never:ns,any:is,unknown:rs,date:os,enum:as,literal:ss,nan:us,template_literal:ls,file:cs,success:ds,custom:ps,function:ms,transform:fs,map:hs,set:gs,array:vs,object:ys,union:bs,intersection:$s,tuple:_s,record:ks,nullable:ws,nonoptional:xs,default:Is,prefault:Ss,catch:Os,pipe:zs,readonly:Es,promise:Ds,optional:Ts,lazy:Cs};function As(e,t){if("_idmap"in e){const n=e,i=Za({...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;qa(i,n),o[t]=Ba(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=Za({...t,processors:Ns});return Ma(e,n),qa(n,e),Ba(n,e)}var Us=Object.freeze({__proto__:null}),Ps=Object.freeze({__proto__:null,$ZodAny:Hn,$ZodArray:Gn,$ZodAsyncError:o,$ZodBase64:En,$ZodBase64URL:Tn,$ZodBigInt:Rn,$ZodBigIntFormat:Zn,$ZodBoolean:Ln,$ZodCIDRv4:Sn,$ZodCIDRv6:On,$ZodCUID:fn,$ZodCUID2:hn,$ZodCatch:Ti,$ZodCheck:Ct,$ZodCheckBigIntFormat:Lt,$ZodCheckEndsWith:Xt,$ZodCheckGreaterThan:Ut,$ZodCheckIncludes:Kt,$ZodCheckLengthEquals:Ht,$ZodCheckLessThan:At,$ZodCheckLowerCase:Vt,$ZodCheckMaxLength:qt,$ZodCheckMaxSize:Rt,$ZodCheckMimeType:en,$ZodCheckMinLength:Bt,$ZodCheckMinSize:Zt,$ZodCheckMultipleOf:Pt,$ZodCheckNumberFormat:jt,$ZodCheckOverwrite:tn,$ZodCheckProperty:Qt,$ZodCheckRegex:Jt,$ZodCheckSizeEquals:Mt,$ZodCheckStartsWith:Gt,$ZodCheckStringFormat:Ft,$ZodCheckUpperCase:Wt,$ZodCodec:Ui,$ZodCustom:Hi,$ZodCustomStringFormat:Un,$ZodDate:Wn,$ZodDefault:Ii,$ZodDiscriminatedUnion:ai,$ZodE164:Cn,$ZodEmail:cn,$ZodEmoji:pn,$ZodEncodeError:a,$ZodEnum:vi,$ZodError:te,$ZodExactOptional:wi,$ZodFile:bi,$ZodFunction:Mi,$ZodGUID:un,$ZodIPv4:wn,$ZodIPv6:xn,$ZodISODate:$n,$ZodISODateTime:bn,$ZodISODuration:kn,$ZodISOTime:_n,$ZodIntersection:si,$ZodJWT:An,$ZodKSUID:yn,$ZodLazy:Bi,$ZodLiteral:yi,$ZodMAC:In,$ZodMap:mi,$ZodNaN:Ci,$ZodNanoID:mn,$ZodNever:Jn,$ZodNonOptional:zi,$ZodNull:Bn,$ZodNullable:xi,$ZodNumber:Pn,$ZodNumberFormat:jn,$ZodObject:ei,$ZodObjectJIT:ti,$ZodOptional:ki,$ZodPipe:Ni,$ZodPrefault:Oi,$ZodPromise:qi,$ZodReadonly:Li,$ZodRealError:ne,$ZodRecord:pi,$ZodRegistry:Yr,$ZodSet:hi,$ZodString:an,$ZodStringFormat:sn,$ZodSuccess:Di,$ZodSymbol:Mn,$ZodTemplateLiteral:Zi,$ZodTransform:$i,$ZodTuple:ci,$ZodType:on,$ZodULID:gn,$ZodURL:dn,$ZodUUID:ln,$ZodUndefined:qn,$ZodUnion:ii,$ZodUnknown:Fn,$ZodVoid:Vn,$ZodXID:vn,$ZodXor:oi,$brand:r,$constructor:i,$input:Xr,$output:Gr,Doc:nn,JSONSchema:Us,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=Za({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)),qa(this.ctx,e);const n=Ba(this.ctx,e),{"~standard":i,...r}=n;return r}},NEVER:n,TimePrecision:Oo,_any:Wo,_array:Da,_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:Ua,_cidrv4:_o,_cidrv6:ko,_coercedBigint:qo,_coercedBoolean:Zo,_coercedDate:Qo,_coercedNumber:No,_coercedString:no,_cuid:mo,_cuid2:fo,_custom:Ca,_date:Yo,_decode:ye,_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,...T(i)})},_e164:Io,_email:io,_emoji:co,_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,...T(n)})},_file:Ta,_float32:Uo,_float64:Po,_gt:ia,_gte:ra,_guid:ro,_includes:ba,_int:Ao,_int32:jo,_int64:Bo,_intersection:function(e,t,n){return new e({type:"intersection",left:t,right:n})},_ipv4:yo,_ipv6:bo,_isoDate:Eo,_isoDateTime:zo,_isoDuration:To,_isoTime:Do,_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],...T(n)})},_lowercase:va,_lt:ta,_lte:na,_mac:$o,_map:function(e,t,n,i){return new e({type:"map",keyType:t,valueType:n,...T(i)})},_max:na,_maxLength:ma,_maxSize:ca,_mime:wa,_min:ra,_minLength:fa,_minSize:da,_multipleOf:la,_nan:ea,_nanoid:po,_nativeEnum:function(e,t,n){return new e({type:"enum",entries:t,...T(n)})},_negative:aa,_never:Go,_nonnegative:ua,_nonoptional:function(e,t,n){return new e({type:"nonoptional",innerType:t,...T(n)})},_nonpositive:sa,_normalize:Ia,_null:Vo,_nullable:function(e,t){return new e({type:"nullable",innerType:t})},_number:Co,_optional:function(e,t){return new e({type:"optional",innerType:t})},_overwrite:xa,_parse:ue,_parseAsync:ce,_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,...T(i)})},_refine:Na,_regex:ga,_safeDecode:Se,_safeDecodeAsync:De,_safeEncode:xe,_safeEncodeAsync:ze,_safeParse:pe,_safeParseAsync:fe,_set:function(e,t,n){return new e({type:"set",valueType:t,...T(n)})},_size:pa,_slugify:Ea,_startsWith:$a,_string:to,_stringFormat:Ra,_stringbool:La,_success:function(e,t){return new e({type:"success",innerType:t})},_superRefine:Aa,_symbol:Fo,_templateLiteral:function(e,t,n){return new e({type:"template_literal",parts:t,...T(n)})},_toLowerCase:Oa,_toUpperCase:za,_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,...T(r?i:n)})},_uint32:Lo,_uint64:Ho,_ulid:ho,_undefined:Jo,_union:function(e,t,n){return new e({type:"union",options:t,...T(n)})},_unknown:Ko,_uppercase:ya,_url:lo,_uuid:oo,_uuidv4:ao,_uuidv6:so,_uuidv7:uo,_void:Xo,_xid:go,_xor:function(e,t,n){return new e({type:"union",options:t,inclusive:!1,...T(n)})},clone:D,config:u,createStandardJSONSchemaMethod:Ja,createToJSONSchemaMethod:Fa,decode:be,decodeAsync:we,describe:Pa,encode:ve,encodeAsync:_e,extractDefs:qa,finalize:Ba,flattenError:ie,formatError:re,globalConfig:s,globalRegistry:eo,initializeContext:Za,isValidBase64:zn,isValidBase64URL:Dn,isValidJWT:Nn,locales:Kr,meta:ja,parse:le,parseAsync:de,prettifyError:se,process:Ma,regexes:Tt,registry:Qr,safeDecode:Oe,safeDecodeAsync:Te,safeEncode:Ie,safeEncodeAsync:Ee,safeParse:me,safeParseAsync:he,toDotPath:ae,toJSONSchema:As,treeifyError:oe,util:Q,version:rn});function js(e){return!!e._zod}function Ls(e,t){if(js(e)){return me(e,t)}return e.safeParse(t)}var Rs=Object.freeze({__proto__:null,endsWith:_a,gt:ia,gte:ra,includes:ba,length:ha,lowercase:va,lt:ta,lte:na,maxLength:ma,maxSize:ca,mime:wa,minLength:fa,minSize:da,multipleOf:la,negative:aa,nonnegative:ua,nonpositive:sa,normalize:Ia,overwrite:xa,positive:oa,property:ka,regex:ga,size:pa,slugify:Ea,startsWith:$a,toLowerCase:Oa,toUpperCase:za,trim:Sa,uppercase:ya});const Zs=i("ZodISODateTime",(e,t)=>{bn.init(e,t),fu.init(e,t)});function Ms(e){return zo(Zs,e)}const qs=i("ZodISODate",(e,t)=>{$n.init(e,t),fu.init(e,t)});function Bs(e){return Eo(qs,e)}const Hs=i("ZodISOTime",(e,t)=>{_n.init(e,t),fu.init(e,t)});function Fs(e){return Do(Hs,e)}const Js=i("ZodISODuration",(e,t)=>{kn.init(e,t),fu.init(e,t)});function Vs(e){return To(Js,e)}var Ws=Object.freeze({__proto__:null,ZodISODate:qs,ZodISODateTime:Zs,ZodISODuration:Js,ZodISOTime:Hs,date:Bs,datetime:Ms,duration:Vs,time:Fs});const Ks=(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}})},Gs=i("ZodError",Ks),Xs=i("ZodError",Ks,{Parent:Error}),Ys=ue(Xs),Qs=ce(Xs),eu=pe(Xs),tu=fe(Xs),nu=ge(Xs),iu=ye(Xs),ru=$e(Xs),ou=ke(Xs),au=xe(Xs),su=Se(Xs),uu=ze(Xs),lu=De(Xs),cu=i("ZodType",(e,t)=>(on.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Ja(e,"input"),output:Ja(e,"output")}}),e.toJSONSchema=Fa(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(b(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)=>D(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)=>eu(e,t,n),e.parseAsync=async(t,n)=>Qs(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>tu(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>nu(e,t,n),e.decode=(t,n)=>iu(e,t,n),e.encodeAsync=async(t,n)=>ru(e,t,n),e.decodeAsync=async(t,n)=>ou(e,t,n),e.safeEncode=(t,n)=>au(e,t,n),e.safeDecode=(t,n)=>su(e,t,n),e.safeEncodeAsync=async(t,n)=>uu(e,t,n),e.safeDecodeAsync=async(t,n)=>lu(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=()=>kc(e),e.exactOptional=()=>xc(e),e.nullable=()=>Sc(e),e.nullish=()=>kc(Sc(e)),e.nonoptional=t=>Nc(e,t),e.array=()=>ql(e),e.or=t=>Kl([e,t]),e.and=t=>tc(e,t),e.transform=t=>Mc(e,$c(t)),e.default=t=>Ec(e,t),e.prefault=t=>Tc(e,t),e.catch=t=>jc(e,t),e.pipe=t=>Mc(e,t),e.readonly=()=>Fc(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)),du=i("_ZodString",(e,t)=>{an.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Wa(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(ba(...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(ya(t)),e.trim=()=>e.check(Sa()),e.normalize=(...t)=>e.check(Ia(...t)),e.toLowerCase=()=>e.check(Oa()),e.toUpperCase=()=>e.check(za()),e.slugify=()=>e.check(Ea())}),pu=i("ZodString",(e,t)=>{an.init(e,t),du.init(e,t),e.email=t=>e.check(io(hu,t)),e.url=t=>e.check(lo(xu,t)),e.jwt=t=>e.check(So(il,t)),e.emoji=t=>e.check(co(Ou,t)),e.guid=t=>e.check(ro(vu,t)),e.uuid=t=>e.check(oo(bu,t)),e.uuidv4=t=>e.check(ao(bu,t)),e.uuidv6=t=>e.check(so(bu,t)),e.uuidv7=t=>e.check(uo(bu,t)),e.nanoid=t=>e.check(po(Eu,t)),e.guid=t=>e.check(ro(vu,t)),e.cuid=t=>e.check(mo(Tu,t)),e.cuid2=t=>e.check(fo(Nu,t)),e.ulid=t=>e.check(ho(Uu,t)),e.base64=t=>e.check(wo(Xu,t)),e.base64url=t=>e.check(xo(Qu,t)),e.xid=t=>e.check(go(ju,t)),e.ksuid=t=>e.check(vo(Ru,t)),e.ipv4=t=>e.check(yo(Mu,t)),e.ipv6=t=>e.check(bo(Fu,t)),e.cidrv4=t=>e.check(_o(Vu,t)),e.cidrv6=t=>e.check(ko(Ku,t)),e.e164=t=>e.check(Io(tl,t)),e.datetime=t=>e.check(Ms(t)),e.date=t=>e.check(Bs(t)),e.time=t=>e.check(Fs(t)),e.duration=t=>e.check(Vs(t))});function mu(e){return to(pu,e)}const fu=i("ZodStringFormat",(e,t)=>{sn.init(e,t),du.init(e,t)}),hu=i("ZodEmail",(e,t)=>{cn.init(e,t),fu.init(e,t)});function gu(e){return io(hu,e)}const vu=i("ZodGUID",(e,t)=>{un.init(e,t),fu.init(e,t)});function yu(e){return ro(vu,e)}const bu=i("ZodUUID",(e,t)=>{ln.init(e,t),fu.init(e,t)});function $u(e){return oo(bu,e)}function _u(e){return ao(bu,e)}function ku(e){return so(bu,e)}function wu(e){return uo(bu,e)}const xu=i("ZodURL",(e,t)=>{dn.init(e,t),fu.init(e,t)});function Iu(e){return lo(xu,e)}function Su(e){return lo(xu,{protocol:/^https?$/,hostname:nt,...T(e)})}const Ou=i("ZodEmoji",(e,t)=>{pn.init(e,t),fu.init(e,t)});function zu(e){return co(Ou,e)}const Eu=i("ZodNanoID",(e,t)=>{mn.init(e,t),fu.init(e,t)});function Du(e){return po(Eu,e)}const Tu=i("ZodCUID",(e,t)=>{fn.init(e,t),fu.init(e,t)});function Cu(e){return mo(Tu,e)}const Nu=i("ZodCUID2",(e,t)=>{hn.init(e,t),fu.init(e,t)});function Au(e){return fo(Nu,e)}const Uu=i("ZodULID",(e,t)=>{gn.init(e,t),fu.init(e,t)});function Pu(e){return ho(Uu,e)}const ju=i("ZodXID",(e,t)=>{vn.init(e,t),fu.init(e,t)});function Lu(e){return go(ju,e)}const Ru=i("ZodKSUID",(e,t)=>{yn.init(e,t),fu.init(e,t)});function Zu(e){return vo(Ru,e)}const Mu=i("ZodIPv4",(e,t)=>{wn.init(e,t),fu.init(e,t)});function qu(e){return yo(Mu,e)}const Bu=i("ZodMAC",(e,t)=>{In.init(e,t),fu.init(e,t)});function Hu(e){return $o(Bu,e)}const Fu=i("ZodIPv6",(e,t)=>{xn.init(e,t),fu.init(e,t)});function Ju(e){return bo(Fu,e)}const Vu=i("ZodCIDRv4",(e,t)=>{Sn.init(e,t),fu.init(e,t)});function Wu(e){return _o(Vu,e)}const Ku=i("ZodCIDRv6",(e,t)=>{On.init(e,t),fu.init(e,t)});function Gu(e){return ko(Ku,e)}const Xu=i("ZodBase64",(e,t)=>{En.init(e,t),fu.init(e,t)});function Yu(e){return wo(Xu,e)}const Qu=i("ZodBase64URL",(e,t)=>{Tn.init(e,t),fu.init(e,t)});function el(e){return xo(Qu,e)}const tl=i("ZodE164",(e,t)=>{Cn.init(e,t),fu.init(e,t)});function nl(e){return Io(tl,e)}const il=i("ZodJWT",(e,t)=>{An.init(e,t),fu.init(e,t)});function rl(e){return So(il,e)}const ol=i("ZodCustomStringFormat",(e,t)=>{Un.init(e,t),fu.init(e,t)});function al(e,t,n={}){return Ra(ol,e,t,n)}function sl(e){return Ra(ol,"hostname",tt,e)}function ul(e){return Ra(ol,"hex",yt,e)}function ll(e,t){const n=`${e}_${t?.enc??"hex"}`,i=Tt[n];if(!i)throw new Error(`Unrecognized hash format: ${n}`);return Ra(ol,n,i,t)}const cl=i("ZodNumber",(e,t)=>{Pn.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Ka(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(ml(t)),e.safe=t=>e.check(ml(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(la(t,n)),e.step=(t,n)=>e.check(la(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 dl(e){return Co(cl,e)}const pl=i("ZodNumberFormat",(e,t)=>{jn.init(e,t),cl.init(e,t)});function ml(e){return Ao(pl,e)}function fl(e){return Uo(pl,e)}function hl(e){return Po(pl,e)}function gl(e){return jo(pl,e)}function vl(e){return Lo(pl,e)}const yl=i("ZodBoolean",(e,t)=>{Ln.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>Ga(0,0,t)});function bl(e){return Ro(yl,e)}const $l=i("ZodBigInt",(e,t)=>{Rn.init(e,t),cu.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(la(t,n));const n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function _l(e){return Mo($l,e)}const kl=i("ZodBigIntFormat",(e,t)=>{Zn.init(e,t),$l.init(e,t)});function wl(e){return Bo(kl,e)}function xl(e){return Ho(kl,e)}const Il=i("ZodSymbol",(e,t)=>{Mn.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>Ya(0,e)});function Sl(e){return Fo(Il,e)}const Ol=i("ZodUndefined",(e,t)=>{qn.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>es(0,e)});function zl(e){return Jo(Ol,e)}const El=i("ZodNull",(e,t)=>{Bn.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>Qa(0,e,t)});function Dl(e){return Vo(El,e)}const Tl=i("ZodAny",(e,t)=>{Hn.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function Cl(){return Wo(Tl)}const Nl=i("ZodUnknown",(e,t)=>{Fn.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function Al(){return Ko(Nl)}const Ul=i("ZodNever",(e,t)=>{Jn.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ns(0,0,t)});function Pl(e){return Go(Ul,e)}const jl=i("ZodVoid",(e,t)=>{Vn.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ts(0,e)});function Ll(e){return Xo(jl,e)}const Rl=i("ZodDate",(e,t)=>{Wn.init(e,t),cu.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 Zl(e){return Yo(Rl,e)}const Ml=i("ZodArray",(e,t)=>{Gn.init(e,t),cu.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 ql(e,t){return Da(Ml,e,t)}function Bl(e){const t=e._zod.def.shape;return mc(Object.keys(t))}const Hl=i("ZodObject",(e,t)=>{ti.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,i)=>ys(e,t,n,i),v(e,"shape",()=>t.shape),e.keyof=()=>mc(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Al()}),e.loose=()=>e.clone({...e._zod.def,catchall:Al()}),e.strict=()=>e.clone({...e._zod.def,catchall:Pl()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>L(e,t),e.safeExtend=t=>R(e,t),e.merge=t=>Z(e,t),e.pick=t=>P(e,t),e.omit=t=>j(e,t),e.partial=(...t)=>M(_c,e,t[0]),e.required=(...t)=>q(Cc,e,t[0])});function Fl(e,t){const n={type:"object",shape:e??{},...T(t)};return new Hl(n)}function Jl(e,t){return new Hl({type:"object",shape:e,catchall:Pl(),...T(t)})}function Vl(e,t){return new Hl({type:"object",shape:e,catchall:Al(),...T(t)})}const Wl=i("ZodUnion",(e,t)=>{ii.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,i)=>bs(e,t,n,i),e.options=t.options});function Kl(e,t){return new Wl({type:"union",options:e,...T(t)})}const Gl=i("ZodXor",(e,t)=>{Wl.init(e,t),oi.init(e,t),e._zod.processJSONSchema=(t,n,i)=>bs(e,t,n,i),e.options=t.options});function Xl(e,t){return new Gl({type:"union",options:e,inclusive:!1,...T(t)})}const Yl=i("ZodDiscriminatedUnion",(e,t)=>{Wl.init(e,t),ai.init(e,t)});function Ql(e,t,n){return new Yl({type:"union",options:t,discriminator:e,...T(n)})}const ec=i("ZodIntersection",(e,t)=>{si.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,i)=>$s(e,t,n,i)});function tc(e,t){return new ec({type:"intersection",left:e,right:t})}const nc=i("ZodTuple",(e,t)=>{ci.init(e,t),cu.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 ic(e,t,n){const i=t instanceof on;return new nc({type:"tuple",items:e,rest:i?t:null,...T(i?n:t)})}const rc=i("ZodRecord",(e,t)=>{pi.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,i)=>ks(e,t,n,i),e.keyType=t.keyType,e.valueType=t.valueType});function oc(e,t,n){return new rc({type:"record",keyType:e,valueType:t,...T(n)})}function ac(e,t,n){const i=D(e);return i._zod.values=void 0,new rc({type:"record",keyType:i,valueType:t,...T(n)})}function sc(e,t,n){return new rc({type:"record",keyType:e,valueType:t,mode:"loose",...T(n)})}const uc=i("ZodMap",(e,t)=>{mi.init(e,t),cu.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(ca(...t)),e.size=(...t)=>e.check(pa(...t))});function lc(e,t,n){return new uc({type:"map",keyType:e,valueType:t,...T(n)})}const cc=i("ZodSet",(e,t)=>{hi.init(e,t),cu.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(ca(...t)),e.size=(...t)=>e.check(pa(...t))});function dc(e,t){return new cc({type:"set",valueType:e,...T(t)})}const pc=i("ZodEnum",(e,t)=>{vi.init(e,t),cu.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 pc({...t,checks:[],...T(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 pc({...t,checks:[],...T(i),entries:r})}});function mc(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new pc({type:"enum",entries:n,...T(t)})}function fc(e,t){return new pc({type:"enum",entries:e,...T(t)})}const hc=i("ZodLiteral",(e,t)=>{yi.init(e,t),cu.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 gc(e,t){return new hc({type:"literal",values:Array.isArray(e)?e:[e],...T(t)})}const vc=i("ZodFile",(e,t)=>{bi.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,i)=>cs(e,0,n),e.min=(t,n)=>e.check(da(t,n)),e.max=(t,n)=>e.check(ca(t,n)),e.mime=(t,n)=>e.check(wa(Array.isArray(t)?t:[t],n))});function yc(e){return Ta(vc,e)}const bc=i("ZodTransform",(e,t)=>{$i.init(e,t),cu.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(G(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(G(t))}};const r=t.transform(n.value,n);return r instanceof Promise?r.then(e=>(n.value=e,n)):(n.value=r,n)}});function $c(e){return new bc({type:"transform",transform:e})}const _c=i("ZodOptional",(e,t)=>{ki.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Ts(e,t,0,i),e.unwrap=()=>e._zod.def.innerType});function kc(e){return new _c({type:"optional",innerType:e})}const wc=i("ZodExactOptional",(e,t)=>{wi.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Ts(e,t,0,i),e.unwrap=()=>e._zod.def.innerType});function xc(e){return new wc({type:"optional",innerType:e})}const Ic=i("ZodNullable",(e,t)=>{xi.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,i)=>ws(e,t,n,i),e.unwrap=()=>e._zod.def.innerType});function Sc(e){return new Ic({type:"nullable",innerType:e})}function Oc(e){return kc(Sc(e))}const zc=i("ZodDefault",(e,t)=>{Ii.init(e,t),cu.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 Ec(e,t){return new zc({type:"default",innerType:e,get defaultValue(){return"function"==typeof t?t():S(t)}})}const Dc=i("ZodPrefault",(e,t)=>{Oi.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Ss(e,t,n,i),e.unwrap=()=>e._zod.def.innerType});function Tc(e,t){return new Dc({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof t?t():S(t)}})}const Cc=i("ZodNonOptional",(e,t)=>{zi.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,i)=>xs(e,t,0,i),e.unwrap=()=>e._zod.def.innerType});function Nc(e,t){return new Cc({type:"nonoptional",innerType:e,...T(t)})}const Ac=i("ZodSuccess",(e,t)=>{Di.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ds(0,0,t),e.unwrap=()=>e._zod.def.innerType});function Uc(e){return new Ac({type:"success",innerType:e})}const Pc=i("ZodCatch",(e,t)=>{Ti.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Os(e,t,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function jc(e,t){return new Pc({type:"catch",innerType:e,catchValue:"function"==typeof t?t:()=>t})}const Lc=i("ZodNaN",(e,t)=>{Ci.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>us(0,e)});function Rc(e){return ea(Lc,e)}const Zc=i("ZodPipe",(e,t)=>{Ni.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,i)=>zs(e,t,0,i),e.in=t.in,e.out=t.out});function Mc(e,t){return new Zc({type:"pipe",in:e,out:t})}const qc=i("ZodCodec",(e,t)=>{Zc.init(e,t),Ui.init(e,t)});function Bc(e,t,n){return new qc({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}const Hc=i("ZodReadonly",(e,t)=>{Li.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Es(e,t,n,i),e.unwrap=()=>e._zod.def.innerType});function Fc(e){return new Hc({type:"readonly",innerType:e})}const Jc=i("ZodTemplateLiteral",(e,t)=>{Zi.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,i)=>ls(e,0,n)});function Vc(e,t){return new Jc({type:"template_literal",parts:e,...T(t)})}const Wc=i("ZodLazy",(e,t)=>{Bi.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Cs(e,t,0,i),e.unwrap=()=>e._zod.def.getter()});function Kc(e){return new Wc({type:"lazy",getter:e})}const Gc=i("ZodPromise",(e,t)=>{qi.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Ds(e,t,0,i),e.unwrap=()=>e._zod.def.innerType});function Xc(e){return new Gc({type:"promise",innerType:e})}const Yc=i("ZodFunction",(e,t)=>{Mi.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ms(0,e)});function Qc(e){return new Yc({type:"function",input:Array.isArray(e?.input)?ic(e?.input):e?.input??ql(Al()),output:e?.output??Al()})}const ed=i("ZodCustom",(e,t)=>{Hi.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ps(0,e)});function td(e){const t=new Ct({check:"custom"});return t._zod.check=e,t}function nd(e,t){return Ca(ed,e??(()=>!0),t)}function id(e,t={}){return Na(ed,e,t)}function rd(e){return Aa(e)}const od=Pa,ad=ja;function sd(e,t={}){const n=new ed({type:"custom",check:"custom",fn:t=>t instanceof e,abort:!0,...T(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 ud=(...e)=>La({Codec:qc,Boolean:yl,String:pu},...e);function ld(e){const t=Kc(()=>Kl([mu(e),dl(),bl(),Dl(),ql(t),oc(mu(),t)]));return t}function cd(e,t){return Mc($c(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){u({customError:e})}function md(){return u().customError}var fd;fd||(fd={});const hd={...Object.freeze({__proto__:null,ZodAny:Tl,ZodArray:Ml,ZodBase64:Xu,ZodBase64URL:Qu,ZodBigInt:$l,ZodBigIntFormat:kl,ZodBoolean:yl,ZodCIDRv4:Vu,ZodCIDRv6:Ku,ZodCUID:Tu,ZodCUID2:Nu,ZodCatch:Pc,ZodCodec:qc,ZodCustom:ed,ZodCustomStringFormat:ol,ZodDate:Rl,ZodDefault:zc,ZodDiscriminatedUnion:Yl,ZodE164:tl,ZodEmail:hu,ZodEmoji:Ou,ZodEnum:pc,ZodExactOptional:wc,ZodFile:vc,ZodFunction:Yc,ZodGUID:vu,ZodIPv4:Mu,ZodIPv6:Fu,ZodIntersection:ec,ZodJWT:il,ZodKSUID:Ru,ZodLazy:Wc,ZodLiteral:hc,ZodMAC:Bu,ZodMap:uc,ZodNaN:Lc,ZodNanoID:Eu,ZodNever:Ul,ZodNonOptional:Cc,ZodNull:El,ZodNullable:Ic,ZodNumber:cl,ZodNumberFormat:pl,ZodObject:Hl,ZodOptional:_c,ZodPipe:Zc,ZodPrefault:Dc,ZodPromise:Gc,ZodReadonly:Hc,ZodRecord:rc,ZodSet:cc,ZodString:pu,ZodStringFormat:fu,ZodSuccess:Ac,ZodSymbol:Il,ZodTemplateLiteral:Jc,ZodTransform:bc,ZodTuple:nc,ZodType:cu,ZodULID:Uu,ZodURL:xu,ZodUUID:bu,ZodUndefined:Ol,ZodUnion:Wl,ZodUnknown:Nl,ZodVoid:jl,ZodXID:ju,ZodXor:Gl,_ZodString:du,_default:Ec,_function:Qc,any:Cl,array:ql,base64:Yu,base64url:el,bigint:_l,boolean:bl,catch:jc,check:td,cidrv4:Wu,cidrv6:Gu,codec:Bc,cuid:Cu,cuid2:Au,custom:nd,date:Zl,describe:od,discriminatedUnion:Ql,e164:nl,email:gu,emoji:zu,enum:mc,exactOptional:xc,file:yc,float32:fl,float64:hl,function:Qc,guid:yu,hash:ll,hex:ul,hostname:sl,httpUrl:Su,instanceof:sd,int:ml,int32:gl,int64:wl,intersection:tc,ipv4:qu,ipv6:Ju,json:ld,jwt:rl,keyof:Bl,ksuid:Zu,lazy:Kc,literal:gc,looseObject:Vl,looseRecord:sc,mac:Hu,map:lc,meta:ad,nan:Rc,nanoid:Du,nativeEnum:fc,never:Pl,nonoptional:Nc,null:Dl,nullable:Sc,nullish:Oc,number:dl,object:Fl,optional:kc,partialRecord:ac,pipe:Mc,prefault:Tc,preprocess:cd,promise:Xc,readonly:Fc,record:oc,refine:id,set:dc,strictObject:Jl,string:mu,stringFormat:al,stringbool:ud,success:Uc,superRefine:rd,symbol:Sl,templateLiteral:Vc,transform:$c,tuple:ic,uint32:vl,uint64:xl,ulid:Pu,undefined:zl,union:Kl,unknown:Al,url:Iu,uuid:$u,uuidv4:_u,uuidv6:ku,uuidv7:wu,void:Ll,xid:Lu,xor:Xl}),...Rs,iso:Ws},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=yd(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=yd(i,t);n[e]=o.has(e)?r:r.optional()}if(e.propertyNames){const r=yd(e.propertyNames,t),o=e.additionalProperties&&"object"==typeof e.additionalProperties?yd(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=yd(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(yd(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=>yd(e,t)),a=r&&"object"==typeof r&&!Array.isArray(r)?yd(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=>yd(e,t)),o=e.additionalItems&&"object"==typeof e.additionalItems?yd(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=yd(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 yd(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=>yd(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=>yd(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:yd(e.allOf[0],t);for(let n=i?0:1;n<e.allOf.length;n++)r=hd.intersection(r,yd(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 bd(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 yd(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 qo($l,e)},boolean:function(e){return Zo(yl,e)},date:function(e){return Qo(Rl,e)},number:function(e){return No(cl,e)},string:function(e){return no(pu,e)}});u(nr());var _d=Object.freeze({__proto__:null,$brand:r,$input:Xr,$output:Gr,NEVER:n,TimePrecision:Oo,ZodAny:Tl,ZodArray:Ml,ZodBase64:Xu,ZodBase64URL:Qu,ZodBigInt:$l,ZodBigIntFormat:kl,ZodBoolean:yl,ZodCIDRv4:Vu,ZodCIDRv6:Ku,ZodCUID:Tu,ZodCUID2:Nu,ZodCatch:Pc,ZodCodec:qc,ZodCustom:ed,ZodCustomStringFormat:ol,ZodDate:Rl,ZodDefault:zc,ZodDiscriminatedUnion:Yl,ZodE164:tl,ZodEmail:hu,ZodEmoji:Ou,ZodEnum:pc,ZodError:Gs,ZodExactOptional:wc,ZodFile:vc,get ZodFirstPartyTypeKind(){return fd},ZodFunction:Yc,ZodGUID:vu,ZodIPv4:Mu,ZodIPv6:Fu,ZodISODate:qs,ZodISODateTime:Zs,ZodISODuration:Js,ZodISOTime:Hs,ZodIntersection:ec,ZodIssueCode:dd,ZodJWT:il,ZodKSUID:Ru,ZodLazy:Wc,ZodLiteral:hc,ZodMAC:Bu,ZodMap:uc,ZodNaN:Lc,ZodNanoID:Eu,ZodNever:Ul,ZodNonOptional:Cc,ZodNull:El,ZodNullable:Ic,ZodNumber:cl,ZodNumberFormat:pl,ZodObject:Hl,ZodOptional:_c,ZodPipe:Zc,ZodPrefault:Dc,ZodPromise:Gc,ZodReadonly:Hc,ZodRealError:Xs,ZodRecord:rc,ZodSet:cc,ZodString:pu,ZodStringFormat:fu,ZodSuccess:Ac,ZodSymbol:Il,ZodTemplateLiteral:Jc,ZodTransform:bc,ZodTuple:nc,ZodType:cu,ZodULID:Uu,ZodURL:xu,ZodUUID:bu,ZodUndefined:Ol,ZodUnion:Wl,ZodUnknown:Nl,ZodVoid:jl,ZodXID:ju,ZodXor:Gl,_ZodString:du,_default:Ec,_function:Qc,any:Cl,array:ql,base64:Yu,base64url:el,bigint:_l,boolean:bl,catch:jc,check:td,cidrv4:Wu,cidrv6:Gu,clone:D,codec:Bc,coerce:$d,config:u,core:Ps,cuid:Cu,cuid2:Au,custom:nd,date:Zl,decode:iu,decodeAsync:ou,describe:od,discriminatedUnion:Ql,e164:nl,email:gu,emoji:zu,encode:nu,encodeAsync:ru,endsWith:_a,enum:mc,exactOptional:xc,file:yc,flattenError:ie,float32:fl,float64:hl,formatError:re,fromJSONSchema:bd,function:Qc,getErrorMap:md,globalRegistry:eo,gt:ia,gte:ra,guid:yu,hash:ll,hex:ul,hostname:sl,httpUrl:Su,includes:ba,instanceof:sd,int:ml,int32:gl,int64:wl,intersection:tc,ipv4:qu,ipv6:Ju,iso:Ws,json:ld,jwt:rl,keyof:Bl,ksuid:Zu,lazy:Kc,length:ha,literal:gc,locales:Kr,looseObject:Vl,looseRecord:sc,lowercase:va,lt:ta,lte:na,mac:Hu,map:lc,maxLength:ma,maxSize:ca,meta:ad,mime:wa,minLength:fa,minSize:da,multipleOf:la,nan:Rc,nanoid:Du,nativeEnum:fc,negative:aa,never:Pl,nonnegative:ua,nonoptional:Nc,nonpositive:sa,normalize:Ia,null:Dl,nullable:Sc,nullish:Oc,number:dl,object:Fl,optional:kc,overwrite:xa,parse:Ys,parseAsync:Qs,partialRecord:ac,pipe:Mc,positive:oa,prefault:Tc,preprocess:cd,prettifyError:se,promise:Xc,property:ka,readonly:Fc,record:oc,refine:id,regex:ga,regexes:Tt,registry:Qr,safeDecode:su,safeDecodeAsync:lu,safeEncode:au,safeEncodeAsync:uu,safeParse:eu,safeParseAsync:tu,set:dc,setErrorMap:pd,size:pa,slugify:Ea,startsWith:$a,strictObject:Jl,string:mu,stringFormat:al,stringbool:ud,success:Uc,superRefine:rd,symbol:Sl,templateLiteral:Vc,toJSONSchema:As,toLowerCase:Oa,toUpperCase:za,transform:$c,treeifyError:oe,trim:Sa,tuple:ic,uint32:vl,uint64:xl,ulid:Pu,undefined:zl,union:Kl,unknown:Al,uppercase:ya,url:Iu,util:Q,uuid:$u,uuidv4:_u,uuidv6:ku,uuidv7:wu,void:Ll,xid:Lu,xor:Xl}),kd=Object.freeze({__proto__:null,$brand:r,$input:Xr,$output:Gr,NEVER:n,TimePrecision:Oo,ZodAny:Tl,ZodArray:Ml,ZodBase64:Xu,ZodBase64URL:Qu,ZodBigInt:$l,ZodBigIntFormat:kl,ZodBoolean:yl,ZodCIDRv4:Vu,ZodCIDRv6:Ku,ZodCUID:Tu,ZodCUID2:Nu,ZodCatch:Pc,ZodCodec:qc,ZodCustom:ed,ZodCustomStringFormat:ol,ZodDate:Rl,ZodDefault:zc,ZodDiscriminatedUnion:Yl,ZodE164:tl,ZodEmail:hu,ZodEmoji:Ou,ZodEnum:pc,ZodError:Gs,ZodExactOptional:wc,ZodFile:vc,get ZodFirstPartyTypeKind(){return fd},ZodFunction:Yc,ZodGUID:vu,ZodIPv4:Mu,ZodIPv6:Fu,ZodISODate:qs,ZodISODateTime:Zs,ZodISODuration:Js,ZodISOTime:Hs,ZodIntersection:ec,ZodIssueCode:dd,ZodJWT:il,ZodKSUID:Ru,ZodLazy:Wc,ZodLiteral:hc,ZodMAC:Bu,ZodMap:uc,ZodNaN:Lc,ZodNanoID:Eu,ZodNever:Ul,ZodNonOptional:Cc,ZodNull:El,ZodNullable:Ic,ZodNumber:cl,ZodNumberFormat:pl,ZodObject:Hl,ZodOptional:_c,ZodPipe:Zc,ZodPrefault:Dc,ZodPromise:Gc,ZodReadonly:Hc,ZodRealError:Xs,ZodRecord:rc,ZodSet:cc,ZodString:pu,ZodStringFormat:fu,ZodSuccess:Ac,ZodSymbol:Il,ZodTemplateLiteral:Jc,ZodTransform:bc,ZodTuple:nc,ZodType:cu,ZodULID:Uu,ZodURL:xu,ZodUUID:bu,ZodUndefined:Ol,ZodUnion:Wl,ZodUnknown:Nl,ZodVoid:jl,ZodXID:ju,ZodXor:Gl,_ZodString:du,_default:Ec,_function:Qc,any:Cl,array:ql,base64:Yu,base64url:el,bigint:_l,boolean:bl,catch:jc,check:td,cidrv4:Wu,cidrv6:Gu,clone:D,codec:Bc,coerce:$d,config:u,core:Ps,cuid:Cu,cuid2:Au,custom:nd,date:Zl,decode:iu,decodeAsync:ou,describe:od,discriminatedUnion:Ql,e164:nl,email:gu,emoji:zu,encode:nu,encodeAsync:ru,endsWith:_a,enum:mc,exactOptional:xc,file:yc,flattenError:ie,float32:fl,float64:hl,formatError:re,fromJSONSchema:bd,function:Qc,getErrorMap:md,globalRegistry:eo,gt:ia,gte:ra,guid:yu,hash:ll,hex:ul,hostname:sl,httpUrl:Su,includes:ba,instanceof:sd,int:ml,int32:gl,int64:wl,intersection:tc,ipv4:qu,ipv6:Ju,iso:Ws,json:ld,jwt:rl,keyof:Bl,ksuid:Zu,lazy:Kc,length:ha,literal:gc,locales:Kr,looseObject:Vl,looseRecord:sc,lowercase:va,lt:ta,lte:na,mac:Hu,map:lc,maxLength:ma,maxSize:ca,meta:ad,mime:wa,minLength:fa,minSize:da,multipleOf:la,nan:Rc,nanoid:Du,nativeEnum:fc,negative:aa,never:Pl,nonnegative:ua,nonoptional:Nc,nonpositive:sa,normalize:Ia,null:Dl,nullable:Sc,nullish:Oc,number:dl,object:Fl,optional:kc,overwrite:xa,parse:Ys,parseAsync:Qs,partialRecord:ac,pipe:Mc,positive:oa,prefault:Tc,preprocess:cd,prettifyError:se,promise:Xc,property:ka,readonly:Fc,record:oc,refine:id,regex:ga,regexes:Tt,registry:Qr,safeDecode:su,safeDecodeAsync:lu,safeEncode:au,safeEncodeAsync:uu,safeParse:eu,safeParseAsync:tu,set:dc,setErrorMap:pd,size:pa,slugify:Ea,startsWith:$a,strictObject:Jl,string:mu,stringFormat:al,stringbool:ud,success:Uc,superRefine:rd,symbol:Sl,templateLiteral:Vc,toJSONSchema:As,toLowerCase:Oa,toUpperCase:za,transform:$c,treeifyError:oe,trim:Sa,tuple:ic,uint32:vl,uint64:xl,ulid:Pu,undefined:zl,union:Kl,unknown:Al,uppercase:ya,url:Iu,util:Q,uuid:$u,uuidv4:_u,uuidv6:ku,uuidv7:wu,void:Ll,xid:Lu,xor:Xl,z:_d});const wd="io.modelcontextprotocol/related-task",xd="2.0",Id=nd(e=>null!==e&&("object"==typeof e||"function"==typeof e)),Sd=Kl([mu(),dl().int()]),Od=mu();Vl({ttl:dl().optional(),pollInterval:dl().optional()});const zd=Fl({ttl:dl().optional()}),Ed=Fl({taskId:mu()}),Dd=Vl({progressToken:Sd.optional(),[wd]:Ed.optional()}),Td=Fl({_meta:Dd.optional()}),Cd=Td.extend({task:zd.optional()}),Nd=Fl({method:mu(),params:Td.loose().optional()}),Ad=Fl({_meta:Dd.optional()}),Ud=Fl({method:mu(),params:Ad.loose().optional()}),Pd=Vl({_meta:Dd.optional()}),jd=Kl([mu(),dl().int()]),Ld=Fl({jsonrpc:gc(xd),id:jd,...Nd.shape}).strict(),Rd=e=>Ld.safeParse(e).success,Zd=Fl({jsonrpc:gc(xd),...Ud.shape}).strict(),Md=Fl({jsonrpc:gc(xd),id:jd,result:Pd}).strict(),qd=e=>Md.safeParse(e).success;var Bd;!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"}(Bd||(Bd={}));const Hd=Fl({jsonrpc:gc(xd),id:jd.optional(),error:Fl({code:dl().int(),message:mu(),data:Al().optional()})}).strict(),Fd=Kl([Ld,Zd,Md,Hd]);Kl([Md,Hd]);const Jd=Pd.strict(),Vd=Ad.extend({requestId:jd.optional(),reason:mu().optional()}),Wd=Ud.extend({method:gc("notifications/cancelled"),params:Vd}),Kd=Fl({src:mu(),mimeType:mu().optional(),sizes:ql(mu()).optional(),theme:mc(["light","dark"]).optional()}),Gd=Fl({icons:ql(Kd).optional()}),Xd=Fl({name:mu(),title:mu().optional()}),Yd=Xd.extend({...Xd.shape,...Gd.shape,version:mu(),websiteUrl:mu().optional(),description:mu().optional()}),Qd=tc(Fl({applyDefaults:bl().optional()}),oc(mu(),Al())),ep=cd(e=>e&&"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length?{form:{}}:e,tc(Fl({form:Qd.optional(),url:Id.optional()}),oc(mu(),Al()).optional())),tp=Vl({list:Id.optional(),cancel:Id.optional(),requests:Vl({sampling:Vl({createMessage:Id.optional()}).optional(),elicitation:Vl({create:Id.optional()}).optional()}).optional()}),np=Vl({list:Id.optional(),cancel:Id.optional(),requests:Vl({tools:Vl({call:Id.optional()}).optional()}).optional()}),ip=Fl({experimental:oc(mu(),Id).optional(),sampling:Fl({context:Id.optional(),tools:Id.optional()}).optional(),elicitation:ep.optional(),roots:Fl({listChanged:bl().optional()}).optional(),tasks:tp.optional(),extensions:oc(mu(),Id).optional()}),rp=Td.extend({protocolVersion:mu(),capabilities:ip,clientInfo:Yd}),op=Nd.extend({method:gc("initialize"),params:rp}),ap=Fl({experimental:oc(mu(),Id).optional(),logging:Id.optional(),completions:Id.optional(),prompts:Fl({listChanged:bl().optional()}).optional(),resources:Fl({subscribe:bl().optional(),listChanged:bl().optional()}).optional(),tools:Fl({listChanged:bl().optional()}).optional(),tasks:np.optional(),extensions:oc(mu(),Id).optional()}),sp=Pd.extend({protocolVersion:mu(),capabilities:ap,serverInfo:Yd,instructions:mu().optional()}),up=Ud.extend({method:gc("notifications/initialized"),params:Ad.optional()}),lp=Nd.extend({method:gc("ping"),params:Td.optional()}),cp=Fl({progress:dl(),total:kc(dl()),message:kc(mu())}),dp=Fl({...Ad.shape,...cp.shape,progressToken:Sd}),pp=Ud.extend({method:gc("notifications/progress"),params:dp}),mp=Td.extend({cursor:Od.optional()}),fp=Nd.extend({params:mp.optional()}),hp=Pd.extend({nextCursor:Od.optional()}),gp=mc(["working","input_required","completed","failed","cancelled"]),vp=Fl({taskId:mu(),status:gp,ttl:Kl([dl(),Dl()]),createdAt:mu(),lastUpdatedAt:mu(),pollInterval:kc(dl()),statusMessage:kc(mu())}),yp=Pd.extend({task:vp}),bp=Ad.merge(vp),$p=Ud.extend({method:gc("notifications/tasks/status"),params:bp}),_p=Nd.extend({method:gc("tasks/get"),params:Td.extend({taskId:mu()})}),kp=Pd.merge(vp),wp=Nd.extend({method:gc("tasks/result"),params:Td.extend({taskId:mu()})});Pd.loose();const xp=fp.extend({method:gc("tasks/list")}),Ip=hp.extend({tasks:ql(vp)}),Sp=Nd.extend({method:gc("tasks/cancel"),params:Td.extend({taskId:mu()})}),Op=Pd.merge(vp),zp=Fl({uri:mu(),mimeType:kc(mu()),_meta:oc(mu(),Al()).optional()}),Ep=zp.extend({text:mu()}),Dp=mu().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),Tp=zp.extend({blob:Dp}),Cp=mc(["user","assistant"]),Np=Fl({audience:ql(Cp).optional(),priority:dl().min(0).max(1).optional(),lastModified:Ms({offset:!0}).optional()}),Ap=Fl({...Xd.shape,...Gd.shape,uri:mu(),description:kc(mu()),mimeType:kc(mu()),size:kc(dl()),annotations:Np.optional(),_meta:kc(Vl({}))}),Up=Fl({...Xd.shape,...Gd.shape,uriTemplate:mu(),description:kc(mu()),mimeType:kc(mu()),annotations:Np.optional(),_meta:kc(Vl({}))}),Pp=fp.extend({method:gc("resources/list")}),jp=hp.extend({resources:ql(Ap)}),Lp=fp.extend({method:gc("resources/templates/list")}),Rp=hp.extend({resourceTemplates:ql(Up)}),Zp=Td.extend({uri:mu()}),Mp=Zp,qp=Nd.extend({method:gc("resources/read"),params:Mp}),Bp=Pd.extend({contents:ql(Kl([Ep,Tp]))}),Hp=Ud.extend({method:gc("notifications/resources/list_changed"),params:Ad.optional()}),Fp=Zp,Jp=Nd.extend({method:gc("resources/subscribe"),params:Fp}),Vp=Zp,Wp=Nd.extend({method:gc("resources/unsubscribe"),params:Vp}),Kp=Ad.extend({uri:mu()}),Gp=Ud.extend({method:gc("notifications/resources/updated"),params:Kp}),Xp=Fl({name:mu(),description:kc(mu()),required:kc(bl())}),Yp=Fl({...Xd.shape,...Gd.shape,description:kc(mu()),arguments:kc(ql(Xp)),_meta:kc(Vl({}))}),Qp=fp.extend({method:gc("prompts/list")}),em=hp.extend({prompts:ql(Yp)}),tm=Td.extend({name:mu(),arguments:oc(mu(),mu()).optional()}),nm=Nd.extend({method:gc("prompts/get"),params:tm}),im=Fl({type:gc("text"),text:mu(),annotations:Np.optional(),_meta:oc(mu(),Al()).optional()}),rm=Fl({type:gc("image"),data:Dp,mimeType:mu(),annotations:Np.optional(),_meta:oc(mu(),Al()).optional()}),om=Fl({type:gc("audio"),data:Dp,mimeType:mu(),annotations:Np.optional(),_meta:oc(mu(),Al()).optional()}),am=Fl({type:gc("tool_use"),name:mu(),id:mu(),input:oc(mu(),Al()),_meta:oc(mu(),Al()).optional()}),sm=Fl({type:gc("resource"),resource:Kl([Ep,Tp]),annotations:Np.optional(),_meta:oc(mu(),Al()).optional()}),um=Ap.extend({type:gc("resource_link")}),lm=Kl([im,rm,om,um,sm]),cm=Fl({role:Cp,content:lm}),dm=Pd.extend({description:mu().optional(),messages:ql(cm)}),pm=Ud.extend({method:gc("notifications/prompts/list_changed"),params:Ad.optional()}),mm=Fl({title:mu().optional(),readOnlyHint:bl().optional(),destructiveHint:bl().optional(),idempotentHint:bl().optional(),openWorldHint:bl().optional()}),fm=Fl({taskSupport:mc(["required","optional","forbidden"]).optional()}),hm=Fl({...Xd.shape,...Gd.shape,description:mu().optional(),inputSchema:Fl({type:gc("object"),properties:oc(mu(),Id).optional(),required:ql(mu()).optional()}).catchall(Al()),outputSchema:Fl({type:gc("object"),properties:oc(mu(),Id).optional(),required:ql(mu()).optional()}).catchall(Al()).optional(),annotations:mm.optional(),execution:fm.optional(),_meta:oc(mu(),Al()).optional()}),gm=fp.extend({method:gc("tools/list")}),vm=hp.extend({tools:ql(hm)}),ym=Pd.extend({content:ql(lm).default([]),structuredContent:oc(mu(),Al()).optional(),isError:bl().optional()});ym.or(Pd.extend({toolResult:Al()}));const bm=Cd.extend({name:mu(),arguments:oc(mu(),Al()).optional()}),$m=Nd.extend({method:gc("tools/call"),params:bm}),_m=Ud.extend({method:gc("notifications/tools/list_changed"),params:Ad.optional()});Fl({autoRefresh:bl().default(!0),debounceMs:dl().int().nonnegative().default(300)});const km=mc(["debug","info","notice","warning","error","critical","alert","emergency"]),wm=Td.extend({level:km}),xm=Nd.extend({method:gc("logging/setLevel"),params:wm}),Im=Ad.extend({level:km,logger:mu().optional(),data:Al()}),Sm=Ud.extend({method:gc("notifications/message"),params:Im}),Om=Fl({name:mu().optional()}),zm=Fl({hints:ql(Om).optional(),costPriority:dl().min(0).max(1).optional(),speedPriority:dl().min(0).max(1).optional(),intelligencePriority:dl().min(0).max(1).optional()}),Em=Fl({mode:mc(["auto","required","none"]).optional()}),Dm=Fl({type:gc("tool_result"),toolUseId:mu().describe("The unique identifier for the corresponding tool call."),content:ql(lm).default([]),structuredContent:Fl({}).loose().optional(),isError:bl().optional(),_meta:oc(mu(),Al()).optional()}),Tm=Ql("type",[im,rm,om]),Cm=Ql("type",[im,rm,om,am,Dm]),Nm=Fl({role:Cp,content:Kl([Cm,ql(Cm)]),_meta:oc(mu(),Al()).optional()}),Am=Cd.extend({messages:ql(Nm),modelPreferences:zm.optional(),systemPrompt:mu().optional(),includeContext:mc(["none","thisServer","allServers"]).optional(),temperature:dl().optional(),maxTokens:dl().int(),stopSequences:ql(mu()).optional(),metadata:Id.optional(),tools:ql(hm).optional(),toolChoice:Em.optional()}),Um=Nd.extend({method:gc("sampling/createMessage"),params:Am}),Pm=Pd.extend({model:mu(),stopReason:kc(mc(["endTurn","stopSequence","maxTokens"]).or(mu())),role:Cp,content:Tm}),jm=Pd.extend({model:mu(),stopReason:kc(mc(["endTurn","stopSequence","maxTokens","toolUse"]).or(mu())),role:Cp,content:Kl([Cm,ql(Cm)])}),Lm=Fl({type:gc("boolean"),title:mu().optional(),description:mu().optional(),default:bl().optional()}),Rm=Fl({type:gc("string"),title:mu().optional(),description:mu().optional(),minLength:dl().optional(),maxLength:dl().optional(),format:mc(["email","uri","date","date-time"]).optional(),default:mu().optional()}),Zm=Fl({type:mc(["number","integer"]),title:mu().optional(),description:mu().optional(),minimum:dl().optional(),maximum:dl().optional(),default:dl().optional()}),Mm=Fl({type:gc("string"),title:mu().optional(),description:mu().optional(),enum:ql(mu()),default:mu().optional()}),qm=Fl({type:gc("string"),title:mu().optional(),description:mu().optional(),oneOf:ql(Fl({const:mu(),title:mu()})),default:mu().optional()}),Bm=Fl({type:gc("string"),title:mu().optional(),description:mu().optional(),enum:ql(mu()),enumNames:ql(mu()).optional(),default:mu().optional()}),Hm=Kl([Mm,qm]),Fm=Kl([Fl({type:gc("array"),title:mu().optional(),description:mu().optional(),minItems:dl().optional(),maxItems:dl().optional(),items:Fl({type:gc("string"),enum:ql(mu())}),default:ql(mu()).optional()}),Fl({type:gc("array"),title:mu().optional(),description:mu().optional(),minItems:dl().optional(),maxItems:dl().optional(),items:Fl({anyOf:ql(Fl({const:mu(),title:mu()}))}),default:ql(mu()).optional()})]),Jm=Kl([Bm,Hm,Fm]),Vm=Kl([Jm,Lm,Rm,Zm]),Wm=Kl([Cd.extend({mode:gc("form").optional(),message:mu(),requestedSchema:Fl({type:gc("object"),properties:oc(mu(),Vm),required:ql(mu()).optional()})}),Cd.extend({mode:gc("url"),message:mu(),elicitationId:mu(),url:mu().url()})]),Km=Nd.extend({method:gc("elicitation/create"),params:Wm}),Gm=Ad.extend({elicitationId:mu()}),Xm=Ud.extend({method:gc("notifications/elicitation/complete"),params:Gm}),Ym=Pd.extend({action:mc(["accept","decline","cancel"]),content:cd(e=>null===e?void 0:e,oc(mu(),Kl([mu(),dl(),bl(),ql(mu())])).optional())}),Qm=Fl({type:gc("ref/resource"),uri:mu()}),ef=Fl({type:gc("ref/prompt"),name:mu()}),tf=Td.extend({ref:Kl([ef,Qm]),argument:Fl({name:mu(),value:mu()}),context:Fl({arguments:oc(mu(),mu()).optional()}).optional()}),nf=Nd.extend({method:gc("completion/complete"),params:tf}),rf=Pd.extend({completion:Vl({values:ql(mu()).max(100),total:kc(dl().int()),hasMore:kc(bl())})}),of=Fl({uri:mu().startsWith("file://"),name:mu().optional(),_meta:oc(mu(),Al()).optional()}),af=Nd.extend({method:gc("roots/list"),params:Td.optional()}),sf=Pd.extend({roots:ql(of)}),uf=Ud.extend({method:gc("notifications/roots/list_changed"),params:Ad.optional()});Kl([lp,op,nf,xm,nm,Qp,Pp,Lp,qp,Jp,Wp,$m,gm,_p,wp,xp,Sp]),Kl([Wd,pp,up,uf,$p]),Kl([Jd,Pm,jm,Ym,sf,kp,Ip,yp]),Kl([lp,Um,Km,af,_p,wp,xp,Sp]),Kl([Wd,pp,Sm,Gp,Hp,_m,pm,$p,Xm]),Kl([Jd,sp,rf,dm,em,jp,Rp,Bp,ym,vm,kp,Ip,yp]);class lf 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===Bd.UrlElicitationRequired&&n){const e=n;if(e.elicitations)return new cf(e.elicitations,t)}return new lf(e,t,n)}}class cf extends lf{constructor(e,t=`URL elicitation${e.length>1?"s":""} required`){super(Bd.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(js(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(js(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=Ls(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(Wd,e=>{this._oncancel(e)}),this.setNotificationHandler(pp,e=>{this._onprogress(e)}),this.setRequestHandler(lp,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 lf(Bd.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 lf(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 lf(Bd.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 lf(Bd.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 lf(Bd.InvalidParams,`Task not found: ${e.params.taskId}`);if(df(n.status))throw new lf(Bd.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 lf(Bd.InvalidParams,`Task not found after cancellation: ${e.params.taskId}`);return{_meta:{},...i}}catch(e){if(e instanceof lf)throw e;throw new lf(Bd.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),lf.fromError(Bd.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),qd(e)||(n=e,Hd.safeParse(n).success)?this._onresponse(e):Rd(e)?this._onrequest(e,t):(e=>Zd.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=lf.fromError(Bd.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:Bd.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,Cd.safeParse(s).success?e.params.task:void 0);var s;const u=this._taskStore?this.requestTaskStore(e,i?.sessionId):void 0,l={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 lf(Bd.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&&u&&await u.updateTaskStatus(s,"input_required"),await this.request(t,n,a)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:r,taskStore:u,taskRequestedTtl:a?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{a&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,l)).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:Bd.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),qd(e))n(e);else{n(new lf(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(qd(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),qd(e))i(e);else{i(lf.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 lf?e:new lf(Bd.InternalError,String(e))}}return}let r;try{const i=await this.request(e,yp,n);if(!i.task)throw new lf(Bd.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 lf(Bd.InternalError,`Task ${r} failed`)}:"cancelled"===e.status&&(yield{type:"error",error:new lf(Bd.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 lf?e:new lf(Bd.InternalError,String(e))}}}request(e,t,n){const{relatedRequestId:i,resumptionToken:r,onresumptiontoken:o,task:a,relatedTask:s}=n??{};return new Promise((u,l)=>{const c=e=>{l(e)};if(!this._transport)return void c(new Error("Not connected"));if(!0===this._options?.enforceStrictCapabilities)try{this.assertCapabilityForMethod(e.method),a&&this.assertTaskCapability(e.method)}catch(e){return void c(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 lf?e:new lf(Bd.RequestTimeout,String(e));l(t)};this._responseHandlers.set(d,e=>{if(!n?.signal?.aborted){if(e instanceof Error)return l(e);try{const n=Ls(t,e.result);n.success?u(n.data):l(n.error)}catch(e){l(e)}}}),n?.signal?.addEventListener("abort",()=>{m(n?.signal?.reason)});const f=n?.timeout??6e4;this._setupTimeout(d,f,n?.maxTotalTimeout,()=>m(lf.fromError(Bd.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),l(e)})}else this._transport.send(p,{relatedRequestId:i,resumptionToken:r,onresumptiontoken:o}).catch(e=>{this._cleanupTimeout(d),l(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},Op,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 lf(Bd.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 lf(Bd.InvalidRequest,"Request cancelled"));const r=setTimeout(e,n);t.addEventListener("abort",()=>{clearTimeout(r),i(new lf(Bd.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 lf(Bd.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 lf(Bd.InvalidParams,`Task "${e}" not found - it may have been cleaned up`);if(df(o.status))throw new lf(Bd.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 yf{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=Fd.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 bf=Kl([gc("light"),gc("dark")]).describe("Color theme preference for the host environment."),$f=Kl([gc("inline"),gc("fullscreen"),gc("pip")]).describe("Display mode for UI presentation."),_f=oc(Kl([gc("--color-background-primary"),gc("--color-background-secondary"),gc("--color-background-tertiary"),gc("--color-background-inverse"),gc("--color-background-ghost"),gc("--color-background-info"),gc("--color-background-danger"),gc("--color-background-success"),gc("--color-background-warning"),gc("--color-background-disabled"),gc("--color-text-primary"),gc("--color-text-secondary"),gc("--color-text-tertiary"),gc("--color-text-inverse"),gc("--color-text-ghost"),gc("--color-text-info"),gc("--color-text-danger"),gc("--color-text-success"),gc("--color-text-warning"),gc("--color-text-disabled"),gc("--color-border-primary"),gc("--color-border-secondary"),gc("--color-border-tertiary"),gc("--color-border-inverse"),gc("--color-border-ghost"),gc("--color-border-info"),gc("--color-border-danger"),gc("--color-border-success"),gc("--color-border-warning"),gc("--color-border-disabled"),gc("--color-ring-primary"),gc("--color-ring-secondary"),gc("--color-ring-inverse"),gc("--color-ring-info"),gc("--color-ring-danger"),gc("--color-ring-success"),gc("--color-ring-warning"),gc("--font-sans"),gc("--font-mono"),gc("--font-weight-normal"),gc("--font-weight-medium"),gc("--font-weight-semibold"),gc("--font-weight-bold"),gc("--font-text-xs-size"),gc("--font-text-sm-size"),gc("--font-text-md-size"),gc("--font-text-lg-size"),gc("--font-heading-xs-size"),gc("--font-heading-sm-size"),gc("--font-heading-md-size"),gc("--font-heading-lg-size"),gc("--font-heading-xl-size"),gc("--font-heading-2xl-size"),gc("--font-heading-3xl-size"),gc("--font-text-xs-line-height"),gc("--font-text-sm-line-height"),gc("--font-text-md-line-height"),gc("--font-text-lg-line-height"),gc("--font-heading-xs-line-height"),gc("--font-heading-sm-line-height"),gc("--font-heading-md-line-height"),gc("--font-heading-lg-line-height"),gc("--font-heading-xl-line-height"),gc("--font-heading-2xl-line-height"),gc("--font-heading-3xl-line-height"),gc("--border-radius-xs"),gc("--border-radius-sm"),gc("--border-radius-md"),gc("--border-radius-lg"),gc("--border-radius-xl"),gc("--border-radius-full"),gc("--border-width-regular"),gc("--shadow-hairline"),gc("--shadow-sm"),gc("--shadow-md"),gc("--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."),Kl([mu(),zl()]).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.");Fl({method:gc("ui/open-link"),params:Fl({url:mu().describe("URL to open in the host's browser")})});var kf=Fl({isError:bl().optional().describe("True if the host failed to open the URL (e.g., due to security policy).")}).passthrough(),wf=Fl({isError:bl().optional().describe("True if the download failed (e.g., user cancelled or host denied).")}).passthrough(),xf=Fl({isError:bl().optional().describe("True if the host rejected or failed to deliver the message.")}).passthrough();Fl({method:gc("ui/notifications/sandbox-proxy-ready"),params:Fl({})});var If=Fl({connectDomains:ql(mu()).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:ql(mu()).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:ql(mu()).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:ql(mu()).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=Fl({camera:Fl({}).optional().describe("Request camera access.\n\nMaps to Permission Policy `camera` feature."),microphone:Fl({}).optional().describe("Request microphone access.\n\nMaps to Permission Policy `microphone` feature."),geolocation:Fl({}).optional().describe("Request geolocation access.\n\nMaps to Permission Policy `geolocation` feature."),clipboardWrite:Fl({}).optional().describe("Request clipboard write access.\n\nMaps to Permission Policy `clipboard-write` feature.")});Fl({method:gc("ui/notifications/size-changed"),params:Fl({width:dl().optional().describe("New width in pixels."),height:dl().optional().describe("New height in pixels.")})});var Of=Fl({method:gc("ui/notifications/tool-input"),params:Fl({arguments:oc(mu(),Al().describe("Complete tool call arguments as key-value pairs.")).optional().describe("Complete tool call arguments as key-value pairs.")})}),zf=Fl({method:gc("ui/notifications/tool-input-partial"),params:Fl({arguments:oc(mu(),Al().describe("Partial tool call arguments (incomplete, may change).")).optional().describe("Partial tool call arguments (incomplete, may change).")})}),Ef=Fl({method:gc("ui/notifications/tool-cancelled"),params:Fl({reason:mu().optional().describe('Optional reason for the cancellation (e.g., "user action", "timeout").')})}),Df=Fl({fonts:mu().optional()}),Tf=Fl({variables:_f.optional().describe("CSS variables for theming the app."),css:Df.optional().describe("CSS blocks that apps can inject.")}),Cf=Fl({method:gc("ui/resource-teardown"),params:Fl({})});oc(mu(),Al());var Nf=Fl({text:Fl({}).optional().describe("Host supports text content blocks."),image:Fl({}).optional().describe("Host supports image content blocks."),audio:Fl({}).optional().describe("Host supports audio content blocks."),resource:Fl({}).optional().describe("Host supports resource content blocks."),resourceLink:Fl({}).optional().describe("Host supports resource link content blocks."),structuredContent:Fl({}).optional().describe("Host supports structured content.")});Fl({method:gc("ui/notifications/request-teardown"),params:Fl({}).optional()});var Af=Fl({experimental:oc(mu(),oc(mu(),Cl()).describe("Experimental features keyed by identifier.")).optional().describe("Experimental features keyed by identifier."),openLinks:Fl({}).optional().describe("Host supports opening external URLs."),downloadFile:Fl({}).optional().describe("Host supports file downloads via ui/download-file."),serverTools:Fl({listChanged:bl().optional().describe("Host supports tools/list_changed notifications.")}).optional().describe("Host can proxy tool calls to the MCP server."),serverResources:Fl({listChanged:bl().optional().describe("Host supports resources/list_changed notifications.")}).optional().describe("Host can proxy resource reads to the MCP server."),logging:Fl({}).optional().describe("Host accepts log messages."),sandbox:Fl({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:Fl({tools:Fl({}).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.")}),Uf=Fl({experimental:oc(mu(),oc(mu(),Cl()).describe("Experimental features keyed by identifier.")).optional().describe("Experimental features keyed by identifier."),tools:Fl({listChanged:bl().optional().describe("App supports tools/list_changed notifications.")}).optional().describe("App exposes MCP-style tools that the host can call."),availableDisplayModes:ql($f).optional().describe("Display modes the app supports.")});Fl({method:gc("ui/notifications/initialized"),params:Fl({}).optional()}),Fl({csp:If.optional().describe("Content Security Policy configuration for UI resources."),permissions:Sf.optional().describe("Sandbox permissions requested by the UI resource."),domain:mu().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:bl().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")}),Fl({method:gc("ui/request-display-mode"),params:Fl({mode:$f.describe("The display mode being requested.")})});var Pf=Fl({mode:$f.describe("The display mode that was actually set. May differ from requested if not supported.")}).passthrough(),jf=Kl([gc("model"),gc("app")]).describe("Tool visibility scope - who can access the tool.");Fl({resourceUri:mu().optional(),visibility:ql(jf).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:Pl().optional(),permissions:Pl().optional()}),Fl({mimeTypes:ql(mu()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),Fl({method:gc("ui/download-file"),params:Fl({contents:ql(Kl([sm,um])).describe("Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.")})}),Fl({method:gc("ui/message"),params:Fl({role:gc("user").describe('Message role, currently only "user" is supported.'),content:ql(lm).describe("Message content blocks (text, image, etc.).")})}),Fl({method:gc("ui/notifications/sandbox-resource-ready"),params:Fl({html:mu().describe("HTML content to load into the inner iframe."),sandbox:mu().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 Lf=Fl({method:gc("ui/notifications/tool-result"),params:ym.describe("Standard MCP tool execution result.")}),Rf=Fl({toolInfo:Fl({id:jd.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:bf.optional().describe("Current color theme preference."),styles:Tf.optional().describe("Style configuration for theming the app."),displayMode:$f.optional().describe("How the UI is currently displayed."),availableDisplayModes:ql($f).optional().describe("Display modes the host supports."),containerDimensions:Kl([Fl({height:dl().describe("Fixed container height in pixels.")}),Fl({maxHeight:Kl([dl(),zl()]).optional().describe("Maximum container height in pixels.")})]).and(Kl([Fl({width:dl().describe("Fixed container width in pixels.")}),Fl({maxWidth:Kl([dl(),zl()]).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:mu().optional().describe("User's language and region preference in BCP 47 format."),timeZone:mu().optional().describe("User's timezone in IANA format."),userAgent:mu().optional().describe("Host application identifier."),platform:Kl([gc("web"),gc("desktop"),gc("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:Fl({touch:bl().optional().describe("Whether the device supports touch input."),hover:bl().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:Fl({top:dl().describe("Top safe area inset in pixels."),right:dl().describe("Right safe area inset in pixels."),bottom:dl().describe("Bottom safe area inset in pixels."),left:dl().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),Zf=Fl({method:gc("ui/notifications/host-context-changed"),params:Rf.describe("Partial context update containing only changed fields.")});Fl({method:gc("ui/update-model-context"),params:Fl({content:ql(lm).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:oc(mu(),Al().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})}),Fl({method:gc("ui/initialize"),params:Fl({appInfo:Yd.describe("App identification (name and version)."),appCapabilities:Uf.describe("Features and capabilities this app provides."),protocolVersion:mu().describe("Protocol version this app supports.")})});var Mf=Fl({protocolVersion:mu().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:Yd.describe("Host application identification and version."),hostCapabilities:Af.describe("Features and capabilities provided by the host."),hostContext:Rf.describe("Rich context about the host environment.")}).passthrough(),qf={target:"draft-2020-12"};async function Bf(e,t){let n=e["~standard"];if(n.jsonSchema)return n.jsonSchema[t](qf);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 Hf(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 Ff 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:Of,toolinputpartial:zf,toolresult:Lf,toolcancelled:Ef,hostcontextchanged:Zf};static ONE_SHOT_EVENTS=new Set(["toolinput","toolinputpartial","toolresult","toolcancelled"]);_everHadListener=new Set;_assertHandlerTiming(e){if(!Ff.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||u({jitless:!0}),this.setRequestHandler(lp,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 Hf(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 Hf(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 Bf(t.inputSchema,"input"):{type:"object",properties:{}}};return t.outputSchema&&(n.outputSchema=await Bf(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(Cf,(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},ym,{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async readServerResource(e,t){return this._assertInitialized("readServerResource"),await this.request({method:"resources/read",params:e},Bp,t)}async listServerResources(e,t){return this._assertInitialized("listServerResources"),await this.request({method:"resources/list",params:e},jp,t)}async createSamplingMessage(e,t){this._assertInitialized("createSamplingMessage");let n=e.tools?jm:Pm;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},Jd,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},Pf,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 yf(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 Jf(){}function Vf(e,t){for(const n in t)e[n]=t[n];return e}function Wf(e){return e()}function Kf(){return Object.create(null)}function Gf(e){e.forEach(Wf)}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 Jf;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?Vf(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:Jf}function sh(e,t){e.appendChild(t)}function uh(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=ph("style");e.id=t,e.textContent=n,function(e,t){sh(e.head||e,t),t.sheet}(i,e)}}function lh(e,t,n){e.insertBefore(t,n||null)}function ch(e){e.parentNode&&e.parentNode.removeChild(e)}function dh(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function ph(e){return document.createElement(e)}function mh(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function fh(e){return document.createTextNode(e)}function hh(){return fh(" ")}function gh(){return fh("")}function vh(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function yh(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 $h(e){return""===e?null:+e}function _h(e,t){t=""+t,e.data!==t&&(e.data=t)}function kh(e,t){e.value=null==t?"":t}function wh(e,t,n,i){null==n?e.style.removeProperty(t):e.style.setProperty(t,n,"")}function xh(e,t,n){e.classList[n?"add":"remove"](t)}class Ih{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=mh(t.nodeName):this.e=ph(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)lh(this.t,this.n[t],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(ch)}}function Sh(e,t){return new e(t)}let Oh;function zh(e){Oh=e}function Eh(){if(!Oh)throw new Error("Function called outside component initialization");return Oh}function Dh(e){Eh().$$.on_mount.push(e)}const Th=[],Ch=[];let Nh=[];const Ah=[],Uh=Promise.resolve();let Ph=!1;function jh(e){Nh.push(e)}function Lh(e){Ah.push(e)}const Rh=new Set;let Zh=0;function Mh(){if(0!==Zh)return;const e=Oh;do{try{for(;Zh<Th.length;){const e=Th[Zh];Zh++,zh(e),qh(e.$$)}}catch(e){throw Th.length=0,Zh=0,e}for(zh(null),Th.length=0,Zh=0;Ch.length;)Ch.pop()();for(let e=0;e<Nh.length;e+=1){const t=Nh[e];Rh.has(t)||(Rh.add(t),t())}Nh.length=0}while(Th.length);for(;Ah.length;)Ah.pop()();Ph=!1,Rh.clear(),zh(e)}function qh(e){if(null!==e.fragment){e.update(),Gf(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(jh)}}const Bh=new Set;let Hh;function Fh(){Hh={r:0,c:[],p:Hh}}function Jh(){Hh.r||Gf(Hh.c),Hh=Hh.p}function Vh(e,t){e&&e.i&&(Bh.delete(e),e.i(t))}function Wh(e,t,n,i){if(e&&e.o){if(Bh.has(e))return;Bh.add(e),Hh.c.push(()=>{Bh.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function Kh(e,t,n){const i=e.$$.props[t];void 0!==i&&(e.$$.bound[i]=n,n(e.$$.ctx[i]))}function Gh(e){e&&e.c()}function Xh(e,t,n,i){const{fragment:r,after_update:o}=e.$$;r&&r.m(t,n),i||jh(()=>{const t=e.$$.on_mount.map(Wf).filter(Xf);e.$$.on_destroy?e.$$.on_destroy.push(...t):Gf(t),e.$$.on_mount=[]}),o.forEach(jh)}function Yh(e,t){const n=e.$$;null!==n.fragment&&(!function(e){const t=[],n=[];Nh.forEach(i=>-1===e.indexOf(i)?t.push(i):n.push(i)),n.forEach(e=>e()),Nh=t}(n.after_update),Gf(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Qh(e,t){-1===e.$$.dirty[0]&&(Th.push(e),Ph||(Ph=!0,Uh.then(Mh)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function eg(e,t,n,i,r,o,a,s=[-1]){const u=Oh;zh(e);const l=e.$$={fragment:null,ctx:[],props:o,update:Jf,not_equal:r,bound:Kf(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:Kf(),dirty:s,skip_bound:!1,root:t.target||u.$$.root};a&&a(l.root);let c=!1;if(l.ctx=n?n(e,t.props||{},(t,n,...i)=>{const o=i.length?i[0]:n;return l.ctx&&r(l.ctx[t],l.ctx[t]=o)&&(!l.skip_bound&&l.bound[t]&&l.bound[t](o),c&&Qh(e,t)),n}):[],l.update(),c=!0,Gf(l.before_update),l.fragment=!!i&&i(l.ctx),t.target){if(t.hydrate){const e=function(e){return Array.from(e.childNodes)}(t.target);l.fragment&&l.fragment.l(e),e.forEach(ch)}else l.fragment&&l.fragment.c();t.intro&&Vh(e.$$.fragment),Xh(e,t.target,t.anchor,t.customElement),Mh()}zh(u)}class tg{$destroy(){Yh(this,1),this.$destroy=Jf}$on(e,t){if(!Xf(t))return Jf;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 ng=[];function ig(e,t=Jf){let n;const i=new Set;function r(t){if(Yf(e,t)&&(e=t,n)){const t=!ng.length;for(const t of i)t[1](),ng.push(t,e);if(t){for(let e=0;e<ng.length;e+=2)ng[e][0](ng[e+1]);ng.length=0}}}return{set:r,update:function(t){r(t(e))},subscribe:function(o,a=Jf){const s=[o,a];return i.add(s),1===i.size&&(n=t(r)||Jf),o(e),()=>{i.delete(s),0===i.size&&n&&(n(),n=null)}}}}const rg={message:!1,updateModelContext:!1,openLinks:!1};class og extends Error{constructor(e="Update cancelled"){super(e),this.name="HandoffCancelledError"}}function ag(e){const t=e.getHostCapabilities();return{message:null!=t?.message,updateModelContext:null!=t?.updateModelContext,openLinks:null!=t?.openLinks}}function sg(e){return e.message}function ug(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 lg(e){if(!navigator.clipboard?.writeText)throw new Error("Clipboard is not available in this host.");await navigator.clipboard.writeText(e)}const cg="mcp-external-links";function dg(e){uh(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 pg=e=>({}),mg=e=>({});function fg(e){let t;return{c(){t=ph("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>',yh(t,"class","drift-notice svelte-h4n0sq")},m(e,n){lh(e,t,n)},d(e){e&&ch(t)}}}function hg(e){let t;function n(e,t){return e[11]?vg:gg}let i=n(e),r=i(e);return{c(){r.c(),t=gh()},m(e,n){r.m(e,n),lh(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&&ch(t)}}}function gg(e){let t,n,i;return{c(){t=ph("button"),t.textContent="Restore original",yh(t,"type","button"),yh(t,"class","restore-link svelte-h4n0sq")},m(r,o){lh(r,t,o),n||(i=vh(t,"click",e[25]),n=!0)},p:Jf,d(e){e&&ch(t),n=!1,i()}}}function vg(e){let t,n,i,r,o,a,s;return{c(){t=ph("span"),n=fh("Restore original settings?\n "),i=ph("button"),i.textContent="Confirm",r=hh(),o=ph("button"),o.textContent="Cancel",yh(i,"type","button"),yh(i,"class","restore-confirm-btn svelte-h4n0sq"),yh(o,"type","button"),yh(o,"class","restore-confirm-btn cancel svelte-h4n0sq"),yh(t,"class","restore-confirm svelte-h4n0sq")},m(u,l){lh(u,t,l),sh(t,n),sh(t,i),sh(t,r),sh(t,o),a||(s=[vh(i,"click",e[23]),vh(o,"click",e[24])],a=!0)},p:Jf,d(e){e&&ch(t),a=!1,Gf(s)}}}function yg(e){let t;return{c(){t=fh("Send Updates to Agent")},m(e,n){lh(e,t,n)},p:Jf,d(e){e&&ch(t)}}}function bg(e){let t;return{c(){t=fh("Copy to Clipboard")},m(e,n){lh(e,t,n)},p:Jf,d(e){e&&ch(t)}}}function $g(e){let t;return{c(){t=fh(e[8])},m(e,n){lh(e,t,n)},p(e,n){256&n&&_h(t,e[8])},d(e){e&&ch(t)}}}function _g(e){let t,n=e[12]?"Copying…":"Sending…";return{c(){t=fh(n)},m(e,n){lh(e,t,n)},p(e,i){4096&i&&n!==(n=e[12]?"Copying…":"Sending…")&&_h(t,n)},d(e){e&&ch(t)}}}function kg(e){let t;return{c(){t=fh("Connecting…")},m(e,n){lh(e,t,n)},p:Jf,d(e){e&&ch(t)}}}function wg(e){let t,n;return{c(){t=ph("p"),n=fh(e[10]),yh(t,"class","status hint svelte-h4n0sq")},m(e,i){lh(e,t,i),sh(t,n)},p(e,t){1024&t&&_h(n,e[10])},d(e){e&&ch(t)}}}function xg(e){let t,n;return{c(){t=ph("p"),n=fh(e[9]),yh(t,"class","status error svelte-h4n0sq")},m(e,i){lh(e,t,i),sh(t,n)},p(e,t){512&t&&_h(n,e[9])},d(e){e&&ch(t)}}}function Ig(e){let t,n,i;return{c(){t=ph("p"),n=fh("Could not connect to host: "),i=fh(e[4]),yh(t,"class","status error svelte-h4n0sq")},m(e,r){lh(e,t,r),sh(t,n),sh(t,i)},p(e,t){16&t&&_h(i,e[4])},d(e){e&&ch(t)}}}function Sg(e){let t,n,i,r,o,a,s,u,l,c,d,p,m,f,h,g,v,y,b,$,_;const k=e[22].controls,w=eh(k,e,e[21],mg);let x=e[5]&&fg(),I=e[5]&&e[6]&&hg(e);function S(e,t){return e[3]||e[4]?e[7]?_g:e[8]?$g:e[12]?bg:yg:kg}let O=S(e),z=O(e);function E(e,t){return e[4]?Ig:e[9]?xg:e[10]?wg:void 0}let D=E(e),T=D&&D(e);return{c(){t=ph("div"),n=ph("div"),i=ph("div"),w&&w.c(),r=hh(),o=ph("div"),a=ph("pre"),s=fh(" "),u=ph("code"),c=fh("\n "),d=hh(),p=ph("div"),x&&x.c(),m=hh(),f=ph("div"),I&&I.c(),h=hh(),g=ph("button"),z.c(),y=hh(),T&&T.c(),yh(i,"class","controls min-w-[14rem] w-60 max-w-[42%] flex flex-col shrink-0 overflow-auto border-r border-[var(--gray-3)]"),yh(u,"class",l="hljs "+e[2]+" grow overflow-auto p-2 "+(e[1]?"no-select":"")+" svelte-h4n0sq"),yh(a,"class","flex flex-col grow basis-0 overflow-auto m-0"),yh(o,"class","output flex flex-col grow min-w-0 overflow-hidden"),yh(n,"class","flex flex-row grow min-h-0 overflow-hidden rounded-xl border border-[var(--gray-3)]"),yh(g,"class","use-button svelte-h4n0sq"),g.disabled=e[13],yh(g,"title",v=e[12]?"Copy to Clipboard":void 0),xh(g,"disabled",e[13]),xh(g,"drifted",e[5]),yh(f,"class","actions svelte-h4n0sq"),xh(f,"drifted",e[5]),yh(p,"class","footer shrink-0 svelte-h4n0sq"),yh(t,"class","mcp-shell flex flex-col gap-2 p-2 min-h-0 svelte-h4n0sq")},m(l,v){lh(l,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,u),u.innerHTML=e[0],sh(a,c),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),z.m(g,null),sh(p,y),T&&T.m(p,null),b=!0,$||(_=[vh(a,"click",e[15]),vh(g,"click",e[14])],$=!0)},p(e,[t]){w&&w.p&&(!b||2097152&t)&&ih(w,k,e,e[21],b?nh(k,e[21],t,pg):rh(e[21]),mg),(!b||1&t)&&(u.innerHTML=e[0]),(!b||6&t&&l!==(l="hljs "+e[2]+" grow overflow-auto p-2 "+(e[1]?"no-select":"")+" svelte-h4n0sq"))&&yh(u,"class",l),e[5]?x||(x=fg(),x.c(),x.m(p,m)):x&&(x.d(1),x=null),e[5]&&e[6]?I?I.p(e,t):(I=hg(e),I.c(),I.m(f,h)):I&&(I.d(1),I=null),O===(O=S(e))&&z?z.p(e,t):(z.d(1),z=O(e),z&&(z.c(),z.m(g,null))),(!b||8192&t)&&(g.disabled=e[13]),(!b||4096&t&&v!==(v=e[12]?"Copy to Clipboard":void 0))&&yh(g,"title",v),(!b||8192&t)&&xh(g,"disabled",e[13]),(!b||32&t)&&xh(g,"drifted",e[5]),(!b||32&t)&&xh(f,"drifted",e[5]),D===(D=E(e))&&T?T.p(e,t):(T&&T.d(1),T=D&&D(e),T&&(T.c(),T.m(p,null)))},i(e){b||(Vh(w,e),b=!0)},o(e){Wh(w,e),b=!1},d(e){e&&ch(t),w&&w.d(e),x&&x.d(),I&&I.d(),z.d(),T&&T.d(),$=!1,Gf(_)}}}function Og(e,t,n){let i,r,o,a,s,u,l,{$$slots:c={},$$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:y}=t,{hostSendCaps:b=rg}=t,{mcpApp:$}=t,{drifted:_=!1}=t,{onRestoreOriginal:k}=t,w=!1,x=!1;const I=ig({canOpen:!1});var S,O;function z(e){l&&clearTimeout(l),n(8,a=e),l=setTimeout(()=>{n(8,a=void 0),l=void 0},1e3)}function E(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(),b.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=cg,O=I,Eh().$$.context.set(S,O);const D=E("a[href]","code preview"),T=E(".tippy-box a[href]","tippy");Dh(()=>(document.addEventListener("click",T,!0),()=>document.removeEventListener("click",T,!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,y=e.hostConnectError),"hostSendCaps"in e&&n(18,b=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:b.openLinks}),262144&e.$$.dirty&&document.documentElement.classList.toggle("mcp-no-open-links",!b.openLinks),262144&e.$$.dirty&&n(20,i=sg(b)),1048584&e.$$.dirty&&n(12,r=v&&!i),65946&e.$$.dirty&&n(13,o=m||w||!h||!v||!!y||!!a)},[p,m,f,v,y,_,k,w,a,s,u,x,r,o,async function(){if(!o){n(9,s=void 0),n(10,u=void 0),n(7,w=!0);try{if(r)return await lg(h),void z("Copied");await async function(e,t,n){const i=ag(e);if(!sg(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:ug(n,t)}]})).isError)throw new og}($,h,g),z("Sent")}catch(e){if(e instanceof og)return void n(10,u=e.message);console.error("[mcp-apps] Send Updates to Agent failed",e),n(9,s=e instanceof Error?e.message:String(e));try{await lg(h),z("Copied")}catch{}}finally{n(7,w=!1)}}},D,h,g,b,$,i,d,c,()=>{n(11,x=!1),k()},()=>n(11,x=!1),()=>n(11,x=!0)]}class zg extends tg{constructor(e){super(),eg(this,e,Og,Sg,Yf,{highlightedCode:0,hasErrors:1,highlightClass:2,code:16,fence:17,hostConnected:3,hostConnectError:4,hostSendCaps:18,mcpApp:19,drifted:5,onRestoreOriginal:6},dg)}}function Eg(e){return structuredClone(e)}function Dg(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 u(e){let t={};for(let e=0;e<o.length;e+=1)t=Vf(t,o[e]);return void 0!==e[6]&&(t.opts=e[6]),{props:t}}return s&&(t=Sh(s,u(e)),Ch.push(()=>Kh(t,"opts",a))),{c(){t&&Gh(t.$$.fragment),i=gh()},m(e,n){t&&Xh(t,e,n),lh(e,i,n),r=!0},p(e,r){const l=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&&(c=e[1].controlProps?.(e[2],e[6])??{},"object"==typeof c&&null!==c?c:{})]):{};var c;if(!n&&64&r&&(n=!0,l.opts=e[6],Lh(()=>n=!1)),6&r&&s!==(s=e[1].controls[e[2]])){if(t){Fh();const e=t;Wh(e.$$.fragment,1,0,()=>{Yh(e,1)}),Jh()}s?(t=Sh(s,u(e)),Ch.push(()=>Kh(t,"opts",a)),Gh(t.$$.fragment),Vh(t.$$.fragment,1),Xh(t,i.parentNode,i)):t=null}else s&&t.$set(l)},i(e){r||(t&&Vh(t.$$.fragment,e),r=!0)},o(e){t&&Wh(t.$$.fragment,e),r=!1},d(e){e&&ch(i),t&&Yh(t,e)}}}function Tg(e){let t,n;return t=new zg({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:[Dg]},$$scope:{ctx:e}}}),{c(){Gh(t.$$.fragment)},m(e,i){Xh(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||(Vh(t.$$.fragment,e),n=!0)},o(e){Wh(t.$$.fragment,e),n=!1},d(e){Yh(t,e)}}}function Cg(e,t,n){let i,r,o,a,s,u,l,c,{adapter:d}=t,{kind:p}=t,{mcpApp:m}=t,{hostConnected:f=!1}=t,{hostConnectError:h}=t,{hostSendCaps:g=rg}=t,v=d.emptyContract();function y(e){try{return d.print(d.build(e))}catch{return}}function b(e,t){if(!e)return;const i=function(e,t,n){return void 0===e||"result"===n&&!t}(l,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},y);void 0!==o&&(u=o.opts,n(13,l=o.code),o.supersedesOpts&&n(6,s=Eg(o.opts)))}return m.ontoolinput=e=>{b(e.arguments,"input")},m.ontoolresult=e=>{const t=e.structuredContent;t?.opts&&b(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,c=void 0)}catch(e){const t=e instanceof Error?e.message:String(e);n(7,c=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!==c),8960&e.$$.dirty&&n(10,a=function(e){const{originalCode:t,code:n,hasErrors:i}=e;return void 0!==t&&(i||n!==t)}({originalCode:l,code:i,hasErrors:o}))},[m,d,p,f,h,g,s,c,o,i,a,r,function(){null!=u&&n(6,s=Eg(u))},l,v,function(e){s=e,n(6,s)}]}class Ng extends tg{constructor(e){super(),eg(this,e,Cg,Tg,Yf,{adapter:1,kind:2,mcpApp:0,hostConnected:3,hostConnectError:4,hostSendCaps:5})}}const Ag=560;const Ug=["pure","view","nonpayable","payable"];function Pg(e,t){return Ug[Math.max(Ug.indexOf(e),Ug.indexOf(t))]}class jg{constructor(e){this.license="MIT",this.upgradeable=!1,this.topLevelComments=[],this.natspecTags=[],this.constructorArgs=[],this.constructorCode=[],this.variableOrErrorMap=new Map,this.parentMap=new Map,this.functionMap=new Map,this.libraryMap=new Map,this.structMap=new Map,this.name=function(e,t=!1){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/^[^a-zA-Z$_]+/,"").replace(/^(.)/,e=>t?e.toUpperCase():e).replace(/[^\w$]+(.?)/g,(e,t)=>t.toUpperCase())}(e,!0)}get parents(){return[...this.parentMap.values()].filter(e=>!e.importOnly).sort((e,t)=>"Initializable"===e.contract.name?-1:"Initializable"===t.contract.name?1:0)}get imports(){return[...[...this.parentMap.values()].map(e=>e.contract),...[...this.libraryMap.values()].map(e=>e.library)]}get libraries(){return[...this.libraryMap.values()]}get functions(){return[...this.functionMap.values()]}get structs(){return[...this.structMap.values()]}get variableOrErrorDefinitions(){return[...this.variableOrErrorMap.values()]}updateParentMap(e,t=[],n={}){const i=this.parentMap.has(e.name);return this.parentMap=new Map(this.parentMap).set(e.name,{contract:e,params:t,...n}),!i}addParent(e,t=[]){return this.updateParentMap(e,t)}addImportOnly(e){return this.updateParentMap(e,[],{importOnly:!0})}addConstructionOnly(e,t=[]){return this.updateParentMap(e,t,{constructionOnly:!0})}addLibrary(e,t){let n=!1;if(this.libraryMap.has(e.name)){const i=this.libraryMap.get(e.name),r=i.usingFor.size;t.forEach(e=>i.usingFor.add(e)),n=i.usingFor.size>r}else this.libraryMap.set(e.name,{library:e,usingFor:new Set(t)}),n=!0;return n}addOverride(e,t,n){const i=this.addFunction(t);i.override.add(e),n&&(i.mutability=Pg(i.mutability,n))}addModifier(e,t){this.addFunction(t).modifiers.push(e)}addTopLevelComment(e){this.topLevelComments.push(e)}addNatspecTag(e,t){if(!/^(@custom:)?[a-z][a-z\-]*$/.exec(e))throw new Error(`Invalid natspec key: ${e}`);this.natspecTags.push({key:e,value:t})}addFunction(e){const t=[e.name,"(",...e.args.map(e=>e.name),")"].join(""),n=this.functionMap.get(t);if(void 0!==n)return n;{const n={override:new Set,modifiers:[],code:[],mutability:"nonpayable",final:!1,comments:[],...e};return this.functionMap.set(t,n),n}}addStruct(e){const t=this.structMap.get(e.name);if(void 0!==t)return t;{const t={...e};return this.structMap.set(e.name,t),t}}addConstructorArgument(e){this.constructorArgs.push(e)}addConstructorCode(e){this.constructorCode.push(e)}addFunctionCode(e,t,n){const i=this.addFunction(t);if(i.final)throw new Error(`Function ${t.name} is already finalized`);i.code.push(e),n&&(i.mutability=Pg(i.mutability,n))}setFunctionBody(e,t,n){const i=this.addFunction(t);if(i.code.length>0)throw new Error(`Function ${t.name} has additional code`);i.code.push(...e),i.final=!0,n&&(i.mutability=n)}setFunctionComments(e,t){const n=this.addFunction(t);if(n.comments.length>0)throw new Error(`Function ${t.name} already has comments`);n.comments=e}addStateVariable(e,t){if(t)throw new Error("State variables should not be used when upgradeable is true. Set namespaced storage instead.");return this._addVariableOrErrorDefinition({code:e})}addConstantOrImmutableOrErrorDefinition(e,t){return this._addVariableOrErrorDefinition({code:e,comments:t})}_addVariableOrErrorDefinition(e){const t=this.variableOrErrorMap.has(e.code);return this.variableOrErrorMap.set(e.code,e),!t}addStructVariable(e,t){let n=this.structMap.get(e.name);n||(n=this.addStruct(e));const i=n.variables.includes(t);return i||n.variables.push(t),!i}}const Lg={name:"supportsInterface",kind:"public",args:[{name:"interfaceId",type:"bytes4"}],returns:["bool"],mutability:"view"};function Rg(e,t){switch(t){case"ownable":e.addParent(Mg.Ownable,[{lit:"initialOwner"}])&&e.addConstructorArgument({type:"address",name:"initialOwner"});break;case"roles":e.addParent(Mg.AccessControl)&&(e.addConstructorArgument({type:"address",name:"defaultAdmin"}),e.addConstructorCode("_grantRole(DEFAULT_ADMIN_ROLE, defaultAdmin);")),e.addOverride(Mg.AccessControl,Lg);break;case"managed":e.addParent(Mg.AccessManaged,[{lit:"initialAuthority"}])&&e.addConstructorArgument({type:"address",name:"initialAuthority"})}}function Zg(e,t,n,i,r){switch(!1===n&&(n="ownable"),Rg(e,n),n){case"ownable":e.addModifier("onlyOwner",t);break;case"roles":{const n=i+"_ROLE",o=e.addConstantOrImmutableOrErrorDefinition(`bytes32 public constant ${n} = keccak256("${n}");`);r&&o&&(e.addConstructorArgument({type:"address",name:r}),e.addConstructorCode(`_grantRole(${n}, ${r});`)),e.addModifier(`onlyRole(${n})`,t);break}case"managed":e.addModifier("restricted",t)}}const Mg={Ownable:{name:"Ownable",path:"@openzeppelin/contracts/access/Ownable.sol"},AccessControl:{name:"AccessControl",path:"@openzeppelin/contracts/access/AccessControl.sol"},AccessManaged:{name:"AccessManaged",path:"@openzeppelin/contracts/access/manager/AccessManaged.sol"}};function qg(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Object.assign({name:e},t)]))}function Bg(e,t,n){e.addParent({name:"Pausable",path:"@openzeppelin/contracts/utils/Pausable.sol"});for(const t of n)e.addModifier("whenNotPaused",t);!function(e,t){Zg(e,Hg.pause,t,"PAUSER","pauser"),e.addFunctionCode("_pause();",Hg.pause),Zg(e,Hg.unpause,t,"PAUSER","pauser"),e.addFunctionCode("_unpause();",Hg.unpause)}(e,t)}const Hg=qg({pause:{kind:"public",args:[]},unpause:{kind:"public",args:[]}});class Fg extends Error{constructor(e){super("Invalid options"),this.messages=e}}const Jg=/[\n\r\u2028\u2029]/u;function Vg(e,t){if(Jg.test(e))throw new Fg({[t]:"Must not contain line breaks"})}const Wg={license:"MIT"};const Kg={access:!1,info:Wg};function Gg(e){return{access:e.access??!1,upgradeable:e.upgradeable??!1,info:{...Kg.info,...e.info??{}}}}function Xg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Yg,Qg;qg({_authorizeUpgrade:{args:[{name:"newImplementation",type:"address"}],kind:"internal"}});var ev=function(){if(Qg)return Yg;function e(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function t(e,t){for(var n,i="",r=0,o=-1,a=0,s=0;s<=e.length;++s){if(s<e.length)n=e.charCodeAt(s);else{if(47===n)break;n=47}if(47===n){if(o===s-1||1===a);else if(o!==s-1&&2===a){if(i.length<2||2!==r||46!==i.charCodeAt(i.length-1)||46!==i.charCodeAt(i.length-2))if(i.length>2){var u=i.lastIndexOf("/");if(u!==i.length-1){-1===u?(i="",r=0):r=(i=i.slice(0,u)).length-1-i.lastIndexOf("/"),o=s,a=0;continue}}else if(2===i.length||1===i.length){i="",r=0,o=s,a=0;continue}t&&(i.length>0?i+="/..":i="..",r=2)}else i.length>0?i+="/"+e.slice(o+1,s):i=e.slice(o+1,s),r=s-o-1;o=s,a=0}else 46===n&&-1!==a?++a:a=-1}return i}Qg=1;var n={resolve:function(){for(var n,i="",r=!1,o=arguments.length-1;o>=-1&&!r;o--){var a;o>=0?a=arguments[o]:(void 0===n&&(n=process.cwd()),a=n),e(a),0!==a.length&&(i=a+"/"+i,r=47===a.charCodeAt(0))}return i=t(i,!r),r?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(n){if(e(n),0===n.length)return".";var i=47===n.charCodeAt(0),r=47===n.charCodeAt(n.length-1);return 0!==(n=t(n,!i)).length||i||(n="."),n.length>0&&r&&(n+="/"),i?"/"+n:n},isAbsolute:function(t){return e(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,i=0;i<arguments.length;++i){var r=arguments[i];e(r),r.length>0&&(void 0===t?t=r:t+="/"+r)}return void 0===t?".":n.normalize(t)},relative:function(t,i){if(e(t),e(i),t===i)return"";if((t=n.resolve(t))===(i=n.resolve(i)))return"";for(var r=1;r<t.length&&47===t.charCodeAt(r);++r);for(var o=t.length,a=o-r,s=1;s<i.length&&47===i.charCodeAt(s);++s);for(var u=i.length-s,l=a<u?a:u,c=-1,d=0;d<=l;++d){if(d===l){if(u>l){if(47===i.charCodeAt(s+d))return i.slice(s+d+1);if(0===d)return i.slice(s+d)}else a>l&&(47===t.charCodeAt(r+d)?c=d:0===d&&(c=0));break}var p=t.charCodeAt(r+d);if(p!==i.charCodeAt(s+d))break;47===p&&(c=d)}var m="";for(d=r+c+1;d<=o;++d)d!==o&&47!==t.charCodeAt(d)||(0===m.length?m+="..":m+="/..");return m.length>0?m+i.slice(s+c):(s+=c,47===i.charCodeAt(s)&&++s,i.slice(s))},_makeLong:function(e){return e},dirname:function(t){if(e(t),0===t.length)return".";for(var n=t.charCodeAt(0),i=47===n,r=-1,o=!0,a=t.length-1;a>=1;--a)if(47===(n=t.charCodeAt(a))){if(!o){r=a;break}}else o=!1;return-1===r?i?"/":".":i&&1===r?"//":t.slice(0,r)},basename:function(t,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');e(t);var i,r=0,o=-1,a=!0;if(void 0!==n&&n.length>0&&n.length<=t.length){if(n.length===t.length&&n===t)return"";var s=n.length-1,u=-1;for(i=t.length-1;i>=0;--i){var l=t.charCodeAt(i);if(47===l){if(!a){r=i+1;break}}else-1===u&&(a=!1,u=i+1),s>=0&&(l===n.charCodeAt(s)?-1===--s&&(o=i):(s=-1,o=u))}return r===o?o=u:-1===o&&(o=t.length),t.slice(r,o)}for(i=t.length-1;i>=0;--i)if(47===t.charCodeAt(i)){if(!a){r=i+1;break}}else-1===o&&(a=!1,o=i+1);return-1===o?"":t.slice(r,o)},extname:function(t){e(t);for(var n=-1,i=0,r=-1,o=!0,a=0,s=t.length-1;s>=0;--s){var u=t.charCodeAt(s);if(47!==u)-1===r&&(o=!1,r=s+1),46===u?-1===n?n=s:1!==a&&(a=1):-1!==n&&(a=-1);else if(!o){i=s+1;break}}return-1===n||-1===r||0===a||1===a&&n===r-1&&n===i+1?"":t.slice(n,r)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,i=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+i:n+e+i:i}("/",e)},parse:function(t){e(t);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return n;var i,r=t.charCodeAt(0),o=47===r;o?(n.root="/",i=1):i=0;for(var a=-1,s=0,u=-1,l=!0,c=t.length-1,d=0;c>=i;--c)if(47!==(r=t.charCodeAt(c)))-1===u&&(l=!1,u=c+1),46===r?-1===a?a=c:1!==d&&(d=1):-1!==a&&(d=-1);else if(!l){s=c+1;break}return-1===a||-1===u||0===d||1===d&&a===u-1&&a===s+1?-1!==u&&(n.base=n.name=0===s&&o?t.slice(1,u):t.slice(s,u)):(0===s&&o?(n.name=t.slice(1,a),n.base=t.slice(1,u)):(n.name=t.slice(s,a),n.base=t.slice(s,u)),n.ext=t.slice(a,u)),s>0?n.dir=t.slice(0,s-1):o&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};return n.posix=n,Yg=n}(),tv=Xg(ev);function nv(e){return e.transpiled??!/^I[A-Z]/.test(e.name)}function iv(e){return"Initializable"===e?e:e.replace(/(Upgradeable)?(?=\.|$)/,"Upgradeable")}function rv(e,t={}){const n=e.upgradeable,i=t.transformName??(e=>e);return{upgradeable:n,transformName:e=>{const t=n&&nv(e)?iv(e.name):e.name;return i(t)},transformInitName:e=>i(e.name),transformImport:e=>{const i=n&&nv(e)?function(e){const{dir:t,ext:n,name:i}=tv.parse(e.path);return{...e,name:iv(e.name),path:tv.posix.format({ext:n,dir:t.replace(/^@openzeppelin\/contracts/,"@openzeppelin/contracts-upgradeable"),name:iv(i)})}}(e):e;return t.transformImport?.(i)??i},formulaId:t.formulaId??"erc7201",additionalCompatibleLibraries:t.additionalCompatibleLibraries??[]}}const ov=Symbol("whitespace");function av(...e){return function(e,...t){return[...sv(0,t,e)].join("\n")+"\n"}(4,...e)}function*sv(e,t,n){for(const i of t)i===ov?yield"":Array.isArray(i)?yield*sv(e+1,i,n):yield" ".repeat(e*n)+i}function uv(...e){return e.filter(e=>e.length>0).flatMap(e=>[ov,...e]).slice(1)}var lv="0.8.27";function cv(e,t){return e.imports.some(e=>e.path.startsWith(t))}var dv="git+https://github.com/OpenZeppelin/openzeppelin-community-contracts.git#b0ddd27";function pv(){return function(e,t){const n=t.split("#");if(!t.startsWith("git+")||2!==n.length)throw new Error(`Expected package dependency for ${e} in format git+<url>#<commit-hash>, but got ${t}`);const i=n[1];if(!/^[a-fA-F0-9]{7,40}$/.test(i))throw new Error(`Expected git commit hash for package dependency ${e} to have between 7 and 40 hex chars, but got ${i}`);return i.toLowerCase()}("@openzeppelin/community-contracts",dv)}function mv(e,t){const n=rv(e,t),i=e.structs.map(e=>function(e,{formulaId:t}){const[n,i,r]=[e.comments,e.name,e.variables],o=void 0!==e.namespaceId?[`/// @custom:storage-location ${t}:${e.namespaceId}`]:[],a=[...o,...n],s=r.length>0?"{":"{}";a.push([`struct ${i}`,s].join(" ")),r.length>0&&a.push(r,"}");return a}(e,n)),r=function(e,t){const n={};for(const i in e)n[i]=t(e[i]);return n}(function(e){const t={code:[],modifiers:[],override:[]};for(const n of e.functions)n.code.length>0?t.code.push(n):n.modifiers.length>0?t.modifiers.push(n):t.override.push(n);return t}(e),e=>e.map(e=>function(e,t){const{transformName:n}=t;if(e.override.size<=1&&0===e.modifiers.length&&0===e.code.length&&!e.final)return[];const i=[e.kind];"nonpayable"!==e.mutability&&i.push(e.mutability);1===e.override.size?i.push("override"):e.override.size>1&&i.push(`override(${[...e.override].map(n).join(", ")})`);i.push(...e.modifiers),e.returns?.length&&i.push(`returns (${e.returns.join(", ")})`);const r=[...e.code];if(e.override.size>0&&!e.final){const t=`super.${e.name}(${e.args.map(e=>e.name).join(", ")});`;r.push(e.returns?.length?"return "+t:t)}return i.length+e.code.length>1?wv(e.comments,"function "+e.name,e.args.map(e=>xv(e,t)),i,r):[]}(e,n))),o=r.override.some(e=>e.length>0);return av(...uv([`// SPDX-License-Identifier: ${e.license}`,gv(e,n,t),`pragma solidity ^${t?.solidityVersion??lv};`],function(e,t){const n=new Map;for(const i of e){const{name:e,path:r}=t.transformImport(i);n.get(r)?.add(e)??n.set(r,new Set([e]))}return Array.from(n.keys()).sort().map(e=>`import {${Array.from(n.get(e)).sort().join(", ")}} from "${e}";`)}(e.imports,n),[...Iv(e.topLevelComments,e.natspecTags.length>0),...(a=e.natspecTags,a.map(({key:e,value:t})=>`/// ${e} ${t}`)),[`contract ${e.name}`,...vv(e,n),"{"].join(" "),uv(Sv(e,n),...i,fv(e.variableOrErrorDefinitions),hv(e.variableOrErrorDefinitions),yv(e,n),...r.code,...r.modifiers,o?["// The following functions are overrides required by Solidity."]:[],...r.override),"}"]));var a}function fv(e){const t=e.filter(e=>e.comments?.length);return uv(...t.map(e=>[...e.comments,e.code]))}function hv(e){const t=e.filter(e=>!e.comments?.length);return t.map(e=>e.code)}function gv(e,t,n){const i=[],r={imports:e.imports.map(e=>t.transformImport(e))};if(cv(r,"@openzeppelin/contracts")&&i.push({nameAndVersion:"OpenZeppelin Contracts ^5.7.0"}),cv(r,"@openzeppelin/community-contracts"))try{const e=pv();i.push({nameAndVersion:`OpenZeppelin Community Contracts commit ${e}`})}catch(e){console.error(e)}if(n?.additionalCompatibleLibraries)for(const e of n.additionalCompatibleLibraries)cv(r,e.path)&&i.push({nameAndVersion:`${e.name} ${e.version}`,alwaysKeepOzPrefix:e.alwaysKeepOzPrefix});if(0===i.length)return"";if(1===i.length)return`// Compatible with ${i[0].nameAndVersion}`;{const e="OpenZeppelin ";if(i[0].nameAndVersion.startsWith(e))for(let t=1;t<i.length;t++)i[t].nameAndVersion.startsWith(e)&&!i[t].alwaysKeepOzPrefix&&(i[t].nameAndVersion=i[t].nameAndVersion.slice(e.length));const t=i.map(e=>e.nameAndVersion);return`// Compatible with ${t.slice(0,-1).join(", ")} and ${t.slice(-1)}`}}function vv(e,{transformName:t}){const n=e.parents.filter(e=>!e.constructionOnly);return n.length>0?["is "+n.map(e=>t(e.contract)).join(", ")]:[]}function yv(e,t){const n=e.parents.some(e=>e.params.length>0),i=e.constructorCode.length>0,r=e.parents.filter($v);if(n||i||t.upgradeable&&r.length>0){if(t.upgradeable){const n=r.filter(e=>nv(e.contract)),i=e.parents.filter(e=>!nv(e.contract)&&"Initializable"!==e.contract.name&&"UUPSUpgradeable"!==e.contract.name),o=wv([i.length>0?"/// @custom:oz-upgrades-unsafe-allow-reachable constructor":"/// @custom:oz-upgrades-unsafe-allow constructor"],"constructor",[],i.flatMap(e=>_v(e,t)),["_disableInitializers();"]),a=wv([],"function initialize",e.constructorArgs.map(e=>xv(e,t)),["public","initializer"],uv(n.flatMap(e=>_v(e,t)).map(e=>e+";"),e.constructorCode));return uv(o,n.length>0?a:[])}return wv([],"constructor",e.constructorArgs.map(e=>xv(e,t)),e.parents.flatMap(e=>_v(e,t)),e.constructorCode)}return t.upgradeable?bv:[]}const bv=["/// @custom:oz-upgrades-unsafe-allow constructor","constructor() {",["_disableInitializers();"],"}"];function $v(e){return!["Initializable"].includes(e.contract.name)}function _v({contract:e,params:t},n){const i=n.upgradeable&&nv(e),r=i?`__${n.transformInitName(e)}_init`:n.transformName(e);return i||t.length>0?[r+"("+t.map(kv).join(", ")+")"]:[]}function kv(e){if("object"==typeof e){if("lit"in e)return e.lit;if("note"in e)return`${kv(e.value)} /* ${e.note} */`;throw Error("Unknown value type")}if("number"==typeof e){if(Number.isSafeInteger(e))return e.toFixed(0);throw new Error(`Number not representable (${e})`)}return/[^\x20-\x7E]/u.test(t=e)?`unicode"${t.replace(/[\\"\r\n\x0b]/gu,e=>'"'===e?'\\"':"\\"===e?"\\\\":"\n"===e?"\\n":"\r"===e?"\\r":"\\x0b")}"`:`"${t.replace(/[\\"]/g,"\\$&")}"`;var t}function wv(e,t,n,i,r){const o=[...e],a=[t,...n,...i].map(e=>e.length).reduce((e,t)=>e+t),s=r.length>0?"{":"{}";return a<=72?o.push([`${t}(${n.join(", ")})`,...i,s].join(" ")):o.push(`${t}(${n.join(", ")})`,i,s),r.length>0&&o.push(r,"}"),o}function xv(e,{transformName:t}){let n;return"string"==typeof e.type?(/^[A-Z]/.test(e.type)&&e.type,n=e.type):n=t(e.type),[n,e.name].join(" ")}function Iv(e,t=!1){const n=e.map(e=>`// ${e}`);return e.length>0&&t&&n.push("//"),n}function Sv(e,{transformName:t}){return e.libraries&&0!==e.libraries.length?e.libraries.sort((e,t)=>e.library.name.localeCompare(t.library.name)).map(e=>{const n=Array.from(e.usingFor).sort((e,t)=>e.localeCompare(t));return`using ${t(e.library)} for ${n.join(", ")};`}):[]}function Ov(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))}qg({clock:{kind:"public",args:[],returns:["uint48"],mutability:"view"},CLOCK_MODE:{kind:"public",args:[],returns:["string memory"],mutability:"pure"}}),Ov(8),Ov(16),Ov(32),Ov(64),Ov(128),Ov(256);qg({decimals:{kind:"public",args:[],returns:["uint8"],mutability:"pure"},_update:{kind:"internal",args:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"value",type:"uint256"}]},_approve:{kind:"internal",args:[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"emitEvent",type:"bool"}]},mint:{kind:"public",args:[{name:"to",type:"address"},{name:"amount",type:"uint256"}]},pause:{kind:"public",args:[]},unpause:{kind:"public",args:[]},snapshot:{kind:"public",args:[]},nonces:{kind:"public",args:[{name:"owner",type:"address"}],returns:["uint256"],mutability:"view"},_checkTokenBridge:{kind:"internal",args:[{name:"caller",type:"address"}]},setTokenBridge:{kind:"public",args:[{name:"tokenBridge_",type:"address"}]}});qg({_update:{kind:"internal",args:[{name:"to",type:"address"},{name:"tokenId",type:"uint256"},{name:"auth",type:"address"}],returns:["address"]},tokenURI:{kind:"public",args:[{name:"tokenId",type:"uint256"}],returns:["string memory"],mutability:"view"},_baseURI:{kind:"internal",args:[],returns:["string memory"],mutability:"pure"},_increaseBalance:{kind:"internal",args:[{name:"account",type:"address"},{name:"value",type:"uint128"}]}}),qg({_update:{kind:"internal",args:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"ids",type:"uint256[] memory"},{name:"values",type:"uint256[] memory"}]},setURI:{kind:"public",args:[{name:"newuri",type:"string memory"}]},mint:{kind:"public",args:[{name:"account",type:"address"},{name:"id",type:"uint256"},{name:"amount",type:"uint256"},{name:"data",type:"bytes memory"}]},mintBatch:{kind:"public",args:[{name:"to",type:"address"},{name:"ids",type:"uint256[] memory"},{name:"amounts",type:"uint256[] memory"},{name:"data",type:"bytes memory"}]}}),qg({freeze:{kind:"public",args:[{name:"user",type:"address"},{name:"amount",type:"uint256"}]},allowUser:{kind:"public",args:[{name:"user",type:"address"}]},disallowUser:{kind:"public",args:[{name:"user",type:"address"}]},blockUser:{kind:"public",args:[{name:"user",type:"address"}]},unblockUser:{kind:"public",args:[{name:"user",type:"address"}]},isUserAllowed:{kind:"public",args:[{name:"user",type:"address"}],returns:["bool"],mutability:"view"}}),qg({_rawSignatureValidation:{kind:"internal",args:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes calldata"}],returns:["bool"],mutability:"view"}}),qg({isValidSignature:{kind:"public",mutability:"view",args:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes calldata"}],returns:["bytes4"]},_validateUserOp:{kind:"internal",args:[{name:"userOp",type:"PackedUserOperation calldata"},{name:"userOpHash",type:"bytes32"},{name:"signature",type:"bytes calldata"}],returns:["uint256"]},_erc7821AuthorizedExecutor:{kind:"internal",args:[{name:"caller",type:"address"},{name:"mode",type:"bytes32"},{name:"executionData",type:"bytes calldata"}],returns:["bool"],mutability:"view"},addSigners:{kind:"public",args:[{name:"signers",type:"bytes[] memory"}]},removeSigners:{kind:"public",args:[{name:"signers",type:"bytes[] memory"}]},setThreshold:{kind:"public",args:[{name:"threshold",type:"uint64"}]},setSignerWeights:{kind:"public",args:[{name:"signers",type:"bytes[] memory"},{name:"weights",type:"uint64[] memory"}]}}),qg({votingDelay:{args:[],returns:["uint256"],kind:"public",mutability:"pure"},votingPeriod:{args:[],returns:["uint256"],kind:"public",mutability:"pure"},proposalThreshold:{args:[],returns:["uint256"],kind:"public",mutability:"pure"},proposalNeedsQueuing:{args:[{name:"proposalId",type:"uint256"}],returns:["bool"],kind:"public",mutability:"view"},quorum:{args:[{name:"blockNumber",type:"uint256"}],returns:["uint256"],kind:"public",mutability:"view"},quorumDenominator:{args:[],returns:["uint256"],kind:"public",mutability:"view"},propose:{args:[{name:"targets",type:"address[] memory"},{name:"values",type:"uint256[] memory"},{name:"calldatas",type:"bytes[] memory"},{name:"description",type:"string memory"}],returns:["uint256"],kind:"public"},_propose:{args:[{name:"targets",type:"address[] memory"},{name:"values",type:"uint256[] memory"},{name:"calldatas",type:"bytes[] memory"},{name:"description",type:"string memory"},{name:"proposer",type:"address"}],returns:["uint256"],kind:"internal"},_queueOperations:{args:[{name:"proposalId",type:"uint256"},{name:"targets",type:"address[] memory"},{name:"values",type:"uint256[] memory"},{name:"calldatas",type:"bytes[] memory"},{name:"descriptionHash",type:"bytes32"}],kind:"internal",returns:["uint48"]},_executeOperations:{args:[{name:"proposalId",type:"uint256"},{name:"targets",type:"address[] memory"},{name:"values",type:"uint256[] memory"},{name:"calldatas",type:"bytes[] memory"},{name:"descriptionHash",type:"bytes32"}],kind:"internal"},_cancel:{args:[{name:"targets",type:"address[] memory"},{name:"values",type:"uint256[] memory"},{name:"calldatas",type:"bytes[] memory"},{name:"descriptionHash",type:"bytes32"}],returns:["uint256"],kind:"internal"},state:{args:[{name:"proposalId",type:"uint256"}],returns:["ProposalState"],kind:"public",mutability:"view"},_executor:{args:[],returns:["address"],kind:"internal",mutability:"view"}});var zv="5.7.0";!function(e){const[t,n,i]=e.split(".").map(e=>parseInt(e,10));if(0===t&&8===n&&Number.isInteger(i))return`0.8.${Math.min(i,26)}`}(lv);function Ev(e,t){return mv(e,{...t,additionalCompatibleLibraries:[{name:"OpenZeppelin Uniswap Hooks",path:"@openzeppelin/uniswap-hooks",version:"^1.2.1",alwaysKeepOzPrefix:!0}]})}const Dv={name:"BaseHook",displayName:"Base Hook",category:"Base",tooltipText:"Provides standard entry points, permission checks, and validation utilities for building hooks.",tooltipLink:"https://docs.openzeppelin.com/uniswap-hooks/api/base#BaseHook",shares:"optional",alreadyImplementsShares:!1,inputs:[],disabledFunctions:[],functions:{...qg({getHookPermissions:{kind:"public",mutability:"pure",args:[],returns:["Hooks.Permissions memory"]},_beforeInitialize:{kind:"internal",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"sqrtPriceX96",type:"uint160"}],returns:["bytes4"]},_afterInitialize:{kind:"internal",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"sqrtPriceX96",type:"uint160"},{name:"tick",type:"int24"}],returns:["bytes4"]},_beforeAddLiquidity:{kind:"internal",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"params",type:"ModifyLiquidityParams calldata"},{name:"hookData",type:"bytes calldata"}],returns:["bytes4"]},_afterAddLiquidity:{kind:"internal",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"params",type:"ModifyLiquidityParams calldata"},{name:"delta0",type:"BalanceDelta"},{name:"delta1",type:"BalanceDelta"},{name:"hookData",type:"bytes calldata"}],returns:["bytes4","BalanceDelta"]},_beforeRemoveLiquidity:{kind:"internal",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"params",type:"ModifyLiquidityParams calldata"},{name:"hookData",type:"bytes calldata"}],returns:["bytes4"]},_afterRemoveLiquidity:{kind:"internal",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"params",type:"ModifyLiquidityParams calldata"},{name:"delta0",type:"BalanceDelta"},{name:"delta1",type:"BalanceDelta"},{name:"hookData",type:"bytes calldata"}],returns:["bytes4","BalanceDelta"]},_beforeSwap:{kind:"internal",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"params",type:"SwapParams calldata"},{name:"hookData",type:"bytes calldata"}],returns:["bytes4","BeforeSwapDelta","uint24"]},_afterSwap:{kind:"internal",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"params",type:"SwapParams calldata"},{name:"delta",type:"BalanceDelta"},{name:"hookData",type:"bytes calldata"}],returns:["bytes4","int128"]},_beforeDonate:{kind:"internal",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"amount0",type:"uint256"},{name:"amount1",type:"uint256"},{name:"hookData",type:"bytes calldata"}],returns:["bytes4"]},_afterDonate:{kind:"internal",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"amount0",type:"uint256"},{name:"amount1",type:"uint256"},{name:"hookData",type:"bytes calldata"}],returns:["bytes4"]}})},permissions:{beforeInitialize:!1,afterInitialize:!1,beforeAddLiquidity:!1,afterAddLiquidity:!1,beforeRemoveLiquidity:!1,afterRemoveLiquidity:!1,beforeSwap:!1,afterSwap:!1,beforeDonate:!1,afterDonate:!1,beforeSwapReturnDelta:!1,afterSwapReturnDelta:!1,afterAddLiquidityReturnDelta:!1,afterRemoveLiquidityReturnDelta:!1}},Tv={name:"BaseAsyncSwap",displayName:"Async Swaps",category:"Base",tooltipText:"Overrides the default swap flow, enabling custom execution and settlement, such as swap queuing and/or reordering.",tooltipLink:"https://docs.openzeppelin.com/uniswap-hooks/api/base#BaseAsyncSwap",shares:"optional",alreadyImplementsShares:!1,inputs:[],disabledFunctions:[],functions:{...qg({...Dv.functions})},permissions:{beforeInitialize:!1,afterInitialize:!1,beforeAddLiquidity:!1,afterAddLiquidity:!1,beforeRemoveLiquidity:!1,afterRemoveLiquidity:!1,beforeSwap:!0,afterSwap:!1,beforeDonate:!1,afterDonate:!1,beforeSwapReturnDelta:!0,afterSwapReturnDelta:!1,afterAddLiquidityReturnDelta:!1,afterRemoveLiquidityReturnDelta:!1}},Cv={name:"BaseCustomAccounting",displayName:"Custom Accounting",category:"Base",tooltipText:"Overrides how liquidity modifications are processed and how liquidity shares are minted/burned.",tooltipLink:"https://docs.openzeppelin.com/uniswap-hooks/api/base#BaseCustomAccounting",shares:"required",alreadyImplementsShares:!1,inputs:[],disabledFunctions:["_beforeAddLiquidity","_beforeRemoveLiquidity"],functions:{...qg({...Dv.functions,addLiquidity:{kind:"public",mutability:"payable",args:[{name:"params",type:"AddLiquidityParams calldata"}],returns:["BalanceDelta"]},removeLiquidity:{kind:"public",args:[{name:"params",type:"RemoveLiquidityParams calldata"}],returns:["BalanceDelta"]},_getAddLiquidity:{kind:"internal",args:[{name:"sqrtPriceX96",type:"uint160"},{name:"params",type:"AddLiquidityParams memory"}],returns:["bytes memory","uint256"]},_getRemoveLiquidity:{kind:"internal",args:[{name:"params",type:"RemoveLiquidityParams memory"}],returns:["bytes memory","uint256"]},_mint:{kind:"internal",args:[{name:"params",type:"AddLiquidityParams memory"},{name:"callerDelta",type:"BalanceDelta"},{name:"feesAccrued",type:"BalanceDelta"},{name:"shares",type:"uint256"}],returns:[]},_burn:{kind:"internal",args:[{name:"params",type:"RemoveLiquidityParams memory"},{name:"callerDelta",type:"BalanceDelta"},{name:"feesAccrued",type:"BalanceDelta"},{name:"shares",type:"uint256"}],returns:[]}})},permissions:{beforeInitialize:!0,afterInitialize:!1,beforeAddLiquidity:!0,afterAddLiquidity:!1,beforeRemoveLiquidity:!0,afterRemoveLiquidity:!1,beforeSwap:!1,afterSwap:!1,beforeDonate:!1,afterDonate:!1,beforeSwapReturnDelta:!1,afterSwapReturnDelta:!1,afterAddLiquidityReturnDelta:!1,afterRemoveLiquidityReturnDelta:!1}},Nv={name:"BaseCustomCurve",displayName:"Custom Curve",category:"Base",tooltipText:"Allows for custom pricing logic and swap amount calculations, useful to implement a custom curve.",tooltipLink:"https://docs.openzeppelin.com/uniswap-hooks/api/base#BaseCustomCurve",shares:"required",alreadyImplementsShares:!1,inputs:[],disabledFunctions:[...Cv.disabledFunctions],functions:{...qg({...Dv.functions,...Cv.functions,_getUnspecifiedAmount:{kind:"internal",args:[{name:"params",type:"SwapParams calldata"}],returns:["uint256"]},_getSwapFeeAmount:{kind:"internal",args:[{name:"params",type:"SwapParams calldata"},{name:"unspecifiedAmount",type:"uint256"}],returns:["uint256"]},_getAmountOut:{kind:"internal",args:[{name:"params",type:"RemoveLiquidityParams memory"}],returns:["uint256","uint256","uint256"]},_getAmountIn:{kind:"internal",args:[{name:"params",type:"AddLiquidityParams memory"}],returns:["uint256","uint256","uint256"]}})},permissions:{beforeInitialize:!0,afterInitialize:!1,beforeAddLiquidity:!0,afterAddLiquidity:!1,beforeRemoveLiquidity:!0,afterRemoveLiquidity:!1,beforeSwap:!0,afterSwap:!1,beforeDonate:!1,afterDonate:!1,beforeSwapReturnDelta:!0,afterSwapReturnDelta:!1,afterAddLiquidityReturnDelta:!1,afterRemoveLiquidityReturnDelta:!1}},Av={name:"BaseDynamicFee",displayName:"Dynamic Pool Fee",category:"Fee",tooltipText:"Applies a dynamic fee to the entire pool, determined by <code>_getFee</code> and updated upon calling <code>_poke</code>.",tooltipLink:"https://docs.openzeppelin.com/uniswap-hooks/api/fee#BaseDynamicFee",shares:"optional",alreadyImplementsShares:!1,inputs:[],disabledFunctions:[],functions:{...qg({...Dv.functions,_getFee:{kind:"internal",args:[{name:"key",type:"PoolKey calldata"}],returns:["uint24"]},_poke:{kind:"internal",args:[{name:"key",type:"PoolKey calldata"}]},poke:{kind:"public",args:[{name:"key",type:"PoolKey calldata"}],returns:[]}})},permissions:{beforeInitialize:!1,afterInitialize:!0,beforeAddLiquidity:!1,afterAddLiquidity:!1,beforeRemoveLiquidity:!1,afterRemoveLiquidity:!1,beforeSwap:!1,afterSwap:!1,beforeDonate:!1,afterDonate:!1,beforeSwapReturnDelta:!1,afterSwapReturnDelta:!1,afterAddLiquidityReturnDelta:!1,afterRemoveLiquidityReturnDelta:!1}},Uv={name:"BaseOverrideFee",displayName:"Dynamic Swap Fee",category:"Fee",tooltipText:"Applies a dynamic fee calculated in a per-swap basis, determined by the <code>_getFee</code> function.",tooltipLink:"https://docs.openzeppelin.com/uniswap-hooks/api/fee#BaseOverrideFee",shares:"optional",alreadyImplementsShares:!1,inputs:[],disabledFunctions:[],functions:{...qg({...Dv.functions,_getFee:{kind:"internal",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"params",type:"SwapParams calldata"},{name:"hookData",type:"bytes calldata"}],returns:["uint24"]}})},permissions:{beforeInitialize:!0,afterInitialize:!1,beforeAddLiquidity:!1,afterAddLiquidity:!1,beforeRemoveLiquidity:!1,afterRemoveLiquidity:!1,beforeSwap:!0,afterSwap:!1,beforeDonate:!1,afterDonate:!1,beforeSwapReturnDelta:!1,afterSwapReturnDelta:!1,afterAddLiquidityReturnDelta:!1,afterRemoveLiquidityReturnDelta:!1}},Pv={name:"BaseDynamicAfterFee",displayName:"Swap Target Enforcer",category:"Fee",tooltipText:"Enforces a target for swap outcomes determined by <code>_getTargetUnspecified</code>, capturing any better-than-expected results as hook fees that can be handled or distributed via <code>_afterSwapHandler</code>.",tooltipLink:"https://docs.openzeppelin.com/uniswap-hooks/api/fee#BaseDynamicAfterFee",shares:"optional",alreadyImplementsShares:!1,inputs:[],disabledFunctions:[],functions:{...qg({...Dv.functions,_getTargetUnspecified:{kind:"internal",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"params",type:"SwapParams calldata"},{name:"hookData",type:"bytes calldata"}],returns:["uint256","bool"]},_afterSwapHandler:{kind:"internal",args:[{name:"key",type:"PoolKey calldata"},{name:"params",type:"SwapParams calldata"},{name:"delta",type:"BalanceDelta"},{name:"targetUnspecifiedAmount",type:"uint256"},{name:"feeAmount",type:"uint256"}]}})},permissions:{beforeInitialize:!1,afterInitialize:!1,beforeAddLiquidity:!1,afterAddLiquidity:!1,beforeRemoveLiquidity:!1,afterRemoveLiquidity:!1,beforeSwap:!0,afterSwap:!0,beforeDonate:!1,afterDonate:!1,beforeSwapReturnDelta:!1,afterSwapReturnDelta:!0,afterAddLiquidityReturnDelta:!1,afterRemoveLiquidityReturnDelta:!1}},jv={name:"BaseHookFee",displayName:"Hook Fee",category:"Fee",tooltipText:"Base implementation for applying hook fees to the unspecified currency of the swap, independent of the pool's LP fee.",tooltipLink:"https://docs.openzeppelin.com/uniswap-hooks/api/fee#BaseHookFee",shares:"optional",alreadyImplementsShares:!1,inputs:[],disabledFunctions:[],functions:{...qg({...Dv.functions,_getHookFee:{kind:"internal",mutability:"view",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"params",type:"SwapParams calldata"},{name:"delta",type:"BalanceDelta"},{name:"hookData",type:"bytes calldata"}],returns:["uint24"]},handleHookFees:{kind:"public",args:[{name:"currencies",type:"Currency[] memory"}],returns:[]}})},permissions:{beforeInitialize:!1,afterInitialize:!1,beforeAddLiquidity:!1,afterAddLiquidity:!1,beforeRemoveLiquidity:!1,afterRemoveLiquidity:!1,beforeSwap:!1,afterSwap:!0,beforeDonate:!1,afterDonate:!1,beforeSwapReturnDelta:!1,afterSwapReturnDelta:!0,afterAddLiquidityReturnDelta:!1,afterRemoveLiquidityReturnDelta:!1}},Lv={name:"AntiSandwichHook",displayName:"Sandwich Resistance",category:"General",tooltipText:"Maintains the swap pricing in the zeroForOne direction anchored to the beginning-of-block price, nullifying the profitability of sandwich attacks.",tooltipLink:"https://docs.openzeppelin.com/uniswap-hooks/api/general#AntiSandwichHook",shares:"optional",alreadyImplementsShares:!1,inputs:[],disabledFunctions:[],functions:{...qg({...Dv.functions,_afterSwapHandler:{kind:"internal",args:[{name:"key",type:"PoolKey calldata"},{name:"params",type:"SwapParams calldata"},{name:"delta",type:"BalanceDelta"},{name:"targetUnspecifiedAmount",type:"uint256"},{name:"feeAmount",type:"uint256"}]}})},permissions:{beforeInitialize:!1,afterInitialize:!1,beforeAddLiquidity:!1,afterAddLiquidity:!1,beforeRemoveLiquidity:!1,afterRemoveLiquidity:!1,beforeSwap:!0,afterSwap:!0,beforeDonate:!1,afterDonate:!1,beforeSwapReturnDelta:!1,afterSwapReturnDelta:!0,afterAddLiquidityReturnDelta:!1,afterRemoveLiquidityReturnDelta:!1}},Rv={name:"LimitOrderHook",displayName:"Limit Orders",category:"General",tooltipText:"Enables to place, cancel and withdraw orders that are executed when the limit price is reached. Orders are placed in single-currency and out-of-range of the current price.",tooltipLink:"https://docs.openzeppelin.com/uniswap-hooks/api/general#LimitOrderHook",shares:"optional",alreadyImplementsShares:!1,inputs:[],disabledFunctions:[],functions:{...qg({...Dv.functions,_afterInitialize:{kind:"internal",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"sqrtPriceX96",type:"uint160"},{name:"tick",type:"int24"}],returns:["bytes4"]},_afterSwap:{kind:"internal",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"params",type:"SwapParams calldata"},{name:"delta",type:"BalanceDelta"},{name:"hookData",type:"bytes calldata"}],returns:["bytes4","int128"]},placeOrder:{kind:"public",args:[{name:"key",type:"PoolKey calldata"},{name:"tick",type:"int24"},{name:"zeroForOne",type:"bool"},{name:"liquidity",type:"uint128"}]},cancelOrder:{kind:"public",args:[{name:"key",type:"PoolKey calldata"},{name:"tickLower",type:"int24"},{name:"zeroForOne",type:"bool"},{name:"to",type:"address"}]},withdraw:{kind:"public",args:[{name:"orderId",type:"OrderIdLibrary.OrderId"},{name:"to",type:"address"}],returns:["uint256","uint256"]},getTickLowerLast:{kind:"public",mutability:"view",args:[{name:"poolId",type:"PoolId"}],returns:["int24"]},getOrderId:{kind:"public",mutability:"view",args:[{name:"key",type:"PoolKey memory"},{name:"tickLower",type:"int24"},{name:"zeroForOne",type:"bool"}],returns:["OrderIdLibrary.OrderId"]},getOrderLiquidity:{kind:"public",mutability:"view",args:[{name:"orderId",type:"OrderIdLibrary.OrderId"},{name:"owner",type:"address"}],returns:["uint256"]},getHookPermissions:{kind:"public",mutability:"pure",args:[],returns:["Hooks.Permissions memory"]},_handlePlaceCallback:{kind:"internal",args:[{name:"placeData",type:"PlaceCallbackData memory"}],returns:["uint256","uint256"]},_handleCancelCallback:{kind:"internal",args:[{name:"cancelData",type:"CancelCallbackData memory"}],returns:["uint256","uint256"]},_handleWithdrawCallback:{kind:"internal",args:[{name:"withdrawData",type:"WithdrawCallbackData memory"}]}})},permissions:{beforeInitialize:!1,afterInitialize:!0,beforeAddLiquidity:!1,afterAddLiquidity:!1,beforeRemoveLiquidity:!1,afterRemoveLiquidity:!1,beforeSwap:!1,afterSwap:!0,beforeDonate:!1,afterDonate:!1,beforeSwapReturnDelta:!1,afterSwapReturnDelta:!1,afterAddLiquidityReturnDelta:!1,afterRemoveLiquidityReturnDelta:!1}},Zv={name:"LiquidityPenaltyHook",displayName:"JIT Liquidity Resistance",category:"General",tooltipText:"When liquidity is added and removed faster than <code>_blockNumberOffset</code> blocks, accumulated fees are linearly penalized and donated to in-range LPs.",tooltipLink:"https://docs.openzeppelin.com/uniswap-hooks/api/general#LiquidityPenaltyHook",shares:"optional",alreadyImplementsShares:!1,inputs:[{name:"blockNumberOffset",label:"Block Number Offset",placeholder:"10",type:"number",tooltipText:"The minimum time window (in blocks) that must pass after adding liquidity before it can be removed without any penalty. During this period, JIT attacks are deterred through fee withholding and penalties. Higher values provide stronger JIT protection but may discourage legitimate LPs."}],disabledFunctions:[],functions:{...qg({...Dv.functions,_afterAddLiquidity:{kind:"internal",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"params",type:"ModifyLiquidityParams calldata"},{name:"delta",type:"BalanceDelta"},{name:"feeDelta",type:"BalanceDelta"},{name:"hookData",type:"bytes calldata"}],returns:["bytes4","BalanceDelta"]},_afterRemoveLiquidity:{kind:"internal",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"params",type:"ModifyLiquidityParams calldata"},{name:"delta",type:"BalanceDelta"},{name:"feeDelta",type:"BalanceDelta"},{name:"hookData",type:"bytes calldata"}],returns:["bytes4","BalanceDelta"]},_getBlockNumber:{kind:"internal",mutability:"view",args:[],returns:["uint48"]},getBlockNumberOffset:{kind:"public",mutability:"view",args:[],returns:["uint48"]},getLastAddedLiquidityBlock:{kind:"public",mutability:"view",args:[{name:"poolId",type:"PoolId"},{name:"positionKey",type:"bytes32"}],returns:["uint48"]},getWithheldFees:{kind:"public",mutability:"view",args:[{name:"poolId",type:"PoolId"},{name:"positionKey",type:"bytes32"}],returns:["BalanceDelta"]},_updateLastAddedLiquidityBlock:{kind:"internal",args:[{name:"poolId",type:"PoolId"},{name:"positionKey",type:"bytes32"}]},_takeFeesToHook:{kind:"internal",args:[{name:"key",type:"PoolKey calldata"},{name:"positionKey",type:"bytes32"},{name:"feeDelta",type:"BalanceDelta"}]},_settleFeesFromHook:{kind:"internal",args:[{name:"key",type:"PoolKey calldata"},{name:"positionKey",type:"bytes32"}],returns:["BalanceDelta"]},_calculateLiquidityPenalty:{kind:"internal",args:[{name:"feeDelta",type:"BalanceDelta"},{name:"lastAddedLiquidityBlock",type:"uint48"}],returns:["BalanceDelta"]}})},permissions:{beforeInitialize:!1,afterInitialize:!1,beforeAddLiquidity:!1,afterAddLiquidity:!0,beforeRemoveLiquidity:!1,afterRemoveLiquidity:!0,beforeSwap:!1,afterSwap:!1,beforeDonate:!1,afterDonate:!1,beforeSwapReturnDelta:!1,afterSwapReturnDelta:!1,afterAddLiquidityReturnDelta:!0,afterRemoveLiquidityReturnDelta:!0}},Mv={name:"ReHypothecationHook",displayName:"Liquidity Rehypothecation",category:"General",tooltipText:"Enables rehypothecation of liquidity positions by depositing assets into yield-generating sources while providing Just-in-Time liquidity during swaps.",tooltipLink:"https://docs.openzeppelin.com/uniswap-hooks/api/general#ReHypothecationHook",shares:"ERC20",alreadyImplementsShares:!0,inputs:[],disabledFunctions:[],functions:{...qg({...Dv.functions,getPoolKey:{kind:"public",mutability:"view",args:[],returns:["PoolKey memory"]},addReHypothecatedLiquidity:{kind:"public",mutability:"payable",args:[{name:"shares",type:"uint256"}],returns:["BalanceDelta"]},removeReHypothecatedLiquidity:{kind:"public",mutability:"nonpayable",args:[{name:"shares",type:"uint256"}],returns:["BalanceDelta"]},previewAmountsForShares:{kind:"public",mutability:"view",args:[{name:"shares",type:"uint256"}],returns:["uint256","uint256"]},getTickLower:{kind:"public",mutability:"view",args:[],returns:["int24"]},getTickUpper:{kind:"public",mutability:"view",args:[],returns:["int24"]},getCurrencyYieldSource:{kind:"public",mutability:"view",args:[{name:"currency",type:"Currency"}],returns:["address"]},_depositToYieldSource:{kind:"internal",args:[{name:"currency",type:"Currency"},{name:"amount",type:"uint256"}],returns:[]},_withdrawFromYieldSource:{kind:"internal",args:[{name:"currency",type:"Currency"},{name:"amount",type:"uint256"}],returns:[]},_getAmountInYieldSource:{kind:"internal",mutability:"view",args:[{name:"currency",type:"Currency"}],returns:["uint256"]},_convertSharesToAmounts:{kind:"internal",mutability:"view",args:[{name:"shares",type:"uint256"}],returns:["uint256","uint256"]},_shareToAmount:{kind:"internal",mutability:"view",args:[{name:"shares",type:"uint256"},{name:"currency",type:"Currency"}],returns:["uint256"]},_getLiquidityToUse:{kind:"internal",mutability:"view",args:[],returns:["uint256"]},_getHookPositionLiquidity:{kind:"internal",mutability:"view",args:[],returns:["uint128"]},_modifyLiquidity:{kind:"internal",args:[{name:"liquidityDelta",type:"int256"}],returns:["BalanceDelta"]},_resolveHookDelta:{kind:"internal",args:[{name:"currency",type:"Currency"}],returns:[]},_transferFromSenderToHook:{kind:"internal",args:[{name:"currency",type:"Currency"},{name:"amount",type:"uint256"},{name:"sender",type:"address"}],returns:[]},_transferFromHookToSender:{kind:"internal",args:[{name:"currency",type:"Currency"},{name:"amount",type:"uint256"},{name:"sender",type:"address"}],returns:[]}})},permissions:{beforeInitialize:!0,afterInitialize:!1,beforeAddLiquidity:!1,afterAddLiquidity:!1,beforeRemoveLiquidity:!1,afterRemoveLiquidity:!1,beforeSwap:!0,afterSwap:!0,beforeDonate:!1,afterDonate:!1,beforeSwapReturnDelta:!1,afterSwapReturnDelta:!1,afterAddLiquidityReturnDelta:!1,afterRemoveLiquidityReturnDelta:!1}},qv={name:"BaseOracleHook",displayName:"Oracle Hook",category:"Oracles",tooltipText:"Enables a Uniswap V4 pool to record price observations and expose an oracle interface. Records tick observations on every swap and allows querying time-weighted average prices.",tooltipLink:"https://docs.openzeppelin.com/uniswap-hooks/api/oracle#BaseOracleHook",shares:"optional",alreadyImplementsShares:!1,inputs:[{name:"maxAbsTickDelta",label:"Max Absolute Tick Delta",type:"number",placeholder:"887272",tooltipText:"Limits tick changes per observation in the truncated oracle. Lower values resist manipulation but lag during real volatility; higher values respond faster but are more vulnerable to attacks. Default: 887272 (no truncation)."}],disabledFunctions:[],functions:{...qg({...Dv.functions,_afterInitialize:{kind:"internal",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"sqrtPriceX96",type:"uint160"},{name:"tick",type:"int24"}],returns:["bytes4"]},_beforeSwap:{kind:"internal",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"params",type:"SwapParams calldata"},{name:"hookData",type:"bytes calldata"}],returns:["bytes4","BeforeSwapDelta","uint24"]},observe:{kind:"external",mutability:"view",args:[{name:"secondsAgos",type:"uint32[] calldata"},{name:"underlyingPoolId",type:"PoolId"}],returns:["int56[] memory","int56[] memory"]},increaseObservationCardinalityNext:{kind:"public",args:[{name:"observationCardinalityNext",type:"uint16"},{name:"underlyingPoolId",type:"PoolId"}]}})},permissions:{beforeInitialize:!1,afterInitialize:!0,beforeAddLiquidity:!1,afterAddLiquidity:!1,beforeRemoveLiquidity:!1,afterRemoveLiquidity:!1,beforeSwap:!0,afterSwap:!1,beforeDonate:!1,afterDonate:!1,beforeSwapReturnDelta:!1,afterSwapReturnDelta:!1,afterAddLiquidityReturnDelta:!1,afterRemoveLiquidityReturnDelta:!1}},Bv={BaseHook:Dv,BaseAsyncSwap:Tv,BaseCustomAccounting:Cv,BaseCustomCurve:Nv,BaseDynamicFee:Av,BaseOverrideFee:Uv,BaseDynamicAfterFee:Pv,BaseHookFee:jv,AntiSandwichHook:Lv,LiquidityPenaltyHook:Zv,LimitOrderHook:Rv,ReHypothecationHook:Mv,BaseOracleHook:qv,OracleHookWithV3Adapters:{name:"OracleHookWithV3Adapters",displayName:"Oracle Hook V3 adapted",category:"Oracles",tooltipText:"Extends the Oracle Hook with Uniswap V3-compatible adapter contracts. Automatically deploys standard and truncated oracle adapters on pool initialization, enabling seamless integration with V3 oracle consumers.",tooltipLink:"https://docs.openzeppelin.com/uniswap-hooks/api/oracle#OracleHookWithV3Adapters",shares:"optional",alreadyImplementsShares:!1,inputs:[{name:"maxAbsTickDelta",label:"Max Absolute Tick Delta",type:"number",placeholder:"887272",tooltipText:"Limits tick changes per observation in the truncated oracle. Lower values resist manipulation but lag during real volatility; higher values respond faster but are more vulnerable to attacks. Default: 887272 (no truncation)."}],disabledFunctions:[],functions:{...qg({...qv.functions,_afterInitialize:{kind:"internal",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"sqrtPriceX96",type:"uint160"},{name:"tick",type:"int24"}],returns:["bytes4"]},standardAdapter:{kind:"public",mutability:"view",args:[{name:"poolId",type:"PoolId"}],returns:["address"]},truncatedAdapter:{kind:"public",mutability:"view",args:[{name:"poolId",type:"PoolId"}],returns:["address"]}})},permissions:{beforeInitialize:!1,afterInitialize:!0,beforeAddLiquidity:!1,afterAddLiquidity:!1,beforeRemoveLiquidity:!1,afterRemoveLiquidity:!1,beforeSwap:!0,afterSwap:!1,beforeDonate:!1,afterDonate:!1,beforeSwapReturnDelta:!1,afterSwapReturnDelta:!1,afterAddLiquidityReturnDelta:!1,afterRemoveLiquidityReturnDelta:!1}}},Hv=["beforeInitialize","afterInitialize","beforeAddLiquidity","beforeRemoveLiquidity","afterAddLiquidity","afterRemoveLiquidity","beforeSwap","afterSwap","beforeDonate","afterDonate","beforeSwapReturnDelta","afterSwapReturnDelta","afterAddLiquidityReturnDelta","afterRemoveLiquidityReturnDelta"],Fv=["beforeSwap","beforeAddLiquidity","beforeRemoveLiquidity","beforeDonate"];function Jv(e){return"ERC20"===e||"ERC6909"===e||"ERC1155"===e}var Vv={BaseHook:"@openzeppelin/uniswap-hooks/base/BaseHook.sol",BaseAsyncSwap:"@openzeppelin/uniswap-hooks/base/BaseAsyncSwap.sol",BaseCustomAccounting:"@openzeppelin/uniswap-hooks/base/BaseCustomAccounting.sol",AddLiquidityParams:"parent",RemoveLiquidityParams:"parent",BaseCustomCurve:"@openzeppelin/uniswap-hooks/base/BaseCustomCurve.sol",BaseDynamicFee:"@openzeppelin/uniswap-hooks/fee/BaseDynamicFee.sol",BaseOverrideFee:"@openzeppelin/uniswap-hooks/fee/BaseOverrideFee.sol",BaseDynamicAfterFee:"@openzeppelin/uniswap-hooks/fee/BaseDynamicAfterFee.sol",AntiSandwichHook:"@openzeppelin/uniswap-hooks/general/AntiSandwichHook.sol",LiquidityPenaltyHook:"@openzeppelin/uniswap-hooks/general/LiquidityPenaltyHook.sol",LimitOrderHook:"@openzeppelin/uniswap-hooks/general/LimitOrderHook.sol",OrderIdLibrary:"@openzeppelin/uniswap-hooks/general/LimitOrderHook.sol",BeforeSwapDelta:"@uniswap/v4-core/src/types/BeforeSwapDelta.sol",Hooks:"@uniswap/v4-core/src/libraries/Hooks.sol",IPoolManager:"@uniswap/v4-core/src/interfaces/IPoolManager.sol",PoolKey:"@uniswap/v4-core/src/types/PoolKey.sol",PoolId:"@uniswap/v4-core/src/types/PoolId.sol",Currency:"@uniswap/v4-core/src/types/Currency.sol",BalanceDelta:"@uniswap/v4-core/src/types/BalanceDelta.sol",SwapParams:"@uniswap/v4-core/src/types/PoolOperation.sol",ModifyLiquidityParams:"@uniswap/v4-core/src/types/PoolOperation.sol",CurrencySettler:"@openzeppelin/uniswap-hooks/utils/CurrencySettler.sol"};const Wv={hook:"BaseHook",name:"MyHook",pausable:!1,access:Kg.access,info:Kg.info,currencySettler:!1,safeCast:!1,transientStorage:!1,shares:{options:!1,name:"MyShares",symbol:"MSH",uri:""},permissions:{beforeInitialize:!1,afterInitialize:!1,beforeAddLiquidity:!1,beforeRemoveLiquidity:!1,afterAddLiquidity:!1,afterRemoveLiquidity:!1,beforeSwap:!1,afterSwap:!1,beforeDonate:!1,afterDonate:!1,beforeSwapReturnDelta:!1,afterSwapReturnDelta:!1,afterAddLiquidityReturnDelta:!1,afterRemoveLiquidityReturnDelta:!1},inputs:{blockNumberOffset:10,maxAbsTickDelta:887272}};function Kv(e){const t=function(e){return{...e,...Gg(e),pausable:e.pausable??Wv.pausable,currencySettler:e.currencySettler??Wv.currencySettler,safeCast:e.safeCast??Wv.safeCast,transientStorage:e.transientStorage??Wv.transientStorage,shares:e.shares??Wv.shares,permissions:e.permissions??Wv.permissions,inputs:e.inputs??Wv.inputs}}(e);!function(e){const t={};if("BaseOracleHook"===e.hook||"OracleHookWithV3Adapters"===e.hook){const n=e.inputs.maxAbsTickDelta;(!Number.isInteger(n)||n<0||n>887272)&&(t.maxAbsTickDelta="Max absolute tick delta must be a positive integer between 0 and 887272.")}if("LiquidityPenaltyHook"===e.hook){const n=e.inputs.blockNumberOffset;Number.isInteger(n)&&n>0||(t.blockNumberOffset="Block number offset must be a positive integer.")}if(Object.keys(t).length>0)throw new Fg(t)}(t);const n=new jg(t.name),i=Bv[t.hook];switch(function(e,t){const{securityContact:n,license:i}=t;n&&(Vg(n,"securityContact"),e.addNatspecTag("@custom:security-contact",n)),i&&(Vg(i,"license"),e.license=i)}(n,t.info),function(e,t){switch(e.addConstructorArgument({name:"_poolManager",type:"IPoolManager"}),e.addConstructionOnly({name:"BaseHook",path:Gv("BaseHook")},[{lit:"_poolManager"}]),t.hook){case"BaseHook":!function(e,t){e.addParent({name:t.hook,path:Gv(t.hook)},[{lit:"_poolManager"}])}(e,t);break;case"BaseAsyncSwap":!function(e,t){e.addTopLevelComment("TODO: Implement how asynchronous swaps are executed"),e.addTopLevelComment("i.e. queuing swaps to be executed together in batches, reordering, etc"),e.addParent({name:t.hook,path:Gv(t.hook)},[])}(e,t);break;case"BaseCustomAccounting":!function(e,t){e.addTopLevelComment("TODO: Override the required functions to customize the accounting logic"),e.addTopLevelComment("i.e. liquidity mining, rewarding well-behaved LPs, etc"),e.addOverride({name:"BaseCustomAccounting"},Bv.BaseCustomAccounting.functions._getAddLiquidity),e.setFunctionBody(["// TODO: Implement how liquidity additions and minted shares are computed"],Bv.BaseCustomAccounting.functions._getAddLiquidity),e.addOverride({name:"BaseCustomAccounting"},Bv.BaseCustomAccounting.functions._getRemoveLiquidity),e.setFunctionBody(["// TODO: Implement how liquidity removals and burned shares are computed"],Bv.BaseCustomAccounting.functions._getRemoveLiquidity),e.addOverride({name:"BaseCustomAccounting"},Bv.BaseCustomAccounting.functions._mint),e.setFunctionBody(["// TODO: Implement how shares are minted"],Bv.BaseCustomAccounting.functions._mint),e.addOverride({name:"BaseCustomAccounting"},Bv.BaseCustomAccounting.functions._burn),e.setFunctionBody(["// TODO: Implement how shares are burned"],Bv.BaseCustomAccounting.functions._burn),e.addParent({name:t.hook,path:Gv(t.hook)},[])}(e,t);break;case"BaseCustomCurve":!function(e,t){e.addTopLevelComment("TODO: Override the required functions to customize the pricing curve"),e.addTopLevelComment("i.e. specialized pricing curves, etc"),e.addOverride({name:"BaseCustomCurve"},Bv.BaseCustomCurve.functions._getUnspecifiedAmount),e.setFunctionBody(["// TODO: Implement how the unspecified currency amount is computed"],Bv.BaseCustomCurve.functions._getUnspecifiedAmount),e.addOverride({name:"BaseCustomCurve"},Bv.BaseCustomCurve.functions._getSwapFeeAmount),e.setFunctionBody(["// TODO: Implement how the LPs fees amount is computed"],Bv.BaseCustomCurve.functions._getSwapFeeAmount),e.addOverride({name:"BaseCustomCurve"},Bv.BaseCustomCurve.functions._getAmountOut),e.setFunctionBody(["// TODO: Implement how the amount out of the swap is computed"],Bv.BaseCustomCurve.functions._getAmountOut),e.addOverride({name:"BaseCustomCurve"},Bv.BaseCustomCurve.functions._getAmountIn),e.setFunctionBody(["// TODO: Implement how the amount in of the swap is computed"],Bv.BaseCustomCurve.functions._getAmountIn),e.addOverride({name:"BaseCustomAccounting"},Bv.BaseCustomAccounting.functions._mint),e.setFunctionBody(["// TODO: Implement how shares are minted"],Bv.BaseCustomAccounting.functions._mint),e.addOverride({name:"BaseCustomAccounting"},Bv.BaseCustomAccounting.functions._burn),e.setFunctionBody(["// TODO: Implement how shares are burned"],Bv.BaseCustomAccounting.functions._burn),e.addParent({name:t.hook,path:Gv(t.hook)},[])}(e,t);break;case"BaseDynamicFee":!function(e,t){e.addTopLevelComment("TODO: Override `_getFee` to customize the LP fee for the entire pool"),e.addTopLevelComment("i.e. dynamic fees depending on current market conditions, etc"),e.addOverride({name:"BaseDynamicFee"},Bv.BaseDynamicFee.functions._getFee),e.setFunctionBody(["// TODO: Implement how the LP fee is computed"],Bv.BaseDynamicFee.functions._getFee),e.addFunctionCode("_poke(key);",Bv.BaseDynamicFee.functions.poke),Zg(e,Bv.BaseDynamicFee.functions.poke,t.access,"POKE","poker"),e.addParent({name:t.hook,path:Gv(t.hook)},[])}(e,t);break;case"BaseOverrideFee":!function(e,t){e.addTopLevelComment("TODO: Override `_getFee` to customize the swap fee for each swap"),e.addTopLevelComment("i.e. dynamic fees depending on current market conditions, swap size, swap direction, etc"),e.addOverride({name:"BaseOverrideFee"},Bv.BaseOverrideFee.functions._getFee),e.setFunctionBody(["// TODO: Implement how the LP fee is computed"],Bv.BaseOverrideFee.functions._getFee),e.addParent({name:t.hook,path:Gv(t.hook)},[])}(e,t);break;case"BaseDynamicAfterFee":!function(e,t){e.addTopLevelComment("TODO: Override `_getTargetUnspecified` to customize the swap outcome target"),e.addTopLevelComment("i.e. capture any positive difference of the swap outcome that surpasses the target"),e.addOverride({name:"BaseDynamicAfterFee"},Bv.BaseDynamicAfterFee.functions._getTargetUnspecified),e.setFunctionBody(["// TODO: Implement how the target unspecified amount is computed"],Bv.BaseDynamicAfterFee.functions._getTargetUnspecified),e.addOverride({name:"BaseDynamicAfterFee"},Bv.BaseDynamicAfterFee.functions._afterSwapHandler),e.setFunctionBody(["// TODO: Implement how the accumulated target penalty fees are handled after swaps"],Bv.BaseDynamicAfterFee.functions._afterSwapHandler),e.addParent({name:t.hook,path:Gv(t.hook)},[])}(e,t);break;case"BaseHookFee":!function(e,t){e.addTopLevelComment("TODO: Override `_getHookFee` to customize the hook fee collection for the entire pool"),e.addTopLevelComment("i.e. dynamic hook-owned fees depending on current market conditions, etc"),e.addOverride({name:"BaseHookFee"},Bv.BaseHookFee.functions._getHookFee),e.setFunctionBody(["// TODO: Implement how the Hook fee is computed"],Bv.BaseHookFee.functions._getHookFee),e.addOverride({name:"BaseHookFee"},Bv.BaseHookFee.functions.handleHookFees),e.setFunctionBody(["// TODO: Implement how the accumulated hook fees are handled"],Bv.BaseHookFee.functions.handleHookFees),e.addParent({name:t.hook,path:Gv(t.hook)},[])}(e,t);break;case"AntiSandwichHook":!function(e,t){e.addTopLevelComment("TODO: Override `_afterSwapHandler` to determine how accumulated penalty fees are handled"),e.addTopLevelComment("i.e. distributing the fees to well-behaved LPs, improving swap pricing, etc"),e.addOverride({name:"AntiSandwichHook"},Bv.AntiSandwichHook.functions._afterSwapHandler),e.setFunctionBody(["// TODO: Implement how the accumulated penalty fees from sandwich attacks are handled after swaps"],Bv.AntiSandwichHook.functions._afterSwapHandler),e.addParent({name:t.hook,path:Gv(t.hook)},[])}(e,t);break;case"ReHypothecationHook":!function(e,t){e.addTopLevelComment("TODO: Override the required functions to customize the rehypothecation logic"),e.addTopLevelComment("i.e. keeping the liquidity in a yield-bearing ERC-4626 Vault while still being available for swaps, etc"),e.addOverride({name:"ReHypothecationHook"},Bv.ReHypothecationHook.functions.getCurrencyYieldSource),e.setFunctionBody(["// TODO: Implement how the yield source address is computed for a given currency"],Bv.ReHypothecationHook.functions.getCurrencyYieldSource),e.addOverride({name:"ReHypothecationHook"},Bv.ReHypothecationHook.functions._depositToYieldSource),e.setFunctionBody(["// TODO: Implement how a given currency is deposited to it's corresponding yield source"],Bv.ReHypothecationHook.functions._depositToYieldSource),e.addOverride({name:"ReHypothecationHook"},Bv.ReHypothecationHook.functions._withdrawFromYieldSource),e.setFunctionBody(["// TODO: Implement how a given currency is withdrawn from it's corresponding yield source"],Bv.ReHypothecationHook.functions._withdrawFromYieldSource),e.addOverride({name:"ReHypothecationHook"},Bv.ReHypothecationHook.functions._getAmountInYieldSource),e.setFunctionBody(["// TODO: Implement how the hook's balance of a given currency in it's corresponding yield source is obtained"],Bv.ReHypothecationHook.functions._getAmountInYieldSource),e.addParent({name:t.hook,path:Gv(t.hook)},[])}(e,t);break;case"LiquidityPenaltyHook":!function(e,t){e.addTopLevelComment("TODO: Determine the block number offset for the liquidity penalty"),e.addTopLevelComment("i.e. `10` in order to deter JIT attacks linearly for the first 10 blocks after adding liquidity");const n=t.inputs?.blockNumberOffset,i=[void 0!==n&&n>0?n:10];e.addParent({name:t.hook,path:Gv(t.hook)},i)}(e,t);break;case"LimitOrderHook":!function(e,t){e.addParent({name:t.hook,path:Gv(t.hook)},[])}(e,t);break;case"BaseOracleHook":case"OracleHookWithV3Adapters":Xv(e,t);break;default:throw new Error(`Unknown hook: ${t.hook}`)}}(n,t),t.access&&Rg(n,t.access),t.currencySettler&&function(e){e.addLibrary({name:"CurrencySettler",path:"@openzeppelin/uniswap-hooks/utils/CurrencySettler.sol"},["Currency"])}(n),t.safeCast&&function(e){e.addLibrary({name:"SafeCast",path:"@openzeppelin/contracts/utils/math/SafeCast.sol"},["*"])}(n),t.transientStorage&&function(e){e.addLibrary({name:"TransientSlot",path:"@openzeppelin/contracts/utils/TransientSlot.sol"},["bytes32"]),e.addLibrary({name:"SlotDerivation",path:"@openzeppelin/contracts/utils/SlotDerivation.sol"},["bytes32"])}(n),i.shares){case"disabled":t.shares.options=!1;break;case"required":t.shares.options||(t.shares.options="ERC20");break;case"ERC20":t.shares.options="ERC20";break;case"ERC6909":t.shares.options="ERC6909";break;case"ERC1155":t.shares.options="ERC1155"}switch(t.shares.options){case"ERC20":!function(e,t){const n=Bv[t.hook];n.alreadyImplementsShares?e.addConstructionOnly({name:"ERC20",path:"@openzeppelin/contracts/token/ERC20/ERC20.sol"},[t.shares.name||"",t.shares.symbol||""]):e.addParent({name:"ERC20",path:"@openzeppelin/contracts/token/ERC20/ERC20.sol"},[t.shares.name||"",t.shares.symbol||""])}(n,t);break;case"ERC6909":!function(e){e.addParent({name:"ERC6909",path:"@openzeppelin/contracts/token/ERC6909/ERC6909.sol"},[]),e.addOverride({name:"ERC6909"},Lg)}(n);break;case"ERC1155":!function(e,t){e.addParent({name:"ERC1155",path:"@openzeppelin/contracts/token/ERC1155/ERC1155.sol"},[t.shares.uri||""]),e.addOverride({name:"ERC1155"},Lg)}(n,t)}for(const e of Hv)(ny(t.hook,e)||oy(t,e)||t.pausable&&iy(t,e))&&(t.permissions[e]=!0);return t.pausable&&(Bg(n,t.access,[]),function(e,t){for(const n of Object.values(Bv[t.hook].functions))if(Qv(n,t)){e.functions.find(e=>e.name===n.name)||(e.setFunctionBody([Yv(n)],n),e.addOverride({name:e.name},n)),e.addModifier("whenNotPaused",n)}}(n,t)),function(e,t){for(const n of function(e){return Object.entries(e.permissions).filter(([e,t])=>t).map(([e])=>e)}(t)){if(!(ny(t.hook,n)||t.pausable&&iy(t,n))){const t=`_${n}`,i=Bv.BaseHook.functions[t];n.includes("ReturnDelta")||e.functions.some(e=>e.name===i?.name)||(e.addOverride({name:"BaseHook"},i),e.setFunctionBody([`// TODO: Implement _${t}`],i))}}}(n,t),function(e,t){const n=Hv.map((e,n)=>` ${e}: ${t.permissions[e]??!1}${n===Hv.length-1?"":","}`);e.addOverride({name:"BaseHook"},Bv.BaseHook.functions.getHookPermissions),e.setFunctionBody(["return Hooks.Permissions({",...n,"});"],Bv.BaseHook.functions.getHookPermissions)}(n,t),function(e){const t=new Set;for(const n of e.constructorArgs)t.add(ey(n.type));for(const n of e.libraries)for(const e of n.usingFor)t.add(ey(e));for(const n of Object.values(e.functions)){for(const e of n.args)t.add(ey(e.type));for(const e of n.returns||[])t.add(ey(e))}for(const n of t){if(ty(n))continue;const t=Vv[n];if(!t)throw new Error(`Path for ${n} not found in importPaths.json`);"parent"!==t&&e.addImportOnly({name:n,path:t})}}(n),n}function Gv(e){const t=Bv[e].category;return"Oracles"===t?`@openzeppelin/uniswap-hooks/oracles/panoptic/${e}.sol`:`@openzeppelin/uniswap-hooks/${t.toLowerCase()}/${e}.sol`}function Xv(e,t){e.addTopLevelComment("TODO: Determine the max absolute tick delta for the truncated oracle"),e.addTopLevelComment("i.e. `488` to limit tick changes per observation to an equivalent of 5% abrupt price changes"),e.addTopLevelComment("i.e. `887272` to disable truncation and allow full tick range observations");const n=t.inputs?.maxAbsTickDelta,i=[void 0!==n&&n>=0&&n<=887272?n:887272];e.addParent({name:t.hook,path:Gv(t.hook)},i)}function Yv(e){const t=`super.${e.name}(${e.args.map(e=>e.name).join(", ")})`;return e.returns&&e.returns.length>0?`return ${t};`:`${t};`}function Qv(e,t){if(Bv[t.hook].disabledFunctions.includes(e.name))return!1;for(const t of Fv)if(e.name===`_${t}`)return!0;return!("external"!==e.kind&&"public"!==e.kind||"pure"===e.mutability||"view"===e.mutability||["unlockCallback","pause","unpause","increaseObservationCardinalityNext"].includes(e.name))}function ey(e){let t="";for(t="string"==typeof e?e.includes(" ")?e.split(" ")[0]:e:e.name,t.includes(".")&&(t=t.split(".")[0]);t.endsWith("]");){const e=t.lastIndexOf("[");if(-1===e)break;t=t.slice(0,e)}return t.startsWith("address")&&(t="address"),t}function ty(e){if(new Set(["bool","address","string","bytes","byte","uint","int","fixed","ufixed","*"]).has(e))return!0;const t=e.match(/^(u?int)(\d+)$/);if(t){const e=Number(t[2]);return e>=8&&e<=256&&e%8==0}return!!/^bytes([1-9]|[12]\d|3[0-2])$/.test(e)||e.startsWith("mapping")}function ny(e,t){return Bv[e].permissions[t]}function iy(e,t){return Boolean(e.pausable)&&Fv.includes(t)}function ry(e){return e.concat("ReturnDelta")}function oy(e,t){return function(e,t){return e.permissions[t]}(e,ry(t))}var ay="1.2.1";const sy={print:function(e=Wv){return Ev(Kv(e))},getVersionedRemappings:function(){return[`@openzeppelin/contracts/=@openzeppelin/contracts@${zv}/`,`@openzeppelin/uniswap-hooks/=@openzeppelin/uniswap-hooks@${ay}/src/`]},defaults:Wv,isAccessControlRequired:function(e){return!!e.pausable||"BaseDynamicFee"===e.hook}};var uy,ly;function cy(){if(ly)return uy;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}ly=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 u 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 l(e){return e?"string"==typeof e?e:e.source:null}function c(e){return m("(?=",e,")")}function d(e){return m("(?:",e,")*")}function p(e){return m("(?:",e,")?")}function m(...e){return e.map(e=>l(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=>l(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=l(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 y="[a-zA-Z]\\w*",b="[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},O=S("//","$"),z=S("/\\*","\\*/"),E=S("#","$"),D={scope:"number",begin:$,relevance:0},T={scope:"number",begin:_,relevance:0},C={scope:"number",begin:k,relevance:0},N={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[w,{begin:/\[/,end:/\]/,relevance:0,contains:[w]}]},A={scope:"title",begin:y,relevance:0},U={scope:"title",begin:b,relevance:0},P={begin:"\\.\\s*"+b,relevance:0};var j=Object.freeze({__proto__:null,APOS_STRING_MODE:x,BACKSLASH_ESCAPE:w,BINARY_NUMBER_MODE:C,BINARY_NUMBER_RE:k,COMMENT:S,C_BLOCK_COMMENT_MODE:z,C_LINE_COMMENT_MODE:O,C_NUMBER_MODE:T,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:E,IDENT_RE:y,MATCH_NOTHING_RE:/\b\B/,METHOD_GUARD:P,NUMBER_MODE:D,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:A,UNDERSCORE_IDENT_RE:b,UNDERSCORE_TITLE_MODE:U});function L(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 Z(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=L,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 q(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 B(e,t){void 0===e.relevance&&(e.relevance=1)}const H=(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,c(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},F=["of","and","for","in","not","or","if","then","parent","list","value"];function J(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,J(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,V(n[0],n[1])]})}}function V(e,t){return t?Number(t):function(e){return F.includes(e.toLowerCase())}(e)?0:1}const W={},K=e=>{console.error(e)},G=(e,...t)=>{console.log(`WARN: ${e}`,...t)},X=(e,t)=>{W[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),W[`${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 K("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Y;if("object"!=typeof e.beginScope||null===e.beginScope)throw K("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 K("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Y;if("object"!=typeof e.endScope||null===e.endScope)throw K("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(l(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,q,ee,H].forEach(e=>e(o,a)),e.compilerExtensions.forEach(e=>e(o,a)),o.__beforeBegin=null,[Z,M,B].forEach(e=>e(o,a)),o.isCompiled=!0;let u=null;return"object"==typeof o.keywords&&o.keywords.$pattern&&(o.keywords=Object.assign({},o.keywords),u=o.keywords.$pattern,delete o.keywords.$pattern),u=u||/\w+/,o.keywords&&(o.keywords=J(o.keywords,e.case_insensitive)),s.keywordPatternRe=t(u,!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=l(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?",l={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:u};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:y(o.language,o.code,n);return a.code=o.code,S("after:highlight",a),a}function y(e,n,r,o){const u=Object.create(null);function l(e,t){return e.keywords[t]}function c(){if(!O.keywords)return void E.addText(D);let e=0;O.keywordPatternRe.lastIndex=0;let t=O.keywordPatternRe.exec(D),n="";for(;t;){n+=D.substring(e,t.index);const i=x.case_insensitive?t[0].toLowerCase():t[0],r=l(O,i);if(r){const[e,o]=r;if(E.addText(n),n="",u[i]=(u[i]||0)+1,u[i]<=7&&(T+=o),e.startsWith("_"))n+=t[0];else{const n=x.classNameAliases[e]||e;p(t[0],n)}}else n+=t[0];e=O.keywordPatternRe.lastIndex,t=O.keywordPatternRe.exec(D)}n+=D.substring(e),E.addText(n)}function d(){null!=O.subLanguage?function(){if(""===D)return;let e=null;if("string"==typeof O.subLanguage){if(!i[O.subLanguage])return void E.addText(D);e=y(O.subLanguage,D,!0,z[O.subLanguage]),z[O.subLanguage]=e._top}else e=b(D,O.subLanguage.length?O.subLanguage:null);O.relevance>0&&(T+=e.relevance),E.__addSublanguage(e._emitter,e.language)}():c(),D=""}function p(e,t){""!==e&&(E.startScope(t),E.addText(e),E.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):(D=r,c(),D=""),n++}}function f(e,t){return e.scope&&"string"==typeof e.scope&&E.openNode(x.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(p(D,x.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),D=""):e.beginScope._multi&&(m(e.beginScope,t),D="")),O=Object.create(e,{parent:{value:O}}),O}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===O.matcher.regexIndex?(D+=e[0],1):(A=!0,0)}function $(e){const t=e[0],i=n.substring(e.index),r=g(O,e,i);if(!r)return ae;const o=O;O.endScope&&O.endScope._wrap?(d(),p(t,O.endScope._wrap)):O.endScope&&O.endScope._multi?(d(),m(O.endScope,e)):o.skip?D+=t:(o.returnEnd||o.excludeEnd||(D+=t),d(),o.excludeEnd&&(D=t));do{O.scope&&E.closeNode(),O.skip||O.subLanguage||(T+=O.relevance),O=O.parent}while(O!==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(D+=i,null==s)return d(),0;if("begin"===_.type&&"end"===o.type&&_.index===o.index&&""===s){if(D+=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?D+=n:(i.excludeBegin&&(D+=n),d(),i.returnBegin||i.excludeBegin||(D=n)),f(i,e),i.returnBegin?0:n.length}(o);if("illegal"===o.type&&!r){const e=new Error('Illegal lexeme "'+s+'" for mode "'+(O.scope||"<unnamed>")+'"');throw e.mode=O,e}if("end"===o.type){const e=$(o);if(e!==ae)return e}if("illegal"===o.type&&""===s)return D+="\n",1;if(N>1e5&&N>3*o.index){throw new Error("potential infinite loop, way more iterations than matches")}return D+=s,s.length}const x=w(e);if(!x)throw K(s.replace("{}",e)),new Error('Unknown language: "'+e+'"');const I=te(x);let S="",O=o||I;const z={},E=new h.__emitter(h);!function(){const e=[];for(let t=O;t!==x;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach(e=>E.openNode(e))}();let D="",T=0,C=0,N=0,A=!1;try{if(x.__emitTokens)x.__emitTokens(n,E);else{for(O.matcher.considerAll();;){N++,A?A=!1:O.matcher.considerAll(),O.matcher.lastIndex=C;const e=O.matcher.exec(n);if(!e)break;const t=k(n.substring(C,e.index),e);C=e.index+t}k(n.substring(C))}return E.finalize(),S=E.toHTML(),{language:e,value:S,relevance:T,illegal:!1,_emitter:E,_top:O}}catch(t){if(t.message&&t.message.includes("Illegal"))return{language:e,value:re(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:C,context:n.slice(C-100,C+100),mode:t.mode,resultSoFar:S},_emitter:E};if(a)return{language:e,value:re(n),illegal:!1,relevance:0,errorRaised:t,_emitter:E,_top:O};throw t}}function b(e,t){t=t||h.languages||Object.keys(i);const n=function(e){const t={value:re(e),illegal:!1,relevance:0,_top:l,_emitter:new h.__emitter(h)};return t._emitter.addText(e),t}(e),r=t.filter(w).filter(I).map(t=>y(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,u=a;return u.secondBest=s,u}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||(G(s.replace("{}",n[1])),G("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}):b(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:b,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(K("Language definition for '{}' could not be registered.".replace("{}",e)),!a)throw t;K(t),r=l}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:c,either:f,optional:p,anyNumberOfTimes:d};for(const t in j)"object"==typeof j[t]&&e(j[t]);return Object.assign(n,j),n},ue=se({});return ue.newInstance=()=>se({}),uy=ue,ue.HighlightJS=ue,ue.default=ue,uy}var dy,py,my,fy,hy,gy,vy,yy=Xg(cy()),by={exports:{}};function $y(){if(py)return dy;function e(){try{return new RegExp("(?<!.)"),!0}catch(e){return!1}}py=1;var t=/-?(\b0[xX]([a-fA-F0-9]_?)*[a-fA-F0-9]|(\b[1-9](_?\d)*(\.((\d_?)*\d)?)?|\.\d(_?\d)*)([eE][-+]?\d(_?\d)*)?|\b0)(?!\w|\$)/;e()&&(t=t.source.replace(/\\b/g,"(?<!\\$)\\b"));var n={className:"number",begin:t,relevance:0},i={keyword:"assembly let function if switch case default for leave break continue u256 jump jumpi stop return revert selfdestruct invalid",built_in:"add sub mul div sdiv mod smod exp not lt gt slt sgt eq iszero and or xor byte shl shr sar addmod mulmod signextend keccak256 pc pop dup1 dup2 dup3 dup4 dup5 dup6 dup7 dup8 dup9 dup10 dup11 dup12 dup13 dup14 dup15 dup16 swap1 swap2 swap3 swap4 swap5 swap6 swap7 swap8 swap9 swap10 swap11 swap12 swap13 swap14 swap15 swap16 mload mstore mstore8 sload sstore msize gas address balance selfbalance caller callvalue calldataload calldatasize calldatacopy codesize codecopy extcodesize extcodecopy returndatasize returndatacopy extcodehash create create2 call callcode delegatecall staticcall log0 log1 log2 log3 log4 chainid origin gasprice basefee blockhash coinbase timestamp number difficulty prevrandao gaslimit",literal:"true false"},r={className:"string",begin:/\bhex'(([0-9a-fA-F]{2}_?)*[0-9a-fA-F]{2})?'/},o={className:"string",begin:/\bhex"(([0-9a-fA-F]{2}_?)*[0-9a-fA-F]{2})?"/};function a(e){return e.inherit(e.APOS_STRING_MODE,{begin:/(\bunicode)?'/})}function s(e){return e.inherit(e.QUOTE_STRING_MODE,{begin:/(\bunicode)?"/})}return dy={SOL_ASSEMBLY_KEYWORDS:i,baseAssembly:function(e){var t=a(e),u=s(e),l=/[A-Za-z_$][A-Za-z_$0-9.]*/,c=e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/,lexemes:l,keywords:i}),d={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,lexemes:l,keywords:i,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t,u,n]},p={className:"operator",begin:/:=|->/};return{keywords:i,lexemes:l,contains:[t,u,r,o,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,p,{className:"function",lexemes:l,beginKeywords:"function",end:"{",excludeEnd:!0,contains:[c,d,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,p]}]}},solAposStringMode:a,solQuoteStringMode:s,HEX_APOS_STRING_MODE:r,HEX_QUOTE_STRING_MODE:o,SOL_NUMBER:n,isNegativeLookbehindAvailable:e}}var _y=function(){if(vy)return by.exports;vy=1;const e=function(){if(fy)return my;fy=1;const{baseAssembly:e,solAposStringMode:t,solQuoteStringMode:n,HEX_APOS_STRING_MODE:i,HEX_QUOTE_STRING_MODE:r,SOL_NUMBER:o,isNegativeLookbehindAvailable:a}=$y();return my=function(s){for(var u=t(s),l=n(s),c=[],d=0;d<32;d++)c[d]=d+1;var p=c.map(function(e){return 8*e}),m=[];for(d=0;d<=80;d++)m[d]=d;var f=c.map(function(e){return"bytes"+e}).join(" ")+" ",h=p.map(function(e){return"uint"+e}).join(" ")+" ",g=p.map(function(e){return"int"+e}).join(" ")+" ",v=[].concat.apply([],p.map(function(e){return m.map(function(t){return e+"x"+t})})),y={keyword:"var bool string int uint "+g+h+"byte bytes "+f+"fixed ufixed "+v.map(function(e){return"fixed"+e}).join(" ")+" "+v.map(function(e){return"ufixed"+e}).join(" ")+" enum struct mapping address new delete if else for while continue break return throw emit try catch revert unchecked _ function modifier event constructor fallback receive error virtual override constant immutable anonymous indexed storage memory calldata external public internal payable pure view private returns import from as using global pragma contract interface library is abstract type assembly",literal:"true false wei gwei szabo finney ether seconds minutes hours days weeks years",built_in:"self this super selfdestruct suicide now msg block tx abi blockhash gasleft assert require Error Panic sha3 sha256 keccak256 ripemd160 ecrecover addmod mulmod log0 log1 log2 log3 log4"},b={className:"operator",begin:/[+\-!~*\/%<>&^|=]/},$=/[A-Za-z_$][A-Za-z_$0-9]*/,_={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,lexemes:$,keywords:y,contains:[s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE,u,l,o,"self"]},k={begin:/\.\s*/,end:/[^A-Za-z0-9$_\.]/,excludeBegin:!0,excludeEnd:!0,keywords:{built_in:"gas value selector address length push pop send transfer call callcode delegatecall staticcall balance code codehash wrap unwrap name creationCode runtimeCode interfaceId min max"},relevance:2},w=s.inherit(s.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/,lexemes:$,keywords:y}),x="("+["gas","value","salt"].join("|")+")(?=:)",I={className:"built_in",begin:(a()?"(?<!\\$)\\b":"\\b")+x};function S(e,t){return{begin:(a()?"(?<!\\$)\\b":"\\b")+e+"\\.\\s*",end:/[^A-Za-z0-9$_\.]/,excludeBegin:!1,excludeEnd:!0,lexemes:$,keywords:{built_in:e+" "+t},contains:[k],relevance:10}}var O=e(s),z=s.inherit(O,{contains:O.contains.concat([{begin:/\./,end:/[^A-Za-z0-9$.]/,excludeBegin:!0,excludeEnd:!0,keywords:{built_in:"slot offset length address selector"},relevance:2},{begin:/_/,end:/[^A-Za-z0-9$.]/,excludeBegin:!0,excludeEnd:!0,keywords:{built_in:"slot offset"},relevance:2}])});return{aliases:["sol"],keywords:y,lexemes:$,contains:[u,l,i,r,s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE,o,I,b,{className:"function",lexemes:$,beginKeywords:"function modifier event constructor fallback receive error",end:/[{;]/,excludeEnd:!0,contains:[w,_,I,s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE],illegal:/%/},S("msg","gas value data sender sig"),S("block","blockhash coinbase difficulty prevrandao gaslimit basefee number timestamp chainid"),S("tx","gasprice origin"),S("abi","decode encode encodePacked encodeWithSelector encodeWithSignature encodeCall"),S("bytes","concat"),S("string","concat"),k,{className:"class",lexemes:$,beginKeywords:"contract interface library",end:"{",excludeEnd:!0,illegal:/[:"\[\]]/,contains:[{beginKeywords:"is",lexemes:$},w,_,I,s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE]},{lexemes:$,beginKeywords:"struct enum",end:"{",excludeEnd:!0,illegal:/[:"\[\]]/,contains:[w,s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE]},{beginKeywords:"import",end:";",lexemes:$,keywords:"import from as",contains:[w,u,l,i,r,s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE,b]},{beginKeywords:"using",end:";",lexemes:$,keywords:"using for global",contains:[w,s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE,b]},{className:"meta",beginKeywords:"pragma",end:";",lexemes:$,keywords:{keyword:"pragma solidity experimental abicoder",built_in:"ABIEncoderV2 SMTChecker v1 v2"},contains:[s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE,s.inherit(u,{className:"meta-string"}),s.inherit(l,{className:"meta-string"})]},{beginKeywords:"assembly",end:/\b\B/,contains:[s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE,s.inherit(u,{className:"meta-string"}),s.inherit(l,{className:"meta-string"}),s.inherit(z,{begin:"{",end:"}",endsParent:!0,contains:z.contains.concat([s.inherit(z,{begin:"{",end:"}",contains:z.contains.concat(["self"])})])})]}],illegal:/#/}},my}(),t=function(){if(gy)return hy;gy=1;const{SOL_ASSEMBLY_KEYWORDS:e,baseAssembly:t,isNegativeLookbehindAvailable:n}=$y();return hy=function(i){var r={keyword:e.keyword+" object code data",built_in:e.built_in+" datasize dataoffset datacopy setimmutable loadimmutable linkersymbol memoryguard",literal:e.literal},o=/\bverbatim_[1-9]?[0-9]i_[1-9]?[0-9]o\b(?!\$)/;n()&&(o=o.source.replace(/\\b/,"(?<!\\$)\\b"));var a={className:"built_in",begin:o},s=t(i);return i.inherit(s,{keywords:r,contains:s.contains.concat([a])})}}();return by.exports=function(n){n.registerLanguage("solidity",e),n.registerLanguage("yul",t)},by.exports.solidity=e,by.exports.yul=t,by.exports}();Xg(_y)(yy);var ky="top",wy="bottom",xy="right",Iy="left",Sy="auto",Oy=[ky,wy,xy,Iy],zy="start",Ey="end",Dy="viewport",Ty="popper",Cy=Oy.reduce(function(e,t){return e.concat([t+"-"+zy,t+"-"+Ey])},[]),Ny=[].concat(Oy,[Sy]).reduce(function(e,t){return e.concat([t,t+"-"+zy,t+"-"+Ey])},[]),Ay=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Uy(e){return e?(e.nodeName||"").toLowerCase():null}function Py(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function jy(e){return e instanceof Py(e).Element||e instanceof Element}function Ly(e){return e instanceof Py(e).HTMLElement||e instanceof HTMLElement}function Ry(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Py(e).ShadowRoot||e instanceof ShadowRoot)}var Zy={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];Ly(r)&&Uy(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},{});Ly(i)&&Uy(i)&&(Object.assign(i.style,o),Object.keys(r).forEach(function(e){i.removeAttribute(e)}))})}},requires:["computeStyles"]};function My(e){return e.split("-")[0]}var qy=Math.max,By=Math.min,Hy=Math.round;function Fy(){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 Jy(){return!/^((?!chrome|android).)*safari/i.test(Fy())}function Vy(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var i=e.getBoundingClientRect(),r=1,o=1;t&&Ly(e)&&(r=e.offsetWidth>0&&Hy(i.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Hy(i.height)/e.offsetHeight||1);var a=(jy(e)?Py(e):window).visualViewport,s=!Jy()&&n,u=(i.left+(s&&a?a.offsetLeft:0))/r,l=(i.top+(s&&a?a.offsetTop:0))/o,c=i.width/r,d=i.height/o;return{width:c,height:d,top:l,right:u+c,bottom:l+d,left:u,x:u,y:l}}function Wy(e){var t=Vy(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 Ky(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Ry(n)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function Gy(e){return Py(e).getComputedStyle(e)}function Xy(e){return["table","td","th"].indexOf(Uy(e))>=0}function Yy(e){return((jy(e)?e.ownerDocument:e.document)||window.document).documentElement}function Qy(e){return"html"===Uy(e)?e:e.assignedSlot||e.parentNode||(Ry(e)?e.host:null)||Yy(e)}function eb(e){return Ly(e)&&"fixed"!==Gy(e).position?e.offsetParent:null}function tb(e){for(var t=Py(e),n=eb(e);n&&Xy(n)&&"static"===Gy(n).position;)n=eb(n);return n&&("html"===Uy(n)||"body"===Uy(n)&&"static"===Gy(n).position)?t:n||function(e){var t=/firefox/i.test(Fy());if(/Trident/i.test(Fy())&&Ly(e)&&"fixed"===Gy(e).position)return null;var n=Qy(e);for(Ry(n)&&(n=n.host);Ly(n)&&["html","body"].indexOf(Uy(n))<0;){var i=Gy(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 nb(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ib(e,t,n){return qy(e,By(t,n))}function rb(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function ob(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var ab={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=My(n.placement),u=nb(s),l=[Iy,xy].indexOf(s)>=0?"height":"width";if(o&&a){var c=function(e,t){return rb("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:ob(e,Oy))}(r.padding,n),d=Wy(o),p="y"===u?ky:Iy,m="y"===u?wy:xy,f=n.rects.reference[l]+n.rects.reference[u]-a[u]-n.rects.popper[l],h=a[u]-n.rects.reference[u],g=tb(o),v=g?"y"===u?g.clientHeight||0:g.clientWidth||0:0,y=f/2-h/2,b=c[p],$=v-d[l]-c[m],_=v/2-d[l]/2+y,k=ib(b,_,$),w=u;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)))&&Ky(t.elements.popper,i)&&(t.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function sb(e){return e.split("-")[1]}var ub={top:"auto",right:"auto",bottom:"auto",left:"auto"};function lb(e){var t,n=e.popper,i=e.popperRect,r=e.placement,o=e.variation,a=e.offsets,s=e.position,u=e.gpuAcceleration,l=e.adaptive,c=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 c?c({x:m,y:h}):{x:m,y:h};m=g.x,h=g.y;var v=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),b=Iy,$=ky,_=window;if(l){var k=tb(n),w="clientHeight",x="clientWidth";if(k===Py(n)&&"static"!==Gy(k=Yy(n)).position&&"absolute"===s&&(w="scrollHeight",x="scrollWidth"),r===ky||(r===Iy||r===xy)&&o===Ey)$=wy,h-=(d&&k===_&&_.visualViewport?_.visualViewport.height:k[w])-i.height,h*=u?1:-1;if(r===Iy||(r===ky||r===wy)&&o===Ey)b=xy,m-=(d&&k===_&&_.visualViewport?_.visualViewport.width:k[x])-i.width,m*=u?1:-1}var I,S=Object.assign({position:s},l&&ub),O=!0===c?function(e,t){var n=e.x,i=e.y,r=t.devicePixelRatio||1;return{x:Hy(n*r)/r||0,y:Hy(i*r)/r||0}}({x:m,y:h},Py(n)):{x:m,y:h};return m=O.x,h=O.y,u?Object.assign({},S,((I={})[$]=y?"0":"",I[b]=v?"0":"",I.transform=(_.devicePixelRatio||1)<=1?"translate("+m+"px, "+h+"px)":"translate3d("+m+"px, "+h+"px, 0)",I)):Object.assign({},S,((t={})[$]=y?h+"px":"",t[b]=v?m+"px":"",t.transform="",t))}var cb={passive:!0};var db={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,u=Py(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&l.forEach(function(e){e.addEventListener("scroll",n.update,cb)}),s&&u.addEventListener("resize",n.update,cb),function(){o&&l.forEach(function(e){e.removeEventListener("scroll",n.update,cb)}),s&&u.removeEventListener("resize",n.update,cb)}},data:{}},pb={left:"right",right:"left",bottom:"top",top:"bottom"};function mb(e){return e.replace(/left|right|bottom|top/g,function(e){return pb[e]})}var fb={start:"end",end:"start"};function hb(e){return e.replace(/start|end/g,function(e){return fb[e]})}function gb(e){var t=Py(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function vb(e){return Vy(Yy(e)).left+gb(e).scrollLeft}function yb(e){var t=Gy(e),n=t.overflow,i=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+i)}function bb(e){return["html","body","#document"].indexOf(Uy(e))>=0?e.ownerDocument.body:Ly(e)&&yb(e)?e:bb(Qy(e))}function $b(e,t){var n;void 0===t&&(t=[]);var i=bb(e),r=i===(null==(n=e.ownerDocument)?void 0:n.body),o=Py(i),a=r?[o].concat(o.visualViewport||[],yb(i)?i:[]):i,s=t.concat(a);return r?s:s.concat($b(Qy(a)))}function _b(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function kb(e,t,n){return t===Dy?_b(function(e,t){var n=Py(e),i=Yy(e),r=n.visualViewport,o=i.clientWidth,a=i.clientHeight,s=0,u=0;if(r){o=r.width,a=r.height;var l=Jy();(l||!l&&"fixed"===t)&&(s=r.offsetLeft,u=r.offsetTop)}return{width:o,height:a,x:s+vb(e),y:u}}(e,n)):jy(t)?function(e,t){var n=Vy(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):_b(function(e){var t,n=Yy(e),i=gb(e),r=null==(t=e.ownerDocument)?void 0:t.body,o=qy(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=qy(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),s=-i.scrollLeft+vb(e),u=-i.scrollTop;return"rtl"===Gy(r||n).direction&&(s+=qy(n.clientWidth,r?r.clientWidth:0)-o),{width:o,height:a,x:s,y:u}}(Yy(e)))}function wb(e,t,n,i){var r="clippingParents"===t?function(e){var t=$b(Qy(e)),n=["absolute","fixed"].indexOf(Gy(e).position)>=0&&Ly(e)?tb(e):e;return jy(n)?t.filter(function(e){return jy(e)&&Ky(e,n)&&"body"!==Uy(e)}):[]}(e):[].concat(t),o=[].concat(r,[n]),a=o[0],s=o.reduce(function(t,n){var r=kb(e,n,i);return t.top=qy(r.top,t.top),t.right=By(r.right,t.right),t.bottom=By(r.bottom,t.bottom),t.left=qy(r.left,t.left),t},kb(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 xb(e){var t,n=e.reference,i=e.element,r=e.placement,o=r?My(r):null,a=r?sb(r):null,s=n.x+n.width/2-i.width/2,u=n.y+n.height/2-i.height/2;switch(o){case ky:t={x:s,y:n.y-i.height};break;case wy:t={x:s,y:n.y+n.height};break;case xy:t={x:n.x+n.width,y:u};break;case Iy:t={x:n.x-i.width,y:u};break;default:t={x:n.x,y:n.y}}var l=o?nb(o):null;if(null!=l){var c="y"===l?"height":"width";switch(a){case zy:t[l]=t[l]-(n[c]/2-i[c]/2);break;case Ey:t[l]=t[l]+(n[c]/2-i[c]/2)}}return t}function Ib(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,u=void 0===s?"clippingParents":s,l=n.rootBoundary,c=void 0===l?Dy:l,d=n.elementContext,p=void 0===d?Ty:d,m=n.altBoundary,f=void 0!==m&&m,h=n.padding,g=void 0===h?0:h,v=rb("number"!=typeof g?g:ob(g,Oy)),y=p===Ty?"reference":Ty,b=e.rects.popper,$=e.elements[f?y:p],_=wb(jy($)?$:$.contextElement||Yy(e.elements.popper),u,c,a),k=Vy(e.elements.reference),w=xb({reference:k,element:b,placement:r}),x=_b(Object.assign({},b,w)),I=p===Ty?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},O=e.modifiersData.offset;if(p===Ty&&O){var z=O[r];Object.keys(S).forEach(function(e){var t=[xy,wy].indexOf(e)>=0?1:-1,n=[ky,wy].indexOf(e)>=0?"y":"x";S[e]+=z[n]*t})}return S}function Sb(e,t){void 0===t&&(t={});var n=t,i=n.placement,r=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,u=n.allowedAutoPlacements,l=void 0===u?Ny:u,c=sb(i),d=c?s?Cy:Cy.filter(function(e){return sb(e)===c}):Oy,p=d.filter(function(e){return l.indexOf(e)>=0});0===p.length&&(p=d);var m=p.reduce(function(t,n){return t[n]=Ib(e,{placement:n,boundary:r,rootBoundary:o,padding:a})[My(n)],t},{});return Object.keys(m).sort(function(e,t){return m[e]-m[t]})}var Ob={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,u=n.fallbackPlacements,l=n.padding,c=n.boundary,d=n.rootBoundary,p=n.altBoundary,m=n.flipVariations,f=void 0===m||m,h=n.allowedAutoPlacements,g=t.options.placement,v=My(g),y=u||(v===g||!f?[mb(g)]:function(e){if(My(e)===Sy)return[];var t=mb(e);return[hb(e),t,hb(t)]}(g)),b=[g].concat(y).reduce(function(e,n){return e.concat(My(n)===Sy?Sb(t,{placement:n,boundary:c,rootBoundary:d,padding:l,flipVariations:f,allowedAutoPlacements:h}):n)},[]),$=t.rects.reference,_=t.rects.popper,k=new Map,w=!0,x=b[0],I=0;I<b.length;I++){var S=b[I],O=My(S),z=sb(S)===zy,E=[ky,wy].indexOf(O)>=0,D=E?"width":"height",T=Ib(t,{placement:S,boundary:c,rootBoundary:d,altBoundary:p,padding:l}),C=E?z?xy:Iy:z?wy:ky;$[D]>_[D]&&(C=mb(C));var N=mb(C),A=[];if(o&&A.push(T[O]<=0),s&&A.push(T[C]<=0,T[N]<=0),A.every(function(e){return e})){x=S,w=!1;break}k.set(S,A)}if(w)for(var U=function(e){var t=b.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"},P=f?3:1;P>0;P--){if("break"===U(P))break}t.placement!==x&&(t.modifiersData[i]._skip=!0,t.placement=x,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function zb(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 Eb(e){return[ky,xy,wy,Iy].some(function(t){return e[t]>=0})}var Db={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=Ny.reduce(function(e,n){return e[n]=function(e,t,n){var i=My(e),r=[Iy,ky].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,[Iy,xy].indexOf(i)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,o),e},{}),s=a[t.placement],u=s.x,l=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=l),t.modifiersData[i]=a}};var Tb={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,u=n.boundary,l=n.rootBoundary,c=n.altBoundary,d=n.padding,p=n.tether,m=void 0===p||p,f=n.tetherOffset,h=void 0===f?0:f,g=Ib(t,{boundary:u,rootBoundary:l,padding:d,altBoundary:c}),v=My(t.placement),y=sb(t.placement),b=!y,$=nb(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),O=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,z={x:0,y:0};if(k){if(o){var E,D="y"===$?ky:Iy,T="y"===$?wy:xy,C="y"===$?"height":"width",N=k[$],A=N+g[D],U=N-g[T],P=m?-x[C]/2:0,j=y===zy?w[C]:x[C],L=y===zy?-x[C]:-w[C],R=t.elements.arrow,Z=m&&R?Wy(R):{width:0,height:0},M=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},q=M[D],B=M[T],H=ib(0,w[C],Z[C]),F=b?w[C]/2-P-H-q-S.mainAxis:j-H-q-S.mainAxis,J=b?-w[C]/2+P+H+B+S.mainAxis:L+H+B+S.mainAxis,V=t.elements.arrow&&tb(t.elements.arrow),W=V?"y"===$?V.clientTop||0:V.clientLeft||0:0,K=null!=(E=null==O?void 0:O[$])?E:0,G=N+J-K,X=ib(m?By(A,N+F-K-W):A,N,m?qy(U,G):U);k[$]=X,z[$]=X-N}if(s){var Y,Q="x"===$?ky:Iy,ee="x"===$?wy:xy,te=k[_],ne="y"===_?"height":"width",ie=te+g[Q],re=te-g[ee],oe=-1!==[ky,Iy].indexOf(v),ae=null!=(Y=null==O?void 0:O[_])?Y:0,se=oe?ie:te-w[ne]-x[ne]-ae+S.altAxis,ue=oe?te+w[ne]+x[ne]-ae-S.altAxis:re,le=m&&oe?function(e,t,n){var i=ib(e,t,n);return i>n?n:i}(se,te,ue):ib(m?se:ie,te,m?ue:re);k[_]=le,z[_]=le-te}t.modifiersData[i]=z}},requiresIfExists:["offset"]};function Cb(e,t,n){void 0===n&&(n=!1);var i,r=Ly(t),o=Ly(t)&&function(e){var t=e.getBoundingClientRect(),n=Hy(t.width)/e.offsetWidth||1,i=Hy(t.height)/e.offsetHeight||1;return 1!==n||1!==i}(t),a=Yy(t),s=Vy(e,o,n),u={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==Uy(t)||yb(a))&&(u=(i=t)!==Py(i)&&Ly(i)?function(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}(i):gb(i)),Ly(t)?((l=Vy(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):a&&(l.x=vb(a))),{x:s.left+u.scrollLeft-l.x,y:s.top+u.scrollTop-l.y,width:s.width,height:s.height}}function Nb(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 Ab={placement:"bottom",modifiers:[],strategy:"absolute"};function Ub(){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 Pb(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,i=void 0===n?[]:n,r=t.defaultOptions,o=void 0===r?Ab:r;return function(e,t,n){void 0===n&&(n=o);var r,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ab,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},u=[],l=!1,c={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:jy(e)?$b(e):e.contextElement?$b(e.contextElement):[],popper:$b(t)};var a,l,p=function(e){var t=Nb(e);return Ay.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}((a=[].concat(i,s.options.modifiers),l=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(l).map(function(e){return l[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:c,options:i}),a=function(){};u.push(o||a)}}),c.update()},forceUpdate:function(){if(!l){var e=s.elements,t=e.reference,n=e.popper;if(Ub(t,n)){s.rects={reference:Cb(t,tb(n),"fixed"===s.options.strategy),popper:Wy(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,u=void 0===a?{}:a,d=r.name;"function"==typeof o&&(s=o({state:s,options:u,name:d,instance:c})||s)}else s.reset=!1,i=-1}}},update:(r=function(){return new Promise(function(e){c.forceUpdate(),e(s)})},function(){return a||(a=new Promise(function(e){Promise.resolve().then(function(){a=void 0,e(r())})})),a}),destroy:function(){d(),l=!0}};if(!Ub(e,t))return c;function d(){u.forEach(function(e){return e()}),u=[]}return c.setOptions(n).then(function(e){!l&&n.onFirstUpdate&&n.onFirstUpdate(e)}),c}}var jb=Pb({defaultModifiers:[db,{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=xb({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,u=void 0===s||s,l={placement:My(t.placement),variation:sb(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,lb(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:u})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,lb(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},Zy,Db,Ob,Tb,ab,{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=Ib(t,{elementContext:"reference"}),s=Ib(t,{altBoundary:!0}),u=zb(a,i),l=zb(s,r,o),c=Eb(u),d=Eb(l);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:l,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}}]}),Lb="tippy-content",Rb="tippy-arrow",Zb="tippy-svg-arrow",Mb={passive:!0,capture:!0},qb=function(){return document.body};function Bb(e,t,n){if(Array.isArray(e)){var i=e[t];return null==i?Array.isArray(n)?n[t]:n:i}return e}function Hb(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function Fb(e,t){return"function"==typeof e?e.apply(void 0,t):e}function Jb(e,t){return 0===t?e:function(i){clearTimeout(n),n=setTimeout(function(){e(i)},t)};var n}function Vb(e){return[].concat(e)}function Wb(e,t){-1===e.indexOf(t)&&e.push(t)}function Kb(e){return[].slice.call(e)}function Gb(e){return Object.keys(e).reduce(function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t},{})}function Xb(){return document.createElement("div")}function Yb(e){return["Element","Fragment"].some(function(t){return Hb(e,t)})}function Qb(e){return Yb(e)?[e]:function(e){return Hb(e,"NodeList")}(e)?Kb(e):Array.isArray(e)?e:Kb(document.querySelectorAll(e))}function e$(e,t){e.forEach(function(e){e&&(e.style.transitionDuration=t+"ms")})}function t$(e,t){e.forEach(function(e){e&&e.setAttribute("data-state",t)})}function n$(e,t,n){var i=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(t){e[i](t,n)})}function i$(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 r$={isTouch:!1},o$=0;function a$(){r$.isTouch||(r$.isTouch=!0,window.performance&&document.addEventListener("mousemove",s$))}function s$(){var e=performance.now();e-o$<20&&(r$.isTouch=!1,document.removeEventListener("mousemove",s$)),o$=e}function u$(){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 l$=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto,c$=Object.assign({appendTo:qb,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}),d$=Object.keys(c$);function p$(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=c$[r])?i:o);return t},{});return Object.assign({},e,t)}function m$(e,t){var n=Object.assign({},t,{content:Fb(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(p$(Object.assign({},c$,{plugins:t}))):d$).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({},c$.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 f$(e,t){e.innerHTML=t}function h$(e){var t=Xb();return!0===e?t.className=Rb:(t.className=Zb,Yb(e)?t.appendChild(e):f$(t,e)),t}function g$(e,t){Yb(t.content)?(f$(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?f$(e,t.content):e.textContent=t.content)}function v$(e){var t=e.firstElementChild,n=Kb(t.children);return{box:t,content:n.find(function(e){return e.classList.contains(Lb)}),arrow:n.find(function(e){return e.classList.contains(Rb)||e.classList.contains(Zb)}),backdrop:n.find(function(e){return e.classList.contains("tippy-backdrop")})}}function y$(e){var t=Xb(),n=Xb();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var i=Xb();function r(n,i){var r=v$(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||g$(a,e.props),i.arrow?s?n.arrow!==i.arrow&&(o.removeChild(s),o.appendChild(h$(i.arrow))):o.appendChild(h$(i.arrow)):s&&o.removeChild(s)}return i.className=Lb,i.setAttribute("data-state","hidden"),g$(i,e.props),t.appendChild(n),n.appendChild(i),r(e.props,e.props),{popper:t,onUpdate:r}}y$.$$tippy=!0;var b$=1,$$=[],_$=[];function k$(e,t){var n,i,r,o,a,s,u,l,c=m$(e,Object.assign({},c$,p$(Gb(t)))),d=!1,p=!1,m=!1,f=!1,h=[],g=Jb(V,c.interactiveDebounce),v=b$++,y=(l=c.plugins).filter(function(e,t){return l.indexOf(e)===t}),b={id:v,reference:e,popper:Xb(),popperInstance:null,props:c,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:y,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(i),cancelAnimationFrame(r)},setProps:function(t){if(b.state.isDestroyed)return;N("onBeforeUpdate",[b,t]),F();var n=b.props,i=m$(e,Object.assign({},n,Gb(t),{ignoreAttributes:!0}));b.props=i,H(),n.interactiveDebounce!==i.interactiveDebounce&&(P(),g=Jb(V,i.interactiveDebounce));n.triggerTarget&&!i.triggerTarget?Vb(n.triggerTarget).forEach(function(e){e.removeAttribute("aria-expanded")}):i.triggerTarget&&e.removeAttribute("aria-expanded");U(),C(),k&&k(n,i);b.popperInstance&&(X(),Q().forEach(function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)}));N("onAfterUpdate",[b,t])},setContent:function(e){b.setProps({content:e})},show:function(){var e=b.state.isVisible,t=b.state.isDestroyed,n=!b.state.isEnabled,i=r$.isTouch&&!b.props.touch,r=Bb(b.props.duration,0,c$.duration);if(e||t||n||i)return;if(z().hasAttribute("disabled"))return;if(N("onShow",[b],!1),!1===b.props.onShow(b))return;b.state.isVisible=!0,O()&&(_.style.visibility="visible");C(),Z(),b.state.isMounted||(_.style.transition="none");if(O()){var o=D();e$([o.box,o.content],0)}s=function(){var e;if(b.state.isVisible&&!f){if(f=!0,_.offsetHeight,_.style.transition=b.props.moveTransition,O()&&b.props.animation){var t=D(),n=t.box,i=t.content;e$([n,i],r),t$([n,i],"visible")}A(),U(),Wb(_$,b),null==(e=b.popperInstance)||e.forceUpdate(),N("onMount",[b]),b.props.animation&&O()&&function(e,t){q(e,t)}(r,function(){b.state.isShown=!0,N("onShown",[b])})}},function(){var e,t=b.props.appendTo,n=z();e=b.props.interactive&&t===qb||"parent"===t?n.parentNode:Fb(t,[n]);e.contains(_)||e.appendChild(_);b.state.isMounted=!0,X()}()},hide:function(){var e=!b.state.isVisible,t=b.state.isDestroyed,n=!b.state.isEnabled,i=Bb(b.props.duration,1,c$.duration);if(e||t||n)return;if(N("onHide",[b],!1),!1===b.props.onHide(b))return;b.state.isVisible=!1,b.state.isShown=!1,f=!1,d=!1,O()&&(_.style.visibility="hidden");if(P(),M(),C(!0),O()){var r=D(),o=r.box,a=r.content;b.props.animation&&(e$([o,a],i),t$([o,a],"hidden"))}A(),U(),b.props.animation?O()&&function(e,t){q(e,function(){!b.state.isVisible&&_.parentNode&&_.parentNode.contains(_)&&t()})}(i,b.unmount):b.unmount()},hideWithInteractivity:function(e){E().addEventListener("mousemove",g),Wb($$,g),g(e)},enable:function(){b.state.isEnabled=!0},disable:function(){b.hide(),b.state.isEnabled=!1},unmount:function(){b.state.isVisible&&b.hide();if(!b.state.isMounted)return;Y(),Q().forEach(function(e){e._tippy.unmount()}),_.parentNode&&_.parentNode.removeChild(_);_$=_$.filter(function(e){return e!==b}),b.state.isMounted=!1,N("onHidden",[b])},destroy:function(){if(b.state.isDestroyed)return;b.clearDelayTimeouts(),b.unmount(),F(),delete e._tippy,b.state.isDestroyed=!0,N("onDestroy",[b])}};if(!c.render)return b;var $=c.render(b),_=$.popper,k=$.onUpdate;_.setAttribute("data-tippy-root",""),_.id="tippy-"+b.id,b.popper=_,e._tippy=b,_._tippy=b;var w=y.map(function(e){return e.fn(b)}),x=e.hasAttribute("aria-expanded");return H(),U(),C(),N("onCreate",[b]),c.showOnCreate&&ee(),_.addEventListener("mouseenter",function(){b.props.interactive&&b.state.isVisible&&b.clearDelayTimeouts()}),_.addEventListener("mouseleave",function(){b.props.interactive&&b.props.trigger.indexOf("mouseenter")>=0&&E().addEventListener("mousemove",g)}),b;function I(){var e=b.props.touch;return Array.isArray(e)?e:[e,0]}function S(){return"hold"===I()[0]}function O(){var e;return!(null==(e=b.props.render)||!e.$$tippy)}function z(){return u||e}function E(){var e=z().parentNode;return e?function(e){var t,n=Vb(e)[0];return null!=n&&null!=(t=n.ownerDocument)&&t.body?n.ownerDocument:document}(e):document}function D(){return v$(_)}function T(e){return b.state.isMounted&&!b.state.isVisible||r$.isTouch||o&&"focus"===o.type?0:Bb(b.props.delay,e?0:1,c$.delay)}function C(e){void 0===e&&(e=!1),_.style.pointerEvents=b.props.interactive&&!e?"":"none",_.style.zIndex=""+b.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=b.props)[e].apply(i,t)}function A(){var t=b.props.aria;if(t.content){var n="aria-"+t.content,i=_.id;Vb(b.props.triggerTarget||e).forEach(function(e){var t=e.getAttribute(n);if(b.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 U(){!x&&b.props.aria.expanded&&Vb(b.props.triggerTarget||e).forEach(function(e){b.props.interactive?e.setAttribute("aria-expanded",b.state.isVisible&&e===z()?"true":"false"):e.removeAttribute("aria-expanded")})}function P(){E().removeEventListener("mousemove",g),$$=$$.filter(function(e){return e!==g})}function j(t){if(!r$.isTouch||!m&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!b.props.interactive||!i$(_,n)){if(Vb(b.props.triggerTarget||e).some(function(e){return i$(e,n)})){if(r$.isTouch)return;if(b.state.isVisible&&b.props.trigger.indexOf("click")>=0)return}else N("onClickOutside",[b,t]);!0===b.props.hideOnClick&&(b.clearDelayTimeouts(),b.hide(),p=!0,setTimeout(function(){p=!1}),b.state.isMounted||M())}}}function L(){m=!0}function R(){m=!1}function Z(){var e=E();e.addEventListener("mousedown",j,!0),e.addEventListener("touchend",j,Mb),e.addEventListener("touchstart",R,Mb),e.addEventListener("touchmove",L,Mb)}function M(){var e=E();e.removeEventListener("mousedown",j,!0),e.removeEventListener("touchend",j,Mb),e.removeEventListener("touchstart",R,Mb),e.removeEventListener("touchmove",L,Mb)}function q(e,t){var n=D().box;function i(e){e.target===n&&(n$(n,"remove",i),t())}if(0===e)return t();n$(n,"remove",a),n$(n,"add",i),a=i}function B(t,n,i){void 0===i&&(i=!1),Vb(b.props.triggerTarget||e).forEach(function(e){e.addEventListener(t,n,i),h.push({node:e,eventType:t,handler:n,options:i})})}function H(){var e;S()&&(B("touchstart",J,{passive:!0}),B("touchend",W,{passive:!0})),(e=b.props.trigger,e.split(/\s+/).filter(Boolean)).forEach(function(e){if("manual"!==e)switch(B(e,J),e){case"mouseenter":B("mouseleave",W);break;case"focus":B(l$?"focusout":"blur",K);break;case"focusin":B("focusout",K)}})}function F(){h.forEach(function(e){var t=e.node,n=e.eventType,i=e.handler,r=e.options;t.removeEventListener(n,i,r)}),h=[]}function J(e){var t,n=!1;if(b.state.isEnabled&&!G(e)&&!p){var i="focus"===(null==(t=o)?void 0:t.type);o=e,u=e.currentTarget,U(),!b.state.isVisible&&Hb(e,"MouseEvent")&&$$.forEach(function(t){return t(e)}),"click"===e.type&&(b.props.trigger.indexOf("mouseenter")<0||d)&&!1!==b.props.hideOnClick&&b.state.isVisible?n=!0:ee(e),"click"===e.type&&(d=!n),n&&!i&&te(e)}}function V(e){var t=e.target,n=z().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:c}: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 u="bottom"===a?s.top.y:0,l="top"===a?s.bottom.y:0,c="right"===a?s.left.x:0,d="left"===a?s.right.x:0,p=t.top-i+u>o,m=i-t.bottom-l>o,f=t.left-n+c>o,h=n-t.right-d>o;return p||m||f||h})})(i,e)&&(P(),te(e))}}function W(e){G(e)||b.props.trigger.indexOf("click")>=0&&d||(b.props.interactive?b.hideWithInteractivity(e):te(e))}function K(e){b.props.trigger.indexOf("focusin")<0&&e.target!==z()||b.props.interactive&&e.relatedTarget&&_.contains(e.relatedTarget)||te(e)}function G(e){return!!r$.isTouch&&S()!==e.type.indexOf("touch")>=0}function X(){Y();var t=b.props,n=t.popperOptions,i=t.placement,r=t.offset,o=t.getReferenceClientRect,a=t.moveTransition,u=O()?v$(_).arrow:null,l=o?{getBoundingClientRect:o,contextElement:o.contextElement||z()}:e,c={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(O()){var n=D().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}},c];O()&&u&&d.push({name:"arrow",options:{element:u,padding:3}}),d.push.apply(d,(null==n?void 0:n.modifiers)||[]),b.popperInstance=jb(l,_,Object.assign({},n,{placement:i,onFirstUpdate:s,modifiers:d}))}function Y(){b.popperInstance&&(b.popperInstance.destroy(),b.popperInstance=null)}function Q(){return Kb(_.querySelectorAll("[data-tippy-root]"))}function ee(e){b.clearDelayTimeouts(),e&&N("onTrigger",[b,e]),Z();var t=T(!0),i=I(),r=i[0],o=i[1];r$.isTouch&&"hold"===r&&o&&(t=o),t?n=setTimeout(function(){b.show()},t):b.show()}function te(e){if(b.clearDelayTimeouts(),N("onUntrigger",[b,e]),b.state.isVisible){if(!(b.props.trigger.indexOf("mouseenter")>=0&&b.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&d)){var t=T(!1);t?i=setTimeout(function(){b.state.isVisible&&b.hide()},t):r=requestAnimationFrame(function(){b.hide()})}}else M()}}function w$(e,t){void 0===t&&(t={});var n=c$.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",a$,Mb),window.addEventListener("blur",u$);var i=Object.assign({},t,{plugins:n}),r=Qb(e).reduce(function(e,t){var n=t&&k$(t,i);return n&&e.push(n),e},[]);return Yb(e)?r[0]:r}w$.defaultProps=c$,w$.setDefaultProps=function(e){Object.keys(e).forEach(function(t){c$[t]=e[t]})},w$.currentInput=r$,Object.assign({},Zy,{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)}}),w$.setDefaultProps({render:y$});const x$=e=>({}),I$=e=>({trigger:e[2]}),S$=e=>({}),O$=e=>({trigger:e[2]});function z$(e){let t,n,i;const r=e[6].default,o=eh(r,e,e[5],O$),a=e[6].content,s=eh(a,e,e[5],I$),u=s||function(e){let t;return{c(){t=fh(e[0])},m(e,n){lh(e,t,n)},p(e,n){1&n&&_h(t,e[0])},d(e){e&&ch(t)}}}(e);return{c(){o&&o.c(),t=hh(),n=ph("div"),u&&u.c(),wh(n,"display","none")},m(r,a){o&&o.m(r,a),lh(r,t,a),lh(r,n,a),u&&u.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,S$):rh(e[5]),O$),s?s.p&&(!i||32&t)&&ih(s,a,e,e[5],i?nh(a,e[5],t,x$):rh(e[5]),I$):u&&u.p&&(!i||1&t)&&u.p(e,i?t:-1)},i(e){i||(Vh(o,e),Vh(u,e),i=!0)},o(e){Wh(o,e),Wh(u,e),i=!1},d(i){o&&o.d(i),i&&ch(t),i&&ch(n),u&&u.d(i),e[7](null)}}}function E$(e,t,n){const i=["text","disabled"];let r,o,a,s=oh(t,i),{$$slots:u={},$$scope:l}=t,{text:c=""}=t,{disabled:d=!1}=t;return Dh(()=>{r&&(n(4,a=w$(r,{...s,content:o})),o.style.removeProperty("display"))}),e.$$set=e=>{t=Vf(Vf({},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,c=e.text),"disabled"in e&&n(3,d=e.disabled),"$$scope"in e&&n(5,l=e.$$scope)},e.$$.update=()=>{24&e.$$.dirty&&a&&(d?a.disable():a.enable())},[c,o,e=>{r=e},d,a,l,u,function(e){Ch[e?"unshift":"push"](()=>{o=e,n(1,o)})}]}class D$ extends tg{constructor(e){super(),eg(this,e,E$,z$,Yf,{text:0,disabled:3})}}function T$(e){uh(e,"svelte-wb18kg","svg.svelte-wb18kg{opacity:var(--tooltip-opacity, 1);color:var(--text-color)}")}function C$(e){let t,n,i,r;return{c(){t=mh("svg"),n=mh("path"),yh(n,"fill","currentColor"),yh(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"),yh(t,"class","tooltip svelte-wb18kg"),wh(t,"width","1rem"),wh(t,"height","1rem"),yh(t,"viewBox","0 0 24 24")},m(o,a){lh(o,t,a),sh(t,n),i||(r=ah(e[9].call(null,t)),i=!0)},p:Jf,d(e){e&&ch(t),i=!1,r()}}}function N$(e){let t,n,i,r;return{c(){t=ph("br"),n=hh(),i=ph("a"),r=fh("Read more."),yh(i,"href",e[0]),yh(i,"target",e[3]?void 0:"_blank"),yh(i,"rel",e[3]?void 0:"noopener noreferrer")},m(e,o){lh(e,t,o),lh(e,n,o),lh(e,i,o),sh(i,r)},p(e,t){1&t&&yh(i,"href",e[0])},d(e){e&&ch(t),e&&ch(n),e&&ch(i)}}}function A$(e){let t,n,i;const r=e[6].default,o=eh(r,e,e[7],null);let a=e[2]&&N$(e);return{c(){t=ph("div"),o&&o.c(),n=hh(),a&&a.c(),yh(t,"slot","content")},m(e,r){lh(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=N$(e),a.c(),a.m(t,null)):a&&(a.d(1),a=null)},i(e){i||(Vh(o,e),i=!0)},o(e){Wh(o,e),i=!1},d(e){e&&ch(t),o&&o.d(e),a&&a.d()}}}function U$(e){let t,n;return t=new D$({props:{interactive:!0,placement:e[1],theme:"light border",maxWidth:"22em",$$slots:{content:[A$,({trigger:e})=>({9:e}),({trigger:e})=>e?512:0],default:[C$,({trigger:e})=>({9:e}),({trigger:e})=>e?512:0]},$$scope:{ctx:e}}}),{c(){Gh(t.$$.fragment)},m(e,i){Xh(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||(Vh(t.$$.fragment,e),n=!0)},o(e){Wh(t.$$.fragment,e),n=!1},d(e){Yh(t,e)}}}function P$(e,t,n){let i,r,{$$slots:o={},$$scope:a}=t,{link:s}=t,{placement:u="right"}=t;const l=(c=cg,Eh().$$.context.get(c));var c;const d=null!=l,p=l??function(e,t){return{subscribe:ig(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,u=e.placement),"$$scope"in e&&n(7,a=e.$$scope)},e.$$.update=()=>{33&e.$$.dirty&&n(2,i=null!=s&&(!d||r.canOpen))},[s,u,i,d,p,r,o,a]}class j$ extends tg{constructor(e){super(),eg(this,e,P$,U$,Yf,{link:0,placement:1},T$)}}const L$="has-error";function R$(e,t){const n=w$(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(L$)):(n.hide(),e.classList.remove(L$))}return i(t),{update:i,destroy:n.destroy}}function Z$(e){let t,n,i;return{c(){t=ph("input"),yh(t,"type","checkbox"),t.disabled=e[1]},m(r,o){lh(r,t,o),t.checked=e[0],n||(i=vh(t,"change",e[6]),n=!0)},p(e,[n]){2&n&&(t.disabled=e[1]),1&n&&(t.checked=e[0])},i:Jf,o:Jf,d(e){e&&ch(t),n=!1,i()}}}function M$(e,t,n){let{value:i=!1}=t,{checked:r=!1!==i}=t,{defaultValue:o}=t,{disabled:a}=t,s=r,u=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=u):!1!==i&&n(0,r=!0),n(4,s=r),n(5,u=i||u))},[r,a,i,o,s,u,function(){r=this.checked,n(0,r),n(4,s),n(5,u),n(2,i)}]}class q$ extends tg{constructor(e){super(),eg(this,e,M$,Z$,Yf,{value:2,checked:0,defaultValue:3,disabled:1})}}function B$(e){let t,n;return{c(){t=mh("svg"),n=mh("path"),yh(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"),yh(t,"class","keepcolor"),yh(t,"width","9"),yh(t,"height","9"),yh(t,"xmlns","http://www.w3.org/2000/svg"),yh(t,"viewBox","0 0 320 512")},m(e,i){lh(e,t,i),sh(t,n)},p:Jf,i:Jf,o:Jf,d(e){e&&ch(t)}}}class H$ extends tg{constructor(e){super(),eg(this,e,null,B$,Yf,{})}}function F$(e){let t,n;return{c(){t=mh("svg"),n=mh("path"),yh(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"),yh(t,"class","keepcolor"),yh(t,"width","9"),yh(t,"height","9"),yh(t,"xmlns","http://www.w3.org/2000/svg"),yh(t,"viewBox","0 0 512 512")},m(e,i){lh(e,t,i),sh(t,n)},p:Jf,i:Jf,o:Jf,d(e){e&&ch(t)}}}class J$ extends tg{constructor(e){super(),eg(this,e,null,F$,Yf,{})}}function V$(e){let t,n,i,r;const o=[K$,W$],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=ph("span"),i&&i.c(),yh(t,"class","mr-2")},m(e,i){lh(e,t,i),~n&&a[n].m(t,null),r=!0},p(e,r){let u=n;n=s(e),n===u?~n&&a[n].p(e,r):(i&&(Fh(),Wh(a[u],1,1,()=>{a[u]=null}),Jh()),~n?(i=a[n],i?i.p(e,r):(i=a[n]=o[n](e),i.c()),Vh(i,1),i.m(t,null)):i=null)},i(e){r||(Vh(i),r=!0)},o(e){Wh(i),r=!1},d(e){e&&ch(t),~n&&a[n].d()}}}function W$(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 q$({props:o}),Ch.push(()=>Kh(t,"value",r)),{c(){Gh(t.$$.fragment)},m(e,n){Xh(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],Lh(()=>n=!1)),t.$set(r)},i(e){i||(Vh(t.$$.fragment,e),i=!0)},o(e){Wh(t.$$.fragment,e),i=!1},d(e){Yh(t,e)}}}function K$(e){let t,n,i,r;return{c(){t=ph("input"),yh(t,"type","checkbox"),t.disabled=n=e[7]||e[9]},m(n,o){lh(n,t,o),t.checked=e[0],i||(r=vh(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:Jf,o:Jf,d(e){e&&ch(t),i=!1,r()}}}function G$(e){let t,n;return t=new H$({}),{c(){Gh(t.$$.fragment)},m(e,i){Xh(t,e,i),n=!0},i(e){n||(Vh(t.$$.fragment,e),n=!0)},o(e){Wh(t.$$.fragment,e),n=!1},d(e){Yh(t,e)}}}function X$(e){let t,n;return t=new J$({}),{c(){Gh(t.$$.fragment)},m(e,i){Xh(t,e,i),n=!0},i(e){n||(Vh(t.$$.fragment,e),n=!0)},o(e){Wh(t.$$.fragment,e),n=!1},d(e){Yh(t,e)}}}function Y$(e){let t,n;return{c(){t=new Ih(!1),n=gh(),t.a=n},m(i,r){t.m(e[5],i,r),lh(i,n,r)},p(e,n){32&n&&t.p(e[5])},d(e){e&&ch(n),e&&t.d()}}}function Q$(e){let t,n,i,r,o,a,s,u,l,c,d,p,m,f,h,g,v,y,b,$,_,k,w,x,I,S="section"!==e[3]&&V$(e);const O=[X$,G$],z=[];function E(e,t){return e[10]?0:1}d=E(e),p=z[d]=O[d](e),h=new j$({props:{link:e[6],$$slots:{default:[Y$]},$$scope:{ctx:e}}});const D=e[17].default,T=eh(D,e,e[20],null);return{c(){t=ph("section"),n=ph("h1"),i=ph("label"),r=ph("div"),S&&S.c(),o=hh(),a=ph("span"),s=fh(e[2]),u=hh(),l=ph("div"),c=ph("button"),p.c(),f=hh(),Gh(h.$$.fragment),g=hh(),v=ph("div"),y=ph("span"),$=hh(),_=ph("div"),T&&T.c(),yh(r,"class","flex items-center"),yh(c,"class","px-1 bg-transparent border-0 mr-2"),yh(c,"aria-label",m=e[10]?"Collapse section":"Expand section"),yh(l,"class","flex items-center"),yh(i,"class","items-center tooltip-container pr-2 flex justify-between"),yh(y,"class","italic"),yh(v,"class","text-sm text-gray-500"),v.hidden=b=!e[7]||void 0===e[8],_.hidden=k=!e[10],yh(t,"class","controls-section")},m(p,m){var b;lh(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,u),sh(i,l),sh(l,c),z[d].m(c,null),sh(l,f),Xh(h,l,null),sh(t,g),sh(t,v),sh(v,y),y.innerHTML=e[8],sh(t,$),sh(t,_),T&&T.m(_,null),w=!0,x||(I=vh(c,"click",(b=e[11],function(e){return e.preventDefault(),b.call(this,e)})),x=!0)},p(e,[t]){"section"!==e[3]?S?(S.p(e,t),8&t&&Vh(S,1)):(S=V$(e),S.c(),Vh(S,1),S.m(r,o)):S&&(Fh(),Wh(S,1,1,()=>{S=null}),Jh()),(!w||4&t)&&_h(s,e[2]);let n=d;d=E(e),d!==n&&(Fh(),Wh(z[n],1,1,()=>{z[n]=null}),Jh(),p=z[d],p||(p=z[d]=O[d](e),p.c()),Vh(p,1),p.m(c,null)),(!w||1024&t&&m!==(m=e[10]?"Collapse section":"Expand section"))&&yh(c,"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)&&(y.innerHTML=e[8]),(!w||384&t&&b!==(b=!e[7]||void 0===e[8]))&&(v.hidden=b),T&&T.p&&(!w||1048576&t)&&ih(T,D,e,e[20],w?nh(D,e[20],t,null):rh(e[20]),null),(!w||1024&t&&k!==(k=!e[10]))&&(_.hidden=k)},i(e){w||(Vh(S),Vh(p),Vh(h.$$.fragment,e),Vh(T,e),w=!0)},o(e){Wh(S),Wh(p),Wh(h.$$.fragment,e),Wh(T,e),w=!1},d(e){e&&ch(t),S&&S.d(),z[d].d(),Yh(h),T&&T.d(e),x=!1,I()}}}function e_(e,t,n){let i,r,{$$slots:o={},$$scope:a}=t,{label:s}=t,{type:u}=t,{checkboxChecked:l}=t,{toggleRadioValue:c}=t,{toggleRadioDefaultValue:d}=t,{helpContent:p}=t,{helpLink:m}=t,{disabled:f}=t,{disabledReason:h}=t,{required:g}=t,{error:v}=t,y=!1,b=g,$=r;return e.$$set=e=>{"label"in e&&n(2,s=e.label),"type"in e&&n(3,u=e.type),"checkboxChecked"in e&&n(0,l=e.checkboxChecked),"toggleRadioValue"in e&&n(1,c=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=!(!l&&!c)),123392&e.$$.dirty&&((i||!$&&r||!b&&g)&&n(10,y=!0),n(13,b=g),n(14,$=r))},[l,c,s,u,d,p,m,f,h,g,y,function(){n(10,y=!y||i)},v,b,$,r,i,o,function(){l=this.checked,n(0,l)},function(e){c=e,n(1,c)},a]}class t_ extends tg{constructor(e){super(),eg(this,e,e_,Q$,Yf,{label:2,type:3,checkboxChecked:0,toggleRadioValue:1,toggleRadioDefaultValue:4,helpContent:5,helpLink:6,disabled:7,disabledReason:8,required:9,error:12})}}function n_(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||(Vh(i,e),t=!0)},o(e){Wh(i,e),t=!1},d(e){i&&i.d(e)}}}function i_(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:[n_]},$$scope:{ctx:e}};return void 0!==e[0]&&(o.toggleRadioValue=e[0]),t=new t_({props:o}),Ch.push(()=>Kh(t,"toggleRadioValue",r)),{c(){Gh(t.$$.fragment)},m(e,n){Xh(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],Lh(()=>n=!1)),t.$set(r)},i(e){i||(Vh(t.$$.fragment,e),i=!0)},o(e){Wh(t.$$.fragment,e),i=!1},d(e){Yh(t,e)}}}function r_(e,t,n){let{$$slots:i={},$$scope:r}=t,{label:o}=t,{value:a}=t,{defaultValue:s}=t,{helpContent:u}=t,{helpLink:l}=t,{disabled:c=!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,u=e.helpContent),"helpLink"in e&&n(4,l=e.helpLink),"disabled"in e&&n(5,c=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,u,l,c,d,p,m,i,function(e){a=e,n(0,a)},r]}class o_ extends tg{constructor(e){super(),eg(this,e,r_,i_,Yf,{label:1,value:0,defaultValue:2,helpContent:3,helpLink:4,disabled:5,disabledReason:6,required:7,error:8})}}function a_(e){let t;return{c(){t=fh("Simple mechanism with a single account authorized for all privileged actions.")},m(e,n){lh(e,t,n)},d(e){e&&ch(t)}}}function s_(e){let t;return{c(){t=fh("Flexible mechanism with a separate role for each privileged action. A role can have many authorized accounts.")},m(e,n){lh(e,t,n)},d(e){e&&ch(t)}}}function u_(e){let t;return{c(){t=fh("Enables a central contract to define a policy that allows certain callers to access certain functions.")},m(e,n){lh(e,t,n)},d(e){e&&ch(t)}}}function l_(e){let t,n,i,r,o,a,s,u,l,c,d,p,m,f,h,g,v,y,b;return o=new j$({props:{link:"https://docs.openzeppelin.com/contracts/5.x/api/access#Ownable",$$slots:{default:[a_]},$$scope:{ctx:e}}}),c=new j$({props:{link:"https://docs.openzeppelin.com/contracts/5.x/api/access#AccessControl",$$slots:{default:[s_]},$$scope:{ctx:e}}}),h=new j$({props:{link:"https://docs.openzeppelin.com/contracts/5.x/api/access#AccessManaged",$$slots:{default:[u_]},$$scope:{ctx:e}}}),v=bh(e[6][0]),{c(){t=ph("div"),n=ph("label"),i=ph("input"),r=fh("\n Ownable\n "),Gh(o.$$.fragment),a=hh(),s=ph("label"),u=ph("input"),l=fh("\n Roles\n "),Gh(c.$$.fragment),d=hh(),p=ph("label"),m=ph("input"),f=fh("\n Managed\n "),Gh(h.$$.fragment),yh(i,"type","radio"),i.__value="ownable",i.value=i.__value,xh(n,"checked","ownable"===e[0]),yh(u,"type","radio"),u.__value="roles",u.value=u.__value,xh(s,"checked","roles"===e[0]),yh(m,"type","radio"),m.__value="managed",m.value=m.__value,xh(p,"checked","managed"===e[0]),yh(t,"class","checkbox-group"),v.p(i,u,m)},m(v,$){lh(v,t,$),sh(t,n),sh(n,i),i.checked=i.__value===e[0],sh(n,r),Xh(o,n,null),sh(t,a),sh(t,s),sh(s,u),u.checked=u.__value===e[0],sh(s,l),Xh(c,s,null),sh(t,d),sh(t,p),sh(p,m),m.checked=m.__value===e[0],sh(p,f),Xh(h,p,null),g=!0,y||(b=[vh(i,"change",e[5]),vh(u,"change",e[7]),vh(m,"change",e[8])],y=!0)},p(e,t){1&t&&(i.checked=i.__value===e[0]);const r={};1024&t&&(r.$$scope={dirty:t,ctx:e}),o.$set(r),(!g||1&t)&&xh(n,"checked","ownable"===e[0]),1&t&&(u.checked=u.__value===e[0]);const a={};1024&t&&(a.$$scope={dirty:t,ctx:e}),c.$set(a),(!g||1&t)&&xh(s,"checked","roles"===e[0]),1&t&&(m.checked=m.__value===e[0]);const l={};1024&t&&(l.$$scope={dirty:t,ctx:e}),h.$set(l),(!g||1&t)&&xh(p,"checked","managed"===e[0])},i(e){g||(Vh(o.$$.fragment,e),Vh(c.$$.fragment,e),Vh(h.$$.fragment,e),g=!0)},o(e){Wh(o.$$.fragment,e),Wh(c.$$.fragment,e),Wh(h.$$.fragment,e),g=!1},d(e){e&&ch(t),Yh(o),Yh(c),Yh(h),v.r(),y=!1,Gf(b)}}}function c_(e){let t,n,i;function r(t){e[9](t)}let o={label:"Access Control",defaultValue:"ownable",helpContent:"Restrict who can access the functions of a contract or when they can do it.",helpLink:"https://docs.openzeppelin.com/contracts/5.x/api/access",required:e[1],$$slots:{default:[l_]},$$scope:{ctx:e}};return void 0!==e[0]&&(o.value=e[0]),t=new o_({props:o}),Ch.push(()=>Kh(t,"value",r)),{c(){Gh(t.$$.fragment)},m(e,n){Xh(t,e,n),i=!0},p(e,[i]){const r={};2&i&&(r.required=e[1]),1025&i&&(r.$$scope={dirty:i,ctx:e}),!n&&1&i&&(n=!0,r.value=e[0],Lh(()=>n=!1)),t.$set(r)},i(e){i||(Vh(t.$$.fragment,e),i=!0)},o(e){Wh(t.$$.fragment,e),i=!1},d(e){Yh(t,e)}}}function d_(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(){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 p_ extends tg{constructor(e){super(),eg(this,e,d_,c_,Yf,{access:0,required:1})}}function m_(e){let t;return{c(){t=fh("Where people can contact you to report security issues. Will only be visible if contract metadata is verified.")},m(e,n){lh(e,t,n)},d(e){e&&ch(t)}}}function f_(e){let t,n,i,r,o,a,s,u,l,c,d,p,m,f,h,g,v,y,b;return s=new j$({props:{link:"https://github.com/ethereum-lists/contracts/blob/main/README.md#tracking-new-deployments",$$slots:{default:[m_]},$$scope:{ctx:e}}}),{c(){t=ph("section"),n=ph("h1"),n.innerHTML='<label class="flex items-center tooltip-container pr-2"><span>Info</span></label>',i=hh(),r=ph("label"),o=ph("span"),a=fh("Security Contact\n "),Gh(s.$$.fragment),u=hh(),l=ph("input"),d=hh(),p=ph("label"),m=ph("span"),m.textContent="License",f=hh(),h=ph("input"),yh(o,"class","flex justify-between pr-2"),yh(l,"placeholder","security@example.com"),yh(r,"class","labeled-input"),yh(h,"placeholder",Wg.license),yh(p,"class","labeled-input"),yh(t,"class","controls-section")},m($,_){lh($,t,_),sh(t,n),sh(t,i),sh(t,r),sh(r,o),sh(o,a),Xh(s,o,null),sh(r,u),sh(r,l),kh(l,e[0].securityContact),sh(t,d),sh(t,p),sh(p,m),sh(p,f),sh(p,h),kh(h,e[0].license),v=!0,y||(b=[vh(l,"input",e[2]),ah(c=R$.call(null,l,e[1]?.securityContact)),vh(h,"input",e[3]),ah(g=R$.call(null,h,e[1]?.license))],y=!0)},p(e,[t]){const n={};16&t&&(n.$$scope={dirty:t,ctx:e}),s.$set(n),1&t&&l.value!==e[0].securityContact&&kh(l,e[0].securityContact),c&&Xf(c.update)&&2&t&&c.update.call(null,e[1]?.securityContact),1&t&&h.value!==e[0].license&&kh(h,e[0].license),g&&Xf(g.update)&&2&t&&g.update.call(null,e[1]?.license)},i(e){v||(Vh(s.$$.fragment,e),v=!0)},o(e){Wh(s.$$.fragment,e),v=!1},d(e){e&&ch(t),Yh(s),y=!1,Gf(b)}}}function h_(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 g_ extends tg{constructor(e){super(),eg(this,e,h_,f_,Yf,{info:0,errors:1})}}function v_(e){let t;const n=e[8].default,i=eh(n,e,e[10],null);return{c(){i&&i.c()},m(e,n){i&&i.m(e,n),t=!0},p(e,r){i&&i.p&&(!t||1024&r)&&ih(i,n,e,e[10],t?nh(n,e[10],r,null):rh(e[10]),null)},i(e){t||(Vh(i,e),t=!0)},o(e){Wh(i,e),t=!1},d(e){i&&i.d(e)}}}function y_(e){let t,n,i;function r(t){e[9](t)}let o={type:"section",label:e[1],helpContent:e[2],helpLink:e[3],disabled:e[4],disabledReason:e[5],required:e[6],error:e[7],$$slots:{default:[v_]},$$scope:{ctx:e}};return void 0!==e[0]&&(o.checkboxChecked=e[0]),t=new t_({props:o}),Ch.push(()=>Kh(t,"checkboxChecked",r)),{c(){Gh(t.$$.fragment)},m(e,n){Xh(t,e,n),i=!0},p(e,[i]){const r={};2&i&&(r.label=e[1]),4&i&&(r.helpContent=e[2]),8&i&&(r.helpLink=e[3]),16&i&&(r.disabled=e[4]),32&i&&(r.disabledReason=e[5]),64&i&&(r.required=e[6]),128&i&&(r.error=e[7]),1024&i&&(r.$$scope={dirty:i,ctx:e}),!n&&1&i&&(n=!0,r.checkboxChecked=e[0],Lh(()=>n=!1)),t.$set(r)},i(e){i||(Vh(t.$$.fragment,e),i=!0)},o(e){Wh(t.$$.fragment,e),i=!1},d(e){Yh(t,e)}}}function b_(e,t,n){let{$$slots:i={},$$scope:r}=t,{label:o}=t,{checked:a}=t,{helpContent:s}=t,{helpLink:u}=t,{disabled:l=!1}=t,{disabledReason:c}=t,{required:d=!1}=t,{error:p}=t;return e.$$set=e=>{"label"in e&&n(1,o=e.label),"checked"in e&&n(0,a=e.checked),"helpContent"in e&&n(2,s=e.helpContent),"helpLink"in e&&n(3,u=e.helpLink),"disabled"in e&&n(4,l=e.disabled),"disabledReason"in e&&n(5,c=e.disabledReason),"required"in e&&n(6,d=e.required),"error"in e&&n(7,p=e.error),"$$scope"in e&&n(10,r=e.$$scope)},[a,o,s,u,l,c,d,p,i,function(e){a=e,n(0,a)},r]}class $_ extends tg{constructor(e){super(),eg(this,e,b_,y_,Yf,{label:1,checked:0,helpContent:2,helpLink:3,disabled:4,disabledReason:5,required:6,error:7})}}function __(e){let t;return{c(){t=fh("ERC-20 shares are useful for single-token accounting.")},m(e,n){lh(e,t,n)},d(e){e&&ch(t)}}}function k_(e){let t;return{c(){t=fh("ERC-1155 shares are useful for multi-token accounting.")},m(e,n){lh(e,t,n)},d(e){e&&ch(t)}}}function w_(e){let t;return{c(){t=fh("ERC-6909 shares are useful for optimized multi-token accounting.")},m(e,n){lh(e,t,n)},d(e){e&&ch(t)}}}function x_(e){let t,n,i,r,o,a;return{c(){t=ph("label"),n=ph("span"),n.textContent="URI",i=hh(),r=ph("input"),yh(t,"class","labeled-input")},m(s,u){lh(s,t,u),sh(t,n),sh(t,i),sh(t,r),kh(r,e[0].shares.uri),o||(a=vh(r,"input",e[11]),o=!0)},p(e,t){1&t&&r.value!==e[0].shares.uri&&kh(r,e[0].shares.uri)},d(e){e&&ch(t),o=!1,a()}}}function I_(e){let t,n,i,r,o,a,s,u,l,c,d,p;return{c(){t=ph("div"),n=ph("label"),i=ph("span"),i.textContent="Name",r=hh(),o=ph("input"),a=hh(),s=ph("label"),u=ph("span"),u.textContent="Symbol",l=hh(),c=ph("input"),yh(n,"class","labeled-input"),yh(s,"class","labeled-input"),yh(t,"class","grid grid-cols-[2fr,1fr] gap-2")},m(m,f){lh(m,t,f),sh(t,n),sh(n,i),sh(n,r),sh(n,o),kh(o,e[0].shares.name),sh(t,a),sh(t,s),sh(s,u),sh(s,l),sh(s,c),kh(c,e[0].shares.symbol),d||(p=[vh(o,"input",e[12]),vh(c,"input",e[13])],d=!0)},p(e,t){1&t&&o.value!==e[0].shares.name&&kh(o,e[0].shares.name),1&t&&c.value!==e[0].shares.symbol&&kh(c,e[0].shares.symbol)},d(e){e&&ch(t),d=!1,Gf(p)}}}function S_(e){let t,n,i,r,o,a,s,u,l,c,d,p,m,f,h,g,v,y,b,$,_,k,w,x;o=new j$({props:{link:"https://docs.openzeppelin.com/contracts/5.x/api/token/erc20",$$slots:{default:[__]},$$scope:{ctx:e}}}),c=new j$({props:{link:"https://docs.openzeppelin.com/contracts/5.x/api/token/erc1155",$$slots:{default:[k_]},$$scope:{ctx:e}}}),h=new j$({props:{link:"https://docs.openzeppelin.com/contracts/5.x/api/token/erc6909",$$slots:{default:[w_]},$$scope:{ctx:e}}});let I="ERC1155"===e[0].shares.options&&x_(e),S="ERC20"===e[0].shares.options&&I_(e);return k=bh(e[8][0]),{c(){t=ph("div"),n=ph("label"),i=ph("input"),r=fh("\n ERC-20\n "),Gh(o.$$.fragment),a=hh(),s=ph("label"),u=ph("input"),l=fh("\n ERC-1155\n "),Gh(c.$$.fragment),d=hh(),p=ph("label"),m=ph("input"),f=fh("\n ERC-6909\n "),Gh(h.$$.fragment),g=hh(),v=ph("div"),y=hh(),I&&I.c(),b=hh(),S&&S.c(),$=gh(),yh(i,"type","radio"),i.__value="ERC20",i.value=i.__value,i.disabled=e[3],xh(n,"checked","ERC20"===e[0].shares.options),yh(u,"type","radio"),u.__value="ERC1155",u.value=u.__value,u.disabled=e[2],xh(s,"checked","ERC1155"===e[0].shares.options),yh(m,"type","radio"),m.__value="ERC6909",m.value=m.__value,m.disabled=e[1],xh(p,"checked","ERC6909"===e[0].shares.options),yh(t,"class","checkbox-group"),wh(v,"height","0.5rem"),k.p(i,u,m)},m(k,O){lh(k,t,O),sh(t,n),sh(n,i),i.checked=i.__value===e[0].shares.options,sh(n,r),Xh(o,n,null),sh(t,a),sh(t,s),sh(s,u),u.checked=u.__value===e[0].shares.options,sh(s,l),Xh(c,s,null),sh(t,d),sh(t,p),sh(p,m),m.checked=m.__value===e[0].shares.options,sh(p,f),Xh(h,p,null),lh(k,g,O),lh(k,v,O),lh(k,y,O),I&&I.m(k,O),lh(k,b,O),S&&S.m(k,O),lh(k,$,O),_=!0,w||(x=[vh(i,"change",e[7]),vh(u,"change",e[9]),vh(m,"change",e[10])],w=!0)},p(e,t){(!_||8&t)&&(i.disabled=e[3]),1&t&&(i.checked=i.__value===e[0].shares.options);const r={};32768&t&&(r.$$scope={dirty:t,ctx:e}),o.$set(r),(!_||1&t)&&xh(n,"checked","ERC20"===e[0].shares.options),(!_||4&t)&&(u.disabled=e[2]),1&t&&(u.checked=u.__value===e[0].shares.options);const a={};32768&t&&(a.$$scope={dirty:t,ctx:e}),c.$set(a),(!_||1&t)&&xh(s,"checked","ERC1155"===e[0].shares.options),(!_||2&t)&&(m.disabled=e[1]),1&t&&(m.checked=m.__value===e[0].shares.options);const l={};32768&t&&(l.$$scope={dirty:t,ctx:e}),h.$set(l),(!_||1&t)&&xh(p,"checked","ERC6909"===e[0].shares.options),"ERC1155"===e[0].shares.options?I?I.p(e,t):(I=x_(e),I.c(),I.m(b.parentNode,b)):I&&(I.d(1),I=null),"ERC20"===e[0].shares.options?S?S.p(e,t):(S=I_(e),S.c(),S.m($.parentNode,$)):S&&(S.d(1),S=null)},i(e){_||(Vh(o.$$.fragment,e),Vh(c.$$.fragment,e),Vh(h.$$.fragment,e),_=!0)},o(e){Wh(o.$$.fragment,e),Wh(c.$$.fragment,e),Wh(h.$$.fragment,e),_=!1},d(e){e&&ch(t),Yh(o),Yh(c),Yh(h),e&&ch(g),e&&ch(v),e&&ch(y),I&&I.d(e),e&&ch(b),S&&S.d(e),e&&ch($),k.r(),w=!1,Gf(x)}}}function O_(e){let t,n,i;function r(t){e[14](t)}let o={label:"Shares",disabled:e[5],disabledReason:e[4],defaultValue:"ERC20",helpContent:"Shares are useful to account for the ownership of a portion of a liquidity position or pending credit.",helpLink:"https://docs.openzeppelin.com/contracts/5.x/api/token/erc20",$$slots:{default:[S_]},$$scope:{ctx:e}};return void 0!==e[0].shares.options&&(o.value=e[0].shares.options),t=new o_({props:o}),Ch.push(()=>Kh(t,"value",r)),{c(){Gh(t.$$.fragment)},m(e,n){Xh(t,e,n),i=!0},p(e,[i]){const r={};32&i&&(r.disabled=e[5]),16&i&&(r.disabledReason=e[4]),32783&i&&(r.$$scope={dirty:i,ctx:e}),!n&&1&i&&(n=!0,r.value=e[0].shares.options,Lh(()=>n=!1)),t.$set(r)},i(e){i||(Vh(t.$$.fragment,e),i=!0)},o(e){Wh(t.$$.fragment,e),i=!1},d(e){Yh(t,e)}}}function z_(e,t,n){let i,r,o,a,s,{opts:u}=t,{sharesConfig:l}=t;return e.$$set=e=>{"opts"in e&&n(0,u=e.opts),"sharesConfig"in e&&n(6,l=e.sharesConfig)},e.$$.update=()=>{64&e.$$.dirty&&n(5,i="required"===l||"disabled"===l||Jv(l)),65&e.$$.dirty&&n(4,r="required"===l?`Shares are required by <code>${u.hook}</code>`:"disabled"===l?`Shares are disabled for <code>${u.hook}</code>`:Jv(l)?`${l} Shares are required for <code>${u.hook}</code>`:void 0),64&e.$$.dirty&&n(3,o="disabled"===l||Jv(l)&&"ERC20"!==l),64&e.$$.dirty&&n(2,a="disabled"===l||Jv(l)&&"ERC1155"!==l),64&e.$$.dirty&&n(1,s="disabled"===l||Jv(l)&&"ERC6909"!==l)},[u,s,a,o,r,i,l,function(){u.shares.options=this.__value,n(0,u)},[[]],function(){u.shares.options=this.__value,n(0,u)},function(){u.shares.options=this.__value,n(0,u)},function(){u.shares.uri=this.value,n(0,u)},function(){u.shares.name=this.value,n(0,u)},function(){u.shares.symbol=this.value,n(0,u)},function(t){e.$$.not_equal(u.shares.options,t)&&(u.shares.options=t,n(0,u))}]}class E_ extends tg{constructor(e){super(),eg(this,e,z_,O_,Yf,{opts:0,sharesConfig:6})}}function D_(e){uh(e,"svelte-pw3570",".shares-section.svelte-pw3570{margin-left:0.5rem}.shares-section.svelte-pw3570 .controls-section h1{color:var(--text-color);font-size:var(--size-4);font-weight:400;text-transform:none;font-variant:none}")}function T_(e,t,n){const i=e.slice();return i[24]=t[n],i[25]=t,i[26]=n,i}function C_(e,t,n){const i=e.slice();return i[27]=t[n],i}function N_(e,t,n){const i=e.slice();return i[30]=t[n],i}function A_(e,t,n){const i=e.slice();return i[33]=t[n],i}function U_(e){let t,n;return t=new j$({props:{$$slots:{default:[P_]},$$scope:{ctx:e}}}),{c(){Gh(t.$$.fragment)},m(e,i){Xh(t,e,i),n=!0},p(e,n){const i={};32&n[0]|32&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(Vh(t.$$.fragment,e),n=!0)},o(e){Wh(t.$$.fragment,e),n=!1},d(e){Yh(t,e)}}}function P_(e){let t,n=e[33].tooltipText+"";return{c(){t=fh(n)},m(e,n){lh(e,t,n)},p(e,i){32&i[0]&&n!==(n=e[33].tooltipText+"")&&_h(t,n)},d(e){e&&ch(t)}}}function j_(e){let t,n,i,r,o;return{c(){t=ph("input"),yh(t,"type","number"),yh(t,"placeholder",n=e[33].placeholder)},m(n,a){lh(n,t,a),kh(t,e[0].inputs.blockNumberOffset),r||(o=[vh(t,"input",e[11]),ah(i=R$.call(null,t,e[1]?.[e[33].name]))],r=!0)},p(r,o){e=r,32&o[0]&&n!==(n=e[33].placeholder)&&yh(t,"placeholder",n),1&o[0]&&$h(t.value)!==e[0].inputs.blockNumberOffset&&kh(t,e[0].inputs.blockNumberOffset),i&&Xf(i.update)&&34&o[0]&&i.update.call(null,e[1]?.[e[33].name])},d(e){e&&ch(t),r=!1,Gf(o)}}}function L_(e){let t,n,i,r,o;return{c(){t=ph("input"),yh(t,"type","number"),yh(t,"placeholder",n=e[33].placeholder)},m(n,a){lh(n,t,a),kh(t,e[0].inputs.maxAbsTickDelta),r||(o=[vh(t,"input",e[10]),ah(i=R$.call(null,t,e[1]?.[e[33].name]))],r=!0)},p(r,o){e=r,32&o[0]&&n!==(n=e[33].placeholder)&&yh(t,"placeholder",n),1&o[0]&&$h(t.value)!==e[0].inputs.maxAbsTickDelta&&kh(t,e[0].inputs.maxAbsTickDelta),i&&Xf(i.update)&&34&o[0]&&i.update.call(null,e[1]?.[e[33].name])},d(e){e&&ch(t),r=!1,Gf(o)}}}function R_(e){let t,n,i,r,o,a,s,u=e[33].label+"",l=e[33].tooltipText&&U_(e);function c(e,t){return"maxAbsTickDelta"===e[33].name?L_:"blockNumberOffset"===e[33].name?j_:void 0}let d=c(e),p=d&&d(e);return{c(){t=ph("label"),n=ph("span"),i=fh(u),r=hh(),l&&l.c(),o=hh(),p&&p.c(),a=hh(),yh(n,"class","flex justify-between pr-2"),yh(t,"class","labeled-input")},m(e,u){lh(e,t,u),sh(t,n),sh(n,i),sh(n,r),l&&l.m(n,null),sh(t,o),p&&p.m(t,null),sh(t,a),s=!0},p(e,r){(!s||32&r[0])&&u!==(u=e[33].label+"")&&_h(i,u),e[33].tooltipText?l?(l.p(e,r),32&r[0]&&Vh(l,1)):(l=U_(e),l.c(),Vh(l,1),l.m(n,null)):l&&(Fh(),Wh(l,1,1,()=>{l=null}),Jh()),d===(d=c(e))&&p?p.p(e,r):(p&&p.d(1),p=d&&d(e),p&&(p.c(),p.m(t,a)))},i(e){s||(Vh(l),s=!0)},o(e){Wh(l),s=!1},d(e){e&&ch(t),l&&l.d(),p&&p.d()}}}function Z_(e){let t,n,i=e[30].tooltipText+"";return{c(){t=new Ih(!1),n=gh(),t.a=n},m(e,r){t.m(i,e,r),lh(e,n,r)},p:Jf,d(e){e&&ch(n),e&&t.d()}}}function M_(e){let t,n,i,r,o,a,s,u,l,c,d=e[30].displayName+"";return a=new j$({props:{link:e[30].tooltipLink,$$slots:{default:[Z_]},$$scope:{ctx:e}}}),u=bh(e[13][0]),{c(){t=ph("label"),n=ph("input"),i=hh(),r=fh(d),o=hh(),Gh(a.$$.fragment),yh(n,"type","radio"),n.__value=e[30].name,n.value=n.__value,xh(t,"checked",e[0].hook===e[30].name),u.p(n)},m(u,d){lh(u,t,d),sh(t,n),n.checked=n.__value===e[0].hook,sh(t,i),sh(t,r),sh(t,o),Xh(a,t,null),s=!0,l||(c=vh(n,"change",e[12]),l=!0)},p(e,i){1&i[0]&&(n.checked=n.__value===e[0].hook);const r={};32&i[1]&&(r.$$scope={dirty:i,ctx:e}),a.$set(r),(!s||193&i[0])&&xh(t,"checked",e[0].hook===e[30].name)},i(e){s||(Vh(a.$$.fragment,e),s=!0)},o(e){Wh(a.$$.fragment,e),s=!1},d(e){e&&ch(t),Yh(a),u.r(),l=!1,c()}}}function q_(e){let t,n,i,r,o,a,s=e[27]+" Hooks",u=e[7][e[27]],l=[];for(let t=0;t<u.length;t+=1)l[t]=M_(N_(e,u,t));const c=e=>Wh(l[e],1,1,()=>{l[e]=null});return{c(){t=ph("section"),n=ph("h1"),i=fh(s),r=hh(),o=ph("div");for(let e=0;e<l.length;e+=1)l[e].c();yh(o,"class","checkbox-group"),yh(t,"class","controls-section")},m(e,s){lh(e,t,s),sh(t,n),sh(n,i),sh(t,r),sh(t,o);for(let e=0;e<l.length;e+=1)l[e]&&l[e].m(o,null);a=!0},p(e,t){if(193&t[0]){let n;for(u=e[7][e[27]],n=0;n<u.length;n+=1){const i=N_(e,u,n);l[n]?(l[n].p(i,t),Vh(l[n],1)):(l[n]=M_(i),l[n].c(),Vh(l[n],1),l[n].m(o,null))}for(Fh(),n=u.length;n<l.length;n+=1)c(n);Jh()}},i(e){if(!a){for(let e=0;e<u.length;e+=1)Vh(l[e]);a=!0}},o(e){l=l.filter(Boolean);for(let e=0;e<l.length;e+=1)Wh(l[e]);a=!1},d(e){e&&ch(t),dh(l,e)}}}function B_(e){let t,n,i,r,o=e[24]+"";return{c(){t=fh("Optionally enable the "),n=ph("code"),i=fh(o),r=fh(" permission.")},m(e,o){lh(e,t,o),lh(e,n,o),sh(n,i),lh(e,r,o)},p:Jf,d(e){e&&ch(t),e&&ch(n),e&&ch(r)}}}function H_(e){let t,n,i,r,o,a,s,u=e[24]+"",l=ry(e[24])+"";return{c(){t=fh("The "),n=ph("code"),i=fh(u),r=fh(" permission is required when the\n "),o=ph("code"),a=fh(l),s=fh(" permission is enabled.")},m(e,u){lh(e,t,u),lh(e,n,u),sh(n,i),lh(e,r,u),lh(e,o,u),sh(o,a),lh(e,s,u)},p:Jf,d(e){e&&ch(t),e&&ch(n),e&&ch(r),e&&ch(o),e&&ch(s)}}}function F_(e){let t,n,i,r,o,a,s=e[24]+"";return{c(){t=fh("The "),n=ph("code"),i=fh(s),r=fh(" permission is required when "),o=ph("code"),o.textContent="Pausable",a=fh(" is enabled.")},m(e,s){lh(e,t,s),lh(e,n,s),sh(n,i),lh(e,r,s),lh(e,o,s),lh(e,a,s)},p:Jf,d(e){e&&ch(t),e&&ch(n),e&&ch(r),e&&ch(o),e&&ch(a)}}}function J_(e){let t,n,i,r,o,a,s,u=e[24]+"",l=e[0].hook+"";return{c(){t=fh("The "),n=ph("code"),i=fh(u),r=fh(" permission is required by "),o=ph("code"),a=fh(l),s=fh(".")},m(e,u){lh(e,t,u),lh(e,n,u),sh(n,i),lh(e,r,u),lh(e,o,u),sh(o,a),lh(e,s,u)},p(e,t){1&t[0]&&l!==(l=e[0].hook+"")&&_h(a,l)},d(e){e&&ch(t),e&&ch(n),e&&ch(r),e&&ch(o),e&&ch(s)}}}function V_(e){let t,n,i,r;function o(e,r){return 1&r[0]&&(t=null),1&r[0]&&(n=null),1&r[0]&&(i=null),null==t&&(t=!!ny(e[0].hook,e[24])),t?J_:(null==n&&(n=!!iy(e[0],e[24])),n?F_:(null==i&&(i=!!oy(e[0],e[24])),i?H_:B_))}let a=o(e,[-1,-1]),s=a(e);return{c(){s.c(),r=gh()},m(e,t){s.m(e,t),lh(e,r,t)},p(e,t){a===(a=o(e,t))&&s?s.p(e,t):(s.d(1),s=a(e),s&&(s.c(),s.m(r.parentNode,r)))},d(e){s.d(e),e&&ch(r)}}}function W_(e){let t,n,i,r,o=((a=e[24]).length>25?a.replace("Return",""):a)+"";var a;let s,u,l,c,d,p,m;function f(){e[14].call(n,e[24])}return l=new j$({props:{link:"https://docs.uniswap.org/contracts/v4/concepts/hooks#core-hook-functions",$$slots:{default:[V_]},$$scope:{ctx:e}}}),{c(){t=ph("label"),n=ph("input"),r=hh(),s=fh(o),u=hh(),Gh(l.$$.fragment),c=hh(),yh(n,"type","checkbox"),n.disabled=i=ny(e[0].hook,e[24])||iy(e[0],e[24])||oy(e[0],e[24]),xh(t,"checked",e[0].permissions[e[24]])},m(i,o){lh(i,t,o),sh(t,n),n.checked=e[0].permissions[e[24]],sh(t,r),sh(t,s),sh(t,u),Xh(l,t,null),sh(t,c),d=!0,p||(m=vh(n,"change",f),p=!0)},p(r,o){e=r,(!d||1&o[0]&&i!==(i=ny(e[0].hook,e[24])||iy(e[0],e[24])||oy(e[0],e[24])))&&(n.disabled=i),1&o[0]&&(n.checked=e[0].permissions[e[24]]);const a={};1&o[0]|32&o[1]&&(a.$$scope={dirty:o,ctx:e}),l.$set(a),(!d||1&o[0])&&xh(t,"checked",e[0].permissions[e[24]])},i(e){d||(Vh(l.$$.fragment,e),d=!0)},o(e){Wh(l.$$.fragment,e),d=!1},d(e){e&&ch(t),Yh(l),p=!1,m()}}}function K_(e){let t,n,i=Hv,r=[];for(let t=0;t<i.length;t+=1)r[t]=W_(T_(e,i,t));const o=e=>Wh(r[e],1,1,()=>{r[e]=null});return{c(){t=ph("div");for(let e=0;e<r.length;e+=1)r[e].c();yh(t,"class","checkbox-group")},m(e,i){lh(e,t,i);for(let e=0;e<r.length;e+=1)r[e]&&r[e].m(t,null);n=!0},p(e,n){if(1&n[0]){let a;for(i=Hv,a=0;a<i.length;a+=1){const o=T_(e,i,a);r[a]?(r[a].p(o,n),Vh(r[a],1)):(r[a]=W_(o),r[a].c(),Vh(r[a],1),r[a].m(t,null))}for(Fh(),a=i.length;a<r.length;a+=1)o(a);Jh()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)Vh(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)Wh(r[e]);n=!1},d(e){e&&ch(t),dh(r,e)}}}function G_(e){let t;return{c(){t=fh("Utility library used to settle and take any pending deltas with an unlocked `PoolManager` during flash\n accounting.")},m(e,n){lh(e,t,n)},d(e){e&&ch(t)}}}function X_(e){let t;return{c(){t=fh("Utility library to safely cast between numeric types, i.e. casting an uint256 fee to an uint128 BalanceDelta.")},m(e,n){lh(e,t,n)},d(e){e&&ch(t)}}}function Y_(e){let t;return{c(){t=fh("Utility library for simplifying the usage of Transient Storage, which is discarded after the transaction ends\n and whose gas costs are drastically reduced in comparison to regular storage.")},m(e,n){lh(e,t,n)},d(e){e&&ch(t)}}}function Q_(e){let t,n,i,r,o,a,s,u,l,c,d,p,m,f,h,g,v,y;return o=new j$({props:{link:"https://docs.openzeppelin.com/uniswap-hooks/api/utils#CurrencySettler",$$slots:{default:[G_]},$$scope:{ctx:e}}}),c=new j$({props:{link:"https://docs.openzeppelin.com/contracts/5.x/api/utils#SafeCast",$$slots:{default:[X_]},$$scope:{ctx:e}}}),h=new j$({props:{link:"https://docs.openzeppelin.com/contracts/5.x/api/utils#TransientSlot",$$slots:{default:[Y_]},$$scope:{ctx:e}}}),{c(){t=ph("div"),n=ph("label"),i=ph("input"),r=fh("\n CurrencySettler\n "),Gh(o.$$.fragment),a=hh(),s=ph("label"),u=ph("input"),l=fh("\n SafeCast\n "),Gh(c.$$.fragment),d=hh(),p=ph("label"),m=ph("input"),f=fh("\n Transient Storage\n "),Gh(h.$$.fragment),yh(i,"type","checkbox"),xh(n,"checked",e[0].currencySettler),yh(u,"type","checkbox"),xh(s,"checked",e[0].safeCast),yh(m,"type","checkbox"),xh(p,"checked",e[0].transientStorage),yh(t,"class","checkbox-group")},m(b,$){lh(b,t,$),sh(t,n),sh(n,i),i.checked=e[0].currencySettler,sh(n,r),Xh(o,n,null),sh(t,a),sh(t,s),sh(s,u),u.checked=e[0].safeCast,sh(s,l),Xh(c,s,null),sh(t,d),sh(t,p),sh(p,m),m.checked=e[0].transientStorage,sh(p,f),Xh(h,p,null),g=!0,v||(y=[vh(i,"change",e[16]),vh(u,"change",e[17]),vh(m,"change",e[18])],v=!0)},p(e,t){1&t[0]&&(i.checked=e[0].currencySettler);const r={};32&t[1]&&(r.$$scope={dirty:t,ctx:e}),o.$set(r),(!g||1&t[0])&&xh(n,"checked",e[0].currencySettler),1&t[0]&&(u.checked=e[0].safeCast);const a={};32&t[1]&&(a.$$scope={dirty:t,ctx:e}),c.$set(a),(!g||1&t[0])&&xh(s,"checked",e[0].safeCast),1&t[0]&&(m.checked=e[0].transientStorage);const l={};32&t[1]&&(l.$$scope={dirty:t,ctx:e}),h.$set(l),(!g||1&t[0])&&xh(p,"checked",e[0].transientStorage)},i(e){g||(Vh(o.$$.fragment,e),Vh(c.$$.fragment,e),Vh(h.$$.fragment,e),g=!0)},o(e){Wh(o.$$.fragment,e),Wh(c.$$.fragment,e),Wh(h.$$.fragment,e),g=!1},d(e){e&&ch(t),Yh(o),Yh(c),Yh(h),v=!1,Gf(y)}}}function ek(e){let t,n,i;return{c(){t=fh("Privileged accounts will be able to pause the functionality marked as "),n=ph("code"),n.textContent="whenNotPaused",i=fh(". Useful for\n emergency response.")},m(e,r){lh(e,t,r),lh(e,n,r),lh(e,i,r)},p:Jf,d(e){e&&ch(t),e&&ch(n),e&&ch(i)}}}function tk(e){let t,n,i,r,o,a,s,u,l,c,d,p,m,f,h,g,v,y,b,$,_,k,w,x,I,S,O,z,E,D,T,C,N,A,U,P,j,L=e[5].inputs,R=[];for(let t=0;t<L.length;t+=1)R[t]=R_(A_(e,L,t));const Z=e=>Wh(R[e],1,1,()=>{R[e]=null});let M=e[6],q=[];for(let t=0;t<M.length;t+=1)q[t]=q_(C_(e,M,t));const B=e=>Wh(q[e],1,1,()=>{q[e]=null});function H(t){e[15](t)}let F={label:"Additional Hook Permissions",helpContent:"Fine-tune which core hook function permissions are enabled.",helpLink:"https://docs.uniswap.org/contracts/v4/concepts/hooks#core-hook-functions",$$slots:{default:[K_]},$$scope:{ctx:e}};function J(t){e[19](t)}void 0!==e[2]&&(F.checked=e[2]),d=new $_({props:F}),Ch.push(()=>Kh(d,"checked",H));let V={label:"Utilities",helpContent:"Utilities are optional libraries that can be used to enhance the functionality or security of the hook.",$$slots:{default:[Q_]},$$scope:{ctx:e}};function W(t){e[21](t)}void 0!==e[3]&&(V.checked=e[3]),f=new $_({props:V}),Ch.push(()=>Kh(f,"checked",J)),x=new j$({props:{link:"https://docs.openzeppelin.com/contracts/5.x/api/utils#Pausable",$$slots:{default:[ek]},$$scope:{ctx:e}}});let K={sharesConfig:e[5].shares};function G(t){e[22](t)}void 0!==e[0]&&(K.opts=e[0]),O=new E_({props:K}),Ch.push(()=>Kh(O,"opts",W));let X={required:e[4]};function Y(t){e[23](t)}void 0!==e[0].access&&(X.access=e[0].access),D=new p_({props:X}),Ch.push(()=>Kh(D,"access",G));let Q={errors:e[1]};return void 0!==e[0].info&&(Q.info=e[0].info),N=new g_({props:Q}),Ch.push(()=>Kh(N,"info",Y)),{c(){t=ph("section"),n=ph("h1"),n.textContent="Settings",i=hh(),r=ph("label"),o=ph("span"),o.textContent="Name",a=hh(),s=ph("input"),u=hh();for(let e=0;e<R.length;e+=1)R[e].c();l=hh();for(let e=0;e<q.length;e+=1)q[e].c();c=hh(),Gh(d.$$.fragment),m=hh(),Gh(f.$$.fragment),g=hh(),v=ph("section"),y=ph("h1"),y.textContent="Features",b=hh(),$=ph("div"),_=ph("label"),k=ph("input"),w=fh("\n Pausable\n "),Gh(x.$$.fragment),I=hh(),S=ph("div"),Gh(O.$$.fragment),E=hh(),Gh(D.$$.fragment),C=hh(),Gh(N.$$.fragment),yh(r,"class","labeled-input"),yh(t,"class","controls-section"),yh(k,"type","checkbox"),xh(_,"checked",e[0].pausable),yh($,"class","checkbox-group"),yh(S,"class","shares-section svelte-pw3570"),yh(v,"class","controls-section")},m(p,h){lh(p,t,h),sh(t,n),sh(t,i),sh(t,r),sh(r,o),sh(r,a),sh(r,s),kh(s,e[0].name),sh(t,u);for(let e=0;e<R.length;e+=1)R[e]&&R[e].m(t,null);lh(p,l,h);for(let e=0;e<q.length;e+=1)q[e]&&q[e].m(p,h);lh(p,c,h),Xh(d,p,h),lh(p,m,h),Xh(f,p,h),lh(p,g,h),lh(p,v,h),sh(v,y),sh(v,b),sh(v,$),sh($,_),sh(_,k),k.checked=e[0].pausable,sh(_,w),Xh(x,_,null),sh(v,I),sh(v,S),Xh(O,S,null),lh(p,E,h),Xh(D,p,h),lh(p,C,h),Xh(N,p,h),U=!0,P||(j=[vh(s,"input",e[9]),vh(k,"change",e[20])],P=!0)},p(e,n){if(1&n[0]&&s.value!==e[0].name&&kh(s,e[0].name),35&n[0]){let i;for(L=e[5].inputs,i=0;i<L.length;i+=1){const r=A_(e,L,i);R[i]?(R[i].p(r,n),Vh(R[i],1)):(R[i]=R_(r),R[i].c(),Vh(R[i],1),R[i].m(t,null))}for(Fh(),i=L.length;i<R.length;i+=1)Z(i);Jh()}if(193&n[0]){let t;for(M=e[6],t=0;t<M.length;t+=1){const i=C_(e,M,t);q[t]?(q[t].p(i,n),Vh(q[t],1)):(q[t]=q_(i),q[t].c(),Vh(q[t],1),q[t].m(c.parentNode,c))}for(Fh(),t=M.length;t<q.length;t+=1)B(t);Jh()}const i={};1&n[0]|32&n[1]&&(i.$$scope={dirty:n,ctx:e}),!p&&4&n[0]&&(p=!0,i.checked=e[2],Lh(()=>p=!1)),d.$set(i);const r={};1&n[0]|32&n[1]&&(r.$$scope={dirty:n,ctx:e}),!h&&8&n[0]&&(h=!0,r.checked=e[3],Lh(()=>h=!1)),f.$set(r),1&n[0]&&(k.checked=e[0].pausable);const o={};32&n[1]&&(o.$$scope={dirty:n,ctx:e}),x.$set(o),(!U||1&n[0])&&xh(_,"checked",e[0].pausable);const a={};32&n[0]&&(a.sharesConfig=e[5].shares),!z&&1&n[0]&&(z=!0,a.opts=e[0],Lh(()=>z=!1)),O.$set(a);const u={};16&n[0]&&(u.required=e[4]),!T&&1&n[0]&&(T=!0,u.access=e[0].access,Lh(()=>T=!1)),D.$set(u);const l={};2&n[0]&&(l.errors=e[1]),!A&&1&n[0]&&(A=!0,l.info=e[0].info,Lh(()=>A=!1)),N.$set(l)},i(e){if(!U){for(let e=0;e<L.length;e+=1)Vh(R[e]);for(let e=0;e<M.length;e+=1)Vh(q[e]);Vh(d.$$.fragment,e),Vh(f.$$.fragment,e),Vh(x.$$.fragment,e),Vh(O.$$.fragment,e),Vh(D.$$.fragment,e),Vh(N.$$.fragment,e),U=!0}},o(e){R=R.filter(Boolean);for(let e=0;e<R.length;e+=1)Wh(R[e]);q=q.filter(Boolean);for(let e=0;e<q.length;e+=1)Wh(q[e]);Wh(d.$$.fragment,e),Wh(f.$$.fragment,e),Wh(x.$$.fragment,e),Wh(O.$$.fragment,e),Wh(D.$$.fragment,e),Wh(N.$$.fragment,e),U=!1},d(e){e&&ch(t),dh(R,e),e&&ch(l),dh(q,e),e&&ch(c),Yh(d,e),e&&ch(m),Yh(f,e),e&&ch(g),e&&ch(v),Yh(x),Yh(O),e&&ch(E),Yh(D,e),e&&ch(C),Yh(N,e),P=!1,Gf(j)}}}function nk(e,t,n){let i,r,o,{opts:a={kind:"Hooks",...sy.defaults}}=t,{errors:s}=t;const u={Base:[],Fee:[],General:[],Oracles:[]};for(const e in Bv){const t=Bv[e],n=t.category;if(!n)throw new Error(`Hook ${t.name} has an invalid category: ${t.category}`);u[n].push(t)}let l=!1,c=!1;return e.$$set=e=>{"opts"in e&&n(0,a=e.opts),"errors"in e&&n(1,s=e.errors)},e.$$.update=()=>{257&e.$$.dirty[0]&&a.hook!==o&&(n(0,a={...a,hook:a.hook,permissions:{...sy.defaults.permissions}}),n(8,o=a.hook)),1&e.$$.dirty[0]&&n(5,i=Bv[a.hook]),1&e.$$.dirty[0]&&n(4,r=sy.isAccessControlRequired(a))},[a,s,l,c,r,i,["Base","Fee","General","Oracles"],u,o,function(){a.name=this.value,n(0,a),n(8,o)},function(){a.inputs.maxAbsTickDelta=$h(this.value),n(0,a),n(8,o)},function(){a.inputs.blockNumberOffset=$h(this.value),n(0,a),n(8,o)},function(){a.hook=this.__value,n(0,a),n(8,o)},[[]],function(e){a.permissions[e]=this.checked,n(0,a),n(8,o)},function(e){l=e,n(2,l)},function(){a.currencySettler=this.checked,n(0,a),n(8,o)},function(){a.safeCast=this.checked,n(0,a),n(8,o)},function(){a.transientStorage=this.checked,n(0,a),n(8,o)},function(e){c=e,n(3,c)},function(){a.pausable=this.checked,n(0,a),n(8,o)},function(e){a=e,n(0,a),n(8,o)},function(t){e.$$.not_equal(a.access,t)&&(a.access=t,n(0,a),n(8,o))},function(t){e.$$.not_equal(a.info,t)&&(a.info=t,n(0,a),n(8,o))}]}const ik={emptyContract:()=>new jg("MyHook"),build:e=>function(e){if("Hooks"===e.kind)return Kv(e);throw e.kind,new Error("Unknown contract kind")}(e),print:e=>Ev(e),optionsErrors:e=>e instanceof Fg?e.messages:void 0,highlight:e=>yy.highlight("solidity",e).value,injectHyperlinks:function(e){return e.replace(/&quot;(@openzeppelin\/)(contracts-upgradeable\/|contracts\/)((?:(?!\.\.)[^/]+\/)*?[^/]*?)&quot;/g,'&quot;<a class="import-link" href="https://github.com/OpenZeppelin/openzeppelin-$2blob/v5.4.0/contracts/$3" target="_blank" rel="noopener noreferrer">$1$2$3</a>&quot;').replace(/&quot;(@uniswap\/)(v4-core\/src\/)((?:(?!\.\.)[^/]+\/)*?[^/]*?)&quot;/g,'&quot;<a class="import-link" href="https://github.com/Uniswap/v4-core/blob/main/src/$3" target="_blank" rel="noopener noreferrer">$1$2$3</a>&quot;').replace(/&quot;(@openzeppelin\/)(uniswap-hooks\/)((?:(?!\.\.)[^/]+\/)*?[^/]*?)&quot;/g,'&quot;<a class="import-link" href="https://github.com/OpenZeppelin/uniswap-hooks/blob/v1.2.1/src/$3" target="_blank" rel="noopener noreferrer">$1$2$3</a>&quot;')},highlightClass:"-solidity",fence:"solidity",controls:{Hooks:class extends tg{constructor(e){super(),eg(this,e,nk,tk,Yf,{opts:0,errors:1},D_,[-1,-1])}}}};!function(e,t=document.body){(async function(e,t,n=document.body){const i=new Ff({name:`OpenZeppelin ${t}`,version:"1.0.0"},{},{autoResize:!1});document.documentElement.style.setProperty("--mcp-app-height","560px");const r=new Ng({target:n,props:{adapter:e,kind:t,mcpApp:i}}),o=new yf(window.parent,window.parent);i.connect(o).then(async()=>{const e=ag(i);console.info(`[mcp-apps] connected (${t}) hostCapabilities`,i.getHostCapabilities()),r.$set({hostConnected:!0,hostConnectError:void 0,hostSendCaps:e}),await i.sendSizeChanged({height:Ag})}).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)}(ik)}();
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 u=e.indexOf(s);-1===u&&(u=e.push(s)-1,t[u]={}),r=t[u]&&t[u][o]?t[u][o]:t[u][o]=l()}else r=l();65279===n.charCodeAt(0)&&(n=n.substring(1)),r.styleSheet?r.styleSheet.cssText+=n:r.appendChild(document.createTextNode(n))}function l(){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.mb-1 {\n margin-bottom: 0.25rem\n}\n\n.ml-1 {\n margin-left: 0.25rem\n}\n\n.ml-2 {\n margin-left: 0.5rem\n}\n\n.ml-auto {\n margin-left: auto\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 /* TRON Red, per the official brand palette (PANTONE 185C). */\n --tron-red: #dc062b;\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: 0;\n width: 100%;\n box-sizing: border-box;\n}\n.wizard-panes {\n position: relative;\n min-width: 0;\n}\n.wizard-panes .controls,\n.wizard-panes .output {\n height: calc(100vh - 84px);\n min-width: 0;\n}\n.header .tab {\n flex: 1 1 auto;\n min-width: 0;\n}\n.wizard-panes::after {\n content: '';\n position: absolute;\n left: 0;\n bottom: 0;\n width: var(--controls-fade-width, 18rem);\n max-width: 100%;\n height: 4.5rem;\n pointer-events: none;\n background: linear-gradient(to top, rgb(255, 255, 255) 25%, rgba(255, 255, 255, 0.85) 55%, transparent);\n border-bottom-left-radius: 1.5rem;\n z-index: 1;\n opacity: 1;\n transition: opacity 0.15s ease;\n}\n.wizard-panes.controls-at-end::after {\n opacity: 0;\n}\n.wizard-panes .controls {\n scrollbar-width: thin;\n scrollbar-color: var(--gray-3) transparent;\n}\n.wizard-panes .controls::-webkit-scrollbar {\n width: 8px;\n}\n.wizard-panes .controls::-webkit-scrollbar-thumb {\n background: var(--gray-3);\n border-radius: 8px;\n}\n@media (max-width: 720px) {\n .container,\n .page-container {\n overflow: visible;\n }\n\n /* Flatten wrappers so the stack is tabs → options → actions → code. */\n .header,\n .wizard-panes {\n display: contents;\n }\n\n .wizard-panes::after {\n display: none;\n }\n\n .tab {\n order: 0;\n flex: 0 0 auto;\n width: 100%;\n min-width: 0;\n }\n\n .wizard-panes .controls,\n .wizard-panes .output {\n width: 100%;\n min-width: 0;\n max-width: 100%;\n height: auto;\n resize: none;\n }\n\n .wizard-panes .controls {\n order: 1;\n /* rem, not vh: the embed iframe is sized to content, so vh would recurse. */\n max-height: 22rem;\n border-radius: 1.5rem;\n box-shadow: none;\n -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent);\n mask-image: linear-gradient(to bottom, #000 78%, transparent);\n }\n\n .wizard-panes.controls-at-end .controls {\n -webkit-mask-image: none;\n mask-image: none;\n }\n\n .action {\n order: 2;\n z-index: 5;\n justify-content: flex-end;\n flex-wrap: nowrap;\n width: 100%;\n box-sizing: border-box;\n margin-left: 0;\n /* Collapse the container gap so this toolbar sits on the code card. */\n margin-bottom: -1rem;\n padding: 0.4rem 0.6rem;\n background-color: white;\n border-radius: 1.5rem 1.5rem 0 0;\n }\n\n .action .action-button {\n padding: 7px 12px;\n }\n\n .wizard-panes .output {\n order: 3;\n min-height: 32rem;\n margin-top: 0;\n border-radius: 0 0 1.5rem 1.5rem;\n }\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: inset 0 0 0 1px 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 u(e){return e&&Object.assign(s,e),s}function l(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 c(e,t="|"){return e.map(e=>T(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 k(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const _="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 O=new Set(["string","number","symbol"]),z=new Set(["string","number","bigint","boolean","symbol","undefined"]);function E(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function D(e,t,n){const i=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(i._zod.parent=e),i}function C(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 T(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]},U={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function P(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 D(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 j(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 D(e,r)}function L(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 D(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 D(e,n)}function Z(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 D(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 D(t,r)}function q(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 D(t,i)}function B(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 H(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function F(e){return"string"==typeof e?e:e?.message}function J(e,t,n){const i={...e,path:e.path??[]};if(!e.message){const r=F(e.inst?._zod.def?.error?.(e))??F(t?.error?.(e))??F(n.customError?.(e))??F(n.localeError?.(e))??"Invalid input";i.message=r}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function V(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function W(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function K(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 G(...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:U,Class:class{constructor(...e){}},NUMBER_FORMAT_RANGES:N,aborted:B,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:_,cleanEnum:function(e){return Object.entries(e).filter(([e,t])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])},cleanRegex:f,clone:D,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:E,extend:L,finalizeIssue:J,floatSafeRemainder:h,getElementAtPath:function(e,t){return t?t.reduce((e,t)=>e?.[t],e):e},getEnumValues:l,getLengthableOrigin:W,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:V,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:G,joinValues:c,jsonStringifyReplacer:d,merge:Z,mergeDefs:y,normalizeParams:C,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:j,optionalKeys:A,parsedType:K,partial:M,pick:P,prefixIssues:H,primitiveTypes:z,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:O,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:q,safeExtend:R,shallowClone:S,slugify:k,stringifyPrimitive:T,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:F});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,u=0;for(;u<e.length;){const n=e[u],r=u===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)),u++}}};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 ue=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=>J(e,a,u())));throw _(t,r?.callee),t}return s.value},le=ue(ne),ce=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=>J(e,o,u())));throw _(t,r?.callee),t}return a.value},de=ce(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=>J(e,r,u())))}:{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=>J(e,r,u())))}:{success:!0,data:o.value}},he=fe(ne),ge=e=>(t,n,i)=>{const r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return ue(e)(t,n,r)},ve=ge(ne),be=e=>(t,n,i)=>ue(e)(t,n,i),ye=be(ne),$e=e=>async(t,n,i)=>{const r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return ce(e)(t,n,r)},ke=$e(ne),_e=e=>async(t,n,i)=>ce(e)(t,n,i),we=_e(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),Oe=Se(ne),ze=e=>async(t,n,i)=>{const r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return fe(e)(t,n,r)},Ee=ze(ne),De=e=>async(t,n,i)=>fe(e)(t,n,i),Ce=De(ne),Te=/^[cC][^\s-]{8,}$/,Ae=/^[0-9a-z]+$/,Ne=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ue=/^[0-9a-vA-V]{20}$/,Pe=/^[A-Za-z0-9]{27}$/,je=/^[a-zA-Z0-9_-]{21}$/,Le=/^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})$/,Ze=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=Ze(4),qe=Ze(6),Be=Ze(7),He=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Fe=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Je=Fe;function Ve(){return new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")}const We=/^(?:(?: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])$/,Ke=/^(([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}|:))$/,Ge=e=>{const t=E(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 ut(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 lt=e=>new RegExp(`^${e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*"}$`),ct=/^-?\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 kt=yt(22,"=="),_t=$t(22),wt=yt(27,"="),xt=$t(27),It=yt(43,"="),St=$t(43),Ot=yt(64,""),zt=$t(64),Et=yt(86,"=="),Dt=$t(86);var Ct=Object.freeze({__proto__:null,base64:Qe,base64url:et,bigint:ct,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:Te,cuid2:Ae,date:ot,datetime:ut,domain:nt,duration:Le,e164:it,email:He,emoji:Ve,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:Je,integer:dt,ipv4:We,ipv6:Ke,ksuid:Pe,lowercase:gt,mac:Ge,md5_base64:kt,md5_base64url:_t,md5_hex:/^[0-9a-fA-F]{32}$/,nanoid:je,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:Ot,sha384_base64url:zt,sha384_hex:/^[0-9a-fA-F]{96}$/,sha512_base64:Et,sha512_base64url:Dt,sha512_hex:/^[0-9a-fA-F]{128}$/,string:lt,time:st,ulid:Ne,undefined:ht,unicodeEmail:Fe,uppercase:vt,uuid:Ze,uuid4:Me,uuid6:qe,uuid7:Be,xid:Ue});const Tt=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)=>{Tt.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})}}),Ut=i("$ZodCheckGreaterThan",(e,t)=>{Tt.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})}}),Pt=i("$ZodCheckMultipleOf",(e,t)=>{Tt.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})}}),jt=i("$ZodCheckNumberFormat",(e,t)=>{Tt.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})}}),Lt=i("$ZodCheckBigIntFormat",(e,t)=>{Tt.init(e,t);const[n,i]=U[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;Tt.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:V(i),code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Zt=i("$ZodCheckMinSize",(e,t)=>{var n;Tt.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:V(i),code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Mt=i("$ZodCheckSizeEquals",(e,t)=>{var n;Tt.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:V(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})}}),qt=i("$ZodCheckMaxLength",(e,t)=>{var n;Tt.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=W(i);n.issues.push({origin:r,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Bt=i("$ZodCheckMinLength",(e,t)=>{var n;Tt.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=W(i);n.issues.push({origin:r,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Ht=i("$ZodCheckLengthEquals",(e,t)=>{var n;Tt.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=W(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})}}),Ft=i("$ZodCheckStringFormat",(e,t)=>{var n,i;Tt.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=()=>{})}),Jt=i("$ZodCheckRegex",(e,t)=>{Ft.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})}}),Vt=i("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=gt),Ft.init(e,t)}),Wt=i("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=vt),Ft.init(e,t)}),Kt=i("$ZodCheckIncludes",(e,t)=>{Tt.init(e,t);const n=E(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})}}),Gt=i("$ZodCheckStartsWith",(e,t)=>{Tt.init(e,t);const n=new RegExp(`^${E(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)=>{Tt.init(e,t);const n=new RegExp(`.*${E(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(...H(n,e.issues))}const Qt=i("$ZodCheckProperty",(e,t)=>{Tt.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)=>{Tt.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)=>{Tt.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=B(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=B(e,t)))});else{if(e.issues.length===t)continue;r||(r=B(e,t))}}return i?i.then(()=>e):e},n=(n,r,a)=>{if(B(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()??lt(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)=>{Ft.init(e,t),an.init(e,t)}),un=i("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Re),sn.init(e,t)}),ln=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=Ze(e))}else t.pattern??(t.pattern=Ze());sn.init(e,t)}),cn=i("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=He),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=Ve()),sn.init(e,t)}),mn=i("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=je),sn.init(e,t)}),fn=i("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Te),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=Ue),sn.init(e,t)}),bn=i("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Pe),sn.init(e,t)}),yn=i("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=ut(t)),sn.init(e,t)}),$n=i("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=ot),sn.init(e,t)}),kn=i("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=st(t)),sn.init(e,t)}),_n=i("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Le),sn.init(e,t)}),wn=i("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=We),sn.init(e,t),e._zod.bag.format="ipv4"}),xn=i("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Ke),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=Ge(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)}),On=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 zn(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const En=i("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Qe),sn.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{zn(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Dn(e){if(!et.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return zn(t.padEnd(4*Math.ceil(t.length/4),"="))}const Cn=i("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=et),sn.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Dn(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Tn=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})}}),Un=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})}}),Pn=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}}),jn=i("$ZodNumberFormat",(e,t)=>{jt.init(e,t),Pn.init(e,t)}),Ln=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=ct,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}}),Zn=i("$ZodBigIntFormat",(e,t)=>{Lt.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}}),qn=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}}),Bn=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}}),Hn=i("$ZodAny",(e,t)=>{on.init(e,t),e._zod.parse=e=>e}),Fn=i("$ZodUnknown",(e,t)=>{on.init(e,t),e._zod.parse=e=>e}),Jn=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)}),Vn=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}}),Wn=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 Kn(e,t,n){e.issues.length&&t.issues.push(...H(n,e.issues)),t.value[n]=e.value}const Gn=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=>Kn(t,n,e))):Kn(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(...H(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,u=r.catchall._zod,l=u.def.type,c="optional"===u.optout;for(const r in t){if(s.has(r))continue;if("never"===l){a.push(r);continue}const o=u.run({value:t[r],issues:[]},i);o instanceof Promise?e.push(o.then(e=>Xn(e,n,r,t,c))):Xn(o,n,r,t,c)}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 u=[],l=a.shape;for(const e of a.keys){const i=l[e],r="optional"===i._zod.optout,o=i._zod.run({value:s[e],issues:[]},n);o instanceof Promise?u.push(o.then(n=>Xn(n,t,e,s,r))):Xn(o,t,e,s,r)}return o?Qn(u,s,t,n,i.value,e):u.length?Promise.all(u).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,u=a&&x.value,l=t.catchall;let c;e._zod.parse=(s,d)=>{c??(c=i.value);const p=s.value;return o(p)?a&&u&&!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],u="optional"===s?._zod?.optout;t.write(`const ${n} = ${r(i)};`),u?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),l?Qn([],p,s,d,c,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=>!B(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=>J(e,i,u())))}),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=>J(e,i,u())))}):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])=>li(e,t,n)):li(e,r,o)}});function ui(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=ui(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=ui(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 li(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}),B(e))return e;const a=ui(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 ci=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),u=-1===s?0:n.length-s;if(!t.rest){const t=o.length>n.length,r=o.length<u-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 l=-1;for(const e of n){if(l++,l>=o.length&&l>=u)continue;const t=e._zod.run({value:o[l],issues:[]},r);t instanceof Promise?a.push(t.then(e=>di(e,i,l))):di(t,i,l)}if(t.rest){const e=o.slice(n.length);for(const n of e){l++;const e=t.rest._zod.run({value:n,issues:[]},r);e instanceof Promise?a.push(e.then(e=>di(e,i,l))):di(e,i,l)}}return a.length?Promise.all(a).then(()=>i):i}});function di(e,t,n){e.issues.length&&t.issues.push(...H(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(...H(e,t.issues)),n.value[e]=t.value})):(a.issues.length&&n.issues.push(...H(e,a.issues)),n.value[e]=a.value)}let u;for(const e in r)s.has(e)||(u=u??[],u.push(e));u&&u.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:u})}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=>J(e,i,u())),input:a,path:[a],inst:e});continue}const l=t.valueType._zod.run({value:r[a],issues:[]},i);l instanceof Promise?o.push(l.then(e=>{e.issues.length&&n.issues.push(...H(a,e.issues)),n.value[s.value]=e.value})):(l.issues.length&&n.issues.push(...H(a,l.issues)),n.value[s.value]=l.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 u=t.keyType._zod.run({value:a,issues:[]},i),l=t.valueType._zod.run({value:s,issues:[]},i);u instanceof Promise||l instanceof Promise?o.push(Promise.all([u,l]).then(([t,o])=>{fi(t,o,n,a,r,e,i)})):fi(u,l,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&&(O.has(typeof i)?n.issues.push(...H(i,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:o,issues:e.issues.map(e=>J(e,a,u()))})),t.issues.length&&(O.has(typeof i)?n.issues.push(...H(i,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:o,key:i,issues:t.issues.map(e=>J(e,a,u()))})),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=l(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(e=>O.has(typeof e)).map(e=>"string"==typeof e?E(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?E(e):e?E(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 ki(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}const _i=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=>ki(t,e.value)):ki(i,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),wi=i("$ZodExactOptional",(e,t)=>{_i.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 Oi=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))}),zi=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=>Ei(t,e)):Ei(r,e)}});function Ei(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 Di=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)}}),Ci=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=>J(e,n,u()))},input:e.value}),e.issues=[]),e)):(e.value=i.value,i.issues.length&&(e.value=t.catchValue({...e,error:{issues:i.issues.map(e=>J(e,n,u()))},input:e.value}),e.issues=[]),e)}}),Ti=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 Ui=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=>Pi(e,t,n)):Pi(i,t,n)}{const i=t.out._zod.run(e,n);return i instanceof Promise?i.then(e=>Pi(e,t,n)):Pi(i,t,n)}}});function Pi(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=>ji(e,i,t.out,n)):ji(e,i,t.out,n)}{const i=t.reverseTransform(e.value,e);return i instanceof Promise?i.then(i=>ji(e,i,t.in,n)):ji(e,i,t.in,n)}}function ji(e,t,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},i)}const Li=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 Zi=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&&!z.has(typeof e))throw new Error(`Invalid template literal part: ${e}`);n.push(E(`${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?le(e._def.input,n):n,r=Reflect.apply(t,this,i);return e._def.output?le(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 ci({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)),qi=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))}),Bi=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)}),Hi=i("$ZodCustom",(e,t)=>{Tt.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=>Fi(t,n,i,e));Fi(r,n,i,e)}});function Fi(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(G(e))}}const Ji=()=>{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=K(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?`مدخلات غير مقبولة: يفترض إدخال ${T(e.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${c(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?"ة":""}: ${c(e.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${e.origin}`;case"invalid_union":default:return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${e.origin}`}}};const Vi=()=>{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=K(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 ${T(e.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${c(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":""}: ${c(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 Wi(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 Ki=()=>{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=K(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?`Няправільны ўвод: чакалася ${T(e.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${c(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);if(i){const t=Wi(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=Wi(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?"ключы":"ключ"}: ${c(e.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${e.origin}`;case"invalid_union":default:return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${e.origin}`}}};const Gi=()=>{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=K(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?`Невалиден вход: очакван ${T(e.values[0])}`:`Невалидна опция: очаквано едно от ${c(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?"ове":""}: ${c(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=K(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 ${T(e.values[0])}`:`Opció invàlida: s'esperava una de ${c(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":""}: ${c(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=K(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 ${T(e.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${c(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: ${c(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=K(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 ${T(e.values[0])}`:`Ugyldigt valg: forventede en af følgende ${c(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"}: ${c(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=K(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 ${T(e.values[0])}`:`Ungültige Option: erwartet eine von ${c(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"}: ${c(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=K(e.input);return`Invalid input: expected ${t}, received ${i[n]??n}`}case"invalid_value":return 1===e.values.length?`Invalid input: expected ${T(e.values[0])}`:`Invalid option: expected one of ${c(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":""}: ${c(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=K(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 ${T(e.values[0])}`:`Nevalida opcio: atendiĝis unu el ${c(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":""}: ${c(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=K(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 ${T(e.values[0])}`:`Opción inválida: se esperaba una de ${c(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":""}: ${c(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=K(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?`ورودی نامعتبر: می‌بایست ${T(e.values[0])} می‌بود`:`گزینه نامعتبر: می‌بایست یکی از ${c(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?"های":""} ناشناس: ${c(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=K(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 ${T(e.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${c(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"}: ${c(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=K(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 : ${T(e.values[0])} attendu`:`Option invalide : une valeur parmi ${c(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":""} : ${c(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 ur=()=>{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=K(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 ${T(e.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${c(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":""} : ${c(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:{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"}},u={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{const n=t.expected,r=u[n??""]??i(n),o=K(t.input),a=u[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`ערך לא תקין: הערך חייב להיות ${T(t.values[0])}`;const e=t.values.map(e=>T(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?"ים":"ה"}: ${c(t.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":default:return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${r(t.origin??"array")}`}}};const cr=()=>{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=K(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 ${T(e.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${c(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":""}: ${c(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=K(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?`Սխալ մուտքագրում․ սպասվում էր ${T(e.values[1])}`:`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${c(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?"ներ":""}. ${c(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=K(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 ${T(e.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${c(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":""}: ${c(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=K(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 ${T(e.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${c(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"}: ${c(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=K(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 ${T(e.values[0])}`:`Opzione non valida: atteso uno tra ${c(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"}: ${c(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=K(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?`無効な入力: ${T(e.values[0])}が期待されました`:`無効な選択: ${c(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?"群":""}: ${c(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=K(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?`არასწორი შეყვანა: მოსალოდნელი ${T(e.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${c(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?"ები":"ი"}: ${c(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=K(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?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${T(e.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${c(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`រកឃើញសោមិនស្គាល់៖ ${c(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 kr=()=>{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=K(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?`잘못된 입력: 값은 ${T(e.values[0])} 이어야 합니다`:`잘못된 옵션: ${c(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`인식할 수 없는 키: ${c(e.keys,", ")}`;case"invalid_key":return`잘못된 키: ${e.origin}`;case"invalid_union":default:return"잘못된 입력";case"invalid_element":return`잘못된 값: ${e.origin}`}}};const _r=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=K(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 ${T(e.values[0])}`:`Privalo būti vienas iš ${c(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`${_r(n??e.origin??"reikšmė")} ${r.verb} ${e.maximum.toString()} ${r.unit??"elementų"}`;const o=e.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${_r(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`${_r(n??e.origin??"reikšmė")} ${r.verb} ${e.minimum.toString()} ${r.unit??"elementų"}`;const o=e.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${_r(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"}: ${c(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`${_r(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=K(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 ${T(e.values[0])}`:`Грешана опција: се очекува една ${c(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?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${c(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=K(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 ${T(e.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${c(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: ${c(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 Or=()=>{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=K(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 ${T(e.values[0])}`:`Ongeldige optie: verwacht één van ${c(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":""}: ${c(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 zr=()=>{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=K(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 ${T(e.values[0])}`:`Ugyldig valg: forventet en av ${c(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"}: ${c(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 Er=()=>{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=K(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 ${T(e.values[0])}`:`Fâsit tercih: mûteberler ${c(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":""}: ${c(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 Dr=()=>{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=K(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?`ناسم ورودي: باید ${T(e.values[0])} وای`:`ناسم انتخاب: باید یو له ${c(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?"کلیډونه":"کلیډ"}: ${c(e.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${e.origin} کې`;case"invalid_union":default:return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${e.origin} کې`}}};const Cr=()=>{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=K(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 ${T(e.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${c(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":""}: ${c(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 Tr=()=>{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=K(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 ${T(e.values[0])}`:`Opção inválida: esperada uma das ${c(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":""}: ${c(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=K(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?`Неверный ввод: ожидалось ${T(e.values[0])}`:`Неверный вариант: ожидалось одно из ${c(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?"и":""}: ${c(e.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${e.origin}`;case"invalid_union":default:return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${e.origin}`}}};const Ur=()=>{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=K(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 ${T(e.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${c(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č"}: ${c(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 Pr=()=>{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=K(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 ${T(e.values[0])}`:`Ogiltigt val: förväntade en av ${c(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"}: ${c(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 jr=()=>{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=K(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?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${T(e.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${c(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?"கள்":""}: ${c(e.keys,", ")}`;case"invalid_key":return`${e.origin} இல் தவறான விசை`;case"invalid_union":default:return"தவறான உள்ளீடு";case"invalid_element":return`${e.origin} இல் தவறான மதிப்பு`}}};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:"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=K(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?`ค่าไม่ถูกต้อง: ควรเป็น ${T(e.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${c(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`พบคีย์ที่ไม่รู้จัก: ${c(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=K(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 ${T(e.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${c(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":""}: ${c(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 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:"діапазон 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=K(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?`Неправильні вхідні дані: очікується ${T(e.values[0])}`:`Неправильна опція: очікується одне з ${c(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?"і":""}: ${c(e.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${e.origin}`;case"invalid_union":default:return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${e.origin}`}}};function Mr(){return{localeError:Zr()}}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:"یو آر ایل",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=K(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?`غلط ان پٹ: ${T(e.values[0])} متوقع تھا`:`غلط آپشن: ${c(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?"ز":""}: ${c(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:"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=K(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 ${T(e.values[0])}`:`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${c(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":""}: ${c(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 Hr=()=>{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=K(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 ${T(e.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${c(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: ${c(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 Fr=()=>{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=K(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?`无效输入:期望 ${T(e.values[0])}`:`无效选项:期望以下之一 ${c(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): ${c(e.keys,", ")}`;case"invalid_key":return`${e.origin} 中的键(key)无效`;case"invalid_union":default:return"无效输入";case"invalid_element":return`${e.origin} 中包含无效值(value)`}}};const Jr=()=>{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=K(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?`無效的輸入值:預期為 ${T(e.values[0])}`:`無效的選項:預期為以下其中之一 ${c(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?"們":""}:${c(e.keys,"、")}`;case"invalid_key":return`${e.origin} 中有無效的鍵值`;case"invalid_union":default:return"無效的輸入值";case"invalid_element":return`${e.origin} 中有無效的值`}}};const Vr=()=>{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=K(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 ${T(e.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${c(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ọ̀: ${c(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 Wr,Kr=Object.freeze({__proto__:null,ar:function(){return{localeError:Ji()}},az:function(){return{localeError:Vi()}},be:function(){return{localeError:Ki()}},bg:function(){return{localeError:Gi()}},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:ur()}},he:function(){return{localeError:lr()}},hu:function(){return{localeError:cr()}},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:kr()}},lt:function(){return{localeError:xr()}},mk:function(){return{localeError:Ir()}},ms:function(){return{localeError:Sr()}},nl:function(){return{localeError:Or()}},no:function(){return{localeError:zr()}},ota:function(){return{localeError:Er()}},pl:function(){return{localeError:Cr()}},ps:function(){return{localeError:Dr()}},pt:function(){return{localeError:Tr()}},ru:function(){return{localeError:Nr()}},sl:function(){return{localeError:Ur()}},sv:function(){return{localeError:Pr()}},ta:function(){return{localeError:jr()}},th:function(){return{localeError:Lr()}},tr:function(){return{localeError:Rr()}},ua:function(){return Mr()},uk:Mr,ur:function(){return{localeError:qr()}},uz:function(){return{localeError:Br()}},vi:function(){return{localeError:Hr()}},yo:function(){return{localeError:Vr()}},zhCN:function(){return{localeError:Fr()}},zhTW:function(){return{localeError:Jr()}}});const Gr=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}(Wr=globalThis).__zod_globalRegistry??(Wr.__zod_globalRegistry=Qr());const eo=globalThis.__zod_globalRegistry;function to(e,t){return new e({type:"string",...C(t)})}function no(e,t){return new e({type:"string",coerce:!0,...C(t)})}function io(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...C(t)})}function ro(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...C(t)})}function oo(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...C(t)})}function ao(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...C(t)})}function so(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...C(t)})}function uo(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...C(t)})}function lo(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...C(t)})}function co(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...C(t)})}function po(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...C(t)})}function mo(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...C(t)})}function fo(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...C(t)})}function ho(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...C(t)})}function go(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...C(t)})}function vo(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...C(t)})}function bo(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...C(t)})}function yo(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...C(t)})}function $o(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...C(t)})}function ko(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...C(t)})}function _o(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...C(t)})}function wo(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...C(t)})}function xo(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...C(t)})}function Io(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...C(t)})}function So(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...C(t)})}const Oo={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function zo(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...C(t)})}function Eo(e,t){return new e({type:"string",format:"date",check:"string_format",...C(t)})}function Do(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...C(t)})}function Co(e,t){return new e({type:"string",format:"duration",check:"string_format",...C(t)})}function To(e,t){return new e({type:"number",checks:[],...C(t)})}function Ao(e,t){return new e({type:"number",coerce:!0,checks:[],...C(t)})}function No(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...C(t)})}function Uo(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...C(t)})}function Po(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...C(t)})}function jo(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...C(t)})}function Lo(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...C(t)})}function Ro(e,t){return new e({type:"boolean",...C(t)})}function Zo(e,t){return new e({type:"boolean",coerce:!0,...C(t)})}function Mo(e,t){return new e({type:"bigint",...C(t)})}function qo(e,t){return new e({type:"bigint",coerce:!0,...C(t)})}function Bo(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...C(t)})}function Ho(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...C(t)})}function Fo(e,t){return new e({type:"symbol",...C(t)})}function Jo(e,t){return new e({type:"undefined",...C(t)})}function Vo(e,t){return new e({type:"null",...C(t)})}function Wo(e){return new e({type:"any"})}function Ko(e){return new e({type:"unknown"})}function Go(e,t){return new e({type:"never",...C(t)})}function Xo(e,t){return new e({type:"void",...C(t)})}function Yo(e,t){return new e({type:"date",...C(t)})}function Qo(e,t){return new e({type:"date",coerce:!0,...C(t)})}function ea(e,t){return new e({type:"nan",...C(t)})}function ta(e,t){return new Nt({check:"less_than",...C(t),value:e,inclusive:!1})}function na(e,t){return new Nt({check:"less_than",...C(t),value:e,inclusive:!0})}function ia(e,t){return new Ut({check:"greater_than",...C(t),value:e,inclusive:!1})}function ra(e,t){return new Ut({check:"greater_than",...C(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 ua(e){return ra(0,e)}function la(e,t){return new Pt({check:"multiple_of",...C(t),value:e})}function ca(e,t){return new Rt({check:"max_size",...C(t),maximum:e})}function da(e,t){return new Zt({check:"min_size",...C(t),minimum:e})}function pa(e,t){return new Mt({check:"size_equals",...C(t),size:e})}function ma(e,t){return new qt({check:"max_length",...C(t),maximum:e})}function fa(e,t){return new Bt({check:"min_length",...C(t),minimum:e})}function ha(e,t){return new Ht({check:"length_equals",...C(t),length:e})}function ga(e,t){return new Jt({check:"string_format",format:"regex",...C(t),pattern:e})}function va(e){return new Vt({check:"string_format",format:"lowercase",...C(e)})}function ba(e){return new Wt({check:"string_format",format:"uppercase",...C(e)})}function ya(e,t){return new Kt({check:"string_format",format:"includes",...C(t),includes:e})}function $a(e,t){return new Gt({check:"string_format",format:"starts_with",...C(t),prefix:e})}function ka(e,t){return new Xt({check:"string_format",format:"ends_with",...C(t),suffix:e})}function _a(e,t,n){return new Qt({check:"property",property:e,schema:t,...C(n)})}function wa(e,t){return new en({check:"mime_type",mime:e,...C(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 Oa(){return xa(e=>e.toLowerCase())}function za(){return xa(e=>e.toUpperCase())}function Ea(){return xa(e=>k(e))}function Da(e,t,n){return new e({type:"array",element:t,...C(n)})}function Ca(e,t){return new e({type:"file",...C(t)})}function Ta(e,t,n){const i=C(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,...C(n)})}function Na(e){const t=Ua(n=>(n.addIssue=e=>{if("string"==typeof e)n.issues.push(G(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(G(i))}},e(n.value,n)));return t}function Ua(e,t){const n=new Tt({check:"custom",...C(t)});return n._zod.check=e,n}function Pa(e){const t=new Tt({check:"describe"});return t._zod.onattach=[t=>{const n=eo.get(t)??{};eo.add(t,{...n,description:e})}],t._zod.check=()=>{},t}function ja(e){const t=new Tt({check:"meta"});return t._zod.onattach=[t=>{const n=eo.get(t)??{};eo.add(t,{...n,...e})}],t._zod.check=()=>{},t}function La(e,t){const n=C(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??Ui,u=e.Boolean??Ln,l=new s({type:"pipe",in:new(e.String??an)({type:"string",error:n.error}),out:new u({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:l,continue:!1}),{})},reverseTransform:(e,t)=>!0===e?i[0]||"true":r[0]||"false",error:n.error});return l}function Ra(e,t,n,i={}){const r=C(i),o={...C(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 Za(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 u=t.metadataRegistry.get(e);u&&Object.assign(a.schema,u),"input"===t.io&&Ha(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 qa(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 Ba(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:Ja(t,"input",e.processors),output:Ja(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch(e){throw new Error("Error converting schema to JSON.")}}function Ha(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 Ha(i.element,n);if("set"===i.type)return Ha(i.valueType,n);if("lazy"===i.type)return Ha(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 Ha(i.innerType,n);if("intersection"===i.type)return Ha(i.left,n)||Ha(i.right,n);if("record"===i.type||"map"===i.type)return Ha(i.keyType,n)||Ha(i.valueType,n);if("pipe"===i.type)return Ha(i.in,n)||Ha(i.out,n);if("object"===i.type){for(const e in i.shape)if(Ha(i.shape[e],n))return!0;return!1}if("union"===i.type){for(const e of i.options)if(Ha(e,n))return!0;return!1}if("tuple"===i.type){for(const e of i.items)if(Ha(e,n))return!0;return!(!i.rest||!Ha(i.rest,n))}return!1}const Fa=(e,t={})=>n=>{const i=Za({...n,processors:t});return Ma(e,i),qa(i,e),Ba(i,e)},Ja=(e,t,n={})=>i=>{const{libraryOptions:r,target:o}=i??{},a=Za({...r??{},target:o,io:t,processors:n});return Ma(e,a),qa(a,e),Ba(a,e)},Va={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Wa=(e,t,n,i)=>{const r=n;r.type="string";const{minimum:o,maximum:a,format:s,patterns:u,contentEncoding:l}=e._zod.bag;if("number"==typeof o&&(r.minLength=o),"number"==typeof a&&(r.maxLength=a),s&&(r.format=Va[s]??s,""===r.format&&delete r.format,"time"===s&&delete r.format),l&&(r.contentEncoding=l),u&&u.size>0){const e=[...u];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}))])}},Ka=(e,t,n,i)=>{const r=n,{minimum:o,maximum:a,format:s,multipleOf:u,exclusiveMaximum:l,exclusiveMinimum:c}=e._zod.bag;"string"==typeof s&&s.includes("int")?r.type="integer":r.type="number","number"==typeof c&&("draft-04"===t.target||"openapi-3.0"===t.target?(r.minimum=c,r.exclusiveMinimum=!0):r.exclusiveMinimum=c),"number"==typeof o&&(r.minimum=o,"number"==typeof c&&"draft-04"!==t.target&&(c>=o?delete r.minimum:delete r.exclusiveMinimum)),"number"==typeof l&&("draft-04"===t.target||"openapi-3.0"===t.target?(r.maximum=l,r.exclusiveMaximum=!0):r.exclusiveMaximum=l),"number"==typeof a&&(r.maximum=a,"number"==typeof l&&"draft-04"!==t.target&&(l<=a?delete r.maximum:delete r.exclusiveMaximum)),"number"==typeof u&&(r.multipleOf=u)},Ga=(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=l(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},us=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("NaN cannot be represented in JSON Schema")},ls=(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},cs=(e,t,n,i)=>{const r=n,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:u}=e._zod.bag;void 0!==a&&(o.minLength=a),void 0!==s&&(o.maxLength=s),u?1===u.length?(o.contentMediaType=u[0],Object.assign(r,o)):(Object.assign(r,o),r.anyOf=u.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)),u=new Set([...s].filter(e=>{const n=o.shape[e]._zod;return"input"===t.io?void 0===n.optin:void 0===n.optout}));u.size>0&&(r.required=Array.from(u)),"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,u=[...s(o)?o.allOf:[o],...s(a)?a.allOf:[a]];n.allOf=u},ks=(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",u=o.items.map((e,n)=>Ma(e,t,{...i,path:[...i.path,a,n]})),l=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=u,l&&(r.items=l)):"openapi-3.0"===t.target?(r.items={anyOf:u},l&&r.items.anyOf.push(l),r.minItems=u.length,l||(r.maxItems=u.length)):(r.items=u,l&&(r.additionalItems=l));const{minimum:c,maximum:d}=e._zod.bag;"number"==typeof c&&(r.minItems=c),"number"==typeof d&&(r.maxItems=d)},_s=(e,t,n,i)=>{const r=n,o=e._zod.def;r.type="object";const a=o.keyType,s=a._zod.bag,u=s?.patterns;if("loose"===o.mode&&u&&u.size>0){const e=Ma(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});r.patternProperties={};for(const t of u)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 l=a._zod.values;if(l){const e=[...l].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)))},Os=(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},zs=(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},Es=(e,t,n,i)=>{const r=e._zod.def;Ma(r.innerType,t,i);t.seen.get(e).ref=r.innerType,n.readOnly=!0},Ds=(e,t,n,i)=>{const r=e._zod.def;Ma(r.innerType,t,i);t.seen.get(e).ref=r.innerType},Cs=(e,t,n,i)=>{const r=e._zod.def;Ma(r.innerType,t,i);t.seen.get(e).ref=r.innerType},Ts=(e,t,n,i)=>{const r=e._zod.innerType;Ma(r,t,i);t.seen.get(e).ref=r},As={string:Wa,number:Ka,boolean:Ga,bigint:Xa,symbol:Ya,null:Qa,undefined:es,void:ts,never:ns,any:is,unknown:rs,date:os,enum:as,literal:ss,nan:us,template_literal:ls,file:cs,success:ds,custom:ps,function:ms,transform:fs,map:hs,set:gs,array:vs,object:bs,union:ys,intersection:$s,tuple:ks,record:_s,nullable:ws,nonoptional:xs,default:Is,prefault:Ss,catch:Os,pipe:zs,readonly:Es,promise:Ds,optional:Cs,lazy:Ts};function Ns(e,t){if("_idmap"in e){const n=e,i=Za({...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;qa(i,n),o[t]=Ba(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=Za({...t,processors:As});return Ma(e,n),qa(n,e),Ba(n,e)}var Us=Object.freeze({__proto__:null}),Ps=Object.freeze({__proto__:null,$ZodAny:Hn,$ZodArray:Gn,$ZodAsyncError:o,$ZodBase64:En,$ZodBase64URL:Cn,$ZodBigInt:Rn,$ZodBigIntFormat:Zn,$ZodBoolean:Ln,$ZodCIDRv4:Sn,$ZodCIDRv6:On,$ZodCUID:fn,$ZodCUID2:hn,$ZodCatch:Ci,$ZodCheck:Tt,$ZodCheckBigIntFormat:Lt,$ZodCheckEndsWith:Xt,$ZodCheckGreaterThan:Ut,$ZodCheckIncludes:Kt,$ZodCheckLengthEquals:Ht,$ZodCheckLessThan:Nt,$ZodCheckLowerCase:Vt,$ZodCheckMaxLength:qt,$ZodCheckMaxSize:Rt,$ZodCheckMimeType:en,$ZodCheckMinLength:Bt,$ZodCheckMinSize:Zt,$ZodCheckMultipleOf:Pt,$ZodCheckNumberFormat:jt,$ZodCheckOverwrite:tn,$ZodCheckProperty:Qt,$ZodCheckRegex:Jt,$ZodCheckSizeEquals:Mt,$ZodCheckStartsWith:Gt,$ZodCheckStringFormat:Ft,$ZodCheckUpperCase:Wt,$ZodCodec:Ui,$ZodCustom:Hi,$ZodCustomStringFormat:Un,$ZodDate:Wn,$ZodDefault:Ii,$ZodDiscriminatedUnion:ai,$ZodE164:Tn,$ZodEmail:cn,$ZodEmoji:pn,$ZodEncodeError:a,$ZodEnum:vi,$ZodError:te,$ZodExactOptional:wi,$ZodFile:yi,$ZodFunction:Mi,$ZodGUID:un,$ZodIPv4:wn,$ZodIPv6:xn,$ZodISODate:$n,$ZodISODateTime:yn,$ZodISODuration:_n,$ZodISOTime:kn,$ZodIntersection:si,$ZodJWT:Nn,$ZodKSUID:bn,$ZodLazy:Bi,$ZodLiteral:bi,$ZodMAC:In,$ZodMap:mi,$ZodNaN:Ti,$ZodNanoID:mn,$ZodNever:Jn,$ZodNonOptional:zi,$ZodNull:Bn,$ZodNullable:xi,$ZodNumber:Pn,$ZodNumberFormat:jn,$ZodObject:ei,$ZodObjectJIT:ti,$ZodOptional:_i,$ZodPipe:Ai,$ZodPrefault:Oi,$ZodPromise:qi,$ZodReadonly:Li,$ZodRealError:ne,$ZodRecord:pi,$ZodRegistry:Yr,$ZodSet:hi,$ZodString:an,$ZodStringFormat:sn,$ZodSuccess:Di,$ZodSymbol:Mn,$ZodTemplateLiteral:Zi,$ZodTransform:$i,$ZodTuple:ci,$ZodType:on,$ZodULID:gn,$ZodURL:dn,$ZodUUID:ln,$ZodUndefined:qn,$ZodUnion:ii,$ZodUnknown:Fn,$ZodVoid:Vn,$ZodXID:vn,$ZodXor:oi,$brand:r,$constructor:i,$input:Xr,$output:Gr,Doc:nn,JSONSchema:Us,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=Za({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)),qa(this.ctx,e);const n=Ba(this.ctx,e),{"~standard":i,...r}=n;return r}},NEVER:n,TimePrecision:Oo,_any:Wo,_array:Da,_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:Ua,_cidrv4:ko,_cidrv6:_o,_coercedBigint:qo,_coercedBoolean:Zo,_coercedDate:Qo,_coercedNumber:Ao,_coercedString:no,_cuid:mo,_cuid2:fo,_custom:Ta,_date:Yo,_decode:be,_decodeAsync:_e,_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,...C(i)})},_e164:Io,_email:io,_emoji:co,_encode:ge,_encodeAsync:$e,_endsWith:ka,_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,...C(n)})},_file:Ca,_float32:Uo,_float64:Po,_gt:ia,_gte:ra,_guid:ro,_includes:ya,_int:No,_int32:jo,_int64:Bo,_intersection:function(e,t,n){return new e({type:"intersection",left:t,right:n})},_ipv4:bo,_ipv6:yo,_isoDate:Eo,_isoDateTime:zo,_isoDuration:Co,_isoTime:Do,_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],...C(n)})},_lowercase:va,_lt:ta,_lte:na,_mac:$o,_map:function(e,t,n,i){return new e({type:"map",keyType:t,valueType:n,...C(i)})},_max:na,_maxLength:ma,_maxSize:ca,_mime:wa,_min:ra,_minLength:fa,_minSize:da,_multipleOf:la,_nan:ea,_nanoid:po,_nativeEnum:function(e,t,n){return new e({type:"enum",entries:t,...C(n)})},_negative:aa,_never:Go,_nonnegative:ua,_nonoptional:function(e,t,n){return new e({type:"nonoptional",innerType:t,...C(n)})},_nonpositive:sa,_normalize:Ia,_null:Vo,_nullable:function(e,t){return new e({type:"nullable",innerType:t})},_number:To,_optional:function(e,t){return new e({type:"optional",innerType:t})},_overwrite:xa,_parse:ue,_parseAsync:ce,_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:_a,_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,...C(i)})},_refine:Aa,_regex:ga,_safeDecode:Se,_safeDecodeAsync:De,_safeEncode:xe,_safeEncodeAsync:ze,_safeParse:pe,_safeParseAsync:fe,_set:function(e,t,n){return new e({type:"set",valueType:t,...C(n)})},_size:pa,_slugify:Ea,_startsWith:$a,_string:to,_stringFormat:Ra,_stringbool:La,_success:function(e,t){return new e({type:"success",innerType:t})},_superRefine:Na,_symbol:Fo,_templateLiteral:function(e,t,n){return new e({type:"template_literal",parts:t,...C(n)})},_toLowerCase:Oa,_toUpperCase:za,_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,...C(r?i:n)})},_uint32:Lo,_uint64:Ho,_ulid:ho,_undefined:Jo,_union:function(e,t,n){return new e({type:"union",options:t,...C(n)})},_unknown:Ko,_uppercase:ba,_url:lo,_uuid:oo,_uuidv4:ao,_uuidv6:so,_uuidv7:uo,_void:Xo,_xid:go,_xor:function(e,t,n){return new e({type:"union",options:t,inclusive:!1,...C(n)})},clone:D,config:u,createStandardJSONSchemaMethod:Ja,createToJSONSchemaMethod:Fa,decode:ye,decodeAsync:we,describe:Pa,encode:ve,encodeAsync:ke,extractDefs:qa,finalize:Ba,flattenError:ie,formatError:re,globalConfig:s,globalRegistry:eo,initializeContext:Za,isValidBase64:zn,isValidBase64URL:Dn,isValidJWT:An,locales:Kr,meta:ja,parse:le,parseAsync:de,prettifyError:se,process:Ma,regexes:Ct,registry:Qr,safeDecode:Oe,safeDecodeAsync:Ce,safeEncode:Ie,safeEncodeAsync:Ee,safeParse:me,safeParseAsync:he,toDotPath:ae,toJSONSchema:Ns,treeifyError:oe,util:Q,version:rn});function js(e){return!!e._zod}function Ls(e,t){if(js(e)){return me(e,t)}return e.safeParse(t)}var Rs=Object.freeze({__proto__:null,endsWith:ka,gt:ia,gte:ra,includes:ya,length:ha,lowercase:va,lt:ta,lte:na,maxLength:ma,maxSize:ca,mime:wa,minLength:fa,minSize:da,multipleOf:la,negative:aa,nonnegative:ua,nonpositive:sa,normalize:Ia,overwrite:xa,positive:oa,property:_a,regex:ga,size:pa,slugify:Ea,startsWith:$a,toLowerCase:Oa,toUpperCase:za,trim:Sa,uppercase:ba});const Zs=i("ZodISODateTime",(e,t)=>{yn.init(e,t),fu.init(e,t)});function Ms(e){return zo(Zs,e)}const qs=i("ZodISODate",(e,t)=>{$n.init(e,t),fu.init(e,t)});function Bs(e){return Eo(qs,e)}const Hs=i("ZodISOTime",(e,t)=>{kn.init(e,t),fu.init(e,t)});function Fs(e){return Do(Hs,e)}const Js=i("ZodISODuration",(e,t)=>{_n.init(e,t),fu.init(e,t)});function Vs(e){return Co(Js,e)}var Ws=Object.freeze({__proto__:null,ZodISODate:qs,ZodISODateTime:Zs,ZodISODuration:Js,ZodISOTime:Hs,date:Bs,datetime:Ms,duration:Vs,time:Fs});const Ks=(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}})},Gs=i("ZodError",Ks),Xs=i("ZodError",Ks,{Parent:Error}),Ys=ue(Xs),Qs=ce(Xs),eu=pe(Xs),tu=fe(Xs),nu=ge(Xs),iu=be(Xs),ru=$e(Xs),ou=_e(Xs),au=xe(Xs),su=Se(Xs),uu=ze(Xs),lu=De(Xs),cu=i("ZodType",(e,t)=>(on.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Ja(e,"input"),output:Ja(e,"output")}}),e.toJSONSchema=Fa(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)=>D(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)=>eu(e,t,n),e.parseAsync=async(t,n)=>Qs(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>tu(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>nu(e,t,n),e.decode=(t,n)=>iu(e,t,n),e.encodeAsync=async(t,n)=>ru(e,t,n),e.decodeAsync=async(t,n)=>ou(e,t,n),e.safeEncode=(t,n)=>au(e,t,n),e.safeDecode=(t,n)=>su(e,t,n),e.safeEncodeAsync=async(t,n)=>uu(e,t,n),e.safeDecodeAsync=async(t,n)=>lu(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=()=>_c(e),e.exactOptional=()=>xc(e),e.nullable=()=>Sc(e),e.nullish=()=>_c(Sc(e)),e.nonoptional=t=>Ac(e,t),e.array=()=>ql(e),e.or=t=>Kl([e,t]),e.and=t=>tc(e,t),e.transform=t=>Mc(e,$c(t)),e.default=t=>Ec(e,t),e.prefault=t=>Cc(e,t),e.catch=t=>jc(e,t),e.pipe=t=>Mc(e,t),e.readonly=()=>Fc(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)),du=i("_ZodString",(e,t)=>{an.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Wa(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(ka(...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(Oa()),e.toUpperCase=()=>e.check(za()),e.slugify=()=>e.check(Ea())}),pu=i("ZodString",(e,t)=>{an.init(e,t),du.init(e,t),e.email=t=>e.check(io(hu,t)),e.url=t=>e.check(lo(xu,t)),e.jwt=t=>e.check(So(il,t)),e.emoji=t=>e.check(co(Ou,t)),e.guid=t=>e.check(ro(vu,t)),e.uuid=t=>e.check(oo(yu,t)),e.uuidv4=t=>e.check(ao(yu,t)),e.uuidv6=t=>e.check(so(yu,t)),e.uuidv7=t=>e.check(uo(yu,t)),e.nanoid=t=>e.check(po(Eu,t)),e.guid=t=>e.check(ro(vu,t)),e.cuid=t=>e.check(mo(Cu,t)),e.cuid2=t=>e.check(fo(Au,t)),e.ulid=t=>e.check(ho(Uu,t)),e.base64=t=>e.check(wo(Xu,t)),e.base64url=t=>e.check(xo(Qu,t)),e.xid=t=>e.check(go(ju,t)),e.ksuid=t=>e.check(vo(Ru,t)),e.ipv4=t=>e.check(bo(Mu,t)),e.ipv6=t=>e.check(yo(Fu,t)),e.cidrv4=t=>e.check(ko(Vu,t)),e.cidrv6=t=>e.check(_o(Ku,t)),e.e164=t=>e.check(Io(tl,t)),e.datetime=t=>e.check(Ms(t)),e.date=t=>e.check(Bs(t)),e.time=t=>e.check(Fs(t)),e.duration=t=>e.check(Vs(t))});function mu(e){return to(pu,e)}const fu=i("ZodStringFormat",(e,t)=>{sn.init(e,t),du.init(e,t)}),hu=i("ZodEmail",(e,t)=>{cn.init(e,t),fu.init(e,t)});function gu(e){return io(hu,e)}const vu=i("ZodGUID",(e,t)=>{un.init(e,t),fu.init(e,t)});function bu(e){return ro(vu,e)}const yu=i("ZodUUID",(e,t)=>{ln.init(e,t),fu.init(e,t)});function $u(e){return oo(yu,e)}function ku(e){return ao(yu,e)}function _u(e){return so(yu,e)}function wu(e){return uo(yu,e)}const xu=i("ZodURL",(e,t)=>{dn.init(e,t),fu.init(e,t)});function Iu(e){return lo(xu,e)}function Su(e){return lo(xu,{protocol:/^https?$/,hostname:nt,...C(e)})}const Ou=i("ZodEmoji",(e,t)=>{pn.init(e,t),fu.init(e,t)});function zu(e){return co(Ou,e)}const Eu=i("ZodNanoID",(e,t)=>{mn.init(e,t),fu.init(e,t)});function Du(e){return po(Eu,e)}const Cu=i("ZodCUID",(e,t)=>{fn.init(e,t),fu.init(e,t)});function Tu(e){return mo(Cu,e)}const Au=i("ZodCUID2",(e,t)=>{hn.init(e,t),fu.init(e,t)});function Nu(e){return fo(Au,e)}const Uu=i("ZodULID",(e,t)=>{gn.init(e,t),fu.init(e,t)});function Pu(e){return ho(Uu,e)}const ju=i("ZodXID",(e,t)=>{vn.init(e,t),fu.init(e,t)});function Lu(e){return go(ju,e)}const Ru=i("ZodKSUID",(e,t)=>{bn.init(e,t),fu.init(e,t)});function Zu(e){return vo(Ru,e)}const Mu=i("ZodIPv4",(e,t)=>{wn.init(e,t),fu.init(e,t)});function qu(e){return bo(Mu,e)}const Bu=i("ZodMAC",(e,t)=>{In.init(e,t),fu.init(e,t)});function Hu(e){return $o(Bu,e)}const Fu=i("ZodIPv6",(e,t)=>{xn.init(e,t),fu.init(e,t)});function Ju(e){return yo(Fu,e)}const Vu=i("ZodCIDRv4",(e,t)=>{Sn.init(e,t),fu.init(e,t)});function Wu(e){return ko(Vu,e)}const Ku=i("ZodCIDRv6",(e,t)=>{On.init(e,t),fu.init(e,t)});function Gu(e){return _o(Ku,e)}const Xu=i("ZodBase64",(e,t)=>{En.init(e,t),fu.init(e,t)});function Yu(e){return wo(Xu,e)}const Qu=i("ZodBase64URL",(e,t)=>{Cn.init(e,t),fu.init(e,t)});function el(e){return xo(Qu,e)}const tl=i("ZodE164",(e,t)=>{Tn.init(e,t),fu.init(e,t)});function nl(e){return Io(tl,e)}const il=i("ZodJWT",(e,t)=>{Nn.init(e,t),fu.init(e,t)});function rl(e){return So(il,e)}const ol=i("ZodCustomStringFormat",(e,t)=>{Un.init(e,t),fu.init(e,t)});function al(e,t,n={}){return Ra(ol,e,t,n)}function sl(e){return Ra(ol,"hostname",tt,e)}function ul(e){return Ra(ol,"hex",bt,e)}function ll(e,t){const n=`${e}_${t?.enc??"hex"}`,i=Ct[n];if(!i)throw new Error(`Unrecognized hash format: ${n}`);return Ra(ol,n,i,t)}const cl=i("ZodNumber",(e,t)=>{Pn.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Ka(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(ml(t)),e.safe=t=>e.check(ml(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(la(t,n)),e.step=(t,n)=>e.check(la(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 dl(e){return To(cl,e)}const pl=i("ZodNumberFormat",(e,t)=>{jn.init(e,t),cl.init(e,t)});function ml(e){return No(pl,e)}function fl(e){return Uo(pl,e)}function hl(e){return Po(pl,e)}function gl(e){return jo(pl,e)}function vl(e){return Lo(pl,e)}const bl=i("ZodBoolean",(e,t)=>{Ln.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>Ga(0,0,t)});function yl(e){return Ro(bl,e)}const $l=i("ZodBigInt",(e,t)=>{Rn.init(e,t),cu.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(la(t,n));const n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function kl(e){return Mo($l,e)}const _l=i("ZodBigIntFormat",(e,t)=>{Zn.init(e,t),$l.init(e,t)});function wl(e){return Bo(_l,e)}function xl(e){return Ho(_l,e)}const Il=i("ZodSymbol",(e,t)=>{Mn.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>Ya(0,e)});function Sl(e){return Fo(Il,e)}const Ol=i("ZodUndefined",(e,t)=>{qn.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>es(0,e)});function zl(e){return Jo(Ol,e)}const El=i("ZodNull",(e,t)=>{Bn.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>Qa(0,e,t)});function Dl(e){return Vo(El,e)}const Cl=i("ZodAny",(e,t)=>{Hn.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function Tl(){return Wo(Cl)}const Al=i("ZodUnknown",(e,t)=>{Fn.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function Nl(){return Ko(Al)}const Ul=i("ZodNever",(e,t)=>{Jn.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ns(0,0,t)});function Pl(e){return Go(Ul,e)}const jl=i("ZodVoid",(e,t)=>{Vn.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ts(0,e)});function Ll(e){return Xo(jl,e)}const Rl=i("ZodDate",(e,t)=>{Wn.init(e,t),cu.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 Zl(e){return Yo(Rl,e)}const Ml=i("ZodArray",(e,t)=>{Gn.init(e,t),cu.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 ql(e,t){return Da(Ml,e,t)}function Bl(e){const t=e._zod.def.shape;return mc(Object.keys(t))}const Hl=i("ZodObject",(e,t)=>{ti.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,i)=>bs(e,t,n,i),v(e,"shape",()=>t.shape),e.keyof=()=>mc(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Nl()}),e.loose=()=>e.clone({...e._zod.def,catchall:Nl()}),e.strict=()=>e.clone({...e._zod.def,catchall:Pl()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>L(e,t),e.safeExtend=t=>R(e,t),e.merge=t=>Z(e,t),e.pick=t=>P(e,t),e.omit=t=>j(e,t),e.partial=(...t)=>M(kc,e,t[0]),e.required=(...t)=>q(Tc,e,t[0])});function Fl(e,t){const n={type:"object",shape:e??{},...C(t)};return new Hl(n)}function Jl(e,t){return new Hl({type:"object",shape:e,catchall:Pl(),...C(t)})}function Vl(e,t){return new Hl({type:"object",shape:e,catchall:Nl(),...C(t)})}const Wl=i("ZodUnion",(e,t)=>{ii.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,i)=>ys(e,t,n,i),e.options=t.options});function Kl(e,t){return new Wl({type:"union",options:e,...C(t)})}const Gl=i("ZodXor",(e,t)=>{Wl.init(e,t),oi.init(e,t),e._zod.processJSONSchema=(t,n,i)=>ys(e,t,n,i),e.options=t.options});function Xl(e,t){return new Gl({type:"union",options:e,inclusive:!1,...C(t)})}const Yl=i("ZodDiscriminatedUnion",(e,t)=>{Wl.init(e,t),ai.init(e,t)});function Ql(e,t,n){return new Yl({type:"union",options:t,discriminator:e,...C(n)})}const ec=i("ZodIntersection",(e,t)=>{si.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,i)=>$s(e,t,n,i)});function tc(e,t){return new ec({type:"intersection",left:e,right:t})}const nc=i("ZodTuple",(e,t)=>{ci.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,i)=>ks(e,t,n,i),e.rest=t=>e.clone({...e._zod.def,rest:t})});function ic(e,t,n){const i=t instanceof on;return new nc({type:"tuple",items:e,rest:i?t:null,...C(i?n:t)})}const rc=i("ZodRecord",(e,t)=>{pi.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,i)=>_s(e,t,n,i),e.keyType=t.keyType,e.valueType=t.valueType});function oc(e,t,n){return new rc({type:"record",keyType:e,valueType:t,...C(n)})}function ac(e,t,n){const i=D(e);return i._zod.values=void 0,new rc({type:"record",keyType:i,valueType:t,...C(n)})}function sc(e,t,n){return new rc({type:"record",keyType:e,valueType:t,mode:"loose",...C(n)})}const uc=i("ZodMap",(e,t)=>{mi.init(e,t),cu.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(ca(...t)),e.size=(...t)=>e.check(pa(...t))});function lc(e,t,n){return new uc({type:"map",keyType:e,valueType:t,...C(n)})}const cc=i("ZodSet",(e,t)=>{hi.init(e,t),cu.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(ca(...t)),e.size=(...t)=>e.check(pa(...t))});function dc(e,t){return new cc({type:"set",valueType:e,...C(t)})}const pc=i("ZodEnum",(e,t)=>{vi.init(e,t),cu.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 pc({...t,checks:[],...C(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 pc({...t,checks:[],...C(i),entries:r})}});function mc(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new pc({type:"enum",entries:n,...C(t)})}function fc(e,t){return new pc({type:"enum",entries:e,...C(t)})}const hc=i("ZodLiteral",(e,t)=>{bi.init(e,t),cu.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 gc(e,t){return new hc({type:"literal",values:Array.isArray(e)?e:[e],...C(t)})}const vc=i("ZodFile",(e,t)=>{yi.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,i)=>cs(e,0,n),e.min=(t,n)=>e.check(da(t,n)),e.max=(t,n)=>e.check(ca(t,n)),e.mime=(t,n)=>e.check(wa(Array.isArray(t)?t:[t],n))});function bc(e){return Ca(vc,e)}const yc=i("ZodTransform",(e,t)=>{$i.init(e,t),cu.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(G(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(G(t))}};const r=t.transform(n.value,n);return r instanceof Promise?r.then(e=>(n.value=e,n)):(n.value=r,n)}});function $c(e){return new yc({type:"transform",transform:e})}const kc=i("ZodOptional",(e,t)=>{_i.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Cs(e,t,0,i),e.unwrap=()=>e._zod.def.innerType});function _c(e){return new kc({type:"optional",innerType:e})}const wc=i("ZodExactOptional",(e,t)=>{wi.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Cs(e,t,0,i),e.unwrap=()=>e._zod.def.innerType});function xc(e){return new wc({type:"optional",innerType:e})}const Ic=i("ZodNullable",(e,t)=>{xi.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,i)=>ws(e,t,n,i),e.unwrap=()=>e._zod.def.innerType});function Sc(e){return new Ic({type:"nullable",innerType:e})}function Oc(e){return _c(Sc(e))}const zc=i("ZodDefault",(e,t)=>{Ii.init(e,t),cu.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 Ec(e,t){return new zc({type:"default",innerType:e,get defaultValue(){return"function"==typeof t?t():S(t)}})}const Dc=i("ZodPrefault",(e,t)=>{Oi.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Ss(e,t,n,i),e.unwrap=()=>e._zod.def.innerType});function Cc(e,t){return new Dc({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof t?t():S(t)}})}const Tc=i("ZodNonOptional",(e,t)=>{zi.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,i)=>xs(e,t,0,i),e.unwrap=()=>e._zod.def.innerType});function Ac(e,t){return new Tc({type:"nonoptional",innerType:e,...C(t)})}const Nc=i("ZodSuccess",(e,t)=>{Di.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ds(0,0,t),e.unwrap=()=>e._zod.def.innerType});function Uc(e){return new Nc({type:"success",innerType:e})}const Pc=i("ZodCatch",(e,t)=>{Ci.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Os(e,t,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function jc(e,t){return new Pc({type:"catch",innerType:e,catchValue:"function"==typeof t?t:()=>t})}const Lc=i("ZodNaN",(e,t)=>{Ti.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>us(0,e)});function Rc(e){return ea(Lc,e)}const Zc=i("ZodPipe",(e,t)=>{Ai.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,i)=>zs(e,t,0,i),e.in=t.in,e.out=t.out});function Mc(e,t){return new Zc({type:"pipe",in:e,out:t})}const qc=i("ZodCodec",(e,t)=>{Zc.init(e,t),Ui.init(e,t)});function Bc(e,t,n){return new qc({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}const Hc=i("ZodReadonly",(e,t)=>{Li.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Es(e,t,n,i),e.unwrap=()=>e._zod.def.innerType});function Fc(e){return new Hc({type:"readonly",innerType:e})}const Jc=i("ZodTemplateLiteral",(e,t)=>{Zi.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,i)=>ls(e,0,n)});function Vc(e,t){return new Jc({type:"template_literal",parts:e,...C(t)})}const Wc=i("ZodLazy",(e,t)=>{Bi.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Ts(e,t,0,i),e.unwrap=()=>e._zod.def.getter()});function Kc(e){return new Wc({type:"lazy",getter:e})}const Gc=i("ZodPromise",(e,t)=>{qi.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Ds(e,t,0,i),e.unwrap=()=>e._zod.def.innerType});function Xc(e){return new Gc({type:"promise",innerType:e})}const Yc=i("ZodFunction",(e,t)=>{Mi.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ms(0,e)});function Qc(e){return new Yc({type:"function",input:Array.isArray(e?.input)?ic(e?.input):e?.input??ql(Nl()),output:e?.output??Nl()})}const ed=i("ZodCustom",(e,t)=>{Hi.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ps(0,e)});function td(e){const t=new Tt({check:"custom"});return t._zod.check=e,t}function nd(e,t){return Ta(ed,e??(()=>!0),t)}function id(e,t={}){return Aa(ed,e,t)}function rd(e){return Na(e)}const od=Pa,ad=ja;function sd(e,t={}){const n=new ed({type:"custom",check:"custom",fn:t=>t instanceof e,abort:!0,...C(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 ud=(...e)=>La({Codec:qc,Boolean:bl,String:pu},...e);function ld(e){const t=Kc(()=>Kl([mu(e),dl(),yl(),Dl(),ql(t),oc(mu(),t)]));return t}function cd(e,t){return Mc($c(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){u({customError:e})}function md(){return u().customError}var fd;fd||(fd={});const hd={...Object.freeze({__proto__:null,ZodAny:Cl,ZodArray:Ml,ZodBase64:Xu,ZodBase64URL:Qu,ZodBigInt:$l,ZodBigIntFormat:_l,ZodBoolean:bl,ZodCIDRv4:Vu,ZodCIDRv6:Ku,ZodCUID:Cu,ZodCUID2:Au,ZodCatch:Pc,ZodCodec:qc,ZodCustom:ed,ZodCustomStringFormat:ol,ZodDate:Rl,ZodDefault:zc,ZodDiscriminatedUnion:Yl,ZodE164:tl,ZodEmail:hu,ZodEmoji:Ou,ZodEnum:pc,ZodExactOptional:wc,ZodFile:vc,ZodFunction:Yc,ZodGUID:vu,ZodIPv4:Mu,ZodIPv6:Fu,ZodIntersection:ec,ZodJWT:il,ZodKSUID:Ru,ZodLazy:Wc,ZodLiteral:hc,ZodMAC:Bu,ZodMap:uc,ZodNaN:Lc,ZodNanoID:Eu,ZodNever:Ul,ZodNonOptional:Tc,ZodNull:El,ZodNullable:Ic,ZodNumber:cl,ZodNumberFormat:pl,ZodObject:Hl,ZodOptional:kc,ZodPipe:Zc,ZodPrefault:Dc,ZodPromise:Gc,ZodReadonly:Hc,ZodRecord:rc,ZodSet:cc,ZodString:pu,ZodStringFormat:fu,ZodSuccess:Nc,ZodSymbol:Il,ZodTemplateLiteral:Jc,ZodTransform:yc,ZodTuple:nc,ZodType:cu,ZodULID:Uu,ZodURL:xu,ZodUUID:yu,ZodUndefined:Ol,ZodUnion:Wl,ZodUnknown:Al,ZodVoid:jl,ZodXID:ju,ZodXor:Gl,_ZodString:du,_default:Ec,_function:Qc,any:Tl,array:ql,base64:Yu,base64url:el,bigint:kl,boolean:yl,catch:jc,check:td,cidrv4:Wu,cidrv6:Gu,codec:Bc,cuid:Tu,cuid2:Nu,custom:nd,date:Zl,describe:od,discriminatedUnion:Ql,e164:nl,email:gu,emoji:zu,enum:mc,exactOptional:xc,file:bc,float32:fl,float64:hl,function:Qc,guid:bu,hash:ll,hex:ul,hostname:sl,httpUrl:Su,instanceof:sd,int:ml,int32:gl,int64:wl,intersection:tc,ipv4:qu,ipv6:Ju,json:ld,jwt:rl,keyof:Bl,ksuid:Zu,lazy:Kc,literal:gc,looseObject:Vl,looseRecord:sc,mac:Hu,map:lc,meta:ad,nan:Rc,nanoid:Du,nativeEnum:fc,never:Pl,nonoptional:Ac,null:Dl,nullable:Sc,nullish:Oc,number:dl,object:Fl,optional:_c,partialRecord:ac,pipe:Mc,prefault:Cc,preprocess:cd,promise:Xc,readonly:Fc,record:oc,refine:id,set:dc,strictObject:Jl,string:mu,stringFormat:al,stringbool:ud,success:Uc,superRefine:rd,symbol:Sl,templateLiteral:Vc,transform:$c,tuple:ic,uint32:vl,uint64:xl,ulid:Pu,undefined:zl,union:Kl,unknown:Nl,url:Iu,uuid:$u,uuidv4:ku,uuidv6:_u,uuidv7:wu,void:Ll,xid:Lu,xor:Xl}),...Rs,iso:Ws},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 qo($l,e)},boolean:function(e){return Zo(bl,e)},date:function(e){return Qo(Rl,e)},number:function(e){return Ao(cl,e)},string:function(e){return no(pu,e)}});u(nr());var kd=Object.freeze({__proto__:null,$brand:r,$input:Xr,$output:Gr,NEVER:n,TimePrecision:Oo,ZodAny:Cl,ZodArray:Ml,ZodBase64:Xu,ZodBase64URL:Qu,ZodBigInt:$l,ZodBigIntFormat:_l,ZodBoolean:bl,ZodCIDRv4:Vu,ZodCIDRv6:Ku,ZodCUID:Cu,ZodCUID2:Au,ZodCatch:Pc,ZodCodec:qc,ZodCustom:ed,ZodCustomStringFormat:ol,ZodDate:Rl,ZodDefault:zc,ZodDiscriminatedUnion:Yl,ZodE164:tl,ZodEmail:hu,ZodEmoji:Ou,ZodEnum:pc,ZodError:Gs,ZodExactOptional:wc,ZodFile:vc,get ZodFirstPartyTypeKind(){return fd},ZodFunction:Yc,ZodGUID:vu,ZodIPv4:Mu,ZodIPv6:Fu,ZodISODate:qs,ZodISODateTime:Zs,ZodISODuration:Js,ZodISOTime:Hs,ZodIntersection:ec,ZodIssueCode:dd,ZodJWT:il,ZodKSUID:Ru,ZodLazy:Wc,ZodLiteral:hc,ZodMAC:Bu,ZodMap:uc,ZodNaN:Lc,ZodNanoID:Eu,ZodNever:Ul,ZodNonOptional:Tc,ZodNull:El,ZodNullable:Ic,ZodNumber:cl,ZodNumberFormat:pl,ZodObject:Hl,ZodOptional:kc,ZodPipe:Zc,ZodPrefault:Dc,ZodPromise:Gc,ZodReadonly:Hc,ZodRealError:Xs,ZodRecord:rc,ZodSet:cc,ZodString:pu,ZodStringFormat:fu,ZodSuccess:Nc,ZodSymbol:Il,ZodTemplateLiteral:Jc,ZodTransform:yc,ZodTuple:nc,ZodType:cu,ZodULID:Uu,ZodURL:xu,ZodUUID:yu,ZodUndefined:Ol,ZodUnion:Wl,ZodUnknown:Al,ZodVoid:jl,ZodXID:ju,ZodXor:Gl,_ZodString:du,_default:Ec,_function:Qc,any:Tl,array:ql,base64:Yu,base64url:el,bigint:kl,boolean:yl,catch:jc,check:td,cidrv4:Wu,cidrv6:Gu,clone:D,codec:Bc,coerce:$d,config:u,core:Ps,cuid:Tu,cuid2:Nu,custom:nd,date:Zl,decode:iu,decodeAsync:ou,describe:od,discriminatedUnion:Ql,e164:nl,email:gu,emoji:zu,encode:nu,encodeAsync:ru,endsWith:ka,enum:mc,exactOptional:xc,file:bc,flattenError:ie,float32:fl,float64:hl,formatError:re,fromJSONSchema:yd,function:Qc,getErrorMap:md,globalRegistry:eo,gt:ia,gte:ra,guid:bu,hash:ll,hex:ul,hostname:sl,httpUrl:Su,includes:ya,instanceof:sd,int:ml,int32:gl,int64:wl,intersection:tc,ipv4:qu,ipv6:Ju,iso:Ws,json:ld,jwt:rl,keyof:Bl,ksuid:Zu,lazy:Kc,length:ha,literal:gc,locales:Kr,looseObject:Vl,looseRecord:sc,lowercase:va,lt:ta,lte:na,mac:Hu,map:lc,maxLength:ma,maxSize:ca,meta:ad,mime:wa,minLength:fa,minSize:da,multipleOf:la,nan:Rc,nanoid:Du,nativeEnum:fc,negative:aa,never:Pl,nonnegative:ua,nonoptional:Ac,nonpositive:sa,normalize:Ia,null:Dl,nullable:Sc,nullish:Oc,number:dl,object:Fl,optional:_c,overwrite:xa,parse:Ys,parseAsync:Qs,partialRecord:ac,pipe:Mc,positive:oa,prefault:Cc,preprocess:cd,prettifyError:se,promise:Xc,property:_a,readonly:Fc,record:oc,refine:id,regex:ga,regexes:Ct,registry:Qr,safeDecode:su,safeDecodeAsync:lu,safeEncode:au,safeEncodeAsync:uu,safeParse:eu,safeParseAsync:tu,set:dc,setErrorMap:pd,size:pa,slugify:Ea,startsWith:$a,strictObject:Jl,string:mu,stringFormat:al,stringbool:ud,success:Uc,superRefine:rd,symbol:Sl,templateLiteral:Vc,toJSONSchema:Ns,toLowerCase:Oa,toUpperCase:za,transform:$c,treeifyError:oe,trim:Sa,tuple:ic,uint32:vl,uint64:xl,ulid:Pu,undefined:zl,union:Kl,unknown:Nl,uppercase:ba,url:Iu,util:Q,uuid:$u,uuidv4:ku,uuidv6:_u,uuidv7:wu,void:Ll,xid:Lu,xor:Xl}),_d=Object.freeze({__proto__:null,$brand:r,$input:Xr,$output:Gr,NEVER:n,TimePrecision:Oo,ZodAny:Cl,ZodArray:Ml,ZodBase64:Xu,ZodBase64URL:Qu,ZodBigInt:$l,ZodBigIntFormat:_l,ZodBoolean:bl,ZodCIDRv4:Vu,ZodCIDRv6:Ku,ZodCUID:Cu,ZodCUID2:Au,ZodCatch:Pc,ZodCodec:qc,ZodCustom:ed,ZodCustomStringFormat:ol,ZodDate:Rl,ZodDefault:zc,ZodDiscriminatedUnion:Yl,ZodE164:tl,ZodEmail:hu,ZodEmoji:Ou,ZodEnum:pc,ZodError:Gs,ZodExactOptional:wc,ZodFile:vc,get ZodFirstPartyTypeKind(){return fd},ZodFunction:Yc,ZodGUID:vu,ZodIPv4:Mu,ZodIPv6:Fu,ZodISODate:qs,ZodISODateTime:Zs,ZodISODuration:Js,ZodISOTime:Hs,ZodIntersection:ec,ZodIssueCode:dd,ZodJWT:il,ZodKSUID:Ru,ZodLazy:Wc,ZodLiteral:hc,ZodMAC:Bu,ZodMap:uc,ZodNaN:Lc,ZodNanoID:Eu,ZodNever:Ul,ZodNonOptional:Tc,ZodNull:El,ZodNullable:Ic,ZodNumber:cl,ZodNumberFormat:pl,ZodObject:Hl,ZodOptional:kc,ZodPipe:Zc,ZodPrefault:Dc,ZodPromise:Gc,ZodReadonly:Hc,ZodRealError:Xs,ZodRecord:rc,ZodSet:cc,ZodString:pu,ZodStringFormat:fu,ZodSuccess:Nc,ZodSymbol:Il,ZodTemplateLiteral:Jc,ZodTransform:yc,ZodTuple:nc,ZodType:cu,ZodULID:Uu,ZodURL:xu,ZodUUID:yu,ZodUndefined:Ol,ZodUnion:Wl,ZodUnknown:Al,ZodVoid:jl,ZodXID:ju,ZodXor:Gl,_ZodString:du,_default:Ec,_function:Qc,any:Tl,array:ql,base64:Yu,base64url:el,bigint:kl,boolean:yl,catch:jc,check:td,cidrv4:Wu,cidrv6:Gu,clone:D,codec:Bc,coerce:$d,config:u,core:Ps,cuid:Tu,cuid2:Nu,custom:nd,date:Zl,decode:iu,decodeAsync:ou,describe:od,discriminatedUnion:Ql,e164:nl,email:gu,emoji:zu,encode:nu,encodeAsync:ru,endsWith:ka,enum:mc,exactOptional:xc,file:bc,flattenError:ie,float32:fl,float64:hl,formatError:re,fromJSONSchema:yd,function:Qc,getErrorMap:md,globalRegistry:eo,gt:ia,gte:ra,guid:bu,hash:ll,hex:ul,hostname:sl,httpUrl:Su,includes:ya,instanceof:sd,int:ml,int32:gl,int64:wl,intersection:tc,ipv4:qu,ipv6:Ju,iso:Ws,json:ld,jwt:rl,keyof:Bl,ksuid:Zu,lazy:Kc,length:ha,literal:gc,locales:Kr,looseObject:Vl,looseRecord:sc,lowercase:va,lt:ta,lte:na,mac:Hu,map:lc,maxLength:ma,maxSize:ca,meta:ad,mime:wa,minLength:fa,minSize:da,multipleOf:la,nan:Rc,nanoid:Du,nativeEnum:fc,negative:aa,never:Pl,nonnegative:ua,nonoptional:Ac,nonpositive:sa,normalize:Ia,null:Dl,nullable:Sc,nullish:Oc,number:dl,object:Fl,optional:_c,overwrite:xa,parse:Ys,parseAsync:Qs,partialRecord:ac,pipe:Mc,positive:oa,prefault:Cc,preprocess:cd,prettifyError:se,promise:Xc,property:_a,readonly:Fc,record:oc,refine:id,regex:ga,regexes:Ct,registry:Qr,safeDecode:su,safeDecodeAsync:lu,safeEncode:au,safeEncodeAsync:uu,safeParse:eu,safeParseAsync:tu,set:dc,setErrorMap:pd,size:pa,slugify:Ea,startsWith:$a,strictObject:Jl,string:mu,stringFormat:al,stringbool:ud,success:Uc,superRefine:rd,symbol:Sl,templateLiteral:Vc,toJSONSchema:Ns,toLowerCase:Oa,toUpperCase:za,transform:$c,treeifyError:oe,trim:Sa,tuple:ic,uint32:vl,uint64:xl,ulid:Pu,undefined:zl,union:Kl,unknown:Nl,uppercase:ba,url:Iu,util:Q,uuid:$u,uuidv4:ku,uuidv6:_u,uuidv7:wu,void:Ll,xid:Lu,xor:Xl,z:kd});const wd="io.modelcontextprotocol/related-task",xd="2.0",Id=nd(e=>null!==e&&("object"==typeof e||"function"==typeof e)),Sd=Kl([mu(),dl().int()]),Od=mu();Vl({ttl:dl().optional(),pollInterval:dl().optional()});const zd=Fl({ttl:dl().optional()}),Ed=Fl({taskId:mu()}),Dd=Vl({progressToken:Sd.optional(),[wd]:Ed.optional()}),Cd=Fl({_meta:Dd.optional()}),Td=Cd.extend({task:zd.optional()}),Ad=Fl({method:mu(),params:Cd.loose().optional()}),Nd=Fl({_meta:Dd.optional()}),Ud=Fl({method:mu(),params:Nd.loose().optional()}),Pd=Vl({_meta:Dd.optional()}),jd=Kl([mu(),dl().int()]),Ld=Fl({jsonrpc:gc(xd),id:jd,...Ad.shape}).strict(),Rd=e=>Ld.safeParse(e).success,Zd=Fl({jsonrpc:gc(xd),...Ud.shape}).strict(),Md=Fl({jsonrpc:gc(xd),id:jd,result:Pd}).strict(),qd=e=>Md.safeParse(e).success;var Bd;!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"}(Bd||(Bd={}));const Hd=Fl({jsonrpc:gc(xd),id:jd.optional(),error:Fl({code:dl().int(),message:mu(),data:Nl().optional()})}).strict(),Fd=Kl([Ld,Zd,Md,Hd]);Kl([Md,Hd]);const Jd=Pd.strict(),Vd=Nd.extend({requestId:jd.optional(),reason:mu().optional()}),Wd=Ud.extend({method:gc("notifications/cancelled"),params:Vd}),Kd=Fl({src:mu(),mimeType:mu().optional(),sizes:ql(mu()).optional(),theme:mc(["light","dark"]).optional()}),Gd=Fl({icons:ql(Kd).optional()}),Xd=Fl({name:mu(),title:mu().optional()}),Yd=Xd.extend({...Xd.shape,...Gd.shape,version:mu(),websiteUrl:mu().optional(),description:mu().optional()}),Qd=tc(Fl({applyDefaults:yl().optional()}),oc(mu(),Nl())),ep=cd(e=>e&&"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length?{form:{}}:e,tc(Fl({form:Qd.optional(),url:Id.optional()}),oc(mu(),Nl()).optional())),tp=Vl({list:Id.optional(),cancel:Id.optional(),requests:Vl({sampling:Vl({createMessage:Id.optional()}).optional(),elicitation:Vl({create:Id.optional()}).optional()}).optional()}),np=Vl({list:Id.optional(),cancel:Id.optional(),requests:Vl({tools:Vl({call:Id.optional()}).optional()}).optional()}),ip=Fl({experimental:oc(mu(),Id).optional(),sampling:Fl({context:Id.optional(),tools:Id.optional()}).optional(),elicitation:ep.optional(),roots:Fl({listChanged:yl().optional()}).optional(),tasks:tp.optional(),extensions:oc(mu(),Id).optional()}),rp=Cd.extend({protocolVersion:mu(),capabilities:ip,clientInfo:Yd}),op=Ad.extend({method:gc("initialize"),params:rp}),ap=Fl({experimental:oc(mu(),Id).optional(),logging:Id.optional(),completions:Id.optional(),prompts:Fl({listChanged:yl().optional()}).optional(),resources:Fl({subscribe:yl().optional(),listChanged:yl().optional()}).optional(),tools:Fl({listChanged:yl().optional()}).optional(),tasks:np.optional(),extensions:oc(mu(),Id).optional()}),sp=Pd.extend({protocolVersion:mu(),capabilities:ap,serverInfo:Yd,instructions:mu().optional()}),up=Ud.extend({method:gc("notifications/initialized"),params:Nd.optional()}),lp=Ad.extend({method:gc("ping"),params:Cd.optional()}),cp=Fl({progress:dl(),total:_c(dl()),message:_c(mu())}),dp=Fl({...Nd.shape,...cp.shape,progressToken:Sd}),pp=Ud.extend({method:gc("notifications/progress"),params:dp}),mp=Cd.extend({cursor:Od.optional()}),fp=Ad.extend({params:mp.optional()}),hp=Pd.extend({nextCursor:Od.optional()}),gp=mc(["working","input_required","completed","failed","cancelled"]),vp=Fl({taskId:mu(),status:gp,ttl:Kl([dl(),Dl()]),createdAt:mu(),lastUpdatedAt:mu(),pollInterval:_c(dl()),statusMessage:_c(mu())}),bp=Pd.extend({task:vp}),yp=Nd.merge(vp),$p=Ud.extend({method:gc("notifications/tasks/status"),params:yp}),kp=Ad.extend({method:gc("tasks/get"),params:Cd.extend({taskId:mu()})}),_p=Pd.merge(vp),wp=Ad.extend({method:gc("tasks/result"),params:Cd.extend({taskId:mu()})});Pd.loose();const xp=fp.extend({method:gc("tasks/list")}),Ip=hp.extend({tasks:ql(vp)}),Sp=Ad.extend({method:gc("tasks/cancel"),params:Cd.extend({taskId:mu()})}),Op=Pd.merge(vp),zp=Fl({uri:mu(),mimeType:_c(mu()),_meta:oc(mu(),Nl()).optional()}),Ep=zp.extend({text:mu()}),Dp=mu().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),Cp=zp.extend({blob:Dp}),Tp=mc(["user","assistant"]),Ap=Fl({audience:ql(Tp).optional(),priority:dl().min(0).max(1).optional(),lastModified:Ms({offset:!0}).optional()}),Np=Fl({...Xd.shape,...Gd.shape,uri:mu(),description:_c(mu()),mimeType:_c(mu()),size:_c(dl()),annotations:Ap.optional(),_meta:_c(Vl({}))}),Up=Fl({...Xd.shape,...Gd.shape,uriTemplate:mu(),description:_c(mu()),mimeType:_c(mu()),annotations:Ap.optional(),_meta:_c(Vl({}))}),Pp=fp.extend({method:gc("resources/list")}),jp=hp.extend({resources:ql(Np)}),Lp=fp.extend({method:gc("resources/templates/list")}),Rp=hp.extend({resourceTemplates:ql(Up)}),Zp=Cd.extend({uri:mu()}),Mp=Zp,qp=Ad.extend({method:gc("resources/read"),params:Mp}),Bp=Pd.extend({contents:ql(Kl([Ep,Cp]))}),Hp=Ud.extend({method:gc("notifications/resources/list_changed"),params:Nd.optional()}),Fp=Zp,Jp=Ad.extend({method:gc("resources/subscribe"),params:Fp}),Vp=Zp,Wp=Ad.extend({method:gc("resources/unsubscribe"),params:Vp}),Kp=Nd.extend({uri:mu()}),Gp=Ud.extend({method:gc("notifications/resources/updated"),params:Kp}),Xp=Fl({name:mu(),description:_c(mu()),required:_c(yl())}),Yp=Fl({...Xd.shape,...Gd.shape,description:_c(mu()),arguments:_c(ql(Xp)),_meta:_c(Vl({}))}),Qp=fp.extend({method:gc("prompts/list")}),em=hp.extend({prompts:ql(Yp)}),tm=Cd.extend({name:mu(),arguments:oc(mu(),mu()).optional()}),nm=Ad.extend({method:gc("prompts/get"),params:tm}),im=Fl({type:gc("text"),text:mu(),annotations:Ap.optional(),_meta:oc(mu(),Nl()).optional()}),rm=Fl({type:gc("image"),data:Dp,mimeType:mu(),annotations:Ap.optional(),_meta:oc(mu(),Nl()).optional()}),om=Fl({type:gc("audio"),data:Dp,mimeType:mu(),annotations:Ap.optional(),_meta:oc(mu(),Nl()).optional()}),am=Fl({type:gc("tool_use"),name:mu(),id:mu(),input:oc(mu(),Nl()),_meta:oc(mu(),Nl()).optional()}),sm=Fl({type:gc("resource"),resource:Kl([Ep,Cp]),annotations:Ap.optional(),_meta:oc(mu(),Nl()).optional()}),um=Np.extend({type:gc("resource_link")}),lm=Kl([im,rm,om,um,sm]),cm=Fl({role:Tp,content:lm}),dm=Pd.extend({description:mu().optional(),messages:ql(cm)}),pm=Ud.extend({method:gc("notifications/prompts/list_changed"),params:Nd.optional()}),mm=Fl({title:mu().optional(),readOnlyHint:yl().optional(),destructiveHint:yl().optional(),idempotentHint:yl().optional(),openWorldHint:yl().optional()}),fm=Fl({taskSupport:mc(["required","optional","forbidden"]).optional()}),hm=Fl({...Xd.shape,...Gd.shape,description:mu().optional(),inputSchema:Fl({type:gc("object"),properties:oc(mu(),Id).optional(),required:ql(mu()).optional()}).catchall(Nl()),outputSchema:Fl({type:gc("object"),properties:oc(mu(),Id).optional(),required:ql(mu()).optional()}).catchall(Nl()).optional(),annotations:mm.optional(),execution:fm.optional(),_meta:oc(mu(),Nl()).optional()}),gm=fp.extend({method:gc("tools/list")}),vm=hp.extend({tools:ql(hm)}),bm=Pd.extend({content:ql(lm).default([]),structuredContent:oc(mu(),Nl()).optional(),isError:yl().optional()});bm.or(Pd.extend({toolResult:Nl()}));const ym=Td.extend({name:mu(),arguments:oc(mu(),Nl()).optional()}),$m=Ad.extend({method:gc("tools/call"),params:ym}),km=Ud.extend({method:gc("notifications/tools/list_changed"),params:Nd.optional()});Fl({autoRefresh:yl().default(!0),debounceMs:dl().int().nonnegative().default(300)});const _m=mc(["debug","info","notice","warning","error","critical","alert","emergency"]),wm=Cd.extend({level:_m}),xm=Ad.extend({method:gc("logging/setLevel"),params:wm}),Im=Nd.extend({level:_m,logger:mu().optional(),data:Nl()}),Sm=Ud.extend({method:gc("notifications/message"),params:Im}),Om=Fl({name:mu().optional()}),zm=Fl({hints:ql(Om).optional(),costPriority:dl().min(0).max(1).optional(),speedPriority:dl().min(0).max(1).optional(),intelligencePriority:dl().min(0).max(1).optional()}),Em=Fl({mode:mc(["auto","required","none"]).optional()}),Dm=Fl({type:gc("tool_result"),toolUseId:mu().describe("The unique identifier for the corresponding tool call."),content:ql(lm).default([]),structuredContent:Fl({}).loose().optional(),isError:yl().optional(),_meta:oc(mu(),Nl()).optional()}),Cm=Ql("type",[im,rm,om]),Tm=Ql("type",[im,rm,om,am,Dm]),Am=Fl({role:Tp,content:Kl([Tm,ql(Tm)]),_meta:oc(mu(),Nl()).optional()}),Nm=Td.extend({messages:ql(Am),modelPreferences:zm.optional(),systemPrompt:mu().optional(),includeContext:mc(["none","thisServer","allServers"]).optional(),temperature:dl().optional(),maxTokens:dl().int(),stopSequences:ql(mu()).optional(),metadata:Id.optional(),tools:ql(hm).optional(),toolChoice:Em.optional()}),Um=Ad.extend({method:gc("sampling/createMessage"),params:Nm}),Pm=Pd.extend({model:mu(),stopReason:_c(mc(["endTurn","stopSequence","maxTokens"]).or(mu())),role:Tp,content:Cm}),jm=Pd.extend({model:mu(),stopReason:_c(mc(["endTurn","stopSequence","maxTokens","toolUse"]).or(mu())),role:Tp,content:Kl([Tm,ql(Tm)])}),Lm=Fl({type:gc("boolean"),title:mu().optional(),description:mu().optional(),default:yl().optional()}),Rm=Fl({type:gc("string"),title:mu().optional(),description:mu().optional(),minLength:dl().optional(),maxLength:dl().optional(),format:mc(["email","uri","date","date-time"]).optional(),default:mu().optional()}),Zm=Fl({type:mc(["number","integer"]),title:mu().optional(),description:mu().optional(),minimum:dl().optional(),maximum:dl().optional(),default:dl().optional()}),Mm=Fl({type:gc("string"),title:mu().optional(),description:mu().optional(),enum:ql(mu()),default:mu().optional()}),qm=Fl({type:gc("string"),title:mu().optional(),description:mu().optional(),oneOf:ql(Fl({const:mu(),title:mu()})),default:mu().optional()}),Bm=Fl({type:gc("string"),title:mu().optional(),description:mu().optional(),enum:ql(mu()),enumNames:ql(mu()).optional(),default:mu().optional()}),Hm=Kl([Mm,qm]),Fm=Kl([Fl({type:gc("array"),title:mu().optional(),description:mu().optional(),minItems:dl().optional(),maxItems:dl().optional(),items:Fl({type:gc("string"),enum:ql(mu())}),default:ql(mu()).optional()}),Fl({type:gc("array"),title:mu().optional(),description:mu().optional(),minItems:dl().optional(),maxItems:dl().optional(),items:Fl({anyOf:ql(Fl({const:mu(),title:mu()}))}),default:ql(mu()).optional()})]),Jm=Kl([Bm,Hm,Fm]),Vm=Kl([Jm,Lm,Rm,Zm]),Wm=Kl([Td.extend({mode:gc("form").optional(),message:mu(),requestedSchema:Fl({type:gc("object"),properties:oc(mu(),Vm),required:ql(mu()).optional()})}),Td.extend({mode:gc("url"),message:mu(),elicitationId:mu(),url:mu().url()})]),Km=Ad.extend({method:gc("elicitation/create"),params:Wm}),Gm=Nd.extend({elicitationId:mu()}),Xm=Ud.extend({method:gc("notifications/elicitation/complete"),params:Gm}),Ym=Pd.extend({action:mc(["accept","decline","cancel"]),content:cd(e=>null===e?void 0:e,oc(mu(),Kl([mu(),dl(),yl(),ql(mu())])).optional())}),Qm=Fl({type:gc("ref/resource"),uri:mu()}),ef=Fl({type:gc("ref/prompt"),name:mu()}),tf=Cd.extend({ref:Kl([ef,Qm]),argument:Fl({name:mu(),value:mu()}),context:Fl({arguments:oc(mu(),mu()).optional()}).optional()}),nf=Ad.extend({method:gc("completion/complete"),params:tf}),rf=Pd.extend({completion:Vl({values:ql(mu()).max(100),total:_c(dl().int()),hasMore:_c(yl())})}),of=Fl({uri:mu().startsWith("file://"),name:mu().optional(),_meta:oc(mu(),Nl()).optional()}),af=Ad.extend({method:gc("roots/list"),params:Cd.optional()}),sf=Pd.extend({roots:ql(of)}),uf=Ud.extend({method:gc("notifications/roots/list_changed"),params:Nd.optional()});Kl([lp,op,nf,xm,nm,Qp,Pp,Lp,qp,Jp,Wp,$m,gm,kp,wp,xp,Sp]),Kl([Wd,pp,up,uf,$p]),Kl([Jd,Pm,jm,Ym,sf,_p,Ip,bp]),Kl([lp,Um,Km,af,kp,wp,xp,Sp]),Kl([Wd,pp,Sm,Gp,Hp,km,pm,$p,Xm]),Kl([Jd,sp,rf,dm,em,jp,Rp,Bp,bm,vm,_p,Ip,bp]);class lf 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===Bd.UrlElicitationRequired&&n){const e=n;if(e.elicitations)return new cf(e.elicitations,t)}return new lf(e,t,n)}}class cf extends lf{constructor(e,t=`URL elicitation${e.length>1?"s":""} required`){super(Bd.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(js(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(js(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=Ls(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(Wd,e=>{this._oncancel(e)}),this.setNotificationHandler(pp,e=>{this._onprogress(e)}),this.setRequestHandler(lp,e=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(kp,async(e,t)=>{const n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new lf(Bd.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 lf(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 lf(Bd.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 lf(Bd.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 lf(Bd.InvalidParams,`Task not found: ${e.params.taskId}`);if(df(n.status))throw new lf(Bd.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 lf(Bd.InvalidParams,`Task not found after cancellation: ${e.params.taskId}`);return{_meta:{},...i}}catch(e){if(e instanceof lf)throw e;throw new lf(Bd.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),lf.fromError(Bd.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),qd(e)||(n=e,Hd.safeParse(n).success)?this._onresponse(e):Rd(e)?this._onrequest(e,t):(e=>Zd.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=lf.fromError(Bd.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:Bd.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,Td.safeParse(s).success?e.params.task:void 0);var s;const u=this._taskStore?this.requestTaskStore(e,i?.sessionId):void 0,l={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 lf(Bd.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&&u&&await u.updateTaskStatus(s,"input_required"),await this.request(t,n,a)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:r,taskStore:u,taskRequestedTtl:a?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{a&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,l)).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:Bd.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),qd(e))n(e);else{n(new lf(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(qd(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),qd(e))i(e);else{i(lf.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 lf?e:new lf(Bd.InternalError,String(e))}}return}let r;try{const i=await this.request(e,bp,n);if(!i.task)throw new lf(Bd.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 lf(Bd.InternalError,`Task ${r} failed`)}:"cancelled"===e.status&&(yield{type:"error",error:new lf(Bd.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 lf?e:new lf(Bd.InternalError,String(e))}}}request(e,t,n){const{relatedRequestId:i,resumptionToken:r,onresumptiontoken:o,task:a,relatedTask:s}=n??{};return new Promise((u,l)=>{const c=e=>{l(e)};if(!this._transport)return void c(new Error("Not connected"));if(!0===this._options?.enforceStrictCapabilities)try{this.assertCapabilityForMethod(e.method),a&&this.assertTaskCapability(e.method)}catch(e){return void c(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 lf?e:new lf(Bd.RequestTimeout,String(e));l(t)};this._responseHandlers.set(d,e=>{if(!n?.signal?.aborted){if(e instanceof Error)return l(e);try{const n=Ls(t,e.result);n.success?u(n.data):l(n.error)}catch(e){l(e)}}}),n?.signal?.addEventListener("abort",()=>{m(n?.signal?.reason)});const f=n?.timeout??6e4;this._setupTimeout(d,f,n?.maxTotalTimeout,()=>m(lf.fromError(Bd.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),l(e)})}else this._transport.send(p,{relatedRequestId:i,resumptionToken:r,onresumptiontoken:o}).catch(e=>{this._cleanupTimeout(d),l(e)})})}async getTask(e,t){return this.request({method:"tasks/get",params:e},_p,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},Op,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 lf(Bd.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 lf(Bd.InvalidRequest,"Request cancelled"));const r=setTimeout(e,n);t.addEventListener("abort",()=>{clearTimeout(r),i(new lf(Bd.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 lf(Bd.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 lf(Bd.InvalidParams,`Task "${e}" not found - it may have been cleaned up`);if(df(o.status))throw new lf(Bd.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=Fd.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=Kl([gc("light"),gc("dark")]).describe("Color theme preference for the host environment."),$f=Kl([gc("inline"),gc("fullscreen"),gc("pip")]).describe("Display mode for UI presentation."),kf=oc(Kl([gc("--color-background-primary"),gc("--color-background-secondary"),gc("--color-background-tertiary"),gc("--color-background-inverse"),gc("--color-background-ghost"),gc("--color-background-info"),gc("--color-background-danger"),gc("--color-background-success"),gc("--color-background-warning"),gc("--color-background-disabled"),gc("--color-text-primary"),gc("--color-text-secondary"),gc("--color-text-tertiary"),gc("--color-text-inverse"),gc("--color-text-ghost"),gc("--color-text-info"),gc("--color-text-danger"),gc("--color-text-success"),gc("--color-text-warning"),gc("--color-text-disabled"),gc("--color-border-primary"),gc("--color-border-secondary"),gc("--color-border-tertiary"),gc("--color-border-inverse"),gc("--color-border-ghost"),gc("--color-border-info"),gc("--color-border-danger"),gc("--color-border-success"),gc("--color-border-warning"),gc("--color-border-disabled"),gc("--color-ring-primary"),gc("--color-ring-secondary"),gc("--color-ring-inverse"),gc("--color-ring-info"),gc("--color-ring-danger"),gc("--color-ring-success"),gc("--color-ring-warning"),gc("--font-sans"),gc("--font-mono"),gc("--font-weight-normal"),gc("--font-weight-medium"),gc("--font-weight-semibold"),gc("--font-weight-bold"),gc("--font-text-xs-size"),gc("--font-text-sm-size"),gc("--font-text-md-size"),gc("--font-text-lg-size"),gc("--font-heading-xs-size"),gc("--font-heading-sm-size"),gc("--font-heading-md-size"),gc("--font-heading-lg-size"),gc("--font-heading-xl-size"),gc("--font-heading-2xl-size"),gc("--font-heading-3xl-size"),gc("--font-text-xs-line-height"),gc("--font-text-sm-line-height"),gc("--font-text-md-line-height"),gc("--font-text-lg-line-height"),gc("--font-heading-xs-line-height"),gc("--font-heading-sm-line-height"),gc("--font-heading-md-line-height"),gc("--font-heading-lg-line-height"),gc("--font-heading-xl-line-height"),gc("--font-heading-2xl-line-height"),gc("--font-heading-3xl-line-height"),gc("--border-radius-xs"),gc("--border-radius-sm"),gc("--border-radius-md"),gc("--border-radius-lg"),gc("--border-radius-xl"),gc("--border-radius-full"),gc("--border-width-regular"),gc("--shadow-hairline"),gc("--shadow-sm"),gc("--shadow-md"),gc("--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."),Kl([mu(),zl()]).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.");Fl({method:gc("ui/open-link"),params:Fl({url:mu().describe("URL to open in the host's browser")})});var _f=Fl({isError:yl().optional().describe("True if the host failed to open the URL (e.g., due to security policy).")}).passthrough(),wf=Fl({isError:yl().optional().describe("True if the download failed (e.g., user cancelled or host denied).")}).passthrough(),xf=Fl({isError:yl().optional().describe("True if the host rejected or failed to deliver the message.")}).passthrough();Fl({method:gc("ui/notifications/sandbox-proxy-ready"),params:Fl({})});var If=Fl({connectDomains:ql(mu()).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:ql(mu()).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:ql(mu()).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:ql(mu()).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=Fl({camera:Fl({}).optional().describe("Request camera access.\n\nMaps to Permission Policy `camera` feature."),microphone:Fl({}).optional().describe("Request microphone access.\n\nMaps to Permission Policy `microphone` feature."),geolocation:Fl({}).optional().describe("Request geolocation access.\n\nMaps to Permission Policy `geolocation` feature."),clipboardWrite:Fl({}).optional().describe("Request clipboard write access.\n\nMaps to Permission Policy `clipboard-write` feature.")});Fl({method:gc("ui/notifications/size-changed"),params:Fl({width:dl().optional().describe("New width in pixels."),height:dl().optional().describe("New height in pixels.")})});var Of=Fl({method:gc("ui/notifications/tool-input"),params:Fl({arguments:oc(mu(),Nl().describe("Complete tool call arguments as key-value pairs.")).optional().describe("Complete tool call arguments as key-value pairs.")})}),zf=Fl({method:gc("ui/notifications/tool-input-partial"),params:Fl({arguments:oc(mu(),Nl().describe("Partial tool call arguments (incomplete, may change).")).optional().describe("Partial tool call arguments (incomplete, may change).")})}),Ef=Fl({method:gc("ui/notifications/tool-cancelled"),params:Fl({reason:mu().optional().describe('Optional reason for the cancellation (e.g., "user action", "timeout").')})}),Df=Fl({fonts:mu().optional()}),Cf=Fl({variables:kf.optional().describe("CSS variables for theming the app."),css:Df.optional().describe("CSS blocks that apps can inject.")}),Tf=Fl({method:gc("ui/resource-teardown"),params:Fl({})});oc(mu(),Nl());var Af=Fl({text:Fl({}).optional().describe("Host supports text content blocks."),image:Fl({}).optional().describe("Host supports image content blocks."),audio:Fl({}).optional().describe("Host supports audio content blocks."),resource:Fl({}).optional().describe("Host supports resource content blocks."),resourceLink:Fl({}).optional().describe("Host supports resource link content blocks."),structuredContent:Fl({}).optional().describe("Host supports structured content.")});Fl({method:gc("ui/notifications/request-teardown"),params:Fl({}).optional()});var Nf=Fl({experimental:oc(mu(),oc(mu(),Tl()).describe("Experimental features keyed by identifier.")).optional().describe("Experimental features keyed by identifier."),openLinks:Fl({}).optional().describe("Host supports opening external URLs."),downloadFile:Fl({}).optional().describe("Host supports file downloads via ui/download-file."),serverTools:Fl({listChanged:yl().optional().describe("Host supports tools/list_changed notifications.")}).optional().describe("Host can proxy tool calls to the MCP server."),serverResources:Fl({listChanged:yl().optional().describe("Host supports resources/list_changed notifications.")}).optional().describe("Host can proxy resource reads to the MCP server."),logging:Fl({}).optional().describe("Host accepts log messages."),sandbox:Fl({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: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:Fl({tools:Fl({}).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.")}),Uf=Fl({experimental:oc(mu(),oc(mu(),Tl()).describe("Experimental features keyed by identifier.")).optional().describe("Experimental features keyed by identifier."),tools:Fl({listChanged:yl().optional().describe("App supports tools/list_changed notifications.")}).optional().describe("App exposes MCP-style tools that the host can call."),availableDisplayModes:ql($f).optional().describe("Display modes the app supports.")});Fl({method:gc("ui/notifications/initialized"),params:Fl({}).optional()}),Fl({csp:If.optional().describe("Content Security Policy configuration for UI resources."),permissions:Sf.optional().describe("Sandbox permissions requested by the UI resource."),domain:mu().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:yl().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")}),Fl({method:gc("ui/request-display-mode"),params:Fl({mode:$f.describe("The display mode being requested.")})});var Pf=Fl({mode:$f.describe("The display mode that was actually set. May differ from requested if not supported.")}).passthrough(),jf=Kl([gc("model"),gc("app")]).describe("Tool visibility scope - who can access the tool.");Fl({resourceUri:mu().optional(),visibility:ql(jf).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:Pl().optional(),permissions:Pl().optional()}),Fl({mimeTypes:ql(mu()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),Fl({method:gc("ui/download-file"),params:Fl({contents:ql(Kl([sm,um])).describe("Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.")})}),Fl({method:gc("ui/message"),params:Fl({role:gc("user").describe('Message role, currently only "user" is supported.'),content:ql(lm).describe("Message content blocks (text, image, etc.).")})}),Fl({method:gc("ui/notifications/sandbox-resource-ready"),params:Fl({html:mu().describe("HTML content to load into the inner iframe."),sandbox:mu().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 Lf=Fl({method:gc("ui/notifications/tool-result"),params:bm.describe("Standard MCP tool execution result.")}),Rf=Fl({toolInfo:Fl({id:jd.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:Cf.optional().describe("Style configuration for theming the app."),displayMode:$f.optional().describe("How the UI is currently displayed."),availableDisplayModes:ql($f).optional().describe("Display modes the host supports."),containerDimensions:Kl([Fl({height:dl().describe("Fixed container height in pixels.")}),Fl({maxHeight:Kl([dl(),zl()]).optional().describe("Maximum container height in pixels.")})]).and(Kl([Fl({width:dl().describe("Fixed container width in pixels.")}),Fl({maxWidth:Kl([dl(),zl()]).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:mu().optional().describe("User's language and region preference in BCP 47 format."),timeZone:mu().optional().describe("User's timezone in IANA format."),userAgent:mu().optional().describe("Host application identifier."),platform:Kl([gc("web"),gc("desktop"),gc("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:Fl({touch:yl().optional().describe("Whether the device supports touch input."),hover:yl().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:Fl({top:dl().describe("Top safe area inset in pixels."),right:dl().describe("Right safe area inset in pixels."),bottom:dl().describe("Bottom safe area inset in pixels."),left:dl().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),Zf=Fl({method:gc("ui/notifications/host-context-changed"),params:Rf.describe("Partial context update containing only changed fields.")});Fl({method:gc("ui/update-model-context"),params:Fl({content:ql(lm).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:oc(mu(),Nl().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})}),Fl({method:gc("ui/initialize"),params:Fl({appInfo:Yd.describe("App identification (name and version)."),appCapabilities:Uf.describe("Features and capabilities this app provides."),protocolVersion:mu().describe("Protocol version this app supports.")})});var Mf=Fl({protocolVersion:mu().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(),qf={target:"draft-2020-12"};async function Bf(e,t){let n=e["~standard"];if(n.jsonSchema)return n.jsonSchema[t](qf);if("zod"===n.vendor){let{z:n}=await Promise.resolve().then(function(){return _d});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 Hf(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 Ff 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:Of,toolinputpartial:zf,toolresult:Lf,toolcancelled:Ef,hostcontextchanged:Zf};static ONE_SHOT_EVENTS=new Set(["toolinput","toolinputpartial","toolresult","toolcancelled"]);_everHadListener=new Set;_assertHandlerTiming(e){if(!Ff.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||u({jitless:!0}),this.setRequestHandler(lp,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 Hf(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 Hf(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 Bf(t.inputSchema,"input"):{type:"object",properties:{}}};return t.outputSchema&&(n.outputSchema=await Bf(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(Tf,(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},Bp,t)}async listServerResources(e,t){return this._assertInitialized("listServerResources"),await this.request({method:"resources/list",params:e},jp,t)}async createSamplingMessage(e,t){this._assertInitialized("createSamplingMessage");let n=e.tools?jm:Pm;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},Jd,t)}openLink(e,t){return this._assertInitialized("openLink"),this.request({method:"ui/open-link",params:e},_f,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},Pf,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 Jf(){}function Vf(e,t){for(const n in t)e[n]=t[n];return e}function Wf(e){return e()}function Kf(){return Object.create(null)}function Gf(e){e.forEach(Wf)}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 Jf;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?Vf(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:Jf}function sh(e,t){e.appendChild(t)}function uh(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=ph("style");e.id=t,e.textContent=n,function(e,t){sh(e.head||e,t),t.sheet}(i,e)}}function lh(e,t,n){e.insertBefore(t,n||null)}function ch(e){e.parentNode&&e.parentNode.removeChild(e)}function dh(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function ph(e){return document.createElement(e)}function mh(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function fh(e){return document.createTextNode(e)}function hh(){return fh(" ")}function gh(){return fh("")}function vh(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function bh(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function yh(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 $h(e){return""===e?null:+e}function kh(e,t){t=""+t,e.data!==t&&(e.data=t)}function _h(e,t){e.value=null==t?"":t}function wh(e,t,n,i){null==n?e.style.removeProperty(t):e.style.setProperty(t,n,"")}function xh(e,t,n){e.classList[n?"add":"remove"](t)}class Ih{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=mh(t.nodeName):this.e=ph(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)lh(this.t,this.n[t],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(ch)}}function Sh(e,t){return new e(t)}let Oh;function zh(e){Oh=e}function Eh(){if(!Oh)throw new Error("Function called outside component initialization");return Oh}function Dh(e){Eh().$$.on_mount.push(e)}function Ch(e){return Eh().$$.context.get(e)}const Th=[],Ah=[];let Nh=[];const Uh=[],Ph=Promise.resolve();let jh=!1;function Lh(e){Nh.push(e)}function Rh(e){Uh.push(e)}const Zh=new Set;let Mh=0;function qh(){if(0!==Mh)return;const e=Oh;do{try{for(;Mh<Th.length;){const e=Th[Mh];Mh++,zh(e),Bh(e.$$)}}catch(e){throw Th.length=0,Mh=0,e}for(zh(null),Th.length=0,Mh=0;Ah.length;)Ah.pop()();for(let e=0;e<Nh.length;e+=1){const t=Nh[e];Zh.has(t)||(Zh.add(t),t())}Nh.length=0}while(Th.length);for(;Uh.length;)Uh.pop()();jh=!1,Zh.clear(),zh(e)}function Bh(e){if(null!==e.fragment){e.update(),Gf(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(Lh)}}const Hh=new Set;let Fh;function Jh(){Fh={r:0,c:[],p:Fh}}function Vh(){Fh.r||Gf(Fh.c),Fh=Fh.p}function Wh(e,t){e&&e.i&&(Hh.delete(e),e.i(t))}function Kh(e,t,n,i){if(e&&e.o){if(Hh.has(e))return;Hh.add(e),Fh.c.push(()=>{Hh.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function Gh(e,t,n){const i=e.$$.props[t];void 0!==i&&(e.$$.bound[i]=n,n(e.$$.ctx[i]))}function Xh(e){e&&e.c()}function Yh(e,t,n,i){const{fragment:r,after_update:o}=e.$$;r&&r.m(t,n),i||Lh(()=>{const t=e.$$.on_mount.map(Wf).filter(Xf);e.$$.on_destroy?e.$$.on_destroy.push(...t):Gf(t),e.$$.on_mount=[]}),o.forEach(Lh)}function Qh(e,t){const n=e.$$;null!==n.fragment&&(!function(e){const t=[],n=[];Nh.forEach(i=>-1===e.indexOf(i)?t.push(i):n.push(i)),n.forEach(e=>e()),Nh=t}(n.after_update),Gf(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function eg(e,t){-1===e.$$.dirty[0]&&(Th.push(e),jh||(jh=!0,Ph.then(qh)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function tg(e,t,n,i,r,o,a,s=[-1]){const u=Oh;zh(e);const l=e.$$={fragment:null,ctx:[],props:o,update:Jf,not_equal:r,bound:Kf(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:Kf(),dirty:s,skip_bound:!1,root:t.target||u.$$.root};a&&a(l.root);let c=!1;if(l.ctx=n?n(e,t.props||{},(t,n,...i)=>{const o=i.length?i[0]:n;return l.ctx&&r(l.ctx[t],l.ctx[t]=o)&&(!l.skip_bound&&l.bound[t]&&l.bound[t](o),c&&eg(e,t)),n}):[],l.update(),c=!0,Gf(l.before_update),l.fragment=!!i&&i(l.ctx),t.target){if(t.hydrate){const e=function(e){return Array.from(e.childNodes)}(t.target);l.fragment&&l.fragment.l(e),e.forEach(ch)}else l.fragment&&l.fragment.c();t.intro&&Wh(e.$$.fragment),Yh(e,t.target,t.anchor,t.customElement),qh()}zh(u)}class ng{$destroy(){Qh(this,1),this.$destroy=Jf}$on(e,t){if(!Xf(t))return Jf;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 ig=[];function rg(e,t){return{subscribe:og(e,t).subscribe}}function og(e,t=Jf){let n;const i=new Set;function r(t){if(Yf(e,t)&&(e=t,n)){const t=!ig.length;for(const t of i)t[1](),ig.push(t,e);if(t){for(let e=0;e<ig.length;e+=2)ig[e][0](ig[e+1]);ig.length=0}}}return{set:r,update:function(t){r(t(e))},subscribe:function(o,a=Jf){const s=[o,a];return i.add(s),1===i.size&&(n=t(r)||Jf),o(e),()=>{i.delete(s),0===i.size&&n&&(n(),n=null)}}}}const ag={message:!1,updateModelContext:!1,openLinks:!1};class sg extends Error{constructor(e="Update cancelled"){super(e),this.name="HandoffCancelledError"}}function ug(e){const t=e.getHostCapabilities();return{message:null!=t?.message,updateModelContext:null!=t?.updateModelContext,openLinks:null!=t?.openLinks}}function lg(e){return e.message}function cg(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 dg(e){if(!navigator.clipboard?.writeText)throw new Error("Clipboard is not available in this host.");await navigator.clipboard.writeText(e)}const pg="mcp-external-links";function mg(e){uh(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}")}function fg(e,t,n){const i=e.slice();return i[35]=t[n],i}const hg=e=>({}),gg=e=>({});function vg(e){let t,n,i,r,o=e[2],a=[];for(let t=0;t<o.length;t+=1)a[t]=bg(fg(e,o,t));return{c(){t=ph("div"),n=ph("p"),n.textContent="Fix these options to generate your contract:",i=hh(),r=ph("ul");for(let e=0;e<a.length;e+=1)a[e].c();bh(t,"role","alert"),bh(t,"class","p-2 overflow-auto shrink-0"),wh(t,"color","var(--red-3)")},m(e,o){lh(e,t,o),sh(t,n),sh(t,i),sh(t,r);for(let e=0;e<a.length;e+=1)a[e]&&a[e].m(r,null)},p(e,t){if(4&t[0]){let n;for(o=e[2],n=0;n<o.length;n+=1){const i=fg(e,o,n);a[n]?a[n].p(i,t):(a[n]=bg(i),a[n].c(),a[n].m(r,null))}for(;n<a.length;n+=1)a[n].d(1);a.length=o.length}},d(e){e&&ch(t),dh(a,e)}}}function bg(e){let t,n,i=e[35]+"";return{c(){t=ph("li"),n=fh(i)},m(e,i){lh(e,t,i),sh(t,n)},p(e,t){4&t[0]&&i!==(i=e[35]+"")&&kh(n,i)},d(e){e&&ch(t)}}}function yg(e){let t;return{c(){t=ph("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>',bh(t,"class","drift-notice svelte-h4n0sq")},m(e,n){lh(e,t,n)},d(e){e&&ch(t)}}}function $g(e){let t;function n(e,t){return e[12]?_g:kg}let i=n(e),r=i(e);return{c(){r.c(),t=gh()},m(e,n){r.m(e,n),lh(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&&ch(t)}}}function kg(e){let t,n,i;return{c(){t=ph("button"),t.textContent="Restore original",bh(t,"type","button"),bh(t,"class","restore-link svelte-h4n0sq")},m(r,o){lh(r,t,o),n||(i=vh(t,"click",e[28]),n=!0)},p:Jf,d(e){e&&ch(t),n=!1,i()}}}function _g(e){let t,n,i,r,o,a,s;return{c(){t=ph("span"),n=fh("Restore original settings?\n "),i=ph("button"),i.textContent="Confirm",r=hh(),o=ph("button"),o.textContent="Cancel",bh(i,"type","button"),bh(i,"class","restore-confirm-btn svelte-h4n0sq"),bh(o,"type","button"),bh(o,"class","restore-confirm-btn cancel svelte-h4n0sq"),bh(t,"class","restore-confirm svelte-h4n0sq")},m(u,l){lh(u,t,l),sh(t,n),sh(t,i),sh(t,r),sh(t,o),a||(s=[vh(i,"click",e[26]),vh(o,"click",e[27])],a=!0)},p:Jf,d(e){e&&ch(t),a=!1,Gf(s)}}}function wg(e){let t;return{c(){t=fh("Send Updates to Agent")},m(e,n){lh(e,t,n)},p:Jf,d(e){e&&ch(t)}}}function xg(e){let t;return{c(){t=fh("Copy to Clipboard")},m(e,n){lh(e,t,n)},p:Jf,d(e){e&&ch(t)}}}function Ig(e){let t;return{c(){t=fh(e[9])},m(e,n){lh(e,t,n)},p(e,n){512&n[0]&&kh(t,e[9])},d(e){e&&ch(t)}}}function Sg(e){let t,n=e[14]?"Copying…":"Sending…";return{c(){t=fh(n)},m(e,n){lh(e,t,n)},p(e,i){16384&i[0]&&n!==(n=e[14]?"Copying…":"Sending…")&&kh(t,n)},d(e){e&&ch(t)}}}function Og(e){let t;return{c(){t=fh("Connecting…")},m(e,n){lh(e,t,n)},p:Jf,d(e){e&&ch(t)}}}function zg(e){let t,n;return{c(){t=ph("p"),n=fh(e[11]),bh(t,"class","status hint svelte-h4n0sq")},m(e,i){lh(e,t,i),sh(t,n)},p(e,t){2048&t[0]&&kh(n,e[11])},d(e){e&&ch(t)}}}function Eg(e){let t,n;return{c(){t=ph("p"),n=fh(e[10]),bh(t,"class","status error svelte-h4n0sq")},m(e,i){lh(e,t,i),sh(t,n)},p(e,t){1024&t[0]&&kh(n,e[10])},d(e){e&&ch(t)}}}function Dg(e){let t,n,i;return{c(){t=ph("p"),n=fh("Could not connect to host: "),i=fh(e[5]),bh(t,"class","status error svelte-h4n0sq")},m(e,r){lh(e,t,r),sh(t,n),sh(t,i)},p(e,t){32&t[0]&&kh(i,e[5])},d(e){e&&ch(t)}}}function Cg(e){let t,n,i,r,o,a,s,u,l,c,d,p,m,f,h,g,v,b,y,$,k,_;const w=e[24].controls,x=eh(w,e,e[23],gg);let I=e[1]&&vg(e),S=e[6]&&yg(),O=e[6]&&e[7]&&$g(e);function z(e,t){return e[4]||e[5]?e[8]?Sg:e[9]?Ig:e[14]?xg:wg:Og}let E=z(e),D=E(e);function C(e,t){return e[5]?Dg:e[10]?Eg:e[11]?zg:void 0}let T=C(e),A=T&&T(e);return{c(){t=ph("div"),n=ph("div"),i=ph("div"),x&&x.c(),r=hh(),o=ph("div"),I&&I.c(),a=hh(),s=ph("pre"),u=fh(" "),l=ph("code"),d=fh("\n "),p=hh(),m=ph("div"),S&&S.c(),f=hh(),h=ph("div"),O&&O.c(),g=hh(),v=ph("button"),D.c(),y=hh(),A&&A.c(),bh(i,"class","controls min-w-[14rem] w-60 max-w-[42%] flex flex-col shrink-0 overflow-auto border-r border-[var(--gray-3)]"),bh(l,"class",c="hljs "+e[3]+" grow overflow-auto p-2 "+(e[1]?"no-select":"")+" svelte-h4n0sq"),bh(s,"class","flex flex-col grow basis-0 overflow-auto m-0"),bh(o,"class","output flex flex-col grow min-w-0 overflow-hidden"),bh(n,"class","flex flex-row grow min-h-0 overflow-hidden rounded-xl border border-[var(--gray-3)]"),bh(v,"class","use-button svelte-h4n0sq"),v.disabled=e[15],bh(v,"title",b=e[14]?"Copy to Clipboard":void 0),xh(v,"disabled",e[15]),xh(v,"drifted",e[6]),bh(h,"class","actions svelte-h4n0sq"),xh(h,"drifted",e[6]),bh(m,"class","footer shrink-0 svelte-h4n0sq"),bh(t,"class","mcp-shell flex flex-col gap-2 p-2 min-h-0 svelte-h4n0sq")},m(c,b){lh(c,t,b),sh(t,n),sh(n,i),x&&x.m(i,null),e[25](i),sh(n,r),sh(n,o),I&&I.m(o,null),sh(o,a),sh(o,s),sh(s,u),sh(s,l),l.innerHTML=e[0],sh(s,d),sh(t,p),sh(t,m),S&&S.m(m,null),sh(m,f),sh(m,h),O&&O.m(h,null),sh(h,g),sh(h,v),D.m(v,null),sh(m,y),A&&A.m(m,null),$=!0,k||(_=[vh(s,"click",e[17]),vh(v,"click",e[16])],k=!0)},p(e,t){x&&x.p&&(!$||8388608&t[0])&&ih(x,w,e,e[23],$?nh(w,e[23],t,hg):rh(e[23]),gg),e[1]?I?I.p(e,t):(I=vg(e),I.c(),I.m(o,a)):I&&(I.d(1),I=null),(!$||1&t[0])&&(l.innerHTML=e[0]),(!$||10&t[0]&&c!==(c="hljs "+e[3]+" grow overflow-auto p-2 "+(e[1]?"no-select":"")+" svelte-h4n0sq"))&&bh(l,"class",c),e[6]?S||(S=yg(),S.c(),S.m(m,f)):S&&(S.d(1),S=null),e[6]&&e[7]?O?O.p(e,t):(O=$g(e),O.c(),O.m(h,g)):O&&(O.d(1),O=null),E===(E=z(e))&&D?D.p(e,t):(D.d(1),D=E(e),D&&(D.c(),D.m(v,null))),(!$||32768&t[0])&&(v.disabled=e[15]),(!$||16384&t[0]&&b!==(b=e[14]?"Copy to Clipboard":void 0))&&bh(v,"title",b),(!$||32768&t[0])&&xh(v,"disabled",e[15]),(!$||64&t[0])&&xh(v,"drifted",e[6]),(!$||64&t[0])&&xh(h,"drifted",e[6]),T===(T=C(e))&&A?A.p(e,t):(A&&A.d(1),A=T&&T(e),A&&(A.c(),A.m(m,null)))},i(e){$||(Wh(x,e),$=!0)},o(e){Kh(x,e),$=!1},d(n){n&&ch(t),x&&x.d(n),e[25](null),I&&I.d(),S&&S.d(),O&&O.d(),D.d(),A&&A.d(),k=!1,Gf(_)}}}function Tg(e,t,n){let i,r,o,a,s,u,l,{$$slots:c={},$$scope:d}=t,{highlightedCode:p}=t,{hasErrors:m=!1}=t,{errorMessages:f=[]}=t,{highlightClass:h="-solidity"}=t,{code:g=""}=t,{fence:v}=t,{hostConnected:b=!1}=t,{hostConnectError:y}=t,{hostSendCaps:$=ag}=t,{mcpApp:k}=t,{drifted:_=!1}=t,{onRestoreOriginal:w}=t,x=!1,I=!1;const S=og({canOpen:!1});var O,z;function E(e){l&&clearTimeout(l),n(9,a=e),l=setTimeout(()=>{n(9,a=void 0),l=void 0},1e3)}function D(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(),$.openLinks&&async function(e,t){if((await e.openLink({url:t})).isError)throw new Error("Host denied opening the link.")}(k,r).catch(e=>console.warn(`[mcp-apps] ${t} openLink failed`,e)))}}O=pg,z=S,Eh().$$.context.set(O,z);const C=D("a[href]","code preview"),T=D("a[href]","controls");let A;const N=D(".tippy-box a[href]","tippy");Dh(()=>(document.addEventListener("click",N,!0),A.addEventListener("click",T),()=>{document.removeEventListener("click",N,!0),A.removeEventListener("click",T)}));return e.$$set=e=>{"highlightedCode"in e&&n(0,p=e.highlightedCode),"hasErrors"in e&&n(1,m=e.hasErrors),"errorMessages"in e&&n(2,f=e.errorMessages),"highlightClass"in e&&n(3,h=e.highlightClass),"code"in e&&n(18,g=e.code),"fence"in e&&n(19,v=e.fence),"hostConnected"in e&&n(4,b=e.hostConnected),"hostConnectError"in e&&n(5,y=e.hostConnectError),"hostSendCaps"in e&&n(20,$=e.hostSendCaps),"mcpApp"in e&&n(21,k=e.mcpApp),"drifted"in e&&n(6,_=e.drifted),"onRestoreOriginal"in e&&n(7,w=e.onRestoreOriginal),"$$scope"in e&&n(23,d=e.$$scope)},e.$$.update=()=>{64&e.$$.dirty[0]&&(_||n(12,I=!1)),1048576&e.$$.dirty[0]&&S.set({canOpen:$.openLinks}),1048576&e.$$.dirty[0]&&document.documentElement.classList.toggle("mcp-no-open-links",!$.openLinks),1048576&e.$$.dirty[0]&&n(22,i=lg($)),4194320&e.$$.dirty[0]&&n(14,r=b&&!i),262962&e.$$.dirty[0]&&n(15,o=m||x||!g||!b||!!y||!!a)},[p,m,f,h,b,y,_,w,x,a,s,u,I,A,r,o,async function(){if(!o){n(10,s=void 0),n(11,u=void 0),n(8,x=!0);try{if(r)return await dg(g),void E("Copied");await async function(e,t,n){const i=ug(e);if(!lg(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:cg(n,t)}]})).isError)throw new sg}(k,g,v),E("Sent")}catch(e){if(e instanceof sg)return void n(11,u=e.message);console.error("[mcp-apps] Send Updates to Agent failed",e),n(10,s=e instanceof Error?e.message:String(e));try{await dg(g),E("Copied")}catch{}}finally{n(8,x=!1)}}},C,g,v,$,k,i,d,c,function(e){Ah[e?"unshift":"push"](()=>{A=e,n(13,A)})},()=>{n(12,I=!1),w()},()=>n(12,I=!1),()=>n(12,I=!0)]}class Ag extends ng{constructor(e){super(),tg(this,e,Tg,Cg,Yf,{highlightedCode:0,hasErrors:1,errorMessages:2,highlightClass:3,code:18,fence:19,hostConnected:4,hostConnectError:5,hostSendCaps:20,mcpApp:21,drifted:6,onRestoreOriginal:7},mg,[-1,-1])}}function Ng(e){return structuredClone(e)}function Ug(e){let t,n,i,r;const o=[{errors:e[7]},e[1].controlProps?.(e[2],e[6])??{}];function a(t){e[16](t)}var s=e[1].controls[e[2]];function u(e){let t={};for(let e=0;e<o.length;e+=1)t=Vf(t,o[e]);return void 0!==e[6]&&(t.opts=e[6]),{props:t}}return s&&(t=Sh(s,u(e)),Ah.push(()=>Gh(t,"opts",a))),{c(){t&&Xh(t.$$.fragment),i=gh()},m(e,n){t&&Yh(t,e,n),lh(e,i,n),r=!0},p(e,r){const l=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&&(c=e[1].controlProps?.(e[2],e[6])??{},"object"==typeof c&&null!==c?c:{})]):{};var c;if(!n&&64&r&&(n=!0,l.opts=e[6],Rh(()=>n=!1)),6&r&&s!==(s=e[1].controls[e[2]])){if(t){Jh();const e=t;Kh(e.$$.fragment,1,0,()=>{Qh(e,1)}),Vh()}s?(t=Sh(s,u(e)),Ah.push(()=>Gh(t,"opts",a)),Xh(t.$$.fragment),Wh(t.$$.fragment,1),Yh(t,i.parentNode,i)):t=null}else s&&t.$set(l)},i(e){r||(t&&Wh(t.$$.fragment,e),r=!0)},o(e){t&&Kh(t.$$.fragment,e),r=!1},d(e){e&&ch(i),t&&Qh(t,e)}}}function Pg(e){let t,n;return t=new Ag({props:{highlightedCode:e[12],hasErrors:e[8],errorMessages:e[11],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[13],$$slots:{controls:[Ug]},$$scope:{ctx:e}}}),{c(){Xh(t.$$.fragment)},m(e,i){Yh(t,e,i),n=!0},p(e,[n]){const i={};4096&n&&(i.highlightedCode=e[12]),256&n&&(i.hasErrors=e[8]),2048&n&&(i.errorMessages=e[11]),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]),1048774&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(Wh(t.$$.fragment,e),n=!0)},o(e){Kh(t.$$.fragment,e),n=!1},d(e){Qh(t,e)}}}function jg(e){return e.info??(e.info={}),e}function Lg(e,t,n){let i,r,o,a,s,u,l,c,d,{adapter:p}=t,{kind:m}=t,{mcpApp:f}=t,{hostConnected:h=!1}=t,{hostConnectError:g}=t,{hostSendCaps:v=ag}=t,b=p.emptyContract();function y(e){try{return p.print(p.build(e))}catch{return}}function $(e,t){if(!e)return;const i=function(e,t,n){return void 0===e||"result"===n&&!t}(c,s,t),r=jg({...u??{},...e,kind:m});if(n(6,u=r),!i)return;const o=function(e,t,n){const i=n(e);if(void 0!==i)return{opts:Ng(e),code:i,supersedesOpts:!1};const r=n(t);return void 0!==r?{opts:Ng(t),code:r,supersedesOpts:!0}:void 0}(r,{...e,kind:m},y);void 0!==o&&(l=o.opts,n(14,c=o.code),o.supersedesOpts&&n(6,u=jg(Ng(o.opts))))}return f.ontoolinput=e=>{$(e.arguments,"input")},f.ontoolresult=e=>{const t=e.structuredContent;t?.opts&&$(t.opts,"result")},e.$$set=e=>{"adapter"in e&&n(1,p=e.adapter),"kind"in e&&n(2,m=e.kind),"mcpApp"in e&&n(0,f=e.mcpApp),"hostConnected"in e&&n(3,h=e.hostConnected),"hostConnectError"in e&&n(4,g=e.hostConnectError),"hostSendCaps"in e&&n(5,v=e.hostSendCaps)},e.$$.update=()=>{if(66&e.$$.dirty&&u)try{n(15,b=p.build(u)),n(7,d=void 0)}catch(e){const t=e instanceof Error?e.message:String(e);n(7,d=p.optionsErrors(e)??{_:t||"Failed to build contract"})}32770&e.$$.dirty&&n(9,i=p.print(b)),546&e.$$.dirty&&n(12,r=v.openLinks?p.injectHyperlinks(p.highlight(i)):p.highlight(i)),128&e.$$.dirty&&n(11,o=Object.values(d??{}).filter(e=>void 0!==e)),128&e.$$.dirty&&n(8,a=void 0!==d),17152&e.$$.dirty&&n(10,s=function(e){const{originalCode:t,code:n,hasErrors:i}=e;return void 0!==t&&(i||n!==t)}({originalCode:c,code:i,hasErrors:a}))},[f,p,m,h,g,v,u,d,a,i,s,o,r,function(){null!=l&&n(6,u=jg(Ng(l)))},c,b,function(e){u=e,n(6,u)}]}class Rg extends ng{constructor(e){super(),tg(this,e,Lg,Pg,Yf,{adapter:1,kind:2,mcpApp:0,hostConnected:3,hostConnectError:4,hostSendCaps:5})}}const Zg=560;const Mg=["pure","view","nonpayable","payable"];function qg(e,t){return Mg[Math.max(Mg.indexOf(e),Mg.indexOf(t))]}class Bg{constructor(e){this.license="MIT",this.upgradeable=!1,this.topLevelComments=[],this.natspecTags=[],this.constructorArgs=[],this.constructorCode=[],this.variableOrErrorMap=new Map,this.parentMap=new Map,this.functionMap=new Map,this.libraryMap=new Map,this.structMap=new Map,this.name=function(e,t=!1){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/^[^a-zA-Z$_]+/,"").replace(/^(.)/,e=>t?e.toUpperCase():e).replace(/[^\w$]+(.?)/g,(e,t)=>t.toUpperCase())}(e,!0)}get parents(){return[...this.parentMap.values()].filter(e=>!e.importOnly).sort((e,t)=>"Initializable"===e.contract.name?-1:"Initializable"===t.contract.name?1:0)}get imports(){return[...[...this.parentMap.values()].map(e=>e.contract),...[...this.libraryMap.values()].map(e=>e.library)]}get libraries(){return[...this.libraryMap.values()]}get functions(){return[...this.functionMap.values()]}get structs(){return[...this.structMap.values()]}get variableOrErrorDefinitions(){return[...this.variableOrErrorMap.values()]}updateParentMap(e,t=[],n={}){const i=this.parentMap.has(e.name);return this.parentMap=new Map(this.parentMap).set(e.name,{contract:e,params:t,...n}),!i}addParent(e,t=[]){return this.updateParentMap(e,t)}addImportOnly(e){return this.updateParentMap(e,[],{importOnly:!0})}addConstructionOnly(e,t=[]){return this.updateParentMap(e,t,{constructionOnly:!0})}addLibrary(e,t){let n=!1;if(this.libraryMap.has(e.name)){const i=this.libraryMap.get(e.name),r=i.usingFor.size;t.forEach(e=>i.usingFor.add(e)),n=i.usingFor.size>r}else this.libraryMap.set(e.name,{library:e,usingFor:new Set(t)}),n=!0;return n}addOverride(e,t,n){const i=this.addFunction(t);i.override.add(e),n&&(i.mutability=qg(i.mutability,n))}addModifier(e,t){this.addFunction(t).modifiers.push(e)}addTopLevelComment(e){this.topLevelComments.push(e)}addNatspecTag(e,t){if(!/^(@custom:)?[a-z][a-z\-]*$/.exec(e))throw new Error(`Invalid natspec key: ${e}`);this.natspecTags.push({key:e,value:t})}addFunction(e){const t=[e.name,"(",...e.args.map(e=>e.name),")"].join(""),n=this.functionMap.get(t);if(void 0!==n)return n;{const n={override:new Set,modifiers:[],code:[],mutability:"nonpayable",final:!1,comments:[],...e};return this.functionMap.set(t,n),n}}addStruct(e){const t=this.structMap.get(e.name);if(void 0!==t)return t;{const t={...e};return this.structMap.set(e.name,t),t}}addConstructorArgument(e){this.constructorArgs.push(e)}addConstructorCode(e){this.constructorCode.push(e)}addFunctionCode(e,t,n){const i=this.addFunction(t);if(i.final)throw new Error(`Function ${t.name} is already finalized`);i.code.push(e),n&&(i.mutability=qg(i.mutability,n))}setFunctionBody(e,t,n){const i=this.addFunction(t);if(i.code.length>0)throw new Error(`Function ${t.name} has additional code`);i.code.push(...e),i.final=!0,n&&(i.mutability=n)}setFunctionComments(e,t){const n=this.addFunction(t);if(n.comments.length>0)throw new Error(`Function ${t.name} already has comments`);n.comments=e}addStateVariable(e,t){if(t)throw new Error("State variables should not be used when upgradeable is true. Set namespaced storage instead.");return this._addVariableOrErrorDefinition({code:e})}addConstantOrImmutableOrErrorDefinition(e,t){return this._addVariableOrErrorDefinition({code:e,comments:t})}_addVariableOrErrorDefinition(e){const t=this.variableOrErrorMap.has(e.code);return this.variableOrErrorMap.set(e.code,e),!t}addStructVariable(e,t){let n=this.structMap.get(e.name);n||(n=this.addStruct(e));const i=n.variables.includes(t);return i||n.variables.push(t),!i}}class Hg extends Error{constructor(e){super("Invalid options"),this.messages=e}}const Fg={name:"supportsInterface",kind:"public",args:[{name:"interfaceId",type:"bytes4"}],returns:["bool"],mutability:"view"};function Jg(e,t){switch(t){case"ownable":e.addParent(Wg.Ownable,[{lit:"initialOwner"}])&&e.addConstructorArgument({type:"address",name:"initialOwner"});break;case"roles":e.addParent(Wg.AccessControl)&&(e.addConstructorArgument({type:"address",name:"defaultAdmin"}),e.addConstructorCode("_grantRole(DEFAULT_ADMIN_ROLE, defaultAdmin);")),e.addOverride(Wg.AccessControl,Fg);break;case"managed":e.addParent(Wg.AccessManaged,[{lit:"initialAuthority"}])&&e.addConstructorArgument({type:"address",name:"initialAuthority"})}}function Vg(e,t,n,i,r){switch(!1===n&&(n="ownable"),Jg(e,n),n){case"ownable":e.addModifier("onlyOwner",t);break;case"roles":{const n=i+"_ROLE",o=e.addConstantOrImmutableOrErrorDefinition(`bytes32 public constant ${n} = keccak256("${n}");`);r&&o&&(e.addConstructorArgument({type:"address",name:r}),e.addConstructorCode(`_grantRole(${n}, ${r});`)),e.addModifier(`onlyRole(${n})`,t);break}case"managed":e.addModifier("restricted",t)}}const Wg={Ownable:{name:"Ownable",path:"@openzeppelin/contracts/access/Ownable.sol"},AccessControl:{name:"AccessControl",path:"@openzeppelin/contracts/access/AccessControl.sol"},AccessManaged:{name:"AccessManaged",path:"@openzeppelin/contracts/access/manager/AccessManaged.sol"}};function Kg(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Object.assign({name:e},t)]))}function Gg(e,t,n){e.addParent({name:"Pausable",path:"@openzeppelin/contracts/utils/Pausable.sol"});for(const t of n)e.addModifier("whenNotPaused",t);!function(e,t){Vg(e,Xg.pause,t,"PAUSER","pauser"),e.addFunctionCode("_pause();",Xg.pause),Vg(e,Xg.unpause,t,"PAUSER","pauser"),e.addFunctionCode("_unpause();",Xg.unpause)}(e,t)}Kg({mint:{kind:"public",args:[{name:"to",type:"address"},{name:"amount",type:"uint256"}]},burn:{kind:"public",args:[{name:"amount",type:"uint256"}]},getCCIPAdmin:{kind:"public",args:[],returns:["address"],mutability:"view"},setCCIPAdmin:{kind:"public",args:[{name:"newCCIPAdmin",type:"address"}]}}).burn,Kg({_authorizeAttachPolicyEngine:{kind:"internal",args:[{name:"policyEngine",type:"address"}]},transfer:{kind:"public",args:[{name:"to",type:"address"},{name:"amount",type:"uint256"}],returns:["bool"]},transferFrom:{kind:"public",args:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"amount",type:"uint256"}],returns:["bool"]},mint:{kind:"public",args:[{name:"to",type:"address"},{name:"amount",type:"uint256"}]},burnFrom:{kind:"public",args:[{name:"account",type:"address"},{name:"amount",type:"uint256"}]}});const Xg=Kg({pause:{kind:"public",args:[]},unpause:{kind:"public",args:[]}}),Yg=/[\n\r\u2028\u2029]/u;function Qg(e,t){if(Yg.test(e))throw new Hg({[t]:"Must not contain line breaks"})}const ev={license:"MIT"};const tv={access:!1,info:ev};function nv(e){return{access:e.access??!1,upgradeable:e.upgradeable??!1,info:{...tv.info,...e.info??{}}}}Kg({_authorizeUpgrade:{args:[{name:"newImplementation",type:"address"}],kind:"internal"}});const iv="BUSL-1.1",rv="https://github.com/smartcontractkit/chainlink-ace/blob/v1.2.0/LICENSE";function ov(e){return e.startsWith("@chainlink/ace/")}const av=[`// Imports Chainlink ACE components licensed under ${iv}.`,`// License: ${rv}`];function sv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var uv,lv;var cv=function(){if(lv)return uv;function e(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function t(e,t){for(var n,i="",r=0,o=-1,a=0,s=0;s<=e.length;++s){if(s<e.length)n=e.charCodeAt(s);else{if(47===n)break;n=47}if(47===n){if(o===s-1||1===a);else if(o!==s-1&&2===a){if(i.length<2||2!==r||46!==i.charCodeAt(i.length-1)||46!==i.charCodeAt(i.length-2))if(i.length>2){var u=i.lastIndexOf("/");if(u!==i.length-1){-1===u?(i="",r=0):r=(i=i.slice(0,u)).length-1-i.lastIndexOf("/"),o=s,a=0;continue}}else if(2===i.length||1===i.length){i="",r=0,o=s,a=0;continue}t&&(i.length>0?i+="/..":i="..",r=2)}else i.length>0?i+="/"+e.slice(o+1,s):i=e.slice(o+1,s),r=s-o-1;o=s,a=0}else 46===n&&-1!==a?++a:a=-1}return i}lv=1;var n={resolve:function(){for(var n,i="",r=!1,o=arguments.length-1;o>=-1&&!r;o--){var a;o>=0?a=arguments[o]:(void 0===n&&(n=process.cwd()),a=n),e(a),0!==a.length&&(i=a+"/"+i,r=47===a.charCodeAt(0))}return i=t(i,!r),r?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(n){if(e(n),0===n.length)return".";var i=47===n.charCodeAt(0),r=47===n.charCodeAt(n.length-1);return 0!==(n=t(n,!i)).length||i||(n="."),n.length>0&&r&&(n+="/"),i?"/"+n:n},isAbsolute:function(t){return e(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,i=0;i<arguments.length;++i){var r=arguments[i];e(r),r.length>0&&(void 0===t?t=r:t+="/"+r)}return void 0===t?".":n.normalize(t)},relative:function(t,i){if(e(t),e(i),t===i)return"";if((t=n.resolve(t))===(i=n.resolve(i)))return"";for(var r=1;r<t.length&&47===t.charCodeAt(r);++r);for(var o=t.length,a=o-r,s=1;s<i.length&&47===i.charCodeAt(s);++s);for(var u=i.length-s,l=a<u?a:u,c=-1,d=0;d<=l;++d){if(d===l){if(u>l){if(47===i.charCodeAt(s+d))return i.slice(s+d+1);if(0===d)return i.slice(s+d)}else a>l&&(47===t.charCodeAt(r+d)?c=d:0===d&&(c=0));break}var p=t.charCodeAt(r+d);if(p!==i.charCodeAt(s+d))break;47===p&&(c=d)}var m="";for(d=r+c+1;d<=o;++d)d!==o&&47!==t.charCodeAt(d)||(0===m.length?m+="..":m+="/..");return m.length>0?m+i.slice(s+c):(s+=c,47===i.charCodeAt(s)&&++s,i.slice(s))},_makeLong:function(e){return e},dirname:function(t){if(e(t),0===t.length)return".";for(var n=t.charCodeAt(0),i=47===n,r=-1,o=!0,a=t.length-1;a>=1;--a)if(47===(n=t.charCodeAt(a))){if(!o){r=a;break}}else o=!1;return-1===r?i?"/":".":i&&1===r?"//":t.slice(0,r)},basename:function(t,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');e(t);var i,r=0,o=-1,a=!0;if(void 0!==n&&n.length>0&&n.length<=t.length){if(n.length===t.length&&n===t)return"";var s=n.length-1,u=-1;for(i=t.length-1;i>=0;--i){var l=t.charCodeAt(i);if(47===l){if(!a){r=i+1;break}}else-1===u&&(a=!1,u=i+1),s>=0&&(l===n.charCodeAt(s)?-1===--s&&(o=i):(s=-1,o=u))}return r===o?o=u:-1===o&&(o=t.length),t.slice(r,o)}for(i=t.length-1;i>=0;--i)if(47===t.charCodeAt(i)){if(!a){r=i+1;break}}else-1===o&&(a=!1,o=i+1);return-1===o?"":t.slice(r,o)},extname:function(t){e(t);for(var n=-1,i=0,r=-1,o=!0,a=0,s=t.length-1;s>=0;--s){var u=t.charCodeAt(s);if(47!==u)-1===r&&(o=!1,r=s+1),46===u?-1===n?n=s:1!==a&&(a=1):-1!==n&&(a=-1);else if(!o){i=s+1;break}}return-1===n||-1===r||0===a||1===a&&n===r-1&&n===i+1?"":t.slice(n,r)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,i=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+i:n+e+i:i}("/",e)},parse:function(t){e(t);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return n;var i,r=t.charCodeAt(0),o=47===r;o?(n.root="/",i=1):i=0;for(var a=-1,s=0,u=-1,l=!0,c=t.length-1,d=0;c>=i;--c)if(47!==(r=t.charCodeAt(c)))-1===u&&(l=!1,u=c+1),46===r?-1===a?a=c:1!==d&&(d=1):-1!==a&&(d=-1);else if(!l){s=c+1;break}return-1===a||-1===u||0===d||1===d&&a===u-1&&a===s+1?-1!==u&&(n.base=n.name=0===s&&o?t.slice(1,u):t.slice(s,u)):(0===s&&o?(n.name=t.slice(1,a),n.base=t.slice(1,u)):(n.name=t.slice(s,a),n.base=t.slice(s,u)),n.ext=t.slice(a,u)),s>0?n.dir=t.slice(0,s-1):o&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};return n.posix=n,uv=n}(),dv=sv(cv);function pv(e){return e.transpiled??!/^I[A-Z]/.test(e.name)}function mv(e){return"Initializable"===e?e:e.replace(/(Upgradeable)?(?=\.|$)/,"Upgradeable")}function fv(e,t={}){const n=e.upgradeable,i=t.transformName??(e=>e);return{upgradeable:n,transformName:e=>{const t=n&&pv(e)?mv(e.name):e.name;return i(t)},transformInitName:e=>i(e.name),transformImport:e=>{const i=n&&pv(e)?function(e){const{dir:t,ext:n,name:i}=dv.parse(e.path);return{...e,name:mv(e.name),path:dv.posix.format({ext:n,dir:t.replace(/^@openzeppelin\/contracts/,"@openzeppelin/contracts-upgradeable"),name:mv(i)})}}(e):e;return t.transformImport?.(i)??i},formulaId:t.formulaId??"erc7201",additionalCompatibleLibraries:t.additionalCompatibleLibraries??[]}}const hv=Symbol("whitespace");function gv(...e){return function(e,...t){return[...vv(0,t,e)].join("\n")+"\n"}(4,...e)}function*vv(e,t,n){for(const i of t)i===hv?yield"":Array.isArray(i)?yield*vv(e+1,i,n):yield" ".repeat(e*n)+i}function bv(...e){return e.filter(e=>e.length>0).flatMap(e=>[hv,...e]).slice(1)}var yv="0.8.27";function $v(e,t){return e.imports.some(e=>e.path.startsWith(t))}var kv="git+https://github.com/OpenZeppelin/openzeppelin-community-contracts.git#b0ddd27";function _v(){return function(e,t){const n=t.split("#");if(!t.startsWith("git+")||2!==n.length)throw new Error(`Expected package dependency for ${e} in format git+<url>#<commit-hash>, but got ${t}`);const i=n[1];if(!/^[a-fA-F0-9]{7,40}$/.test(i))throw new Error(`Expected git commit hash for package dependency ${e} to have between 7 and 40 hex chars, but got ${i}`);return i.toLowerCase()}("@openzeppelin/community-contracts",kv)}function wv(e,t){const n=fv(e,t),i=e.structs.map(e=>function(e,{formulaId:t}){const[n,i,r]=[e.comments,e.name,e.variables],o=void 0!==e.namespaceId?[`/// @custom:storage-location ${t}:${e.namespaceId}`]:[],a=[...o,...n],s=r.length>0?"{":"{}";a.push([`struct ${i}`,s].join(" ")),r.length>0&&a.push(r,"}");return a}(e,n)),r=function(e,t){const n={};for(const i in e)n[i]=t(e[i]);return n}(function(e){const t={code:[],modifiers:[],override:[]};for(const n of e.functions)n.code.length>0?t.code.push(n):n.modifiers.length>0?t.modifiers.push(n):t.override.push(n);return t}(e),e=>e.map(e=>function(e,t){const{transformName:n}=t;if(e.override.size<=1&&0===e.modifiers.length&&0===e.code.length&&!e.final)return[];const i=[e.kind];"nonpayable"!==e.mutability&&i.push(e.mutability);1===e.override.size?i.push("override"):e.override.size>1&&i.push(`override(${[...e.override].map(n).join(", ")})`);i.push(...e.modifiers),e.returns?.length&&i.push(`returns (${e.returns.join(", ")})`);const r=[...e.code];if(e.override.size>0&&!e.final){const t=`super.${e.name}(${e.args.map(e=>e.name).join(", ")});`;r.push(e.returns?.length?"return "+t:t)}return i.length+e.code.length>1?Av(e.comments,"function "+e.name,e.args.map(e=>Nv(e,t)),i,r):[]}(e,n))),o=r.override.some(e=>e.length>0);return gv(...bv([`// SPDX-License-Identifier: ${e.license}`,Sv(e,n,t),`pragma solidity ^${t?.solidityVersion??yv};`],function(e,t){const n=new Map,i=new Set;for(const r of e){const{name:e,path:o}=t.transformImport(r);n.get(o)?.add(e)??n.set(o,new Set([e])),ov(r.path)&&i.add(o)}return Array.from(n.keys()).sort().flatMap(e=>[...i.has(e)?av:[],`import {${Array.from(n.get(e)).sort().join(", ")}} from "${e}";`])}(e.imports,n),[...Uv(e.topLevelComments,e.natspecTags.length>0),...(a=e.natspecTags,a.map(({key:e,value:t})=>`/// ${e} ${t}`)),[`contract ${e.name}`,...Ov(e,n),"{"].join(" "),bv(Pv(e,n),...i,xv(e.variableOrErrorDefinitions),Iv(e.variableOrErrorDefinitions),zv(e,n),...r.code,...r.modifiers,o?["// The following functions are overrides required by Solidity."]:[],...r.override),"}"]));var a}function xv(e){const t=e.filter(e=>e.comments?.length);return bv(...t.map(e=>[...e.comments,e.code]))}function Iv(e){const t=e.filter(e=>!e.comments?.length);return t.map(e=>e.code)}function Sv(e,t,n){const i=[],r={imports:e.imports.map(e=>t.transformImport(e))};if($v(r,"@openzeppelin/contracts")&&i.push({nameAndVersion:"OpenZeppelin Contracts ^5.7.0"}),$v(r,"@openzeppelin/community-contracts"))try{const e=_v();i.push({nameAndVersion:`OpenZeppelin Community Contracts commit ${e}`})}catch(e){console.error(e)}if(n?.additionalCompatibleLibraries)for(const e of n.additionalCompatibleLibraries)$v(r,e.path)&&i.push({nameAndVersion:`${e.name} ${e.version}`,alwaysKeepOzPrefix:e.alwaysKeepOzPrefix});if(0===i.length)return"";if(1===i.length)return`// Compatible with ${i[0].nameAndVersion}`;{const e="OpenZeppelin ";if(i[0].nameAndVersion.startsWith(e))for(let t=1;t<i.length;t++)i[t].nameAndVersion.startsWith(e)&&!i[t].alwaysKeepOzPrefix&&(i[t].nameAndVersion=i[t].nameAndVersion.slice(e.length));const t=i.map(e=>e.nameAndVersion);return`// Compatible with ${t.slice(0,-1).join(", ")} and ${t.slice(-1)}`}}function Ov(e,{transformName:t}){const n=e.parents.filter(e=>!e.constructionOnly);return n.length>0?["is "+n.map(e=>t(e.contract)).join(", ")]:[]}function zv(e,t){const n=e.parents.some(e=>e.params.length>0),i=e.constructorCode.length>0,r=e.parents.filter(Dv);if(n||i||t.upgradeable&&r.length>0){if(t.upgradeable){const n=r.filter(e=>pv(e.contract)),i=e.parents.filter(e=>!pv(e.contract)&&"Initializable"!==e.contract.name&&"UUPSUpgradeable"!==e.contract.name),o=Av([i.length>0?"/// @custom:oz-upgrades-unsafe-allow-reachable constructor":"/// @custom:oz-upgrades-unsafe-allow constructor"],"constructor",[],i.flatMap(e=>Cv(e,t)),["_disableInitializers();"]),a=Av([],"function initialize",e.constructorArgs.map(e=>Nv(e,t)),["public","initializer"],bv(n.flatMap(e=>Cv(e,t)).map(e=>e+";"),e.constructorCode));return bv(o,n.length>0?a:[])}return Av([],"constructor",e.constructorArgs.map(e=>Nv(e,t)),e.parents.flatMap(e=>Cv(e,t)),e.constructorCode)}return t.upgradeable?Ev:[]}const Ev=["/// @custom:oz-upgrades-unsafe-allow constructor","constructor() {",["_disableInitializers();"],"}"];function Dv(e){return!["Initializable"].includes(e.contract.name)}function Cv({contract:e,params:t},n){const i=n.upgradeable&&pv(e),r=i?`__${n.transformInitName(e)}_init`:n.transformName(e);return i||t.length>0?[r+"("+t.map(Tv).join(", ")+")"]:[]}function Tv(e){if("object"==typeof e){if("lit"in e)return e.lit;if("note"in e)return`${Tv(e.value)} /* ${e.note} */`;throw Error("Unknown value type")}if("number"==typeof e){if(Number.isSafeInteger(e))return e.toFixed(0);throw new Error(`Number not representable (${e})`)}return/[^\x20-\x7E]/u.test(t=e)?`unicode"${t.replace(/[\\"\r\n\x0b]/gu,e=>'"'===e?'\\"':"\\"===e?"\\\\":"\n"===e?"\\n":"\r"===e?"\\r":"\\x0b")}"`:`"${t.replace(/[\\"]/g,"\\$&")}"`;var t}function Av(e,t,n,i,r){const o=[...e],a=[t,...n,...i].map(e=>e.length).reduce((e,t)=>e+t),s=r.length>0?"{":"{}";return a<=72?o.push([`${t}(${n.join(", ")})`,...i,s].join(" ")):o.push(`${t}(${n.join(", ")})`,i,s),r.length>0&&o.push(r,"}"),o}function Nv(e,{transformName:t}){let n;return"string"==typeof e.type?(/^[A-Z]/.test(e.type)&&e.type,n=e.type):n=t(e.type),[n,e.name].join(" ")}function Uv(e,t=!1){const n=e.map(e=>`// ${e}`);return e.length>0&&t&&n.push("//"),n}function Pv(e,{transformName:t}){return e.libraries&&0!==e.libraries.length?e.libraries.sort((e,t)=>e.library.name.localeCompare(t.library.name)).map(e=>{const n=Array.from(e.usingFor).sort((e,t)=>e.localeCompare(t));return`using ${t(e.library)} for ${n.join(", ")};`}):[]}function jv(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))}Kg({clock:{kind:"public",args:[],returns:["uint48"],mutability:"view"},CLOCK_MODE:{kind:"public",args:[],returns:["string memory"],mutability:"pure"}}),jv(8),jv(16),jv(32),jv(64),jv(128),jv(256);Kg({decimals:{kind:"public",args:[],returns:["uint8"],mutability:"pure"},_update:{kind:"internal",args:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"value",type:"uint256"}]},_approve:{kind:"internal",args:[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"emitEvent",type:"bool"}]},mint:{kind:"public",args:[{name:"to",type:"address"},{name:"amount",type:"uint256"}]},pause:{kind:"public",args:[]},unpause:{kind:"public",args:[]},snapshot:{kind:"public",args:[]},nonces:{kind:"public",args:[{name:"owner",type:"address"}],returns:["uint256"],mutability:"view"},_checkTokenBridge:{kind:"internal",args:[{name:"caller",type:"address"}]},setTokenBridge:{kind:"public",args:[{name:"tokenBridge_",type:"address"}]}});Kg({_update:{kind:"internal",args:[{name:"to",type:"address"},{name:"tokenId",type:"uint256"},{name:"auth",type:"address"}],returns:["address"]},tokenURI:{kind:"public",args:[{name:"tokenId",type:"uint256"}],returns:["string memory"],mutability:"view"},_baseURI:{kind:"internal",args:[],returns:["string memory"],mutability:"pure"},_increaseBalance:{kind:"internal",args:[{name:"account",type:"address"},{name:"value",type:"uint128"}]}}),Kg({_update:{kind:"internal",args:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"ids",type:"uint256[] memory"},{name:"values",type:"uint256[] memory"}]},setURI:{kind:"public",args:[{name:"newuri",type:"string memory"}]},mint:{kind:"public",args:[{name:"account",type:"address"},{name:"id",type:"uint256"},{name:"amount",type:"uint256"},{name:"data",type:"bytes memory"}]},mintBatch:{kind:"public",args:[{name:"to",type:"address"},{name:"ids",type:"uint256[] memory"},{name:"amounts",type:"uint256[] memory"},{name:"data",type:"bytes memory"}]}}),Kg({freeze:{kind:"public",args:[{name:"user",type:"address"},{name:"amount",type:"uint256"}]},allowUser:{kind:"public",args:[{name:"user",type:"address"}]},disallowUser:{kind:"public",args:[{name:"user",type:"address"}]},blockUser:{kind:"public",args:[{name:"user",type:"address"}]},unblockUser:{kind:"public",args:[{name:"user",type:"address"}]},isUserAllowed:{kind:"public",args:[{name:"user",type:"address"}],returns:["bool"],mutability:"view"}}),Kg({_rawSignatureValidation:{kind:"internal",args:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes calldata"}],returns:["bool"],mutability:"view"}}),Kg({isValidSignature:{kind:"public",mutability:"view",args:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes calldata"}],returns:["bytes4"]},_validateUserOp:{kind:"internal",args:[{name:"userOp",type:"PackedUserOperation calldata"},{name:"userOpHash",type:"bytes32"},{name:"signature",type:"bytes calldata"}],returns:["uint256"]},_erc7821AuthorizedExecutor:{kind:"internal",args:[{name:"caller",type:"address"},{name:"mode",type:"bytes32"},{name:"executionData",type:"bytes calldata"}],returns:["bool"],mutability:"view"},addSigners:{kind:"public",args:[{name:"signers",type:"bytes[] memory"}]},removeSigners:{kind:"public",args:[{name:"signers",type:"bytes[] memory"}]},setThreshold:{kind:"public",args:[{name:"threshold",type:"uint64"}]},setSignerWeights:{kind:"public",args:[{name:"signers",type:"bytes[] memory"},{name:"weights",type:"uint64[] memory"}]}}),Kg({votingDelay:{args:[],returns:["uint256"],kind:"public",mutability:"pure"},votingPeriod:{args:[],returns:["uint256"],kind:"public",mutability:"pure"},proposalThreshold:{args:[],returns:["uint256"],kind:"public",mutability:"pure"},proposalNeedsQueuing:{args:[{name:"proposalId",type:"uint256"}],returns:["bool"],kind:"public",mutability:"view"},quorum:{args:[{name:"blockNumber",type:"uint256"}],returns:["uint256"],kind:"public",mutability:"view"},quorumDenominator:{args:[],returns:["uint256"],kind:"public",mutability:"view"},propose:{args:[{name:"targets",type:"address[] memory"},{name:"values",type:"uint256[] memory"},{name:"calldatas",type:"bytes[] memory"},{name:"description",type:"string memory"}],returns:["uint256"],kind:"public"},_propose:{args:[{name:"targets",type:"address[] memory"},{name:"values",type:"uint256[] memory"},{name:"calldatas",type:"bytes[] memory"},{name:"description",type:"string memory"},{name:"proposer",type:"address"}],returns:["uint256"],kind:"internal"},_queueOperations:{args:[{name:"proposalId",type:"uint256"},{name:"targets",type:"address[] memory"},{name:"values",type:"uint256[] memory"},{name:"calldatas",type:"bytes[] memory"},{name:"descriptionHash",type:"bytes32"}],kind:"internal",returns:["uint48"]},_executeOperations:{args:[{name:"proposalId",type:"uint256"},{name:"targets",type:"address[] memory"},{name:"values",type:"uint256[] memory"},{name:"calldatas",type:"bytes[] memory"},{name:"descriptionHash",type:"bytes32"}],kind:"internal"},_cancel:{args:[{name:"targets",type:"address[] memory"},{name:"values",type:"uint256[] memory"},{name:"calldatas",type:"bytes[] memory"},{name:"descriptionHash",type:"bytes32"}],returns:["uint256"],kind:"internal"},state:{args:[{name:"proposalId",type:"uint256"}],returns:["ProposalState"],kind:"public",mutability:"view"},_executor:{args:[],returns:["address"],kind:"internal",mutability:"view"}});var Lv="5.7.0";!function(e){const[t,n,i]=e.split(".").map(e=>parseInt(e,10));if(0===t&&8===n&&Number.isInteger(i))return`0.8.${Math.min(i,26)}`}(yv);function Rv(e,t){return wv(e,{...t,additionalCompatibleLibraries:[{name:"OpenZeppelin Uniswap Hooks",path:"@openzeppelin/uniswap-hooks",version:"^1.2.1",alwaysKeepOzPrefix:!0}]})}const Zv={name:"BaseHook",displayName:"Base Hook",category:"Base",tooltipText:"Provides standard entry points, permission checks, and validation utilities for building hooks.",tooltipLink:"https://docs.openzeppelin.com/uniswap-hooks/api/base#BaseHook",shares:"optional",alreadyImplementsShares:!1,inputs:[],disabledFunctions:[],functions:{...Kg({getHookPermissions:{kind:"public",mutability:"pure",args:[],returns:["Hooks.Permissions memory"]},_beforeInitialize:{kind:"internal",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"sqrtPriceX96",type:"uint160"}],returns:["bytes4"]},_afterInitialize:{kind:"internal",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"sqrtPriceX96",type:"uint160"},{name:"tick",type:"int24"}],returns:["bytes4"]},_beforeAddLiquidity:{kind:"internal",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"params",type:"ModifyLiquidityParams calldata"},{name:"hookData",type:"bytes calldata"}],returns:["bytes4"]},_afterAddLiquidity:{kind:"internal",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"params",type:"ModifyLiquidityParams calldata"},{name:"delta0",type:"BalanceDelta"},{name:"delta1",type:"BalanceDelta"},{name:"hookData",type:"bytes calldata"}],returns:["bytes4","BalanceDelta"]},_beforeRemoveLiquidity:{kind:"internal",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"params",type:"ModifyLiquidityParams calldata"},{name:"hookData",type:"bytes calldata"}],returns:["bytes4"]},_afterRemoveLiquidity:{kind:"internal",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"params",type:"ModifyLiquidityParams calldata"},{name:"delta0",type:"BalanceDelta"},{name:"delta1",type:"BalanceDelta"},{name:"hookData",type:"bytes calldata"}],returns:["bytes4","BalanceDelta"]},_beforeSwap:{kind:"internal",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"params",type:"SwapParams calldata"},{name:"hookData",type:"bytes calldata"}],returns:["bytes4","BeforeSwapDelta","uint24"]},_afterSwap:{kind:"internal",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"params",type:"SwapParams calldata"},{name:"delta",type:"BalanceDelta"},{name:"hookData",type:"bytes calldata"}],returns:["bytes4","int128"]},_beforeDonate:{kind:"internal",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"amount0",type:"uint256"},{name:"amount1",type:"uint256"},{name:"hookData",type:"bytes calldata"}],returns:["bytes4"]},_afterDonate:{kind:"internal",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"amount0",type:"uint256"},{name:"amount1",type:"uint256"},{name:"hookData",type:"bytes calldata"}],returns:["bytes4"]}})},permissions:{beforeInitialize:!1,afterInitialize:!1,beforeAddLiquidity:!1,afterAddLiquidity:!1,beforeRemoveLiquidity:!1,afterRemoveLiquidity:!1,beforeSwap:!1,afterSwap:!1,beforeDonate:!1,afterDonate:!1,beforeSwapReturnDelta:!1,afterSwapReturnDelta:!1,afterAddLiquidityReturnDelta:!1,afterRemoveLiquidityReturnDelta:!1}},Mv={name:"BaseAsyncSwap",displayName:"Async Swaps",category:"Base",tooltipText:"Overrides the default swap flow, enabling custom execution and settlement, such as swap queuing and/or reordering.",tooltipLink:"https://docs.openzeppelin.com/uniswap-hooks/api/base#BaseAsyncSwap",shares:"optional",alreadyImplementsShares:!1,inputs:[],disabledFunctions:[],functions:{...Kg({...Zv.functions})},permissions:{beforeInitialize:!1,afterInitialize:!1,beforeAddLiquidity:!1,afterAddLiquidity:!1,beforeRemoveLiquidity:!1,afterRemoveLiquidity:!1,beforeSwap:!0,afterSwap:!1,beforeDonate:!1,afterDonate:!1,beforeSwapReturnDelta:!0,afterSwapReturnDelta:!1,afterAddLiquidityReturnDelta:!1,afterRemoveLiquidityReturnDelta:!1}},qv={name:"BaseCustomAccounting",displayName:"Custom Accounting",category:"Base",tooltipText:"Overrides how liquidity modifications are processed and how liquidity shares are minted/burned.",tooltipLink:"https://docs.openzeppelin.com/uniswap-hooks/api/base#BaseCustomAccounting",shares:"required",alreadyImplementsShares:!1,inputs:[],disabledFunctions:["_beforeAddLiquidity","_beforeRemoveLiquidity"],functions:{...Kg({...Zv.functions,addLiquidity:{kind:"public",mutability:"payable",args:[{name:"params",type:"AddLiquidityParams calldata"}],returns:["BalanceDelta"]},removeLiquidity:{kind:"public",args:[{name:"params",type:"RemoveLiquidityParams calldata"}],returns:["BalanceDelta"]},_getAddLiquidity:{kind:"internal",args:[{name:"sqrtPriceX96",type:"uint160"},{name:"params",type:"AddLiquidityParams memory"}],returns:["bytes memory","uint256"]},_getRemoveLiquidity:{kind:"internal",args:[{name:"params",type:"RemoveLiquidityParams memory"}],returns:["bytes memory","uint256"]},_mint:{kind:"internal",args:[{name:"params",type:"AddLiquidityParams memory"},{name:"callerDelta",type:"BalanceDelta"},{name:"feesAccrued",type:"BalanceDelta"},{name:"shares",type:"uint256"}],returns:[]},_burn:{kind:"internal",args:[{name:"params",type:"RemoveLiquidityParams memory"},{name:"callerDelta",type:"BalanceDelta"},{name:"feesAccrued",type:"BalanceDelta"},{name:"shares",type:"uint256"}],returns:[]}})},permissions:{beforeInitialize:!0,afterInitialize:!1,beforeAddLiquidity:!0,afterAddLiquidity:!1,beforeRemoveLiquidity:!0,afterRemoveLiquidity:!1,beforeSwap:!1,afterSwap:!1,beforeDonate:!1,afterDonate:!1,beforeSwapReturnDelta:!1,afterSwapReturnDelta:!1,afterAddLiquidityReturnDelta:!1,afterRemoveLiquidityReturnDelta:!1}},Bv={name:"BaseCustomCurve",displayName:"Custom Curve",category:"Base",tooltipText:"Allows for custom pricing logic and swap amount calculations, useful to implement a custom curve.",tooltipLink:"https://docs.openzeppelin.com/uniswap-hooks/api/base#BaseCustomCurve",shares:"required",alreadyImplementsShares:!1,inputs:[],disabledFunctions:[...qv.disabledFunctions],functions:{...Kg({...Zv.functions,...qv.functions,_getUnspecifiedAmount:{kind:"internal",args:[{name:"params",type:"SwapParams calldata"}],returns:["uint256"]},_getSwapFeeAmount:{kind:"internal",args:[{name:"params",type:"SwapParams calldata"},{name:"unspecifiedAmount",type:"uint256"}],returns:["uint256"]},_getAmountOut:{kind:"internal",args:[{name:"params",type:"RemoveLiquidityParams memory"}],returns:["uint256","uint256","uint256"]},_getAmountIn:{kind:"internal",args:[{name:"params",type:"AddLiquidityParams memory"}],returns:["uint256","uint256","uint256"]}})},permissions:{beforeInitialize:!0,afterInitialize:!1,beforeAddLiquidity:!0,afterAddLiquidity:!1,beforeRemoveLiquidity:!0,afterRemoveLiquidity:!1,beforeSwap:!0,afterSwap:!1,beforeDonate:!1,afterDonate:!1,beforeSwapReturnDelta:!0,afterSwapReturnDelta:!1,afterAddLiquidityReturnDelta:!1,afterRemoveLiquidityReturnDelta:!1}},Hv={name:"BaseDynamicFee",displayName:"Dynamic Pool Fee",category:"Fee",tooltipText:"Applies a dynamic fee to the entire pool, determined by <code>_getFee</code> and updated upon calling <code>_poke</code>.",tooltipLink:"https://docs.openzeppelin.com/uniswap-hooks/api/fee#BaseDynamicFee",shares:"optional",alreadyImplementsShares:!1,inputs:[],disabledFunctions:[],functions:{...Kg({...Zv.functions,_getFee:{kind:"internal",args:[{name:"key",type:"PoolKey calldata"}],returns:["uint24"]},_poke:{kind:"internal",args:[{name:"key",type:"PoolKey calldata"}]},poke:{kind:"public",args:[{name:"key",type:"PoolKey calldata"}],returns:[]}})},permissions:{beforeInitialize:!1,afterInitialize:!0,beforeAddLiquidity:!1,afterAddLiquidity:!1,beforeRemoveLiquidity:!1,afterRemoveLiquidity:!1,beforeSwap:!1,afterSwap:!1,beforeDonate:!1,afterDonate:!1,beforeSwapReturnDelta:!1,afterSwapReturnDelta:!1,afterAddLiquidityReturnDelta:!1,afterRemoveLiquidityReturnDelta:!1}},Fv={name:"BaseOverrideFee",displayName:"Dynamic Swap Fee",category:"Fee",tooltipText:"Applies a dynamic fee calculated in a per-swap basis, determined by the <code>_getFee</code> function.",tooltipLink:"https://docs.openzeppelin.com/uniswap-hooks/api/fee#BaseOverrideFee",shares:"optional",alreadyImplementsShares:!1,inputs:[],disabledFunctions:[],functions:{...Kg({...Zv.functions,_getFee:{kind:"internal",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"params",type:"SwapParams calldata"},{name:"hookData",type:"bytes calldata"}],returns:["uint24"]}})},permissions:{beforeInitialize:!0,afterInitialize:!1,beforeAddLiquidity:!1,afterAddLiquidity:!1,beforeRemoveLiquidity:!1,afterRemoveLiquidity:!1,beforeSwap:!0,afterSwap:!1,beforeDonate:!1,afterDonate:!1,beforeSwapReturnDelta:!1,afterSwapReturnDelta:!1,afterAddLiquidityReturnDelta:!1,afterRemoveLiquidityReturnDelta:!1}},Jv={name:"BaseDynamicAfterFee",displayName:"Swap Target Enforcer",category:"Fee",tooltipText:"Enforces a target for swap outcomes determined by <code>_getTargetUnspecified</code>, capturing any better-than-expected results as hook fees that can be handled or distributed via <code>_afterSwapHandler</code>.",tooltipLink:"https://docs.openzeppelin.com/uniswap-hooks/api/fee#BaseDynamicAfterFee",shares:"optional",alreadyImplementsShares:!1,inputs:[],disabledFunctions:[],functions:{...Kg({...Zv.functions,_getTargetUnspecified:{kind:"internal",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"params",type:"SwapParams calldata"},{name:"hookData",type:"bytes calldata"}],returns:["uint256","bool"]},_afterSwapHandler:{kind:"internal",args:[{name:"key",type:"PoolKey calldata"},{name:"params",type:"SwapParams calldata"},{name:"delta",type:"BalanceDelta"},{name:"targetUnspecifiedAmount",type:"uint256"},{name:"feeAmount",type:"uint256"}]}})},permissions:{beforeInitialize:!1,afterInitialize:!1,beforeAddLiquidity:!1,afterAddLiquidity:!1,beforeRemoveLiquidity:!1,afterRemoveLiquidity:!1,beforeSwap:!0,afterSwap:!0,beforeDonate:!1,afterDonate:!1,beforeSwapReturnDelta:!1,afterSwapReturnDelta:!0,afterAddLiquidityReturnDelta:!1,afterRemoveLiquidityReturnDelta:!1}},Vv={name:"BaseHookFee",displayName:"Hook Fee",category:"Fee",tooltipText:"Base implementation for applying hook fees to the unspecified currency of the swap, independent of the pool's LP fee.",tooltipLink:"https://docs.openzeppelin.com/uniswap-hooks/api/fee#BaseHookFee",shares:"optional",alreadyImplementsShares:!1,inputs:[],disabledFunctions:[],functions:{...Kg({...Zv.functions,_getHookFee:{kind:"internal",mutability:"view",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"params",type:"SwapParams calldata"},{name:"delta",type:"BalanceDelta"},{name:"hookData",type:"bytes calldata"}],returns:["uint24"]},handleHookFees:{kind:"public",args:[{name:"currencies",type:"Currency[] memory"}],returns:[]}})},permissions:{beforeInitialize:!1,afterInitialize:!1,beforeAddLiquidity:!1,afterAddLiquidity:!1,beforeRemoveLiquidity:!1,afterRemoveLiquidity:!1,beforeSwap:!1,afterSwap:!0,beforeDonate:!1,afterDonate:!1,beforeSwapReturnDelta:!1,afterSwapReturnDelta:!0,afterAddLiquidityReturnDelta:!1,afterRemoveLiquidityReturnDelta:!1}},Wv={name:"AntiSandwichHook",displayName:"Sandwich Resistance",category:"General",tooltipText:"Maintains the swap pricing in the zeroForOne direction anchored to the beginning-of-block price, nullifying the profitability of sandwich attacks.",tooltipLink:"https://docs.openzeppelin.com/uniswap-hooks/api/general#AntiSandwichHook",shares:"optional",alreadyImplementsShares:!1,inputs:[],disabledFunctions:[],functions:{...Kg({...Zv.functions,_afterSwapHandler:{kind:"internal",args:[{name:"key",type:"PoolKey calldata"},{name:"params",type:"SwapParams calldata"},{name:"delta",type:"BalanceDelta"},{name:"targetUnspecifiedAmount",type:"uint256"},{name:"feeAmount",type:"uint256"}]}})},permissions:{beforeInitialize:!1,afterInitialize:!1,beforeAddLiquidity:!1,afterAddLiquidity:!1,beforeRemoveLiquidity:!1,afterRemoveLiquidity:!1,beforeSwap:!0,afterSwap:!0,beforeDonate:!1,afterDonate:!1,beforeSwapReturnDelta:!1,afterSwapReturnDelta:!0,afterAddLiquidityReturnDelta:!1,afterRemoveLiquidityReturnDelta:!1}},Kv={name:"LimitOrderHook",displayName:"Limit Orders",category:"General",tooltipText:"Enables to place, cancel and withdraw orders that are executed when the limit price is reached. Orders are placed in single-currency and out-of-range of the current price.",tooltipLink:"https://docs.openzeppelin.com/uniswap-hooks/api/general#LimitOrderHook",shares:"optional",alreadyImplementsShares:!1,inputs:[],disabledFunctions:[],functions:{...Kg({...Zv.functions,_afterInitialize:{kind:"internal",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"sqrtPriceX96",type:"uint160"},{name:"tick",type:"int24"}],returns:["bytes4"]},_afterSwap:{kind:"internal",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"params",type:"SwapParams calldata"},{name:"delta",type:"BalanceDelta"},{name:"hookData",type:"bytes calldata"}],returns:["bytes4","int128"]},placeOrder:{kind:"public",args:[{name:"key",type:"PoolKey calldata"},{name:"tick",type:"int24"},{name:"zeroForOne",type:"bool"},{name:"liquidity",type:"uint128"}]},cancelOrder:{kind:"public",args:[{name:"key",type:"PoolKey calldata"},{name:"tickLower",type:"int24"},{name:"zeroForOne",type:"bool"},{name:"to",type:"address"}]},withdraw:{kind:"public",args:[{name:"orderId",type:"OrderIdLibrary.OrderId"},{name:"to",type:"address"}],returns:["uint256","uint256"]},getTickLowerLast:{kind:"public",mutability:"view",args:[{name:"poolId",type:"PoolId"}],returns:["int24"]},getOrderId:{kind:"public",mutability:"view",args:[{name:"key",type:"PoolKey memory"},{name:"tickLower",type:"int24"},{name:"zeroForOne",type:"bool"}],returns:["OrderIdLibrary.OrderId"]},getOrderLiquidity:{kind:"public",mutability:"view",args:[{name:"orderId",type:"OrderIdLibrary.OrderId"},{name:"owner",type:"address"}],returns:["uint256"]},getHookPermissions:{kind:"public",mutability:"pure",args:[],returns:["Hooks.Permissions memory"]},_handlePlaceCallback:{kind:"internal",args:[{name:"placeData",type:"PlaceCallbackData memory"}],returns:["uint256","uint256"]},_handleCancelCallback:{kind:"internal",args:[{name:"cancelData",type:"CancelCallbackData memory"}],returns:["uint256","uint256"]},_handleWithdrawCallback:{kind:"internal",args:[{name:"withdrawData",type:"WithdrawCallbackData memory"}]}})},permissions:{beforeInitialize:!1,afterInitialize:!0,beforeAddLiquidity:!1,afterAddLiquidity:!1,beforeRemoveLiquidity:!1,afterRemoveLiquidity:!1,beforeSwap:!1,afterSwap:!0,beforeDonate:!1,afterDonate:!1,beforeSwapReturnDelta:!1,afterSwapReturnDelta:!1,afterAddLiquidityReturnDelta:!1,afterRemoveLiquidityReturnDelta:!1}},Gv={name:"LiquidityPenaltyHook",displayName:"JIT Liquidity Resistance",category:"General",tooltipText:"When liquidity is added and removed faster than <code>_blockNumberOffset</code> blocks, accumulated fees are linearly penalized and donated to in-range LPs.",tooltipLink:"https://docs.openzeppelin.com/uniswap-hooks/api/general#LiquidityPenaltyHook",shares:"optional",alreadyImplementsShares:!1,inputs:[{name:"blockNumberOffset",label:"Block Number Offset",placeholder:"10",type:"number",tooltipText:"The minimum time window (in blocks) that must pass after adding liquidity before it can be removed without any penalty. During this period, JIT attacks are deterred through fee withholding and penalties. Higher values provide stronger JIT protection but may discourage legitimate LPs."}],disabledFunctions:[],functions:{...Kg({...Zv.functions,_afterAddLiquidity:{kind:"internal",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"params",type:"ModifyLiquidityParams calldata"},{name:"delta",type:"BalanceDelta"},{name:"feeDelta",type:"BalanceDelta"},{name:"hookData",type:"bytes calldata"}],returns:["bytes4","BalanceDelta"]},_afterRemoveLiquidity:{kind:"internal",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"params",type:"ModifyLiquidityParams calldata"},{name:"delta",type:"BalanceDelta"},{name:"feeDelta",type:"BalanceDelta"},{name:"hookData",type:"bytes calldata"}],returns:["bytes4","BalanceDelta"]},_getBlockNumber:{kind:"internal",mutability:"view",args:[],returns:["uint48"]},getBlockNumberOffset:{kind:"public",mutability:"view",args:[],returns:["uint48"]},getLastAddedLiquidityBlock:{kind:"public",mutability:"view",args:[{name:"poolId",type:"PoolId"},{name:"positionKey",type:"bytes32"}],returns:["uint48"]},getWithheldFees:{kind:"public",mutability:"view",args:[{name:"poolId",type:"PoolId"},{name:"positionKey",type:"bytes32"}],returns:["BalanceDelta"]},_updateLastAddedLiquidityBlock:{kind:"internal",args:[{name:"poolId",type:"PoolId"},{name:"positionKey",type:"bytes32"}]},_takeFeesToHook:{kind:"internal",args:[{name:"key",type:"PoolKey calldata"},{name:"positionKey",type:"bytes32"},{name:"feeDelta",type:"BalanceDelta"}]},_settleFeesFromHook:{kind:"internal",args:[{name:"key",type:"PoolKey calldata"},{name:"positionKey",type:"bytes32"}],returns:["BalanceDelta"]},_calculateLiquidityPenalty:{kind:"internal",args:[{name:"feeDelta",type:"BalanceDelta"},{name:"lastAddedLiquidityBlock",type:"uint48"}],returns:["BalanceDelta"]}})},permissions:{beforeInitialize:!1,afterInitialize:!1,beforeAddLiquidity:!1,afterAddLiquidity:!0,beforeRemoveLiquidity:!1,afterRemoveLiquidity:!0,beforeSwap:!1,afterSwap:!1,beforeDonate:!1,afterDonate:!1,beforeSwapReturnDelta:!1,afterSwapReturnDelta:!1,afterAddLiquidityReturnDelta:!0,afterRemoveLiquidityReturnDelta:!0}},Xv={name:"ReHypothecationHook",displayName:"Liquidity Rehypothecation",category:"General",tooltipText:"Enables rehypothecation of liquidity positions by depositing assets into yield-generating sources while providing Just-in-Time liquidity during swaps.",tooltipLink:"https://docs.openzeppelin.com/uniswap-hooks/api/general#ReHypothecationHook",shares:"ERC20",alreadyImplementsShares:!0,inputs:[],disabledFunctions:[],functions:{...Kg({...Zv.functions,getPoolKey:{kind:"public",mutability:"view",args:[],returns:["PoolKey memory"]},addReHypothecatedLiquidity:{kind:"public",mutability:"payable",args:[{name:"shares",type:"uint256"}],returns:["BalanceDelta"]},removeReHypothecatedLiquidity:{kind:"public",mutability:"nonpayable",args:[{name:"shares",type:"uint256"}],returns:["BalanceDelta"]},previewAmountsForShares:{kind:"public",mutability:"view",args:[{name:"shares",type:"uint256"}],returns:["uint256","uint256"]},getTickLower:{kind:"public",mutability:"view",args:[],returns:["int24"]},getTickUpper:{kind:"public",mutability:"view",args:[],returns:["int24"]},getCurrencyYieldSource:{kind:"public",mutability:"view",args:[{name:"currency",type:"Currency"}],returns:["address"]},_depositToYieldSource:{kind:"internal",args:[{name:"currency",type:"Currency"},{name:"amount",type:"uint256"}],returns:[]},_withdrawFromYieldSource:{kind:"internal",args:[{name:"currency",type:"Currency"},{name:"amount",type:"uint256"}],returns:[]},_getAmountInYieldSource:{kind:"internal",mutability:"view",args:[{name:"currency",type:"Currency"}],returns:["uint256"]},_convertSharesToAmounts:{kind:"internal",mutability:"view",args:[{name:"shares",type:"uint256"}],returns:["uint256","uint256"]},_shareToAmount:{kind:"internal",mutability:"view",args:[{name:"shares",type:"uint256"},{name:"currency",type:"Currency"}],returns:["uint256"]},_getLiquidityToUse:{kind:"internal",mutability:"view",args:[],returns:["uint256"]},_getHookPositionLiquidity:{kind:"internal",mutability:"view",args:[],returns:["uint128"]},_modifyLiquidity:{kind:"internal",args:[{name:"liquidityDelta",type:"int256"}],returns:["BalanceDelta"]},_resolveHookDelta:{kind:"internal",args:[{name:"currency",type:"Currency"}],returns:[]},_transferFromSenderToHook:{kind:"internal",args:[{name:"currency",type:"Currency"},{name:"amount",type:"uint256"},{name:"sender",type:"address"}],returns:[]},_transferFromHookToSender:{kind:"internal",args:[{name:"currency",type:"Currency"},{name:"amount",type:"uint256"},{name:"sender",type:"address"}],returns:[]}})},permissions:{beforeInitialize:!0,afterInitialize:!1,beforeAddLiquidity:!1,afterAddLiquidity:!1,beforeRemoveLiquidity:!1,afterRemoveLiquidity:!1,beforeSwap:!0,afterSwap:!0,beforeDonate:!1,afterDonate:!1,beforeSwapReturnDelta:!1,afterSwapReturnDelta:!1,afterAddLiquidityReturnDelta:!1,afterRemoveLiquidityReturnDelta:!1}},Yv={name:"BaseOracleHook",displayName:"Oracle Hook",category:"Oracles",tooltipText:"Enables a Uniswap V4 pool to record price observations and expose an oracle interface. Records tick observations on every swap and allows querying time-weighted average prices.",tooltipLink:"https://docs.openzeppelin.com/uniswap-hooks/api/oracle#BaseOracleHook",shares:"optional",alreadyImplementsShares:!1,inputs:[{name:"maxAbsTickDelta",label:"Max Absolute Tick Delta",type:"number",placeholder:"887272",tooltipText:"Limits tick changes per observation in the truncated oracle. Lower values resist manipulation but lag during real volatility; higher values respond faster but are more vulnerable to attacks. Default: 887272 (no truncation)."}],disabledFunctions:[],functions:{...Kg({...Zv.functions,_afterInitialize:{kind:"internal",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"sqrtPriceX96",type:"uint160"},{name:"tick",type:"int24"}],returns:["bytes4"]},_beforeSwap:{kind:"internal",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"params",type:"SwapParams calldata"},{name:"hookData",type:"bytes calldata"}],returns:["bytes4","BeforeSwapDelta","uint24"]},observe:{kind:"external",mutability:"view",args:[{name:"secondsAgos",type:"uint32[] calldata"},{name:"underlyingPoolId",type:"PoolId"}],returns:["int56[] memory","int56[] memory"]},increaseObservationCardinalityNext:{kind:"public",args:[{name:"observationCardinalityNext",type:"uint16"},{name:"underlyingPoolId",type:"PoolId"}]}})},permissions:{beforeInitialize:!1,afterInitialize:!0,beforeAddLiquidity:!1,afterAddLiquidity:!1,beforeRemoveLiquidity:!1,afterRemoveLiquidity:!1,beforeSwap:!0,afterSwap:!1,beforeDonate:!1,afterDonate:!1,beforeSwapReturnDelta:!1,afterSwapReturnDelta:!1,afterAddLiquidityReturnDelta:!1,afterRemoveLiquidityReturnDelta:!1}},Qv={BaseHook:Zv,BaseAsyncSwap:Mv,BaseCustomAccounting:qv,BaseCustomCurve:Bv,BaseDynamicFee:Hv,BaseOverrideFee:Fv,BaseDynamicAfterFee:Jv,BaseHookFee:Vv,AntiSandwichHook:Wv,LiquidityPenaltyHook:Gv,LimitOrderHook:Kv,ReHypothecationHook:Xv,BaseOracleHook:Yv,OracleHookWithV3Adapters:{name:"OracleHookWithV3Adapters",displayName:"Oracle Hook V3 adapted",category:"Oracles",tooltipText:"Extends the Oracle Hook with Uniswap V3-compatible adapter contracts. Automatically deploys standard and truncated oracle adapters on pool initialization, enabling seamless integration with V3 oracle consumers.",tooltipLink:"https://docs.openzeppelin.com/uniswap-hooks/api/oracle#OracleHookWithV3Adapters",shares:"optional",alreadyImplementsShares:!1,inputs:[{name:"maxAbsTickDelta",label:"Max Absolute Tick Delta",type:"number",placeholder:"887272",tooltipText:"Limits tick changes per observation in the truncated oracle. Lower values resist manipulation but lag during real volatility; higher values respond faster but are more vulnerable to attacks. Default: 887272 (no truncation)."}],disabledFunctions:[],functions:{...Kg({...Yv.functions,_afterInitialize:{kind:"internal",args:[{name:"sender",type:"address"},{name:"key",type:"PoolKey calldata"},{name:"sqrtPriceX96",type:"uint160"},{name:"tick",type:"int24"}],returns:["bytes4"]},standardAdapter:{kind:"public",mutability:"view",args:[{name:"poolId",type:"PoolId"}],returns:["address"]},truncatedAdapter:{kind:"public",mutability:"view",args:[{name:"poolId",type:"PoolId"}],returns:["address"]}})},permissions:{beforeInitialize:!1,afterInitialize:!0,beforeAddLiquidity:!1,afterAddLiquidity:!1,beforeRemoveLiquidity:!1,afterRemoveLiquidity:!1,beforeSwap:!0,afterSwap:!1,beforeDonate:!1,afterDonate:!1,beforeSwapReturnDelta:!1,afterSwapReturnDelta:!1,afterAddLiquidityReturnDelta:!1,afterRemoveLiquidityReturnDelta:!1}}},eb=["beforeInitialize","afterInitialize","beforeAddLiquidity","beforeRemoveLiquidity","afterAddLiquidity","afterRemoveLiquidity","beforeSwap","afterSwap","beforeDonate","afterDonate","beforeSwapReturnDelta","afterSwapReturnDelta","afterAddLiquidityReturnDelta","afterRemoveLiquidityReturnDelta"],tb=["beforeSwap","beforeAddLiquidity","beforeRemoveLiquidity","beforeDonate"];function nb(e){return"ERC20"===e||"ERC6909"===e||"ERC1155"===e}var ib={BaseHook:"@openzeppelin/uniswap-hooks/base/BaseHook.sol",BaseAsyncSwap:"@openzeppelin/uniswap-hooks/base/BaseAsyncSwap.sol",BaseCustomAccounting:"@openzeppelin/uniswap-hooks/base/BaseCustomAccounting.sol",AddLiquidityParams:"parent",RemoveLiquidityParams:"parent",BaseCustomCurve:"@openzeppelin/uniswap-hooks/base/BaseCustomCurve.sol",BaseDynamicFee:"@openzeppelin/uniswap-hooks/fee/BaseDynamicFee.sol",BaseOverrideFee:"@openzeppelin/uniswap-hooks/fee/BaseOverrideFee.sol",BaseDynamicAfterFee:"@openzeppelin/uniswap-hooks/fee/BaseDynamicAfterFee.sol",AntiSandwichHook:"@openzeppelin/uniswap-hooks/general/AntiSandwichHook.sol",LiquidityPenaltyHook:"@openzeppelin/uniswap-hooks/general/LiquidityPenaltyHook.sol",LimitOrderHook:"@openzeppelin/uniswap-hooks/general/LimitOrderHook.sol",OrderIdLibrary:"@openzeppelin/uniswap-hooks/general/LimitOrderHook.sol",BeforeSwapDelta:"@uniswap/v4-core/src/types/BeforeSwapDelta.sol",Hooks:"@uniswap/v4-core/src/libraries/Hooks.sol",IPoolManager:"@uniswap/v4-core/src/interfaces/IPoolManager.sol",PoolKey:"@uniswap/v4-core/src/types/PoolKey.sol",PoolId:"@uniswap/v4-core/src/types/PoolId.sol",Currency:"@uniswap/v4-core/src/types/Currency.sol",BalanceDelta:"@uniswap/v4-core/src/types/BalanceDelta.sol",SwapParams:"@uniswap/v4-core/src/types/PoolOperation.sol",ModifyLiquidityParams:"@uniswap/v4-core/src/types/PoolOperation.sol",CurrencySettler:"@openzeppelin/uniswap-hooks/utils/CurrencySettler.sol"};const rb={hook:"BaseHook",name:"MyHook",pausable:!1,access:tv.access,info:tv.info,currencySettler:!1,safeCast:!1,transientStorage:!1,shares:{options:!1,name:"MyShares",symbol:"MSH",uri:""},permissions:{beforeInitialize:!1,afterInitialize:!1,beforeAddLiquidity:!1,beforeRemoveLiquidity:!1,afterAddLiquidity:!1,afterRemoveLiquidity:!1,beforeSwap:!1,afterSwap:!1,beforeDonate:!1,afterDonate:!1,beforeSwapReturnDelta:!1,afterSwapReturnDelta:!1,afterAddLiquidityReturnDelta:!1,afterRemoveLiquidityReturnDelta:!1},inputs:{blockNumberOffset:10,maxAbsTickDelta:887272}};function ob(e){const t=function(e){return{...e,...nv(e),pausable:e.pausable??rb.pausable,currencySettler:e.currencySettler??rb.currencySettler,safeCast:e.safeCast??rb.safeCast,transientStorage:e.transientStorage??rb.transientStorage,shares:e.shares??rb.shares,permissions:e.permissions??rb.permissions,inputs:e.inputs??rb.inputs}}(e);!function(e){const t={};if("BaseOracleHook"===e.hook||"OracleHookWithV3Adapters"===e.hook){const n=e.inputs.maxAbsTickDelta;(!Number.isInteger(n)||n<0||n>887272)&&(t.maxAbsTickDelta="Max absolute tick delta must be a positive integer between 0 and 887272.")}if("LiquidityPenaltyHook"===e.hook){const n=e.inputs.blockNumberOffset;Number.isInteger(n)&&n>0||(t.blockNumberOffset="Block number offset must be a positive integer.")}if(Object.keys(t).length>0)throw new Hg(t)}(t);const n=new Bg(t.name),i=Qv[t.hook];switch(function(e,t){const{securityContact:n,license:i}=t;n&&(Qg(n,"securityContact"),e.addNatspecTag("@custom:security-contact",n)),i&&(Qg(i,"license"),e.license=i)}(n,t.info),function(e,t){switch(e.addConstructorArgument({name:"_poolManager",type:"IPoolManager"}),e.addConstructionOnly({name:"BaseHook",path:ab("BaseHook")},[{lit:"_poolManager"}]),t.hook){case"BaseHook":!function(e,t){e.addParent({name:t.hook,path:ab(t.hook)},[{lit:"_poolManager"}])}(e,t);break;case"BaseAsyncSwap":!function(e,t){e.addTopLevelComment("TODO: Implement how asynchronous swaps are executed"),e.addTopLevelComment("i.e. queuing swaps to be executed together in batches, reordering, etc"),e.addParent({name:t.hook,path:ab(t.hook)},[])}(e,t);break;case"BaseCustomAccounting":!function(e,t){e.addTopLevelComment("TODO: Override the required functions to customize the accounting logic"),e.addTopLevelComment("i.e. liquidity mining, rewarding well-behaved LPs, etc"),e.addOverride({name:"BaseCustomAccounting"},Qv.BaseCustomAccounting.functions._getAddLiquidity),e.setFunctionBody(["// TODO: Implement how liquidity additions and minted shares are computed"],Qv.BaseCustomAccounting.functions._getAddLiquidity),e.addOverride({name:"BaseCustomAccounting"},Qv.BaseCustomAccounting.functions._getRemoveLiquidity),e.setFunctionBody(["// TODO: Implement how liquidity removals and burned shares are computed"],Qv.BaseCustomAccounting.functions._getRemoveLiquidity),e.addOverride({name:"BaseCustomAccounting"},Qv.BaseCustomAccounting.functions._mint),e.setFunctionBody(["// TODO: Implement how shares are minted"],Qv.BaseCustomAccounting.functions._mint),e.addOverride({name:"BaseCustomAccounting"},Qv.BaseCustomAccounting.functions._burn),e.setFunctionBody(["// TODO: Implement how shares are burned"],Qv.BaseCustomAccounting.functions._burn),e.addParent({name:t.hook,path:ab(t.hook)},[])}(e,t);break;case"BaseCustomCurve":!function(e,t){e.addTopLevelComment("TODO: Override the required functions to customize the pricing curve"),e.addTopLevelComment("i.e. specialized pricing curves, etc"),e.addOverride({name:"BaseCustomCurve"},Qv.BaseCustomCurve.functions._getUnspecifiedAmount),e.setFunctionBody(["// TODO: Implement how the unspecified currency amount is computed"],Qv.BaseCustomCurve.functions._getUnspecifiedAmount),e.addOverride({name:"BaseCustomCurve"},Qv.BaseCustomCurve.functions._getSwapFeeAmount),e.setFunctionBody(["// TODO: Implement how the LPs fees amount is computed"],Qv.BaseCustomCurve.functions._getSwapFeeAmount),e.addOverride({name:"BaseCustomCurve"},Qv.BaseCustomCurve.functions._getAmountOut),e.setFunctionBody(["// TODO: Implement how the amount out of the swap is computed"],Qv.BaseCustomCurve.functions._getAmountOut),e.addOverride({name:"BaseCustomCurve"},Qv.BaseCustomCurve.functions._getAmountIn),e.setFunctionBody(["// TODO: Implement how the amount in of the swap is computed"],Qv.BaseCustomCurve.functions._getAmountIn),e.addOverride({name:"BaseCustomAccounting"},Qv.BaseCustomAccounting.functions._mint),e.setFunctionBody(["// TODO: Implement how shares are minted"],Qv.BaseCustomAccounting.functions._mint),e.addOverride({name:"BaseCustomAccounting"},Qv.BaseCustomAccounting.functions._burn),e.setFunctionBody(["// TODO: Implement how shares are burned"],Qv.BaseCustomAccounting.functions._burn),e.addParent({name:t.hook,path:ab(t.hook)},[])}(e,t);break;case"BaseDynamicFee":!function(e,t){e.addTopLevelComment("TODO: Override `_getFee` to customize the LP fee for the entire pool"),e.addTopLevelComment("i.e. dynamic fees depending on current market conditions, etc"),e.addOverride({name:"BaseDynamicFee"},Qv.BaseDynamicFee.functions._getFee),e.setFunctionBody(["// TODO: Implement how the LP fee is computed"],Qv.BaseDynamicFee.functions._getFee),e.addFunctionCode("_poke(key);",Qv.BaseDynamicFee.functions.poke),Vg(e,Qv.BaseDynamicFee.functions.poke,t.access,"POKE","poker"),e.addParent({name:t.hook,path:ab(t.hook)},[])}(e,t);break;case"BaseOverrideFee":!function(e,t){e.addTopLevelComment("TODO: Override `_getFee` to customize the swap fee for each swap"),e.addTopLevelComment("i.e. dynamic fees depending on current market conditions, swap size, swap direction, etc"),e.addOverride({name:"BaseOverrideFee"},Qv.BaseOverrideFee.functions._getFee),e.setFunctionBody(["// TODO: Implement how the LP fee is computed"],Qv.BaseOverrideFee.functions._getFee),e.addParent({name:t.hook,path:ab(t.hook)},[])}(e,t);break;case"BaseDynamicAfterFee":!function(e,t){e.addTopLevelComment("TODO: Override `_getTargetUnspecified` to customize the swap outcome target"),e.addTopLevelComment("i.e. capture any positive difference of the swap outcome that surpasses the target"),e.addOverride({name:"BaseDynamicAfterFee"},Qv.BaseDynamicAfterFee.functions._getTargetUnspecified),e.setFunctionBody(["// TODO: Implement how the target unspecified amount is computed"],Qv.BaseDynamicAfterFee.functions._getTargetUnspecified),e.addOverride({name:"BaseDynamicAfterFee"},Qv.BaseDynamicAfterFee.functions._afterSwapHandler),e.setFunctionBody(["// TODO: Implement how the accumulated target penalty fees are handled after swaps"],Qv.BaseDynamicAfterFee.functions._afterSwapHandler),e.addParent({name:t.hook,path:ab(t.hook)},[])}(e,t);break;case"BaseHookFee":!function(e,t){e.addTopLevelComment("TODO: Override `_getHookFee` to customize the hook fee collection for the entire pool"),e.addTopLevelComment("i.e. dynamic hook-owned fees depending on current market conditions, etc"),e.addOverride({name:"BaseHookFee"},Qv.BaseHookFee.functions._getHookFee),e.setFunctionBody(["// TODO: Implement how the Hook fee is computed"],Qv.BaseHookFee.functions._getHookFee),e.addOverride({name:"BaseHookFee"},Qv.BaseHookFee.functions.handleHookFees),e.setFunctionBody(["// TODO: Implement how the accumulated hook fees are handled"],Qv.BaseHookFee.functions.handleHookFees),e.addParent({name:t.hook,path:ab(t.hook)},[])}(e,t);break;case"AntiSandwichHook":!function(e,t){e.addTopLevelComment("TODO: Override `_afterSwapHandler` to determine how accumulated penalty fees are handled"),e.addTopLevelComment("i.e. distributing the fees to well-behaved LPs, improving swap pricing, etc"),e.addOverride({name:"AntiSandwichHook"},Qv.AntiSandwichHook.functions._afterSwapHandler),e.setFunctionBody(["// TODO: Implement how the accumulated penalty fees from sandwich attacks are handled after swaps"],Qv.AntiSandwichHook.functions._afterSwapHandler),e.addParent({name:t.hook,path:ab(t.hook)},[])}(e,t);break;case"ReHypothecationHook":!function(e,t){e.addTopLevelComment("TODO: Override the required functions to customize the rehypothecation logic"),e.addTopLevelComment("i.e. keeping the liquidity in a yield-bearing ERC-4626 Vault while still being available for swaps, etc"),e.addOverride({name:"ReHypothecationHook"},Qv.ReHypothecationHook.functions.getCurrencyYieldSource),e.setFunctionBody(["// TODO: Implement how the yield source address is computed for a given currency"],Qv.ReHypothecationHook.functions.getCurrencyYieldSource),e.addOverride({name:"ReHypothecationHook"},Qv.ReHypothecationHook.functions._depositToYieldSource),e.setFunctionBody(["// TODO: Implement how a given currency is deposited to it's corresponding yield source"],Qv.ReHypothecationHook.functions._depositToYieldSource),e.addOverride({name:"ReHypothecationHook"},Qv.ReHypothecationHook.functions._withdrawFromYieldSource),e.setFunctionBody(["// TODO: Implement how a given currency is withdrawn from it's corresponding yield source"],Qv.ReHypothecationHook.functions._withdrawFromYieldSource),e.addOverride({name:"ReHypothecationHook"},Qv.ReHypothecationHook.functions._getAmountInYieldSource),e.setFunctionBody(["// TODO: Implement how the hook's balance of a given currency in it's corresponding yield source is obtained"],Qv.ReHypothecationHook.functions._getAmountInYieldSource),e.addParent({name:t.hook,path:ab(t.hook)},[])}(e,t);break;case"LiquidityPenaltyHook":!function(e,t){e.addTopLevelComment("TODO: Determine the block number offset for the liquidity penalty"),e.addTopLevelComment("i.e. `10` in order to deter JIT attacks linearly for the first 10 blocks after adding liquidity");const n=t.inputs?.blockNumberOffset,i=[void 0!==n&&n>0?n:10];e.addParent({name:t.hook,path:ab(t.hook)},i)}(e,t);break;case"LimitOrderHook":!function(e,t){e.addParent({name:t.hook,path:ab(t.hook)},[])}(e,t);break;case"BaseOracleHook":case"OracleHookWithV3Adapters":sb(e,t);break;default:throw new Error(`Unknown hook: ${t.hook}`)}}(n,t),t.access&&Jg(n,t.access),t.currencySettler&&function(e){e.addLibrary({name:"CurrencySettler",path:"@openzeppelin/uniswap-hooks/utils/CurrencySettler.sol"},["Currency"])}(n),t.safeCast&&function(e){e.addLibrary({name:"SafeCast",path:"@openzeppelin/contracts/utils/math/SafeCast.sol"},["*"])}(n),t.transientStorage&&function(e){e.addLibrary({name:"TransientSlot",path:"@openzeppelin/contracts/utils/TransientSlot.sol"},["bytes32"]),e.addLibrary({name:"SlotDerivation",path:"@openzeppelin/contracts/utils/SlotDerivation.sol"},["bytes32"])}(n),i.shares){case"disabled":t.shares.options=!1;break;case"required":t.shares.options||(t.shares.options="ERC20");break;case"ERC20":t.shares.options="ERC20";break;case"ERC6909":t.shares.options="ERC6909";break;case"ERC1155":t.shares.options="ERC1155"}switch(t.shares.options){case"ERC20":!function(e,t){const n=Qv[t.hook];n.alreadyImplementsShares?e.addConstructionOnly({name:"ERC20",path:"@openzeppelin/contracts/token/ERC20/ERC20.sol"},[t.shares.name||"",t.shares.symbol||""]):e.addParent({name:"ERC20",path:"@openzeppelin/contracts/token/ERC20/ERC20.sol"},[t.shares.name||"",t.shares.symbol||""])}(n,t);break;case"ERC6909":!function(e){e.addParent({name:"ERC6909",path:"@openzeppelin/contracts/token/ERC6909/ERC6909.sol"},[]),e.addOverride({name:"ERC6909"},Fg)}(n);break;case"ERC1155":!function(e,t){e.addParent({name:"ERC1155",path:"@openzeppelin/contracts/token/ERC1155/ERC1155.sol"},[t.shares.uri||""]),e.addOverride({name:"ERC1155"},Fg)}(n,t)}for(const e of eb)(pb(t.hook,e)||hb(t,e)||t.pausable&&mb(t,e))&&(t.permissions[e]=!0);return t.pausable&&(Gg(n,t.access,[]),function(e,t){for(const n of Object.values(Qv[t.hook].functions))if(lb(n,t)){e.functions.find(e=>e.name===n.name)||(e.setFunctionBody([ub(n)],n),e.addOverride({name:e.name},n)),e.addModifier("whenNotPaused",n)}}(n,t)),function(e,t){for(const n of function(e){return Object.entries(e.permissions).filter(([e,t])=>t).map(([e])=>e)}(t)){if(!(pb(t.hook,n)||t.pausable&&mb(t,n))){const t=`_${n}`,i=Qv.BaseHook.functions[t];n.includes("ReturnDelta")||e.functions.some(e=>e.name===i?.name)||(e.addOverride({name:"BaseHook"},i),e.setFunctionBody([`// TODO: Implement _${t}`],i))}}}(n,t),function(e,t){const n=eb.map((e,n)=>` ${e}: ${t.permissions[e]??!1}${n===eb.length-1?"":","}`);e.addOverride({name:"BaseHook"},Qv.BaseHook.functions.getHookPermissions),e.setFunctionBody(["return Hooks.Permissions({",...n,"});"],Qv.BaseHook.functions.getHookPermissions)}(n,t),function(e){const t=new Set;for(const n of e.constructorArgs)t.add(cb(n.type));for(const n of e.libraries)for(const e of n.usingFor)t.add(cb(e));for(const n of Object.values(e.functions)){for(const e of n.args)t.add(cb(e.type));for(const e of n.returns||[])t.add(cb(e))}for(const n of t){if(db(n))continue;const t=ib[n];if(!t)throw new Error(`Path for ${n} not found in importPaths.json`);"parent"!==t&&e.addImportOnly({name:n,path:t})}}(n),n}function ab(e){const t=Qv[e].category;return"Oracles"===t?`@openzeppelin/uniswap-hooks/oracles/panoptic/${e}.sol`:`@openzeppelin/uniswap-hooks/${t.toLowerCase()}/${e}.sol`}function sb(e,t){e.addTopLevelComment("TODO: Determine the max absolute tick delta for the truncated oracle"),e.addTopLevelComment("i.e. `488` to limit tick changes per observation to an equivalent of 5% abrupt price changes"),e.addTopLevelComment("i.e. `887272` to disable truncation and allow full tick range observations");const n=t.inputs?.maxAbsTickDelta,i=[void 0!==n&&n>=0&&n<=887272?n:887272];e.addParent({name:t.hook,path:ab(t.hook)},i)}function ub(e){const t=`super.${e.name}(${e.args.map(e=>e.name).join(", ")})`;return e.returns&&e.returns.length>0?`return ${t};`:`${t};`}function lb(e,t){if(Qv[t.hook].disabledFunctions.includes(e.name))return!1;for(const t of tb)if(e.name===`_${t}`)return!0;return!("external"!==e.kind&&"public"!==e.kind||"pure"===e.mutability||"view"===e.mutability||["unlockCallback","pause","unpause","increaseObservationCardinalityNext"].includes(e.name))}function cb(e){let t="";for(t="string"==typeof e?e.includes(" ")?e.split(" ")[0]:e:e.name,t.includes(".")&&(t=t.split(".")[0]);t.endsWith("]");){const e=t.lastIndexOf("[");if(-1===e)break;t=t.slice(0,e)}return t.startsWith("address")&&(t="address"),t}function db(e){if(new Set(["bool","address","string","bytes","byte","uint","int","fixed","ufixed","*"]).has(e))return!0;const t=e.match(/^(u?int)(\d+)$/);if(t){const e=Number(t[2]);return e>=8&&e<=256&&e%8==0}return!!/^bytes([1-9]|[12]\d|3[0-2])$/.test(e)||e.startsWith("mapping")}function pb(e,t){return Qv[e].permissions[t]}function mb(e,t){return Boolean(e.pausable)&&tb.includes(t)}function fb(e){return e.concat("ReturnDelta")}function hb(e,t){return function(e,t){return e.permissions[t]}(e,fb(t))}var gb="1.2.1";const vb={print:function(e=rb){return Rv(ob(e))},getVersionedRemappings:function(){return[`@openzeppelin/contracts/=@openzeppelin/contracts@${Lv}/`,`@openzeppelin/uniswap-hooks/=@openzeppelin/uniswap-hooks@${gb}/src/`]},defaults:rb,isAccessControlRequired:function(e){return!!e.pausable||"BaseDynamicFee"===e.hook}};var bb,yb;function $b(){if(yb)return bb;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}yb=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 u 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 l(e){return e?"string"==typeof e?e:e.source:null}function c(e){return m("(?=",e,")")}function d(e){return m("(?:",e,")*")}function p(e){return m("(?:",e,")?")}function m(...e){return e.map(e=>l(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=>l(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=l(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+)?",k="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",_="\\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},O=S("//","$"),z=S("/\\*","\\*/"),E=S("#","$"),D={scope:"number",begin:$,relevance:0},C={scope:"number",begin:k,relevance:0},T={scope:"number",begin:_,relevance:0},A={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[w,{begin:/\[/,end:/\]/,relevance:0,contains:[w]}]},N={scope:"title",begin:b,relevance:0},U={scope:"title",begin:y,relevance:0},P={begin:"\\.\\s*"+y,relevance:0};var j=Object.freeze({__proto__:null,APOS_STRING_MODE:x,BACKSLASH_ESCAPE:w,BINARY_NUMBER_MODE:T,BINARY_NUMBER_RE:_,COMMENT:S,C_BLOCK_COMMENT_MODE:z,C_LINE_COMMENT_MODE:O,C_NUMBER_MODE:C,C_NUMBER_RE:k,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:E,IDENT_RE:b,MATCH_NOTHING_RE:/\b\B/,METHOD_GUARD:P,NUMBER_MODE:D,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: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:U});function L(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 Z(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=L,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 q(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 B(e,t){void 0===e.relevance&&(e.relevance=1)}const H=(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,c(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},F=["of","and","for","in","not","or","if","then","parent","list","value"];function J(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,J(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,V(n[0],n[1])]})}}function V(e,t){return t?Number(t):function(e){return F.includes(e.toLowerCase())}(e)?0:1}const W={},K=e=>{console.error(e)},G=(e,...t)=>{console.log(`WARN: ${e}`,...t)},X=(e,t)=>{W[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),W[`${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 K("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Y;if("object"!=typeof e.beginScope||null===e.beginScope)throw K("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 K("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Y;if("object"!=typeof e.endScope||null===e.endScope)throw K("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(l(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,q,ee,H].forEach(e=>e(o,a)),e.compilerExtensions.forEach(e=>e(o,a)),o.__beforeBegin=null,[Z,M,B].forEach(e=>e(o,a)),o.isCompiled=!0;let u=null;return"object"==typeof o.keywords&&o.keywords.$pattern&&(o.keywords=Object.assign({},o.keywords),u=o.keywords.$pattern,delete o.keywords.$pattern),u=u||/\w+/,o.keywords&&(o.keywords=J(o.keywords,e.case_insensitive)),s.keywordPatternRe=t(u,!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=l(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?",l={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:u};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 u=Object.create(null);function l(e,t){return e.keywords[t]}function c(){if(!O.keywords)return void E.addText(D);let e=0;O.keywordPatternRe.lastIndex=0;let t=O.keywordPatternRe.exec(D),n="";for(;t;){n+=D.substring(e,t.index);const i=x.case_insensitive?t[0].toLowerCase():t[0],r=l(O,i);if(r){const[e,o]=r;if(E.addText(n),n="",u[i]=(u[i]||0)+1,u[i]<=7&&(C+=o),e.startsWith("_"))n+=t[0];else{const n=x.classNameAliases[e]||e;p(t[0],n)}}else n+=t[0];e=O.keywordPatternRe.lastIndex,t=O.keywordPatternRe.exec(D)}n+=D.substring(e),E.addText(n)}function d(){null!=O.subLanguage?function(){if(""===D)return;let e=null;if("string"==typeof O.subLanguage){if(!i[O.subLanguage])return void E.addText(D);e=b(O.subLanguage,D,!0,z[O.subLanguage]),z[O.subLanguage]=e._top}else e=y(D,O.subLanguage.length?O.subLanguage:null);O.relevance>0&&(C+=e.relevance),E.__addSublanguage(e._emitter,e.language)}():c(),D=""}function p(e,t){""!==e&&(E.startScope(t),E.addText(e),E.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):(D=r,c(),D=""),n++}}function f(e,t){return e.scope&&"string"==typeof e.scope&&E.openNode(x.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(p(D,x.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),D=""):e.beginScope._multi&&(m(e.beginScope,t),D="")),O=Object.create(e,{parent:{value:O}}),O}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===O.matcher.regexIndex?(D+=e[0],1):(N=!0,0)}function $(e){const t=e[0],i=n.substring(e.index),r=g(O,e,i);if(!r)return ae;const o=O;O.endScope&&O.endScope._wrap?(d(),p(t,O.endScope._wrap)):O.endScope&&O.endScope._multi?(d(),m(O.endScope,e)):o.skip?D+=t:(o.returnEnd||o.excludeEnd||(D+=t),d(),o.excludeEnd&&(D=t));do{O.scope&&E.closeNode(),O.skip||O.subLanguage||(C+=O.relevance),O=O.parent}while(O!==r.parent);return r.starts&&f(r.starts,e),o.returnEnd?0:t.length}let k={};function _(i,o){const s=o&&o[0];if(D+=i,null==s)return d(),0;if("begin"===k.type&&"end"===o.type&&k.index===o.index&&""===s){if(D+=n.slice(o.index,o.index+1),!a){const t=new Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=k.rule,t}return 1}if(k=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?D+=n:(i.excludeBegin&&(D+=n),d(),i.returnBegin||i.excludeBegin||(D=n)),f(i,e),i.returnBegin?0:n.length}(o);if("illegal"===o.type&&!r){const e=new Error('Illegal lexeme "'+s+'" for mode "'+(O.scope||"<unnamed>")+'"');throw e.mode=O,e}if("end"===o.type){const e=$(o);if(e!==ae)return e}if("illegal"===o.type&&""===s)return D+="\n",1;if(A>1e5&&A>3*o.index){throw new Error("potential infinite loop, way more iterations than matches")}return D+=s,s.length}const x=w(e);if(!x)throw K(s.replace("{}",e)),new Error('Unknown language: "'+e+'"');const I=te(x);let S="",O=o||I;const z={},E=new h.__emitter(h);!function(){const e=[];for(let t=O;t!==x;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach(e=>E.openNode(e))}();let D="",C=0,T=0,A=0,N=!1;try{if(x.__emitTokens)x.__emitTokens(n,E);else{for(O.matcher.considerAll();;){A++,N?N=!1:O.matcher.considerAll(),O.matcher.lastIndex=T;const e=O.matcher.exec(n);if(!e)break;const t=_(n.substring(T,e.index),e);T=e.index+t}_(n.substring(T))}return E.finalize(),S=E.toHTML(),{language:e,value:S,relevance:C,illegal:!1,_emitter:E,_top:O}}catch(t){if(t.message&&t.message.includes("Illegal"))return{language:e,value:re(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:T,context:n.slice(T-100,T+100),mode:t.mode,resultSoFar:S},_emitter:E};if(a)return{language:e,value:re(n),illegal:!1,relevance:0,errorRaised:t,_emitter:E,_top:O};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:l,_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,u=a;return u.secondBest=s,u}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||(G(s.replace("{}",n[1])),G("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 k=!1;function _(){if("loading"===document.readyState)return k||window.addEventListener("DOMContentLoaded",function(){_()},!1),void(k=!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:_,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:()=>{_(),X("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:function(){_(),X("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:function(e,t){let r=null;try{r=t(n)}catch(t){if(K("Language definition for '{}' could not be registered.".replace("{}",e)),!a)throw t;K(t),r=l}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:c,either:f,optional:p,anyNumberOfTimes:d};for(const t in j)"object"==typeof j[t]&&e(j[t]);return Object.assign(n,j),n},ue=se({});return ue.newInstance=()=>se({}),bb=ue,ue.HighlightJS=ue,ue.default=ue,bb}var kb,_b,wb,xb,Ib,Sb,Ob,zb=sv($b()),Eb={exports:{}};function Db(){if(_b)return kb;function e(){try{return new RegExp("(?<!.)"),!0}catch(e){return!1}}_b=1;var t=/-?(\b0[xX]([a-fA-F0-9]_?)*[a-fA-F0-9]|(\b[1-9](_?\d)*(\.((\d_?)*\d)?)?|\.\d(_?\d)*)([eE][-+]?\d(_?\d)*)?|\b0)(?!\w|\$)/;e()&&(t=t.source.replace(/\\b/g,"(?<!\\$)\\b"));var n={className:"number",begin:t,relevance:0},i={keyword:"assembly let function if switch case default for leave break continue u256 jump jumpi stop return revert selfdestruct invalid",built_in:"add sub mul div sdiv mod smod exp not lt gt slt sgt eq iszero and or xor byte shl shr sar addmod mulmod signextend keccak256 pc pop dup1 dup2 dup3 dup4 dup5 dup6 dup7 dup8 dup9 dup10 dup11 dup12 dup13 dup14 dup15 dup16 swap1 swap2 swap3 swap4 swap5 swap6 swap7 swap8 swap9 swap10 swap11 swap12 swap13 swap14 swap15 swap16 mload mstore mstore8 sload sstore msize gas address balance selfbalance caller callvalue calldataload calldatasize calldatacopy codesize codecopy extcodesize extcodecopy returndatasize returndatacopy extcodehash create create2 call callcode delegatecall staticcall log0 log1 log2 log3 log4 chainid origin gasprice basefee blockhash coinbase timestamp number difficulty prevrandao gaslimit",literal:"true false"},r={className:"string",begin:/\bhex'(([0-9a-fA-F]{2}_?)*[0-9a-fA-F]{2})?'/},o={className:"string",begin:/\bhex"(([0-9a-fA-F]{2}_?)*[0-9a-fA-F]{2})?"/};function a(e){return e.inherit(e.APOS_STRING_MODE,{begin:/(\bunicode)?'/})}function s(e){return e.inherit(e.QUOTE_STRING_MODE,{begin:/(\bunicode)?"/})}return kb={SOL_ASSEMBLY_KEYWORDS:i,baseAssembly:function(e){var t=a(e),u=s(e),l=/[A-Za-z_$][A-Za-z_$0-9.]*/,c=e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/,lexemes:l,keywords:i}),d={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,lexemes:l,keywords:i,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t,u,n]},p={className:"operator",begin:/:=|->/};return{keywords:i,lexemes:l,contains:[t,u,r,o,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,p,{className:"function",lexemes:l,beginKeywords:"function",end:"{",excludeEnd:!0,contains:[c,d,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,p]}]}},solAposStringMode:a,solQuoteStringMode:s,HEX_APOS_STRING_MODE:r,HEX_QUOTE_STRING_MODE:o,SOL_NUMBER:n,isNegativeLookbehindAvailable:e}}var Cb=function(){if(Ob)return Eb.exports;Ob=1;const e=function(){if(xb)return wb;xb=1;const{baseAssembly:e,solAposStringMode:t,solQuoteStringMode:n,HEX_APOS_STRING_MODE:i,HEX_QUOTE_STRING_MODE:r,SOL_NUMBER:o,isNegativeLookbehindAvailable:a}=Db();return wb=function(s){for(var u=t(s),l=n(s),c=[],d=0;d<32;d++)c[d]=d+1;var p=c.map(function(e){return 8*e}),m=[];for(d=0;d<=80;d++)m[d]=d;var f=c.map(function(e){return"bytes"+e}).join(" ")+" ",h=p.map(function(e){return"uint"+e}).join(" ")+" ",g=p.map(function(e){return"int"+e}).join(" ")+" ",v=[].concat.apply([],p.map(function(e){return m.map(function(t){return e+"x"+t})})),b={keyword:"var bool string int uint "+g+h+"byte bytes "+f+"fixed ufixed "+v.map(function(e){return"fixed"+e}).join(" ")+" "+v.map(function(e){return"ufixed"+e}).join(" ")+" enum struct mapping address new delete if else for while continue break return throw emit try catch revert unchecked _ function modifier event constructor fallback receive error virtual override constant immutable anonymous indexed storage memory calldata external public internal payable pure view private returns import from as using global pragma contract interface library is abstract type assembly",literal:"true false wei gwei szabo finney ether seconds minutes hours days weeks years",built_in:"self this super selfdestruct suicide now msg block tx abi blockhash gasleft assert require Error Panic sha3 sha256 keccak256 ripemd160 ecrecover addmod mulmod log0 log1 log2 log3 log4"},y={className:"operator",begin:/[+\-!~*\/%<>&^|=]/},$=/[A-Za-z_$][A-Za-z_$0-9]*/,k={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,lexemes:$,keywords:b,contains:[s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE,u,l,o,"self"]},_={begin:/\.\s*/,end:/[^A-Za-z0-9$_\.]/,excludeBegin:!0,excludeEnd:!0,keywords:{built_in:"gas value selector address length push pop send transfer call callcode delegatecall staticcall balance code codehash wrap unwrap name creationCode runtimeCode interfaceId min max"},relevance:2},w=s.inherit(s.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/,lexemes:$,keywords:b}),x="("+["gas","value","salt"].join("|")+")(?=:)",I={className:"built_in",begin:(a()?"(?<!\\$)\\b":"\\b")+x};function S(e,t){return{begin:(a()?"(?<!\\$)\\b":"\\b")+e+"\\.\\s*",end:/[^A-Za-z0-9$_\.]/,excludeBegin:!1,excludeEnd:!0,lexemes:$,keywords:{built_in:e+" "+t},contains:[_],relevance:10}}var O=e(s),z=s.inherit(O,{contains:O.contains.concat([{begin:/\./,end:/[^A-Za-z0-9$.]/,excludeBegin:!0,excludeEnd:!0,keywords:{built_in:"slot offset length address selector"},relevance:2},{begin:/_/,end:/[^A-Za-z0-9$.]/,excludeBegin:!0,excludeEnd:!0,keywords:{built_in:"slot offset"},relevance:2}])});return{aliases:["sol"],keywords:b,lexemes:$,contains:[u,l,i,r,s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE,o,I,y,{className:"function",lexemes:$,beginKeywords:"function modifier event constructor fallback receive error",end:/[{;]/,excludeEnd:!0,contains:[w,k,I,s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE],illegal:/%/},S("msg","gas value data sender sig"),S("block","blockhash coinbase difficulty prevrandao gaslimit basefee number timestamp chainid"),S("tx","gasprice origin"),S("abi","decode encode encodePacked encodeWithSelector encodeWithSignature encodeCall"),S("bytes","concat"),S("string","concat"),_,{className:"class",lexemes:$,beginKeywords:"contract interface library",end:"{",excludeEnd:!0,illegal:/[:"\[\]]/,contains:[{beginKeywords:"is",lexemes:$},w,k,I,s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE]},{lexemes:$,beginKeywords:"struct enum",end:"{",excludeEnd:!0,illegal:/[:"\[\]]/,contains:[w,s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE]},{beginKeywords:"import",end:";",lexemes:$,keywords:"import from as",contains:[w,u,l,i,r,s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE,y]},{beginKeywords:"using",end:";",lexemes:$,keywords:"using for global",contains:[w,s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE,y]},{className:"meta",beginKeywords:"pragma",end:";",lexemes:$,keywords:{keyword:"pragma solidity experimental abicoder",built_in:"ABIEncoderV2 SMTChecker v1 v2"},contains:[s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE,s.inherit(u,{className:"meta-string"}),s.inherit(l,{className:"meta-string"})]},{beginKeywords:"assembly",end:/\b\B/,contains:[s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE,s.inherit(u,{className:"meta-string"}),s.inherit(l,{className:"meta-string"}),s.inherit(z,{begin:"{",end:"}",endsParent:!0,contains:z.contains.concat([s.inherit(z,{begin:"{",end:"}",contains:z.contains.concat(["self"])})])})]}],illegal:/#/}},wb}(),t=function(){if(Sb)return Ib;Sb=1;const{SOL_ASSEMBLY_KEYWORDS:e,baseAssembly:t,isNegativeLookbehindAvailable:n}=Db();return Ib=function(i){var r={keyword:e.keyword+" object code data",built_in:e.built_in+" datasize dataoffset datacopy setimmutable loadimmutable linkersymbol memoryguard",literal:e.literal},o=/\bverbatim_[1-9]?[0-9]i_[1-9]?[0-9]o\b(?!\$)/;n()&&(o=o.source.replace(/\\b/,"(?<!\\$)\\b"));var a={className:"built_in",begin:o},s=t(i);return i.inherit(s,{keywords:r,contains:s.contains.concat([a])})}}();return Eb.exports=function(n){n.registerLanguage("solidity",e),n.registerLanguage("yul",t)},Eb.exports.solidity=e,Eb.exports.yul=t,Eb.exports}();sv(Cb)(zb);var Tb="top",Ab="bottom",Nb="right",Ub="left",Pb="auto",jb=[Tb,Ab,Nb,Ub],Lb="start",Rb="end",Zb="viewport",Mb="popper",qb=jb.reduce(function(e,t){return e.concat([t+"-"+Lb,t+"-"+Rb])},[]),Bb=[].concat(jb,[Pb]).reduce(function(e,t){return e.concat([t,t+"-"+Lb,t+"-"+Rb])},[]),Hb=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Fb(e){return e?(e.nodeName||"").toLowerCase():null}function Jb(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Vb(e){return e instanceof Jb(e).Element||e instanceof Element}function Wb(e){return e instanceof Jb(e).HTMLElement||e instanceof HTMLElement}function Kb(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Jb(e).ShadowRoot||e instanceof ShadowRoot)}var Gb={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];Wb(r)&&Fb(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},{});Wb(i)&&Fb(i)&&(Object.assign(i.style,o),Object.keys(r).forEach(function(e){i.removeAttribute(e)}))})}},requires:["computeStyles"]};function Xb(e){return e.split("-")[0]}var Yb=Math.max,Qb=Math.min,ey=Math.round;function ty(){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 ny(){return!/^((?!chrome|android).)*safari/i.test(ty())}function iy(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var i=e.getBoundingClientRect(),r=1,o=1;t&&Wb(e)&&(r=e.offsetWidth>0&&ey(i.width)/e.offsetWidth||1,o=e.offsetHeight>0&&ey(i.height)/e.offsetHeight||1);var a=(Vb(e)?Jb(e):window).visualViewport,s=!ny()&&n,u=(i.left+(s&&a?a.offsetLeft:0))/r,l=(i.top+(s&&a?a.offsetTop:0))/o,c=i.width/r,d=i.height/o;return{width:c,height:d,top:l,right:u+c,bottom:l+d,left:u,x:u,y:l}}function ry(e){var t=iy(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 oy(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Kb(n)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function ay(e){return Jb(e).getComputedStyle(e)}function sy(e){return["table","td","th"].indexOf(Fb(e))>=0}function uy(e){return((Vb(e)?e.ownerDocument:e.document)||window.document).documentElement}function ly(e){return"html"===Fb(e)?e:e.assignedSlot||e.parentNode||(Kb(e)?e.host:null)||uy(e)}function cy(e){return Wb(e)&&"fixed"!==ay(e).position?e.offsetParent:null}function dy(e){for(var t=Jb(e),n=cy(e);n&&sy(n)&&"static"===ay(n).position;)n=cy(n);return n&&("html"===Fb(n)||"body"===Fb(n)&&"static"===ay(n).position)?t:n||function(e){var t=/firefox/i.test(ty());if(/Trident/i.test(ty())&&Wb(e)&&"fixed"===ay(e).position)return null;var n=ly(e);for(Kb(n)&&(n=n.host);Wb(n)&&["html","body"].indexOf(Fb(n))<0;){var i=ay(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 py(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function my(e,t,n){return Yb(e,Qb(t,n))}function fy(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function hy(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var gy={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=Xb(n.placement),u=py(s),l=[Ub,Nb].indexOf(s)>=0?"height":"width";if(o&&a){var c=function(e,t){return fy("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:hy(e,jb))}(r.padding,n),d=ry(o),p="y"===u?Tb:Ub,m="y"===u?Ab:Nb,f=n.rects.reference[l]+n.rects.reference[u]-a[u]-n.rects.popper[l],h=a[u]-n.rects.reference[u],g=dy(o),v=g?"y"===u?g.clientHeight||0:g.clientWidth||0:0,b=f/2-h/2,y=c[p],$=v-d[l]-c[m],k=v/2-d[l]/2+b,_=my(y,k,$),w=u;n.modifiersData[i]=((t={})[w]=_,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)))&&oy(t.elements.popper,i)&&(t.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function vy(e){return e.split("-")[1]}var by={top:"auto",right:"auto",bottom:"auto",left:"auto"};function yy(e){var t,n=e.popper,i=e.popperRect,r=e.placement,o=e.variation,a=e.offsets,s=e.position,u=e.gpuAcceleration,l=e.adaptive,c=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 c?c({x:m,y:h}):{x:m,y:h};m=g.x,h=g.y;var v=a.hasOwnProperty("x"),b=a.hasOwnProperty("y"),y=Ub,$=Tb,k=window;if(l){var _=dy(n),w="clientHeight",x="clientWidth";if(_===Jb(n)&&"static"!==ay(_=uy(n)).position&&"absolute"===s&&(w="scrollHeight",x="scrollWidth"),r===Tb||(r===Ub||r===Nb)&&o===Rb)$=Ab,h-=(d&&_===k&&k.visualViewport?k.visualViewport.height:_[w])-i.height,h*=u?1:-1;if(r===Ub||(r===Tb||r===Ab)&&o===Rb)y=Nb,m-=(d&&_===k&&k.visualViewport?k.visualViewport.width:_[x])-i.width,m*=u?1:-1}var I,S=Object.assign({position:s},l&&by),O=!0===c?function(e,t){var n=e.x,i=e.y,r=t.devicePixelRatio||1;return{x:ey(n*r)/r||0,y:ey(i*r)/r||0}}({x:m,y:h},Jb(n)):{x:m,y:h};return m=O.x,h=O.y,u?Object.assign({},S,((I={})[$]=b?"0":"",I[y]=v?"0":"",I.transform=(k.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 $y={passive:!0};var ky={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,u=Jb(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&l.forEach(function(e){e.addEventListener("scroll",n.update,$y)}),s&&u.addEventListener("resize",n.update,$y),function(){o&&l.forEach(function(e){e.removeEventListener("scroll",n.update,$y)}),s&&u.removeEventListener("resize",n.update,$y)}},data:{}},_y={left:"right",right:"left",bottom:"top",top:"bottom"};function wy(e){return e.replace(/left|right|bottom|top/g,function(e){return _y[e]})}var xy={start:"end",end:"start"};function Iy(e){return e.replace(/start|end/g,function(e){return xy[e]})}function Sy(e){var t=Jb(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Oy(e){return iy(uy(e)).left+Sy(e).scrollLeft}function zy(e){var t=ay(e),n=t.overflow,i=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+i)}function Ey(e){return["html","body","#document"].indexOf(Fb(e))>=0?e.ownerDocument.body:Wb(e)&&zy(e)?e:Ey(ly(e))}function Dy(e,t){var n;void 0===t&&(t=[]);var i=Ey(e),r=i===(null==(n=e.ownerDocument)?void 0:n.body),o=Jb(i),a=r?[o].concat(o.visualViewport||[],zy(i)?i:[]):i,s=t.concat(a);return r?s:s.concat(Dy(ly(a)))}function Cy(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Ty(e,t,n){return t===Zb?Cy(function(e,t){var n=Jb(e),i=uy(e),r=n.visualViewport,o=i.clientWidth,a=i.clientHeight,s=0,u=0;if(r){o=r.width,a=r.height;var l=ny();(l||!l&&"fixed"===t)&&(s=r.offsetLeft,u=r.offsetTop)}return{width:o,height:a,x:s+Oy(e),y:u}}(e,n)):Vb(t)?function(e,t){var n=iy(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):Cy(function(e){var t,n=uy(e),i=Sy(e),r=null==(t=e.ownerDocument)?void 0:t.body,o=Yb(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=Yb(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),s=-i.scrollLeft+Oy(e),u=-i.scrollTop;return"rtl"===ay(r||n).direction&&(s+=Yb(n.clientWidth,r?r.clientWidth:0)-o),{width:o,height:a,x:s,y:u}}(uy(e)))}function Ay(e,t,n,i){var r="clippingParents"===t?function(e){var t=Dy(ly(e)),n=["absolute","fixed"].indexOf(ay(e).position)>=0&&Wb(e)?dy(e):e;return Vb(n)?t.filter(function(e){return Vb(e)&&oy(e,n)&&"body"!==Fb(e)}):[]}(e):[].concat(t),o=[].concat(r,[n]),a=o[0],s=o.reduce(function(t,n){var r=Ty(e,n,i);return t.top=Yb(r.top,t.top),t.right=Qb(r.right,t.right),t.bottom=Qb(r.bottom,t.bottom),t.left=Yb(r.left,t.left),t},Ty(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 Ny(e){var t,n=e.reference,i=e.element,r=e.placement,o=r?Xb(r):null,a=r?vy(r):null,s=n.x+n.width/2-i.width/2,u=n.y+n.height/2-i.height/2;switch(o){case Tb:t={x:s,y:n.y-i.height};break;case Ab:t={x:s,y:n.y+n.height};break;case Nb:t={x:n.x+n.width,y:u};break;case Ub:t={x:n.x-i.width,y:u};break;default:t={x:n.x,y:n.y}}var l=o?py(o):null;if(null!=l){var c="y"===l?"height":"width";switch(a){case Lb:t[l]=t[l]-(n[c]/2-i[c]/2);break;case Rb:t[l]=t[l]+(n[c]/2-i[c]/2)}}return t}function Uy(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,u=void 0===s?"clippingParents":s,l=n.rootBoundary,c=void 0===l?Zb:l,d=n.elementContext,p=void 0===d?Mb:d,m=n.altBoundary,f=void 0!==m&&m,h=n.padding,g=void 0===h?0:h,v=fy("number"!=typeof g?g:hy(g,jb)),b=p===Mb?"reference":Mb,y=e.rects.popper,$=e.elements[f?b:p],k=Ay(Vb($)?$:$.contextElement||uy(e.elements.popper),u,c,a),_=iy(e.elements.reference),w=Ny({reference:_,element:y,placement:r}),x=Cy(Object.assign({},y,w)),I=p===Mb?x:_,S={top:k.top-I.top+v.top,bottom:I.bottom-k.bottom+v.bottom,left:k.left-I.left+v.left,right:I.right-k.right+v.right},O=e.modifiersData.offset;if(p===Mb&&O){var z=O[r];Object.keys(S).forEach(function(e){var t=[Nb,Ab].indexOf(e)>=0?1:-1,n=[Tb,Ab].indexOf(e)>=0?"y":"x";S[e]+=z[n]*t})}return S}function Py(e,t){void 0===t&&(t={});var n=t,i=n.placement,r=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,u=n.allowedAutoPlacements,l=void 0===u?Bb:u,c=vy(i),d=c?s?qb:qb.filter(function(e){return vy(e)===c}):jb,p=d.filter(function(e){return l.indexOf(e)>=0});0===p.length&&(p=d);var m=p.reduce(function(t,n){return t[n]=Uy(e,{placement:n,boundary:r,rootBoundary:o,padding:a})[Xb(n)],t},{});return Object.keys(m).sort(function(e,t){return m[e]-m[t]})}var jy={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,u=n.fallbackPlacements,l=n.padding,c=n.boundary,d=n.rootBoundary,p=n.altBoundary,m=n.flipVariations,f=void 0===m||m,h=n.allowedAutoPlacements,g=t.options.placement,v=Xb(g),b=u||(v===g||!f?[wy(g)]:function(e){if(Xb(e)===Pb)return[];var t=wy(e);return[Iy(e),t,Iy(t)]}(g)),y=[g].concat(b).reduce(function(e,n){return e.concat(Xb(n)===Pb?Py(t,{placement:n,boundary:c,rootBoundary:d,padding:l,flipVariations:f,allowedAutoPlacements:h}):n)},[]),$=t.rects.reference,k=t.rects.popper,_=new Map,w=!0,x=y[0],I=0;I<y.length;I++){var S=y[I],O=Xb(S),z=vy(S)===Lb,E=[Tb,Ab].indexOf(O)>=0,D=E?"width":"height",C=Uy(t,{placement:S,boundary:c,rootBoundary:d,altBoundary:p,padding:l}),T=E?z?Nb:Ub:z?Ab:Tb;$[D]>k[D]&&(T=wy(T));var A=wy(T),N=[];if(o&&N.push(C[O]<=0),s&&N.push(C[T]<=0,C[A]<=0),N.every(function(e){return e})){x=S,w=!1;break}_.set(S,N)}if(w)for(var U=function(e){var t=y.find(function(t){var n=_.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return x=t,"break"},P=f?3:1;P>0;P--){if("break"===U(P))break}t.placement!==x&&(t.modifiersData[i]._skip=!0,t.placement=x,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Ly(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 Ry(e){return[Tb,Nb,Ab,Ub].some(function(t){return e[t]>=0})}var Zy={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=Bb.reduce(function(e,n){return e[n]=function(e,t,n){var i=Xb(e),r=[Ub,Tb].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,[Ub,Nb].indexOf(i)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,o),e},{}),s=a[t.placement],u=s.x,l=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=l),t.modifiersData[i]=a}};var My={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,u=n.boundary,l=n.rootBoundary,c=n.altBoundary,d=n.padding,p=n.tether,m=void 0===p||p,f=n.tetherOffset,h=void 0===f?0:f,g=Uy(t,{boundary:u,rootBoundary:l,padding:d,altBoundary:c}),v=Xb(t.placement),b=vy(t.placement),y=!b,$=py(v),k="x"===$?"y":"x",_=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),O=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,z={x:0,y:0};if(_){if(o){var E,D="y"===$?Tb:Ub,C="y"===$?Ab:Nb,T="y"===$?"height":"width",A=_[$],N=A+g[D],U=A-g[C],P=m?-x[T]/2:0,j=b===Lb?w[T]:x[T],L=b===Lb?-x[T]:-w[T],R=t.elements.arrow,Z=m&&R?ry(R):{width:0,height:0},M=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},q=M[D],B=M[C],H=my(0,w[T],Z[T]),F=y?w[T]/2-P-H-q-S.mainAxis:j-H-q-S.mainAxis,J=y?-w[T]/2+P+H+B+S.mainAxis:L+H+B+S.mainAxis,V=t.elements.arrow&&dy(t.elements.arrow),W=V?"y"===$?V.clientTop||0:V.clientLeft||0:0,K=null!=(E=null==O?void 0:O[$])?E:0,G=A+J-K,X=my(m?Qb(N,A+F-K-W):N,A,m?Yb(U,G):U);_[$]=X,z[$]=X-A}if(s){var Y,Q="x"===$?Tb:Ub,ee="x"===$?Ab:Nb,te=_[k],ne="y"===k?"height":"width",ie=te+g[Q],re=te-g[ee],oe=-1!==[Tb,Ub].indexOf(v),ae=null!=(Y=null==O?void 0:O[k])?Y:0,se=oe?ie:te-w[ne]-x[ne]-ae+S.altAxis,ue=oe?te+w[ne]+x[ne]-ae-S.altAxis:re,le=m&&oe?function(e,t,n){var i=my(e,t,n);return i>n?n:i}(se,te,ue):my(m?se:ie,te,m?ue:re);_[k]=le,z[k]=le-te}t.modifiersData[i]=z}},requiresIfExists:["offset"]};function qy(e,t,n){void 0===n&&(n=!1);var i,r=Wb(t),o=Wb(t)&&function(e){var t=e.getBoundingClientRect(),n=ey(t.width)/e.offsetWidth||1,i=ey(t.height)/e.offsetHeight||1;return 1!==n||1!==i}(t),a=uy(t),s=iy(e,o,n),u={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==Fb(t)||zy(a))&&(u=(i=t)!==Jb(i)&&Wb(i)?function(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}(i):Sy(i)),Wb(t)?((l=iy(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):a&&(l.x=Oy(a))),{x:s.left+u.scrollLeft-l.x,y:s.top+u.scrollTop-l.y,width:s.width,height:s.height}}function By(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 Hy={placement:"bottom",modifiers:[],strategy:"absolute"};function Fy(){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 Jy(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,i=void 0===n?[]:n,r=t.defaultOptions,o=void 0===r?Hy:r;return function(e,t,n){void 0===n&&(n=o);var r,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},Hy,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},u=[],l=!1,c={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:Vb(e)?Dy(e):e.contextElement?Dy(e.contextElement):[],popper:Dy(t)};var a,l,p=function(e){var t=By(e);return Hb.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}((a=[].concat(i,s.options.modifiers),l=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(l).map(function(e){return l[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:c,options:i}),a=function(){};u.push(o||a)}}),c.update()},forceUpdate:function(){if(!l){var e=s.elements,t=e.reference,n=e.popper;if(Fy(t,n)){s.rects={reference:qy(t,dy(n),"fixed"===s.options.strategy),popper:ry(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,u=void 0===a?{}:a,d=r.name;"function"==typeof o&&(s=o({state:s,options:u,name:d,instance:c})||s)}else s.reset=!1,i=-1}}},update:(r=function(){return new Promise(function(e){c.forceUpdate(),e(s)})},function(){return a||(a=new Promise(function(e){Promise.resolve().then(function(){a=void 0,e(r())})})),a}),destroy:function(){d(),l=!0}};if(!Fy(e,t))return c;function d(){u.forEach(function(e){return e()}),u=[]}return c.setOptions(n).then(function(e){!l&&n.onFirstUpdate&&n.onFirstUpdate(e)}),c}}var Vy=Jy({defaultModifiers:[ky,{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=Ny({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,u=void 0===s||s,l={placement:Xb(t.placement),variation:vy(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,yy(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:u})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,yy(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},Gb,Zy,jy,My,gy,{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=Uy(t,{elementContext:"reference"}),s=Uy(t,{altBoundary:!0}),u=Ly(a,i),l=Ly(s,r,o),c=Ry(u),d=Ry(l);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:l,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}}]}),Wy="tippy-content",Ky="tippy-arrow",Gy="tippy-svg-arrow",Xy={passive:!0,capture:!0},Yy=function(){return document.body};function Qy(e,t,n){if(Array.isArray(e)){var i=e[t];return null==i?Array.isArray(n)?n[t]:n:i}return e}function e$(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function t$(e,t){return"function"==typeof e?e.apply(void 0,t):e}function n$(e,t){return 0===t?e:function(i){clearTimeout(n),n=setTimeout(function(){e(i)},t)};var n}function i$(e){return[].concat(e)}function r$(e,t){-1===e.indexOf(t)&&e.push(t)}function o$(e){return[].slice.call(e)}function a$(e){return Object.keys(e).reduce(function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t},{})}function s$(){return document.createElement("div")}function u$(e){return["Element","Fragment"].some(function(t){return e$(e,t)})}function l$(e){return u$(e)?[e]:function(e){return e$(e,"NodeList")}(e)?o$(e):Array.isArray(e)?e:o$(document.querySelectorAll(e))}function c$(e,t){e.forEach(function(e){e&&(e.style.transitionDuration=t+"ms")})}function d$(e,t){e.forEach(function(e){e&&e.setAttribute("data-state",t)})}function p$(e,t,n){var i=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(t){e[i](t,n)})}function m$(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 f$={isTouch:!1},h$=0;function g$(){f$.isTouch||(f$.isTouch=!0,window.performance&&document.addEventListener("mousemove",v$))}function v$(){var e=performance.now();e-h$<20&&(f$.isTouch=!1,document.removeEventListener("mousemove",v$)),h$=e}function b$(){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 y$=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto,$$=Object.assign({appendTo:Yy,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}),k$=Object.keys($$);function _$(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=$$[r])?i:o);return t},{});return Object.assign({},e,t)}function w$(e,t){var n=Object.assign({},t,{content:t$(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(_$(Object.assign({},$$,{plugins:t}))):k$).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({},$$.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 x$(e,t){e.innerHTML=t}function I$(e){var t=s$();return!0===e?t.className=Ky:(t.className=Gy,u$(e)?t.appendChild(e):x$(t,e)),t}function S$(e,t){u$(t.content)?(x$(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?x$(e,t.content):e.textContent=t.content)}function O$(e){var t=e.firstElementChild,n=o$(t.children);return{box:t,content:n.find(function(e){return e.classList.contains(Wy)}),arrow:n.find(function(e){return e.classList.contains(Ky)||e.classList.contains(Gy)}),backdrop:n.find(function(e){return e.classList.contains("tippy-backdrop")})}}function z$(e){var t=s$(),n=s$();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var i=s$();function r(n,i){var r=O$(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||S$(a,e.props),i.arrow?s?n.arrow!==i.arrow&&(o.removeChild(s),o.appendChild(I$(i.arrow))):o.appendChild(I$(i.arrow)):s&&o.removeChild(s)}return i.className=Wy,i.setAttribute("data-state","hidden"),S$(i,e.props),t.appendChild(n),n.appendChild(i),r(e.props,e.props),{popper:t,onUpdate:r}}z$.$$tippy=!0;var E$=1,D$=[],C$=[];function T$(e,t){var n,i,r,o,a,s,u,l,c=w$(e,Object.assign({},$$,_$(a$(t)))),d=!1,p=!1,m=!1,f=!1,h=[],g=n$(V,c.interactiveDebounce),v=E$++,b=(l=c.plugins).filter(function(e,t){return l.indexOf(e)===t}),y={id:v,reference:e,popper:s$(),popperInstance:null,props:c,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]),F();var n=y.props,i=w$(e,Object.assign({},n,a$(t),{ignoreAttributes:!0}));y.props=i,H(),n.interactiveDebounce!==i.interactiveDebounce&&(P(),g=n$(V,i.interactiveDebounce));n.triggerTarget&&!i.triggerTarget?i$(n.triggerTarget).forEach(function(e){e.removeAttribute("aria-expanded")}):i.triggerTarget&&e.removeAttribute("aria-expanded");U(),T(),_&&_(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=f$.isTouch&&!y.props.touch,r=Qy(y.props.duration,0,$$.duration);if(e||t||n||i)return;if(z().hasAttribute("disabled"))return;if(A("onShow",[y],!1),!1===y.props.onShow(y))return;y.state.isVisible=!0,O()&&(k.style.visibility="visible");T(),Z(),y.state.isMounted||(k.style.transition="none");if(O()){var o=D();c$([o.box,o.content],0)}s=function(){var e;if(y.state.isVisible&&!f){if(f=!0,k.offsetHeight,k.style.transition=y.props.moveTransition,O()&&y.props.animation){var t=D(),n=t.box,i=t.content;c$([n,i],r),d$([n,i],"visible")}N(),U(),r$(C$,y),null==(e=y.popperInstance)||e.forceUpdate(),A("onMount",[y]),y.props.animation&&O()&&function(e,t){q(e,t)}(r,function(){y.state.isShown=!0,A("onShown",[y])})}},function(){var e,t=y.props.appendTo,n=z();e=y.props.interactive&&t===Yy||"parent"===t?n.parentNode:t$(t,[n]);e.contains(k)||e.appendChild(k);y.state.isMounted=!0,X()}()},hide:function(){var e=!y.state.isVisible,t=y.state.isDestroyed,n=!y.state.isEnabled,i=Qy(y.props.duration,1,$$.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,O()&&(k.style.visibility="hidden");if(P(),M(),T(!0),O()){var r=D(),o=r.box,a=r.content;y.props.animation&&(c$([o,a],i),d$([o,a],"hidden"))}N(),U(),y.props.animation?O()&&function(e,t){q(e,function(){!y.state.isVisible&&k.parentNode&&k.parentNode.contains(k)&&t()})}(i,y.unmount):y.unmount()},hideWithInteractivity:function(e){E().addEventListener("mousemove",g),r$(D$,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()}),k.parentNode&&k.parentNode.removeChild(k);C$=C$.filter(function(e){return e!==y}),y.state.isMounted=!1,A("onHidden",[y])},destroy:function(){if(y.state.isDestroyed)return;y.clearDelayTimeouts(),y.unmount(),F(),delete e._tippy,y.state.isDestroyed=!0,A("onDestroy",[y])}};if(!c.render)return y;var $=c.render(y),k=$.popper,_=$.onUpdate;k.setAttribute("data-tippy-root",""),k.id="tippy-"+y.id,y.popper=k,e._tippy=y,k._tippy=y;var w=b.map(function(e){return e.fn(y)}),x=e.hasAttribute("aria-expanded");return H(),U(),T(),A("onCreate",[y]),c.showOnCreate&&ee(),k.addEventListener("mouseenter",function(){y.props.interactive&&y.state.isVisible&&y.clearDelayTimeouts()}),k.addEventListener("mouseleave",function(){y.props.interactive&&y.props.trigger.indexOf("mouseenter")>=0&&E().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 O(){var e;return!(null==(e=y.props.render)||!e.$$tippy)}function z(){return u||e}function E(){var e=z().parentNode;return e?function(e){var t,n=i$(e)[0];return null!=n&&null!=(t=n.ownerDocument)&&t.body?n.ownerDocument:document}(e):document}function D(){return O$(k)}function C(e){return y.state.isMounted&&!y.state.isVisible||f$.isTouch||o&&"focus"===o.type?0:Qy(y.props.delay,e?0:1,$$.delay)}function T(e){void 0===e&&(e=!1),k.style.pointerEvents=y.props.interactive&&!e?"":"none",k.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=k.id;i$(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 U(){!x&&y.props.aria.expanded&&i$(y.props.triggerTarget||e).forEach(function(e){y.props.interactive?e.setAttribute("aria-expanded",y.state.isVisible&&e===z()?"true":"false"):e.removeAttribute("aria-expanded")})}function P(){E().removeEventListener("mousemove",g),D$=D$.filter(function(e){return e!==g})}function j(t){if(!f$.isTouch||!m&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!y.props.interactive||!m$(k,n)){if(i$(y.props.triggerTarget||e).some(function(e){return m$(e,n)})){if(f$.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 L(){m=!0}function R(){m=!1}function Z(){var e=E();e.addEventListener("mousedown",j,!0),e.addEventListener("touchend",j,Xy),e.addEventListener("touchstart",R,Xy),e.addEventListener("touchmove",L,Xy)}function M(){var e=E();e.removeEventListener("mousedown",j,!0),e.removeEventListener("touchend",j,Xy),e.removeEventListener("touchstart",R,Xy),e.removeEventListener("touchmove",L,Xy)}function q(e,t){var n=D().box;function i(e){e.target===n&&(p$(n,"remove",i),t())}if(0===e)return t();p$(n,"remove",a),p$(n,"add",i),a=i}function B(t,n,i){void 0===i&&(i=!1),i$(y.props.triggerTarget||e).forEach(function(e){e.addEventListener(t,n,i),h.push({node:e,eventType:t,handler:n,options:i})})}function H(){var e;S()&&(B("touchstart",J,{passive:!0}),B("touchend",W,{passive:!0})),(e=y.props.trigger,e.split(/\s+/).filter(Boolean)).forEach(function(e){if("manual"!==e)switch(B(e,J),e){case"mouseenter":B("mouseleave",W);break;case"focus":B(y$?"focusout":"blur",K);break;case"focusin":B("focusout",K)}})}function F(){h.forEach(function(e){var t=e.node,n=e.eventType,i=e.handler,r=e.options;t.removeEventListener(n,i,r)}),h=[]}function J(e){var t,n=!1;if(y.state.isEnabled&&!G(e)&&!p){var i="focus"===(null==(t=o)?void 0:t.type);o=e,u=e.currentTarget,U(),!y.state.isVisible&&e$(e,"MouseEvent")&&D$.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 V(e){var t=e.target,n=z().contains(t)||k.contains(t);if("mousemove"!==e.type||!n){var i=Q().concat(k).map(function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:c}: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 u="bottom"===a?s.top.y:0,l="top"===a?s.bottom.y:0,c="right"===a?s.left.x:0,d="left"===a?s.right.x:0,p=t.top-i+u>o,m=i-t.bottom-l>o,f=t.left-n+c>o,h=n-t.right-d>o;return p||m||f||h})})(i,e)&&(P(),te(e))}}function W(e){G(e)||y.props.trigger.indexOf("click")>=0&&d||(y.props.interactive?y.hideWithInteractivity(e):te(e))}function K(e){y.props.trigger.indexOf("focusin")<0&&e.target!==z()||y.props.interactive&&e.relatedTarget&&k.contains(e.relatedTarget)||te(e)}function G(e){return!!f$.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,u=O()?O$(k).arrow:null,l=o?{getBoundingClientRect:o,contextElement:o.contextElement||z()}:e,c={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(O()){var n=D().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}},c];O()&&u&&d.push({name:"arrow",options:{element:u,padding:3}}),d.push.apply(d,(null==n?void 0:n.modifiers)||[]),y.popperInstance=Vy(l,k,Object.assign({},n,{placement:i,onFirstUpdate:s,modifiers:d}))}function Y(){y.popperInstance&&(y.popperInstance.destroy(),y.popperInstance=null)}function Q(){return o$(k.querySelectorAll("[data-tippy-root]"))}function ee(e){y.clearDelayTimeouts(),e&&A("onTrigger",[y,e]),Z();var t=C(!0),i=I(),r=i[0],o=i[1];f$.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=C(!1);t?i=setTimeout(function(){y.state.isVisible&&y.hide()},t):r=requestAnimationFrame(function(){y.hide()})}}else M()}}function A$(e,t){void 0===t&&(t={});var n=$$.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",g$,Xy),window.addEventListener("blur",b$);var i=Object.assign({},t,{plugins:n}),r=l$(e).reduce(function(e,t){var n=t&&T$(t,i);return n&&e.push(n),e},[]);return u$(e)?r[0]:r}A$.defaultProps=$$,A$.setDefaultProps=function(e){Object.keys(e).forEach(function(t){$$[t]=e[t]})},A$.currentInput=f$,Object.assign({},Gb,{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)}}),A$.setDefaultProps({render:z$});const N$=e=>({}),U$=e=>({trigger:e[2]}),P$=e=>({}),j$=e=>({trigger:e[2]});function L$(e){let t,n,i;const r=e[6].default,o=eh(r,e,e[5],j$),a=e[6].content,s=eh(a,e,e[5],U$),u=s||function(e){let t;return{c(){t=fh(e[0])},m(e,n){lh(e,t,n)},p(e,n){1&n&&kh(t,e[0])},d(e){e&&ch(t)}}}(e);return{c(){o&&o.c(),t=hh(),n=ph("div"),u&&u.c(),wh(n,"display","none")},m(r,a){o&&o.m(r,a),lh(r,t,a),lh(r,n,a),u&&u.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,P$):rh(e[5]),j$),s?s.p&&(!i||32&t)&&ih(s,a,e,e[5],i?nh(a,e[5],t,N$):rh(e[5]),U$):u&&u.p&&(!i||1&t)&&u.p(e,i?t:-1)},i(e){i||(Wh(o,e),Wh(u,e),i=!0)},o(e){Kh(o,e),Kh(u,e),i=!1},d(i){o&&o.d(i),i&&ch(t),i&&ch(n),u&&u.d(i),e[7](null)}}}function R$(e,t,n){const i=["text","disabled"];let r,o,a,s=oh(t,i),{$$slots:u={},$$scope:l}=t,{text:c=""}=t,{disabled:d=!1}=t;return Dh(()=>{r&&(n(4,a=A$(r,{...s,content:o})),o.style.removeProperty("display"))}),e.$$set=e=>{t=Vf(Vf({},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,c=e.text),"disabled"in e&&n(3,d=e.disabled),"$$scope"in e&&n(5,l=e.$$scope)},e.$$.update=()=>{24&e.$$.dirty&&a&&(d?a.disable():a.enable())},[c,o,e=>{r=e},d,a,l,u,function(e){Ah[e?"unshift":"push"](()=>{o=e,n(1,o)})}]}class Z$ extends ng{constructor(e){super(),tg(this,e,R$,L$,Yf,{text:0,disabled:3})}}function M$(e){uh(e,"svelte-wb18kg","svg.svelte-wb18kg{opacity:var(--tooltip-opacity, 1);color:var(--text-color)}")}function q$(e){let t,n,i,r;return{c(){t=mh("svg"),n=mh("path"),bh(n,"fill","currentColor"),bh(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"),bh(t,"class","tooltip svelte-wb18kg"),wh(t,"width","1rem"),wh(t,"height","1rem"),bh(t,"viewBox","0 0 24 24")},m(o,a){lh(o,t,a),sh(t,n),i||(r=ah(e[9].call(null,t)),i=!0)},p:Jf,d(e){e&&ch(t),i=!1,r()}}}function B$(e){let t,n,i,r;return{c(){t=ph("br"),n=hh(),i=ph("a"),r=fh("Read more."),bh(i,"href",e[0]),bh(i,"target",e[3]?void 0:"_blank"),bh(i,"rel",e[3]?void 0:"noopener noreferrer")},m(e,o){lh(e,t,o),lh(e,n,o),lh(e,i,o),sh(i,r)},p(e,t){1&t&&bh(i,"href",e[0])},d(e){e&&ch(t),e&&ch(n),e&&ch(i)}}}function H$(e){let t,n,i;const r=e[6].default,o=eh(r,e,e[7],null);let a=e[2]&&B$(e);return{c(){t=ph("div"),o&&o.c(),n=hh(),a&&a.c(),bh(t,"slot","content")},m(e,r){lh(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=B$(e),a.c(),a.m(t,null)):a&&(a.d(1),a=null)},i(e){i||(Wh(o,e),i=!0)},o(e){Kh(o,e),i=!1},d(e){e&&ch(t),o&&o.d(e),a&&a.d()}}}function F$(e){let t,n;return t=new Z$({props:{interactive:!0,placement:e[1],theme:"light border",maxWidth:"22em",$$slots:{content:[H$,({trigger:e})=>({9:e}),({trigger:e})=>e?512:0],default:[q$,({trigger:e})=>({9:e}),({trigger:e})=>e?512:0]},$$scope:{ctx:e}}}),{c(){Xh(t.$$.fragment)},m(e,i){Yh(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||(Wh(t.$$.fragment,e),n=!0)},o(e){Kh(t.$$.fragment,e),n=!1},d(e){Qh(t,e)}}}function J$(e,t,n){let i,r,{$$slots:o={},$$scope:a}=t,{link:s}=t,{placement:u="right"}=t;const l=Ch(pg),c=null!=l,d=l??rg({canOpen:!1});return Qf(e,d,e=>n(5,r=e)),e.$$set=e=>{"link"in e&&n(0,s=e.link),"placement"in e&&n(1,u=e.placement),"$$scope"in e&&n(7,a=e.$$scope)},e.$$.update=()=>{33&e.$$.dirty&&n(2,i=null!=s&&(!c||r.canOpen))},[s,u,i,c,d,r,o,a]}class V$ extends ng{constructor(e){super(),tg(this,e,J$,F$,Yf,{link:0,placement:1},M$)}}const W$="has-error";function K$(e,t){const n=A$(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(W$)):(n.hide(),e.classList.remove(W$))}return i(t),{update:i,destroy:n.destroy}}function G$(e){let t,n,i;return{c(){t=ph("input"),bh(t,"type","checkbox"),t.disabled=e[1]},m(r,o){lh(r,t,o),t.checked=e[0],n||(i=vh(t,"change",e[6]),n=!0)},p(e,[n]){2&n&&(t.disabled=e[1]),1&n&&(t.checked=e[0])},i:Jf,o:Jf,d(e){e&&ch(t),n=!1,i()}}}function X$(e,t,n){let{value:i=!1}=t,{checked:r=!1!==i}=t,{defaultValue:o}=t,{disabled:a}=t,s=r,u=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=u):!1!==i&&n(0,r=!0),n(4,s=r),n(5,u=i||u))},[r,a,i,o,s,u,function(){r=this.checked,n(0,r),n(4,s),n(5,u),n(2,i)}]}class Y$ extends ng{constructor(e){super(),tg(this,e,X$,G$,Yf,{value:2,checked:0,defaultValue:3,disabled:1})}}function Q$(e){let t,n;return{c(){t=mh("svg"),n=mh("path"),bh(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"),bh(t,"class","keepcolor"),bh(t,"width","9"),bh(t,"height","9"),bh(t,"xmlns","http://www.w3.org/2000/svg"),bh(t,"viewBox","0 0 320 512")},m(e,i){lh(e,t,i),sh(t,n)},p:Jf,i:Jf,o:Jf,d(e){e&&ch(t)}}}class ek extends ng{constructor(e){super(),tg(this,e,null,Q$,Yf,{})}}function tk(e){let t,n;return{c(){t=mh("svg"),n=mh("path"),bh(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"),bh(t,"class","keepcolor"),bh(t,"width","9"),bh(t,"height","9"),bh(t,"xmlns","http://www.w3.org/2000/svg"),bh(t,"viewBox","0 0 512 512")},m(e,i){lh(e,t,i),sh(t,n)},p:Jf,i:Jf,o:Jf,d(e){e&&ch(t)}}}class nk extends ng{constructor(e){super(),tg(this,e,null,tk,Yf,{})}}function ik(e){let t,n,i,r;const o=[ok,rk],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=ph("span"),i&&i.c(),bh(t,"class","mr-2")},m(e,i){lh(e,t,i),~n&&a[n].m(t,null),r=!0},p(e,r){let u=n;n=s(e),n===u?~n&&a[n].p(e,r):(i&&(Jh(),Kh(a[u],1,1,()=>{a[u]=null}),Vh()),~n?(i=a[n],i?i.p(e,r):(i=a[n]=o[n](e),i.c()),Wh(i,1),i.m(t,null)):i=null)},i(e){r||(Wh(i),r=!0)},o(e){Kh(i),r=!1},d(e){e&&ch(t),~n&&a[n].d()}}}function rk(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 Y$({props:o}),Ah.push(()=>Gh(t,"value",r)),{c(){Xh(t.$$.fragment)},m(e,n){Yh(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],Rh(()=>n=!1)),t.$set(r)},i(e){i||(Wh(t.$$.fragment,e),i=!0)},o(e){Kh(t.$$.fragment,e),i=!1},d(e){Qh(t,e)}}}function ok(e){let t,n,i,r;return{c(){t=ph("input"),bh(t,"type","checkbox"),t.disabled=n=e[7]||e[9]},m(n,o){lh(n,t,o),t.checked=e[0],i||(r=vh(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:Jf,o:Jf,d(e){e&&ch(t),i=!1,r()}}}function ak(e){let t,n;return t=new ek({}),{c(){Xh(t.$$.fragment)},m(e,i){Yh(t,e,i),n=!0},i(e){n||(Wh(t.$$.fragment,e),n=!0)},o(e){Kh(t.$$.fragment,e),n=!1},d(e){Qh(t,e)}}}function sk(e){let t,n;return t=new nk({}),{c(){Xh(t.$$.fragment)},m(e,i){Yh(t,e,i),n=!0},i(e){n||(Wh(t.$$.fragment,e),n=!0)},o(e){Kh(t.$$.fragment,e),n=!1},d(e){Qh(t,e)}}}function uk(e){let t,n;return{c(){t=new Ih(!1),n=gh(),t.a=n},m(i,r){t.m(e[5],i,r),lh(i,n,r)},p(e,n){32&n&&t.p(e[5])},d(e){e&&ch(n),e&&t.d()}}}function lk(e){let t,n,i,r,o,a,s,u,l,c,d,p,m,f,h,g,v,b,y,$,k,_,w,x,I,S,O="section"!==e[3]&&ik(e);const z=[sk,ak],E=[];function D(e,t){return e[11]?0:1}d=D(e),p=E[d]=z[d](e),h=new V$({props:{link:e[6],$$slots:{default:[uk]},$$scope:{ctx:e}}});const C=e[17].default,T=eh(C,e,e[20],null);return{c(){t=ph("section"),n=ph("h1"),i=ph("label"),r=ph("div"),O&&O.c(),o=hh(),a=ph("span"),s=fh(e[2]),u=hh(),l=ph("div"),c=ph("button"),p.c(),f=hh(),Xh(h.$$.fragment),v=hh(),b=ph("div"),y=ph("span"),k=hh(),_=ph("div"),T&&T.c(),bh(r,"class","flex items-center"),bh(c,"class","px-1 bg-transparent border-0 mr-2"),bh(c,"aria-label",m=e[11]?"Collapse section":"Expand section"),bh(l,"class","flex items-center"),bh(i,"class","items-center tooltip-container pr-2 flex justify-between"),bh(y,"class","italic"),bh(b,"class","text-sm text-gray-500"),b.hidden=$=!e[7]||void 0===e[8],_.hidden=w=!e[11],bh(t,"class","controls-section")},m(p,m){var $;lh(p,t,m),sh(t,n),sh(n,i),sh(i,r),O&&O.m(r,null),sh(r,o),sh(r,a),sh(a,s),sh(i,u),sh(i,l),sh(l,c),E[d].m(c,null),sh(l,f),Yh(h,l,null),sh(t,v),sh(t,b),sh(b,y),y.innerHTML=e[8],sh(t,k),sh(t,_),T&&T.m(_,null),x=!0,I||(S=[vh(c,"click",($=e[12],function(e){return e.preventDefault(),$.call(this,e)})),ah(g=K$.call(null,i,e[10]))],I=!0)},p(e,[t]){"section"!==e[3]?O?(O.p(e,t),8&t&&Wh(O,1)):(O=ik(e),O.c(),Wh(O,1),O.m(r,o)):O&&(Jh(),Kh(O,1,1,()=>{O=null}),Vh()),(!x||4&t)&&kh(s,e[2]);let n=d;d=D(e),d!==n&&(Jh(),Kh(E[n],1,1,()=>{E[n]=null}),Vh(),p=E[d],p||(p=E[d]=z[d](e),p.c()),Wh(p,1),p.m(c,null)),(!x||2048&t&&m!==(m=e[11]?"Collapse section":"Expand section"))&&bh(c,"aria-label",m);const i={};64&t&&(i.link=e[6]),1048608&t&&(i.$$scope={dirty:t,ctx:e}),h.$set(i),g&&Xf(g.update)&&1024&t&&g.update.call(null,e[10]),(!x||256&t)&&(y.innerHTML=e[8]),(!x||384&t&&$!==($=!e[7]||void 0===e[8]))&&(b.hidden=$),T&&T.p&&(!x||1048576&t)&&ih(T,C,e,e[20],x?nh(C,e[20],t,null):rh(e[20]),null),(!x||2048&t&&w!==(w=!e[11]))&&(_.hidden=w)},i(e){x||(Wh(O),Wh(p),Wh(h.$$.fragment,e),Wh(T,e),x=!0)},o(e){Kh(O),Kh(p),Kh(h.$$.fragment,e),Kh(T,e),x=!1},d(e){e&&ch(t),O&&O.d(),E[d].d(),Qh(h),T&&T.d(e),I=!1,Gf(S)}}}function ck(e,t,n){let i,r,{$$slots:o={},$$scope:a}=t,{label:s}=t,{type:u}=t,{checkboxChecked:l}=t,{toggleRadioValue:c}=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,u=e.type),"checkboxChecked"in e&&n(0,l=e.checkboxChecked),"toggleRadioValue"in e&&n(1,c=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(10,v=e.error),"$$scope"in e&&n(20,a=e.$$scope)},e.$$.update=()=>{1024&e.$$.dirty&&n(16,i=void 0!==v),3&e.$$.dirty&&n(15,r=!(!l&&!c)),123392&e.$$.dirty&&((i||!$&&r||!y&&g)&&n(11,b=!0),n(13,y=g),n(14,$=r))},[l,c,s,u,d,p,m,f,h,g,v,b,function(){n(11,b=!b||i)},y,$,r,i,o,function(){l=this.checked,n(0,l)},function(e){c=e,n(1,c)},a]}class dk extends ng{constructor(e){super(),tg(this,e,ck,lk,Yf,{label:2,type:3,checkboxChecked:0,toggleRadioValue:1,toggleRadioDefaultValue:4,helpContent:5,helpLink:6,disabled:7,disabledReason:8,required:9,error:10})}}function pk(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||(Wh(i,e),t=!0)},o(e){Kh(i,e),t=!1},d(e){i&&i.d(e)}}}function mk(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:[pk]},$$scope:{ctx:e}};return void 0!==e[0]&&(o.toggleRadioValue=e[0]),t=new dk({props:o}),Ah.push(()=>Gh(t,"toggleRadioValue",r)),{c(){Xh(t.$$.fragment)},m(e,n){Yh(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],Rh(()=>n=!1)),t.$set(r)},i(e){i||(Wh(t.$$.fragment,e),i=!0)},o(e){Kh(t.$$.fragment,e),i=!1},d(e){Qh(t,e)}}}function fk(e,t,n){let{$$slots:i={},$$scope:r}=t,{label:o}=t,{value:a}=t,{defaultValue:s}=t,{helpContent:u}=t,{helpLink:l}=t,{disabled:c=!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,u=e.helpContent),"helpLink"in e&&n(4,l=e.helpLink),"disabled"in e&&n(5,c=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,u,l,c,d,p,m,i,function(e){a=e,n(0,a)},r]}class hk extends ng{constructor(e){super(),tg(this,e,fk,mk,Yf,{label:1,value:0,defaultValue:2,helpContent:3,helpLink:4,disabled:5,disabledReason:6,required:7,error:8})}}function gk(e){let t;return{c(){t=fh("Simple mechanism with a single account authorized for all privileged actions.")},m(e,n){lh(e,t,n)},d(e){e&&ch(t)}}}function vk(e){let t;return{c(){t=fh("Flexible mechanism with a separate role for each privileged action. A role can have many authorized accounts.")},m(e,n){lh(e,t,n)},d(e){e&&ch(t)}}}function bk(e){let t;return{c(){t=fh("Enables a central contract to define a policy that allows certain callers to access certain functions.")},m(e,n){lh(e,t,n)},d(e){e&&ch(t)}}}function yk(e){let t,n,i,r,o,a,s,u,l,c,d,p,m,f,h,g,v,b,y,$,k,_;return o=new V$({props:{link:"https://docs.openzeppelin.com/contracts/5.x/api/access#Ownable",$$slots:{default:[gk]},$$scope:{ctx:e}}}),d=new V$({props:{link:"https://docs.openzeppelin.com/contracts/5.x/api/access#AccessControl",$$slots:{default:[vk]},$$scope:{ctx:e}}}),v=new V$({props:{link:"https://docs.openzeppelin.com/contracts/5.x/api/access#AccessManaged",$$slots:{default:[bk]},$$scope:{ctx:e}}}),$=yh(e[10][0]),{c(){t=ph("div"),n=ph("label"),i=ph("input"),r=fh("\n Ownable\n "),Xh(o.$$.fragment),s=hh(),u=ph("label"),l=ph("input"),c=fh("\n Roles\n "),Xh(d.$$.fragment),m=hh(),f=ph("label"),h=ph("input"),g=fh("\n Managed\n "),Xh(v.$$.fragment),bh(i,"type","radio"),i.__value="ownable",i.value=i.__value,i.disabled=e[3],xh(n,"checked","ownable"===e[0]),bh(l,"type","radio"),l.__value="roles",l.value=l.__value,xh(u,"checked","roles"===e[0]),bh(h,"type","radio"),h.__value="managed",h.value=h.__value,h.disabled=e[4],xh(f,"checked","managed"===e[0]),bh(t,"class","checkbox-group"),$.p(i,l,h)},m($,w){lh($,t,w),sh(t,n),sh(n,i),i.checked=i.__value===e[0],sh(n,r),Yh(o,n,null),sh(t,s),sh(t,u),sh(u,l),l.checked=l.__value===e[0],sh(u,c),Yh(d,u,null),sh(t,m),sh(t,f),sh(f,h),h.checked=h.__value===e[0],sh(f,g),Yh(v,f,null),y=!0,k||(_=[vh(i,"change",e[9]),vh(i,"click",e[11]),ah(a=K$.call(null,n,"ownable"===e[0]?e[2]:void 0)),vh(l,"change",e[12]),vh(l,"click",e[13]),ah(p=K$.call(null,u,"roles"===e[0]?e[2]:void 0)),vh(h,"change",e[14]),vh(h,"click",e[15]),ah(b=K$.call(null,f,"managed"===e[0]?e[2]:void 0))],k=!0)},p(e,t){(!y||8&t)&&(i.disabled=e[3]),1&t&&(i.checked=i.__value===e[0]);const r={};131072&t&&(r.$$scope={dirty:t,ctx:e}),o.$set(r),a&&Xf(a.update)&&5&t&&a.update.call(null,"ownable"===e[0]?e[2]:void 0),(!y||1&t)&&xh(n,"checked","ownable"===e[0]),1&t&&(l.checked=l.__value===e[0]);const s={};131072&t&&(s.$$scope={dirty:t,ctx:e}),d.$set(s),p&&Xf(p.update)&&5&t&&p.update.call(null,"roles"===e[0]?e[2]:void 0),(!y||1&t)&&xh(u,"checked","roles"===e[0]),(!y||16&t)&&(h.disabled=e[4]),1&t&&(h.checked=h.__value===e[0]);const c={};131072&t&&(c.$$scope={dirty:t,ctx:e}),v.$set(c),b&&Xf(b.update)&&5&t&&b.update.call(null,"managed"===e[0]?e[2]:void 0),(!y||1&t)&&xh(f,"checked","managed"===e[0])},i(e){y||(Wh(o.$$.fragment,e),Wh(d.$$.fragment,e),Wh(v.$$.fragment,e),y=!0)},o(e){Kh(o.$$.fragment,e),Kh(d.$$.fragment,e),Kh(v.$$.fragment,e),y=!1},d(e){e&&ch(t),Qh(o),Qh(d),Qh(v),$.r(),k=!1,Gf(_)}}}function $k(e){let t,n,i;function r(t){e[16](t)}let o={label:"Access Control",defaultValue:"ownable",helpContent:"Restrict who can access the functions of a contract or when they can do it.",helpLink:"https://docs.openzeppelin.com/contracts/5.x/api/access",required:e[1],$$slots:{default:[yk]},$$scope:{ctx:e}};return void 0!==e[0]&&(o.value=e[0]),t=new hk({props:o}),Ah.push(()=>Gh(t,"value",r)),{c(){Xh(t.$$.fragment)},m(e,n){Yh(t,e,n),i=!0},p(e,[i]){const r={};2&i&&(r.required=e[1]),131101&i&&(r.$$scope={dirty:i,ctx:e}),!n&&1&i&&(n=!0,r.value=e[0],Rh(()=>n=!1)),t.$set(r)},i(e){i||(Wh(t.$$.fragment,e),i=!0)},o(e){Kh(t.$$.fragment,e),i=!1},d(e){Qh(t,e)}}}function kk(e,t,n){let{access:i}=t,{required:r}=t,{error:o}=t,{defaultValueWhenEnabled:a="ownable"}=t,{disableOwnable:s=!1}=t,{disableManaged:u=!1}=t,l=r,c=i;function d(e){n(8,c=e)}return e.$$set=e=>{"access"in e&&n(0,i=e.access),"required"in e&&n(1,r=e.required),"error"in e&&n(2,o=e.error),"defaultValueWhenEnabled"in e&&n(6,a=e.defaultValueWhenEnabled),"disableOwnable"in e&&n(3,s=e.disableOwnable),"disableManaged"in e&&n(4,u=e.disableManaged)},e.$$.update=()=>{451&e.$$.dirty&&(l&&!r?n(0,i=c):r?!1===i&&n(0,i=a):n(8,c=i),n(7,l=r))},[i,r,o,s,u,d,a,l,c,function(){i=this.__value,n(0,i),n(7,l),n(1,r),n(8,c),n(6,a)},[[]],()=>d("ownable"),function(){i=this.__value,n(0,i),n(7,l),n(1,r),n(8,c),n(6,a)},()=>d("roles"),function(){i=this.__value,n(0,i),n(7,l),n(1,r),n(8,c),n(6,a)},()=>d("managed"),function(e){i=e,n(0,i),n(7,l),n(1,r),n(8,c),n(6,a)}]}class _k extends ng{constructor(e){super(),tg(this,e,kk,$k,Yf,{access:0,required:1,error:2,defaultValueWhenEnabled:6,disableOwnable:3,disableManaged:4})}}function wk(e){let t;return{c(){t=fh("Where people can contact you to report security issues. Will only be visible if contract metadata is verified.")},m(e,n){lh(e,t,n)},d(e){e&&ch(t)}}}function xk(e){let t,n,i,r;return{c(){t=ph("input"),bh(t,"placeholder",ev.license)},m(o,a){lh(o,t,a),_h(t,e[0].license),i||(r=[vh(t,"input",e[8]),ah(n=K$.call(null,t,e[1]?.license))],i=!0)},p(e,i){1&i&&t.value!==e[0].license&&_h(t,e[0].license),n&&Xf(n.update)&&2&i&&n.update.call(null,e[1]?.license)},d(e){e&&ch(t),i=!1,Gf(r)}}}function Ik(e){let t;return{c(){t=ph("input"),t.value=iv,t.readOnly=!0,t.disabled=!0,bh(t,"aria-describedby",e[4])},m(e,n){lh(e,t,n)},p:Jf,d(e){e&&ch(t)}}}function Sk(e){let t,n,i;function r(e,t){return e[3].show?zk:Ok}let o=r(e),a=o(e);return{c(){t=ph("p"),n=fh("Contracts generated with ACE use BUSL-1.1. Review the\n "),a.c(),i=fh("\n before production use."),bh(t,"id",e[4]),bh(t,"class","text-sm text-gray-500")},m(e,r){lh(e,t,r),sh(t,n),a.m(t,null),sh(t,i)},p(e,n){o===(o=r(e))&&a?a.p(e,n):(a.d(1),a=o(e),a&&(a.c(),a.m(t,i)))},d(e){e&&ch(t),a.d()}}}function Ok(e){let t;return{c(){t=fh("ACE license and additional use grants")},m(e,n){lh(e,t,n)},p:Jf,d(e){e&&ch(t)}}}function zk(e){let t,n,i,r,o,a,s,u,l;return{c(){t=ph("a"),n=fh("ACE license"),o=fh("\n and\n "),a=ph("a"),s=fh("additional use grants"),bh(t,"class","underline"),bh(t,"href",rv),bh(t,"target",i=e[3].target),bh(t,"rel",r=e[3].rel),bh(a,"class","underline"),bh(a,"href","https://github.com/smartcontractkit/chainlink-ace/blob/v1.2.0/chainlink-ace-License-grants"),bh(a,"target",u=e[3].target),bh(a,"rel",l=e[3].rel)},m(e,i){lh(e,t,i),sh(t,n),lh(e,o,i),lh(e,a,i),sh(a,s)},p(e,n){8&n&&i!==(i=e[3].target)&&bh(t,"target",i),8&n&&r!==(r=e[3].rel)&&bh(t,"rel",r),8&n&&u!==(u=e[3].target)&&bh(a,"target",u),8&n&&l!==(l=e[3].rel)&&bh(a,"rel",l)},d(e){e&&ch(t),e&&ch(o),e&&ch(a)}}}function Ek(e){let t,n,i,r,o,a,s,u,l,c,d,p,m,f,h,g,v,b;function y(e,t){return e[2]?Ik:xk}s=new V$({props:{link:"https://github.com/ethereum-lists/contracts/blob/main/README.md#tracking-new-deployments",$$slots:{default:[wk]},$$scope:{ctx:e}}});let $=y(e),k=$(e),_=e[2]&&Sk(e);return{c(){t=ph("section"),n=ph("h1"),n.innerHTML='<label class="flex items-center tooltip-container pr-2"><span>Info</span></label>',i=hh(),r=ph("label"),o=ph("span"),a=fh("Security Contact\n "),Xh(s.$$.fragment),u=hh(),l=ph("input"),d=hh(),p=ph("label"),m=ph("span"),m.textContent="License",f=hh(),k.c(),h=hh(),_&&_.c(),bh(o,"class","flex justify-between pr-2"),bh(l,"placeholder","security@example.com"),bh(r,"class","labeled-input"),bh(p,"class","labeled-input"),bh(t,"class","controls-section")},m(y,$){lh(y,t,$),sh(t,n),sh(t,i),sh(t,r),sh(r,o),sh(o,a),Yh(s,o,null),sh(r,u),sh(r,l),_h(l,e[0].securityContact),sh(t,d),sh(t,p),sh(p,m),sh(p,f),k.m(p,null),sh(t,h),_&&_.m(t,null),g=!0,v||(b=[vh(l,"input",e[7]),ah(c=K$.call(null,l,e[1]?.securityContact))],v=!0)},p(e,[n]){const i={};1024&n&&(i.$$scope={dirty:n,ctx:e}),s.$set(i),1&n&&l.value!==e[0].securityContact&&_h(l,e[0].securityContact),c&&Xf(c.update)&&2&n&&c.update.call(null,e[1]?.securityContact),$===($=y(e))&&k?k.p(e,n):(k.d(1),k=$(e),k&&(k.c(),k.m(p,null))),e[2]?_?_.p(e,n):(_=Sk(e),_.c(),_.m(t,null)):_&&(_.d(1),_=null)},i(e){g||(Wh(s.$$.fragment,e),g=!0)},o(e){Kh(s.$$.fragment,e),g=!1},d(e){e&&ch(t),Qh(s),k.d(),_&&_.d(),v=!1,Gf(b)}}}let Dk=0;function Ck(e,t,n){let i,r,{info:o}=t,{errors:a}=t,{aceEnabled:s=!1}=t;const u="ace-license-description-"+Dk++,l=Ch(pg),c=l??rg({canOpen:!1});return Qf(e,c,e=>n(6,r=e)),e.$$set=e=>{"info"in e&&n(0,o=e.info),"errors"in e&&n(1,a=e.errors),"aceEnabled"in e&&n(2,s=e.aceEnabled)},e.$$.update=()=>{var t,o;64&e.$$.dirty&&n(3,(t=null!=l,o=r.canOpen,i=t?{show:o,target:void 0,rel:void 0}:{show:!0,target:"_blank",rel:"noopener noreferrer"}))},[o,a,s,i,u,c,r,function(){o.securityContact=this.value,n(0,o)},function(){o.license=this.value,n(0,o)}]}class Tk extends ng{constructor(e){super(),tg(this,e,Ck,Ek,Yf,{info:0,errors:1,aceEnabled:2})}}function Ak(e){let t;const n=e[8].default,i=eh(n,e,e[10],null);return{c(){i&&i.c()},m(e,n){i&&i.m(e,n),t=!0},p(e,r){i&&i.p&&(!t||1024&r)&&ih(i,n,e,e[10],t?nh(n,e[10],r,null):rh(e[10]),null)},i(e){t||(Wh(i,e),t=!0)},o(e){Kh(i,e),t=!1},d(e){i&&i.d(e)}}}function Nk(e){let t,n,i;function r(t){e[9](t)}let o={type:"section",label:e[1],helpContent:e[2],helpLink:e[3],disabled:e[4],disabledReason:e[5],required:e[6],error:e[7],$$slots:{default:[Ak]},$$scope:{ctx:e}};return void 0!==e[0]&&(o.checkboxChecked=e[0]),t=new dk({props:o}),Ah.push(()=>Gh(t,"checkboxChecked",r)),{c(){Xh(t.$$.fragment)},m(e,n){Yh(t,e,n),i=!0},p(e,[i]){const r={};2&i&&(r.label=e[1]),4&i&&(r.helpContent=e[2]),8&i&&(r.helpLink=e[3]),16&i&&(r.disabled=e[4]),32&i&&(r.disabledReason=e[5]),64&i&&(r.required=e[6]),128&i&&(r.error=e[7]),1024&i&&(r.$$scope={dirty:i,ctx:e}),!n&&1&i&&(n=!0,r.checkboxChecked=e[0],Rh(()=>n=!1)),t.$set(r)},i(e){i||(Wh(t.$$.fragment,e),i=!0)},o(e){Kh(t.$$.fragment,e),i=!1},d(e){Qh(t,e)}}}function Uk(e,t,n){let{$$slots:i={},$$scope:r}=t,{label:o}=t,{checked:a}=t,{helpContent:s}=t,{helpLink:u}=t,{disabled:l=!1}=t,{disabledReason:c}=t,{required:d=!1}=t,{error:p}=t;return e.$$set=e=>{"label"in e&&n(1,o=e.label),"checked"in e&&n(0,a=e.checked),"helpContent"in e&&n(2,s=e.helpContent),"helpLink"in e&&n(3,u=e.helpLink),"disabled"in e&&n(4,l=e.disabled),"disabledReason"in e&&n(5,c=e.disabledReason),"required"in e&&n(6,d=e.required),"error"in e&&n(7,p=e.error),"$$scope"in e&&n(10,r=e.$$scope)},[a,o,s,u,l,c,d,p,i,function(e){a=e,n(0,a)},r]}class Pk extends ng{constructor(e){super(),tg(this,e,Uk,Nk,Yf,{label:1,checked:0,helpContent:2,helpLink:3,disabled:4,disabledReason:5,required:6,error:7})}}function jk(e){let t;return{c(){t=fh("ERC-20 shares are useful for single-token accounting.")},m(e,n){lh(e,t,n)},d(e){e&&ch(t)}}}function Lk(e){let t;return{c(){t=fh("ERC-1155 shares are useful for multi-token accounting.")},m(e,n){lh(e,t,n)},d(e){e&&ch(t)}}}function Rk(e){let t;return{c(){t=fh("ERC-6909 shares are useful for optimized multi-token accounting.")},m(e,n){lh(e,t,n)},d(e){e&&ch(t)}}}function Zk(e){let t,n,i,r,o,a;return{c(){t=ph("label"),n=ph("span"),n.textContent="URI",i=hh(),r=ph("input"),bh(t,"class","labeled-input")},m(s,u){lh(s,t,u),sh(t,n),sh(t,i),sh(t,r),_h(r,e[0].shares.uri),o||(a=vh(r,"input",e[11]),o=!0)},p(e,t){1&t&&r.value!==e[0].shares.uri&&_h(r,e[0].shares.uri)},d(e){e&&ch(t),o=!1,a()}}}function Mk(e){let t,n,i,r,o,a,s,u,l,c,d,p;return{c(){t=ph("div"),n=ph("label"),i=ph("span"),i.textContent="Name",r=hh(),o=ph("input"),a=hh(),s=ph("label"),u=ph("span"),u.textContent="Symbol",l=hh(),c=ph("input"),bh(n,"class","labeled-input"),bh(s,"class","labeled-input"),bh(t,"class","grid grid-cols-[2fr,1fr] gap-2")},m(m,f){lh(m,t,f),sh(t,n),sh(n,i),sh(n,r),sh(n,o),_h(o,e[0].shares.name),sh(t,a),sh(t,s),sh(s,u),sh(s,l),sh(s,c),_h(c,e[0].shares.symbol),d||(p=[vh(o,"input",e[12]),vh(c,"input",e[13])],d=!0)},p(e,t){1&t&&o.value!==e[0].shares.name&&_h(o,e[0].shares.name),1&t&&c.value!==e[0].shares.symbol&&_h(c,e[0].shares.symbol)},d(e){e&&ch(t),d=!1,Gf(p)}}}function qk(e){let t,n,i,r,o,a,s,u,l,c,d,p,m,f,h,g,v,b,y,$,k,_,w,x;o=new V$({props:{link:"https://docs.openzeppelin.com/contracts/5.x/api/token/erc20",$$slots:{default:[jk]},$$scope:{ctx:e}}}),c=new V$({props:{link:"https://docs.openzeppelin.com/contracts/5.x/api/token/erc1155",$$slots:{default:[Lk]},$$scope:{ctx:e}}}),h=new V$({props:{link:"https://docs.openzeppelin.com/contracts/5.x/api/token/erc6909",$$slots:{default:[Rk]},$$scope:{ctx:e}}});let I="ERC1155"===e[0].shares.options&&Zk(e),S="ERC20"===e[0].shares.options&&Mk(e);return _=yh(e[8][0]),{c(){t=ph("div"),n=ph("label"),i=ph("input"),r=fh("\n ERC-20\n "),Xh(o.$$.fragment),a=hh(),s=ph("label"),u=ph("input"),l=fh("\n ERC-1155\n "),Xh(c.$$.fragment),d=hh(),p=ph("label"),m=ph("input"),f=fh("\n ERC-6909\n "),Xh(h.$$.fragment),g=hh(),v=ph("div"),b=hh(),I&&I.c(),y=hh(),S&&S.c(),$=gh(),bh(i,"type","radio"),i.__value="ERC20",i.value=i.__value,i.disabled=e[3],xh(n,"checked","ERC20"===e[0].shares.options),bh(u,"type","radio"),u.__value="ERC1155",u.value=u.__value,u.disabled=e[2],xh(s,"checked","ERC1155"===e[0].shares.options),bh(m,"type","radio"),m.__value="ERC6909",m.value=m.__value,m.disabled=e[1],xh(p,"checked","ERC6909"===e[0].shares.options),bh(t,"class","checkbox-group"),wh(v,"height","0.5rem"),_.p(i,u,m)},m(_,O){lh(_,t,O),sh(t,n),sh(n,i),i.checked=i.__value===e[0].shares.options,sh(n,r),Yh(o,n,null),sh(t,a),sh(t,s),sh(s,u),u.checked=u.__value===e[0].shares.options,sh(s,l),Yh(c,s,null),sh(t,d),sh(t,p),sh(p,m),m.checked=m.__value===e[0].shares.options,sh(p,f),Yh(h,p,null),lh(_,g,O),lh(_,v,O),lh(_,b,O),I&&I.m(_,O),lh(_,y,O),S&&S.m(_,O),lh(_,$,O),k=!0,w||(x=[vh(i,"change",e[7]),vh(u,"change",e[9]),vh(m,"change",e[10])],w=!0)},p(e,t){(!k||8&t)&&(i.disabled=e[3]),1&t&&(i.checked=i.__value===e[0].shares.options);const r={};32768&t&&(r.$$scope={dirty:t,ctx:e}),o.$set(r),(!k||1&t)&&xh(n,"checked","ERC20"===e[0].shares.options),(!k||4&t)&&(u.disabled=e[2]),1&t&&(u.checked=u.__value===e[0].shares.options);const a={};32768&t&&(a.$$scope={dirty:t,ctx:e}),c.$set(a),(!k||1&t)&&xh(s,"checked","ERC1155"===e[0].shares.options),(!k||2&t)&&(m.disabled=e[1]),1&t&&(m.checked=m.__value===e[0].shares.options);const l={};32768&t&&(l.$$scope={dirty:t,ctx:e}),h.$set(l),(!k||1&t)&&xh(p,"checked","ERC6909"===e[0].shares.options),"ERC1155"===e[0].shares.options?I?I.p(e,t):(I=Zk(e),I.c(),I.m(y.parentNode,y)):I&&(I.d(1),I=null),"ERC20"===e[0].shares.options?S?S.p(e,t):(S=Mk(e),S.c(),S.m($.parentNode,$)):S&&(S.d(1),S=null)},i(e){k||(Wh(o.$$.fragment,e),Wh(c.$$.fragment,e),Wh(h.$$.fragment,e),k=!0)},o(e){Kh(o.$$.fragment,e),Kh(c.$$.fragment,e),Kh(h.$$.fragment,e),k=!1},d(e){e&&ch(t),Qh(o),Qh(c),Qh(h),e&&ch(g),e&&ch(v),e&&ch(b),I&&I.d(e),e&&ch(y),S&&S.d(e),e&&ch($),_.r(),w=!1,Gf(x)}}}function Bk(e){let t,n,i;function r(t){e[14](t)}let o={label:"Shares",disabled:e[5],disabledReason:e[4],defaultValue:"ERC20",helpContent:"Shares are useful to account for the ownership of a portion of a liquidity position or pending credit.",helpLink:"https://docs.openzeppelin.com/contracts/5.x/api/token/erc20",$$slots:{default:[qk]},$$scope:{ctx:e}};return void 0!==e[0].shares.options&&(o.value=e[0].shares.options),t=new hk({props:o}),Ah.push(()=>Gh(t,"value",r)),{c(){Xh(t.$$.fragment)},m(e,n){Yh(t,e,n),i=!0},p(e,[i]){const r={};32&i&&(r.disabled=e[5]),16&i&&(r.disabledReason=e[4]),32783&i&&(r.$$scope={dirty:i,ctx:e}),!n&&1&i&&(n=!0,r.value=e[0].shares.options,Rh(()=>n=!1)),t.$set(r)},i(e){i||(Wh(t.$$.fragment,e),i=!0)},o(e){Kh(t.$$.fragment,e),i=!1},d(e){Qh(t,e)}}}function Hk(e,t,n){let i,r,o,a,s,{opts:u}=t,{sharesConfig:l}=t;return e.$$set=e=>{"opts"in e&&n(0,u=e.opts),"sharesConfig"in e&&n(6,l=e.sharesConfig)},e.$$.update=()=>{64&e.$$.dirty&&n(5,i="required"===l||"disabled"===l||nb(l)),65&e.$$.dirty&&n(4,r="required"===l?`Shares are required by <code>${u.hook}</code>`:"disabled"===l?`Shares are disabled for <code>${u.hook}</code>`:nb(l)?`${l} Shares are required for <code>${u.hook}</code>`:void 0),64&e.$$.dirty&&n(3,o="disabled"===l||nb(l)&&"ERC20"!==l),64&e.$$.dirty&&n(2,a="disabled"===l||nb(l)&&"ERC1155"!==l),64&e.$$.dirty&&n(1,s="disabled"===l||nb(l)&&"ERC6909"!==l)},[u,s,a,o,r,i,l,function(){u.shares.options=this.__value,n(0,u)},[[]],function(){u.shares.options=this.__value,n(0,u)},function(){u.shares.options=this.__value,n(0,u)},function(){u.shares.uri=this.value,n(0,u)},function(){u.shares.name=this.value,n(0,u)},function(){u.shares.symbol=this.value,n(0,u)},function(t){e.$$.not_equal(u.shares.options,t)&&(u.shares.options=t,n(0,u))}]}class Fk extends ng{constructor(e){super(),tg(this,e,Hk,Bk,Yf,{opts:0,sharesConfig:6})}}function Jk(e){uh(e,"svelte-pw3570",".shares-section.svelte-pw3570{margin-left:0.5rem}.shares-section.svelte-pw3570 .controls-section h1{color:var(--text-color);font-size:var(--size-4);font-weight:400;text-transform:none;font-variant:none}")}function Vk(e,t,n){const i=e.slice();return i[24]=t[n],i[25]=t,i[26]=n,i}function Wk(e,t,n){const i=e.slice();return i[27]=t[n],i}function Kk(e,t,n){const i=e.slice();return i[30]=t[n],i}function Gk(e,t,n){const i=e.slice();return i[33]=t[n],i}function Xk(e){let t,n;return t=new V$({props:{$$slots:{default:[Yk]},$$scope:{ctx:e}}}),{c(){Xh(t.$$.fragment)},m(e,i){Yh(t,e,i),n=!0},p(e,n){const i={};32&n[0]|32&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(Wh(t.$$.fragment,e),n=!0)},o(e){Kh(t.$$.fragment,e),n=!1},d(e){Qh(t,e)}}}function Yk(e){let t,n=e[33].tooltipText+"";return{c(){t=fh(n)},m(e,n){lh(e,t,n)},p(e,i){32&i[0]&&n!==(n=e[33].tooltipText+"")&&kh(t,n)},d(e){e&&ch(t)}}}function Qk(e){let t,n,i,r,o;return{c(){t=ph("input"),bh(t,"type","number"),bh(t,"placeholder",n=e[33].placeholder)},m(n,a){lh(n,t,a),_h(t,e[0].inputs.blockNumberOffset),r||(o=[vh(t,"input",e[11]),ah(i=K$.call(null,t,e[1]?.[e[33].name]))],r=!0)},p(r,o){e=r,32&o[0]&&n!==(n=e[33].placeholder)&&bh(t,"placeholder",n),1&o[0]&&$h(t.value)!==e[0].inputs.blockNumberOffset&&_h(t,e[0].inputs.blockNumberOffset),i&&Xf(i.update)&&34&o[0]&&i.update.call(null,e[1]?.[e[33].name])},d(e){e&&ch(t),r=!1,Gf(o)}}}function e_(e){let t,n,i,r,o;return{c(){t=ph("input"),bh(t,"type","number"),bh(t,"placeholder",n=e[33].placeholder)},m(n,a){lh(n,t,a),_h(t,e[0].inputs.maxAbsTickDelta),r||(o=[vh(t,"input",e[10]),ah(i=K$.call(null,t,e[1]?.[e[33].name]))],r=!0)},p(r,o){e=r,32&o[0]&&n!==(n=e[33].placeholder)&&bh(t,"placeholder",n),1&o[0]&&$h(t.value)!==e[0].inputs.maxAbsTickDelta&&_h(t,e[0].inputs.maxAbsTickDelta),i&&Xf(i.update)&&34&o[0]&&i.update.call(null,e[1]?.[e[33].name])},d(e){e&&ch(t),r=!1,Gf(o)}}}function t_(e){let t,n,i,r,o,a,s,u=e[33].label+"",l=e[33].tooltipText&&Xk(e);function c(e,t){return"maxAbsTickDelta"===e[33].name?e_:"blockNumberOffset"===e[33].name?Qk:void 0}let d=c(e),p=d&&d(e);return{c(){t=ph("label"),n=ph("span"),i=fh(u),r=hh(),l&&l.c(),o=hh(),p&&p.c(),a=hh(),bh(n,"class","flex justify-between pr-2"),bh(t,"class","labeled-input")},m(e,u){lh(e,t,u),sh(t,n),sh(n,i),sh(n,r),l&&l.m(n,null),sh(t,o),p&&p.m(t,null),sh(t,a),s=!0},p(e,r){(!s||32&r[0])&&u!==(u=e[33].label+"")&&kh(i,u),e[33].tooltipText?l?(l.p(e,r),32&r[0]&&Wh(l,1)):(l=Xk(e),l.c(),Wh(l,1),l.m(n,null)):l&&(Jh(),Kh(l,1,1,()=>{l=null}),Vh()),d===(d=c(e))&&p?p.p(e,r):(p&&p.d(1),p=d&&d(e),p&&(p.c(),p.m(t,a)))},i(e){s||(Wh(l),s=!0)},o(e){Kh(l),s=!1},d(e){e&&ch(t),l&&l.d(),p&&p.d()}}}function n_(e){let t,n,i=e[30].tooltipText+"";return{c(){t=new Ih(!1),n=gh(),t.a=n},m(e,r){t.m(i,e,r),lh(e,n,r)},p:Jf,d(e){e&&ch(n),e&&t.d()}}}function i_(e){let t,n,i,r,o,a,s,u,l,c,d=e[30].displayName+"";return a=new V$({props:{link:e[30].tooltipLink,$$slots:{default:[n_]},$$scope:{ctx:e}}}),u=yh(e[13][0]),{c(){t=ph("label"),n=ph("input"),i=hh(),r=fh(d),o=hh(),Xh(a.$$.fragment),bh(n,"type","radio"),n.__value=e[30].name,n.value=n.__value,xh(t,"checked",e[0].hook===e[30].name),u.p(n)},m(u,d){lh(u,t,d),sh(t,n),n.checked=n.__value===e[0].hook,sh(t,i),sh(t,r),sh(t,o),Yh(a,t,null),s=!0,l||(c=vh(n,"change",e[12]),l=!0)},p(e,i){1&i[0]&&(n.checked=n.__value===e[0].hook);const r={};32&i[1]&&(r.$$scope={dirty:i,ctx:e}),a.$set(r),(!s||193&i[0])&&xh(t,"checked",e[0].hook===e[30].name)},i(e){s||(Wh(a.$$.fragment,e),s=!0)},o(e){Kh(a.$$.fragment,e),s=!1},d(e){e&&ch(t),Qh(a),u.r(),l=!1,c()}}}function r_(e){let t,n,i,r,o,a,s=e[27]+" Hooks",u=e[7][e[27]],l=[];for(let t=0;t<u.length;t+=1)l[t]=i_(Kk(e,u,t));const c=e=>Kh(l[e],1,1,()=>{l[e]=null});return{c(){t=ph("section"),n=ph("h1"),i=fh(s),r=hh(),o=ph("div");for(let e=0;e<l.length;e+=1)l[e].c();bh(o,"class","checkbox-group"),bh(t,"class","controls-section")},m(e,s){lh(e,t,s),sh(t,n),sh(n,i),sh(t,r),sh(t,o);for(let e=0;e<l.length;e+=1)l[e]&&l[e].m(o,null);a=!0},p(e,t){if(193&t[0]){let n;for(u=e[7][e[27]],n=0;n<u.length;n+=1){const i=Kk(e,u,n);l[n]?(l[n].p(i,t),Wh(l[n],1)):(l[n]=i_(i),l[n].c(),Wh(l[n],1),l[n].m(o,null))}for(Jh(),n=u.length;n<l.length;n+=1)c(n);Vh()}},i(e){if(!a){for(let e=0;e<u.length;e+=1)Wh(l[e]);a=!0}},o(e){l=l.filter(Boolean);for(let e=0;e<l.length;e+=1)Kh(l[e]);a=!1},d(e){e&&ch(t),dh(l,e)}}}function o_(e){let t,n,i,r,o=e[24]+"";return{c(){t=fh("Optionally enable the "),n=ph("code"),i=fh(o),r=fh(" permission.")},m(e,o){lh(e,t,o),lh(e,n,o),sh(n,i),lh(e,r,o)},p:Jf,d(e){e&&ch(t),e&&ch(n),e&&ch(r)}}}function a_(e){let t,n,i,r,o,a,s,u=e[24]+"",l=fb(e[24])+"";return{c(){t=fh("The "),n=ph("code"),i=fh(u),r=fh(" permission is required when the\n "),o=ph("code"),a=fh(l),s=fh(" permission is enabled.")},m(e,u){lh(e,t,u),lh(e,n,u),sh(n,i),lh(e,r,u),lh(e,o,u),sh(o,a),lh(e,s,u)},p:Jf,d(e){e&&ch(t),e&&ch(n),e&&ch(r),e&&ch(o),e&&ch(s)}}}function s_(e){let t,n,i,r,o,a,s=e[24]+"";return{c(){t=fh("The "),n=ph("code"),i=fh(s),r=fh(" permission is required when "),o=ph("code"),o.textContent="Pausable",a=fh(" is enabled.")},m(e,s){lh(e,t,s),lh(e,n,s),sh(n,i),lh(e,r,s),lh(e,o,s),lh(e,a,s)},p:Jf,d(e){e&&ch(t),e&&ch(n),e&&ch(r),e&&ch(o),e&&ch(a)}}}function u_(e){let t,n,i,r,o,a,s,u=e[24]+"",l=e[0].hook+"";return{c(){t=fh("The "),n=ph("code"),i=fh(u),r=fh(" permission is required by "),o=ph("code"),a=fh(l),s=fh(".")},m(e,u){lh(e,t,u),lh(e,n,u),sh(n,i),lh(e,r,u),lh(e,o,u),sh(o,a),lh(e,s,u)},p(e,t){1&t[0]&&l!==(l=e[0].hook+"")&&kh(a,l)},d(e){e&&ch(t),e&&ch(n),e&&ch(r),e&&ch(o),e&&ch(s)}}}function l_(e){let t,n,i,r;function o(e,r){return 1&r[0]&&(t=null),1&r[0]&&(n=null),1&r[0]&&(i=null),null==t&&(t=!!pb(e[0].hook,e[24])),t?u_:(null==n&&(n=!!mb(e[0],e[24])),n?s_:(null==i&&(i=!!hb(e[0],e[24])),i?a_:o_))}let a=o(e,[-1,-1]),s=a(e);return{c(){s.c(),r=gh()},m(e,t){s.m(e,t),lh(e,r,t)},p(e,t){a===(a=o(e,t))&&s?s.p(e,t):(s.d(1),s=a(e),s&&(s.c(),s.m(r.parentNode,r)))},d(e){s.d(e),e&&ch(r)}}}function c_(e){let t,n,i,r,o=((a=e[24]).length>25?a.replace("Return",""):a)+"";var a;let s,u,l,c,d,p,m;function f(){e[14].call(n,e[24])}return l=new V$({props:{link:"https://docs.uniswap.org/contracts/v4/concepts/hooks#core-hook-functions",$$slots:{default:[l_]},$$scope:{ctx:e}}}),{c(){t=ph("label"),n=ph("input"),r=hh(),s=fh(o),u=hh(),Xh(l.$$.fragment),c=hh(),bh(n,"type","checkbox"),n.disabled=i=pb(e[0].hook,e[24])||mb(e[0],e[24])||hb(e[0],e[24]),xh(t,"checked",e[0].permissions[e[24]])},m(i,o){lh(i,t,o),sh(t,n),n.checked=e[0].permissions[e[24]],sh(t,r),sh(t,s),sh(t,u),Yh(l,t,null),sh(t,c),d=!0,p||(m=vh(n,"change",f),p=!0)},p(r,o){e=r,(!d||1&o[0]&&i!==(i=pb(e[0].hook,e[24])||mb(e[0],e[24])||hb(e[0],e[24])))&&(n.disabled=i),1&o[0]&&(n.checked=e[0].permissions[e[24]]);const a={};1&o[0]|32&o[1]&&(a.$$scope={dirty:o,ctx:e}),l.$set(a),(!d||1&o[0])&&xh(t,"checked",e[0].permissions[e[24]])},i(e){d||(Wh(l.$$.fragment,e),d=!0)},o(e){Kh(l.$$.fragment,e),d=!1},d(e){e&&ch(t),Qh(l),p=!1,m()}}}function d_(e){let t,n,i=eb,r=[];for(let t=0;t<i.length;t+=1)r[t]=c_(Vk(e,i,t));const o=e=>Kh(r[e],1,1,()=>{r[e]=null});return{c(){t=ph("div");for(let e=0;e<r.length;e+=1)r[e].c();bh(t,"class","checkbox-group")},m(e,i){lh(e,t,i);for(let e=0;e<r.length;e+=1)r[e]&&r[e].m(t,null);n=!0},p(e,n){if(1&n[0]){let a;for(i=eb,a=0;a<i.length;a+=1){const o=Vk(e,i,a);r[a]?(r[a].p(o,n),Wh(r[a],1)):(r[a]=c_(o),r[a].c(),Wh(r[a],1),r[a].m(t,null))}for(Jh(),a=i.length;a<r.length;a+=1)o(a);Vh()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)Wh(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)Kh(r[e]);n=!1},d(e){e&&ch(t),dh(r,e)}}}function p_(e){let t;return{c(){t=fh("Utility library used to settle and take any pending deltas with an unlocked `PoolManager` during flash\n accounting.")},m(e,n){lh(e,t,n)},d(e){e&&ch(t)}}}function m_(e){let t;return{c(){t=fh("Utility library to safely cast between numeric types, i.e. casting an uint256 fee to an uint128 BalanceDelta.")},m(e,n){lh(e,t,n)},d(e){e&&ch(t)}}}function f_(e){let t;return{c(){t=fh("Utility library for simplifying the usage of Transient Storage, which is discarded after the transaction ends\n and whose gas costs are drastically reduced in comparison to regular storage.")},m(e,n){lh(e,t,n)},d(e){e&&ch(t)}}}function h_(e){let t,n,i,r,o,a,s,u,l,c,d,p,m,f,h,g,v,b;return o=new V$({props:{link:"https://docs.openzeppelin.com/uniswap-hooks/api/utils#CurrencySettler",$$slots:{default:[p_]},$$scope:{ctx:e}}}),c=new V$({props:{link:"https://docs.openzeppelin.com/contracts/5.x/api/utils#SafeCast",$$slots:{default:[m_]},$$scope:{ctx:e}}}),h=new V$({props:{link:"https://docs.openzeppelin.com/contracts/5.x/api/utils#TransientSlot",$$slots:{default:[f_]},$$scope:{ctx:e}}}),{c(){t=ph("div"),n=ph("label"),i=ph("input"),r=fh("\n CurrencySettler\n "),Xh(o.$$.fragment),a=hh(),s=ph("label"),u=ph("input"),l=fh("\n SafeCast\n "),Xh(c.$$.fragment),d=hh(),p=ph("label"),m=ph("input"),f=fh("\n Transient Storage\n "),Xh(h.$$.fragment),bh(i,"type","checkbox"),xh(n,"checked",e[0].currencySettler),bh(u,"type","checkbox"),xh(s,"checked",e[0].safeCast),bh(m,"type","checkbox"),xh(p,"checked",e[0].transientStorage),bh(t,"class","checkbox-group")},m(y,$){lh(y,t,$),sh(t,n),sh(n,i),i.checked=e[0].currencySettler,sh(n,r),Yh(o,n,null),sh(t,a),sh(t,s),sh(s,u),u.checked=e[0].safeCast,sh(s,l),Yh(c,s,null),sh(t,d),sh(t,p),sh(p,m),m.checked=e[0].transientStorage,sh(p,f),Yh(h,p,null),g=!0,v||(b=[vh(i,"change",e[16]),vh(u,"change",e[17]),vh(m,"change",e[18])],v=!0)},p(e,t){1&t[0]&&(i.checked=e[0].currencySettler);const r={};32&t[1]&&(r.$$scope={dirty:t,ctx:e}),o.$set(r),(!g||1&t[0])&&xh(n,"checked",e[0].currencySettler),1&t[0]&&(u.checked=e[0].safeCast);const a={};32&t[1]&&(a.$$scope={dirty:t,ctx:e}),c.$set(a),(!g||1&t[0])&&xh(s,"checked",e[0].safeCast),1&t[0]&&(m.checked=e[0].transientStorage);const l={};32&t[1]&&(l.$$scope={dirty:t,ctx:e}),h.$set(l),(!g||1&t[0])&&xh(p,"checked",e[0].transientStorage)},i(e){g||(Wh(o.$$.fragment,e),Wh(c.$$.fragment,e),Wh(h.$$.fragment,e),g=!0)},o(e){Kh(o.$$.fragment,e),Kh(c.$$.fragment,e),Kh(h.$$.fragment,e),g=!1},d(e){e&&ch(t),Qh(o),Qh(c),Qh(h),v=!1,Gf(b)}}}function g_(e){let t,n,i;return{c(){t=fh("Privileged accounts will be able to pause the functionality marked as "),n=ph("code"),n.textContent="whenNotPaused",i=fh(". Useful for\n emergency response.")},m(e,r){lh(e,t,r),lh(e,n,r),lh(e,i,r)},p:Jf,d(e){e&&ch(t),e&&ch(n),e&&ch(i)}}}function v_(e){let t,n,i,r,o,a,s,u,l,c,d,p,m,f,h,g,v,b,y,$,k,_,w,x,I,S,O,z,E,D,C,T,A,N,U,P,j,L=e[5].inputs,R=[];for(let t=0;t<L.length;t+=1)R[t]=t_(Gk(e,L,t));const Z=e=>Kh(R[e],1,1,()=>{R[e]=null});let M=e[6],q=[];for(let t=0;t<M.length;t+=1)q[t]=r_(Wk(e,M,t));const B=e=>Kh(q[e],1,1,()=>{q[e]=null});function H(t){e[15](t)}let F={label:"Additional Hook Permissions",helpContent:"Fine-tune which core hook function permissions are enabled.",helpLink:"https://docs.uniswap.org/contracts/v4/concepts/hooks#core-hook-functions",$$slots:{default:[d_]},$$scope:{ctx:e}};function J(t){e[19](t)}void 0!==e[2]&&(F.checked=e[2]),d=new Pk({props:F}),Ah.push(()=>Gh(d,"checked",H));let V={label:"Utilities",helpContent:"Utilities are optional libraries that can be used to enhance the functionality or security of the hook.",$$slots:{default:[h_]},$$scope:{ctx:e}};function W(t){e[21](t)}void 0!==e[3]&&(V.checked=e[3]),f=new Pk({props:V}),Ah.push(()=>Gh(f,"checked",J)),x=new V$({props:{link:"https://docs.openzeppelin.com/contracts/5.x/api/utils#Pausable",$$slots:{default:[g_]},$$scope:{ctx:e}}});let K={sharesConfig:e[5].shares};function G(t){e[22](t)}void 0!==e[0]&&(K.opts=e[0]),O=new Fk({props:K}),Ah.push(()=>Gh(O,"opts",W));let X={required:e[4]};function Y(t){e[23](t)}void 0!==e[0].access&&(X.access=e[0].access),D=new _k({props:X}),Ah.push(()=>Gh(D,"access",G));let Q={errors:e[1]};return void 0!==e[0].info&&(Q.info=e[0].info),A=new Tk({props:Q}),Ah.push(()=>Gh(A,"info",Y)),{c(){t=ph("section"),n=ph("h1"),n.textContent="Settings",i=hh(),r=ph("label"),o=ph("span"),o.textContent="Name",a=hh(),s=ph("input"),u=hh();for(let e=0;e<R.length;e+=1)R[e].c();l=hh();for(let e=0;e<q.length;e+=1)q[e].c();c=hh(),Xh(d.$$.fragment),m=hh(),Xh(f.$$.fragment),g=hh(),v=ph("section"),b=ph("h1"),b.textContent="Features",y=hh(),$=ph("div"),k=ph("label"),_=ph("input"),w=fh("\n Pausable\n "),Xh(x.$$.fragment),I=hh(),S=ph("div"),Xh(O.$$.fragment),E=hh(),Xh(D.$$.fragment),T=hh(),Xh(A.$$.fragment),bh(r,"class","labeled-input"),bh(t,"class","controls-section"),bh(_,"type","checkbox"),xh(k,"checked",e[0].pausable),bh($,"class","checkbox-group"),bh(S,"class","shares-section svelte-pw3570"),bh(v,"class","controls-section")},m(p,h){lh(p,t,h),sh(t,n),sh(t,i),sh(t,r),sh(r,o),sh(r,a),sh(r,s),_h(s,e[0].name),sh(t,u);for(let e=0;e<R.length;e+=1)R[e]&&R[e].m(t,null);lh(p,l,h);for(let e=0;e<q.length;e+=1)q[e]&&q[e].m(p,h);lh(p,c,h),Yh(d,p,h),lh(p,m,h),Yh(f,p,h),lh(p,g,h),lh(p,v,h),sh(v,b),sh(v,y),sh(v,$),sh($,k),sh(k,_),_.checked=e[0].pausable,sh(k,w),Yh(x,k,null),sh(v,I),sh(v,S),Yh(O,S,null),lh(p,E,h),Yh(D,p,h),lh(p,T,h),Yh(A,p,h),U=!0,P||(j=[vh(s,"input",e[9]),vh(_,"change",e[20])],P=!0)},p(e,n){if(1&n[0]&&s.value!==e[0].name&&_h(s,e[0].name),35&n[0]){let i;for(L=e[5].inputs,i=0;i<L.length;i+=1){const r=Gk(e,L,i);R[i]?(R[i].p(r,n),Wh(R[i],1)):(R[i]=t_(r),R[i].c(),Wh(R[i],1),R[i].m(t,null))}for(Jh(),i=L.length;i<R.length;i+=1)Z(i);Vh()}if(193&n[0]){let t;for(M=e[6],t=0;t<M.length;t+=1){const i=Wk(e,M,t);q[t]?(q[t].p(i,n),Wh(q[t],1)):(q[t]=r_(i),q[t].c(),Wh(q[t],1),q[t].m(c.parentNode,c))}for(Jh(),t=M.length;t<q.length;t+=1)B(t);Vh()}const i={};1&n[0]|32&n[1]&&(i.$$scope={dirty:n,ctx:e}),!p&&4&n[0]&&(p=!0,i.checked=e[2],Rh(()=>p=!1)),d.$set(i);const r={};1&n[0]|32&n[1]&&(r.$$scope={dirty:n,ctx:e}),!h&&8&n[0]&&(h=!0,r.checked=e[3],Rh(()=>h=!1)),f.$set(r),1&n[0]&&(_.checked=e[0].pausable);const o={};32&n[1]&&(o.$$scope={dirty:n,ctx:e}),x.$set(o),(!U||1&n[0])&&xh(k,"checked",e[0].pausable);const a={};32&n[0]&&(a.sharesConfig=e[5].shares),!z&&1&n[0]&&(z=!0,a.opts=e[0],Rh(()=>z=!1)),O.$set(a);const u={};16&n[0]&&(u.required=e[4]),!C&&1&n[0]&&(C=!0,u.access=e[0].access,Rh(()=>C=!1)),D.$set(u);const l={};2&n[0]&&(l.errors=e[1]),!N&&1&n[0]&&(N=!0,l.info=e[0].info,Rh(()=>N=!1)),A.$set(l)},i(e){if(!U){for(let e=0;e<L.length;e+=1)Wh(R[e]);for(let e=0;e<M.length;e+=1)Wh(q[e]);Wh(d.$$.fragment,e),Wh(f.$$.fragment,e),Wh(x.$$.fragment,e),Wh(O.$$.fragment,e),Wh(D.$$.fragment,e),Wh(A.$$.fragment,e),U=!0}},o(e){R=R.filter(Boolean);for(let e=0;e<R.length;e+=1)Kh(R[e]);q=q.filter(Boolean);for(let e=0;e<q.length;e+=1)Kh(q[e]);Kh(d.$$.fragment,e),Kh(f.$$.fragment,e),Kh(x.$$.fragment,e),Kh(O.$$.fragment,e),Kh(D.$$.fragment,e),Kh(A.$$.fragment,e),U=!1},d(e){e&&ch(t),dh(R,e),e&&ch(l),dh(q,e),e&&ch(c),Qh(d,e),e&&ch(m),Qh(f,e),e&&ch(g),e&&ch(v),Qh(x),Qh(O),e&&ch(E),Qh(D,e),e&&ch(T),Qh(A,e),P=!1,Gf(j)}}}function b_(e,t,n){let i,r,o,{opts:a={kind:"Hooks",...vb.defaults}}=t,{errors:s}=t;const u={Base:[],Fee:[],General:[],Oracles:[]};for(const e in Qv){const t=Qv[e],n=t.category;if(!n)throw new Error(`Hook ${t.name} has an invalid category: ${t.category}`);u[n].push(t)}let l=!1,c=!1;return e.$$set=e=>{"opts"in e&&n(0,a=e.opts),"errors"in e&&n(1,s=e.errors)},e.$$.update=()=>{257&e.$$.dirty[0]&&a.hook!==o&&(n(0,a={...a,hook:a.hook,permissions:{...vb.defaults.permissions}}),n(8,o=a.hook)),1&e.$$.dirty[0]&&n(5,i=Qv[a.hook]),1&e.$$.dirty[0]&&n(4,r=vb.isAccessControlRequired(a))},[a,s,l,c,r,i,["Base","Fee","General","Oracles"],u,o,function(){a.name=this.value,n(0,a),n(8,o)},function(){a.inputs.maxAbsTickDelta=$h(this.value),n(0,a),n(8,o)},function(){a.inputs.blockNumberOffset=$h(this.value),n(0,a),n(8,o)},function(){a.hook=this.__value,n(0,a),n(8,o)},[[]],function(e){a.permissions[e]=this.checked,n(0,a),n(8,o)},function(e){l=e,n(2,l)},function(){a.currencySettler=this.checked,n(0,a),n(8,o)},function(){a.safeCast=this.checked,n(0,a),n(8,o)},function(){a.transientStorage=this.checked,n(0,a),n(8,o)},function(e){c=e,n(3,c)},function(){a.pausable=this.checked,n(0,a),n(8,o)},function(e){a=e,n(0,a),n(8,o)},function(t){e.$$.not_equal(a.access,t)&&(a.access=t,n(0,a),n(8,o))},function(t){e.$$.not_equal(a.info,t)&&(a.info=t,n(0,a),n(8,o))}]}const y_={emptyContract:()=>new Bg("MyHook"),build:e=>function(e){if("Hooks"===e.kind)return ob(e);throw e.kind,new Error("Unknown contract kind")}(e),print:e=>Rv(e),optionsErrors:e=>e instanceof Hg?e.messages:void 0,highlight:e=>zb.highlight("solidity",e).value,injectHyperlinks:function(e){return e.replace(/&quot;(@openzeppelin\/)(contracts-upgradeable\/|contracts\/)((?:(?!\.\.)[^/]+\/)*?[^/]*?)&quot;/g,'&quot;<a class="import-link" href="https://github.com/OpenZeppelin/openzeppelin-$2blob/v5.4.0/contracts/$3" target="_blank" rel="noopener noreferrer">$1$2$3</a>&quot;').replace(/&quot;(@uniswap\/)(v4-core\/src\/)((?:(?!\.\.)[^/]+\/)*?[^/]*?)&quot;/g,'&quot;<a class="import-link" href="https://github.com/Uniswap/v4-core/blob/main/src/$3" target="_blank" rel="noopener noreferrer">$1$2$3</a>&quot;').replace(/&quot;(@openzeppelin\/)(uniswap-hooks\/)((?:(?!\.\.)[^/]+\/)*?[^/]*?)&quot;/g,'&quot;<a class="import-link" href="https://github.com/OpenZeppelin/uniswap-hooks/blob/v1.2.1/src/$3" target="_blank" rel="noopener noreferrer">$1$2$3</a>&quot;')},highlightClass:"-solidity",fence:"solidity",controls:{Hooks:class extends ng{constructor(e){super(),tg(this,e,b_,v_,Yf,{opts:0,errors:1},Jk,[-1,-1])}}}};!function(e,t=document.body){(async function(e,t,n=document.body){const i=new Ff({name:`OpenZeppelin ${t}`,version:"1.0.0"},{},{autoResize:!1});document.documentElement.style.setProperty("--mcp-app-height","560px");const r=new Rg({target:n,props:{adapter:e,kind:t,mcpApp:i}}),o=new bf(window.parent,window.parent);i.connect(o).then(async()=>{const e=ug(i);console.info(`[mcp-apps] connected (${t}) hostCapabilities`,i.getHostCapabilities()),r.$set({hostConnected:!0,hostConnectError:void 0,hostSendCaps:e}),await i.sendSizeChanged({height:Zg})}).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)}(y_)}();
17
17
 
18
18
  </script>
19
19
  </body>