@arudovwen/form-builder-react 1.0.4 → 1.0.6

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.
@@ -1,4 +1,4 @@
1
- (function(Nt,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],m):(Nt=typeof globalThis<"u"?globalThis:Nt||self,m(Nt.FormBuilder={},Nt.React,Nt.ReactDOM))})(this,function(Nt,m,Tt){"use strict";var Ys=document.createElement("style");Ys.textContent=`@import"https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@0,200..900;1,200..900&display=swap";@import"https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@0,200..900;1,200..900&family=Onest:wght@100..900&display=swap";*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.-top-\\[10px\\]{top:-10px}.left-0{left:0}.left-3{left:.75rem}.right-0{right:0}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.top-0{top:0}.top-2{top:.5rem}.top-3{top:.75rem}.top-4{top:1rem}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\\[1\\]{z-index:1}.z-\\[40\\]{z-index:40}.z-\\[77\\]{z-index:77}.z-\\[999\\]{z-index:999}.col-span-2{grid-column:span 2 / span 2}.mx-auto{margin-left:auto;margin-right:auto}.-ml-1{margin-left:-.25rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.mb-\\[5px\\]{margin-bottom:5px}.mb-\\[6px\\]{margin-bottom:6px}.ml-2{margin-left:.5rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-\\[6px\\]{margin-top:6px}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.h-14{height:3.5rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-\\[60px\\]{height:60px}.h-\\[60vh\\]{height:60vh}.h-full{height:100%}.h-screen{height:100vh}.max-h-60{max-height:15rem}.max-h-\\[70vh\\]{max-height:70vh}.max-h-\\[80vh\\]{max-height:80vh}.max-h-\\[86vh\\]{max-height:86vh}.max-h-\\[90vh\\]{max-height:90vh}.max-h-full{max-height:100%}.min-h-\\[250px\\]{min-height:250px}.min-h-\\[300px\\]{min-height:300px}.min-h-\\[600px\\]{min-height:600px}.min-h-\\[80px\\]{min-height:80px}.w-14{width:3.5rem}.w-20{width:5rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-\\[150px\\]{width:150px}.w-\\[270px\\]{width:270px}.w-full{width:100%}.min-w-\\[24px\\]{min-width:24px}.min-w-\\[600px\\]{min-width:600px}.max-w-\\[800px\\]{max-width:800px}.max-w-\\[80vw\\]{max-width:80vw}.max-w-\\[90vw\\]{max-width:90vw}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-move{cursor:move}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.gap-y-1{row-gap:.25rem}.gap-y-12{row-gap:3rem}.gap-y-2{row-gap:.5rem}.gap-y-4{row-gap:1rem}.gap-y-6{row-gap:1.5rem}.gap-y-\\[1px\\]{row-gap:1px}.gap-y-\\[8px\\]{row-gap:8px}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-\\[\\#98A2B3\\]{--tw-border-opacity: 1;border-color:rgb(152 162 179 / var(--tw-border-opacity, 1))}.border-\\[\\#D0D5DD\\]{--tw-border-opacity: 1;border-color:rgb(208 213 221 / var(--tw-border-opacity, 1))}.border-\\[\\#E4E7EC\\]{--tw-border-opacity: 1;border-color:rgb(228 231 236 / var(--tw-border-opacity, 1))}.border-\\[\\#EAECF0\\]{--tw-border-opacity: 1;border-color:rgb(234 236 240 / var(--tw-border-opacity, 1))}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.border-blue-400{--tw-border-opacity: 1;border-color:rgb(96 165 250 / var(--tw-border-opacity, 1))}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-gray-400{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity, 1))}.border-red-300{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.bg-\\[\\#2563EB\\]{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-\\[\\#E4E7EC\\]{--tw-bg-opacity: 1;background-color:rgb(228 231 236 / var(--tw-bg-opacity, 1))}.bg-\\[\\#F2F4F7\\]{--tw-bg-opacity: 1;background-color:rgb(242 244 247 / var(--tw-bg-opacity, 1))}.bg-\\[\\#F9FAFB\\]{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-\\[\\#f7f8fa\\]{--tw-bg-opacity: 1;background-color:rgb(247 248 250 / var(--tw-bg-opacity, 1))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\\/30{background-color:#0000004d}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-opacity-50{--tw-bg-opacity: .5}.object-contain{-o-object-fit:contain;object-fit:contain}.p-1{padding:.25rem}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.\\!py-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.\\!py-\\[10px\\]{padding-top:10px!important;padding-bottom:10px!important}.px-1{padding-left:.25rem;padding-right:.25rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-\\[14px\\]{padding-left:14px;padding-right:14px}.px-\\[30px\\]{padding-left:30px;padding-right:30px}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.py-\\[10px\\]{padding-top:10px;padding-bottom:10px}.py-\\[2px\\]{padding-top:2px;padding-bottom:2px}.\\!pl-1{padding-left:.25rem!important}.pb-5{padding-bottom:1.25rem}.pb-6{padding-bottom:1.5rem}.pb-\\[14px\\]{padding-bottom:14px}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.pt-8{padding-top:2rem}.\\!text-left{text-align:left!important}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-onest{font-family:Onest,sans-serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\\[10px\\]{font-size:10px}.text-\\[20px\\]{font-size:20px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.\\!font-medium{font-weight:500!important}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.\\!uppercase{text-transform:uppercase!important}.capitalize{text-transform:capitalize}.leading-\\[0\\]{line-height:0}.leading-normal{line-height:1.5}.\\!text-blue-700{--tw-text-opacity: 1 !important;color:rgb(29 78 216 / var(--tw-text-opacity, 1))!important}.\\!text-white{--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity, 1))!important}.\\!text-white\\/60{color:#fff9!important}.text-\\[\\#344054\\]{--tw-text-opacity: 1;color:rgb(52 64 84 / var(--tw-text-opacity, 1))}.text-\\[\\#454745\\]{--tw-text-opacity: 1;color:rgb(69 71 69 / var(--tw-text-opacity, 1))}.text-\\[\\#475467\\]{--tw-text-opacity: 1;color:rgb(71 84 103 / var(--tw-text-opacity, 1))}.text-\\[\\#667085\\]{--tw-text-opacity: 1;color:rgb(102 112 133 / var(--tw-text-opacity, 1))}.text-\\[\\#686878\\]{--tw-text-opacity: 1;color:rgb(104 104 120 / var(--tw-text-opacity, 1))}.text-\\[\\#98A2B3\\]{--tw-text-opacity: 1;color:rgb(152 162 179 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-25{opacity:.25}.opacity-40{opacity:.4}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.shadow-\\[rgba\\(149\\,157\\,165\\,0\\.2\\)_0px_2px_4px\\]{--tw-shadow: rgba(149,157,165,.2) 0px 2px 4px;--tw-shadow-colored: 0px 2px 4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline-0{outline-width:0px}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-black{--tw-ring-opacity: 1;--tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity, 1))}.ring-opacity-5{--tw-ring-opacity: .05}.filter{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)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-200{transition-duration:.2s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}html,body{margin:0;padding:0}:root{font-family:Onest,serif;line-height:1.5;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.no-drag{-webkit-user-drag:none;user-drag:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield;-webkit-appearance:textfield;appearance:textfield}.file\\:mr-4::file-selector-button{margin-right:1rem}.file\\:rounded-\\[6px\\]::file-selector-button{border-radius:6px}.file\\:border-0::file-selector-button{border-width:0px}.file\\:bg-blue-50::file-selector-button{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.file\\:px-4::file-selector-button{padding-left:1rem;padding-right:1rem}.file\\:py-\\[6px\\]::file-selector-button{padding-top:6px;padding-bottom:6px}.file\\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:font-semibold::file-selector-button{font-weight:600}.file\\:text-blue-700::file-selector-button{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.hover\\:border-gray-400:hover{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity, 1))}.hover\\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\\:text-red-700:hover{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.hover\\:opacity-80:hover{opacity:.8}.hover\\:shadow:hover{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\\:file\\:bg-blue-100::file-selector-button:hover{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:outline-0:focus{outline-width:0px}.active\\:opacity-50:active{opacity:.5}.disabled\\:opacity-50:disabled{opacity:.5}.group:last-child .group-last\\:hidden{display:none}@media (min-width: 640px){.sm\\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 768px){.md\\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 1024px){.lg\\:min-w-\\[800px\\]{min-width:800px}}:root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
1
+ (function(Nt,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],m):(Nt=typeof globalThis<"u"?globalThis:Nt||self,m(Nt.FormBuilder={},Nt.React,Nt.ReactDOM))})(this,function(Nt,m,Tt){"use strict";var Ys=document.createElement("style");Ys.textContent=`@import"https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@0,200..900;1,200..900&display=swap";@import"https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@0,200..900;1,200..900&family=Onest:wght@100..900&display=swap";.form-control{display:block;width:100%;border-radius:.5rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(208 213 221 / var(--tw-border-opacity, 1));background-color:transparent;padding:10px 14px;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(71 84 103 / var(--tw-text-opacity, 1));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.form-control::-moz-placeholder{font-weight:400;--tw-text-opacity: 1;color:rgb(152 162 179 / var(--tw-text-opacity, 1))}.form-control::placeholder{font-weight:400;--tw-text-opacity: 1;color:rgb(152 162 179 / var(--tw-text-opacity, 1))}.form-control:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-color: rgb(71 85 105 / var(--tw-ring-opacity, 1));--tw-ring-opacity: .9}.form-label{margin-bottom:.5rem;display:block;width:100%;cursor:pointer;font-size:.875rem;font-weight:500;text-transform:capitalize;line-height:1.5rem;--tw-text-opacity: 1;color:rgb(71 84 103 / var(--tw-text-opacity, 1))}.input-control{display:block;width:100%;border-radius:.5rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(208 213 221 / var(--tw-border-opacity, 1));background-color:transparent;padding:10px 14px;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(71 84 103 / var(--tw-text-opacity, 1));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.input-control::-moz-placeholder{font-weight:400;--tw-text-opacity: 1;color:rgb(152 162 179 / var(--tw-text-opacity, 1))}.input-control::placeholder{font-weight:400;--tw-text-opacity: 1;color:rgb(152 162 179 / var(--tw-text-opacity, 1))}.input-control:focus{--tw-border-opacity: 1;border-color:rgb(148 163 184 / var(--tw-border-opacity, 1));outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: .9}.input-label{margin-bottom:6px;cursor:pointer;font-size:.875rem;font-weight:500;text-transform:capitalize;line-height:1.5rem;--tw-text-opacity: 1;color:rgb(71 84 103 / var(--tw-text-opacity, 1))}.formGroup.has-error .input-control{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.formGroup.has-error .input-control:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity, 1));--tw-ring-opacity: .9}.formGroup.is-valid .input-control{--tw-border-opacity: 1;border-color:rgb(34 197 94 / var(--tw-border-opacity, 1))}.formGroup.is-valid .input-control:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-color: rgb(34 197 94 / var(--tw-ring-opacity, 1));--tw-ring-opacity: .9}.input-control[readonly]{--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.input-control[disabled]{cursor:not-allowed;--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity, 1))}.input-control[disabled]::-moz-placeholder{--tw-text-opacity: .6}.input-control[disabled]::placeholder{--tw-text-opacity: .6}label{color:#475467!important}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.-top-\\[10px\\]{top:-10px}.left-0{left:0}.left-3{left:.75rem}.right-0{right:0}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.top-0{top:0}.top-2{top:.5rem}.top-3{top:.75rem}.top-4{top:1rem}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\\[1\\]{z-index:1}.z-\\[40\\]{z-index:40}.z-\\[77\\]{z-index:77}.z-\\[999\\]{z-index:999}.col-span-2{grid-column:span 2 / span 2}.mx-auto{margin-left:auto;margin-right:auto}.-ml-1{margin-left:-.25rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.mb-\\[5px\\]{margin-bottom:5px}.mb-\\[6px\\]{margin-bottom:6px}.ml-2{margin-left:.5rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-\\[6px\\]{margin-top:6px}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.h-14{height:3.5rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-\\[60px\\]{height:60px}.h-\\[60vh\\]{height:60vh}.h-full{height:100%}.h-screen{height:100vh}.max-h-60{max-height:15rem}.max-h-\\[70vh\\]{max-height:70vh}.max-h-\\[80vh\\]{max-height:80vh}.max-h-\\[86vh\\]{max-height:86vh}.max-h-\\[90vh\\]{max-height:90vh}.max-h-full{max-height:100%}.min-h-\\[250px\\]{min-height:250px}.min-h-\\[300px\\]{min-height:300px}.min-h-\\[600px\\]{min-height:600px}.min-h-\\[80px\\]{min-height:80px}.w-14{width:3.5rem}.w-20{width:5rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-\\[150px\\]{width:150px}.w-\\[270px\\]{width:270px}.w-full{width:100%}.w-screen{width:100vw}.min-w-\\[24px\\]{min-width:24px}.min-w-\\[600px\\]{min-width:600px}.max-w-\\[800px\\]{max-width:800px}.max-w-\\[80vw\\]{max-width:80vw}.max-w-\\[90vw\\]{max-width:90vw}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-move{cursor:move}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.gap-y-1{row-gap:.25rem}.gap-y-12{row-gap:3rem}.gap-y-2{row-gap:.5rem}.gap-y-4{row-gap:1rem}.gap-y-6{row-gap:1.5rem}.gap-y-\\[1px\\]{row-gap:1px}.gap-y-\\[8px\\]{row-gap:8px}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-\\[\\#98A2B3\\]{--tw-border-opacity: 1;border-color:rgb(152 162 179 / var(--tw-border-opacity, 1))}.border-\\[\\#D0D5DD\\]{--tw-border-opacity: 1;border-color:rgb(208 213 221 / var(--tw-border-opacity, 1))}.border-\\[\\#E4E7EC\\]{--tw-border-opacity: 1;border-color:rgb(228 231 236 / var(--tw-border-opacity, 1))}.border-\\[\\#EAECF0\\]{--tw-border-opacity: 1;border-color:rgb(234 236 240 / var(--tw-border-opacity, 1))}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.border-blue-400{--tw-border-opacity: 1;border-color:rgb(96 165 250 / var(--tw-border-opacity, 1))}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-gray-400{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity, 1))}.border-red-300{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.bg-\\[\\#2563EB\\]{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-\\[\\#E4E7EC\\]{--tw-bg-opacity: 1;background-color:rgb(228 231 236 / var(--tw-bg-opacity, 1))}.bg-\\[\\#F2F4F7\\]{--tw-bg-opacity: 1;background-color:rgb(242 244 247 / var(--tw-bg-opacity, 1))}.bg-\\[\\#F9FAFB\\]{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-\\[\\#f7f8fa\\]{--tw-bg-opacity: 1;background-color:rgb(247 248 250 / var(--tw-bg-opacity, 1))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\\/30{background-color:#0000004d}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-opacity-50{--tw-bg-opacity: .5}.object-contain{-o-object-fit:contain;object-fit:contain}.p-1{padding:.25rem}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.\\!py-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.\\!py-\\[10px\\]{padding-top:10px!important;padding-bottom:10px!important}.px-1{padding-left:.25rem;padding-right:.25rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-\\[14px\\]{padding-left:14px;padding-right:14px}.px-\\[30px\\]{padding-left:30px;padding-right:30px}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.py-\\[10px\\]{padding-top:10px;padding-bottom:10px}.py-\\[2px\\]{padding-top:2px;padding-bottom:2px}.\\!pl-1{padding-left:.25rem!important}.pb-5{padding-bottom:1.25rem}.pb-6{padding-bottom:1.5rem}.pb-\\[14px\\]{padding-bottom:14px}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.pt-8{padding-top:2rem}.\\!text-left{text-align:left!important}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-onest{font-family:Onest,sans-serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\\[10px\\]{font-size:10px}.text-\\[20px\\]{font-size:20px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.\\!font-medium{font-weight:500!important}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.\\!uppercase{text-transform:uppercase!important}.capitalize{text-transform:capitalize}.leading-\\[0\\]{line-height:0}.leading-normal{line-height:1.5}.\\!text-blue-700{--tw-text-opacity: 1 !important;color:rgb(29 78 216 / var(--tw-text-opacity, 1))!important}.\\!text-white{--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity, 1))!important}.\\!text-white\\/60{color:#fff9!important}.text-\\[\\#344054\\]{--tw-text-opacity: 1;color:rgb(52 64 84 / var(--tw-text-opacity, 1))}.text-\\[\\#454745\\]{--tw-text-opacity: 1;color:rgb(69 71 69 / var(--tw-text-opacity, 1))}.text-\\[\\#475467\\]{--tw-text-opacity: 1;color:rgb(71 84 103 / var(--tw-text-opacity, 1))}.text-\\[\\#667085\\]{--tw-text-opacity: 1;color:rgb(102 112 133 / var(--tw-text-opacity, 1))}.text-\\[\\#686878\\]{--tw-text-opacity: 1;color:rgb(104 104 120 / var(--tw-text-opacity, 1))}.text-\\[\\#98A2B3\\]{--tw-text-opacity: 1;color:rgb(152 162 179 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-25{opacity:.25}.opacity-40{opacity:.4}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.shadow-\\[rgba\\(149\\,157\\,165\\,0\\.2\\)_0px_2px_4px\\]{--tw-shadow: rgba(149,157,165,.2) 0px 2px 4px;--tw-shadow-colored: 0px 2px 4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline-0{outline-width:0px}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-black{--tw-ring-opacity: 1;--tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity, 1))}.ring-opacity-5{--tw-ring-opacity: .05}.filter{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)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-200{transition-duration:.2s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}html,body{margin:0;padding:0}:root{font-family:Onest,serif;line-height:1.5;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.no-drag{-webkit-user-drag:none;user-drag:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield;-webkit-appearance:textfield;appearance:textfield}.loader{width:48px;height:48px;display:inline-block;position:relative}.loader:after,.loader:before{content:"";box-sizing:border-box;width:48px;height:48px;border-radius:50%;border:2px solid var(--loader-color, #333);position:absolute;left:0;top:0;animation:animloader 2s linear infinite}.loader:after{animation-delay:1s}@keyframes animloader{0%{transform:scale(0);opacity:1}to{transform:scale(1);opacity:0}}.file\\:mr-4::file-selector-button{margin-right:1rem}.file\\:rounded-\\[6px\\]::file-selector-button{border-radius:6px}.file\\:border-0::file-selector-button{border-width:0px}.file\\:bg-blue-50::file-selector-button{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.file\\:px-4::file-selector-button{padding-left:1rem;padding-right:1rem}.file\\:py-\\[6px\\]::file-selector-button{padding-top:6px;padding-bottom:6px}.file\\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:font-semibold::file-selector-button{font-weight:600}.file\\:text-blue-700::file-selector-button{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.hover\\:border-gray-400:hover{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity, 1))}.hover\\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\\:text-red-700:hover{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.hover\\:opacity-80:hover{opacity:.8}.hover\\:shadow:hover{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\\:file\\:bg-blue-100::file-selector-button:hover{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:outline-0:focus{outline-width:0px}.active\\:opacity-50:active{opacity:.5}.disabled\\:opacity-50:disabled{opacity:.5}.group:last-child .group-last\\:hidden{display:none}@media (min-width: 640px){.sm\\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 768px){.md\\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 1024px){.lg\\:min-w-\\[800px\\]{min-width:800px}}:root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
2
2
  /*$vite$:1*/`,document.head.appendChild(Ys);function Js(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const F=Js(m),jn=Js(Tt);function Sf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $n={exports:{}},Br={};/**
3
3
  * @license React
4
4
  * react-jsx-runtime.production.min.js
@@ -15,21 +15,21 @@
15
15
  *
16
16
  * This source code is licensed under the MIT license found in the
17
17
  * LICENSE file in the root directory of this source tree.
18
- */var Gs;function Cf(){return Gs||(Gs=1,process.env.NODE_ENV!=="production"&&function(){var e=m,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),d=Symbol.iterator,g="@@iterator";function x(E){if(E===null||typeof E!="object")return null;var D=d&&E[d]||E[g];return typeof D=="function"?D:null}var b=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(E){{for(var D=arguments.length,H=new Array(D>1?D-1:0),Q=1;Q<D;Q++)H[Q-1]=arguments[Q];w("error",E,H)}}function w(E,D,H){{var Q=b.ReactDebugCurrentFrame,le=Q.getStackAddendum();le!==""&&(D+="%s",H=H.concat([le]));var fe=H.map(function(ie){return String(ie)});fe.unshift("Warning: "+D),Function.prototype.apply.call(console[E],console,fe)}}var _=!1,k=!1,S=!1,C=!1,A=!1,N;N=Symbol.for("react.module.reference");function P(E){return!!(typeof E=="string"||typeof E=="function"||E===n||E===i||A||E===o||E===u||E===c||C||E===p||_||k||S||typeof E=="object"&&E!==null&&(E.$$typeof===h||E.$$typeof===f||E.$$typeof===s||E.$$typeof===a||E.$$typeof===l||E.$$typeof===N||E.getModuleId!==void 0))}function L(E,D,H){var Q=E.displayName;if(Q)return Q;var le=D.displayName||D.name||"";return le!==""?H+"("+le+")":H}function I(E){return E.displayName||"Context"}function R(E){if(E==null)return null;if(typeof E.tag=="number"&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof E=="function")return E.displayName||E.name||null;if(typeof E=="string")return E;switch(E){case n:return"Fragment";case r:return"Portal";case i:return"Profiler";case o:return"StrictMode";case u:return"Suspense";case c:return"SuspenseList"}if(typeof E=="object")switch(E.$$typeof){case a:var D=E;return I(D)+".Consumer";case s:var H=E;return I(H._context)+".Provider";case l:return L(E,E.render,"ForwardRef");case f:var Q=E.displayName||null;return Q!==null?Q:R(E.type)||"Memo";case h:{var le=E,fe=le._payload,ie=le._init;try{return R(ie(fe))}catch{return null}}}return null}var q=Object.assign,J=0,z,G,K,Z,re,Ae,Le;function W(){}W.__reactDisabledLog=!0;function xe(){{if(J===0){z=console.log,G=console.info,K=console.warn,Z=console.error,re=console.group,Ae=console.groupCollapsed,Le=console.groupEnd;var E={configurable:!0,enumerable:!0,value:W,writable:!0};Object.defineProperties(console,{info:E,log:E,warn:E,error:E,group:E,groupCollapsed:E,groupEnd:E})}J++}}function Te(){{if(J--,J===0){var E={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:q({},E,{value:z}),info:q({},E,{value:G}),warn:q({},E,{value:K}),error:q({},E,{value:Z}),group:q({},E,{value:re}),groupCollapsed:q({},E,{value:Ae}),groupEnd:q({},E,{value:Le})})}J<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ae=b.ReactCurrentDispatcher,je;function _e(E,D,H){{if(je===void 0)try{throw Error()}catch(le){var Q=le.stack.trim().match(/\n( *(at )?)/);je=Q&&Q[1]||""}return`
19
- `+je+E}}var Pe=!1,vt;{var Se=typeof WeakMap=="function"?WeakMap:Map;vt=new Se}function oe(E,D){if(!E||Pe)return"";{var H=vt.get(E);if(H!==void 0)return H}var Q;Pe=!0;var le=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var fe;fe=ae.current,ae.current=null,xe();try{if(D){var ie=function(){throw Error()};if(Object.defineProperty(ie.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ie,[])}catch(nt){Q=nt}Reflect.construct(E,[],ie)}else{try{ie.call()}catch(nt){Q=nt}E.call(ie.prototype)}}else{try{throw Error()}catch(nt){Q=nt}E()}}catch(nt){if(nt&&Q&&typeof nt.stack=="string"){for(var ne=nt.stack.split(`
18
+ */var Gs;function Cf(){return Gs||(Gs=1,process.env.NODE_ENV!=="production"&&function(){var e=m,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),d=Symbol.iterator,g="@@iterator";function x(E){if(E===null||typeof E!="object")return null;var D=d&&E[d]||E[g];return typeof D=="function"?D:null}var b=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(E){{for(var D=arguments.length,H=new Array(D>1?D-1:0),Q=1;Q<D;Q++)H[Q-1]=arguments[Q];w("error",E,H)}}function w(E,D,H){{var Q=b.ReactDebugCurrentFrame,le=Q.getStackAddendum();le!==""&&(D+="%s",H=H.concat([le]));var fe=H.map(function(ie){return String(ie)});fe.unshift("Warning: "+D),Function.prototype.apply.call(console[E],console,fe)}}var _=!1,k=!1,S=!1,C=!1,A=!1,N;N=Symbol.for("react.module.reference");function L(E){return!!(typeof E=="string"||typeof E=="function"||E===n||E===i||A||E===o||E===u||E===c||C||E===p||_||k||S||typeof E=="object"&&E!==null&&(E.$$typeof===h||E.$$typeof===f||E.$$typeof===s||E.$$typeof===a||E.$$typeof===l||E.$$typeof===N||E.getModuleId!==void 0))}function P(E,D,H){var Q=E.displayName;if(Q)return Q;var le=D.displayName||D.name||"";return le!==""?H+"("+le+")":H}function I(E){return E.displayName||"Context"}function R(E){if(E==null)return null;if(typeof E.tag=="number"&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof E=="function")return E.displayName||E.name||null;if(typeof E=="string")return E;switch(E){case n:return"Fragment";case r:return"Portal";case i:return"Profiler";case o:return"StrictMode";case u:return"Suspense";case c:return"SuspenseList"}if(typeof E=="object")switch(E.$$typeof){case a:var D=E;return I(D)+".Consumer";case s:var H=E;return I(H._context)+".Provider";case l:return P(E,E.render,"ForwardRef");case f:var Q=E.displayName||null;return Q!==null?Q:R(E.type)||"Memo";case h:{var le=E,fe=le._payload,ie=le._init;try{return R(ie(fe))}catch{return null}}}return null}var q=Object.assign,J=0,z,G,K,Z,re,Ae,Pe;function W(){}W.__reactDisabledLog=!0;function xe(){{if(J===0){z=console.log,G=console.info,K=console.warn,Z=console.error,re=console.group,Ae=console.groupCollapsed,Pe=console.groupEnd;var E={configurable:!0,enumerable:!0,value:W,writable:!0};Object.defineProperties(console,{info:E,log:E,warn:E,error:E,group:E,groupCollapsed:E,groupEnd:E})}J++}}function Te(){{if(J--,J===0){var E={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:q({},E,{value:z}),info:q({},E,{value:G}),warn:q({},E,{value:K}),error:q({},E,{value:Z}),group:q({},E,{value:re}),groupCollapsed:q({},E,{value:Ae}),groupEnd:q({},E,{value:Pe})})}J<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ae=b.ReactCurrentDispatcher,je;function _e(E,D,H){{if(je===void 0)try{throw Error()}catch(le){var Q=le.stack.trim().match(/\n( *(at )?)/);je=Q&&Q[1]||""}return`
19
+ `+je+E}}var Le=!1,vt;{var Se=typeof WeakMap=="function"?WeakMap:Map;vt=new Se}function oe(E,D){if(!E||Le)return"";{var H=vt.get(E);if(H!==void 0)return H}var Q;Le=!0;var le=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var fe;fe=ae.current,ae.current=null,xe();try{if(D){var ie=function(){throw Error()};if(Object.defineProperty(ie.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ie,[])}catch(nt){Q=nt}Reflect.construct(E,[],ie)}else{try{ie.call()}catch(nt){Q=nt}E.call(ie.prototype)}}else{try{throw Error()}catch(nt){Q=nt}E()}}catch(nt){if(nt&&Q&&typeof nt.stack=="string"){for(var ne=nt.stack.split(`
20
20
  `),Ge=Q.stack.split(`
21
21
  `),ke=ne.length-1,Oe=Ge.length-1;ke>=1&&Oe>=0&&ne[ke]!==Ge[Oe];)Oe--;for(;ke>=1&&Oe>=0;ke--,Oe--)if(ne[ke]!==Ge[Oe]){if(ke!==1||Oe!==1)do if(ke--,Oe--,Oe<0||ne[ke]!==Ge[Oe]){var pt=`
22
- `+ne[ke].replace(" at new "," at ");return E.displayName&&pt.includes("<anonymous>")&&(pt=pt.replace("<anonymous>",E.displayName)),typeof E=="function"&&vt.set(E,pt),pt}while(ke>=1&&Oe>=0);break}}}finally{Pe=!1,ae.current=fe,Te(),Error.prepareStackTrace=le}var Vr=E?E.displayName||E.name:"",Sr=Vr?_e(Vr):"";return typeof E=="function"&&vt.set(E,Sr),Sr}function me(E,D,H){return oe(E,!1)}function $e(E){var D=E.prototype;return!!(D&&D.isReactComponent)}function zt(E,D,H){if(E==null)return"";if(typeof E=="function")return oe(E,$e(E));if(typeof E=="string")return _e(E);switch(E){case u:return _e("Suspense");case c:return _e("SuspenseList")}if(typeof E=="object")switch(E.$$typeof){case l:return me(E.render);case f:return zt(E.type,D,H);case h:{var Q=E,le=Q._payload,fe=Q._init;try{return zt(fe(le),D,H)}catch{}}}return""}var Ht=Object.prototype.hasOwnProperty,wr={},T=b.ReactDebugCurrentFrame;function O(E){if(E){var D=E._owner,H=zt(E.type,E._source,D?D.type:null);T.setExtraStackFrame(H)}else T.setExtraStackFrame(null)}function $(E,D,H,Q,le){{var fe=Function.call.bind(Ht);for(var ie in E)if(fe(E,ie)){var ne=void 0;try{if(typeof E[ie]!="function"){var Ge=Error((Q||"React class")+": "+H+" type `"+ie+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof E[ie]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ge.name="Invariant Violation",Ge}ne=E[ie](D,ie,Q,H,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ke){ne=ke}ne&&!(ne instanceof Error)&&(O(le),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Q||"React class",H,ie,typeof ne),O(null)),ne instanceof Error&&!(ne.message in wr)&&(wr[ne.message]=!0,O(le),v("Failed %s type: %s",H,ne.message),O(null))}}}var B=Array.isArray;function V(E){return B(E)}function M(E){{var D=typeof Symbol=="function"&&Symbol.toStringTag,H=D&&E[Symbol.toStringTag]||E.constructor.name||"Object";return H}}function Y(E){try{return X(E),!1}catch{return!0}}function X(E){return""+E}function ge(E){if(Y(E))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",M(E)),X(E)}var pe=b.ReactCurrentOwner,wt={key:!0,ref:!0,__self:!0,__source:!0},Rr,er,qt;qt={};function On(E){if(Ht.call(E,"ref")){var D=Object.getOwnPropertyDescriptor(E,"ref").get;if(D&&D.isReactWarning)return!1}return E.ref!==void 0}function Er(E){if(Ht.call(E,"key")){var D=Object.getOwnPropertyDescriptor(E,"key").get;if(D&&D.isReactWarning)return!1}return E.key!==void 0}function Fn(E,D){if(typeof E.ref=="string"&&pe.current&&D&&pe.current.stateNode!==D){var H=R(pe.current.type);qt[H]||(v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',R(pe.current.type),E.ref),qt[H]=!0)}}function ye(E,D){{var H=function(){Rr||(Rr=!0,v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",D))};H.isReactWarning=!0,Object.defineProperty(E,"key",{get:H,configurable:!0})}}function qe(E,D){{var H=function(){er||(er=!0,v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",D))};H.isReactWarning=!0,Object.defineProperty(E,"ref",{get:H,configurable:!0})}}var Re=function(E,D,H,Q,le,fe,ie){var ne={$$typeof:t,type:E,key:D,ref:H,props:ie,_owner:fe};return ne._store={},Object.defineProperty(ne._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ne,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Q}),Object.defineProperty(ne,"_source",{configurable:!1,enumerable:!1,writable:!1,value:le}),Object.freeze&&(Object.freeze(ne.props),Object.freeze(ne)),ne};function We(E,D,H,Q,le){{var fe,ie={},ne=null,Ge=null;H!==void 0&&(ge(H),ne=""+H),Er(D)&&(ge(D.key),ne=""+D.key),On(D)&&(Ge=D.ref,Fn(D,le));for(fe in D)Ht.call(D,fe)&&!wt.hasOwnProperty(fe)&&(ie[fe]=D[fe]);if(E&&E.defaultProps){var ke=E.defaultProps;for(fe in ke)ie[fe]===void 0&&(ie[fe]=ke[fe])}if(ne||Ge){var Oe=typeof E=="function"?E.displayName||E.name||"Unknown":E;ne&&ye(ie,Oe),Ge&&qe(ie,Oe)}return Re(E,ne,Ge,le,Q,pe.current,ie)}}var Ve=b.ReactCurrentOwner,Xe=b.ReactDebugCurrentFrame;function Et(E){if(E){var D=E._owner,H=zt(E.type,E._source,D?D.type:null);Xe.setExtraStackFrame(H)}else Xe.setExtraStackFrame(null)}var An;An=!1;function Tr(E){return typeof E=="object"&&E!==null&&E.$$typeof===t}function _r(){{if(Ve.current){var E=R(Ve.current.type);if(E)return`
22
+ `+ne[ke].replace(" at new "," at ");return E.displayName&&pt.includes("<anonymous>")&&(pt=pt.replace("<anonymous>",E.displayName)),typeof E=="function"&&vt.set(E,pt),pt}while(ke>=1&&Oe>=0);break}}}finally{Le=!1,ae.current=fe,Te(),Error.prepareStackTrace=le}var Vr=E?E.displayName||E.name:"",Sr=Vr?_e(Vr):"";return typeof E=="function"&&vt.set(E,Sr),Sr}function me(E,D,H){return oe(E,!1)}function $e(E){var D=E.prototype;return!!(D&&D.isReactComponent)}function zt(E,D,H){if(E==null)return"";if(typeof E=="function")return oe(E,$e(E));if(typeof E=="string")return _e(E);switch(E){case u:return _e("Suspense");case c:return _e("SuspenseList")}if(typeof E=="object")switch(E.$$typeof){case l:return me(E.render);case f:return zt(E.type,D,H);case h:{var Q=E,le=Q._payload,fe=Q._init;try{return zt(fe(le),D,H)}catch{}}}return""}var Ht=Object.prototype.hasOwnProperty,wr={},T=b.ReactDebugCurrentFrame;function O(E){if(E){var D=E._owner,H=zt(E.type,E._source,D?D.type:null);T.setExtraStackFrame(H)}else T.setExtraStackFrame(null)}function $(E,D,H,Q,le){{var fe=Function.call.bind(Ht);for(var ie in E)if(fe(E,ie)){var ne=void 0;try{if(typeof E[ie]!="function"){var Ge=Error((Q||"React class")+": "+H+" type `"+ie+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof E[ie]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ge.name="Invariant Violation",Ge}ne=E[ie](D,ie,Q,H,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ke){ne=ke}ne&&!(ne instanceof Error)&&(O(le),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Q||"React class",H,ie,typeof ne),O(null)),ne instanceof Error&&!(ne.message in wr)&&(wr[ne.message]=!0,O(le),v("Failed %s type: %s",H,ne.message),O(null))}}}var B=Array.isArray;function V(E){return B(E)}function M(E){{var D=typeof Symbol=="function"&&Symbol.toStringTag,H=D&&E[Symbol.toStringTag]||E.constructor.name||"Object";return H}}function Y(E){try{return X(E),!1}catch{return!0}}function X(E){return""+E}function ge(E){if(Y(E))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",M(E)),X(E)}var pe=b.ReactCurrentOwner,wt={key:!0,ref:!0,__self:!0,__source:!0},Rr,er,qt;qt={};function On(E){if(Ht.call(E,"ref")){var D=Object.getOwnPropertyDescriptor(E,"ref").get;if(D&&D.isReactWarning)return!1}return E.ref!==void 0}function Er(E){if(Ht.call(E,"key")){var D=Object.getOwnPropertyDescriptor(E,"key").get;if(D&&D.isReactWarning)return!1}return E.key!==void 0}function Fn(E,D){if(typeof E.ref=="string"&&pe.current&&D&&pe.current.stateNode!==D){var H=R(pe.current.type);qt[H]||(v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',R(pe.current.type),E.ref),qt[H]=!0)}}function ye(E,D){{var H=function(){Rr||(Rr=!0,v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",D))};H.isReactWarning=!0,Object.defineProperty(E,"key",{get:H,configurable:!0})}}function qe(E,D){{var H=function(){er||(er=!0,v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",D))};H.isReactWarning=!0,Object.defineProperty(E,"ref",{get:H,configurable:!0})}}var Re=function(E,D,H,Q,le,fe,ie){var ne={$$typeof:t,type:E,key:D,ref:H,props:ie,_owner:fe};return ne._store={},Object.defineProperty(ne._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ne,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Q}),Object.defineProperty(ne,"_source",{configurable:!1,enumerable:!1,writable:!1,value:le}),Object.freeze&&(Object.freeze(ne.props),Object.freeze(ne)),ne};function We(E,D,H,Q,le){{var fe,ie={},ne=null,Ge=null;H!==void 0&&(ge(H),ne=""+H),Er(D)&&(ge(D.key),ne=""+D.key),On(D)&&(Ge=D.ref,Fn(D,le));for(fe in D)Ht.call(D,fe)&&!wt.hasOwnProperty(fe)&&(ie[fe]=D[fe]);if(E&&E.defaultProps){var ke=E.defaultProps;for(fe in ke)ie[fe]===void 0&&(ie[fe]=ke[fe])}if(ne||Ge){var Oe=typeof E=="function"?E.displayName||E.name||"Unknown":E;ne&&ye(ie,Oe),Ge&&qe(ie,Oe)}return Re(E,ne,Ge,le,Q,pe.current,ie)}}var Ve=b.ReactCurrentOwner,Xe=b.ReactDebugCurrentFrame;function Et(E){if(E){var D=E._owner,H=zt(E.type,E._source,D?D.type:null);Xe.setExtraStackFrame(H)}else Xe.setExtraStackFrame(null)}var An;An=!1;function Tr(E){return typeof E=="object"&&E!==null&&E.$$typeof===t}function _r(){{if(Ve.current){var E=R(Ve.current.type);if(E)return`
23
23
 
24
24
  Check the render method of \``+E+"`."}return""}}function Ws(E){return""}var vf={};function Yv(E){{var D=_r();if(!D){var H=typeof E=="string"?E:E.displayName||E.name;H&&(D=`
25
25
 
26
- Check the top-level render call using <`+H+">.")}return D}}function wf(E,D){{if(!E._store||E._store.validated||E.key!=null)return;E._store.validated=!0;var H=Yv(D);if(vf[H])return;vf[H]=!0;var Q="";E&&E._owner&&E._owner!==Ve.current&&(Q=" It was passed a child from "+R(E._owner.type)+"."),Et(E),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',H,Q),Et(null)}}function Ef(E,D){{if(typeof E!="object")return;if(V(E))for(var H=0;H<E.length;H++){var Q=E[H];Tr(Q)&&wf(Q,D)}else if(Tr(E))E._store&&(E._store.validated=!0);else if(E){var le=x(E);if(typeof le=="function"&&le!==E.entries)for(var fe=le.call(E),ie;!(ie=fe.next()).done;)Tr(ie.value)&&wf(ie.value,D)}}}function Jv(E){{var D=E.type;if(D==null||typeof D=="string")return;var H;if(typeof D=="function")H=D.propTypes;else if(typeof D=="object"&&(D.$$typeof===l||D.$$typeof===f))H=D.propTypes;else return;if(H){var Q=R(D);$(H,E.props,"prop",Q,E)}else if(D.PropTypes!==void 0&&!An){An=!0;var le=R(D);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",le||"Unknown")}typeof D.getDefaultProps=="function"&&!D.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Xv(E){{for(var D=Object.keys(E.props),H=0;H<D.length;H++){var Q=D[H];if(Q!=="children"&&Q!=="key"){Et(E),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Q),Et(null);break}}E.ref!==null&&(Et(E),v("Invalid attribute `ref` supplied to `React.Fragment`."),Et(null))}}var Tf={};function _f(E,D,H,Q,le,fe){{var ie=P(E);if(!ie){var ne="";(E===void 0||typeof E=="object"&&E!==null&&Object.keys(E).length===0)&&(ne+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ge=Ws();Ge?ne+=Ge:ne+=_r();var ke;E===null?ke="null":V(E)?ke="array":E!==void 0&&E.$$typeof===t?(ke="<"+(R(E.type)||"Unknown")+" />",ne=" Did you accidentally export a JSX literal instead of a component?"):ke=typeof E,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ke,ne)}var Oe=We(E,D,H,le,fe);if(Oe==null)return Oe;if(ie){var pt=D.children;if(pt!==void 0)if(Q)if(V(pt)){for(var Vr=0;Vr<pt.length;Vr++)Ef(pt[Vr],E);Object.freeze&&Object.freeze(pt)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ef(pt,E)}if(Ht.call(D,"key")){var Sr=R(E),nt=Object.keys(D).filter(function(rw){return rw!=="key"}),Ks=nt.length>0?"{key: someKey, "+nt.join(": ..., ")+": ...}":"{key: someKey}";if(!Tf[Sr+Ks]){var tw=nt.length>0?"{"+nt.join(": ..., ")+": ...}":"{}";v(`A props object containing a "key" prop is being spread into JSX:
26
+ Check the top-level render call using <`+H+">.")}return D}}function wf(E,D){{if(!E._store||E._store.validated||E.key!=null)return;E._store.validated=!0;var H=Yv(D);if(vf[H])return;vf[H]=!0;var Q="";E&&E._owner&&E._owner!==Ve.current&&(Q=" It was passed a child from "+R(E._owner.type)+"."),Et(E),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',H,Q),Et(null)}}function Ef(E,D){{if(typeof E!="object")return;if(V(E))for(var H=0;H<E.length;H++){var Q=E[H];Tr(Q)&&wf(Q,D)}else if(Tr(E))E._store&&(E._store.validated=!0);else if(E){var le=x(E);if(typeof le=="function"&&le!==E.entries)for(var fe=le.call(E),ie;!(ie=fe.next()).done;)Tr(ie.value)&&wf(ie.value,D)}}}function Jv(E){{var D=E.type;if(D==null||typeof D=="string")return;var H;if(typeof D=="function")H=D.propTypes;else if(typeof D=="object"&&(D.$$typeof===l||D.$$typeof===f))H=D.propTypes;else return;if(H){var Q=R(D);$(H,E.props,"prop",Q,E)}else if(D.PropTypes!==void 0&&!An){An=!0;var le=R(D);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",le||"Unknown")}typeof D.getDefaultProps=="function"&&!D.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Xv(E){{for(var D=Object.keys(E.props),H=0;H<D.length;H++){var Q=D[H];if(Q!=="children"&&Q!=="key"){Et(E),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Q),Et(null);break}}E.ref!==null&&(Et(E),v("Invalid attribute `ref` supplied to `React.Fragment`."),Et(null))}}var Tf={};function _f(E,D,H,Q,le,fe){{var ie=L(E);if(!ie){var ne="";(E===void 0||typeof E=="object"&&E!==null&&Object.keys(E).length===0)&&(ne+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ge=Ws();Ge?ne+=Ge:ne+=_r();var ke;E===null?ke="null":V(E)?ke="array":E!==void 0&&E.$$typeof===t?(ke="<"+(R(E.type)||"Unknown")+" />",ne=" Did you accidentally export a JSX literal instead of a component?"):ke=typeof E,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ke,ne)}var Oe=We(E,D,H,le,fe);if(Oe==null)return Oe;if(ie){var pt=D.children;if(pt!==void 0)if(Q)if(V(pt)){for(var Vr=0;Vr<pt.length;Vr++)Ef(pt[Vr],E);Object.freeze&&Object.freeze(pt)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ef(pt,E)}if(Ht.call(D,"key")){var Sr=R(E),nt=Object.keys(D).filter(function(rw){return rw!=="key"}),Ks=nt.length>0?"{key: someKey, "+nt.join(": ..., ")+": ...}":"{key: someKey}";if(!Tf[Sr+Ks]){var tw=nt.length>0?"{"+nt.join(": ..., ")+": ...}":"{}";v(`A props object containing a "key" prop is being spread into JSX:
27
27
  let props = %s;
28
28
  <%s {...props} />
29
29
  React keys must be passed directly to JSX without using spread:
30
30
  let props = %s;
31
31
  <%s key={someKey} {...props} />`,Ks,Sr,tw,Sr),Tf[Sr+Ks]=!0}}return E===n?Xv(Oe):Jv(Oe),Oe}}function Gv(E,D,H){return _f(E,D,H,!0)}function Qv(E,D,H){return _f(E,D,H,!1)}var Zv=Qv,ew=Gv;Ur.Fragment=n,Ur.jsx=Zv,Ur.jsxs=ew}()),Ur}var Qs;function Of(){return Qs||(Qs=1,process.env.NODE_ENV==="production"?$n.exports=kf():$n.exports=Cf()),$n.exports}var y=Of();function Zs(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Zs(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function ut(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Zs(e))&&(n&&(n+=" "),n+=t);return n}function Ff(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.firstChild?t.insertBefore(r,t.firstChild):t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}Ff(`:root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
32
- `);var zr=e=>typeof e=="number"&&!isNaN(e),tr=e=>typeof e=="string",Lt=e=>typeof e=="function",Af=e=>tr(e)||zr(e),Bo=e=>tr(e)||Lt(e)?e:null,jf=(e,t)=>e===!1||zr(e)&&e>0?e:t,Uo=e=>m.isValidElement(e)||tr(e)||Lt(e)||zr(e);function $f(e,t,r=300){let{scrollHeight:n,style:o}=e;requestAnimationFrame(()=>{o.minHeight="initial",o.height=n+"px",o.transition=`all ${r}ms`,requestAnimationFrame(()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(t,r)})})}function Nf({enter:e,exit:t,appendPosition:r=!1,collapse:n=!0,collapseDuration:o=300}){return function({children:i,position:s,preventExitTransition:a,done:l,nodeRef:u,isIn:c,playToast:f}){let h=r?`${e}--${s}`:e,p=r?`${t}--${s}`:t,d=m.useRef(0);return m.useLayoutEffect(()=>{let g=u.current,x=h.split(" "),b=v=>{v.target===u.current&&(f(),g.removeEventListener("animationend",b),g.removeEventListener("animationcancel",b),d.current===0&&v.type!=="animationcancel"&&g.classList.remove(...x))};g.classList.add(...x),g.addEventListener("animationend",b),g.addEventListener("animationcancel",b)},[]),m.useEffect(()=>{let g=u.current,x=()=>{g.removeEventListener("animationend",x),n?$f(g,l,o):l()};c||(a?x():(d.current=1,g.className+=` ${p}`,g.addEventListener("animationend",x)))},[c]),m.createElement(m.Fragment,null,i)}}function ea(e,t){return{content:ta(e.content,e.props),containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,reason:e.removalReason,status:t}}function ta(e,t,r=!1){return m.isValidElement(e)&&!tr(e.type)?m.cloneElement(e,{closeToast:t.closeToast,toastProps:t,data:t.data,isPaused:r}):Lt(e)?e({closeToast:t.closeToast,toastProps:t,data:t.data,isPaused:r}):e}function Lf({closeToast:e,theme:t,ariaLabel:r="close"}){return m.createElement("button",{className:`Toastify__close-button Toastify__close-button--${t}`,type:"button",onClick:n=>{n.stopPropagation(),e(!0)},"aria-label":r},m.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},m.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function Pf({delay:e,isRunning:t,closeToast:r,type:n="default",hide:o,className:i,controlledProgress:s,progress:a,rtl:l,isIn:u,theme:c}){let f=o||s&&a===0,h={animationDuration:`${e}ms`,animationPlayState:t?"running":"paused"};s&&(h.transform=`scaleX(${a})`);let p=ut("Toastify__progress-bar",s?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${c}`,`Toastify__progress-bar--${n}`,{"Toastify__progress-bar--rtl":l}),d=Lt(i)?i({rtl:l,type:n,defaultClassName:p}):ut(p,i),g={[s&&a>=1?"onTransitionEnd":"onAnimationEnd"]:s&&a<1?null:()=>{u&&r()}};return m.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":f},m.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${c} Toastify__progress-bar--${n}`}),m.createElement("div",{role:"progressbar","aria-hidden":f?"true":"false","aria-label":"notification timer",className:d,style:h,...g}))}var Df=1,ra=()=>`${Df++}`;function If(e,t,r){let n=1,o=0,i=[],s=[],a=t,l=new Map,u=new Set,c=v=>(u.add(v),()=>u.delete(v)),f=()=>{s=Array.from(l.values()),u.forEach(v=>v())},h=({containerId:v,toastId:w,updateId:_})=>{let k=v?v!==e:e!==1,S=l.has(w)&&_==null;return k||S},p=(v,w)=>{l.forEach(_=>{var k;(w==null||w===_.props.toastId)&&((k=_.toggle)==null||k.call(_,v))})},d=v=>{var w,_;(_=(w=v.props)==null?void 0:w.onClose)==null||_.call(w,v.removalReason),v.isActive=!1},g=v=>{if(v==null)l.forEach(d);else{let w=l.get(v);w&&d(w)}f()},x=()=>{o-=i.length,i=[]},b=v=>{var w,_;let{toastId:k,updateId:S}=v.props,C=S==null;v.staleId&&l.delete(v.staleId),v.isActive=!0,l.set(k,v),f(),r(ea(v,C?"added":"updated")),C&&((_=(w=v.props).onOpen)==null||_.call(w))};return{id:e,props:a,observe:c,toggle:p,removeToast:g,toasts:l,clearQueue:x,buildToast:(v,w)=>{if(h(w))return;let{toastId:_,updateId:k,data:S,staleId:C,delay:A}=w,N=k==null;N&&o++;let P={...a,style:a.toastStyle,key:n++,...Object.fromEntries(Object.entries(w).filter(([I,R])=>R!=null)),toastId:_,updateId:k,data:S,isIn:!1,className:Bo(w.className||a.toastClassName),progressClassName:Bo(w.progressClassName||a.progressClassName),autoClose:w.isLoading?!1:jf(w.autoClose,a.autoClose),closeToast(I){l.get(_).removalReason=I,g(_)},deleteToast(){let I=l.get(_);if(I!=null){if(r(ea(I,"removed")),l.delete(_),o--,o<0&&(o=0),i.length>0){b(i.shift());return}f()}}};P.closeButton=a.closeButton,w.closeButton===!1||Uo(w.closeButton)?P.closeButton=w.closeButton:w.closeButton===!0&&(P.closeButton=Uo(a.closeButton)?a.closeButton:!0);let L={content:v,props:P,staleId:C};a.limit&&a.limit>0&&o>a.limit&&N?i.push(L):zr(A)?setTimeout(()=>{b(L)},A):b(L)},setProps(v){a=v},setToggle:(v,w)=>{let _=l.get(v);_&&(_.toggle=w)},isToastActive:v=>{var w;return(w=l.get(v))==null?void 0:w.isActive},getSnapshot:()=>s}}var Ke=new Map,Hr=[],zo=new Set,Mf=e=>zo.forEach(t=>t(e)),na=()=>Ke.size>0;function Rf(){Hr.forEach(e=>ia(e.content,e.options)),Hr=[]}var Vf=(e,{containerId:t})=>{var r;return(r=Ke.get(t||1))==null?void 0:r.toasts.get(e)};function oa(e,t){var r;if(t)return!!((r=Ke.get(t))!=null&&r.isToastActive(e));let n=!1;return Ke.forEach(o=>{o.isToastActive(e)&&(n=!0)}),n}function Bf(e){if(!na()){Hr=Hr.filter(t=>e!=null&&t.options.toastId!==e);return}if(e==null||Af(e))Ke.forEach(t=>{t.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){let t=Ke.get(e.containerId);t?t.removeToast(e.id):Ke.forEach(r=>{r.removeToast(e.id)})}}var Uf=(e={})=>{Ke.forEach(t=>{t.props.limit&&(!e.containerId||t.id===e.containerId)&&t.clearQueue()})};function ia(e,t){Uo(e)&&(na()||Hr.push({content:e,options:t}),Ke.forEach(r=>{r.buildToast(e,t)}))}function zf(e){var t;(t=Ke.get(e.containerId||1))==null||t.setToggle(e.id,e.fn)}function sa(e,t){Ke.forEach(r=>{(t==null||!(t!=null&&t.containerId)||(t==null?void 0:t.containerId)===r.id)&&r.toggle(e,t==null?void 0:t.id)})}function Hf(e){let t=e.containerId||1;return{subscribe(r){let n=If(t,e,Mf);Ke.set(t,n);let o=n.observe(r);return Rf(),()=>{o(),Ke.delete(t)}},setProps(r){var n;(n=Ke.get(t))==null||n.setProps(r)},getSnapshot(){var r;return(r=Ke.get(t))==null?void 0:r.getSnapshot()}}}function qf(e){return zo.add(e),()=>{zo.delete(e)}}function Wf(e){return e&&(tr(e.toastId)||zr(e.toastId))?e.toastId:ra()}function qr(e,t){return ia(e,t),t.toastId}function Nn(e,t){return{...t,type:t&&t.type||e,toastId:Wf(t)}}function Ln(e){return(t,r)=>qr(t,Nn(e,r))}function ue(e,t){return qr(e,Nn("default",t))}ue.loading=(e,t)=>qr(e,Nn("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t}));function Kf(e,{pending:t,error:r,success:n},o){let i;t&&(i=tr(t)?ue.loading(t,o):ue.loading(t.render,{...o,...t}));let s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},a=(u,c,f)=>{if(c==null){ue.dismiss(i);return}let h={type:u,...s,...o,data:f},p=tr(c)?{render:c}:c;return i?ue.update(i,{...h,...p}):ue(p.render,{...h,...p}),f},l=Lt(e)?e():e;return l.then(u=>a("success",n,u)).catch(u=>a("error",r,u)),l}ue.promise=Kf,ue.success=Ln("success"),ue.info=Ln("info"),ue.error=Ln("error"),ue.warning=Ln("warning"),ue.warn=ue.warning,ue.dark=(e,t)=>qr(e,Nn("default",{theme:"dark",...t}));function Yf(e){Bf(e)}ue.dismiss=Yf,ue.clearWaitingQueue=Uf,ue.isActive=oa,ue.update=(e,t={})=>{let r=Vf(e,t);if(r){let{props:n,content:o}=r,i={delay:100,...n,...t,toastId:t.toastId||e,updateId:ra()};i.toastId!==e&&(i.staleId=e);let s=i.render||o;delete i.render,qr(s,i)}},ue.done=e=>{ue.update(e,{progress:1})},ue.onChange=qf,ue.play=e=>sa(!0,e),ue.pause=e=>sa(!1,e);function Jf(e){var t;let{subscribe:r,getSnapshot:n,setProps:o}=m.useRef(Hf(e)).current;o(e);let i=(t=m.useSyncExternalStore(r,n,n))==null?void 0:t.slice();function s(a){if(!i)return[];let l=new Map;return e.newestOnTop&&i.reverse(),i.forEach(u=>{let{position:c}=u.props;l.has(c)||l.set(c,[]),l.get(c).push(u)}),Array.from(l,u=>a(u[0],u[1]))}return{getToastToRender:s,isToastActive:oa,count:i==null?void 0:i.length}}function Xf(e){let[t,r]=m.useState(!1),[n,o]=m.useState(!1),i=m.useRef(null),s=m.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:a,pauseOnHover:l,closeToast:u,onClick:c,closeOnClick:f}=e;zf({id:e.toastId,containerId:e.containerId,fn:r}),m.useEffect(()=>{if(e.pauseOnFocusLoss)return h(),()=>{p()}},[e.pauseOnFocusLoss]);function h(){document.hasFocus()||b(),window.addEventListener("focus",x),window.addEventListener("blur",b)}function p(){window.removeEventListener("focus",x),window.removeEventListener("blur",b)}function d(C){if(e.draggable===!0||e.draggable===C.pointerType){v();let A=i.current;s.canCloseOnClick=!0,s.canDrag=!0,A.style.transition="none",e.draggableDirection==="x"?(s.start=C.clientX,s.removalDistance=A.offsetWidth*(e.draggablePercent/100)):(s.start=C.clientY,s.removalDistance=A.offsetHeight*(e.draggablePercent===80?e.draggablePercent*1.5:e.draggablePercent)/100)}}function g(C){let{top:A,bottom:N,left:P,right:L}=i.current.getBoundingClientRect();C.nativeEvent.type!=="touchend"&&e.pauseOnHover&&C.clientX>=P&&C.clientX<=L&&C.clientY>=A&&C.clientY<=N?b():x()}function x(){r(!0)}function b(){r(!1)}function v(){s.didMove=!1,document.addEventListener("pointermove",_),document.addEventListener("pointerup",k)}function w(){document.removeEventListener("pointermove",_),document.removeEventListener("pointerup",k)}function _(C){let A=i.current;if(s.canDrag&&A){s.didMove=!0,t&&b(),e.draggableDirection==="x"?s.delta=C.clientX-s.start:s.delta=C.clientY-s.start,s.start!==C.clientX&&(s.canCloseOnClick=!1);let N=e.draggableDirection==="x"?`${s.delta}px, var(--y)`:`0, calc(${s.delta}px + var(--y))`;A.style.transform=`translate3d(${N},0)`,A.style.opacity=`${1-Math.abs(s.delta/s.removalDistance)}`}}function k(){w();let C=i.current;if(s.canDrag&&s.didMove&&C){if(s.canDrag=!1,Math.abs(s.delta)>s.removalDistance){o(!0),e.closeToast(!0),e.collapseAll();return}C.style.transition="transform 0.2s, opacity 0.2s",C.style.removeProperty("transform"),C.style.removeProperty("opacity")}}let S={onPointerDown:d,onPointerUp:g};return a&&l&&(S.onMouseEnter=b,e.stacked||(S.onMouseLeave=x)),f&&(S.onClick=C=>{c&&c(C),s.canCloseOnClick&&u(!0)}),{playToast:x,pauseToast:b,isRunning:t,preventExitTransition:n,toastRef:i,eventHandlers:S}}var Gf=typeof window<"u"?m.useLayoutEffect:m.useEffect,Pn=({theme:e,type:t,isLoading:r,...n})=>m.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:e==="colored"?"currentColor":`var(--toastify-icon-color-${t})`,...n});function Qf(e){return m.createElement(Pn,{...e},m.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))}function Zf(e){return m.createElement(Pn,{...e},m.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))}function ed(e){return m.createElement(Pn,{...e},m.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))}function td(e){return m.createElement(Pn,{...e},m.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))}function rd(){return m.createElement("div",{className:"Toastify__spinner"})}var Ho={info:Zf,warning:Qf,success:ed,error:td,spinner:rd},nd=e=>e in Ho;function od({theme:e,type:t,isLoading:r,icon:n}){let o=null,i={theme:e,type:t};return n===!1||(Lt(n)?o=n({...i,isLoading:r}):m.isValidElement(n)?o=m.cloneElement(n,i):r?o=Ho.spinner():nd(t)&&(o=Ho[t](i))),o}var id=e=>{let{isRunning:t,preventExitTransition:r,toastRef:n,eventHandlers:o,playToast:i}=Xf(e),{closeButton:s,children:a,autoClose:l,onClick:u,type:c,hideProgressBar:f,closeToast:h,transition:p,position:d,className:g,style:x,progressClassName:b,updateId:v,role:w,progress:_,rtl:k,toastId:S,deleteToast:C,isIn:A,isLoading:N,closeOnClick:P,theme:L,ariaLabel:I}=e,R=ut("Toastify__toast",`Toastify__toast-theme--${L}`,`Toastify__toast--${c}`,{"Toastify__toast--rtl":k},{"Toastify__toast--close-on-click":P}),q=Lt(g)?g({rtl:k,position:d,type:c,defaultClassName:R}):ut(R,g),J=od(e),z=!!_||!l,G={closeToast:h,type:c,theme:L},K=null;return s===!1||(Lt(s)?K=s(G):m.isValidElement(s)?K=m.cloneElement(s,G):K=Lf(G)),m.createElement(p,{isIn:A,done:C,position:d,preventExitTransition:r,nodeRef:n,playToast:i},m.createElement("div",{id:S,tabIndex:0,onClick:u,"data-in":A,className:q,...o,style:x,ref:n,...A&&{role:w,"aria-label":I}},J!=null&&m.createElement("div",{className:ut("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!N})},J),ta(a,e,!t),K,!e.customProgressBar&&m.createElement(Pf,{...v&&!z?{key:`p-${v}`}:{},rtl:k,theme:L,delay:l,isRunning:t,isIn:A,closeToast:h,hide:f,type:c,className:b,controlledProgress:z,progress:_||0})))},sd=(e,t=!1)=>({enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}),ad=Nf(sd("bounce",!0)),ld={position:"top-right",transition:ad,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light","aria-label":"Notifications Alt+T",hotKeys:e=>e.altKey&&e.code==="KeyT"};function ud(e){let t={...ld,...e},r=e.stacked,[n,o]=m.useState(!0),i=m.useRef(null),{getToastToRender:s,isToastActive:a,count:l}=Jf(t),{className:u,style:c,rtl:f,containerId:h,hotKeys:p}=t;function d(x){let b=ut("Toastify__toast-container",`Toastify__toast-container--${x}`,{"Toastify__toast-container--rtl":f});return Lt(u)?u({position:x,rtl:f,defaultClassName:b}):ut(b,Bo(u))}function g(){r&&(o(!0),ue.play())}return Gf(()=>{var x;if(r){let b=i.current.querySelectorAll('[data-in="true"]'),v=12,w=(x=t.position)==null?void 0:x.includes("top"),_=0,k=0;Array.from(b).reverse().forEach((S,C)=>{let A=S;A.classList.add("Toastify__toast--stacked"),C>0&&(A.dataset.collapsed=`${n}`),A.dataset.pos||(A.dataset.pos=w?"top":"bot");let N=_*(n?.2:1)+(n?0:v*C);A.style.setProperty("--y",`${w?N:N*-1}px`),A.style.setProperty("--g",`${v}`),A.style.setProperty("--s",`${1-(n?k:0)}`),_+=A.offsetHeight,k+=.025})}},[n,l,r]),m.useEffect(()=>{function x(b){var v;let w=i.current;p(b)&&((v=w.querySelector('[tabIndex="0"]'))==null||v.focus(),o(!1),ue.pause()),b.key==="Escape"&&(document.activeElement===w||w!=null&&w.contains(document.activeElement))&&(o(!0),ue.play())}return document.addEventListener("keydown",x),()=>{document.removeEventListener("keydown",x)}},[p]),m.createElement("section",{ref:i,className:"Toastify",id:h,onMouseEnter:()=>{r&&(o(!1),ue.pause())},onMouseLeave:g,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text","aria-label":t["aria-label"]},s((x,b)=>{let v=b.length?{...c}:{...c,pointerEvents:"none"};return m.createElement("div",{tabIndex:-1,className:d(x),"data-stacked":r,style:v,key:`c-${x}`},b.map(({content:w,props:_})=>m.createElement(id,{..._,stacked:r,collapseAll:g,isIn:a(_.toastId,_.containerId),key:`t-${_.key}`},w)))}))}var Wr={},aa;function cd(){if(aa)return Wr;aa=1,Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.parse=s,Wr.serialize=u;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,r=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,n=/^[\u0020-\u003A\u003D-\u007E]*$/,o=Object.prototype.toString,i=(()=>{const h=function(){};return h.prototype=Object.create(null),h})();function s(h,p){const d=new i,g=h.length;if(g<2)return d;const x=(p==null?void 0:p.decode)||c;let b=0;do{const v=h.indexOf("=",b);if(v===-1)break;const w=h.indexOf(";",b),_=w===-1?g:w;if(v>_){b=h.lastIndexOf(";",v-1)+1;continue}const k=a(h,b,v),S=l(h,v,k),C=h.slice(k,S);if(d[C]===void 0){let A=a(h,v+1,_),N=l(h,_,A);const P=x(h.slice(A,N));d[C]=P}b=_+1}while(b<g);return d}function a(h,p,d){do{const g=h.charCodeAt(p);if(g!==32&&g!==9)return p}while(++p<d);return d}function l(h,p,d){for(;p>d;){const g=h.charCodeAt(--p);if(g!==32&&g!==9)return p+1}return d}function u(h,p,d){const g=(d==null?void 0:d.encode)||encodeURIComponent;if(!e.test(h))throw new TypeError(`argument name is invalid: ${h}`);const x=g(p);if(!t.test(x))throw new TypeError(`argument val is invalid: ${p}`);let b=h+"="+x;if(!d)return b;if(d.maxAge!==void 0){if(!Number.isInteger(d.maxAge))throw new TypeError(`option maxAge is invalid: ${d.maxAge}`);b+="; Max-Age="+d.maxAge}if(d.domain){if(!r.test(d.domain))throw new TypeError(`option domain is invalid: ${d.domain}`);b+="; Domain="+d.domain}if(d.path){if(!n.test(d.path))throw new TypeError(`option path is invalid: ${d.path}`);b+="; Path="+d.path}if(d.expires){if(!f(d.expires)||!Number.isFinite(d.expires.valueOf()))throw new TypeError(`option expires is invalid: ${d.expires}`);b+="; Expires="+d.expires.toUTCString()}if(d.httpOnly&&(b+="; HttpOnly"),d.secure&&(b+="; Secure"),d.partitioned&&(b+="; Partitioned"),d.priority)switch(typeof d.priority=="string"?d.priority.toLowerCase():void 0){case"low":b+="; Priority=Low";break;case"medium":b+="; Priority=Medium";break;case"high":b+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${d.priority}`)}if(d.sameSite)switch(typeof d.sameSite=="string"?d.sameSite.toLowerCase():d.sameSite){case!0:case"strict":b+="; SameSite=Strict";break;case"lax":b+="; SameSite=Lax";break;case"none":b+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${d.sameSite}`)}return b}function c(h){if(h.indexOf("%")===-1)return h;try{return decodeURIComponent(h)}catch{return h}}function f(h){return o.call(h)==="[object Date]"}return Wr}cd();/**
32
+ `);var zr=e=>typeof e=="number"&&!isNaN(e),tr=e=>typeof e=="string",Pt=e=>typeof e=="function",Af=e=>tr(e)||zr(e),Uo=e=>tr(e)||Pt(e)?e:null,jf=(e,t)=>e===!1||zr(e)&&e>0?e:t,zo=e=>m.isValidElement(e)||tr(e)||Pt(e)||zr(e);function $f(e,t,r=300){let{scrollHeight:n,style:o}=e;requestAnimationFrame(()=>{o.minHeight="initial",o.height=n+"px",o.transition=`all ${r}ms`,requestAnimationFrame(()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(t,r)})})}function Nf({enter:e,exit:t,appendPosition:r=!1,collapse:n=!0,collapseDuration:o=300}){return function({children:i,position:s,preventExitTransition:a,done:l,nodeRef:u,isIn:c,playToast:f}){let h=r?`${e}--${s}`:e,p=r?`${t}--${s}`:t,d=m.useRef(0);return m.useLayoutEffect(()=>{let g=u.current,x=h.split(" "),b=v=>{v.target===u.current&&(f(),g.removeEventListener("animationend",b),g.removeEventListener("animationcancel",b),d.current===0&&v.type!=="animationcancel"&&g.classList.remove(...x))};g.classList.add(...x),g.addEventListener("animationend",b),g.addEventListener("animationcancel",b)},[]),m.useEffect(()=>{let g=u.current,x=()=>{g.removeEventListener("animationend",x),n?$f(g,l,o):l()};c||(a?x():(d.current=1,g.className+=` ${p}`,g.addEventListener("animationend",x)))},[c]),m.createElement(m.Fragment,null,i)}}function ea(e,t){return{content:ta(e.content,e.props),containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,reason:e.removalReason,status:t}}function ta(e,t,r=!1){return m.isValidElement(e)&&!tr(e.type)?m.cloneElement(e,{closeToast:t.closeToast,toastProps:t,data:t.data,isPaused:r}):Pt(e)?e({closeToast:t.closeToast,toastProps:t,data:t.data,isPaused:r}):e}function Pf({closeToast:e,theme:t,ariaLabel:r="close"}){return m.createElement("button",{className:`Toastify__close-button Toastify__close-button--${t}`,type:"button",onClick:n=>{n.stopPropagation(),e(!0)},"aria-label":r},m.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},m.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function Lf({delay:e,isRunning:t,closeToast:r,type:n="default",hide:o,className:i,controlledProgress:s,progress:a,rtl:l,isIn:u,theme:c}){let f=o||s&&a===0,h={animationDuration:`${e}ms`,animationPlayState:t?"running":"paused"};s&&(h.transform=`scaleX(${a})`);let p=ut("Toastify__progress-bar",s?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${c}`,`Toastify__progress-bar--${n}`,{"Toastify__progress-bar--rtl":l}),d=Pt(i)?i({rtl:l,type:n,defaultClassName:p}):ut(p,i),g={[s&&a>=1?"onTransitionEnd":"onAnimationEnd"]:s&&a<1?null:()=>{u&&r()}};return m.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":f},m.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${c} Toastify__progress-bar--${n}`}),m.createElement("div",{role:"progressbar","aria-hidden":f?"true":"false","aria-label":"notification timer",className:d,style:h,...g}))}var Df=1,ra=()=>`${Df++}`;function If(e,t,r){let n=1,o=0,i=[],s=[],a=t,l=new Map,u=new Set,c=v=>(u.add(v),()=>u.delete(v)),f=()=>{s=Array.from(l.values()),u.forEach(v=>v())},h=({containerId:v,toastId:w,updateId:_})=>{let k=v?v!==e:e!==1,S=l.has(w)&&_==null;return k||S},p=(v,w)=>{l.forEach(_=>{var k;(w==null||w===_.props.toastId)&&((k=_.toggle)==null||k.call(_,v))})},d=v=>{var w,_;(_=(w=v.props)==null?void 0:w.onClose)==null||_.call(w,v.removalReason),v.isActive=!1},g=v=>{if(v==null)l.forEach(d);else{let w=l.get(v);w&&d(w)}f()},x=()=>{o-=i.length,i=[]},b=v=>{var w,_;let{toastId:k,updateId:S}=v.props,C=S==null;v.staleId&&l.delete(v.staleId),v.isActive=!0,l.set(k,v),f(),r(ea(v,C?"added":"updated")),C&&((_=(w=v.props).onOpen)==null||_.call(w))};return{id:e,props:a,observe:c,toggle:p,removeToast:g,toasts:l,clearQueue:x,buildToast:(v,w)=>{if(h(w))return;let{toastId:_,updateId:k,data:S,staleId:C,delay:A}=w,N=k==null;N&&o++;let L={...a,style:a.toastStyle,key:n++,...Object.fromEntries(Object.entries(w).filter(([I,R])=>R!=null)),toastId:_,updateId:k,data:S,isIn:!1,className:Uo(w.className||a.toastClassName),progressClassName:Uo(w.progressClassName||a.progressClassName),autoClose:w.isLoading?!1:jf(w.autoClose,a.autoClose),closeToast(I){l.get(_).removalReason=I,g(_)},deleteToast(){let I=l.get(_);if(I!=null){if(r(ea(I,"removed")),l.delete(_),o--,o<0&&(o=0),i.length>0){b(i.shift());return}f()}}};L.closeButton=a.closeButton,w.closeButton===!1||zo(w.closeButton)?L.closeButton=w.closeButton:w.closeButton===!0&&(L.closeButton=zo(a.closeButton)?a.closeButton:!0);let P={content:v,props:L,staleId:C};a.limit&&a.limit>0&&o>a.limit&&N?i.push(P):zr(A)?setTimeout(()=>{b(P)},A):b(P)},setProps(v){a=v},setToggle:(v,w)=>{let _=l.get(v);_&&(_.toggle=w)},isToastActive:v=>{var w;return(w=l.get(v))==null?void 0:w.isActive},getSnapshot:()=>s}}var Ke=new Map,Hr=[],Ho=new Set,Mf=e=>Ho.forEach(t=>t(e)),na=()=>Ke.size>0;function Rf(){Hr.forEach(e=>ia(e.content,e.options)),Hr=[]}var Vf=(e,{containerId:t})=>{var r;return(r=Ke.get(t||1))==null?void 0:r.toasts.get(e)};function oa(e,t){var r;if(t)return!!((r=Ke.get(t))!=null&&r.isToastActive(e));let n=!1;return Ke.forEach(o=>{o.isToastActive(e)&&(n=!0)}),n}function Bf(e){if(!na()){Hr=Hr.filter(t=>e!=null&&t.options.toastId!==e);return}if(e==null||Af(e))Ke.forEach(t=>{t.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){let t=Ke.get(e.containerId);t?t.removeToast(e.id):Ke.forEach(r=>{r.removeToast(e.id)})}}var Uf=(e={})=>{Ke.forEach(t=>{t.props.limit&&(!e.containerId||t.id===e.containerId)&&t.clearQueue()})};function ia(e,t){zo(e)&&(na()||Hr.push({content:e,options:t}),Ke.forEach(r=>{r.buildToast(e,t)}))}function zf(e){var t;(t=Ke.get(e.containerId||1))==null||t.setToggle(e.id,e.fn)}function sa(e,t){Ke.forEach(r=>{(t==null||!(t!=null&&t.containerId)||(t==null?void 0:t.containerId)===r.id)&&r.toggle(e,t==null?void 0:t.id)})}function Hf(e){let t=e.containerId||1;return{subscribe(r){let n=If(t,e,Mf);Ke.set(t,n);let o=n.observe(r);return Rf(),()=>{o(),Ke.delete(t)}},setProps(r){var n;(n=Ke.get(t))==null||n.setProps(r)},getSnapshot(){var r;return(r=Ke.get(t))==null?void 0:r.getSnapshot()}}}function qf(e){return Ho.add(e),()=>{Ho.delete(e)}}function Wf(e){return e&&(tr(e.toastId)||zr(e.toastId))?e.toastId:ra()}function qr(e,t){return ia(e,t),t.toastId}function Nn(e,t){return{...t,type:t&&t.type||e,toastId:Wf(t)}}function Pn(e){return(t,r)=>qr(t,Nn(e,r))}function ue(e,t){return qr(e,Nn("default",t))}ue.loading=(e,t)=>qr(e,Nn("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t}));function Kf(e,{pending:t,error:r,success:n},o){let i;t&&(i=tr(t)?ue.loading(t,o):ue.loading(t.render,{...o,...t}));let s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},a=(u,c,f)=>{if(c==null){ue.dismiss(i);return}let h={type:u,...s,...o,data:f},p=tr(c)?{render:c}:c;return i?ue.update(i,{...h,...p}):ue(p.render,{...h,...p}),f},l=Pt(e)?e():e;return l.then(u=>a("success",n,u)).catch(u=>a("error",r,u)),l}ue.promise=Kf,ue.success=Pn("success"),ue.info=Pn("info"),ue.error=Pn("error"),ue.warning=Pn("warning"),ue.warn=ue.warning,ue.dark=(e,t)=>qr(e,Nn("default",{theme:"dark",...t}));function Yf(e){Bf(e)}ue.dismiss=Yf,ue.clearWaitingQueue=Uf,ue.isActive=oa,ue.update=(e,t={})=>{let r=Vf(e,t);if(r){let{props:n,content:o}=r,i={delay:100,...n,...t,toastId:t.toastId||e,updateId:ra()};i.toastId!==e&&(i.staleId=e);let s=i.render||o;delete i.render,qr(s,i)}},ue.done=e=>{ue.update(e,{progress:1})},ue.onChange=qf,ue.play=e=>sa(!0,e),ue.pause=e=>sa(!1,e);function Jf(e){var t;let{subscribe:r,getSnapshot:n,setProps:o}=m.useRef(Hf(e)).current;o(e);let i=(t=m.useSyncExternalStore(r,n,n))==null?void 0:t.slice();function s(a){if(!i)return[];let l=new Map;return e.newestOnTop&&i.reverse(),i.forEach(u=>{let{position:c}=u.props;l.has(c)||l.set(c,[]),l.get(c).push(u)}),Array.from(l,u=>a(u[0],u[1]))}return{getToastToRender:s,isToastActive:oa,count:i==null?void 0:i.length}}function Xf(e){let[t,r]=m.useState(!1),[n,o]=m.useState(!1),i=m.useRef(null),s=m.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:a,pauseOnHover:l,closeToast:u,onClick:c,closeOnClick:f}=e;zf({id:e.toastId,containerId:e.containerId,fn:r}),m.useEffect(()=>{if(e.pauseOnFocusLoss)return h(),()=>{p()}},[e.pauseOnFocusLoss]);function h(){document.hasFocus()||b(),window.addEventListener("focus",x),window.addEventListener("blur",b)}function p(){window.removeEventListener("focus",x),window.removeEventListener("blur",b)}function d(C){if(e.draggable===!0||e.draggable===C.pointerType){v();let A=i.current;s.canCloseOnClick=!0,s.canDrag=!0,A.style.transition="none",e.draggableDirection==="x"?(s.start=C.clientX,s.removalDistance=A.offsetWidth*(e.draggablePercent/100)):(s.start=C.clientY,s.removalDistance=A.offsetHeight*(e.draggablePercent===80?e.draggablePercent*1.5:e.draggablePercent)/100)}}function g(C){let{top:A,bottom:N,left:L,right:P}=i.current.getBoundingClientRect();C.nativeEvent.type!=="touchend"&&e.pauseOnHover&&C.clientX>=L&&C.clientX<=P&&C.clientY>=A&&C.clientY<=N?b():x()}function x(){r(!0)}function b(){r(!1)}function v(){s.didMove=!1,document.addEventListener("pointermove",_),document.addEventListener("pointerup",k)}function w(){document.removeEventListener("pointermove",_),document.removeEventListener("pointerup",k)}function _(C){let A=i.current;if(s.canDrag&&A){s.didMove=!0,t&&b(),e.draggableDirection==="x"?s.delta=C.clientX-s.start:s.delta=C.clientY-s.start,s.start!==C.clientX&&(s.canCloseOnClick=!1);let N=e.draggableDirection==="x"?`${s.delta}px, var(--y)`:`0, calc(${s.delta}px + var(--y))`;A.style.transform=`translate3d(${N},0)`,A.style.opacity=`${1-Math.abs(s.delta/s.removalDistance)}`}}function k(){w();let C=i.current;if(s.canDrag&&s.didMove&&C){if(s.canDrag=!1,Math.abs(s.delta)>s.removalDistance){o(!0),e.closeToast(!0),e.collapseAll();return}C.style.transition="transform 0.2s, opacity 0.2s",C.style.removeProperty("transform"),C.style.removeProperty("opacity")}}let S={onPointerDown:d,onPointerUp:g};return a&&l&&(S.onMouseEnter=b,e.stacked||(S.onMouseLeave=x)),f&&(S.onClick=C=>{c&&c(C),s.canCloseOnClick&&u(!0)}),{playToast:x,pauseToast:b,isRunning:t,preventExitTransition:n,toastRef:i,eventHandlers:S}}var Gf=typeof window<"u"?m.useLayoutEffect:m.useEffect,Ln=({theme:e,type:t,isLoading:r,...n})=>m.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:e==="colored"?"currentColor":`var(--toastify-icon-color-${t})`,...n});function Qf(e){return m.createElement(Ln,{...e},m.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))}function Zf(e){return m.createElement(Ln,{...e},m.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))}function ed(e){return m.createElement(Ln,{...e},m.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))}function td(e){return m.createElement(Ln,{...e},m.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))}function rd(){return m.createElement("div",{className:"Toastify__spinner"})}var qo={info:Zf,warning:Qf,success:ed,error:td,spinner:rd},nd=e=>e in qo;function od({theme:e,type:t,isLoading:r,icon:n}){let o=null,i={theme:e,type:t};return n===!1||(Pt(n)?o=n({...i,isLoading:r}):m.isValidElement(n)?o=m.cloneElement(n,i):r?o=qo.spinner():nd(t)&&(o=qo[t](i))),o}var id=e=>{let{isRunning:t,preventExitTransition:r,toastRef:n,eventHandlers:o,playToast:i}=Xf(e),{closeButton:s,children:a,autoClose:l,onClick:u,type:c,hideProgressBar:f,closeToast:h,transition:p,position:d,className:g,style:x,progressClassName:b,updateId:v,role:w,progress:_,rtl:k,toastId:S,deleteToast:C,isIn:A,isLoading:N,closeOnClick:L,theme:P,ariaLabel:I}=e,R=ut("Toastify__toast",`Toastify__toast-theme--${P}`,`Toastify__toast--${c}`,{"Toastify__toast--rtl":k},{"Toastify__toast--close-on-click":L}),q=Pt(g)?g({rtl:k,position:d,type:c,defaultClassName:R}):ut(R,g),J=od(e),z=!!_||!l,G={closeToast:h,type:c,theme:P},K=null;return s===!1||(Pt(s)?K=s(G):m.isValidElement(s)?K=m.cloneElement(s,G):K=Pf(G)),m.createElement(p,{isIn:A,done:C,position:d,preventExitTransition:r,nodeRef:n,playToast:i},m.createElement("div",{id:S,tabIndex:0,onClick:u,"data-in":A,className:q,...o,style:x,ref:n,...A&&{role:w,"aria-label":I}},J!=null&&m.createElement("div",{className:ut("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!N})},J),ta(a,e,!t),K,!e.customProgressBar&&m.createElement(Lf,{...v&&!z?{key:`p-${v}`}:{},rtl:k,theme:P,delay:l,isRunning:t,isIn:A,closeToast:h,hide:f,type:c,className:b,controlledProgress:z,progress:_||0})))},sd=(e,t=!1)=>({enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}),ad=Nf(sd("bounce",!0)),ld={position:"top-right",transition:ad,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light","aria-label":"Notifications Alt+T",hotKeys:e=>e.altKey&&e.code==="KeyT"};function ud(e){let t={...ld,...e},r=e.stacked,[n,o]=m.useState(!0),i=m.useRef(null),{getToastToRender:s,isToastActive:a,count:l}=Jf(t),{className:u,style:c,rtl:f,containerId:h,hotKeys:p}=t;function d(x){let b=ut("Toastify__toast-container",`Toastify__toast-container--${x}`,{"Toastify__toast-container--rtl":f});return Pt(u)?u({position:x,rtl:f,defaultClassName:b}):ut(b,Uo(u))}function g(){r&&(o(!0),ue.play())}return Gf(()=>{var x;if(r){let b=i.current.querySelectorAll('[data-in="true"]'),v=12,w=(x=t.position)==null?void 0:x.includes("top"),_=0,k=0;Array.from(b).reverse().forEach((S,C)=>{let A=S;A.classList.add("Toastify__toast--stacked"),C>0&&(A.dataset.collapsed=`${n}`),A.dataset.pos||(A.dataset.pos=w?"top":"bot");let N=_*(n?.2:1)+(n?0:v*C);A.style.setProperty("--y",`${w?N:N*-1}px`),A.style.setProperty("--g",`${v}`),A.style.setProperty("--s",`${1-(n?k:0)}`),_+=A.offsetHeight,k+=.025})}},[n,l,r]),m.useEffect(()=>{function x(b){var v;let w=i.current;p(b)&&((v=w.querySelector('[tabIndex="0"]'))==null||v.focus(),o(!1),ue.pause()),b.key==="Escape"&&(document.activeElement===w||w!=null&&w.contains(document.activeElement))&&(o(!0),ue.play())}return document.addEventListener("keydown",x),()=>{document.removeEventListener("keydown",x)}},[p]),m.createElement("section",{ref:i,className:"Toastify",id:h,onMouseEnter:()=>{r&&(o(!1),ue.pause())},onMouseLeave:g,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text","aria-label":t["aria-label"]},s((x,b)=>{let v=b.length?{...c}:{...c,pointerEvents:"none"};return m.createElement("div",{tabIndex:-1,className:d(x),"data-stacked":r,style:v,key:`c-${x}`},b.map(({content:w,props:_})=>m.createElement(id,{..._,stacked:r,collapseAll:g,isIn:a(_.toastId,_.containerId),key:`t-${_.key}`},w)))}))}var Wr={},aa;function cd(){if(aa)return Wr;aa=1,Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.parse=s,Wr.serialize=u;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,r=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,n=/^[\u0020-\u003A\u003D-\u007E]*$/,o=Object.prototype.toString,i=(()=>{const h=function(){};return h.prototype=Object.create(null),h})();function s(h,p){const d=new i,g=h.length;if(g<2)return d;const x=(p==null?void 0:p.decode)||c;let b=0;do{const v=h.indexOf("=",b);if(v===-1)break;const w=h.indexOf(";",b),_=w===-1?g:w;if(v>_){b=h.lastIndexOf(";",v-1)+1;continue}const k=a(h,b,v),S=l(h,v,k),C=h.slice(k,S);if(d[C]===void 0){let A=a(h,v+1,_),N=l(h,_,A);const L=x(h.slice(A,N));d[C]=L}b=_+1}while(b<g);return d}function a(h,p,d){do{const g=h.charCodeAt(p);if(g!==32&&g!==9)return p}while(++p<d);return d}function l(h,p,d){for(;p>d;){const g=h.charCodeAt(--p);if(g!==32&&g!==9)return p+1}return d}function u(h,p,d){const g=(d==null?void 0:d.encode)||encodeURIComponent;if(!e.test(h))throw new TypeError(`argument name is invalid: ${h}`);const x=g(p);if(!t.test(x))throw new TypeError(`argument val is invalid: ${p}`);let b=h+"="+x;if(!d)return b;if(d.maxAge!==void 0){if(!Number.isInteger(d.maxAge))throw new TypeError(`option maxAge is invalid: ${d.maxAge}`);b+="; Max-Age="+d.maxAge}if(d.domain){if(!r.test(d.domain))throw new TypeError(`option domain is invalid: ${d.domain}`);b+="; Domain="+d.domain}if(d.path){if(!n.test(d.path))throw new TypeError(`option path is invalid: ${d.path}`);b+="; Path="+d.path}if(d.expires){if(!f(d.expires)||!Number.isFinite(d.expires.valueOf()))throw new TypeError(`option expires is invalid: ${d.expires}`);b+="; Expires="+d.expires.toUTCString()}if(d.httpOnly&&(b+="; HttpOnly"),d.secure&&(b+="; Secure"),d.partitioned&&(b+="; Partitioned"),d.priority)switch(typeof d.priority=="string"?d.priority.toLowerCase():void 0){case"low":b+="; Priority=Low";break;case"medium":b+="; Priority=Medium";break;case"high":b+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${d.priority}`)}if(d.sameSite)switch(typeof d.sameSite=="string"?d.sameSite.toLowerCase():d.sameSite){case!0:case"strict":b+="; SameSite=Strict";break;case"lax":b+="; SameSite=Lax";break;case"none":b+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${d.sameSite}`)}return b}function c(h){if(h.indexOf("%")===-1)return h;try{return decodeURIComponent(h)}catch{return h}}function f(h){return o.call(h)==="[object Date]"}return Wr}cd();/**
33
33
  * react-router v7.1.1
34
34
  *
35
35
  * Copyright (c) Remix Software Inc.
@@ -38,31 +38,31 @@ React keys must be passed directly to JSX without using spread:
38
38
  * LICENSE.md file in the root directory of this source tree.
39
39
  *
40
40
  * @license MIT
41
- */function De(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Pt(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function qo({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Wo(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function la(e,t,r="/"){return fd(e,t,r,!1)}function fd(e,t,r,n){let o=typeof t=="string"?Wo(t):t,i=rr(o.pathname||"/",r);if(i==null)return null;let s=ua(e);dd(s);let a=null;for(let l=0;a==null&&l<s.length;++l){let u=Td(i);a=wd(s[l],u,n)}return a}function ua(e,t=[],r=[],n=""){let o=(i,s,a)=>{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:s,route:i};l.relativePath.startsWith("/")&&(De(l.relativePath.startsWith(n),`Absolute route path "${l.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(n.length));let u=Dt([n,l.relativePath]),c=r.concat(l);i.children&&i.children.length>0&&(De(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),ua(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:xd(u,i.index),routesMeta:c})};return e.forEach((i,s)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))o(i,s);else for(let l of ca(i.path))o(i,s,l)}),t}function ca(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,o=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return o?[i,""]:[i];let s=ca(n.join("/")),a=[];return a.push(...s.map(l=>l===""?i:[i,l].join("/"))),o&&a.push(...s),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function dd(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:vd(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var pd=/^:[\w-]+$/,md=3,hd=2,gd=1,yd=10,bd=-2,fa=e=>e==="*";function xd(e,t){let r=e.split("/"),n=r.length;return r.some(fa)&&(n+=bd),t&&(n+=hd),r.filter(o=>!fa(o)).reduce((o,i)=>o+(pd.test(i)?md:i===""?gd:yd),n)}function vd(e,t){return e.length===t.length&&e.slice(0,-1).every((n,o)=>n===t[o])?e[e.length-1]-t[t.length-1]:0}function wd(e,t,r=!1){let{routesMeta:n}=e,o={},i="/",s=[];for(let a=0;a<n.length;++a){let l=n[a],u=a===n.length-1,c=i==="/"?t:t.slice(i.length)||"/",f=Dn({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),h=l.route;if(!f&&u&&r&&!n[n.length-1].route.index&&(f=Dn({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!f)return null;Object.assign(o,f.params),s.push({params:o,pathname:Dt([i,f.pathname]),pathnameBase:Cd(Dt([i,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(i=Dt([i,f.pathnameBase]))}return s}function Dn(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=Ed(e.path,e.caseSensitive,e.end),o=t.match(r);if(!o)return null;let i=o[0],s=i.replace(/(.)\/+$/,"$1"),a=o.slice(1);return{params:n.reduce((u,{paramName:c,isOptional:f},h)=>{if(c==="*"){let d=a[h]||"";s=i.slice(0,i.length-d.length).replace(/(.)\/+$/,"$1")}const p=a[h];return f&&!p?u[c]=void 0:u[c]=(p||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:s,pattern:e}}function Ed(e,t=!1,r=!0){Pt(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,a,l)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),n]}function Td(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Pt(!1,`The URL path "${e}" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function rr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function _d(e,t="/"){let{pathname:r,search:n="",hash:o=""}=typeof e=="string"?Wo(e):e;return{pathname:r?r.startsWith("/")?r:Sd(r,t):t,search:Od(n),hash:Fd(o)}}function Sd(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?r.length>1&&r.pop():o!=="."&&r.push(o)}),r.length>1?r.join("/"):"/"}function Ko(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function kd(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function da(e){let t=kd(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function pa(e,t,r,n=!1){let o;typeof e=="string"?o=Wo(e):(o={...e},De(!o.pathname||!o.pathname.includes("?"),Ko("?","pathname","search",o)),De(!o.pathname||!o.pathname.includes("#"),Ko("#","pathname","hash",o)),De(!o.search||!o.search.includes("#"),Ko("#","search","hash",o)));let i=e===""||o.pathname==="",s=i?"/":o.pathname,a;if(s==null)a=r;else{let f=t.length-1;if(!n&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),f-=1;o.pathname=h.join("/")}a=f>=0?t[f]:"/"}let l=_d(o,a),u=s&&s!=="/"&&s.endsWith("/"),c=(i||s===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}var Dt=e=>e.join("/").replace(/\/\/+/g,"/"),Cd=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Od=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Fd=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Ad(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var ma=["POST","PUT","PATCH","DELETE"];new Set(ma);var jd=["GET",...ma];new Set(jd);var kr=F.createContext(null);kr.displayName="DataRouter";var In=F.createContext(null);In.displayName="DataRouterState";var ha=F.createContext({isTransitioning:!1});ha.displayName="ViewTransition";var $d=F.createContext(new Map);$d.displayName="Fetchers";var Nd=F.createContext(null);Nd.displayName="Await";var It=F.createContext(null);It.displayName="Navigation";var Yo=F.createContext(null);Yo.displayName="Location";var Mt=F.createContext({outlet:null,matches:[],isDataRoute:!1});Mt.displayName="Route";var Jo=F.createContext(null);Jo.displayName="RouteError";function Ld(e,{relative:t}={}){De(Mn(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=F.useContext(It),{hash:o,pathname:i,search:s}=Kr(e,{relative:t}),a=i;return r!=="/"&&(a=i==="/"?r:Dt([r,i])),n.createHref({pathname:a,search:s,hash:o})}function Mn(){return F.useContext(Yo)!=null}function nr(){return De(Mn(),"useLocation() may be used only in the context of a <Router> component."),F.useContext(Yo).location}var ga="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ya(e){F.useContext(It).static||F.useLayoutEffect(e)}function Pd(){let{isDataRoute:e}=F.useContext(Mt);return e?Yd():Dd()}function Dd(){De(Mn(),"useNavigate() may be used only in the context of a <Router> component.");let e=F.useContext(kr),{basename:t,navigator:r}=F.useContext(It),{matches:n}=F.useContext(Mt),{pathname:o}=nr(),i=JSON.stringify(da(n)),s=F.useRef(!1);return ya(()=>{s.current=!0}),F.useCallback((l,u={})=>{if(Pt(s.current,ga),!s.current)return;if(typeof l=="number"){r.go(l);return}let c=pa(l,JSON.parse(i),o,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Dt([t,c.pathname])),(u.replace?r.replace:r.push)(c,u.state,u)},[t,r,i,o,e])}F.createContext(null);function Kr(e,{relative:t}={}){let{matches:r}=F.useContext(Mt),{pathname:n}=nr(),o=JSON.stringify(da(r));return F.useMemo(()=>pa(e,JSON.parse(o),n,t==="path"),[e,o,n,t])}function Id(e,t,r,n){De(Mn(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=F.useContext(It),{matches:i}=F.useContext(Mt),s=i[i.length-1],a=s?s.params:{},l=s?s.pathname:"/",u=s?s.pathnameBase:"/",c=s&&s.route;{let b=c&&c.path||"";xa(l,!c||b.endsWith("*")||b.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${b}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
41
+ */function De(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Lt(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Wo({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Ko(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function la(e,t,r="/"){return fd(e,t,r,!1)}function fd(e,t,r,n){let o=typeof t=="string"?Ko(t):t,i=rr(o.pathname||"/",r);if(i==null)return null;let s=ua(e);dd(s);let a=null;for(let l=0;a==null&&l<s.length;++l){let u=Td(i);a=wd(s[l],u,n)}return a}function ua(e,t=[],r=[],n=""){let o=(i,s,a)=>{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:s,route:i};l.relativePath.startsWith("/")&&(De(l.relativePath.startsWith(n),`Absolute route path "${l.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(n.length));let u=Dt([n,l.relativePath]),c=r.concat(l);i.children&&i.children.length>0&&(De(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),ua(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:xd(u,i.index),routesMeta:c})};return e.forEach((i,s)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))o(i,s);else for(let l of ca(i.path))o(i,s,l)}),t}function ca(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,o=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return o?[i,""]:[i];let s=ca(n.join("/")),a=[];return a.push(...s.map(l=>l===""?i:[i,l].join("/"))),o&&a.push(...s),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function dd(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:vd(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var pd=/^:[\w-]+$/,md=3,hd=2,gd=1,yd=10,bd=-2,fa=e=>e==="*";function xd(e,t){let r=e.split("/"),n=r.length;return r.some(fa)&&(n+=bd),t&&(n+=hd),r.filter(o=>!fa(o)).reduce((o,i)=>o+(pd.test(i)?md:i===""?gd:yd),n)}function vd(e,t){return e.length===t.length&&e.slice(0,-1).every((n,o)=>n===t[o])?e[e.length-1]-t[t.length-1]:0}function wd(e,t,r=!1){let{routesMeta:n}=e,o={},i="/",s=[];for(let a=0;a<n.length;++a){let l=n[a],u=a===n.length-1,c=i==="/"?t:t.slice(i.length)||"/",f=Dn({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),h=l.route;if(!f&&u&&r&&!n[n.length-1].route.index&&(f=Dn({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!f)return null;Object.assign(o,f.params),s.push({params:o,pathname:Dt([i,f.pathname]),pathnameBase:Cd(Dt([i,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(i=Dt([i,f.pathnameBase]))}return s}function Dn(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=Ed(e.path,e.caseSensitive,e.end),o=t.match(r);if(!o)return null;let i=o[0],s=i.replace(/(.)\/+$/,"$1"),a=o.slice(1);return{params:n.reduce((u,{paramName:c,isOptional:f},h)=>{if(c==="*"){let d=a[h]||"";s=i.slice(0,i.length-d.length).replace(/(.)\/+$/,"$1")}const p=a[h];return f&&!p?u[c]=void 0:u[c]=(p||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:s,pattern:e}}function Ed(e,t=!1,r=!0){Lt(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,a,l)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),n]}function Td(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Lt(!1,`The URL path "${e}" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function rr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function _d(e,t="/"){let{pathname:r,search:n="",hash:o=""}=typeof e=="string"?Ko(e):e;return{pathname:r?r.startsWith("/")?r:Sd(r,t):t,search:Od(n),hash:Fd(o)}}function Sd(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?r.length>1&&r.pop():o!=="."&&r.push(o)}),r.length>1?r.join("/"):"/"}function Yo(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function kd(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function da(e){let t=kd(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function pa(e,t,r,n=!1){let o;typeof e=="string"?o=Ko(e):(o={...e},De(!o.pathname||!o.pathname.includes("?"),Yo("?","pathname","search",o)),De(!o.pathname||!o.pathname.includes("#"),Yo("#","pathname","hash",o)),De(!o.search||!o.search.includes("#"),Yo("#","search","hash",o)));let i=e===""||o.pathname==="",s=i?"/":o.pathname,a;if(s==null)a=r;else{let f=t.length-1;if(!n&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),f-=1;o.pathname=h.join("/")}a=f>=0?t[f]:"/"}let l=_d(o,a),u=s&&s!=="/"&&s.endsWith("/"),c=(i||s===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}var Dt=e=>e.join("/").replace(/\/\/+/g,"/"),Cd=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Od=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Fd=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Ad(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var ma=["POST","PUT","PATCH","DELETE"];new Set(ma);var jd=["GET",...ma];new Set(jd);var kr=F.createContext(null);kr.displayName="DataRouter";var In=F.createContext(null);In.displayName="DataRouterState";var ha=F.createContext({isTransitioning:!1});ha.displayName="ViewTransition";var $d=F.createContext(new Map);$d.displayName="Fetchers";var Nd=F.createContext(null);Nd.displayName="Await";var It=F.createContext(null);It.displayName="Navigation";var Jo=F.createContext(null);Jo.displayName="Location";var Mt=F.createContext({outlet:null,matches:[],isDataRoute:!1});Mt.displayName="Route";var Xo=F.createContext(null);Xo.displayName="RouteError";function Pd(e,{relative:t}={}){De(Mn(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=F.useContext(It),{hash:o,pathname:i,search:s}=Kr(e,{relative:t}),a=i;return r!=="/"&&(a=i==="/"?r:Dt([r,i])),n.createHref({pathname:a,search:s,hash:o})}function Mn(){return F.useContext(Jo)!=null}function nr(){return De(Mn(),"useLocation() may be used only in the context of a <Router> component."),F.useContext(Jo).location}var ga="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ya(e){F.useContext(It).static||F.useLayoutEffect(e)}function Ld(){let{isDataRoute:e}=F.useContext(Mt);return e?Yd():Dd()}function Dd(){De(Mn(),"useNavigate() may be used only in the context of a <Router> component.");let e=F.useContext(kr),{basename:t,navigator:r}=F.useContext(It),{matches:n}=F.useContext(Mt),{pathname:o}=nr(),i=JSON.stringify(da(n)),s=F.useRef(!1);return ya(()=>{s.current=!0}),F.useCallback((l,u={})=>{if(Lt(s.current,ga),!s.current)return;if(typeof l=="number"){r.go(l);return}let c=pa(l,JSON.parse(i),o,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Dt([t,c.pathname])),(u.replace?r.replace:r.push)(c,u.state,u)},[t,r,i,o,e])}F.createContext(null);function Kr(e,{relative:t}={}){let{matches:r}=F.useContext(Mt),{pathname:n}=nr(),o=JSON.stringify(da(r));return F.useMemo(()=>pa(e,JSON.parse(o),n,t==="path"),[e,o,n,t])}function Id(e,t,r,n){De(Mn(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=F.useContext(It),{matches:i}=F.useContext(Mt),s=i[i.length-1],a=s?s.params:{},l=s?s.pathname:"/",u=s?s.pathnameBase:"/",c=s&&s.route;{let b=c&&c.path||"";xa(l,!c||b.endsWith("*")||b.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${b}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
42
42
 
43
- Please change the parent <Route path="${b}"> to <Route path="${b==="/"?"*":`${b}/*`}">.`)}let f=nr(),h;h=f;let p=h.pathname||"/",d=p;if(u!=="/"){let b=u.replace(/^\//,"").split("/");d="/"+p.replace(/^\//,"").split("/").slice(b.length).join("/")}let g=la(e,{pathname:d});return Pt(c||g!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),Pt(g==null||g[g.length-1].route.element!==void 0||g[g.length-1].route.Component!==void 0||g[g.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),Ud(g&&g.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:Dt([u,o.encodeLocation?o.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?u:Dt([u,o.encodeLocation?o.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),i,r,n)}function Md(){let e=Kd(),t=Ad(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:n},i={padding:"2px 4px",backgroundColor:n},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=F.createElement(F.Fragment,null,F.createElement("p",null,"💿 Hey developer 👋"),F.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",F.createElement("code",{style:i},"ErrorBoundary")," or"," ",F.createElement("code",{style:i},"errorElement")," prop on your route.")),F.createElement(F.Fragment,null,F.createElement("h2",null,"Unexpected Application Error!"),F.createElement("h3",{style:{fontStyle:"italic"}},t),r?F.createElement("pre",{style:o},r):null,s)}var Rd=F.createElement(Md,null),Vd=class extends F.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?F.createElement(Mt.Provider,{value:this.props.routeContext},F.createElement(Jo.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Bd({routeContext:e,match:t,children:r}){let n=F.useContext(kr);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),F.createElement(Mt.Provider,{value:e},r)}function Ud(e,t=[],r=null,n=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,i=r==null?void 0:r.errors;if(i!=null){let l=o.findIndex(u=>u.route.id&&(i==null?void 0:i[u.route.id])!==void 0);De(l>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),o=o.slice(0,Math.min(o.length,l+1))}let s=!1,a=-1;if(r)for(let l=0;l<o.length;l++){let u=o[l];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(a=l),u.route.id){let{loaderData:c,errors:f}=r,h=u.route.loader&&!c.hasOwnProperty(u.route.id)&&(!f||f[u.route.id]===void 0);if(u.route.lazy||h){s=!0,a>=0?o=o.slice(0,a+1):o=[o[0]];break}}}return o.reduceRight((l,u,c)=>{let f,h=!1,p=null,d=null;r&&(f=i&&u.route.id?i[u.route.id]:void 0,p=u.route.errorElement||Rd,s&&(a<0&&c===0?(xa("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),h=!0,d=null):a===c&&(h=!0,d=u.route.hydrateFallbackElement||null)));let g=t.concat(o.slice(0,c+1)),x=()=>{let b;return f?b=p:h?b=d:u.route.Component?b=F.createElement(u.route.Component,null):u.route.element?b=u.route.element:b=l,F.createElement(Bd,{match:u,routeContext:{outlet:l,matches:g,isDataRoute:r!=null},children:b})};return r&&(u.route.ErrorBoundary||u.route.errorElement||c===0)?F.createElement(Vd,{location:r.location,revalidation:r.revalidation,component:p,error:f,children:x(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):x()},null)}function Xo(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function zd(e){let t=F.useContext(kr);return De(t,Xo(e)),t}function Hd(e){let t=F.useContext(In);return De(t,Xo(e)),t}function qd(e){let t=F.useContext(Mt);return De(t,Xo(e)),t}function Go(e){let t=qd(e),r=t.matches[t.matches.length-1];return De(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Wd(){return Go("useRouteId")}function Kd(){var n;let e=F.useContext(Jo),t=Hd("useRouteError"),r=Go("useRouteError");return e!==void 0?e:(n=t.errors)==null?void 0:n[r]}function Yd(){let{router:e}=zd("useNavigate"),t=Go("useNavigate"),r=F.useRef(!1);return ya(()=>{r.current=!0}),F.useCallback(async(o,i={})=>{Pt(r.current,ga),r.current&&(typeof o=="number"?e.navigate(o):await e.navigate(o,{fromRouteId:t,...i}))},[e,t])}var ba={};function xa(e,t,r){!t&&!ba[e]&&(ba[e]=!0,Pt(!1,r))}F.memo(Jd);function Jd({routes:e,future:t,state:r}){return Id(e,void 0,r,t)}var Rn="get",Vn="application/x-www-form-urlencoded";function Bn(e){return e!=null&&typeof e.tagName=="string"}function Xd(e){return Bn(e)&&e.tagName.toLowerCase()==="button"}function Gd(e){return Bn(e)&&e.tagName.toLowerCase()==="form"}function Qd(e){return Bn(e)&&e.tagName.toLowerCase()==="input"}function Zd(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ep(e,t){return e.button===0&&(!t||t==="_self")&&!Zd(e)}var Un=null;function tp(){if(Un===null)try{new FormData(document.createElement("form"),0),Un=!1}catch{Un=!0}return Un}var rp=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Qo(e){return e!=null&&!rp.has(e)?(Pt(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Vn}"`),null):e}function np(e,t){let r,n,o,i,s;if(Gd(e)){let a=e.getAttribute("action");n=a?rr(a,t):null,r=e.getAttribute("method")||Rn,o=Qo(e.getAttribute("enctype"))||Vn,i=new FormData(e)}else if(Xd(e)||Qd(e)&&(e.type==="submit"||e.type==="image")){let a=e.form;if(a==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||a.getAttribute("action");if(n=l?rr(l,t):null,r=e.getAttribute("formmethod")||a.getAttribute("method")||Rn,o=Qo(e.getAttribute("formenctype"))||Qo(a.getAttribute("enctype"))||Vn,i=new FormData(a,e),!tp()){let{name:u,type:c,value:f}=e;if(c==="image"){let h=u?`${u}.`:"";i.append(`${h}x`,"0"),i.append(`${h}y`,"0")}else u&&i.append(u,f)}}else{if(Bn(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Rn,n=null,o=Vn,s=e}return i&&o==="text/plain"&&(s=i,i=void 0),{action:n,method:r.toLowerCase(),encType:o,formData:i,body:s}}function Zo(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function op(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function ip(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function sp(e,t,r){let n=await Promise.all(e.map(async o=>{let i=t.routes[o.route.id];if(i){let s=await op(i,r);return s.links?s.links():[]}return[]}));return cp(n.flat(1).filter(ip).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function va(e,t,r,n,o,i){let s=(l,u)=>r[u]?l.route.id!==r[u].route.id:!0,a=(l,u)=>{var c;return r[u].pathname!==l.pathname||((c=r[u].route.path)==null?void 0:c.endsWith("*"))&&r[u].params["*"]!==l.params["*"]};return i==="assets"?t.filter((l,u)=>s(l,u)||a(l,u)):i==="data"?t.filter((l,u)=>{var f;let c=n.routes[l.route.id];if(!c||!c.hasLoader)return!1;if(s(l,u)||a(l,u))return!0;if(l.route.shouldRevalidate){let h=l.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((f=r[0])==null?void 0:f.params)||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function ap(e,t){return lp(e.map(r=>{let n=t.routes[r.route.id];if(!n)return[];let o=[n.module];return n.imports&&(o=o.concat(n.imports)),o}).flat(1))}function lp(e){return[...new Set(e)]}function up(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function cp(e,t){let r=new Set;return new Set(t),e.reduce((n,o)=>{let i=JSON.stringify(up(o));return r.has(i)||(r.add(i),n.push({key:i,link:o})),n},[])}function fp(e){let t=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return t.pathname==="/"?t.pathname="_root.data":t.pathname=`${t.pathname.replace(/\/$/,"")}.data`,t}function dp(){let e=F.useContext(kr);return Zo(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function pp(){let e=F.useContext(In);return Zo(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var ei=F.createContext(void 0);ei.displayName="FrameworkContext";function wa(){let e=F.useContext(ei);return Zo(e,"You must render this element inside a <HydratedRouter> element"),e}function mp(e,t){let r=F.useContext(ei),[n,o]=F.useState(!1),[i,s]=F.useState(!1),{onFocus:a,onBlur:l,onMouseEnter:u,onMouseLeave:c,onTouchStart:f}=t,h=F.useRef(null);F.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let g=b=>{b.forEach(v=>{s(v.isIntersecting)})},x=new IntersectionObserver(g,{threshold:.5});return h.current&&x.observe(h.current),()=>{x.disconnect()}}},[e]),F.useEffect(()=>{if(n){let g=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(g)}}},[n]);let p=()=>{o(!0)},d=()=>{o(!1),s(!1)};return r?e!=="intent"?[i,h,{}]:[i,h,{onFocus:Yr(a,p),onBlur:Yr(l,d),onMouseEnter:Yr(u,p),onMouseLeave:Yr(c,d),onTouchStart:Yr(f,p)}]:[!1,h,{}]}function Yr(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function hp({page:e,...t}){let{router:r}=dp(),n=F.useMemo(()=>la(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?F.createElement(yp,{page:e,matches:n,...t}):null}function gp(e){let{manifest:t,routeModules:r}=wa(),[n,o]=F.useState([]);return F.useEffect(()=>{let i=!1;return sp(e,t,r).then(s=>{i||o(s)}),()=>{i=!0}},[e,t,r]),n}function yp({page:e,matches:t,...r}){let n=nr(),{manifest:o,routeModules:i}=wa(),{loaderData:s,matches:a}=pp(),l=F.useMemo(()=>va(e,t,a,o,n,"data"),[e,t,a,o,n]),u=F.useMemo(()=>va(e,t,a,o,n,"assets"),[e,t,a,o,n]),c=F.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let p=new Set,d=!1;if(t.forEach(x=>{var v;let b=o.routes[x.route.id];!b||!b.hasLoader||(!l.some(w=>w.route.id===x.route.id)&&x.route.id in s&&((v=i[x.route.id])!=null&&v.shouldRevalidate)||b.hasClientLoader?d=!0:p.add(x.route.id))}),p.size===0)return[];let g=fp(e);return d&&p.size>0&&g.searchParams.set("_routes",t.filter(x=>p.has(x.route.id)).map(x=>x.route.id).join(",")),[g.pathname+g.search]},[s,n,o,l,t,e,i]),f=F.useMemo(()=>ap(u,o),[u,o]),h=gp(u);return F.createElement(F.Fragment,null,c.map(p=>F.createElement("link",{key:p,rel:"prefetch",as:"fetch",href:p,...r})),f.map(p=>F.createElement("link",{key:p,rel:"modulepreload",href:p,...r})),h.map(({key:p,link:d})=>F.createElement("link",{key:p,...d})))}function bp(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var Ea=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Ea&&(window.__reactRouterVersion="7.1.1")}catch{}var Ta=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ti=F.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:o,reloadDocument:i,replace:s,state:a,target:l,to:u,preventScrollReset:c,viewTransition:f,...h},p){let{basename:d}=F.useContext(It),g=typeof u=="string"&&Ta.test(u),x,b=!1;if(typeof u=="string"&&g&&(x=u,Ea))try{let N=new URL(window.location.href),P=u.startsWith("//")?new URL(N.protocol+u):new URL(u),L=rr(P.pathname,d);P.origin===N.origin&&L!=null?u=L+P.search+P.hash:b=!0}catch{Pt(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let v=Ld(u,{relative:o}),[w,_,k]=mp(n,h),S=Ep(u,{replace:s,state:a,target:l,preventScrollReset:c,relative:o,viewTransition:f});function C(N){t&&t(N),N.defaultPrevented||S(N)}let A=F.createElement("a",{...h,...k,href:x||v,onClick:b||i?t:C,ref:bp(p,_),target:l,"data-discover":!g&&r==="render"?"true":void 0});return w&&!g?F.createElement(F.Fragment,null,A,F.createElement(hp,{page:v})):A});ti.displayName="Link";var xp=F.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:o=!1,style:i,to:s,viewTransition:a,children:l,...u},c){let f=Kr(s,{relative:u.relative}),h=nr(),p=F.useContext(In),{navigator:d,basename:g}=F.useContext(It),x=p!=null&&Cp(f)&&a===!0,b=d.encodeLocation?d.encodeLocation(f).pathname:f.pathname,v=h.pathname,w=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;r||(v=v.toLowerCase(),w=w?w.toLowerCase():null,b=b.toLowerCase()),w&&g&&(w=rr(w,g)||w);const _=b!=="/"&&b.endsWith("/")?b.length-1:b.length;let k=v===b||!o&&v.startsWith(b)&&v.charAt(_)==="/",S=w!=null&&(w===b||!o&&w.startsWith(b)&&w.charAt(b.length)==="/"),C={isActive:k,isPending:S,isTransitioning:x},A=k?t:void 0,N;typeof n=="function"?N=n(C):N=[n,k?"active":null,S?"pending":null,x?"transitioning":null].filter(Boolean).join(" ");let P=typeof i=="function"?i(C):i;return F.createElement(ti,{...u,"aria-current":A,className:N,ref:c,style:P,to:s,viewTransition:a},typeof l=="function"?l(C):l)});xp.displayName="NavLink";var vp=F.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:o,state:i,method:s=Rn,action:a,onSubmit:l,relative:u,preventScrollReset:c,viewTransition:f,...h},p)=>{let d=Sp(),g=kp(a,{relative:u}),x=s.toLowerCase()==="get"?"get":"post",b=typeof a=="string"&&Ta.test(a),v=w=>{if(l&&l(w),w.defaultPrevented)return;w.preventDefault();let _=w.nativeEvent.submitter,k=(_==null?void 0:_.getAttribute("formmethod"))||s;d(_||w.currentTarget,{fetcherKey:t,method:k,navigate:r,replace:o,state:i,relative:u,preventScrollReset:c,viewTransition:f})};return F.createElement("form",{ref:p,method:x,action:g,onSubmit:n?l:v,...h,"data-discover":!b&&e==="render"?"true":void 0})});vp.displayName="Form";function wp(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function _a(e){let t=F.useContext(kr);return De(t,wp(e)),t}function Ep(e,{target:t,replace:r,state:n,preventScrollReset:o,relative:i,viewTransition:s}={}){let a=Pd(),l=nr(),u=Kr(e,{relative:i});return F.useCallback(c=>{if(ep(c,t)){c.preventDefault();let f=r!==void 0?r:qo(l)===qo(u);a(e,{replace:f,state:n,preventScrollReset:o,relative:i,viewTransition:s})}},[l,a,u,r,n,t,e,o,i,s])}var Tp=0,_p=()=>`__${String(++Tp)}__`;function Sp(){let{router:e}=_a("useSubmit"),{basename:t}=F.useContext(It),r=Wd();return F.useCallback(async(n,o={})=>{let{action:i,method:s,encType:a,formData:l,body:u}=np(n,t);if(o.navigate===!1){let c=o.fetcherKey||_p();await e.fetch(c,r,o.action||i,{preventScrollReset:o.preventScrollReset,formData:l,body:u,formMethod:o.method||s,formEncType:o.encType||a,flushSync:o.flushSync})}else await e.navigate(o.action||i,{preventScrollReset:o.preventScrollReset,formData:l,body:u,formMethod:o.method||s,formEncType:o.encType||a,replace:o.replace,state:o.state,fromRouteId:r,flushSync:o.flushSync,viewTransition:o.viewTransition})},[e,t,r])}function kp(e,{relative:t}={}){let{basename:r}=F.useContext(It),n=F.useContext(Mt);De(n,"useFormAction must be used inside a RouteContext");let[o]=n.matches.slice(-1),i={...Kr(e||".",{relative:t})},s=nr();if(e==null){i.search=s.search;let a=new URLSearchParams(i.search),l=a.getAll("index");if(l.some(c=>c==="")){a.delete("index"),l.filter(f=>f).forEach(f=>a.append("index",f));let c=a.toString();i.search=c?`?${c}`:""}}return(!e||e===".")&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(i.pathname=i.pathname==="/"?r:Dt([r,i.pathname])),qo(i)}function Cp(e,t={}){let r=F.useContext(ha);De(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=_a("useViewTransitionState"),o=Kr(e,{relative:t.relative});if(!r.isTransitioning)return!1;let i=rr(r.currentLocation.pathname,n)||r.currentLocation.pathname,s=rr(r.nextLocation.pathname,n)||r.nextLocation.pathname;return Dn(o.pathname,s)!=null||Dn(o.pathname,i)!=null}new TextEncoder;const Sa=Object.freeze({left:0,top:0,width:16,height:16}),zn=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ri=Object.freeze({...Sa,...zn}),ni=Object.freeze({...ri,body:"",hidden:!1});function Op(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const n=((e.rotate||0)+(t.rotate||0))%4;return n&&(r.rotate=n),r}function ka(e,t){const r=Op(e,t);for(const n in ni)n in zn?n in e&&!(n in r)&&(r[n]=zn[n]):n in t?r[n]=t[n]:n in e&&(r[n]=e[n]);return r}function Fp(e,t){const r=e.icons,n=e.aliases||Object.create(null),o=Object.create(null);function i(s){if(r[s])return o[s]=[];if(!(s in o)){o[s]=null;const a=n[s]&&n[s].parent,l=a&&i(a);l&&(o[s]=[a].concat(l))}return o[s]}return Object.keys(r).concat(Object.keys(n)).forEach(i),o}function Ap(e,t,r){const n=e.icons,o=e.aliases||Object.create(null);let i={};function s(a){i=ka(n[a]||o[a],i)}return s(t),r.forEach(s),ka(e,i)}function Ca(e,t){const r=[];if(typeof e!="object"||typeof e.icons!="object")return r;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),r.push(o)});const n=Fp(e);for(const o in n){const i=n[o];i&&(t(o,Ap(e,o,i)),r.push(o))}return r}const jp={provider:"",aliases:{},not_found:{},...Sa};function oi(e,t){for(const r in t)if(r in e&&typeof e[r]!=typeof t[r])return!1;return!0}function Oa(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!oi(e,jp))return null;const r=t.icons;for(const o in r){const i=r[o];if(!o||typeof i.body!="string"||!oi(i,ni))return null}const n=t.aliases||Object.create(null);for(const o in n){const i=n[o],s=i.parent;if(!o||typeof s!="string"||!r[s]&&!n[s]||!oi(i,ni))return null}return t}const Fa=/^[a-z0-9]+(-[a-z0-9]+)*$/,Hn=(e,t,r,n="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;n=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const a=o.pop(),l=o.pop(),u={provider:o.length>0?o[0]:n,prefix:l,name:a};return t&&!qn(u)?null:u}const i=o[0],s=i.split("-");if(s.length>1){const a={provider:n,prefix:s.shift(),name:s.join("-")};return t&&!qn(a)?null:a}if(r&&n===""){const a={provider:n,prefix:"",name:i};return t&&!qn(a,r)?null:a}return null},qn=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,Aa=Object.create(null);function $p(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function or(e,t){const r=Aa[e]||(Aa[e]=Object.create(null));return r[t]||(r[t]=$p(e,t))}function ii(e,t){return Oa(t)?Ca(t,(r,n)=>{n?e.icons[r]=n:e.missing.add(r)}):[]}function Np(e,t,r){try{if(typeof r.body=="string")return e.icons[t]={...r},!0}catch{}return!1}let Jr=!1;function ja(e){return typeof e=="boolean"&&(Jr=e),Jr}function $a(e){const t=typeof e=="string"?Hn(e,!0,Jr):e;if(t){const r=or(t.provider,t.prefix),n=t.name;return r.icons[n]||(r.missing.has(n)?null:void 0)}}function Lp(e,t){const r=Hn(e,!0,Jr);if(!r)return!1;const n=or(r.provider,r.prefix);return t?Np(n,r.name,t):(n.missing.add(r.name),!0)}function Pp(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),Jr&&!t&&!e.prefix){let o=!1;return Oa(e)&&(e.prefix="",Ca(e,(i,s)=>{Lp(i,s)&&(o=!0)})),o}const r=e.prefix;if(!qn({provider:t,prefix:r,name:"a"}))return!1;const n=or(t,r);return!!ii(n,e)}const Na=Object.freeze({width:null,height:null}),La=Object.freeze({...Na,...zn}),Dp=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Ip=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Pa(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const n=e.split(Dp);if(n===null||!n.length)return e;const o=[];let i=n.shift(),s=Ip.test(i);for(;;){if(s){const a=parseFloat(i);isNaN(a)?o.push(i):o.push(Math.ceil(a*t*r)/r)}else o.push(i);if(i=n.shift(),i===void 0)return o.join("");s=!s}}function Mp(e,t="defs"){let r="";const n=e.indexOf("<"+t);for(;n>=0;){const o=e.indexOf(">",n),i=e.indexOf("</"+t);if(o===-1||i===-1)break;const s=e.indexOf(">",i);if(s===-1)break;r+=e.slice(o+1,i).trim(),e=e.slice(0,n).trim()+e.slice(s+1)}return{defs:r,content:e}}function Rp(e,t){return e?"<defs>"+e+"</defs>"+t:t}function Vp(e,t,r){const n=Mp(e);return Rp(n.defs,t+n.content+r)}const Bp=e=>e==="unset"||e==="undefined"||e==="none";function Up(e,t){const r={...ri,...e},n={...La,...t},o={left:r.left,top:r.top,width:r.width,height:r.height};let i=r.body;[r,n].forEach(g=>{const x=[],b=g.hFlip,v=g.vFlip;let w=g.rotate;b?v?w+=2:(x.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),x.push("scale(-1 1)"),o.top=o.left=0):v&&(x.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),x.push("scale(1 -1)"),o.top=o.left=0);let _;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:_=o.height/2+o.top,x.unshift("rotate(90 "+_.toString()+" "+_.toString()+")");break;case 2:x.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:_=o.width/2+o.left,x.unshift("rotate(-90 "+_.toString()+" "+_.toString()+")");break}w%2===1&&(o.left!==o.top&&(_=o.left,o.left=o.top,o.top=_),o.width!==o.height&&(_=o.width,o.width=o.height,o.height=_)),x.length&&(i=Vp(i,'<g transform="'+x.join(" ")+'">',"</g>"))});const s=n.width,a=n.height,l=o.width,u=o.height;let c,f;s===null?(f=a===null?"1em":a==="auto"?u:a,c=Pa(f,l/u)):(c=s==="auto"?l:s,f=a===null?Pa(c,u/l):a==="auto"?u:a);const h={},p=(g,x)=>{Bp(x)||(h[g]=x.toString())};p("width",c),p("height",f);const d=[o.left,o.top,l,u];return h.viewBox=d.join(" "),{attributes:h,viewBox:d,body:i}}const zp=/\sid="(\S+)"/g,Hp="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let qp=0;function Wp(e,t=Hp){const r=[];let n;for(;n=zp.exec(e);)r.push(n[1]);if(!r.length)return e;const o="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(i=>{const s=typeof t=="function"?t(i):t+(qp++).toString(),a=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+s+o+"$3")}),e=e.replace(new RegExp(o,"g"),""),e}const si=Object.create(null);function Kp(e,t){si[e]=t}function ai(e){return si[e]||si[""]}function li(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const ui=Object.create(null),Xr=["https://api.simplesvg.com","https://api.unisvg.com"],Wn=[];for(;Xr.length>0;)Xr.length===1||Math.random()>.5?Wn.push(Xr.shift()):Wn.push(Xr.pop());ui[""]=li({resources:["https://api.iconify.design"].concat(Wn)});function Yp(e,t){const r=li(t);return r===null?!1:(ui[e]=r,!0)}function ci(e){return ui[e]}let Da=(()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}})();function Jp(e,t){const r=ci(e);if(!r)return 0;let n;if(!r.maxURL)n=0;else{let o=0;r.resources.forEach(s=>{o=Math.max(o,s.length)});const i=t+".json?icons=";n=r.maxURL-o-r.path.length-i.length}return n}function Xp(e){return e===404}const Gp=(e,t,r)=>{const n=[],o=Jp(e,t),i="icons";let s={type:i,provider:e,prefix:t,icons:[]},a=0;return r.forEach((l,u)=>{a+=l.length+1,a>=o&&u>0&&(n.push(s),s={type:i,provider:e,prefix:t,icons:[]},a=l.length),s.icons.push(l)}),n.push(s),n};function Qp(e){if(typeof e=="string"){const t=ci(e);if(t)return t.path}return"/"}const Zp={prepare:Gp,send:(e,t,r)=>{if(!Da){r("abort",424);return}let n=Qp(t.provider);switch(t.type){case"icons":{const i=t.prefix,a=t.icons.join(","),l=new URLSearchParams({icons:a});n+=i+".json?"+l.toString();break}case"custom":{const i=t.uri;n+=i.slice(0,1)==="/"?i.slice(1):i;break}default:r("abort",400);return}let o=503;Da(e+n).then(i=>{const s=i.status;if(s!==200){setTimeout(()=>{r(Xp(s)?"abort":"next",s)});return}return o=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?r("abort",i):r("next",o)});return}setTimeout(()=>{r("success",i)})}).catch(()=>{r("next",o)})}};function em(e){const t={loaded:[],missing:[],pending:[]},r=Object.create(null);e.sort((o,i)=>o.provider!==i.provider?o.provider.localeCompare(i.provider):o.prefix!==i.prefix?o.prefix.localeCompare(i.prefix):o.name.localeCompare(i.name));let n={provider:"",prefix:"",name:""};return e.forEach(o=>{if(n.name===o.name&&n.prefix===o.prefix&&n.provider===o.provider)return;n=o;const i=o.provider,s=o.prefix,a=o.name,l=r[i]||(r[i]=Object.create(null)),u=l[s]||(l[s]=or(i,s));let c;a in u.icons?c=t.loaded:s===""||u.missing.has(a)?c=t.missing:c=t.pending;const f={provider:i,prefix:s,name:a};c.push(f)}),t}function Ia(e,t){e.forEach(r=>{const n=r.loaderCallbacks;n&&(r.loaderCallbacks=n.filter(o=>o.id!==t))})}function tm(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let r=!1;const n=e.provider,o=e.prefix;t.forEach(i=>{const s=i.icons,a=s.pending.length;s.pending=s.pending.filter(l=>{if(l.prefix!==o)return!0;const u=l.name;if(e.icons[u])s.loaded.push({provider:n,prefix:o,name:u});else if(e.missing.has(u))s.missing.push({provider:n,prefix:o,name:u});else return r=!0,!0;return!1}),s.pending.length!==a&&(r||Ia([e],i.id),i.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),i.abort))})}))}let rm=0;function nm(e,t,r){const n=rm++,o=Ia.bind(null,r,n);if(!t.pending.length)return o;const i={id:n,icons:t,callback:e,abort:o};return r.forEach(s=>{(s.loaderCallbacks||(s.loaderCallbacks=[])).push(i)}),o}function om(e,t=!0,r=!1){const n=[];return e.forEach(o=>{const i=typeof o=="string"?Hn(o,t,r):o;i&&n.push(i)}),n}var im={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function sm(e,t,r,n){const o=e.resources.length,i=e.random?Math.floor(Math.random()*o):e.index;let s;if(e.random){let S=e.resources.slice(0);for(s=[];S.length>1;){const C=Math.floor(Math.random()*S.length);s.push(S[C]),S=S.slice(0,C).concat(S.slice(C+1))}s=s.concat(S)}else s=e.resources.slice(i).concat(e.resources.slice(0,i));const a=Date.now();let l="pending",u=0,c,f=null,h=[],p=[];typeof n=="function"&&p.push(n);function d(){f&&(clearTimeout(f),f=null)}function g(){l==="pending"&&(l="aborted"),d(),h.forEach(S=>{S.status==="pending"&&(S.status="aborted")}),h=[]}function x(S,C){C&&(p=[]),typeof S=="function"&&p.push(S)}function b(){return{startTime:a,payload:t,status:l,queriesSent:u,queriesPending:h.length,subscribe:x,abort:g}}function v(){l="failed",p.forEach(S=>{S(void 0,c)})}function w(){h.forEach(S=>{S.status==="pending"&&(S.status="aborted")}),h=[]}function _(S,C,A){const N=C!=="success";switch(h=h.filter(P=>P!==S),l){case"pending":break;case"failed":if(N||!e.dataAfterTimeout)return;break;default:return}if(C==="abort"){c=A,v();return}if(N){c=A,h.length||(s.length?k():v());return}if(d(),w(),!e.random){const P=e.resources.indexOf(S.resource);P!==-1&&P!==e.index&&(e.index=P)}l="completed",p.forEach(P=>{P(A)})}function k(){if(l!=="pending")return;d();const S=s.shift();if(S===void 0){if(h.length){f=setTimeout(()=>{d(),l==="pending"&&(w(),v())},e.timeout);return}v();return}const C={status:"pending",resource:S,callback:(A,N)=>{_(C,A,N)}};h.push(C),u++,f=setTimeout(k,e.rotate),r(S,t,C.callback)}return setTimeout(k),b}function Ma(e){const t={...im,...e};let r=[];function n(){r=r.filter(a=>a().status==="pending")}function o(a,l,u){const c=sm(t,a,l,(f,h)=>{n(),u&&u(f,h)});return r.push(c),c}function i(a){return r.find(l=>a(l))||null}return{query:o,find:i,setIndex:a=>{t.index=a},getIndex:()=>t.index,cleanup:n}}function Ra(){}const fi=Object.create(null);function am(e){if(!fi[e]){const t=ci(e);if(!t)return;const r=Ma(t),n={config:t,redundancy:r};fi[e]=n}return fi[e]}function lm(e,t,r){let n,o;if(typeof e=="string"){const i=ai(e);if(!i)return r(void 0,424),Ra;o=i.send;const s=am(e);s&&(n=s.redundancy)}else{const i=li(e);if(i){n=Ma(i);const s=e.resources?e.resources[0]:"",a=ai(s);a&&(o=a.send)}}return!n||!o?(r(void 0,424),Ra):n.query(t,o,r)().abort}const Va="iconify2",Gr="iconify",Ba=Gr+"-count",Ua=Gr+"-version",za=36e5,um=168,cm=50;function di(e,t){try{return e.getItem(t)}catch{}}function pi(e,t,r){try{return e.setItem(t,r),!0}catch{}}function Ha(e,t){try{e.removeItem(t)}catch{}}function mi(e,t){return pi(e,Ba,t.toString())}function hi(e){return parseInt(di(e,Ba))||0}const Kn={local:!0,session:!0},qa={local:new Set,session:new Set};let gi=!1;function fm(e){gi=e}let Yn=typeof window>"u"?{}:window;function Wa(e){const t=e+"Storage";try{if(Yn&&Yn[t]&&typeof Yn[t].length=="number")return Yn[t]}catch{}Kn[e]=!1}function Ka(e,t){const r=Wa(e);if(!r)return;const n=di(r,Ua);if(n!==Va){if(n){const a=hi(r);for(let l=0;l<a;l++)Ha(r,Gr+l.toString())}pi(r,Ua,Va),mi(r,0);return}const o=Math.floor(Date.now()/za)-um,i=a=>{const l=Gr+a.toString(),u=di(r,l);if(typeof u=="string"){try{const c=JSON.parse(u);if(typeof c=="object"&&typeof c.cached=="number"&&c.cached>o&&typeof c.provider=="string"&&typeof c.data=="object"&&typeof c.data.prefix=="string"&&t(c,a))return!0}catch{}Ha(r,l)}};let s=hi(r);for(let a=s-1;a>=0;a--)i(a)||(a===s-1?(s--,mi(r,s)):qa[e].add(a))}function Ya(){if(!gi){fm(!0);for(const e in Kn)Ka(e,t=>{const r=t.data,n=t.provider,o=r.prefix,i=or(n,o);if(!ii(i,r).length)return!1;const s=r.lastModified||-1;return i.lastModifiedCached=i.lastModifiedCached?Math.min(i.lastModifiedCached,s):s,!0})}}function dm(e,t){const r=e.lastModifiedCached;if(r&&r>=t)return r===t;if(e.lastModifiedCached=t,r)for(const n in Kn)Ka(n,o=>{const i=o.data;return o.provider!==e.provider||i.prefix!==e.prefix||i.lastModified===t});return!0}function pm(e,t){gi||Ya();function r(n){let o;if(!Kn[n]||!(o=Wa(n)))return;const i=qa[n];let s;if(i.size)i.delete(s=Array.from(i).shift());else if(s=hi(o),s>=cm||!mi(o,s+1))return;const a={cached:Math.floor(Date.now()/za),provider:e.provider,data:t};return pi(o,Gr+s.toString(),JSON.stringify(a))}t.lastModified&&!dm(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),r("local")||r("session"))}function Ja(){}function mm(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,tm(e)}))}function hm(e){const t=[],r=[];return e.forEach(n=>{(n.match(Fa)?t:r).push(n)}),{valid:t,invalid:r}}function Qr(e,t,r,n){function o(){const i=e.pendingIcons;t.forEach(s=>{i&&i.delete(s),e.icons[s]||e.missing.add(s)})}if(r&&typeof r=="object")try{if(!ii(e,r).length){o();return}n&&pm(e,r)}catch(i){console.error(i)}o(),mm(e)}function Xa(e,t){e instanceof Promise?e.then(r=>{t(r)}).catch(()=>{t(null)}):t(e)}function gm(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:r,prefix:n}=e,o=e.iconsToLoad;if(delete e.iconsToLoad,!o||!o.length)return;const i=e.loadIcon;if(e.loadIcons&&(o.length>1||!i)){Xa(e.loadIcons(o,n,r),c=>{Qr(e,o,c,!1)});return}if(i){o.forEach(c=>{const f=i(c,n,r);Xa(f,h=>{const p=h?{prefix:n,icons:{[c]:h}}:null;Qr(e,[c],p,!1)})});return}const{valid:s,invalid:a}=hm(o);if(a.length&&Qr(e,a,null,!1),!s.length)return;const l=n.match(Fa)?ai(r):null;if(!l){Qr(e,s,null,!1);return}l.prepare(r,n,s).forEach(c=>{lm(r,c,f=>{Qr(e,c.icons,f,!0)})})}))}const ym=(e,t)=>{const r=om(e,!0,ja()),n=em(r);if(!n.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(n.loaded,n.missing,n.pending,Ja)}),()=>{l=!1}}const o=Object.create(null),i=[];let s,a;return n.pending.forEach(l=>{const{provider:u,prefix:c}=l;if(c===a&&u===s)return;s=u,a=c,i.push(or(u,c));const f=o[u]||(o[u]=Object.create(null));f[c]||(f[c]=[])}),n.pending.forEach(l=>{const{provider:u,prefix:c,name:f}=l,h=or(u,c),p=h.pendingIcons||(h.pendingIcons=new Set);p.has(f)||(p.add(f),o[u][c].push(f))}),i.forEach(l=>{const u=o[l.provider][l.prefix];u.length&&gm(l,u)}),t?nm(t,n,i):Ja};function bm(e,t){const r={...e};for(const n in t){const o=t[n],i=typeof o;n in Na?(o===null||o&&(i==="string"||i==="number"))&&(r[n]=o):i===typeof r[n]&&(r[n]=n==="rotate"?o%4:o)}return r}const xm=/[\s,]+/;function vm(e,t){t.split(xm).forEach(r=>{switch(r.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function wm(e,t=0){const r=e.replace(/^-?[0-9.]*/,"");function n(o){for(;o<0;)o+=4;return o%4}if(r===""){const o=parseInt(e);return isNaN(o)?0:n(o)}else if(r!==e){let o=0;switch(r){case"%":o=25;break;case"deg":o=90}if(o){let i=parseFloat(e.slice(0,e.length-r.length));return isNaN(i)?0:(i=i/o,i%1===0?n(i):0)}}return t}function Em(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in t)r+=" "+n+'="'+t[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}function Tm(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function _m(e){return"data:image/svg+xml,"+Tm(e)}function Sm(e){return'url("'+_m(e)+'")'}let Zr;function km(){try{Zr=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Zr=null}}function Cm(e){return Zr===void 0&&km(),Zr?Zr.createHTML(e):e}const Ga={...La,inline:!1},Om={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Fm={display:"inline-block"},yi={backgroundColor:"currentColor"},Qa={backgroundColor:"transparent"},Za={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},el={WebkitMask:yi,mask:yi,background:Qa};for(const e in el){const t=el[e];for(const r in Za)t[e+r]=Za[r]}const Am={...Ga,inline:!0};function tl(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const jm=(e,t,r)=>{const n=t.inline?Am:Ga,o=bm(n,t),i=t.mode||"svg",s={},a=t.style||{},l={...i==="svg"?Om:{}};if(r){const x=Hn(r,!1,!0);if(x){const b=["iconify"],v=["provider","prefix"];for(const w of v)x[w]&&b.push("iconify--"+x[w]);l.className=b.join(" ")}}for(let x in t){const b=t[x];if(b!==void 0)switch(x){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":break;case"_ref":l.ref=b;break;case"className":l[x]=(l[x]?l[x]+" ":"")+b;break;case"inline":case"hFlip":case"vFlip":o[x]=b===!0||b==="true"||b===1;break;case"flip":typeof b=="string"&&vm(o,b);break;case"color":s.color=b;break;case"rotate":typeof b=="string"?o[x]=wm(b):typeof b=="number"&&(o[x]=b);break;case"ariaHidden":case"aria-hidden":b!==!0&&b!=="true"&&delete l["aria-hidden"];break;default:n[x]===void 0&&(l[x]=b)}}const u=Up(e,o),c=u.attributes;if(o.inline&&(s.verticalAlign="-0.125em"),i==="svg"){l.style={...s,...a},Object.assign(l,c);let x=0,b=t.id;return typeof b=="string"&&(b=b.replace(/-/g,"_")),l.dangerouslySetInnerHTML={__html:Cm(Wp(u.body,b?()=>b+"ID"+x++:"iconifyReact"))},m.createElement("svg",l)}const{body:f,width:h,height:p}=e,d=i==="mask"||(i==="bg"?!1:f.indexOf("currentColor")!==-1),g=Em(f,{...c,width:h+"",height:p+""});return l.style={...s,"--svg":Sm(g),width:tl(c.width),height:tl(c.height),...Fm,...d?yi:Qa,...a},m.createElement("span",l)};if(ja(!0),Kp("",Zp),typeof document<"u"&&typeof window<"u"){Ya();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,r="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(n=>{try{(typeof n!="object"||n===null||n instanceof Array||typeof n.icons!="object"||typeof n.prefix!="string"||!Pp(n))&&console.error(r)}catch{console.error(r)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let r in t){const n="IconifyProviders["+r+"] is invalid.";try{const o=t[r];if(typeof o!="object"||!o||o.resources===void 0)continue;Yp(r,o)||console.error(n)}catch{console.error(n)}}}}function rl(e){const[t,r]=m.useState(!!e.ssr),[n,o]=m.useState({});function i(p){if(p){const d=e.icon;if(typeof d=="object")return{name:"",data:d};const g=$a(d);if(g)return{name:d,data:g}}return{name:""}}const[s,a]=m.useState(i(!!e.ssr));function l(){const p=n.callback;p&&(p(),o({}))}function u(p){if(JSON.stringify(s)!==JSON.stringify(p))return l(),a(p),!0}function c(){var p;const d=e.icon;if(typeof d=="object"){u({name:"",data:d});return}const g=$a(d);if(u({name:d,data:g}))if(g===void 0){const x=ym([d],c);o({callback:x})}else g&&((p=e.onLoad)===null||p===void 0||p.call(e,d))}m.useEffect(()=>(r(!0),l),[]),m.useEffect(()=>{t&&c()},[e.icon,t]);const{name:f,data:h}=s;return h?jm({...ri,...h},e,f):e.children?e.children:m.createElement("span",{})}const $m=m.forwardRef((e,t)=>rl({...e,_ref:t}));m.forwardRef((e,t)=>rl({inline:!0,...e,_ref:t}));function Be({icon:e,iconClass:t}){return y.jsx(y.Fragment,{children:y.jsx($m,{icon:e,className:t})})}const Cr=({text:e="",isDisabled:t=!1,isLoading:r=!1,btnClass:n="bg-primary-500 text-white",icon:o="",iconPosition:i="left",iconClass:s="text-[20px]",loadingClass:a="",link:l="",div:u=!1,type:c="button",style:f,onClick:h})=>{const p=`
43
+ Please change the parent <Route path="${b}"> to <Route path="${b==="/"?"*":`${b}/*`}">.`)}let f=nr(),h;h=f;let p=h.pathname||"/",d=p;if(u!=="/"){let b=u.replace(/^\//,"").split("/");d="/"+p.replace(/^\//,"").split("/").slice(b.length).join("/")}let g=la(e,{pathname:d});return Lt(c||g!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),Lt(g==null||g[g.length-1].route.element!==void 0||g[g.length-1].route.Component!==void 0||g[g.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),Ud(g&&g.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:Dt([u,o.encodeLocation?o.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?u:Dt([u,o.encodeLocation?o.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),i,r,n)}function Md(){let e=Kd(),t=Ad(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:n},i={padding:"2px 4px",backgroundColor:n},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=F.createElement(F.Fragment,null,F.createElement("p",null,"💿 Hey developer 👋"),F.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",F.createElement("code",{style:i},"ErrorBoundary")," or"," ",F.createElement("code",{style:i},"errorElement")," prop on your route.")),F.createElement(F.Fragment,null,F.createElement("h2",null,"Unexpected Application Error!"),F.createElement("h3",{style:{fontStyle:"italic"}},t),r?F.createElement("pre",{style:o},r):null,s)}var Rd=F.createElement(Md,null),Vd=class extends F.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?F.createElement(Mt.Provider,{value:this.props.routeContext},F.createElement(Xo.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Bd({routeContext:e,match:t,children:r}){let n=F.useContext(kr);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),F.createElement(Mt.Provider,{value:e},r)}function Ud(e,t=[],r=null,n=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,i=r==null?void 0:r.errors;if(i!=null){let l=o.findIndex(u=>u.route.id&&(i==null?void 0:i[u.route.id])!==void 0);De(l>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),o=o.slice(0,Math.min(o.length,l+1))}let s=!1,a=-1;if(r)for(let l=0;l<o.length;l++){let u=o[l];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(a=l),u.route.id){let{loaderData:c,errors:f}=r,h=u.route.loader&&!c.hasOwnProperty(u.route.id)&&(!f||f[u.route.id]===void 0);if(u.route.lazy||h){s=!0,a>=0?o=o.slice(0,a+1):o=[o[0]];break}}}return o.reduceRight((l,u,c)=>{let f,h=!1,p=null,d=null;r&&(f=i&&u.route.id?i[u.route.id]:void 0,p=u.route.errorElement||Rd,s&&(a<0&&c===0?(xa("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),h=!0,d=null):a===c&&(h=!0,d=u.route.hydrateFallbackElement||null)));let g=t.concat(o.slice(0,c+1)),x=()=>{let b;return f?b=p:h?b=d:u.route.Component?b=F.createElement(u.route.Component,null):u.route.element?b=u.route.element:b=l,F.createElement(Bd,{match:u,routeContext:{outlet:l,matches:g,isDataRoute:r!=null},children:b})};return r&&(u.route.ErrorBoundary||u.route.errorElement||c===0)?F.createElement(Vd,{location:r.location,revalidation:r.revalidation,component:p,error:f,children:x(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):x()},null)}function Go(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function zd(e){let t=F.useContext(kr);return De(t,Go(e)),t}function Hd(e){let t=F.useContext(In);return De(t,Go(e)),t}function qd(e){let t=F.useContext(Mt);return De(t,Go(e)),t}function Qo(e){let t=qd(e),r=t.matches[t.matches.length-1];return De(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Wd(){return Qo("useRouteId")}function Kd(){var n;let e=F.useContext(Xo),t=Hd("useRouteError"),r=Qo("useRouteError");return e!==void 0?e:(n=t.errors)==null?void 0:n[r]}function Yd(){let{router:e}=zd("useNavigate"),t=Qo("useNavigate"),r=F.useRef(!1);return ya(()=>{r.current=!0}),F.useCallback(async(o,i={})=>{Lt(r.current,ga),r.current&&(typeof o=="number"?e.navigate(o):await e.navigate(o,{fromRouteId:t,...i}))},[e,t])}var ba={};function xa(e,t,r){!t&&!ba[e]&&(ba[e]=!0,Lt(!1,r))}F.memo(Jd);function Jd({routes:e,future:t,state:r}){return Id(e,void 0,r,t)}var Rn="get",Vn="application/x-www-form-urlencoded";function Bn(e){return e!=null&&typeof e.tagName=="string"}function Xd(e){return Bn(e)&&e.tagName.toLowerCase()==="button"}function Gd(e){return Bn(e)&&e.tagName.toLowerCase()==="form"}function Qd(e){return Bn(e)&&e.tagName.toLowerCase()==="input"}function Zd(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ep(e,t){return e.button===0&&(!t||t==="_self")&&!Zd(e)}var Un=null;function tp(){if(Un===null)try{new FormData(document.createElement("form"),0),Un=!1}catch{Un=!0}return Un}var rp=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Zo(e){return e!=null&&!rp.has(e)?(Lt(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Vn}"`),null):e}function np(e,t){let r,n,o,i,s;if(Gd(e)){let a=e.getAttribute("action");n=a?rr(a,t):null,r=e.getAttribute("method")||Rn,o=Zo(e.getAttribute("enctype"))||Vn,i=new FormData(e)}else if(Xd(e)||Qd(e)&&(e.type==="submit"||e.type==="image")){let a=e.form;if(a==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||a.getAttribute("action");if(n=l?rr(l,t):null,r=e.getAttribute("formmethod")||a.getAttribute("method")||Rn,o=Zo(e.getAttribute("formenctype"))||Zo(a.getAttribute("enctype"))||Vn,i=new FormData(a,e),!tp()){let{name:u,type:c,value:f}=e;if(c==="image"){let h=u?`${u}.`:"";i.append(`${h}x`,"0"),i.append(`${h}y`,"0")}else u&&i.append(u,f)}}else{if(Bn(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Rn,n=null,o=Vn,s=e}return i&&o==="text/plain"&&(s=i,i=void 0),{action:n,method:r.toLowerCase(),encType:o,formData:i,body:s}}function ei(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function op(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function ip(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function sp(e,t,r){let n=await Promise.all(e.map(async o=>{let i=t.routes[o.route.id];if(i){let s=await op(i,r);return s.links?s.links():[]}return[]}));return cp(n.flat(1).filter(ip).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function va(e,t,r,n,o,i){let s=(l,u)=>r[u]?l.route.id!==r[u].route.id:!0,a=(l,u)=>{var c;return r[u].pathname!==l.pathname||((c=r[u].route.path)==null?void 0:c.endsWith("*"))&&r[u].params["*"]!==l.params["*"]};return i==="assets"?t.filter((l,u)=>s(l,u)||a(l,u)):i==="data"?t.filter((l,u)=>{var f;let c=n.routes[l.route.id];if(!c||!c.hasLoader)return!1;if(s(l,u)||a(l,u))return!0;if(l.route.shouldRevalidate){let h=l.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((f=r[0])==null?void 0:f.params)||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function ap(e,t){return lp(e.map(r=>{let n=t.routes[r.route.id];if(!n)return[];let o=[n.module];return n.imports&&(o=o.concat(n.imports)),o}).flat(1))}function lp(e){return[...new Set(e)]}function up(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function cp(e,t){let r=new Set;return new Set(t),e.reduce((n,o)=>{let i=JSON.stringify(up(o));return r.has(i)||(r.add(i),n.push({key:i,link:o})),n},[])}function fp(e){let t=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return t.pathname==="/"?t.pathname="_root.data":t.pathname=`${t.pathname.replace(/\/$/,"")}.data`,t}function dp(){let e=F.useContext(kr);return ei(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function pp(){let e=F.useContext(In);return ei(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var ti=F.createContext(void 0);ti.displayName="FrameworkContext";function wa(){let e=F.useContext(ti);return ei(e,"You must render this element inside a <HydratedRouter> element"),e}function mp(e,t){let r=F.useContext(ti),[n,o]=F.useState(!1),[i,s]=F.useState(!1),{onFocus:a,onBlur:l,onMouseEnter:u,onMouseLeave:c,onTouchStart:f}=t,h=F.useRef(null);F.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let g=b=>{b.forEach(v=>{s(v.isIntersecting)})},x=new IntersectionObserver(g,{threshold:.5});return h.current&&x.observe(h.current),()=>{x.disconnect()}}},[e]),F.useEffect(()=>{if(n){let g=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(g)}}},[n]);let p=()=>{o(!0)},d=()=>{o(!1),s(!1)};return r?e!=="intent"?[i,h,{}]:[i,h,{onFocus:Yr(a,p),onBlur:Yr(l,d),onMouseEnter:Yr(u,p),onMouseLeave:Yr(c,d),onTouchStart:Yr(f,p)}]:[!1,h,{}]}function Yr(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function hp({page:e,...t}){let{router:r}=dp(),n=F.useMemo(()=>la(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?F.createElement(yp,{page:e,matches:n,...t}):null}function gp(e){let{manifest:t,routeModules:r}=wa(),[n,o]=F.useState([]);return F.useEffect(()=>{let i=!1;return sp(e,t,r).then(s=>{i||o(s)}),()=>{i=!0}},[e,t,r]),n}function yp({page:e,matches:t,...r}){let n=nr(),{manifest:o,routeModules:i}=wa(),{loaderData:s,matches:a}=pp(),l=F.useMemo(()=>va(e,t,a,o,n,"data"),[e,t,a,o,n]),u=F.useMemo(()=>va(e,t,a,o,n,"assets"),[e,t,a,o,n]),c=F.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let p=new Set,d=!1;if(t.forEach(x=>{var v;let b=o.routes[x.route.id];!b||!b.hasLoader||(!l.some(w=>w.route.id===x.route.id)&&x.route.id in s&&((v=i[x.route.id])!=null&&v.shouldRevalidate)||b.hasClientLoader?d=!0:p.add(x.route.id))}),p.size===0)return[];let g=fp(e);return d&&p.size>0&&g.searchParams.set("_routes",t.filter(x=>p.has(x.route.id)).map(x=>x.route.id).join(",")),[g.pathname+g.search]},[s,n,o,l,t,e,i]),f=F.useMemo(()=>ap(u,o),[u,o]),h=gp(u);return F.createElement(F.Fragment,null,c.map(p=>F.createElement("link",{key:p,rel:"prefetch",as:"fetch",href:p,...r})),f.map(p=>F.createElement("link",{key:p,rel:"modulepreload",href:p,...r})),h.map(({key:p,link:d})=>F.createElement("link",{key:p,...d})))}function bp(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var Ea=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Ea&&(window.__reactRouterVersion="7.1.1")}catch{}var Ta=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ri=F.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:o,reloadDocument:i,replace:s,state:a,target:l,to:u,preventScrollReset:c,viewTransition:f,...h},p){let{basename:d}=F.useContext(It),g=typeof u=="string"&&Ta.test(u),x,b=!1;if(typeof u=="string"&&g&&(x=u,Ea))try{let N=new URL(window.location.href),L=u.startsWith("//")?new URL(N.protocol+u):new URL(u),P=rr(L.pathname,d);L.origin===N.origin&&P!=null?u=P+L.search+L.hash:b=!0}catch{Lt(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let v=Pd(u,{relative:o}),[w,_,k]=mp(n,h),S=Ep(u,{replace:s,state:a,target:l,preventScrollReset:c,relative:o,viewTransition:f});function C(N){t&&t(N),N.defaultPrevented||S(N)}let A=F.createElement("a",{...h,...k,href:x||v,onClick:b||i?t:C,ref:bp(p,_),target:l,"data-discover":!g&&r==="render"?"true":void 0});return w&&!g?F.createElement(F.Fragment,null,A,F.createElement(hp,{page:v})):A});ri.displayName="Link";var xp=F.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:o=!1,style:i,to:s,viewTransition:a,children:l,...u},c){let f=Kr(s,{relative:u.relative}),h=nr(),p=F.useContext(In),{navigator:d,basename:g}=F.useContext(It),x=p!=null&&Cp(f)&&a===!0,b=d.encodeLocation?d.encodeLocation(f).pathname:f.pathname,v=h.pathname,w=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;r||(v=v.toLowerCase(),w=w?w.toLowerCase():null,b=b.toLowerCase()),w&&g&&(w=rr(w,g)||w);const _=b!=="/"&&b.endsWith("/")?b.length-1:b.length;let k=v===b||!o&&v.startsWith(b)&&v.charAt(_)==="/",S=w!=null&&(w===b||!o&&w.startsWith(b)&&w.charAt(b.length)==="/"),C={isActive:k,isPending:S,isTransitioning:x},A=k?t:void 0,N;typeof n=="function"?N=n(C):N=[n,k?"active":null,S?"pending":null,x?"transitioning":null].filter(Boolean).join(" ");let L=typeof i=="function"?i(C):i;return F.createElement(ri,{...u,"aria-current":A,className:N,ref:c,style:L,to:s,viewTransition:a},typeof l=="function"?l(C):l)});xp.displayName="NavLink";var vp=F.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:o,state:i,method:s=Rn,action:a,onSubmit:l,relative:u,preventScrollReset:c,viewTransition:f,...h},p)=>{let d=Sp(),g=kp(a,{relative:u}),x=s.toLowerCase()==="get"?"get":"post",b=typeof a=="string"&&Ta.test(a),v=w=>{if(l&&l(w),w.defaultPrevented)return;w.preventDefault();let _=w.nativeEvent.submitter,k=(_==null?void 0:_.getAttribute("formmethod"))||s;d(_||w.currentTarget,{fetcherKey:t,method:k,navigate:r,replace:o,state:i,relative:u,preventScrollReset:c,viewTransition:f})};return F.createElement("form",{ref:p,method:x,action:g,onSubmit:n?l:v,...h,"data-discover":!b&&e==="render"?"true":void 0})});vp.displayName="Form";function wp(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function _a(e){let t=F.useContext(kr);return De(t,wp(e)),t}function Ep(e,{target:t,replace:r,state:n,preventScrollReset:o,relative:i,viewTransition:s}={}){let a=Ld(),l=nr(),u=Kr(e,{relative:i});return F.useCallback(c=>{if(ep(c,t)){c.preventDefault();let f=r!==void 0?r:Wo(l)===Wo(u);a(e,{replace:f,state:n,preventScrollReset:o,relative:i,viewTransition:s})}},[l,a,u,r,n,t,e,o,i,s])}var Tp=0,_p=()=>`__${String(++Tp)}__`;function Sp(){let{router:e}=_a("useSubmit"),{basename:t}=F.useContext(It),r=Wd();return F.useCallback(async(n,o={})=>{let{action:i,method:s,encType:a,formData:l,body:u}=np(n,t);if(o.navigate===!1){let c=o.fetcherKey||_p();await e.fetch(c,r,o.action||i,{preventScrollReset:o.preventScrollReset,formData:l,body:u,formMethod:o.method||s,formEncType:o.encType||a,flushSync:o.flushSync})}else await e.navigate(o.action||i,{preventScrollReset:o.preventScrollReset,formData:l,body:u,formMethod:o.method||s,formEncType:o.encType||a,replace:o.replace,state:o.state,fromRouteId:r,flushSync:o.flushSync,viewTransition:o.viewTransition})},[e,t,r])}function kp(e,{relative:t}={}){let{basename:r}=F.useContext(It),n=F.useContext(Mt);De(n,"useFormAction must be used inside a RouteContext");let[o]=n.matches.slice(-1),i={...Kr(e||".",{relative:t})},s=nr();if(e==null){i.search=s.search;let a=new URLSearchParams(i.search),l=a.getAll("index");if(l.some(c=>c==="")){a.delete("index"),l.filter(f=>f).forEach(f=>a.append("index",f));let c=a.toString();i.search=c?`?${c}`:""}}return(!e||e===".")&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(i.pathname=i.pathname==="/"?r:Dt([r,i.pathname])),Wo(i)}function Cp(e,t={}){let r=F.useContext(ha);De(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=_a("useViewTransitionState"),o=Kr(e,{relative:t.relative});if(!r.isTransitioning)return!1;let i=rr(r.currentLocation.pathname,n)||r.currentLocation.pathname,s=rr(r.nextLocation.pathname,n)||r.nextLocation.pathname;return Dn(o.pathname,s)!=null||Dn(o.pathname,i)!=null}new TextEncoder;const Sa=Object.freeze({left:0,top:0,width:16,height:16}),zn=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ni=Object.freeze({...Sa,...zn}),oi=Object.freeze({...ni,body:"",hidden:!1});function Op(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const n=((e.rotate||0)+(t.rotate||0))%4;return n&&(r.rotate=n),r}function ka(e,t){const r=Op(e,t);for(const n in oi)n in zn?n in e&&!(n in r)&&(r[n]=zn[n]):n in t?r[n]=t[n]:n in e&&(r[n]=e[n]);return r}function Fp(e,t){const r=e.icons,n=e.aliases||Object.create(null),o=Object.create(null);function i(s){if(r[s])return o[s]=[];if(!(s in o)){o[s]=null;const a=n[s]&&n[s].parent,l=a&&i(a);l&&(o[s]=[a].concat(l))}return o[s]}return Object.keys(r).concat(Object.keys(n)).forEach(i),o}function Ap(e,t,r){const n=e.icons,o=e.aliases||Object.create(null);let i={};function s(a){i=ka(n[a]||o[a],i)}return s(t),r.forEach(s),ka(e,i)}function Ca(e,t){const r=[];if(typeof e!="object"||typeof e.icons!="object")return r;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),r.push(o)});const n=Fp(e);for(const o in n){const i=n[o];i&&(t(o,Ap(e,o,i)),r.push(o))}return r}const jp={provider:"",aliases:{},not_found:{},...Sa};function ii(e,t){for(const r in t)if(r in e&&typeof e[r]!=typeof t[r])return!1;return!0}function Oa(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!ii(e,jp))return null;const r=t.icons;for(const o in r){const i=r[o];if(!o||typeof i.body!="string"||!ii(i,oi))return null}const n=t.aliases||Object.create(null);for(const o in n){const i=n[o],s=i.parent;if(!o||typeof s!="string"||!r[s]&&!n[s]||!ii(i,oi))return null}return t}const Fa=/^[a-z0-9]+(-[a-z0-9]+)*$/,Hn=(e,t,r,n="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;n=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const a=o.pop(),l=o.pop(),u={provider:o.length>0?o[0]:n,prefix:l,name:a};return t&&!qn(u)?null:u}const i=o[0],s=i.split("-");if(s.length>1){const a={provider:n,prefix:s.shift(),name:s.join("-")};return t&&!qn(a)?null:a}if(r&&n===""){const a={provider:n,prefix:"",name:i};return t&&!qn(a,r)?null:a}return null},qn=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,Aa=Object.create(null);function $p(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function or(e,t){const r=Aa[e]||(Aa[e]=Object.create(null));return r[t]||(r[t]=$p(e,t))}function si(e,t){return Oa(t)?Ca(t,(r,n)=>{n?e.icons[r]=n:e.missing.add(r)}):[]}function Np(e,t,r){try{if(typeof r.body=="string")return e.icons[t]={...r},!0}catch{}return!1}let Jr=!1;function ja(e){return typeof e=="boolean"&&(Jr=e),Jr}function $a(e){const t=typeof e=="string"?Hn(e,!0,Jr):e;if(t){const r=or(t.provider,t.prefix),n=t.name;return r.icons[n]||(r.missing.has(n)?null:void 0)}}function Pp(e,t){const r=Hn(e,!0,Jr);if(!r)return!1;const n=or(r.provider,r.prefix);return t?Np(n,r.name,t):(n.missing.add(r.name),!0)}function Lp(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),Jr&&!t&&!e.prefix){let o=!1;return Oa(e)&&(e.prefix="",Ca(e,(i,s)=>{Pp(i,s)&&(o=!0)})),o}const r=e.prefix;if(!qn({provider:t,prefix:r,name:"a"}))return!1;const n=or(t,r);return!!si(n,e)}const Na=Object.freeze({width:null,height:null}),Pa=Object.freeze({...Na,...zn}),Dp=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Ip=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function La(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const n=e.split(Dp);if(n===null||!n.length)return e;const o=[];let i=n.shift(),s=Ip.test(i);for(;;){if(s){const a=parseFloat(i);isNaN(a)?o.push(i):o.push(Math.ceil(a*t*r)/r)}else o.push(i);if(i=n.shift(),i===void 0)return o.join("");s=!s}}function Mp(e,t="defs"){let r="";const n=e.indexOf("<"+t);for(;n>=0;){const o=e.indexOf(">",n),i=e.indexOf("</"+t);if(o===-1||i===-1)break;const s=e.indexOf(">",i);if(s===-1)break;r+=e.slice(o+1,i).trim(),e=e.slice(0,n).trim()+e.slice(s+1)}return{defs:r,content:e}}function Rp(e,t){return e?"<defs>"+e+"</defs>"+t:t}function Vp(e,t,r){const n=Mp(e);return Rp(n.defs,t+n.content+r)}const Bp=e=>e==="unset"||e==="undefined"||e==="none";function Up(e,t){const r={...ni,...e},n={...Pa,...t},o={left:r.left,top:r.top,width:r.width,height:r.height};let i=r.body;[r,n].forEach(g=>{const x=[],b=g.hFlip,v=g.vFlip;let w=g.rotate;b?v?w+=2:(x.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),x.push("scale(-1 1)"),o.top=o.left=0):v&&(x.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),x.push("scale(1 -1)"),o.top=o.left=0);let _;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:_=o.height/2+o.top,x.unshift("rotate(90 "+_.toString()+" "+_.toString()+")");break;case 2:x.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:_=o.width/2+o.left,x.unshift("rotate(-90 "+_.toString()+" "+_.toString()+")");break}w%2===1&&(o.left!==o.top&&(_=o.left,o.left=o.top,o.top=_),o.width!==o.height&&(_=o.width,o.width=o.height,o.height=_)),x.length&&(i=Vp(i,'<g transform="'+x.join(" ")+'">',"</g>"))});const s=n.width,a=n.height,l=o.width,u=o.height;let c,f;s===null?(f=a===null?"1em":a==="auto"?u:a,c=La(f,l/u)):(c=s==="auto"?l:s,f=a===null?La(c,u/l):a==="auto"?u:a);const h={},p=(g,x)=>{Bp(x)||(h[g]=x.toString())};p("width",c),p("height",f);const d=[o.left,o.top,l,u];return h.viewBox=d.join(" "),{attributes:h,viewBox:d,body:i}}const zp=/\sid="(\S+)"/g,Hp="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let qp=0;function Wp(e,t=Hp){const r=[];let n;for(;n=zp.exec(e);)r.push(n[1]);if(!r.length)return e;const o="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(i=>{const s=typeof t=="function"?t(i):t+(qp++).toString(),a=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+s+o+"$3")}),e=e.replace(new RegExp(o,"g"),""),e}const ai=Object.create(null);function Kp(e,t){ai[e]=t}function li(e){return ai[e]||ai[""]}function ui(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const ci=Object.create(null),Xr=["https://api.simplesvg.com","https://api.unisvg.com"],Wn=[];for(;Xr.length>0;)Xr.length===1||Math.random()>.5?Wn.push(Xr.shift()):Wn.push(Xr.pop());ci[""]=ui({resources:["https://api.iconify.design"].concat(Wn)});function Yp(e,t){const r=ui(t);return r===null?!1:(ci[e]=r,!0)}function fi(e){return ci[e]}let Da=(()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}})();function Jp(e,t){const r=fi(e);if(!r)return 0;let n;if(!r.maxURL)n=0;else{let o=0;r.resources.forEach(s=>{o=Math.max(o,s.length)});const i=t+".json?icons=";n=r.maxURL-o-r.path.length-i.length}return n}function Xp(e){return e===404}const Gp=(e,t,r)=>{const n=[],o=Jp(e,t),i="icons";let s={type:i,provider:e,prefix:t,icons:[]},a=0;return r.forEach((l,u)=>{a+=l.length+1,a>=o&&u>0&&(n.push(s),s={type:i,provider:e,prefix:t,icons:[]},a=l.length),s.icons.push(l)}),n.push(s),n};function Qp(e){if(typeof e=="string"){const t=fi(e);if(t)return t.path}return"/"}const Zp={prepare:Gp,send:(e,t,r)=>{if(!Da){r("abort",424);return}let n=Qp(t.provider);switch(t.type){case"icons":{const i=t.prefix,a=t.icons.join(","),l=new URLSearchParams({icons:a});n+=i+".json?"+l.toString();break}case"custom":{const i=t.uri;n+=i.slice(0,1)==="/"?i.slice(1):i;break}default:r("abort",400);return}let o=503;Da(e+n).then(i=>{const s=i.status;if(s!==200){setTimeout(()=>{r(Xp(s)?"abort":"next",s)});return}return o=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?r("abort",i):r("next",o)});return}setTimeout(()=>{r("success",i)})}).catch(()=>{r("next",o)})}};function em(e){const t={loaded:[],missing:[],pending:[]},r=Object.create(null);e.sort((o,i)=>o.provider!==i.provider?o.provider.localeCompare(i.provider):o.prefix!==i.prefix?o.prefix.localeCompare(i.prefix):o.name.localeCompare(i.name));let n={provider:"",prefix:"",name:""};return e.forEach(o=>{if(n.name===o.name&&n.prefix===o.prefix&&n.provider===o.provider)return;n=o;const i=o.provider,s=o.prefix,a=o.name,l=r[i]||(r[i]=Object.create(null)),u=l[s]||(l[s]=or(i,s));let c;a in u.icons?c=t.loaded:s===""||u.missing.has(a)?c=t.missing:c=t.pending;const f={provider:i,prefix:s,name:a};c.push(f)}),t}function Ia(e,t){e.forEach(r=>{const n=r.loaderCallbacks;n&&(r.loaderCallbacks=n.filter(o=>o.id!==t))})}function tm(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let r=!1;const n=e.provider,o=e.prefix;t.forEach(i=>{const s=i.icons,a=s.pending.length;s.pending=s.pending.filter(l=>{if(l.prefix!==o)return!0;const u=l.name;if(e.icons[u])s.loaded.push({provider:n,prefix:o,name:u});else if(e.missing.has(u))s.missing.push({provider:n,prefix:o,name:u});else return r=!0,!0;return!1}),s.pending.length!==a&&(r||Ia([e],i.id),i.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),i.abort))})}))}let rm=0;function nm(e,t,r){const n=rm++,o=Ia.bind(null,r,n);if(!t.pending.length)return o;const i={id:n,icons:t,callback:e,abort:o};return r.forEach(s=>{(s.loaderCallbacks||(s.loaderCallbacks=[])).push(i)}),o}function om(e,t=!0,r=!1){const n=[];return e.forEach(o=>{const i=typeof o=="string"?Hn(o,t,r):o;i&&n.push(i)}),n}var im={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function sm(e,t,r,n){const o=e.resources.length,i=e.random?Math.floor(Math.random()*o):e.index;let s;if(e.random){let S=e.resources.slice(0);for(s=[];S.length>1;){const C=Math.floor(Math.random()*S.length);s.push(S[C]),S=S.slice(0,C).concat(S.slice(C+1))}s=s.concat(S)}else s=e.resources.slice(i).concat(e.resources.slice(0,i));const a=Date.now();let l="pending",u=0,c,f=null,h=[],p=[];typeof n=="function"&&p.push(n);function d(){f&&(clearTimeout(f),f=null)}function g(){l==="pending"&&(l="aborted"),d(),h.forEach(S=>{S.status==="pending"&&(S.status="aborted")}),h=[]}function x(S,C){C&&(p=[]),typeof S=="function"&&p.push(S)}function b(){return{startTime:a,payload:t,status:l,queriesSent:u,queriesPending:h.length,subscribe:x,abort:g}}function v(){l="failed",p.forEach(S=>{S(void 0,c)})}function w(){h.forEach(S=>{S.status==="pending"&&(S.status="aborted")}),h=[]}function _(S,C,A){const N=C!=="success";switch(h=h.filter(L=>L!==S),l){case"pending":break;case"failed":if(N||!e.dataAfterTimeout)return;break;default:return}if(C==="abort"){c=A,v();return}if(N){c=A,h.length||(s.length?k():v());return}if(d(),w(),!e.random){const L=e.resources.indexOf(S.resource);L!==-1&&L!==e.index&&(e.index=L)}l="completed",p.forEach(L=>{L(A)})}function k(){if(l!=="pending")return;d();const S=s.shift();if(S===void 0){if(h.length){f=setTimeout(()=>{d(),l==="pending"&&(w(),v())},e.timeout);return}v();return}const C={status:"pending",resource:S,callback:(A,N)=>{_(C,A,N)}};h.push(C),u++,f=setTimeout(k,e.rotate),r(S,t,C.callback)}return setTimeout(k),b}function Ma(e){const t={...im,...e};let r=[];function n(){r=r.filter(a=>a().status==="pending")}function o(a,l,u){const c=sm(t,a,l,(f,h)=>{n(),u&&u(f,h)});return r.push(c),c}function i(a){return r.find(l=>a(l))||null}return{query:o,find:i,setIndex:a=>{t.index=a},getIndex:()=>t.index,cleanup:n}}function Ra(){}const di=Object.create(null);function am(e){if(!di[e]){const t=fi(e);if(!t)return;const r=Ma(t),n={config:t,redundancy:r};di[e]=n}return di[e]}function lm(e,t,r){let n,o;if(typeof e=="string"){const i=li(e);if(!i)return r(void 0,424),Ra;o=i.send;const s=am(e);s&&(n=s.redundancy)}else{const i=ui(e);if(i){n=Ma(i);const s=e.resources?e.resources[0]:"",a=li(s);a&&(o=a.send)}}return!n||!o?(r(void 0,424),Ra):n.query(t,o,r)().abort}const Va="iconify2",Gr="iconify",Ba=Gr+"-count",Ua=Gr+"-version",za=36e5,um=168,cm=50;function pi(e,t){try{return e.getItem(t)}catch{}}function mi(e,t,r){try{return e.setItem(t,r),!0}catch{}}function Ha(e,t){try{e.removeItem(t)}catch{}}function hi(e,t){return mi(e,Ba,t.toString())}function gi(e){return parseInt(pi(e,Ba))||0}const Kn={local:!0,session:!0},qa={local:new Set,session:new Set};let yi=!1;function fm(e){yi=e}let Yn=typeof window>"u"?{}:window;function Wa(e){const t=e+"Storage";try{if(Yn&&Yn[t]&&typeof Yn[t].length=="number")return Yn[t]}catch{}Kn[e]=!1}function Ka(e,t){const r=Wa(e);if(!r)return;const n=pi(r,Ua);if(n!==Va){if(n){const a=gi(r);for(let l=0;l<a;l++)Ha(r,Gr+l.toString())}mi(r,Ua,Va),hi(r,0);return}const o=Math.floor(Date.now()/za)-um,i=a=>{const l=Gr+a.toString(),u=pi(r,l);if(typeof u=="string"){try{const c=JSON.parse(u);if(typeof c=="object"&&typeof c.cached=="number"&&c.cached>o&&typeof c.provider=="string"&&typeof c.data=="object"&&typeof c.data.prefix=="string"&&t(c,a))return!0}catch{}Ha(r,l)}};let s=gi(r);for(let a=s-1;a>=0;a--)i(a)||(a===s-1?(s--,hi(r,s)):qa[e].add(a))}function Ya(){if(!yi){fm(!0);for(const e in Kn)Ka(e,t=>{const r=t.data,n=t.provider,o=r.prefix,i=or(n,o);if(!si(i,r).length)return!1;const s=r.lastModified||-1;return i.lastModifiedCached=i.lastModifiedCached?Math.min(i.lastModifiedCached,s):s,!0})}}function dm(e,t){const r=e.lastModifiedCached;if(r&&r>=t)return r===t;if(e.lastModifiedCached=t,r)for(const n in Kn)Ka(n,o=>{const i=o.data;return o.provider!==e.provider||i.prefix!==e.prefix||i.lastModified===t});return!0}function pm(e,t){yi||Ya();function r(n){let o;if(!Kn[n]||!(o=Wa(n)))return;const i=qa[n];let s;if(i.size)i.delete(s=Array.from(i).shift());else if(s=gi(o),s>=cm||!hi(o,s+1))return;const a={cached:Math.floor(Date.now()/za),provider:e.provider,data:t};return mi(o,Gr+s.toString(),JSON.stringify(a))}t.lastModified&&!dm(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),r("local")||r("session"))}function Ja(){}function mm(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,tm(e)}))}function hm(e){const t=[],r=[];return e.forEach(n=>{(n.match(Fa)?t:r).push(n)}),{valid:t,invalid:r}}function Qr(e,t,r,n){function o(){const i=e.pendingIcons;t.forEach(s=>{i&&i.delete(s),e.icons[s]||e.missing.add(s)})}if(r&&typeof r=="object")try{if(!si(e,r).length){o();return}n&&pm(e,r)}catch(i){console.error(i)}o(),mm(e)}function Xa(e,t){e instanceof Promise?e.then(r=>{t(r)}).catch(()=>{t(null)}):t(e)}function gm(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:r,prefix:n}=e,o=e.iconsToLoad;if(delete e.iconsToLoad,!o||!o.length)return;const i=e.loadIcon;if(e.loadIcons&&(o.length>1||!i)){Xa(e.loadIcons(o,n,r),c=>{Qr(e,o,c,!1)});return}if(i){o.forEach(c=>{const f=i(c,n,r);Xa(f,h=>{const p=h?{prefix:n,icons:{[c]:h}}:null;Qr(e,[c],p,!1)})});return}const{valid:s,invalid:a}=hm(o);if(a.length&&Qr(e,a,null,!1),!s.length)return;const l=n.match(Fa)?li(r):null;if(!l){Qr(e,s,null,!1);return}l.prepare(r,n,s).forEach(c=>{lm(r,c,f=>{Qr(e,c.icons,f,!0)})})}))}const ym=(e,t)=>{const r=om(e,!0,ja()),n=em(r);if(!n.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(n.loaded,n.missing,n.pending,Ja)}),()=>{l=!1}}const o=Object.create(null),i=[];let s,a;return n.pending.forEach(l=>{const{provider:u,prefix:c}=l;if(c===a&&u===s)return;s=u,a=c,i.push(or(u,c));const f=o[u]||(o[u]=Object.create(null));f[c]||(f[c]=[])}),n.pending.forEach(l=>{const{provider:u,prefix:c,name:f}=l,h=or(u,c),p=h.pendingIcons||(h.pendingIcons=new Set);p.has(f)||(p.add(f),o[u][c].push(f))}),i.forEach(l=>{const u=o[l.provider][l.prefix];u.length&&gm(l,u)}),t?nm(t,n,i):Ja};function bm(e,t){const r={...e};for(const n in t){const o=t[n],i=typeof o;n in Na?(o===null||o&&(i==="string"||i==="number"))&&(r[n]=o):i===typeof r[n]&&(r[n]=n==="rotate"?o%4:o)}return r}const xm=/[\s,]+/;function vm(e,t){t.split(xm).forEach(r=>{switch(r.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function wm(e,t=0){const r=e.replace(/^-?[0-9.]*/,"");function n(o){for(;o<0;)o+=4;return o%4}if(r===""){const o=parseInt(e);return isNaN(o)?0:n(o)}else if(r!==e){let o=0;switch(r){case"%":o=25;break;case"deg":o=90}if(o){let i=parseFloat(e.slice(0,e.length-r.length));return isNaN(i)?0:(i=i/o,i%1===0?n(i):0)}}return t}function Em(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in t)r+=" "+n+'="'+t[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}function Tm(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function _m(e){return"data:image/svg+xml,"+Tm(e)}function Sm(e){return'url("'+_m(e)+'")'}let Zr;function km(){try{Zr=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Zr=null}}function Cm(e){return Zr===void 0&&km(),Zr?Zr.createHTML(e):e}const Ga={...Pa,inline:!1},Om={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Fm={display:"inline-block"},bi={backgroundColor:"currentColor"},Qa={backgroundColor:"transparent"},Za={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},el={WebkitMask:bi,mask:bi,background:Qa};for(const e in el){const t=el[e];for(const r in Za)t[e+r]=Za[r]}const Am={...Ga,inline:!0};function tl(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const jm=(e,t,r)=>{const n=t.inline?Am:Ga,o=bm(n,t),i=t.mode||"svg",s={},a=t.style||{},l={...i==="svg"?Om:{}};if(r){const x=Hn(r,!1,!0);if(x){const b=["iconify"],v=["provider","prefix"];for(const w of v)x[w]&&b.push("iconify--"+x[w]);l.className=b.join(" ")}}for(let x in t){const b=t[x];if(b!==void 0)switch(x){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":break;case"_ref":l.ref=b;break;case"className":l[x]=(l[x]?l[x]+" ":"")+b;break;case"inline":case"hFlip":case"vFlip":o[x]=b===!0||b==="true"||b===1;break;case"flip":typeof b=="string"&&vm(o,b);break;case"color":s.color=b;break;case"rotate":typeof b=="string"?o[x]=wm(b):typeof b=="number"&&(o[x]=b);break;case"ariaHidden":case"aria-hidden":b!==!0&&b!=="true"&&delete l["aria-hidden"];break;default:n[x]===void 0&&(l[x]=b)}}const u=Up(e,o),c=u.attributes;if(o.inline&&(s.verticalAlign="-0.125em"),i==="svg"){l.style={...s,...a},Object.assign(l,c);let x=0,b=t.id;return typeof b=="string"&&(b=b.replace(/-/g,"_")),l.dangerouslySetInnerHTML={__html:Cm(Wp(u.body,b?()=>b+"ID"+x++:"iconifyReact"))},m.createElement("svg",l)}const{body:f,width:h,height:p}=e,d=i==="mask"||(i==="bg"?!1:f.indexOf("currentColor")!==-1),g=Em(f,{...c,width:h+"",height:p+""});return l.style={...s,"--svg":Sm(g),width:tl(c.width),height:tl(c.height),...Fm,...d?bi:Qa,...a},m.createElement("span",l)};if(ja(!0),Kp("",Zp),typeof document<"u"&&typeof window<"u"){Ya();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,r="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(n=>{try{(typeof n!="object"||n===null||n instanceof Array||typeof n.icons!="object"||typeof n.prefix!="string"||!Lp(n))&&console.error(r)}catch{console.error(r)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let r in t){const n="IconifyProviders["+r+"] is invalid.";try{const o=t[r];if(typeof o!="object"||!o||o.resources===void 0)continue;Yp(r,o)||console.error(n)}catch{console.error(n)}}}}function rl(e){const[t,r]=m.useState(!!e.ssr),[n,o]=m.useState({});function i(p){if(p){const d=e.icon;if(typeof d=="object")return{name:"",data:d};const g=$a(d);if(g)return{name:d,data:g}}return{name:""}}const[s,a]=m.useState(i(!!e.ssr));function l(){const p=n.callback;p&&(p(),o({}))}function u(p){if(JSON.stringify(s)!==JSON.stringify(p))return l(),a(p),!0}function c(){var p;const d=e.icon;if(typeof d=="object"){u({name:"",data:d});return}const g=$a(d);if(u({name:d,data:g}))if(g===void 0){const x=ym([d],c);o({callback:x})}else g&&((p=e.onLoad)===null||p===void 0||p.call(e,d))}m.useEffect(()=>(r(!0),l),[]),m.useEffect(()=>{t&&c()},[e.icon,t]);const{name:f,data:h}=s;return h?jm({...ni,...h},e,f):e.children?e.children:m.createElement("span",{})}const $m=m.forwardRef((e,t)=>rl({...e,_ref:t}));m.forwardRef((e,t)=>rl({inline:!0,...e,_ref:t}));function Be({icon:e,iconClass:t}){return y.jsx(y.Fragment,{children:y.jsx($m,{icon:e,className:t})})}const Cr=({text:e="",isDisabled:t=!1,isLoading:r=!1,btnClass:n="bg-primary-500 text-white",icon:o="",iconPosition:i="left",iconClass:s="text-[20px]",loadingClass:a="",link:l="",div:u=!1,type:c="button",style:f,onClick:h})=>{const p=`
44
44
  btn inline-flex justify-center
45
45
  ${r?" pointer-events-none":""}
46
46
  ${t?" opacity-40 cursor-not-allowed":""}
47
47
  ${n}
48
- `,d=()=>r?y.jsxs(y.Fragment,{children:[y.jsxs("svg",{className:`animate-spin -ml-1 mr-3 h-5 w-5 ${a}`,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[y.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),y.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Loading..."]}):y.jsxs("span",{className:"flex items-center",children:[o&&i==="left"&&y.jsx("span",{className:`mr-2 ${s}`,children:y.jsx(Be,{icon:o})}),e&&y.jsx("span",{children:e}),o&&i==="right"&&y.jsx("span",{className:`ml-2 ${s}`,children:y.jsx(Be,{icon:o})})]});return u?y.jsx("div",{className:p,children:d()}):l?y.jsx(ti,{to:l,className:p,children:d()}):y.jsx("button",{disabled:t,type:c,className:p,"data-testid":"btn",onClick:h,style:f,children:d()})},Ie=[];for(let e=0;e<256;++e)Ie.push((e+256).toString(16).slice(1));function Nm(e,t=0){return(Ie[e[t+0]]+Ie[e[t+1]]+Ie[e[t+2]]+Ie[e[t+3]]+"-"+Ie[e[t+4]]+Ie[e[t+5]]+"-"+Ie[e[t+6]]+Ie[e[t+7]]+"-"+Ie[e[t+8]]+Ie[e[t+9]]+"-"+Ie[e[t+10]]+Ie[e[t+11]]+Ie[e[t+12]]+Ie[e[t+13]]+Ie[e[t+14]]+Ie[e[t+15]]).toLowerCase()}let bi;const Lm=new Uint8Array(16);function Pm(){if(!bi){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");bi=crypto.getRandomValues.bind(crypto)}return bi(Lm)}const nl={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function en(e,t,r){if(nl.randomUUID&&!t&&!e)return nl.randomUUID();e=e||{};const n=e.random||(e.rng||Pm)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Nm(n)}const mt=m.createContext(void 0),ol={title:"",description:"",id:en(),questionData:[]},Dm=({children:e})=>{const[t,r]=m.useState({}),[n,o]=m.useState([ol]),[i,s]=m.useState(!1),[a,l]=m.useState(null),u=m.useCallback(()=>{},[]),c=m.useCallback(()=>{const v=en();o(w=>[...w,{...ol,id:v}]),l(v)},[]),f=m.useCallback(v=>{o(w=>w.filter(_=>_.id!==v))},[]),h=m.useCallback((v,w)=>{o(_=>_.map(k=>k.id===w?{...k,questionData:k.questionData.filter(S=>S.id!==v)}:k))},[]),p=m.useCallback((v,w)=>{o(_=>_.map(k=>k.id===w?{...k,questionData:v}:k))},[]),d=m.useCallback((v,w)=>{o(_=>_.map(k=>k.id===w?{...k,questionData:[...k.questionData,v]}:k))},[]),g=m.useCallback((v,w)=>{o(_=>_.map(k=>k.id===w?{...k,questionData:k.questionData.map(S=>S.id===v.id?{...S,...v}:S)}:k))},[]),x=m.useCallback((v,w)=>{o(_=>_.map(k=>k.id===w?{...k,...v}:k))},[]),b=m.useMemo(()=>({formData:n,setFormData:o,handleDragStop:u,removeElement:h,elementData:t,setElementData:r,updateElementPosition:p,addElement:d,updateElement:g,addSection:c,removeSection:f,updateSection:x,isDragging:i,setIsDragging:s,selectedSection:a,setSelectedSection:l}),[n,u,h,t,p,d,g,c,f,x,i,a]);return y.jsx(mt.Provider,{value:b,children:e})},xi=e=>{const t=typeof window<"u"?localStorage.getItem(e):"";try{return JSON.parse(t)}catch{return t}},il=(e,t)=>{const r=typeof t!="string"?JSON.stringify(t):t;return localStorage.setItem(e,r)};function Im({onSubmit:e}){const{formData:t}=m.useContext(mt),r=xi("config");function n(){localStorage.setItem("formData",JSON.stringify(t)),e(t),ue.success("Saved successfully")}return y.jsx("div",{className:"px-[30px] py-8 flex justify-end items-center",children:y.jsx(Cr,{onClick:()=>n(),text:"Save Form",style:{background:(r==null?void 0:r.buttonColor)||"#333"},btnClass:"text-gray-700 border-[#98A2B3] !font-medium !py-[10px] px-10 bg-blue-600 text-white rounded-lg"})})}function sl({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return y.jsx("input",{placeholder:e.placeholder,type:e.inputType,className:"input-control",...r(e.id)})}function Jn({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return y.jsx("div",{children:y.jsx("input",{placeholder:(e==null?void 0:e.placeholder)||"",type:(e==null?void 0:e.inputType)||"text",className:"input-control",...r(e==null?void 0:e.id)})})}const al=typeof document<"u"?m.useLayoutEffect:()=>{};function Mm(e){const t=m.useRef(null);return al(()=>{t.current=e},[e]),m.useCallback((...r)=>{const n=t.current;return n==null?void 0:n(...r)},[])}const tn=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},ir=e=>e&&"window"in e&&e.window===e?e:tn(e).defaultView||window;function Rm(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(r=>e.test(r.brand)))||e.test(window.navigator.userAgent)}function Vm(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function ll(e){let t=null;return()=>(t==null&&(t=e()),t)}const Bm=ll(function(){return Vm(/^Mac/i)}),Um=ll(function(){return Rm(/Android/i)});function zm(e){return e.mozInputSource===0&&e.isTrusted?!0:Um()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}class Hm{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(t,r){this.nativeEvent=r,this.target=r.target,this.currentTarget=r.currentTarget,this.relatedTarget=r.relatedTarget,this.bubbles=r.bubbles,this.cancelable=r.cancelable,this.defaultPrevented=r.defaultPrevented,this.eventPhase=r.eventPhase,this.isTrusted=r.isTrusted,this.timeStamp=r.timeStamp,this.type=t}}function ul(e){let t=m.useRef({isFocused:!1,observer:null});al(()=>{const n=t.current;return()=>{n.observer&&(n.observer.disconnect(),n.observer=null)}},[]);let r=Mm(n=>{e==null||e(n)});return m.useCallback(n=>{if(n.target instanceof HTMLButtonElement||n.target instanceof HTMLInputElement||n.target instanceof HTMLTextAreaElement||n.target instanceof HTMLSelectElement){t.current.isFocused=!0;let o=n.target,i=s=>{t.current.isFocused=!1,o.disabled&&r(new Hm("blur",s)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};o.addEventListener("focusout",i,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&o.disabled){var s;(s=t.current.observer)===null||s===void 0||s.disconnect();let a=o===document.activeElement?null:document.activeElement;o.dispatchEvent(new FocusEvent("blur",{relatedTarget:a})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:a}))}}),t.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[r])}function qm(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:o}=e;const i=m.useCallback(l=>{if(l.target===l.currentTarget)return n&&n(l),o&&o(!1),!0},[n,o]),s=ul(i),a=m.useCallback(l=>{const u=tn(l.target);l.target===l.currentTarget&&u.activeElement===l.target&&(r&&r(l),o&&o(!0),s(l))},[o,r,s]);return{focusProps:{onFocus:!t&&(r||o||n)?a:void 0,onBlur:!t&&(n||o)?i:void 0}}}let rn=null,vi=new Set,nn=new Map,sr=!1,wi=!1;const Wm={Tab:!0,Escape:!0};function Ei(e,t){for(let r of vi)r(e,t)}function Km(e){return!(e.metaKey||!Bm()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Xn(e){sr=!0,Km(e)&&(rn="keyboard",Ei("keyboard",e))}function ct(e){rn="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(sr=!0,Ei("pointer",e))}function cl(e){zm(e)&&(sr=!0,rn="virtual")}function fl(e){e.target===window||e.target===document||(!sr&&!wi&&(rn="virtual",Ei("virtual",e)),sr=!1,wi=!1)}function dl(){sr=!1,wi=!0}function Ti(e){if(typeof window>"u"||nn.get(ir(e)))return;const t=ir(e),r=tn(e);let n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){sr=!0,n.apply(this,arguments)},r.addEventListener("keydown",Xn,!0),r.addEventListener("keyup",Xn,!0),r.addEventListener("click",cl,!0),t.addEventListener("focus",fl,!0),t.addEventListener("blur",dl,!1),typeof PointerEvent<"u"?(r.addEventListener("pointerdown",ct,!0),r.addEventListener("pointermove",ct,!0),r.addEventListener("pointerup",ct,!0)):(r.addEventListener("mousedown",ct,!0),r.addEventListener("mousemove",ct,!0),r.addEventListener("mouseup",ct,!0)),t.addEventListener("beforeunload",()=>{pl(e)},{once:!0}),nn.set(t,{focus:n})}const pl=(e,t)=>{const r=ir(e),n=tn(e);t&&n.removeEventListener("DOMContentLoaded",t),nn.has(r)&&(r.HTMLElement.prototype.focus=nn.get(r).focus,n.removeEventListener("keydown",Xn,!0),n.removeEventListener("keyup",Xn,!0),n.removeEventListener("click",cl,!0),r.removeEventListener("focus",fl,!0),r.removeEventListener("blur",dl,!1),typeof PointerEvent<"u"?(n.removeEventListener("pointerdown",ct,!0),n.removeEventListener("pointermove",ct,!0),n.removeEventListener("pointerup",ct,!0)):(n.removeEventListener("mousedown",ct,!0),n.removeEventListener("mousemove",ct,!0),n.removeEventListener("mouseup",ct,!0)),nn.delete(r))};function Ym(e){const t=tn(e);let r;return t.readyState!=="loading"?Ti(e):(r=()=>{Ti(e)},t.addEventListener("DOMContentLoaded",r)),()=>pl(e,r)}typeof document<"u"&&Ym();function ml(){return rn!=="pointer"}const Jm=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Xm(e,t,r){var n;const o=typeof window<"u"?ir(r==null?void 0:r.target).HTMLInputElement:HTMLInputElement,i=typeof window<"u"?ir(r==null?void 0:r.target).HTMLTextAreaElement:HTMLTextAreaElement,s=typeof window<"u"?ir(r==null?void 0:r.target).HTMLElement:HTMLElement,a=typeof window<"u"?ir(r==null?void 0:r.target).KeyboardEvent:KeyboardEvent;return e=e||(r==null?void 0:r.target)instanceof o&&!Jm.has(r==null||(n=r.target)===null||n===void 0?void 0:n.type)||(r==null?void 0:r.target)instanceof i||(r==null?void 0:r.target)instanceof s&&(r==null?void 0:r.target.isContentEditable),!(e&&t==="keyboard"&&r instanceof a&&!Wm[r.key])}function Gm(e,t,r){Ti(),m.useEffect(()=>{let n=(o,i)=>{Xm(!!(r!=null&&r.isTextInput),o,i)&&e(ml())};return vi.add(n),()=>{vi.delete(n)}},t)}function Qm(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:o}=e,i=m.useRef({isFocusWithin:!1}),s=m.useCallback(u=>{i.current.isFocusWithin&&!u.currentTarget.contains(u.relatedTarget)&&(i.current.isFocusWithin=!1,r&&r(u),o&&o(!1))},[r,o,i]),a=ul(s),l=m.useCallback(u=>{!i.current.isFocusWithin&&document.activeElement===u.target&&(n&&n(u),o&&o(!0),i.current.isFocusWithin=!0,a(u))},[n,o,a]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:s}}}let Gn=!1,_i=0;function Si(){Gn=!0,setTimeout(()=>{Gn=!1},50)}function hl(e){e.pointerType==="touch"&&Si()}function Zm(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",hl):document.addEventListener("touchend",Si),_i++,()=>{_i--,!(_i>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",hl):document.removeEventListener("touchend",Si))}}function eh(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:o}=e,[i,s]=m.useState(!1),a=m.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;m.useEffect(Zm,[]);let{hoverProps:l,triggerHoverEnd:u}=m.useMemo(()=>{let c=(p,d)=>{if(a.pointerType=d,o||d==="touch"||a.isHovered||!p.currentTarget.contains(p.target))return;a.isHovered=!0;let g=p.currentTarget;a.target=g,t&&t({type:"hoverstart",target:g,pointerType:d}),r&&r(!0),s(!0)},f=(p,d)=>{if(a.pointerType="",a.target=null,d==="touch"||!a.isHovered)return;a.isHovered=!1;let g=p.currentTarget;n&&n({type:"hoverend",target:g,pointerType:d}),r&&r(!1),s(!1)},h={};return typeof PointerEvent<"u"?(h.onPointerEnter=p=>{Gn&&p.pointerType==="mouse"||c(p,p.pointerType)},h.onPointerLeave=p=>{!o&&p.currentTarget.contains(p.target)&&f(p,p.pointerType)}):(h.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},h.onMouseEnter=p=>{!a.ignoreEmulatedMouseEvents&&!Gn&&c(p,"mouse"),a.ignoreEmulatedMouseEvents=!1},h.onMouseLeave=p=>{!o&&p.currentTarget.contains(p.target)&&f(p,"mouse")}),{hoverProps:h,triggerHoverEnd:f}},[t,r,n,o,a]);return m.useEffect(()=>{o&&u({currentTarget:a.target},a.pointerType)},[o]),{hoverProps:l,isHovered:i}}function th(e={}){let{autoFocus:t=!1,isTextInput:r,within:n}=e,o=m.useRef({isFocused:!1,isFocusVisible:t||ml()}),[i,s]=m.useState(!1),[a,l]=m.useState(()=>o.current.isFocused&&o.current.isFocusVisible),u=m.useCallback(()=>l(o.current.isFocused&&o.current.isFocusVisible),[]),c=m.useCallback(p=>{o.current.isFocused=p,s(p),u()},[u]);Gm(p=>{o.current.isFocusVisible=p,u()},[],{isTextInput:r});let{focusProps:f}=qm({isDisabled:n,onFocusChange:c}),{focusWithinProps:h}=Qm({isDisabled:!n,onFocusWithinChange:c});return{isFocused:i,isFocusVisible:a,focusProps:n?h:f}}var rh=Object.defineProperty,nh=(e,t,r)=>t in e?rh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ki=(e,t,r)=>(nh(e,typeof t!="symbol"?t+"":t,r),r);let oh=class{constructor(){ki(this,"current",this.detect()),ki(this,"handoffState","pending"),ki(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},ar=new oh;function on(e){return ar.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}function gl(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Rt(){let e=[],t={addEventListener(r,n,o,i){return r.addEventListener(n,o,i),t.add(()=>r.removeEventListener(n,o,i))},requestAnimationFrame(...r){let n=requestAnimationFrame(...r);return t.add(()=>cancelAnimationFrame(n))},nextFrame(...r){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...r))},setTimeout(...r){let n=setTimeout(...r);return t.add(()=>clearTimeout(n))},microTask(...r){let n={current:!0};return gl(()=>{n.current&&r[0]()}),t.add(()=>{n.current=!1})},style(r,n,o){let i=r.style.getPropertyValue(n);return Object.assign(r.style,{[n]:o}),this.add(()=>{Object.assign(r.style,{[n]:i})})},group(r){let n=Rt();return r(n),this.add(()=>n.dispose())},add(r){return e.includes(r)||e.push(r),()=>{let n=e.indexOf(r);if(n>=0)for(let o of e.splice(n,1))o()}},dispose(){for(let r of e.splice(0))r()}};return t}function lr(){let[e]=m.useState(Rt);return m.useEffect(()=>()=>e.dispose(),[e]),e}let he=(e,t)=>{ar.isServer?m.useEffect(e,t):m.useLayoutEffect(e,t)};function ur(e){let t=m.useRef(e);return he(()=>{t.current=e},[e]),t}let te=function(e){let t=ur(e);return m.useCallback((...r)=>t.current(...r),[t])};function ih(e){let t=e.width/2,r=e.height/2;return{top:e.clientY-r,right:e.clientX+t,bottom:e.clientY+r,left:e.clientX-t}}function sh(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}function ah({disabled:e=!1}={}){let t=m.useRef(null),[r,n]=m.useState(!1),o=lr(),i=te(()=>{t.current=null,n(!1),o.dispose()}),s=te(a=>{if(o.dispose(),t.current===null){t.current=a.currentTarget,n(!0);{let l=on(a.currentTarget);o.addEventListener(l,"pointerup",i,!1),o.addEventListener(l,"pointermove",u=>{if(t.current){let c=ih(u);n(sh(c,t.current.getBoundingClientRect()))}},!1),o.addEventListener(l,"pointercancel",i,!1)}}});return{pressed:r,pressProps:e?{}:{onPointerDown:s,onPointerUp:i,onClick:i}}}let lh=m.createContext(void 0);function Ci(){return m.useContext(lh)}function Oi(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function ht(e,t,...r){if(e in t){let o=t[e];return typeof o=="function"?o(...r):o}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,ht),n}var Qn=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Qn||{}),Wt=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Wt||{});function ot(){let e=ch();return m.useCallback(t=>uh({mergeRefs:e,...t}),[e])}function uh({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:o,visible:i=!0,name:s,mergeRefs:a}){a=a??fh;let l=yl(t,e);if(i)return Zn(l,r,n,s,a);let u=o??0;if(u&2){let{static:c=!1,...f}=l;if(c)return Zn(f,r,n,s,a)}if(u&1){let{unmount:c=!0,...f}=l;return ht(c?0:1,{0(){return null},1(){return Zn({...f,hidden:!0,style:{display:"none"}},r,n,s,a)}})}return Zn(l,r,n,s,a)}function Zn(e,t={},r,n,o){let{as:i=r,children:s,refName:a="ref",...l}=Fi(e,["unmount","static"]),u=e.ref!==void 0?{[a]:e.ref}:{},c=typeof s=="function"?s(t):s;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let f={};if(t){let h=!1,p=[];for(let[d,g]of Object.entries(t))typeof g=="boolean"&&(h=!0),g===!0&&p.push(d.replace(/([A-Z])/g,x=>`-${x.toLowerCase()}`));if(h){f["data-headlessui-state"]=p.join(" ");for(let d of p)f[`data-${d}`]=""}}if(i===m.Fragment&&(Object.keys(Kt(l)).length>0||Object.keys(Kt(f)).length>0))if(!m.isValidElement(c)||Array.isArray(c)&&c.length>1){if(Object.keys(Kt(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Kt(l)).concat(Object.keys(Kt(f))).map(h=>` - ${h}`).join(`
48
+ `,d=()=>r?y.jsxs(y.Fragment,{children:[y.jsxs("svg",{className:`animate-spin -ml-1 mr-3 h-5 w-5 ${a}`,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[y.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),y.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Loading..."]}):y.jsxs("span",{className:"flex items-center",children:[o&&i==="left"&&y.jsx("span",{className:`mr-2 ${s}`,children:y.jsx(Be,{icon:o})}),e&&y.jsx("span",{children:e}),o&&i==="right"&&y.jsx("span",{className:`ml-2 ${s}`,children:y.jsx(Be,{icon:o})})]});return u?y.jsx("div",{className:p,children:d()}):l?y.jsx(ri,{to:l,className:p,children:d()}):y.jsx("button",{disabled:t,type:c,className:p,"data-testid":"btn",onClick:h,style:f,children:d()})},Ie=[];for(let e=0;e<256;++e)Ie.push((e+256).toString(16).slice(1));function Nm(e,t=0){return(Ie[e[t+0]]+Ie[e[t+1]]+Ie[e[t+2]]+Ie[e[t+3]]+"-"+Ie[e[t+4]]+Ie[e[t+5]]+"-"+Ie[e[t+6]]+Ie[e[t+7]]+"-"+Ie[e[t+8]]+Ie[e[t+9]]+"-"+Ie[e[t+10]]+Ie[e[t+11]]+Ie[e[t+12]]+Ie[e[t+13]]+Ie[e[t+14]]+Ie[e[t+15]]).toLowerCase()}let xi;const Pm=new Uint8Array(16);function Lm(){if(!xi){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");xi=crypto.getRandomValues.bind(crypto)}return xi(Pm)}const nl={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function en(e,t,r){if(nl.randomUUID&&!t&&!e)return nl.randomUUID();e=e||{};const n=e.random||(e.rng||Lm)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Nm(n)}const mt=m.createContext(void 0),ol={title:"",description:"",id:en(),questionData:[]},Dm=({children:e})=>{const[t,r]=m.useState({}),[n,o]=m.useState([ol]),[i,s]=m.useState(!1),[a,l]=m.useState(null),u=m.useCallback(()=>{},[]),c=m.useCallback(()=>{const v=en();o(w=>[...w,{...ol,id:v}]),l(v)},[]),f=m.useCallback(v=>{o(w=>w.filter(_=>_.id!==v))},[]),h=m.useCallback((v,w)=>{o(_=>_.map(k=>k.id===w?{...k,questionData:k.questionData.filter(S=>S.id!==v)}:k))},[]),p=m.useCallback((v,w)=>{o(_=>_.map(k=>k.id===w?{...k,questionData:v}:k))},[]),d=m.useCallback((v,w)=>{o(_=>_.map(k=>k.id===w?{...k,questionData:[...k.questionData,v]}:k))},[]),g=m.useCallback((v,w)=>{o(_=>_.map(k=>k.id===w?{...k,questionData:k.questionData.map(S=>S.id===v.id?{...S,...v}:S)}:k))},[]),x=m.useCallback((v,w)=>{o(_=>_.map(k=>k.id===w?{...k,...v}:k))},[]),b=m.useMemo(()=>({formData:n,setFormData:o,handleDragStop:u,removeElement:h,elementData:t,setElementData:r,updateElementPosition:p,addElement:d,updateElement:g,addSection:c,removeSection:f,updateSection:x,isDragging:i,setIsDragging:s,selectedSection:a,setSelectedSection:l}),[n,u,h,t,p,d,g,c,f,x,i,a]);return y.jsx(mt.Provider,{value:b,children:e})},Jn=e=>{const t=typeof window<"u"?localStorage.getItem(e):"";try{return JSON.parse(t)}catch{return t}},il=(e,t)=>{const r=typeof t!="string"?JSON.stringify(t):t;return localStorage.setItem(e,r)};function Im({onSubmit:e}){const{formData:t}=m.useContext(mt),r=Jn("config");function n(){localStorage.setItem("formData",JSON.stringify(t)),e(t),ue.success("Saved successfully")}return y.jsx("div",{className:"px-[30px] py-8 flex justify-end items-center",children:y.jsx(Cr,{onClick:()=>n(),text:"Save Form",style:{background:(r==null?void 0:r.buttonColor)||"#333"},btnClass:"text-gray-700 border-[#98A2B3] !font-medium !py-[10px] px-10 bg-blue-600 text-white rounded-lg"})})}function sl({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return y.jsx("input",{placeholder:e.placeholder,type:e.inputType,className:"input-control",...r(e.id)})}function Xn({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return y.jsx("div",{children:y.jsx("input",{placeholder:(e==null?void 0:e.placeholder)||"",type:(e==null?void 0:e.inputType)||"text",className:"input-control",...r(e==null?void 0:e.id)})})}const al=typeof document<"u"?m.useLayoutEffect:()=>{};function Mm(e){const t=m.useRef(null);return al(()=>{t.current=e},[e]),m.useCallback((...r)=>{const n=t.current;return n==null?void 0:n(...r)},[])}const tn=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},ir=e=>e&&"window"in e&&e.window===e?e:tn(e).defaultView||window;function Rm(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(r=>e.test(r.brand)))||e.test(window.navigator.userAgent)}function Vm(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function ll(e){let t=null;return()=>(t==null&&(t=e()),t)}const Bm=ll(function(){return Vm(/^Mac/i)}),Um=ll(function(){return Rm(/Android/i)});function zm(e){return e.mozInputSource===0&&e.isTrusted?!0:Um()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}class Hm{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(t,r){this.nativeEvent=r,this.target=r.target,this.currentTarget=r.currentTarget,this.relatedTarget=r.relatedTarget,this.bubbles=r.bubbles,this.cancelable=r.cancelable,this.defaultPrevented=r.defaultPrevented,this.eventPhase=r.eventPhase,this.isTrusted=r.isTrusted,this.timeStamp=r.timeStamp,this.type=t}}function ul(e){let t=m.useRef({isFocused:!1,observer:null});al(()=>{const n=t.current;return()=>{n.observer&&(n.observer.disconnect(),n.observer=null)}},[]);let r=Mm(n=>{e==null||e(n)});return m.useCallback(n=>{if(n.target instanceof HTMLButtonElement||n.target instanceof HTMLInputElement||n.target instanceof HTMLTextAreaElement||n.target instanceof HTMLSelectElement){t.current.isFocused=!0;let o=n.target,i=s=>{t.current.isFocused=!1,o.disabled&&r(new Hm("blur",s)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};o.addEventListener("focusout",i,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&o.disabled){var s;(s=t.current.observer)===null||s===void 0||s.disconnect();let a=o===document.activeElement?null:document.activeElement;o.dispatchEvent(new FocusEvent("blur",{relatedTarget:a})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:a}))}}),t.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[r])}function qm(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:o}=e;const i=m.useCallback(l=>{if(l.target===l.currentTarget)return n&&n(l),o&&o(!1),!0},[n,o]),s=ul(i),a=m.useCallback(l=>{const u=tn(l.target);l.target===l.currentTarget&&u.activeElement===l.target&&(r&&r(l),o&&o(!0),s(l))},[o,r,s]);return{focusProps:{onFocus:!t&&(r||o||n)?a:void 0,onBlur:!t&&(n||o)?i:void 0}}}let rn=null,vi=new Set,nn=new Map,sr=!1,wi=!1;const Wm={Tab:!0,Escape:!0};function Ei(e,t){for(let r of vi)r(e,t)}function Km(e){return!(e.metaKey||!Bm()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Gn(e){sr=!0,Km(e)&&(rn="keyboard",Ei("keyboard",e))}function ct(e){rn="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(sr=!0,Ei("pointer",e))}function cl(e){zm(e)&&(sr=!0,rn="virtual")}function fl(e){e.target===window||e.target===document||(!sr&&!wi&&(rn="virtual",Ei("virtual",e)),sr=!1,wi=!1)}function dl(){sr=!1,wi=!0}function Ti(e){if(typeof window>"u"||nn.get(ir(e)))return;const t=ir(e),r=tn(e);let n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){sr=!0,n.apply(this,arguments)},r.addEventListener("keydown",Gn,!0),r.addEventListener("keyup",Gn,!0),r.addEventListener("click",cl,!0),t.addEventListener("focus",fl,!0),t.addEventListener("blur",dl,!1),typeof PointerEvent<"u"?(r.addEventListener("pointerdown",ct,!0),r.addEventListener("pointermove",ct,!0),r.addEventListener("pointerup",ct,!0)):(r.addEventListener("mousedown",ct,!0),r.addEventListener("mousemove",ct,!0),r.addEventListener("mouseup",ct,!0)),t.addEventListener("beforeunload",()=>{pl(e)},{once:!0}),nn.set(t,{focus:n})}const pl=(e,t)=>{const r=ir(e),n=tn(e);t&&n.removeEventListener("DOMContentLoaded",t),nn.has(r)&&(r.HTMLElement.prototype.focus=nn.get(r).focus,n.removeEventListener("keydown",Gn,!0),n.removeEventListener("keyup",Gn,!0),n.removeEventListener("click",cl,!0),r.removeEventListener("focus",fl,!0),r.removeEventListener("blur",dl,!1),typeof PointerEvent<"u"?(n.removeEventListener("pointerdown",ct,!0),n.removeEventListener("pointermove",ct,!0),n.removeEventListener("pointerup",ct,!0)):(n.removeEventListener("mousedown",ct,!0),n.removeEventListener("mousemove",ct,!0),n.removeEventListener("mouseup",ct,!0)),nn.delete(r))};function Ym(e){const t=tn(e);let r;return t.readyState!=="loading"?Ti(e):(r=()=>{Ti(e)},t.addEventListener("DOMContentLoaded",r)),()=>pl(e,r)}typeof document<"u"&&Ym();function ml(){return rn!=="pointer"}const Jm=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Xm(e,t,r){var n;const o=typeof window<"u"?ir(r==null?void 0:r.target).HTMLInputElement:HTMLInputElement,i=typeof window<"u"?ir(r==null?void 0:r.target).HTMLTextAreaElement:HTMLTextAreaElement,s=typeof window<"u"?ir(r==null?void 0:r.target).HTMLElement:HTMLElement,a=typeof window<"u"?ir(r==null?void 0:r.target).KeyboardEvent:KeyboardEvent;return e=e||(r==null?void 0:r.target)instanceof o&&!Jm.has(r==null||(n=r.target)===null||n===void 0?void 0:n.type)||(r==null?void 0:r.target)instanceof i||(r==null?void 0:r.target)instanceof s&&(r==null?void 0:r.target.isContentEditable),!(e&&t==="keyboard"&&r instanceof a&&!Wm[r.key])}function Gm(e,t,r){Ti(),m.useEffect(()=>{let n=(o,i)=>{Xm(!!(r!=null&&r.isTextInput),o,i)&&e(ml())};return vi.add(n),()=>{vi.delete(n)}},t)}function Qm(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:o}=e,i=m.useRef({isFocusWithin:!1}),s=m.useCallback(u=>{i.current.isFocusWithin&&!u.currentTarget.contains(u.relatedTarget)&&(i.current.isFocusWithin=!1,r&&r(u),o&&o(!1))},[r,o,i]),a=ul(s),l=m.useCallback(u=>{!i.current.isFocusWithin&&document.activeElement===u.target&&(n&&n(u),o&&o(!0),i.current.isFocusWithin=!0,a(u))},[n,o,a]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:s}}}let Qn=!1,_i=0;function Si(){Qn=!0,setTimeout(()=>{Qn=!1},50)}function hl(e){e.pointerType==="touch"&&Si()}function Zm(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",hl):document.addEventListener("touchend",Si),_i++,()=>{_i--,!(_i>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",hl):document.removeEventListener("touchend",Si))}}function eh(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:o}=e,[i,s]=m.useState(!1),a=m.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;m.useEffect(Zm,[]);let{hoverProps:l,triggerHoverEnd:u}=m.useMemo(()=>{let c=(p,d)=>{if(a.pointerType=d,o||d==="touch"||a.isHovered||!p.currentTarget.contains(p.target))return;a.isHovered=!0;let g=p.currentTarget;a.target=g,t&&t({type:"hoverstart",target:g,pointerType:d}),r&&r(!0),s(!0)},f=(p,d)=>{if(a.pointerType="",a.target=null,d==="touch"||!a.isHovered)return;a.isHovered=!1;let g=p.currentTarget;n&&n({type:"hoverend",target:g,pointerType:d}),r&&r(!1),s(!1)},h={};return typeof PointerEvent<"u"?(h.onPointerEnter=p=>{Qn&&p.pointerType==="mouse"||c(p,p.pointerType)},h.onPointerLeave=p=>{!o&&p.currentTarget.contains(p.target)&&f(p,p.pointerType)}):(h.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},h.onMouseEnter=p=>{!a.ignoreEmulatedMouseEvents&&!Qn&&c(p,"mouse"),a.ignoreEmulatedMouseEvents=!1},h.onMouseLeave=p=>{!o&&p.currentTarget.contains(p.target)&&f(p,"mouse")}),{hoverProps:h,triggerHoverEnd:f}},[t,r,n,o,a]);return m.useEffect(()=>{o&&u({currentTarget:a.target},a.pointerType)},[o]),{hoverProps:l,isHovered:i}}function th(e={}){let{autoFocus:t=!1,isTextInput:r,within:n}=e,o=m.useRef({isFocused:!1,isFocusVisible:t||ml()}),[i,s]=m.useState(!1),[a,l]=m.useState(()=>o.current.isFocused&&o.current.isFocusVisible),u=m.useCallback(()=>l(o.current.isFocused&&o.current.isFocusVisible),[]),c=m.useCallback(p=>{o.current.isFocused=p,s(p),u()},[u]);Gm(p=>{o.current.isFocusVisible=p,u()},[],{isTextInput:r});let{focusProps:f}=qm({isDisabled:n,onFocusChange:c}),{focusWithinProps:h}=Qm({isDisabled:!n,onFocusWithinChange:c});return{isFocused:i,isFocusVisible:a,focusProps:n?h:f}}var rh=Object.defineProperty,nh=(e,t,r)=>t in e?rh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ki=(e,t,r)=>(nh(e,typeof t!="symbol"?t+"":t,r),r);let oh=class{constructor(){ki(this,"current",this.detect()),ki(this,"handoffState","pending"),ki(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},ar=new oh;function on(e){return ar.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}function gl(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Rt(){let e=[],t={addEventListener(r,n,o,i){return r.addEventListener(n,o,i),t.add(()=>r.removeEventListener(n,o,i))},requestAnimationFrame(...r){let n=requestAnimationFrame(...r);return t.add(()=>cancelAnimationFrame(n))},nextFrame(...r){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...r))},setTimeout(...r){let n=setTimeout(...r);return t.add(()=>clearTimeout(n))},microTask(...r){let n={current:!0};return gl(()=>{n.current&&r[0]()}),t.add(()=>{n.current=!1})},style(r,n,o){let i=r.style.getPropertyValue(n);return Object.assign(r.style,{[n]:o}),this.add(()=>{Object.assign(r.style,{[n]:i})})},group(r){let n=Rt();return r(n),this.add(()=>n.dispose())},add(r){return e.includes(r)||e.push(r),()=>{let n=e.indexOf(r);if(n>=0)for(let o of e.splice(n,1))o()}},dispose(){for(let r of e.splice(0))r()}};return t}function lr(){let[e]=m.useState(Rt);return m.useEffect(()=>()=>e.dispose(),[e]),e}let he=(e,t)=>{ar.isServer?m.useEffect(e,t):m.useLayoutEffect(e,t)};function ur(e){let t=m.useRef(e);return he(()=>{t.current=e},[e]),t}let te=function(e){let t=ur(e);return m.useCallback((...r)=>t.current(...r),[t])};function ih(e){let t=e.width/2,r=e.height/2;return{top:e.clientY-r,right:e.clientX+t,bottom:e.clientY+r,left:e.clientX-t}}function sh(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}function ah({disabled:e=!1}={}){let t=m.useRef(null),[r,n]=m.useState(!1),o=lr(),i=te(()=>{t.current=null,n(!1),o.dispose()}),s=te(a=>{if(o.dispose(),t.current===null){t.current=a.currentTarget,n(!0);{let l=on(a.currentTarget);o.addEventListener(l,"pointerup",i,!1),o.addEventListener(l,"pointermove",u=>{if(t.current){let c=ih(u);n(sh(c,t.current.getBoundingClientRect()))}},!1),o.addEventListener(l,"pointercancel",i,!1)}}});return{pressed:r,pressProps:e?{}:{onPointerDown:s,onPointerUp:i,onClick:i}}}let lh=m.createContext(void 0);function Ci(){return m.useContext(lh)}function Oi(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function ht(e,t,...r){if(e in t){let o=t[e];return typeof o=="function"?o(...r):o}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,ht),n}var Zn=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Zn||{}),Wt=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Wt||{});function ot(){let e=ch();return m.useCallback(t=>uh({mergeRefs:e,...t}),[e])}function uh({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:o,visible:i=!0,name:s,mergeRefs:a}){a=a??fh;let l=yl(t,e);if(i)return eo(l,r,n,s,a);let u=o??0;if(u&2){let{static:c=!1,...f}=l;if(c)return eo(f,r,n,s,a)}if(u&1){let{unmount:c=!0,...f}=l;return ht(c?0:1,{0(){return null},1(){return eo({...f,hidden:!0,style:{display:"none"}},r,n,s,a)}})}return eo(l,r,n,s,a)}function eo(e,t={},r,n,o){let{as:i=r,children:s,refName:a="ref",...l}=Fi(e,["unmount","static"]),u=e.ref!==void 0?{[a]:e.ref}:{},c=typeof s=="function"?s(t):s;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let f={};if(t){let h=!1,p=[];for(let[d,g]of Object.entries(t))typeof g=="boolean"&&(h=!0),g===!0&&p.push(d.replace(/([A-Z])/g,x=>`-${x.toLowerCase()}`));if(h){f["data-headlessui-state"]=p.join(" ");for(let d of p)f[`data-${d}`]=""}}if(i===m.Fragment&&(Object.keys(Kt(l)).length>0||Object.keys(Kt(f)).length>0))if(!m.isValidElement(c)||Array.isArray(c)&&c.length>1){if(Object.keys(Kt(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Kt(l)).concat(Object.keys(Kt(f))).map(h=>` - ${h}`).join(`
49
49
  `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(h=>` - ${h}`).join(`
50
50
  `)].join(`
51
- `))}else{let h=c.props,p=h==null?void 0:h.className,d=typeof p=="function"?(...b)=>Oi(p(...b),l.className):Oi(p,l.className),g=d?{className:d}:{},x=yl(c.props,Kt(Fi(l,["ref"])));for(let b in f)b in x&&delete f[b];return m.cloneElement(c,Object.assign({},x,f,u,{ref:o(dh(c),u.ref)},g))}return m.createElement(i,Object.assign({},Fi(l,["ref"]),i!==m.Fragment&&u,i!==m.Fragment&&f),c)}function ch(){let e=m.useRef([]),t=m.useCallback(r=>{for(let n of e.current)n!=null&&(typeof n=="function"?n(r):n.current=r)},[]);return(...r)=>{if(!r.every(n=>n==null))return e.current=r,t}}function fh(...e){return e.every(t=>t==null)?void 0:t=>{for(let r of e)r!=null&&(typeof r=="function"?r(t):r.current=t)}}function yl(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},r={};for(let n of e)for(let o in n)o.startsWith("on")&&typeof n[o]=="function"?(r[o]!=null||(r[o]=[]),r[o].push(n[o])):t[o]=n[o];if(t.disabled||t["aria-disabled"])for(let n in r)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(n)&&(r[n]=[o=>{var i;return(i=o==null?void 0:o.preventDefault)==null?void 0:i.call(o)}]);for(let n in r)Object.assign(t,{[n](o,...i){let s=r[n];for(let a of s){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;a(o,...i)}}});return t}function bl(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},r={};for(let n of e)for(let o in n)o.startsWith("on")&&typeof n[o]=="function"?(r[o]!=null||(r[o]=[]),r[o].push(n[o])):t[o]=n[o];for(let n in r)Object.assign(t,{[n](...o){let i=r[n];for(let s of i)s==null||s(...o)}});return t}function Qe(e){var t;return Object.assign(m.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Kt(e){let t=Object.assign({},e);for(let r in t)t[r]===void 0&&delete t[r];return t}function Fi(e,t=[]){let r=Object.assign({},e);for(let n of t)n in r&&delete r[n];return r}function dh(e){return m.version.split(".")[0]>="19"?e.props.ref:e.ref}function ph(e,t,r){let[n,o]=m.useState(r),i=e!==void 0,s=m.useRef(i),a=m.useRef(!1),l=m.useRef(!1);return i&&!s.current&&!a.current?(a.current=!0,s.current=i,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!i&&s.current&&!l.current&&(l.current=!0,s.current=i,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[i?e:n,te(u=>(i||o(u),t==null?void 0:t(u)))]}function mh(e){let[t]=m.useState(e);return t}function xl(e={},t=null,r=[]){for(let[n,o]of Object.entries(e))wl(r,vl(t,n),o);return r}function vl(e,t){return e?e+"["+t+"]":t}function wl(e,t,r){if(Array.isArray(r))for(let[n,o]of r.entries())wl(e,vl(t,n.toString()),o);else r instanceof Date?e.push([t,r.toISOString()]):typeof r=="boolean"?e.push([t,r?"1":"0"]):typeof r=="string"?e.push([t,r]):typeof r=="number"?e.push([t,`${r}`]):r==null?e.push([t,""]):xl(r,t,e)}function hh(e){var t,r;let n=(t=e==null?void 0:e.form)!=null?t:e.closest("form");if(n){for(let o of n.elements)if(o!==e&&(o.tagName==="INPUT"&&o.type==="submit"||o.tagName==="BUTTON"&&o.type==="submit"||o.nodeName==="INPUT"&&o.type==="image")){o.click();return}(r=n.requestSubmit)==null||r.call(n)}}let gh="span";var Ai=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Ai||{});function yh(e,t){var r;let{features:n=1,...o}=e,i={ref:t,"aria-hidden":(n&2)===2?!0:(r=o["aria-hidden"])!=null?r:void 0,hidden:(n&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return ot()({ourProps:i,theirProps:o,slot:{},defaultTag:gh,name:"Hidden"})}let El=Qe(yh),bh=m.createContext(null);function xh({children:e}){let t=m.useContext(bh);if(!t)return m.createElement(m.Fragment,null,e);let{target:r}=t;return r?Tt.createPortal(m.createElement(m.Fragment,null,e),r):null}function vh({data:e,form:t,disabled:r,onReset:n,overrides:o}){let[i,s]=m.useState(null),a=lr();return m.useEffect(()=>{if(n&&i)return a.addEventListener(i,"reset",n)},[i,t,n]),m.createElement(xh,null,m.createElement(wh,{setForm:s,formId:t}),xl(e).map(([l,u])=>m.createElement(El,{features:Ai.Hidden,...Kt({key:l,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:r,name:l,value:u,...o})})))}function wh({setForm:e,formId:t}){return m.useEffect(()=>{if(t){let r=document.getElementById(t);r&&e(r)}},[e,t]),t?null:m.createElement(El,{features:Ai.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:r=>{if(!r)return;let n=r.closest("form");n&&e(n)}})}let Eh=m.createContext(void 0);function Tl(){return m.useContext(Eh)}function Th(e){let t=e.parentElement,r=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(r=t),t=t.parentElement;let n=(t==null?void 0:t.getAttribute("disabled"))==="";return n&&_h(r)?!1:n}function _h(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}let _l=Symbol();function Sh(e,t=!0){return Object.assign(e,{[_l]:t})}function ft(...e){let t=m.useRef(e);m.useEffect(()=>{t.current=e},[e]);let r=te(n=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(n):o.current=n)});return e.every(n=>n==null||(n==null?void 0:n[_l]))?void 0:r}let ji=m.createContext(null);ji.displayName="DescriptionContext";function Sl(){let e=m.useContext(ji);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Sl),t}return e}function kh(){var e,t;return(t=(e=m.useContext(ji))==null?void 0:e.value)!=null?t:void 0}let Ch="p";function Oh(e,t){let r=m.useId(),n=Ci(),{id:o=`headlessui-description-${r}`,...i}=e,s=Sl(),a=ft(t);he(()=>s.register(o),[o,s.register]);let l=n||!1,u=m.useMemo(()=>({...s.slot,disabled:l}),[s.slot,l]),c={ref:a,...s.props,id:o};return ot()({ourProps:c,theirProps:i,slot:u,defaultTag:Ch,name:s.name||"Description"})}let Fh=Qe(Oh);Object.assign(Fh,{});var Ne=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Ne||{});let eo=m.createContext(null);eo.displayName="LabelContext";function kl(){let e=m.useContext(eo);if(e===null){let t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,kl),t}return e}function Cl(e){var t,r,n;let o=(r=(t=m.useContext(eo))==null?void 0:t.value)!=null?r:void 0;return((n=e==null?void 0:e.length)!=null?n:0)>0?[o,...e].filter(Boolean).join(" "):o}function Ah({inherit:e=!1}={}){let t=Cl(),[r,n]=m.useState([]),o=e?[t,...r].filter(Boolean):r;return[o.length>0?o.join(" "):void 0,m.useMemo(()=>function(i){let s=te(l=>(n(u=>[...u,l]),()=>n(u=>{let c=u.slice(),f=c.indexOf(l);return f!==-1&&c.splice(f,1),c}))),a=m.useMemo(()=>({register:s,slot:i.slot,name:i.name,props:i.props,value:i.value}),[s,i.slot,i.name,i.props,i.value]);return m.createElement(eo.Provider,{value:a},i.children)},[n])]}let jh="label";function $h(e,t){var r;let n=m.useId(),o=kl(),i=Tl(),s=Ci(),{id:a=`headlessui-label-${n}`,htmlFor:l=i??((r=o.props)==null?void 0:r.htmlFor),passive:u=!1,...c}=e,f=ft(t);he(()=>o.register(a),[a,o.register]);let h=te(x=>{let b=x.currentTarget;if(b instanceof HTMLLabelElement&&x.preventDefault(),o.props&&"onClick"in o.props&&typeof o.props.onClick=="function"&&o.props.onClick(x),b instanceof HTMLLabelElement){let v=document.getElementById(b.htmlFor);if(v){let w=v.getAttribute("disabled");if(w==="true"||w==="")return;let _=v.getAttribute("aria-disabled");if(_==="true"||_==="")return;(v instanceof HTMLInputElement&&(v.type==="radio"||v.type==="checkbox")||v.role==="radio"||v.role==="checkbox"||v.role==="switch")&&v.click(),v.focus({preventScroll:!0})}}}),p=s||!1,d=m.useMemo(()=>({...o.slot,disabled:p}),[o.slot,p]),g={ref:f,...o.props,id:a,htmlFor:l,onClick:h};return u&&("onClick"in g&&(delete g.htmlFor,delete g.onClick),"onClick"in c&&delete c.onClick),ot()({ourProps:g,theirProps:c,slot:d,defaultTag:l?jh:"div",name:o.name||"Label"})}let Nh=Qe($h),Lh=Object.assign(Nh,{});function Ph(e,t){return e!==null&&t!==null&&typeof e=="object"&&typeof t=="object"&&"id"in e&&"id"in t?e.id===t.id:e===t}function Dh(e=Ph){return m.useCallback((t,r)=>{if(typeof e=="string"){let n=e;return(t==null?void 0:t[n])===(r==null?void 0:r[n])}return e(t,r)},[e])}function Ih(e){if(e===null)return{width:0,height:0};let{width:t,height:r}=e.getBoundingClientRect();return{width:t,height:r}}function Mh(e,t=!1){let[r,n]=m.useReducer(()=>({}),{}),o=m.useMemo(()=>Ih(e),[e,r]);return he(()=>{if(!e)return;let i=new ResizeObserver(n);return i.observe(e),()=>{i.disconnect()}},[e]),t?{width:`${o.width}px`,height:`${o.height}px`}:o}let Rh=class extends Map{constructor(t){super(),this.factory=t}get(t){let r=super.get(t);return r===void 0&&(r=this.factory(t),this.set(t,r)),r}};function Ol(e,t){let r=e(),n=new Set;return{getSnapshot(){return r},subscribe(o){return n.add(o),()=>n.delete(o)},dispatch(o,...i){let s=t[o].call(r,...i);s&&(r=s,n.forEach(a=>a()))}}}function Fl(e){return m.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}let Vh=new Rh(()=>Ol(()=>[],{ADD(e){return this.includes(e)?this:[...this,e]},REMOVE(e){let t=this.indexOf(e);if(t===-1)return this;let r=this.slice();return r.splice(t,1),r}}));function $i(e,t){let r=Vh.get(t),n=m.useId(),o=Fl(r);if(he(()=>{if(e)return r.dispatch("ADD",n),()=>r.dispatch("REMOVE",n)},[r,e]),!e)return!1;let i=o.indexOf(n),s=o.length;return i===-1&&(i=s,s+=1),i===s-1}let Ni=new Map,sn=new Map;function Al(e){var t;let r=(t=sn.get(e))!=null?t:0;return sn.set(e,r+1),r!==0?()=>jl(e):(Ni.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>jl(e))}function jl(e){var t;let r=(t=sn.get(e))!=null?t:1;if(r===1?sn.delete(e):sn.set(e,r-1),r!==1)return;let n=Ni.get(e);n&&(n["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n["aria-hidden"]),e.inert=n.inert,Ni.delete(e))}function Bh(e,{allowed:t,disallowed:r}={}){let n=$i(e,"inert-others");he(()=>{var o,i;if(!n)return;let s=Rt();for(let l of(o=r==null?void 0:r())!=null?o:[])l&&s.add(Al(l));let a=(i=t==null?void 0:t())!=null?i:[];for(let l of a){if(!l)continue;let u=on(l);if(!u)continue;let c=l.parentElement;for(;c&&c!==u.body;){for(let f of c.children)a.some(h=>f.contains(h))||s.add(Al(f));c=c.parentElement}}return s.dispose},[n,t,r])}function Uh(e,t,r){let n=ur(o=>{let i=o.getBoundingClientRect();i.x===0&&i.y===0&&i.width===0&&i.height===0&&r()});m.useEffect(()=>{if(!e)return;let o=t===null?null:t instanceof HTMLElement?t:t.current;if(!o)return;let i=Rt();if(typeof ResizeObserver<"u"){let s=new ResizeObserver(()=>n.current(o));s.observe(o),i.add(()=>s.disconnect())}if(typeof IntersectionObserver<"u"){let s=new IntersectionObserver(()=>n.current(o));s.observe(o),i.add(()=>s.disconnect())}return()=>i.dispose()},[t,n,e])}let Li=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),zh=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Pi=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(Pi||{}),Hh=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Hh||{}),qh=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(qh||{});function $l(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Li)).sort((t,r)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}function Wh(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(zh)).sort((t,r)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}var Di=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Di||{});function Nl(e,t=0){var r;return e===((r=on(e))==null?void 0:r.body)?!1:ht(t,{0(){return e.matches(Li)},1(){let n=e;for(;n!==null;){if(n.matches(Li))return!0;n=n.parentElement}return!1}})}var Kh=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Kh||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));let Yh=["textarea","input"].join(",");function Jh(e){var t,r;return(r=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,Yh))!=null?r:!1}function Ll(e,t=r=>r){return e.slice().sort((r,n)=>{let o=t(r),i=t(n);if(o===null||i===null)return 0;let s=o.compareDocumentPosition(i);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Xh(e,t){return Gh($l(),t,{relativeTo:e})}function Gh(e,t,{sorted:r=!0,relativeTo:n=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,s=Array.isArray(e)?r?Ll(e):e:t&64?Wh(e):$l(e);o.length>0&&s.length>1&&(s=s.filter(p=>!o.some(d=>d!=null&&"current"in d?(d==null?void 0:d.current)===p:d===p))),n=n??i.activeElement;let a=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,s.indexOf(n))-1;if(t&4)return Math.max(0,s.indexOf(n))+1;if(t&8)return s.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=t&32?{preventScroll:!0}:{},c=0,f=s.length,h;do{if(c>=f||c+f<=0)return 0;let p=l+c;if(t&16)p=(p+f)%f;else{if(p<0)return 3;if(p>=f)return 1}h=s[p],h==null||h.focus(u),c+=a}while(h!==i.activeElement);return t&6&&Jh(h)&&h.select(),2}function Pl(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Qh(){return/Android/gi.test(window.navigator.userAgent)}function Zh(){return Pl()||Qh()}function an(e,t,r,n){let o=ur(r);m.useEffect(()=>{if(!e)return;function i(s){o.current(s)}return document.addEventListener(t,i,n),()=>document.removeEventListener(t,i,n)},[e,t,n])}function eg(e,t,r,n){let o=ur(r);m.useEffect(()=>{if(!e)return;function i(s){o.current(s)}return window.addEventListener(t,i,n),()=>window.removeEventListener(t,i,n)},[e,t,n])}const Dl=30;function tg(e,t,r){let n=$i(e,"outside-click"),o=ur(r),i=m.useCallback(function(l,u){if(l.defaultPrevented)return;let c=u(l);if(c===null||!c.getRootNode().contains(c)||!c.isConnected)return;let f=function h(p){return typeof p=="function"?h(p()):Array.isArray(p)||p instanceof Set?p:[p]}(t);for(let h of f)if(h!==null&&(h.contains(c)||l.composed&&l.composedPath().includes(h)))return;return!Nl(c,Di.Loose)&&c.tabIndex!==-1&&l.preventDefault(),o.current(l,c)},[o,t]),s=m.useRef(null);an(n,"pointerdown",l=>{var u,c;s.current=((c=(u=l.composedPath)==null?void 0:u.call(l))==null?void 0:c[0])||l.target},!0),an(n,"mousedown",l=>{var u,c;s.current=((c=(u=l.composedPath)==null?void 0:u.call(l))==null?void 0:c[0])||l.target},!0),an(n,"click",l=>{Zh()||s.current&&(i(l,()=>s.current),s.current=null)},!0);let a=m.useRef({x:0,y:0});an(n,"touchstart",l=>{a.current.x=l.touches[0].clientX,a.current.y=l.touches[0].clientY},!0),an(n,"touchend",l=>{let u={x:l.changedTouches[0].clientX,y:l.changedTouches[0].clientY};if(!(Math.abs(u.x-a.current.x)>=Dl||Math.abs(u.y-a.current.y)>=Dl))return i(l,()=>l.target instanceof HTMLElement?l.target:null)},!0),eg(n,"blur",l=>i(l,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Ii(...e){return m.useMemo(()=>on(...e),[...e])}function rg(e,t){return m.useMemo(()=>{var r;if(e.type)return e.type;let n=(r=e.as)!=null?r:"button";if(typeof n=="string"&&n.toLowerCase()==="button"||(t==null?void 0:t.tagName)==="BUTTON"&&!t.hasAttribute("type"))return"button"},[e.type,e.as,t])}function ng(){let e;return{before({doc:t}){var r;let n=t.documentElement,o=(r=t.defaultView)!=null?r:window;e=Math.max(0,o.innerWidth-n.clientWidth)},after({doc:t,d:r}){let n=t.documentElement,o=Math.max(0,n.clientWidth-n.offsetWidth),i=Math.max(0,e-o);r.style(n,"paddingRight",`${i}px`)}}}function og(){return Pl()?{before({doc:e,d:t,meta:r}){function n(o){return r.containers.flatMap(i=>i()).some(i=>i.contains(o))}t.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let a=Rt();a.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>a.dispose()))}let i=(o=window.scrollY)!=null?o:window.pageYOffset,s=null;t.addEventListener(e,"click",a=>{if(a.target instanceof HTMLElement)try{let l=a.target.closest("a");if(!l)return;let{hash:u}=new URL(l.href),c=e.querySelector(u);c&&!n(c)&&(s=c)}catch{}},!0),t.addEventListener(e,"touchstart",a=>{if(a.target instanceof HTMLElement)if(n(a.target)){let l=a.target;for(;l.parentElement&&n(l.parentElement);)l=l.parentElement;t.style(l,"overscrollBehavior","contain")}else t.style(a.target,"touchAction","none")}),t.addEventListener(e,"touchmove",a=>{if(a.target instanceof HTMLElement){if(a.target.tagName==="INPUT")return;if(n(a.target)){let l=a.target;for(;l.parentElement&&l.dataset.headlessuiPortal!==""&&!(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth);)l=l.parentElement;l.dataset.headlessuiPortal===""&&a.preventDefault()}else a.preventDefault()}},{passive:!1}),t.add(()=>{var a;let l=(a=window.scrollY)!=null?a:window.pageYOffset;i!==l&&window.scrollTo(0,i),s&&s.isConnected&&(s.scrollIntoView({block:"nearest"}),s=null)})})}}:{}}function ig(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function sg(e){let t={};for(let r of e)Object.assign(t,r(t));return t}let cr=Ol(()=>new Map,{PUSH(e,t){var r;let n=(r=this.get(e))!=null?r:{doc:e,count:0,d:Rt(),meta:new Set};return n.count++,n.meta.add(t),this.set(e,n),this},POP(e,t){let r=this.get(e);return r&&(r.count--,r.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:r}){let n={doc:e,d:t,meta:sg(r)},o=[og(),ng(),ig()];o.forEach(({before:i})=>i==null?void 0:i(n)),o.forEach(({after:i})=>i==null?void 0:i(n))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});cr.subscribe(()=>{let e=cr.getSnapshot(),t=new Map;for(let[r]of e)t.set(r,r.documentElement.style.overflow);for(let r of e.values()){let n=t.get(r.doc)==="hidden",o=r.count!==0;(o&&!n||!o&&n)&&cr.dispatch(r.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",r),r.count===0&&cr.dispatch("TEARDOWN",r)}});function ag(e,t,r=()=>({containers:[]})){let n=Fl(cr),o=t?n.get(t):void 0,i=o?o.count>0:!1;return he(()=>{if(!(!t||!e))return cr.dispatch("PUSH",t,r),()=>cr.dispatch("POP",t,r)},[e,t]),i}function lg(e,t,r=()=>[document.body]){let n=$i(e,"scroll-lock");ag(n,t,o=>{var i;return{containers:[...(i=o.containers)!=null?i:[],r]}})}function Il(e){return[e.screenX,e.screenY]}function ug(){let e=m.useRef([-1,-1]);return{wasMoved(t){let r=Il(t);return e.current[0]===r[0]&&e.current[1]===r[1]?!1:(e.current=r,!0)},update(t){e.current=Il(t)}}}function cg(e=0){let[t,r]=m.useState(e),n=m.useCallback(l=>r(l),[t]),o=m.useCallback(l=>r(u=>u|l),[t]),i=m.useCallback(l=>(t&l)===l,[t]),s=m.useCallback(l=>r(u=>u&~l),[r]),a=m.useCallback(l=>r(u=>u^l),[r]);return{flags:t,setFlag:n,addFlag:o,hasFlag:i,removeFlag:s,toggleFlag:a}}var Ml,Rl;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((Ml=process==null?void 0:process.env)==null?void 0:Ml.NODE_ENV)==="test"&&typeof((Rl=Element==null?void 0:Element.prototype)==null?void 0:Rl.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
52
- `)),[]});var fg=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(fg||{});function Vl(e){let t={};for(let r in e)e[r]===!0&&(t[`data-${r}`]="");return t}function Bl(e,t,r,n){let[o,i]=m.useState(r),{hasFlag:s,addFlag:a,removeFlag:l}=cg(e&&o?3:0),u=m.useRef(!1),c=m.useRef(!1),f=lr();return he(()=>{var h;if(e){if(r&&i(!0),!t){r&&a(3);return}return(h=n==null?void 0:n.start)==null||h.call(n,r),dg(t,{inFlight:u,prepare(){c.current?c.current=!1:c.current=u.current,u.current=!0,!c.current&&(r?(a(3),l(4)):(a(4),l(2)))},run(){c.current?r?(l(3),a(4)):(l(4),a(3)):r?l(1):a(1)},done(){var p;c.current&&typeof t.getAnimations=="function"&&t.getAnimations().length>0||(u.current=!1,l(7),r||i(!1),(p=n==null?void 0:n.end)==null||p.call(n,r))}})}},[e,r,t,f]),e?[o,{closed:s(1),enter:s(2),leave:s(4),transition:s(2)||s(4)}]:[r,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function dg(e,{prepare:t,run:r,done:n,inFlight:o}){let i=Rt();return mg(e,{prepare:t,inFlight:o}),i.nextFrame(()=>{r(),i.requestAnimationFrame(()=>{i.add(pg(e,n))})}),i.dispose}function pg(e,t){var r,n;let o=Rt();if(!e)return o.dispose;let i=!1;o.add(()=>{i=!0});let s=(n=(r=e.getAnimations)==null?void 0:r.call(e).filter(a=>a instanceof CSSTransition))!=null?n:[];return s.length===0?(t(),o.dispose):(Promise.allSettled(s.map(a=>a.finished)).then(()=>{i||t()}),o.dispose)}function mg(e,{inFlight:t,prepare:r}){if(t!=null&&t.current){r();return}let n=e.style.transition;e.style.transition="none",r(),e.offsetHeight,e.style.transition=n}function to(){return typeof window<"u"}function Or(e){return Ul(e)?(e.nodeName||"").toLowerCase():"#document"}function it(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function _t(e){var t;return(t=(Ul(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ul(e){return to()?e instanceof Node||e instanceof it(e).Node:!1}function Ue(e){return to()?e instanceof Element||e instanceof it(e).Element:!1}function St(e){return to()?e instanceof HTMLElement||e instanceof it(e).HTMLElement:!1}function zl(e){return!to()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof it(e).ShadowRoot}function ln(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=gt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function hg(e){return["table","td","th"].includes(Or(e))}function ro(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Mi(e){const t=Ri(),r=Ue(e)?gt(e):e;return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function gg(e){let t=Yt(e);for(;St(t)&&!Fr(t);){if(Mi(t))return t;if(ro(t))return null;t=Yt(t)}return null}function Ri(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Fr(e){return["html","body","#document"].includes(Or(e))}function gt(e){return it(e).getComputedStyle(e)}function no(e){return Ue(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yt(e){if(Or(e)==="html")return e;const t=e.assignedSlot||e.parentNode||zl(e)&&e.host||_t(e);return zl(t)?t.host:t}function Hl(e){const t=Yt(e);return Fr(t)?e.ownerDocument?e.ownerDocument.body:e.body:St(t)&&ln(t)?t:Hl(t)}function un(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=Hl(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),s=it(o);if(i){const a=Vi(s);return t.concat(s,s.visualViewport||[],ln(o)?o:[],a&&r?un(a):[])}return t.concat(o,un(o,[],r))}function Vi(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function yg(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:r,version:n}=t;return r+"/"+n}).join(" "):navigator.userAgent}const fr=Math.min,ze=Math.max,cn=Math.round,oo=Math.floor,kt=e=>({x:e,y:e}),bg={left:"right",right:"left",bottom:"top",top:"bottom"},xg={start:"end",end:"start"};function ql(e,t,r){return ze(e,fr(t,r))}function Ar(e,t){return typeof e=="function"?e(t):e}function Jt(e){return e.split("-")[0]}function fn(e){return e.split("-")[1]}function Wl(e){return e==="x"?"y":"x"}function Kl(e){return e==="y"?"height":"width"}function dr(e){return["top","bottom"].includes(Jt(e))?"y":"x"}function Yl(e){return Wl(dr(e))}function vg(e,t,r){r===void 0&&(r=!1);const n=fn(e),o=Yl(e),i=Kl(o);let s=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=io(s)),[s,io(s)]}function wg(e){const t=io(e);return[Bi(e),t,Bi(t)]}function Bi(e){return e.replace(/start|end/g,t=>xg[t])}function Eg(e,t,r){const n=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?i:s;default:return[]}}function Tg(e,t,r,n){const o=fn(e);let i=Eg(Jt(e),r==="start",n);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Bi)))),i}function io(e){return e.replace(/left|right|bottom|top/g,t=>bg[t])}function _g(e){return{top:0,right:0,bottom:0,left:0,...e}}function Sg(e){return typeof e!="number"?_g(e):{top:e,right:e,bottom:e,left:e}}function so(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function Jl(e,t,r){let{reference:n,floating:o}=e;const i=dr(t),s=Yl(t),a=Kl(s),l=Jt(t),u=i==="y",c=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,h=n[a]/2-o[a]/2;let p;switch(l){case"top":p={x:c,y:n.y-o.height};break;case"bottom":p={x:c,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:f};break;case"left":p={x:n.x-o.width,y:f};break;default:p={x:n.x,y:n.y}}switch(fn(t)){case"start":p[s]-=h*(r&&u?-1:1);break;case"end":p[s]+=h*(r&&u?-1:1);break}return p}const kg=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:s}=r,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:f}=Jl(u,n,l),h=n,p={},d=0;for(let g=0;g<a.length;g++){const{name:x,fn:b}=a[g],{x:v,y:w,data:_,reset:k}=await b({x:c,y:f,initialPlacement:n,placement:h,strategy:o,middlewareData:p,rects:u,platform:s,elements:{reference:e,floating:t}});c=v??c,f=w??f,p={...p,[x]:{...p[x],..._}},k&&d<=50&&(d++,typeof k=="object"&&(k.placement&&(h=k.placement),k.rects&&(u=k.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):k.rects),{x:c,y:f}=Jl(u,h,l)),g=-1)}return{x:c,y:f,placement:h,strategy:o,middlewareData:p}};async function ao(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=Ar(t,e),d=Sg(p),x=a[h?f==="floating"?"reference":"floating":f],b=so(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(x)))==null||r?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),v=f==="floating"?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),_=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},k=so(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:w,strategy:l}):v);return{top:(b.top-k.top+d.top)/_.y,bottom:(k.bottom-b.bottom+d.bottom)/_.y,left:(b.left-k.left+d.left)/_.x,right:(k.right-b.right+d.right)/_.x}}const Cg=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:g=!0,...x}=Ar(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const b=Jt(o),v=dr(a),w=Jt(a)===a,_=await(l.isRTL==null?void 0:l.isRTL(u.floating)),k=h||(w||!g?[io(a)]:wg(a)),S=d!=="none";!h&&S&&k.push(...Tg(a,g,d,_));const C=[a,...k],A=await ao(t,x),N=[];let P=((n=i.flip)==null?void 0:n.overflows)||[];if(c&&N.push(A[b]),f){const q=vg(o,s,_);N.push(A[q[0]],A[q[1]])}if(P=[...P,{placement:o,overflows:N}],!N.every(q=>q<=0)){var L,I;const q=(((L=i.flip)==null?void 0:L.index)||0)+1,J=C[q];if(J)return{data:{index:q,overflows:P},reset:{placement:J}};let z=(I=P.filter(G=>G.overflows[0]<=0).sort((G,K)=>G.overflows[1]-K.overflows[1])[0])==null?void 0:I.placement;if(!z)switch(p){case"bestFit":{var R;const G=(R=P.filter(K=>{if(S){const Z=dr(K.placement);return Z===v||Z==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(Z=>Z>0).reduce((Z,re)=>Z+re,0)]).sort((K,Z)=>K[1]-Z[1])[0])==null?void 0:R[0];G&&(z=G);break}case"initialPlacement":z=a;break}if(o!==z)return{reset:{placement:z}}}return{}}}};async function Og(e,t){const{placement:r,platform:n,elements:o}=e,i=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=Jt(r),a=fn(r),l=dr(r)==="y",u=["left","top"].includes(s)?-1:1,c=i&&l?-1:1,f=Ar(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:d}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof d=="number"&&(p=a==="end"?d*-1:d),l?{x:p*c,y:h*u}:{x:h*u,y:p*c}}const Fg=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await Og(t,e);return s===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},Ag=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:x=>{let{x:b,y:v}=x;return{x:b,y:v}}},...l}=Ar(e,t),u={x:r,y:n},c=await ao(t,l),f=dr(Jt(o)),h=Wl(f);let p=u[h],d=u[f];if(i){const x=h==="y"?"top":"left",b=h==="y"?"bottom":"right",v=p+c[x],w=p-c[b];p=ql(v,p,w)}if(s){const x=f==="y"?"top":"left",b=f==="y"?"bottom":"right",v=d+c[x],w=d-c[b];d=ql(v,d,w)}const g=a.fn({...t,[h]:p,[f]:d});return{...g,data:{x:g.x-r,y:g.y-n,enabled:{[h]:i,[f]:s}}}}}},jg=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...u}=Ar(e,t),c=await ao(t,u),f=Jt(o),h=fn(o),p=dr(o)==="y",{width:d,height:g}=i.floating;let x,b;f==="top"||f==="bottom"?(x=f,b=h===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(b=f,x=h==="end"?"top":"bottom");const v=g-c.top-c.bottom,w=d-c.left-c.right,_=fr(g-c[x],v),k=fr(d-c[b],w),S=!t.middlewareData.shift;let C=_,A=k;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(A=w),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(C=v),S&&!h){const P=ze(c.left,0),L=ze(c.right,0),I=ze(c.top,0),R=ze(c.bottom,0);p?A=d-2*(P!==0||L!==0?P+L:ze(c.left,c.right)):C=g-2*(I!==0||R!==0?I+R:ze(c.top,c.bottom))}await l({...t,availableWidth:A,availableHeight:C});const N=await s.getDimensions(a.floating);return d!==N.width||g!==N.height?{reset:{rects:!0}}:{}}}};function Xl(e){const t=gt(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=St(e),i=o?e.offsetWidth:r,s=o?e.offsetHeight:n,a=cn(r)!==i||cn(n)!==s;return a&&(r=i,n=s),{width:r,height:n,$:a}}function Ui(e){return Ue(e)?e:e.contextElement}function jr(e){const t=Ui(e);if(!St(t))return kt(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=Xl(t);let s=(i?cn(r.width):r.width)/n,a=(i?cn(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const $g=kt(0);function Gl(e){const t=it(e);return!Ri()||!t.visualViewport?$g:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ng(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==it(e)?!1:t}function pr(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),i=Ui(e);let s=kt(1);t&&(n?Ue(n)&&(s=jr(n)):s=jr(e));const a=Ng(i,r,n)?Gl(i):kt(0);let l=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,c=o.width/s.x,f=o.height/s.y;if(i){const h=it(i),p=n&&Ue(n)?it(n):n;let d=h,g=Vi(d);for(;g&&n&&p!==d;){const x=jr(g),b=g.getBoundingClientRect(),v=gt(g),w=b.left+(g.clientLeft+parseFloat(v.paddingLeft))*x.x,_=b.top+(g.clientTop+parseFloat(v.paddingTop))*x.y;l*=x.x,u*=x.y,c*=x.x,f*=x.y,l+=w,u+=_,d=it(g),g=Vi(d)}}return so({width:c,height:f,x:l,y:u})}function zi(e,t){const r=no(e).scrollLeft;return t?t.left+r:pr(_t(e)).left+r}function Ql(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-(r?0:zi(e,n)),i=n.top+t.scrollTop;return{x:o,y:i}}function Lg(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i=o==="fixed",s=_t(n),a=t?ro(t.floating):!1;if(n===s||a&&i)return r;let l={scrollLeft:0,scrollTop:0},u=kt(1);const c=kt(0),f=St(n);if((f||!f&&!i)&&((Or(n)!=="body"||ln(s))&&(l=no(n)),St(n))){const p=pr(n);u=jr(n),c.x=p.x+n.clientLeft,c.y=p.y+n.clientTop}const h=s&&!f&&!i?Ql(s,l,!0):kt(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x+h.x,y:r.y*u.y-l.scrollTop*u.y+c.y+h.y}}function Pg(e){return Array.from(e.getClientRects())}function Dg(e){const t=_t(e),r=no(e),n=e.ownerDocument.body,o=ze(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=ze(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+zi(e);const a=-r.scrollTop;return gt(n).direction==="rtl"&&(s+=ze(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:s,y:a}}function Ig(e,t){const r=it(e),n=_t(e),o=r.visualViewport;let i=n.clientWidth,s=n.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const u=Ri();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function Mg(e,t){const r=pr(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=St(e)?jr(e):kt(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,u=n*i.y;return{width:s,height:a,x:l,y:u}}function Zl(e,t,r){let n;if(t==="viewport")n=Ig(e,r);else if(t==="document")n=Dg(_t(e));else if(Ue(t))n=Mg(t,r);else{const o=Gl(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return so(n)}function eu(e,t){const r=Yt(e);return r===t||!Ue(r)||Fr(r)?!1:gt(r).position==="fixed"||eu(r,t)}function Rg(e,t){const r=t.get(e);if(r)return r;let n=un(e,[],!1).filter(a=>Ue(a)&&Or(a)!=="body"),o=null;const i=gt(e).position==="fixed";let s=i?Yt(e):e;for(;Ue(s)&&!Fr(s);){const a=gt(s),l=Mi(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||ln(s)&&!l&&eu(e,s))?n=n.filter(c=>c!==s):o=a,s=Yt(s)}return t.set(e,n),n}function Vg(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const s=[...r==="clippingAncestors"?ro(t)?[]:Rg(t,this._c):[].concat(r),n],a=s[0],l=s.reduce((u,c)=>{const f=Zl(t,c,o);return u.top=ze(f.top,u.top),u.right=fr(f.right,u.right),u.bottom=fr(f.bottom,u.bottom),u.left=ze(f.left,u.left),u},Zl(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Bg(e){const{width:t,height:r}=Xl(e);return{width:t,height:r}}function Ug(e,t,r){const n=St(t),o=_t(t),i=r==="fixed",s=pr(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=kt(0);if(n||!n&&!i)if((Or(t)!=="body"||ln(o))&&(a=no(t)),n){const h=pr(t,!0,i,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&(l.x=zi(o));const u=o&&!n&&!i?Ql(o,a):kt(0),c=s.left+a.scrollLeft-l.x-u.x,f=s.top+a.scrollTop-l.y-u.y;return{x:c,y:f,width:s.width,height:s.height}}function Hi(e){return gt(e).position==="static"}function tu(e,t){if(!St(e)||gt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return _t(e)===r&&(r=r.ownerDocument.body),r}function ru(e,t){const r=it(e);if(ro(e))return r;if(!St(e)){let o=Yt(e);for(;o&&!Fr(o);){if(Ue(o)&&!Hi(o))return o;o=Yt(o)}return r}let n=tu(e,t);for(;n&&hg(n)&&Hi(n);)n=tu(n,t);return n&&Fr(n)&&Hi(n)&&!Mi(n)?r:n||gg(e)||r}const zg=async function(e){const t=this.getOffsetParent||ru,r=this.getDimensions,n=await r(e.floating);return{reference:Ug(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Hg(e){return gt(e).direction==="rtl"}const qg={convertOffsetParentRelativeRectToViewportRelativeRect:Lg,getDocumentElement:_t,getClippingRect:Vg,getOffsetParent:ru,getElementRects:zg,getClientRects:Pg,getDimensions:Bg,getScale:jr,isElement:Ue,isRTL:Hg};function Wg(e,t){let r=null,n;const o=_t(e);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:u,top:c,width:f,height:h}=e.getBoundingClientRect();if(a||t(),!f||!h)return;const p=oo(c),d=oo(o.clientWidth-(u+f)),g=oo(o.clientHeight-(c+h)),x=oo(u),v={rootMargin:-p+"px "+-d+"px "+-g+"px "+-x+"px",threshold:ze(0,fr(1,l))||1};let w=!0;function _(k){const S=k[0].intersectionRatio;if(S!==l){if(!w)return s();S?s(!1,S):n=setTimeout(()=>{s(!1,1e-7)},1e3)}w=!1}try{r=new IntersectionObserver(_,{...v,root:o.ownerDocument})}catch{r=new IntersectionObserver(_,v)}r.observe(e)}return s(!0),i}function Kg(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=Ui(e),c=o||i?[...u?un(u):[],...un(t)]:[];c.forEach(b=>{o&&b.addEventListener("scroll",r,{passive:!0}),i&&b.addEventListener("resize",r)});const f=u&&a?Wg(u,r):null;let h=-1,p=null;s&&(p=new ResizeObserver(b=>{let[v]=b;v&&v.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(t)})),r()}),u&&!l&&p.observe(u),p.observe(t));let d,g=l?pr(e):null;l&&x();function x(){const b=pr(e);g&&(b.x!==g.x||b.y!==g.y||b.width!==g.width||b.height!==g.height)&&r(),g=b,d=requestAnimationFrame(x)}return r(),()=>{var b;c.forEach(v=>{o&&v.removeEventListener("scroll",r),i&&v.removeEventListener("resize",r)}),f==null||f(),(b=p)==null||b.disconnect(),p=null,l&&cancelAnimationFrame(d)}}const qi=ao,Yg=Fg,Jg=Ag,Xg=Cg,Gg=jg,Qg=(e,t,r)=>{const n=new Map,o={platform:qg,...r},i={...o.platform,_c:n};return kg(e,t,{...o,platform:i})};var lo=typeof document<"u"?m.useLayoutEffect:m.useEffect;function uo(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!uo(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!uo(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function nu(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ou(e,t){const r=nu(e);return Math.round(t*r)/r}function Wi(e){const t=F.useRef(e);return lo(()=>{t.current=e}),t}function Zg(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[c,f]=F.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=F.useState(n);uo(h,n)||p(n);const[d,g]=F.useState(null),[x,b]=F.useState(null),v=F.useCallback(K=>{K!==S.current&&(S.current=K,g(K))},[]),w=F.useCallback(K=>{K!==C.current&&(C.current=K,b(K))},[]),_=i||d,k=s||x,S=F.useRef(null),C=F.useRef(null),A=F.useRef(c),N=l!=null,P=Wi(l),L=Wi(o),I=Wi(u),R=F.useCallback(()=>{if(!S.current||!C.current)return;const K={placement:t,strategy:r,middleware:h};L.current&&(K.platform=L.current),Qg(S.current,C.current,K).then(Z=>{const re={...Z,isPositioned:I.current!==!1};q.current&&!uo(A.current,re)&&(A.current=re,jn.flushSync(()=>{f(re)}))})},[h,t,r,L,I]);lo(()=>{u===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,f(K=>({...K,isPositioned:!1})))},[u]);const q=F.useRef(!1);lo(()=>(q.current=!0,()=>{q.current=!1}),[]),lo(()=>{if(_&&(S.current=_),k&&(C.current=k),_&&k){if(P.current)return P.current(_,k,R);R()}},[_,k,R,P,N]);const J=F.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:w}),[v,w]),z=F.useMemo(()=>({reference:_,floating:k}),[_,k]),G=F.useMemo(()=>{const K={position:r,left:0,top:0};if(!z.floating)return K;const Z=ou(z.floating,c.x),re=ou(z.floating,c.y);return a?{...K,transform:"translate("+Z+"px, "+re+"px)",...nu(z.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Z,top:re}},[r,a,z.floating,c.x,c.y]);return F.useMemo(()=>({...c,update:R,refs:J,elements:z,floatingStyles:G}),[c,R,J,z,G])}const iu=(e,t)=>({...Yg(e),options:[e,t]}),ey=(e,t)=>({...Jg(e),options:[e,t]}),ty=(e,t)=>({...Xg(e),options:[e,t]}),ry=(e,t)=>({...Gg(e),options:[e,t]}),su={...F},ny=su.useInsertionEffect||(e=>e());function au(e){const t=F.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return ny(()=>{t.current=e}),F.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.current==null?void 0:t.current(...n)},[])}var Ki=typeof document<"u"?m.useLayoutEffect:m.useEffect;let lu=!1,oy=0;const uu=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+oy++;function iy(){const[e,t]=F.useState(()=>lu?uu():void 0);return Ki(()=>{e==null&&t(uu())},[]),F.useEffect(()=>{lu=!0},[]),e}const sy=su.useId||iy;let dn;process.env.NODE_ENV!=="production"&&(dn=new Set);function ay(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const o="Floating UI: "+r.join(" ");if(!((e=dn)!=null&&e.has(o))){var i;(i=dn)==null||i.add(o),console.warn(o)}}function ly(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const o="Floating UI: "+r.join(" ");if(!((e=dn)!=null&&e.has(o))){var i;(i=dn)==null||i.add(o),console.error(o)}}function uy(){const e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(o=>o(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var n;e.set(t,((n=e.get(t))==null?void 0:n.filter(o=>o!==r))||[])}}}const cy=F.createContext(null),fy=F.createContext(null),dy=()=>{var e;return((e=F.useContext(cy))==null?void 0:e.id)||null},py=()=>F.useContext(fy),my="data-floating-ui-focusable";function hy(e){const{open:t=!1,onOpenChange:r,elements:n}=e,o=sy(),i=F.useRef({}),[s]=F.useState(()=>uy()),a=dy()!=null;if(process.env.NODE_ENV!=="production"){const p=n.reference;p&&!Ue(p)&&ly("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,u]=F.useState(n.reference),c=au((p,d,g)=>{i.current.openEvent=p?d:void 0,s.emit("openchange",{open:p,event:d,reason:g,nested:a}),r==null||r(p,d,g)}),f=F.useMemo(()=>({setPositionReference:u}),[]),h=F.useMemo(()=>({reference:l||n.reference||null,floating:n.floating||null,domReference:n.reference}),[l,n.reference,n.floating]);return F.useMemo(()=>({dataRef:i,open:t,onOpenChange:c,elements:h,events:s,floatingId:o,refs:f}),[t,c,h,s,o,f])}function gy(e){e===void 0&&(e={});const{nodeId:t}=e,r=hy({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,o=n.elements,[i,s]=F.useState(null),[a,l]=F.useState(null),c=(o==null?void 0:o.domReference)||i,f=F.useRef(null),h=py();Ki(()=>{c&&(f.current=c)},[c]);const p=Zg({...e,elements:{...o,...a&&{reference:a}}}),d=F.useCallback(w=>{const _=Ue(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),contextElement:w}:w;l(_),p.refs.setReference(_)},[p.refs]),g=F.useCallback(w=>{(Ue(w)||w===null)&&(f.current=w,s(w)),(Ue(p.refs.reference.current)||p.refs.reference.current===null||w!==null&&!Ue(w))&&p.refs.setReference(w)},[p.refs]),x=F.useMemo(()=>({...p.refs,setReference:g,setPositionReference:d,domReference:f}),[p.refs,g,d]),b=F.useMemo(()=>({...p.elements,domReference:c}),[p.elements,c]),v=F.useMemo(()=>({...p,...n,refs:x,elements:b,nodeId:t}),[p,x,b,t,n]);return Ki(()=>{n.dataRef.current.floatingContext=v;const w=h==null?void 0:h.nodesRef.current.find(_=>_.id===t);w&&(w.context=v)}),F.useMemo(()=>({...p,context:v,refs:x,elements:b}),[p,x,b,v])}const cu="active",fu="selected";function Yi(e,t,r){const n=new Map,o=r==="item";let i=e;if(o&&e){const{[cu]:s,[fu]:a,...l}=e;i=l}return{...r==="floating"&&{tabIndex:-1,[my]:""},...i,...t.map(s=>{const a=s?s[r]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[u,c]=l;if(!(o&&[cu,fu].includes(u)))if(u.indexOf("on")===0){if(n.has(u)||n.set(u,[]),typeof c=="function"){var f;(f=n.get(u))==null||f.push(c),s[u]=function(){for(var h,p=arguments.length,d=new Array(p),g=0;g<p;g++)d[g]=arguments[g];return(h=n.get(u))==null?void 0:h.map(x=>x(...d)).find(x=>x!==void 0)}}}else s[u]=c}),s),{})}}function yy(e){e===void 0&&(e=[]);const t=e.map(a=>a==null?void 0:a.reference),r=e.map(a=>a==null?void 0:a.floating),n=e.map(a=>a==null?void 0:a.item),o=F.useCallback(a=>Yi(a,e,"reference"),t),i=F.useCallback(a=>Yi(a,e,"floating"),r),s=F.useCallback(a=>Yi(a,e,"item"),n);return F.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}function du(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const by=e=>({name:"inner",options:e,async fn(t){const{listRef:r,overflowRef:n,onFallbackChange:o,offset:i=0,index:s=0,minItemsVisible:a=4,referenceOverflowThreshold:l=0,scrollRef:u,...c}=Ar(e,t),{rects:f,elements:{floating:h}}=t,p=r.current[s],d=(u==null?void 0:u.current)||h,g=h.clientTop||d.clientTop,x=h.clientTop!==0,b=d.clientTop!==0,v=h===d;if(process.env.NODE_ENV!=="production"&&(t.placement.startsWith("bottom")||ay('`placement` side must be "bottom" when using the `inner`',"middleware.")),!p)return{};const w={...t,...await iu(-p.offsetTop-h.clientTop-f.reference.height/2-p.offsetHeight/2-i).fn(t)},_=await qi(du(w,d.scrollHeight+g+h.clientTop),c),k=await qi(w,{...c,elementContext:"reference"}),S=ze(0,_.top),C=w.y+S,P=(d.scrollHeight>d.clientHeight?L=>L:cn)(ze(0,d.scrollHeight+(x&&v||b?g*2:0)-S-ze(0,_.bottom)));if(d.style.maxHeight=P+"px",d.scrollTop=S,o){const L=d.offsetHeight<p.offsetHeight*fr(a,r.current.length)-1||k.top>=-l||k.bottom>=-l;jn.flushSync(()=>o(L))}return n&&(n.current=await qi(du({...w,y:C},d.offsetHeight+g+h.clientTop),c)),{y:C}}});function xy(e,t){const{open:r,elements:n}=e,{enabled:o=!0,overflowRef:i,scrollRef:s,onChange:a}=t,l=au(a),u=F.useRef(!1),c=F.useRef(null),f=F.useRef(null);F.useEffect(()=>{if(!o)return;function p(g){if(g.ctrlKey||!d||i.current==null)return;const x=g.deltaY,b=i.current.top>=-.5,v=i.current.bottom>=-.5,w=d.scrollHeight-d.clientHeight,_=x<0?-1:1,k=x<0?"max":"min";d.scrollHeight<=d.clientHeight||(!b&&x>0||!v&&x<0?(g.preventDefault(),jn.flushSync(()=>{l(S=>S+Math[k](x,w*_))})):/firefox/i.test(yg())&&(d.scrollTop+=x))}const d=(s==null?void 0:s.current)||n.floating;if(r&&d)return d.addEventListener("wheel",p),requestAnimationFrame(()=>{c.current=d.scrollTop,i.current!=null&&(f.current={...i.current})}),()=>{c.current=null,f.current=null,d.removeEventListener("wheel",p)}},[o,r,n.floating,i,s,l]);const h=F.useMemo(()=>({onKeyDown(){u.current=!0},onWheel(){u.current=!1},onPointerMove(){u.current=!1},onScroll(){const p=(s==null?void 0:s.current)||n.floating;if(!(!i.current||!p||!u.current)){if(c.current!==null){const d=p.scrollTop-c.current;(i.current.bottom<-.5&&d<-1||i.current.top<-.5&&d>1)&&jn.flushSync(()=>l(g=>g+d))}requestAnimationFrame(()=>{c.current=p.scrollTop})}}}),[n.floating,l,i,s]);return F.useMemo(()=>o?{floating:h}:{},[o,h])}let $r=m.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});$r.displayName="FloatingContext";let Ji=m.createContext(null);Ji.displayName="PlacementContext";function vy(e){return m.useMemo(()=>e?typeof e=="string"?{to:e}:e:null,[e])}function wy(){return m.useContext($r).setReference}function Ey(){return m.useContext($r).getReferenceProps}function Ty(){let{getFloatingProps:e,slot:t}=m.useContext($r);return m.useCallback((...r)=>Object.assign({},e(...r),{"data-anchor":t.anchor}),[e,t])}function _y(e=null){e===!1&&(e=null),typeof e=="string"&&(e={to:e});let t=m.useContext(Ji),r=m.useMemo(()=>e,[JSON.stringify(e,(o,i)=>{var s;return(s=i==null?void 0:i.outerHTML)!=null?s:i})]);he(()=>{t==null||t(r??null)},[t,r]);let n=m.useContext($r);return m.useMemo(()=>[n.setFloating,e?n.styles:{}],[n.setFloating,e,n.styles])}let pu=4;function Sy({children:e,enabled:t=!0}){let[r,n]=m.useState(null),[o,i]=m.useState(0),s=m.useRef(null),[a,l]=m.useState(null);ky(a);let u=t&&r!==null&&a!==null,{to:c="bottom",gap:f=0,offset:h=0,padding:p=0,inner:d}=Cy(r,a),[g,x="center"]=c.split(" ");he(()=>{u&&i(0)},[u]);let{refs:b,floatingStyles:v,context:w}=gy({open:u,placement:g==="selection"?x==="center"?"bottom":`bottom-${x}`:x==="center"?`${g}`:`${g}-${x}`,strategy:"absolute",transform:!1,middleware:[iu({mainAxis:g==="selection"?0:f,crossAxis:h}),ey({padding:p}),g!=="selection"&&ty({padding:p}),g==="selection"&&d?by({...d,padding:p,overflowRef:s,offset:o,minItemsVisible:pu,referenceOverflowThreshold:p,onFallbackChange(L){var I,R;if(!L)return;let q=w.elements.floating;if(!q)return;let J=parseFloat(getComputedStyle(q).scrollPaddingBottom)||0,z=Math.min(pu,q.childElementCount),G=0,K=0;for(let Z of(R=(I=w.elements.floating)==null?void 0:I.childNodes)!=null?R:[])if(Z instanceof HTMLElement){let re=Z.offsetTop,Ae=re+Z.clientHeight+J,Le=q.scrollTop,W=Le+q.clientHeight;if(re>=Le&&Ae<=W)z--;else{K=Math.max(0,Math.min(Ae,W)-Math.max(re,Le)),G=Z.clientHeight;break}}z>=1&&i(Z=>{let re=G*z-K+J;return Z>=re?Z:re})}}):null,ry({padding:p,apply({availableWidth:L,availableHeight:I,elements:R}){Object.assign(R.floating.style,{overflow:"auto",maxWidth:`${L}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${I}px)`})}})].filter(Boolean),whileElementsMounted:Kg}),[_=g,k=x]=w.placement.split("-");g==="selection"&&(_="selection");let S=m.useMemo(()=>({anchor:[_,k].filter(Boolean).join(" ")}),[_,k]),C=xy(w,{overflowRef:s,onChange:i}),{getReferenceProps:A,getFloatingProps:N}=yy([C]),P=te(L=>{l(L),b.setFloating(L)});return F.createElement(Ji.Provider,{value:n},F.createElement($r.Provider,{value:{setFloating:P,setReference:b.setReference,styles:v,getReferenceProps:A,getFloatingProps:N,slot:S}},e))}function ky(e){he(()=>{if(!e)return;let t=new MutationObserver(()=>{let r=window.getComputedStyle(e).maxHeight,n=parseFloat(r);if(isNaN(n))return;let o=parseInt(r);isNaN(o)||n!==o&&(e.style.maxHeight=`${Math.ceil(n)}px`)});return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}},[e])}function Cy(e,t){var r,n,o;let i=Xi((r=e==null?void 0:e.gap)!=null?r:"var(--anchor-gap, 0)",t),s=Xi((n=e==null?void 0:e.offset)!=null?n:"var(--anchor-offset, 0)",t),a=Xi((o=e==null?void 0:e.padding)!=null?o:"var(--anchor-padding, 0)",t);return{...e,gap:i,offset:s,padding:a}}function Xi(e,t,r=void 0){let n=lr(),o=te((l,u)=>{if(l==null)return[r,null];if(typeof l=="number")return[l,null];if(typeof l=="string"){if(!u)return[r,null];let c=hu(l,u);return[c,f=>{let h=mu(l);{let p=h.map(d=>window.getComputedStyle(u).getPropertyValue(d));n.requestAnimationFrame(function d(){n.nextFrame(d);let g=!1;for(let[b,v]of h.entries()){let w=window.getComputedStyle(u).getPropertyValue(v);if(p[b]!==w){p[b]=w,g=!0;break}}if(!g)return;let x=hu(l,u);c!==x&&(f(x),c=x)})}return n.dispose}]}return[r,null]}),i=m.useMemo(()=>o(e,t)[0],[e,t]),[s=i,a]=m.useState();return he(()=>{let[l,u]=o(e,t);if(a(l),!!u)return u(a)},[e,t]),s}function mu(e){let t=/var\((.*)\)/.exec(e);if(t){let r=t[1].indexOf(",");if(r===-1)return[t[1]];let n=t[1].slice(0,r).trim(),o=t[1].slice(r+1).trim();return o?[n,...mu(o)]:[n]}return[]}function hu(e,t){let r=document.createElement("div");t.appendChild(r),r.style.setProperty("margin-top","0px","important"),r.style.setProperty("margin-top",e,"important");let n=parseFloat(window.getComputedStyle(r).marginTop)||0;return t.removeChild(r),n}function Oy(e,t){let[r,n]=m.useState(t);return!e&&r!==t&&n(t),e?r:t}let Gi=m.createContext(null);Gi.displayName="OpenClosedContext";var yt=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(yt||{});function Qi(){return m.useContext(Gi)}function gu({value:e,children:t}){return m.createElement(Gi.Provider,{value:e},t)}function Fy(e){throw new Error("Unexpected object: "+e)}var Fe=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Fe||{});function Zi(e,t){let r=t.resolveItems();if(r.length<=0)return null;let n=t.resolveActiveIndex(),o=n??-1;switch(e.focus){case 0:{for(let i=0;i<r.length;++i)if(!t.resolveDisabled(r[i],i,r))return i;return n}case 1:{o===-1&&(o=r.length);for(let i=o-1;i>=0;--i)if(!t.resolveDisabled(r[i],i,r))return i;return n}case 2:{for(let i=o+1;i<r.length;++i)if(!t.resolveDisabled(r[i],i,r))return i;return n}case 3:{for(let i=r.length-1;i>=0;--i)if(!t.resolveDisabled(r[i],i,r))return i;return n}case 4:{for(let i=0;i<r.length;++i)if(t.resolveId(r[i],i,r)===e.id)return i;return n}case 5:return null;default:Fy(e)}}function Ay(e){let t=te(e),r=m.useRef(!1);m.useEffect(()=>(r.current=!1,()=>{r.current=!0,gl(()=>{r.current&&t()})}),[t])}function jy(){let e=typeof document>"u";return"useSyncExternalStore"in F?(t=>t.useSyncExternalStore)(F)(()=>()=>{},()=>!1,()=>!e):!1}function es(){let e=jy(),[t,r]=F.useState(ar.isHandoffComplete);return t&&ar.isHandoffComplete===!1&&r(!1),F.useEffect(()=>{t!==!0&&r(!0)},[t]),F.useEffect(()=>ar.handoff(),[]),e?!1:t}let $y=m.createContext(!1);function Ny(){return m.useContext($y)}function Ly(e){let t=Ny(),r=m.useContext(bu),n=Ii(e),[o,i]=m.useState(()=>{var s;if(!t&&r!==null)return(s=r.current)!=null?s:null;if(ar.isServer)return null;let a=n==null?void 0:n.getElementById("headlessui-portal-root");if(a)return a;if(n===null)return null;let l=n.createElement("div");return l.setAttribute("id","headlessui-portal-root"),n.body.appendChild(l)});return m.useEffect(()=>{o!==null&&(n!=null&&n.body.contains(o)||n==null||n.body.appendChild(o))},[o,n]),m.useEffect(()=>{t||r!==null&&i(r.current)},[r,i,t]),o}let yu=m.Fragment,Py=Qe(function(e,t){let r=e,n=m.useRef(null),o=ft(Sh(f=>{n.current=f}),t),i=Ii(n),s=Ly(n),[a]=m.useState(()=>{var f;return ar.isServer?null:(f=i==null?void 0:i.createElement("div"))!=null?f:null}),l=m.useContext(Ry),u=es();he(()=>{!s||!a||s.contains(a)||(a.setAttribute("data-headlessui-portal",""),s.appendChild(a))},[s,a]),he(()=>{if(a&&l)return l.register(a)},[l,a]),Ay(()=>{var f;!s||!a||(a instanceof Node&&s.contains(a)&&s.removeChild(a),s.childNodes.length<=0&&((f=s.parentElement)==null||f.removeChild(s)))});let c=ot();return u?!s||!a?null:Tt.createPortal(c({ourProps:{ref:o},theirProps:r,slot:{},defaultTag:yu,name:"Portal"}),a):null});function Dy(e,t){let r=ft(t),{enabled:n=!0,...o}=e,i=ot();return n?m.createElement(Py,{...o,ref:r}):i({ourProps:{ref:r},theirProps:o,slot:{},defaultTag:yu,name:"Portal"})}let Iy=m.Fragment,bu=m.createContext(null);function My(e,t){let{target:r,...n}=e,o={ref:ft(t)},i=ot();return m.createElement(bu.Provider,{value:r},i({ourProps:o,theirProps:n,defaultTag:Iy,name:"Popover.Group"}))}let Ry=m.createContext(null),Vy=Qe(Dy),By=Qe(My),Uy=Object.assign(Vy,{Group:By});function zy(){let e=m.useRef(!1);return he(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function xu(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:wu)!==m.Fragment||m.Children.count(e.children)===1}let co=m.createContext(null);co.displayName="TransitionContext";var Hy=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Hy||{});function qy(){let e=m.useContext(co);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function Wy(){let e=m.useContext(fo);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let fo=m.createContext(null);fo.displayName="NestingContext";function po(e){return"children"in e?po(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function vu(e,t){let r=ur(e),n=m.useRef([]),o=zy(),i=lr(),s=te((p,d=Wt.Hidden)=>{let g=n.current.findIndex(({el:x})=>x===p);g!==-1&&(ht(d,{[Wt.Unmount](){n.current.splice(g,1)},[Wt.Hidden](){n.current[g].state="hidden"}}),i.microTask(()=>{var x;!po(n)&&o.current&&((x=r.current)==null||x.call(r))}))}),a=te(p=>{let d=n.current.find(({el:g})=>g===p);return d?d.state!=="visible"&&(d.state="visible"):n.current.push({el:p,state:"visible"}),()=>s(p,Wt.Unmount)}),l=m.useRef([]),u=m.useRef(Promise.resolve()),c=m.useRef({enter:[],leave:[]}),f=te((p,d,g)=>{l.current.splice(0),t&&(t.chains.current[d]=t.chains.current[d].filter(([x])=>x!==p)),t==null||t.chains.current[d].push([p,new Promise(x=>{l.current.push(x)})]),t==null||t.chains.current[d].push([p,new Promise(x=>{Promise.all(c.current[d].map(([b,v])=>v)).then(()=>x())})]),d==="enter"?u.current=u.current.then(()=>t==null?void 0:t.wait.current).then(()=>g(d)):g(d)}),h=te((p,d,g)=>{Promise.all(c.current[d].splice(0).map(([x,b])=>b)).then(()=>{var x;(x=l.current.shift())==null||x()}).then(()=>g(d))});return m.useMemo(()=>({children:n,register:a,unregister:s,onStart:f,onStop:h,wait:u,chains:c}),[a,s,n,f,h,c,u])}let wu=m.Fragment,Eu=Qn.RenderStrategy;function Ky(e,t){var r,n;let{transition:o=!0,beforeEnter:i,afterEnter:s,beforeLeave:a,afterLeave:l,enter:u,enterFrom:c,enterTo:f,entered:h,leave:p,leaveFrom:d,leaveTo:g,...x}=e,[b,v]=m.useState(null),w=m.useRef(null),_=xu(e),k=ft(..._?[w,t,v]:t===null?[]:[t]),S=(r=x.unmount)==null||r?Wt.Unmount:Wt.Hidden,{show:C,appear:A,initial:N}=qy(),[P,L]=m.useState(C?"visible":"hidden"),I=Wy(),{register:R,unregister:q}=I;he(()=>R(w),[R,w]),he(()=>{if(S===Wt.Hidden&&w.current){if(C&&P!=="visible"){L("visible");return}return ht(P,{hidden:()=>q(w),visible:()=>R(w)})}},[P,w,R,q,C,S]);let J=es();he(()=>{if(_&&J&&P==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,P,J,_]);let z=N&&!A,G=A&&C&&N,K=m.useRef(!1),Z=vu(()=>{K.current||(L("hidden"),q(w))},I),re=te(je=>{K.current=!0;let _e=je?"enter":"leave";Z.onStart(w,_e,Pe=>{Pe==="enter"?i==null||i():Pe==="leave"&&(a==null||a())})}),Ae=te(je=>{let _e=je?"enter":"leave";K.current=!1,Z.onStop(w,_e,Pe=>{Pe==="enter"?s==null||s():Pe==="leave"&&(l==null||l())}),_e==="leave"&&!po(Z)&&(L("hidden"),q(w))});m.useEffect(()=>{_&&o||(re(C),Ae(C))},[C,_,o]);let Le=!(!o||!_||!J||z),[,W]=Bl(Le,b,C,{start:re,end:Ae}),xe=Kt({ref:k,className:((n=Oi(x.className,G&&u,G&&c,W.enter&&u,W.enter&&W.closed&&c,W.enter&&!W.closed&&f,W.leave&&p,W.leave&&!W.closed&&d,W.leave&&W.closed&&g,!W.transition&&C&&h))==null?void 0:n.trim())||void 0,...Vl(W)}),Te=0;P==="visible"&&(Te|=yt.Open),P==="hidden"&&(Te|=yt.Closed),W.enter&&(Te|=yt.Opening),W.leave&&(Te|=yt.Closing);let ae=ot();return m.createElement(fo.Provider,{value:Z},m.createElement(gu,{value:Te},ae({ourProps:xe,theirProps:x,defaultTag:wu,features:Eu,visible:P==="visible",name:"Transition.Child"})))}function Yy(e,t){let{show:r,appear:n=!1,unmount:o=!0,...i}=e,s=m.useRef(null),a=xu(e),l=ft(...a?[s,t]:t===null?[]:[t]);es();let u=Qi();if(r===void 0&&u!==null&&(r=(u&yt.Open)===yt.Open),r===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,f]=m.useState(r?"visible":"hidden"),h=vu(()=>{r||f("hidden")}),[p,d]=m.useState(!0),g=m.useRef([r]);he(()=>{p!==!1&&g.current[g.current.length-1]!==r&&(g.current.push(r),d(!1))},[g,r]);let x=m.useMemo(()=>({show:r,appear:n,initial:p}),[r,n,p]);he(()=>{r?f("visible"):!po(h)&&s.current!==null&&f("hidden")},[r,h]);let b={unmount:o},v=te(()=>{var k;p&&d(!1),(k=e.beforeEnter)==null||k.call(e)}),w=te(()=>{var k;p&&d(!1),(k=e.beforeLeave)==null||k.call(e)}),_=ot();return m.createElement(fo.Provider,{value:h},m.createElement(co.Provider,{value:x},_({ourProps:{...b,as:m.Fragment,children:m.createElement(Tu,{ref:l,...b,...i,beforeEnter:v,beforeLeave:w})},theirProps:{},defaultTag:m.Fragment,features:Eu,visible:c==="visible",name:"Transition"})))}function Jy(e,t){let r=m.useContext(co)!==null,n=Qi()!==null;return m.createElement(m.Fragment,null,!r&&n?m.createElement(ts,{ref:t,...e}):m.createElement(Tu,{ref:t,...e}))}let ts=Qe(Yy),Tu=Qe(Ky),Xy=Qe(Jy),_u=Object.assign(ts,{Child:Xy,Root:ts});function Gy(e,t){let r=m.useRef({left:0,top:0});if(he(()=>{if(!t)return;let o=t.getBoundingClientRect();o&&(r.current=o)},[e,t]),t==null||!e||t===document.activeElement)return!1;let n=t.getBoundingClientRect();return n.top!==r.current.top||n.left!==r.current.left}let Su=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function ku(e){var t,r;let n=(t=e.innerText)!=null?t:"",o=e.cloneNode(!0);if(!(o instanceof HTMLElement))return n;let i=!1;for(let a of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))a.remove(),i=!0;let s=i?(r=o.innerText)!=null?r:"":n;return Su.test(s)&&(s=s.replace(Su,"")),s}function Qy(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let r=e.getAttribute("aria-labelledby");if(r){let n=r.split(" ").map(o=>{let i=document.getElementById(o);if(i){let s=i.getAttribute("aria-label");return typeof s=="string"?s.trim():ku(i).trim()}return null}).filter(Boolean);if(n.length>0)return n.join(", ")}return ku(e).trim()}function Zy(e){let t=m.useRef(""),r=m.useRef("");return te(()=>{let n=e.current;if(!n)return"";let o=n.innerText;if(t.current===o)return r.current;let i=Qy(n).trim().toLowerCase();return t.current=o,r.current=i,i})}var e0=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(e0||{}),t0=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(t0||{}),r0=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(r0||{}),n0=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterOption=5]="RegisterOption",e[e.UnregisterOption=6]="UnregisterOption",e[e.SetButtonElement=7]="SetButtonElement",e[e.SetOptionsElement=8]="SetOptionsElement",e))(n0||{});function rs(e,t=r=>r){let r=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,n=Ll(t(e.options.slice()),i=>i.dataRef.current.domRef.current),o=r?n.indexOf(r):null;return o===-1&&(o=null),{options:n,activeOptionIndex:o}}let o0={1(e){return e.dataRef.current.disabled||e.listboxState===1?e:{...e,activeOptionIndex:null,listboxState:1,__demoMode:!1}},0(e){if(e.dataRef.current.disabled||e.listboxState===0)return e;let t=e.activeOptionIndex,{isSelected:r}=e.dataRef.current,n=e.options.findIndex(o=>r(o.dataRef.current.value));return n!==-1&&(t=n),{...e,listboxState:0,activeOptionIndex:t,__demoMode:!1}},2(e,t){var r,n,o,i,s;if(e.dataRef.current.disabled||e.listboxState===1)return e;let a={...e,searchQuery:"",activationTrigger:(r=t.trigger)!=null?r:1,__demoMode:!1};if(t.focus===Fe.Nothing)return{...a,activeOptionIndex:null};if(t.focus===Fe.Specific)return{...a,activeOptionIndex:e.options.findIndex(c=>c.id===t.id)};if(t.focus===Fe.Previous){let c=e.activeOptionIndex;if(c!==null){let f=e.options[c].dataRef.current.domRef,h=Zi(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled});if(h!==null){let p=e.options[h].dataRef.current.domRef;if(((n=f.current)==null?void 0:n.previousElementSibling)===p.current||((o=p.current)==null?void 0:o.previousElementSibling)===null)return{...a,activeOptionIndex:h}}}}else if(t.focus===Fe.Next){let c=e.activeOptionIndex;if(c!==null){let f=e.options[c].dataRef.current.domRef,h=Zi(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled});if(h!==null){let p=e.options[h].dataRef.current.domRef;if(((i=f.current)==null?void 0:i.nextElementSibling)===p.current||((s=p.current)==null?void 0:s.nextElementSibling)===null)return{...a,activeOptionIndex:h}}}}let l=rs(e),u=Zi(t,{resolveItems:()=>l.options,resolveActiveIndex:()=>l.activeOptionIndex,resolveId:c=>c.id,resolveDisabled:c=>c.dataRef.current.disabled});return{...a,...l,activeOptionIndex:u}},3:(e,t)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let r=e.searchQuery!==""?0:1,n=e.searchQuery+t.value.toLowerCase(),o=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+r).concat(e.options.slice(0,e.activeOptionIndex+r)):e.options).find(s=>{var a;return!s.dataRef.current.disabled&&((a=s.dataRef.current.textValue)==null?void 0:a.startsWith(n))}),i=o?e.options.indexOf(o):-1;return i===-1||i===e.activeOptionIndex?{...e,searchQuery:n}:{...e,searchQuery:n,activeOptionIndex:i,activationTrigger:1}},4(e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===""?e:{...e,searchQuery:""}},5:(e,t)=>{let r={id:t.id,dataRef:t.dataRef},n=rs(e,o=>[...o,r]);return e.activeOptionIndex===null&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(n.activeOptionIndex=n.options.indexOf(r)),{...e,...n}},6:(e,t)=>{let r=rs(e,n=>{let o=n.findIndex(i=>i.id===t.id);return o!==-1&&n.splice(o,1),n});return{...e,...r,activationTrigger:1}},7:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},8:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element}},ns=m.createContext(null);ns.displayName="ListboxActionsContext";function mo(e){let t=m.useContext(ns);if(t===null){let r=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,mo),r}return t}let ho=m.createContext(null);ho.displayName="ListboxDataContext";function pn(e){let t=m.useContext(ho);if(t===null){let r=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,pn),r}return t}function i0(e,t){return ht(t.type,o0,e,t)}let s0=m.Fragment;function a0(e,t){var r;let n=Ci(),{value:o,defaultValue:i,form:s,name:a,onChange:l,by:u,invalid:c=!1,disabled:f=n||!1,horizontal:h=!1,multiple:p=!1,__demoMode:d=!1,...g}=e;const x=h?"horizontal":"vertical";let b=ft(t),v=mh(i),[w=p?[]:void 0,_]=ph(o,l,v),[k,S]=m.useReducer(i0,{dataRef:m.createRef(),listboxState:d?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,optionsVisible:!1,buttonElement:null,optionsElement:null,__demoMode:d}),C=m.useRef({static:!1,hold:!1}),A=m.useRef(new Map),N=Dh(u),P=m.useCallback(oe=>ht(L.mode,{1:()=>w.some(me=>N(me,oe)),0:()=>N(w,oe)}),[w]),L=m.useMemo(()=>({...k,value:w,disabled:f,invalid:c,mode:p?1:0,orientation:x,compare:N,isSelected:P,optionsPropsRef:C,listRef:A}),[w,f,c,p,k,A]);he(()=>{k.dataRef.current=L},[L]);let I=L.listboxState===0;tg(I,[L.buttonElement,L.optionsElement],(oe,me)=>{var $e;S({type:1}),Nl(me,Di.Loose)||(oe.preventDefault(),($e=L.buttonElement)==null||$e.focus())});let R=m.useMemo(()=>({open:L.listboxState===0,disabled:f,invalid:c,value:w}),[L,f,w,c]),q=te(oe=>{let me=L.options.find($e=>$e.id===oe);me&&Ae(me.dataRef.current.value)}),J=te(()=>{if(L.activeOptionIndex!==null){let{dataRef:oe,id:me}=L.options[L.activeOptionIndex];Ae(oe.current.value),S({type:2,focus:Fe.Specific,id:me})}}),z=te(()=>S({type:0})),G=te(()=>S({type:1})),K=lr(),Z=te((oe,me,$e)=>{K.dispose(),K.microTask(()=>oe===Fe.Specific?S({type:2,focus:Fe.Specific,id:me,trigger:$e}):S({type:2,focus:oe,trigger:$e}))}),re=te((oe,me)=>(S({type:5,id:oe,dataRef:me}),()=>S({type:6,id:oe}))),Ae=te(oe=>ht(L.mode,{0(){return _==null?void 0:_(oe)},1(){let me=L.value.slice(),$e=me.findIndex(zt=>N(zt,oe));return $e===-1?me.push(oe):me.splice($e,1),_==null?void 0:_(me)}})),Le=te(oe=>S({type:3,value:oe})),W=te(()=>S({type:4})),xe=te(oe=>{S({type:7,element:oe})}),Te=te(oe=>{S({type:8,element:oe})}),ae=m.useMemo(()=>({onChange:Ae,registerOption:re,goToOption:Z,closeListbox:G,openListbox:z,selectActiveOption:J,selectOption:q,search:Le,clearSearch:W,setButtonElement:xe,setOptionsElement:Te}),[]),[je,_e]=Ah({inherit:!0}),Pe={ref:b},vt=m.useCallback(()=>{if(v!==void 0)return _==null?void 0:_(v)},[_,v]),Se=ot();return m.createElement(_e,{value:je,props:{htmlFor:(r=L.buttonElement)==null?void 0:r.id},slot:{open:L.listboxState===0,disabled:f}},m.createElement(Sy,null,m.createElement(ns.Provider,{value:ae},m.createElement(ho.Provider,{value:L},m.createElement(gu,{value:ht(L.listboxState,{0:yt.Open,1:yt.Closed})},a!=null&&w!=null&&m.createElement(vh,{disabled:f,data:{[a]:w},form:s,onReset:vt}),Se({ourProps:Pe,theirProps:g,slot:R,defaultTag:s0,name:"Listbox"}))))))}let l0="button";function u0(e,t){var r;let n=pn("Listbox.Button"),o=mo("Listbox.Button"),i=m.useId(),s=Tl(),{id:a=s||`headlessui-listbox-button-${i}`,disabled:l=n.disabled||!1,autoFocus:u=!1,...c}=e,f=ft(t,wy(),o.setButtonElement),h=Ey(),p=te(L=>{switch(L.key){case Ne.Enter:hh(L.currentTarget);break;case Ne.Space:case Ne.ArrowDown:L.preventDefault(),Tt.flushSync(()=>o.openListbox()),n.value||o.goToOption(Fe.First);break;case Ne.ArrowUp:L.preventDefault(),Tt.flushSync(()=>o.openListbox()),n.value||o.goToOption(Fe.Last);break}}),d=te(L=>{switch(L.key){case Ne.Space:L.preventDefault();break}}),g=te(L=>{var I;if(Th(L.currentTarget))return L.preventDefault();n.listboxState===0?(Tt.flushSync(()=>o.closeListbox()),(I=n.buttonElement)==null||I.focus({preventScroll:!0})):(L.preventDefault(),o.openListbox())}),x=te(L=>L.preventDefault()),b=Cl([a]),v=kh(),{isFocusVisible:w,focusProps:_}=th({autoFocus:u}),{isHovered:k,hoverProps:S}=eh({isDisabled:l}),{pressed:C,pressProps:A}=ah({disabled:l}),N=m.useMemo(()=>({open:n.listboxState===0,active:C||n.listboxState===0,disabled:l,invalid:n.invalid,value:n.value,hover:k,focus:w,autofocus:u}),[n.listboxState,n.value,l,k,w,C,n.invalid,u]),P=bl(h(),{ref:f,id:a,type:rg(e,n.buttonElement),"aria-haspopup":"listbox","aria-controls":(r=n.optionsElement)==null?void 0:r.id,"aria-expanded":n.listboxState===0,"aria-labelledby":b,"aria-describedby":v,disabled:l||void 0,autoFocus:u,onKeyDown:p,onKeyUp:d,onKeyPress:x,onClick:g},_,S,A);return ot()({ourProps:P,theirProps:c,slot:N,defaultTag:l0,name:"Listbox.Button"})}let Cu=m.createContext(!1),c0="div",f0=Qn.RenderStrategy|Qn.Static;function d0(e,t){var r,n;let o=m.useId(),{id:i=`headlessui-listbox-options-${o}`,anchor:s,portal:a=!1,modal:l=!0,transition:u=!1,...c}=e,f=vy(s),[h,p]=m.useState(null);f&&(a=!0);let d=pn("Listbox.Options"),g=mo("Listbox.Options"),x=Ii(d.optionsElement),b=Qi(),[v,w]=Bl(u,h,b!==null?(b&yt.Open)===yt.Open:d.listboxState===0);Uh(v,d.buttonElement,g.closeListbox);let _=d.__demoMode?!1:l&&d.listboxState===0;lg(_,x);let k=d.__demoMode?!1:l&&d.listboxState===0;Bh(k,{allowed:m.useCallback(()=>[d.buttonElement,d.optionsElement],[d.buttonElement,d.optionsElement])});let S=d.listboxState!==0,C=Gy(S,d.buttonElement)?!1:v,A=v&&d.listboxState===1,N=Oy(A,d.value),P=te(W=>d.compare(N,W)),L=m.useMemo(()=>{var W;if(f==null||!((W=f==null?void 0:f.to)!=null&&W.includes("selection")))return null;let xe=d.options.findIndex(Te=>P(Te.dataRef.current.value));return xe===-1&&(xe=0),xe},[f,d.options]),I=(()=>{if(f==null)return;if(L===null)return{...f,inner:void 0};let W=Array.from(d.listRef.current.values());return{...f,inner:{listRef:{current:W},index:L}}})(),[R,q]=_y(I),J=Ty(),z=ft(t,f?R:null,g.setOptionsElement,p),G=lr();m.useEffect(()=>{var W;let xe=d.optionsElement;xe&&d.listboxState===0&&xe!==((W=on(xe))==null?void 0:W.activeElement)&&(xe==null||xe.focus({preventScroll:!0}))},[d.listboxState,d.optionsElement]);let K=te(W=>{var xe,Te;switch(G.dispose(),W.key){case Ne.Space:if(d.searchQuery!=="")return W.preventDefault(),W.stopPropagation(),g.search(W.key);case Ne.Enter:if(W.preventDefault(),W.stopPropagation(),d.activeOptionIndex!==null){let{dataRef:ae}=d.options[d.activeOptionIndex];g.onChange(ae.current.value)}d.mode===0&&(Tt.flushSync(()=>g.closeListbox()),(xe=d.buttonElement)==null||xe.focus({preventScroll:!0}));break;case ht(d.orientation,{vertical:Ne.ArrowDown,horizontal:Ne.ArrowRight}):return W.preventDefault(),W.stopPropagation(),g.goToOption(Fe.Next);case ht(d.orientation,{vertical:Ne.ArrowUp,horizontal:Ne.ArrowLeft}):return W.preventDefault(),W.stopPropagation(),g.goToOption(Fe.Previous);case Ne.Home:case Ne.PageUp:return W.preventDefault(),W.stopPropagation(),g.goToOption(Fe.First);case Ne.End:case Ne.PageDown:return W.preventDefault(),W.stopPropagation(),g.goToOption(Fe.Last);case Ne.Escape:W.preventDefault(),W.stopPropagation(),Tt.flushSync(()=>g.closeListbox()),(Te=d.buttonElement)==null||Te.focus({preventScroll:!0});return;case Ne.Tab:W.preventDefault(),W.stopPropagation(),Tt.flushSync(()=>g.closeListbox()),Xh(d.buttonElement,W.shiftKey?Pi.Previous:Pi.Next);break;default:W.key.length===1&&(g.search(W.key),G.setTimeout(()=>g.clearSearch(),350));break}}),Z=(r=d.buttonElement)==null?void 0:r.id,re=m.useMemo(()=>({open:d.listboxState===0}),[d.listboxState]),Ae=bl(f?J():{},{id:i,ref:z,"aria-activedescendant":d.activeOptionIndex===null||(n=d.options[d.activeOptionIndex])==null?void 0:n.id,"aria-multiselectable":d.mode===1?!0:void 0,"aria-labelledby":Z,"aria-orientation":d.orientation,onKeyDown:K,role:"listbox",tabIndex:d.listboxState===0?0:void 0,style:{...c.style,...q,"--button-width":Mh(d.buttonElement,!0).width},...Vl(w)}),Le=ot();return m.createElement(Uy,{enabled:a?e.static||v:!1},m.createElement(ho.Provider,{value:d.mode===1?d:{...d,isSelected:P}},Le({ourProps:Ae,theirProps:c,slot:re,defaultTag:c0,features:f0,visible:C,name:"Listbox.Options"})))}let p0="div";function m0(e,t){let r=m.useId(),{id:n=`headlessui-listbox-option-${r}`,disabled:o=!1,value:i,...s}=e,a=m.useContext(Cu)===!0,l=pn("Listbox.Option"),u=mo("Listbox.Option"),c=l.activeOptionIndex!==null?l.options[l.activeOptionIndex].id===n:!1,f=l.isSelected(i),h=m.useRef(null),p=Zy(h),d=ur({disabled:o,value:i,domRef:h,get textValue(){return p()}}),g=ft(t,h,N=>{N?l.listRef.current.set(n,N):l.listRef.current.delete(n)});he(()=>{if(!l.__demoMode&&l.listboxState===0&&c&&l.activationTrigger!==0)return Rt().requestAnimationFrame(()=>{var N,P;(P=(N=h.current)==null?void 0:N.scrollIntoView)==null||P.call(N,{block:"nearest"})})},[h,c,l.__demoMode,l.listboxState,l.activationTrigger,l.activeOptionIndex]),he(()=>{if(!a)return u.registerOption(n,d)},[d,n,a]);let x=te(N=>{var P;if(o)return N.preventDefault();u.onChange(i),l.mode===0&&(Tt.flushSync(()=>u.closeListbox()),(P=l.buttonElement)==null||P.focus({preventScroll:!0}))}),b=te(()=>{if(o)return u.goToOption(Fe.Nothing);u.goToOption(Fe.Specific,n)}),v=ug(),w=te(N=>{v.update(N),!o&&(c||u.goToOption(Fe.Specific,n,0))}),_=te(N=>{v.wasMoved(N)&&(o||c||u.goToOption(Fe.Specific,n,0))}),k=te(N=>{v.wasMoved(N)&&(o||c&&u.goToOption(Fe.Nothing))}),S=m.useMemo(()=>({active:c,focus:c,selected:f,disabled:o,selectedOption:f&&a}),[c,f,o,a]),C=a?{}:{id:n,ref:g,role:"option",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,"aria-selected":f,disabled:void 0,onClick:x,onFocus:b,onPointerEnter:w,onMouseEnter:w,onPointerMove:_,onMouseMove:_,onPointerLeave:k,onMouseLeave:k},A=ot();return!f&&a?null:A({ourProps:C,theirProps:s,slot:S,defaultTag:p0,name:"Listbox.Option"})}let h0=m.Fragment;function g0(e,t){let{options:r,placeholder:n,...o}=e,i={ref:ft(t)},s=pn("ListboxSelectedOption"),a=m.useMemo(()=>({}),[]),l=s.value===void 0||s.value===null||s.mode===1&&Array.isArray(s.value)&&s.value.length===0,u=ot();return m.createElement(Cu.Provider,{value:!0},u({ourProps:i,theirProps:{...o,children:m.createElement(m.Fragment,null,n&&l?n:r)},slot:a,defaultTag:h0,name:"ListboxSelectedOption"}))}let y0=Qe(a0),b0=Qe(u0),x0=Lh,v0=Qe(d0),w0=Qe(m0),E0=Qe(g0),Xt=Object.assign(y0,{Button:b0,Label:x0,Options:v0,Option:w0,SelectedOption:E0});function Ou({element:e,validationData:t}){var l;const[r,n]=m.useState(e.value||[]),{register:o=()=>({}),setValue:i,getValues:s}=t||{},a=s&&s(e==null?void 0:e.id);return m.useEffect(()=>{o(e.id)},[e.id,o]),m.useEffect(()=>{i&&i(e.id,r)},[e.id,r,i]),m.useEffect(()=>{a!=null&&a.length&&!(r!=null&&r.length)&&n(a)},[a,r==null?void 0:r.length]),y.jsx("div",{className:"w-full z-10",children:y.jsx(Xt,{value:r,onChange:n,multiple:!0,children:y.jsxs("div",{className:"relative",children:[y.jsx(Xt.Button,{className:"w-full py-2 pl-3 pr-10 text-left bg-white input-control cursor-default ",children:(r==null?void 0:r.length)>0?r==null?void 0:r.map(u=>u.label).join(", "):"Select options"}),y.jsx(_u,{as:m.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:y.jsx(Xt.Options,{className:"absolute w-full py-1 mt-1 grid gap-y-[1px] bg-white rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm",children:(l=e==null?void 0:e.options)==null?void 0:l.map((u,c)=>y.jsx(Xt.Option,{className:({active:f})=>`cursor-default select-none relative w-full flex justify-between ${f?"text-gray-700 bg-gray-100":"text-gray-700"}`,value:u,children:({selected:f})=>y.jsxs("div",{className:`flex items-center justify-between py-2 pl-4 pr-4 w-full ${f?"bg-gray-100":""}`,children:[y.jsx("span",{className:`block truncate ${f?"font-medium":"font-normal"}`,children:u==null?void 0:u.label}),f?y.jsx("span",{className:"absolute inset-y-0 right-3 flex items-center pl-3 text-gray-600",children:"✓"}):null]})},c))})})]})})})}function Fu({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return y.jsx("input",{placeholder:e.placeholder,type:e.inputType,className:"input-control",...r(e.id)})}function T0({onFileLoaded:e,disabled:t}){const[r,n]=m.useState(null),o=i=>{var l;const s=(l=i.target.files)==null?void 0:l[0];if(!s)return;const a=new FileReader;a.onloadend=()=>{const u=a.result;e({base64:u,type:s.type,name:s.name}),n(null)},a.onerror=()=>{n("Failed to read file.")},a.readAsDataURL(s)};return y.jsxs("div",{className:"flex flex-col items-start gap-2",children:[y.jsx("input",{type:"file",onChange:o,disabled:t,className:`block w-full text-sm text-gray-500 file:mr-4 file:px-4 input-control !py-1 !pl-1\r
51
+ `))}else{let h=c.props,p=h==null?void 0:h.className,d=typeof p=="function"?(...b)=>Oi(p(...b),l.className):Oi(p,l.className),g=d?{className:d}:{},x=yl(c.props,Kt(Fi(l,["ref"])));for(let b in f)b in x&&delete f[b];return m.cloneElement(c,Object.assign({},x,f,u,{ref:o(dh(c),u.ref)},g))}return m.createElement(i,Object.assign({},Fi(l,["ref"]),i!==m.Fragment&&u,i!==m.Fragment&&f),c)}function ch(){let e=m.useRef([]),t=m.useCallback(r=>{for(let n of e.current)n!=null&&(typeof n=="function"?n(r):n.current=r)},[]);return(...r)=>{if(!r.every(n=>n==null))return e.current=r,t}}function fh(...e){return e.every(t=>t==null)?void 0:t=>{for(let r of e)r!=null&&(typeof r=="function"?r(t):r.current=t)}}function yl(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},r={};for(let n of e)for(let o in n)o.startsWith("on")&&typeof n[o]=="function"?(r[o]!=null||(r[o]=[]),r[o].push(n[o])):t[o]=n[o];if(t.disabled||t["aria-disabled"])for(let n in r)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(n)&&(r[n]=[o=>{var i;return(i=o==null?void 0:o.preventDefault)==null?void 0:i.call(o)}]);for(let n in r)Object.assign(t,{[n](o,...i){let s=r[n];for(let a of s){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;a(o,...i)}}});return t}function bl(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},r={};for(let n of e)for(let o in n)o.startsWith("on")&&typeof n[o]=="function"?(r[o]!=null||(r[o]=[]),r[o].push(n[o])):t[o]=n[o];for(let n in r)Object.assign(t,{[n](...o){let i=r[n];for(let s of i)s==null||s(...o)}});return t}function Qe(e){var t;return Object.assign(m.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Kt(e){let t=Object.assign({},e);for(let r in t)t[r]===void 0&&delete t[r];return t}function Fi(e,t=[]){let r=Object.assign({},e);for(let n of t)n in r&&delete r[n];return r}function dh(e){return m.version.split(".")[0]>="19"?e.props.ref:e.ref}function ph(e,t,r){let[n,o]=m.useState(r),i=e!==void 0,s=m.useRef(i),a=m.useRef(!1),l=m.useRef(!1);return i&&!s.current&&!a.current?(a.current=!0,s.current=i,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!i&&s.current&&!l.current&&(l.current=!0,s.current=i,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[i?e:n,te(u=>(i||o(u),t==null?void 0:t(u)))]}function mh(e){let[t]=m.useState(e);return t}function xl(e={},t=null,r=[]){for(let[n,o]of Object.entries(e))wl(r,vl(t,n),o);return r}function vl(e,t){return e?e+"["+t+"]":t}function wl(e,t,r){if(Array.isArray(r))for(let[n,o]of r.entries())wl(e,vl(t,n.toString()),o);else r instanceof Date?e.push([t,r.toISOString()]):typeof r=="boolean"?e.push([t,r?"1":"0"]):typeof r=="string"?e.push([t,r]):typeof r=="number"?e.push([t,`${r}`]):r==null?e.push([t,""]):xl(r,t,e)}function hh(e){var t,r;let n=(t=e==null?void 0:e.form)!=null?t:e.closest("form");if(n){for(let o of n.elements)if(o!==e&&(o.tagName==="INPUT"&&o.type==="submit"||o.tagName==="BUTTON"&&o.type==="submit"||o.nodeName==="INPUT"&&o.type==="image")){o.click();return}(r=n.requestSubmit)==null||r.call(n)}}let gh="span";var Ai=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Ai||{});function yh(e,t){var r;let{features:n=1,...o}=e,i={ref:t,"aria-hidden":(n&2)===2?!0:(r=o["aria-hidden"])!=null?r:void 0,hidden:(n&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return ot()({ourProps:i,theirProps:o,slot:{},defaultTag:gh,name:"Hidden"})}let El=Qe(yh),bh=m.createContext(null);function xh({children:e}){let t=m.useContext(bh);if(!t)return m.createElement(m.Fragment,null,e);let{target:r}=t;return r?Tt.createPortal(m.createElement(m.Fragment,null,e),r):null}function vh({data:e,form:t,disabled:r,onReset:n,overrides:o}){let[i,s]=m.useState(null),a=lr();return m.useEffect(()=>{if(n&&i)return a.addEventListener(i,"reset",n)},[i,t,n]),m.createElement(xh,null,m.createElement(wh,{setForm:s,formId:t}),xl(e).map(([l,u])=>m.createElement(El,{features:Ai.Hidden,...Kt({key:l,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:r,name:l,value:u,...o})})))}function wh({setForm:e,formId:t}){return m.useEffect(()=>{if(t){let r=document.getElementById(t);r&&e(r)}},[e,t]),t?null:m.createElement(El,{features:Ai.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:r=>{if(!r)return;let n=r.closest("form");n&&e(n)}})}let Eh=m.createContext(void 0);function Tl(){return m.useContext(Eh)}function Th(e){let t=e.parentElement,r=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(r=t),t=t.parentElement;let n=(t==null?void 0:t.getAttribute("disabled"))==="";return n&&_h(r)?!1:n}function _h(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}let _l=Symbol();function Sh(e,t=!0){return Object.assign(e,{[_l]:t})}function ft(...e){let t=m.useRef(e);m.useEffect(()=>{t.current=e},[e]);let r=te(n=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(n):o.current=n)});return e.every(n=>n==null||(n==null?void 0:n[_l]))?void 0:r}let ji=m.createContext(null);ji.displayName="DescriptionContext";function Sl(){let e=m.useContext(ji);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Sl),t}return e}function kh(){var e,t;return(t=(e=m.useContext(ji))==null?void 0:e.value)!=null?t:void 0}let Ch="p";function Oh(e,t){let r=m.useId(),n=Ci(),{id:o=`headlessui-description-${r}`,...i}=e,s=Sl(),a=ft(t);he(()=>s.register(o),[o,s.register]);let l=n||!1,u=m.useMemo(()=>({...s.slot,disabled:l}),[s.slot,l]),c={ref:a,...s.props,id:o};return ot()({ourProps:c,theirProps:i,slot:u,defaultTag:Ch,name:s.name||"Description"})}let Fh=Qe(Oh);Object.assign(Fh,{});var Ne=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Ne||{});let to=m.createContext(null);to.displayName="LabelContext";function kl(){let e=m.useContext(to);if(e===null){let t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,kl),t}return e}function Cl(e){var t,r,n;let o=(r=(t=m.useContext(to))==null?void 0:t.value)!=null?r:void 0;return((n=e==null?void 0:e.length)!=null?n:0)>0?[o,...e].filter(Boolean).join(" "):o}function Ah({inherit:e=!1}={}){let t=Cl(),[r,n]=m.useState([]),o=e?[t,...r].filter(Boolean):r;return[o.length>0?o.join(" "):void 0,m.useMemo(()=>function(i){let s=te(l=>(n(u=>[...u,l]),()=>n(u=>{let c=u.slice(),f=c.indexOf(l);return f!==-1&&c.splice(f,1),c}))),a=m.useMemo(()=>({register:s,slot:i.slot,name:i.name,props:i.props,value:i.value}),[s,i.slot,i.name,i.props,i.value]);return m.createElement(to.Provider,{value:a},i.children)},[n])]}let jh="label";function $h(e,t){var r;let n=m.useId(),o=kl(),i=Tl(),s=Ci(),{id:a=`headlessui-label-${n}`,htmlFor:l=i??((r=o.props)==null?void 0:r.htmlFor),passive:u=!1,...c}=e,f=ft(t);he(()=>o.register(a),[a,o.register]);let h=te(x=>{let b=x.currentTarget;if(b instanceof HTMLLabelElement&&x.preventDefault(),o.props&&"onClick"in o.props&&typeof o.props.onClick=="function"&&o.props.onClick(x),b instanceof HTMLLabelElement){let v=document.getElementById(b.htmlFor);if(v){let w=v.getAttribute("disabled");if(w==="true"||w==="")return;let _=v.getAttribute("aria-disabled");if(_==="true"||_==="")return;(v instanceof HTMLInputElement&&(v.type==="radio"||v.type==="checkbox")||v.role==="radio"||v.role==="checkbox"||v.role==="switch")&&v.click(),v.focus({preventScroll:!0})}}}),p=s||!1,d=m.useMemo(()=>({...o.slot,disabled:p}),[o.slot,p]),g={ref:f,...o.props,id:a,htmlFor:l,onClick:h};return u&&("onClick"in g&&(delete g.htmlFor,delete g.onClick),"onClick"in c&&delete c.onClick),ot()({ourProps:g,theirProps:c,slot:d,defaultTag:l?jh:"div",name:o.name||"Label"})}let Nh=Qe($h),Ph=Object.assign(Nh,{});function Lh(e,t){return e!==null&&t!==null&&typeof e=="object"&&typeof t=="object"&&"id"in e&&"id"in t?e.id===t.id:e===t}function Dh(e=Lh){return m.useCallback((t,r)=>{if(typeof e=="string"){let n=e;return(t==null?void 0:t[n])===(r==null?void 0:r[n])}return e(t,r)},[e])}function Ih(e){if(e===null)return{width:0,height:0};let{width:t,height:r}=e.getBoundingClientRect();return{width:t,height:r}}function Mh(e,t=!1){let[r,n]=m.useReducer(()=>({}),{}),o=m.useMemo(()=>Ih(e),[e,r]);return he(()=>{if(!e)return;let i=new ResizeObserver(n);return i.observe(e),()=>{i.disconnect()}},[e]),t?{width:`${o.width}px`,height:`${o.height}px`}:o}let Rh=class extends Map{constructor(t){super(),this.factory=t}get(t){let r=super.get(t);return r===void 0&&(r=this.factory(t),this.set(t,r)),r}};function Ol(e,t){let r=e(),n=new Set;return{getSnapshot(){return r},subscribe(o){return n.add(o),()=>n.delete(o)},dispatch(o,...i){let s=t[o].call(r,...i);s&&(r=s,n.forEach(a=>a()))}}}function Fl(e){return m.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}let Vh=new Rh(()=>Ol(()=>[],{ADD(e){return this.includes(e)?this:[...this,e]},REMOVE(e){let t=this.indexOf(e);if(t===-1)return this;let r=this.slice();return r.splice(t,1),r}}));function $i(e,t){let r=Vh.get(t),n=m.useId(),o=Fl(r);if(he(()=>{if(e)return r.dispatch("ADD",n),()=>r.dispatch("REMOVE",n)},[r,e]),!e)return!1;let i=o.indexOf(n),s=o.length;return i===-1&&(i=s,s+=1),i===s-1}let Ni=new Map,sn=new Map;function Al(e){var t;let r=(t=sn.get(e))!=null?t:0;return sn.set(e,r+1),r!==0?()=>jl(e):(Ni.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>jl(e))}function jl(e){var t;let r=(t=sn.get(e))!=null?t:1;if(r===1?sn.delete(e):sn.set(e,r-1),r!==1)return;let n=Ni.get(e);n&&(n["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n["aria-hidden"]),e.inert=n.inert,Ni.delete(e))}function Bh(e,{allowed:t,disallowed:r}={}){let n=$i(e,"inert-others");he(()=>{var o,i;if(!n)return;let s=Rt();for(let l of(o=r==null?void 0:r())!=null?o:[])l&&s.add(Al(l));let a=(i=t==null?void 0:t())!=null?i:[];for(let l of a){if(!l)continue;let u=on(l);if(!u)continue;let c=l.parentElement;for(;c&&c!==u.body;){for(let f of c.children)a.some(h=>f.contains(h))||s.add(Al(f));c=c.parentElement}}return s.dispose},[n,t,r])}function Uh(e,t,r){let n=ur(o=>{let i=o.getBoundingClientRect();i.x===0&&i.y===0&&i.width===0&&i.height===0&&r()});m.useEffect(()=>{if(!e)return;let o=t===null?null:t instanceof HTMLElement?t:t.current;if(!o)return;let i=Rt();if(typeof ResizeObserver<"u"){let s=new ResizeObserver(()=>n.current(o));s.observe(o),i.add(()=>s.disconnect())}if(typeof IntersectionObserver<"u"){let s=new IntersectionObserver(()=>n.current(o));s.observe(o),i.add(()=>s.disconnect())}return()=>i.dispose()},[t,n,e])}let Pi=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),zh=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Li=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(Li||{}),Hh=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Hh||{}),qh=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(qh||{});function $l(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Pi)).sort((t,r)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}function Wh(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(zh)).sort((t,r)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}var Di=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Di||{});function Nl(e,t=0){var r;return e===((r=on(e))==null?void 0:r.body)?!1:ht(t,{0(){return e.matches(Pi)},1(){let n=e;for(;n!==null;){if(n.matches(Pi))return!0;n=n.parentElement}return!1}})}var Kh=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Kh||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));let Yh=["textarea","input"].join(",");function Jh(e){var t,r;return(r=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,Yh))!=null?r:!1}function Pl(e,t=r=>r){return e.slice().sort((r,n)=>{let o=t(r),i=t(n);if(o===null||i===null)return 0;let s=o.compareDocumentPosition(i);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Xh(e,t){return Gh($l(),t,{relativeTo:e})}function Gh(e,t,{sorted:r=!0,relativeTo:n=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,s=Array.isArray(e)?r?Pl(e):e:t&64?Wh(e):$l(e);o.length>0&&s.length>1&&(s=s.filter(p=>!o.some(d=>d!=null&&"current"in d?(d==null?void 0:d.current)===p:d===p))),n=n??i.activeElement;let a=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,s.indexOf(n))-1;if(t&4)return Math.max(0,s.indexOf(n))+1;if(t&8)return s.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=t&32?{preventScroll:!0}:{},c=0,f=s.length,h;do{if(c>=f||c+f<=0)return 0;let p=l+c;if(t&16)p=(p+f)%f;else{if(p<0)return 3;if(p>=f)return 1}h=s[p],h==null||h.focus(u),c+=a}while(h!==i.activeElement);return t&6&&Jh(h)&&h.select(),2}function Ll(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Qh(){return/Android/gi.test(window.navigator.userAgent)}function Zh(){return Ll()||Qh()}function an(e,t,r,n){let o=ur(r);m.useEffect(()=>{if(!e)return;function i(s){o.current(s)}return document.addEventListener(t,i,n),()=>document.removeEventListener(t,i,n)},[e,t,n])}function eg(e,t,r,n){let o=ur(r);m.useEffect(()=>{if(!e)return;function i(s){o.current(s)}return window.addEventListener(t,i,n),()=>window.removeEventListener(t,i,n)},[e,t,n])}const Dl=30;function tg(e,t,r){let n=$i(e,"outside-click"),o=ur(r),i=m.useCallback(function(l,u){if(l.defaultPrevented)return;let c=u(l);if(c===null||!c.getRootNode().contains(c)||!c.isConnected)return;let f=function h(p){return typeof p=="function"?h(p()):Array.isArray(p)||p instanceof Set?p:[p]}(t);for(let h of f)if(h!==null&&(h.contains(c)||l.composed&&l.composedPath().includes(h)))return;return!Nl(c,Di.Loose)&&c.tabIndex!==-1&&l.preventDefault(),o.current(l,c)},[o,t]),s=m.useRef(null);an(n,"pointerdown",l=>{var u,c;s.current=((c=(u=l.composedPath)==null?void 0:u.call(l))==null?void 0:c[0])||l.target},!0),an(n,"mousedown",l=>{var u,c;s.current=((c=(u=l.composedPath)==null?void 0:u.call(l))==null?void 0:c[0])||l.target},!0),an(n,"click",l=>{Zh()||s.current&&(i(l,()=>s.current),s.current=null)},!0);let a=m.useRef({x:0,y:0});an(n,"touchstart",l=>{a.current.x=l.touches[0].clientX,a.current.y=l.touches[0].clientY},!0),an(n,"touchend",l=>{let u={x:l.changedTouches[0].clientX,y:l.changedTouches[0].clientY};if(!(Math.abs(u.x-a.current.x)>=Dl||Math.abs(u.y-a.current.y)>=Dl))return i(l,()=>l.target instanceof HTMLElement?l.target:null)},!0),eg(n,"blur",l=>i(l,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Ii(...e){return m.useMemo(()=>on(...e),[...e])}function rg(e,t){return m.useMemo(()=>{var r;if(e.type)return e.type;let n=(r=e.as)!=null?r:"button";if(typeof n=="string"&&n.toLowerCase()==="button"||(t==null?void 0:t.tagName)==="BUTTON"&&!t.hasAttribute("type"))return"button"},[e.type,e.as,t])}function ng(){let e;return{before({doc:t}){var r;let n=t.documentElement,o=(r=t.defaultView)!=null?r:window;e=Math.max(0,o.innerWidth-n.clientWidth)},after({doc:t,d:r}){let n=t.documentElement,o=Math.max(0,n.clientWidth-n.offsetWidth),i=Math.max(0,e-o);r.style(n,"paddingRight",`${i}px`)}}}function og(){return Ll()?{before({doc:e,d:t,meta:r}){function n(o){return r.containers.flatMap(i=>i()).some(i=>i.contains(o))}t.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let a=Rt();a.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>a.dispose()))}let i=(o=window.scrollY)!=null?o:window.pageYOffset,s=null;t.addEventListener(e,"click",a=>{if(a.target instanceof HTMLElement)try{let l=a.target.closest("a");if(!l)return;let{hash:u}=new URL(l.href),c=e.querySelector(u);c&&!n(c)&&(s=c)}catch{}},!0),t.addEventListener(e,"touchstart",a=>{if(a.target instanceof HTMLElement)if(n(a.target)){let l=a.target;for(;l.parentElement&&n(l.parentElement);)l=l.parentElement;t.style(l,"overscrollBehavior","contain")}else t.style(a.target,"touchAction","none")}),t.addEventListener(e,"touchmove",a=>{if(a.target instanceof HTMLElement){if(a.target.tagName==="INPUT")return;if(n(a.target)){let l=a.target;for(;l.parentElement&&l.dataset.headlessuiPortal!==""&&!(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth);)l=l.parentElement;l.dataset.headlessuiPortal===""&&a.preventDefault()}else a.preventDefault()}},{passive:!1}),t.add(()=>{var a;let l=(a=window.scrollY)!=null?a:window.pageYOffset;i!==l&&window.scrollTo(0,i),s&&s.isConnected&&(s.scrollIntoView({block:"nearest"}),s=null)})})}}:{}}function ig(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function sg(e){let t={};for(let r of e)Object.assign(t,r(t));return t}let cr=Ol(()=>new Map,{PUSH(e,t){var r;let n=(r=this.get(e))!=null?r:{doc:e,count:0,d:Rt(),meta:new Set};return n.count++,n.meta.add(t),this.set(e,n),this},POP(e,t){let r=this.get(e);return r&&(r.count--,r.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:r}){let n={doc:e,d:t,meta:sg(r)},o=[og(),ng(),ig()];o.forEach(({before:i})=>i==null?void 0:i(n)),o.forEach(({after:i})=>i==null?void 0:i(n))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});cr.subscribe(()=>{let e=cr.getSnapshot(),t=new Map;for(let[r]of e)t.set(r,r.documentElement.style.overflow);for(let r of e.values()){let n=t.get(r.doc)==="hidden",o=r.count!==0;(o&&!n||!o&&n)&&cr.dispatch(r.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",r),r.count===0&&cr.dispatch("TEARDOWN",r)}});function ag(e,t,r=()=>({containers:[]})){let n=Fl(cr),o=t?n.get(t):void 0,i=o?o.count>0:!1;return he(()=>{if(!(!t||!e))return cr.dispatch("PUSH",t,r),()=>cr.dispatch("POP",t,r)},[e,t]),i}function lg(e,t,r=()=>[document.body]){let n=$i(e,"scroll-lock");ag(n,t,o=>{var i;return{containers:[...(i=o.containers)!=null?i:[],r]}})}function Il(e){return[e.screenX,e.screenY]}function ug(){let e=m.useRef([-1,-1]);return{wasMoved(t){let r=Il(t);return e.current[0]===r[0]&&e.current[1]===r[1]?!1:(e.current=r,!0)},update(t){e.current=Il(t)}}}function cg(e=0){let[t,r]=m.useState(e),n=m.useCallback(l=>r(l),[t]),o=m.useCallback(l=>r(u=>u|l),[t]),i=m.useCallback(l=>(t&l)===l,[t]),s=m.useCallback(l=>r(u=>u&~l),[r]),a=m.useCallback(l=>r(u=>u^l),[r]);return{flags:t,setFlag:n,addFlag:o,hasFlag:i,removeFlag:s,toggleFlag:a}}var Ml,Rl;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((Ml=process==null?void 0:process.env)==null?void 0:Ml.NODE_ENV)==="test"&&typeof((Rl=Element==null?void 0:Element.prototype)==null?void 0:Rl.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
52
+ `)),[]});var fg=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(fg||{});function Vl(e){let t={};for(let r in e)e[r]===!0&&(t[`data-${r}`]="");return t}function Bl(e,t,r,n){let[o,i]=m.useState(r),{hasFlag:s,addFlag:a,removeFlag:l}=cg(e&&o?3:0),u=m.useRef(!1),c=m.useRef(!1),f=lr();return he(()=>{var h;if(e){if(r&&i(!0),!t){r&&a(3);return}return(h=n==null?void 0:n.start)==null||h.call(n,r),dg(t,{inFlight:u,prepare(){c.current?c.current=!1:c.current=u.current,u.current=!0,!c.current&&(r?(a(3),l(4)):(a(4),l(2)))},run(){c.current?r?(l(3),a(4)):(l(4),a(3)):r?l(1):a(1)},done(){var p;c.current&&typeof t.getAnimations=="function"&&t.getAnimations().length>0||(u.current=!1,l(7),r||i(!1),(p=n==null?void 0:n.end)==null||p.call(n,r))}})}},[e,r,t,f]),e?[o,{closed:s(1),enter:s(2),leave:s(4),transition:s(2)||s(4)}]:[r,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function dg(e,{prepare:t,run:r,done:n,inFlight:o}){let i=Rt();return mg(e,{prepare:t,inFlight:o}),i.nextFrame(()=>{r(),i.requestAnimationFrame(()=>{i.add(pg(e,n))})}),i.dispose}function pg(e,t){var r,n;let o=Rt();if(!e)return o.dispose;let i=!1;o.add(()=>{i=!0});let s=(n=(r=e.getAnimations)==null?void 0:r.call(e).filter(a=>a instanceof CSSTransition))!=null?n:[];return s.length===0?(t(),o.dispose):(Promise.allSettled(s.map(a=>a.finished)).then(()=>{i||t()}),o.dispose)}function mg(e,{inFlight:t,prepare:r}){if(t!=null&&t.current){r();return}let n=e.style.transition;e.style.transition="none",r(),e.offsetHeight,e.style.transition=n}function ro(){return typeof window<"u"}function Or(e){return Ul(e)?(e.nodeName||"").toLowerCase():"#document"}function it(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function _t(e){var t;return(t=(Ul(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ul(e){return ro()?e instanceof Node||e instanceof it(e).Node:!1}function Ue(e){return ro()?e instanceof Element||e instanceof it(e).Element:!1}function St(e){return ro()?e instanceof HTMLElement||e instanceof it(e).HTMLElement:!1}function zl(e){return!ro()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof it(e).ShadowRoot}function ln(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=gt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function hg(e){return["table","td","th"].includes(Or(e))}function no(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Mi(e){const t=Ri(),r=Ue(e)?gt(e):e;return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function gg(e){let t=Yt(e);for(;St(t)&&!Fr(t);){if(Mi(t))return t;if(no(t))return null;t=Yt(t)}return null}function Ri(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Fr(e){return["html","body","#document"].includes(Or(e))}function gt(e){return it(e).getComputedStyle(e)}function oo(e){return Ue(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yt(e){if(Or(e)==="html")return e;const t=e.assignedSlot||e.parentNode||zl(e)&&e.host||_t(e);return zl(t)?t.host:t}function Hl(e){const t=Yt(e);return Fr(t)?e.ownerDocument?e.ownerDocument.body:e.body:St(t)&&ln(t)?t:Hl(t)}function un(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=Hl(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),s=it(o);if(i){const a=Vi(s);return t.concat(s,s.visualViewport||[],ln(o)?o:[],a&&r?un(a):[])}return t.concat(o,un(o,[],r))}function Vi(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function yg(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:r,version:n}=t;return r+"/"+n}).join(" "):navigator.userAgent}const fr=Math.min,ze=Math.max,cn=Math.round,io=Math.floor,kt=e=>({x:e,y:e}),bg={left:"right",right:"left",bottom:"top",top:"bottom"},xg={start:"end",end:"start"};function ql(e,t,r){return ze(e,fr(t,r))}function Ar(e,t){return typeof e=="function"?e(t):e}function Jt(e){return e.split("-")[0]}function fn(e){return e.split("-")[1]}function Wl(e){return e==="x"?"y":"x"}function Kl(e){return e==="y"?"height":"width"}function dr(e){return["top","bottom"].includes(Jt(e))?"y":"x"}function Yl(e){return Wl(dr(e))}function vg(e,t,r){r===void 0&&(r=!1);const n=fn(e),o=Yl(e),i=Kl(o);let s=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=so(s)),[s,so(s)]}function wg(e){const t=so(e);return[Bi(e),t,Bi(t)]}function Bi(e){return e.replace(/start|end/g,t=>xg[t])}function Eg(e,t,r){const n=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?i:s;default:return[]}}function Tg(e,t,r,n){const o=fn(e);let i=Eg(Jt(e),r==="start",n);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Bi)))),i}function so(e){return e.replace(/left|right|bottom|top/g,t=>bg[t])}function _g(e){return{top:0,right:0,bottom:0,left:0,...e}}function Sg(e){return typeof e!="number"?_g(e):{top:e,right:e,bottom:e,left:e}}function ao(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function Jl(e,t,r){let{reference:n,floating:o}=e;const i=dr(t),s=Yl(t),a=Kl(s),l=Jt(t),u=i==="y",c=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,h=n[a]/2-o[a]/2;let p;switch(l){case"top":p={x:c,y:n.y-o.height};break;case"bottom":p={x:c,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:f};break;case"left":p={x:n.x-o.width,y:f};break;default:p={x:n.x,y:n.y}}switch(fn(t)){case"start":p[s]-=h*(r&&u?-1:1);break;case"end":p[s]+=h*(r&&u?-1:1);break}return p}const kg=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:s}=r,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:f}=Jl(u,n,l),h=n,p={},d=0;for(let g=0;g<a.length;g++){const{name:x,fn:b}=a[g],{x:v,y:w,data:_,reset:k}=await b({x:c,y:f,initialPlacement:n,placement:h,strategy:o,middlewareData:p,rects:u,platform:s,elements:{reference:e,floating:t}});c=v??c,f=w??f,p={...p,[x]:{...p[x],..._}},k&&d<=50&&(d++,typeof k=="object"&&(k.placement&&(h=k.placement),k.rects&&(u=k.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):k.rects),{x:c,y:f}=Jl(u,h,l)),g=-1)}return{x:c,y:f,placement:h,strategy:o,middlewareData:p}};async function lo(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=Ar(t,e),d=Sg(p),x=a[h?f==="floating"?"reference":"floating":f],b=ao(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(x)))==null||r?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),v=f==="floating"?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),_=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},k=ao(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:w,strategy:l}):v);return{top:(b.top-k.top+d.top)/_.y,bottom:(k.bottom-b.bottom+d.bottom)/_.y,left:(b.left-k.left+d.left)/_.x,right:(k.right-b.right+d.right)/_.x}}const Cg=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:g=!0,...x}=Ar(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const b=Jt(o),v=dr(a),w=Jt(a)===a,_=await(l.isRTL==null?void 0:l.isRTL(u.floating)),k=h||(w||!g?[so(a)]:wg(a)),S=d!=="none";!h&&S&&k.push(...Tg(a,g,d,_));const C=[a,...k],A=await lo(t,x),N=[];let L=((n=i.flip)==null?void 0:n.overflows)||[];if(c&&N.push(A[b]),f){const q=vg(o,s,_);N.push(A[q[0]],A[q[1]])}if(L=[...L,{placement:o,overflows:N}],!N.every(q=>q<=0)){var P,I;const q=(((P=i.flip)==null?void 0:P.index)||0)+1,J=C[q];if(J)return{data:{index:q,overflows:L},reset:{placement:J}};let z=(I=L.filter(G=>G.overflows[0]<=0).sort((G,K)=>G.overflows[1]-K.overflows[1])[0])==null?void 0:I.placement;if(!z)switch(p){case"bestFit":{var R;const G=(R=L.filter(K=>{if(S){const Z=dr(K.placement);return Z===v||Z==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(Z=>Z>0).reduce((Z,re)=>Z+re,0)]).sort((K,Z)=>K[1]-Z[1])[0])==null?void 0:R[0];G&&(z=G);break}case"initialPlacement":z=a;break}if(o!==z)return{reset:{placement:z}}}return{}}}};async function Og(e,t){const{placement:r,platform:n,elements:o}=e,i=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=Jt(r),a=fn(r),l=dr(r)==="y",u=["left","top"].includes(s)?-1:1,c=i&&l?-1:1,f=Ar(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:d}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof d=="number"&&(p=a==="end"?d*-1:d),l?{x:p*c,y:h*u}:{x:h*u,y:p*c}}const Fg=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await Og(t,e);return s===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},Ag=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:x=>{let{x:b,y:v}=x;return{x:b,y:v}}},...l}=Ar(e,t),u={x:r,y:n},c=await lo(t,l),f=dr(Jt(o)),h=Wl(f);let p=u[h],d=u[f];if(i){const x=h==="y"?"top":"left",b=h==="y"?"bottom":"right",v=p+c[x],w=p-c[b];p=ql(v,p,w)}if(s){const x=f==="y"?"top":"left",b=f==="y"?"bottom":"right",v=d+c[x],w=d-c[b];d=ql(v,d,w)}const g=a.fn({...t,[h]:p,[f]:d});return{...g,data:{x:g.x-r,y:g.y-n,enabled:{[h]:i,[f]:s}}}}}},jg=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...u}=Ar(e,t),c=await lo(t,u),f=Jt(o),h=fn(o),p=dr(o)==="y",{width:d,height:g}=i.floating;let x,b;f==="top"||f==="bottom"?(x=f,b=h===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(b=f,x=h==="end"?"top":"bottom");const v=g-c.top-c.bottom,w=d-c.left-c.right,_=fr(g-c[x],v),k=fr(d-c[b],w),S=!t.middlewareData.shift;let C=_,A=k;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(A=w),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(C=v),S&&!h){const L=ze(c.left,0),P=ze(c.right,0),I=ze(c.top,0),R=ze(c.bottom,0);p?A=d-2*(L!==0||P!==0?L+P:ze(c.left,c.right)):C=g-2*(I!==0||R!==0?I+R:ze(c.top,c.bottom))}await l({...t,availableWidth:A,availableHeight:C});const N=await s.getDimensions(a.floating);return d!==N.width||g!==N.height?{reset:{rects:!0}}:{}}}};function Xl(e){const t=gt(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=St(e),i=o?e.offsetWidth:r,s=o?e.offsetHeight:n,a=cn(r)!==i||cn(n)!==s;return a&&(r=i,n=s),{width:r,height:n,$:a}}function Ui(e){return Ue(e)?e:e.contextElement}function jr(e){const t=Ui(e);if(!St(t))return kt(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=Xl(t);let s=(i?cn(r.width):r.width)/n,a=(i?cn(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const $g=kt(0);function Gl(e){const t=it(e);return!Ri()||!t.visualViewport?$g:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ng(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==it(e)?!1:t}function pr(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),i=Ui(e);let s=kt(1);t&&(n?Ue(n)&&(s=jr(n)):s=jr(e));const a=Ng(i,r,n)?Gl(i):kt(0);let l=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,c=o.width/s.x,f=o.height/s.y;if(i){const h=it(i),p=n&&Ue(n)?it(n):n;let d=h,g=Vi(d);for(;g&&n&&p!==d;){const x=jr(g),b=g.getBoundingClientRect(),v=gt(g),w=b.left+(g.clientLeft+parseFloat(v.paddingLeft))*x.x,_=b.top+(g.clientTop+parseFloat(v.paddingTop))*x.y;l*=x.x,u*=x.y,c*=x.x,f*=x.y,l+=w,u+=_,d=it(g),g=Vi(d)}}return ao({width:c,height:f,x:l,y:u})}function zi(e,t){const r=oo(e).scrollLeft;return t?t.left+r:pr(_t(e)).left+r}function Ql(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-(r?0:zi(e,n)),i=n.top+t.scrollTop;return{x:o,y:i}}function Pg(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i=o==="fixed",s=_t(n),a=t?no(t.floating):!1;if(n===s||a&&i)return r;let l={scrollLeft:0,scrollTop:0},u=kt(1);const c=kt(0),f=St(n);if((f||!f&&!i)&&((Or(n)!=="body"||ln(s))&&(l=oo(n)),St(n))){const p=pr(n);u=jr(n),c.x=p.x+n.clientLeft,c.y=p.y+n.clientTop}const h=s&&!f&&!i?Ql(s,l,!0):kt(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x+h.x,y:r.y*u.y-l.scrollTop*u.y+c.y+h.y}}function Lg(e){return Array.from(e.getClientRects())}function Dg(e){const t=_t(e),r=oo(e),n=e.ownerDocument.body,o=ze(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=ze(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+zi(e);const a=-r.scrollTop;return gt(n).direction==="rtl"&&(s+=ze(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:s,y:a}}function Ig(e,t){const r=it(e),n=_t(e),o=r.visualViewport;let i=n.clientWidth,s=n.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const u=Ri();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function Mg(e,t){const r=pr(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=St(e)?jr(e):kt(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,u=n*i.y;return{width:s,height:a,x:l,y:u}}function Zl(e,t,r){let n;if(t==="viewport")n=Ig(e,r);else if(t==="document")n=Dg(_t(e));else if(Ue(t))n=Mg(t,r);else{const o=Gl(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ao(n)}function eu(e,t){const r=Yt(e);return r===t||!Ue(r)||Fr(r)?!1:gt(r).position==="fixed"||eu(r,t)}function Rg(e,t){const r=t.get(e);if(r)return r;let n=un(e,[],!1).filter(a=>Ue(a)&&Or(a)!=="body"),o=null;const i=gt(e).position==="fixed";let s=i?Yt(e):e;for(;Ue(s)&&!Fr(s);){const a=gt(s),l=Mi(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||ln(s)&&!l&&eu(e,s))?n=n.filter(c=>c!==s):o=a,s=Yt(s)}return t.set(e,n),n}function Vg(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const s=[...r==="clippingAncestors"?no(t)?[]:Rg(t,this._c):[].concat(r),n],a=s[0],l=s.reduce((u,c)=>{const f=Zl(t,c,o);return u.top=ze(f.top,u.top),u.right=fr(f.right,u.right),u.bottom=fr(f.bottom,u.bottom),u.left=ze(f.left,u.left),u},Zl(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Bg(e){const{width:t,height:r}=Xl(e);return{width:t,height:r}}function Ug(e,t,r){const n=St(t),o=_t(t),i=r==="fixed",s=pr(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=kt(0);if(n||!n&&!i)if((Or(t)!=="body"||ln(o))&&(a=oo(t)),n){const h=pr(t,!0,i,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&(l.x=zi(o));const u=o&&!n&&!i?Ql(o,a):kt(0),c=s.left+a.scrollLeft-l.x-u.x,f=s.top+a.scrollTop-l.y-u.y;return{x:c,y:f,width:s.width,height:s.height}}function Hi(e){return gt(e).position==="static"}function tu(e,t){if(!St(e)||gt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return _t(e)===r&&(r=r.ownerDocument.body),r}function ru(e,t){const r=it(e);if(no(e))return r;if(!St(e)){let o=Yt(e);for(;o&&!Fr(o);){if(Ue(o)&&!Hi(o))return o;o=Yt(o)}return r}let n=tu(e,t);for(;n&&hg(n)&&Hi(n);)n=tu(n,t);return n&&Fr(n)&&Hi(n)&&!Mi(n)?r:n||gg(e)||r}const zg=async function(e){const t=this.getOffsetParent||ru,r=this.getDimensions,n=await r(e.floating);return{reference:Ug(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Hg(e){return gt(e).direction==="rtl"}const qg={convertOffsetParentRelativeRectToViewportRelativeRect:Pg,getDocumentElement:_t,getClippingRect:Vg,getOffsetParent:ru,getElementRects:zg,getClientRects:Lg,getDimensions:Bg,getScale:jr,isElement:Ue,isRTL:Hg};function Wg(e,t){let r=null,n;const o=_t(e);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:u,top:c,width:f,height:h}=e.getBoundingClientRect();if(a||t(),!f||!h)return;const p=io(c),d=io(o.clientWidth-(u+f)),g=io(o.clientHeight-(c+h)),x=io(u),v={rootMargin:-p+"px "+-d+"px "+-g+"px "+-x+"px",threshold:ze(0,fr(1,l))||1};let w=!0;function _(k){const S=k[0].intersectionRatio;if(S!==l){if(!w)return s();S?s(!1,S):n=setTimeout(()=>{s(!1,1e-7)},1e3)}w=!1}try{r=new IntersectionObserver(_,{...v,root:o.ownerDocument})}catch{r=new IntersectionObserver(_,v)}r.observe(e)}return s(!0),i}function Kg(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=Ui(e),c=o||i?[...u?un(u):[],...un(t)]:[];c.forEach(b=>{o&&b.addEventListener("scroll",r,{passive:!0}),i&&b.addEventListener("resize",r)});const f=u&&a?Wg(u,r):null;let h=-1,p=null;s&&(p=new ResizeObserver(b=>{let[v]=b;v&&v.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(t)})),r()}),u&&!l&&p.observe(u),p.observe(t));let d,g=l?pr(e):null;l&&x();function x(){const b=pr(e);g&&(b.x!==g.x||b.y!==g.y||b.width!==g.width||b.height!==g.height)&&r(),g=b,d=requestAnimationFrame(x)}return r(),()=>{var b;c.forEach(v=>{o&&v.removeEventListener("scroll",r),i&&v.removeEventListener("resize",r)}),f==null||f(),(b=p)==null||b.disconnect(),p=null,l&&cancelAnimationFrame(d)}}const qi=lo,Yg=Fg,Jg=Ag,Xg=Cg,Gg=jg,Qg=(e,t,r)=>{const n=new Map,o={platform:qg,...r},i={...o.platform,_c:n};return kg(e,t,{...o,platform:i})};var uo=typeof document<"u"?m.useLayoutEffect:m.useEffect;function co(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!co(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!co(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function nu(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ou(e,t){const r=nu(e);return Math.round(t*r)/r}function Wi(e){const t=F.useRef(e);return uo(()=>{t.current=e}),t}function Zg(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[c,f]=F.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=F.useState(n);co(h,n)||p(n);const[d,g]=F.useState(null),[x,b]=F.useState(null),v=F.useCallback(K=>{K!==S.current&&(S.current=K,g(K))},[]),w=F.useCallback(K=>{K!==C.current&&(C.current=K,b(K))},[]),_=i||d,k=s||x,S=F.useRef(null),C=F.useRef(null),A=F.useRef(c),N=l!=null,L=Wi(l),P=Wi(o),I=Wi(u),R=F.useCallback(()=>{if(!S.current||!C.current)return;const K={placement:t,strategy:r,middleware:h};P.current&&(K.platform=P.current),Qg(S.current,C.current,K).then(Z=>{const re={...Z,isPositioned:I.current!==!1};q.current&&!co(A.current,re)&&(A.current=re,jn.flushSync(()=>{f(re)}))})},[h,t,r,P,I]);uo(()=>{u===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,f(K=>({...K,isPositioned:!1})))},[u]);const q=F.useRef(!1);uo(()=>(q.current=!0,()=>{q.current=!1}),[]),uo(()=>{if(_&&(S.current=_),k&&(C.current=k),_&&k){if(L.current)return L.current(_,k,R);R()}},[_,k,R,L,N]);const J=F.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:w}),[v,w]),z=F.useMemo(()=>({reference:_,floating:k}),[_,k]),G=F.useMemo(()=>{const K={position:r,left:0,top:0};if(!z.floating)return K;const Z=ou(z.floating,c.x),re=ou(z.floating,c.y);return a?{...K,transform:"translate("+Z+"px, "+re+"px)",...nu(z.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Z,top:re}},[r,a,z.floating,c.x,c.y]);return F.useMemo(()=>({...c,update:R,refs:J,elements:z,floatingStyles:G}),[c,R,J,z,G])}const iu=(e,t)=>({...Yg(e),options:[e,t]}),ey=(e,t)=>({...Jg(e),options:[e,t]}),ty=(e,t)=>({...Xg(e),options:[e,t]}),ry=(e,t)=>({...Gg(e),options:[e,t]}),su={...F},ny=su.useInsertionEffect||(e=>e());function au(e){const t=F.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return ny(()=>{t.current=e}),F.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.current==null?void 0:t.current(...n)},[])}var Ki=typeof document<"u"?m.useLayoutEffect:m.useEffect;let lu=!1,oy=0;const uu=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+oy++;function iy(){const[e,t]=F.useState(()=>lu?uu():void 0);return Ki(()=>{e==null&&t(uu())},[]),F.useEffect(()=>{lu=!0},[]),e}const sy=su.useId||iy;let dn;process.env.NODE_ENV!=="production"&&(dn=new Set);function ay(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const o="Floating UI: "+r.join(" ");if(!((e=dn)!=null&&e.has(o))){var i;(i=dn)==null||i.add(o),console.warn(o)}}function ly(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const o="Floating UI: "+r.join(" ");if(!((e=dn)!=null&&e.has(o))){var i;(i=dn)==null||i.add(o),console.error(o)}}function uy(){const e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(o=>o(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var n;e.set(t,((n=e.get(t))==null?void 0:n.filter(o=>o!==r))||[])}}}const cy=F.createContext(null),fy=F.createContext(null),dy=()=>{var e;return((e=F.useContext(cy))==null?void 0:e.id)||null},py=()=>F.useContext(fy),my="data-floating-ui-focusable";function hy(e){const{open:t=!1,onOpenChange:r,elements:n}=e,o=sy(),i=F.useRef({}),[s]=F.useState(()=>uy()),a=dy()!=null;if(process.env.NODE_ENV!=="production"){const p=n.reference;p&&!Ue(p)&&ly("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,u]=F.useState(n.reference),c=au((p,d,g)=>{i.current.openEvent=p?d:void 0,s.emit("openchange",{open:p,event:d,reason:g,nested:a}),r==null||r(p,d,g)}),f=F.useMemo(()=>({setPositionReference:u}),[]),h=F.useMemo(()=>({reference:l||n.reference||null,floating:n.floating||null,domReference:n.reference}),[l,n.reference,n.floating]);return F.useMemo(()=>({dataRef:i,open:t,onOpenChange:c,elements:h,events:s,floatingId:o,refs:f}),[t,c,h,s,o,f])}function gy(e){e===void 0&&(e={});const{nodeId:t}=e,r=hy({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,o=n.elements,[i,s]=F.useState(null),[a,l]=F.useState(null),c=(o==null?void 0:o.domReference)||i,f=F.useRef(null),h=py();Ki(()=>{c&&(f.current=c)},[c]);const p=Zg({...e,elements:{...o,...a&&{reference:a}}}),d=F.useCallback(w=>{const _=Ue(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),contextElement:w}:w;l(_),p.refs.setReference(_)},[p.refs]),g=F.useCallback(w=>{(Ue(w)||w===null)&&(f.current=w,s(w)),(Ue(p.refs.reference.current)||p.refs.reference.current===null||w!==null&&!Ue(w))&&p.refs.setReference(w)},[p.refs]),x=F.useMemo(()=>({...p.refs,setReference:g,setPositionReference:d,domReference:f}),[p.refs,g,d]),b=F.useMemo(()=>({...p.elements,domReference:c}),[p.elements,c]),v=F.useMemo(()=>({...p,...n,refs:x,elements:b,nodeId:t}),[p,x,b,t,n]);return Ki(()=>{n.dataRef.current.floatingContext=v;const w=h==null?void 0:h.nodesRef.current.find(_=>_.id===t);w&&(w.context=v)}),F.useMemo(()=>({...p,context:v,refs:x,elements:b}),[p,x,b,v])}const cu="active",fu="selected";function Yi(e,t,r){const n=new Map,o=r==="item";let i=e;if(o&&e){const{[cu]:s,[fu]:a,...l}=e;i=l}return{...r==="floating"&&{tabIndex:-1,[my]:""},...i,...t.map(s=>{const a=s?s[r]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[u,c]=l;if(!(o&&[cu,fu].includes(u)))if(u.indexOf("on")===0){if(n.has(u)||n.set(u,[]),typeof c=="function"){var f;(f=n.get(u))==null||f.push(c),s[u]=function(){for(var h,p=arguments.length,d=new Array(p),g=0;g<p;g++)d[g]=arguments[g];return(h=n.get(u))==null?void 0:h.map(x=>x(...d)).find(x=>x!==void 0)}}}else s[u]=c}),s),{})}}function yy(e){e===void 0&&(e=[]);const t=e.map(a=>a==null?void 0:a.reference),r=e.map(a=>a==null?void 0:a.floating),n=e.map(a=>a==null?void 0:a.item),o=F.useCallback(a=>Yi(a,e,"reference"),t),i=F.useCallback(a=>Yi(a,e,"floating"),r),s=F.useCallback(a=>Yi(a,e,"item"),n);return F.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}function du(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const by=e=>({name:"inner",options:e,async fn(t){const{listRef:r,overflowRef:n,onFallbackChange:o,offset:i=0,index:s=0,minItemsVisible:a=4,referenceOverflowThreshold:l=0,scrollRef:u,...c}=Ar(e,t),{rects:f,elements:{floating:h}}=t,p=r.current[s],d=(u==null?void 0:u.current)||h,g=h.clientTop||d.clientTop,x=h.clientTop!==0,b=d.clientTop!==0,v=h===d;if(process.env.NODE_ENV!=="production"&&(t.placement.startsWith("bottom")||ay('`placement` side must be "bottom" when using the `inner`',"middleware.")),!p)return{};const w={...t,...await iu(-p.offsetTop-h.clientTop-f.reference.height/2-p.offsetHeight/2-i).fn(t)},_=await qi(du(w,d.scrollHeight+g+h.clientTop),c),k=await qi(w,{...c,elementContext:"reference"}),S=ze(0,_.top),C=w.y+S,L=(d.scrollHeight>d.clientHeight?P=>P:cn)(ze(0,d.scrollHeight+(x&&v||b?g*2:0)-S-ze(0,_.bottom)));if(d.style.maxHeight=L+"px",d.scrollTop=S,o){const P=d.offsetHeight<p.offsetHeight*fr(a,r.current.length)-1||k.top>=-l||k.bottom>=-l;jn.flushSync(()=>o(P))}return n&&(n.current=await qi(du({...w,y:C},d.offsetHeight+g+h.clientTop),c)),{y:C}}});function xy(e,t){const{open:r,elements:n}=e,{enabled:o=!0,overflowRef:i,scrollRef:s,onChange:a}=t,l=au(a),u=F.useRef(!1),c=F.useRef(null),f=F.useRef(null);F.useEffect(()=>{if(!o)return;function p(g){if(g.ctrlKey||!d||i.current==null)return;const x=g.deltaY,b=i.current.top>=-.5,v=i.current.bottom>=-.5,w=d.scrollHeight-d.clientHeight,_=x<0?-1:1,k=x<0?"max":"min";d.scrollHeight<=d.clientHeight||(!b&&x>0||!v&&x<0?(g.preventDefault(),jn.flushSync(()=>{l(S=>S+Math[k](x,w*_))})):/firefox/i.test(yg())&&(d.scrollTop+=x))}const d=(s==null?void 0:s.current)||n.floating;if(r&&d)return d.addEventListener("wheel",p),requestAnimationFrame(()=>{c.current=d.scrollTop,i.current!=null&&(f.current={...i.current})}),()=>{c.current=null,f.current=null,d.removeEventListener("wheel",p)}},[o,r,n.floating,i,s,l]);const h=F.useMemo(()=>({onKeyDown(){u.current=!0},onWheel(){u.current=!1},onPointerMove(){u.current=!1},onScroll(){const p=(s==null?void 0:s.current)||n.floating;if(!(!i.current||!p||!u.current)){if(c.current!==null){const d=p.scrollTop-c.current;(i.current.bottom<-.5&&d<-1||i.current.top<-.5&&d>1)&&jn.flushSync(()=>l(g=>g+d))}requestAnimationFrame(()=>{c.current=p.scrollTop})}}}),[n.floating,l,i,s]);return F.useMemo(()=>o?{floating:h}:{},[o,h])}let $r=m.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});$r.displayName="FloatingContext";let Ji=m.createContext(null);Ji.displayName="PlacementContext";function vy(e){return m.useMemo(()=>e?typeof e=="string"?{to:e}:e:null,[e])}function wy(){return m.useContext($r).setReference}function Ey(){return m.useContext($r).getReferenceProps}function Ty(){let{getFloatingProps:e,slot:t}=m.useContext($r);return m.useCallback((...r)=>Object.assign({},e(...r),{"data-anchor":t.anchor}),[e,t])}function _y(e=null){e===!1&&(e=null),typeof e=="string"&&(e={to:e});let t=m.useContext(Ji),r=m.useMemo(()=>e,[JSON.stringify(e,(o,i)=>{var s;return(s=i==null?void 0:i.outerHTML)!=null?s:i})]);he(()=>{t==null||t(r??null)},[t,r]);let n=m.useContext($r);return m.useMemo(()=>[n.setFloating,e?n.styles:{}],[n.setFloating,e,n.styles])}let pu=4;function Sy({children:e,enabled:t=!0}){let[r,n]=m.useState(null),[o,i]=m.useState(0),s=m.useRef(null),[a,l]=m.useState(null);ky(a);let u=t&&r!==null&&a!==null,{to:c="bottom",gap:f=0,offset:h=0,padding:p=0,inner:d}=Cy(r,a),[g,x="center"]=c.split(" ");he(()=>{u&&i(0)},[u]);let{refs:b,floatingStyles:v,context:w}=gy({open:u,placement:g==="selection"?x==="center"?"bottom":`bottom-${x}`:x==="center"?`${g}`:`${g}-${x}`,strategy:"absolute",transform:!1,middleware:[iu({mainAxis:g==="selection"?0:f,crossAxis:h}),ey({padding:p}),g!=="selection"&&ty({padding:p}),g==="selection"&&d?by({...d,padding:p,overflowRef:s,offset:o,minItemsVisible:pu,referenceOverflowThreshold:p,onFallbackChange(P){var I,R;if(!P)return;let q=w.elements.floating;if(!q)return;let J=parseFloat(getComputedStyle(q).scrollPaddingBottom)||0,z=Math.min(pu,q.childElementCount),G=0,K=0;for(let Z of(R=(I=w.elements.floating)==null?void 0:I.childNodes)!=null?R:[])if(Z instanceof HTMLElement){let re=Z.offsetTop,Ae=re+Z.clientHeight+J,Pe=q.scrollTop,W=Pe+q.clientHeight;if(re>=Pe&&Ae<=W)z--;else{K=Math.max(0,Math.min(Ae,W)-Math.max(re,Pe)),G=Z.clientHeight;break}}z>=1&&i(Z=>{let re=G*z-K+J;return Z>=re?Z:re})}}):null,ry({padding:p,apply({availableWidth:P,availableHeight:I,elements:R}){Object.assign(R.floating.style,{overflow:"auto",maxWidth:`${P}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${I}px)`})}})].filter(Boolean),whileElementsMounted:Kg}),[_=g,k=x]=w.placement.split("-");g==="selection"&&(_="selection");let S=m.useMemo(()=>({anchor:[_,k].filter(Boolean).join(" ")}),[_,k]),C=xy(w,{overflowRef:s,onChange:i}),{getReferenceProps:A,getFloatingProps:N}=yy([C]),L=te(P=>{l(P),b.setFloating(P)});return F.createElement(Ji.Provider,{value:n},F.createElement($r.Provider,{value:{setFloating:L,setReference:b.setReference,styles:v,getReferenceProps:A,getFloatingProps:N,slot:S}},e))}function ky(e){he(()=>{if(!e)return;let t=new MutationObserver(()=>{let r=window.getComputedStyle(e).maxHeight,n=parseFloat(r);if(isNaN(n))return;let o=parseInt(r);isNaN(o)||n!==o&&(e.style.maxHeight=`${Math.ceil(n)}px`)});return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}},[e])}function Cy(e,t){var r,n,o;let i=Xi((r=e==null?void 0:e.gap)!=null?r:"var(--anchor-gap, 0)",t),s=Xi((n=e==null?void 0:e.offset)!=null?n:"var(--anchor-offset, 0)",t),a=Xi((o=e==null?void 0:e.padding)!=null?o:"var(--anchor-padding, 0)",t);return{...e,gap:i,offset:s,padding:a}}function Xi(e,t,r=void 0){let n=lr(),o=te((l,u)=>{if(l==null)return[r,null];if(typeof l=="number")return[l,null];if(typeof l=="string"){if(!u)return[r,null];let c=hu(l,u);return[c,f=>{let h=mu(l);{let p=h.map(d=>window.getComputedStyle(u).getPropertyValue(d));n.requestAnimationFrame(function d(){n.nextFrame(d);let g=!1;for(let[b,v]of h.entries()){let w=window.getComputedStyle(u).getPropertyValue(v);if(p[b]!==w){p[b]=w,g=!0;break}}if(!g)return;let x=hu(l,u);c!==x&&(f(x),c=x)})}return n.dispose}]}return[r,null]}),i=m.useMemo(()=>o(e,t)[0],[e,t]),[s=i,a]=m.useState();return he(()=>{let[l,u]=o(e,t);if(a(l),!!u)return u(a)},[e,t]),s}function mu(e){let t=/var\((.*)\)/.exec(e);if(t){let r=t[1].indexOf(",");if(r===-1)return[t[1]];let n=t[1].slice(0,r).trim(),o=t[1].slice(r+1).trim();return o?[n,...mu(o)]:[n]}return[]}function hu(e,t){let r=document.createElement("div");t.appendChild(r),r.style.setProperty("margin-top","0px","important"),r.style.setProperty("margin-top",e,"important");let n=parseFloat(window.getComputedStyle(r).marginTop)||0;return t.removeChild(r),n}function Oy(e,t){let[r,n]=m.useState(t);return!e&&r!==t&&n(t),e?r:t}let Gi=m.createContext(null);Gi.displayName="OpenClosedContext";var yt=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(yt||{});function Qi(){return m.useContext(Gi)}function gu({value:e,children:t}){return m.createElement(Gi.Provider,{value:e},t)}function Fy(e){throw new Error("Unexpected object: "+e)}var Fe=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Fe||{});function Zi(e,t){let r=t.resolveItems();if(r.length<=0)return null;let n=t.resolveActiveIndex(),o=n??-1;switch(e.focus){case 0:{for(let i=0;i<r.length;++i)if(!t.resolveDisabled(r[i],i,r))return i;return n}case 1:{o===-1&&(o=r.length);for(let i=o-1;i>=0;--i)if(!t.resolveDisabled(r[i],i,r))return i;return n}case 2:{for(let i=o+1;i<r.length;++i)if(!t.resolveDisabled(r[i],i,r))return i;return n}case 3:{for(let i=r.length-1;i>=0;--i)if(!t.resolveDisabled(r[i],i,r))return i;return n}case 4:{for(let i=0;i<r.length;++i)if(t.resolveId(r[i],i,r)===e.id)return i;return n}case 5:return null;default:Fy(e)}}function Ay(e){let t=te(e),r=m.useRef(!1);m.useEffect(()=>(r.current=!1,()=>{r.current=!0,gl(()=>{r.current&&t()})}),[t])}function jy(){let e=typeof document>"u";return"useSyncExternalStore"in F?(t=>t.useSyncExternalStore)(F)(()=>()=>{},()=>!1,()=>!e):!1}function es(){let e=jy(),[t,r]=F.useState(ar.isHandoffComplete);return t&&ar.isHandoffComplete===!1&&r(!1),F.useEffect(()=>{t!==!0&&r(!0)},[t]),F.useEffect(()=>ar.handoff(),[]),e?!1:t}let $y=m.createContext(!1);function Ny(){return m.useContext($y)}function Py(e){let t=Ny(),r=m.useContext(bu),n=Ii(e),[o,i]=m.useState(()=>{var s;if(!t&&r!==null)return(s=r.current)!=null?s:null;if(ar.isServer)return null;let a=n==null?void 0:n.getElementById("headlessui-portal-root");if(a)return a;if(n===null)return null;let l=n.createElement("div");return l.setAttribute("id","headlessui-portal-root"),n.body.appendChild(l)});return m.useEffect(()=>{o!==null&&(n!=null&&n.body.contains(o)||n==null||n.body.appendChild(o))},[o,n]),m.useEffect(()=>{t||r!==null&&i(r.current)},[r,i,t]),o}let yu=m.Fragment,Ly=Qe(function(e,t){let r=e,n=m.useRef(null),o=ft(Sh(f=>{n.current=f}),t),i=Ii(n),s=Py(n),[a]=m.useState(()=>{var f;return ar.isServer?null:(f=i==null?void 0:i.createElement("div"))!=null?f:null}),l=m.useContext(Ry),u=es();he(()=>{!s||!a||s.contains(a)||(a.setAttribute("data-headlessui-portal",""),s.appendChild(a))},[s,a]),he(()=>{if(a&&l)return l.register(a)},[l,a]),Ay(()=>{var f;!s||!a||(a instanceof Node&&s.contains(a)&&s.removeChild(a),s.childNodes.length<=0&&((f=s.parentElement)==null||f.removeChild(s)))});let c=ot();return u?!s||!a?null:Tt.createPortal(c({ourProps:{ref:o},theirProps:r,slot:{},defaultTag:yu,name:"Portal"}),a):null});function Dy(e,t){let r=ft(t),{enabled:n=!0,...o}=e,i=ot();return n?m.createElement(Ly,{...o,ref:r}):i({ourProps:{ref:r},theirProps:o,slot:{},defaultTag:yu,name:"Portal"})}let Iy=m.Fragment,bu=m.createContext(null);function My(e,t){let{target:r,...n}=e,o={ref:ft(t)},i=ot();return m.createElement(bu.Provider,{value:r},i({ourProps:o,theirProps:n,defaultTag:Iy,name:"Popover.Group"}))}let Ry=m.createContext(null),Vy=Qe(Dy),By=Qe(My),Uy=Object.assign(Vy,{Group:By});function zy(){let e=m.useRef(!1);return he(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function xu(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:wu)!==m.Fragment||m.Children.count(e.children)===1}let fo=m.createContext(null);fo.displayName="TransitionContext";var Hy=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Hy||{});function qy(){let e=m.useContext(fo);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function Wy(){let e=m.useContext(po);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let po=m.createContext(null);po.displayName="NestingContext";function mo(e){return"children"in e?mo(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function vu(e,t){let r=ur(e),n=m.useRef([]),o=zy(),i=lr(),s=te((p,d=Wt.Hidden)=>{let g=n.current.findIndex(({el:x})=>x===p);g!==-1&&(ht(d,{[Wt.Unmount](){n.current.splice(g,1)},[Wt.Hidden](){n.current[g].state="hidden"}}),i.microTask(()=>{var x;!mo(n)&&o.current&&((x=r.current)==null||x.call(r))}))}),a=te(p=>{let d=n.current.find(({el:g})=>g===p);return d?d.state!=="visible"&&(d.state="visible"):n.current.push({el:p,state:"visible"}),()=>s(p,Wt.Unmount)}),l=m.useRef([]),u=m.useRef(Promise.resolve()),c=m.useRef({enter:[],leave:[]}),f=te((p,d,g)=>{l.current.splice(0),t&&(t.chains.current[d]=t.chains.current[d].filter(([x])=>x!==p)),t==null||t.chains.current[d].push([p,new Promise(x=>{l.current.push(x)})]),t==null||t.chains.current[d].push([p,new Promise(x=>{Promise.all(c.current[d].map(([b,v])=>v)).then(()=>x())})]),d==="enter"?u.current=u.current.then(()=>t==null?void 0:t.wait.current).then(()=>g(d)):g(d)}),h=te((p,d,g)=>{Promise.all(c.current[d].splice(0).map(([x,b])=>b)).then(()=>{var x;(x=l.current.shift())==null||x()}).then(()=>g(d))});return m.useMemo(()=>({children:n,register:a,unregister:s,onStart:f,onStop:h,wait:u,chains:c}),[a,s,n,f,h,c,u])}let wu=m.Fragment,Eu=Zn.RenderStrategy;function Ky(e,t){var r,n;let{transition:o=!0,beforeEnter:i,afterEnter:s,beforeLeave:a,afterLeave:l,enter:u,enterFrom:c,enterTo:f,entered:h,leave:p,leaveFrom:d,leaveTo:g,...x}=e,[b,v]=m.useState(null),w=m.useRef(null),_=xu(e),k=ft(..._?[w,t,v]:t===null?[]:[t]),S=(r=x.unmount)==null||r?Wt.Unmount:Wt.Hidden,{show:C,appear:A,initial:N}=qy(),[L,P]=m.useState(C?"visible":"hidden"),I=Wy(),{register:R,unregister:q}=I;he(()=>R(w),[R,w]),he(()=>{if(S===Wt.Hidden&&w.current){if(C&&L!=="visible"){P("visible");return}return ht(L,{hidden:()=>q(w),visible:()=>R(w)})}},[L,w,R,q,C,S]);let J=es();he(()=>{if(_&&J&&L==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,L,J,_]);let z=N&&!A,G=A&&C&&N,K=m.useRef(!1),Z=vu(()=>{K.current||(P("hidden"),q(w))},I),re=te(je=>{K.current=!0;let _e=je?"enter":"leave";Z.onStart(w,_e,Le=>{Le==="enter"?i==null||i():Le==="leave"&&(a==null||a())})}),Ae=te(je=>{let _e=je?"enter":"leave";K.current=!1,Z.onStop(w,_e,Le=>{Le==="enter"?s==null||s():Le==="leave"&&(l==null||l())}),_e==="leave"&&!mo(Z)&&(P("hidden"),q(w))});m.useEffect(()=>{_&&o||(re(C),Ae(C))},[C,_,o]);let Pe=!(!o||!_||!J||z),[,W]=Bl(Pe,b,C,{start:re,end:Ae}),xe=Kt({ref:k,className:((n=Oi(x.className,G&&u,G&&c,W.enter&&u,W.enter&&W.closed&&c,W.enter&&!W.closed&&f,W.leave&&p,W.leave&&!W.closed&&d,W.leave&&W.closed&&g,!W.transition&&C&&h))==null?void 0:n.trim())||void 0,...Vl(W)}),Te=0;L==="visible"&&(Te|=yt.Open),L==="hidden"&&(Te|=yt.Closed),W.enter&&(Te|=yt.Opening),W.leave&&(Te|=yt.Closing);let ae=ot();return m.createElement(po.Provider,{value:Z},m.createElement(gu,{value:Te},ae({ourProps:xe,theirProps:x,defaultTag:wu,features:Eu,visible:L==="visible",name:"Transition.Child"})))}function Yy(e,t){let{show:r,appear:n=!1,unmount:o=!0,...i}=e,s=m.useRef(null),a=xu(e),l=ft(...a?[s,t]:t===null?[]:[t]);es();let u=Qi();if(r===void 0&&u!==null&&(r=(u&yt.Open)===yt.Open),r===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,f]=m.useState(r?"visible":"hidden"),h=vu(()=>{r||f("hidden")}),[p,d]=m.useState(!0),g=m.useRef([r]);he(()=>{p!==!1&&g.current[g.current.length-1]!==r&&(g.current.push(r),d(!1))},[g,r]);let x=m.useMemo(()=>({show:r,appear:n,initial:p}),[r,n,p]);he(()=>{r?f("visible"):!mo(h)&&s.current!==null&&f("hidden")},[r,h]);let b={unmount:o},v=te(()=>{var k;p&&d(!1),(k=e.beforeEnter)==null||k.call(e)}),w=te(()=>{var k;p&&d(!1),(k=e.beforeLeave)==null||k.call(e)}),_=ot();return m.createElement(po.Provider,{value:h},m.createElement(fo.Provider,{value:x},_({ourProps:{...b,as:m.Fragment,children:m.createElement(Tu,{ref:l,...b,...i,beforeEnter:v,beforeLeave:w})},theirProps:{},defaultTag:m.Fragment,features:Eu,visible:c==="visible",name:"Transition"})))}function Jy(e,t){let r=m.useContext(fo)!==null,n=Qi()!==null;return m.createElement(m.Fragment,null,!r&&n?m.createElement(ts,{ref:t,...e}):m.createElement(Tu,{ref:t,...e}))}let ts=Qe(Yy),Tu=Qe(Ky),Xy=Qe(Jy),_u=Object.assign(ts,{Child:Xy,Root:ts});function Gy(e,t){let r=m.useRef({left:0,top:0});if(he(()=>{if(!t)return;let o=t.getBoundingClientRect();o&&(r.current=o)},[e,t]),t==null||!e||t===document.activeElement)return!1;let n=t.getBoundingClientRect();return n.top!==r.current.top||n.left!==r.current.left}let Su=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function ku(e){var t,r;let n=(t=e.innerText)!=null?t:"",o=e.cloneNode(!0);if(!(o instanceof HTMLElement))return n;let i=!1;for(let a of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))a.remove(),i=!0;let s=i?(r=o.innerText)!=null?r:"":n;return Su.test(s)&&(s=s.replace(Su,"")),s}function Qy(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let r=e.getAttribute("aria-labelledby");if(r){let n=r.split(" ").map(o=>{let i=document.getElementById(o);if(i){let s=i.getAttribute("aria-label");return typeof s=="string"?s.trim():ku(i).trim()}return null}).filter(Boolean);if(n.length>0)return n.join(", ")}return ku(e).trim()}function Zy(e){let t=m.useRef(""),r=m.useRef("");return te(()=>{let n=e.current;if(!n)return"";let o=n.innerText;if(t.current===o)return r.current;let i=Qy(n).trim().toLowerCase();return t.current=o,r.current=i,i})}var e0=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(e0||{}),t0=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(t0||{}),r0=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(r0||{}),n0=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterOption=5]="RegisterOption",e[e.UnregisterOption=6]="UnregisterOption",e[e.SetButtonElement=7]="SetButtonElement",e[e.SetOptionsElement=8]="SetOptionsElement",e))(n0||{});function rs(e,t=r=>r){let r=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,n=Pl(t(e.options.slice()),i=>i.dataRef.current.domRef.current),o=r?n.indexOf(r):null;return o===-1&&(o=null),{options:n,activeOptionIndex:o}}let o0={1(e){return e.dataRef.current.disabled||e.listboxState===1?e:{...e,activeOptionIndex:null,listboxState:1,__demoMode:!1}},0(e){if(e.dataRef.current.disabled||e.listboxState===0)return e;let t=e.activeOptionIndex,{isSelected:r}=e.dataRef.current,n=e.options.findIndex(o=>r(o.dataRef.current.value));return n!==-1&&(t=n),{...e,listboxState:0,activeOptionIndex:t,__demoMode:!1}},2(e,t){var r,n,o,i,s;if(e.dataRef.current.disabled||e.listboxState===1)return e;let a={...e,searchQuery:"",activationTrigger:(r=t.trigger)!=null?r:1,__demoMode:!1};if(t.focus===Fe.Nothing)return{...a,activeOptionIndex:null};if(t.focus===Fe.Specific)return{...a,activeOptionIndex:e.options.findIndex(c=>c.id===t.id)};if(t.focus===Fe.Previous){let c=e.activeOptionIndex;if(c!==null){let f=e.options[c].dataRef.current.domRef,h=Zi(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled});if(h!==null){let p=e.options[h].dataRef.current.domRef;if(((n=f.current)==null?void 0:n.previousElementSibling)===p.current||((o=p.current)==null?void 0:o.previousElementSibling)===null)return{...a,activeOptionIndex:h}}}}else if(t.focus===Fe.Next){let c=e.activeOptionIndex;if(c!==null){let f=e.options[c].dataRef.current.domRef,h=Zi(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled});if(h!==null){let p=e.options[h].dataRef.current.domRef;if(((i=f.current)==null?void 0:i.nextElementSibling)===p.current||((s=p.current)==null?void 0:s.nextElementSibling)===null)return{...a,activeOptionIndex:h}}}}let l=rs(e),u=Zi(t,{resolveItems:()=>l.options,resolveActiveIndex:()=>l.activeOptionIndex,resolveId:c=>c.id,resolveDisabled:c=>c.dataRef.current.disabled});return{...a,...l,activeOptionIndex:u}},3:(e,t)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let r=e.searchQuery!==""?0:1,n=e.searchQuery+t.value.toLowerCase(),o=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+r).concat(e.options.slice(0,e.activeOptionIndex+r)):e.options).find(s=>{var a;return!s.dataRef.current.disabled&&((a=s.dataRef.current.textValue)==null?void 0:a.startsWith(n))}),i=o?e.options.indexOf(o):-1;return i===-1||i===e.activeOptionIndex?{...e,searchQuery:n}:{...e,searchQuery:n,activeOptionIndex:i,activationTrigger:1}},4(e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===""?e:{...e,searchQuery:""}},5:(e,t)=>{let r={id:t.id,dataRef:t.dataRef},n=rs(e,o=>[...o,r]);return e.activeOptionIndex===null&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(n.activeOptionIndex=n.options.indexOf(r)),{...e,...n}},6:(e,t)=>{let r=rs(e,n=>{let o=n.findIndex(i=>i.id===t.id);return o!==-1&&n.splice(o,1),n});return{...e,...r,activationTrigger:1}},7:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},8:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element}},ns=m.createContext(null);ns.displayName="ListboxActionsContext";function ho(e){let t=m.useContext(ns);if(t===null){let r=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,ho),r}return t}let go=m.createContext(null);go.displayName="ListboxDataContext";function pn(e){let t=m.useContext(go);if(t===null){let r=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,pn),r}return t}function i0(e,t){return ht(t.type,o0,e,t)}let s0=m.Fragment;function a0(e,t){var r;let n=Ci(),{value:o,defaultValue:i,form:s,name:a,onChange:l,by:u,invalid:c=!1,disabled:f=n||!1,horizontal:h=!1,multiple:p=!1,__demoMode:d=!1,...g}=e;const x=h?"horizontal":"vertical";let b=ft(t),v=mh(i),[w=p?[]:void 0,_]=ph(o,l,v),[k,S]=m.useReducer(i0,{dataRef:m.createRef(),listboxState:d?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,optionsVisible:!1,buttonElement:null,optionsElement:null,__demoMode:d}),C=m.useRef({static:!1,hold:!1}),A=m.useRef(new Map),N=Dh(u),L=m.useCallback(oe=>ht(P.mode,{1:()=>w.some(me=>N(me,oe)),0:()=>N(w,oe)}),[w]),P=m.useMemo(()=>({...k,value:w,disabled:f,invalid:c,mode:p?1:0,orientation:x,compare:N,isSelected:L,optionsPropsRef:C,listRef:A}),[w,f,c,p,k,A]);he(()=>{k.dataRef.current=P},[P]);let I=P.listboxState===0;tg(I,[P.buttonElement,P.optionsElement],(oe,me)=>{var $e;S({type:1}),Nl(me,Di.Loose)||(oe.preventDefault(),($e=P.buttonElement)==null||$e.focus())});let R=m.useMemo(()=>({open:P.listboxState===0,disabled:f,invalid:c,value:w}),[P,f,w,c]),q=te(oe=>{let me=P.options.find($e=>$e.id===oe);me&&Ae(me.dataRef.current.value)}),J=te(()=>{if(P.activeOptionIndex!==null){let{dataRef:oe,id:me}=P.options[P.activeOptionIndex];Ae(oe.current.value),S({type:2,focus:Fe.Specific,id:me})}}),z=te(()=>S({type:0})),G=te(()=>S({type:1})),K=lr(),Z=te((oe,me,$e)=>{K.dispose(),K.microTask(()=>oe===Fe.Specific?S({type:2,focus:Fe.Specific,id:me,trigger:$e}):S({type:2,focus:oe,trigger:$e}))}),re=te((oe,me)=>(S({type:5,id:oe,dataRef:me}),()=>S({type:6,id:oe}))),Ae=te(oe=>ht(P.mode,{0(){return _==null?void 0:_(oe)},1(){let me=P.value.slice(),$e=me.findIndex(zt=>N(zt,oe));return $e===-1?me.push(oe):me.splice($e,1),_==null?void 0:_(me)}})),Pe=te(oe=>S({type:3,value:oe})),W=te(()=>S({type:4})),xe=te(oe=>{S({type:7,element:oe})}),Te=te(oe=>{S({type:8,element:oe})}),ae=m.useMemo(()=>({onChange:Ae,registerOption:re,goToOption:Z,closeListbox:G,openListbox:z,selectActiveOption:J,selectOption:q,search:Pe,clearSearch:W,setButtonElement:xe,setOptionsElement:Te}),[]),[je,_e]=Ah({inherit:!0}),Le={ref:b},vt=m.useCallback(()=>{if(v!==void 0)return _==null?void 0:_(v)},[_,v]),Se=ot();return m.createElement(_e,{value:je,props:{htmlFor:(r=P.buttonElement)==null?void 0:r.id},slot:{open:P.listboxState===0,disabled:f}},m.createElement(Sy,null,m.createElement(ns.Provider,{value:ae},m.createElement(go.Provider,{value:P},m.createElement(gu,{value:ht(P.listboxState,{0:yt.Open,1:yt.Closed})},a!=null&&w!=null&&m.createElement(vh,{disabled:f,data:{[a]:w},form:s,onReset:vt}),Se({ourProps:Le,theirProps:g,slot:R,defaultTag:s0,name:"Listbox"}))))))}let l0="button";function u0(e,t){var r;let n=pn("Listbox.Button"),o=ho("Listbox.Button"),i=m.useId(),s=Tl(),{id:a=s||`headlessui-listbox-button-${i}`,disabled:l=n.disabled||!1,autoFocus:u=!1,...c}=e,f=ft(t,wy(),o.setButtonElement),h=Ey(),p=te(P=>{switch(P.key){case Ne.Enter:hh(P.currentTarget);break;case Ne.Space:case Ne.ArrowDown:P.preventDefault(),Tt.flushSync(()=>o.openListbox()),n.value||o.goToOption(Fe.First);break;case Ne.ArrowUp:P.preventDefault(),Tt.flushSync(()=>o.openListbox()),n.value||o.goToOption(Fe.Last);break}}),d=te(P=>{switch(P.key){case Ne.Space:P.preventDefault();break}}),g=te(P=>{var I;if(Th(P.currentTarget))return P.preventDefault();n.listboxState===0?(Tt.flushSync(()=>o.closeListbox()),(I=n.buttonElement)==null||I.focus({preventScroll:!0})):(P.preventDefault(),o.openListbox())}),x=te(P=>P.preventDefault()),b=Cl([a]),v=kh(),{isFocusVisible:w,focusProps:_}=th({autoFocus:u}),{isHovered:k,hoverProps:S}=eh({isDisabled:l}),{pressed:C,pressProps:A}=ah({disabled:l}),N=m.useMemo(()=>({open:n.listboxState===0,active:C||n.listboxState===0,disabled:l,invalid:n.invalid,value:n.value,hover:k,focus:w,autofocus:u}),[n.listboxState,n.value,l,k,w,C,n.invalid,u]),L=bl(h(),{ref:f,id:a,type:rg(e,n.buttonElement),"aria-haspopup":"listbox","aria-controls":(r=n.optionsElement)==null?void 0:r.id,"aria-expanded":n.listboxState===0,"aria-labelledby":b,"aria-describedby":v,disabled:l||void 0,autoFocus:u,onKeyDown:p,onKeyUp:d,onKeyPress:x,onClick:g},_,S,A);return ot()({ourProps:L,theirProps:c,slot:N,defaultTag:l0,name:"Listbox.Button"})}let Cu=m.createContext(!1),c0="div",f0=Zn.RenderStrategy|Zn.Static;function d0(e,t){var r,n;let o=m.useId(),{id:i=`headlessui-listbox-options-${o}`,anchor:s,portal:a=!1,modal:l=!0,transition:u=!1,...c}=e,f=vy(s),[h,p]=m.useState(null);f&&(a=!0);let d=pn("Listbox.Options"),g=ho("Listbox.Options"),x=Ii(d.optionsElement),b=Qi(),[v,w]=Bl(u,h,b!==null?(b&yt.Open)===yt.Open:d.listboxState===0);Uh(v,d.buttonElement,g.closeListbox);let _=d.__demoMode?!1:l&&d.listboxState===0;lg(_,x);let k=d.__demoMode?!1:l&&d.listboxState===0;Bh(k,{allowed:m.useCallback(()=>[d.buttonElement,d.optionsElement],[d.buttonElement,d.optionsElement])});let S=d.listboxState!==0,C=Gy(S,d.buttonElement)?!1:v,A=v&&d.listboxState===1,N=Oy(A,d.value),L=te(W=>d.compare(N,W)),P=m.useMemo(()=>{var W;if(f==null||!((W=f==null?void 0:f.to)!=null&&W.includes("selection")))return null;let xe=d.options.findIndex(Te=>L(Te.dataRef.current.value));return xe===-1&&(xe=0),xe},[f,d.options]),I=(()=>{if(f==null)return;if(P===null)return{...f,inner:void 0};let W=Array.from(d.listRef.current.values());return{...f,inner:{listRef:{current:W},index:P}}})(),[R,q]=_y(I),J=Ty(),z=ft(t,f?R:null,g.setOptionsElement,p),G=lr();m.useEffect(()=>{var W;let xe=d.optionsElement;xe&&d.listboxState===0&&xe!==((W=on(xe))==null?void 0:W.activeElement)&&(xe==null||xe.focus({preventScroll:!0}))},[d.listboxState,d.optionsElement]);let K=te(W=>{var xe,Te;switch(G.dispose(),W.key){case Ne.Space:if(d.searchQuery!=="")return W.preventDefault(),W.stopPropagation(),g.search(W.key);case Ne.Enter:if(W.preventDefault(),W.stopPropagation(),d.activeOptionIndex!==null){let{dataRef:ae}=d.options[d.activeOptionIndex];g.onChange(ae.current.value)}d.mode===0&&(Tt.flushSync(()=>g.closeListbox()),(xe=d.buttonElement)==null||xe.focus({preventScroll:!0}));break;case ht(d.orientation,{vertical:Ne.ArrowDown,horizontal:Ne.ArrowRight}):return W.preventDefault(),W.stopPropagation(),g.goToOption(Fe.Next);case ht(d.orientation,{vertical:Ne.ArrowUp,horizontal:Ne.ArrowLeft}):return W.preventDefault(),W.stopPropagation(),g.goToOption(Fe.Previous);case Ne.Home:case Ne.PageUp:return W.preventDefault(),W.stopPropagation(),g.goToOption(Fe.First);case Ne.End:case Ne.PageDown:return W.preventDefault(),W.stopPropagation(),g.goToOption(Fe.Last);case Ne.Escape:W.preventDefault(),W.stopPropagation(),Tt.flushSync(()=>g.closeListbox()),(Te=d.buttonElement)==null||Te.focus({preventScroll:!0});return;case Ne.Tab:W.preventDefault(),W.stopPropagation(),Tt.flushSync(()=>g.closeListbox()),Xh(d.buttonElement,W.shiftKey?Li.Previous:Li.Next);break;default:W.key.length===1&&(g.search(W.key),G.setTimeout(()=>g.clearSearch(),350));break}}),Z=(r=d.buttonElement)==null?void 0:r.id,re=m.useMemo(()=>({open:d.listboxState===0}),[d.listboxState]),Ae=bl(f?J():{},{id:i,ref:z,"aria-activedescendant":d.activeOptionIndex===null||(n=d.options[d.activeOptionIndex])==null?void 0:n.id,"aria-multiselectable":d.mode===1?!0:void 0,"aria-labelledby":Z,"aria-orientation":d.orientation,onKeyDown:K,role:"listbox",tabIndex:d.listboxState===0?0:void 0,style:{...c.style,...q,"--button-width":Mh(d.buttonElement,!0).width},...Vl(w)}),Pe=ot();return m.createElement(Uy,{enabled:a?e.static||v:!1},m.createElement(go.Provider,{value:d.mode===1?d:{...d,isSelected:L}},Pe({ourProps:Ae,theirProps:c,slot:re,defaultTag:c0,features:f0,visible:C,name:"Listbox.Options"})))}let p0="div";function m0(e,t){let r=m.useId(),{id:n=`headlessui-listbox-option-${r}`,disabled:o=!1,value:i,...s}=e,a=m.useContext(Cu)===!0,l=pn("Listbox.Option"),u=ho("Listbox.Option"),c=l.activeOptionIndex!==null?l.options[l.activeOptionIndex].id===n:!1,f=l.isSelected(i),h=m.useRef(null),p=Zy(h),d=ur({disabled:o,value:i,domRef:h,get textValue(){return p()}}),g=ft(t,h,N=>{N?l.listRef.current.set(n,N):l.listRef.current.delete(n)});he(()=>{if(!l.__demoMode&&l.listboxState===0&&c&&l.activationTrigger!==0)return Rt().requestAnimationFrame(()=>{var N,L;(L=(N=h.current)==null?void 0:N.scrollIntoView)==null||L.call(N,{block:"nearest"})})},[h,c,l.__demoMode,l.listboxState,l.activationTrigger,l.activeOptionIndex]),he(()=>{if(!a)return u.registerOption(n,d)},[d,n,a]);let x=te(N=>{var L;if(o)return N.preventDefault();u.onChange(i),l.mode===0&&(Tt.flushSync(()=>u.closeListbox()),(L=l.buttonElement)==null||L.focus({preventScroll:!0}))}),b=te(()=>{if(o)return u.goToOption(Fe.Nothing);u.goToOption(Fe.Specific,n)}),v=ug(),w=te(N=>{v.update(N),!o&&(c||u.goToOption(Fe.Specific,n,0))}),_=te(N=>{v.wasMoved(N)&&(o||c||u.goToOption(Fe.Specific,n,0))}),k=te(N=>{v.wasMoved(N)&&(o||c&&u.goToOption(Fe.Nothing))}),S=m.useMemo(()=>({active:c,focus:c,selected:f,disabled:o,selectedOption:f&&a}),[c,f,o,a]),C=a?{}:{id:n,ref:g,role:"option",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,"aria-selected":f,disabled:void 0,onClick:x,onFocus:b,onPointerEnter:w,onMouseEnter:w,onPointerMove:_,onMouseMove:_,onPointerLeave:k,onMouseLeave:k},A=ot();return!f&&a?null:A({ourProps:C,theirProps:s,slot:S,defaultTag:p0,name:"Listbox.Option"})}let h0=m.Fragment;function g0(e,t){let{options:r,placeholder:n,...o}=e,i={ref:ft(t)},s=pn("ListboxSelectedOption"),a=m.useMemo(()=>({}),[]),l=s.value===void 0||s.value===null||s.mode===1&&Array.isArray(s.value)&&s.value.length===0,u=ot();return m.createElement(Cu.Provider,{value:!0},u({ourProps:i,theirProps:{...o,children:m.createElement(m.Fragment,null,n&&l?n:r)},slot:a,defaultTag:h0,name:"ListboxSelectedOption"}))}let y0=Qe(a0),b0=Qe(u0),x0=Ph,v0=Qe(d0),w0=Qe(m0),E0=Qe(g0),Xt=Object.assign(y0,{Button:b0,Label:x0,Options:v0,Option:w0,SelectedOption:E0});function Ou({element:e,validationData:t}){var l;const[r,n]=m.useState(e.value||[]),{register:o=()=>({}),setValue:i,getValues:s}=t||{},a=s&&s(e==null?void 0:e.id);return m.useEffect(()=>{o(e.id)},[e.id,o]),m.useEffect(()=>{i&&i(e.id,r)},[e.id,r,i]),m.useEffect(()=>{a!=null&&a.length&&!(r!=null&&r.length)&&n(a)},[a,r==null?void 0:r.length]),y.jsx("div",{className:"w-full z-10",children:y.jsx(Xt,{value:r,onChange:n,multiple:!0,children:y.jsxs("div",{className:"relative",children:[y.jsx(Xt.Button,{className:"w-full py-2 pl-3 pr-10 text-left bg-white input-control cursor-default ",children:(r==null?void 0:r.length)>0?r==null?void 0:r.map(u=>u.label).join(", "):"Select options"}),y.jsx(_u,{as:m.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:y.jsx(Xt.Options,{className:"absolute w-full py-1 mt-1 grid gap-y-[1px] bg-white rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm",children:(l=e==null?void 0:e.options)==null?void 0:l.map((u,c)=>y.jsx(Xt.Option,{className:({active:f})=>`cursor-default select-none relative w-full flex justify-between ${f?"text-gray-700 bg-gray-100":"text-gray-700"}`,value:u,children:({selected:f})=>y.jsxs("div",{className:`flex items-center justify-between py-2 pl-4 pr-4 w-full ${f?"bg-gray-100":""}`,children:[y.jsx("span",{className:`block truncate ${f?"font-medium":"font-normal"}`,children:u==null?void 0:u.label}),f?y.jsx("span",{className:"absolute inset-y-0 right-3 flex items-center pl-3 text-gray-600",children:"✓"}):null]})},c))})})]})})})}function Fu({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return y.jsx("input",{placeholder:e.placeholder,type:e.inputType,className:"input-control",...r(e.id)})}function T0({onFileLoaded:e,disabled:t}){const[r,n]=m.useState(null),o=i=>{var l;const s=(l=i.target.files)==null?void 0:l[0];if(!s)return;const a=new FileReader;a.onloadend=()=>{const u=a.result;e({base64:u,type:s.type,name:s.name}),n(null)},a.onerror=()=>{n("Failed to read file.")},a.readAsDataURL(s)};return y.jsxs("div",{className:"flex flex-col items-start gap-2",children:[y.jsx("input",{type:"file",onChange:o,disabled:t,className:`block w-full text-sm text-gray-500 file:mr-4 file:px-4 input-control !py-1 !pl-1\r
53
53
  file:rounded-[6px] file:py-[6px] file:border-0\r
54
54
  file:text-sm file:font-semibold\r
55
55
  file:bg-blue-50 file:text-blue-700\r
56
- hover:file:bg-blue-100`}),r&&y.jsx("p",{className:"text-red-500 text-sm",children:r})]})}const _0=["jpg","jpeg","png","gif","bmp","webp","svg","image"],Au={pdf:"/pdf-icon.png",word:"/word-icon.png",excel:"/excel-icon.png",powerpoint:"/ppt-icon.png",other:"/file-icon.png"},S0=(e="")=>{var r;const t=((r=e.split(".").pop())==null?void 0:r.toLowerCase())||"";return _0.includes(t)||e.startsWith("data:image/")?"image":["pdf"].includes(t)||e.startsWith("data:application/pdf")?"pdf":["doc","docx"].includes(t)||e.startsWith("data:application/msword")||e.startsWith("data:application/vnd.openxmlformats-officedocument.wordprocessingml.document")?"word":["xls","xlsx","csv"].includes(t)||e.startsWith("data:application/vnd.ms-excel")||e.startsWith("data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")?"excel":["ppt","pptx"].includes(t)||e.startsWith("data:application/vnd.ms-powerpoint")||e.startsWith("data:application/vnd.openxmlformats-officedocument.presentationml.presentation")?"powerpoint":["txt"].includes(t)||e.startsWith("data:text/")?"text":["zip","rar","7z","tar","gz"].includes(t)?"archive":["mp4","mkv","webm","avi","mov"].includes(t)||e.startsWith("data:video/")?"video":["mp3","wav","flac","aac","ogg"].includes(t)||e.startsWith("data:audio/")?"audio":"other"},k0=({fileUrl:e,fileName:t})=>{const[r,n]=m.useState(!1),[o,i]=m.useState("unknown");m.useEffect(()=>{e&&i(S0(e))},[e]);const s=()=>{o==="image"?n(!0):window.open(e,"_blank")},a=()=>n(!1),l=()=>{if(o==="image")return y.jsx("button",{className:"btn btn-view text-sm font-semibold",type:"button","aria-label":"Preview file",children:y.jsx("span",{children:"Preview File"})});const u=Au[o]||Au.other;return y.jsxs("div",{onClick:s,className:"cursor-pointer border border-gray-200 bg-gray-200 rounded p-2 flex flex-col items-center justify-center hover:shadow",title:`Click to ${o==="pdf"?"open":"download"} ${t||"file"}`,children:[o==="image"&&y.jsx("div",{className:"w-14 h-14 flex items-center justify-center mb-2",children:y.jsx("img",{src:u,alt:`${o} icon`,className:"max-w-full max-h-full"})}),y.jsx("div",{className:"text-xs text-gray-700 truncate w-full text-center",children:t||(e==null?void 0:e.split("/").pop())||"Unknown file"})]})};return y.jsxs("div",{className:"mt-2",children:[y.jsx("div",{onClick:s,children:l()}),r&&o==="image"&&y.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex justify-center items-center z-50",onClick:a,children:y.jsxs("div",{className:"relative bg-white p-5 rounded-lg max-w-[90vw] max-h-[90vh] overflow-auto",onClick:u=>u.stopPropagation(),children:[y.jsx("button",{onClick:a,className:"absolute top-2 right-2 text-2xl font-bold text-gray-700","aria-label":"Close preview",children:"×"}),y.jsx("img",{src:e||"/place.png",alt:t||"Full Image",className:"max-w-full max-h-[80vh] mx-auto object-contain"})]})})]})};function ju({element:e,validationData:t}){const[r,n]=m.useState((e==null?void 0:e.value)??null),{register:o=()=>({}),setValue:i,isReadOnly:s}=t||{};return m.useEffect(()=>{o(e.id)},[e.id,o]),y.jsxs("div",{children:[y.jsx(T0,{onFileLoaded:a=>{i(e.id,a),n(a)},disabled:s}),r&&y.jsx(k0,{fileUrl:r.base64,fileName:r.name})]})}const C0=({element:e})=>{const t=m.useMemo(()=>Array.from({length:e.grid},(r,n)=>n),[e.grid]);return y.jsx("div",{className:"grid p-3",style:{gridTemplateColumns:`repeat(${e.grid}, 1fr)`,gap:"8px"},children:t.map(r=>y.jsx("div",{className:"border rounded p-4 min-h-[80px] transition-colors hover:border-gray-400",children:r},r))})},$u=m.memo(C0);function Nu({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return y.jsx("input",{placeholder:e.placeholder,type:e.inputType,className:"input-control",...r(e.id)})}var ce=function(){return ce=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},ce.apply(this,arguments)};function O0(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function st(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Ct=function(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")},F0={k:1e3,m:1e6,b:1e9},A0=function(e,t){t===void 0&&(t=".");var r=new RegExp("(\\d+(".concat(Ct(t),"\\d*)?)([kmb])$"),"i"),n=e.match(r);if(n){var o=n[1],i=n[3],s=F0[i.toLowerCase()];return Number(o.replace(t,"."))*s}},j0=function(e,t){t===void 0&&(t=",");var r=new RegExp(Ct(t),"g");return e.replace(r,"")},$0=function(e,t){var r=Ct(t.join("")),n=new RegExp("[^\\d".concat(r,"]"),"gi");return e.replace(n,"")},os=function(e){var t=e.value,r=e.groupSeparator,n=r===void 0?",":r,o=e.decimalSeparator,i=o===void 0?".":o,s=e.allowDecimals,a=s===void 0?!0:s,l=e.decimalsLimit,u=l===void 0?2:l,c=e.allowNegativeValue,f=c===void 0?!0:c,h=e.disableAbbreviations,p=h===void 0?!1:h,d=e.prefix,g=d===void 0?"":d,x=e.transformRawValue,b=x===void 0?function(re){return re}:x,v=b(t);if(v==="-")return v;var w=p?[]:["k","m","b"],_=new RegExp("((^|\\D)-\\d)|(-".concat(Ct(g),")")),k=_.test(v),S=RegExp("(\\d+)-?".concat(Ct(g))).exec(t)||[],C=S[0],A=S[1],N=g?C?v.replace(C,"").concat(A):v.replace(g,""):v,P=j0(N,n),L=$0(P,st([n,i],w,!0)),I=L;if(!p){if(w.some(function(re){return re===L.toLowerCase().replace(i,"")}))return"";var R=A0(L,i);R&&(I=String(R))}var q=k&&f?"-":"";if(i&&I.includes(i)){var J=L.split(i),z=J[0],G=J[1],K=u&&G?G.slice(0,u):G,Z=a?"".concat(i).concat(K):"";return"".concat(q).concat(z).concat(Z)}return"".concat(q).concat(I)},N0=function(e,t,r){if(r!==void 0&&e.length>1){if(r===0)return e.replace(t,"");if(e.includes(t)){var n=e.split(t),o=n[0],i=n[1];if(i.length===r)return e;if(i.length>r)return"".concat(o).concat(t).concat(i.slice(0,r))}var s=e.length>r?new RegExp("(\\d+)(\\d{".concat(r,"})")):new RegExp("(\\d)(\\d+)"),a=e.match(s);if(a){var o=a[1],i=a[2];return"".concat(o).concat(t).concat(i)}}return e},Lu=function(e,t){var r=t.groupSeparator,n=r===void 0?",":r,o=t.decimalSeparator,i=o===void 0?".":o,s=new RegExp("\\d([^".concat(Ct(n)).concat(Ct(i),"0-9]+)")),a=e.match(s);return a?a[1]:void 0},mn=function(e){var t=e.value,r=e.decimalSeparator,n=e.intlConfig,o=e.decimalScale,i=e.prefix,s=i===void 0?"":i,a=e.suffix,l=a===void 0?"":a;if(t===""||t===void 0)return"";if(t==="-")return"-";var u=new RegExp("^\\d?-".concat(s?"".concat(Ct(s),"?"):"","\\d")).test(t),c=r!=="."?L0(t,r,u):t;r&&r!=="-"&&c.startsWith(r)&&(c="0"+c);var f={minimumFractionDigits:o||0,maximumFractionDigits:20},h=n?new Intl.NumberFormat(n.locale,n.currency?ce(ce({},f),{style:"currency",currency:n.currency}):f):new Intl.NumberFormat(void 0,f),p=h.formatToParts(Number(c)),d=P0(p,e),g=Lu(d,ce({},e)),x=t.slice(-1)===r?r:"",b=c.match(RegExp("\\d+\\.(\\d+)"))||[],v=b[1];return o===void 0&&v&&r&&(d.includes(r)?d=d.replace(RegExp("(\\d+)(".concat(Ct(r),")(\\d+)"),"g"),"$1$2".concat(v)):g&&!l?d=d.replace(g,"".concat(r).concat(v).concat(g)):d="".concat(d).concat(r).concat(v)),l&&x?"".concat(d).concat(x).concat(l):g&&x?d.replace(g,"".concat(x).concat(g)):g&&l?d.replace(g,"".concat(x).concat(l)):[d,x,l].join("")},L0=function(e,t,r){var n=e;return t&&t!=="."&&(n=n.replace(RegExp(Ct(t),"g"),"."),r&&t==="-"&&(n="-".concat(n.slice(1)))),n},P0=function(e,t){var r=t.prefix,n=t.groupSeparator,o=t.decimalSeparator,i=t.decimalScale,s=t.disableGroupSeparators,a=s===void 0?!1:s;return e.reduce(function(l,u,c){var f=u.type,h=u.value;return c===0&&r?f==="minusSign"?[h,r]:f==="currency"?st(st([],l,!0),[r],!1):[r,h]:f==="currency"?r?l:st(st([],l,!0),[h],!1):f==="group"?a?l:st(st([],l,!0),[n!==void 0?n:h],!1):f==="decimal"?i!==void 0&&i===0?l:st(st([],l,!0),[o!==void 0?o:h],!1):f==="fraction"?st(st([],l,!0),[i!==void 0?h.slice(0,i):h],!1):st(st([],l,!0),[h],!1)},[""]).join("")},D0={currencySymbol:"",groupSeparator:"",decimalSeparator:"",prefix:"",suffix:""},I0=function(e){var t=e||{},r=t.locale,n=t.currency,o=r?new Intl.NumberFormat(r,n?{currency:n,style:"currency"}:void 0):new Intl.NumberFormat;return o.formatToParts(1000.1).reduce(function(i,s,a){return s.type==="currency"?a===0?ce(ce({},i),{currencySymbol:s.value,prefix:s.value}):ce(ce({},i),{currencySymbol:s.value,suffix:s.value}):s.type==="group"?ce(ce({},i),{groupSeparator:s.value}):s.type==="decimal"?ce(ce({},i),{decimalSeparator:s.value}):i},D0)},Pu=function(e){return RegExp(/\d/,"gi").test(e)},M0=function(e,t,r){if(t===void 0&&(t="."),r===void 0||e===""||e===void 0)return e;if(!e.match(/\d/g))return"";var n=e.split(t),o=n[0],i=n[1];if(r===0)return o;var s=i||"";if(s.length<r)for(;s.length<r;)s+="0";else s=s.slice(0,r);return"".concat(o).concat(t).concat(s)},R0=function(e){var t=e.selectionStart,r=e.value,n=e.lastKeyStroke,o=e.stateValue,i=e.groupSeparator,s=t,a=r;if(o&&s){var l=r.split("");return n==="Backspace"&&o[s]===i&&(l.splice(s-1,1),s-=1),n==="Delete"&&o[s]===i&&(l.splice(s,1),s+=1),a=l.join(""),{modifiedValue:a,cursorPosition:s}}return{modifiedValue:a,cursorPosition:t}},go=m.forwardRef(function(e,t){var r=e.allowDecimals,n=r===void 0?!0:r,o=e.allowNegativeValue,i=o===void 0?!0:o,s=e.id,a=e.name,l=e.className,u=e.customInput,c=e.decimalsLimit,f=e.defaultValue,h=e.disabled,p=h===void 0?!1:h,d=e.maxLength,g=e.value,x=e.onValueChange,b=e.fixedDecimalLength,v=e.placeholder,w=e.decimalScale,_=e.prefix,k=e.suffix,S=e.intlConfig,C=e.step,A=e.min,N=e.max,P=e.disableGroupSeparators,L=P===void 0?!1:P,I=e.disableAbbreviations,R=I===void 0?!1:I,q=e.decimalSeparator,J=e.groupSeparator,z=e.onChange,G=e.onFocus,K=e.onBlur,Z=e.onKeyDown,re=e.onKeyUp,Ae=e.transformRawValue,Le=e.formatValueOnBlur,W=Le===void 0?!0:Le,xe=O0(e,["allowDecimals","allowNegativeValue","id","name","className","customInput","decimalsLimit","defaultValue","disabled","maxLength","value","onValueChange","fixedDecimalLength","placeholder","decimalScale","prefix","suffix","intlConfig","step","min","max","disableGroupSeparators","disableAbbreviations","decimalSeparator","groupSeparator","onChange","onFocus","onBlur","onKeyDown","onKeyUp","transformRawValue","formatValueOnBlur"]);if(q&&Pu(q))throw new Error("decimalSeparator cannot be a number");if(J&&Pu(J))throw new Error("groupSeparator cannot be a number");var Te=m.useMemo(function(){return I0(S)},[S]),ae=q||Te.decimalSeparator||"",je=J||Te.groupSeparator||"";if(ae&&je&&ae===je&&L===!1)throw new Error("decimalSeparator cannot be the same as groupSeparator");var _e={decimalSeparator:ae,groupSeparator:je,disableGroupSeparators:L,intlConfig:S,prefix:_||Te.prefix,suffix:k},Pe={decimalSeparator:ae,groupSeparator:je,allowDecimals:n,decimalsLimit:c||b||2,allowNegativeValue:i,disableAbbreviations:R,prefix:_||Te.prefix,transformRawValue:Ae},vt=m.useState(function(){return f!=null?mn(ce(ce({},_e),{decimalScale:w,value:String(f)})):g!=null?mn(ce(ce({},_e),{decimalScale:w,value:String(g)})):""}),Se=vt[0],oe=vt[1],me=m.useState(!1),$e=me[0],zt=me[1],Ht=m.useState(0),wr=Ht[0],T=Ht[1],O=m.useState(0),$=O[0],B=O[1],V=m.useState(null),M=V[0],Y=V[1],X=m.useRef(null);m.useImperativeHandle(t,function(){return X.current});var ge=function(ye,qe){zt(!0);var Re=R0({selectionStart:qe,value:ye,lastKeyStroke:M,stateValue:Se,groupSeparator:je}),We=Re.modifiedValue,Ve=Re.cursorPosition,Xe=os(ce({value:We},Pe));if(!(d&&Xe.replace(/-/g,"").length>d)){if(Xe===""||Xe==="-"||Xe===ae){x&&x(void 0,a,{float:null,formatted:"",value:""}),oe(Xe),T(1);return}var Et=ae?Xe.replace(ae,"."):Xe,An=parseFloat(Et),Tr=mn(ce({value:Xe},_e));if(Ve!=null){var _r=Ve+(Tr.length-ye.length);_r=_r<=0?_?_.length:0:_r,T(_r),B($+1)}if(oe(Tr),x){var Ws={float:An,formatted:Tr,value:Xe};x(Xe,a,Ws)}}},pe=function(ye){var qe=ye.target,Re=qe.value,We=qe.selectionStart;ge(Re,We),z&&z(ye)},wt=function(ye){return G&&G(ye),Se?Se.length:0},Rr=function(ye){var qe=ye.target.value,Re=os(ce({value:qe},Pe));if(Re==="-"||Re===ae||!Re){oe(""),K&&K(ye);return}var We=N0(Re,ae,b),Ve=M0(We,ae,w!==void 0?w:b),Xe=parseFloat(Ve.replace(ae,".")),Et=mn(ce(ce({},_e),{value:Ve}));x&&W&&x(Ve,a,{float:Xe,formatted:Et,value:Ve}),oe(Et),K&&K(ye)},er=function(ye){var qe=ye.key;if(Y(qe),C&&(qe==="ArrowUp"||qe==="ArrowDown")){ye.preventDefault(),T(Se.length);var Re=parseFloat(g!=null?String(g).replace(ae,"."):os(ce({value:Se},Pe)))||0,We=qe==="ArrowUp"?Re+C:Re-C;if(A!==void 0&&We<Number(A)||N!==void 0&&We>Number(N))return;var Ve=String(C).includes(".")?Number(String(C).split(".")[1].length):void 0;ge(String(Ve?We.toFixed(Ve):We).replace(".",ae))}Z&&Z(ye)},qt=function(ye){var qe=ye.key,Re=ye.currentTarget.selectionStart;if(qe!=="ArrowUp"&&qe!=="ArrowDown"&&Se!=="-"){var We=Lu(Se,{groupSeparator:je,decimalSeparator:ae});if(We&&Re&&Re>Se.length-We.length&&X.current){var Ve=Se.length-We.length;X.current.setSelectionRange(Ve,Ve)}}re&&re(ye)};m.useEffect(function(){g==null&&f==null&&oe("")},[f,g]),m.useEffect(function(){$e&&Se!=="-"&&X.current&&document.activeElement===X.current&&X.current.setSelectionRange(wr,wr)},[Se,wr,X,$e,$]);var On=function(){return g!=null&&Se!=="-"&&(!ae||Se!==ae)?mn(ce(ce({},_e),{decimalScale:$e?void 0:w,value:String(g)})):Se},Er=ce({type:"text",inputMode:"decimal",id:s,name:a,className:l,onChange:pe,onBlur:Rr,onFocus:wt,onKeyDown:er,onKeyUp:qt,placeholder:v,disabled:p,value:On(),ref:X},xe);if(u){var Fn=u;return m.createElement(Fn,ce({},Er))}return m.createElement("input",ce({},Er))});go.displayName="CurrencyInput";const ve=({label:e,name:t,register:r,errors:n,className:o,type:i="text",placeholder:s="",isFloating:a,setValue:l,value:u,trigger:c,prefix:f,disabled:h})=>{var d,g,x,b;const p=r?{...r(t)}:{};return i==="amount"?y.jsxs("div",{className:"space-y-1.5 relative",children:[y.jsx("label",{className:`block text-sm font-medium text-[#344054] font-onest ${a?"z-[40] absolute block text-[#667085] bg-white py-[2px] px-1 -top-[10px] left-3 ":"relative"}`,children:e}),y.jsx(go,{onValueChange:v=>{l(t,v),r&&r(t),c&&c(t)},placeholder:s,className:`input-control ${n!=null&&n[t]?"border-red-300":"border-[#D0D5DD]"}`,decimalsLimit:2,value:u,prefix:f,disabled:h}),(n==null?void 0:n[t])&&y.jsx("p",{className:"mt-1 text-sm text-red-600",children:(d=n[t])==null?void 0:d.message})]}):["checkbox","radio"].includes(i)?y.jsxs("div",{children:[y.jsxs("label",{className:"flex items-center space-x-2",children:[y.jsx("input",{...p,type:i,className:"h-4 w-4 rounded border-gray-300",value:u,disabled:h}),y.jsx("span",{className:"text-sm font-medium text-[#344054] font-onest",children:e})]}),(n==null?void 0:n[t])&&y.jsx("p",{className:"ml-2 text-sm text-red-600",children:(g=n[t])==null?void 0:g.message})]}):i==="textarea"?y.jsxs("div",{className:"space-y-1.5 relative",children:[y.jsx("label",{className:`block text-sm font-medium text-[#344054] font-onest ${a?"z-[40] absolute block text-[#667085] bg-white py-[2px] px-1 -top-[10px] left-3 ":"relative"}`,children:e}),y.jsx("textarea",{...p,className:`input-control ${n!=null&&n[t]?"border-red-300":"border-[#D0D5DD]"} ${o}`,placeholder:s,disabled:h}),(n==null?void 0:n[t])&&y.jsx("p",{className:"mt-1 text-sm text-red-600",children:(x=n[t])==null?void 0:x.message})]}):y.jsxs("div",{className:"space-y-1.5 relative",children:[y.jsx("label",{className:`block text-sm font-medium text-[#344054] font-onest ${a?"z-[40] absolute block text-[#667085] bg-white py-[2px] px-1 -top-[10px] left-3":"relative"}`,children:e}),y.jsx("input",{...p,type:i,className:`input-control ${n!=null&&n[t]?"border-red-300":"border-[#D0D5DD]"} ${o}`,placeholder:a?"":s,disabled:h}),(n==null?void 0:n[t])&&y.jsx("p",{className:"mt-1 text-sm text-red-600",children:(b=n[t])==null?void 0:b.message})]})};function Du({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return y.jsx("div",{className:"flex flex-wrap gap-y-4 gap-x-6",children:e==null?void 0:e.options.map(n=>y.jsx("div",{children:y.jsx(ve,{placeholder:e.placeholder,type:e.inputType,label:n==null?void 0:n.label,register:r,name:e.id,value:n.value})},n.id))})}function Iu({element:e,state:t}){return y.jsx("div",{children:"SectionInput"})}function Mu({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return y.jsx("div",{className:"flex flex-wrap gap-y-4 gap-x-6",children:e==null?void 0:e.options.map(n=>y.jsx("div",{children:y.jsx(ve,{placeholder:e.placeholder,type:e.inputType,label:n==null?void 0:n.label,register:r,name:e.id,value:n.value})},n.id))})}const is=({className:e="",options:t,placeholder:r="Select",errors:n,register:o,setValue:i,name:s,label:a,value:l,trigger:u,isMultiple:c,isFloatingLabel:f,subText:h,labelClass:p="text-[10px]",loading:d})=>{const[g,x]=m.useState(c?[]:null),b=ut("input-control",e);return m.useEffect(()=>{g&&i&&o&&(i(s,g==null?void 0:g.value),o&&o(s),u&&u(s))},[s,o,g,i,u]),m.useEffect(()=>{const v=t==null?void 0:t.find(w=>typeof w.value=="string"&&typeof l=="string"?w.value.toLowerCase()===l.toLowerCase():typeof w.value=="object"&&typeof l=="object"?w.value.id===(l==null?void 0:l.id):w.value===l);x(v||null)},[l,t]),y.jsxs("div",{className:"relative",children:[!f&&a&&y.jsx("label",{className:"block text-sm text-[#686878] darks:!text-white/70 mb-2",children:a}),f&&y.jsx("label",{className:`z-[40] absolute block text-[#667085] bg-white py-[2px] px-1 -top-[10px] left-3 ${p}`,children:a}),y.jsx(Xt,{value:g,onChange:x,multiple:c,children:y.jsxs("div",{className:"relative",children:[y.jsxs(Xt.Button,{className:b,children:[d?y.jsx("span",{className:" block opacity-60 text-sm text-left",children:"Fetching data ..."}):y.jsx("span",{className:"block truncate text-sm text-left",children:(g==null?void 0:g.label)||y.jsx("span",{className:"opacity-60",children:r})}),y.jsx("span",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2",children:y.jsx(Be,{icon:"lucide:chevron-down"})})]}),y.jsx(_u,{as:m.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:y.jsx(Xt.Options,{className:"z-[77] absolute mt-1 max-h-60 w-full overflow-auto rounded-md bg-white darks:bg-gray-800 text-gray-900 darks:text-white/80 py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm",children:t==null?void 0:t.map((v,w)=>y.jsx(Xt.Option,{className:({active:_})=>`relative cursor-default select-none py-2 pl-4 pr-4 text-sm ${_?"bg-gray-100 darks:bg-gray-700 text-gray-900 darks:text-white/80":"text-gray-900 darks:text-white/70 "}`,value:v,children:({selected:_})=>y.jsx("div",{className:`block truncate text-sm ${_?"font-medium":"font-normal"}`,children:v.label})},w))})})]})}),!n&&h&&y.jsx("p",{className:"text-[10px] text-[#98A2B3] leading-normal mt-[6px]",children:h}),n&&y.jsx("span",{className:"text-sm text-red-500",children:n.message})]})};function Ru({element:e,validationData:t}){const{register:r=()=>({}),trigger:n,setValue:o,watch:i}=t||{};let s;return i&&(s=i()[e.id]),m.useEffect(()=>{r(e.id)},[e.id,r]),y.jsx("div",{children:y.jsx(is,{options:(e==null?void 0:e.options)??[],register:r,name:e.id,setValue:o,trigger:n,value:s})})}function Vu({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return y.jsx("textarea",{placeholder:e.placeholder,rows:4,className:"input-control resize-none",...r(e.id)})}var hn=e=>e.type==="checkbox",mr=e=>e instanceof Date,Ye=e=>e==null;const Bu=e=>typeof e=="object";var we=e=>!Ye(e)&&!Array.isArray(e)&&Bu(e)&&!mr(e),V0=e=>we(e)&&e.target?hn(e.target)?e.target.checked:e.target.value:e,B0=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,U0=(e,t)=>e.has(B0(t)),z0=e=>{const t=e.constructor&&e.constructor.prototype;return we(t)&&t.hasOwnProperty("isPrototypeOf")},ss=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Me(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(ss&&(e instanceof Blob||n))&&(r||we(e)))if(t=r?[]:{},!r&&!z0(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=Me(e[o]));else return e;return t}var gn=e=>Array.isArray(e)?e.filter(Boolean):[],de=e=>e===void 0,U=(e,t,r)=>{if(!t||!we(e))return r;const n=gn(t.split(/[,[\].]+?/)).reduce((o,i)=>Ye(o)?o:o[i],e);return de(n)||n===e?de(e[t])?r:e[t]:n},Ot=e=>typeof e=="boolean",as=e=>/^\w*$/.test(e),Uu=e=>gn(e.replace(/["|']|\]/g,"").split(/\.|\[/)),se=(e,t,r)=>{let n=-1;const o=as(t)?[t]:Uu(t),i=o.length,s=i-1;for(;++n<i;){const a=o[n];let l=r;if(n!==s){const u=e[a];l=we(u)||Array.isArray(u)?u:isNaN(+o[n+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;e[a]=l,e=e[a]}return e};const zu={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},dt={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Vt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Hu=m.createContext(null),H0=()=>m.useContext(Hu),q0=e=>{const{children:t,...r}=e;return m.createElement(Hu.Provider,{value:r},t)};var W0=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const s=i;return t._proxyFormState[s]!==dt.all&&(t._proxyFormState[s]=!n||dt.all),e[s]}});return o},Je=e=>we(e)&&!Object.keys(e).length,K0=(e,t,r,n)=>{r(e);const{name:o,...i}=e;return Je(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(s=>t[s]===dt.all)},at=e=>Array.isArray(e)?e:[e];function qu(e){const t=m.useRef(e);t.current=e,m.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}var Ft=e=>typeof e=="string",Y0=(e,t,r,n,o)=>Ft(e)?(n&&t.watch.add(e),U(r,e,o)):Array.isArray(e)?e.map(i=>(n&&t.watch.add(i),U(r,i))):(n&&(t.watchAll=!0),r),Wu=(e,t,r,n,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:o||!0}}:{},Gt=()=>{const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=(Math.random()*16+e)%16|0;return(t=="x"?r:r&3|8).toString(16)})},ls=(e,t,r={})=>r.shouldFocus||de(r.shouldFocus)?r.focusName||`${e}.${de(r.focusIndex)?t:r.focusIndex}.`:"",yn=e=>({isOnSubmit:!e||e===dt.onSubmit,isOnBlur:e===dt.onBlur,isOnChange:e===dt.onChange,isOnAll:e===dt.all,isOnTouch:e===dt.onTouched}),us=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Nr=(e,t,r,n)=>{for(const o of r||Object.keys(e)){const i=U(e,o);if(i){const{_f:s,...a}=i;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],o)&&!n)return!0;if(s.ref&&t(s.ref,s.name)&&!n)return!0;if(Nr(a,t))break}else if(we(a)&&Nr(a,t))break}}};var Ku=(e,t,r)=>{const n=at(U(e,r));return se(n,"root",t[r]),se(e,r,n),e},cs=e=>e.type==="file",At=e=>typeof e=="function",yo=e=>{if(!ss)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},bo=e=>Ft(e),fs=e=>e.type==="radio",xo=e=>e instanceof RegExp;const Yu={value:!1,isValid:!1},Ju={value:!0,isValid:!0};var Xu=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!de(e[0].attributes.value)?de(e[0].value)||e[0].value===""?Ju:{value:e[0].value,isValid:!0}:Ju:Yu}return Yu};const Gu={isValid:!1,value:null};var Qu=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Gu):Gu;function Zu(e,t,r="validate"){if(bo(e)||Array.isArray(e)&&e.every(bo)||Ot(e)&&!e)return{type:r,message:bo(e)?e:"",ref:t}}var Lr=e=>we(e)&&!xo(e)?e:{value:e,message:""},ds=async(e,t,r,n,o)=>{const{ref:i,refs:s,required:a,maxLength:l,minLength:u,min:c,max:f,pattern:h,validate:p,name:d,valueAsNumber:g,mount:x,disabled:b}=e._f,v=U(t,d);if(!x||b)return{};const w=s?s[0]:i,_=I=>{n&&w.reportValidity&&(w.setCustomValidity(Ot(I)?"":I||""),w.reportValidity())},k={},S=fs(i),C=hn(i),A=S||C,N=(g||cs(i))&&de(i.value)&&de(v)||yo(i)&&i.value===""||v===""||Array.isArray(v)&&!v.length,P=Wu.bind(null,d,r,k),L=(I,R,q,J=Vt.maxLength,z=Vt.minLength)=>{const G=I?R:q;k[d]={type:I?J:z,message:G,ref:i,...P(I?J:z,G)}};if(o?!Array.isArray(v)||!v.length:a&&(!A&&(N||Ye(v))||Ot(v)&&!v||C&&!Xu(s).isValid||S&&!Qu(s).isValid)){const{value:I,message:R}=bo(a)?{value:!!a,message:a}:Lr(a);if(I&&(k[d]={type:Vt.required,message:R,ref:w,...P(Vt.required,R)},!r))return _(R),k}if(!N&&(!Ye(c)||!Ye(f))){let I,R;const q=Lr(f),J=Lr(c);if(!Ye(v)&&!isNaN(v)){const z=i.valueAsNumber||v&&+v;Ye(q.value)||(I=z>q.value),Ye(J.value)||(R=z<J.value)}else{const z=i.valueAsDate||new Date(v),G=re=>new Date(new Date().toDateString()+" "+re),K=i.type=="time",Z=i.type=="week";Ft(q.value)&&v&&(I=K?G(v)>G(q.value):Z?v>q.value:z>new Date(q.value)),Ft(J.value)&&v&&(R=K?G(v)<G(J.value):Z?v<J.value:z<new Date(J.value))}if((I||R)&&(L(!!I,q.message,J.message,Vt.max,Vt.min),!r))return _(k[d].message),k}if((l||u)&&!N&&(Ft(v)||o&&Array.isArray(v))){const I=Lr(l),R=Lr(u),q=!Ye(I.value)&&v.length>+I.value,J=!Ye(R.value)&&v.length<+R.value;if((q||J)&&(L(q,I.message,R.message),!r))return _(k[d].message),k}if(h&&!N&&Ft(v)){const{value:I,message:R}=Lr(h);if(xo(I)&&!v.match(I)&&(k[d]={type:Vt.pattern,message:R,ref:i,...P(Vt.pattern,R)},!r))return _(R),k}if(p){if(At(p)){const I=await p(v,t),R=Zu(I,w);if(R&&(k[d]={...R,...P(Vt.validate,R.message)},!r))return _(R.message),k}else if(we(p)){let I={};for(const R in p){if(!Je(I)&&!r)break;const q=Zu(await p[R](v,t),w,R);q&&(I={...q,...P(R,q.message)},_(q.message),r&&(k[d]=I))}if(!Je(I)&&(k[d]={ref:w,...I},!r))return k}}return _(!0),k},ps=(e,t)=>[...e,...at(t)],ms=e=>Array.isArray(e)?e.map(()=>{}):void 0;function hs(e,t,r){return[...e.slice(0,t),...at(r),...e.slice(t)]}var gs=(e,t,r)=>Array.isArray(e)?(de(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],ys=(e,t)=>[...at(t),...at(e)];function J0(e,t){let r=0;const n=[...e];for(const o of t)n.splice(o-r,1),r++;return gn(n).length?n:[]}var bs=(e,t)=>de(t)?[]:J0(e,at(t).sort((r,n)=>r-n)),xs=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]};function X0(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=de(e)?n++:e[t[n++]];return e}function G0(e){for(const t in e)if(e.hasOwnProperty(t)&&!de(e[t]))return!1;return!0}function Ce(e,t){const r=Array.isArray(t)?t:as(t)?[t]:Uu(t),n=r.length===1?e:X0(e,r),o=r.length-1,i=r[o];return n&&delete n[i],o!==0&&(we(n)&&Je(n)||Array.isArray(n)&&G0(n))&&Ce(e,r.slice(0,-1)),e}var ec=(e,t,r)=>(e[t]=r,e);function Q0(e){const t=H0(),{control:r=t.control,name:n,keyName:o="id",shouldUnregister:i,rules:s}=e,[a,l]=m.useState(r._getFieldArray(n)),u=m.useRef(r._getFieldArray(n).map(Gt)),c=m.useRef(a),f=m.useRef(n),h=m.useRef(!1);f.current=n,c.current=a,r._names.array.add(n),s&&r.register(n,s),qu({next:({values:S,name:C})=>{if(C===f.current||!C){const A=U(S,f.current);Array.isArray(A)&&(l(A),u.current=A.map(Gt))}},subject:r._subjects.array});const p=m.useCallback(S=>{h.current=!0,r._updateFieldArray(n,S)},[r,n]),d=(S,C)=>{const A=at(Me(S)),N=ps(r._getFieldArray(n),A);r._names.focus=ls(n,N.length-1,C),u.current=ps(u.current,A.map(Gt)),p(N),l(N),r._updateFieldArray(n,N,ps,{argA:ms(S)})},g=(S,C)=>{const A=at(Me(S)),N=ys(r._getFieldArray(n),A);r._names.focus=ls(n,0,C),u.current=ys(u.current,A.map(Gt)),p(N),l(N),r._updateFieldArray(n,N,ys,{argA:ms(S)})},x=S=>{const C=bs(r._getFieldArray(n),S);u.current=bs(u.current,S),p(C),l(C),!Array.isArray(U(r._fields,n))&&se(r._fields,n,void 0),r._updateFieldArray(n,C,bs,{argA:S})},b=(S,C,A)=>{const N=at(Me(C)),P=hs(r._getFieldArray(n),S,N);r._names.focus=ls(n,S,A),u.current=hs(u.current,S,N.map(Gt)),p(P),l(P),r._updateFieldArray(n,P,hs,{argA:S,argB:ms(C)})},v=(S,C)=>{const A=r._getFieldArray(n);xs(A,S,C),xs(u.current,S,C),p(A),l(A),r._updateFieldArray(n,A,xs,{argA:S,argB:C},!1)},w=(S,C)=>{const A=r._getFieldArray(n);gs(A,S,C),gs(u.current,S,C),p(A),l(A),r._updateFieldArray(n,A,gs,{argA:S,argB:C},!1)},_=(S,C)=>{const A=Me(C),N=ec(r._getFieldArray(n),S,A);u.current=[...N].map((P,L)=>!P||L===S?Gt():u.current[L]),p(N),l([...N]),r._updateFieldArray(n,N,ec,{argA:S,argB:A},!0,!1)},k=S=>{const C=at(Me(S));u.current=C.map(Gt),p([...C]),l([...C]),r._updateFieldArray(n,[...C],A=>A,{},!0,!1)};return m.useEffect(()=>{if(r._state.action=!1,us(n,r._names)&&r._subjects.state.next({...r._formState}),h.current&&(!yn(r._options.mode).isOnSubmit||r._formState.isSubmitted))if(r._options.resolver)r._executeSchema([n]).then(S=>{const C=U(S.errors,n),A=U(r._formState.errors,n);(A?!C&&A.type||C&&(A.type!==C.type||A.message!==C.message):C&&C.type)&&(C?se(r._formState.errors,n,C):Ce(r._formState.errors,n),r._subjects.state.next({errors:r._formState.errors}))});else{const S=U(r._fields,n);S&&S._f&&!(yn(r._options.reValidateMode).isOnSubmit&&yn(r._options.mode).isOnSubmit)&&ds(S,r._formValues,r._options.criteriaMode===dt.all,r._options.shouldUseNativeValidation,!0).then(C=>!Je(C)&&r._subjects.state.next({errors:Ku(r._formState.errors,C,n)}))}r._subjects.values.next({name:n,values:{...r._formValues}}),r._names.focus&&Nr(r._fields,(S,C)=>{if(r._names.focus&&C.startsWith(r._names.focus)&&S.focus)return S.focus(),1}),r._names.focus="",r._updateValid(),h.current=!1},[a,n,r]),m.useEffect(()=>(!U(r._formValues,n)&&r._updateFieldArray(n),()=>{(r._options.shouldUnregister||i)&&r.unregister(n)}),[n,r,o,i]),{swap:m.useCallback(v,[p,n,r]),move:m.useCallback(w,[p,n,r]),prepend:m.useCallback(g,[p,n,r]),append:m.useCallback(d,[p,n,r]),remove:m.useCallback(x,[p,n,r]),insert:m.useCallback(b,[p,n,r]),update:m.useCallback(_,[p,n,r]),replace:m.useCallback(k,[p,n,r]),fields:m.useMemo(()=>a.map((S,C)=>({...S,[o]:u.current[C]||Gt()})),[a,o])}}var vs=()=>{let e=[];return{get observers(){return e},next:o=>{for(const i of e)i.next&&i.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(i=>i!==o)}}),unsubscribe:()=>{e=[]}}},ws=e=>Ye(e)||!Bu(e);function Qt(e,t){if(ws(e)||ws(t))return e===t;if(mr(e)&&mr(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const o of r){const i=e[o];if(!n.includes(o))return!1;if(o!=="ref"){const s=t[o];if(mr(i)&&mr(s)||we(i)&&we(s)||Array.isArray(i)&&Array.isArray(s)?!Qt(i,s):i!==s)return!1}}return!0}var tc=e=>e.type==="select-multiple",Z0=e=>fs(e)||hn(e),Es=e=>yo(e)&&e.isConnected,rc=e=>{for(const t in e)if(At(e[t]))return!0;return!1};function vo(e,t={}){const r=Array.isArray(e);if(we(e)||r)for(const n in e)Array.isArray(e[n])||we(e[n])&&!rc(e[n])?(t[n]=Array.isArray(e[n])?[]:{},vo(e[n],t[n])):Ye(e[n])||(t[n]=!0);return t}function nc(e,t,r){const n=Array.isArray(e);if(we(e)||n)for(const o in e)Array.isArray(e[o])||we(e[o])&&!rc(e[o])?de(t)||ws(r[o])?r[o]=Array.isArray(e[o])?vo(e[o],[]):{...vo(e[o])}:nc(e[o],Ye(t)?{}:t[o],r[o]):r[o]=!Qt(e[o],t[o]);return r}var bn=(e,t)=>nc(e,t,vo(t)),oc=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>de(e)?e:t?e===""?NaN:e&&+e:r&&Ft(e)?new Date(e):n?n(e):e;function Ts(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return cs(t)?t.files:fs(t)?Qu(e.refs).value:tc(t)?[...t.selectedOptions].map(({value:r})=>r):hn(t)?Xu(e.refs).value:oc(de(t.value)?e.ref.value:t.value,e)}var eb=(e,t,r,n)=>{const o={};for(const i of e){const s=U(t,i);s&&se(o,i,s._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:n}},xn=e=>de(e)?e:xo(e)?e.source:we(e)?xo(e.value)?e.value.source:e.value:e;const ic="AsyncFunction";var tb=e=>!!e&&!!e.validate&&!!(At(e.validate)&&e.validate.constructor.name===ic||we(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===ic)),rb=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function sc(e,t,r){const n=U(e,r);if(n||as(r))return{error:n,name:r};const o=r.split(".");for(;o.length;){const i=o.join("."),s=U(t,i),a=U(e,i);if(s&&!Array.isArray(s)&&r!==i)return{name:r};if(a&&a.type)return{name:i,error:a};o.pop()}return{name:r}}var nb=(e,t,r,n,o)=>o.isOnAll?!1:!r&&o.isOnTouch?!(t||e):(r?n.isOnBlur:o.isOnBlur)?!e:(r?n.isOnChange:o.isOnChange)?e:!0,ob=(e,t)=>!gn(U(e,t)).length&&Ce(e,t);const ib={mode:dt.onSubmit,reValidateMode:dt.onChange,shouldFocusError:!0};function sb(e={}){let t={...ib,...e},r={submitCount:0,isDirty:!1,isLoading:At(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},o=we(t.defaultValues)||we(t.values)?Me(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:Me(o),s={action:!1,mount:!1,watch:!1},a={mount:new Set,unMount:new Set,array:new Set,watch:new Set},l,u=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:vs(),array:vs(),state:vs()},h=yn(t.mode),p=yn(t.reValidateMode),d=t.criteriaMode===dt.all,g=T=>O=>{clearTimeout(u),u=setTimeout(T,O)},x=async T=>{if(!t.disabled&&(c.isValid||T)){const O=t.resolver?Je((await A()).errors):await P(n,!0);O!==r.isValid&&f.state.next({isValid:O})}},b=(T,O)=>{!t.disabled&&(c.isValidating||c.validatingFields)&&((T||Array.from(a.mount)).forEach($=>{$&&(O?se(r.validatingFields,$,O):Ce(r.validatingFields,$))}),f.state.next({validatingFields:r.validatingFields,isValidating:!Je(r.validatingFields)}))},v=(T,O=[],$,B,V=!0,M=!0)=>{if(B&&$&&!t.disabled){if(s.action=!0,M&&Array.isArray(U(n,T))){const Y=$(U(n,T),B.argA,B.argB);V&&se(n,T,Y)}if(M&&Array.isArray(U(r.errors,T))){const Y=$(U(r.errors,T),B.argA,B.argB);V&&se(r.errors,T,Y),ob(r.errors,T)}if(c.touchedFields&&M&&Array.isArray(U(r.touchedFields,T))){const Y=$(U(r.touchedFields,T),B.argA,B.argB);V&&se(r.touchedFields,T,Y)}c.dirtyFields&&(r.dirtyFields=bn(o,i)),f.state.next({name:T,isDirty:I(T,O),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else se(i,T,O)},w=(T,O)=>{se(r.errors,T,O),f.state.next({errors:r.errors})},_=T=>{r.errors=T,f.state.next({errors:r.errors,isValid:!1})},k=(T,O,$,B)=>{const V=U(n,T);if(V){const M=U(i,T,de($)?U(o,T):$);de(M)||B&&B.defaultChecked||O?se(i,T,O?M:Ts(V._f)):J(T,M),s.mount&&x()}},S=(T,O,$,B,V)=>{let M=!1,Y=!1;const X={name:T};if(!t.disabled){const ge=!!(U(n,T)&&U(n,T)._f&&U(n,T)._f.disabled);if(!$||B){c.isDirty&&(Y=r.isDirty,r.isDirty=X.isDirty=I(),M=Y!==X.isDirty);const pe=ge||Qt(U(o,T),O);Y=!!(!ge&&U(r.dirtyFields,T)),pe||ge?Ce(r.dirtyFields,T):se(r.dirtyFields,T,!0),X.dirtyFields=r.dirtyFields,M=M||c.dirtyFields&&Y!==!pe}if($){const pe=U(r.touchedFields,T);pe||(se(r.touchedFields,T,$),X.touchedFields=r.touchedFields,M=M||c.touchedFields&&pe!==$)}M&&V&&f.state.next(X)}return M?X:{}},C=(T,O,$,B)=>{const V=U(r.errors,T),M=c.isValid&&Ot(O)&&r.isValid!==O;if(t.delayError&&$?(l=g(()=>w(T,$)),l(t.delayError)):(clearTimeout(u),l=null,$?se(r.errors,T,$):Ce(r.errors,T)),($?!Qt(V,$):V)||!Je(B)||M){const Y={...B,...M&&Ot(O)?{isValid:O}:{},errors:r.errors,name:T};r={...r,...Y},f.state.next(Y)}},A=async T=>{b(T,!0);const O=await t.resolver(i,t.context,eb(T||a.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return b(T),O},N=async T=>{const{errors:O}=await A(T);if(T)for(const $ of T){const B=U(O,$);B?se(r.errors,$,B):Ce(r.errors,$)}else r.errors=O;return O},P=async(T,O,$={valid:!0})=>{for(const B in T){const V=T[B];if(V){const{_f:M,...Y}=V;if(M){const X=a.array.has(M.name),ge=V._f&&tb(V._f);ge&&c.validatingFields&&b([B],!0);const pe=await ds(V,i,d,t.shouldUseNativeValidation&&!O,X);if(ge&&c.validatingFields&&b([B]),pe[M.name]&&($.valid=!1,O))break;!O&&(U(pe,M.name)?X?Ku(r.errors,pe,M.name):se(r.errors,M.name,pe[M.name]):Ce(r.errors,M.name))}!Je(Y)&&await P(Y,O,$)}}return $.valid},L=()=>{for(const T of a.unMount){const O=U(n,T);O&&(O._f.refs?O._f.refs.every($=>!Es($)):!Es(O._f.ref))&&ae(T)}a.unMount=new Set},I=(T,O)=>!t.disabled&&(T&&O&&se(i,T,O),!Qt(Ae(),o)),R=(T,O,$)=>Y0(T,a,{...s.mount?i:de(O)?o:Ft(T)?{[T]:O}:O},$,O),q=T=>gn(U(s.mount?i:o,T,t.shouldUnregister?U(o,T,[]):[])),J=(T,O,$={})=>{const B=U(n,T);let V=O;if(B){const M=B._f;M&&(!M.disabled&&se(i,T,oc(O,M)),V=yo(M.ref)&&Ye(O)?"":O,tc(M.ref)?[...M.ref.options].forEach(Y=>Y.selected=V.includes(Y.value)):M.refs?hn(M.ref)?M.refs.length>1?M.refs.forEach(Y=>(!Y.defaultChecked||!Y.disabled)&&(Y.checked=Array.isArray(V)?!!V.find(X=>X===Y.value):V===Y.value)):M.refs[0]&&(M.refs[0].checked=!!V):M.refs.forEach(Y=>Y.checked=Y.value===V):cs(M.ref)?M.ref.value="":(M.ref.value=V,M.ref.type||f.values.next({name:T,values:{...i}})))}($.shouldDirty||$.shouldTouch)&&S(T,V,$.shouldTouch,$.shouldDirty,!0),$.shouldValidate&&re(T)},z=(T,O,$)=>{for(const B in O){const V=O[B],M=`${T}.${B}`,Y=U(n,M);(a.array.has(T)||we(V)||Y&&!Y._f)&&!mr(V)?z(M,V,$):J(M,V,$)}},G=(T,O,$={})=>{const B=U(n,T),V=a.array.has(T),M=Me(O);se(i,T,M),V?(f.array.next({name:T,values:{...i}}),(c.isDirty||c.dirtyFields)&&$.shouldDirty&&f.state.next({name:T,dirtyFields:bn(o,i),isDirty:I(T,M)})):B&&!B._f&&!Ye(M)?z(T,M,$):J(T,M,$),us(T,a)&&f.state.next({...r}),f.values.next({name:s.mount?T:void 0,values:{...i}})},K=async T=>{s.mount=!0;const O=T.target;let $=O.name,B=!0;const V=U(n,$),M=()=>O.type?Ts(V._f):V0(T),Y=X=>{B=Number.isNaN(X)||mr(X)&&isNaN(X.getTime())||Qt(X,U(i,$,X))};if(V){let X,ge;const pe=M(),wt=T.type===zu.BLUR||T.type===zu.FOCUS_OUT,Rr=!rb(V._f)&&!t.resolver&&!U(r.errors,$)&&!V._f.deps||nb(wt,U(r.touchedFields,$),r.isSubmitted,p,h),er=us($,a,wt);se(i,$,pe),wt?(V._f.onBlur&&V._f.onBlur(T),l&&l(0)):V._f.onChange&&V._f.onChange(T);const qt=S($,pe,wt,!1),On=!Je(qt)||er;if(!wt&&f.values.next({name:$,type:T.type,values:{...i}}),Rr)return c.isValid&&(t.mode==="onBlur"?wt&&x():x()),On&&f.state.next({name:$,...er?{}:qt});if(!wt&&er&&f.state.next({...r}),t.resolver){const{errors:Er}=await A([$]);if(Y(pe),B){const Fn=sc(r.errors,n,$),ye=sc(Er,n,Fn.name||$);X=ye.error,$=ye.name,ge=Je(Er)}}else b([$],!0),X=(await ds(V,i,d,t.shouldUseNativeValidation))[$],b([$]),Y(pe),B&&(X?ge=!1:c.isValid&&(ge=await P(n,!0)));B&&(V._f.deps&&re(V._f.deps),C($,ge,X,qt))}},Z=(T,O)=>{if(U(r.errors,O)&&T.focus)return T.focus(),1},re=async(T,O={})=>{let $,B;const V=at(T);if(t.resolver){const M=await N(de(T)?T:V);$=Je(M),B=T?!V.some(Y=>U(M,Y)):$}else T?(B=(await Promise.all(V.map(async M=>{const Y=U(n,M);return await P(Y&&Y._f?{[M]:Y}:Y)}))).every(Boolean),!(!B&&!r.isValid)&&x()):B=$=await P(n);return f.state.next({...!Ft(T)||c.isValid&&$!==r.isValid?{}:{name:T},...t.resolver||!T?{isValid:$}:{},errors:r.errors}),O.shouldFocus&&!B&&Nr(n,Z,T?V:a.mount),B},Ae=T=>{const O={...s.mount?i:o};return de(T)?O:Ft(T)?U(O,T):T.map($=>U(O,$))},Le=(T,O)=>({invalid:!!U((O||r).errors,T),isDirty:!!U((O||r).dirtyFields,T),error:U((O||r).errors,T),isValidating:!!U(r.validatingFields,T),isTouched:!!U((O||r).touchedFields,T)}),W=T=>{T&&at(T).forEach(O=>Ce(r.errors,O)),f.state.next({errors:T?r.errors:{}})},xe=(T,O,$)=>{const B=(U(n,T,{_f:{}})._f||{}).ref,V=U(r.errors,T)||{},{ref:M,message:Y,type:X,...ge}=V;se(r.errors,T,{...ge,...O,ref:B}),f.state.next({name:T,errors:r.errors,isValid:!1}),$&&$.shouldFocus&&B&&B.focus&&B.focus()},Te=(T,O)=>At(T)?f.values.subscribe({next:$=>T(R(void 0,O),$)}):R(T,O,!0),ae=(T,O={})=>{for(const $ of T?at(T):a.mount)a.mount.delete($),a.array.delete($),O.keepValue||(Ce(n,$),Ce(i,$)),!O.keepError&&Ce(r.errors,$),!O.keepDirty&&Ce(r.dirtyFields,$),!O.keepTouched&&Ce(r.touchedFields,$),!O.keepIsValidating&&Ce(r.validatingFields,$),!t.shouldUnregister&&!O.keepDefaultValue&&Ce(o,$);f.values.next({values:{...i}}),f.state.next({...r,...O.keepDirty?{isDirty:I()}:{}}),!O.keepIsValid&&x()},je=({disabled:T,name:O,field:$,fields:B,value:V})=>{if(Ot(T)&&s.mount||T){const M=T?void 0:de(V)?Ts($?$._f:U(B,O)._f):V;(T||!T&&!de(M))&&se(i,O,M),S(O,M,!1,!1,!0)}},_e=(T,O={})=>{let $=U(n,T);const B=Ot(O.disabled)||Ot(t.disabled);return se(n,T,{...$||{},_f:{...$&&$._f?$._f:{ref:{name:T}},name:T,mount:!0,...O}}),a.mount.add(T),$?je({field:$,disabled:Ot(O.disabled)?O.disabled:t.disabled,name:T,value:O.value}):k(T,!0,O.value),{...B?{disabled:O.disabled||t.disabled}:{},...t.progressive?{required:!!O.required,min:xn(O.min),max:xn(O.max),minLength:xn(O.minLength),maxLength:xn(O.maxLength),pattern:xn(O.pattern)}:{},name:T,onChange:K,onBlur:K,ref:V=>{if(V){_e(T,O),$=U(n,T);const M=de(V.value)&&V.querySelectorAll&&V.querySelectorAll("input,select,textarea")[0]||V,Y=Z0(M),X=$._f.refs||[];if(Y?X.find(ge=>ge===M):M===$._f.ref)return;se(n,T,{_f:{...$._f,...Y?{refs:[...X.filter(Es),M,...Array.isArray(U(o,T))?[{}]:[]],ref:{type:M.type,name:T}}:{ref:M}}}),k(T,!1,void 0,M)}else $=U(n,T,{}),$._f&&($._f.mount=!1),(t.shouldUnregister||O.shouldUnregister)&&!(U0(a.array,T)&&s.action)&&a.unMount.add(T)}}},Pe=()=>t.shouldFocusError&&Nr(n,Z,a.mount),vt=T=>{Ot(T)&&(f.state.next({disabled:T}),Nr(n,(O,$)=>{const B=U(n,$);B&&(O.disabled=B._f.disabled||T,Array.isArray(B._f.refs)&&B._f.refs.forEach(V=>{V.disabled=B._f.disabled||T}))},0,!1))},Se=(T,O)=>async $=>{let B;if($&&($.preventDefault&&$.preventDefault(),$.persist&&$.persist()),t.disabled){O&&await O({...r.errors},$);return}let V=Me(i);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:M,values:Y}=await A();r.errors=M,V=Y}else await P(n);if(Ce(r.errors,"root"),Je(r.errors)){f.state.next({errors:{}});try{await T(V,$)}catch(M){B=M}}else O&&await O({...r.errors},$),Pe(),setTimeout(Pe);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Je(r.errors)&&!B,submitCount:r.submitCount+1,errors:r.errors}),B)throw B},oe=(T,O={})=>{U(n,T)&&(de(O.defaultValue)?G(T,Me(U(o,T))):(G(T,O.defaultValue),se(o,T,Me(O.defaultValue))),O.keepTouched||Ce(r.touchedFields,T),O.keepDirty||(Ce(r.dirtyFields,T),r.isDirty=O.defaultValue?I(T,Me(U(o,T))):I()),O.keepError||(Ce(r.errors,T),c.isValid&&x()),f.state.next({...r}))},me=(T,O={})=>{const $=T?Me(T):o,B=Me($),V=Je(T),M=V?o:B;if(O.keepDefaultValues||(o=$),!O.keepValues){if(O.keepDirtyValues){const Y=new Set([...a.mount,...Object.keys(bn(o,i))]);for(const X of Array.from(Y))U(r.dirtyFields,X)?se(M,X,U(i,X)):G(X,U(M,X))}else{if(ss&&de(T))for(const Y of a.mount){const X=U(n,Y);if(X&&X._f){const ge=Array.isArray(X._f.refs)?X._f.refs[0]:X._f.ref;if(yo(ge)){const pe=ge.closest("form");if(pe){pe.reset();break}}}}n={}}i=t.shouldUnregister?O.keepDefaultValues?Me(o):{}:Me(M),f.array.next({values:{...M}}),f.values.next({values:{...M}})}a={mount:O.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!c.isValid||!!O.keepIsValid||!!O.keepDirtyValues,s.watch=!!t.shouldUnregister,f.state.next({submitCount:O.keepSubmitCount?r.submitCount:0,isDirty:V?!1:O.keepDirty?r.isDirty:!!(O.keepDefaultValues&&!Qt(T,o)),isSubmitted:O.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:V?{}:O.keepDirtyValues?O.keepDefaultValues&&i?bn(o,i):r.dirtyFields:O.keepDefaultValues&&T?bn(o,T):O.keepDirty?r.dirtyFields:{},touchedFields:O.keepTouched?r.touchedFields:{},errors:O.keepErrors?r.errors:{},isSubmitSuccessful:O.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},$e=(T,O)=>me(At(T)?T(i):T,O);return{control:{register:_e,unregister:ae,getFieldState:Le,handleSubmit:Se,setError:xe,_executeSchema:A,_getWatch:R,_getDirty:I,_updateValid:x,_removeUnmounted:L,_updateFieldArray:v,_updateDisabledField:je,_getFieldArray:q,_reset:me,_resetDefaultValues:()=>At(t.defaultValues)&&t.defaultValues().then(T=>{$e(T,t.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:T=>{r={...r,...T}},_disableForm:vt,_subjects:f,_proxyFormState:c,_setErrors:_,get _fields(){return n},get _formValues(){return i},get _state(){return s},set _state(T){s=T},get _defaultValues(){return o},get _names(){return a},set _names(T){a=T},get _formState(){return r},set _formState(T){r=T},get _options(){return t},set _options(T){t={...t,...T}}},trigger:re,register:_e,handleSubmit:Se,watch:Te,setValue:G,getValues:Ae,reset:$e,resetField:oe,clearErrors:W,unregister:ae,setError:xe,setFocus:(T,O={})=>{const $=U(n,T),B=$&&$._f;if(B){const V=B.refs?B.refs[0]:B.ref;V.focus&&(V.focus(),O.shouldSelect&&At(V.select)&&V.select())}},getFieldState:Le}}function _s(e={}){const t=m.useRef(),r=m.useRef(),[n,o]=m.useState({isDirty:!1,isValidating:!1,isLoading:At(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:At(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...sb(e),formState:n});const i=t.current.control;return i._options=e,qu({subject:i._subjects.state,next:s=>{K0(s,i._proxyFormState,i._updateFormState)&&o({...i._formState})}}),m.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),m.useEffect(()=>{if(i._proxyFormState.isDirty){const s=i._getDirty();s!==n.isDirty&&i._subjects.state.next({isDirty:s})}},[i,n.isDirty]),m.useEffect(()=>{e.values&&!Qt(e.values,r.current)?(i._reset(e.values,i._options.resetOptions),r.current=e.values,o(s=>({...s}))):i._resetDefaultValues()},[e.values,i]),m.useEffect(()=>{e.errors&&i._setErrors(e.errors)},[e.errors,i]),m.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),m.useEffect(()=>{e.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})},[e.shouldUnregister,i]),m.useMemo(()=>({...t.current,formState:W0(n,i)}),[n,i])}const ac=(e,t,r)=>{if(e&&"reportValidity"in e){const n=U(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},lc=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?ac(n.ref,r,e):n.refs&&n.refs.forEach(o=>ac(o,r,e))}},ab=(e,t)=>{t.shouldUseNativeValidation&&lc(e,t);const r={};for(const n in e){const o=U(t.fields,n),i=Object.assign(e[n]||{},{ref:o&&o.ref});if(lb(t.names||Object.keys(e),n)){const s=Object.assign({},U(r,n));se(s,"root",i),se(r,n,s)}else se(r,n,i)}return r},lb=(e,t)=>e.some(r=>r.startsWith(t+"."));function Ss(e,t,r){return t===void 0&&(t={}),r===void 0&&(r={}),function(n,o,i){try{return Promise.resolve(function(s,a){try{var l=(t.context&&process.env.NODE_ENV==="development"&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(e[r.mode==="sync"?"validateSync":"validate"](n,Object.assign({abortEarly:!1},t,{context:o}))).then(function(u){return i.shouldUseNativeValidation&&lc({},i),{values:r.raw?n:u,errors:{}}}))}catch(u){return a(u)}return l&&l.then?l.then(void 0,a):l}(0,function(s){if(!s.inner)throw s;return{values:{},errors:ab((a=s,l=!i.shouldUseNativeValidation&&i.criteriaMode==="all",(a.inner||[]).reduce(function(u,c){if(u[c.path]||(u[c.path]={message:c.message,type:c.type}),l){var f=u[c.path].types,h=f&&f[c.type];u[c.path]=Wu(c.path,l,u,c.type,h?[].concat(h,c.message):c.message)}return u},{})),i)};var a,l}))}catch(s){return Promise.reject(s)}}}var ks,uc;function ub(){if(uc)return ks;uc=1;function e(b){this._maxSize=b,this.clear()}e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(b){return this._values[b]},e.prototype.set=function(b,v){return this._size>=this._maxSize&&this.clear(),b in this._values||this._size++,this._values[b]=v};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,n=/^\d/,o=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,i=/^\s*(['"]?)(.*?)(\1)\s*$/,s=512,a=new e(s),l=new e(s),u=new e(s);ks={Cache:e,split:f,normalizePath:c,setter:function(b){var v=c(b);return l.get(b)||l.set(b,function(_,k){for(var S=0,C=v.length,A=_;S<C-1;){var N=v[S];if(N==="__proto__"||N==="constructor"||N==="prototype")return _;A=A[v[S++]]}A[v[S]]=k})},getter:function(b,v){var w=c(b);return u.get(b)||u.set(b,function(k){for(var S=0,C=w.length;S<C;)if(k!=null||!v)k=k[w[S++]];else return;return k})},join:function(b){return b.reduce(function(v,w){return v+(p(w)||r.test(w)?"["+w+"]":(v?".":"")+w)},"")},forEach:function(b,v,w){h(Array.isArray(b)?b:f(b),v,w)}};function c(b){return a.get(b)||a.set(b,f(b).map(function(v){return v.replace(i,"$2")}))}function f(b){return b.match(t)||[""]}function h(b,v,w){var _=b.length,k,S,C,A;for(S=0;S<_;S++)k=b[S],k&&(x(k)&&(k='"'+k+'"'),A=p(k),C=!A&&/^\d+$/.test(k),v.call(w,k,A,C,S,b))}function p(b){return typeof b=="string"&&b&&["'",'"'].indexOf(b.charAt(0))!==-1}function d(b){return b.match(n)&&!b.match(r)}function g(b){return o.test(b)}function x(b){return!p(b)&&(d(b)||g(b))}return ks}var hr=ub(),Cs,cc;function cb(){if(cc)return Cs;cc=1;const e=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,t=c=>c.match(e)||[],r=c=>c[0].toUpperCase()+c.slice(1),n=(c,f)=>t(c).join(f).toLowerCase(),o=c=>t(c).reduce((f,h)=>`${f}${f?h[0].toUpperCase()+h.slice(1).toLowerCase():h.toLowerCase()}`,"");return Cs={words:t,upperFirst:r,camelCase:o,pascalCase:c=>r(o(c)),snakeCase:c=>n(c,"_"),kebabCase:c=>n(c,"-"),sentenceCase:c=>r(n(c," ")),titleCase:c=>t(c).map(r).join(" ")},Cs}var Os=cb(),wo={exports:{}},fc;function fb(){if(fc)return wo.exports;fc=1,wo.exports=function(o){return e(t(o),o)},wo.exports.array=e;function e(o,i){var s=o.length,a=new Array(s),l={},u=s,c=r(i),f=n(o);for(i.forEach(function(p){if(!f.has(p[0])||!f.has(p[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});u--;)l[u]||h(o[u],u,new Set);return a;function h(p,d,g){if(g.has(p)){var x;try{x=", node was:"+JSON.stringify(p)}catch{x=""}throw new Error("Cyclic dependency"+x)}if(!f.has(p))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(p));if(!l[d]){l[d]=!0;var b=c.get(p)||new Set;if(b=Array.from(b),d=b.length){g.add(p);do{var v=b[--d];h(v,f.get(v),g)}while(d);g.delete(p)}a[--s]=p}}}function t(o){for(var i=new Set,s=0,a=o.length;s<a;s++){var l=o[s];i.add(l[0]),i.add(l[1])}return Array.from(i)}function r(o){for(var i=new Map,s=0,a=o.length;s<a;s++){var l=o[s];i.has(l[0])||i.set(l[0],new Set),i.has(l[1])||i.set(l[1],new Set),i.get(l[0]).add(l[1])}return i}function n(o){for(var i=new Map,s=0,a=o.length;s<a;s++)i.set(o[s],s);return i}return wo.exports}var db=fb();const pb=Sf(db),mb=Object.prototype.toString,hb=Error.prototype.toString,gb=RegExp.prototype.toString,yb=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",bb=/^Symbol\((.*)\)(.*)$/;function xb(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function dc(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return xb(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return yb.call(e).replace(bb,"Symbol($1)");const n=mb.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+hb.call(e)+"]":n==="RegExp"?gb.call(e):null}function Bt(e,t){let r=dc(e,t);return r!==null?r:JSON.stringify(e,function(n,o){let i=dc(this[n],t);return i!==null?i:o},2)}function pc(e){return e==null?[]:[].concat(e)}let mc,hc,gc,vb=/\$\{\s*(\w+)\s*\}/g;mc=Symbol.toStringTag;class yc{constructor(t,r,n,o){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[mc]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=o,this.errors=[],this.inner=[],pc(t).forEach(i=>{if(Ze.isError(i)){this.errors.push(...i.errors);const s=i.inner.length?i.inner:[i];this.inner.push(...s)}else this.errors.push(i)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}hc=Symbol.hasInstance,gc=Symbol.toStringTag;class Ze extends Error{static formatError(t,r){const n=r.label||r.path||"this";return r=Object.assign({},r,{path:n,originalPath:r.path}),typeof t=="string"?t.replace(vb,(o,i)=>Bt(r[i])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,n,o,i){const s=new yc(t,r,n,o);if(i)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[gc]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,Ze)}static[hc](t){return yc[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let jt={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:r,originalValue:n})=>{const o=n!=null&&n!==r?` (cast from the value \`${Bt(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Bt(r,!0)}\``+o:`${e} must match the configured type. The validated value was: \`${Bt(r,!0)}\``+o}},et={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Zt={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},Fs={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},As={isValue:"${path} field must be ${value}"},Eo={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},To={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"};Object.assign(Object.create(null),{mixed:jt,string:et,number:Zt,date:Fs,object:Eo,array:To,boolean:As,tuple:{notType:e=>{const{path:t,value:r,spec:n}=e,o=n.types.length;if(Array.isArray(r)){if(r.length<o)return`${t} tuple value has too few items, expected a length of ${o} but got ${r.length} for value: \`${Bt(r,!0)}\``;if(r.length>o)return`${t} tuple value has too many items, expected a length of ${o} but got ${r.length} for value: \`${Bt(r,!0)}\``}return Ze.formatError(jt.notType,e)}}});const _o=e=>e&&e.__isYupSchema__;class So{static fromOptions(t,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:o,otherwise:i}=r,s=typeof n=="function"?n:(...a)=>a.every(l=>l===n);return new So(t,(a,l)=>{var u;let c=s(...a)?o:i;return(u=c==null?void 0:c(l))!=null?u:l})}constructor(t,r){this.fn=void 0,this.refs=t,this.refs=t,this.fn=r}resolve(t,r){let n=this.refs.map(i=>i.getValue(r==null?void 0:r.value,r==null?void 0:r.parent,r==null?void 0:r.context)),o=this.fn(n,t,r);if(o===void 0||o===t)return t;if(!_o(o))throw new TypeError("conditions must return a schema object");return o.resolve(r)}}const ko={context:"$",value:"."};class gr{constructor(t,r={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===ko.context,this.isValue=this.key[0]===ko.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?ko.context:this.isValue?ko.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&hr.getter(this.path,!0),this.map=r.map}getValue(t,r,n){let o=this.isContext?n:this.isValue?t:r;return this.getter&&(o=this.getter(o||{})),this.map&&(o=this.map(o)),o}cast(t,r){return this.getValue(t,r==null?void 0:r.parent,r==null?void 0:r.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}gr.prototype.__isYupRef=!0;const bt=e=>e==null;function Pr(e){function t({value:r,path:n="",options:o,originalValue:i,schema:s},a,l){const{name:u,test:c,params:f,message:h,skipAbsent:p}=e;let{parent:d,context:g,abortEarly:x=s.spec.abortEarly,disableStackTrace:b=s.spec.disableStackTrace}=o;function v(L){return gr.isRef(L)?L.getValue(r,d,g):L}function w(L={}){const I=Object.assign({value:r,originalValue:i,label:s.spec.label,path:L.path||n,spec:s.spec,disableStackTrace:L.disableStackTrace||b},f,L.params);for(const q of Object.keys(I))I[q]=v(I[q]);const R=new Ze(Ze.formatError(L.message||h,I),r,I.path,L.type||u,I.disableStackTrace);return R.params=I,R}const _=x?a:l;let k={path:n,parent:d,type:u,from:o.from,createError:w,resolve:v,options:o,originalValue:i,schema:s};const S=L=>{Ze.isError(L)?_(L):L?l(null):_(w())},C=L=>{Ze.isError(L)?_(L):a(L)};if(p&&bt(r))return S(!0);let N;try{var P;if(N=c.call(k,r,k),typeof((P=N)==null?void 0:P.then)=="function"){if(o.sync)throw new Error(`Validation test of type: "${k.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(N).then(S,C)}}catch(L){C(L);return}S(N)}return t.OPTIONS=e,t}function wb(e,t,r,n=r){let o,i,s;return t?(hr.forEach(t,(a,l,u)=>{let c=l?a.slice(1,a.length-1):a;e=e.resolve({context:n,parent:o,value:r});let f=e.type==="tuple",h=u?parseInt(c,10):0;if(e.innerType||f){if(f&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${s}" must contain an index to the tuple element, e.g. "${s}[0]"`);if(r&&h>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${t}. because there is no value at that index. `);o=r,r=r&&r[h],e=f?e.spec.types[h]:e.innerType}if(!u){if(!e.fields||!e.fields[c])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${s} which is a type: "${e.type}")`);o=r,r=r&&r[c],e=e.fields[c]}i=c,s=l?"["+a+"]":"."+a}),{schema:e,parent:o,parentPath:i}):{parent:o,parentPath:t,schema:e}}class Co extends Set{describe(){const t=[];for(const r of this.values())t.push(gr.isRef(r)?r.describe():r);return t}resolveAll(t){let r=[];for(const n of this.values())r.push(t(n));return r}clone(){return new Co(this.values())}merge(t,r){const n=this.clone();return t.forEach(o=>n.add(o)),r.forEach(o=>n.delete(o)),n}}function Dr(e,t=new Map){if(_o(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let r;if(e instanceof Date)r=new Date(e.getTime()),t.set(e,r);else if(e instanceof RegExp)r=new RegExp(e),t.set(e,r);else if(Array.isArray(e)){r=new Array(e.length),t.set(e,r);for(let n=0;n<e.length;n++)r[n]=Dr(e[n],t)}else if(e instanceof Map){r=new Map,t.set(e,r);for(const[n,o]of e.entries())r.set(n,Dr(o,t))}else if(e instanceof Set){r=new Set,t.set(e,r);for(const n of e)r.add(Dr(n,t))}else if(e instanceof Object){r={},t.set(e,r);for(const[n,o]of Object.entries(e))r[n]=Dr(o,t)}else throw Error(`Unable to clone ${e}`);return r}class tt{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new Co,this._blacklist=new Co,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(jt.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(r=>{r.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeCheck=this._typeCheck,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.internalTests=Object.assign({},this.internalTests),r.exclusiveTests=Object.assign({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=Dr(Object.assign({},this.spec,t)),r}label(t){let r=this.clone();return r.spec.label=t,r}meta(...t){if(t.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},t[0]),r}withMutation(t){let r=this._mutate;this._mutate=!0;let n=t(this);return this._mutate=r,n}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let r=this,n=t.clone();const o=Object.assign({},r.spec,n.spec);return n.spec=o,n.internalTests=Object.assign({},r.internalTests,n.internalTests),n._whitelist=r._whitelist.merge(t._whitelist,t._blacklist),n._blacklist=r._blacklist.merge(t._blacklist,t._whitelist),n.tests=r.tests,n.exclusiveTests=r.exclusiveTests,n.withMutation(i=>{t.tests.forEach(s=>{i.test(s.OPTIONS)})}),n.transforms=[...r.transforms,...n.transforms],n}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let r=this;if(r.conditions.length){let n=r.conditions;r=r.clone(),r.conditions=[],r=n.reduce((o,i)=>i.resolve(o,t),r),r=r.resolve(t)}return r}resolveOptions(t){var r,n,o,i;return Object.assign({},t,{from:t.from||[],strict:(r=t.strict)!=null?r:this.spec.strict,abortEarly:(n=t.abortEarly)!=null?n:this.spec.abortEarly,recursive:(o=t.recursive)!=null?o:this.spec.recursive,disableStackTrace:(i=t.disableStackTrace)!=null?i:this.spec.disableStackTrace})}cast(t,r={}){let n=this.resolve(Object.assign({value:t},r)),o=r.assert==="ignore-optionality",i=n._cast(t,r);if(r.assert!==!1&&!n.isType(i)){if(o&&bt(i))return i;let s=Bt(t),a=Bt(i);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}".
56
+ hover:file:bg-blue-100`}),r&&y.jsx("p",{className:"text-red-500 text-sm",children:r})]})}const _0=["jpg","jpeg","png","gif","bmp","webp","svg","image"],Au={pdf:"/pdf-icon.png",word:"/word-icon.png",excel:"/excel-icon.png",powerpoint:"/ppt-icon.png",other:"/file-icon.png"},S0=(e="")=>{var r;const t=((r=e.split(".").pop())==null?void 0:r.toLowerCase())||"";return _0.includes(t)||e.startsWith("data:image/")?"image":["pdf"].includes(t)||e.startsWith("data:application/pdf")?"pdf":["doc","docx"].includes(t)||e.startsWith("data:application/msword")||e.startsWith("data:application/vnd.openxmlformats-officedocument.wordprocessingml.document")?"word":["xls","xlsx","csv"].includes(t)||e.startsWith("data:application/vnd.ms-excel")||e.startsWith("data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")?"excel":["ppt","pptx"].includes(t)||e.startsWith("data:application/vnd.ms-powerpoint")||e.startsWith("data:application/vnd.openxmlformats-officedocument.presentationml.presentation")?"powerpoint":["txt"].includes(t)||e.startsWith("data:text/")?"text":["zip","rar","7z","tar","gz"].includes(t)?"archive":["mp4","mkv","webm","avi","mov"].includes(t)||e.startsWith("data:video/")?"video":["mp3","wav","flac","aac","ogg"].includes(t)||e.startsWith("data:audio/")?"audio":"other"},k0=({fileUrl:e,fileName:t})=>{const[r,n]=m.useState(!1),[o,i]=m.useState("unknown");m.useEffect(()=>{e&&i(S0(e))},[e]);const s=()=>{o==="image"?n(!0):window.open(e,"_blank")},a=()=>n(!1),l=()=>{if(o==="image")return y.jsx("button",{className:"btn btn-view text-sm font-semibold",type:"button","aria-label":"Preview file",children:y.jsx("span",{children:"Preview File"})});const u=Au[o]||Au.other;return y.jsxs("div",{onClick:s,className:"cursor-pointer border border-gray-200 bg-gray-200 rounded p-2 flex flex-col items-center justify-center hover:shadow",title:`Click to ${o==="pdf"?"open":"download"} ${t||"file"}`,children:[o==="image"&&y.jsx("div",{className:"w-14 h-14 flex items-center justify-center mb-2",children:y.jsx("img",{src:u,alt:`${o} icon`,className:"max-w-full max-h-full"})}),y.jsx("div",{className:"text-xs text-gray-700 truncate w-full text-center",children:t||(e==null?void 0:e.split("/").pop())||"Unknown file"})]})};return y.jsxs("div",{className:"mt-2",children:[y.jsx("div",{onClick:s,children:l()}),r&&o==="image"&&y.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex justify-center items-center z-50",onClick:a,children:y.jsxs("div",{className:"relative bg-white p-5 rounded-lg max-w-[90vw] max-h-[90vh] overflow-auto",onClick:u=>u.stopPropagation(),children:[y.jsx("button",{onClick:a,className:"absolute top-2 right-2 text-2xl font-bold text-gray-700","aria-label":"Close preview",children:"×"}),y.jsx("img",{src:e||"/place.png",alt:t||"Full Image",className:"max-w-full max-h-[80vh] mx-auto object-contain"})]})})]})};function ju({element:e,validationData:t}){const[r,n]=m.useState((e==null?void 0:e.value)??null),{register:o=()=>({}),setValue:i,isReadOnly:s}=t||{};return m.useEffect(()=>{o(e.id)},[e.id,o]),y.jsxs("div",{children:[y.jsx(T0,{onFileLoaded:a=>{i(e.id,a),n(a)},disabled:s}),r&&y.jsx(k0,{fileUrl:r.base64,fileName:r.name})]})}const C0=({element:e})=>{const t=m.useMemo(()=>Array.from({length:e.grid},(r,n)=>n),[e.grid]);return y.jsx("div",{className:"grid p-3",style:{gridTemplateColumns:`repeat(${e.grid}, 1fr)`,gap:"8px"},children:t.map(r=>y.jsx("div",{className:"border rounded p-4 min-h-[80px] transition-colors hover:border-gray-400",children:r},r))})},$u=m.memo(C0);function Nu({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return y.jsx("input",{placeholder:e.placeholder,type:e.inputType,className:"input-control",...r(e.id)})}var ce=function(){return ce=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},ce.apply(this,arguments)};function O0(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function st(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Ct=function(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")},F0={k:1e3,m:1e6,b:1e9},A0=function(e,t){t===void 0&&(t=".");var r=new RegExp("(\\d+(".concat(Ct(t),"\\d*)?)([kmb])$"),"i"),n=e.match(r);if(n){var o=n[1],i=n[3],s=F0[i.toLowerCase()];return Number(o.replace(t,"."))*s}},j0=function(e,t){t===void 0&&(t=",");var r=new RegExp(Ct(t),"g");return e.replace(r,"")},$0=function(e,t){var r=Ct(t.join("")),n=new RegExp("[^\\d".concat(r,"]"),"gi");return e.replace(n,"")},os=function(e){var t=e.value,r=e.groupSeparator,n=r===void 0?",":r,o=e.decimalSeparator,i=o===void 0?".":o,s=e.allowDecimals,a=s===void 0?!0:s,l=e.decimalsLimit,u=l===void 0?2:l,c=e.allowNegativeValue,f=c===void 0?!0:c,h=e.disableAbbreviations,p=h===void 0?!1:h,d=e.prefix,g=d===void 0?"":d,x=e.transformRawValue,b=x===void 0?function(re){return re}:x,v=b(t);if(v==="-")return v;var w=p?[]:["k","m","b"],_=new RegExp("((^|\\D)-\\d)|(-".concat(Ct(g),")")),k=_.test(v),S=RegExp("(\\d+)-?".concat(Ct(g))).exec(t)||[],C=S[0],A=S[1],N=g?C?v.replace(C,"").concat(A):v.replace(g,""):v,L=j0(N,n),P=$0(L,st([n,i],w,!0)),I=P;if(!p){if(w.some(function(re){return re===P.toLowerCase().replace(i,"")}))return"";var R=A0(P,i);R&&(I=String(R))}var q=k&&f?"-":"";if(i&&I.includes(i)){var J=P.split(i),z=J[0],G=J[1],K=u&&G?G.slice(0,u):G,Z=a?"".concat(i).concat(K):"";return"".concat(q).concat(z).concat(Z)}return"".concat(q).concat(I)},N0=function(e,t,r){if(r!==void 0&&e.length>1){if(r===0)return e.replace(t,"");if(e.includes(t)){var n=e.split(t),o=n[0],i=n[1];if(i.length===r)return e;if(i.length>r)return"".concat(o).concat(t).concat(i.slice(0,r))}var s=e.length>r?new RegExp("(\\d+)(\\d{".concat(r,"})")):new RegExp("(\\d)(\\d+)"),a=e.match(s);if(a){var o=a[1],i=a[2];return"".concat(o).concat(t).concat(i)}}return e},Pu=function(e,t){var r=t.groupSeparator,n=r===void 0?",":r,o=t.decimalSeparator,i=o===void 0?".":o,s=new RegExp("\\d([^".concat(Ct(n)).concat(Ct(i),"0-9]+)")),a=e.match(s);return a?a[1]:void 0},mn=function(e){var t=e.value,r=e.decimalSeparator,n=e.intlConfig,o=e.decimalScale,i=e.prefix,s=i===void 0?"":i,a=e.suffix,l=a===void 0?"":a;if(t===""||t===void 0)return"";if(t==="-")return"-";var u=new RegExp("^\\d?-".concat(s?"".concat(Ct(s),"?"):"","\\d")).test(t),c=r!=="."?P0(t,r,u):t;r&&r!=="-"&&c.startsWith(r)&&(c="0"+c);var f={minimumFractionDigits:o||0,maximumFractionDigits:20},h=n?new Intl.NumberFormat(n.locale,n.currency?ce(ce({},f),{style:"currency",currency:n.currency}):f):new Intl.NumberFormat(void 0,f),p=h.formatToParts(Number(c)),d=L0(p,e),g=Pu(d,ce({},e)),x=t.slice(-1)===r?r:"",b=c.match(RegExp("\\d+\\.(\\d+)"))||[],v=b[1];return o===void 0&&v&&r&&(d.includes(r)?d=d.replace(RegExp("(\\d+)(".concat(Ct(r),")(\\d+)"),"g"),"$1$2".concat(v)):g&&!l?d=d.replace(g,"".concat(r).concat(v).concat(g)):d="".concat(d).concat(r).concat(v)),l&&x?"".concat(d).concat(x).concat(l):g&&x?d.replace(g,"".concat(x).concat(g)):g&&l?d.replace(g,"".concat(x).concat(l)):[d,x,l].join("")},P0=function(e,t,r){var n=e;return t&&t!=="."&&(n=n.replace(RegExp(Ct(t),"g"),"."),r&&t==="-"&&(n="-".concat(n.slice(1)))),n},L0=function(e,t){var r=t.prefix,n=t.groupSeparator,o=t.decimalSeparator,i=t.decimalScale,s=t.disableGroupSeparators,a=s===void 0?!1:s;return e.reduce(function(l,u,c){var f=u.type,h=u.value;return c===0&&r?f==="minusSign"?[h,r]:f==="currency"?st(st([],l,!0),[r],!1):[r,h]:f==="currency"?r?l:st(st([],l,!0),[h],!1):f==="group"?a?l:st(st([],l,!0),[n!==void 0?n:h],!1):f==="decimal"?i!==void 0&&i===0?l:st(st([],l,!0),[o!==void 0?o:h],!1):f==="fraction"?st(st([],l,!0),[i!==void 0?h.slice(0,i):h],!1):st(st([],l,!0),[h],!1)},[""]).join("")},D0={currencySymbol:"",groupSeparator:"",decimalSeparator:"",prefix:"",suffix:""},I0=function(e){var t=e||{},r=t.locale,n=t.currency,o=r?new Intl.NumberFormat(r,n?{currency:n,style:"currency"}:void 0):new Intl.NumberFormat;return o.formatToParts(1000.1).reduce(function(i,s,a){return s.type==="currency"?a===0?ce(ce({},i),{currencySymbol:s.value,prefix:s.value}):ce(ce({},i),{currencySymbol:s.value,suffix:s.value}):s.type==="group"?ce(ce({},i),{groupSeparator:s.value}):s.type==="decimal"?ce(ce({},i),{decimalSeparator:s.value}):i},D0)},Lu=function(e){return RegExp(/\d/,"gi").test(e)},M0=function(e,t,r){if(t===void 0&&(t="."),r===void 0||e===""||e===void 0)return e;if(!e.match(/\d/g))return"";var n=e.split(t),o=n[0],i=n[1];if(r===0)return o;var s=i||"";if(s.length<r)for(;s.length<r;)s+="0";else s=s.slice(0,r);return"".concat(o).concat(t).concat(s)},R0=function(e){var t=e.selectionStart,r=e.value,n=e.lastKeyStroke,o=e.stateValue,i=e.groupSeparator,s=t,a=r;if(o&&s){var l=r.split("");return n==="Backspace"&&o[s]===i&&(l.splice(s-1,1),s-=1),n==="Delete"&&o[s]===i&&(l.splice(s,1),s+=1),a=l.join(""),{modifiedValue:a,cursorPosition:s}}return{modifiedValue:a,cursorPosition:t}},yo=m.forwardRef(function(e,t){var r=e.allowDecimals,n=r===void 0?!0:r,o=e.allowNegativeValue,i=o===void 0?!0:o,s=e.id,a=e.name,l=e.className,u=e.customInput,c=e.decimalsLimit,f=e.defaultValue,h=e.disabled,p=h===void 0?!1:h,d=e.maxLength,g=e.value,x=e.onValueChange,b=e.fixedDecimalLength,v=e.placeholder,w=e.decimalScale,_=e.prefix,k=e.suffix,S=e.intlConfig,C=e.step,A=e.min,N=e.max,L=e.disableGroupSeparators,P=L===void 0?!1:L,I=e.disableAbbreviations,R=I===void 0?!1:I,q=e.decimalSeparator,J=e.groupSeparator,z=e.onChange,G=e.onFocus,K=e.onBlur,Z=e.onKeyDown,re=e.onKeyUp,Ae=e.transformRawValue,Pe=e.formatValueOnBlur,W=Pe===void 0?!0:Pe,xe=O0(e,["allowDecimals","allowNegativeValue","id","name","className","customInput","decimalsLimit","defaultValue","disabled","maxLength","value","onValueChange","fixedDecimalLength","placeholder","decimalScale","prefix","suffix","intlConfig","step","min","max","disableGroupSeparators","disableAbbreviations","decimalSeparator","groupSeparator","onChange","onFocus","onBlur","onKeyDown","onKeyUp","transformRawValue","formatValueOnBlur"]);if(q&&Lu(q))throw new Error("decimalSeparator cannot be a number");if(J&&Lu(J))throw new Error("groupSeparator cannot be a number");var Te=m.useMemo(function(){return I0(S)},[S]),ae=q||Te.decimalSeparator||"",je=J||Te.groupSeparator||"";if(ae&&je&&ae===je&&P===!1)throw new Error("decimalSeparator cannot be the same as groupSeparator");var _e={decimalSeparator:ae,groupSeparator:je,disableGroupSeparators:P,intlConfig:S,prefix:_||Te.prefix,suffix:k},Le={decimalSeparator:ae,groupSeparator:je,allowDecimals:n,decimalsLimit:c||b||2,allowNegativeValue:i,disableAbbreviations:R,prefix:_||Te.prefix,transformRawValue:Ae},vt=m.useState(function(){return f!=null?mn(ce(ce({},_e),{decimalScale:w,value:String(f)})):g!=null?mn(ce(ce({},_e),{decimalScale:w,value:String(g)})):""}),Se=vt[0],oe=vt[1],me=m.useState(!1),$e=me[0],zt=me[1],Ht=m.useState(0),wr=Ht[0],T=Ht[1],O=m.useState(0),$=O[0],B=O[1],V=m.useState(null),M=V[0],Y=V[1],X=m.useRef(null);m.useImperativeHandle(t,function(){return X.current});var ge=function(ye,qe){zt(!0);var Re=R0({selectionStart:qe,value:ye,lastKeyStroke:M,stateValue:Se,groupSeparator:je}),We=Re.modifiedValue,Ve=Re.cursorPosition,Xe=os(ce({value:We},Le));if(!(d&&Xe.replace(/-/g,"").length>d)){if(Xe===""||Xe==="-"||Xe===ae){x&&x(void 0,a,{float:null,formatted:"",value:""}),oe(Xe),T(1);return}var Et=ae?Xe.replace(ae,"."):Xe,An=parseFloat(Et),Tr=mn(ce({value:Xe},_e));if(Ve!=null){var _r=Ve+(Tr.length-ye.length);_r=_r<=0?_?_.length:0:_r,T(_r),B($+1)}if(oe(Tr),x){var Ws={float:An,formatted:Tr,value:Xe};x(Xe,a,Ws)}}},pe=function(ye){var qe=ye.target,Re=qe.value,We=qe.selectionStart;ge(Re,We),z&&z(ye)},wt=function(ye){return G&&G(ye),Se?Se.length:0},Rr=function(ye){var qe=ye.target.value,Re=os(ce({value:qe},Le));if(Re==="-"||Re===ae||!Re){oe(""),K&&K(ye);return}var We=N0(Re,ae,b),Ve=M0(We,ae,w!==void 0?w:b),Xe=parseFloat(Ve.replace(ae,".")),Et=mn(ce(ce({},_e),{value:Ve}));x&&W&&x(Ve,a,{float:Xe,formatted:Et,value:Ve}),oe(Et),K&&K(ye)},er=function(ye){var qe=ye.key;if(Y(qe),C&&(qe==="ArrowUp"||qe==="ArrowDown")){ye.preventDefault(),T(Se.length);var Re=parseFloat(g!=null?String(g).replace(ae,"."):os(ce({value:Se},Le)))||0,We=qe==="ArrowUp"?Re+C:Re-C;if(A!==void 0&&We<Number(A)||N!==void 0&&We>Number(N))return;var Ve=String(C).includes(".")?Number(String(C).split(".")[1].length):void 0;ge(String(Ve?We.toFixed(Ve):We).replace(".",ae))}Z&&Z(ye)},qt=function(ye){var qe=ye.key,Re=ye.currentTarget.selectionStart;if(qe!=="ArrowUp"&&qe!=="ArrowDown"&&Se!=="-"){var We=Pu(Se,{groupSeparator:je,decimalSeparator:ae});if(We&&Re&&Re>Se.length-We.length&&X.current){var Ve=Se.length-We.length;X.current.setSelectionRange(Ve,Ve)}}re&&re(ye)};m.useEffect(function(){g==null&&f==null&&oe("")},[f,g]),m.useEffect(function(){$e&&Se!=="-"&&X.current&&document.activeElement===X.current&&X.current.setSelectionRange(wr,wr)},[Se,wr,X,$e,$]);var On=function(){return g!=null&&Se!=="-"&&(!ae||Se!==ae)?mn(ce(ce({},_e),{decimalScale:$e?void 0:w,value:String(g)})):Se},Er=ce({type:"text",inputMode:"decimal",id:s,name:a,className:l,onChange:pe,onBlur:Rr,onFocus:wt,onKeyDown:er,onKeyUp:qt,placeholder:v,disabled:p,value:On(),ref:X},xe);if(u){var Fn=u;return m.createElement(Fn,ce({},Er))}return m.createElement("input",ce({},Er))});yo.displayName="CurrencyInput";const ve=({label:e,name:t,register:r,errors:n,className:o,type:i="text",placeholder:s="",isFloating:a,setValue:l,value:u,trigger:c,prefix:f,disabled:h})=>{var d,g,x,b;const p=r?{...r(t)}:{};return i==="amount"?y.jsxs("div",{className:"space-y-1.5 relative",children:[y.jsx("label",{className:`block text-sm font-medium text-[#344054] font-onest ${a?"z-[40] absolute block text-[#667085] bg-white py-[2px] px-1 -top-[10px] left-3 ":"relative"}`,children:e}),y.jsx(yo,{onValueChange:v=>{l(t,v),r&&r(t),c&&c(t)},placeholder:s,className:`input-control ${n!=null&&n[t]?"border-red-300":"border-[#D0D5DD]"}`,decimalsLimit:2,value:u,prefix:f,disabled:h}),(n==null?void 0:n[t])&&y.jsx("p",{className:"mt-1 text-sm text-red-600",children:(d=n[t])==null?void 0:d.message})]}):["checkbox","radio"].includes(i)?y.jsxs("div",{children:[y.jsxs("label",{className:"flex items-center space-x-2",children:[y.jsx("input",{...p,type:i,className:"h-4 w-4 rounded border-gray-300",value:u,disabled:h}),y.jsx("span",{className:"text-sm font-medium text-[#344054] font-onest",children:e})]}),(n==null?void 0:n[t])&&y.jsx("p",{className:"ml-2 text-sm text-red-600",children:(g=n[t])==null?void 0:g.message})]}):i==="textarea"?y.jsxs("div",{className:"space-y-1.5 relative",children:[y.jsx("label",{className:`block text-sm font-medium text-[#344054] font-onest ${a?"z-[40] absolute block text-[#667085] bg-white py-[2px] px-1 -top-[10px] left-3 ":"relative"}`,children:e}),y.jsx("textarea",{...p,className:`input-control ${n!=null&&n[t]?"border-red-300":"border-[#D0D5DD]"} ${o}`,placeholder:s,disabled:h}),(n==null?void 0:n[t])&&y.jsx("p",{className:"mt-1 text-sm text-red-600",children:(x=n[t])==null?void 0:x.message})]}):y.jsxs("div",{className:"space-y-1.5 relative",children:[y.jsx("label",{className:`block text-sm font-medium text-[#344054] font-onest ${a?"z-[40] absolute block text-[#667085] bg-white py-[2px] px-1 -top-[10px] left-3":"relative"}`,children:e}),y.jsx("input",{...p,type:i,className:`input-control ${n!=null&&n[t]?"border-red-300":"border-[#D0D5DD]"} ${o}`,placeholder:a?"":s,disabled:h}),(n==null?void 0:n[t])&&y.jsx("p",{className:"mt-1 text-sm text-red-600",children:(b=n[t])==null?void 0:b.message})]})};function Du({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return y.jsx("div",{className:"flex flex-wrap gap-y-4 gap-x-6",children:e==null?void 0:e.options.map(n=>y.jsx("div",{children:y.jsx(ve,{placeholder:e.placeholder,type:e.inputType,label:n==null?void 0:n.label,register:r,name:e.id,value:n.value})},n.id))})}function Iu({element:e,state:t}){return y.jsx("div",{children:"SectionInput"})}function Mu({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return y.jsx("div",{className:"flex flex-wrap gap-y-4 gap-x-6",children:e==null?void 0:e.options.map(n=>y.jsx("div",{children:y.jsx(ve,{placeholder:e.placeholder,type:e.inputType,label:n==null?void 0:n.label,register:r,name:e.id,value:n.value})},n.id))})}const is=({className:e="",options:t,placeholder:r="Select",errors:n,register:o,setValue:i,name:s,label:a,value:l,trigger:u,isMultiple:c,isFloatingLabel:f,subText:h,labelClass:p="text-[10px]",loading:d})=>{const[g,x]=m.useState(c?[]:null),b=ut("input-control",e);return m.useEffect(()=>{g&&i&&o&&(i(s,g==null?void 0:g.value),o&&o(s),u&&u(s))},[s,o,g,i,u]),m.useEffect(()=>{const v=t==null?void 0:t.find(w=>typeof w.value=="string"&&typeof l=="string"?w.value.toLowerCase()===l.toLowerCase():typeof w.value=="object"&&typeof l=="object"?w.value.id===(l==null?void 0:l.id):w.value===l);x(v||null)},[l,t]),y.jsxs("div",{className:"relative",children:[!f&&a&&y.jsx("label",{className:"block text-sm text-[#686878] darks:!text-white/70 mb-2",children:a}),f&&y.jsx("label",{className:`z-[40] absolute block text-[#667085] bg-white py-[2px] px-1 -top-[10px] left-3 ${p}`,children:a}),y.jsx(Xt,{value:g,onChange:x,multiple:c,children:y.jsxs("div",{className:"relative",children:[y.jsxs(Xt.Button,{className:b,children:[d?y.jsx("span",{className:" block opacity-60 text-sm text-left",children:"Fetching data ..."}):y.jsx("span",{className:"block truncate text-sm text-left",children:(g==null?void 0:g.label)||y.jsx("span",{className:"opacity-60",children:r})}),y.jsx("span",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2",children:y.jsx(Be,{icon:"lucide:chevron-down"})})]}),y.jsx(_u,{as:m.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:y.jsx(Xt.Options,{className:"z-[77] absolute mt-1 max-h-60 w-full overflow-auto rounded-md bg-white darks:bg-gray-800 text-gray-900 darks:text-white/80 py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm",children:t==null?void 0:t.map((v,w)=>y.jsx(Xt.Option,{className:({active:_})=>`relative cursor-default select-none py-2 pl-4 pr-4 text-sm ${_?"bg-gray-100 darks:bg-gray-700 text-gray-900 darks:text-white/80":"text-gray-900 darks:text-white/70 "}`,value:v,children:({selected:_})=>y.jsx("div",{className:`block truncate text-sm ${_?"font-medium":"font-normal"}`,children:v.label})},w))})})]})}),!n&&h&&y.jsx("p",{className:"text-[10px] text-[#98A2B3] leading-normal mt-[6px]",children:h}),n&&y.jsx("span",{className:"text-sm text-red-500",children:n.message})]})};function Ru({element:e,validationData:t}){const{register:r=()=>({}),trigger:n,setValue:o,watch:i}=t||{};let s;return i&&(s=i()[e.id]),m.useEffect(()=>{r(e.id)},[e.id,r]),y.jsx("div",{children:y.jsx(is,{options:(e==null?void 0:e.options)??[],register:r,name:e.id,setValue:o,trigger:n,value:s})})}function Vu({element:e,validationData:t}){const{register:r=()=>({})}=t||{};return y.jsx("textarea",{placeholder:e.placeholder,rows:4,className:"input-control resize-none",...r(e.id)})}var hn=e=>e.type==="checkbox",mr=e=>e instanceof Date,Ye=e=>e==null;const Bu=e=>typeof e=="object";var we=e=>!Ye(e)&&!Array.isArray(e)&&Bu(e)&&!mr(e),V0=e=>we(e)&&e.target?hn(e.target)?e.target.checked:e.target.value:e,B0=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,U0=(e,t)=>e.has(B0(t)),z0=e=>{const t=e.constructor&&e.constructor.prototype;return we(t)&&t.hasOwnProperty("isPrototypeOf")},ss=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Me(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(ss&&(e instanceof Blob||n))&&(r||we(e)))if(t=r?[]:{},!r&&!z0(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=Me(e[o]));else return e;return t}var gn=e=>Array.isArray(e)?e.filter(Boolean):[],de=e=>e===void 0,U=(e,t,r)=>{if(!t||!we(e))return r;const n=gn(t.split(/[,[\].]+?/)).reduce((o,i)=>Ye(o)?o:o[i],e);return de(n)||n===e?de(e[t])?r:e[t]:n},Ot=e=>typeof e=="boolean",as=e=>/^\w*$/.test(e),Uu=e=>gn(e.replace(/["|']|\]/g,"").split(/\.|\[/)),se=(e,t,r)=>{let n=-1;const o=as(t)?[t]:Uu(t),i=o.length,s=i-1;for(;++n<i;){const a=o[n];let l=r;if(n!==s){const u=e[a];l=we(u)||Array.isArray(u)?u:isNaN(+o[n+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;e[a]=l,e=e[a]}return e};const zu={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},dt={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Vt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Hu=m.createContext(null),H0=()=>m.useContext(Hu),q0=e=>{const{children:t,...r}=e;return m.createElement(Hu.Provider,{value:r},t)};var W0=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const s=i;return t._proxyFormState[s]!==dt.all&&(t._proxyFormState[s]=!n||dt.all),e[s]}});return o},Je=e=>we(e)&&!Object.keys(e).length,K0=(e,t,r,n)=>{r(e);const{name:o,...i}=e;return Je(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(s=>t[s]===dt.all)},at=e=>Array.isArray(e)?e:[e];function qu(e){const t=m.useRef(e);t.current=e,m.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}var Ft=e=>typeof e=="string",Y0=(e,t,r,n,o)=>Ft(e)?(n&&t.watch.add(e),U(r,e,o)):Array.isArray(e)?e.map(i=>(n&&t.watch.add(i),U(r,i))):(n&&(t.watchAll=!0),r),Wu=(e,t,r,n,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:o||!0}}:{},Gt=()=>{const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=(Math.random()*16+e)%16|0;return(t=="x"?r:r&3|8).toString(16)})},ls=(e,t,r={})=>r.shouldFocus||de(r.shouldFocus)?r.focusName||`${e}.${de(r.focusIndex)?t:r.focusIndex}.`:"",yn=e=>({isOnSubmit:!e||e===dt.onSubmit,isOnBlur:e===dt.onBlur,isOnChange:e===dt.onChange,isOnAll:e===dt.all,isOnTouch:e===dt.onTouched}),us=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Nr=(e,t,r,n)=>{for(const o of r||Object.keys(e)){const i=U(e,o);if(i){const{_f:s,...a}=i;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],o)&&!n)return!0;if(s.ref&&t(s.ref,s.name)&&!n)return!0;if(Nr(a,t))break}else if(we(a)&&Nr(a,t))break}}};var Ku=(e,t,r)=>{const n=at(U(e,r));return se(n,"root",t[r]),se(e,r,n),e},cs=e=>e.type==="file",At=e=>typeof e=="function",bo=e=>{if(!ss)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},xo=e=>Ft(e),fs=e=>e.type==="radio",vo=e=>e instanceof RegExp;const Yu={value:!1,isValid:!1},Ju={value:!0,isValid:!0};var Xu=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!de(e[0].attributes.value)?de(e[0].value)||e[0].value===""?Ju:{value:e[0].value,isValid:!0}:Ju:Yu}return Yu};const Gu={isValid:!1,value:null};var Qu=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Gu):Gu;function Zu(e,t,r="validate"){if(xo(e)||Array.isArray(e)&&e.every(xo)||Ot(e)&&!e)return{type:r,message:xo(e)?e:"",ref:t}}var Pr=e=>we(e)&&!vo(e)?e:{value:e,message:""},ds=async(e,t,r,n,o)=>{const{ref:i,refs:s,required:a,maxLength:l,minLength:u,min:c,max:f,pattern:h,validate:p,name:d,valueAsNumber:g,mount:x,disabled:b}=e._f,v=U(t,d);if(!x||b)return{};const w=s?s[0]:i,_=I=>{n&&w.reportValidity&&(w.setCustomValidity(Ot(I)?"":I||""),w.reportValidity())},k={},S=fs(i),C=hn(i),A=S||C,N=(g||cs(i))&&de(i.value)&&de(v)||bo(i)&&i.value===""||v===""||Array.isArray(v)&&!v.length,L=Wu.bind(null,d,r,k),P=(I,R,q,J=Vt.maxLength,z=Vt.minLength)=>{const G=I?R:q;k[d]={type:I?J:z,message:G,ref:i,...L(I?J:z,G)}};if(o?!Array.isArray(v)||!v.length:a&&(!A&&(N||Ye(v))||Ot(v)&&!v||C&&!Xu(s).isValid||S&&!Qu(s).isValid)){const{value:I,message:R}=xo(a)?{value:!!a,message:a}:Pr(a);if(I&&(k[d]={type:Vt.required,message:R,ref:w,...L(Vt.required,R)},!r))return _(R),k}if(!N&&(!Ye(c)||!Ye(f))){let I,R;const q=Pr(f),J=Pr(c);if(!Ye(v)&&!isNaN(v)){const z=i.valueAsNumber||v&&+v;Ye(q.value)||(I=z>q.value),Ye(J.value)||(R=z<J.value)}else{const z=i.valueAsDate||new Date(v),G=re=>new Date(new Date().toDateString()+" "+re),K=i.type=="time",Z=i.type=="week";Ft(q.value)&&v&&(I=K?G(v)>G(q.value):Z?v>q.value:z>new Date(q.value)),Ft(J.value)&&v&&(R=K?G(v)<G(J.value):Z?v<J.value:z<new Date(J.value))}if((I||R)&&(P(!!I,q.message,J.message,Vt.max,Vt.min),!r))return _(k[d].message),k}if((l||u)&&!N&&(Ft(v)||o&&Array.isArray(v))){const I=Pr(l),R=Pr(u),q=!Ye(I.value)&&v.length>+I.value,J=!Ye(R.value)&&v.length<+R.value;if((q||J)&&(P(q,I.message,R.message),!r))return _(k[d].message),k}if(h&&!N&&Ft(v)){const{value:I,message:R}=Pr(h);if(vo(I)&&!v.match(I)&&(k[d]={type:Vt.pattern,message:R,ref:i,...L(Vt.pattern,R)},!r))return _(R),k}if(p){if(At(p)){const I=await p(v,t),R=Zu(I,w);if(R&&(k[d]={...R,...L(Vt.validate,R.message)},!r))return _(R.message),k}else if(we(p)){let I={};for(const R in p){if(!Je(I)&&!r)break;const q=Zu(await p[R](v,t),w,R);q&&(I={...q,...L(R,q.message)},_(q.message),r&&(k[d]=I))}if(!Je(I)&&(k[d]={ref:w,...I},!r))return k}}return _(!0),k},ps=(e,t)=>[...e,...at(t)],ms=e=>Array.isArray(e)?e.map(()=>{}):void 0;function hs(e,t,r){return[...e.slice(0,t),...at(r),...e.slice(t)]}var gs=(e,t,r)=>Array.isArray(e)?(de(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],ys=(e,t)=>[...at(t),...at(e)];function J0(e,t){let r=0;const n=[...e];for(const o of t)n.splice(o-r,1),r++;return gn(n).length?n:[]}var bs=(e,t)=>de(t)?[]:J0(e,at(t).sort((r,n)=>r-n)),xs=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]};function X0(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=de(e)?n++:e[t[n++]];return e}function G0(e){for(const t in e)if(e.hasOwnProperty(t)&&!de(e[t]))return!1;return!0}function Ce(e,t){const r=Array.isArray(t)?t:as(t)?[t]:Uu(t),n=r.length===1?e:X0(e,r),o=r.length-1,i=r[o];return n&&delete n[i],o!==0&&(we(n)&&Je(n)||Array.isArray(n)&&G0(n))&&Ce(e,r.slice(0,-1)),e}var ec=(e,t,r)=>(e[t]=r,e);function Q0(e){const t=H0(),{control:r=t.control,name:n,keyName:o="id",shouldUnregister:i,rules:s}=e,[a,l]=m.useState(r._getFieldArray(n)),u=m.useRef(r._getFieldArray(n).map(Gt)),c=m.useRef(a),f=m.useRef(n),h=m.useRef(!1);f.current=n,c.current=a,r._names.array.add(n),s&&r.register(n,s),qu({next:({values:S,name:C})=>{if(C===f.current||!C){const A=U(S,f.current);Array.isArray(A)&&(l(A),u.current=A.map(Gt))}},subject:r._subjects.array});const p=m.useCallback(S=>{h.current=!0,r._updateFieldArray(n,S)},[r,n]),d=(S,C)=>{const A=at(Me(S)),N=ps(r._getFieldArray(n),A);r._names.focus=ls(n,N.length-1,C),u.current=ps(u.current,A.map(Gt)),p(N),l(N),r._updateFieldArray(n,N,ps,{argA:ms(S)})},g=(S,C)=>{const A=at(Me(S)),N=ys(r._getFieldArray(n),A);r._names.focus=ls(n,0,C),u.current=ys(u.current,A.map(Gt)),p(N),l(N),r._updateFieldArray(n,N,ys,{argA:ms(S)})},x=S=>{const C=bs(r._getFieldArray(n),S);u.current=bs(u.current,S),p(C),l(C),!Array.isArray(U(r._fields,n))&&se(r._fields,n,void 0),r._updateFieldArray(n,C,bs,{argA:S})},b=(S,C,A)=>{const N=at(Me(C)),L=hs(r._getFieldArray(n),S,N);r._names.focus=ls(n,S,A),u.current=hs(u.current,S,N.map(Gt)),p(L),l(L),r._updateFieldArray(n,L,hs,{argA:S,argB:ms(C)})},v=(S,C)=>{const A=r._getFieldArray(n);xs(A,S,C),xs(u.current,S,C),p(A),l(A),r._updateFieldArray(n,A,xs,{argA:S,argB:C},!1)},w=(S,C)=>{const A=r._getFieldArray(n);gs(A,S,C),gs(u.current,S,C),p(A),l(A),r._updateFieldArray(n,A,gs,{argA:S,argB:C},!1)},_=(S,C)=>{const A=Me(C),N=ec(r._getFieldArray(n),S,A);u.current=[...N].map((L,P)=>!L||P===S?Gt():u.current[P]),p(N),l([...N]),r._updateFieldArray(n,N,ec,{argA:S,argB:A},!0,!1)},k=S=>{const C=at(Me(S));u.current=C.map(Gt),p([...C]),l([...C]),r._updateFieldArray(n,[...C],A=>A,{},!0,!1)};return m.useEffect(()=>{if(r._state.action=!1,us(n,r._names)&&r._subjects.state.next({...r._formState}),h.current&&(!yn(r._options.mode).isOnSubmit||r._formState.isSubmitted))if(r._options.resolver)r._executeSchema([n]).then(S=>{const C=U(S.errors,n),A=U(r._formState.errors,n);(A?!C&&A.type||C&&(A.type!==C.type||A.message!==C.message):C&&C.type)&&(C?se(r._formState.errors,n,C):Ce(r._formState.errors,n),r._subjects.state.next({errors:r._formState.errors}))});else{const S=U(r._fields,n);S&&S._f&&!(yn(r._options.reValidateMode).isOnSubmit&&yn(r._options.mode).isOnSubmit)&&ds(S,r._formValues,r._options.criteriaMode===dt.all,r._options.shouldUseNativeValidation,!0).then(C=>!Je(C)&&r._subjects.state.next({errors:Ku(r._formState.errors,C,n)}))}r._subjects.values.next({name:n,values:{...r._formValues}}),r._names.focus&&Nr(r._fields,(S,C)=>{if(r._names.focus&&C.startsWith(r._names.focus)&&S.focus)return S.focus(),1}),r._names.focus="",r._updateValid(),h.current=!1},[a,n,r]),m.useEffect(()=>(!U(r._formValues,n)&&r._updateFieldArray(n),()=>{(r._options.shouldUnregister||i)&&r.unregister(n)}),[n,r,o,i]),{swap:m.useCallback(v,[p,n,r]),move:m.useCallback(w,[p,n,r]),prepend:m.useCallback(g,[p,n,r]),append:m.useCallback(d,[p,n,r]),remove:m.useCallback(x,[p,n,r]),insert:m.useCallback(b,[p,n,r]),update:m.useCallback(_,[p,n,r]),replace:m.useCallback(k,[p,n,r]),fields:m.useMemo(()=>a.map((S,C)=>({...S,[o]:u.current[C]||Gt()})),[a,o])}}var vs=()=>{let e=[];return{get observers(){return e},next:o=>{for(const i of e)i.next&&i.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(i=>i!==o)}}),unsubscribe:()=>{e=[]}}},ws=e=>Ye(e)||!Bu(e);function Qt(e,t){if(ws(e)||ws(t))return e===t;if(mr(e)&&mr(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const o of r){const i=e[o];if(!n.includes(o))return!1;if(o!=="ref"){const s=t[o];if(mr(i)&&mr(s)||we(i)&&we(s)||Array.isArray(i)&&Array.isArray(s)?!Qt(i,s):i!==s)return!1}}return!0}var tc=e=>e.type==="select-multiple",Z0=e=>fs(e)||hn(e),Es=e=>bo(e)&&e.isConnected,rc=e=>{for(const t in e)if(At(e[t]))return!0;return!1};function wo(e,t={}){const r=Array.isArray(e);if(we(e)||r)for(const n in e)Array.isArray(e[n])||we(e[n])&&!rc(e[n])?(t[n]=Array.isArray(e[n])?[]:{},wo(e[n],t[n])):Ye(e[n])||(t[n]=!0);return t}function nc(e,t,r){const n=Array.isArray(e);if(we(e)||n)for(const o in e)Array.isArray(e[o])||we(e[o])&&!rc(e[o])?de(t)||ws(r[o])?r[o]=Array.isArray(e[o])?wo(e[o],[]):{...wo(e[o])}:nc(e[o],Ye(t)?{}:t[o],r[o]):r[o]=!Qt(e[o],t[o]);return r}var bn=(e,t)=>nc(e,t,wo(t)),oc=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>de(e)?e:t?e===""?NaN:e&&+e:r&&Ft(e)?new Date(e):n?n(e):e;function Ts(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return cs(t)?t.files:fs(t)?Qu(e.refs).value:tc(t)?[...t.selectedOptions].map(({value:r})=>r):hn(t)?Xu(e.refs).value:oc(de(t.value)?e.ref.value:t.value,e)}var eb=(e,t,r,n)=>{const o={};for(const i of e){const s=U(t,i);s&&se(o,i,s._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:n}},xn=e=>de(e)?e:vo(e)?e.source:we(e)?vo(e.value)?e.value.source:e.value:e;const ic="AsyncFunction";var tb=e=>!!e&&!!e.validate&&!!(At(e.validate)&&e.validate.constructor.name===ic||we(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===ic)),rb=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function sc(e,t,r){const n=U(e,r);if(n||as(r))return{error:n,name:r};const o=r.split(".");for(;o.length;){const i=o.join("."),s=U(t,i),a=U(e,i);if(s&&!Array.isArray(s)&&r!==i)return{name:r};if(a&&a.type)return{name:i,error:a};o.pop()}return{name:r}}var nb=(e,t,r,n,o)=>o.isOnAll?!1:!r&&o.isOnTouch?!(t||e):(r?n.isOnBlur:o.isOnBlur)?!e:(r?n.isOnChange:o.isOnChange)?e:!0,ob=(e,t)=>!gn(U(e,t)).length&&Ce(e,t);const ib={mode:dt.onSubmit,reValidateMode:dt.onChange,shouldFocusError:!0};function sb(e={}){let t={...ib,...e},r={submitCount:0,isDirty:!1,isLoading:At(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},o=we(t.defaultValues)||we(t.values)?Me(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:Me(o),s={action:!1,mount:!1,watch:!1},a={mount:new Set,unMount:new Set,array:new Set,watch:new Set},l,u=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:vs(),array:vs(),state:vs()},h=yn(t.mode),p=yn(t.reValidateMode),d=t.criteriaMode===dt.all,g=T=>O=>{clearTimeout(u),u=setTimeout(T,O)},x=async T=>{if(!t.disabled&&(c.isValid||T)){const O=t.resolver?Je((await A()).errors):await L(n,!0);O!==r.isValid&&f.state.next({isValid:O})}},b=(T,O)=>{!t.disabled&&(c.isValidating||c.validatingFields)&&((T||Array.from(a.mount)).forEach($=>{$&&(O?se(r.validatingFields,$,O):Ce(r.validatingFields,$))}),f.state.next({validatingFields:r.validatingFields,isValidating:!Je(r.validatingFields)}))},v=(T,O=[],$,B,V=!0,M=!0)=>{if(B&&$&&!t.disabled){if(s.action=!0,M&&Array.isArray(U(n,T))){const Y=$(U(n,T),B.argA,B.argB);V&&se(n,T,Y)}if(M&&Array.isArray(U(r.errors,T))){const Y=$(U(r.errors,T),B.argA,B.argB);V&&se(r.errors,T,Y),ob(r.errors,T)}if(c.touchedFields&&M&&Array.isArray(U(r.touchedFields,T))){const Y=$(U(r.touchedFields,T),B.argA,B.argB);V&&se(r.touchedFields,T,Y)}c.dirtyFields&&(r.dirtyFields=bn(o,i)),f.state.next({name:T,isDirty:I(T,O),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else se(i,T,O)},w=(T,O)=>{se(r.errors,T,O),f.state.next({errors:r.errors})},_=T=>{r.errors=T,f.state.next({errors:r.errors,isValid:!1})},k=(T,O,$,B)=>{const V=U(n,T);if(V){const M=U(i,T,de($)?U(o,T):$);de(M)||B&&B.defaultChecked||O?se(i,T,O?M:Ts(V._f)):J(T,M),s.mount&&x()}},S=(T,O,$,B,V)=>{let M=!1,Y=!1;const X={name:T};if(!t.disabled){const ge=!!(U(n,T)&&U(n,T)._f&&U(n,T)._f.disabled);if(!$||B){c.isDirty&&(Y=r.isDirty,r.isDirty=X.isDirty=I(),M=Y!==X.isDirty);const pe=ge||Qt(U(o,T),O);Y=!!(!ge&&U(r.dirtyFields,T)),pe||ge?Ce(r.dirtyFields,T):se(r.dirtyFields,T,!0),X.dirtyFields=r.dirtyFields,M=M||c.dirtyFields&&Y!==!pe}if($){const pe=U(r.touchedFields,T);pe||(se(r.touchedFields,T,$),X.touchedFields=r.touchedFields,M=M||c.touchedFields&&pe!==$)}M&&V&&f.state.next(X)}return M?X:{}},C=(T,O,$,B)=>{const V=U(r.errors,T),M=c.isValid&&Ot(O)&&r.isValid!==O;if(t.delayError&&$?(l=g(()=>w(T,$)),l(t.delayError)):(clearTimeout(u),l=null,$?se(r.errors,T,$):Ce(r.errors,T)),($?!Qt(V,$):V)||!Je(B)||M){const Y={...B,...M&&Ot(O)?{isValid:O}:{},errors:r.errors,name:T};r={...r,...Y},f.state.next(Y)}},A=async T=>{b(T,!0);const O=await t.resolver(i,t.context,eb(T||a.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return b(T),O},N=async T=>{const{errors:O}=await A(T);if(T)for(const $ of T){const B=U(O,$);B?se(r.errors,$,B):Ce(r.errors,$)}else r.errors=O;return O},L=async(T,O,$={valid:!0})=>{for(const B in T){const V=T[B];if(V){const{_f:M,...Y}=V;if(M){const X=a.array.has(M.name),ge=V._f&&tb(V._f);ge&&c.validatingFields&&b([B],!0);const pe=await ds(V,i,d,t.shouldUseNativeValidation&&!O,X);if(ge&&c.validatingFields&&b([B]),pe[M.name]&&($.valid=!1,O))break;!O&&(U(pe,M.name)?X?Ku(r.errors,pe,M.name):se(r.errors,M.name,pe[M.name]):Ce(r.errors,M.name))}!Je(Y)&&await L(Y,O,$)}}return $.valid},P=()=>{for(const T of a.unMount){const O=U(n,T);O&&(O._f.refs?O._f.refs.every($=>!Es($)):!Es(O._f.ref))&&ae(T)}a.unMount=new Set},I=(T,O)=>!t.disabled&&(T&&O&&se(i,T,O),!Qt(Ae(),o)),R=(T,O,$)=>Y0(T,a,{...s.mount?i:de(O)?o:Ft(T)?{[T]:O}:O},$,O),q=T=>gn(U(s.mount?i:o,T,t.shouldUnregister?U(o,T,[]):[])),J=(T,O,$={})=>{const B=U(n,T);let V=O;if(B){const M=B._f;M&&(!M.disabled&&se(i,T,oc(O,M)),V=bo(M.ref)&&Ye(O)?"":O,tc(M.ref)?[...M.ref.options].forEach(Y=>Y.selected=V.includes(Y.value)):M.refs?hn(M.ref)?M.refs.length>1?M.refs.forEach(Y=>(!Y.defaultChecked||!Y.disabled)&&(Y.checked=Array.isArray(V)?!!V.find(X=>X===Y.value):V===Y.value)):M.refs[0]&&(M.refs[0].checked=!!V):M.refs.forEach(Y=>Y.checked=Y.value===V):cs(M.ref)?M.ref.value="":(M.ref.value=V,M.ref.type||f.values.next({name:T,values:{...i}})))}($.shouldDirty||$.shouldTouch)&&S(T,V,$.shouldTouch,$.shouldDirty,!0),$.shouldValidate&&re(T)},z=(T,O,$)=>{for(const B in O){const V=O[B],M=`${T}.${B}`,Y=U(n,M);(a.array.has(T)||we(V)||Y&&!Y._f)&&!mr(V)?z(M,V,$):J(M,V,$)}},G=(T,O,$={})=>{const B=U(n,T),V=a.array.has(T),M=Me(O);se(i,T,M),V?(f.array.next({name:T,values:{...i}}),(c.isDirty||c.dirtyFields)&&$.shouldDirty&&f.state.next({name:T,dirtyFields:bn(o,i),isDirty:I(T,M)})):B&&!B._f&&!Ye(M)?z(T,M,$):J(T,M,$),us(T,a)&&f.state.next({...r}),f.values.next({name:s.mount?T:void 0,values:{...i}})},K=async T=>{s.mount=!0;const O=T.target;let $=O.name,B=!0;const V=U(n,$),M=()=>O.type?Ts(V._f):V0(T),Y=X=>{B=Number.isNaN(X)||mr(X)&&isNaN(X.getTime())||Qt(X,U(i,$,X))};if(V){let X,ge;const pe=M(),wt=T.type===zu.BLUR||T.type===zu.FOCUS_OUT,Rr=!rb(V._f)&&!t.resolver&&!U(r.errors,$)&&!V._f.deps||nb(wt,U(r.touchedFields,$),r.isSubmitted,p,h),er=us($,a,wt);se(i,$,pe),wt?(V._f.onBlur&&V._f.onBlur(T),l&&l(0)):V._f.onChange&&V._f.onChange(T);const qt=S($,pe,wt,!1),On=!Je(qt)||er;if(!wt&&f.values.next({name:$,type:T.type,values:{...i}}),Rr)return c.isValid&&(t.mode==="onBlur"?wt&&x():x()),On&&f.state.next({name:$,...er?{}:qt});if(!wt&&er&&f.state.next({...r}),t.resolver){const{errors:Er}=await A([$]);if(Y(pe),B){const Fn=sc(r.errors,n,$),ye=sc(Er,n,Fn.name||$);X=ye.error,$=ye.name,ge=Je(Er)}}else b([$],!0),X=(await ds(V,i,d,t.shouldUseNativeValidation))[$],b([$]),Y(pe),B&&(X?ge=!1:c.isValid&&(ge=await L(n,!0)));B&&(V._f.deps&&re(V._f.deps),C($,ge,X,qt))}},Z=(T,O)=>{if(U(r.errors,O)&&T.focus)return T.focus(),1},re=async(T,O={})=>{let $,B;const V=at(T);if(t.resolver){const M=await N(de(T)?T:V);$=Je(M),B=T?!V.some(Y=>U(M,Y)):$}else T?(B=(await Promise.all(V.map(async M=>{const Y=U(n,M);return await L(Y&&Y._f?{[M]:Y}:Y)}))).every(Boolean),!(!B&&!r.isValid)&&x()):B=$=await L(n);return f.state.next({...!Ft(T)||c.isValid&&$!==r.isValid?{}:{name:T},...t.resolver||!T?{isValid:$}:{},errors:r.errors}),O.shouldFocus&&!B&&Nr(n,Z,T?V:a.mount),B},Ae=T=>{const O={...s.mount?i:o};return de(T)?O:Ft(T)?U(O,T):T.map($=>U(O,$))},Pe=(T,O)=>({invalid:!!U((O||r).errors,T),isDirty:!!U((O||r).dirtyFields,T),error:U((O||r).errors,T),isValidating:!!U(r.validatingFields,T),isTouched:!!U((O||r).touchedFields,T)}),W=T=>{T&&at(T).forEach(O=>Ce(r.errors,O)),f.state.next({errors:T?r.errors:{}})},xe=(T,O,$)=>{const B=(U(n,T,{_f:{}})._f||{}).ref,V=U(r.errors,T)||{},{ref:M,message:Y,type:X,...ge}=V;se(r.errors,T,{...ge,...O,ref:B}),f.state.next({name:T,errors:r.errors,isValid:!1}),$&&$.shouldFocus&&B&&B.focus&&B.focus()},Te=(T,O)=>At(T)?f.values.subscribe({next:$=>T(R(void 0,O),$)}):R(T,O,!0),ae=(T,O={})=>{for(const $ of T?at(T):a.mount)a.mount.delete($),a.array.delete($),O.keepValue||(Ce(n,$),Ce(i,$)),!O.keepError&&Ce(r.errors,$),!O.keepDirty&&Ce(r.dirtyFields,$),!O.keepTouched&&Ce(r.touchedFields,$),!O.keepIsValidating&&Ce(r.validatingFields,$),!t.shouldUnregister&&!O.keepDefaultValue&&Ce(o,$);f.values.next({values:{...i}}),f.state.next({...r,...O.keepDirty?{isDirty:I()}:{}}),!O.keepIsValid&&x()},je=({disabled:T,name:O,field:$,fields:B,value:V})=>{if(Ot(T)&&s.mount||T){const M=T?void 0:de(V)?Ts($?$._f:U(B,O)._f):V;(T||!T&&!de(M))&&se(i,O,M),S(O,M,!1,!1,!0)}},_e=(T,O={})=>{let $=U(n,T);const B=Ot(O.disabled)||Ot(t.disabled);return se(n,T,{...$||{},_f:{...$&&$._f?$._f:{ref:{name:T}},name:T,mount:!0,...O}}),a.mount.add(T),$?je({field:$,disabled:Ot(O.disabled)?O.disabled:t.disabled,name:T,value:O.value}):k(T,!0,O.value),{...B?{disabled:O.disabled||t.disabled}:{},...t.progressive?{required:!!O.required,min:xn(O.min),max:xn(O.max),minLength:xn(O.minLength),maxLength:xn(O.maxLength),pattern:xn(O.pattern)}:{},name:T,onChange:K,onBlur:K,ref:V=>{if(V){_e(T,O),$=U(n,T);const M=de(V.value)&&V.querySelectorAll&&V.querySelectorAll("input,select,textarea")[0]||V,Y=Z0(M),X=$._f.refs||[];if(Y?X.find(ge=>ge===M):M===$._f.ref)return;se(n,T,{_f:{...$._f,...Y?{refs:[...X.filter(Es),M,...Array.isArray(U(o,T))?[{}]:[]],ref:{type:M.type,name:T}}:{ref:M}}}),k(T,!1,void 0,M)}else $=U(n,T,{}),$._f&&($._f.mount=!1),(t.shouldUnregister||O.shouldUnregister)&&!(U0(a.array,T)&&s.action)&&a.unMount.add(T)}}},Le=()=>t.shouldFocusError&&Nr(n,Z,a.mount),vt=T=>{Ot(T)&&(f.state.next({disabled:T}),Nr(n,(O,$)=>{const B=U(n,$);B&&(O.disabled=B._f.disabled||T,Array.isArray(B._f.refs)&&B._f.refs.forEach(V=>{V.disabled=B._f.disabled||T}))},0,!1))},Se=(T,O)=>async $=>{let B;if($&&($.preventDefault&&$.preventDefault(),$.persist&&$.persist()),t.disabled){O&&await O({...r.errors},$);return}let V=Me(i);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:M,values:Y}=await A();r.errors=M,V=Y}else await L(n);if(Ce(r.errors,"root"),Je(r.errors)){f.state.next({errors:{}});try{await T(V,$)}catch(M){B=M}}else O&&await O({...r.errors},$),Le(),setTimeout(Le);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Je(r.errors)&&!B,submitCount:r.submitCount+1,errors:r.errors}),B)throw B},oe=(T,O={})=>{U(n,T)&&(de(O.defaultValue)?G(T,Me(U(o,T))):(G(T,O.defaultValue),se(o,T,Me(O.defaultValue))),O.keepTouched||Ce(r.touchedFields,T),O.keepDirty||(Ce(r.dirtyFields,T),r.isDirty=O.defaultValue?I(T,Me(U(o,T))):I()),O.keepError||(Ce(r.errors,T),c.isValid&&x()),f.state.next({...r}))},me=(T,O={})=>{const $=T?Me(T):o,B=Me($),V=Je(T),M=V?o:B;if(O.keepDefaultValues||(o=$),!O.keepValues){if(O.keepDirtyValues){const Y=new Set([...a.mount,...Object.keys(bn(o,i))]);for(const X of Array.from(Y))U(r.dirtyFields,X)?se(M,X,U(i,X)):G(X,U(M,X))}else{if(ss&&de(T))for(const Y of a.mount){const X=U(n,Y);if(X&&X._f){const ge=Array.isArray(X._f.refs)?X._f.refs[0]:X._f.ref;if(bo(ge)){const pe=ge.closest("form");if(pe){pe.reset();break}}}}n={}}i=t.shouldUnregister?O.keepDefaultValues?Me(o):{}:Me(M),f.array.next({values:{...M}}),f.values.next({values:{...M}})}a={mount:O.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!c.isValid||!!O.keepIsValid||!!O.keepDirtyValues,s.watch=!!t.shouldUnregister,f.state.next({submitCount:O.keepSubmitCount?r.submitCount:0,isDirty:V?!1:O.keepDirty?r.isDirty:!!(O.keepDefaultValues&&!Qt(T,o)),isSubmitted:O.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:V?{}:O.keepDirtyValues?O.keepDefaultValues&&i?bn(o,i):r.dirtyFields:O.keepDefaultValues&&T?bn(o,T):O.keepDirty?r.dirtyFields:{},touchedFields:O.keepTouched?r.touchedFields:{},errors:O.keepErrors?r.errors:{},isSubmitSuccessful:O.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},$e=(T,O)=>me(At(T)?T(i):T,O);return{control:{register:_e,unregister:ae,getFieldState:Pe,handleSubmit:Se,setError:xe,_executeSchema:A,_getWatch:R,_getDirty:I,_updateValid:x,_removeUnmounted:P,_updateFieldArray:v,_updateDisabledField:je,_getFieldArray:q,_reset:me,_resetDefaultValues:()=>At(t.defaultValues)&&t.defaultValues().then(T=>{$e(T,t.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:T=>{r={...r,...T}},_disableForm:vt,_subjects:f,_proxyFormState:c,_setErrors:_,get _fields(){return n},get _formValues(){return i},get _state(){return s},set _state(T){s=T},get _defaultValues(){return o},get _names(){return a},set _names(T){a=T},get _formState(){return r},set _formState(T){r=T},get _options(){return t},set _options(T){t={...t,...T}}},trigger:re,register:_e,handleSubmit:Se,watch:Te,setValue:G,getValues:Ae,reset:$e,resetField:oe,clearErrors:W,unregister:ae,setError:xe,setFocus:(T,O={})=>{const $=U(n,T),B=$&&$._f;if(B){const V=B.refs?B.refs[0]:B.ref;V.focus&&(V.focus(),O.shouldSelect&&At(V.select)&&V.select())}},getFieldState:Pe}}function _s(e={}){const t=m.useRef(),r=m.useRef(),[n,o]=m.useState({isDirty:!1,isValidating:!1,isLoading:At(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:At(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...sb(e),formState:n});const i=t.current.control;return i._options=e,qu({subject:i._subjects.state,next:s=>{K0(s,i._proxyFormState,i._updateFormState)&&o({...i._formState})}}),m.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),m.useEffect(()=>{if(i._proxyFormState.isDirty){const s=i._getDirty();s!==n.isDirty&&i._subjects.state.next({isDirty:s})}},[i,n.isDirty]),m.useEffect(()=>{e.values&&!Qt(e.values,r.current)?(i._reset(e.values,i._options.resetOptions),r.current=e.values,o(s=>({...s}))):i._resetDefaultValues()},[e.values,i]),m.useEffect(()=>{e.errors&&i._setErrors(e.errors)},[e.errors,i]),m.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),m.useEffect(()=>{e.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})},[e.shouldUnregister,i]),m.useMemo(()=>({...t.current,formState:W0(n,i)}),[n,i])}const ac=(e,t,r)=>{if(e&&"reportValidity"in e){const n=U(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},lc=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?ac(n.ref,r,e):n.refs&&n.refs.forEach(o=>ac(o,r,e))}},ab=(e,t)=>{t.shouldUseNativeValidation&&lc(e,t);const r={};for(const n in e){const o=U(t.fields,n),i=Object.assign(e[n]||{},{ref:o&&o.ref});if(lb(t.names||Object.keys(e),n)){const s=Object.assign({},U(r,n));se(s,"root",i),se(r,n,s)}else se(r,n,i)}return r},lb=(e,t)=>e.some(r=>r.startsWith(t+"."));function Ss(e,t,r){return t===void 0&&(t={}),r===void 0&&(r={}),function(n,o,i){try{return Promise.resolve(function(s,a){try{var l=(t.context&&process.env.NODE_ENV==="development"&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(e[r.mode==="sync"?"validateSync":"validate"](n,Object.assign({abortEarly:!1},t,{context:o}))).then(function(u){return i.shouldUseNativeValidation&&lc({},i),{values:r.raw?n:u,errors:{}}}))}catch(u){return a(u)}return l&&l.then?l.then(void 0,a):l}(0,function(s){if(!s.inner)throw s;return{values:{},errors:ab((a=s,l=!i.shouldUseNativeValidation&&i.criteriaMode==="all",(a.inner||[]).reduce(function(u,c){if(u[c.path]||(u[c.path]={message:c.message,type:c.type}),l){var f=u[c.path].types,h=f&&f[c.type];u[c.path]=Wu(c.path,l,u,c.type,h?[].concat(h,c.message):c.message)}return u},{})),i)};var a,l}))}catch(s){return Promise.reject(s)}}}var ks,uc;function ub(){if(uc)return ks;uc=1;function e(b){this._maxSize=b,this.clear()}e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(b){return this._values[b]},e.prototype.set=function(b,v){return this._size>=this._maxSize&&this.clear(),b in this._values||this._size++,this._values[b]=v};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,n=/^\d/,o=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,i=/^\s*(['"]?)(.*?)(\1)\s*$/,s=512,a=new e(s),l=new e(s),u=new e(s);ks={Cache:e,split:f,normalizePath:c,setter:function(b){var v=c(b);return l.get(b)||l.set(b,function(_,k){for(var S=0,C=v.length,A=_;S<C-1;){var N=v[S];if(N==="__proto__"||N==="constructor"||N==="prototype")return _;A=A[v[S++]]}A[v[S]]=k})},getter:function(b,v){var w=c(b);return u.get(b)||u.set(b,function(k){for(var S=0,C=w.length;S<C;)if(k!=null||!v)k=k[w[S++]];else return;return k})},join:function(b){return b.reduce(function(v,w){return v+(p(w)||r.test(w)?"["+w+"]":(v?".":"")+w)},"")},forEach:function(b,v,w){h(Array.isArray(b)?b:f(b),v,w)}};function c(b){return a.get(b)||a.set(b,f(b).map(function(v){return v.replace(i,"$2")}))}function f(b){return b.match(t)||[""]}function h(b,v,w){var _=b.length,k,S,C,A;for(S=0;S<_;S++)k=b[S],k&&(x(k)&&(k='"'+k+'"'),A=p(k),C=!A&&/^\d+$/.test(k),v.call(w,k,A,C,S,b))}function p(b){return typeof b=="string"&&b&&["'",'"'].indexOf(b.charAt(0))!==-1}function d(b){return b.match(n)&&!b.match(r)}function g(b){return o.test(b)}function x(b){return!p(b)&&(d(b)||g(b))}return ks}var hr=ub(),Cs,cc;function cb(){if(cc)return Cs;cc=1;const e=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,t=c=>c.match(e)||[],r=c=>c[0].toUpperCase()+c.slice(1),n=(c,f)=>t(c).join(f).toLowerCase(),o=c=>t(c).reduce((f,h)=>`${f}${f?h[0].toUpperCase()+h.slice(1).toLowerCase():h.toLowerCase()}`,"");return Cs={words:t,upperFirst:r,camelCase:o,pascalCase:c=>r(o(c)),snakeCase:c=>n(c,"_"),kebabCase:c=>n(c,"-"),sentenceCase:c=>r(n(c," ")),titleCase:c=>t(c).map(r).join(" ")},Cs}var Os=cb(),Eo={exports:{}},fc;function fb(){if(fc)return Eo.exports;fc=1,Eo.exports=function(o){return e(t(o),o)},Eo.exports.array=e;function e(o,i){var s=o.length,a=new Array(s),l={},u=s,c=r(i),f=n(o);for(i.forEach(function(p){if(!f.has(p[0])||!f.has(p[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});u--;)l[u]||h(o[u],u,new Set);return a;function h(p,d,g){if(g.has(p)){var x;try{x=", node was:"+JSON.stringify(p)}catch{x=""}throw new Error("Cyclic dependency"+x)}if(!f.has(p))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(p));if(!l[d]){l[d]=!0;var b=c.get(p)||new Set;if(b=Array.from(b),d=b.length){g.add(p);do{var v=b[--d];h(v,f.get(v),g)}while(d);g.delete(p)}a[--s]=p}}}function t(o){for(var i=new Set,s=0,a=o.length;s<a;s++){var l=o[s];i.add(l[0]),i.add(l[1])}return Array.from(i)}function r(o){for(var i=new Map,s=0,a=o.length;s<a;s++){var l=o[s];i.has(l[0])||i.set(l[0],new Set),i.has(l[1])||i.set(l[1],new Set),i.get(l[0]).add(l[1])}return i}function n(o){for(var i=new Map,s=0,a=o.length;s<a;s++)i.set(o[s],s);return i}return Eo.exports}var db=fb();const pb=Sf(db),mb=Object.prototype.toString,hb=Error.prototype.toString,gb=RegExp.prototype.toString,yb=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",bb=/^Symbol\((.*)\)(.*)$/;function xb(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function dc(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return xb(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return yb.call(e).replace(bb,"Symbol($1)");const n=mb.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+hb.call(e)+"]":n==="RegExp"?gb.call(e):null}function Bt(e,t){let r=dc(e,t);return r!==null?r:JSON.stringify(e,function(n,o){let i=dc(this[n],t);return i!==null?i:o},2)}function pc(e){return e==null?[]:[].concat(e)}let mc,hc,gc,vb=/\$\{\s*(\w+)\s*\}/g;mc=Symbol.toStringTag;class yc{constructor(t,r,n,o){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[mc]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=o,this.errors=[],this.inner=[],pc(t).forEach(i=>{if(Ze.isError(i)){this.errors.push(...i.errors);const s=i.inner.length?i.inner:[i];this.inner.push(...s)}else this.errors.push(i)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}hc=Symbol.hasInstance,gc=Symbol.toStringTag;class Ze extends Error{static formatError(t,r){const n=r.label||r.path||"this";return r=Object.assign({},r,{path:n,originalPath:r.path}),typeof t=="string"?t.replace(vb,(o,i)=>Bt(r[i])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,n,o,i){const s=new yc(t,r,n,o);if(i)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[gc]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,Ze)}static[hc](t){return yc[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let jt={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:r,originalValue:n})=>{const o=n!=null&&n!==r?` (cast from the value \`${Bt(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Bt(r,!0)}\``+o:`${e} must match the configured type. The validated value was: \`${Bt(r,!0)}\``+o}},et={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Zt={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},Fs={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},As={isValue:"${path} field must be ${value}"},To={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},_o={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"};Object.assign(Object.create(null),{mixed:jt,string:et,number:Zt,date:Fs,object:To,array:_o,boolean:As,tuple:{notType:e=>{const{path:t,value:r,spec:n}=e,o=n.types.length;if(Array.isArray(r)){if(r.length<o)return`${t} tuple value has too few items, expected a length of ${o} but got ${r.length} for value: \`${Bt(r,!0)}\``;if(r.length>o)return`${t} tuple value has too many items, expected a length of ${o} but got ${r.length} for value: \`${Bt(r,!0)}\``}return Ze.formatError(jt.notType,e)}}});const So=e=>e&&e.__isYupSchema__;class ko{static fromOptions(t,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:o,otherwise:i}=r,s=typeof n=="function"?n:(...a)=>a.every(l=>l===n);return new ko(t,(a,l)=>{var u;let c=s(...a)?o:i;return(u=c==null?void 0:c(l))!=null?u:l})}constructor(t,r){this.fn=void 0,this.refs=t,this.refs=t,this.fn=r}resolve(t,r){let n=this.refs.map(i=>i.getValue(r==null?void 0:r.value,r==null?void 0:r.parent,r==null?void 0:r.context)),o=this.fn(n,t,r);if(o===void 0||o===t)return t;if(!So(o))throw new TypeError("conditions must return a schema object");return o.resolve(r)}}const Co={context:"$",value:"."};class gr{constructor(t,r={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Co.context,this.isValue=this.key[0]===Co.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?Co.context:this.isValue?Co.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&hr.getter(this.path,!0),this.map=r.map}getValue(t,r,n){let o=this.isContext?n:this.isValue?t:r;return this.getter&&(o=this.getter(o||{})),this.map&&(o=this.map(o)),o}cast(t,r){return this.getValue(t,r==null?void 0:r.parent,r==null?void 0:r.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}gr.prototype.__isYupRef=!0;const bt=e=>e==null;function Lr(e){function t({value:r,path:n="",options:o,originalValue:i,schema:s},a,l){const{name:u,test:c,params:f,message:h,skipAbsent:p}=e;let{parent:d,context:g,abortEarly:x=s.spec.abortEarly,disableStackTrace:b=s.spec.disableStackTrace}=o;function v(P){return gr.isRef(P)?P.getValue(r,d,g):P}function w(P={}){const I=Object.assign({value:r,originalValue:i,label:s.spec.label,path:P.path||n,spec:s.spec,disableStackTrace:P.disableStackTrace||b},f,P.params);for(const q of Object.keys(I))I[q]=v(I[q]);const R=new Ze(Ze.formatError(P.message||h,I),r,I.path,P.type||u,I.disableStackTrace);return R.params=I,R}const _=x?a:l;let k={path:n,parent:d,type:u,from:o.from,createError:w,resolve:v,options:o,originalValue:i,schema:s};const S=P=>{Ze.isError(P)?_(P):P?l(null):_(w())},C=P=>{Ze.isError(P)?_(P):a(P)};if(p&&bt(r))return S(!0);let N;try{var L;if(N=c.call(k,r,k),typeof((L=N)==null?void 0:L.then)=="function"){if(o.sync)throw new Error(`Validation test of type: "${k.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(N).then(S,C)}}catch(P){C(P);return}S(N)}return t.OPTIONS=e,t}function wb(e,t,r,n=r){let o,i,s;return t?(hr.forEach(t,(a,l,u)=>{let c=l?a.slice(1,a.length-1):a;e=e.resolve({context:n,parent:o,value:r});let f=e.type==="tuple",h=u?parseInt(c,10):0;if(e.innerType||f){if(f&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${s}" must contain an index to the tuple element, e.g. "${s}[0]"`);if(r&&h>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${t}. because there is no value at that index. `);o=r,r=r&&r[h],e=f?e.spec.types[h]:e.innerType}if(!u){if(!e.fields||!e.fields[c])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${s} which is a type: "${e.type}")`);o=r,r=r&&r[c],e=e.fields[c]}i=c,s=l?"["+a+"]":"."+a}),{schema:e,parent:o,parentPath:i}):{parent:o,parentPath:t,schema:e}}class Oo extends Set{describe(){const t=[];for(const r of this.values())t.push(gr.isRef(r)?r.describe():r);return t}resolveAll(t){let r=[];for(const n of this.values())r.push(t(n));return r}clone(){return new Oo(this.values())}merge(t,r){const n=this.clone();return t.forEach(o=>n.add(o)),r.forEach(o=>n.delete(o)),n}}function Dr(e,t=new Map){if(So(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let r;if(e instanceof Date)r=new Date(e.getTime()),t.set(e,r);else if(e instanceof RegExp)r=new RegExp(e),t.set(e,r);else if(Array.isArray(e)){r=new Array(e.length),t.set(e,r);for(let n=0;n<e.length;n++)r[n]=Dr(e[n],t)}else if(e instanceof Map){r=new Map,t.set(e,r);for(const[n,o]of e.entries())r.set(n,Dr(o,t))}else if(e instanceof Set){r=new Set,t.set(e,r);for(const n of e)r.add(Dr(n,t))}else if(e instanceof Object){r={},t.set(e,r);for(const[n,o]of Object.entries(e))r[n]=Dr(o,t)}else throw Error(`Unable to clone ${e}`);return r}class tt{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new Oo,this._blacklist=new Oo,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(jt.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(r=>{r.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeCheck=this._typeCheck,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.internalTests=Object.assign({},this.internalTests),r.exclusiveTests=Object.assign({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=Dr(Object.assign({},this.spec,t)),r}label(t){let r=this.clone();return r.spec.label=t,r}meta(...t){if(t.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},t[0]),r}withMutation(t){let r=this._mutate;this._mutate=!0;let n=t(this);return this._mutate=r,n}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let r=this,n=t.clone();const o=Object.assign({},r.spec,n.spec);return n.spec=o,n.internalTests=Object.assign({},r.internalTests,n.internalTests),n._whitelist=r._whitelist.merge(t._whitelist,t._blacklist),n._blacklist=r._blacklist.merge(t._blacklist,t._whitelist),n.tests=r.tests,n.exclusiveTests=r.exclusiveTests,n.withMutation(i=>{t.tests.forEach(s=>{i.test(s.OPTIONS)})}),n.transforms=[...r.transforms,...n.transforms],n}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let r=this;if(r.conditions.length){let n=r.conditions;r=r.clone(),r.conditions=[],r=n.reduce((o,i)=>i.resolve(o,t),r),r=r.resolve(t)}return r}resolveOptions(t){var r,n,o,i;return Object.assign({},t,{from:t.from||[],strict:(r=t.strict)!=null?r:this.spec.strict,abortEarly:(n=t.abortEarly)!=null?n:this.spec.abortEarly,recursive:(o=t.recursive)!=null?o:this.spec.recursive,disableStackTrace:(i=t.disableStackTrace)!=null?i:this.spec.disableStackTrace})}cast(t,r={}){let n=this.resolve(Object.assign({value:t},r)),o=r.assert==="ignore-optionality",i=n._cast(t,r);if(r.assert!==!1&&!n.isType(i)){if(o&&bt(i))return i;let s=Bt(t),a=Bt(i);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}".
57
57
 
58
58
  attempted value: ${s}
59
- `+(a!==s?`result of cast: ${a}`:""))}return i}_cast(t,r){let n=t===void 0?t:this.transforms.reduce((o,i)=>i.call(this,o,t,this),t);return n===void 0&&(n=this.getDefault(r)),n}_validate(t,r={},n,o){let{path:i,originalValue:s=t,strict:a=this.spec.strict}=r,l=t;a||(l=this._cast(l,Object.assign({assert:!1},r)));let u=[];for(let c of Object.values(this.internalTests))c&&u.push(c);this.runTests({path:i,value:l,originalValue:s,options:r,tests:u},n,c=>{if(c.length)return o(c,l);this.runTests({path:i,value:l,originalValue:s,options:r,tests:this.tests},n,o)})}runTests(t,r,n){let o=!1,{tests:i,value:s,originalValue:a,path:l,options:u}=t,c=g=>{o||(o=!0,r(g,s))},f=g=>{o||(o=!0,n(g,s))},h=i.length,p=[];if(!h)return f([]);let d={value:s,originalValue:a,path:l,options:u,schema:this};for(let g=0;g<i.length;g++){const x=i[g];x(d,c,function(v){v&&(Array.isArray(v)?p.push(...v):p.push(v)),--h<=0&&f(p)})}}asNestedTest({key:t,index:r,parent:n,parentPath:o,originalParent:i,options:s}){const a=t??r;if(a==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof a=="number";let u=n[a];const c=Object.assign({},s,{strict:!0,parent:n,value:u,originalValue:i[a],key:void 0,[l?"index":"key"]:a,path:l||a.includes(".")?`${o||""}[${l?a:`"${a}"`}]`:(o?`${o}.`:"")+t});return(f,h,p)=>this.resolve(c)._validate(u,c,h,p)}validate(t,r){var n;let o=this.resolve(Object.assign({},r,{value:t})),i=(n=r==null?void 0:r.disableStackTrace)!=null?n:o.spec.disableStackTrace;return new Promise((s,a)=>o._validate(t,r,(l,u)=>{Ze.isError(l)&&(l.value=u),a(l)},(l,u)=>{l.length?a(new Ze(l,u,void 0,void 0,i)):s(u)}))}validateSync(t,r){var n;let o=this.resolve(Object.assign({},r,{value:t})),i,s=(n=r==null?void 0:r.disableStackTrace)!=null?n:o.spec.disableStackTrace;return o._validate(t,Object.assign({},r,{sync:!0}),(a,l)=>{throw Ze.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new Ze(a,t,void 0,void 0,s);i=l}),i}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(Ze.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(Ze.isError(n))return!1;throw n}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):Dr(r)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,r){const n=this.clone({nullable:t});return n.internalTests.nullable=Pr({message:r,name:"nullable",test(o){return o===null?this.schema.spec.nullable:!0}}),n}optionality(t,r){const n=this.clone({optional:t});return n.internalTests.optionality=Pr({message:r,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(t=jt.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=jt.notNull){return this.nullability(!1,t)}required(t=jt.required){return this.clone().withMutation(r=>r.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let r=this.clone();return r.transforms.push(t),r}test(...t){let r;if(t.length===1?typeof t[0]=="function"?r={test:t[0]}:r=t[0]:t.length===2?r={name:t[0],test:t[1]}:r={name:t[0],message:t[1],test:t[2]},r.message===void 0&&(r.message=jt.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),o=Pr(r),i=r.exclusive||r.name&&n.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(n.exclusiveTests[r.name]=!!r.exclusive),n.tests=n.tests.filter(s=>!(s.OPTIONS.name===r.name&&(i||s.OPTIONS.test===o.OPTIONS.test))),n.tests.push(o),n}when(t,r){!Array.isArray(t)&&typeof t!="string"&&(r=t,t=".");let n=this.clone(),o=pc(t).map(i=>new gr(i));return o.forEach(i=>{i.isSibling&&n.deps.push(i.key)}),n.conditions.push(typeof r=="function"?new So(o,r):So.fromOptions(o,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=Pr({message:t,name:"typeError",skipAbsent:!0,test(n){return this.schema._typeCheck(n)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(t,r=jt.oneOf){let n=this.clone();return t.forEach(o=>{n._whitelist.add(o),n._blacklist.delete(o)}),n.internalTests.whiteList=Pr({message:r,name:"oneOf",skipAbsent:!0,test(o){let i=this.schema._whitelist,s=i.resolveAll(this.resolve);return s.includes(o)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:s}})}}),n}notOneOf(t,r=jt.notOneOf){let n=this.clone();return t.forEach(o=>{n._blacklist.add(o),n._whitelist.delete(o)}),n.internalTests.blacklist=Pr({message:r,name:"notOneOf",test(o){let i=this.schema._blacklist,s=i.resolveAll(this.resolve);return s.includes(o)?this.createError({params:{values:Array.from(i).join(", "),resolved:s}}):!0}}),n}strip(t=!0){let r=this.clone();return r.spec.strip=t,r}describe(t){const r=(t?this.resolve(t):this).clone(),{label:n,meta:o,optional:i,nullable:s}=r.spec;return{meta:o,label:n,optional:i,nullable:s,default:r.getDefault(t),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,u,c)=>c.findIndex(f=>f.name===l.name)===u)}}}tt.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])tt.prototype[`${e}At`]=function(t,r,n={}){const{parent:o,parentPath:i,schema:s}=wb(this,t,r,n.context);return s[e](o&&o[i],Object.assign({},n,{parent:o,path:t}))};for(const e of["equals","is"])tt.prototype[e]=tt.prototype.oneOf;for(const e of["not","nope"])tt.prototype[e]=tt.prototype.notOneOf;const Eb=()=>!0;function vn(e){return new bc(e)}class bc extends tt{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:Eb},t))}}vn.prototype=bc.prototype;function Oo(){return new xc}class xc extends tt{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(n.spec.coerce&&!n.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=As.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return bt(r)||r===!0}})}isFalse(t=As.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return bt(r)||r===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}Oo.prototype=xc.prototype;const Tb=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function _b(e){const t=js(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let r=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(r=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(r=0-r)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+r,t.second,t.millisecond)}function js(e){var t,r;const n=Tb.exec(e);return n?{year:Ut(n[1]),month:Ut(n[2],1)-1,day:Ut(n[3],1),hour:Ut(n[4]),minute:Ut(n[5]),second:Ut(n[6]),millisecond:n[7]?Ut(n[7].substring(0,3)):0,precision:(t=(r=n[7])==null?void 0:r.length)!=null?t:void 0,z:n[8]||void 0,plusMinus:n[9]||void 0,hourOffset:Ut(n[10]),minuteOffset:Ut(n[11])}:null}function Ut(e,t=0){return Number(e)||t}let Sb=/^[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])?)*$/,kb=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Cb=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Ob="^\\d{4}-\\d{2}-\\d{2}",Fb="\\d{2}:\\d{2}:\\d{2}",Ab="(([+-]\\d{2}(:?\\d{2})?)|Z)",jb=new RegExp(`${Ob}T${Fb}(\\.\\d+)?${Ab}$`),$b=e=>bt(e)||e===e.trim(),Nb={}.toString();function be(){return new vc}class vc extends tt{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce||n.isType(t)||Array.isArray(t))return t;const o=t!=null&&t.toString?t.toString():t;return o===Nb?t:o})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||jt.required,name:"required",skipAbsent:!0,test:n=>!!n.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(r=>r.OPTIONS.name!=="required"),t))}length(t,r=et.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(n){return n.length===this.resolve(t)}})}min(t,r=et.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n.length>=this.resolve(t)}})}max(t,r=et.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:t},skipAbsent:!0,test(n){return n.length<=this.resolve(t)}})}matches(t,r){let n=!1,o,i;return r&&(typeof r=="object"?{excludeEmptyString:n=!1,message:o,name:i}=r:o=r),this.test({name:i||"matches",message:o||et.matches,params:{regex:t},skipAbsent:!0,test:s=>s===""&&n||s.search(t)!==-1})}email(t=et.email){return this.matches(Sb,{name:"email",message:t,excludeEmptyString:!0})}url(t=et.url){return this.matches(kb,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=et.uuid){return this.matches(Cb,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let r="",n,o;return t&&(typeof t=="object"?{message:r="",allowOffset:n=!1,precision:o=void 0}=t:r=t),this.matches(jb,{name:"datetime",message:r||et.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||et.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:i=>{if(!i||n)return!0;const s=js(i);return s?!!s.z:!1}}).test({name:"datetime_precision",message:r||et.datetime_precision,params:{precision:o},skipAbsent:!0,test:i=>{if(!i||o==null)return!0;const s=js(i);return s?s.precision===o:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=et.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:$b})}lowercase(t=et.lowercase){return this.transform(r=>bt(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>bt(r)||r===r.toLowerCase()})}uppercase(t=et.uppercase){return this.transform(r=>bt(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>bt(r)||r===r.toUpperCase()})}}be.prototype=vc.prototype;let Lb=e=>e!=+e;function wn(){return new wc}class wc extends tt{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Lb(t)}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce)return t;let o=t;if(typeof o=="string"){if(o=o.replace(/\s/g,""),o==="")return NaN;o=+o}return n.isType(o)||o===null?o:parseFloat(o)})})}min(t,r=Zt.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n>=this.resolve(t)}})}max(t,r=Zt.max){return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(n){return n<=this.resolve(t)}})}lessThan(t,r=Zt.lessThan){return this.test({message:r,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(n){return n<this.resolve(t)}})}moreThan(t,r=Zt.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(n){return n>this.resolve(t)}})}positive(t=Zt.positive){return this.moreThan(0,t)}negative(t=Zt.negative){return this.lessThan(0,t)}integer(t=Zt.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(t=>bt(t)?t:t|0)}round(t){var r;let n=["ceil","floor","round","trunc"];if(t=((r=t)==null?void 0:r.toLowerCase())||"round",t==="trunc")return this.truncate();if(n.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(o=>bt(o)?o:Math[t](o))}}wn.prototype=wc.prototype;let Ec=new Date(""),Pb=e=>Object.prototype.toString.call(e)==="[object Date]";function $s(){return new En}class En extends tt{constructor(){super({type:"date",check(t){return Pb(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=_b(t),isNaN(t)?En.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if(gr.isRef(t))n=t;else{let o=this.cast(t);if(!this._typeCheck(o))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);n=o}return n}min(t,r=Fs.min){let n=this.prepareParam(t,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o>=this.resolve(n)}})}max(t,r=Fs.max){let n=this.prepareParam(t,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(o){return o<=this.resolve(n)}})}}En.INVALID_DATE=Ec,$s.prototype=En.prototype,$s.INVALID_DATE=Ec;function Db(e,t=[]){let r=[],n=new Set,o=new Set(t.map(([s,a])=>`${s}-${a}`));function i(s,a){let l=hr.split(s)[0];n.add(l),o.has(`${a}-${l}`)||r.push([a,l])}for(const s of Object.keys(e)){let a=e[s];n.add(s),gr.isRef(a)&&a.isSibling?i(a.path,s):_o(a)&&"deps"in a&&a.deps.forEach(l=>i(l,s))}return pb.array(Array.from(n),r).reverse()}function Tc(e,t){let r=1/0;return e.some((n,o)=>{var i;if((i=t.path)!=null&&i.includes(n))return r=o,!0}),r}function _c(e){return(t,r)=>Tc(e,t)-Tc(e,r)}const Sc=(e,t,r)=>{if(typeof e!="string")return e;let n=e;try{n=JSON.parse(e)}catch{}return r.isType(n)?n:e};function Fo(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=Fo(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Fo(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Fo)}):"optional"in e?e.optional():e}const Ib=(e,t)=>{const r=[...hr.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),o=hr.getter(hr.join(r),!0)(e);return!!(o&&n in o)};let kc=e=>Object.prototype.toString.call(e)==="[object Object]";function Cc(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const Mb=_c([]);function Tn(e){return new Oc(e)}class Oc extends tt{constructor(t){super({type:"object",check(r){return kc(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=Mb,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,r={}){var n;let o=super._cast(t,r);if(o===void 0)return this.getDefault(r);if(!this._typeCheck(o))return o;let i=this.fields,s=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(o).filter(f=>!this._nodes.includes(f))),l={},u=Object.assign({},r,{parent:l,__validating:r.__validating||!1}),c=!1;for(const f of a){let h=i[f],p=f in o;if(h){let d,g=o[f];u.path=(r.path?`${r.path}.`:"")+f,h=h.resolve({value:g,context:r.context,parent:l});let x=h instanceof tt?h.spec:void 0,b=x==null?void 0:x.strict;if(x!=null&&x.strip){c=c||f in o;continue}d=!r.__validating||!b?h.cast(o[f],u):o[f],d!==void 0&&(l[f]=d)}else p&&!s&&(l[f]=o[f]);(p!==f in l||l[f]!==o[f])&&(c=!0)}return c?l:o}_validate(t,r={},n,o){let{from:i=[],originalValue:s=t,recursive:a=this.spec.recursive}=r;r.from=[{schema:this,value:s},...i],r.__validating=!0,r.originalValue=s,super._validate(t,r,n,(l,u)=>{if(!a||!kc(u)){o(l,u);return}s=s||u;let c=[];for(let f of this._nodes){let h=this.fields[f];!h||gr.isRef(h)||c.push(h.asNestedTest({options:r,key:f,parent:u,parentPath:r.path,originalParent:s}))}this.runTests({tests:c,value:u,originalValue:s,options:r},n,f=>{o(f.sort(this._sortErrors).concat(l),u)})})}clone(t){const r=super.clone(t);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(t){let r=super.concat(t),n=r.fields;for(let[o,i]of Object.entries(this.fields)){const s=n[o];n[o]=s===void 0?i:s}return r.withMutation(o=>o.setFields(n,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let r={};return this._nodes.forEach(n=>{var o;const i=this.fields[n];let s=t;(o=s)!=null&&o.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[n]})),r[n]=i&&"getDefault"in i?i.getDefault(s):void 0}),r}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=Db(t,r),n._sortErrors=_c(Object.keys(t)),r&&(n._excludedEdges=r),n}shape(t,r=[]){return this.clone().withMutation(n=>{let o=n._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),o=[...n._excludedEdges,...r]),n.setFields(Object.assign(n.fields,t),o)})}partial(){const t={};for(const[r,n]of Object.entries(this.fields))t[r]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(t)}deepPartial(){return Fo(this)}pick(t){const r={};for(const n of t)this.fields[n]&&(r[n]=this.fields[n]);return this.setFields(r,this._excludedEdges.filter(([n,o])=>t.includes(n)&&t.includes(o)))}omit(t){const r=[];for(const n of Object.keys(this.fields))t.includes(n)||r.push(n);return this.pick(r)}from(t,r,n){let o=hr.getter(t,!0);return this.transform(i=>{if(!i)return i;let s=i;return Ib(i,t)&&(s=Object.assign({},i),n||delete s[t],s[r]=o(i)),s})}json(){return this.transform(Sc)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Eo.exact,test(r){if(r==null)return!0;const n=Cc(this.schema,r);return n.length===0||this.createError({params:{properties:n.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,r=Eo.noUnknown){typeof t!="boolean"&&(r=t,t=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:r,test(o){if(o==null)return!0;const i=Cc(this.schema,o);return!t||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=Eo.noUnknown){return this.noUnknown(!t,r)}transformKeys(t){return this.transform(r=>{if(!r)return r;const n={};for(const o of Object.keys(r))n[t(o)]=r[o];return n})}camelCase(){return this.transformKeys(Os.camelCase)}snakeCase(){return this.transformKeys(Os.snakeCase)}constantCase(){return this.transformKeys(t=>Os.snakeCase(t).toUpperCase())}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);n.fields={};for(const[i,s]of Object.entries(r.fields)){var o;let a=t;(o=a)!=null&&o.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[i]})),n.fields[i]=s.describe(a)}return n}}Tn.prototype=Oc.prototype;function Fc(e){return new Ac(e)}class Ac extends tt{constructor(t){super({type:"array",spec:{types:t},check(r){return Array.isArray(r)}}),this.innerType=void 0,this.innerType=t}_cast(t,r){const n=super._cast(t,r);if(!this._typeCheck(n)||!this.innerType)return n;let o=!1;const i=n.map((s,a)=>{const l=this.innerType.cast(s,Object.assign({},r,{path:`${r.path||""}[${a}]`}));return l!==s&&(o=!0),l});return o?i:n}_validate(t,r={},n,o){var i;let s=this.innerType,a=(i=r.recursive)!=null?i:this.spec.recursive;r.originalValue!=null&&r.originalValue,super._validate(t,r,n,(l,u)=>{var c;if(!a||!s||!this._typeCheck(u)){o(l,u);return}let f=new Array(u.length);for(let p=0;p<u.length;p++){var h;f[p]=s.asNestedTest({options:r,index:p,parent:u,parentPath:r.path,originalParent:(h=r.originalValue)!=null?h:t})}this.runTests({value:u,tests:f,originalValue:(c=r.originalValue)!=null?c:t,options:r},n,p=>o(p.concat(l),u))})}clone(t){const r=super.clone(t);return r.innerType=this.innerType,r}json(){return this.transform(Sc)}concat(t){let r=super.concat(t);return r.innerType=this.innerType,t.innerType&&(r.innerType=r.innerType?r.innerType.concat(t.innerType):t.innerType),r}of(t){let r=this.clone();if(!_o(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+Bt(t));return r.innerType=t,r.spec=Object.assign({},r.spec,{types:t}),r}length(t,r=To.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(n){return n.length===this.resolve(t)}})}min(t,r){return r=r||To.min,this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n.length>=this.resolve(t)}})}max(t,r){return r=r||To.max,this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(n){return n.length<=this.resolve(t)}})}ensure(){return this.default(()=>[]).transform((t,r)=>this._typeCheck(t)?t:r==null?[]:[].concat(r))}compact(t){let r=t?(n,o,i)=>!t(n,o,i):n=>!!n;return this.transform(n=>n!=null?n.filter(r):n)}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);if(r.innerType){var o;let i=t;(o=i)!=null&&o.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[0]})),n.innerType=r.innerType.describe(i)}return n}}Fc.prototype=Ac.prototype;const Rb=({tabs:e,className:t="",count:r={},setActiveTab:n,activeTab:o,btnClass:i=""})=>{const s=ut("flex gap-x-3 mb-8 w-full no-scrollbar overflow-x-auto border-b border-[#EAECF0] darks:border-gray-500",t);return y.jsx("div",{className:s,children:e.map(a=>{const l=o===a.key,u=r[a.key]||0,c=ut("capitalize text-xs whitespace-nowrap no-scrollbar md:text-sm font-semibold pb-[14px] border-b-2 px-6 flex items-center justify-center gap-x-1 flex-1 text-center",i),f=ut({"border-gray-400 darks:border-white !text-primary darks:!text-white":l,"border-transparent text-[#667085] darks:!text-white/60":!l}),h=u>0&&y.jsx("span",{className:"text-xs h-6 min-w-[24px] rounded-full flex justify-center items-center border border-[#EAECF0] darks:border-gray-500 bg-[#F9FAFB] darks:bg-gray-800 text-[#454745] darks:text-white/80",children:u});return y.jsxs("button",{onClick:()=>n(a.key),className:ut(c,f),"aria-selected":l,role:"tab",type:"button",children:[a.title,h]},a.key)})})},Vb=[{type:"textField",label:"Short Text",icon:"fluent:text-16-filled",inputLabel:"Short Text Label",required:!1,inputType:"text",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null},{type:"longText",label:"Long Text",icon:"dashicons:text",inputLabel:"Long Text Label",required:!1,inputType:"text",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null},{type:"selectField",label:"Select List",icon:"tabler:select",inputLabel:"Select Text Label",required:!1,inputType:"select",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,options:[]},{type:"multiSelect",label:"MultiSelect",icon:"fluent-mdl2:multi-select",inputLabel:"Select Text Label",required:!1,inputType:"select",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,options:[]},{type:"validateInput",label:"Validate Input",icon:"iconoir:www",inputLabel:"Validate Input Label",required:!1,inputType:"validateInput",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Value is required",minLengthMessage:"",maxLengthMessage:"",value:null,url:"https://api.example.com/validate?value={value}",method:"GET",responseType:"string"},{type:"numberField",label:"Number",icon:"octicon:number-16",inputLabel:"Number Label",required:!1,inputType:"number",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null},{type:"amountField",label:"Amount",icon:"carbon:currency",inputLabel:"Enter amount",required:!1,inputType:"amount",maxAmount:null,minAmount:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minAmountMessage:"",maxAmountMessage:"",value:null,prefix:null},{type:"date",label:"Date",icon:"bx:calendar",inputLabel:"Date Text Label",required:!1,inputType:"date",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null},{type:"password",label:"Password",icon:"ic:round-password",inputLabel:"Password Text Label",required:!1,inputType:"password",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null},{type:"checkbox",label:"Checkbox",icon:"mingcute:checkbox-line",inputLabel:"Checkbox Text Label",required:!1,inputType:"checkbox",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,options:[]},{type:"radio",label:"Radio select",icon:"ri:checkbox-circle-line",inputLabel:"Radio Text Label",required:!1,inputType:"radio",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,options:[]},{type:"email",label:"Email",icon:"mdi:email-outline",inputLabel:"Email Text Label",required:!1,inputType:"email",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null},{type:"file",label:"File Attachment",icon:"ion:attach-sharp",inputLabel:"File Text Label",required:!1,inputType:"file",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null},{type:"tableInput",label:"Table Input",icon:"iconoir:table",inputLabel:"Table Input Label",required:!1,inputType:"tableInput",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Value is required",minLengthMessage:"",maxLengthMessage:"",value:[],denominators:null},{type:"grid",label:"Grid",icon:"cuida:grid-outline",inputLabel:"Grid Text Label",inputType:"grid",placeholder:"Type here",description:"",grid:2,gridData:[]}],Bb=["amount"],Ub=["text","number"],zb=["text","number","amount","date","password"],Hb=["amount"],qb=["grid","section"],Wb=["radio","select","checkbox","multiselect"],Kb=["validateInput"],Yb=["tableInput"];function Jb({value:e=[],onChange:t,onGetValue:r}){const[n,o]=m.useState((e==null?void 0:e.length)>0?e:[{value:""}]);m.useEffect(()=>{(e==null?void 0:e.length)>0&&JSON.stringify(e)!==JSON.stringify(n)&&o(e)},[e]);function i(l,u){const c=[...n];c[u]={...c[u],value:l},o(c),t&&t(c)}function s(){const l=[...n,{value:""}];o(l),t&&t(l)}function a(l){const u=n.filter((c,f)=>f!==l);o(u),t&&t(u)}return m.useEffect(()=>{r&&r(JSON.stringify({values:n}))},[r,n]),y.jsxs("div",{className:"]",children:[y.jsxs("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[y.jsx("div",{className:"grid text-sm font-bold border-b border-gray-100 bg-gray-50",children:y.jsx("div",{className:"px-2 py-2",children:y.jsx("span",{className:"",children:"Add Denominations"})})}),n.map((l,u)=>y.jsx("div",{className:"grid text-sm border-b border-gray-100",children:y.jsxs("div",{className:"flex items-center gap-x-4 px-2 py-1",children:[y.jsx("span",{className:"flex-1",children:y.jsx(go,{id:"input-example",className:"border border-gray-100 rounded w-full px-3 py-1 outline-none",decimalsLimit:6,defaultValue:l.value,onValueChange:c=>i(c,u),allowNegativeValue:!1})}),y.jsx("button",{onClick:()=>a(u),className:"text-red-500 hover:text-red-700 px-2",type:"button","aria-label":"Remove row",children:"×"})]})},l.key+u+Math.random()))]}),y.jsx("div",{className:"mt-1 flex justify-end",children:y.jsx("button",{type:"button",onClick:s,className:"font-semibold !text-blue-700 text-sm rounded outline-0 focus:outline-0",children:"+ Add"})})]})}const Xb=()=>y.jsx("blockquote",{className:"bg-gray-100 p-4 rounded-md text-gray-700",children:y.jsxs("ul",{children:[y.jsxs("li",{className:"text-xs",children:["API URL example format: ",y.jsx("code",{children:"https://example.com/validation?value={value}"})]}),y.jsxs("li",{className:"text-xs",children:[y.jsx("span",{className:"block mb-1",children:" Response example format:"}),y.jsx("pre",{className:"bg-white p-2 rounded-md",children:y.jsxs("code",{children:["{ ",y.jsx("br",{}),'  "data": { ',y.jsx("br",{}),'    "status": true, ',y.jsx("br",{}),'    "description": "John Doe" ',y.jsx("br",{}),"  } ",y.jsx("br",{}),"}"]})})]})]})}),Gb=Tn().shape({inputLabel:be().required("Label is required"),placeholder:be().nullable(),description:be().nullable(),isReadOnly:Oo(),isDisabled:Oo(),isRequired:Oo(),requiredMessage:be().nullable(),minLengthMessage:be().nullable(),maxLengthMessage:be().nullable(),maxLength:wn().nullable(),minLength:wn().nullable(),inputType:be().nullable(),maxAmountMessage:be().nullable(),maxAmount:be().nullable(),options:Fc().of(Tn().shape({label:be().nullable(),value:be().when("label",{is:e=>e&&e.length>0,then:e=>e.required("Value is required when label is present"),otherwise:e=>e.nullable()})})).nullable(),prefix:be().nullable(),url:be().nullable(),method:be().nullable(),denominators:vn().nullable(),responseType:be().nullable(),minAmount:be().nullable()}),Qb=[{title:"Basics",key:"basic"},{title:"Validations",key:"validation"}],Zb=({isOpen:e,onClose:t,element:r})=>{const{updateElement:n}=m.useContext(mt),[o,i]=m.useState("basic"),s=xi("config"),{register:a,handleSubmit:l,control:u,setValue:c,watch:f,trigger:h,formState:{errors:p,isSubmitting:d,isValid:g},reset:x}=_s({resolver:Ss(Gb),defaultValues:{...r,options:r.options||[]}}),{fields:b,append:v,remove:w}=Q0({control:u,name:"options"});m.useEffect(()=>{e||x()},[e,x]);const _=S=>{n(S,r.sectionId),t()},k=()=>y.jsxs("div",{className:"flex flex-col gap-y-1 justify-start",children:[b.map((S,C)=>y.jsxs("div",{className:"flex gap-x-4 items-center ",children:[y.jsx("div",{className:"flex-1",children:y.jsx(ve,{label:"Label",name:`options.${C}.label`,register:a,errors:p,element:r,placeholder:"Label",isFloating:!0})}),y.jsx("div",{className:"flex-1",children:y.jsx(ve,{label:"Value",name:`options.${C}.value`,register:a,errors:p,element:r,placeholder:"Value",isFloating:!0})})," ",y.jsx("button",{type:"button",className:"outline-none hover:opacity-80",onClick:()=>w(C),children:y.jsx(Be,{icon:"iconamoon:sign-times-fill"})})]},S.id)),y.jsxs("div",{children:[" ",y.jsxs("button",{type:"button",className:"mt-2 text-gray-700 font-medium text-sm flex gap-x-1 items-center",onClick:()=>v({label:"",value:"",id:en()}),children:[y.jsx(Be,{icon:"qlementine-icons:plus-16"})," Add Option"]})]})]});return y.jsx("div",{className:"fixed inset-0 bg-black/30 flex items-center justify-center z-[999] cursor-default no-drag select-none",children:y.jsxs("div",{className:"min-w-[600px] bg-white rounded-xl shadow-xl relative flex flex-col items-center",children:[y.jsxs("div",{className:"w-full px-6 pt-6 pb-5 flex flex-col items-start gap-4 z-10 mb-6",children:[y.jsx("h2",{className:"text-lg font-semibold text-[#475467] font-onest",children:r.label}),y.jsx("button",{onClick:t,className:"absolute right-4 top-4 p-2 text-[#98A2B3] hover:bg-gray-50 rounded-lg",children:y.jsx(Be,{icon:"tabler:x"})})]}),y.jsx("div",{className:"w-full",children:y.jsx(Rb,{tabs:Qb,setActiveTab:i,activeTab:o,className:"justify-start !text-left",btnClass:"!uppercase !text-left"})}),y.jsxs("form",{onSubmit:l(_),className:"w-full",children:[o==="basic"&&y.jsxs("div",{className:"w-full px-6 flex flex-col gap-5 z-10",children:[y.jsx(ve,{label:"Label",name:"inputLabel",register:a,errors:p,element:r}),zb.includes(r.inputType)&&y.jsx(ve,{label:"Placeholder",name:"placeholder",register:a,errors:p,element:r}),Bb.includes(r.inputType)&&y.jsx(ve,{label:"Prefix",name:"prefix",register:a,errors:p,element:r}),Kb.includes(r.inputType)&&y.jsxs(y.Fragment,{children:[y.jsx(Xb,{}),y.jsx(ve,{label:"Api Url",name:"url",register:a,errors:p,element:r}),y.jsx(is,{label:"Api Method",options:[{label:"GET",value:"GET"},{label:"POST",value:"POST"}],register:a,name:"method",setValue:c,trigger:h,value:f("method")}),y.jsx(is,{label:"Api Response type",options:[{label:"String",value:"string"},{label:"Object",value:"object"}],register:a,name:"responseType",setValue:c,trigger:h,value:f("responseType")})]}),Yb.includes(r.inputType)&&y.jsx(Jb,{onChange:S=>{c("denominators",S)},value:f("denominators")}),y.jsx(ve,{label:"Short Description",name:"description",register:a,errors:p,element:r}),Wb.includes(r.inputType)&&k()]}),!qb.includes(r.type.toLowerCase())&&o==="validation"&&y.jsxs("div",{className:"w-full px-6 flex flex-col gap-5 z-10",children:[y.jsxs("div",{className:"flex gap-x-6 items-center",children:[y.jsx("div",{className:"w-[150px]",children:y.jsx(ve,{label:"Required",name:"isRequired",register:a,errors:p,element:r,type:"checkbox"})})," ",y.jsx("div",{className:"flex-1",children:y.jsx(ve,{label:"Error message text",name:"requiredMessage",register:a,errors:p,element:r})})]}),Ub.includes(r.inputType)&&y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"flex gap-x-6 items-center",children:[y.jsx("div",{className:"w-[150px]",children:y.jsx(ve,{label:"Min Length",name:"minLength",register:a,errors:p,element:r,type:"number"})})," ",y.jsx("div",{className:"flex-1",children:y.jsx(ve,{label:"Error message text",name:"minLengthMessage",register:a,errors:p,element:r})})]}),y.jsxs("div",{className:"flex gap-x-6 items-center",children:[y.jsx("div",{className:"w-[150px]",children:y.jsx(ve,{label:"Max Length",name:"maxLength",register:a,errors:p,element:r,type:"number"})})," ",y.jsx("div",{className:"flex-1",children:y.jsx(ve,{label:"Error message text",name:"maxLengthMessage",register:a,errors:p,element:r})})]})]}),Hb.includes(r.inputType)&&y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"flex gap-x-6 items-center",children:[y.jsx("div",{className:"w-[150px]",children:y.jsx(ve,{label:"Min Amount",name:"minAmount",register:a,errors:p,element:r,type:"amount"})})," ",y.jsx("div",{className:"flex-1",children:y.jsx(ve,{label:"Error message text",name:"minAmountMessage",register:a,errors:p,element:r})})]}),y.jsxs("div",{className:"flex gap-x-6 items-center",children:[y.jsx("div",{className:"w-[150px]",children:y.jsx(ve,{label:"Max Amount",name:"maxAmount",register:a,errors:p,element:r,type:"amount"})})," ",y.jsx("div",{className:"flex-1",children:y.jsx(ve,{label:"Error message text",name:"maxAmountMessage",register:a,errors:p,element:r})})]})]})]}),y.jsxs("div",{className:"w-full px-6 pt-8 pb-6 flex gap-3 mt-4",children:[y.jsx("button",{type:"button",onClick:t,className:"flex-1 px-4 py-2.5 bg-white border border-[#D0D5DD] rounded-lg shadow-xs font-semibold text-[#344054] font-onest",children:"Cancel"}),y.jsx("button",{type:"submit",disabled:!g||d,style:{background:(s==null?void 0:s.buttonColor)||"#333"},className:`flex-1 px-4 py-2.5 ${!g||d?"bg-[#F2F4F7]":"bg-[#2563EB]"} ${!g||d?"text-[#98A2B3]":"text-white"} rounded-lg shadow-xs font-semibold font-onest disabled:opacity-50`,children:d?"Saving...":"Save"})]})]})]})})},jc=m.memo(({state:e,element:t,children:r})=>{const[n,o]=m.useState(!1),{removeElement:i}=m.useContext(mt),s=m.useCallback(()=>{i(t.id,t.sectionId)},[t.id,i]);return y.jsxs("div",{children:[n&&y.jsx(Zb,{isOpen:n,onClose:()=>o(!1),element:t}),y.jsxs("div",{className:"flex justify-between items-center mb-2",children:[y.jsx("label",{className:"text-sm font-medium",children:t.inputLabel}),e==="edit"&&y.jsxs("span",{className:"flex gap-x-3 items-center",children:[y.jsx("button",{type:"button",className:"outline-none hover:opacity-80 text-sm",onClick:()=>o(!0),children:y.jsx(Be,{icon:"circum:edit"})}),y.jsx("button",{type:"button",className:"outline-none hover:opacity-80 text-sm",onClick:s,children:y.jsx(Be,{icon:"iconamoon:sign-times-fill"})})]})]}),r]})});jc.displayName="ElementContainer";function $c({element:e,validationData:t}){const{register:r=()=>({}),trigger:n,setValue:o,watch:i,isReadOnly:s}=t||{};let a;return i&&(a=i()[e.id]),y.jsx(ve,{placeholder:e.placeholder,type:e.inputType,label:"",name:e.id,register:r,trigger:n,setValue:o,value:a,prefix:e.prefix,disabled:s})}function Nc(e,t){return function(){return e.apply(t,arguments)}}const{toString:ex}=Object.prototype,{getPrototypeOf:Ns}=Object,Ao=(e=>t=>{const r=ex.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),xt=e=>(e=e.toLowerCase(),t=>Ao(t)===e),jo=e=>t=>typeof t===e,{isArray:Ir}=Array,_n=jo("undefined");function tx(e){return e!==null&&!_n(e)&&e.constructor!==null&&!_n(e.constructor)&&lt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Lc=xt("ArrayBuffer");function rx(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Lc(e.buffer),t}const nx=jo("string"),lt=jo("function"),Pc=jo("number"),$o=e=>e!==null&&typeof e=="object",ox=e=>e===!0||e===!1,No=e=>{if(Ao(e)!=="object")return!1;const t=Ns(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},ix=xt("Date"),sx=xt("File"),ax=xt("Blob"),lx=xt("FileList"),ux=e=>$o(e)&&lt(e.pipe),cx=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||lt(e.append)&&((t=Ao(e))==="formdata"||t==="object"&&lt(e.toString)&&e.toString()==="[object FormData]"))},fx=xt("URLSearchParams"),[dx,px,mx,hx]=["ReadableStream","Request","Response","Headers"].map(xt),gx=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Sn(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),Ir(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{const i=r?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length;let a;for(n=0;n<s;n++)a=i[n],t.call(null,e[a],a,e)}}function Dc(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length,o;for(;n-- >0;)if(o=r[n],t===o.toLowerCase())return o;return null}const yr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ic=e=>!_n(e)&&e!==yr;function Ls(){const{caseless:e}=Ic(this)&&this||{},t={},r=(n,o)=>{const i=e&&Dc(t,o)||o;No(t[i])&&No(n)?t[i]=Ls(t[i],n):No(n)?t[i]=Ls({},n):Ir(n)?t[i]=n.slice():t[i]=n};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&Sn(arguments[n],r);return t}const yx=(e,t,r,{allOwnKeys:n}={})=>(Sn(t,(o,i)=>{r&&lt(o)?e[i]=Nc(o,r):e[i]=o},{allOwnKeys:n}),e),bx=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),xx=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},vx=(e,t,r,n)=>{let o,i,s;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],(!n||n(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=r!==!1&&Ns(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},wx=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},Ex=e=>{if(!e)return null;if(Ir(e))return e;let t=e.length;if(!Pc(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Tx=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ns(Uint8Array)),_x=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=n.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},Sx=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},kx=xt("HTMLFormElement"),Cx=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),Mc=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Ox=xt("RegExp"),Rc=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Sn(r,(o,i)=>{let s;(s=t(o,i,e))!==!1&&(n[i]=s||o)}),Object.defineProperties(e,n)},Fx=e=>{Rc(e,(t,r)=>{if(lt(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(lt(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Ax=(e,t)=>{const r={},n=o=>{o.forEach(i=>{r[i]=!0})};return Ir(e)?n(e):n(String(e).split(t)),r},jx=()=>{},$x=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Nx(e){return!!(e&&lt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Lx=e=>{const t=new Array(10),r=(n,o)=>{if($o(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[o]=n;const i=Ir(n)?[]:{};return Sn(n,(s,a)=>{const l=r(s,o+1);!_n(l)&&(i[a]=l)}),t[o]=void 0,i}}return n};return r(e,0)},Px=xt("AsyncFunction"),Dx=e=>e&&($o(e)||lt(e))&&lt(e.then)&&lt(e.catch),Vc=((e,t)=>e?setImmediate:t?((r,n)=>(yr.addEventListener("message",({source:o,data:i})=>{o===yr&&i===r&&n.length&&n.shift()()},!1),o=>{n.push(o),yr.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",lt(yr.postMessage)),Ix=typeof queueMicrotask<"u"?queueMicrotask.bind(yr):typeof process<"u"&&process.nextTick||Vc,j={isArray:Ir,isArrayBuffer:Lc,isBuffer:tx,isFormData:cx,isArrayBufferView:rx,isString:nx,isNumber:Pc,isBoolean:ox,isObject:$o,isPlainObject:No,isReadableStream:dx,isRequest:px,isResponse:mx,isHeaders:hx,isUndefined:_n,isDate:ix,isFile:sx,isBlob:ax,isRegExp:Ox,isFunction:lt,isStream:ux,isURLSearchParams:fx,isTypedArray:Tx,isFileList:lx,forEach:Sn,merge:Ls,extend:yx,trim:gx,stripBOM:bx,inherits:xx,toFlatObject:vx,kindOf:Ao,kindOfTest:xt,endsWith:wx,toArray:Ex,forEachEntry:_x,matchAll:Sx,isHTMLForm:kx,hasOwnProperty:Mc,hasOwnProp:Mc,reduceDescriptors:Rc,freezeMethods:Fx,toObjectSet:Ax,toCamelCase:Cx,noop:jx,toFiniteNumber:$x,findKey:Dc,global:yr,isContextDefined:Ic,isSpecCompliantForm:Nx,toJSONObject:Lx,isAsyncFn:Px,isThenable:Dx,setImmediate:Vc,asap:Ix};function ee(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}j.inherits(ee,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:j.toJSONObject(this.config),code:this.code,status:this.status}}});const Bc=ee.prototype,Uc={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Uc[e]={value:e}}),Object.defineProperties(ee,Uc),Object.defineProperty(Bc,"isAxiosError",{value:!0}),ee.from=(e,t,r,n,o,i)=>{const s=Object.create(Bc);return j.toFlatObject(e,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),ee.call(s,e.message,t,r,n,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const Mx=null;function Ps(e){return j.isPlainObject(e)||j.isArray(e)}function zc(e){return j.endsWith(e,"[]")?e.slice(0,-2):e}function Hc(e,t,r){return e?e.concat(t).map(function(o,i){return o=zc(o),!r&&i?"["+o+"]":o}).join(r?".":""):t}function Rx(e){return j.isArray(e)&&!e.some(Ps)}const Vx=j.toFlatObject(j,{},null,function(t){return/^is[A-Z]/.test(t)});function Lo(e,t,r){if(!j.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=j.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,x){return!j.isUndefined(x[g])});const n=r.metaTokens,o=r.visitor||c,i=r.dots,s=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&j.isSpecCompliantForm(t);if(!j.isFunction(o))throw new TypeError("visitor must be a function");function u(d){if(d===null)return"";if(j.isDate(d))return d.toISOString();if(!l&&j.isBlob(d))throw new ee("Blob is not supported. Use a Buffer instead.");return j.isArrayBuffer(d)||j.isTypedArray(d)?l&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function c(d,g,x){let b=d;if(d&&!x&&typeof d=="object"){if(j.endsWith(g,"{}"))g=n?g:g.slice(0,-2),d=JSON.stringify(d);else if(j.isArray(d)&&Rx(d)||(j.isFileList(d)||j.endsWith(g,"[]"))&&(b=j.toArray(d)))return g=zc(g),b.forEach(function(w,_){!(j.isUndefined(w)||w===null)&&t.append(s===!0?Hc([g],_,i):s===null?g:g+"[]",u(w))}),!1}return Ps(d)?!0:(t.append(Hc(x,g,i),u(d)),!1)}const f=[],h=Object.assign(Vx,{defaultVisitor:c,convertValue:u,isVisitable:Ps});function p(d,g){if(!j.isUndefined(d)){if(f.indexOf(d)!==-1)throw Error("Circular reference detected in "+g.join("."));f.push(d),j.forEach(d,function(b,v){(!(j.isUndefined(b)||b===null)&&o.call(t,b,j.isString(v)?v.trim():v,g,h))===!0&&p(b,g?g.concat(v):[v])}),f.pop()}}if(!j.isObject(e))throw new TypeError("data must be an object");return p(e),t}function qc(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Ds(e,t){this._pairs=[],e&&Lo(e,this,t)}const Wc=Ds.prototype;Wc.append=function(t,r){this._pairs.push([t,r])},Wc.toString=function(t){const r=t?function(n){return t.call(this,n,qc)}:qc;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function Bx(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Kc(e,t,r){if(!t)return e;const n=r&&r.encode||Bx;j.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(o?i=o(t,r):i=j.isURLSearchParams(t)?t.toString():new Ds(t,r).toString(n),i){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Yc{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){j.forEach(this.handlers,function(n){n!==null&&t(n)})}}const Jc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ux={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Ds,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Is=typeof window<"u"&&typeof document<"u",Ms=typeof navigator=="object"&&navigator||void 0,zx=Is&&(!Ms||["ReactNative","NativeScript","NS"].indexOf(Ms.product)<0),Hx=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",qx=Is&&window.location.href||"http://localhost",He={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Is,hasStandardBrowserEnv:zx,hasStandardBrowserWebWorkerEnv:Hx,navigator:Ms,origin:qx},Symbol.toStringTag,{value:"Module"})),...Ux};function Wx(e,t){return Lo(e,new He.classes.URLSearchParams,Object.assign({visitor:function(r,n,o,i){return He.isNode&&j.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function Kx(e){return j.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Yx(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}function Xc(e){function t(r,n,o,i){let s=r[i++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),l=i>=r.length;return s=!s&&j.isArray(o)?o.length:s,l?(j.hasOwnProp(o,s)?o[s]=[o[s],n]:o[s]=n,!a):((!o[s]||!j.isObject(o[s]))&&(o[s]=[]),t(r,n,o[s],i)&&j.isArray(o[s])&&(o[s]=Yx(o[s])),!a)}if(j.isFormData(e)&&j.isFunction(e.entries)){const r={};return j.forEachEntry(e,(n,o)=>{t(Kx(n),o,r,0)}),r}return null}function Jx(e,t,r){if(j.isString(e))try{return(t||JSON.parse)(e),j.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(0,JSON.stringify)(e)}const kn={transitional:Jc,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,i=j.isObject(t);if(i&&j.isHTMLForm(t)&&(t=new FormData(t)),j.isFormData(t))return o?JSON.stringify(Xc(t)):t;if(j.isArrayBuffer(t)||j.isBuffer(t)||j.isStream(t)||j.isFile(t)||j.isBlob(t)||j.isReadableStream(t))return t;if(j.isArrayBufferView(t))return t.buffer;if(j.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Wx(t,this.formSerializer).toString();if((a=j.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Lo(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||o?(r.setContentType("application/json",!1),Jx(t)):t}],transformResponse:[function(t){const r=this.transitional||kn.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(j.isResponse(t)||j.isReadableStream(t))return t;if(t&&j.isString(t)&&(n&&!this.responseType||o)){const s=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(a){if(s)throw a.name==="SyntaxError"?ee.from(a,ee.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:He.classes.FormData,Blob:He.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};j.forEach(["delete","get","head","post","put","patch"],e=>{kn.headers[e]={}});const Xx=j.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Gx=e=>{const t={};let r,n,o;return e&&e.split(`
60
- `).forEach(function(s){o=s.indexOf(":"),r=s.substring(0,o).trim().toLowerCase(),n=s.substring(o+1).trim(),!(!r||t[r]&&Xx[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},Gc=Symbol("internals");function Cn(e){return e&&String(e).trim().toLowerCase()}function Po(e){return e===!1||e==null?e:j.isArray(e)?e.map(Po):String(e)}function Qx(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const Zx=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Rs(e,t,r,n,o){if(j.isFunction(n))return n.call(this,t,r);if(o&&(t=r),!!j.isString(t)){if(j.isString(n))return t.indexOf(n)!==-1;if(j.isRegExp(n))return n.test(t)}}function ev(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function tv(e,t){const r=j.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(o,i,s){return this[n].call(this,t,o,i,s)},configurable:!0})})}class rt{constructor(t){t&&this.set(t)}set(t,r,n){const o=this;function i(a,l,u){const c=Cn(l);if(!c)throw new Error("header name must be a non-empty string");const f=j.findKey(o,c);(!f||o[f]===void 0||u===!0||u===void 0&&o[f]!==!1)&&(o[f||l]=Po(a))}const s=(a,l)=>j.forEach(a,(u,c)=>i(u,c,l));if(j.isPlainObject(t)||t instanceof this.constructor)s(t,r);else if(j.isString(t)&&(t=t.trim())&&!Zx(t))s(Gx(t),r);else if(j.isHeaders(t))for(const[a,l]of t.entries())i(l,a,n);else t!=null&&i(r,t,n);return this}get(t,r){if(t=Cn(t),t){const n=j.findKey(this,t);if(n){const o=this[n];if(!r)return o;if(r===!0)return Qx(o);if(j.isFunction(r))return r.call(this,o,n);if(j.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Cn(t),t){const n=j.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Rs(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let o=!1;function i(s){if(s=Cn(s),s){const a=j.findKey(n,s);a&&(!r||Rs(n,n[a],a,r))&&(delete n[a],o=!0)}}return j.isArray(t)?t.forEach(i):i(t),o}clear(t){const r=Object.keys(this);let n=r.length,o=!1;for(;n--;){const i=r[n];(!t||Rs(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const r=this,n={};return j.forEach(this,(o,i)=>{const s=j.findKey(n,i);if(s){r[s]=Po(o),delete r[i];return}const a=t?ev(i):String(i).trim();a!==i&&delete r[i],r[a]=Po(o),n[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return j.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=t&&j.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
61
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(o=>n.set(o)),n}static accessor(t){const n=(this[Gc]=this[Gc]={accessors:{}}).accessors,o=this.prototype;function i(s){const a=Cn(s);n[a]||(tv(o,s),n[a]=!0)}return j.isArray(t)?t.forEach(i):i(t),this}}rt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),j.reduceDescriptors(rt.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}}),j.freezeMethods(rt);function Vs(e,t){const r=this||kn,n=t||r,o=rt.from(n.headers);let i=n.data;return j.forEach(e,function(a){i=a.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function Qc(e){return!!(e&&e.__CANCEL__)}function Mr(e,t,r){ee.call(this,e??"canceled",ee.ERR_CANCELED,t,r),this.name="CanceledError"}j.inherits(Mr,ee,{__CANCEL__:!0});function Zc(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new ee("Request failed with status code "+r.status,[ee.ERR_BAD_REQUEST,ee.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function rv(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function nv(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o=0,i=0,s;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=n[i];s||(s=u),r[o]=l,n[o]=u;let f=i,h=0;for(;f!==o;)h+=r[f++],f=f%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),u-s<t)return;const p=c&&u-c;return p?Math.round(h*1e3/p):void 0}}function ov(e,t){let r=0,n=1e3/t,o,i;const s=(u,c=Date.now())=>{r=c,o=null,i&&(clearTimeout(i),i=null),e.apply(null,u)};return[(...u)=>{const c=Date.now(),f=c-r;f>=n?s(u,c):(o=u,i||(i=setTimeout(()=>{i=null,s(o)},n-f)))},()=>o&&s(o)]}const Do=(e,t,r=3)=>{let n=0;const o=nv(50,250);return ov(i=>{const s=i.loaded,a=i.lengthComputable?i.total:void 0,l=s-n,u=o(l),c=s<=a;n=s;const f={loaded:s,total:a,progress:a?s/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&c?(a-s)/u:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(f)},r)},ef=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},tf=e=>(...t)=>j.asap(()=>e(...t)),iv=He.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,He.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(He.origin),He.navigator&&/(msie|trident)/i.test(He.navigator.userAgent)):()=>!0,sv=He.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const s=[e+"="+encodeURIComponent(t)];j.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),j.isString(n)&&s.push("path="+n),j.isString(o)&&s.push("domain="+o),i===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function av(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function lv(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function rf(e,t,r){let n=!av(t);return e&&(n||r==!1)?lv(e,t):t}const nf=e=>e instanceof rt?{...e}:e;function br(e,t){t=t||{};const r={};function n(u,c,f,h){return j.isPlainObject(u)&&j.isPlainObject(c)?j.merge.call({caseless:h},u,c):j.isPlainObject(c)?j.merge({},c):j.isArray(c)?c.slice():c}function o(u,c,f,h){if(j.isUndefined(c)){if(!j.isUndefined(u))return n(void 0,u,f,h)}else return n(u,c,f,h)}function i(u,c){if(!j.isUndefined(c))return n(void 0,c)}function s(u,c){if(j.isUndefined(c)){if(!j.isUndefined(u))return n(void 0,u)}else return n(void 0,c)}function a(u,c,f){if(f in t)return n(u,c);if(f in e)return n(void 0,u)}const l={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(u,c,f)=>o(nf(u),nf(c),f,!0)};return j.forEach(Object.keys(Object.assign({},e,t)),function(c){const f=l[c]||o,h=f(e[c],t[c],c);j.isUndefined(h)&&f!==a||(r[c]=h)}),r}const of=e=>{const t=br({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:a}=t;t.headers=s=rt.from(s),t.url=Kc(rf(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(j.isFormData(r)){if(He.hasStandardBrowserEnv||He.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((l=s.getContentType())!==!1){const[u,...c]=l?l.split(";").map(f=>f.trim()).filter(Boolean):[];s.setContentType([u||"multipart/form-data",...c].join("; "))}}if(He.hasStandardBrowserEnv&&(n&&j.isFunction(n)&&(n=n(t)),n||n!==!1&&iv(t.url))){const u=o&&i&&sv.read(i);u&&s.set(o,u)}return t},uv=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,n){const o=of(e);let i=o.data;const s=rt.from(o.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=o,c,f,h,p,d;function g(){p&&p(),d&&d(),o.cancelToken&&o.cancelToken.unsubscribe(c),o.signal&&o.signal.removeEventListener("abort",c)}let x=new XMLHttpRequest;x.open(o.method.toUpperCase(),o.url,!0),x.timeout=o.timeout;function b(){if(!x)return;const w=rt.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),k={data:!a||a==="text"||a==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:w,config:e,request:x};Zc(function(C){r(C),g()},function(C){n(C),g()},k),x=null}"onloadend"in x?x.onloadend=b:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.indexOf("file:")===0)||setTimeout(b)},x.onabort=function(){x&&(n(new ee("Request aborted",ee.ECONNABORTED,e,x)),x=null)},x.onerror=function(){n(new ee("Network Error",ee.ERR_NETWORK,e,x)),x=null},x.ontimeout=function(){let _=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const k=o.transitional||Jc;o.timeoutErrorMessage&&(_=o.timeoutErrorMessage),n(new ee(_,k.clarifyTimeoutError?ee.ETIMEDOUT:ee.ECONNABORTED,e,x)),x=null},i===void 0&&s.setContentType(null),"setRequestHeader"in x&&j.forEach(s.toJSON(),function(_,k){x.setRequestHeader(k,_)}),j.isUndefined(o.withCredentials)||(x.withCredentials=!!o.withCredentials),a&&a!=="json"&&(x.responseType=o.responseType),u&&([h,d]=Do(u,!0),x.addEventListener("progress",h)),l&&x.upload&&([f,p]=Do(l),x.upload.addEventListener("progress",f),x.upload.addEventListener("loadend",p)),(o.cancelToken||o.signal)&&(c=w=>{x&&(n(!w||w.type?new Mr(null,e,x):w),x.abort(),x=null)},o.cancelToken&&o.cancelToken.subscribe(c),o.signal&&(o.signal.aborted?c():o.signal.addEventListener("abort",c)));const v=rv(o.url);if(v&&He.protocols.indexOf(v)===-1){n(new ee("Unsupported protocol "+v+":",ee.ERR_BAD_REQUEST,e));return}x.send(i||null)})},cv=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,o;const i=function(u){if(!o){o=!0,a();const c=u instanceof Error?u:this.reason;n.abort(c instanceof ee?c:new Mr(c instanceof Error?c.message:c))}};let s=t&&setTimeout(()=>{s=null,i(new ee(`timeout ${t} of ms exceeded`,ee.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:l}=n;return l.unsubscribe=()=>j.asap(a),l}},fv=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,o;for(;n<r;)o=n+t,yield e.slice(n,o),n=o},dv=async function*(e,t){for await(const r of pv(e))yield*fv(r,t)},pv=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},sf=(e,t,r,n)=>{const o=dv(e,t);let i=0,s,a=l=>{s||(s=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await o.next();if(u){a(),l.close();return}let f=c.byteLength;if(r){let h=i+=f;r(h)}l.enqueue(new Uint8Array(c))}catch(u){throw a(u),u}},cancel(l){return a(l),o.return()}},{highWaterMark:2})},Io=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",af=Io&&typeof ReadableStream=="function",mv=Io&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),lf=(e,...t)=>{try{return!!e(...t)}catch{return!1}},hv=af&&lf(()=>{let e=!1;const t=new Request(He.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),uf=64*1024,Bs=af&&lf(()=>j.isReadableStream(new Response("").body)),Mo={stream:Bs&&(e=>e.body)};Io&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Mo[t]&&(Mo[t]=j.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new ee(`Response type '${t}' is not supported`,ee.ERR_NOT_SUPPORT,n)})})})(new Response);const gv=async e=>{if(e==null)return 0;if(j.isBlob(e))return e.size;if(j.isSpecCompliantForm(e))return(await new Request(He.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(j.isArrayBufferView(e)||j.isArrayBuffer(e))return e.byteLength;if(j.isURLSearchParams(e)&&(e=e+""),j.isString(e))return(await mv(e)).byteLength},yv=async(e,t)=>{const r=j.toFiniteNumber(e.getContentLength());return r??gv(t)},Us={http:Mx,xhr:uv,fetch:Io&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:i,timeout:s,onDownloadProgress:a,onUploadProgress:l,responseType:u,headers:c,withCredentials:f="same-origin",fetchOptions:h}=of(e);u=u?(u+"").toLowerCase():"text";let p=cv([o,i&&i.toAbortSignal()],s),d;const g=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let x;try{if(l&&hv&&r!=="get"&&r!=="head"&&(x=await yv(c,n))!==0){let k=new Request(t,{method:"POST",body:n,duplex:"half"}),S;if(j.isFormData(n)&&(S=k.headers.get("content-type"))&&c.setContentType(S),k.body){const[C,A]=ef(x,Do(tf(l)));n=sf(k.body,uf,C,A)}}j.isString(f)||(f=f?"include":"omit");const b="credentials"in Request.prototype;d=new Request(t,{...h,signal:p,method:r.toUpperCase(),headers:c.normalize().toJSON(),body:n,duplex:"half",credentials:b?f:void 0});let v=await fetch(d);const w=Bs&&(u==="stream"||u==="response");if(Bs&&(a||w&&g)){const k={};["status","statusText","headers"].forEach(N=>{k[N]=v[N]});const S=j.toFiniteNumber(v.headers.get("content-length")),[C,A]=a&&ef(S,Do(tf(a),!0))||[];v=new Response(sf(v.body,uf,C,()=>{A&&A(),g&&g()}),k)}u=u||"text";let _=await Mo[j.findKey(Mo,u)||"text"](v,e);return!w&&g&&g(),await new Promise((k,S)=>{Zc(k,S,{data:_,headers:rt.from(v.headers),status:v.status,statusText:v.statusText,config:e,request:d})})}catch(b){throw g&&g(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new ee("Network Error",ee.ERR_NETWORK,e,d),{cause:b.cause||b}):ee.from(b,b&&b.code,e,d)}})};j.forEach(Us,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const cf=e=>`- ${e}`,bv=e=>j.isFunction(e)||e===null||e===!1,ff={getAdapter:e=>{e=j.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let i=0;i<t;i++){r=e[i];let s;if(n=r,!bv(r)&&(n=Us[(s=String(r)).toLowerCase()],n===void 0))throw new ee(`Unknown adapter '${s}'`);if(n)break;o[s||"#"+i]=n}if(!n){const i=Object.entries(o).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=t?i.length>1?`since :
59
+ `+(a!==s?`result of cast: ${a}`:""))}return i}_cast(t,r){let n=t===void 0?t:this.transforms.reduce((o,i)=>i.call(this,o,t,this),t);return n===void 0&&(n=this.getDefault(r)),n}_validate(t,r={},n,o){let{path:i,originalValue:s=t,strict:a=this.spec.strict}=r,l=t;a||(l=this._cast(l,Object.assign({assert:!1},r)));let u=[];for(let c of Object.values(this.internalTests))c&&u.push(c);this.runTests({path:i,value:l,originalValue:s,options:r,tests:u},n,c=>{if(c.length)return o(c,l);this.runTests({path:i,value:l,originalValue:s,options:r,tests:this.tests},n,o)})}runTests(t,r,n){let o=!1,{tests:i,value:s,originalValue:a,path:l,options:u}=t,c=g=>{o||(o=!0,r(g,s))},f=g=>{o||(o=!0,n(g,s))},h=i.length,p=[];if(!h)return f([]);let d={value:s,originalValue:a,path:l,options:u,schema:this};for(let g=0;g<i.length;g++){const x=i[g];x(d,c,function(v){v&&(Array.isArray(v)?p.push(...v):p.push(v)),--h<=0&&f(p)})}}asNestedTest({key:t,index:r,parent:n,parentPath:o,originalParent:i,options:s}){const a=t??r;if(a==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof a=="number";let u=n[a];const c=Object.assign({},s,{strict:!0,parent:n,value:u,originalValue:i[a],key:void 0,[l?"index":"key"]:a,path:l||a.includes(".")?`${o||""}[${l?a:`"${a}"`}]`:(o?`${o}.`:"")+t});return(f,h,p)=>this.resolve(c)._validate(u,c,h,p)}validate(t,r){var n;let o=this.resolve(Object.assign({},r,{value:t})),i=(n=r==null?void 0:r.disableStackTrace)!=null?n:o.spec.disableStackTrace;return new Promise((s,a)=>o._validate(t,r,(l,u)=>{Ze.isError(l)&&(l.value=u),a(l)},(l,u)=>{l.length?a(new Ze(l,u,void 0,void 0,i)):s(u)}))}validateSync(t,r){var n;let o=this.resolve(Object.assign({},r,{value:t})),i,s=(n=r==null?void 0:r.disableStackTrace)!=null?n:o.spec.disableStackTrace;return o._validate(t,Object.assign({},r,{sync:!0}),(a,l)=>{throw Ze.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new Ze(a,t,void 0,void 0,s);i=l}),i}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(Ze.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(Ze.isError(n))return!1;throw n}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):Dr(r)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,r){const n=this.clone({nullable:t});return n.internalTests.nullable=Lr({message:r,name:"nullable",test(o){return o===null?this.schema.spec.nullable:!0}}),n}optionality(t,r){const n=this.clone({optional:t});return n.internalTests.optionality=Lr({message:r,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(t=jt.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=jt.notNull){return this.nullability(!1,t)}required(t=jt.required){return this.clone().withMutation(r=>r.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let r=this.clone();return r.transforms.push(t),r}test(...t){let r;if(t.length===1?typeof t[0]=="function"?r={test:t[0]}:r=t[0]:t.length===2?r={name:t[0],test:t[1]}:r={name:t[0],message:t[1],test:t[2]},r.message===void 0&&(r.message=jt.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),o=Lr(r),i=r.exclusive||r.name&&n.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(n.exclusiveTests[r.name]=!!r.exclusive),n.tests=n.tests.filter(s=>!(s.OPTIONS.name===r.name&&(i||s.OPTIONS.test===o.OPTIONS.test))),n.tests.push(o),n}when(t,r){!Array.isArray(t)&&typeof t!="string"&&(r=t,t=".");let n=this.clone(),o=pc(t).map(i=>new gr(i));return o.forEach(i=>{i.isSibling&&n.deps.push(i.key)}),n.conditions.push(typeof r=="function"?new ko(o,r):ko.fromOptions(o,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=Lr({message:t,name:"typeError",skipAbsent:!0,test(n){return this.schema._typeCheck(n)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(t,r=jt.oneOf){let n=this.clone();return t.forEach(o=>{n._whitelist.add(o),n._blacklist.delete(o)}),n.internalTests.whiteList=Lr({message:r,name:"oneOf",skipAbsent:!0,test(o){let i=this.schema._whitelist,s=i.resolveAll(this.resolve);return s.includes(o)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:s}})}}),n}notOneOf(t,r=jt.notOneOf){let n=this.clone();return t.forEach(o=>{n._blacklist.add(o),n._whitelist.delete(o)}),n.internalTests.blacklist=Lr({message:r,name:"notOneOf",test(o){let i=this.schema._blacklist,s=i.resolveAll(this.resolve);return s.includes(o)?this.createError({params:{values:Array.from(i).join(", "),resolved:s}}):!0}}),n}strip(t=!0){let r=this.clone();return r.spec.strip=t,r}describe(t){const r=(t?this.resolve(t):this).clone(),{label:n,meta:o,optional:i,nullable:s}=r.spec;return{meta:o,label:n,optional:i,nullable:s,default:r.getDefault(t),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,u,c)=>c.findIndex(f=>f.name===l.name)===u)}}}tt.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])tt.prototype[`${e}At`]=function(t,r,n={}){const{parent:o,parentPath:i,schema:s}=wb(this,t,r,n.context);return s[e](o&&o[i],Object.assign({},n,{parent:o,path:t}))};for(const e of["equals","is"])tt.prototype[e]=tt.prototype.oneOf;for(const e of["not","nope"])tt.prototype[e]=tt.prototype.notOneOf;const Eb=()=>!0;function vn(e){return new bc(e)}class bc extends tt{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:Eb},t))}}vn.prototype=bc.prototype;function Fo(){return new xc}class xc extends tt{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(n.spec.coerce&&!n.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=As.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return bt(r)||r===!0}})}isFalse(t=As.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return bt(r)||r===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}Fo.prototype=xc.prototype;const Tb=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function _b(e){const t=js(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let r=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(r=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(r=0-r)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+r,t.second,t.millisecond)}function js(e){var t,r;const n=Tb.exec(e);return n?{year:Ut(n[1]),month:Ut(n[2],1)-1,day:Ut(n[3],1),hour:Ut(n[4]),minute:Ut(n[5]),second:Ut(n[6]),millisecond:n[7]?Ut(n[7].substring(0,3)):0,precision:(t=(r=n[7])==null?void 0:r.length)!=null?t:void 0,z:n[8]||void 0,plusMinus:n[9]||void 0,hourOffset:Ut(n[10]),minuteOffset:Ut(n[11])}:null}function Ut(e,t=0){return Number(e)||t}let Sb=/^[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])?)*$/,kb=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Cb=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Ob="^\\d{4}-\\d{2}-\\d{2}",Fb="\\d{2}:\\d{2}:\\d{2}",Ab="(([+-]\\d{2}(:?\\d{2})?)|Z)",jb=new RegExp(`${Ob}T${Fb}(\\.\\d+)?${Ab}$`),$b=e=>bt(e)||e===e.trim(),Nb={}.toString();function be(){return new vc}class vc extends tt{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce||n.isType(t)||Array.isArray(t))return t;const o=t!=null&&t.toString?t.toString():t;return o===Nb?t:o})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||jt.required,name:"required",skipAbsent:!0,test:n=>!!n.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(r=>r.OPTIONS.name!=="required"),t))}length(t,r=et.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(n){return n.length===this.resolve(t)}})}min(t,r=et.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n.length>=this.resolve(t)}})}max(t,r=et.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:t},skipAbsent:!0,test(n){return n.length<=this.resolve(t)}})}matches(t,r){let n=!1,o,i;return r&&(typeof r=="object"?{excludeEmptyString:n=!1,message:o,name:i}=r:o=r),this.test({name:i||"matches",message:o||et.matches,params:{regex:t},skipAbsent:!0,test:s=>s===""&&n||s.search(t)!==-1})}email(t=et.email){return this.matches(Sb,{name:"email",message:t,excludeEmptyString:!0})}url(t=et.url){return this.matches(kb,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=et.uuid){return this.matches(Cb,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let r="",n,o;return t&&(typeof t=="object"?{message:r="",allowOffset:n=!1,precision:o=void 0}=t:r=t),this.matches(jb,{name:"datetime",message:r||et.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||et.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:i=>{if(!i||n)return!0;const s=js(i);return s?!!s.z:!1}}).test({name:"datetime_precision",message:r||et.datetime_precision,params:{precision:o},skipAbsent:!0,test:i=>{if(!i||o==null)return!0;const s=js(i);return s?s.precision===o:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=et.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:$b})}lowercase(t=et.lowercase){return this.transform(r=>bt(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>bt(r)||r===r.toLowerCase()})}uppercase(t=et.uppercase){return this.transform(r=>bt(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>bt(r)||r===r.toUpperCase()})}}be.prototype=vc.prototype;let Pb=e=>e!=+e;function wn(){return new wc}class wc extends tt{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Pb(t)}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce)return t;let o=t;if(typeof o=="string"){if(o=o.replace(/\s/g,""),o==="")return NaN;o=+o}return n.isType(o)||o===null?o:parseFloat(o)})})}min(t,r=Zt.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n>=this.resolve(t)}})}max(t,r=Zt.max){return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(n){return n<=this.resolve(t)}})}lessThan(t,r=Zt.lessThan){return this.test({message:r,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(n){return n<this.resolve(t)}})}moreThan(t,r=Zt.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(n){return n>this.resolve(t)}})}positive(t=Zt.positive){return this.moreThan(0,t)}negative(t=Zt.negative){return this.lessThan(0,t)}integer(t=Zt.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(t=>bt(t)?t:t|0)}round(t){var r;let n=["ceil","floor","round","trunc"];if(t=((r=t)==null?void 0:r.toLowerCase())||"round",t==="trunc")return this.truncate();if(n.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(o=>bt(o)?o:Math[t](o))}}wn.prototype=wc.prototype;let Ec=new Date(""),Lb=e=>Object.prototype.toString.call(e)==="[object Date]";function $s(){return new En}class En extends tt{constructor(){super({type:"date",check(t){return Lb(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=_b(t),isNaN(t)?En.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if(gr.isRef(t))n=t;else{let o=this.cast(t);if(!this._typeCheck(o))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);n=o}return n}min(t,r=Fs.min){let n=this.prepareParam(t,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o>=this.resolve(n)}})}max(t,r=Fs.max){let n=this.prepareParam(t,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(o){return o<=this.resolve(n)}})}}En.INVALID_DATE=Ec,$s.prototype=En.prototype,$s.INVALID_DATE=Ec;function Db(e,t=[]){let r=[],n=new Set,o=new Set(t.map(([s,a])=>`${s}-${a}`));function i(s,a){let l=hr.split(s)[0];n.add(l),o.has(`${a}-${l}`)||r.push([a,l])}for(const s of Object.keys(e)){let a=e[s];n.add(s),gr.isRef(a)&&a.isSibling?i(a.path,s):So(a)&&"deps"in a&&a.deps.forEach(l=>i(l,s))}return pb.array(Array.from(n),r).reverse()}function Tc(e,t){let r=1/0;return e.some((n,o)=>{var i;if((i=t.path)!=null&&i.includes(n))return r=o,!0}),r}function _c(e){return(t,r)=>Tc(e,t)-Tc(e,r)}const Sc=(e,t,r)=>{if(typeof e!="string")return e;let n=e;try{n=JSON.parse(e)}catch{}return r.isType(n)?n:e};function Ao(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=Ao(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Ao(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Ao)}):"optional"in e?e.optional():e}const Ib=(e,t)=>{const r=[...hr.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),o=hr.getter(hr.join(r),!0)(e);return!!(o&&n in o)};let kc=e=>Object.prototype.toString.call(e)==="[object Object]";function Cc(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const Mb=_c([]);function Tn(e){return new Oc(e)}class Oc extends tt{constructor(t){super({type:"object",check(r){return kc(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=Mb,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,r={}){var n;let o=super._cast(t,r);if(o===void 0)return this.getDefault(r);if(!this._typeCheck(o))return o;let i=this.fields,s=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(o).filter(f=>!this._nodes.includes(f))),l={},u=Object.assign({},r,{parent:l,__validating:r.__validating||!1}),c=!1;for(const f of a){let h=i[f],p=f in o;if(h){let d,g=o[f];u.path=(r.path?`${r.path}.`:"")+f,h=h.resolve({value:g,context:r.context,parent:l});let x=h instanceof tt?h.spec:void 0,b=x==null?void 0:x.strict;if(x!=null&&x.strip){c=c||f in o;continue}d=!r.__validating||!b?h.cast(o[f],u):o[f],d!==void 0&&(l[f]=d)}else p&&!s&&(l[f]=o[f]);(p!==f in l||l[f]!==o[f])&&(c=!0)}return c?l:o}_validate(t,r={},n,o){let{from:i=[],originalValue:s=t,recursive:a=this.spec.recursive}=r;r.from=[{schema:this,value:s},...i],r.__validating=!0,r.originalValue=s,super._validate(t,r,n,(l,u)=>{if(!a||!kc(u)){o(l,u);return}s=s||u;let c=[];for(let f of this._nodes){let h=this.fields[f];!h||gr.isRef(h)||c.push(h.asNestedTest({options:r,key:f,parent:u,parentPath:r.path,originalParent:s}))}this.runTests({tests:c,value:u,originalValue:s,options:r},n,f=>{o(f.sort(this._sortErrors).concat(l),u)})})}clone(t){const r=super.clone(t);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(t){let r=super.concat(t),n=r.fields;for(let[o,i]of Object.entries(this.fields)){const s=n[o];n[o]=s===void 0?i:s}return r.withMutation(o=>o.setFields(n,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let r={};return this._nodes.forEach(n=>{var o;const i=this.fields[n];let s=t;(o=s)!=null&&o.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[n]})),r[n]=i&&"getDefault"in i?i.getDefault(s):void 0}),r}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=Db(t,r),n._sortErrors=_c(Object.keys(t)),r&&(n._excludedEdges=r),n}shape(t,r=[]){return this.clone().withMutation(n=>{let o=n._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),o=[...n._excludedEdges,...r]),n.setFields(Object.assign(n.fields,t),o)})}partial(){const t={};for(const[r,n]of Object.entries(this.fields))t[r]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(t)}deepPartial(){return Ao(this)}pick(t){const r={};for(const n of t)this.fields[n]&&(r[n]=this.fields[n]);return this.setFields(r,this._excludedEdges.filter(([n,o])=>t.includes(n)&&t.includes(o)))}omit(t){const r=[];for(const n of Object.keys(this.fields))t.includes(n)||r.push(n);return this.pick(r)}from(t,r,n){let o=hr.getter(t,!0);return this.transform(i=>{if(!i)return i;let s=i;return Ib(i,t)&&(s=Object.assign({},i),n||delete s[t],s[r]=o(i)),s})}json(){return this.transform(Sc)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||To.exact,test(r){if(r==null)return!0;const n=Cc(this.schema,r);return n.length===0||this.createError({params:{properties:n.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,r=To.noUnknown){typeof t!="boolean"&&(r=t,t=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:r,test(o){if(o==null)return!0;const i=Cc(this.schema,o);return!t||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=To.noUnknown){return this.noUnknown(!t,r)}transformKeys(t){return this.transform(r=>{if(!r)return r;const n={};for(const o of Object.keys(r))n[t(o)]=r[o];return n})}camelCase(){return this.transformKeys(Os.camelCase)}snakeCase(){return this.transformKeys(Os.snakeCase)}constantCase(){return this.transformKeys(t=>Os.snakeCase(t).toUpperCase())}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);n.fields={};for(const[i,s]of Object.entries(r.fields)){var o;let a=t;(o=a)!=null&&o.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[i]})),n.fields[i]=s.describe(a)}return n}}Tn.prototype=Oc.prototype;function Fc(e){return new Ac(e)}class Ac extends tt{constructor(t){super({type:"array",spec:{types:t},check(r){return Array.isArray(r)}}),this.innerType=void 0,this.innerType=t}_cast(t,r){const n=super._cast(t,r);if(!this._typeCheck(n)||!this.innerType)return n;let o=!1;const i=n.map((s,a)=>{const l=this.innerType.cast(s,Object.assign({},r,{path:`${r.path||""}[${a}]`}));return l!==s&&(o=!0),l});return o?i:n}_validate(t,r={},n,o){var i;let s=this.innerType,a=(i=r.recursive)!=null?i:this.spec.recursive;r.originalValue!=null&&r.originalValue,super._validate(t,r,n,(l,u)=>{var c;if(!a||!s||!this._typeCheck(u)){o(l,u);return}let f=new Array(u.length);for(let p=0;p<u.length;p++){var h;f[p]=s.asNestedTest({options:r,index:p,parent:u,parentPath:r.path,originalParent:(h=r.originalValue)!=null?h:t})}this.runTests({value:u,tests:f,originalValue:(c=r.originalValue)!=null?c:t,options:r},n,p=>o(p.concat(l),u))})}clone(t){const r=super.clone(t);return r.innerType=this.innerType,r}json(){return this.transform(Sc)}concat(t){let r=super.concat(t);return r.innerType=this.innerType,t.innerType&&(r.innerType=r.innerType?r.innerType.concat(t.innerType):t.innerType),r}of(t){let r=this.clone();if(!So(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+Bt(t));return r.innerType=t,r.spec=Object.assign({},r.spec,{types:t}),r}length(t,r=_o.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(n){return n.length===this.resolve(t)}})}min(t,r){return r=r||_o.min,this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n.length>=this.resolve(t)}})}max(t,r){return r=r||_o.max,this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(n){return n.length<=this.resolve(t)}})}ensure(){return this.default(()=>[]).transform((t,r)=>this._typeCheck(t)?t:r==null?[]:[].concat(r))}compact(t){let r=t?(n,o,i)=>!t(n,o,i):n=>!!n;return this.transform(n=>n!=null?n.filter(r):n)}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);if(r.innerType){var o;let i=t;(o=i)!=null&&o.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[0]})),n.innerType=r.innerType.describe(i)}return n}}Fc.prototype=Ac.prototype;const Rb=({tabs:e,className:t="",count:r={},setActiveTab:n,activeTab:o,btnClass:i=""})=>{const s=ut("flex gap-x-3 mb-8 w-full no-scrollbar overflow-x-auto border-b border-[#EAECF0] darks:border-gray-500",t);return y.jsx("div",{className:s,children:e.map(a=>{const l=o===a.key,u=r[a.key]||0,c=ut("capitalize text-xs whitespace-nowrap no-scrollbar md:text-sm font-semibold pb-[14px] border-b-2 px-6 flex items-center justify-center gap-x-1 flex-1 text-center",i),f=ut({"border-gray-400 darks:border-white !text-primary darks:!text-white":l,"border-transparent text-[#667085] darks:!text-white/60":!l}),h=u>0&&y.jsx("span",{className:"text-xs h-6 min-w-[24px] rounded-full flex justify-center items-center border border-[#EAECF0] darks:border-gray-500 bg-[#F9FAFB] darks:bg-gray-800 text-[#454745] darks:text-white/80",children:u});return y.jsxs("button",{onClick:()=>n(a.key),className:ut(c,f),"aria-selected":l,role:"tab",type:"button",children:[a.title,h]},a.key)})})},Vb=[{type:"textField",label:"Short Text",icon:"fluent:text-16-filled",inputLabel:"Short Text Label",required:!1,inputType:"text",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null},{type:"longText",label:"Long Text",icon:"dashicons:text",inputLabel:"Long Text Label",required:!1,inputType:"text",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null},{type:"selectField",label:"Select List",icon:"tabler:select",inputLabel:"Select Text Label",required:!1,inputType:"select",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,options:[]},{type:"multiSelect",label:"MultiSelect",icon:"fluent-mdl2:multi-select",inputLabel:"Select Text Label",required:!1,inputType:"select",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,options:[]},{type:"validateInput",label:"Validate Input",icon:"iconoir:www",inputLabel:"Validate Input Label",required:!1,inputType:"validateInput",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Value is required",minLengthMessage:"",maxLengthMessage:"",value:null,url:"https://api.example.com/validate?value={value}",method:"GET",responseType:"string"},{type:"numberField",label:"Number",icon:"octicon:number-16",inputLabel:"Number Label",required:!1,inputType:"number",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null},{type:"amountField",label:"Amount",icon:"carbon:currency",inputLabel:"Enter amount",required:!1,inputType:"amount",maxAmount:null,minAmount:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minAmountMessage:"",maxAmountMessage:"",value:null,prefix:null},{type:"date",label:"Date",icon:"bx:calendar",inputLabel:"Date Text Label",required:!1,inputType:"date",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null},{type:"password",label:"Password",icon:"ic:round-password",inputLabel:"Password Text Label",required:!1,inputType:"password",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null},{type:"checkbox",label:"Checkbox",icon:"mingcute:checkbox-line",inputLabel:"Checkbox Text Label",required:!1,inputType:"checkbox",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,options:[]},{type:"radio",label:"Radio select",icon:"ri:checkbox-circle-line",inputLabel:"Radio Text Label",required:!1,inputType:"radio",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,options:[]},{type:"email",label:"Email",icon:"mdi:email-outline",inputLabel:"Email Text Label",required:!1,inputType:"email",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null},{type:"file",label:"File Attachment",icon:"ion:attach-sharp",inputLabel:"File Text Label",required:!1,inputType:"file",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null},{type:"tableInput",label:"Table Input",icon:"iconoir:table",inputLabel:"Table Input Label",required:!1,inputType:"tableInput",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Value is required",minLengthMessage:"",maxLengthMessage:"",value:[],denominators:null},{type:"grid",label:"Grid",icon:"cuida:grid-outline",inputLabel:"Grid Text Label",inputType:"grid",placeholder:"Type here",description:"",grid:2,gridData:[]}],Bb=["amount"],Ub=["text","number"],zb=["text","number","amount","date","password"],Hb=["amount"],qb=["grid","section"],Wb=["radio","select","checkbox","multiselect"],Kb=["validateInput"],Yb=["tableInput"];function Jb({value:e=[],onChange:t,onGetValue:r}){const[n,o]=m.useState((e==null?void 0:e.length)>0?e:[{value:""}]);m.useEffect(()=>{(e==null?void 0:e.length)>0&&JSON.stringify(e)!==JSON.stringify(n)&&o(e)},[e]);function i(l,u){const c=[...n];c[u]={...c[u],value:l},o(c),t&&t(c)}function s(){const l=[...n,{value:""}];o(l),t&&t(l)}function a(l){const u=n.filter((c,f)=>f!==l);o(u),t&&t(u)}return m.useEffect(()=>{r&&r(JSON.stringify({values:n}))},[r,n]),y.jsxs("div",{className:"]",children:[y.jsxs("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[y.jsx("div",{className:"grid text-sm font-bold border-b border-gray-100 bg-gray-50",children:y.jsx("div",{className:"px-2 py-2",children:y.jsx("span",{className:"",children:"Add Denominations"})})}),n.map((l,u)=>y.jsx("div",{className:"grid text-sm border-b border-gray-100",children:y.jsxs("div",{className:"flex items-center gap-x-4 px-2 py-1",children:[y.jsx("span",{className:"flex-1",children:y.jsx(yo,{id:"input-example",className:"border border-gray-100 rounded w-full px-3 py-1 outline-none",decimalsLimit:6,defaultValue:l.value,onValueChange:c=>i(c,u),allowNegativeValue:!1})}),y.jsx("button",{onClick:()=>a(u),className:"text-red-500 hover:text-red-700 px-2",type:"button","aria-label":"Remove row",children:"×"})]})},l.key+u+Math.random()))]}),y.jsx("div",{className:"mt-1 flex justify-end",children:y.jsx("button",{type:"button",onClick:s,className:"font-semibold !text-blue-700 text-sm rounded outline-0 focus:outline-0",children:"+ Add"})})]})}const Xb=()=>y.jsx("blockquote",{className:"bg-gray-100 p-4 rounded-md text-gray-700",children:y.jsxs("ul",{children:[y.jsxs("li",{className:"text-xs",children:["API URL example format: ",y.jsx("code",{children:"https://example.com/validation?value={value}"})]}),y.jsxs("li",{className:"text-xs",children:[y.jsx("span",{className:"block mb-1",children:" Response example format:"}),y.jsx("pre",{className:"bg-white p-2 rounded-md",children:y.jsxs("code",{children:["{ ",y.jsx("br",{}),'  "data": { ',y.jsx("br",{}),'    "status": true, ',y.jsx("br",{}),'    "description": "John Doe" ',y.jsx("br",{}),"  } ",y.jsx("br",{}),"}"]})})]})]})}),Gb=Tn().shape({inputLabel:be().required("Label is required"),placeholder:be().nullable(),description:be().nullable(),isReadOnly:Fo(),isDisabled:Fo(),isRequired:Fo(),requiredMessage:be().nullable(),minLengthMessage:be().nullable(),maxLengthMessage:be().nullable(),maxLength:wn().nullable(),minLength:wn().nullable(),inputType:be().nullable(),maxAmountMessage:be().nullable(),maxAmount:be().nullable(),options:Fc().of(Tn().shape({label:be().nullable(),value:be().when("label",{is:e=>e&&e.length>0,then:e=>e.required("Value is required when label is present"),otherwise:e=>e.nullable()})})).nullable(),prefix:be().nullable(),url:be().nullable(),method:be().nullable(),denominators:vn().nullable(),responseType:be().nullable(),minAmount:be().nullable()}),Qb=[{title:"Basics",key:"basic"},{title:"Validations",key:"validation"}],Zb=({isOpen:e,onClose:t,element:r})=>{const{updateElement:n}=m.useContext(mt),[o,i]=m.useState("basic"),s=Jn("config"),{register:a,handleSubmit:l,control:u,setValue:c,watch:f,trigger:h,formState:{errors:p,isSubmitting:d,isValid:g},reset:x}=_s({resolver:Ss(Gb),defaultValues:{...r,options:r.options||[]}}),{fields:b,append:v,remove:w}=Q0({control:u,name:"options"});m.useEffect(()=>{e||x()},[e,x]);const _=S=>{n(S,r.sectionId),t()},k=()=>y.jsxs("div",{className:"flex flex-col gap-y-1 justify-start",children:[b.map((S,C)=>y.jsxs("div",{className:"flex gap-x-4 items-center ",children:[y.jsx("div",{className:"flex-1",children:y.jsx(ve,{label:"Label",name:`options.${C}.label`,register:a,errors:p,element:r,placeholder:"Label",isFloating:!0})}),y.jsx("div",{className:"flex-1",children:y.jsx(ve,{label:"Value",name:`options.${C}.value`,register:a,errors:p,element:r,placeholder:"Value",isFloating:!0})})," ",y.jsx("button",{type:"button",className:"outline-none hover:opacity-80",onClick:()=>w(C),children:y.jsx(Be,{icon:"iconamoon:sign-times-fill"})})]},S.id)),y.jsxs("div",{children:[" ",y.jsxs("button",{type:"button",className:"mt-2 text-gray-700 font-medium text-sm flex gap-x-1 items-center",onClick:()=>v({label:"",value:"",id:en()}),children:[y.jsx(Be,{icon:"qlementine-icons:plus-16"})," Add Option"]})]})]});return y.jsx("div",{className:"fixed inset-0 bg-black/30 flex items-center justify-center z-[999] cursor-default no-drag select-none",children:y.jsxs("div",{className:"min-w-[600px] bg-white rounded-xl shadow-xl relative flex flex-col items-center",children:[y.jsxs("div",{className:"w-full px-6 pt-6 pb-5 flex flex-col items-start gap-4 z-10 mb-6",children:[y.jsx("h2",{className:"text-lg font-semibold text-[#475467] font-onest",children:r.label}),y.jsx("button",{onClick:t,className:"absolute right-4 top-4 p-2 text-[#98A2B3] hover:bg-gray-50 rounded-lg",children:y.jsx(Be,{icon:"tabler:x"})})]}),y.jsx("div",{className:"w-full",children:y.jsx(Rb,{tabs:Qb,setActiveTab:i,activeTab:o,className:"justify-start !text-left",btnClass:"!uppercase !text-left"})}),y.jsxs("form",{onSubmit:l(_),className:"w-full",children:[o==="basic"&&y.jsxs("div",{className:"w-full px-6 flex flex-col gap-5 z-10",children:[y.jsx(ve,{label:"Label",name:"inputLabel",register:a,errors:p,element:r}),zb.includes(r.inputType)&&y.jsx(ve,{label:"Placeholder",name:"placeholder",register:a,errors:p,element:r}),Bb.includes(r.inputType)&&y.jsx(ve,{label:"Prefix",name:"prefix",register:a,errors:p,element:r}),Kb.includes(r.inputType)&&y.jsxs(y.Fragment,{children:[y.jsx(Xb,{}),y.jsx(ve,{label:"Api Url",name:"url",register:a,errors:p,element:r}),y.jsx(is,{label:"Api Method",options:[{label:"GET",value:"GET"},{label:"POST",value:"POST"}],register:a,name:"method",setValue:c,trigger:h,value:f("method")}),y.jsx(is,{label:"Api Response type",options:[{label:"String",value:"string"},{label:"Object",value:"object"}],register:a,name:"responseType",setValue:c,trigger:h,value:f("responseType")})]}),Yb.includes(r.inputType)&&y.jsx(Jb,{onChange:S=>{c("denominators",S)},value:f("denominators")}),y.jsx(ve,{label:"Short Description",name:"description",register:a,errors:p,element:r}),Wb.includes(r.inputType)&&k()]}),!qb.includes(r.type.toLowerCase())&&o==="validation"&&y.jsxs("div",{className:"w-full px-6 flex flex-col gap-5 z-10",children:[y.jsxs("div",{className:"flex gap-x-6 items-center",children:[y.jsx("div",{className:"w-[150px]",children:y.jsx(ve,{label:"Required",name:"isRequired",register:a,errors:p,element:r,type:"checkbox"})})," ",y.jsx("div",{className:"flex-1",children:y.jsx(ve,{label:"Error message text",name:"requiredMessage",register:a,errors:p,element:r})})]}),Ub.includes(r.inputType)&&y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"flex gap-x-6 items-center",children:[y.jsx("div",{className:"w-[150px]",children:y.jsx(ve,{label:"Min Length",name:"minLength",register:a,errors:p,element:r,type:"number"})})," ",y.jsx("div",{className:"flex-1",children:y.jsx(ve,{label:"Error message text",name:"minLengthMessage",register:a,errors:p,element:r})})]}),y.jsxs("div",{className:"flex gap-x-6 items-center",children:[y.jsx("div",{className:"w-[150px]",children:y.jsx(ve,{label:"Max Length",name:"maxLength",register:a,errors:p,element:r,type:"number"})})," ",y.jsx("div",{className:"flex-1",children:y.jsx(ve,{label:"Error message text",name:"maxLengthMessage",register:a,errors:p,element:r})})]})]}),Hb.includes(r.inputType)&&y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"flex gap-x-6 items-center",children:[y.jsx("div",{className:"w-[150px]",children:y.jsx(ve,{label:"Min Amount",name:"minAmount",register:a,errors:p,element:r,type:"amount"})})," ",y.jsx("div",{className:"flex-1",children:y.jsx(ve,{label:"Error message text",name:"minAmountMessage",register:a,errors:p,element:r})})]}),y.jsxs("div",{className:"flex gap-x-6 items-center",children:[y.jsx("div",{className:"w-[150px]",children:y.jsx(ve,{label:"Max Amount",name:"maxAmount",register:a,errors:p,element:r,type:"amount"})})," ",y.jsx("div",{className:"flex-1",children:y.jsx(ve,{label:"Error message text",name:"maxAmountMessage",register:a,errors:p,element:r})})]})]})]}),y.jsxs("div",{className:"w-full px-6 pt-8 pb-6 flex gap-3 mt-4",children:[y.jsx("button",{type:"button",onClick:t,className:"flex-1 px-4 py-2.5 bg-white border border-[#D0D5DD] rounded-lg shadow-xs font-semibold text-[#344054] font-onest",children:"Cancel"}),y.jsx("button",{type:"submit",disabled:!g||d,style:{background:(s==null?void 0:s.buttonColor)||"#333"},className:`flex-1 px-4 py-2.5 ${!g||d?"bg-[#F2F4F7]":"bg-[#2563EB]"} ${!g||d?"text-[#98A2B3]":"text-white"} rounded-lg shadow-xs font-semibold font-onest disabled:opacity-50`,children:d?"Saving...":"Save"})]})]})]})})},jc=m.memo(({state:e,element:t,children:r})=>{const[n,o]=m.useState(!1),{removeElement:i}=m.useContext(mt),s=m.useCallback(()=>{i(t.id,t.sectionId)},[t.id,i]);return y.jsxs("div",{children:[n&&y.jsx(Zb,{isOpen:n,onClose:()=>o(!1),element:t}),y.jsxs("div",{className:"flex justify-between items-center mb-2",children:[y.jsx("label",{className:"text-sm font-medium",children:t.inputLabel}),e==="edit"&&y.jsxs("span",{className:"flex gap-x-3 items-center",children:[y.jsx("button",{type:"button",className:"outline-none hover:opacity-80 text-sm",onClick:()=>o(!0),children:y.jsx(Be,{icon:"circum:edit"})}),y.jsx("button",{type:"button",className:"outline-none hover:opacity-80 text-sm",onClick:s,children:y.jsx(Be,{icon:"iconamoon:sign-times-fill"})})]})]}),r]})});jc.displayName="ElementContainer";function $c({element:e,validationData:t}){const{register:r=()=>({}),trigger:n,setValue:o,watch:i,isReadOnly:s}=t||{};let a;return i&&(a=i()[e.id]),y.jsx(ve,{placeholder:e.placeholder,type:e.inputType,label:"",name:e.id,register:r,trigger:n,setValue:o,value:a,prefix:e.prefix,disabled:s})}function Nc(e,t){return function(){return e.apply(t,arguments)}}const{toString:ex}=Object.prototype,{getPrototypeOf:Ns}=Object,jo=(e=>t=>{const r=ex.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),xt=e=>(e=e.toLowerCase(),t=>jo(t)===e),$o=e=>t=>typeof t===e,{isArray:Ir}=Array,_n=$o("undefined");function tx(e){return e!==null&&!_n(e)&&e.constructor!==null&&!_n(e.constructor)&&lt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Pc=xt("ArrayBuffer");function rx(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Pc(e.buffer),t}const nx=$o("string"),lt=$o("function"),Lc=$o("number"),No=e=>e!==null&&typeof e=="object",ox=e=>e===!0||e===!1,Po=e=>{if(jo(e)!=="object")return!1;const t=Ns(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},ix=xt("Date"),sx=xt("File"),ax=xt("Blob"),lx=xt("FileList"),ux=e=>No(e)&&lt(e.pipe),cx=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||lt(e.append)&&((t=jo(e))==="formdata"||t==="object"&&lt(e.toString)&&e.toString()==="[object FormData]"))},fx=xt("URLSearchParams"),[dx,px,mx,hx]=["ReadableStream","Request","Response","Headers"].map(xt),gx=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Sn(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),Ir(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{const i=r?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length;let a;for(n=0;n<s;n++)a=i[n],t.call(null,e[a],a,e)}}function Dc(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length,o;for(;n-- >0;)if(o=r[n],t===o.toLowerCase())return o;return null}const yr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ic=e=>!_n(e)&&e!==yr;function Ps(){const{caseless:e}=Ic(this)&&this||{},t={},r=(n,o)=>{const i=e&&Dc(t,o)||o;Po(t[i])&&Po(n)?t[i]=Ps(t[i],n):Po(n)?t[i]=Ps({},n):Ir(n)?t[i]=n.slice():t[i]=n};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&Sn(arguments[n],r);return t}const yx=(e,t,r,{allOwnKeys:n}={})=>(Sn(t,(o,i)=>{r&&lt(o)?e[i]=Nc(o,r):e[i]=o},{allOwnKeys:n}),e),bx=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),xx=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},vx=(e,t,r,n)=>{let o,i,s;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],(!n||n(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=r!==!1&&Ns(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},wx=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},Ex=e=>{if(!e)return null;if(Ir(e))return e;let t=e.length;if(!Lc(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Tx=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ns(Uint8Array)),_x=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=n.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},Sx=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},kx=xt("HTMLFormElement"),Cx=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),Mc=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Ox=xt("RegExp"),Rc=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Sn(r,(o,i)=>{let s;(s=t(o,i,e))!==!1&&(n[i]=s||o)}),Object.defineProperties(e,n)},Fx=e=>{Rc(e,(t,r)=>{if(lt(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(lt(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Ax=(e,t)=>{const r={},n=o=>{o.forEach(i=>{r[i]=!0})};return Ir(e)?n(e):n(String(e).split(t)),r},jx=()=>{},$x=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Nx(e){return!!(e&&lt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Px=e=>{const t=new Array(10),r=(n,o)=>{if(No(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[o]=n;const i=Ir(n)?[]:{};return Sn(n,(s,a)=>{const l=r(s,o+1);!_n(l)&&(i[a]=l)}),t[o]=void 0,i}}return n};return r(e,0)},Lx=xt("AsyncFunction"),Dx=e=>e&&(No(e)||lt(e))&&lt(e.then)&&lt(e.catch),Vc=((e,t)=>e?setImmediate:t?((r,n)=>(yr.addEventListener("message",({source:o,data:i})=>{o===yr&&i===r&&n.length&&n.shift()()},!1),o=>{n.push(o),yr.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",lt(yr.postMessage)),Ix=typeof queueMicrotask<"u"?queueMicrotask.bind(yr):typeof process<"u"&&process.nextTick||Vc,j={isArray:Ir,isArrayBuffer:Pc,isBuffer:tx,isFormData:cx,isArrayBufferView:rx,isString:nx,isNumber:Lc,isBoolean:ox,isObject:No,isPlainObject:Po,isReadableStream:dx,isRequest:px,isResponse:mx,isHeaders:hx,isUndefined:_n,isDate:ix,isFile:sx,isBlob:ax,isRegExp:Ox,isFunction:lt,isStream:ux,isURLSearchParams:fx,isTypedArray:Tx,isFileList:lx,forEach:Sn,merge:Ps,extend:yx,trim:gx,stripBOM:bx,inherits:xx,toFlatObject:vx,kindOf:jo,kindOfTest:xt,endsWith:wx,toArray:Ex,forEachEntry:_x,matchAll:Sx,isHTMLForm:kx,hasOwnProperty:Mc,hasOwnProp:Mc,reduceDescriptors:Rc,freezeMethods:Fx,toObjectSet:Ax,toCamelCase:Cx,noop:jx,toFiniteNumber:$x,findKey:Dc,global:yr,isContextDefined:Ic,isSpecCompliantForm:Nx,toJSONObject:Px,isAsyncFn:Lx,isThenable:Dx,setImmediate:Vc,asap:Ix};function ee(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}j.inherits(ee,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:j.toJSONObject(this.config),code:this.code,status:this.status}}});const Bc=ee.prototype,Uc={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Uc[e]={value:e}}),Object.defineProperties(ee,Uc),Object.defineProperty(Bc,"isAxiosError",{value:!0}),ee.from=(e,t,r,n,o,i)=>{const s=Object.create(Bc);return j.toFlatObject(e,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),ee.call(s,e.message,t,r,n,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const Mx=null;function Ls(e){return j.isPlainObject(e)||j.isArray(e)}function zc(e){return j.endsWith(e,"[]")?e.slice(0,-2):e}function Hc(e,t,r){return e?e.concat(t).map(function(o,i){return o=zc(o),!r&&i?"["+o+"]":o}).join(r?".":""):t}function Rx(e){return j.isArray(e)&&!e.some(Ls)}const Vx=j.toFlatObject(j,{},null,function(t){return/^is[A-Z]/.test(t)});function Lo(e,t,r){if(!j.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=j.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,x){return!j.isUndefined(x[g])});const n=r.metaTokens,o=r.visitor||c,i=r.dots,s=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&j.isSpecCompliantForm(t);if(!j.isFunction(o))throw new TypeError("visitor must be a function");function u(d){if(d===null)return"";if(j.isDate(d))return d.toISOString();if(!l&&j.isBlob(d))throw new ee("Blob is not supported. Use a Buffer instead.");return j.isArrayBuffer(d)||j.isTypedArray(d)?l&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function c(d,g,x){let b=d;if(d&&!x&&typeof d=="object"){if(j.endsWith(g,"{}"))g=n?g:g.slice(0,-2),d=JSON.stringify(d);else if(j.isArray(d)&&Rx(d)||(j.isFileList(d)||j.endsWith(g,"[]"))&&(b=j.toArray(d)))return g=zc(g),b.forEach(function(w,_){!(j.isUndefined(w)||w===null)&&t.append(s===!0?Hc([g],_,i):s===null?g:g+"[]",u(w))}),!1}return Ls(d)?!0:(t.append(Hc(x,g,i),u(d)),!1)}const f=[],h=Object.assign(Vx,{defaultVisitor:c,convertValue:u,isVisitable:Ls});function p(d,g){if(!j.isUndefined(d)){if(f.indexOf(d)!==-1)throw Error("Circular reference detected in "+g.join("."));f.push(d),j.forEach(d,function(b,v){(!(j.isUndefined(b)||b===null)&&o.call(t,b,j.isString(v)?v.trim():v,g,h))===!0&&p(b,g?g.concat(v):[v])}),f.pop()}}if(!j.isObject(e))throw new TypeError("data must be an object");return p(e),t}function qc(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Ds(e,t){this._pairs=[],e&&Lo(e,this,t)}const Wc=Ds.prototype;Wc.append=function(t,r){this._pairs.push([t,r])},Wc.toString=function(t){const r=t?function(n){return t.call(this,n,qc)}:qc;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function Bx(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Kc(e,t,r){if(!t)return e;const n=r&&r.encode||Bx;j.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(o?i=o(t,r):i=j.isURLSearchParams(t)?t.toString():new Ds(t,r).toString(n),i){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Yc{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){j.forEach(this.handlers,function(n){n!==null&&t(n)})}}const Jc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ux={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Ds,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Is=typeof window<"u"&&typeof document<"u",Ms=typeof navigator=="object"&&navigator||void 0,zx=Is&&(!Ms||["ReactNative","NativeScript","NS"].indexOf(Ms.product)<0),Hx=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",qx=Is&&window.location.href||"http://localhost",He={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Is,hasStandardBrowserEnv:zx,hasStandardBrowserWebWorkerEnv:Hx,navigator:Ms,origin:qx},Symbol.toStringTag,{value:"Module"})),...Ux};function Wx(e,t){return Lo(e,new He.classes.URLSearchParams,Object.assign({visitor:function(r,n,o,i){return He.isNode&&j.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function Kx(e){return j.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Yx(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}function Xc(e){function t(r,n,o,i){let s=r[i++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),l=i>=r.length;return s=!s&&j.isArray(o)?o.length:s,l?(j.hasOwnProp(o,s)?o[s]=[o[s],n]:o[s]=n,!a):((!o[s]||!j.isObject(o[s]))&&(o[s]=[]),t(r,n,o[s],i)&&j.isArray(o[s])&&(o[s]=Yx(o[s])),!a)}if(j.isFormData(e)&&j.isFunction(e.entries)){const r={};return j.forEachEntry(e,(n,o)=>{t(Kx(n),o,r,0)}),r}return null}function Jx(e,t,r){if(j.isString(e))try{return(t||JSON.parse)(e),j.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(0,JSON.stringify)(e)}const kn={transitional:Jc,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,i=j.isObject(t);if(i&&j.isHTMLForm(t)&&(t=new FormData(t)),j.isFormData(t))return o?JSON.stringify(Xc(t)):t;if(j.isArrayBuffer(t)||j.isBuffer(t)||j.isStream(t)||j.isFile(t)||j.isBlob(t)||j.isReadableStream(t))return t;if(j.isArrayBufferView(t))return t.buffer;if(j.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Wx(t,this.formSerializer).toString();if((a=j.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Lo(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||o?(r.setContentType("application/json",!1),Jx(t)):t}],transformResponse:[function(t){const r=this.transitional||kn.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(j.isResponse(t)||j.isReadableStream(t))return t;if(t&&j.isString(t)&&(n&&!this.responseType||o)){const s=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(a){if(s)throw a.name==="SyntaxError"?ee.from(a,ee.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:He.classes.FormData,Blob:He.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};j.forEach(["delete","get","head","post","put","patch"],e=>{kn.headers[e]={}});const Xx=j.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Gx=e=>{const t={};let r,n,o;return e&&e.split(`
60
+ `).forEach(function(s){o=s.indexOf(":"),r=s.substring(0,o).trim().toLowerCase(),n=s.substring(o+1).trim(),!(!r||t[r]&&Xx[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},Gc=Symbol("internals");function Cn(e){return e&&String(e).trim().toLowerCase()}function Do(e){return e===!1||e==null?e:j.isArray(e)?e.map(Do):String(e)}function Qx(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const Zx=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Rs(e,t,r,n,o){if(j.isFunction(n))return n.call(this,t,r);if(o&&(t=r),!!j.isString(t)){if(j.isString(n))return t.indexOf(n)!==-1;if(j.isRegExp(n))return n.test(t)}}function ev(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function tv(e,t){const r=j.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(o,i,s){return this[n].call(this,t,o,i,s)},configurable:!0})})}class rt{constructor(t){t&&this.set(t)}set(t,r,n){const o=this;function i(a,l,u){const c=Cn(l);if(!c)throw new Error("header name must be a non-empty string");const f=j.findKey(o,c);(!f||o[f]===void 0||u===!0||u===void 0&&o[f]!==!1)&&(o[f||l]=Do(a))}const s=(a,l)=>j.forEach(a,(u,c)=>i(u,c,l));if(j.isPlainObject(t)||t instanceof this.constructor)s(t,r);else if(j.isString(t)&&(t=t.trim())&&!Zx(t))s(Gx(t),r);else if(j.isHeaders(t))for(const[a,l]of t.entries())i(l,a,n);else t!=null&&i(r,t,n);return this}get(t,r){if(t=Cn(t),t){const n=j.findKey(this,t);if(n){const o=this[n];if(!r)return o;if(r===!0)return Qx(o);if(j.isFunction(r))return r.call(this,o,n);if(j.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Cn(t),t){const n=j.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Rs(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let o=!1;function i(s){if(s=Cn(s),s){const a=j.findKey(n,s);a&&(!r||Rs(n,n[a],a,r))&&(delete n[a],o=!0)}}return j.isArray(t)?t.forEach(i):i(t),o}clear(t){const r=Object.keys(this);let n=r.length,o=!1;for(;n--;){const i=r[n];(!t||Rs(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const r=this,n={};return j.forEach(this,(o,i)=>{const s=j.findKey(n,i);if(s){r[s]=Do(o),delete r[i];return}const a=t?ev(i):String(i).trim();a!==i&&delete r[i],r[a]=Do(o),n[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return j.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=t&&j.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
61
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(o=>n.set(o)),n}static accessor(t){const n=(this[Gc]=this[Gc]={accessors:{}}).accessors,o=this.prototype;function i(s){const a=Cn(s);n[a]||(tv(o,s),n[a]=!0)}return j.isArray(t)?t.forEach(i):i(t),this}}rt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),j.reduceDescriptors(rt.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}}),j.freezeMethods(rt);function Vs(e,t){const r=this||kn,n=t||r,o=rt.from(n.headers);let i=n.data;return j.forEach(e,function(a){i=a.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function Qc(e){return!!(e&&e.__CANCEL__)}function Mr(e,t,r){ee.call(this,e??"canceled",ee.ERR_CANCELED,t,r),this.name="CanceledError"}j.inherits(Mr,ee,{__CANCEL__:!0});function Zc(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new ee("Request failed with status code "+r.status,[ee.ERR_BAD_REQUEST,ee.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function rv(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function nv(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o=0,i=0,s;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=n[i];s||(s=u),r[o]=l,n[o]=u;let f=i,h=0;for(;f!==o;)h+=r[f++],f=f%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),u-s<t)return;const p=c&&u-c;return p?Math.round(h*1e3/p):void 0}}function ov(e,t){let r=0,n=1e3/t,o,i;const s=(u,c=Date.now())=>{r=c,o=null,i&&(clearTimeout(i),i=null),e.apply(null,u)};return[(...u)=>{const c=Date.now(),f=c-r;f>=n?s(u,c):(o=u,i||(i=setTimeout(()=>{i=null,s(o)},n-f)))},()=>o&&s(o)]}const Io=(e,t,r=3)=>{let n=0;const o=nv(50,250);return ov(i=>{const s=i.loaded,a=i.lengthComputable?i.total:void 0,l=s-n,u=o(l),c=s<=a;n=s;const f={loaded:s,total:a,progress:a?s/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&c?(a-s)/u:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(f)},r)},ef=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},tf=e=>(...t)=>j.asap(()=>e(...t)),iv=He.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,He.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(He.origin),He.navigator&&/(msie|trident)/i.test(He.navigator.userAgent)):()=>!0,sv=He.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const s=[e+"="+encodeURIComponent(t)];j.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),j.isString(n)&&s.push("path="+n),j.isString(o)&&s.push("domain="+o),i===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function av(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function lv(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function rf(e,t,r){let n=!av(t);return e&&(n||r==!1)?lv(e,t):t}const nf=e=>e instanceof rt?{...e}:e;function br(e,t){t=t||{};const r={};function n(u,c,f,h){return j.isPlainObject(u)&&j.isPlainObject(c)?j.merge.call({caseless:h},u,c):j.isPlainObject(c)?j.merge({},c):j.isArray(c)?c.slice():c}function o(u,c,f,h){if(j.isUndefined(c)){if(!j.isUndefined(u))return n(void 0,u,f,h)}else return n(u,c,f,h)}function i(u,c){if(!j.isUndefined(c))return n(void 0,c)}function s(u,c){if(j.isUndefined(c)){if(!j.isUndefined(u))return n(void 0,u)}else return n(void 0,c)}function a(u,c,f){if(f in t)return n(u,c);if(f in e)return n(void 0,u)}const l={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(u,c,f)=>o(nf(u),nf(c),f,!0)};return j.forEach(Object.keys(Object.assign({},e,t)),function(c){const f=l[c]||o,h=f(e[c],t[c],c);j.isUndefined(h)&&f!==a||(r[c]=h)}),r}const of=e=>{const t=br({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:a}=t;t.headers=s=rt.from(s),t.url=Kc(rf(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(j.isFormData(r)){if(He.hasStandardBrowserEnv||He.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((l=s.getContentType())!==!1){const[u,...c]=l?l.split(";").map(f=>f.trim()).filter(Boolean):[];s.setContentType([u||"multipart/form-data",...c].join("; "))}}if(He.hasStandardBrowserEnv&&(n&&j.isFunction(n)&&(n=n(t)),n||n!==!1&&iv(t.url))){const u=o&&i&&sv.read(i);u&&s.set(o,u)}return t},uv=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,n){const o=of(e);let i=o.data;const s=rt.from(o.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=o,c,f,h,p,d;function g(){p&&p(),d&&d(),o.cancelToken&&o.cancelToken.unsubscribe(c),o.signal&&o.signal.removeEventListener("abort",c)}let x=new XMLHttpRequest;x.open(o.method.toUpperCase(),o.url,!0),x.timeout=o.timeout;function b(){if(!x)return;const w=rt.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),k={data:!a||a==="text"||a==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:w,config:e,request:x};Zc(function(C){r(C),g()},function(C){n(C),g()},k),x=null}"onloadend"in x?x.onloadend=b:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.indexOf("file:")===0)||setTimeout(b)},x.onabort=function(){x&&(n(new ee("Request aborted",ee.ECONNABORTED,e,x)),x=null)},x.onerror=function(){n(new ee("Network Error",ee.ERR_NETWORK,e,x)),x=null},x.ontimeout=function(){let _=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const k=o.transitional||Jc;o.timeoutErrorMessage&&(_=o.timeoutErrorMessage),n(new ee(_,k.clarifyTimeoutError?ee.ETIMEDOUT:ee.ECONNABORTED,e,x)),x=null},i===void 0&&s.setContentType(null),"setRequestHeader"in x&&j.forEach(s.toJSON(),function(_,k){x.setRequestHeader(k,_)}),j.isUndefined(o.withCredentials)||(x.withCredentials=!!o.withCredentials),a&&a!=="json"&&(x.responseType=o.responseType),u&&([h,d]=Io(u,!0),x.addEventListener("progress",h)),l&&x.upload&&([f,p]=Io(l),x.upload.addEventListener("progress",f),x.upload.addEventListener("loadend",p)),(o.cancelToken||o.signal)&&(c=w=>{x&&(n(!w||w.type?new Mr(null,e,x):w),x.abort(),x=null)},o.cancelToken&&o.cancelToken.subscribe(c),o.signal&&(o.signal.aborted?c():o.signal.addEventListener("abort",c)));const v=rv(o.url);if(v&&He.protocols.indexOf(v)===-1){n(new ee("Unsupported protocol "+v+":",ee.ERR_BAD_REQUEST,e));return}x.send(i||null)})},cv=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,o;const i=function(u){if(!o){o=!0,a();const c=u instanceof Error?u:this.reason;n.abort(c instanceof ee?c:new Mr(c instanceof Error?c.message:c))}};let s=t&&setTimeout(()=>{s=null,i(new ee(`timeout ${t} of ms exceeded`,ee.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:l}=n;return l.unsubscribe=()=>j.asap(a),l}},fv=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,o;for(;n<r;)o=n+t,yield e.slice(n,o),n=o},dv=async function*(e,t){for await(const r of pv(e))yield*fv(r,t)},pv=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},sf=(e,t,r,n)=>{const o=dv(e,t);let i=0,s,a=l=>{s||(s=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await o.next();if(u){a(),l.close();return}let f=c.byteLength;if(r){let h=i+=f;r(h)}l.enqueue(new Uint8Array(c))}catch(u){throw a(u),u}},cancel(l){return a(l),o.return()}},{highWaterMark:2})},Mo=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",af=Mo&&typeof ReadableStream=="function",mv=Mo&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),lf=(e,...t)=>{try{return!!e(...t)}catch{return!1}},hv=af&&lf(()=>{let e=!1;const t=new Request(He.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),uf=64*1024,Bs=af&&lf(()=>j.isReadableStream(new Response("").body)),Ro={stream:Bs&&(e=>e.body)};Mo&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ro[t]&&(Ro[t]=j.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new ee(`Response type '${t}' is not supported`,ee.ERR_NOT_SUPPORT,n)})})})(new Response);const gv=async e=>{if(e==null)return 0;if(j.isBlob(e))return e.size;if(j.isSpecCompliantForm(e))return(await new Request(He.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(j.isArrayBufferView(e)||j.isArrayBuffer(e))return e.byteLength;if(j.isURLSearchParams(e)&&(e=e+""),j.isString(e))return(await mv(e)).byteLength},yv=async(e,t)=>{const r=j.toFiniteNumber(e.getContentLength());return r??gv(t)},Us={http:Mx,xhr:uv,fetch:Mo&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:i,timeout:s,onDownloadProgress:a,onUploadProgress:l,responseType:u,headers:c,withCredentials:f="same-origin",fetchOptions:h}=of(e);u=u?(u+"").toLowerCase():"text";let p=cv([o,i&&i.toAbortSignal()],s),d;const g=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let x;try{if(l&&hv&&r!=="get"&&r!=="head"&&(x=await yv(c,n))!==0){let k=new Request(t,{method:"POST",body:n,duplex:"half"}),S;if(j.isFormData(n)&&(S=k.headers.get("content-type"))&&c.setContentType(S),k.body){const[C,A]=ef(x,Io(tf(l)));n=sf(k.body,uf,C,A)}}j.isString(f)||(f=f?"include":"omit");const b="credentials"in Request.prototype;d=new Request(t,{...h,signal:p,method:r.toUpperCase(),headers:c.normalize().toJSON(),body:n,duplex:"half",credentials:b?f:void 0});let v=await fetch(d);const w=Bs&&(u==="stream"||u==="response");if(Bs&&(a||w&&g)){const k={};["status","statusText","headers"].forEach(N=>{k[N]=v[N]});const S=j.toFiniteNumber(v.headers.get("content-length")),[C,A]=a&&ef(S,Io(tf(a),!0))||[];v=new Response(sf(v.body,uf,C,()=>{A&&A(),g&&g()}),k)}u=u||"text";let _=await Ro[j.findKey(Ro,u)||"text"](v,e);return!w&&g&&g(),await new Promise((k,S)=>{Zc(k,S,{data:_,headers:rt.from(v.headers),status:v.status,statusText:v.statusText,config:e,request:d})})}catch(b){throw g&&g(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new ee("Network Error",ee.ERR_NETWORK,e,d),{cause:b.cause||b}):ee.from(b,b&&b.code,e,d)}})};j.forEach(Us,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const cf=e=>`- ${e}`,bv=e=>j.isFunction(e)||e===null||e===!1,ff={getAdapter:e=>{e=j.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let i=0;i<t;i++){r=e[i];let s;if(n=r,!bv(r)&&(n=Us[(s=String(r)).toLowerCase()],n===void 0))throw new ee(`Unknown adapter '${s}'`);if(n)break;o[s||"#"+i]=n}if(!n){const i=Object.entries(o).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=t?i.length>1?`since :
62
62
  `+i.map(cf).join(`
63
- `):" "+cf(i[0]):"as no adapter specified";throw new ee("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return n},adapters:Us};function zs(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Mr(null,e)}function df(e){return zs(e),e.headers=rt.from(e.headers),e.data=Vs.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ff.getAdapter(e.adapter||kn.adapter)(e).then(function(n){return zs(e),n.data=Vs.call(e,e.transformResponse,n),n.headers=rt.from(n.headers),n},function(n){return Qc(n)||(zs(e),n&&n.response&&(n.response.data=Vs.call(e,e.transformResponse,n.response),n.response.headers=rt.from(n.response.headers))),Promise.reject(n)})}const pf="1.8.4",Ro={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ro[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const mf={};Ro.transitional=function(t,r,n){function o(i,s){return"[Axios v"+pf+"] Transitional option '"+i+"'"+s+(n?". "+n:"")}return(i,s,a)=>{if(t===!1)throw new ee(o(s," has been removed"+(r?" in "+r:"")),ee.ERR_DEPRECATED);return r&&!mf[s]&&(mf[s]=!0,console.warn(o(s," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,s,a):!0}},Ro.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function xv(e,t,r){if(typeof e!="object")throw new ee("options must be an object",ee.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],s=t[i];if(s){const a=e[i],l=a===void 0||s(a,i,e);if(l!==!0)throw new ee("option "+i+" must be "+l,ee.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new ee("Unknown option "+i,ee.ERR_BAD_OPTION)}}const Vo={assertOptions:xv,validators:Ro},$t=Vo.validators;class xr{constructor(t){this.defaults=t,this.interceptors={request:new Yc,response:new Yc}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
64
- `+i):n.stack=i}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=br(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:i}=r;n!==void 0&&Vo.assertOptions(n,{silentJSONParsing:$t.transitional($t.boolean),forcedJSONParsing:$t.transitional($t.boolean),clarifyTimeoutError:$t.transitional($t.boolean)},!1),o!=null&&(j.isFunction(o)?r.paramsSerializer={serialize:o}:Vo.assertOptions(o,{encode:$t.function,serialize:$t.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Vo.assertOptions(r,{baseUrl:$t.spelling("baseURL"),withXsrfToken:$t.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=i&&j.merge(i.common,i[r.method]);i&&j.forEach(["delete","get","head","post","put","patch","common"],d=>{delete i[d]}),r.headers=rt.concat(s,i);const a=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(r)===!1||(l=l&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let c,f=0,h;if(!l){const d=[df.bind(this),void 0];for(d.unshift.apply(d,a),d.push.apply(d,u),h=d.length,c=Promise.resolve(r);f<h;)c=c.then(d[f++],d[f++]);return c}h=a.length;let p=r;for(f=0;f<h;){const d=a[f++],g=a[f++];try{p=d(p)}catch(x){g.call(this,x);break}}try{c=df.call(this,p)}catch(d){return Promise.reject(d)}for(f=0,h=u.length;f<h;)c=c.then(u[f++],u[f++]);return c}getUri(t){t=br(this.defaults,t);const r=rf(t.baseURL,t.url,t.allowAbsoluteUrls);return Kc(r,t.params,t.paramsSerializer)}}j.forEach(["delete","get","head","options"],function(t){xr.prototype[t]=function(r,n){return this.request(br(n||{},{method:t,url:r,data:(n||{}).data}))}}),j.forEach(["post","put","patch"],function(t){function r(n){return function(i,s,a){return this.request(br(a||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}xr.prototype[t]=r(),xr.prototype[t+"Form"]=r(!0)});class Hs{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(o=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](o);n._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(a=>{n.subscribe(a),i=a}).then(o);return s.cancel=function(){n.unsubscribe(i)},s},t(function(i,s,a){n.reason||(n.reason=new Mr(i,s,a),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Hs(function(o){t=o}),cancel:t}}}function vv(e){return function(r){return e.apply(null,r)}}function wv(e){return j.isObject(e)&&e.isAxiosError===!0}const qs={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(qs).forEach(([e,t])=>{qs[t]=e});function hf(e){const t=new xr(e),r=Nc(xr.prototype.request,t);return j.extend(r,xr.prototype,t,{allOwnKeys:!0}),j.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return hf(br(e,o))},r}const Ee=hf(kn);Ee.Axios=xr,Ee.CanceledError=Mr,Ee.CancelToken=Hs,Ee.isCancel=Qc,Ee.VERSION=pf,Ee.toFormData=Lo,Ee.AxiosError=ee,Ee.Cancel=Ee.CanceledError,Ee.all=function(t){return Promise.all(t)},Ee.spread=vv,Ee.isAxiosError=wv,Ee.mergeConfig=br,Ee.AxiosHeaders=rt,Ee.formToJSON=e=>Xc(j.isHTMLForm(e)?new FormData(e):e),Ee.getAdapter=ff.getAdapter,Ee.HttpStatusCode=qs,Ee.default=Ee;function Ev(e){if(!e)return!1;const t=/^data:image\/(jpeg|png|gif|bmp|webp);base64,/i,r=/\.(jpeg|jpg|png|gif|bmp|webp)$/i;return t.test(e)||r.test(e)}const Tv=({imageUrl:e})=>{const[t,r]=m.useState(!1),n=()=>{r(!0)},o=()=>{r(!1)};return y.jsxs("div",{children:[y.jsx("img",{alt:"Thumbnail",style:{cursor:"pointer",width:"120px",height:"130px",objectFit:"cover"},onClick:n,src:e||"/place.png","data-toggle":"tooltip","data-placement":"top",title:"Click to view"}),t&&y.jsx("div",{className:"modal",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",justifyContent:"center",alignItems:"center"},onClick:o,children:y.jsxs("div",{className:"modal-content",style:{position:"relative",backgroundColor:"white",padding:"20px",borderRadius:"8px",width:"90vw"},onClick:i=>i.stopPropagation(),children:[y.jsx("span",{className:"close",onClick:o,style:{position:"absolute",top:"10px",right:"10px",fontSize:"24px",cursor:"pointer"},children:"×"}),y.jsx("img",{src:e||"/place.png",alt:"Full Image",style:{maxWidth:"90%",maxHeight:"90vh",objectFit:"contain"}})]})})]})};function gf({element:e,validationData:t}){const{register:r=()=>({}),setValue:n,getValues:o}=t||{},[i,s]=m.useState(),[a,l]=m.useState(!1),[u,c]=m.useState(!1),[f,h]=m.useState(""),p=o&&o(e==null?void 0:e.id);m.useEffect(()=>{s(p)},[p]);const[d,g]=m.useState("");m.useEffect(()=>{r(e.id)},[e.id,r]);const{url:x,method:b,responseType:v}=e||{},w=m.useCallback(async _=>{var k,S,C,A,N,P,L,I,R,q,J;if(!(!x||!b)){l(!0);try{let z;if(b.toLowerCase()==="get"){const G=`${x}?value=${_}`;z=await Ee.get(G)}else if(b.toLowerCase()==="post")z=await Ee.post(x,{value:_});else throw new Error("Unsupported HTTP method");z.status===200&&((((S=(k=z==null?void 0:z.data)==null?void 0:k.data)==null?void 0:S.status)||((C=z==null?void 0:z.data)==null?void 0:C.status))===!0?(c(!0),v==="string"?h(((N=(A=z==null?void 0:z.data)==null?void 0:A.data)==null?void 0:N.description)||((P=z==null?void 0:z.data)==null?void 0:P.description)||"Validation successful"):g(((I=(L=z==null?void 0:z.data)==null?void 0:L.data)==null?void 0:I.description)||((R=z==null?void 0:z.data)==null?void 0:R.description)||{})):(console.error("Invalid input:",_),h("Unable to validate input"),c(!1)))}catch(z){console.error("Error validating input:",z),h(((J=(q=z==null?void 0:z.response)==null?void 0:q.data)==null?void 0:J.message)||"Unable to validate input"),c(!1)}finally{l(!1)}}},[b,v,x]);return m.useEffect(()=>{if(i){const _=setTimeout(()=>{w(i)},700);return()=>clearTimeout(_)}},[w,i]),y.jsxs("div",{children:[y.jsxs("div",{className:"relative flex items-center",children:[y.jsx("input",{placeholder:(e==null?void 0:e.placeholder)||"",type:(e==null?void 0:e.inputType)||"text",className:"input-control",...r(e==null?void 0:e.id),onChange:_=>{s(_.target.value),n(e==null?void 0:e.id,_.target.value)}}),y.jsxs("span",{className:"absolute right-0",children:[a&&y.jsxs("span",{children:[" ",y.jsxs("svg",{className:"animate-spin -ml-1 mr-3 h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[y.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),y.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})]}),u&&!a&&y.jsx("span",{className:"text-green-600 text-lg pr-3 block",children:y.jsx(Be,{icon:"gg:check-o"})})]})]}),f&&v==="string"&&y.jsx("span",{className:`${u?"text-green-600":"text-red-600"} text-sm`,children:f}),v==="object"&&y.jsx("div",{className:"grid grid-cols-2 gap-6 text-sm text-gray-600 mt-2",children:Object.entries(d).map(([_,k])=>y.jsxs("div",{className:"flex items-center gap-x-2",children:[y.jsxs("span",{className:"font-semibold",children:[_,":"]}),Ev(k)?y.jsx(Tv,{imageUrl:k}):y.jsx("span",{children:String(k)})]},_))})]})}function _v({onGetTotal:e,readOnly:t,defaultValue:r,denominators:n}){const[o,i]=m.useState([...r]);function s(u,c){i(f=>{const h=[...f];return h[c]={...h[c],value:u},h})}function a(u,c){return parseFloat(u)*parseFloat(c)||0}const l=m.useMemo(()=>o.reduce((u,c)=>{const f=a(c.key,c.value);return u+f},0),[o]);return m.useEffect(()=>{e&&e(o)},[e,o]),m.useEffect(()=>{if(n!=null&&n.length){const u=n.map((c,f)=>({key:c.value,value:Array.isArray(r)&&r[f]?r[f].value:""}));i(u)}},[r,n]),y.jsx("div",{className:"mt-2",children:y.jsxs("div",{className:"border border-gray-200 rounded-lg overflow-hidden text-gray-700",children:[y.jsxs("div",{className:"grid grid-cols-3 text-sm font-bold border-b border-gray-100 bg-gray-50",children:[y.jsx("div",{className:"border-r px-4 py-2",children:y.jsx("span",{className:"",children:"Denomination"})}),y.jsx("div",{className:"border-r px-4 py-2",children:y.jsx("span",{children:"Quantity"})}),y.jsx("div",{className:"px-4 py-2",children:y.jsx("span",{children:"Sub total"})})]}),o.map((u,c)=>{var f,h;return y.jsxs("div",{className:"grid grid-cols-3 text-sm border-b border-gray-100",children:[y.jsx("div",{className:"border-r px-4 py-2 flex items-center",children:y.jsx("span",{className:"",children:(f=parseFloat(u.key))==null?void 0:f.toLocaleString()})}),y.jsx("div",{className:"border-r px-4 py-1",children:y.jsx("span",{children:y.jsx(go,{id:"input-example",className:"border border-gray-100 rounded w-full px-3 py-1 outline-none",decimalsLimit:6,defaultValue:u.value,onValueChange:p=>s(p,c),disabled:t,allowNegativeValue:!1})})}),y.jsx("div",{className:"px-4 py-2 flex justify-between items-center",children:y.jsx("span",{children:(h=a(u.key,u.value))==null?void 0:h.toLocaleString()})})]},u.key+c+Math.random())}),y.jsxs("div",{className:"grid grid-cols-3 text-sm font-bold bg-gray-50",children:[y.jsx("div",{className:"border-r px-4 py-3 col-span-2 text-right",children:"Total"}),y.jsx("div",{className:"px-4 py-3",children:l==null?void 0:l.toLocaleString()})]})]})})}function yf({element:e,validationData:t}){const{register:r=()=>({}),setValue:n,getValues:o}=t||{},i=o&&o(e==null?void 0:e.id)||[];return m.useEffect(()=>{r(e.id)},[e.id,r]),y.jsx("div",{children:y.jsx(_v,{onGetTotal:s=>{n&&n(e.id,s)},denominators:(e==null?void 0:e.denominators)||[],defaultValue:i,readOnly:e==null?void 0:e.isReadOnly})})}const Sv={textField:Jn,longText:Vu,selectField:Ru,multiSelect:Ou,numberField:Jn,amountField:$c,date:sl,password:Nu,checkbox:Mu,radio:Du,email:Fu,file:ju,grid:$u,section:Iu,validateInput:gf,tableInput:yf},bf="edit",kv=e=>{const t=Sv[e.type];return t?y.jsx(jc,{element:e,state:bf,children:y.jsxs("div",{className:"relative",children:[y.jsx("div",{className:"absolute top-0 left-0 h-full w-full z-20"}),y.jsx(t,{element:e,state:bf})]})}):null};function Cv({elementData:e,sectionId:t}){const{formData:r,updateElementPosition:n,isDragging:o}=m.useContext(mt),[i,s]=m.useState(null),a=m.useCallback((f,h)=>{f.dataTransfer.setData("properties",h),s(h)},[]),l=m.useCallback(f=>{f.preventDefault(),f.stopPropagation(),f.dataTransfer.dropEffect="move"},[]),u=m.useCallback(f=>{var p;f.preventDefault(),f.stopPropagation();const h=(p=r.find(d=>d.id===t))==null?void 0:p.questionData;try{const d=f.dataTransfer.getData("properties"),g=f.currentTarget;if(!g.id||d===g.id)return;const x=h.findIndex(v=>v.id===d),b=h.findIndex(v=>v.id===g.id);if(x===-1||b===-1)return;if(h.length){const v=[...h];[v[x],v[b]]=[v[b],v[x]],n(v,t),s(null)}}catch(d){console.error("Error during drag and drop:",d),s(null)}},[r,n]),c=m.useCallback(f=>y.jsx("div",{id:f.id,className:`cursor-move border p-4 w-full transition-colors rounded-lg bg-white ${i===f.id?"bg-gray-100":""} ${i&&i!==f.id?"border-dashed border-blue-300":""}`,draggable:!0,onDrop:u,onDragOver:l,onDragStart:h=>a(h,f.id),children:kv(f)},f.id),[i,u,l,a]);return e!=null&&e.length?y.jsxs("div",{className:"w-full h-full flex flex-col gap-y-4 relative",children:[e==null?void 0:e.map(c),o&&y.jsx("div",{className:"bg-gray-50 rounded p-6 h-[60px] border-2 border-dashed flex items-center justify-center text-gray-400 opacity-70",children:y.jsx(Be,{icon:"octicon:plus-16"})})]}):y.jsx("div",{className:"w-full h-full flex items-center justify-center text-gray-500 min-h-[250px] p-10",children:"No input to display"})}const Ov=Tn({title:be(),description:be()}).required(),Fv=({isOpen:e,onClose:t,section:r})=>{const{updateSection:n}=m.useContext(mt),{register:o,handleSubmit:i,formState:{errors:s,isSubmitting:a,isValid:l},reset:u}=_s({resolver:Ss(Ov),defaultValues:r});if(m.useEffect(()=>{e||u()},[e,u]),!e)return null;const c=f=>{n(f,r.id),t()};return y.jsx("div",{className:"fixed inset-0 bg-black/30 flex items-center justify-center z-[999] cursor-default no-drag select-none",children:y.jsxs("div",{className:"min-w-[600px] bg-white rounded-xl shadow-xl relative flex flex-col items-center",children:[y.jsxs("div",{className:"w-full px-6 pt-6 pb-5 flex flex-col items-start gap-4 z-10 mb-6",children:[y.jsx("h2",{className:"text-lg font-semibold text-[#475467] font-onest",children:"Update Section Information"}),y.jsx("button",{onClick:t,className:"absolute right-4 top-4 p-2 text-[#98A2B3] hover:bg-gray-50 rounded-lg",children:y.jsx(Be,{icon:"tabler:x"})})]}),y.jsxs("form",{onSubmit:i(c),className:"w-full",children:[y.jsxs("div",{className:"w-full px-6 flex flex-col gap-5 z-10",children:[y.jsx(ve,{label:"Title",name:"title",register:o,errors:s}),y.jsx(ve,{label:"Description",name:"description",register:o,errors:s})]}),y.jsxs("div",{className:"w-full px-6 pt-8 pb-6 flex gap-3 mt-4",children:[y.jsx("button",{type:"button",onClick:t,className:"flex-1 px-4 py-2.5 bg-white border border-[#D0D5DD] rounded-lg shadow-xs font-semibold text-[#344054] font-onest",children:"Cancel"}),y.jsx("button",{type:"submit",disabled:!l||a,className:`flex-1 px-4 py-2.5 ${!l||a?"bg-[#F2F4F7]":"bg-[#2563EB]"} ${!l||a?"text-[#98A2B3]":"text-white"} rounded-lg shadow-xs font-semibold font-onest disabled:opacity-50`,children:a?"Saving...":"Save"})]})]})]})})},Av=()=>{const[e,t]=m.useState(!1),r=m.useRef(null),[n,o]=m.useState([0]),{removeSection:i,addElement:s,formData:a,setIsDragging:l,setSelectedSection:u,selectedSection:c}=m.useContext(mt),f=m.useCallback(g=>{g.preventDefault(),g.dataTransfer.dropEffect="move"},[]),h=m.useCallback(g=>{try{g.preventDefault(),l(!1);const x=g==null?void 0:g.currentTarget,b=g.dataTransfer.getData("properties");if(b){const v=JSON.parse(b),w={id:en(),sectionId:x.id,...v};s(w,x.id)}}catch(x){console.log(x),l(!1)}},[s,l]);function p(g){n.includes(g)?o(x=>x.filter(b=>b!==g)):o(x=>[...x,g])}function d(g){r.current=g,t(!0)}return y.jsxs("div",{className:"flex gap-x-4 mx-auto h-full relative px-6 pb-5 flex-col no-scrollbar overflow-y-auto max-h-[86vh]",children:[e&&y.jsx(Fv,{isOpen:e,onClose:()=>t(!1),section:r.current}),y.jsx("div",{className:" relative w-full flex flex-col gap-y-6 flex-1 py-4",children:a.map((g,x)=>y.jsxs("div",{className:"group cursor-pointer rounded",onClick:()=>u(g.id),children:[y.jsxs("div",{className:`border border-gray-100 rounded py-4 px-4 shadow-[rgba(149,157,165,0.2)_0px_2px_4px] transition-colors duration-200
63
+ `):" "+cf(i[0]):"as no adapter specified";throw new ee("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return n},adapters:Us};function zs(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Mr(null,e)}function df(e){return zs(e),e.headers=rt.from(e.headers),e.data=Vs.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ff.getAdapter(e.adapter||kn.adapter)(e).then(function(n){return zs(e),n.data=Vs.call(e,e.transformResponse,n),n.headers=rt.from(n.headers),n},function(n){return Qc(n)||(zs(e),n&&n.response&&(n.response.data=Vs.call(e,e.transformResponse,n.response),n.response.headers=rt.from(n.response.headers))),Promise.reject(n)})}const pf="1.8.4",Vo={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Vo[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const mf={};Vo.transitional=function(t,r,n){function o(i,s){return"[Axios v"+pf+"] Transitional option '"+i+"'"+s+(n?". "+n:"")}return(i,s,a)=>{if(t===!1)throw new ee(o(s," has been removed"+(r?" in "+r:"")),ee.ERR_DEPRECATED);return r&&!mf[s]&&(mf[s]=!0,console.warn(o(s," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,s,a):!0}},Vo.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function xv(e,t,r){if(typeof e!="object")throw new ee("options must be an object",ee.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],s=t[i];if(s){const a=e[i],l=a===void 0||s(a,i,e);if(l!==!0)throw new ee("option "+i+" must be "+l,ee.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new ee("Unknown option "+i,ee.ERR_BAD_OPTION)}}const Bo={assertOptions:xv,validators:Vo},$t=Bo.validators;class xr{constructor(t){this.defaults=t,this.interceptors={request:new Yc,response:new Yc}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
64
+ `+i):n.stack=i}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=br(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:i}=r;n!==void 0&&Bo.assertOptions(n,{silentJSONParsing:$t.transitional($t.boolean),forcedJSONParsing:$t.transitional($t.boolean),clarifyTimeoutError:$t.transitional($t.boolean)},!1),o!=null&&(j.isFunction(o)?r.paramsSerializer={serialize:o}:Bo.assertOptions(o,{encode:$t.function,serialize:$t.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Bo.assertOptions(r,{baseUrl:$t.spelling("baseURL"),withXsrfToken:$t.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=i&&j.merge(i.common,i[r.method]);i&&j.forEach(["delete","get","head","post","put","patch","common"],d=>{delete i[d]}),r.headers=rt.concat(s,i);const a=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(r)===!1||(l=l&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let c,f=0,h;if(!l){const d=[df.bind(this),void 0];for(d.unshift.apply(d,a),d.push.apply(d,u),h=d.length,c=Promise.resolve(r);f<h;)c=c.then(d[f++],d[f++]);return c}h=a.length;let p=r;for(f=0;f<h;){const d=a[f++],g=a[f++];try{p=d(p)}catch(x){g.call(this,x);break}}try{c=df.call(this,p)}catch(d){return Promise.reject(d)}for(f=0,h=u.length;f<h;)c=c.then(u[f++],u[f++]);return c}getUri(t){t=br(this.defaults,t);const r=rf(t.baseURL,t.url,t.allowAbsoluteUrls);return Kc(r,t.params,t.paramsSerializer)}}j.forEach(["delete","get","head","options"],function(t){xr.prototype[t]=function(r,n){return this.request(br(n||{},{method:t,url:r,data:(n||{}).data}))}}),j.forEach(["post","put","patch"],function(t){function r(n){return function(i,s,a){return this.request(br(a||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}xr.prototype[t]=r(),xr.prototype[t+"Form"]=r(!0)});class Hs{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(o=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](o);n._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(a=>{n.subscribe(a),i=a}).then(o);return s.cancel=function(){n.unsubscribe(i)},s},t(function(i,s,a){n.reason||(n.reason=new Mr(i,s,a),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Hs(function(o){t=o}),cancel:t}}}function vv(e){return function(r){return e.apply(null,r)}}function wv(e){return j.isObject(e)&&e.isAxiosError===!0}const qs={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(qs).forEach(([e,t])=>{qs[t]=e});function hf(e){const t=new xr(e),r=Nc(xr.prototype.request,t);return j.extend(r,xr.prototype,t,{allOwnKeys:!0}),j.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return hf(br(e,o))},r}const Ee=hf(kn);Ee.Axios=xr,Ee.CanceledError=Mr,Ee.CancelToken=Hs,Ee.isCancel=Qc,Ee.VERSION=pf,Ee.toFormData=Lo,Ee.AxiosError=ee,Ee.Cancel=Ee.CanceledError,Ee.all=function(t){return Promise.all(t)},Ee.spread=vv,Ee.isAxiosError=wv,Ee.mergeConfig=br,Ee.AxiosHeaders=rt,Ee.formToJSON=e=>Xc(j.isHTMLForm(e)?new FormData(e):e),Ee.getAdapter=ff.getAdapter,Ee.HttpStatusCode=qs,Ee.default=Ee;function Ev(e){if(!e)return!1;const t=/^data:image\/(jpeg|png|gif|bmp|webp);base64,/i,r=/\.(jpeg|jpg|png|gif|bmp|webp)$/i;return t.test(e)||r.test(e)}const Tv=({imageUrl:e})=>{const[t,r]=m.useState(!1),n=()=>{r(!0)},o=()=>{r(!1)};return y.jsxs("div",{children:[y.jsx("img",{alt:"Thumbnail",style:{cursor:"pointer",width:"120px",height:"130px",objectFit:"cover"},onClick:n,src:e||"/place.png","data-toggle":"tooltip","data-placement":"top",title:"Click to view"}),t&&y.jsx("div",{className:"modal",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",justifyContent:"center",alignItems:"center"},onClick:o,children:y.jsxs("div",{className:"modal-content",style:{position:"relative",backgroundColor:"white",padding:"20px",borderRadius:"8px",width:"90vw"},onClick:i=>i.stopPropagation(),children:[y.jsx("span",{className:"close",onClick:o,style:{position:"absolute",top:"10px",right:"10px",fontSize:"24px",cursor:"pointer"},children:"×"}),y.jsx("img",{src:e||"/place.png",alt:"Full Image",style:{maxWidth:"90%",maxHeight:"90vh",objectFit:"contain"}})]})})]})};function gf({element:e,validationData:t}){const{register:r=()=>({}),setValue:n,getValues:o}=t||{},[i,s]=m.useState(),[a,l]=m.useState(!1),[u,c]=m.useState(!1),[f,h]=m.useState(""),p=o&&o(e==null?void 0:e.id);m.useEffect(()=>{s(p)},[p]);const[d,g]=m.useState("");m.useEffect(()=>{r(e.id)},[e.id,r]);const{url:x,method:b,responseType:v}=e||{},w=m.useCallback(async _=>{var k,S,C,A,N,L,P,I,R,q,J;if(!(!x||!b)){l(!0);try{let z;if(b.toLowerCase()==="get"){const G=`${x}?value=${_}`;z=await Ee.get(G)}else if(b.toLowerCase()==="post")z=await Ee.post(x,{value:_});else throw new Error("Unsupported HTTP method");z.status===200&&((((S=(k=z==null?void 0:z.data)==null?void 0:k.data)==null?void 0:S.status)||((C=z==null?void 0:z.data)==null?void 0:C.status))===!0?(c(!0),v==="string"?h(((N=(A=z==null?void 0:z.data)==null?void 0:A.data)==null?void 0:N.description)||((L=z==null?void 0:z.data)==null?void 0:L.description)||"Validation successful"):g(((I=(P=z==null?void 0:z.data)==null?void 0:P.data)==null?void 0:I.description)||((R=z==null?void 0:z.data)==null?void 0:R.description)||{})):(console.error("Invalid input:",_),h("Unable to validate input"),c(!1)))}catch(z){console.error("Error validating input:",z),h(((J=(q=z==null?void 0:z.response)==null?void 0:q.data)==null?void 0:J.message)||"Unable to validate input"),c(!1)}finally{l(!1)}}},[b,v,x]);return m.useEffect(()=>{if(i){const _=setTimeout(()=>{w(i)},700);return()=>clearTimeout(_)}},[w,i]),y.jsxs("div",{children:[y.jsxs("div",{className:"relative flex items-center",children:[y.jsx("input",{placeholder:(e==null?void 0:e.placeholder)||"",type:(e==null?void 0:e.inputType)||"text",className:"input-control",...r(e==null?void 0:e.id),onChange:_=>{s(_.target.value),n(e==null?void 0:e.id,_.target.value)}}),y.jsxs("span",{className:"absolute right-0",children:[a&&y.jsxs("span",{children:[" ",y.jsxs("svg",{className:"animate-spin -ml-1 mr-3 h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[y.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),y.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})]}),u&&!a&&y.jsx("span",{className:"text-green-600 text-lg pr-3 block",children:y.jsx(Be,{icon:"gg:check-o"})})]})]}),f&&v==="string"&&y.jsx("span",{className:`${u?"text-green-600":"text-red-600"} text-sm`,children:f}),v==="object"&&y.jsx("div",{className:"grid grid-cols-2 gap-6 text-sm text-gray-600 mt-2",children:Object.entries(d).map(([_,k])=>y.jsxs("div",{className:"flex items-center gap-x-2",children:[y.jsxs("span",{className:"font-semibold",children:[_,":"]}),Ev(k)?y.jsx(Tv,{imageUrl:k}):y.jsx("span",{children:String(k)})]},_))})]})}function _v({onGetTotal:e,readOnly:t,defaultValue:r,denominators:n}){const[o,i]=m.useState([...r]);function s(u,c){i(f=>{const h=[...f];return h[c]={...h[c],value:u},h})}function a(u,c){return parseFloat(u)*parseFloat(c)||0}const l=m.useMemo(()=>o.reduce((u,c)=>{const f=a(c.key,c.value);return u+f},0),[o]);return m.useEffect(()=>{e&&e(o)},[e,o]),m.useEffect(()=>{if(n!=null&&n.length){const u=n.map((c,f)=>({key:c.value,value:Array.isArray(r)&&r[f]?r[f].value:""}));i(u)}},[r,n]),y.jsx("div",{className:"mt-2",children:y.jsxs("div",{className:"border border-gray-200 rounded-lg overflow-hidden text-gray-700",children:[y.jsxs("div",{className:"grid grid-cols-3 text-sm font-bold border-b border-gray-100 bg-gray-50",children:[y.jsx("div",{className:"border-r px-4 py-2",children:y.jsx("span",{className:"",children:"Denomination"})}),y.jsx("div",{className:"border-r px-4 py-2",children:y.jsx("span",{children:"Quantity"})}),y.jsx("div",{className:"px-4 py-2",children:y.jsx("span",{children:"Sub total"})})]}),o.map((u,c)=>{var f,h;return y.jsxs("div",{className:"grid grid-cols-3 text-sm border-b border-gray-100",children:[y.jsx("div",{className:"border-r px-4 py-2 flex items-center",children:y.jsx("span",{className:"",children:(f=parseFloat(u.key))==null?void 0:f.toLocaleString()})}),y.jsx("div",{className:"border-r px-4 py-1",children:y.jsx("span",{children:y.jsx(yo,{id:"input-example",className:"border border-gray-100 rounded w-full px-3 py-1 outline-none",decimalsLimit:6,defaultValue:u.value,onValueChange:p=>s(p,c),disabled:t,allowNegativeValue:!1})})}),y.jsx("div",{className:"px-4 py-2 flex justify-between items-center",children:y.jsx("span",{children:(h=a(u.key,u.value))==null?void 0:h.toLocaleString()})})]},u.key+c+Math.random())}),y.jsxs("div",{className:"grid grid-cols-3 text-sm font-bold bg-gray-50",children:[y.jsx("div",{className:"border-r px-4 py-3 col-span-2 text-right",children:"Total"}),y.jsx("div",{className:"px-4 py-3",children:l==null?void 0:l.toLocaleString()})]})]})})}function yf({element:e,validationData:t}){const{register:r=()=>({}),setValue:n,getValues:o}=t||{},i=o&&o(e==null?void 0:e.id)||[];return m.useEffect(()=>{r(e.id)},[e.id,r]),y.jsx("div",{children:y.jsx(_v,{onGetTotal:s=>{n&&n(e.id,s)},denominators:(e==null?void 0:e.denominators)||[],defaultValue:i,readOnly:e==null?void 0:e.isReadOnly})})}const Sv={textField:Xn,longText:Vu,selectField:Ru,multiSelect:Ou,numberField:Xn,amountField:$c,date:sl,password:Nu,checkbox:Mu,radio:Du,email:Fu,file:ju,grid:$u,section:Iu,validateInput:gf,tableInput:yf},bf="edit",kv=e=>{const t=Sv[e.type];return t?y.jsx(jc,{element:e,state:bf,children:y.jsxs("div",{className:"relative",children:[y.jsx("div",{className:"absolute top-0 left-0 h-full w-full z-20"}),y.jsx(t,{element:e,state:bf})]})}):null};function Cv({elementData:e,sectionId:t}){const{formData:r,updateElementPosition:n,isDragging:o}=m.useContext(mt),[i,s]=m.useState(null),a=m.useCallback((f,h)=>{f.dataTransfer.setData("properties",h),s(h)},[]),l=m.useCallback(f=>{f.preventDefault(),f.stopPropagation(),f.dataTransfer.dropEffect="move"},[]),u=m.useCallback(f=>{var p;f.preventDefault(),f.stopPropagation();const h=(p=r.find(d=>d.id===t))==null?void 0:p.questionData;try{const d=f.dataTransfer.getData("properties"),g=f.currentTarget;if(!g.id||d===g.id)return;const x=h.findIndex(v=>v.id===d),b=h.findIndex(v=>v.id===g.id);if(x===-1||b===-1)return;if(h.length){const v=[...h];[v[x],v[b]]=[v[b],v[x]],n(v,t),s(null)}}catch(d){console.error("Error during drag and drop:",d),s(null)}},[r,n]),c=m.useCallback(f=>y.jsx("div",{id:f.id,className:`cursor-move border p-4 w-full transition-colors rounded-lg bg-white ${i===f.id?"bg-gray-100":""} ${i&&i!==f.id?"border-dashed border-blue-300":""}`,draggable:!0,onDrop:u,onDragOver:l,onDragStart:h=>a(h,f.id),children:kv(f)},f.id),[i,u,l,a]);return e!=null&&e.length?y.jsxs("div",{className:"w-full h-full flex flex-col gap-y-4 relative",children:[e==null?void 0:e.map(c),o&&y.jsx("div",{className:"bg-gray-50 rounded p-6 h-[60px] border-2 border-dashed flex items-center justify-center text-gray-400 opacity-70",children:y.jsx(Be,{icon:"octicon:plus-16"})})]}):y.jsx("div",{className:"w-full h-full flex items-center justify-center text-gray-500 min-h-[250px] p-10",children:"No input to display"})}const Ov=Tn({title:be(),description:be()}).required(),Fv=({isOpen:e,onClose:t,section:r})=>{const{updateSection:n}=m.useContext(mt),{register:o,handleSubmit:i,formState:{errors:s,isSubmitting:a,isValid:l},reset:u}=_s({resolver:Ss(Ov),defaultValues:r});if(m.useEffect(()=>{e||u()},[e,u]),!e)return null;const c=f=>{n(f,r.id),t()};return y.jsx("div",{className:"fixed inset-0 bg-black/30 flex items-center justify-center z-[999] cursor-default no-drag select-none",children:y.jsxs("div",{className:"min-w-[600px] bg-white rounded-xl shadow-xl relative flex flex-col items-center",children:[y.jsxs("div",{className:"w-full px-6 pt-6 pb-5 flex flex-col items-start gap-4 z-10 mb-6",children:[y.jsx("h2",{className:"text-lg font-semibold text-[#475467] font-onest",children:"Update Section Information"}),y.jsx("button",{onClick:t,className:"absolute right-4 top-4 p-2 text-[#98A2B3] hover:bg-gray-50 rounded-lg",children:y.jsx(Be,{icon:"tabler:x"})})]}),y.jsxs("form",{onSubmit:i(c),className:"w-full",children:[y.jsxs("div",{className:"w-full px-6 flex flex-col gap-5 z-10",children:[y.jsx(ve,{label:"Title",name:"title",register:o,errors:s}),y.jsx(ve,{label:"Description",name:"description",register:o,errors:s})]}),y.jsxs("div",{className:"w-full px-6 pt-8 pb-6 flex gap-3 mt-4",children:[y.jsx("button",{type:"button",onClick:t,className:"flex-1 px-4 py-2.5 bg-white border border-[#D0D5DD] rounded-lg shadow-xs font-semibold text-[#344054] font-onest",children:"Cancel"}),y.jsx("button",{type:"submit",disabled:!l||a,className:`flex-1 px-4 py-2.5 ${!l||a?"bg-[#F2F4F7]":"bg-[#2563EB]"} ${!l||a?"text-[#98A2B3]":"text-white"} rounded-lg shadow-xs font-semibold font-onest disabled:opacity-50`,children:a?"Saving...":"Save"})]})]})]})})},Av=()=>{const[e,t]=m.useState(!1),r=m.useRef(null),[n,o]=m.useState([0]),{removeSection:i,addElement:s,formData:a,setIsDragging:l,setSelectedSection:u,selectedSection:c}=m.useContext(mt),f=m.useCallback(g=>{g.preventDefault(),g.dataTransfer.dropEffect="move"},[]),h=m.useCallback(g=>{try{g.preventDefault(),l(!1);const x=g==null?void 0:g.currentTarget,b=g.dataTransfer.getData("properties");if(b){const v=JSON.parse(b),w={id:en(),sectionId:x.id,...v};s(w,x.id)}}catch(x){console.log(x),l(!1)}},[s,l]);function p(g){n.includes(g)?o(x=>x.filter(b=>b!==g)):o(x=>[...x,g])}function d(g){r.current=g,t(!0)}return y.jsxs("div",{className:"flex gap-x-4 mx-auto h-full relative px-6 pb-5 flex-col no-scrollbar overflow-y-auto max-h-[86vh]",children:[e&&y.jsx(Fv,{isOpen:e,onClose:()=>t(!1),section:r.current}),y.jsx("div",{className:" relative w-full flex flex-col gap-y-6 flex-1 py-4",children:a.map((g,x)=>y.jsxs("div",{className:"group cursor-pointer rounded",onClick:()=>u(g.id),children:[y.jsxs("div",{className:`border border-gray-100 rounded py-4 px-4 shadow-[rgba(149,157,165,0.2)_0px_2px_4px] transition-colors duration-200
65
65
  ${c===g.id?"border-dashed border-blue-400 bg-[#f7f8fa]":"border-transparent"} ${n.includes(x)?"min-h-[300px]":""}`,children:[y.jsxs("div",{className:"flex justify-between items-center",children:[y.jsx("h2",{className:"font-medium",children:g.title||"Section title"}),y.jsxs("div",{className:"flex gap-x-4 items-center",children:[y.jsx("button",{type:"button",className:"p-1 border rounded-lg text-xs",onClick:()=>d(g),children:y.jsx(Be,{icon:"fluent:edit-28-regular"})}),a.length>1&&y.jsx("button",{type:"button",className:"p-1 border rounded-lg text-xs",onClick:()=>i(g.id),children:y.jsx(Be,{icon:"lets-icons:trash-duotone-line"})}),y.jsx("button",{type:"button",className:"p-1 rounded-lg text-xs",onClick:()=>p(x),children:y.jsx(Be,{icon:n.includes(x)?"gravity-ui:minus":"octicon:plus-16"})})]})]}),(g==null?void 0:g.description)&&n.includes(x)&&y.jsx("p",{className:"text-sm text-gray-60 mt-2 text-gray-600",children:g==null?void 0:g.description}),n.includes(x)&&y.jsxs("div",{className:"mt-4 transition-all duration-200 h-full",id:g.id,onDrop:h,onDragOver:f,children:[y.jsx("hr",{}),y.jsx("div",{className:" gap-y-6 mt-4 h-full ",children:y.jsx(Cv,{elementData:g.questionData,sectionId:g.id})})]})]}),y.jsx("hr",{className:"mt-6 group-last:hidden"})]},g.id))})]})};function jv({questionData:e}){const{setFormData:t}=m.useContext(mt);return m.useEffect(()=>{e&&e.length>0&&t(e)},[e,t]),y.jsx("div",{className:"bg-white p-4 border border-[#E4E7EC] rounded-lg h-full overflow-y-auto",children:y.jsx(Av,{})})}const $v=()=>{const{setIsDragging:e,addElement:t,selectedSection:r}=m.useContext(mt),n=m.useCallback((i,s)=>{i.dataTransfer.setData("properties",JSON.stringify(s)),i.dataTransfer.effectAllowed="move",e(!0)},[e]);function o(i){if(!r){ue.error("Please select a section to add an element to.");return}const s={id:en(),sectionId:r,...i};t(s,r)}return y.jsx("div",{className:"w-full",children:y.jsx("div",{className:"pt-4 px-5 max-h-[70vh] overflow-y-auto",children:y.jsx("div",{children:y.jsx("ul",{className:"grid gap-y-[8px] mt-3",children:Vb.map(i=>y.jsxs("li",{onDragStart:s=>n(s,i),onClick:()=>o(i),style:{borderColor:i.color,color:i.color},className:`cursor-move text-[#475467] flex justify-between items-center \r
66
66
  border border-[#98A2B3] rounded-lg py-3 px-[14px] shadow-custom\r
67
67
  hover:shadow-lg transition-all duration-200\r
68
- active:opacity-50`,draggable:!0,children:[y.jsxs("span",{className:"flex gap-x-2 items-center",children:[y.jsx("span",{style:{color:i.color},children:y.jsx(Be,{icon:i.icon,iconClass:"w-5 h-5"})}),y.jsx("span",{className:"text-sm font-medium leading-[0]",children:i.label})]}),y.jsx("span",{className:"text-gray-400",children:y.jsx(Be,{icon:"akar-icons:drag-horizontal"})})]},i.type))})})})})},Nv=m.memo($v),Lv=({isOpen:e,onClose:t})=>{const{formData:r}=m.useContext(mt);return e?y.jsx("div",{className:"fixed inset-0 bg-black/30 flex items-center justify-center z-[999] cursor-default no-drag select-none",children:y.jsxs("div",{className:"max-w-[80vw] bg-white rounded-xl shadow-xl relative flex flex-col items-center w-full py-6 ",children:[y.jsx("button",{type:"button",onClick:t,className:"absolute top-3 right-4 text-sm",children:"Close"}),y.jsx("div",{className:"max-h-[90vh] overflow-y-auto h-full min-h-[600px] w-full",children:y.jsx(xf,{form_data:r,ignoreValidation:!0})})]})}):null};function Pv(){const{addSection:e}=m.useContext(mt),[t,r]=m.useState(!1);return y.jsxs("div",{className:"px-[30px] py-[10px] flex justify-between items-center",children:[y.jsx("div",{className:"flex gap-x-4 items-center"}),t&&y.jsx(Lv,{isOpen:t,onClose:()=>r(!1),element:void 0}),y.jsxs("div",{className:"py-4 flex justify-end gap-x-6 text-sm",children:[y.jsx(Cr,{onClick:()=>e(),text:"Add section",btnClass:"text-gray-700 border-[#98A2B3] !font-medium bg-transparent"}),y.jsx(Cr,{onClick:()=>r(!0),text:"Preview",btnClass:"text-gray-700 border-[#98A2B3] !font-medium"})]})]})}function Dv({onSubmit:e,questionData:t}){return y.jsx(Dm,{children:y.jsxs("div",{className:"w-full h-screen bg-[#E4E7EC] flex flex-col",children:[y.jsx(ud,{}),y.jsx("div",{className:"border-b bg-white border-[#E4E7EC]",children:y.jsx(Pv,{})}),y.jsxs("div",{className:"flex flex-1 ",children:[y.jsx("div",{className:"w-[270px] h-full border-l border-[#E4E7EC] bg-white",children:y.jsx(Nv,{})}),y.jsx("div",{className:"flex-1 h-full max-h-full p-4 z-[1]",children:y.jsx(jv,{questionData:t})})]}),y.jsx("div",{className:"border-b bg-white border-t border-[#E4E7EC]",children:y.jsx(Im,{onSubmit:e})})]})})}const Iv=({onSubmit:e,questionData:t,isReadOnly:r,config:n={buttonColor:"#333"}})=>(m.useEffect(()=>{n&&il("config",n)},[n]),y.jsx(Dv,{onSubmit:e,questionData:t,isReadOnly:r}));function Mv(){return y.jsx("div",{className:"flex justify-center items-center h-full",children:y.jsx("p",{children:"Loading..."})})}const Rv={textField:Jn,longText:Vu,selectField:Ru,multiSelect:Ou,numberField:Jn,amountField:$c,date:sl,password:Nu,checkbox:Mu,radio:Du,email:Fu,file:ju,grid:$u,section:Iu,validateInput:gf,tableInput:yf},Vv=(e,t)=>{const r=Rv[e.type];return r?y.jsxs("div",{children:[y.jsx("label",{className:"block text-sm font-medium mb-[5px]",children:e.inputLabel}),y.jsx(r,{element:e,state:"edit",validationData:t})]}):null},vr={required:"This field is required",email:"Invalid email format",minLength:e=>`Minimum length is ${e}`,maxLength:e=>`Maximum length is ${e}`,minAmount:e=>`Minimum amount is ${e}`,maxAmount:e=>`Maximum amount is ${e}`},Bv=e=>({textField:be().nullable(),longText:be().nullable(),numberField:wn().nullable().transform(r=>isNaN(r)?null:r),amountField:wn().nullable().transform(r=>isNaN(r)?null:r),selectField:be().nullable(),checkbox:vn().nullable(),radio:vn().nullable(),email:be().nullable().email(vr.email),date:$s().typeError("Invalid date").nullable()})[e]||vn().nullable(),Uv=(e,t,r)=>t?e.type==="boolean"?e.oneOf([!0],r||vr.required):e.required(r||vr.required):e,zv=(e,{minLength:t,maxLength:r,minLengthMessage:n,maxLengthMessage:o})=>{let i=e;return t&&(i=i.min(t,n||vr.minLength(t))),r&&(i=i.max(r,o||vr.maxLength(r))),i},Hv=(e,{minAmount:t,maxAmount:r,minAmountMessage:n,maxAmountMessage:o})=>{let i=e;return t&&(i=i.min(parseFloat(String(t)),n||vr.minAmount(t))),r&&(i=i.max(parseFloat(String(r)),o||vr.maxAmount(r))),i};function qv(e){const t={};return e.forEach(({questionData:r})=>{r.forEach(n=>{const{id:o,type:i,isRequired:s,requiredMessage:a}=n;let l=Bv(i);l=Uv(l,s,a),i==="textField"||i==="longText"||i==="email"?l=zv(l,n):(i==="numberField"||i==="amountField")&&(l=Hv(l,n)),t[o]=l})}),Tn().shape(t)}function Wv(e){return e.reduce((t,r)=>(r.questionData.forEach(n=>{t[n.id]=Object.prototype.hasOwnProperty.call(n,"value")?n.value:null}),t),{})}const Kv=({form_data:e,answerData:t,ignoreValidation:r,onSubmitData:n,isReadOnly:o})=>{var C;const[i,s]=m.useState(0),a=m.useMemo(()=>e.length,[e]),l=qv(e),u=_s({resolver:Ss(l),mode:"onSubmit",defaultValues:{}}),{register:c,setValue:f,watch:h,handleSubmit:p,reset:d,getValues:g,formState:{errors:x,isSubmitting:b},trigger:v}=u,w=xi("config"),_=A=>{const N=e==null?void 0:e.map(P=>{var L;return{...P,questionData:(L=P==null?void 0:P.questionData)==null?void 0:L.map(I=>{const R=A[I.id];return{...I,value:R}})}});n&&n(N),console.log("🚀 ~ FormRenderer ~ tempData:",N)};m.useEffect(()=>{if(t&&t.length>0){const A=Wv(t);d(A)}},[t,d]);async function k(){var A;!r&&!await v((A=e==null?void 0:e[i].questionData)==null?void 0:A.map(P=>P.id))||s(i+1)}function S(){s(i-1)}return y.jsx(q0,{...u,children:y.jsxs("form",{onSubmit:p(_),className:"container mx-auto p-6",children:[y.jsx("div",{className:"relative w-full flex flex-col gap-y-12 py-4",children:y.jsxs("div",{children:[y.jsxs("div",{className:"mb-4",children:[(e==null?void 0:e[i].title)&&y.jsx("h2",{className:"text-lg font-semibold mb-[6px]",children:e==null?void 0:e[i].title}),(e==null?void 0:e[i].description)&&y.jsx("p",{className:"text-sm",children:e==null?void 0:e[i].description})]}),y.jsx("div",{className:"grid gap-y-6",children:(C=e==null?void 0:e[i].questionData)==null?void 0:C.map(A=>{var N;return y.jsx("div",{children:y.jsxs("div",{children:[Vv(A,{register:c,setValue:f,watch:h,errors:x,trigger:v,isSubmitting:b,isReadOnly:o,getValues:g}),y.jsx("div",{className:"text-xs text-red-600 mt-1",children:(N=x==null?void 0:x[A.id])==null?void 0:N.message})]})},A.id)})})]},e==null?void 0:e[i].id)}),y.jsxs("div",{className:"pt-8 flex justify-end items-center gap-4",children:[i!==0&&y.jsx(Cr,{type:"button",text:"Back",btnClass:"text-gray-700 border-[#98A2B3] !font-medium !py-[10px] px-10 bg-gray-200 rounded-lg",onClick:S}),i!==a-1?y.jsx(Cr,{type:"button",text:"Continue",style:{background:(w==null?void 0:w.buttonColor)||"#333"},onClick:k,btnClass:"text-gray-700 border-[#98A2B3] !font-medium !py-[10px] px-10 bg-blue-600 text-white rounded-lg"}):y.jsx(y.Fragment,{children:!r&&y.jsx(Cr,{isDisabled:b,isLoading:b,type:"submit",text:"Submit",style:{background:(w==null?void 0:w.buttonColor)||"#333"},btnClass:"text-gray-700 border-[#98A2B3] !font-medium !py-[10px] px-10 bg-blue-600 text-white rounded-lg"})})]})]})})};function xf({answerData:e,form_data:t,ignoreValidation:r,onSubmit:n,isReadOnly:o=!1,loading:i=!1,config:s={buttonColor:"#333"}}){return m.useEffect(()=>{s&&il("config",s)},[s]),i?y.jsx(Mv,{}):t?y.jsx("div",{className:"w-full",children:y.jsx(Kv,{form_data:t,answerData:e,ignoreValidation:r,onSubmitData:n,isReadOnly:o})}):y.jsx("div",{children:y.jsx("p",{children:"Error: No form data available. Please ensure the form data is saved correctly."})})}Nt.FormBuilder=Iv,Nt.FormViewer=xf,Object.defineProperty(Nt,Symbol.toStringTag,{value:"Module"})});
68
+ active:opacity-50`,draggable:!0,children:[y.jsxs("span",{className:"flex gap-x-2 items-center",children:[y.jsx("span",{style:{color:i.color},children:y.jsx(Be,{icon:i.icon,iconClass:"w-5 h-5"})}),y.jsx("span",{className:"text-sm font-medium leading-[0]",children:i.label})]}),y.jsx("span",{className:"text-gray-400",children:y.jsx(Be,{icon:"akar-icons:drag-horizontal"})})]},i.type))})})})})},Nv=m.memo($v),Pv=({isOpen:e,onClose:t})=>{const{formData:r}=m.useContext(mt);return e?y.jsx("div",{className:"fixed inset-0 bg-black/30 flex items-center justify-center z-[999] cursor-default no-drag select-none",children:y.jsxs("div",{className:"max-w-[80vw] bg-white rounded-xl shadow-xl relative flex flex-col items-center w-full py-6 ",children:[y.jsx("button",{type:"button",onClick:t,className:"absolute top-3 right-4 text-sm",children:"Close"}),y.jsx("div",{className:"max-h-[90vh] overflow-y-auto h-full min-h-[600px] w-full",children:y.jsx(xf,{form_data:r,ignoreValidation:!0})})]})}):null};function Lv(){const{addSection:e}=m.useContext(mt),[t,r]=m.useState(!1);return y.jsxs("div",{className:"px-[30px] py-[10px] flex justify-between items-center",children:[y.jsx("div",{className:"flex gap-x-4 items-center"}),t&&y.jsx(Pv,{isOpen:t,onClose:()=>r(!1),element:void 0}),y.jsxs("div",{className:"py-4 flex justify-end gap-x-6 text-sm",children:[y.jsx(Cr,{onClick:()=>e(),text:"Add section",btnClass:"text-gray-700 border-[#98A2B3] !font-medium bg-transparent"}),y.jsx(Cr,{onClick:()=>r(!0),text:"Preview",btnClass:"text-gray-700 border-[#98A2B3] !font-medium"})]})]})}function Dv({onSubmit:e,questionData:t}){return y.jsx(Dm,{children:y.jsxs("div",{className:"w-full h-screen bg-[#E4E7EC] flex flex-col",children:[y.jsx(ud,{}),y.jsx("div",{className:"border-b bg-white border-[#E4E7EC]",children:y.jsx(Lv,{})}),y.jsxs("div",{className:"flex flex-1 ",children:[y.jsx("div",{className:"w-[270px] h-full border-l border-[#E4E7EC] bg-white",children:y.jsx(Nv,{})}),y.jsx("div",{className:"flex-1 h-full max-h-full p-4 z-[1]",children:y.jsx(jv,{questionData:t})})]}),y.jsx("div",{className:"border-b bg-white border-t border-[#E4E7EC]",children:y.jsx(Im,{onSubmit:e})})]})})}const Iv=({onSubmit:e,questionData:t,isReadOnly:r,config:n={buttonColor:"#333"}})=>(m.useEffect(()=>{n&&il("config",n)},[n]),y.jsx(Dv,{onSubmit:e,questionData:t,isReadOnly:r})),Mv=()=>(m.useEffect(()=>{const e=Jn("config"),t=(e==null?void 0:e.loaderColor)||"#333";document.documentElement.style.setProperty("--loader-color",t)},[]),y.jsx("div",{className:"h-screen w-screen flex justify-center items-center",children:y.jsx("span",{className:"loader"})})),Rv={textField:Xn,longText:Vu,selectField:Ru,multiSelect:Ou,numberField:Xn,amountField:$c,date:sl,password:Nu,checkbox:Mu,radio:Du,email:Fu,file:ju,grid:$u,section:Iu,validateInput:gf,tableInput:yf},Vv=(e,t)=>{const r=Rv[e.type];return r?y.jsxs("div",{children:[y.jsx("label",{className:"block text-sm font-medium mb-[5px]",children:e.inputLabel}),y.jsx(r,{element:e,state:"edit",validationData:t})]}):null},vr={required:"This field is required",email:"Invalid email format",minLength:e=>`Minimum length is ${e}`,maxLength:e=>`Maximum length is ${e}`,minAmount:e=>`Minimum amount is ${e}`,maxAmount:e=>`Maximum amount is ${e}`},Bv=e=>({textField:be().nullable(),longText:be().nullable(),numberField:wn().nullable().transform(r=>isNaN(r)?null:r),amountField:wn().nullable().transform(r=>isNaN(r)?null:r),selectField:be().nullable(),checkbox:vn().nullable(),radio:vn().nullable(),email:be().nullable().email(vr.email),date:$s().typeError("Invalid date").nullable()})[e]||vn().nullable(),Uv=(e,t,r)=>t?e.type==="boolean"?e.oneOf([!0],r||vr.required):e.required(r||vr.required):e,zv=(e,{minLength:t,maxLength:r,minLengthMessage:n,maxLengthMessage:o})=>{let i=e;return t&&(i=i.min(t,n||vr.minLength(t))),r&&(i=i.max(r,o||vr.maxLength(r))),i},Hv=(e,{minAmount:t,maxAmount:r,minAmountMessage:n,maxAmountMessage:o})=>{let i=e;return t&&(i=i.min(parseFloat(String(t)),n||vr.minAmount(t))),r&&(i=i.max(parseFloat(String(r)),o||vr.maxAmount(r))),i};function qv(e){const t={};return e.forEach(({questionData:r})=>{r.forEach(n=>{const{id:o,type:i,isRequired:s,requiredMessage:a}=n;let l=Bv(i);l=Uv(l,s,a),i==="textField"||i==="longText"||i==="email"?l=zv(l,n):(i==="numberField"||i==="amountField")&&(l=Hv(l,n)),t[o]=l})}),Tn().shape(t)}function Wv(e){return e.reduce((t,r)=>(r.questionData.forEach(n=>{t[n.id]=Object.prototype.hasOwnProperty.call(n,"value")?n.value:null}),t),{})}const Kv=({form_data:e,answerData:t,ignoreValidation:r,onSubmitData:n,isReadOnly:o})=>{var C;const[i,s]=m.useState(0),a=m.useMemo(()=>e.length,[e]),l=qv(e),u=_s({resolver:Ss(l),mode:"onSubmit",defaultValues:{}}),{register:c,setValue:f,watch:h,handleSubmit:p,reset:d,getValues:g,formState:{errors:x,isSubmitting:b},trigger:v}=u,w=Jn("config"),_=A=>{const N=e==null?void 0:e.map(L=>{var P;return{...L,questionData:(P=L==null?void 0:L.questionData)==null?void 0:P.map(I=>{const R=A[I.id];return{...I,value:R}})}});n&&n(N),console.log("🚀 ~ FormRenderer ~ tempData:",N)};m.useEffect(()=>{if(t&&t.length>0){const A=Wv(t);d(A)}},[t,d]);async function k(){var A;!r&&!await v((A=e==null?void 0:e[i].questionData)==null?void 0:A.map(L=>L.id))||s(i+1)}function S(){s(i-1)}return y.jsx(q0,{...u,children:y.jsxs("form",{onSubmit:p(_),className:"container mx-auto p-6",children:[y.jsx("div",{className:"relative w-full flex flex-col gap-y-12 py-4",children:y.jsxs("div",{children:[y.jsxs("div",{className:"mb-4",children:[(e==null?void 0:e[i].title)&&y.jsx("h2",{className:"text-lg font-semibold mb-[6px]",children:e==null?void 0:e[i].title}),(e==null?void 0:e[i].description)&&y.jsx("p",{className:"text-sm",children:e==null?void 0:e[i].description})]}),y.jsx("div",{className:"grid gap-y-6",children:(C=e==null?void 0:e[i].questionData)==null?void 0:C.map(A=>{var N;return y.jsx("div",{children:y.jsxs("div",{children:[Vv(A,{register:c,setValue:f,watch:h,errors:x,trigger:v,isSubmitting:b,isReadOnly:o,getValues:g}),y.jsx("div",{className:"text-xs text-red-600 mt-1",children:(N=x==null?void 0:x[A.id])==null?void 0:N.message})]})},A.id)})})]},e==null?void 0:e[i].id)}),y.jsxs("div",{className:"pt-8 flex justify-end items-center gap-4",children:[i!==0&&y.jsx(Cr,{type:"button",text:"Back",btnClass:"text-gray-700 border-[#98A2B3] !font-medium !py-[10px] px-10 bg-gray-200 rounded-lg",onClick:S}),i!==a-1?y.jsx(Cr,{type:"button",text:"Continue",style:{background:(w==null?void 0:w.buttonColor)||"#333"},onClick:k,btnClass:"text-gray-700 border-[#98A2B3] !font-medium !py-[10px] px-10 bg-blue-600 text-white rounded-lg"}):y.jsx(y.Fragment,{children:!r&&y.jsx(Cr,{isDisabled:b,isLoading:b,type:"submit",text:"Submit",style:{background:(w==null?void 0:w.buttonColor)||"#333"},btnClass:"text-gray-700 border-[#98A2B3] !font-medium !py-[10px] px-10 bg-blue-600 text-white rounded-lg"})})]})]})})};function xf({answerData:e,form_data:t,ignoreValidation:r,onSubmit:n,isReadOnly:o=!1,loading:i=!1,config:s={buttonColor:"#333"}}){return m.useEffect(()=>{s&&il("config",s)},[s]),i?y.jsx(Mv,{}):t?y.jsx("div",{className:"w-full",children:y.jsx(Kv,{form_data:t,answerData:e,ignoreValidation:r,onSubmitData:n,isReadOnly:o})}):y.jsx("div",{children:y.jsx("p",{children:"Error: No form data available. Please ensure the form data is saved correctly."})})}Nt.FormBuilder=Iv,Nt.FormViewer=xf,Object.defineProperty(Nt,Symbol.toStringTag,{value:"Module"})});