From da666bcb9b959af248901152c4614cb8d311e6b5 Mon Sep 17 00:00:00 2001 From: yoan <536464346@qq.com> Date: Wed, 28 Aug 2024 15:05:23 +0800 Subject: [PATCH] update ignore --- .gitignore | 2 +- ui/dist/assets/index-CVqrGJzH.css | 1 + ui/dist/assets/index-hbqdRXOp.js | 239 ++++++++++++++++++++++++++++++ 3 files changed, 241 insertions(+), 1 deletion(-) create mode 100644 ui/dist/assets/index-CVqrGJzH.css create mode 100644 ui/dist/assets/index-hbqdRXOp.js diff --git a/.gitignore b/.gitignore index 02803236..8ef500b1 100644 --- a/.gitignore +++ b/.gitignore @@ -17,4 +17,4 @@ build *.sln *.sw? -dist/ +./dist diff --git a/ui/dist/assets/index-CVqrGJzH.css b/ui/dist/assets/index-CVqrGJzH.css new file mode 100644 index 00000000..41ff633f --- /dev/null +++ b/ui/dist/assets/index-CVqrGJzH.css @@ -0,0 +1 @@ +*,: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]{display:none}:root{--background: 0 0% 100%;--foreground: 20 14.3% 4.1%;--card: 0 0% 100%;--card-foreground: 20 14.3% 4.1%;--popover: 0 0% 100%;--popover-foreground: 20 14.3% 4.1%;--primary: 24.6 95% 53.1%;--primary-foreground: 60 9.1% 97.8%;--secondary: 60 4.8% 95.9%;--secondary-foreground: 24 9.8% 10%;--muted: 60 4.8% 95.9%;--muted-foreground: 25 5.3% 44.7%;--accent: 60 4.8% 95.9%;--accent-foreground: 24 9.8% 10%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 60 9.1% 97.8%;--border: 20 5.9% 90%;--input: 20 5.9% 90%;--ring: 24.6 95% 53.1%;--radius: .5rem;--chart-1: 12 76% 61%;--chart-2: 173 58% 39%;--chart-3: 197 37% 24%;--chart-4: 43 74% 66%;--chart-5: 27 87% 67%}*,: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: }.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 1400px){.container{max-width:1400px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.bottom-0{bottom:0}.left-0{left:0}.left-2{left:.5rem}.left-\[50\%\]{left:50%}.right-0{right:0}.right-2{right:.5rem}.right-4{right:1rem}.top-0{top:0}.top-2{top:.5rem}.top-4{top:1rem}.top-\[50\%\]{top:50%}.z-50{z-index:50}.z-\[100\]{z-index:100}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-\[-0\.65rem\]{margin-left:-.65rem;margin-right:-.65rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mb-1{margin-bottom:.25rem}.mb-10{margin-bottom:2.5rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mt-1{margin-top:.25rem}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-24{margin-top:6rem}.mt-3{margin-top:.75rem}.mt-32{margin-top:8rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-auto{margin-top:auto}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.h-1{height:.25rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[1px\]{height:1px}.h-\[36px\]{height:36px}.h-\[80dvh\]{height:80dvh}.h-\[80vh\]{height:80vh}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.max-h-96{max-height:24rem}.max-h-screen{max-height:100vh}.min-h-\[80px\]{min-height:80px}.min-h-screen{min-height:100vh}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-24{width:6rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-32{width:8rem}.w-4{width:1rem}.w-40{width:10rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-52{width:13rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-\[100px\]{width:100px}.w-\[1px\]{width:1px}.w-\[36px\]{width:36px}.w-full{width:100%}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.max-w-\[35em\]{max-width:35em}.max-w-\[40em\]{max-width:40em}.max-w-lg{max-width:32rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.caption-bottom{caption-side:bottom}.translate-x-\[-50\%\]{--tw-translate-x: -50%;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))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;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))}.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))}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.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-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.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-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * 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))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.text-nowrap{text-wrap:nowrap}.rounded{border-radius:.25rem}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.rounded-t-\[10px\]{border-top-left-radius:10px;border-top-right-radius:10px}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-destructive{border-color:hsl(var(--destructive))}.border-destructive\/50{border-color:hsl(var(--destructive) / .5)}.border-input{border-color:hsl(var(--input))}.border-primary{border-color:hsl(var(--primary))}.border-transparent{border-color:transparent}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-background{background-color:hsl(var(--background))}.bg-black\/80{background-color:#000c}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-gray-950{--tw-bg-opacity: 1;background-color:rgb(3 7 18 / var(--tw-bg-opacity))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/40{background-color:hsl(var(--muted) / .4)}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(255 237 213 / var(--tw-bg-opacity))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-transparent{background-color:transparent}.fill-current{fill:currentColor}.p-0{padding:0}.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}.p-\[1px\]{padding:1px}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.pl-8{padding-left:2rem}.pr-2{padding-right:.5rem}.pr-8{padding-right:2rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.text-left{text-align:left}.text-center{text-align:center}.align-middle{vertical-align:middle}.text-2xl{font-size:1.5rem;line-height:2rem}.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}.font-normal{font-weight:400}.font-semibold{font-weight:600}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.tracking-widest{letter-spacing:.1em}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-current{color:currentColor}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-foreground\/50{color:hsl(var(--foreground) / .5)}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-stone-100{--tw-text-opacity: 1;color:rgb(245 245 244 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-90{opacity:.9}.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-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px 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-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 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{outline-style:solid}.ring-0{--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)}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.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}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in-0{--tw-enter-opacity: 0}.zoom-in-95{--tw-enter-scale: .95}.duration-200{animation-duration:.2s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-destructive\/80:hover{background-color:hsl(var(--destructive) / .8)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-primary\/80:hover{background-color:hsl(var(--primary) / .8)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-secondary:hover{background-color:hsl(var(--secondary))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-primary:hover{color:hsl(var(--primary))}.hover\:text-stone-900:hover{--tw-text-opacity: 1;color:rgb(28 25 23 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:opacity-100:focus{opacity:1}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2: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(2px + 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)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--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(2px + 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)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color: hsl(var(--background))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:opacity-100{opacity:1}.group.destructive .group-\[\.destructive\]\:border-muted\/40{border-color:hsl(var(--muted) / .4)}.group.destructive .group-\[\.destructive\]\:text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity))}.group.destructive .group-\[\.destructive\]\:hover\:border-destructive\/30:hover{border-color:hsl(var(--destructive) / .3)}.group.destructive .group-\[\.destructive\]\:hover\:bg-destructive:hover{background-color:hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:hover\:text-destructive-foreground:hover{color:hsl(var(--destructive-foreground))}.group.destructive .group-\[\.destructive\]\:hover\:text-red-50:hover{--tw-text-opacity: 1;color:rgb(254 242 242 / var(--tw-text-opacity))}.group.destructive .group-\[\.destructive\]\:focus\:ring-destructive:focus{--tw-ring-color: hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:focus\:ring-red-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 113 113 / var(--tw-ring-opacity))}.group.destructive .group-\[\.destructive\]\:focus\:ring-offset-red-600:focus{--tw-ring-offset-color: #dc2626}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y: .25rem;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))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x: -.25rem;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))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x: .25rem;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))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y: -.25rem;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))}.data-\[state\=checked\]\:translate-x-5[data-state=checked]{--tw-translate-x: 1.25rem;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))}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked],.data-\[swipe\=cancel\]\:translate-x-0[data-swipe=cancel]{--tw-translate-x: 0px;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))}.data-\[swipe\=end\]\:translate-x-\[var\(--radix-toast-swipe-end-x\)\][data-swipe=end]{--tw-translate-x: var(--radix-toast-swipe-end-x);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))}.data-\[swipe\=move\]\:translate-x-\[var\(--radix-toast-swipe-move-x\)\][data-swipe=move]{--tw-translate-x: var(--radix-toast-swipe-move-x);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))}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[state\=open\]\:bg-secondary[data-state=open]{background-color:hsl(var(--secondary))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:hsl(var(--input))}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[swipe\=move\]\:transition-none[data-swipe=move]{transition-property:none}.data-\[state\=closed\]\:duration-300[data-state=closed]{transition-duration:.3s}.data-\[state\=open\]\:duration-500[data-state=open]{transition-duration:.5s}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[state\=closed\]\:animate-out[data-state=closed],.data-\[swipe\=end\]\:animate-out[data-swipe=end]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=closed\]\:fade-out-80[data-state=closed]{--tw-exit-opacity: .8}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\[state\=closed\]\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y: 100%}.data-\[state\=closed\]\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x: -100%}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-right[data-state=closed],.data-\[state\=closed\]\:slide-out-to-right-full[data-state=closed]{--tw-exit-translate-x: 100%}.data-\[state\=closed\]\:slide-out-to-top[data-state=closed]{--tw-exit-translate-y: -100%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-bottom[data-state=open]{--tw-enter-translate-y: 100%}.data-\[state\=open\]\:slide-in-from-left[data-state=open]{--tw-enter-translate-x: -100%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-right[data-state=open]{--tw-enter-translate-x: 100%}.data-\[state\=open\]\:slide-in-from-top[data-state=open]{--tw-enter-translate-y: -100%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-top-full[data-state=open]{--tw-enter-translate-y: -100%}.data-\[state\=closed\]\:duration-300[data-state=closed]{animation-duration:.3s}.data-\[state\=open\]\:duration-500[data-state=open]{animation-duration:.5s}.dark\:border-destructive:is(.dark *){border-color:hsl(var(--destructive))}@media (min-width: 640px){.sm\:bottom-0{bottom:0}.sm\:right-0{right:0}.sm\:top-auto{top:auto}.sm\:ml-2{margin-left:.5rem}.sm\:mt-0{margin-top:0}.sm\:flex{display:flex}.sm\:hidden{display:none}.sm\:w-24{width:6rem}.sm\:w-32{width:8rem}.sm\:w-40{width:10rem}.sm\:w-48{width:12rem}.sm\:w-52{width:13rem}.sm\:w-56{width:14rem}.sm\:w-64{width:16rem}.sm\:w-\[35em\]{width:35em}.sm\:max-w-5xl{max-width:64rem}.sm\:max-w-\[600px\]{max-width:600px}.sm\:max-w-sm{max-width:24rem}.sm\:flex-row{flex-direction:row}.sm\:flex-col{flex-direction:column}.sm\:justify-end{justify-content:flex-end}.sm\:justify-center{justify-content:center}.sm\: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)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:p-2{padding:.5rem}.sm\:pt-0{padding-top:0}.sm\:text-left{text-align:left}.data-\[state\=open\]\:sm\:slide-in-from-bottom-full[data-state=open]{--tw-enter-translate-y: 100%}}@media (min-width: 768px){.md\:block{display:block}.md\:hidden{display:none}.md\:max-w-\[420px\]{max-width:420px}.md\:grid-cols-\[220px_1fr\]{grid-template-columns:220px 1fr}}@media (min-width: 1024px){.lg\:h-\[60px\]{height:60px}.lg\:grid-cols-\[280px_1fr\]{grid-template-columns:280px 1fr}.lg\:gap-6{gap:1.5rem}.lg\:p-6{padding:1.5rem}.lg\:px-4{padding-left:1rem;padding-right:1rem}.lg\:px-6{padding-left:1.5rem;padding-right:1.5rem}}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\[\&\>svg\+div\]\:translate-y-\[-3px\]>svg+div{--tw-translate-y: -3px;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))}.\[\&\>svg\]\:absolute>svg{position:absolute}.\[\&\>svg\]\:left-4>svg{left:1rem}.\[\&\>svg\]\:top-4>svg{top:1rem}.\[\&\>svg\]\:text-destructive>svg{color:hsl(var(--destructive))}.\[\&\>svg\]\:text-foreground>svg{color:hsl(var(--foreground))}.\[\&\>svg\~\*\]\:pl-7>svg~*{padding-left:1.75rem}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&_p\]\:leading-relaxed p{line-height:1.625}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px} diff --git a/ui/dist/assets/index-hbqdRXOp.js b/ui/dist/assets/index-hbqdRXOp.js new file mode 100644 index 00000000..f832f0fd --- /dev/null +++ b/ui/dist/assets/index-hbqdRXOp.js @@ -0,0 +1,239 @@ +var TT=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var dU=TT((SU,Cu)=>{function bw(e,t){for(var r=0;rn[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function r(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(s){if(s.ep)return;s.ep=!0;const o=r(s);fetch(s.href,o)}})();var Cc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function cm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Sw={exports:{}},Cd={},kw={exports:{}},Ze={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Gl=Symbol.for("react.element"),RT=Symbol.for("react.portal"),NT=Symbol.for("react.fragment"),PT=Symbol.for("react.strict_mode"),jT=Symbol.for("react.profiler"),DT=Symbol.for("react.provider"),OT=Symbol.for("react.context"),AT=Symbol.for("react.forward_ref"),MT=Symbol.for("react.suspense"),IT=Symbol.for("react.memo"),LT=Symbol.for("react.lazy"),Vv=Symbol.iterator;function FT(e){return e===null||typeof e!="object"?null:(e=Vv&&e[Vv]||e["@@iterator"],typeof e=="function"?e:null)}var Cw={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ew=Object.assign,Tw={};function ta(e,t,r){this.props=e,this.context=t,this.refs=Tw,this.updater=r||Cw}ta.prototype.isReactComponent={};ta.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};ta.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Rw(){}Rw.prototype=ta.prototype;function um(e,t,r){this.props=e,this.context=t,this.refs=Tw,this.updater=r||Cw}var dm=um.prototype=new Rw;dm.constructor=um;Ew(dm,ta.prototype);dm.isPureReactComponent=!0;var Wv=Array.isArray,Nw=Object.prototype.hasOwnProperty,fm={current:null},Pw={key:!0,ref:!0,__self:!0,__source:!0};function jw(e,t,r){var n,s={},o=null,i=null;if(t!=null)for(n in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)Nw.call(t,n)&&!Pw.hasOwnProperty(n)&&(s[n]=t[n]);var a=arguments.length-2;if(a===1)s.children=r;else if(1>>1,$=Z[z];if(0>>1;zs(se,Q))Ee<$&&0>s(fe,se)?(Z[z]=fe,Z[Ee]=Q,z=Ee):(Z[z]=se,Z[ne]=Q,z=ne);else if(Ee<$&&0>s(fe,Q))Z[z]=fe,Z[Ee]=Q,z=Ee;else break e}}return I}function s(Z,I){var Q=Z.sortIndex-I.sortIndex;return Q!==0?Q:Z.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,a=i.now();e.unstable_now=function(){return i.now()-a}}var l=[],c=[],f=1,d=null,h=3,m=!1,y=!1,p=!1,x=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(Z){for(var I=r(c);I!==null;){if(I.callback===null)n(c);else if(I.startTime<=Z)n(c),I.sortIndex=I.expirationTime,t(l,I);else break;I=r(c)}}function C(Z){if(p=!1,_(Z),!y)if(r(l)!==null)y=!0,te(E);else{var I=r(c);I!==null&&W(C,I.startTime-Z)}}function E(Z,I){y=!1,p&&(p=!1,g(O),O=-1),m=!0;var Q=h;try{for(_(I),d=r(l);d!==null&&(!(d.expirationTime>I)||Z&&!q());){var z=d.callback;if(typeof z=="function"){d.callback=null,h=d.priorityLevel;var $=z(d.expirationTime<=I);I=e.unstable_now(),typeof $=="function"?d.callback=$:d===r(l)&&n(l),_(I)}else n(l);d=r(l)}if(d!==null)var de=!0;else{var ne=r(c);ne!==null&&W(C,ne.startTime-I),de=!1}return de}finally{d=null,h=Q,m=!1}}var T=!1,P=null,O=-1,j=5,L=-1;function q(){return!(e.unstable_now()-LZ||125z?(Z.sortIndex=Q,t(c,Z),r(l)===null&&Z===r(c)&&(p?(g(O),O=-1):p=!0,W(C,Q-z))):(Z.sortIndex=$,t(l,Z),y||m||(y=!0,te(E))),Z},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(Z){var I=h;return function(){var Q=h;h=I;try{return Z.apply(this,arguments)}finally{h=Q}}}})(Lw);Iw.exports=Lw;var KT=Iw.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var qT=w,Fr=KT;function oe(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Nh=Object.prototype.hasOwnProperty,XT=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Hv={},Yv={};function QT(e){return Nh.call(Yv,e)?!0:Nh.call(Hv,e)?!1:XT.test(e)?Yv[e]=!0:(Hv[e]=!0,!1)}function JT(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function eR(e,t,r,n){if(t===null||typeof t>"u"||JT(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function gr(e,t,r,n,s,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var tr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){tr[e]=new gr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];tr[t]=new gr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){tr[e]=new gr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){tr[e]=new gr(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){tr[e]=new gr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){tr[e]=new gr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){tr[e]=new gr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){tr[e]=new gr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){tr[e]=new gr(e,5,!1,e.toLowerCase(),null,!1,!1)});var pm=/[\-:]([a-z])/g;function mm(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(pm,mm);tr[t]=new gr(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(pm,mm);tr[t]=new gr(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(pm,mm);tr[t]=new gr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){tr[e]=new gr(e,1,!1,e.toLowerCase(),null,!1,!1)});tr.xlinkHref=new gr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){tr[e]=new gr(e,1,!1,e.toLowerCase(),null,!0,!0)});function gm(e,t,r,n){var s=tr.hasOwnProperty(t)?tr[t]:null;(s!==null?s.type!==0:n||!(2a||s[i]!==o[a]){var l=` +`+s[i].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=i&&0<=a);break}}}finally{Af=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Ma(e):""}function tR(e){switch(e.tag){case 5:return Ma(e.type);case 16:return Ma("Lazy");case 13:return Ma("Suspense");case 19:return Ma("SuspenseList");case 0:case 2:case 15:return e=Mf(e.type,!1),e;case 11:return e=Mf(e.type.render,!1),e;case 1:return e=Mf(e.type,!0),e;default:return""}}function Oh(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case hi:return"Fragment";case fi:return"Portal";case Ph:return"Profiler";case vm:return"StrictMode";case jh:return"Suspense";case Dh:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Uw:return(e.displayName||"Context")+".Consumer";case zw:return(e._context.displayName||"Context")+".Provider";case ym:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case wm:return t=e.displayName||null,t!==null?t:Oh(e.type)||"Memo";case Ms:t=e._payload,e=e._init;try{return Oh(e(t))}catch{}}return null}function rR(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Oh(t);case 8:return t===vm?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function eo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Vw(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function nR(e){var t=Vw(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(i){n=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(i){n=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Rc(e){e._valueTracker||(e._valueTracker=nR(e))}function Ww(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=Vw(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Eu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ah(e,t){var r=t.checked;return Ot({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Gv(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=eo(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Bw(e,t){t=t.checked,t!=null&&gm(e,"checked",t,!1)}function Mh(e,t){Bw(e,t);var r=eo(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ih(e,t.type,r):t.hasOwnProperty("defaultValue")&&Ih(e,t.type,eo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Kv(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Ih(e,t,r){(t!=="number"||Eu(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Ia=Array.isArray;function Ri(e,t,r,n){if(e=e.options,t){t={};for(var s=0;s"+t.valueOf().toString()+"",t=Nc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ol(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Ba={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},sR=["Webkit","ms","Moz","O"];Object.keys(Ba).forEach(function(e){sR.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ba[t]=Ba[e]})});function Gw(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Ba.hasOwnProperty(e)&&Ba[e]?(""+t).trim():t+"px"}function Kw(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=Gw(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,s):e[r]=s}}var oR=Ot({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function zh(e,t){if(t){if(oR[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(oe(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(oe(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(oe(61))}if(t.style!=null&&typeof t.style!="object")throw Error(oe(62))}}function Uh(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var $h=null;function xm(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Vh=null,Ni=null,Pi=null;function Qv(e){if(e=Xl(e)){if(typeof Vh!="function")throw Error(oe(280));var t=e.stateNode;t&&(t=Pd(t),Vh(e.stateNode,e.type,t))}}function qw(e){Ni?Pi?Pi.push(e):Pi=[e]:Ni=e}function Xw(){if(Ni){var e=Ni,t=Pi;if(Pi=Ni=null,Qv(e),t)for(e=0;e>>=0,e===0?32:31-(gR(e)/vR|0)|0}var Pc=64,jc=4194304;function La(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Pu(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,s=e.suspendedLanes,o=e.pingedLanes,i=r&268435455;if(i!==0){var a=i&~s;a!==0?n=La(a):(o&=i,o!==0&&(n=La(o)))}else i=r&~s,i!==0?n=La(i):o!==0&&(n=La(o));if(n===0)return 0;if(t!==0&&t!==n&&!(t&s)&&(s=n&-n,o=t&-t,s>=o||s===16&&(o&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function Kl(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-un(t),e[t]=r}function _R(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0=Ya),ay=" ",ly=!1;function vx(e,t){switch(e){case"keyup":return KR.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yx(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var pi=!1;function XR(e,t){switch(e){case"compositionend":return yx(t);case"keypress":return t.which!==32?null:(ly=!0,ay);case"textInput":return e=t.data,e===ay&&ly?null:e;default:return null}}function QR(e,t){if(pi)return e==="compositionend"||!Rm&&vx(e,t)?(e=mx(),iu=Cm=Us=null,pi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=fy(r)}}function bx(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?bx(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Sx(){for(var e=window,t=Eu();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Eu(e.document)}return t}function Nm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function a2(e){var t=Sx(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&bx(r.ownerDocument.documentElement,r)){if(n!==null&&Nm(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=r.textContent.length,o=Math.min(n.start,s);n=n.end===void 0?o:Math.min(n.end,s),!e.extend&&o>n&&(s=n,n=o,o=s),s=hy(r,o);var i=hy(r,n);s&&i&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),o>n?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,mi=null,Gh=null,Ga=null,Kh=!1;function py(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Kh||mi==null||mi!==Eu(n)||(n=mi,"selectionStart"in n&&Nm(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Ga&&dl(Ga,n)||(Ga=n,n=Ou(Gh,"onSelect"),0yi||(e.current=tp[yi],tp[yi]=null,yi--)}function vt(e,t){yi++,tp[yi]=e.current,e.current=t}var to={},ar=uo(to),Sr=uo(!1),Ao=to;function Wi(e,t){var r=e.type.contextTypes;if(!r)return to;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in r)s[o]=t[o];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function kr(e){return e=e.childContextTypes,e!=null}function Mu(){xt(Sr),xt(ar)}function _y(e,t,r){if(ar.current!==to)throw Error(oe(168));vt(ar,t),vt(Sr,r)}function Dx(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in t))throw Error(oe(108,rR(e)||"Unknown",s));return Ot({},r,n)}function Iu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||to,Ao=ar.current,vt(ar,e),vt(Sr,Sr.current),!0}function by(e,t,r){var n=e.stateNode;if(!n)throw Error(oe(169));r?(e=Dx(e,t,Ao),n.__reactInternalMemoizedMergedChildContext=e,xt(Sr),xt(ar),vt(ar,e)):xt(Sr),vt(Sr,r)}var es=null,jd=!1,Kf=!1;function Ox(e){es===null?es=[e]:es.push(e)}function w2(e){jd=!0,Ox(e)}function fo(){if(!Kf&&es!==null){Kf=!0;var e=0,t=dt;try{var r=es;for(dt=1;e>=i,s-=i,ts=1<<32-un(t)+s|r<O?(j=P,P=null):j=P.sibling;var L=h(g,P,_[O],C);if(L===null){P===null&&(P=j);break}e&&P&&L.alternate===null&&t(g,P),v=o(L,v,O),T===null?E=L:T.sibling=L,T=L,P=j}if(O===_.length)return r(g,P),Et&&yo(g,O),E;if(P===null){for(;O<_.length;O++)P=d(g,_[O],C),P!==null&&(v=o(P,v,O),T===null?E=P:T.sibling=P,T=P);return Et&&yo(g,O),E}for(P=n(g,P);O<_.length;O++)j=m(P,g,O,_[O],C),j!==null&&(e&&j.alternate!==null&&P.delete(j.key===null?O:j.key),v=o(j,v,O),T===null?E=j:T.sibling=j,T=j);return e&&P.forEach(function(q){return t(g,q)}),Et&&yo(g,O),E}function p(g,v,_,C){var E=wa(_);if(typeof E!="function")throw Error(oe(150));if(_=E.call(_),_==null)throw Error(oe(151));for(var T=E=null,P=v,O=v=0,j=null,L=_.next();P!==null&&!L.done;O++,L=_.next()){P.index>O?(j=P,P=null):j=P.sibling;var q=h(g,P,L.value,C);if(q===null){P===null&&(P=j);break}e&&P&&q.alternate===null&&t(g,P),v=o(q,v,O),T===null?E=q:T.sibling=q,T=q,P=j}if(L.done)return r(g,P),Et&&yo(g,O),E;if(P===null){for(;!L.done;O++,L=_.next())L=d(g,L.value,C),L!==null&&(v=o(L,v,O),T===null?E=L:T.sibling=L,T=L);return Et&&yo(g,O),E}for(P=n(g,P);!L.done;O++,L=_.next())L=m(P,g,O,L.value,C),L!==null&&(e&&L.alternate!==null&&P.delete(L.key===null?O:L.key),v=o(L,v,O),T===null?E=L:T.sibling=L,T=L);return e&&P.forEach(function(R){return t(g,R)}),Et&&yo(g,O),E}function x(g,v,_,C){if(typeof _=="object"&&_!==null&&_.type===hi&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case Tc:e:{for(var E=_.key,T=v;T!==null;){if(T.key===E){if(E=_.type,E===hi){if(T.tag===7){r(g,T.sibling),v=s(T,_.props.children),v.return=g,g=v;break e}}else if(T.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Ms&&Cy(E)===T.type){r(g,T.sibling),v=s(T,_.props),v.ref=ka(g,T,_),v.return=g,g=v;break e}r(g,T);break}else t(g,T);T=T.sibling}_.type===hi?(v=Po(_.props.children,g.mode,C,_.key),v.return=g,g=v):(C=pu(_.type,_.key,_.props,null,g.mode,C),C.ref=ka(g,v,_),C.return=g,g=C)}return i(g);case fi:e:{for(T=_.key;v!==null;){if(v.key===T)if(v.tag===4&&v.stateNode.containerInfo===_.containerInfo&&v.stateNode.implementation===_.implementation){r(g,v.sibling),v=s(v,_.children||[]),v.return=g,g=v;break e}else{r(g,v);break}else t(g,v);v=v.sibling}v=nh(_,g.mode,C),v.return=g,g=v}return i(g);case Ms:return T=_._init,x(g,v,T(_._payload),C)}if(Ia(_))return y(g,v,_,C);if(wa(_))return p(g,v,_,C);Fc(g,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,v!==null&&v.tag===6?(r(g,v.sibling),v=s(v,_),v.return=g,g=v):(r(g,v),v=rh(_,g.mode,C),v.return=g,g=v),i(g)):r(g,v)}return x}var Hi=Lx(!0),Fx=Lx(!1),zu=uo(null),Uu=null,_i=null,Om=null;function Am(){Om=_i=Uu=null}function Mm(e){var t=zu.current;xt(zu),e._currentValue=t}function sp(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Di(e,t){Uu=e,Om=_i=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(br=!0),e.firstContext=null)}function qr(e){var t=e._currentValue;if(Om!==e)if(e={context:e,memoizedValue:t,next:null},_i===null){if(Uu===null)throw Error(oe(308));_i=e,Uu.dependencies={lanes:0,firstContext:e}}else _i=_i.next=e;return t}var bo=null;function Im(e){bo===null?bo=[e]:bo.push(e)}function zx(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,Im(t)):(r.next=s.next,s.next=r),t.interleaved=r,ds(e,n)}function ds(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Is=!1;function Lm(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ux(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function os(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ks(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,tt&2){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,ds(e,r)}return s=n.interleaved,s===null?(t.next=t,Im(n)):(t.next=s.next,s.next=t),n.interleaved=t,ds(e,r)}function lu(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,bm(e,r)}}function Ey(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,o=null;if(r=r.firstBaseUpdate,r!==null){do{var i={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};o===null?s=o=i:o=o.next=i,r=r.next}while(r!==null);o===null?s=o=t:o=o.next=t}else s=o=t;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function $u(e,t,r,n){var s=e.updateQueue;Is=!1;var o=s.firstBaseUpdate,i=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,c=l.next;l.next=null,i===null?o=c:i.next=c,i=l;var f=e.alternate;f!==null&&(f=f.updateQueue,a=f.lastBaseUpdate,a!==i&&(a===null?f.firstBaseUpdate=c:a.next=c,f.lastBaseUpdate=l))}if(o!==null){var d=s.baseState;i=0,f=c=l=null,a=o;do{var h=a.lane,m=a.eventTime;if((n&h)===h){f!==null&&(f=f.next={eventTime:m,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var y=e,p=a;switch(h=t,m=r,p.tag){case 1:if(y=p.payload,typeof y=="function"){d=y.call(m,d,h);break e}d=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=p.payload,h=typeof y=="function"?y.call(m,d,h):y,h==null)break e;d=Ot({},d,h);break e;case 2:Is=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=s.effects,h===null?s.effects=[a]:h.push(a))}else m={eventTime:m,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},f===null?(c=f=m,l=d):f=f.next=m,i|=h;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;h=a,a=h.next,h.next=null,s.lastBaseUpdate=h,s.shared.pending=null}}while(!0);if(f===null&&(l=d),s.baseState=l,s.firstBaseUpdate=c,s.lastBaseUpdate=f,t=s.shared.interleaved,t!==null){s=t;do i|=s.lane,s=s.next;while(s!==t)}else o===null&&(s.shared.lanes=0);Lo|=i,e.lanes=i,e.memoizedState=d}}function Ty(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var n=Xf.transition;Xf.transition={};try{e(!1),t()}finally{dt=r,Xf.transition=n}}function n_(){return Xr().memoizedState}function S2(e,t,r){var n=Xs(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},s_(e))o_(t,r);else if(r=zx(e,t,r,n),r!==null){var s=hr();dn(r,e,n,s),i_(r,t,n)}}function k2(e,t,r){var n=Xs(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(s_(e))o_(t,s);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,a=o(i,r);if(s.hasEagerState=!0,s.eagerState=a,hn(a,i)){var l=t.interleaved;l===null?(s.next=s,Im(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}r=zx(e,t,s,n),r!==null&&(s=hr(),dn(r,e,n,s),i_(r,t,n))}}function s_(e){var t=e.alternate;return e===Dt||t!==null&&t===Dt}function o_(e,t){Ka=Wu=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function i_(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,bm(e,r)}}var Bu={readContext:qr,useCallback:nr,useContext:nr,useEffect:nr,useImperativeHandle:nr,useInsertionEffect:nr,useLayoutEffect:nr,useMemo:nr,useReducer:nr,useRef:nr,useState:nr,useDebugValue:nr,useDeferredValue:nr,useTransition:nr,useMutableSource:nr,useSyncExternalStore:nr,useId:nr,unstable_isNewReconciler:!1},C2={readContext:qr,useCallback:function(e,t){return kn().memoizedState=[e,t===void 0?null:t],e},useContext:qr,useEffect:Ny,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,uu(4194308,4,Qx.bind(null,t,e),r)},useLayoutEffect:function(e,t){return uu(4194308,4,e,t)},useInsertionEffect:function(e,t){return uu(4,2,e,t)},useMemo:function(e,t){var r=kn();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=kn();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=S2.bind(null,Dt,e),[n.memoizedState,e]},useRef:function(e){var t=kn();return e={current:e},t.memoizedState=e},useState:Ry,useDebugValue:Hm,useDeferredValue:function(e){return kn().memoizedState=e},useTransition:function(){var e=Ry(!1),t=e[0];return e=b2.bind(null,e[1]),kn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Dt,s=kn();if(Et){if(r===void 0)throw Error(oe(407));r=r()}else{if(r=t(),Xt===null)throw Error(oe(349));Io&30||Bx(n,t,r)}s.memoizedState=r;var o={value:r,getSnapshot:t};return s.queue=o,Ny(Yx.bind(null,n,o,e),[e]),n.flags|=2048,wl(9,Hx.bind(null,n,o,r,t),void 0,null),r},useId:function(){var e=kn(),t=Xt.identifierPrefix;if(Et){var r=rs,n=ts;r=(n&~(1<<32-un(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=vl++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=i.createElement(r,{is:n.is}):(e=i.createElement(r),r==="select"&&(i=e,n.multiple?i.multiple=!0:n.size&&(i.size=n.size))):e=i.createElementNS(e,r),e[Cn]=t,e[pl]=n,g_(e,t,!1,!1),t.stateNode=e;e:{switch(i=Uh(r,n),r){case"dialog":wt("cancel",e),wt("close",e),s=n;break;case"iframe":case"object":case"embed":wt("load",e),s=n;break;case"video":case"audio":for(s=0;sGi&&(t.flags|=128,n=!0,Ca(o,!1),t.lanes=4194304)}else{if(!n)if(e=Vu(i),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Ca(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!Et)return sr(t),null}else 2*zt()-o.renderingStartTime>Gi&&r!==1073741824&&(t.flags|=128,n=!0,Ca(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(r=o.last,r!==null?r.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=zt(),t.sibling=null,r=Nt.current,vt(Nt,n?r&1|2:r&1),t):(sr(t),null);case 22:case 23:return Xm(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Pr&1073741824&&(sr(t),t.subtreeFlags&6&&(t.flags|=8192)):sr(t),null;case 24:return null;case 25:return null}throw Error(oe(156,t.tag))}function O2(e,t){switch(jm(t),t.tag){case 1:return kr(t.type)&&Mu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Yi(),xt(Sr),xt(ar),Um(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return zm(t),null;case 13:if(xt(Nt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(oe(340));Bi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return xt(Nt),null;case 4:return Yi(),null;case 10:return Mm(t.type._context),null;case 22:case 23:return Xm(),null;case 24:return null;default:return null}}var Uc=!1,or=!1,A2=typeof WeakSet=="function"?WeakSet:Set,_e=null;function bi(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Mt(e,t,n)}else r.current=null}function hp(e,t,r){try{r()}catch(n){Mt(e,t,n)}}var Uy=!1;function M2(e,t){if(qh=ju,e=Sx(),Nm(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var i=0,a=-1,l=-1,c=0,f=0,d=e,h=null;t:for(;;){for(var m;d!==r||s!==0&&d.nodeType!==3||(a=i+s),d!==o||n!==0&&d.nodeType!==3||(l=i+n),d.nodeType===3&&(i+=d.nodeValue.length),(m=d.firstChild)!==null;)h=d,d=m;for(;;){if(d===e)break t;if(h===r&&++c===s&&(a=i),h===o&&++f===n&&(l=i),(m=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=m}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Xh={focusedElem:e,selectionRange:r},ju=!1,_e=t;_e!==null;)if(t=_e,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,_e=e;else for(;_e!==null;){t=_e;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var p=y.memoizedProps,x=y.memoizedState,g=t.stateNode,v=g.getSnapshotBeforeUpdate(t.elementType===t.type?p:rn(t.type,p),x);g.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var _=t.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(oe(163))}}catch(C){Mt(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,_e=e;break}_e=t.return}return y=Uy,Uy=!1,y}function qa(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&e)===e){var o=s.destroy;s.destroy=void 0,o!==void 0&&hp(t,r,o)}s=s.next}while(s!==n)}}function Ad(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function pp(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function w_(e){var t=e.alternate;t!==null&&(e.alternate=null,w_(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Cn],delete t[pl],delete t[ep],delete t[v2],delete t[y2])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function x_(e){return e.tag===5||e.tag===3||e.tag===4}function $y(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||x_(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function mp(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Au));else if(n!==4&&(e=e.child,e!==null))for(mp(e,t,r),e=e.sibling;e!==null;)mp(e,t,r),e=e.sibling}function gp(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(gp(e,t,r),e=e.sibling;e!==null;)gp(e,t,r),e=e.sibling}var Jt=null,nn=!1;function Ps(e,t,r){for(r=r.child;r!==null;)__(e,t,r),r=r.sibling}function __(e,t,r){if(jn&&typeof jn.onCommitFiberUnmount=="function")try{jn.onCommitFiberUnmount(Ed,r)}catch{}switch(r.tag){case 5:or||bi(r,t);case 6:var n=Jt,s=nn;Jt=null,Ps(e,t,r),Jt=n,nn=s,Jt!==null&&(nn?(e=Jt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Jt.removeChild(r.stateNode));break;case 18:Jt!==null&&(nn?(e=Jt,r=r.stateNode,e.nodeType===8?Gf(e.parentNode,r):e.nodeType===1&&Gf(e,r),cl(e)):Gf(Jt,r.stateNode));break;case 4:n=Jt,s=nn,Jt=r.stateNode.containerInfo,nn=!0,Ps(e,t,r),Jt=n,nn=s;break;case 0:case 11:case 14:case 15:if(!or&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var o=s,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&hp(r,t,i),s=s.next}while(s!==n)}Ps(e,t,r);break;case 1:if(!or&&(bi(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){Mt(r,t,a)}Ps(e,t,r);break;case 21:Ps(e,t,r);break;case 22:r.mode&1?(or=(n=or)||r.memoizedState!==null,Ps(e,t,r),or=n):Ps(e,t,r);break;default:Ps(e,t,r)}}function Vy(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new A2),t.forEach(function(n){var s=B2.bind(null,e,n);r.has(n)||(r.add(n),n.then(s,s))})}}function tn(e,t){var r=t.deletions;if(r!==null)for(var n=0;ns&&(s=i),n&=~o}if(n=s,n=zt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*L2(n/1960))-n,10e?16:e,$s===null)var n=!1;else{if(e=$s,$s=null,Zu=0,tt&6)throw Error(oe(331));var s=tt;for(tt|=4,_e=e.current;_e!==null;){var o=_e,i=o.child;if(_e.flags&16){var a=o.deletions;if(a!==null){for(var l=0;lzt()-Km?No(e,0):Gm|=r),Cr(e,t)}function N_(e,t){t===0&&(e.mode&1?(t=jc,jc<<=1,!(jc&130023424)&&(jc=4194304)):t=1);var r=hr();e=ds(e,t),e!==null&&(Kl(e,t,r),Cr(e,r))}function W2(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),N_(e,r)}function B2(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,s=e.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(oe(314))}n!==null&&n.delete(t),N_(e,r)}var P_;P_=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Sr.current)br=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return br=!1,j2(e,t,r);br=!!(e.flags&131072)}else br=!1,Et&&t.flags&1048576&&Ax(t,Fu,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;du(e,t),e=t.pendingProps;var s=Wi(t,ar.current);Di(t,r),s=Vm(null,t,n,e,s,r);var o=Wm();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,kr(n)?(o=!0,Iu(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Lm(t),s.updater=Od,t.stateNode=s,s._reactInternals=t,ip(t,n,e,r),t=cp(null,t,n,!0,o,r)):(t.tag=0,Et&&o&&Pm(t),dr(null,t,s,r),t=t.child),t;case 16:n=t.elementType;e:{switch(du(e,t),e=t.pendingProps,s=n._init,n=s(n._payload),t.type=n,s=t.tag=Y2(n),e=rn(n,e),s){case 0:t=lp(null,t,n,e,r);break e;case 1:t=Ly(null,t,n,e,r);break e;case 11:t=My(null,t,n,e,r);break e;case 14:t=Iy(null,t,n,rn(n.type,e),r);break e}throw Error(oe(306,n,""))}return t;case 0:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:rn(n,s),lp(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:rn(n,s),Ly(e,t,n,s,r);case 3:e:{if(h_(t),e===null)throw Error(oe(387));n=t.pendingProps,o=t.memoizedState,s=o.element,Ux(e,t),$u(t,n,null,r);var i=t.memoizedState;if(n=i.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=Zi(Error(oe(423)),t),t=Fy(e,t,n,r,s);break e}else if(n!==s){s=Zi(Error(oe(424)),t),t=Fy(e,t,n,r,s);break e}else for(Or=Gs(t.stateNode.containerInfo.firstChild),Ar=t,Et=!0,on=null,r=Fx(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Bi(),n===s){t=fs(e,t,r);break e}dr(e,t,n,r)}t=t.child}return t;case 5:return $x(t),e===null&&np(t),n=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,Qh(n,s)?i=null:o!==null&&Qh(n,o)&&(t.flags|=32),f_(e,t),dr(e,t,i,r),t.child;case 6:return e===null&&np(t),null;case 13:return p_(e,t,r);case 4:return Fm(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Hi(t,null,n,r):dr(e,t,n,r),t.child;case 11:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:rn(n,s),My(e,t,n,s,r);case 7:return dr(e,t,t.pendingProps,r),t.child;case 8:return dr(e,t,t.pendingProps.children,r),t.child;case 12:return dr(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,s=t.pendingProps,o=t.memoizedProps,i=s.value,vt(zu,n._currentValue),n._currentValue=i,o!==null)if(hn(o.value,i)){if(o.children===s.children&&!Sr.current){t=fs(e,t,r);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){i=o.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(o.tag===1){l=os(-1,r&-r),l.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?l.next=l:(l.next=f.next,f.next=l),c.pending=l}}o.lanes|=r,l=o.alternate,l!==null&&(l.lanes|=r),sp(o.return,r,t),a.lanes|=r;break}l=l.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(oe(341));i.lanes|=r,a=i.alternate,a!==null&&(a.lanes|=r),sp(i,r,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}dr(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,n=t.pendingProps.children,Di(t,r),s=qr(s),n=n(s),t.flags|=1,dr(e,t,n,r),t.child;case 14:return n=t.type,s=rn(n,t.pendingProps),s=rn(n.type,s),Iy(e,t,n,s,r);case 15:return u_(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:rn(n,s),du(e,t),t.tag=1,kr(n)?(e=!0,Iu(t)):e=!1,Di(t,r),a_(t,n,s),ip(t,n,s,r),cp(null,t,n,!0,e,r);case 19:return m_(e,t,r);case 22:return d_(e,t,r)}throw Error(oe(156,t.tag))};function j_(e,t){return sx(e,t)}function H2(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Zr(e,t,r,n){return new H2(e,t,r,n)}function Jm(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Y2(e){if(typeof e=="function")return Jm(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ym)return 11;if(e===wm)return 14}return 2}function Qs(e,t){var r=e.alternate;return r===null?(r=Zr(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function pu(e,t,r,n,s,o){var i=2;if(n=e,typeof e=="function")Jm(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case hi:return Po(r.children,s,o,t);case vm:i=8,s|=8;break;case Ph:return e=Zr(12,r,t,s|2),e.elementType=Ph,e.lanes=o,e;case jh:return e=Zr(13,r,t,s),e.elementType=jh,e.lanes=o,e;case Dh:return e=Zr(19,r,t,s),e.elementType=Dh,e.lanes=o,e;case $w:return Id(r,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case zw:i=10;break e;case Uw:i=9;break e;case ym:i=11;break e;case wm:i=14;break e;case Ms:i=16,n=null;break e}throw Error(oe(130,e==null?e:typeof e,""))}return t=Zr(i,r,t,s),t.elementType=e,t.type=n,t.lanes=o,t}function Po(e,t,r,n){return e=Zr(7,e,n,t),e.lanes=r,e}function Id(e,t,r,n){return e=Zr(22,e,n,t),e.elementType=$w,e.lanes=r,e.stateNode={isHidden:!1},e}function rh(e,t,r){return e=Zr(6,e,null,t),e.lanes=r,e}function nh(e,t,r){return t=Zr(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Z2(e,t,r,n,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Lf(0),this.expirationTimes=Lf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Lf(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function eg(e,t,r,n,s,o,i,a,l){return e=new Z2(e,t,r,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Zr(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Lm(o),e}function G2(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(M_)}catch(e){console.error(e)}}M_(),Mw.exports=zr;var xs=Mw.exports;const I_=cm(xs),J2=bw({__proto__:null,default:I_},[xs]);var qy=xs;Rh.createRoot=qy.createRoot,Rh.hydrateRoot=qy.hydrateRoot;/** + * @remix-run/router v1.18.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Rt(){return Rt=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function zo(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function tN(){return Math.random().toString(36).substr(2,8)}function Qy(e,t){return{usr:e.state,key:e.key,idx:t}}function _l(e,t,r,n){return r===void 0&&(r=null),Rt({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?_s(t):t,{state:r,key:t&&t.key||n||tN()})}function Uo(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function _s(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function rN(e,t,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:o=!1}=n,i=s.history,a=$t.Pop,l=null,c=f();c==null&&(c=0,i.replaceState(Rt({},i.state,{idx:c}),""));function f(){return(i.state||{idx:null}).idx}function d(){a=$t.Pop;let x=f(),g=x==null?null:x-c;c=x,l&&l({action:a,location:p.location,delta:g})}function h(x,g){a=$t.Push;let v=_l(p.location,x,g);r&&r(v,x),c=f()+1;let _=Qy(v,c),C=p.createHref(v);try{i.pushState(_,"",C)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;s.location.assign(C)}o&&l&&l({action:a,location:p.location,delta:1})}function m(x,g){a=$t.Replace;let v=_l(p.location,x,g);r&&r(v,x),c=f();let _=Qy(v,c),C=p.createHref(v);i.replaceState(_,"",C),o&&l&&l({action:a,location:p.location,delta:0})}function y(x){let g=s.location.origin!=="null"?s.location.origin:s.location.href,v=typeof x=="string"?x:Uo(x);return v=v.replace(/ $/,"%20"),Ye(g,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,g)}let p={get action(){return a},get location(){return e(s,i)},listen(x){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(Xy,d),l=x,()=>{s.removeEventListener(Xy,d),l=null}},createHref(x){return t(s,x)},createURL:y,encodeLocation(x){let g=y(x);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:h,replace:m,go(x){return i.go(x)}};return p}var gt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(gt||(gt={}));const nN=new Set(["lazy","caseSensitive","path","id","index","children"]);function sN(e){return e.index===!0}function bl(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((s,o)=>{let i=[...r,String(o)],a=typeof s.id=="string"?s.id:i.join("-");if(Ye(s.index!==!0||!s.children,"Cannot specify children on an index route"),Ye(!n[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),sN(s)){let l=Rt({},s,t(s),{id:a});return n[a]=l,l}else{let l=Rt({},s,t(s),{id:a,children:void 0});return n[a]=l,s.children&&(l.children=bl(s.children,t,i,n)),l}})}function xo(e,t,r){return r===void 0&&(r="/"),mu(e,t,r,!1)}function mu(e,t,r,n){let s=typeof t=="string"?_s(t):t,o=sa(s.pathname||"/",r);if(o==null)return null;let i=L_(e);iN(i);let a=null;for(let l=0;a==null&&l{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};l.relativePath.startsWith("/")&&(Ye(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 c=is([n,l.relativePath]),f=r.concat(l);o.children&&o.children.length>0&&(Ye(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),L_(o.children,t,f,c)),!(o.path==null&&!o.index)&&t.push({path:c,score:hN(c,o.index),routesMeta:f})};return e.forEach((o,i)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))s(o,i);else for(let l of F_(o.path))s(o,i,l)}),t}function F_(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,s=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return s?[o,""]:[o];let i=F_(n.join("/")),a=[];return a.push(...i.map(l=>l===""?o:[o,l].join("/"))),s&&a.push(...i),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function iN(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:pN(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const aN=/^:[\w-]+$/,lN=3,cN=2,uN=1,dN=10,fN=-2,Jy=e=>e==="*";function hN(e,t){let r=e.split("/"),n=r.length;return r.some(Jy)&&(n+=fN),t&&(n+=cN),r.filter(s=>!Jy(s)).reduce((s,o)=>s+(aN.test(o)?lN:o===""?uN:dN),n)}function pN(e,t){return e.length===t.length&&e.slice(0,-1).every((n,s)=>n===t[s])?e[e.length-1]-t[t.length-1]:0}function mN(e,t,r){r===void 0&&(r=!1);let{routesMeta:n}=e,s={},o="/",i=[];for(let a=0;a{let{paramName:h,isOptional:m}=f;if(h==="*"){let p=a[d]||"";i=o.slice(0,o.length-p.length).replace(/(.)\/+$/,"$1")}const y=a[d];return m&&!y?c[h]=void 0:c[h]=(y||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:i,pattern:e}}function gN(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),zo(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=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,a,l)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),n]}function vN(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return zo(!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 sa(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 yN(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:s=""}=typeof e=="string"?_s(e):e;return{pathname:r?r.startsWith("/")?r:wN(r,t):t,search:_N(n),hash:bN(s)}}function wN(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function sh(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 and the router will parse it for you.'}function z_(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function $d(e,t){let r=z_(e);return t?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function Vd(e,t,r,n){n===void 0&&(n=!1);let s;typeof e=="string"?s=_s(e):(s=Rt({},e),Ye(!s.pathname||!s.pathname.includes("?"),sh("?","pathname","search",s)),Ye(!s.pathname||!s.pathname.includes("#"),sh("#","pathname","hash",s)),Ye(!s.search||!s.search.includes("#"),sh("#","search","hash",s)));let o=e===""||s.pathname==="",i=o?"/":s.pathname,a;if(i==null)a=r;else{let d=t.length-1;if(!n&&i.startsWith("..")){let h=i.split("/");for(;h[0]==="..";)h.shift(),d-=1;s.pathname=h.join("/")}a=d>=0?t[d]:"/"}let l=yN(s,a),c=i&&i!=="/"&&i.endsWith("/"),f=(o||i===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(c||f)&&(l.pathname+="/"),l}const is=e=>e.join("/").replace(/\/\/+/g,"/"),xN=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),_N=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,bN=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class sg{constructor(t,r,n,s){s===void 0&&(s=!1),this.status=t,this.statusText=r||"",this.internal=s,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function Wd(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const U_=["post","put","patch","delete"],SN=new Set(U_),kN=["get",...U_],CN=new Set(kN),EN=new Set([301,302,303,307,308]),TN=new Set([307,308]),oh={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},RN={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ta={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},og=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,NN=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),$_="remix-router-transitions";function PN(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",n=!r;Ye(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let s;if(e.mapRouteProperties)s=e.mapRouteProperties;else if(e.detectErrorBoundary){let U=e.detectErrorBoundary;s=B=>({hasErrorBoundary:U(B)})}else s=NN;let o={},i=bl(e.routes,s,void 0,o),a,l=e.basename||"/",c=e.unstable_dataStrategy||MN,f=e.unstable_patchRoutesOnMiss,d=Rt({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),h=null,m=new Set,y=null,p=null,x=null,g=e.hydrationData!=null,v=xo(i,e.history.location,l),_=null;if(v==null&&!f){let U=ur(404,{pathname:e.history.location.pathname}),{matches:B,route:K}=u0(i);v=B,_={[K.id]:U}}v&&f&&!e.hydrationData&&jf(v,i,e.history.location.pathname).active&&(v=null);let C;if(!v)C=!1,v=[];else if(v.some(U=>U.route.lazy))C=!1;else if(!v.some(U=>U.route.loader))C=!0;else if(d.v7_partialHydration){let U=e.hydrationData?e.hydrationData.loaderData:null,B=e.hydrationData?e.hydrationData.errors:null,K=re=>re.route.loader?typeof re.route.loader=="function"&&re.route.loader.hydrate===!0?!1:U&&U[re.route.id]!==void 0||B&&B[re.route.id]!==void 0:!0;if(B){let re=v.findIndex(ve=>B[ve.route.id]!==void 0);C=v.slice(0,re+1).every(K)}else C=v.every(K)}else C=e.hydrationData!=null;let E,T={historyAction:e.history.action,location:e.history.location,matches:v,initialized:C,navigation:oh,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||_,fetchers:new Map,blockers:new Map},P=$t.Pop,O=!1,j,L=!1,q=new Map,R=null,F=!1,b=!1,V=[],te=[],W=new Map,Z=0,I=-1,Q=new Map,z=new Set,$=new Map,de=new Map,ne=new Set,se=new Map,Ee=new Map,fe=new Map,ge=!1;function be(){if(h=e.history.listen(U=>{let{action:B,location:K,delta:re}=U;if(ge){ge=!1;return}zo(Ee.size===0||re!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let ve=xc({currentLocation:T.location,nextLocation:K,historyAction:B});if(ve&&re!=null){ge=!0,e.history.go(re*-1),Qo(ve,{state:"blocked",location:K,proceed(){Qo(ve,{state:"proceeding",proceed:void 0,reset:void 0,location:K}),e.history.go(re)},reset(){let ke=new Map(T.blockers);ke.set(ve,Ta),Se({blockers:ke})}});return}return G(B,K)}),r){GN(t,q);let U=()=>KN(t,q);t.addEventListener("pagehide",U),R=()=>t.removeEventListener("pagehide",U)}return T.initialized||G($t.Pop,T.location,{initialHydration:!0}),E}function Pe(){h&&h(),R&&R(),m.clear(),j&&j.abort(),T.fetchers.forEach((U,B)=>Wt(B)),T.blockers.forEach((U,B)=>wc(B))}function Te(U){return m.add(U),()=>m.delete(U)}function Se(U,B){B===void 0&&(B={}),T=Rt({},T,U);let K=[],re=[];d.v7_fetcherPersist&&T.fetchers.forEach((ve,ke)=>{ve.state==="idle"&&(ne.has(ke)?re.push(ke):K.push(ke))}),[...m].forEach(ve=>ve(T,{deletedFetchers:re,unstable_viewTransitionOpts:B.viewTransitionOpts,unstable_flushSync:B.flushSync===!0})),d.v7_fetcherPersist&&(K.forEach(ve=>T.fetchers.delete(ve)),re.forEach(ve=>Wt(ve)))}function qe(U,B,K){var re,ve;let{flushSync:ke}=K===void 0?{}:K,Me=T.actionData!=null&&T.navigation.formMethod!=null&&sn(T.navigation.formMethod)&&T.navigation.state==="loading"&&((re=U.state)==null?void 0:re._isRedirect)!==!0,ue;B.actionData?Object.keys(B.actionData).length>0?ue=B.actionData:ue=null:Me?ue=T.actionData:ue=null;let Ue=B.loaderData?l0(T.loaderData,B.loaderData,B.matches||[],B.errors):T.loaderData,Ne=T.blockers;Ne.size>0&&(Ne=new Map(Ne),Ne.forEach((ut,mt)=>Ne.set(mt,Ta)));let je=O===!0||T.navigation.formMethod!=null&&sn(T.navigation.formMethod)&&((ve=U.state)==null?void 0:ve._isRedirect)!==!0;a&&(i=a,a=void 0),F||P===$t.Pop||(P===$t.Push?e.history.push(U,U.state):P===$t.Replace&&e.history.replace(U,U.state));let ft;if(P===$t.Pop){let ut=q.get(T.location.pathname);ut&&ut.has(U.pathname)?ft={currentLocation:T.location,nextLocation:U}:q.has(U.pathname)&&(ft={currentLocation:U,nextLocation:T.location})}else if(L){let ut=q.get(T.location.pathname);ut?ut.add(U.pathname):(ut=new Set([U.pathname]),q.set(T.location.pathname,ut)),ft={currentLocation:T.location,nextLocation:U}}Se(Rt({},B,{actionData:ue,loaderData:Ue,historyAction:P,location:U,initialized:!0,navigation:oh,revalidation:"idle",restoreScrollPosition:Uv(U,B.matches||T.matches),preventScrollReset:je,blockers:Ne}),{viewTransitionOpts:ft,flushSync:ke===!0}),P=$t.Pop,O=!1,L=!1,F=!1,b=!1,V=[],te=[]}async function k(U,B){if(typeof U=="number"){e.history.go(U);return}let K=_p(T.location,T.matches,l,d.v7_prependBasename,U,d.v7_relativeSplatPath,B==null?void 0:B.fromRouteId,B==null?void 0:B.relative),{path:re,submission:ve,error:ke}=t0(d.v7_normalizeFormMethod,!1,K,B),Me=T.location,ue=_l(T.location,re,B&&B.state);ue=Rt({},ue,e.history.encodeLocation(ue));let Ue=B&&B.replace!=null?B.replace:void 0,Ne=$t.Push;Ue===!0?Ne=$t.Replace:Ue===!1||ve!=null&&sn(ve.formMethod)&&ve.formAction===T.location.pathname+T.location.search&&(Ne=$t.Replace);let je=B&&"preventScrollReset"in B?B.preventScrollReset===!0:void 0,ft=(B&&B.unstable_flushSync)===!0,ut=xc({currentLocation:Me,nextLocation:ue,historyAction:Ne});if(ut){Qo(ut,{state:"blocked",location:ue,proceed(){Qo(ut,{state:"proceeding",proceed:void 0,reset:void 0,location:ue}),k(U,B)},reset(){let mt=new Map(T.blockers);mt.set(ut,Ta),Se({blockers:mt})}});return}return await G(Ne,ue,{submission:ve,pendingError:ke,preventScrollReset:je,replace:B&&B.replace,enableViewTransition:B&&B.unstable_viewTransition,flushSync:ft})}function J(){if(Le(),Se({revalidation:"loading"}),T.navigation.state!=="submitting"){if(T.navigation.state==="idle"){G(T.historyAction,T.location,{startUninterruptedRevalidation:!0});return}G(P||T.historyAction,T.navigation.location,{overrideNavigation:T.navigation})}}async function G(U,B,K){j&&j.abort(),j=null,P=U,F=(K&&K.startUninterruptedRevalidation)===!0,ST(T.location,T.matches),O=(K&&K.preventScrollReset)===!0,L=(K&&K.enableViewTransition)===!0;let re=a||i,ve=K&&K.overrideNavigation,ke=xo(re,B,l),Me=(K&&K.flushSync)===!0,ue=jf(ke,re,B.pathname);if(ue.active&&ue.matches&&(ke=ue.matches),!ke){let{error:lt,notFoundMatches:Qt,route:Ut}=Jo(B.pathname);qe(B,{matches:Qt,loaderData:{},errors:{[Ut.id]:lt}},{flushSync:Me});return}if(T.initialized&&!b&&$N(T.location,B)&&!(K&&K.submission&&sn(K.submission.formMethod))){qe(B,{matches:ke},{flushSync:Me});return}j=new AbortController;let Ue=si(e.history,B,j.signal,K&&K.submission),Ne;if(K&&K.pendingError)Ne=[ki(ke).route.id,{type:gt.error,error:K.pendingError}];else if(K&&K.submission&&sn(K.submission.formMethod)){let lt=await D(Ue,B,K.submission,ke,ue.active,{replace:K.replace,flushSync:Me});if(lt.shortCircuited)return;if(lt.pendingActionResult){let[Qt,Ut]=lt.pendingActionResult;if(jr(Ut)&&Wd(Ut.error)&&Ut.error.status===404){j=null,qe(B,{matches:lt.matches,loaderData:{},errors:{[Qt]:Ut.error}});return}}ke=lt.matches||ke,Ne=lt.pendingActionResult,ve=ih(B,K.submission),Me=!1,ue.active=!1,Ue=si(e.history,Ue.url,Ue.signal)}let{shortCircuited:je,matches:ft,loaderData:ut,errors:mt}=await S(Ue,B,ke,ue.active,ve,K&&K.submission,K&&K.fetcherSubmission,K&&K.replace,K&&K.initialHydration===!0,Me,Ne);je||(j=null,qe(B,Rt({matches:ft||ke},c0(Ne),{loaderData:ut,errors:mt})))}async function D(U,B,K,re,ve,ke){ke===void 0&&(ke={}),Le();let Me=YN(B,K);if(Se({navigation:Me},{flushSync:ke.flushSync===!0}),ve){let Ne=await _c(re,B.pathname,U.signal);if(Ne.type==="aborted")return{shortCircuited:!0};if(Ne.type==="error"){let{boundaryId:je,error:ft}=_n(B.pathname,Ne);return{matches:Ne.partialMatches,pendingActionResult:[je,{type:gt.error,error:ft}]}}else if(Ne.matches)re=Ne.matches;else{let{notFoundMatches:je,error:ft,route:ut}=Jo(B.pathname);return{matches:je,pendingActionResult:[ut.id,{type:gt.error,error:ft}]}}}let ue,Ue=za(re,B);if(!Ue.route.action&&!Ue.route.lazy)ue={type:gt.error,error:ur(405,{method:U.method,pathname:B.pathname,routeId:Ue.route.id})};else if(ue=(await ee("action",U,[Ue],re))[0],U.signal.aborted)return{shortCircuited:!0};if(Co(ue)){let Ne;return ke&&ke.replace!=null?Ne=ke.replace:Ne=o0(ue.response.headers.get("Location"),new URL(U.url),l)===T.location.pathname+T.location.search,await X(U,ue,{submission:K,replace:Ne}),{shortCircuited:!0}}if(ko(ue))throw ur(400,{type:"defer-action"});if(jr(ue)){let Ne=ki(re,Ue.route.id);return(ke&&ke.replace)!==!0&&(P=$t.Push),{matches:re,pendingActionResult:[Ne.route.id,ue]}}return{matches:re,pendingActionResult:[Ue.route.id,ue]}}async function S(U,B,K,re,ve,ke,Me,ue,Ue,Ne,je){let ft=ve||ih(B,ke),ut=ke||Me||h0(ft),mt=!F&&(!d.v7_partialHydration||!Ue);if(re){if(mt){let At=N(je);Se(Rt({navigation:ft},At!==void 0?{actionData:At}:{}),{flushSync:Ne})}let We=await _c(K,B.pathname,U.signal);if(We.type==="aborted")return{shortCircuited:!0};if(We.type==="error"){let{boundaryId:At,error:Tr}=_n(B.pathname,We);return{matches:We.partialMatches,loaderData:{},errors:{[At]:Tr}}}else if(We.matches)K=We.matches;else{let{error:At,notFoundMatches:Tr,route:kt}=Jo(B.pathname);return{matches:Tr,loaderData:{},errors:{[kt.id]:At}}}}let lt=a||i,[Qt,Ut]=r0(e.history,T,K,ut,B,d.v7_partialHydration&&Ue===!0,d.v7_skipActionErrorRevalidation,b,V,te,ne,$,z,lt,l,je);if(Rs(We=>!(K&&K.some(At=>At.route.id===We))||Qt&&Qt.some(At=>At.route.id===We)),I=++Z,Qt.length===0&&Ut.length===0){let We=Bn();return qe(B,Rt({matches:K,loaderData:{},errors:je&&jr(je[1])?{[je[0]]:je[1].error}:null},c0(je),We?{fetchers:new Map(T.fetchers)}:{}),{flushSync:Ne}),{shortCircuited:!0}}if(mt){let We={};if(!re){We.navigation=ft;let At=N(je);At!==void 0&&(We.actionData=At)}Ut.length>0&&(We.fetchers=A(Ut)),Se(We,{flushSync:Ne})}Ut.forEach(We=>{W.has(We.key)&&et(We.key),We.controller&&W.set(We.key,We.controller)});let ya=()=>Ut.forEach(We=>et(We.key));j&&j.signal.addEventListener("abort",ya);let{loaderResults:Ns,fetcherResults:ei}=await he(T.matches,K,Qt,Ut,U);if(U.signal.aborted)return{shortCircuited:!0};j&&j.signal.removeEventListener("abort",ya),Ut.forEach(We=>W.delete(We.key));let ti=d0([...Ns,...ei]);if(ti){if(ti.idx>=Qt.length){let We=Ut[ti.idx-Qt.length].key;z.add(We)}return await X(U,ti.result,{replace:ue}),{shortCircuited:!0}}let{loaderData:ri,errors:bn}=a0(T,K,Qt,Ns,je,Ut,ei,se);se.forEach((We,At)=>{We.subscribe(Tr=>{(Tr||We.done)&&se.delete(At)})}),d.v7_partialHydration&&Ue&&T.errors&&Object.entries(T.errors).filter(We=>{let[At]=We;return!Qt.some(Tr=>Tr.route.id===At)}).forEach(We=>{let[At,Tr]=We;bn=Object.assign(bn||{},{[At]:Tr})});let bc=Bn(),Sc=Wr(I),kc=bc||Sc||Ut.length>0;return Rt({matches:K,loaderData:ri,errors:bn},kc?{fetchers:new Map(T.fetchers)}:{})}function N(U){if(U&&!jr(U[1]))return{[U[0]]:U[1].data};if(T.actionData)return Object.keys(T.actionData).length===0?null:T.actionData}function A(U){return U.forEach(B=>{let K=T.fetchers.get(B.key),re=Ra(void 0,K?K.data:void 0);T.fetchers.set(B.key,re)}),new Map(T.fetchers)}function Y(U,B,K,re){if(n)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");W.has(U)&&et(U);let ve=(re&&re.unstable_flushSync)===!0,ke=a||i,Me=_p(T.location,T.matches,l,d.v7_prependBasename,K,d.v7_relativeSplatPath,B,re==null?void 0:re.relative),ue=xo(ke,Me,l),Ue=jf(ue,ke,Me);if(Ue.active&&Ue.matches&&(ue=Ue.matches),!ue){St(U,B,ur(404,{pathname:Me}),{flushSync:ve});return}let{path:Ne,submission:je,error:ft}=t0(d.v7_normalizeFormMethod,!0,Me,re);if(ft){St(U,B,ft,{flushSync:ve});return}let ut=za(ue,Ne);if(O=(re&&re.preventScrollReset)===!0,je&&sn(je.formMethod)){M(U,B,Ne,ut,ue,Ue.active,ve,je);return}$.set(U,{routeId:B,path:Ne}),H(U,B,Ne,ut,ue,Ue.active,ve,je)}async function M(U,B,K,re,ve,ke,Me,ue){Le(),$.delete(U);function Ue(kt){if(!kt.route.action&&!kt.route.lazy){let Hn=ur(405,{method:ue.formMethod,pathname:K,routeId:B});return St(U,B,Hn,{flushSync:Me}),!0}return!1}if(!ke&&Ue(re))return;let Ne=T.fetchers.get(U);Oe(U,ZN(ue,Ne),{flushSync:Me});let je=new AbortController,ft=si(e.history,K,je.signal,ue);if(ke){let kt=await _c(ve,K,ft.signal);if(kt.type==="aborted")return;if(kt.type==="error"){let{error:Hn}=_n(K,kt);St(U,B,Hn,{flushSync:Me});return}else if(kt.matches){if(ve=kt.matches,re=za(ve,K),Ue(re))return}else{St(U,B,ur(404,{pathname:K}),{flushSync:Me});return}}W.set(U,je);let ut=Z,lt=(await ee("action",ft,[re],ve))[0];if(ft.signal.aborted){W.get(U)===je&&W.delete(U);return}if(d.v7_fetcherPersist&&ne.has(U)){if(Co(lt)||jr(lt)){Oe(U,Os(void 0));return}}else{if(Co(lt))if(W.delete(U),I>ut){Oe(U,Os(void 0));return}else return z.add(U),Oe(U,Ra(ue)),X(ft,lt,{fetcherSubmission:ue});if(jr(lt)){St(U,B,lt.error);return}}if(ko(lt))throw ur(400,{type:"defer-action"});let Qt=T.navigation.location||T.location,Ut=si(e.history,Qt,je.signal),ya=a||i,Ns=T.navigation.state!=="idle"?xo(ya,T.navigation.location,l):T.matches;Ye(Ns,"Didn't find any matches after fetcher action");let ei=++Z;Q.set(U,ei);let ti=Ra(ue,lt.data);T.fetchers.set(U,ti);let[ri,bn]=r0(e.history,T,Ns,ue,Qt,!1,d.v7_skipActionErrorRevalidation,b,V,te,ne,$,z,ya,l,[re.route.id,lt]);bn.filter(kt=>kt.key!==U).forEach(kt=>{let Hn=kt.key,$v=T.fetchers.get(Hn),ET=Ra(void 0,$v?$v.data:void 0);T.fetchers.set(Hn,ET),W.has(Hn)&&et(Hn),kt.controller&&W.set(Hn,kt.controller)}),Se({fetchers:new Map(T.fetchers)});let bc=()=>bn.forEach(kt=>et(kt.key));je.signal.addEventListener("abort",bc);let{loaderResults:Sc,fetcherResults:kc}=await he(T.matches,Ns,ri,bn,Ut);if(je.signal.aborted)return;je.signal.removeEventListener("abort",bc),Q.delete(U),W.delete(U),bn.forEach(kt=>W.delete(kt.key));let We=d0([...Sc,...kc]);if(We){if(We.idx>=ri.length){let kt=bn[We.idx-ri.length].key;z.add(kt)}return X(Ut,We.result)}let{loaderData:At,errors:Tr}=a0(T,T.matches,ri,Sc,void 0,bn,kc,se);if(T.fetchers.has(U)){let kt=Os(lt.data);T.fetchers.set(U,kt)}Wr(ei),T.navigation.state==="loading"&&ei>I?(Ye(P,"Expected pending action"),j&&j.abort(),qe(T.navigation.location,{matches:Ns,loaderData:At,errors:Tr,fetchers:new Map(T.fetchers)})):(Se({errors:Tr,loaderData:l0(T.loaderData,At,Ns,Tr),fetchers:new Map(T.fetchers)}),b=!1)}async function H(U,B,K,re,ve,ke,Me,ue){let Ue=T.fetchers.get(U);Oe(U,Ra(ue,Ue?Ue.data:void 0),{flushSync:Me});let Ne=new AbortController,je=si(e.history,K,Ne.signal);if(ke){let lt=await _c(ve,K,je.signal);if(lt.type==="aborted")return;if(lt.type==="error"){let{error:Qt}=_n(K,lt);St(U,B,Qt,{flushSync:Me});return}else if(lt.matches)ve=lt.matches,re=za(ve,K);else{St(U,B,ur(404,{pathname:K}),{flushSync:Me});return}}W.set(U,Ne);let ft=Z,mt=(await ee("loader",je,[re],ve))[0];if(ko(mt)&&(mt=await Y_(mt,je.signal,!0)||mt),W.get(U)===Ne&&W.delete(U),!je.signal.aborted){if(ne.has(U)){Oe(U,Os(void 0));return}if(Co(mt))if(I>ft){Oe(U,Os(void 0));return}else{z.add(U),await X(je,mt);return}if(jr(mt)){St(U,B,mt.error);return}Ye(!ko(mt),"Unhandled fetcher deferred data"),Oe(U,Os(mt.data))}}async function X(U,B,K){let{submission:re,fetcherSubmission:ve,replace:ke}=K===void 0?{}:K;B.response.headers.has("X-Remix-Revalidate")&&(b=!0);let Me=B.response.headers.get("Location");Ye(Me,"Expected a Location header on the redirect Response"),Me=o0(Me,new URL(U.url),l);let ue=_l(T.location,Me,{_isRedirect:!0});if(r){let mt=!1;if(B.response.headers.has("X-Remix-Reload-Document"))mt=!0;else if(og.test(Me)){const lt=e.history.createURL(Me);mt=lt.origin!==t.location.origin||sa(lt.pathname,l)==null}if(mt){ke?t.location.replace(Me):t.location.assign(Me);return}}j=null;let Ue=ke===!0?$t.Replace:$t.Push,{formMethod:Ne,formAction:je,formEncType:ft}=T.navigation;!re&&!ve&&Ne&&je&&ft&&(re=h0(T.navigation));let ut=re||ve;if(TN.has(B.response.status)&&ut&&sn(ut.formMethod))await G(Ue,ue,{submission:Rt({},ut,{formAction:Me}),preventScrollReset:O});else{let mt=ih(ue,re);await G(Ue,ue,{overrideNavigation:mt,fetcherSubmission:ve,preventScrollReset:O})}}async function ee(U,B,K,re){try{let ve=await IN(c,U,B,K,re,o,s);return await Promise.all(ve.map((ke,Me)=>{if(WN(ke)){let ue=ke.result;return{type:gt.redirect,response:zN(ue,B,K[Me].route.id,re,l,d.v7_relativeSplatPath)}}return FN(ke)}))}catch(ve){return K.map(()=>({type:gt.error,error:ve}))}}async function he(U,B,K,re,ve){let[ke,...Me]=await Promise.all([K.length?ee("loader",ve,K,B):[],...re.map(ue=>{if(ue.matches&&ue.match&&ue.controller){let Ue=si(e.history,ue.path,ue.controller.signal);return ee("loader",Ue,[ue.match],ue.matches).then(Ne=>Ne[0])}else return Promise.resolve({type:gt.error,error:ur(404,{pathname:ue.path})})})]);return await Promise.all([f0(U,K,ke,ke.map(()=>ve.signal),!1,T.loaderData),f0(U,re.map(ue=>ue.match),Me,re.map(ue=>ue.controller?ue.controller.signal:null),!0)]),{loaderResults:ke,fetcherResults:Me}}function Le(){b=!0,V.push(...Rs()),$.forEach((U,B)=>{W.has(B)&&(te.push(B),et(B))})}function Oe(U,B,K){K===void 0&&(K={}),T.fetchers.set(U,B),Se({fetchers:new Map(T.fetchers)},{flushSync:(K&&K.flushSync)===!0})}function St(U,B,K,re){re===void 0&&(re={});let ve=ki(T.matches,B);Wt(U),Se({errors:{[ve.route.id]:K},fetchers:new Map(T.fetchers)},{flushSync:(re&&re.flushSync)===!0})}function Vr(U){return d.v7_fetcherPersist&&(de.set(U,(de.get(U)||0)+1),ne.has(U)&&ne.delete(U)),T.fetchers.get(U)||RN}function Wt(U){let B=T.fetchers.get(U);W.has(U)&&!(B&&B.state==="loading"&&Q.has(U))&&et(U),$.delete(U),Q.delete(U),z.delete(U),ne.delete(U),T.fetchers.delete(U)}function Vn(U){if(d.v7_fetcherPersist){let B=(de.get(U)||0)-1;B<=0?(de.delete(U),ne.add(U)):de.set(U,B)}else Wt(U);Se({fetchers:new Map(T.fetchers)})}function et(U){let B=W.get(U);Ye(B,"Expected fetch controller: "+U),B.abort(),W.delete(U)}function Wn(U){for(let B of U){let K=Vr(B),re=Os(K.data);T.fetchers.set(B,re)}}function Bn(){let U=[],B=!1;for(let K of z){let re=T.fetchers.get(K);Ye(re,"Expected fetcher: "+K),re.state==="loading"&&(z.delete(K),U.push(K),B=!0)}return Wn(U),B}function Wr(U){let B=[];for(let[K,re]of Q)if(re0}function yc(U,B){let K=T.blockers.get(U)||Ta;return Ee.get(U)!==B&&Ee.set(U,B),K}function wc(U){T.blockers.delete(U),Ee.delete(U)}function Qo(U,B){let K=T.blockers.get(U)||Ta;Ye(K.state==="unblocked"&&B.state==="blocked"||K.state==="blocked"&&B.state==="blocked"||K.state==="blocked"&&B.state==="proceeding"||K.state==="blocked"&&B.state==="unblocked"||K.state==="proceeding"&&B.state==="unblocked","Invalid blocker state transition: "+K.state+" -> "+B.state);let re=new Map(T.blockers);re.set(U,B),Se({blockers:re})}function xc(U){let{currentLocation:B,nextLocation:K,historyAction:re}=U;if(Ee.size===0)return;Ee.size>1&&zo(!1,"A router only supports one blocker at a time");let ve=Array.from(Ee.entries()),[ke,Me]=ve[ve.length-1],ue=T.blockers.get(ke);if(!(ue&&ue.state==="proceeding")&&Me({currentLocation:B,nextLocation:K,historyAction:re}))return ke}function Jo(U){let B=ur(404,{pathname:U}),K=a||i,{matches:re,route:ve}=u0(K);return Rs(),{notFoundMatches:re,route:ve,error:B}}function _n(U,B){return{boundaryId:ki(B.partialMatches).route.id,error:ur(400,{type:"route-discovery",pathname:U,message:B.error!=null&&"message"in B.error?B.error:String(B.error)})}}function Rs(U){let B=[];return se.forEach((K,re)=>{(!U||U(re))&&(K.cancel(),B.push(re),se.delete(re))}),B}function bT(U,B,K){if(y=U,x=B,p=K||null,!g&&T.navigation===oh){g=!0;let re=Uv(T.location,T.matches);re!=null&&Se({restoreScrollPosition:re})}return()=>{y=null,x=null,p=null}}function zv(U,B){return p&&p(U,B.map(re=>oN(re,T.loaderData)))||U.key}function ST(U,B){if(y&&x){let K=zv(U,B);y[K]=x()}}function Uv(U,B){if(y){let K=zv(U,B),re=y[K];if(typeof re=="number")return re}return null}function jf(U,B,K){if(f)if(U){let re=U[U.length-1].route;if(re.path&&(re.path==="*"||re.path.endsWith("/*")))return{active:!0,matches:mu(B,K,l,!0)}}else return{active:!0,matches:mu(B,K,l,!0)||[]};return{active:!1,matches:null}}async function _c(U,B,K){let re=U,ve=re.length>0?re[re.length-1].route:null;for(;;){let ke=a==null,Me=a||i;try{await AN(f,B,re,Me,o,s,fe,K)}catch(je){return{type:"error",error:je,partialMatches:re}}finally{ke&&(i=[...i])}if(K.aborted)return{type:"aborted"};let ue=xo(Me,B,l),Ue=!1;if(ue){let je=ue[ue.length-1].route;if(je.index)return{type:"success",matches:ue};if(je.path&&je.path.length>0)if(je.path==="*")Ue=!0;else return{type:"success",matches:ue}}let Ne=mu(Me,B,l,!0);if(!Ne||re.map(je=>je.route.id).join("-")===Ne.map(je=>je.route.id).join("-"))return{type:"success",matches:Ue?ue:null};if(re=Ne,ve=re[re.length-1].route,ve.path==="*")return{type:"success",matches:re}}}function kT(U){o={},a=bl(U,s,void 0,o)}function CT(U,B){let K=a==null;W_(U,B,a||i,o,s),K&&(i=[...i],Se({}))}return E={get basename(){return l},get future(){return d},get state(){return T},get routes(){return i},get window(){return t},initialize:be,subscribe:Te,enableScrollRestoration:bT,navigate:k,fetch:Y,revalidate:J,createHref:U=>e.history.createHref(U),encodeLocation:U=>e.history.encodeLocation(U),getFetcher:Vr,deleteFetcher:Vn,dispose:Pe,getBlocker:yc,deleteBlocker:wc,patchRoutes:CT,_internalFetchControllers:W,_internalActiveDeferreds:se,_internalSetRoutes:kT},E}function jN(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function _p(e,t,r,n,s,o,i,a){let l,c;if(i){l=[];for(let d of t)if(l.push(d),d.route.id===i){c=d;break}}else l=t,c=t[t.length-1];let f=Vd(s||".",$d(l,o),sa(e.pathname,r)||e.pathname,a==="path");return s==null&&(f.search=e.search,f.hash=e.hash),(s==null||s===""||s===".")&&c&&c.route.index&&!ig(f.search)&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(f.pathname=f.pathname==="/"?r:is([r,f.pathname])),Uo(f)}function t0(e,t,r,n){if(!n||!jN(n))return{path:r};if(n.formMethod&&!HN(n.formMethod))return{path:r,error:ur(405,{method:n.formMethod})};let s=()=>({path:r,error:ur(400,{type:"invalid-body"})}),o=n.formMethod||"get",i=e?o.toUpperCase():o.toLowerCase(),a=B_(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!sn(i))return s();let h=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((m,y)=>{let[p,x]=y;return""+m+p+"="+x+` +`},""):String(n.body);return{path:r,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:h}}}else if(n.formEncType==="application/json"){if(!sn(i))return s();try{let h=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:h,text:void 0}}}catch{return s()}}}Ye(typeof FormData=="function","FormData is not available in this environment");let l,c;if(n.formData)l=bp(n.formData),c=n.formData;else if(n.body instanceof FormData)l=bp(n.body),c=n.body;else if(n.body instanceof URLSearchParams)l=n.body,c=i0(l);else if(n.body==null)l=new URLSearchParams,c=new FormData;else try{l=new URLSearchParams(n.body),c=i0(l)}catch{return s()}let f={formMethod:i,formAction:a,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(sn(f.formMethod))return{path:r,submission:f};let d=_s(r);return t&&d.search&&ig(d.search)&&l.append("index",""),d.search="?"+l,{path:Uo(d),submission:f}}function DN(e,t){let r=e;if(t){let n=e.findIndex(s=>s.route.id===t);n>=0&&(r=e.slice(0,n))}return r}function r0(e,t,r,n,s,o,i,a,l,c,f,d,h,m,y,p){let x=p?jr(p[1])?p[1].error:p[1].data:void 0,g=e.createURL(t.location),v=e.createURL(s),_=p&&jr(p[1])?p[0]:void 0,C=_?DN(r,_):r,E=p?p[1].statusCode:void 0,T=i&&E&&E>=400,P=C.filter((j,L)=>{let{route:q}=j;if(q.lazy)return!0;if(q.loader==null)return!1;if(o)return typeof q.loader!="function"||q.loader.hydrate?!0:t.loaderData[q.id]===void 0&&(!t.errors||t.errors[q.id]===void 0);if(ON(t.loaderData,t.matches[L],j)||l.some(b=>b===j.route.id))return!0;let R=t.matches[L],F=j;return n0(j,Rt({currentUrl:g,currentParams:R.params,nextUrl:v,nextParams:F.params},n,{actionResult:x,actionStatus:E,defaultShouldRevalidate:T?!1:a||g.pathname+g.search===v.pathname+v.search||g.search!==v.search||V_(R,F)}))}),O=[];return d.forEach((j,L)=>{if(o||!r.some(V=>V.route.id===j.routeId)||f.has(L))return;let q=xo(m,j.path,y);if(!q){O.push({key:L,routeId:j.routeId,path:j.path,matches:null,match:null,controller:null});return}let R=t.fetchers.get(L),F=za(q,j.path),b=!1;h.has(L)?b=!1:c.includes(L)?b=!0:R&&R.state!=="idle"&&R.data===void 0?b=a:b=n0(F,Rt({currentUrl:g,currentParams:t.matches[t.matches.length-1].params,nextUrl:v,nextParams:r[r.length-1].params},n,{actionResult:x,actionStatus:E,defaultShouldRevalidate:T?!1:a})),b&&O.push({key:L,routeId:j.routeId,path:j.path,matches:q,match:F,controller:new AbortController})}),[P,O]}function ON(e,t,r){let n=!t||r.route.id!==t.route.id,s=e[r.route.id]===void 0;return n||s}function V_(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function n0(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function AN(e,t,r,n,s,o,i,a){let l=[t,...r.map(c=>c.route.id)].join("-");try{let c=i.get(l);c||(c=e({path:t,matches:r,patch:(f,d)=>{a.aborted||W_(f,d,n,s,o)}}),i.set(l,c)),c&&VN(c)&&await c}finally{i.delete(l)}}function W_(e,t,r,n,s){if(e){var o;let i=n[e];Ye(i,"No route found to patch children into: routeId = "+e);let a=bl(t,s,[e,"patch",String(((o=i.children)==null?void 0:o.length)||"0")],n);i.children?i.children.push(...a):i.children=a}else{let i=bl(t,s,["patch",String(r.length||"0")],n);r.push(...i)}}async function s0(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let s=r[e.id];Ye(s,"No route found in manifest");let o={};for(let i in n){let l=s[i]!==void 0&&i!=="hasErrorBoundary";zo(!l,'Route "'+s.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!l&&!nN.has(i)&&(o[i]=n[i])}Object.assign(s,o),Object.assign(s,Rt({},t(s),{lazy:void 0}))}function MN(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function IN(e,t,r,n,s,o,i,a){let l=n.reduce((d,h)=>d.add(h.route.id),new Set),c=new Set,f=await e({matches:s.map(d=>{let h=l.has(d.route.id);return Rt({},d,{shouldLoad:h,resolve:y=>(c.add(d.route.id),h?LN(t,r,d,o,i,y,a):Promise.resolve({type:gt.data,result:void 0}))})}),request:r,params:s[0].params,context:a});return s.forEach(d=>Ye(c.has(d.route.id),'`match.resolve()` was not called for route id "'+d.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),f.filter((d,h)=>l.has(s[h].route.id))}async function LN(e,t,r,n,s,o,i){let a,l,c=f=>{let d,h=new Promise((p,x)=>d=x);l=()=>d(),t.signal.addEventListener("abort",l);let m=p=>typeof f!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+r.route.id+"]"))):f({request:t,params:r.params,context:i},...p!==void 0?[p]:[]),y;return o?y=o(p=>m(p)):y=(async()=>{try{return{type:"data",result:await m()}}catch(p){return{type:"error",result:p}}})(),Promise.race([y,h])};try{let f=r.route[e];if(r.route.lazy)if(f){let d,[h]=await Promise.all([c(f).catch(m=>{d=m}),s0(r.route,s,n)]);if(d!==void 0)throw d;a=h}else if(await s0(r.route,s,n),f=r.route[e],f)a=await c(f);else if(e==="action"){let d=new URL(t.url),h=d.pathname+d.search;throw ur(405,{method:t.method,pathname:h,routeId:r.route.id})}else return{type:gt.data,result:void 0};else if(f)a=await c(f);else{let d=new URL(t.url),h=d.pathname+d.search;throw ur(404,{pathname:h})}Ye(a.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(f){return{type:gt.error,result:f}}finally{l&&t.signal.removeEventListener("abort",l)}return a}async function FN(e){let{result:t,type:r,status:n}=e;if(H_(t)){let i;try{let a=t.headers.get("Content-Type");a&&/\bapplication\/json\b/.test(a)?t.body==null?i=null:i=await t.json():i=await t.text()}catch(a){return{type:gt.error,error:a}}return r===gt.error?{type:gt.error,error:new sg(t.status,t.statusText,i),statusCode:t.status,headers:t.headers}:{type:gt.data,data:i,statusCode:t.status,headers:t.headers}}if(r===gt.error)return{type:gt.error,error:t,statusCode:Wd(t)?t.status:n};if(BN(t)){var s,o;return{type:gt.deferred,deferredData:t,statusCode:(s=t.init)==null?void 0:s.status,headers:((o=t.init)==null?void 0:o.headers)&&new Headers(t.init.headers)}}return{type:gt.data,data:t,statusCode:n}}function zN(e,t,r,n,s,o){let i=e.headers.get("Location");if(Ye(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!og.test(i)){let a=n.slice(0,n.findIndex(l=>l.route.id===r)+1);i=_p(new URL(t.url),a,s,!0,i,o),e.headers.set("Location",i)}return e}function o0(e,t,r){if(og.test(e)){let n=e,s=n.startsWith("//")?new URL(t.protocol+n):new URL(n),o=sa(s.pathname,r)!=null;if(s.origin===t.origin&&o)return s.pathname+s.search+s.hash}return e}function si(e,t,r,n){let s=e.createURL(B_(t)).toString(),o={signal:r};if(n&&sn(n.formMethod)){let{formMethod:i,formEncType:a}=n;o.method=i.toUpperCase(),a==="application/json"?(o.headers=new Headers({"Content-Type":a}),o.body=JSON.stringify(n.json)):a==="text/plain"?o.body=n.text:a==="application/x-www-form-urlencoded"&&n.formData?o.body=bp(n.formData):o.body=n.formData}return new Request(s,o)}function bp(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function i0(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function UN(e,t,r,n,s,o){let i={},a=null,l,c=!1,f={},d=n&&jr(n[1])?n[1].error:void 0;return r.forEach((h,m)=>{let y=t[m].route.id;if(Ye(!Co(h),"Cannot handle redirect results in processLoaderData"),jr(h)){let p=h.error;d!==void 0&&(p=d,d=void 0),a=a||{};{let x=ki(e,y);a[x.route.id]==null&&(a[x.route.id]=p)}i[y]=void 0,c||(c=!0,l=Wd(h.error)?h.error.status:500),h.headers&&(f[y]=h.headers)}else ko(h)?(s.set(y,h.deferredData),i[y]=h.deferredData.data,h.statusCode!=null&&h.statusCode!==200&&!c&&(l=h.statusCode),h.headers&&(f[y]=h.headers)):(i[y]=h.data,h.statusCode&&h.statusCode!==200&&!c&&(l=h.statusCode),h.headers&&(f[y]=h.headers))}),d!==void 0&&n&&(a={[n[0]]:d},i[n[0]]=void 0),{loaderData:i,errors:a,statusCode:l||200,loaderHeaders:f}}function a0(e,t,r,n,s,o,i,a){let{loaderData:l,errors:c}=UN(t,r,n,s,a);for(let f=0;fn.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function u0(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function ur(e,t){let{pathname:r,routeId:n,method:s,type:o,message:i}=t===void 0?{}:t,a="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(a="Bad Request",o==="route-discovery"?l='Unable to match URL "'+r+'" - the `unstable_patchRoutesOnMiss()` '+(`function threw the following error: +`+i):s&&r&&n?l="You made a "+s+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":o==="defer-action"?l="defer() is not supported in actions":o==="invalid-body"&&(l="Unable to encode submission body")):e===403?(a="Forbidden",l='Route "'+n+'" does not match URL "'+r+'"'):e===404?(a="Not Found",l='No route matches URL "'+r+'"'):e===405&&(a="Method Not Allowed",s&&r&&n?l="You made a "+s.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":s&&(l='Invalid request method "'+s.toUpperCase()+'"')),new sg(e||500,a,new Error(l),!0)}function d0(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(Co(r))return{result:r,idx:t}}}function B_(e){let t=typeof e=="string"?_s(e):e;return Uo(Rt({},t,{hash:""}))}function $N(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function VN(e){return typeof e=="object"&&e!=null&&"then"in e}function WN(e){return H_(e.result)&&EN.has(e.result.status)}function ko(e){return e.type===gt.deferred}function jr(e){return e.type===gt.error}function Co(e){return(e&&e.type)===gt.redirect}function BN(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function H_(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function HN(e){return CN.has(e.toLowerCase())}function sn(e){return SN.has(e.toLowerCase())}async function f0(e,t,r,n,s,o){for(let i=0;id.route.id===l.route.id),f=c!=null&&!V_(c,l)&&(o&&o[l.route.id])!==void 0;if(ko(a)&&(s||f)){let d=n[i];Ye(d,"Expected an AbortSignal for revalidating fetcher deferred result"),await Y_(a,d,s).then(h=>{h&&(r[i]=h||r[i])})}}}async function Y_(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:gt.data,data:e.deferredData.unwrappedData}}catch(s){return{type:gt.error,error:s}}return{type:gt.data,data:e.deferredData.data}}}function ig(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function za(e,t){let r=typeof t=="string"?_s(t).search:t.search;if(e[e.length-1].route.index&&ig(r||""))return e[e.length-1];let n=z_(e);return n[n.length-1]}function h0(e){let{formMethod:t,formAction:r,formEncType:n,text:s,formData:o,json:i}=e;if(!(!t||!r||!n)){if(s!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:s};if(o!=null)return{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}}}function ih(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function YN(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Ra(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function ZN(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Os(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function GN(e,t){try{let r=e.sessionStorage.getItem($_);if(r){let n=JSON.parse(r);for(let[s,o]of Object.entries(n||{}))o&&Array.isArray(o)&&t.set(s,new Set(o||[]))}}catch{}}function KN(e,t){if(t.size>0){let r={};for(let[n,s]of t)r[n]=[...s];try{e.sessionStorage.setItem($_,JSON.stringify(r))}catch(n){zo(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}/** + * React Router v6.25.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function qu(){return qu=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),w.useCallback(function(c,f){if(f===void 0&&(f={}),!a.current)return;if(typeof c=="number"){n.go(c);return}let d=Vd(c,JSON.parse(i),o,f.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:is([t,d.pathname])),(f.replace?n.replace:n.push)(d,f.state,f)},[t,n,i,o,e])}const QN=w.createContext(null);function JN(e){let t=w.useContext(bs).outlet;return t&&w.createElement(QN.Provider,{value:e},t)}function q_(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=w.useContext(ho),{matches:s}=w.useContext(bs),{pathname:o}=po(),i=JSON.stringify($d(s,n.v7_relativeSplatPath));return w.useMemo(()=>Vd(e,JSON.parse(i),o,r==="path"),[e,i,o,r])}function eP(e,t,r,n){oa()||Ye(!1);let{navigator:s}=w.useContext(ho),{matches:o}=w.useContext(bs),i=o[o.length-1],a=i?i.params:{};i&&i.pathname;let l=i?i.pathnameBase:"/";i&&i.route;let c=po(),f;f=c;let d=f.pathname||"/",h=d;if(l!=="/"){let p=l.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(p.length).join("/")}let m=xo(e,{pathname:h});return oP(m&&m.map(p=>Object.assign({},p,{params:Object.assign({},a,p.params),pathname:is([l,s.encodeLocation?s.encodeLocation(p.pathname).pathname:p.pathname]),pathnameBase:p.pathnameBase==="/"?l:is([l,s.encodeLocation?s.encodeLocation(p.pathnameBase).pathname:p.pathnameBase])})),o,r,n)}function tP(){let e=cP(),t=Wd(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},t),r?w.createElement("pre",{style:s},r):null,null)}const rP=w.createElement(tP,null);class nP extends w.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?w.createElement(bs.Provider,{value:this.props.routeContext},w.createElement(G_.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function sP(e){let{routeContext:t,match:r,children:n}=e,s=w.useContext(Bd);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),w.createElement(bs.Provider,{value:t},n)}function oP(e,t,r,n){var s;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var o;if((o=r)!=null&&o.errors)e=r.matches;else return null}let i=e,a=(s=r)==null?void 0:s.errors;if(a!=null){let f=i.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);f>=0||Ye(!1),i=i.slice(0,Math.min(i.length,f+1))}let l=!1,c=-1;if(r&&n&&n.v7_partialHydration)for(let f=0;f=0?i=i.slice(0,c+1):i=[i[0]];break}}}return i.reduceRight((f,d,h)=>{let m,y=!1,p=null,x=null;r&&(m=a&&d.route.id?a[d.route.id]:void 0,p=d.route.errorElement||rP,l&&(c<0&&h===0?(dP("route-fallback"),y=!0,x=null):c===h&&(y=!0,x=d.route.hydrateFallbackElement||null)));let g=t.concat(i.slice(0,h+1)),v=()=>{let _;return m?_=p:y?_=x:d.route.Component?_=w.createElement(d.route.Component,null):d.route.element?_=d.route.element:_=f,w.createElement(sP,{match:d,routeContext:{outlet:f,matches:g,isDataRoute:r!=null},children:_})};return r&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?w.createElement(nP,{location:r.location,revalidation:r.revalidation,component:p,error:m,children:v(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):v()},null)}var X_=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(X_||{}),Xu=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Xu||{});function iP(e){let t=w.useContext(Bd);return t||Ye(!1),t}function aP(e){let t=w.useContext(Z_);return t||Ye(!1),t}function lP(e){let t=w.useContext(bs);return t||Ye(!1),t}function Q_(e){let t=lP(),r=t.matches[t.matches.length-1];return r.route.id||Ye(!1),r.route.id}function cP(){var e;let t=w.useContext(G_),r=aP(Xu.UseRouteError),n=Q_(Xu.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function uP(){let{router:e}=iP(X_.UseNavigateStable),t=Q_(Xu.UseNavigateStable),r=w.useRef(!1);return K_(()=>{r.current=!0}),w.useCallback(function(s,o){o===void 0&&(o={}),r.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,qu({fromRouteId:t},o)))},[e,t])}const p0={};function dP(e,t,r){p0[e]||(p0[e]=!0)}function J_(e){let{to:t,replace:r,state:n,relative:s}=e;oa()||Ye(!1);let{future:o,static:i}=w.useContext(ho),{matches:a}=w.useContext(bs),{pathname:l}=po(),c=Ss(),f=Vd(t,$d(a,o.v7_relativeSplatPath),l,s==="path"),d=JSON.stringify(f);return w.useEffect(()=>c(JSON.parse(d),{replace:r,state:n,relative:s}),[c,d,s,r,n]),null}function lg(e){return JN(e.context)}function fP(e){let{basename:t="/",children:r=null,location:n,navigationType:s=$t.Pop,navigator:o,static:i=!1,future:a}=e;oa()&&Ye(!1);let l=t.replace(/^\/*/,"/"),c=w.useMemo(()=>({basename:l,navigator:o,static:i,future:qu({v7_relativeSplatPath:!1},a)}),[l,a,o,i]);typeof n=="string"&&(n=_s(n));let{pathname:f="/",search:d="",hash:h="",state:m=null,key:y="default"}=n,p=w.useMemo(()=>{let x=sa(f,l);return x==null?null:{location:{pathname:x,search:d,hash:h,state:m,key:y},navigationType:s}},[l,f,d,h,m,y,s]);return p==null?null:w.createElement(ho.Provider,{value:c},w.createElement(ag.Provider,{children:r,value:p}))}new Promise(()=>{});function hP(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:w.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:w.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:w.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** + * React Router DOM v6.25.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Sl(){return Sl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[s]=e[s]);return r}function mP(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function gP(e,t){return e.button===0&&(!t||t==="_self")&&!mP(e)}function Sp(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(s=>[r,s]):[[r,n]])},[]))}function vP(e,t){let r=Sp(e);return t&&t.forEach((n,s)=>{r.has(s)||t.getAll(s).forEach(o=>{r.append(s,o)})}),r}const yP=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],wP="6";try{window.__reactRouterVersion=wP}catch{}function xP(e,t){return PN({basename:void 0,future:Sl({},void 0,{v7_prependBasename:!0}),history:eN({window:void 0}),hydrationData:_P(),routes:e,mapRouteProperties:hP,unstable_dataStrategy:void 0,unstable_patchRoutesOnMiss:void 0,window:void 0}).initialize()}function _P(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Sl({},t,{errors:bP(t.errors)})),t}function bP(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,s]of t)if(s&&s.__type==="RouteErrorResponse")r[n]=new sg(s.status,s.statusText,s.data,s.internal===!0);else if(s&&s.__type==="Error"){if(s.__subType){let o=window[s.__subType];if(typeof o=="function")try{let i=new o(s.message);i.stack="",r[n]=i}catch{}}if(r[n]==null){let o=new Error(s.message);o.stack="",r[n]=o}}else r[n]=s;return r}const SP=w.createContext({isTransitioning:!1}),kP=w.createContext(new Map),CP="startTransition",m0=Ow[CP],EP="flushSync",g0=J2[EP];function TP(e){m0?m0(e):e()}function Na(e){g0?g0(e):e()}class RP{constructor(){this.status="pending",this.promise=new Promise((t,r)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",t(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",r(n))}})}}function NP(e){let{fallbackElement:t,router:r,future:n}=e,[s,o]=w.useState(r.state),[i,a]=w.useState(),[l,c]=w.useState({isTransitioning:!1}),[f,d]=w.useState(),[h,m]=w.useState(),[y,p]=w.useState(),x=w.useRef(new Map),{v7_startTransition:g}=n||{},v=w.useCallback(O=>{g?TP(O):O()},[g]),_=w.useCallback((O,j)=>{let{deletedFetchers:L,unstable_flushSync:q,unstable_viewTransitionOpts:R}=j;L.forEach(b=>x.current.delete(b)),O.fetchers.forEach((b,V)=>{b.data!==void 0&&x.current.set(V,b.data)});let F=r.window==null||r.window.document==null||typeof r.window.document.startViewTransition!="function";if(!R||F){q?Na(()=>o(O)):v(()=>o(O));return}if(q){Na(()=>{h&&(f&&f.resolve(),h.skipTransition()),c({isTransitioning:!0,flushSync:!0,currentLocation:R.currentLocation,nextLocation:R.nextLocation})});let b=r.window.document.startViewTransition(()=>{Na(()=>o(O))});b.finished.finally(()=>{Na(()=>{d(void 0),m(void 0),a(void 0),c({isTransitioning:!1})})}),Na(()=>m(b));return}h?(f&&f.resolve(),h.skipTransition(),p({state:O,currentLocation:R.currentLocation,nextLocation:R.nextLocation})):(a(O),c({isTransitioning:!0,flushSync:!1,currentLocation:R.currentLocation,nextLocation:R.nextLocation}))},[r.window,h,f,x,v]);w.useLayoutEffect(()=>r.subscribe(_),[r,_]),w.useEffect(()=>{l.isTransitioning&&!l.flushSync&&d(new RP)},[l]),w.useEffect(()=>{if(f&&i&&r.window){let O=i,j=f.promise,L=r.window.document.startViewTransition(async()=>{v(()=>o(O)),await j});L.finished.finally(()=>{d(void 0),m(void 0),a(void 0),c({isTransitioning:!1})}),m(L)}},[v,i,f,r.window]),w.useEffect(()=>{f&&i&&s.location.key===i.location.key&&f.resolve()},[f,h,s.location,i]),w.useEffect(()=>{!l.isTransitioning&&y&&(a(y.state),c({isTransitioning:!0,flushSync:!1,currentLocation:y.currentLocation,nextLocation:y.nextLocation}),p(void 0))},[l.isTransitioning,y]),w.useEffect(()=>{},[]);let C=w.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:O=>r.navigate(O),push:(O,j,L)=>r.navigate(O,{state:j,preventScrollReset:L==null?void 0:L.preventScrollReset}),replace:(O,j,L)=>r.navigate(O,{replace:!0,state:j,preventScrollReset:L==null?void 0:L.preventScrollReset})}),[r]),E=r.basename||"/",T=w.useMemo(()=>({router:r,navigator:C,static:!1,basename:E}),[r,C,E]),P=w.useMemo(()=>({v7_relativeSplatPath:r.future.v7_relativeSplatPath}),[r.future.v7_relativeSplatPath]);return w.createElement(w.Fragment,null,w.createElement(Bd.Provider,{value:T},w.createElement(Z_.Provider,{value:s},w.createElement(kP.Provider,{value:x.current},w.createElement(SP.Provider,{value:l},w.createElement(fP,{basename:E,location:s.location,navigationType:s.historyAction,navigator:C,future:P},s.initialized||r.future.v7_partialHydration?w.createElement(PP,{routes:r.routes,future:r.future,state:s}):t))))),null)}const PP=w.memo(jP);function jP(e){let{routes:t,future:r,state:n}=e;return eP(t,void 0,n,r)}const DP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",OP=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Kn=w.forwardRef(function(t,r){let{onClick:n,relative:s,reloadDocument:o,replace:i,state:a,target:l,to:c,preventScrollReset:f,unstable_viewTransition:d}=t,h=pP(t,yP),{basename:m}=w.useContext(ho),y,p=!1;if(typeof c=="string"&&OP.test(c)&&(y=c,DP))try{let _=new URL(window.location.href),C=c.startsWith("//")?new URL(_.protocol+c):new URL(c),E=sa(C.pathname,m);C.origin===_.origin&&E!=null?c=E+C.search+C.hash:p=!0}catch{}let x=qN(c,{relative:s}),g=AP(c,{replace:i,state:a,target:l,preventScrollReset:f,relative:s,unstable_viewTransition:d});function v(_){n&&n(_),_.defaultPrevented||g(_)}return w.createElement("a",Sl({},h,{href:y||x,onClick:p||o?n:v,ref:r,target:l}))});var v0;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(v0||(v0={}));var y0;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(y0||(y0={}));function AP(e,t){let{target:r,replace:n,state:s,preventScrollReset:o,relative:i,unstable_viewTransition:a}=t===void 0?{}:t,l=Ss(),c=po(),f=q_(e,{relative:i});return w.useCallback(d=>{if(gP(d,r)){d.preventDefault();let h=n!==void 0?n:Uo(c)===Uo(f);l(e,{replace:h,state:s,preventScrollReset:o,relative:i,unstable_viewTransition:a})}},[c,l,f,n,s,r,e,o,i,a])}function MP(e){let t=w.useRef(Sp(e)),r=w.useRef(!1),n=po(),s=w.useMemo(()=>vP(n.search,r.current?null:t.current),[n.search]),o=Ss(),i=w.useCallback((a,l)=>{const c=Sp(typeof a=="function"?a(s):a);r.current=!0,o("?"+c,l)},[o,s]);return[s,i]}/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const IP=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),e1=(...e)=>e.filter((t,r,n)=>!!t&&n.indexOf(t)===r).join(" ");/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var LP={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const FP=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:o,iconNode:i,...a},l)=>w.createElement("svg",{ref:l,...LP,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:e1("lucide",s),...a},[...i.map(([c,f])=>w.createElement(c,f)),...Array.isArray(o)?o:[o]]));/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const cr=(e,t)=>{const r=w.forwardRef(({className:n,...s},o)=>w.createElement(FP,{ref:o,iconNode:t,className:e1(`lucide-${IP(e)}`,n),...s}));return r.displayName=`${e}`,r};/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const t1=cr("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const r1=cr("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const zP=cr("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const UP=cr("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const n1=cr("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const $P=cr("CircleUser",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const s1=cr("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const o1=cr("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const kp=cr("Earth",[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const w0=cr("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const VP=cr("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const WP=cr("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const x0=cr("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _0=cr("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const BP=cr("Smile",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const cg=cr("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function HP(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Hd(...e){return t=>e.forEach(r=>HP(r,t))}function ze(...e){return w.useCallback(Hd(...e),e)}var hs=w.forwardRef((e,t)=>{const{children:r,...n}=e,s=w.Children.toArray(r),o=s.find(YP);if(o){const i=o.props.children,a=s.map(l=>l===o?w.Children.count(i)>1?w.Children.only(null):w.isValidElement(i)?i.props.children:null:l);return u.jsx(Cp,{...n,ref:t,children:w.isValidElement(i)?w.cloneElement(i,void 0,a):null})}return u.jsx(Cp,{...n,ref:t,children:r})});hs.displayName="Slot";var Cp=w.forwardRef((e,t)=>{const{children:r,...n}=e;if(w.isValidElement(r)){const s=GP(r);return w.cloneElement(r,{...ZP(n,r.props),ref:t?Hd(t,s):s})}return w.Children.count(r)>1?w.Children.only(null):null});Cp.displayName="SlotClone";var ug=({children:e})=>u.jsx(u.Fragment,{children:e});function YP(e){return w.isValidElement(e)&&e.type===ug}function ZP(e,t){const r={...t};for(const n in t){const s=e[n],o=t[n];/^on[A-Z]/.test(n)?s&&o?r[n]=(...a)=>{o(...a),s(...a)}:s&&(r[n]=s):n==="style"?r[n]={...s,...o}:n==="className"&&(r[n]=[s,o].filter(Boolean).join(" "))}return{...e,...r}}function GP(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function i1(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ttypeof e=="boolean"?"".concat(e):e===0?"0":e,S0=KP,Jl=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return S0(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:o}=t,i=Object.keys(s).map(c=>{const f=r==null?void 0:r[c],d=o==null?void 0:o[c];if(f===null)return null;const h=b0(f)||b0(d);return s[c][h]}),a=r&&Object.entries(r).reduce((c,f)=>{let[d,h]=f;return h===void 0||(c[d]=h),c},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,f)=>{let{class:d,className:h,...m}=f;return Object.entries(m).every(y=>{let[p,x]=y;return Array.isArray(x)?x.includes({...o,...a}[p]):{...o,...a}[p]===x})?[...c,d,h]:c},[]);return S0(e,i,l,r==null?void 0:r.class,r==null?void 0:r.className)};function a1(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;ta(o)))==null?void 0:i.classGroupId}const k0=/^\[(.+)\]$/;function QP(e){if(k0.test(e)){const t=k0.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}}function JP(e){const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return tj(Object.entries(e.classGroups),r).forEach(([o,i])=>{Ep(i,n,o,t)}),n}function Ep(e,t,r,n){e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:C0(t,s);o.classGroupId=r;return}if(typeof s=="function"){if(ej(s)){Ep(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([o,i])=>{Ep(i,C0(t,o),r,n)})})}function C0(e,t){let r=e;return t.split(dg).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r}function ej(e){return e.isThemeGetter}function tj(e,t){return t?e.map(([r,n])=>{const s=n.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,a])=>[t+i,a])):o);return[r,s]}):e}function rj(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;function s(o,i){r.set(o,i),t++,t>e&&(t=0,n=r,r=new Map)}return{get(o){let i=r.get(o);if(i!==void 0)return i;if((i=n.get(o))!==void 0)return s(o,i),i},set(o,i){r.has(o)?r.set(o,i):s(o,i)}}}const c1="!";function nj(e){const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,s=t[0],o=t.length;function i(a){const l=[];let c=0,f=0,d;for(let x=0;xf?d-f:void 0;return{modifiers:l,hasImportantModifier:m,baseClassName:y,maybePostfixModifierPosition:p}}return r?function(l){return r({className:l,parseClassName:i})}:i}function sj(e){if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t}function oj(e){return{cache:rj(e.cacheSize),parseClassName:nj(e),...XP(e)}}const ij=/\s+/;function aj(e,t){const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=t,o=new Set;return e.trim().split(ij).map(i=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:f}=r(i);let d=!!f,h=n(d?c.substring(0,f):c);if(!h){if(!d)return{isTailwindClass:!1,originalClassName:i};if(h=n(c),!h)return{isTailwindClass:!1,originalClassName:i};d=!1}const m=sj(a).join(":");return{isTailwindClass:!0,modifierId:l?m+c1:m,classGroupId:h,originalClassName:i,hasPostfixModifier:d}}).reverse().filter(i=>{if(!i.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:c}=i,f=a+l;return o.has(f)?!1:(o.add(f),s(l,c).forEach(d=>o.add(a+d)),!0)}).reverse().map(i=>i.originalClassName).join(" ")}function lj(){let e=0,t,r,n="";for(;ed(f),e());return r=oj(c),n=r.cache.get,s=r.cache.set,o=a,a(l)}function a(l){const c=n(l);if(c)return c;const f=aj(l,r);return s(l,f),f}return function(){return o(lj.apply(null,arguments))}}function yt(e){const t=r=>r[e]||[];return t.isThemeGetter=!0,t}const d1=/^\[(?:([a-z-]+):)?(.+)\]$/i,uj=/^\d+\/\d+$/,dj=new Set(["px","full","screen"]),fj=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,hj=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,pj=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,mj=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,gj=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Yn(e){return Eo(e)||dj.has(e)||uj.test(e)}function js(e){return ia(e,"length",kj)}function Eo(e){return!!e&&!Number.isNaN(Number(e))}function Wc(e){return ia(e,"number",Eo)}function Pa(e){return!!e&&Number.isInteger(Number(e))}function vj(e){return e.endsWith("%")&&Eo(e.slice(0,-1))}function $e(e){return d1.test(e)}function Ds(e){return fj.test(e)}const yj=new Set(["length","size","percentage"]);function wj(e){return ia(e,yj,f1)}function xj(e){return ia(e,"position",f1)}const _j=new Set(["image","url"]);function bj(e){return ia(e,_j,Ej)}function Sj(e){return ia(e,"",Cj)}function ja(){return!0}function ia(e,t,r){const n=d1.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1}function kj(e){return hj.test(e)&&!pj.test(e)}function f1(){return!1}function Cj(e){return mj.test(e)}function Ej(e){return gj.test(e)}function Tj(){const e=yt("colors"),t=yt("spacing"),r=yt("blur"),n=yt("brightness"),s=yt("borderColor"),o=yt("borderRadius"),i=yt("borderSpacing"),a=yt("borderWidth"),l=yt("contrast"),c=yt("grayscale"),f=yt("hueRotate"),d=yt("invert"),h=yt("gap"),m=yt("gradientColorStops"),y=yt("gradientColorStopPositions"),p=yt("inset"),x=yt("margin"),g=yt("opacity"),v=yt("padding"),_=yt("saturate"),C=yt("scale"),E=yt("sepia"),T=yt("skew"),P=yt("space"),O=yt("translate"),j=()=>["auto","contain","none"],L=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto",$e,t],R=()=>[$e,t],F=()=>["",Yn,js],b=()=>["auto",Eo,$e],V=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],te=()=>["solid","dashed","dotted","double","none"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>["start","end","center","between","around","evenly","stretch"],I=()=>["","0",$e],Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[Eo,Wc],$=()=>[Eo,$e];return{cacheSize:500,separator:":",theme:{colors:[ja],spacing:[Yn,js],blur:["none","",Ds,$e],brightness:z(),borderColor:[e],borderRadius:["none","","full",Ds,$e],borderSpacing:R(),borderWidth:F(),contrast:z(),grayscale:I(),hueRotate:$(),invert:I(),gap:R(),gradientColorStops:[e],gradientColorStopPositions:[vj,js],inset:q(),margin:q(),opacity:z(),padding:R(),saturate:z(),scale:z(),sepia:I(),skew:$(),space:R(),translate:R()},classGroups:{aspect:[{aspect:["auto","square","video",$e]}],container:["container"],columns:[{columns:[Ds]}],"break-after":[{"break-after":Q()}],"break-before":[{"break-before":Q()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...V(),$e]}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Pa,$e]}],basis:[{basis:q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",$e]}],grow:[{grow:I()}],shrink:[{shrink:I()}],order:[{order:["first","last","none",Pa,$e]}],"grid-cols":[{"grid-cols":[ja]}],"col-start-end":[{col:["auto",{span:["full",Pa,$e]},$e]}],"col-start":[{"col-start":b()}],"col-end":[{"col-end":b()}],"grid-rows":[{"grid-rows":[ja]}],"row-start-end":[{row:["auto",{span:[Pa,$e]},$e]}],"row-start":[{"row-start":b()}],"row-end":[{"row-end":b()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",$e]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",$e]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...Z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[P]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[P]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",$e,t]}],"min-w":[{"min-w":[$e,t,"min","max","fit"]}],"max-w":[{"max-w":[$e,t,"none","full","min","max","fit","prose",{screen:[Ds]},Ds]}],h:[{h:[$e,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[$e,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[$e,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[$e,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ds,js]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Wc]}],"font-family":[{font:[ja]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",$e]}],"line-clamp":[{"line-clamp":["none",Eo,Wc]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Yn,$e]}],"list-image":[{"list-image":["none",$e]}],"list-style-type":[{list:["none","disc","decimal",$e]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Yn,js]}],"underline-offset":[{"underline-offset":["auto",Yn,$e]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",$e]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",$e]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...V(),xj]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",wj]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},bj]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...te(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:te()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...te()]}],"outline-offset":[{"outline-offset":[Yn,$e]}],"outline-w":[{outline:[Yn,js]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[Yn,js]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ds,Sj]}],"shadow-color":[{shadow:[ja]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...W(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":W()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Ds,$e]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[d]}],saturate:[{saturate:[_]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[_]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",$e]}],duration:[{duration:$()}],ease:[{ease:["linear","in","out","in-out",$e]}],delay:[{delay:$()}],animate:[{animate:["none","spin","ping","pulse","bounce",$e]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[Pa,$e]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",$e]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",$e]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",$e]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Yn,js,Wc]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const Rj=cj(Tj);function we(...e){return Rj(qP(e))}const fg=Jl("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Lt=w.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...s},o)=>{const i=n?hs:"button";return u.jsx(i,{className:we(fg({variant:t,size:r,className:e})),ref:o,...s})});Lt.displayName="Button";function le(e,t,{checkForDefaultPrevented:r=!0}={}){return function(s){if(e==null||e(s),r===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function Nj(e,t){const r=w.createContext(t);function n(o){const{children:i,...a}=o,l=w.useMemo(()=>a,Object.values(a));return u.jsx(r.Provider,{value:l,children:i})}function s(o){const i=w.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return n.displayName=e+"Provider",[n,s]}function Er(e,t=[]){let r=[];function n(o,i){const a=w.createContext(i),l=r.length;r=[...r,i];function c(d){const{scope:h,children:m,...y}=d,p=(h==null?void 0:h[e][l])||a,x=w.useMemo(()=>y,Object.values(y));return u.jsx(p.Provider,{value:x,children:m})}function f(d,h){const m=(h==null?void 0:h[e][l])||a,y=w.useContext(m);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${o}\``)}return c.displayName=o+"Provider",[c,f]}const s=()=>{const o=r.map(i=>w.createContext(i));return function(a){const l=(a==null?void 0:a[e])||o;return w.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[n,Pj(s,...t)]}function Pj(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const i=n.reduce((a,{useScope:l,scopeName:c})=>{const d=l(o)[`__scope${c}`];return{...a,...d}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function Pt(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function ps({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,s]=jj({defaultProp:t,onChange:r}),o=e!==void 0,i=o?e:n,a=Pt(r),l=w.useCallback(c=>{if(o){const d=typeof c=="function"?c(e):c;d!==e&&a(d)}else s(c)},[o,e,s,a]);return[i,l]}function jj({defaultProp:e,onChange:t}){const r=w.useState(e),[n]=r,s=w.useRef(n),o=Pt(t);return w.useEffect(()=>{s.current!==n&&(o(n),s.current=n)},[n,s,o]),r}var Dj=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],De=Dj.reduce((e,t)=>{const r=w.forwardRef((n,s)=>{const{asChild:o,...i}=n,a=o?hs:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(a,{...i,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function hg(e,t){e&&xs.flushSync(()=>e.dispatchEvent(t))}function Yd(e){const t=e+"CollectionProvider",[r,n]=Er(t),[s,o]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{const{scope:y,children:p}=m,x=Ge.useRef(null),g=Ge.useRef(new Map).current;return u.jsx(s,{scope:y,itemMap:g,collectionRef:x,children:p})};i.displayName=t;const a=e+"CollectionSlot",l=Ge.forwardRef((m,y)=>{const{scope:p,children:x}=m,g=o(a,p),v=ze(y,g.collectionRef);return u.jsx(hs,{ref:v,children:x})});l.displayName=a;const c=e+"CollectionItemSlot",f="data-radix-collection-item",d=Ge.forwardRef((m,y)=>{const{scope:p,children:x,...g}=m,v=Ge.useRef(null),_=ze(y,v),C=o(c,p);return Ge.useEffect(()=>(C.itemMap.set(v,{ref:v,...g}),()=>void C.itemMap.delete(v))),u.jsx(hs,{[f]:"",ref:_,children:x})});d.displayName=c;function h(m){const y=o(e+"CollectionConsumer",m);return Ge.useCallback(()=>{const x=y.collectionRef.current;if(!x)return[];const g=Array.from(x.querySelectorAll(`[${f}]`));return Array.from(y.itemMap.values()).sort((C,E)=>g.indexOf(C.ref.current)-g.indexOf(E.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:i,Slot:l,ItemSlot:d},h,n]}var Oj=w.createContext(void 0);function ec(e){const t=w.useContext(Oj);return e||t||"ltr"}function Aj(e,t=globalThis==null?void 0:globalThis.document){const r=Pt(e);w.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var Mj="DismissableLayer",Tp="dismissableLayer.update",Ij="dismissableLayer.pointerDownOutside",Lj="dismissableLayer.focusOutside",E0,h1=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),aa=w.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:i,onDismiss:a,...l}=e,c=w.useContext(h1),[f,d]=w.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=w.useState({}),y=ze(t,P=>d(P)),p=Array.from(c.layers),[x]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),g=p.indexOf(x),v=f?p.indexOf(f):-1,_=c.layersWithOutsidePointerEventsDisabled.size>0,C=v>=g,E=zj(P=>{const O=P.target,j=[...c.branches].some(L=>L.contains(O));!C||j||(s==null||s(P),i==null||i(P),P.defaultPrevented||a==null||a())},h),T=Uj(P=>{const O=P.target;[...c.branches].some(L=>L.contains(O))||(o==null||o(P),i==null||i(P),P.defaultPrevented||a==null||a())},h);return Aj(P=>{v===c.layers.size-1&&(n==null||n(P),!P.defaultPrevented&&a&&(P.preventDefault(),a()))},h),w.useEffect(()=>{if(f)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(E0=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(f)),c.layers.add(f),T0(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=E0)}},[f,h,r,c]),w.useEffect(()=>()=>{f&&(c.layers.delete(f),c.layersWithOutsidePointerEventsDisabled.delete(f),T0())},[f,c]),w.useEffect(()=>{const P=()=>m({});return document.addEventListener(Tp,P),()=>document.removeEventListener(Tp,P)},[]),u.jsx(De.div,{...l,ref:y,style:{pointerEvents:_?C?"auto":"none":void 0,...e.style},onFocusCapture:le(e.onFocusCapture,T.onFocusCapture),onBlurCapture:le(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:le(e.onPointerDownCapture,E.onPointerDownCapture)})});aa.displayName=Mj;var Fj="DismissableLayerBranch",p1=w.forwardRef((e,t)=>{const r=w.useContext(h1),n=w.useRef(null),s=ze(t,n);return w.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),u.jsx(De.div,{...e,ref:s})});p1.displayName=Fj;function zj(e,t=globalThis==null?void 0:globalThis.document){const r=Pt(e),n=w.useRef(!1),s=w.useRef(()=>{});return w.useEffect(()=>{const o=a=>{if(a.target&&!n.current){let l=function(){m1(Ij,r,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=l,t.addEventListener("click",s.current,{once:!0})):l()}else t.removeEventListener("click",s.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Uj(e,t=globalThis==null?void 0:globalThis.document){const r=Pt(e),n=w.useRef(!1);return w.useEffect(()=>{const s=o=>{o.target&&!n.current&&m1(Lj,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function T0(){const e=new CustomEvent(Tp);document.dispatchEvent(e)}function m1(e,t,r,{discrete:n}){const s=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?hg(s,o):s.dispatchEvent(o)}var $j=aa,Vj=p1,ah=0;function pg(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??R0()),document.body.insertAdjacentElement("beforeend",e[1]??R0()),ah++,()=>{ah===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ah--}},[])}function R0(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var lh="focusScope.autoFocusOnMount",ch="focusScope.autoFocusOnUnmount",N0={bubbles:!1,cancelable:!0},Wj="FocusScope",Zd=w.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...i}=e,[a,l]=w.useState(null),c=Pt(s),f=Pt(o),d=w.useRef(null),h=ze(t,p=>l(p)),m=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(n){let p=function(_){if(m.paused||!a)return;const C=_.target;a.contains(C)?d.current=C:As(d.current,{select:!0})},x=function(_){if(m.paused||!a)return;const C=_.relatedTarget;C!==null&&(a.contains(C)||As(d.current,{select:!0}))},g=function(_){if(document.activeElement===document.body)for(const E of _)E.removedNodes.length>0&&As(a)};document.addEventListener("focusin",p),document.addEventListener("focusout",x);const v=new MutationObserver(g);return a&&v.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",x),v.disconnect()}}},[n,a,m.paused]),w.useEffect(()=>{if(a){j0.add(m);const p=document.activeElement;if(!a.contains(p)){const g=new CustomEvent(lh,N0);a.addEventListener(lh,c),a.dispatchEvent(g),g.defaultPrevented||(Bj(Kj(g1(a)),{select:!0}),document.activeElement===p&&As(a))}return()=>{a.removeEventListener(lh,c),setTimeout(()=>{const g=new CustomEvent(ch,N0);a.addEventListener(ch,f),a.dispatchEvent(g),g.defaultPrevented||As(p??document.body,{select:!0}),a.removeEventListener(ch,f),j0.remove(m)},0)}}},[a,c,f,m]);const y=w.useCallback(p=>{if(!r&&!n||m.paused)return;const x=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,g=document.activeElement;if(x&&g){const v=p.currentTarget,[_,C]=Hj(v);_&&C?!p.shiftKey&&g===C?(p.preventDefault(),r&&As(_,{select:!0})):p.shiftKey&&g===_&&(p.preventDefault(),r&&As(C,{select:!0})):g===v&&p.preventDefault()}},[r,n,m.paused]);return u.jsx(De.div,{tabIndex:-1,...i,ref:h,onKeyDown:y})});Zd.displayName=Wj;function Bj(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(As(n,{select:t}),document.activeElement!==r)return}function Hj(e){const t=g1(e),r=P0(t,e),n=P0(t.reverse(),e);return[r,n]}function g1(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function P0(e,t){for(const r of e)if(!Yj(r,{upTo:t}))return r}function Yj(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Zj(e){return e instanceof HTMLInputElement&&"select"in e}function As(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Zj(e)&&t&&e.select()}}var j0=Gj();function Gj(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=D0(e,t),e.unshift(t)},remove(t){var r;e=D0(e,t),(r=e[0])==null||r.resume()}}}function D0(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Kj(e){return e.filter(t=>t.tagName!=="A")}var rr=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{},qj=Ow.useId||(()=>{}),Xj=0;function On(e){const[t,r]=w.useState(qj());return rr(()=>{r(n=>n??String(Xj++))},[e]),t?`radix-${t}`:""}const Qj=["top","right","bottom","left"],Nn=Math.min,Dr=Math.max,Qu=Math.round,Bc=Math.floor,ro=e=>({x:e,y:e}),Jj={left:"right",right:"left",bottom:"top",top:"bottom"},eD={start:"end",end:"start"};function Rp(e,t,r){return Dr(e,Nn(t,r))}function ms(e,t){return typeof e=="function"?e(t):e}function gs(e){return e.split("-")[0]}function la(e){return e.split("-")[1]}function mg(e){return e==="x"?"y":"x"}function gg(e){return e==="y"?"height":"width"}function no(e){return["top","bottom"].includes(gs(e))?"y":"x"}function vg(e){return mg(no(e))}function tD(e,t,r){r===void 0&&(r=!1);const n=la(e),s=vg(e),o=gg(s);let i=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=Ju(i)),[i,Ju(i)]}function rD(e){const t=Ju(e);return[Np(e),t,Np(t)]}function Np(e){return e.replace(/start|end/g,t=>eD[t])}function nD(e,t,r){const n=["left","right"],s=["right","left"],o=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return r?t?s:n:t?n:s;case"left":case"right":return t?o:i;default:return[]}}function sD(e,t,r,n){const s=la(e);let o=nD(gs(e),r==="start",n);return s&&(o=o.map(i=>i+"-"+s),t&&(o=o.concat(o.map(Np)))),o}function Ju(e){return e.replace(/left|right|bottom|top/g,t=>Jj[t])}function oD(e){return{top:0,right:0,bottom:0,left:0,...e}}function v1(e){return typeof e!="number"?oD(e):{top:e,right:e,bottom:e,left:e}}function ed(e){const{x:t,y:r,width:n,height:s}=e;return{width:n,height:s,top:r,left:t,right:t+n,bottom:r+s,x:t,y:r}}function O0(e,t,r){let{reference:n,floating:s}=e;const o=no(t),i=vg(t),a=gg(i),l=gs(t),c=o==="y",f=n.x+n.width/2-s.width/2,d=n.y+n.height/2-s.height/2,h=n[a]/2-s[a]/2;let m;switch(l){case"top":m={x:f,y:n.y-s.height};break;case"bottom":m={x:f,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:d};break;case"left":m={x:n.x-s.width,y:d};break;default:m={x:n.x,y:n.y}}switch(la(t)){case"start":m[i]-=h*(r&&c?-1:1);break;case"end":m[i]+=h*(r&&c?-1:1);break}return m}const iD=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:o=[],platform:i}=r,a=o.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:s}),{x:f,y:d}=O0(c,n,l),h=n,m={},y=0;for(let p=0;p({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:o,platform:i,elements:a,middlewareData:l}=t,{element:c,padding:f=0}=ms(e,t)||{};if(c==null)return{};const d=v1(f),h={x:r,y:n},m=vg(s),y=gg(m),p=await i.getDimensions(c),x=m==="y",g=x?"top":"left",v=x?"bottom":"right",_=x?"clientHeight":"clientWidth",C=o.reference[y]+o.reference[m]-h[m]-o.floating[y],E=h[m]-o.reference[m],T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let P=T?T[_]:0;(!P||!await(i.isElement==null?void 0:i.isElement(T)))&&(P=a.floating[_]||o.floating[y]);const O=C/2-E/2,j=P/2-p[y]/2-1,L=Nn(d[g],j),q=Nn(d[v],j),R=L,F=P-p[y]-q,b=P/2-p[y]/2+O,V=Rp(R,b,F),te=!l.arrow&&la(s)!=null&&b!==V&&o.reference[y]/2-(bb<=0)){var q,R;const b=(((q=o.flip)==null?void 0:q.index)||0)+1,V=P[b];if(V)return{data:{index:b,overflows:L},reset:{placement:V}};let te=(R=L.filter(W=>W.overflows[0]<=0).sort((W,Z)=>W.overflows[1]-Z.overflows[1])[0])==null?void 0:R.placement;if(!te)switch(m){case"bestFit":{var F;const W=(F=L.filter(Z=>{if(T){const I=no(Z.placement);return I===v||I==="y"}return!0}).map(Z=>[Z.placement,Z.overflows.filter(I=>I>0).reduce((I,Q)=>I+Q,0)]).sort((Z,I)=>Z[1]-I[1])[0])==null?void 0:F[0];W&&(te=W);break}case"initialPlacement":te=a;break}if(s!==te)return{reset:{placement:te}}}return{}}}};function A0(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function M0(e){return Qj.some(t=>e[t]>=0)}const cD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...s}=ms(e,t);switch(n){case"referenceHidden":{const o=await kl(t,{...s,elementContext:"reference"}),i=A0(o,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:M0(i)}}}case"escaped":{const o=await kl(t,{...s,altBoundary:!0}),i=A0(o,r.floating);return{data:{escapedOffsets:i,escaped:M0(i)}}}default:return{}}}}};async function uD(e,t){const{placement:r,platform:n,elements:s}=e,o=await(n.isRTL==null?void 0:n.isRTL(s.floating)),i=gs(r),a=la(r),l=no(r)==="y",c=["left","top"].includes(i)?-1:1,f=o&&l?-1:1,d=ms(t,e);let{mainAxis:h,crossAxis:m,alignmentAxis:y}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof y=="number"&&(m=a==="end"?y*-1:y),l?{x:m*f,y:h*c}:{x:h*c,y:m*f}}const dD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:s,y:o,placement:i,middlewareData:a}=t,l=await uD(t,e);return i===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:o+l.y,data:{...l,placement:i}}}}},fD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:a={fn:x=>{let{x:g,y:v}=x;return{x:g,y:v}}},...l}=ms(e,t),c={x:r,y:n},f=await kl(t,l),d=no(gs(s)),h=mg(d);let m=c[h],y=c[d];if(o){const x=h==="y"?"top":"left",g=h==="y"?"bottom":"right",v=m+f[x],_=m-f[g];m=Rp(v,m,_)}if(i){const x=d==="y"?"top":"left",g=d==="y"?"bottom":"right",v=y+f[x],_=y-f[g];y=Rp(v,y,_)}const p=a.fn({...t,[h]:m,[d]:y});return{...p,data:{x:p.x-r,y:p.y-n}}}}},hD=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:o,middlewareData:i}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=ms(e,t),f={x:r,y:n},d=no(s),h=mg(d);let m=f[h],y=f[d];const p=ms(a,t),x=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(l){const _=h==="y"?"height":"width",C=o.reference[h]-o.floating[_]+x.mainAxis,E=o.reference[h]+o.reference[_]-x.mainAxis;mE&&(m=E)}if(c){var g,v;const _=h==="y"?"width":"height",C=["top","left"].includes(gs(s)),E=o.reference[d]-o.floating[_]+(C&&((g=i.offset)==null?void 0:g[d])||0)+(C?0:x.crossAxis),T=o.reference[d]+o.reference[_]+(C?0:((v=i.offset)==null?void 0:v[d])||0)-(C?x.crossAxis:0);yT&&(y=T)}return{[h]:m,[d]:y}}}},pD=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:n,platform:s,elements:o}=t,{apply:i=()=>{},...a}=ms(e,t),l=await kl(t,a),c=gs(r),f=la(r),d=no(r)==="y",{width:h,height:m}=n.floating;let y,p;c==="top"||c==="bottom"?(y=c,p=f===(await(s.isRTL==null?void 0:s.isRTL(o.floating))?"start":"end")?"left":"right"):(p=c,y=f==="end"?"top":"bottom");const x=m-l.top-l.bottom,g=h-l.left-l.right,v=Nn(m-l[y],x),_=Nn(h-l[p],g),C=!t.middlewareData.shift;let E=v,T=_;if(d?T=f||C?Nn(_,g):g:E=f||C?Nn(v,x):x,C&&!f){const O=Dr(l.left,0),j=Dr(l.right,0),L=Dr(l.top,0),q=Dr(l.bottom,0);d?T=h-2*(O!==0||j!==0?O+j:Dr(l.left,l.right)):E=m-2*(L!==0||q!==0?L+q:Dr(l.top,l.bottom))}await i({...t,availableWidth:T,availableHeight:E});const P=await s.getDimensions(o.floating);return h!==P.width||m!==P.height?{reset:{rects:!0}}:{}}}};function ca(e){return y1(e)?(e.nodeName||"").toLowerCase():"#document"}function Mr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ks(e){var t;return(t=(y1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function y1(e){return e instanceof Node||e instanceof Mr(e).Node}function pn(e){return e instanceof Element||e instanceof Mr(e).Element}function Mn(e){return e instanceof HTMLElement||e instanceof Mr(e).HTMLElement}function I0(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Mr(e).ShadowRoot}function tc(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=mn(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(s)}function mD(e){return["table","td","th"].includes(ca(e))}function Gd(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function yg(e){const t=wg(),r=pn(e)?mn(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 gD(e){let t=so(e);for(;Mn(t)&&!Ki(t);){if(yg(t))return t;if(Gd(t))return null;t=so(t)}return null}function wg(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ki(e){return["html","body","#document"].includes(ca(e))}function mn(e){return Mr(e).getComputedStyle(e)}function Kd(e){return pn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function so(e){if(ca(e)==="html")return e;const t=e.assignedSlot||e.parentNode||I0(e)&&e.host||ks(e);return I0(t)?t.host:t}function w1(e){const t=so(e);return Ki(t)?e.ownerDocument?e.ownerDocument.body:e.body:Mn(t)&&tc(t)?t:w1(t)}function Cl(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=w1(e),o=s===((n=e.ownerDocument)==null?void 0:n.body),i=Mr(s);return o?t.concat(i,i.visualViewport||[],tc(s)?s:[],i.frameElement&&r?Cl(i.frameElement):[]):t.concat(s,Cl(s,[],r))}function x1(e){const t=mn(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=Mn(e),o=s?e.offsetWidth:r,i=s?e.offsetHeight:n,a=Qu(r)!==o||Qu(n)!==i;return a&&(r=o,n=i),{width:r,height:n,$:a}}function xg(e){return pn(e)?e:e.contextElement}function Ai(e){const t=xg(e);if(!Mn(t))return ro(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:o}=x1(t);let i=(o?Qu(r.width):r.width)/n,a=(o?Qu(r.height):r.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const vD=ro(0);function _1(e){const t=Mr(e);return!wg()||!t.visualViewport?vD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function yD(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Mr(e)?!1:t}function $o(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),o=xg(e);let i=ro(1);t&&(n?pn(n)&&(i=Ai(n)):i=Ai(e));const a=yD(o,r,n)?_1(o):ro(0);let l=(s.left+a.x)/i.x,c=(s.top+a.y)/i.y,f=s.width/i.x,d=s.height/i.y;if(o){const h=Mr(o),m=n&&pn(n)?Mr(n):n;let y=h,p=y.frameElement;for(;p&&n&&m!==y;){const x=Ai(p),g=p.getBoundingClientRect(),v=mn(p),_=g.left+(p.clientLeft+parseFloat(v.paddingLeft))*x.x,C=g.top+(p.clientTop+parseFloat(v.paddingTop))*x.y;l*=x.x,c*=x.y,f*=x.x,d*=x.y,l+=_,c+=C,y=Mr(p),p=y.frameElement}}return ed({width:f,height:d,x:l,y:c})}function wD(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const o=s==="fixed",i=ks(n),a=t?Gd(t.floating):!1;if(n===i||a&&o)return r;let l={scrollLeft:0,scrollTop:0},c=ro(1);const f=ro(0),d=Mn(n);if((d||!d&&!o)&&((ca(n)!=="body"||tc(i))&&(l=Kd(n)),Mn(n))){const h=$o(n);c=Ai(n),f.x=h.x+n.clientLeft,f.y=h.y+n.clientTop}return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+f.x,y:r.y*c.y-l.scrollTop*c.y+f.y}}function xD(e){return Array.from(e.getClientRects())}function b1(e){return $o(ks(e)).left+Kd(e).scrollLeft}function _D(e){const t=ks(e),r=Kd(e),n=e.ownerDocument.body,s=Dr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=Dr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+b1(e);const a=-r.scrollTop;return mn(n).direction==="rtl"&&(i+=Dr(t.clientWidth,n.clientWidth)-s),{width:s,height:o,x:i,y:a}}function bD(e,t){const r=Mr(e),n=ks(e),s=r.visualViewport;let o=n.clientWidth,i=n.clientHeight,a=0,l=0;if(s){o=s.width,i=s.height;const c=wg();(!c||c&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:i,x:a,y:l}}function SD(e,t){const r=$o(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,o=Mn(e)?Ai(e):ro(1),i=e.clientWidth*o.x,a=e.clientHeight*o.y,l=s*o.x,c=n*o.y;return{width:i,height:a,x:l,y:c}}function L0(e,t,r){let n;if(t==="viewport")n=bD(e,r);else if(t==="document")n=_D(ks(e));else if(pn(t))n=SD(t,r);else{const s=_1(e);n={...t,x:t.x-s.x,y:t.y-s.y}}return ed(n)}function S1(e,t){const r=so(e);return r===t||!pn(r)||Ki(r)?!1:mn(r).position==="fixed"||S1(r,t)}function kD(e,t){const r=t.get(e);if(r)return r;let n=Cl(e,[],!1).filter(a=>pn(a)&&ca(a)!=="body"),s=null;const o=mn(e).position==="fixed";let i=o?so(e):e;for(;pn(i)&&!Ki(i);){const a=mn(i),l=yg(i);!l&&a.position==="fixed"&&(s=null),(o?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||tc(i)&&!l&&S1(e,i))?n=n.filter(f=>f!==i):s=a,i=so(i)}return t.set(e,n),n}function CD(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const i=[...r==="clippingAncestors"?Gd(t)?[]:kD(t,this._c):[].concat(r),n],a=i[0],l=i.reduce((c,f)=>{const d=L0(t,f,s);return c.top=Dr(d.top,c.top),c.right=Nn(d.right,c.right),c.bottom=Nn(d.bottom,c.bottom),c.left=Dr(d.left,c.left),c},L0(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function ED(e){const{width:t,height:r}=x1(e);return{width:t,height:r}}function TD(e,t,r){const n=Mn(t),s=ks(t),o=r==="fixed",i=$o(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=ro(0);if(n||!n&&!o)if((ca(t)!=="body"||tc(s))&&(a=Kd(t)),n){const d=$o(t,!0,o,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else s&&(l.x=b1(s));const c=i.left+a.scrollLeft-l.x,f=i.top+a.scrollTop-l.y;return{x:c,y:f,width:i.width,height:i.height}}function uh(e){return mn(e).position==="static"}function F0(e,t){return!Mn(e)||mn(e).position==="fixed"?null:t?t(e):e.offsetParent}function k1(e,t){const r=Mr(e);if(Gd(e))return r;if(!Mn(e)){let s=so(e);for(;s&&!Ki(s);){if(pn(s)&&!uh(s))return s;s=so(s)}return r}let n=F0(e,t);for(;n&&mD(n)&&uh(n);)n=F0(n,t);return n&&Ki(n)&&uh(n)&&!yg(n)?r:n||gD(e)||r}const RD=async function(e){const t=this.getOffsetParent||k1,r=this.getDimensions,n=await r(e.floating);return{reference:TD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function ND(e){return mn(e).direction==="rtl"}const PD={convertOffsetParentRelativeRectToViewportRelativeRect:wD,getDocumentElement:ks,getClippingRect:CD,getOffsetParent:k1,getElementRects:RD,getClientRects:xD,getDimensions:ED,getScale:Ai,isElement:pn,isRTL:ND};function jD(e,t){let r=null,n;const s=ks(e);function o(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const{left:c,top:f,width:d,height:h}=e.getBoundingClientRect();if(a||t(),!d||!h)return;const m=Bc(f),y=Bc(s.clientWidth-(c+d)),p=Bc(s.clientHeight-(f+h)),x=Bc(c),v={rootMargin:-m+"px "+-y+"px "+-p+"px "+-x+"px",threshold:Dr(0,Nn(1,l))||1};let _=!0;function C(E){const T=E[0].intersectionRatio;if(T!==l){if(!_)return i();T?i(!1,T):n=setTimeout(()=>{i(!1,1e-7)},1e3)}_=!1}try{r=new IntersectionObserver(C,{...v,root:s.ownerDocument})}catch{r=new IntersectionObserver(C,v)}r.observe(e)}return i(!0),o}function DD(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=xg(e),f=s||o?[...c?Cl(c):[],...Cl(t)]:[];f.forEach(g=>{s&&g.addEventListener("scroll",r,{passive:!0}),o&&g.addEventListener("resize",r)});const d=c&&a?jD(c,r):null;let h=-1,m=null;i&&(m=new ResizeObserver(g=>{let[v]=g;v&&v.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var _;(_=m)==null||_.observe(t)})),r()}),c&&!l&&m.observe(c),m.observe(t));let y,p=l?$o(e):null;l&&x();function x(){const g=$o(e);p&&(g.x!==p.x||g.y!==p.y||g.width!==p.width||g.height!==p.height)&&r(),p=g,y=requestAnimationFrame(x)}return r(),()=>{var g;f.forEach(v=>{s&&v.removeEventListener("scroll",r),o&&v.removeEventListener("resize",r)}),d==null||d(),(g=m)==null||g.disconnect(),m=null,l&&cancelAnimationFrame(y)}}const OD=dD,AD=fD,MD=lD,ID=pD,LD=cD,z0=aD,FD=hD,zD=(e,t,r)=>{const n=new Map,s={platform:PD,...r},o={...s.platform,_c:n};return iD(e,t,{...s,platform:o})};var gu=typeof document<"u"?w.useLayoutEffect:w.useEffect;function td(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,s;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(!td(e[n],t[n]))return!1;return!0}if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,s[n]))return!1;for(n=r;n--!==0;){const o=s[n];if(!(o==="_owner"&&e.$$typeof)&&!td(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function C1(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function U0(e,t){const r=C1(e);return Math.round(t*r)/r}function $0(e){const t=w.useRef(e);return gu(()=>{t.current=e}),t}function UD(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:o,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[f,d]=w.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=w.useState(n);td(h,n)||m(n);const[y,p]=w.useState(null),[x,g]=w.useState(null),v=w.useCallback(W=>{W!==T.current&&(T.current=W,p(W))},[]),_=w.useCallback(W=>{W!==P.current&&(P.current=W,g(W))},[]),C=o||y,E=i||x,T=w.useRef(null),P=w.useRef(null),O=w.useRef(f),j=l!=null,L=$0(l),q=$0(s),R=w.useCallback(()=>{if(!T.current||!P.current)return;const W={placement:t,strategy:r,middleware:h};q.current&&(W.platform=q.current),zD(T.current,P.current,W).then(Z=>{const I={...Z,isPositioned:!0};F.current&&!td(O.current,I)&&(O.current=I,xs.flushSync(()=>{d(I)}))})},[h,t,r,q]);gu(()=>{c===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,d(W=>({...W,isPositioned:!1})))},[c]);const F=w.useRef(!1);gu(()=>(F.current=!0,()=>{F.current=!1}),[]),gu(()=>{if(C&&(T.current=C),E&&(P.current=E),C&&E){if(L.current)return L.current(C,E,R);R()}},[C,E,R,L,j]);const b=w.useMemo(()=>({reference:T,floating:P,setReference:v,setFloating:_}),[v,_]),V=w.useMemo(()=>({reference:C,floating:E}),[C,E]),te=w.useMemo(()=>{const W={position:r,left:0,top:0};if(!V.floating)return W;const Z=U0(V.floating,f.x),I=U0(V.floating,f.y);return a?{...W,transform:"translate("+Z+"px, "+I+"px)",...C1(V.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Z,top:I}},[r,a,V.floating,f.x,f.y]);return w.useMemo(()=>({...f,update:R,refs:b,elements:V,floatingStyles:te}),[f,R,b,V,te])}const $D=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:s}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?z0({element:n.current,padding:s}).fn(r):{}:n?z0({element:n,padding:s}).fn(r):{}}}},VD=(e,t)=>({...OD(e),options:[e,t]}),WD=(e,t)=>({...AD(e),options:[e,t]}),BD=(e,t)=>({...FD(e),options:[e,t]}),HD=(e,t)=>({...MD(e),options:[e,t]}),YD=(e,t)=>({...ID(e),options:[e,t]}),ZD=(e,t)=>({...LD(e),options:[e,t]}),GD=(e,t)=>({...$D(e),options:[e,t]});var KD="Arrow",E1=w.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...o}=e;return u.jsx(De.svg,{...o,ref:t,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});E1.displayName=KD;var qD=E1;function _g(e){const[t,r]=w.useState(void 0);return rr(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let i,a;if("borderBoxSize"in o){const l=o.borderBoxSize,c=Array.isArray(l)?l[0]:l;i=c.inlineSize,a=c.blockSize}else i=e.offsetWidth,a=e.offsetHeight;r({width:i,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var bg="Popper",[T1,ua]=Er(bg),[XD,R1]=T1(bg),N1=e=>{const{__scopePopper:t,children:r}=e,[n,s]=w.useState(null);return u.jsx(XD,{scope:t,anchor:n,onAnchorChange:s,children:r})};N1.displayName=bg;var P1="PopperAnchor",j1=w.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,o=R1(P1,r),i=w.useRef(null),a=ze(t,i);return w.useEffect(()=>{o.onAnchorChange((n==null?void 0:n.current)||i.current)}),n?null:u.jsx(De.div,{...s,ref:a})});j1.displayName=P1;var Sg="PopperContent",[QD,JD]=T1(Sg),D1=w.forwardRef((e,t)=>{var fe,ge,be,Pe,Te,Se;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:o="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:y,...p}=e,x=R1(Sg,r),[g,v]=w.useState(null),_=ze(t,qe=>v(qe)),[C,E]=w.useState(null),T=_g(C),P=(T==null?void 0:T.width)??0,O=(T==null?void 0:T.height)??0,j=n+(o!=="center"?"-"+o:""),L=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},q=Array.isArray(c)?c:[c],R=q.length>0,F={padding:L,boundary:q.filter(tO),altBoundary:R},{refs:b,floatingStyles:V,placement:te,isPositioned:W,middlewareData:Z}=UD({strategy:"fixed",placement:j,whileElementsMounted:(...qe)=>DD(...qe,{animationFrame:m==="always"}),elements:{reference:x.anchor},middleware:[VD({mainAxis:s+O,alignmentAxis:i}),l&&WD({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?BD():void 0,...F}),l&&HD({...F}),YD({...F,apply:({elements:qe,rects:k,availableWidth:J,availableHeight:G})=>{const{width:D,height:S}=k.reference,N=qe.floating.style;N.setProperty("--radix-popper-available-width",`${J}px`),N.setProperty("--radix-popper-available-height",`${G}px`),N.setProperty("--radix-popper-anchor-width",`${D}px`),N.setProperty("--radix-popper-anchor-height",`${S}px`)}}),C&&GD({element:C,padding:a}),rO({arrowWidth:P,arrowHeight:O}),h&&ZD({strategy:"referenceHidden",...F})]}),[I,Q]=M1(te),z=Pt(y);rr(()=>{W&&(z==null||z())},[W,z]);const $=(fe=Z.arrow)==null?void 0:fe.x,de=(ge=Z.arrow)==null?void 0:ge.y,ne=((be=Z.arrow)==null?void 0:be.centerOffset)!==0,[se,Ee]=w.useState();return rr(()=>{g&&Ee(window.getComputedStyle(g).zIndex)},[g]),u.jsx("div",{ref:b.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:W?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:se,"--radix-popper-transform-origin":[(Pe=Z.transformOrigin)==null?void 0:Pe.x,(Te=Z.transformOrigin)==null?void 0:Te.y].join(" "),...((Se=Z.hide)==null?void 0:Se.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(QD,{scope:r,placedSide:I,onArrowChange:E,arrowX:$,arrowY:de,shouldHideArrow:ne,children:u.jsx(De.div,{"data-side":I,"data-align":Q,...p,ref:_,style:{...p.style,animation:W?void 0:"none"}})})})});D1.displayName=Sg;var O1="PopperArrow",eO={top:"bottom",right:"left",bottom:"top",left:"right"},A1=w.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,o=JD(O1,n),i=eO[o.placedSide];return u.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:u.jsx(qD,{...s,ref:r,style:{...s.style,display:"block"}})})});A1.displayName=O1;function tO(e){return e!==null}var rO=e=>({name:"transformOrigin",options:e,fn(t){var x,g,v;const{placement:r,rects:n,middlewareData:s}=t,i=((x=s.arrow)==null?void 0:x.centerOffset)!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[c,f]=M1(r),d={start:"0%",center:"50%",end:"100%"}[f],h=(((g=s.arrow)==null?void 0:g.x)??0)+a/2,m=(((v=s.arrow)==null?void 0:v.y)??0)+l/2;let y="",p="";return c==="bottom"?(y=i?d:`${h}px`,p=`${-l}px`):c==="top"?(y=i?d:`${h}px`,p=`${n.floating.height+l}px`):c==="right"?(y=`${-l}px`,p=i?d:`${m}px`):c==="left"&&(y=`${n.floating.width+l}px`,p=i?d:`${m}px`),{data:{x:y,y:p}}}});function M1(e){const[t,r="center"]=e.split("-");return[t,r]}var kg=N1,Cg=j1,Eg=D1,Tg=A1,nO="Portal",rc=w.forwardRef((e,t)=>{var a;const{container:r,...n}=e,[s,o]=w.useState(!1);rr(()=>o(!0),[]);const i=r||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?I_.createPortal(u.jsx(De.div,{...n,ref:t}),i):null});rc.displayName=nO;function sO(e,t){return w.useReducer((r,n)=>t[r][n]??r,e)}var vr=e=>{const{present:t,children:r}=e,n=oO(t),s=typeof r=="function"?r({present:n.isPresent}):w.Children.only(r),o=ze(n.ref,iO(s));return typeof r=="function"||n.isPresent?w.cloneElement(s,{ref:o}):null};vr.displayName="Presence";function oO(e){const[t,r]=w.useState(),n=w.useRef({}),s=w.useRef(e),o=w.useRef("none"),i=e?"mounted":"unmounted",[a,l]=sO(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const c=Hc(n.current);o.current=a==="mounted"?c:"none"},[a]),rr(()=>{const c=n.current,f=s.current;if(f!==e){const h=o.current,m=Hc(c);e?l("MOUNT"):m==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(f&&h!==m?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),rr(()=>{if(t){const c=d=>{const m=Hc(n.current).includes(d.animationName);d.target===t&&m&&xs.flushSync(()=>l("ANIMATION_END"))},f=d=>{d.target===t&&(o.current=Hc(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:w.useCallback(c=>{c&&(n.current=getComputedStyle(c)),r(c)},[])}}function Hc(e){return(e==null?void 0:e.animationName)||"none"}function iO(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var dh="rovingFocusGroup.onEntryFocus",aO={bubbles:!1,cancelable:!0},qd="RovingFocusGroup",[Pp,I1,lO]=Yd(qd),[cO,Xd]=Er(qd,[lO]),[uO,dO]=cO(qd),L1=w.forwardRef((e,t)=>u.jsx(Pp.Provider,{scope:e.__scopeRovingFocusGroup,children:u.jsx(Pp.Slot,{scope:e.__scopeRovingFocusGroup,children:u.jsx(fO,{...e,ref:t})})}));L1.displayName=qd;var fO=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:s=!1,dir:o,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:f=!1,...d}=e,h=w.useRef(null),m=ze(t,h),y=ec(o),[p=null,x]=ps({prop:i,defaultProp:a,onChange:l}),[g,v]=w.useState(!1),_=Pt(c),C=I1(r),E=w.useRef(!1),[T,P]=w.useState(0);return w.useEffect(()=>{const O=h.current;if(O)return O.addEventListener(dh,_),()=>O.removeEventListener(dh,_)},[_]),u.jsx(uO,{scope:r,orientation:n,dir:y,loop:s,currentTabStopId:p,onItemFocus:w.useCallback(O=>x(O),[x]),onItemShiftTab:w.useCallback(()=>v(!0),[]),onFocusableItemAdd:w.useCallback(()=>P(O=>O+1),[]),onFocusableItemRemove:w.useCallback(()=>P(O=>O-1),[]),children:u.jsx(De.div,{tabIndex:g||T===0?-1:0,"data-orientation":n,...d,ref:m,style:{outline:"none",...e.style},onMouseDown:le(e.onMouseDown,()=>{E.current=!0}),onFocus:le(e.onFocus,O=>{const j=!E.current;if(O.target===O.currentTarget&&j&&!g){const L=new CustomEvent(dh,aO);if(O.currentTarget.dispatchEvent(L),!L.defaultPrevented){const q=C().filter(te=>te.focusable),R=q.find(te=>te.active),F=q.find(te=>te.id===p),V=[R,F,...q].filter(Boolean).map(te=>te.ref.current);U1(V,f)}}E.current=!1}),onBlur:le(e.onBlur,()=>v(!1))})})}),F1="RovingFocusGroupItem",z1=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:o,...i}=e,a=On(),l=o||a,c=dO(F1,r),f=c.currentTabStopId===l,d=I1(r),{onFocusableItemAdd:h,onFocusableItemRemove:m}=c;return w.useEffect(()=>{if(n)return h(),()=>m()},[n,h,m]),u.jsx(Pp.ItemSlot,{scope:r,id:l,focusable:n,active:s,children:u.jsx(De.span,{tabIndex:f?0:-1,"data-orientation":c.orientation,...i,ref:t,onMouseDown:le(e.onMouseDown,y=>{n?c.onItemFocus(l):y.preventDefault()}),onFocus:le(e.onFocus,()=>c.onItemFocus(l)),onKeyDown:le(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){c.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const p=mO(y,c.orientation,c.dir);if(p!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let g=d().filter(v=>v.focusable).map(v=>v.ref.current);if(p==="last")g.reverse();else if(p==="prev"||p==="next"){p==="prev"&&g.reverse();const v=g.indexOf(y.currentTarget);g=c.loop?gO(g,v+1):g.slice(v+1)}setTimeout(()=>U1(g))}})})})});z1.displayName=F1;var hO={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function pO(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function mO(e,t,r){const n=pO(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return hO[n]}function U1(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function gO(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var $1=L1,V1=z1,vO=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},oi=new WeakMap,Yc=new WeakMap,Zc={},fh=0,W1=function(e){return e&&(e.host||W1(e.parentNode))},yO=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=W1(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},wO=function(e,t,r,n){var s=yO(t,Array.isArray(e)?e:[e]);Zc[r]||(Zc[r]=new WeakMap);var o=Zc[r],i=[],a=new Set,l=new Set(s),c=function(d){!d||a.has(d)||(a.add(d),c(d.parentNode))};s.forEach(c);var f=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(h){if(a.has(h))f(h);else try{var m=h.getAttribute(n),y=m!==null&&m!=="false",p=(oi.get(h)||0)+1,x=(o.get(h)||0)+1;oi.set(h,p),o.set(h,x),i.push(h),p===1&&y&&Yc.set(h,!0),x===1&&h.setAttribute(r,"true"),y||h.setAttribute(n,"true")}catch(g){console.error("aria-hidden: cannot operate on ",h,g)}})};return f(t),a.clear(),fh++,function(){i.forEach(function(d){var h=oi.get(d)-1,m=o.get(d)-1;oi.set(d,h),o.set(d,m),h||(Yc.has(d)||d.removeAttribute(n),Yc.delete(d)),m||d.removeAttribute(r)}),fh--,fh||(oi=new WeakMap,oi=new WeakMap,Yc=new WeakMap,Zc={})}},Rg=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=vO(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),wO(n,s,r,"aria-hidden")):function(){return null}},En=function(){return En=Object.assign||function(t){for(var r,n=1,s=arguments.length;n"u")return IO;var t=LO(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},zO=Z1(),Mi="data-scroll-locked",UO=function(e,t,r,n){var s=e.left,o=e.top,i=e.right,a=e.gap;return r===void 0&&(r="margin"),` + .`.concat(_O,` { + overflow: hidden `).concat(n,`; + padding-right: `).concat(a,"px ").concat(n,`; + } + body[`).concat(Mi,`] { + overflow: hidden `).concat(n,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&` + padding-left: `.concat(s,`px; + padding-top: `).concat(o,`px; + padding-right: `).concat(i,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(a,"px ").concat(n,`; + `),r==="padding"&&"padding-right: ".concat(a,"px ").concat(n,";")].filter(Boolean).join(""),` + } + + .`).concat(vu,` { + right: `).concat(a,"px ").concat(n,`; + } + + .`).concat(yu,` { + margin-right: `).concat(a,"px ").concat(n,`; + } + + .`).concat(vu," .").concat(vu,` { + right: 0 `).concat(n,`; + } + + .`).concat(yu," .").concat(yu,` { + margin-right: 0 `).concat(n,`; + } + + body[`).concat(Mi,`] { + `).concat(bO,": ").concat(a,`px; + } +`)},W0=function(){var e=parseInt(document.body.getAttribute(Mi)||"0",10);return isFinite(e)?e:0},$O=function(){w.useEffect(function(){return document.body.setAttribute(Mi,(W0()+1).toString()),function(){var e=W0()-1;e<=0?document.body.removeAttribute(Mi):document.body.setAttribute(Mi,e.toString())}},[])},VO=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,s=n===void 0?"margin":n;$O();var o=w.useMemo(function(){return FO(s)},[s]);return w.createElement(zO,{styles:UO(o,!t,s,r?"":"!important")})},jp=!1;if(typeof window<"u")try{var Gc=Object.defineProperty({},"passive",{get:function(){return jp=!0,!0}});window.addEventListener("test",Gc,Gc),window.removeEventListener("test",Gc,Gc)}catch{jp=!1}var ii=jp?{passive:!1}:!1,WO=function(e){return e.tagName==="TEXTAREA"},G1=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!WO(e)&&r[t]==="visible")},BO=function(e){return G1(e,"overflowY")},HO=function(e){return G1(e,"overflowX")},B0=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=K1(e,n);if(s){var o=q1(e,n),i=o[1],a=o[2];if(i>a)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},YO=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},ZO=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},K1=function(e,t){return e==="v"?BO(t):HO(t)},q1=function(e,t){return e==="v"?YO(t):ZO(t)},GO=function(e,t){return e==="h"&&t==="rtl"?-1:1},KO=function(e,t,r,n,s){var o=GO(e,window.getComputedStyle(t).direction),i=o*n,a=r.target,l=t.contains(a),c=!1,f=i>0,d=0,h=0;do{var m=q1(e,a),y=m[0],p=m[1],x=m[2],g=p-x-o*y;(y||g)&&K1(e,a)&&(d+=g,h+=y),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(f&&(Math.abs(d)<1||!s)||!f&&(Math.abs(h)<1||!s))&&(c=!0),c},Kc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},H0=function(e){return[e.deltaX,e.deltaY]},Y0=function(e){return e&&"current"in e?e.current:e},qO=function(e,t){return e[0]===t[0]&&e[1]===t[1]},XO=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},QO=0,ai=[];function JO(e){var t=w.useRef([]),r=w.useRef([0,0]),n=w.useRef(),s=w.useState(QO++)[0],o=w.useState(Z1)[0],i=w.useRef(e);w.useEffect(function(){i.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var p=xO([e.lockRef.current],(e.shards||[]).map(Y0),!0).filter(Boolean);return p.forEach(function(x){return x.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),p.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var a=w.useCallback(function(p,x){if("touches"in p&&p.touches.length===2)return!i.current.allowPinchZoom;var g=Kc(p),v=r.current,_="deltaX"in p?p.deltaX:v[0]-g[0],C="deltaY"in p?p.deltaY:v[1]-g[1],E,T=p.target,P=Math.abs(_)>Math.abs(C)?"h":"v";if("touches"in p&&P==="h"&&T.type==="range")return!1;var O=B0(P,T);if(!O)return!0;if(O?E=P:(E=P==="v"?"h":"v",O=B0(P,T)),!O)return!1;if(!n.current&&"changedTouches"in p&&(_||C)&&(n.current=E),!E)return!0;var j=n.current||E;return KO(j,x,p,j==="h"?_:C,!0)},[]),l=w.useCallback(function(p){var x=p;if(!(!ai.length||ai[ai.length-1]!==o)){var g="deltaY"in x?H0(x):Kc(x),v=t.current.filter(function(E){return E.name===x.type&&(E.target===x.target||x.target===E.shadowParent)&&qO(E.delta,g)})[0];if(v&&v.should){x.cancelable&&x.preventDefault();return}if(!v){var _=(i.current.shards||[]).map(Y0).filter(Boolean).filter(function(E){return E.contains(x.target)}),C=_.length>0?a(x,_[0]):!i.current.noIsolation;C&&x.cancelable&&x.preventDefault()}}},[]),c=w.useCallback(function(p,x,g,v){var _={name:p,delta:x,target:g,should:v,shadowParent:eA(g)};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(C){return C!==_})},1)},[]),f=w.useCallback(function(p){r.current=Kc(p),n.current=void 0},[]),d=w.useCallback(function(p){c(p.type,H0(p),p.target,a(p,e.lockRef.current))},[]),h=w.useCallback(function(p){c(p.type,Kc(p),p.target,a(p,e.lockRef.current))},[]);w.useEffect(function(){return ai.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",l,ii),document.addEventListener("touchmove",l,ii),document.addEventListener("touchstart",f,ii),function(){ai=ai.filter(function(p){return p!==o}),document.removeEventListener("wheel",l,ii),document.removeEventListener("touchmove",l,ii),document.removeEventListener("touchstart",f,ii)}},[]);var m=e.removeScrollBar,y=e.inert;return w.createElement(w.Fragment,null,y?w.createElement(o,{styles:XO(s)}):null,m?w.createElement(VO,{gapMode:e.gapMode}):null)}function eA(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const tA=NO(Y1,JO);var Jd=w.forwardRef(function(e,t){return w.createElement(Qd,En({},e,{ref:t,sideCar:tA}))});Jd.classNames=Qd.classNames;var Dp=["Enter"," "],rA=["ArrowDown","PageUp","Home"],X1=["ArrowUp","PageDown","End"],nA=[...rA,...X1],sA={ltr:[...Dp,"ArrowRight"],rtl:[...Dp,"ArrowLeft"]},oA={ltr:["ArrowLeft"],rtl:["ArrowRight"]},nc="Menu",[El,iA,aA]=Yd(nc),[Go,Q1]=Er(nc,[aA,ua,Xd]),ef=ua(),J1=Xd(),[lA,Ko]=Go(nc),[cA,sc]=Go(nc),eb=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:s,onOpenChange:o,modal:i=!0}=e,a=ef(t),[l,c]=w.useState(null),f=w.useRef(!1),d=Pt(o),h=ec(s);return w.useEffect(()=>{const m=()=>{f.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>f.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),u.jsx(kg,{...a,children:u.jsx(lA,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:c,children:u.jsx(cA,{scope:t,onClose:w.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:f,dir:h,modal:i,children:n})})})};eb.displayName=nc;var uA="MenuAnchor",Ng=w.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,s=ef(r);return u.jsx(Cg,{...s,...n,ref:t})});Ng.displayName=uA;var Pg="MenuPortal",[dA,tb]=Go(Pg,{forceMount:void 0}),rb=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:s}=e,o=Ko(Pg,t);return u.jsx(dA,{scope:t,forceMount:r,children:u.jsx(vr,{present:r||o.open,children:u.jsx(rc,{asChild:!0,container:s,children:n})})})};rb.displayName=Pg;var Kr="MenuContent",[fA,jg]=Go(Kr),nb=w.forwardRef((e,t)=>{const r=tb(Kr,e.__scopeMenu),{forceMount:n=r.forceMount,...s}=e,o=Ko(Kr,e.__scopeMenu),i=sc(Kr,e.__scopeMenu);return u.jsx(El.Provider,{scope:e.__scopeMenu,children:u.jsx(vr,{present:n||o.open,children:u.jsx(El.Slot,{scope:e.__scopeMenu,children:i.modal?u.jsx(hA,{...s,ref:t}):u.jsx(pA,{...s,ref:t})})})})}),hA=w.forwardRef((e,t)=>{const r=Ko(Kr,e.__scopeMenu),n=w.useRef(null),s=ze(t,n);return w.useEffect(()=>{const o=n.current;if(o)return Rg(o)},[]),u.jsx(Dg,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:le(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),pA=w.forwardRef((e,t)=>{const r=Ko(Kr,e.__scopeMenu);return u.jsx(Dg,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),Dg=w.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:s,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:h,onDismiss:m,disableOutsideScroll:y,...p}=e,x=Ko(Kr,r),g=sc(Kr,r),v=ef(r),_=J1(r),C=iA(r),[E,T]=w.useState(null),P=w.useRef(null),O=ze(t,P,x.onContentChange),j=w.useRef(0),L=w.useRef(""),q=w.useRef(0),R=w.useRef(null),F=w.useRef("right"),b=w.useRef(0),V=y?Jd:w.Fragment,te=y?{as:hs,allowPinchZoom:!0}:void 0,W=I=>{var fe,ge;const Q=L.current+I,z=C().filter(be=>!be.disabled),$=document.activeElement,de=(fe=z.find(be=>be.ref.current===$))==null?void 0:fe.textValue,ne=z.map(be=>be.textValue),se=EA(ne,Q,de),Ee=(ge=z.find(be=>be.textValue===se))==null?void 0:ge.ref.current;(function be(Pe){L.current=Pe,window.clearTimeout(j.current),Pe!==""&&(j.current=window.setTimeout(()=>be(""),1e3))})(Q),Ee&&setTimeout(()=>Ee.focus())};w.useEffect(()=>()=>window.clearTimeout(j.current),[]),pg();const Z=w.useCallback(I=>{var z,$;return F.current===((z=R.current)==null?void 0:z.side)&&RA(I,($=R.current)==null?void 0:$.area)},[]);return u.jsx(fA,{scope:r,searchRef:L,onItemEnter:w.useCallback(I=>{Z(I)&&I.preventDefault()},[Z]),onItemLeave:w.useCallback(I=>{var Q;Z(I)||((Q=P.current)==null||Q.focus(),T(null))},[Z]),onTriggerLeave:w.useCallback(I=>{Z(I)&&I.preventDefault()},[Z]),pointerGraceTimerRef:q,onPointerGraceIntentChange:w.useCallback(I=>{R.current=I},[]),children:u.jsx(V,{...te,children:u.jsx(Zd,{asChild:!0,trapped:s,onMountAutoFocus:le(o,I=>{var Q;I.preventDefault(),(Q=P.current)==null||Q.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:u.jsx(aa,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:c,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:h,onDismiss:m,children:u.jsx($1,{asChild:!0,..._,dir:g.dir,orientation:"vertical",loop:n,currentTabStopId:E,onCurrentTabStopIdChange:T,onEntryFocus:le(l,I=>{g.isUsingKeyboardRef.current||I.preventDefault()}),preventScrollOnEntryFocus:!0,children:u.jsx(Eg,{role:"menu","aria-orientation":"vertical","data-state":wb(x.open),"data-radix-menu-content":"",dir:g.dir,...v,...p,ref:O,style:{outline:"none",...p.style},onKeyDown:le(p.onKeyDown,I=>{const z=I.target.closest("[data-radix-menu-content]")===I.currentTarget,$=I.ctrlKey||I.altKey||I.metaKey,de=I.key.length===1;z&&(I.key==="Tab"&&I.preventDefault(),!$&&de&&W(I.key));const ne=P.current;if(I.target!==ne||!nA.includes(I.key))return;I.preventDefault();const Ee=C().filter(fe=>!fe.disabled).map(fe=>fe.ref.current);X1.includes(I.key)&&Ee.reverse(),kA(Ee)}),onBlur:le(e.onBlur,I=>{I.currentTarget.contains(I.target)||(window.clearTimeout(j.current),L.current="")}),onPointerMove:le(e.onPointerMove,Tl(I=>{const Q=I.target,z=b.current!==I.clientX;if(I.currentTarget.contains(Q)&&z){const $=I.clientX>b.current?"right":"left";F.current=$,b.current=I.clientX}}))})})})})})})});nb.displayName=Kr;var mA="MenuGroup",Og=w.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return u.jsx(De.div,{role:"group",...n,ref:t})});Og.displayName=mA;var gA="MenuLabel",sb=w.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return u.jsx(De.div,{...n,ref:t})});sb.displayName=gA;var rd="MenuItem",Z0="menu.itemSelect",tf=w.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...s}=e,o=w.useRef(null),i=sc(rd,e.__scopeMenu),a=jg(rd,e.__scopeMenu),l=ze(t,o),c=w.useRef(!1),f=()=>{const d=o.current;if(!r&&d){const h=new CustomEvent(Z0,{bubbles:!0,cancelable:!0});d.addEventListener(Z0,m=>n==null?void 0:n(m),{once:!0}),hg(d,h),h.defaultPrevented?c.current=!1:i.onClose()}};return u.jsx(ob,{...s,ref:l,disabled:r,onClick:le(e.onClick,f),onPointerDown:d=>{var h;(h=e.onPointerDown)==null||h.call(e,d),c.current=!0},onPointerUp:le(e.onPointerUp,d=>{var h;c.current||(h=d.currentTarget)==null||h.click()}),onKeyDown:le(e.onKeyDown,d=>{const h=a.searchRef.current!=="";r||h&&d.key===" "||Dp.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});tf.displayName=rd;var ob=w.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:s,...o}=e,i=jg(rd,r),a=J1(r),l=w.useRef(null),c=ze(t,l),[f,d]=w.useState(!1),[h,m]=w.useState("");return w.useEffect(()=>{const y=l.current;y&&m((y.textContent??"").trim())},[o.children]),u.jsx(El.ItemSlot,{scope:r,disabled:n,textValue:s??h,children:u.jsx(V1,{asChild:!0,...a,focusable:!n,children:u.jsx(De.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...o,ref:c,onPointerMove:le(e.onPointerMove,Tl(y=>{n?i.onItemLeave(y):(i.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:le(e.onPointerLeave,Tl(y=>i.onItemLeave(y))),onFocus:le(e.onFocus,()=>d(!0)),onBlur:le(e.onBlur,()=>d(!1))})})})}),vA="MenuCheckboxItem",ib=w.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...s}=e;return u.jsx(db,{scope:e.__scopeMenu,checked:r,children:u.jsx(tf,{role:"menuitemcheckbox","aria-checked":nd(r)?"mixed":r,...s,ref:t,"data-state":Mg(r),onSelect:le(s.onSelect,()=>n==null?void 0:n(nd(r)?!0:!r),{checkForDefaultPrevented:!1})})})});ib.displayName=vA;var ab="MenuRadioGroup",[yA,wA]=Go(ab,{value:void 0,onValueChange:()=>{}}),lb=w.forwardRef((e,t)=>{const{value:r,onValueChange:n,...s}=e,o=Pt(n);return u.jsx(yA,{scope:e.__scopeMenu,value:r,onValueChange:o,children:u.jsx(Og,{...s,ref:t})})});lb.displayName=ab;var cb="MenuRadioItem",ub=w.forwardRef((e,t)=>{const{value:r,...n}=e,s=wA(cb,e.__scopeMenu),o=r===s.value;return u.jsx(db,{scope:e.__scopeMenu,checked:o,children:u.jsx(tf,{role:"menuitemradio","aria-checked":o,...n,ref:t,"data-state":Mg(o),onSelect:le(n.onSelect,()=>{var i;return(i=s.onValueChange)==null?void 0:i.call(s,r)},{checkForDefaultPrevented:!1})})})});ub.displayName=cb;var Ag="MenuItemIndicator",[db,xA]=Go(Ag,{checked:!1}),fb=w.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...s}=e,o=xA(Ag,r);return u.jsx(vr,{present:n||nd(o.checked)||o.checked===!0,children:u.jsx(De.span,{...s,ref:t,"data-state":Mg(o.checked)})})});fb.displayName=Ag;var _A="MenuSeparator",hb=w.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return u.jsx(De.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});hb.displayName=_A;var bA="MenuArrow",pb=w.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,s=ef(r);return u.jsx(Tg,{...s,...n,ref:t})});pb.displayName=bA;var SA="MenuSub",[hU,mb]=Go(SA),Ua="MenuSubTrigger",gb=w.forwardRef((e,t)=>{const r=Ko(Ua,e.__scopeMenu),n=sc(Ua,e.__scopeMenu),s=mb(Ua,e.__scopeMenu),o=jg(Ua,e.__scopeMenu),i=w.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:l}=o,c={__scopeMenu:e.__scopeMenu},f=w.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return w.useEffect(()=>f,[f]),w.useEffect(()=>{const d=a.current;return()=>{window.clearTimeout(d),l(null)}},[a,l]),u.jsx(Ng,{asChild:!0,...c,children:u.jsx(ob,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":s.contentId,"data-state":wb(r.open),...e,ref:Hd(t,s.onTriggerChange),onClick:d=>{var h;(h=e.onClick)==null||h.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:le(e.onPointerMove,Tl(d=>{o.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!r.open&&!i.current&&(o.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{r.onOpenChange(!0),f()},100))})),onPointerLeave:le(e.onPointerLeave,Tl(d=>{var m,y;f();const h=(m=r.content)==null?void 0:m.getBoundingClientRect();if(h){const p=(y=r.content)==null?void 0:y.dataset.side,x=p==="right",g=x?-5:5,v=h[x?"left":"right"],_=h[x?"right":"left"];o.onPointerGraceIntentChange({area:[{x:d.clientX+g,y:d.clientY},{x:v,y:h.top},{x:_,y:h.top},{x:_,y:h.bottom},{x:v,y:h.bottom}],side:p}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(d),d.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:le(e.onKeyDown,d=>{var m;const h=o.searchRef.current!=="";e.disabled||h&&d.key===" "||sA[n.dir].includes(d.key)&&(r.onOpenChange(!0),(m=r.content)==null||m.focus(),d.preventDefault())})})})});gb.displayName=Ua;var vb="MenuSubContent",yb=w.forwardRef((e,t)=>{const r=tb(Kr,e.__scopeMenu),{forceMount:n=r.forceMount,...s}=e,o=Ko(Kr,e.__scopeMenu),i=sc(Kr,e.__scopeMenu),a=mb(vb,e.__scopeMenu),l=w.useRef(null),c=ze(t,l);return u.jsx(El.Provider,{scope:e.__scopeMenu,children:u.jsx(vr,{present:n||o.open,children:u.jsx(El.Slot,{scope:e.__scopeMenu,children:u.jsx(Dg,{id:a.contentId,"aria-labelledby":a.triggerId,...s,ref:c,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var d;i.isUsingKeyboardRef.current&&((d=l.current)==null||d.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:le(e.onFocusOutside,f=>{f.target!==a.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:le(e.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:le(e.onKeyDown,f=>{var m;const d=f.currentTarget.contains(f.target),h=oA[i.dir].includes(f.key);d&&h&&(o.onOpenChange(!1),(m=a.trigger)==null||m.focus(),f.preventDefault())})})})})})});yb.displayName=vb;function wb(e){return e?"open":"closed"}function nd(e){return e==="indeterminate"}function Mg(e){return nd(e)?"indeterminate":e?"checked":"unchecked"}function kA(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function CA(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function EA(e,t,r){const s=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,o=r?e.indexOf(r):-1;let i=CA(e,Math.max(o,0));s.length===1&&(i=i.filter(c=>c!==r));const l=i.find(c=>c.toLowerCase().startsWith(s.toLowerCase()));return l!==r?l:void 0}function TA(e,t){const{x:r,y:n}=e;let s=!1;for(let o=0,i=t.length-1;on!=f>n&&r<(c-a)*(n-l)/(f-l)+a&&(s=!s)}return s}function RA(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return TA(r,t)}function Tl(e){return t=>t.pointerType==="mouse"?e(t):void 0}var NA=eb,PA=Ng,jA=rb,DA=nb,OA=Og,AA=sb,MA=tf,IA=ib,LA=lb,FA=ub,zA=fb,UA=hb,$A=pb,VA=gb,WA=yb,Ig="DropdownMenu",[BA,pU]=Er(Ig,[Q1]),yr=Q1(),[HA,xb]=BA(Ig),_b=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:s,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,l=yr(t),c=w.useRef(null),[f=!1,d]=ps({prop:s,defaultProp:o,onChange:i});return u.jsx(HA,{scope:t,triggerId:On(),triggerRef:c,contentId:On(),open:f,onOpenChange:d,onOpenToggle:w.useCallback(()=>d(h=>!h),[d]),modal:a,children:u.jsx(NA,{...l,open:f,onOpenChange:d,dir:n,modal:a,children:r})})};_b.displayName=Ig;var bb="DropdownMenuTrigger",Sb=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...s}=e,o=xb(bb,r),i=yr(r);return u.jsx(PA,{asChild:!0,...i,children:u.jsx(De.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...s,ref:Hd(t,o.triggerRef),onPointerDown:le(e.onPointerDown,a=>{!n&&a.button===0&&a.ctrlKey===!1&&(o.onOpenToggle(),o.open||a.preventDefault())}),onKeyDown:le(e.onKeyDown,a=>{n||(["Enter"," "].includes(a.key)&&o.onOpenToggle(),a.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});Sb.displayName=bb;var YA="DropdownMenuPortal",kb=e=>{const{__scopeDropdownMenu:t,...r}=e,n=yr(t);return u.jsx(jA,{...n,...r})};kb.displayName=YA;var Cb="DropdownMenuContent",Eb=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=xb(Cb,r),o=yr(r),i=w.useRef(!1);return u.jsx(DA,{id:s.contentId,"aria-labelledby":s.triggerId,...o,...n,ref:t,onCloseAutoFocus:le(e.onCloseAutoFocus,a=>{var l;i.current||(l=s.triggerRef.current)==null||l.focus(),i.current=!1,a.preventDefault()}),onInteractOutside:le(e.onInteractOutside,a=>{const l=a.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,f=l.button===2||c;(!s.modal||f)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Eb.displayName=Cb;var ZA="DropdownMenuGroup",GA=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=yr(r);return u.jsx(OA,{...s,...n,ref:t})});GA.displayName=ZA;var KA="DropdownMenuLabel",Tb=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=yr(r);return u.jsx(AA,{...s,...n,ref:t})});Tb.displayName=KA;var qA="DropdownMenuItem",Rb=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=yr(r);return u.jsx(MA,{...s,...n,ref:t})});Rb.displayName=qA;var XA="DropdownMenuCheckboxItem",Nb=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=yr(r);return u.jsx(IA,{...s,...n,ref:t})});Nb.displayName=XA;var QA="DropdownMenuRadioGroup",JA=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=yr(r);return u.jsx(LA,{...s,...n,ref:t})});JA.displayName=QA;var eM="DropdownMenuRadioItem",Pb=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=yr(r);return u.jsx(FA,{...s,...n,ref:t})});Pb.displayName=eM;var tM="DropdownMenuItemIndicator",jb=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=yr(r);return u.jsx(zA,{...s,...n,ref:t})});jb.displayName=tM;var rM="DropdownMenuSeparator",Db=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=yr(r);return u.jsx(UA,{...s,...n,ref:t})});Db.displayName=rM;var nM="DropdownMenuArrow",sM=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=yr(r);return u.jsx($A,{...s,...n,ref:t})});sM.displayName=nM;var oM="DropdownMenuSubTrigger",Ob=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=yr(r);return u.jsx(VA,{...s,...n,ref:t})});Ob.displayName=oM;var iM="DropdownMenuSubContent",Ab=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=yr(r);return u.jsx(WA,{...s,...n,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Ab.displayName=iM;var aM=_b,lM=Sb,cM=kb,Mb=Eb,Ib=Tb,Lb=Rb,Fb=Nb,zb=Pb,Ub=jb,$b=Db,Vb=Ob,Wb=Ab;const uM=aM,dM=lM,fM=w.forwardRef(({className:e,inset:t,children:r,...n},s)=>u.jsxs(Vb,{ref:s,className:we("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...n,children:[r,u.jsx(zP,{className:"ml-auto h-4 w-4"})]}));fM.displayName=Vb.displayName;const hM=w.forwardRef(({className:e,...t},r)=>u.jsx(Wb,{ref:r,className:we("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));hM.displayName=Wb.displayName;const Bb=w.forwardRef(({className:e,sideOffset:t=4,...r},n)=>u.jsx(cM,{children:u.jsx(Mb,{ref:n,sideOffset:t,className:we("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));Bb.displayName=Mb.displayName;const Op=w.forwardRef(({className:e,inset:t,...r},n)=>u.jsx(Lb,{ref:n,className:we("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...r}));Op.displayName=Lb.displayName;const pM=w.forwardRef(({className:e,children:t,checked:r,...n},s)=>u.jsxs(Fb,{ref:s,className:we("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...n,children:[u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(Ub,{children:u.jsx(t1,{className:"h-4 w-4"})})}),t]}));pM.displayName=Fb.displayName;const mM=w.forwardRef(({className:e,children:t,...r},n)=>u.jsxs(zb,{ref:n,className:we("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(Ub,{children:u.jsx(o1,{className:"h-2 w-2 fill-current"})})}),t]}));mM.displayName=zb.displayName;const Hb=w.forwardRef(({className:e,inset:t,...r},n)=>u.jsx(Ib,{ref:n,className:we("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));Hb.displayName=Ib.displayName;const Yb=w.forwardRef(({className:e,...t},r)=>u.jsx($b,{ref:r,className:we("-mx-1 my-1 h-px bg-muted",e),...t}));Yb.displayName=$b.displayName;var Lg="Dialog",[Zb,Gb]=Er(Lg),[gM,wn]=Zb(Lg),Kb=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:s,onOpenChange:o,modal:i=!0}=e,a=w.useRef(null),l=w.useRef(null),[c=!1,f]=ps({prop:n,defaultProp:s,onChange:o});return u.jsx(gM,{scope:t,triggerRef:a,contentRef:l,contentId:On(),titleId:On(),descriptionId:On(),open:c,onOpenChange:f,onOpenToggle:w.useCallback(()=>f(d=>!d),[f]),modal:i,children:r})};Kb.displayName=Lg;var qb="DialogTrigger",Xb=w.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=wn(qb,r),o=ze(t,s.triggerRef);return u.jsx(De.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Ug(s.open),...n,ref:o,onClick:le(e.onClick,s.onOpenToggle)})});Xb.displayName=qb;var Fg="DialogPortal",[vM,Qb]=Zb(Fg,{forceMount:void 0}),Jb=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:s}=e,o=wn(Fg,t);return u.jsx(vM,{scope:t,forceMount:r,children:w.Children.map(n,i=>u.jsx(vr,{present:r||o.open,children:u.jsx(rc,{asChild:!0,container:s,children:i})}))})};Jb.displayName=Fg;var sd="DialogOverlay",eS=w.forwardRef((e,t)=>{const r=Qb(sd,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,o=wn(sd,e.__scopeDialog);return o.modal?u.jsx(vr,{present:n||o.open,children:u.jsx(yM,{...s,ref:t})}):null});eS.displayName=sd;var yM=w.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=wn(sd,r);return u.jsx(Jd,{as:hs,allowPinchZoom:!0,shards:[s.contentRef],children:u.jsx(De.div,{"data-state":Ug(s.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),Vo="DialogContent",tS=w.forwardRef((e,t)=>{const r=Qb(Vo,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,o=wn(Vo,e.__scopeDialog);return u.jsx(vr,{present:n||o.open,children:o.modal?u.jsx(wM,{...s,ref:t}):u.jsx(xM,{...s,ref:t})})});tS.displayName=Vo;var wM=w.forwardRef((e,t)=>{const r=wn(Vo,e.__scopeDialog),n=w.useRef(null),s=ze(t,r.contentRef,n);return w.useEffect(()=>{const o=n.current;if(o)return Rg(o)},[]),u.jsx(rS,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:le(e.onCloseAutoFocus,o=>{var i;o.preventDefault(),(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:le(e.onPointerDownOutside,o=>{const i=o.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&o.preventDefault()}),onFocusOutside:le(e.onFocusOutside,o=>o.preventDefault())})}),xM=w.forwardRef((e,t)=>{const r=wn(Vo,e.__scopeDialog),n=w.useRef(!1),s=w.useRef(!1);return u.jsx(rS,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,o),o.defaultPrevented||(n.current||(a=r.triggerRef.current)==null||a.focus(),o.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:o=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const i=o.target;((c=r.triggerRef.current)==null?void 0:c.contains(i))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),rS=w.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:o,...i}=e,a=wn(Vo,r),l=w.useRef(null),c=ze(t,l);return pg(),u.jsxs(u.Fragment,{children:[u.jsx(Zd,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:o,children:u.jsx(aa,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Ug(a.open),...i,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx(bM,{titleId:a.titleId}),u.jsx(kM,{contentRef:l,descriptionId:a.descriptionId})]})]})}),zg="DialogTitle",nS=w.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=wn(zg,r);return u.jsx(De.h2,{id:s.titleId,...n,ref:t})});nS.displayName=zg;var sS="DialogDescription",oS=w.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=wn(sS,r);return u.jsx(De.p,{id:s.descriptionId,...n,ref:t})});oS.displayName=sS;var iS="DialogClose",aS=w.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=wn(iS,r);return u.jsx(De.button,{type:"button",...n,ref:t,onClick:le(e.onClick,()=>s.onOpenChange(!1))})});aS.displayName=iS;function Ug(e){return e?"open":"closed"}var lS="DialogTitleWarning",[_M,cS]=Nj(lS,{contentName:Vo,titleName:zg,docsSlug:"dialog"}),bM=({titleId:e})=>{const t=cS(lS),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. + +If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. + +For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return w.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},SM="DialogDescriptionWarning",kM=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${cS(SM).contentName}}.`;return w.useEffect(()=>{var o;const s=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},$g=Kb,Vg=Xb,Wg=Jb,oc=eS,ic=tS,ac=nS,lc=oS,rf=aS;const uS=$g,dS=Vg,CM=Wg,fS=w.forwardRef(({className:e,...t},r)=>u.jsx(oc,{className:we("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));fS.displayName=oc.displayName;const EM=Jl("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Bg=w.forwardRef(({side:e="right",className:t,children:r,...n},s)=>u.jsxs(CM,{children:[u.jsx(fS,{}),u.jsxs(ic,{ref:s,className:we(EM({side:e}),t),...n,children:[r,u.jsxs(rf,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[u.jsx(cg,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Bg.displayName=ic.displayName;const hS=({className:e,...t})=>u.jsx("div",{className:we("flex flex-col space-y-2 text-center sm:text-left",e),...t});hS.displayName="SheetHeader";const pS=w.forwardRef(({className:e,...t},r)=>u.jsx(ac,{ref:r,className:we("text-lg font-semibold text-foreground",e),...t}));pS.displayName=ac.displayName;const TM=w.forwardRef(({className:e,...t},r)=>u.jsx(lc,{ref:r,className:we("text-sm text-muted-foreground",e),...t}));TM.displayName=lc.displayName;class Ir extends Error{constructor(t){var r,n,s,o;super("ClientResponseError"),this.url="",this.status=0,this.response={},this.isAbort=!1,this.originalError=null,Object.setPrototypeOf(this,Ir.prototype),t!==null&&typeof t=="object"&&(this.url=typeof t.url=="string"?t.url:"",this.status=typeof t.status=="number"?t.status:0,this.isAbort=!!t.isAbort,this.originalError=t.originalError,t.response!==null&&typeof t.response=="object"?this.response=t.response:t.data!==null&&typeof t.data=="object"?this.response=t.data:this.response={}),this.originalError||t instanceof Ir||(this.originalError=t),typeof DOMException<"u"&&t instanceof DOMException&&(this.isAbort=!0),this.name="ClientResponseError "+this.status,this.message=(r=this.response)==null?void 0:r.message,this.message||(this.isAbort?this.message="The request was autocancelled. You can find more info in https://github.com/pocketbase/js-sdk#auto-cancellation.":(o=(s=(n=this.originalError)==null?void 0:n.cause)==null?void 0:s.message)!=null&&o.includes("ECONNREFUSED ::1")?this.message="Failed to connect to the PocketBase server. Try changing the SDK URL from localhost to 127.0.0.1 (https://github.com/pocketbase/js-sdk/issues/21).":this.message="Something went wrong while processing your request.")}get data(){return this.response}toJSON(){return{...this}}}const qc=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function RM(e,t){const r={};if(typeof e!="string")return r;const n=Object.assign({},{}).decode||NM;let s=0;for(;s0&&(!r.exp||r.exp-t>Date.now()/1e3))}mS=typeof atob!="function"||jM?e=>{let t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,n,s=0,o=0,i="";n=t.charAt(o++);~n&&(r=s%4?64*r+n:n,s++%4)?i+=String.fromCharCode(255&r>>(-2*s&6)):0)n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(n);return i}:atob;const K0="pb_auth";class DM{constructor(){this.baseToken="",this.baseModel=null,this._onChangeCallbacks=[]}get token(){return this.baseToken}get model(){return this.baseModel}get isValid(){return!gS(this.token)}get isAdmin(){return Ii(this.token).type==="admin"}get isAuthRecord(){return Ii(this.token).type==="authRecord"}save(t,r){this.baseToken=t||"",this.baseModel=r||null,this.triggerChange()}clear(){this.baseToken="",this.baseModel=null,this.triggerChange()}loadFromCookie(t,r=K0){const n=RM(t||"")[r]||"";let s={};try{s=JSON.parse(n),(typeof s===null||typeof s!="object"||Array.isArray(s))&&(s={})}catch{}this.save(s.token||"",s.model||null)}exportToCookie(t,r=K0){var l,c;const n={secure:!0,sameSite:!0,httpOnly:!0,path:"/"},s=Ii(this.token);n.expires=s!=null&&s.exp?new Date(1e3*s.exp):new Date("1970-01-01"),t=Object.assign({},n,t);const o={token:this.token,model:this.model?JSON.parse(JSON.stringify(this.model)):null};let i=G0(r,JSON.stringify(o),t);const a=typeof Blob<"u"?new Blob([i]).size:i.length;if(o.model&&a>4096){o.model={id:(l=o==null?void 0:o.model)==null?void 0:l.id,email:(c=o==null?void 0:o.model)==null?void 0:c.email};const f=["collectionId","username","verified"];for(const d in this.model)f.includes(d)&&(o.model[d]=this.model[d]);i=G0(r,JSON.stringify(o),t)}return i}onChange(t,r=!1){return this._onChangeCallbacks.push(t),r&&t(this.token,this.model),()=>{for(let n=this._onChangeCallbacks.length-1;n>=0;n--)if(this._onChangeCallbacks[n]==t)return delete this._onChangeCallbacks[n],void this._onChangeCallbacks.splice(n,1)}}triggerChange(){for(const t of this._onChangeCallbacks)t&&t(this.token,this.model)}}class OM extends DM{constructor(t="pocketbase_auth"){super(),this.storageFallback={},this.storageKey=t,this._bindStorageEvent()}get token(){return(this._storageGet(this.storageKey)||{}).token||""}get model(){return(this._storageGet(this.storageKey)||{}).model||null}save(t,r){this._storageSet(this.storageKey,{token:t,model:r}),super.save(t,r)}clear(){this._storageRemove(this.storageKey),super.clear()}_storageGet(t){if(typeof window<"u"&&(window!=null&&window.localStorage)){const r=window.localStorage.getItem(t)||"";try{return JSON.parse(r)}catch{return r}}return this.storageFallback[t]}_storageSet(t,r){if(typeof window<"u"&&(window!=null&&window.localStorage)){let n=r;typeof r!="string"&&(n=JSON.stringify(r)),window.localStorage.setItem(t,n)}else this.storageFallback[t]=r}_storageRemove(t){var r;typeof window<"u"&&(window!=null&&window.localStorage)&&((r=window.localStorage)==null||r.removeItem(t)),delete this.storageFallback[t]}_bindStorageEvent(){typeof window<"u"&&(window!=null&&window.localStorage)&&window.addEventListener&&window.addEventListener("storage",t=>{if(t.key!=this.storageKey)return;const r=this._storageGet(this.storageKey)||{};super.save(r.token||"",r.model||null)})}}class qo{constructor(t){this.client=t}}class AM extends qo{async getAll(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/settings",t)}async update(t,r){return r=Object.assign({method:"PATCH",body:t},r),this.client.send("/api/settings",r)}async testS3(t="storage",r){return r=Object.assign({method:"POST",body:{filesystem:t}},r),this.client.send("/api/settings/test/s3",r).then(()=>!0)}async testEmail(t,r,n){return n=Object.assign({method:"POST",body:{email:t,template:r}},n),this.client.send("/api/settings/test/email",n).then(()=>!0)}async generateAppleClientSecret(t,r,n,s,o,i){return i=Object.assign({method:"POST",body:{clientId:t,teamId:r,keyId:n,privateKey:s,duration:o}},i),this.client.send("/api/settings/apple/generate-client-secret",i)}}class Hg extends qo{decode(t){return t}async getFullList(t,r){if(typeof t=="number")return this._getFullList(t,r);let n=500;return(r=Object.assign({},t,r)).batch&&(n=r.batch,delete r.batch),this._getFullList(n,r)}async getList(t=1,r=30,n){return(n=Object.assign({method:"GET"},n)).query=Object.assign({page:t,perPage:r},n.query),this.client.send(this.baseCrudPath,n).then(s=>{var o;return s.items=((o=s.items)==null?void 0:o.map(i=>this.decode(i)))||[],s})}async getFirstListItem(t,r){return(r=Object.assign({requestKey:"one_by_filter_"+this.baseCrudPath+"_"+t},r)).query=Object.assign({filter:t,skipTotal:1},r.query),this.getList(1,1,r).then(n=>{var s;if(!((s=n==null?void 0:n.items)!=null&&s.length))throw new Ir({status:404,response:{code:404,message:"The requested resource wasn't found.",data:{}}});return n.items[0]})}async getOne(t,r){if(!t)throw new Ir({url:this.client.buildUrl(this.baseCrudPath+"/"),status:404,response:{code:404,message:"Missing required record id.",data:{}}});return r=Object.assign({method:"GET"},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),r).then(n=>this.decode(n))}async create(t,r){return r=Object.assign({method:"POST",body:t},r),this.client.send(this.baseCrudPath,r).then(n=>this.decode(n))}async update(t,r,n){return n=Object.assign({method:"PATCH",body:r},n),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),n).then(s=>this.decode(s))}async delete(t,r){return r=Object.assign({method:"DELETE"},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),r).then(()=>!0)}_getFullList(t=500,r){(r=r||{}).query=Object.assign({skipTotal:1},r.query);let n=[],s=async o=>this.getList(o,t||500,r).then(i=>{const a=i.items;return n=n.concat(a),a.length==i.perPage?s(o+1):n});return s(1)}}function Rr(e,t,r,n){const s=n!==void 0;return s||r!==void 0?s?(console.warn(e),t.body=Object.assign({},t.body,r),t.query=Object.assign({},t.query,n),t):Object.assign(t,r):t}function gh(e){var t;(t=e._resetAutoRefresh)==null||t.call(e)}class MM extends Hg{get baseCrudPath(){return"/api/admins"}async update(t,r,n){return super.update(t,r,n).then(s=>{var o,i;return((o=this.client.authStore.model)==null?void 0:o.id)===s.id&&((i=this.client.authStore.model)==null?void 0:i.collectionId)===void 0&&this.client.authStore.save(this.client.authStore.token,s),s})}async delete(t,r){return super.delete(t,r).then(n=>{var s,o;return n&&((s=this.client.authStore.model)==null?void 0:s.id)===t&&((o=this.client.authStore.model)==null?void 0:o.collectionId)===void 0&&this.client.authStore.clear(),n})}authResponse(t){const r=this.decode((t==null?void 0:t.admin)||{});return t!=null&&t.token&&(t!=null&&t.admin)&&this.client.authStore.save(t.token,r),Object.assign({},t,{token:(t==null?void 0:t.token)||"",admin:r})}async authWithPassword(t,r,n,s){let o={method:"POST",body:{identity:t,password:r}};o=Rr("This form of authWithPassword(email, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(email, pass, options?).",o,n,s);const i=o.autoRefreshThreshold;delete o.autoRefreshThreshold,o.autoRefresh||gh(this.client);let a=await this.client.send(this.baseCrudPath+"/auth-with-password",o);return a=this.authResponse(a),i&&function(c,f,d,h){gh(c);const m=c.beforeSend,y=c.authStore.model,p=c.authStore.onChange((x,g)=>{(!x||(g==null?void 0:g.id)!=(y==null?void 0:y.id)||(g!=null&&g.collectionId||y!=null&&y.collectionId)&&(g==null?void 0:g.collectionId)!=(y==null?void 0:y.collectionId))&&gh(c)});c._resetAutoRefresh=function(){p(),c.beforeSend=m,delete c._resetAutoRefresh},c.beforeSend=async(x,g)=>{var E;const v=c.authStore.token;if((E=g.query)!=null&&E.autoRefresh)return m?m(x,g):{url:x,sendOptions:g};let _=c.authStore.isValid;if(_&&gS(c.authStore.token,f))try{await d()}catch{_=!1}_||await h();const C=g.headers||{};for(let T in C)if(T.toLowerCase()=="authorization"&&v==C[T]&&c.authStore.token){C[T]=c.authStore.token;break}return g.headers=C,m?m(x,g):{url:x,sendOptions:g}}}(this.client,i,()=>this.authRefresh({autoRefresh:!0}),()=>this.authWithPassword(t,r,Object.assign({autoRefresh:!0},o))),a}async authRefresh(t,r){let n={method:"POST"};return n=Rr("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",n,t,r),this.client.send(this.baseCrudPath+"/auth-refresh",n).then(this.authResponse.bind(this))}async requestPasswordReset(t,r,n){let s={method:"POST",body:{email:t}};return s=Rr("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",s,r,n),this.client.send(this.baseCrudPath+"/request-password-reset",s).then(()=>!0)}async confirmPasswordReset(t,r,n,s,o){let i={method:"POST",body:{token:t,password:r,passwordConfirm:n}};return i=Rr("This form of confirmPasswordReset(resetToken, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(resetToken, password, passwordConfirm, options?).",i,s,o),this.client.send(this.baseCrudPath+"/confirm-password-reset",i).then(()=>!0)}}const IM=["requestKey","$cancelKey","$autoCancel","fetch","headers","body","query","params","cache","credentials","headers","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy","signal","window"];function vS(e){if(e){e.query=e.query||{};for(let t in e)IM.includes(t)||(e.query[t]=e[t],delete e[t])}}class yS extends qo{constructor(){super(...arguments),this.clientId="",this.eventSource=null,this.subscriptions={},this.lastSentSubscriptions=[],this.maxConnectTimeout=15e3,this.reconnectAttempts=0,this.maxReconnectAttempts=1/0,this.predefinedReconnectIntervals=[200,300,500,1e3,1200,1500,2e3],this.pendingConnects=[]}get isConnected(){return!!this.eventSource&&!!this.clientId&&!this.pendingConnects.length}async subscribe(t,r,n){var i;if(!t)throw new Error("topic must be set.");let s=t;if(n){vS(n);const a="options="+encodeURIComponent(JSON.stringify({query:n.query,headers:n.headers}));s+=(s.includes("?")?"&":"?")+a}const o=function(a){const l=a;let c;try{c=JSON.parse(l==null?void 0:l.data)}catch{}r(c||{})};return this.subscriptions[s]||(this.subscriptions[s]=[]),this.subscriptions[s].push(o),this.isConnected?this.subscriptions[s].length===1?await this.submitSubscriptions():(i=this.eventSource)==null||i.addEventListener(s,o):await this.connect(),async()=>this.unsubscribeByTopicAndListener(t,o)}async unsubscribe(t){var n;let r=!1;if(t){const s=this.getSubscriptionsByTopic(t);for(let o in s)if(this.hasSubscriptionListeners(o)){for(let i of this.subscriptions[o])(n=this.eventSource)==null||n.removeEventListener(o,i);delete this.subscriptions[o],r||(r=!0)}}else this.subscriptions={};this.hasSubscriptionListeners()?r&&await this.submitSubscriptions():this.disconnect()}async unsubscribeByPrefix(t){var n;let r=!1;for(let s in this.subscriptions)if((s+"?").startsWith(t)){r=!0;for(let o of this.subscriptions[s])(n=this.eventSource)==null||n.removeEventListener(s,o);delete this.subscriptions[s]}r&&(this.hasSubscriptionListeners()?await this.submitSubscriptions():this.disconnect())}async unsubscribeByTopicAndListener(t,r){var o;let n=!1;const s=this.getSubscriptionsByTopic(t);for(let i in s){if(!Array.isArray(this.subscriptions[i])||!this.subscriptions[i].length)continue;let a=!1;for(let l=this.subscriptions[i].length-1;l>=0;l--)this.subscriptions[i][l]===r&&(a=!0,delete this.subscriptions[i][l],this.subscriptions[i].splice(l,1),(o=this.eventSource)==null||o.removeEventListener(i,r));a&&(this.subscriptions[i].length||delete this.subscriptions[i],n||this.hasSubscriptionListeners(i)||(n=!0))}this.hasSubscriptionListeners()?n&&await this.submitSubscriptions():this.disconnect()}hasSubscriptionListeners(t){var r,n;if(this.subscriptions=this.subscriptions||{},t)return!!((r=this.subscriptions[t])!=null&&r.length);for(let s in this.subscriptions)if((n=this.subscriptions[s])!=null&&n.length)return!0;return!1}async submitSubscriptions(){if(this.clientId)return this.addAllSubscriptionListeners(),this.lastSentSubscriptions=this.getNonEmptySubscriptionKeys(),this.client.send("/api/realtime",{method:"POST",body:{clientId:this.clientId,subscriptions:this.lastSentSubscriptions},requestKey:this.getSubscriptionsCancelKey()}).catch(t=>{if(!(t!=null&&t.isAbort))throw t})}getSubscriptionsCancelKey(){return"realtime_"+this.clientId}getSubscriptionsByTopic(t){const r={};t=t.includes("?")?t:t+"?";for(let n in this.subscriptions)(n+"?").startsWith(t)&&(r[n]=this.subscriptions[n]);return r}getNonEmptySubscriptionKeys(){const t=[];for(let r in this.subscriptions)this.subscriptions[r].length&&t.push(r);return t}addAllSubscriptionListeners(){if(this.eventSource){this.removeAllSubscriptionListeners();for(let t in this.subscriptions)for(let r of this.subscriptions[t])this.eventSource.addEventListener(t,r)}}removeAllSubscriptionListeners(){if(this.eventSource)for(let t in this.subscriptions)for(let r of this.subscriptions[t])this.eventSource.removeEventListener(t,r)}async connect(){if(!(this.reconnectAttempts>0))return new Promise((t,r)=>{this.pendingConnects.push({resolve:t,reject:r}),this.pendingConnects.length>1||this.initConnect()})}initConnect(){this.disconnect(!0),clearTimeout(this.connectTimeoutId),this.connectTimeoutId=setTimeout(()=>{this.connectErrorHandler(new Error("EventSource connect took too long."))},this.maxConnectTimeout),this.eventSource=new EventSource(this.client.buildUrl("/api/realtime")),this.eventSource.onerror=t=>{this.connectErrorHandler(new Error("Failed to establish realtime connection."))},this.eventSource.addEventListener("PB_CONNECT",t=>{const r=t;this.clientId=r==null?void 0:r.lastEventId,this.submitSubscriptions().then(async()=>{let n=3;for(;this.hasUnsentSubscriptions()&&n>0;)n--,await this.submitSubscriptions()}).then(()=>{for(let s of this.pendingConnects)s.resolve();this.pendingConnects=[],this.reconnectAttempts=0,clearTimeout(this.reconnectTimeoutId),clearTimeout(this.connectTimeoutId);const n=this.getSubscriptionsByTopic("PB_CONNECT");for(let s in n)for(let o of n[s])o(t)}).catch(n=>{this.clientId="",this.connectErrorHandler(n)})})}hasUnsentSubscriptions(){const t=this.getNonEmptySubscriptionKeys();if(t.length!=this.lastSentSubscriptions.length)return!0;for(const r of t)if(!this.lastSentSubscriptions.includes(r))return!0;return!1}connectErrorHandler(t){if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),!this.clientId&&!this.reconnectAttempts||this.reconnectAttempts>this.maxReconnectAttempts){for(let n of this.pendingConnects)n.reject(new Ir(t));return this.pendingConnects=[],void this.disconnect()}this.disconnect(!0);const r=this.predefinedReconnectIntervals[this.reconnectAttempts]||this.predefinedReconnectIntervals[this.predefinedReconnectIntervals.length-1];this.reconnectAttempts++,this.reconnectTimeoutId=setTimeout(()=>{this.initConnect()},r)}disconnect(t=!1){var r;if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),this.removeAllSubscriptionListeners(),this.client.cancelRequest(this.getSubscriptionsCancelKey()),(r=this.eventSource)==null||r.close(),this.eventSource=null,this.clientId="",!t){this.reconnectAttempts=0;for(let n of this.pendingConnects)n.resolve();this.pendingConnects=[]}}}class LM extends Hg{constructor(t,r){super(t),this.collectionIdOrName=r}get baseCrudPath(){return this.baseCollectionPath+"/records"}get baseCollectionPath(){return"/api/collections/"+encodeURIComponent(this.collectionIdOrName)}async subscribe(t,r,n){if(!t)throw new Error("Missing topic.");if(!r)throw new Error("Missing subscription callback.");return this.client.realtime.subscribe(this.collectionIdOrName+"/"+t,r,n)}async unsubscribe(t){return t?this.client.realtime.unsubscribe(this.collectionIdOrName+"/"+t):this.client.realtime.unsubscribeByPrefix(this.collectionIdOrName)}async getFullList(t,r){if(typeof t=="number")return super.getFullList(t,r);const n=Object.assign({},t,r);return super.getFullList(n)}async getList(t=1,r=30,n){return super.getList(t,r,n)}async getFirstListItem(t,r){return super.getFirstListItem(t,r)}async getOne(t,r){return super.getOne(t,r)}async create(t,r){return super.create(t,r)}async update(t,r,n){return super.update(t,r,n).then(s=>{var o,i,a;return((o=this.client.authStore.model)==null?void 0:o.id)!==(s==null?void 0:s.id)||((i=this.client.authStore.model)==null?void 0:i.collectionId)!==this.collectionIdOrName&&((a=this.client.authStore.model)==null?void 0:a.collectionName)!==this.collectionIdOrName||this.client.authStore.save(this.client.authStore.token,s),s})}async delete(t,r){return super.delete(t,r).then(n=>{var s,o,i;return!n||((s=this.client.authStore.model)==null?void 0:s.id)!==t||((o=this.client.authStore.model)==null?void 0:o.collectionId)!==this.collectionIdOrName&&((i=this.client.authStore.model)==null?void 0:i.collectionName)!==this.collectionIdOrName||this.client.authStore.clear(),n})}authResponse(t){const r=this.decode((t==null?void 0:t.record)||{});return this.client.authStore.save(t==null?void 0:t.token,r),Object.assign({},t,{token:(t==null?void 0:t.token)||"",record:r})}async listAuthMethods(t){return t=Object.assign({method:"GET"},t),this.client.send(this.baseCollectionPath+"/auth-methods",t).then(r=>Object.assign({},r,{usernamePassword:!!(r!=null&&r.usernamePassword),emailPassword:!!(r!=null&&r.emailPassword),authProviders:Array.isArray(r==null?void 0:r.authProviders)?r==null?void 0:r.authProviders:[]}))}async authWithPassword(t,r,n,s){let o={method:"POST",body:{identity:t,password:r}};return o=Rr("This form of authWithPassword(usernameOrEmail, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(usernameOrEmail, pass, options?).",o,n,s),this.client.send(this.baseCollectionPath+"/auth-with-password",o).then(i=>this.authResponse(i))}async authWithOAuth2Code(t,r,n,s,o,i,a){let l={method:"POST",body:{provider:t,code:r,codeVerifier:n,redirectUrl:s,createData:o}};return l=Rr("This form of authWithOAuth2Code(provider, code, codeVerifier, redirectUrl, createData?, body?, query?) is deprecated. Consider replacing it with authWithOAuth2Code(provider, code, codeVerifier, redirectUrl, createData?, options?).",l,i,a),this.client.send(this.baseCollectionPath+"/auth-with-oauth2",l).then(c=>this.authResponse(c))}authWithOAuth2(...t){if(t.length>1||typeof(t==null?void 0:t[0])=="string")return console.warn("PocketBase: This form of authWithOAuth2() is deprecated and may get removed in the future. Please replace with authWithOAuth2Code() OR use the authWithOAuth2() realtime form as shown in https://pocketbase.io/docs/authentication/#oauth2-integration."),this.authWithOAuth2Code((t==null?void 0:t[0])||"",(t==null?void 0:t[1])||"",(t==null?void 0:t[2])||"",(t==null?void 0:t[3])||"",(t==null?void 0:t[4])||{},(t==null?void 0:t[5])||{},(t==null?void 0:t[6])||{});const r=(t==null?void 0:t[0])||{};let n=null;r.urlCallback||(n=q0(void 0));const s=new yS(this.client);function o(){n==null||n.close(),s.unsubscribe()}const i={},a=r.requestKey;return a&&(i.requestKey=a),this.listAuthMethods(i).then(l=>{var h;const c=l.authProviders.find(m=>m.name===r.provider);if(!c)throw new Ir(new Error(`Missing or invalid provider "${r.provider}".`));const f=this.client.buildUrl("/api/oauth2-redirect"),d=a?(h=this.client.cancelControllers)==null?void 0:h[a]:void 0;return d&&(d.signal.onabort=()=>{o()}),new Promise(async(m,y)=>{var p;try{await s.subscribe("@oauth2",async _=>{var E;const C=s.clientId;try{if(!_.state||C!==_.state)throw new Error("State parameters don't match.");if(_.error||!_.code)throw new Error("OAuth2 redirect error or missing code: "+_.error);const T=Object.assign({},r);delete T.provider,delete T.scopes,delete T.createData,delete T.urlCallback,(E=d==null?void 0:d.signal)!=null&&E.onabort&&(d.signal.onabort=null);const P=await this.authWithOAuth2Code(c.name,_.code,c.codeVerifier,f,r.createData,T);m(P)}catch(T){y(new Ir(T))}o()});const x={state:s.clientId};(p=r.scopes)!=null&&p.length&&(x.scope=r.scopes.join(" "));const g=this._replaceQueryParams(c.authUrl+f,x);await(r.urlCallback||function(_){n?n.location.href=_:n=q0(_)})(g)}catch(x){o(),y(new Ir(x))}})}).catch(l=>{throw o(),l})}async authRefresh(t,r){let n={method:"POST"};return n=Rr("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",n,t,r),this.client.send(this.baseCollectionPath+"/auth-refresh",n).then(s=>this.authResponse(s))}async requestPasswordReset(t,r,n){let s={method:"POST",body:{email:t}};return s=Rr("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",s,r,n),this.client.send(this.baseCollectionPath+"/request-password-reset",s).then(()=>!0)}async confirmPasswordReset(t,r,n,s,o){let i={method:"POST",body:{token:t,password:r,passwordConfirm:n}};return i=Rr("This form of confirmPasswordReset(token, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(token, password, passwordConfirm, options?).",i,s,o),this.client.send(this.baseCollectionPath+"/confirm-password-reset",i).then(()=>!0)}async requestVerification(t,r,n){let s={method:"POST",body:{email:t}};return s=Rr("This form of requestVerification(email, body?, query?) is deprecated. Consider replacing it with requestVerification(email, options?).",s,r,n),this.client.send(this.baseCollectionPath+"/request-verification",s).then(()=>!0)}async confirmVerification(t,r,n){let s={method:"POST",body:{token:t}};return s=Rr("This form of confirmVerification(token, body?, query?) is deprecated. Consider replacing it with confirmVerification(token, options?).",s,r,n),this.client.send(this.baseCollectionPath+"/confirm-verification",s).then(()=>{const o=Ii(t),i=this.client.authStore.model;return i&&!i.verified&&i.id===o.id&&i.collectionId===o.collectionId&&(i.verified=!0,this.client.authStore.save(this.client.authStore.token,i)),!0})}async requestEmailChange(t,r,n){let s={method:"POST",body:{newEmail:t}};return s=Rr("This form of requestEmailChange(newEmail, body?, query?) is deprecated. Consider replacing it with requestEmailChange(newEmail, options?).",s,r,n),this.client.send(this.baseCollectionPath+"/request-email-change",s).then(()=>!0)}async confirmEmailChange(t,r,n,s){let o={method:"POST",body:{token:t,password:r}};return o=Rr("This form of confirmEmailChange(token, password, body?, query?) is deprecated. Consider replacing it with confirmEmailChange(token, password, options?).",o,n,s),this.client.send(this.baseCollectionPath+"/confirm-email-change",o).then(()=>{const i=Ii(t),a=this.client.authStore.model;return a&&a.id===i.id&&a.collectionId===i.collectionId&&this.client.authStore.clear(),!0})}async listExternalAuths(t,r){return r=Object.assign({method:"GET"},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t)+"/external-auths",r)}async unlinkExternalAuth(t,r,n){return n=Object.assign({method:"DELETE"},n),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t)+"/external-auths/"+encodeURIComponent(r),n).then(()=>!0)}_replaceQueryParams(t,r={}){let n=t,s="";t.indexOf("?")>=0&&(n=t.substring(0,t.indexOf("?")),s=t.substring(t.indexOf("?")+1));const o={},i=s.split("&");for(const a of i){if(a=="")continue;const l=a.split("=");o[decodeURIComponent(l[0].replace(/\+/g," "))]=decodeURIComponent((l[1]||"").replace(/\+/g," "))}for(let a in r)r.hasOwnProperty(a)&&(r[a]==null?delete o[a]:o[a]=r[a]);s="";for(let a in o)o.hasOwnProperty(a)&&(s!=""&&(s+="&"),s+=encodeURIComponent(a.replace(/%20/g,"+"))+"="+encodeURIComponent(o[a].replace(/%20/g,"+")));return s!=""?n+"?"+s:n}}function q0(e){if(typeof window>"u"||!(window!=null&&window.open))throw new Ir(new Error("Not in a browser context - please pass a custom urlCallback function."));let t=1024,r=768,n=window.innerWidth,s=window.innerHeight;t=t>n?n:t,r=r>s?s:r;let o=n/2-t/2,i=s/2-r/2;return window.open(e,"popup_window","width="+t+",height="+r+",top="+i+",left="+o+",resizable,menubar=no")}class FM extends Hg{get baseCrudPath(){return"/api/collections"}async import(t,r=!1,n){return n=Object.assign({method:"PUT",body:{collections:t,deleteMissing:r}},n),this.client.send(this.baseCrudPath+"/import",n).then(()=>!0)}}class zM extends qo{async getList(t=1,r=30,n){return(n=Object.assign({method:"GET"},n)).query=Object.assign({page:t,perPage:r},n.query),this.client.send("/api/logs",n)}async getOne(t,r){if(!t)throw new Ir({url:this.client.buildUrl("/api/logs/"),status:404,response:{code:404,message:"Missing required log id.",data:{}}});return r=Object.assign({method:"GET"},r),this.client.send("/api/logs/"+encodeURIComponent(t),r)}async getStats(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/logs/stats",t)}}class UM extends qo{async check(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/health",t)}}class $M extends qo{getUrl(t,r,n={}){if(!r||!(t!=null&&t.id)||!(t!=null&&t.collectionId)&&!(t!=null&&t.collectionName))return"";const s=[];s.push("api"),s.push("files"),s.push(encodeURIComponent(t.collectionId||t.collectionName)),s.push(encodeURIComponent(t.id)),s.push(encodeURIComponent(r));let o=this.client.buildUrl(s.join("/"));if(Object.keys(n).length){n.download===!1&&delete n.download;const i=new URLSearchParams(n);o+=(o.includes("?")?"&":"?")+i}return o}async getToken(t){return t=Object.assign({method:"POST"},t),this.client.send("/api/files/token",t).then(r=>(r==null?void 0:r.token)||"")}}class VM extends qo{async getFullList(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/backups",t)}async create(t,r){return r=Object.assign({method:"POST",body:{name:t}},r),this.client.send("/api/backups",r).then(()=>!0)}async upload(t,r){return r=Object.assign({method:"POST",body:t},r),this.client.send("/api/backups/upload",r).then(()=>!0)}async delete(t,r){return r=Object.assign({method:"DELETE"},r),this.client.send(`/api/backups/${encodeURIComponent(t)}`,r).then(()=>!0)}async restore(t,r){return r=Object.assign({method:"POST"},r),this.client.send(`/api/backups/${encodeURIComponent(t)}/restore`,r).then(()=>!0)}getDownloadUrl(t,r){return this.client.buildUrl(`/api/backups/${encodeURIComponent(r)}?token=${encodeURIComponent(t)}`)}}class WM{constructor(t="/",r,n="en-US"){this.cancelControllers={},this.recordServices={},this.enableAutoCancellation=!0,this.baseUrl=t,this.lang=n,this.authStore=r||new OM,this.admins=new MM(this),this.collections=new FM(this),this.files=new $M(this),this.logs=new zM(this),this.settings=new AM(this),this.realtime=new yS(this),this.health=new UM(this),this.backups=new VM(this)}collection(t){return this.recordServices[t]||(this.recordServices[t]=new LM(this,t)),this.recordServices[t]}autoCancellation(t){return this.enableAutoCancellation=!!t,this}cancelRequest(t){return this.cancelControllers[t]&&(this.cancelControllers[t].abort(),delete this.cancelControllers[t]),this}cancelAllRequests(){for(let t in this.cancelControllers)this.cancelControllers[t].abort();return this.cancelControllers={},this}filter(t,r){if(!r)return t;for(let n in r){let s=r[n];switch(typeof s){case"boolean":case"number":s=""+s;break;case"string":s="'"+s.replace(/'/g,"\\'")+"'";break;default:s=s===null?"null":s instanceof Date?"'"+s.toISOString().replace("T"," ")+"'":"'"+JSON.stringify(s).replace(/'/g,"\\'")+"'"}t=t.replaceAll("{:"+n+"}",s)}return t}getFileUrl(t,r,n={}){return this.files.getUrl(t,r,n)}buildUrl(t){var n;let r=this.baseUrl;return typeof window>"u"||!window.location||r.startsWith("https://")||r.startsWith("http://")||(r=(n=window.location.origin)!=null&&n.endsWith("/")?window.location.origin.substring(0,window.location.origin.length-1):window.location.origin||"",this.baseUrl.startsWith("/")||(r+=window.location.pathname||"/",r+=r.endsWith("/")?"":"/"),r+=this.baseUrl),t&&(r+=r.endsWith("/")?"":"/",r+=t.startsWith("/")?t.substring(1):t),r}async send(t,r){r=this.initSendOptions(t,r);let n=this.buildUrl(t);if(this.beforeSend){const s=Object.assign({},await this.beforeSend(n,r));s.url!==void 0||s.options!==void 0?(n=s.url||n,r=s.options||r):Object.keys(s).length&&(r=s,console!=null&&console.warn&&console.warn("Deprecated format of beforeSend return: please use `return { url, options }`, instead of `return options`."))}if(r.query!==void 0){const s=this.serializeQueryParams(r.query);s&&(n+=(n.includes("?")?"&":"?")+s),delete r.query}return this.getHeader(r.headers,"Content-Type")=="application/json"&&r.body&&typeof r.body!="string"&&(r.body=JSON.stringify(r.body)),(r.fetch||fetch)(n,r).then(async s=>{let o={};try{o=await s.json()}catch{}if(this.afterSend&&(o=await this.afterSend(s,o)),s.status>=400)throw new Ir({url:s.url,status:s.status,data:o});return o}).catch(s=>{throw new Ir(s)})}initSendOptions(t,r){if((r=Object.assign({method:"GET"},r)).body=this.convertToFormDataIfNeeded(r.body),vS(r),r.query=Object.assign({},r.params,r.query),r.requestKey===void 0&&(r.$autoCancel===!1||r.query.$autoCancel===!1?r.requestKey=null:(r.$cancelKey||r.query.$cancelKey)&&(r.requestKey=r.$cancelKey||r.query.$cancelKey)),delete r.$autoCancel,delete r.query.$autoCancel,delete r.$cancelKey,delete r.query.$cancelKey,this.getHeader(r.headers,"Content-Type")!==null||this.isFormData(r.body)||(r.headers=Object.assign({},r.headers,{"Content-Type":"application/json"})),this.getHeader(r.headers,"Accept-Language")===null&&(r.headers=Object.assign({},r.headers,{"Accept-Language":this.lang})),this.authStore.token&&this.getHeader(r.headers,"Authorization")===null&&(r.headers=Object.assign({},r.headers,{Authorization:this.authStore.token})),this.enableAutoCancellation&&r.requestKey!==null){const n=r.requestKey||(r.method||"GET")+t;delete r.requestKey,this.cancelRequest(n);const s=new AbortController;this.cancelControllers[n]=s,r.signal=s.signal}return r}convertToFormDataIfNeeded(t){if(typeof FormData>"u"||t===void 0||typeof t!="object"||t===null||this.isFormData(t)||!this.hasBlobField(t))return t;const r=new FormData;for(const n in t){const s=t[n];if(typeof s!="object"||this.hasBlobField({data:s})){const o=Array.isArray(s)?s:[s];for(let i of o)r.append(n,i)}else{let o={};o[n]=s,r.append("@jsonPayload",JSON.stringify(o))}}return r}hasBlobField(t){for(const r in t){const n=Array.isArray(t[r])?t[r]:[t[r]];for(const s of n)if(typeof Blob<"u"&&s instanceof Blob||typeof File<"u"&&s instanceof File)return!0}return!1}getHeader(t,r){t=t||{},r=r.toLowerCase();for(let n in t)if(n.toLowerCase()==r)return t[n];return null}isFormData(t){return t&&(t.constructor.name==="FormData"||typeof FormData<"u"&&t instanceof FormData)}serializeQueryParams(t){const r=[];for(const n in t){if(t[n]===null)continue;const s=t[n],o=encodeURIComponent(n);if(Array.isArray(s))for(const i of s)r.push(o+"="+encodeURIComponent(i));else s instanceof Date?r.push(o+"="+encodeURIComponent(s.toISOString())):typeof s!==null&&typeof s=="object"?r.push(o+"="+encodeURIComponent(JSON.stringify(s))):r.push(o+"="+encodeURIComponent(s))}return r.join("&")}}var BM={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};const HM=BM.VITE_API_DOMAIN;console.log(HM);let Xc;const jt=()=>Xc||(Xc=new WM("/"),Xc);//! moment.js +//! version : 2.30.1 +//! authors : Tim Wood, Iskren Chernev, Moment.js contributors +//! license : MIT +//! momentjs.com +var wS;function me(){return wS.apply(null,arguments)}function YM(e){wS=e}function gn(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function jo(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function ot(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Yg(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(ot(e,t))return!1;return!0}function wr(e){return e===void 0}function vs(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function cc(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function xS(e,t){var r=[],n,s=e.length;for(n=0;n>>0,n;for(n=0;n0)for(r=0;r=0;return(o?r?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+n}var qg=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Qc=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,yh={},Li={};function Re(e,t,r,n){var s=n;typeof n=="string"&&(s=function(){return this[n]()}),e&&(Li[e]=s),t&&(Li[t[0]]=function(){return In(s.apply(this,arguments),t[1],t[2])}),r&&(Li[r]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function XM(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function QM(e){var t=e.match(qg),r,n;for(r=0,n=t.length;r=0&&Qc.test(e);)e=e.replace(Qc,n),Qc.lastIndex=0,r-=1;return e}var JM={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function eI(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(qg).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[e])}var tI="Invalid date";function rI(){return this._invalidDate}var nI="%d",sI=/\d{1,2}/;function oI(e){return this._ordinal.replace("%d",e)}var iI={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function aI(e,t,r,n){var s=this._relativeTime[r];return Un(s)?s(e,t,r,n):s.replace(/%d/i,e)}function lI(e,t){var r=this._relativeTime[e>0?"future":"past"];return Un(r)?r(t):r.replace(/%s/i,t)}var J0={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function Jr(e){return typeof e=="string"?J0[e]||J0[e.toLowerCase()]:void 0}function Xg(e){var t={},r,n;for(n in e)ot(e,n)&&(r=Jr(n),r&&(t[r]=e[n]));return t}var cI={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function uI(e){var t=[],r;for(r in e)ot(e,r)&&t.push({unit:r,priority:cI[r]});return t.sort(function(n,s){return n.priority-s.priority}),t}var kS=/\d/,$r=/\d\d/,CS=/\d{3}/,Qg=/\d{4}/,sf=/[+-]?\d{6}/,bt=/\d\d?/,ES=/\d\d\d\d?/,TS=/\d\d\d\d\d\d?/,of=/\d{1,3}/,Jg=/\d{1,4}/,af=/[+-]?\d{1,6}/,da=/\d+/,lf=/[+-]?\d+/,dI=/Z|[+-]\d\d:?\d\d/gi,cf=/Z|[+-]\d\d(?::?\d\d)?/gi,fI=/[+-]?\d+(\.\d{1,3})?/,dc=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,fa=/^[1-9]\d?/,ev=/^([1-9]\d|\d)/,od;od={};function xe(e,t,r){od[e]=Un(t)?t:function(n,s){return n&&r?r:t}}function hI(e,t){return ot(od,e)?od[e](t._strict,t._locale):new RegExp(pI(e))}function pI(e){return as(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,r,n,s,o){return r||n||s||o}))}function as(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Yr(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Ke(e){var t=+e,r=0;return t!==0&&isFinite(t)&&(r=Yr(t)),r}var Lp={};function pt(e,t){var r,n=t,s;for(typeof e=="string"&&(e=[e]),vs(t)&&(n=function(o,i){i[t]=Ke(o)}),s=e.length,r=0;r68?1900:2e3)};var RS=ha("FullYear",!0);function yI(){return uf(this.year())}function ha(e,t){return function(r){return r!=null?(NS(this,e,r),me.updateOffset(this,t),this):Rl(this,e)}}function Rl(e,t){if(!e.isValid())return NaN;var r=e._d,n=e._isUTC;switch(t){case"Milliseconds":return n?r.getUTCMilliseconds():r.getMilliseconds();case"Seconds":return n?r.getUTCSeconds():r.getSeconds();case"Minutes":return n?r.getUTCMinutes():r.getMinutes();case"Hours":return n?r.getUTCHours():r.getHours();case"Date":return n?r.getUTCDate():r.getDate();case"Day":return n?r.getUTCDay():r.getDay();case"Month":return n?r.getUTCMonth():r.getMonth();case"FullYear":return n?r.getUTCFullYear():r.getFullYear();default:return NaN}}function NS(e,t,r){var n,s,o,i,a;if(!(!e.isValid()||isNaN(r))){switch(n=e._d,s=e._isUTC,t){case"Milliseconds":return void(s?n.setUTCMilliseconds(r):n.setMilliseconds(r));case"Seconds":return void(s?n.setUTCSeconds(r):n.setSeconds(r));case"Minutes":return void(s?n.setUTCMinutes(r):n.setMinutes(r));case"Hours":return void(s?n.setUTCHours(r):n.setHours(r));case"Date":return void(s?n.setUTCDate(r):n.setDate(r));case"FullYear":break;default:return}o=r,i=e.month(),a=e.date(),a=a===29&&i===1&&!uf(o)?28:a,s?n.setUTCFullYear(o,i,a):n.setFullYear(o,i,a)}}function wI(e){return e=Jr(e),Un(this[e])?this[e]():this}function xI(e,t){if(typeof e=="object"){e=Xg(e);var r=uI(e),n,s=r.length;for(n=0;n=0?(a=new Date(e+400,t,r,n,s,o,i),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,r,n,s,o,i),a}function Nl(e){var t,r;return e<100&&e>=0?(r=Array.prototype.slice.call(arguments),r[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function id(e,t,r){var n=7+t-r,s=(7+Nl(e,0,n).getUTCDay()-t)%7;return-s+n-1}function MS(e,t,r,n,s){var o=(7+r-n)%7,i=id(e,n,s),a=1+7*(t-1)+o+i,l,c;return a<=0?(l=e-1,c=Ja(l)+a):a>Ja(e)?(l=e+1,c=a-Ja(e)):(l=e,c=a),{year:l,dayOfYear:c}}function Pl(e,t,r){var n=id(e.year(),t,r),s=Math.floor((e.dayOfYear()-n-1)/7)+1,o,i;return s<1?(i=e.year()-1,o=s+ls(i,t,r)):s>ls(e.year(),t,r)?(o=s-ls(e.year(),t,r),i=e.year()+1):(i=e.year(),o=s),{week:o,year:i}}function ls(e,t,r){var n=id(e,t,r),s=id(e+1,t,r);return(Ja(e)-n+s)/7}Re("w",["ww",2],"wo","week");Re("W",["WW",2],"Wo","isoWeek");xe("w",bt,fa);xe("ww",bt,$r);xe("W",bt,fa);xe("WW",bt,$r);fc(["w","ww","W","WW"],function(e,t,r,n){t[n.substr(0,1)]=Ke(e)});function OI(e){return Pl(e,this._week.dow,this._week.doy).week}var AI={dow:0,doy:6};function MI(){return this._week.dow}function II(){return this._week.doy}function LI(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function FI(e){var t=Pl(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Re("d",0,"do","day");Re("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});Re("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});Re("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});Re("e",0,0,"weekday");Re("E",0,0,"isoWeekday");xe("d",bt);xe("e",bt);xe("E",bt);xe("dd",function(e,t){return t.weekdaysMinRegex(e)});xe("ddd",function(e,t){return t.weekdaysShortRegex(e)});xe("dddd",function(e,t){return t.weekdaysRegex(e)});fc(["dd","ddd","dddd"],function(e,t,r,n){var s=r._locale.weekdaysParse(e,n,r._strict);s!=null?t.d=s:Ve(r).invalidWeekday=e});fc(["d","e","E"],function(e,t,r,n){t[n]=Ke(e)});function zI(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function UI(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function rv(e,t){return e.slice(t,7).concat(e.slice(0,t))}var $I="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),IS="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),VI="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),WI=dc,BI=dc,HI=dc;function YI(e,t){var r=gn(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?rv(r,this._week.dow):e?r[e.day()]:r}function ZI(e){return e===!0?rv(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function GI(e){return e===!0?rv(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function KI(e,t,r){var n,s,o,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)o=zn([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(o,"").toLocaleLowerCase();return r?t==="dddd"?(s=Ft.call(this._weekdaysParse,i),s!==-1?s:null):t==="ddd"?(s=Ft.call(this._shortWeekdaysParse,i),s!==-1?s:null):(s=Ft.call(this._minWeekdaysParse,i),s!==-1?s:null):t==="dddd"?(s=Ft.call(this._weekdaysParse,i),s!==-1||(s=Ft.call(this._shortWeekdaysParse,i),s!==-1)?s:(s=Ft.call(this._minWeekdaysParse,i),s!==-1?s:null)):t==="ddd"?(s=Ft.call(this._shortWeekdaysParse,i),s!==-1||(s=Ft.call(this._weekdaysParse,i),s!==-1)?s:(s=Ft.call(this._minWeekdaysParse,i),s!==-1?s:null)):(s=Ft.call(this._minWeekdaysParse,i),s!==-1||(s=Ft.call(this._weekdaysParse,i),s!==-1)?s:(s=Ft.call(this._shortWeekdaysParse,i),s!==-1?s:null))}function qI(e,t,r){var n,s,o;if(this._weekdaysParseExact)return KI.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(s=zn([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(s,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(s,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(s,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(o="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[n]=new RegExp(o.replace(".",""),"i")),r&&t==="dddd"&&this._fullWeekdaysParse[n].test(e))return n;if(r&&t==="ddd"&&this._shortWeekdaysParse[n].test(e))return n;if(r&&t==="dd"&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}}function XI(e){if(!this.isValid())return e!=null?this:NaN;var t=Rl(this,"Day");return e!=null?(e=zI(e,this.localeData()),this.add(e-t,"d")):t}function QI(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function JI(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=UI(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function eL(e){return this._weekdaysParseExact?(ot(this,"_weekdaysRegex")||nv.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(ot(this,"_weekdaysRegex")||(this._weekdaysRegex=WI),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function tL(e){return this._weekdaysParseExact?(ot(this,"_weekdaysRegex")||nv.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(ot(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=BI),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function rL(e){return this._weekdaysParseExact?(ot(this,"_weekdaysRegex")||nv.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(ot(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=HI),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function nv(){function e(f,d){return d.length-f.length}var t=[],r=[],n=[],s=[],o,i,a,l,c;for(o=0;o<7;o++)i=zn([2e3,1]).day(o),a=as(this.weekdaysMin(i,"")),l=as(this.weekdaysShort(i,"")),c=as(this.weekdays(i,"")),t.push(a),r.push(l),n.push(c),s.push(a),s.push(l),s.push(c);t.sort(e),r.sort(e),n.sort(e),s.sort(e),this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function sv(){return this.hours()%12||12}function nL(){return this.hours()||24}Re("H",["HH",2],0,"hour");Re("h",["hh",2],0,sv);Re("k",["kk",2],0,nL);Re("hmm",0,0,function(){return""+sv.apply(this)+In(this.minutes(),2)});Re("hmmss",0,0,function(){return""+sv.apply(this)+In(this.minutes(),2)+In(this.seconds(),2)});Re("Hmm",0,0,function(){return""+this.hours()+In(this.minutes(),2)});Re("Hmmss",0,0,function(){return""+this.hours()+In(this.minutes(),2)+In(this.seconds(),2)});function LS(e,t){Re(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}LS("a",!0);LS("A",!1);function FS(e,t){return t._meridiemParse}xe("a",FS);xe("A",FS);xe("H",bt,ev);xe("h",bt,fa);xe("k",bt,fa);xe("HH",bt,$r);xe("hh",bt,$r);xe("kk",bt,$r);xe("hmm",ES);xe("hmmss",TS);xe("Hmm",ES);xe("Hmmss",TS);pt(["H","HH"],Zt);pt(["k","kk"],function(e,t,r){var n=Ke(e);t[Zt]=n===24?0:n});pt(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e});pt(["h","hh"],function(e,t,r){t[Zt]=Ke(e),Ve(r).bigHour=!0});pt("hmm",function(e,t,r){var n=e.length-2;t[Zt]=Ke(e.substr(0,n)),t[ln]=Ke(e.substr(n)),Ve(r).bigHour=!0});pt("hmmss",function(e,t,r){var n=e.length-4,s=e.length-2;t[Zt]=Ke(e.substr(0,n)),t[ln]=Ke(e.substr(n,2)),t[ss]=Ke(e.substr(s)),Ve(r).bigHour=!0});pt("Hmm",function(e,t,r){var n=e.length-2;t[Zt]=Ke(e.substr(0,n)),t[ln]=Ke(e.substr(n))});pt("Hmmss",function(e,t,r){var n=e.length-4,s=e.length-2;t[Zt]=Ke(e.substr(0,n)),t[ln]=Ke(e.substr(n,2)),t[ss]=Ke(e.substr(s))});function sL(e){return(e+"").toLowerCase().charAt(0)==="p"}var oL=/[ap]\.?m?\.?/i,iL=ha("Hours",!0);function aL(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var zS={calendar:KM,longDateFormat:JM,invalidDate:tI,ordinal:nI,dayOfMonthOrdinalParse:sI,relativeTime:iI,months:bI,monthsShort:PS,week:AI,weekdays:$I,weekdaysMin:VI,weekdaysShort:IS,meridiemParse:oL},Ct={},Da={},jl;function lL(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r0;){if(s=df(o.slice(0,r).join("-")),s)return s;if(n&&n.length>=r&&lL(o,n)>=r-1)break;r--}t++}return jl}function uL(e){return!!(e&&e.match("^[^/\\\\]*$"))}function df(e){var t=null,r;if(Ct[e]===void 0&&typeof Cu<"u"&&Cu&&Cu.exports&&uL(e))try{t=jl._abbr,r=require,r("./locale/"+e),Js(t)}catch{Ct[e]=null}return Ct[e]}function Js(e,t){var r;return e&&(wr(t)?r=Cs(e):r=ov(e,t),r?jl=r:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),jl._abbr}function ov(e,t){if(t!==null){var r,n=zS;if(t.abbr=e,Ct[e]!=null)bS("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=Ct[e]._config;else if(t.parentLocale!=null)if(Ct[t.parentLocale]!=null)n=Ct[t.parentLocale]._config;else if(r=df(t.parentLocale),r!=null)n=r._config;else return Da[t.parentLocale]||(Da[t.parentLocale]=[]),Da[t.parentLocale].push({name:e,config:t}),null;return Ct[e]=new Kg(Mp(n,t)),Da[e]&&Da[e].forEach(function(s){ov(s.name,s.config)}),Js(e),Ct[e]}else return delete Ct[e],null}function dL(e,t){if(t!=null){var r,n,s=zS;Ct[e]!=null&&Ct[e].parentLocale!=null?Ct[e].set(Mp(Ct[e]._config,t)):(n=df(e),n!=null&&(s=n._config),t=Mp(s,t),n==null&&(t.abbr=e),r=new Kg(t),r.parentLocale=Ct[e],Ct[e]=r),Js(e)}else Ct[e]!=null&&(Ct[e].parentLocale!=null?(Ct[e]=Ct[e].parentLocale,e===Js()&&Js(e)):Ct[e]!=null&&delete Ct[e]);return Ct[e]}function Cs(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return jl;if(!gn(e)){if(t=df(e),t)return t;e=[e]}return cL(e)}function fL(){return Ip(Ct)}function iv(e){var t,r=e._a;return r&&Ve(e).overflow===-2&&(t=r[ns]<0||r[ns]>11?ns:r[Tn]<1||r[Tn]>tv(r[ir],r[ns])?Tn:r[Zt]<0||r[Zt]>24||r[Zt]===24&&(r[ln]!==0||r[ss]!==0||r[To]!==0)?Zt:r[ln]<0||r[ln]>59?ln:r[ss]<0||r[ss]>59?ss:r[To]<0||r[To]>999?To:-1,Ve(e)._overflowDayOfYear&&(tTn)&&(t=Tn),Ve(e)._overflowWeeks&&t===-1&&(t=gI),Ve(e)._overflowWeekday&&t===-1&&(t=vI),Ve(e).overflow=t),e}var hL=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,pL=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,mL=/Z|[+-]\d\d(?::?\d\d)?/,Jc=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],wh=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],gL=/^\/?Date\((-?\d+)/i,vL=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,yL={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function US(e){var t,r,n=e._i,s=hL.exec(n)||pL.exec(n),o,i,a,l,c=Jc.length,f=wh.length;if(s){for(Ve(e).iso=!0,t=0,r=c;tJa(i)||e._dayOfYear===0)&&(Ve(e)._overflowDayOfYear=!0),r=Nl(i,0,e._dayOfYear),e._a[ns]=r.getUTCMonth(),e._a[Tn]=r.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=n[t]=s[t];for(;t<7;t++)e._a[t]=n[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[Zt]===24&&e._a[ln]===0&&e._a[ss]===0&&e._a[To]===0&&(e._nextDay=!0,e._a[Zt]=0),e._d=(e._useUTC?Nl:DI).apply(null,n),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Zt]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==o&&(Ve(e).weekdayMismatch=!0)}}function EL(e){var t,r,n,s,o,i,a,l,c;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(o=1,i=4,r=ui(t.GG,e._a[ir],Pl(_t(),1,4).year),n=ui(t.W,1),s=ui(t.E,1),(s<1||s>7)&&(l=!0)):(o=e._locale._week.dow,i=e._locale._week.doy,c=Pl(_t(),o,i),r=ui(t.gg,e._a[ir],c.year),n=ui(t.w,c.week),t.d!=null?(s=t.d,(s<0||s>6)&&(l=!0)):t.e!=null?(s=t.e+o,(t.e<0||t.e>6)&&(l=!0)):s=o),n<1||n>ls(r,o,i)?Ve(e)._overflowWeeks=!0:l!=null?Ve(e)._overflowWeekday=!0:(a=MS(r,n,s,o,i),e._a[ir]=a.year,e._dayOfYear=a.dayOfYear)}me.ISO_8601=function(){};me.RFC_2822=function(){};function lv(e){if(e._f===me.ISO_8601){US(e);return}if(e._f===me.RFC_2822){$S(e);return}e._a=[],Ve(e).empty=!0;var t=""+e._i,r,n,s,o,i,a=t.length,l=0,c,f;for(s=SS(e._f,e._locale).match(qg)||[],f=s.length,r=0;r0&&Ve(e).unusedInput.push(i),t=t.slice(t.indexOf(n)+n.length),l+=n.length),Li[o]?(n?Ve(e).empty=!1:Ve(e).unusedTokens.push(o),mI(o,n,e)):e._strict&&!n&&Ve(e).unusedTokens.push(o);Ve(e).charsLeftOver=a-l,t.length>0&&Ve(e).unusedInput.push(t),e._a[Zt]<=12&&Ve(e).bigHour===!0&&e._a[Zt]>0&&(Ve(e).bigHour=void 0),Ve(e).parsedDateParts=e._a.slice(0),Ve(e).meridiem=e._meridiem,e._a[Zt]=TL(e._locale,e._a[Zt],e._meridiem),c=Ve(e).era,c!==null&&(e._a[ir]=e._locale.erasConvertYear(c,e._a[ir])),av(e),iv(e)}function TL(e,t,r){var n;return r==null?t:e.meridiemHour!=null?e.meridiemHour(t,r):(e.isPM!=null&&(n=e.isPM(r),n&&t<12&&(t+=12),!n&&t===12&&(t=0)),t)}function RL(e){var t,r,n,s,o,i,a=!1,l=e._f.length;if(l===0){Ve(e).invalidFormat=!0,e._d=new Date(NaN);return}for(s=0;sthis?this:e:nf()});function BS(e,t){var r,n;if(t.length===1&&gn(t[0])&&(t=t[0]),!t.length)return _t();for(r=t[0],n=1;nthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function KL(){if(!wr(this._isDSTShifted))return this._isDSTShifted;var e={},t;return Gg(e,this),e=VS(e),e._a?(t=e._isUTC?zn(e._a):_t(e._a),this._isDSTShifted=this.isValid()&&UL(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function qL(){return this.isValid()?!this._isUTC:!1}function XL(){return this.isValid()?this._isUTC:!1}function YS(){return this.isValid()?this._isUTC&&this._offset===0:!1}var QL=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,JL=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function xn(e,t){var r=e,n=null,s,o,i;return xu(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:vs(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(n=QL.exec(e))?(s=n[1]==="-"?-1:1,r={y:0,d:Ke(n[Tn])*s,h:Ke(n[Zt])*s,m:Ke(n[ln])*s,s:Ke(n[ss])*s,ms:Ke(Fp(n[To]*1e3))*s}):(n=JL.exec(e))?(s=n[1]==="-"?-1:1,r={y:vo(n[2],s),M:vo(n[3],s),w:vo(n[4],s),d:vo(n[5],s),h:vo(n[6],s),m:vo(n[7],s),s:vo(n[8],s)}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(i=eF(_t(r.from),_t(r.to)),r={},r.ms=i.milliseconds,r.M=i.months),o=new ff(r),xu(e)&&ot(e,"_locale")&&(o._locale=e._locale),xu(e)&&ot(e,"_isValid")&&(o._isValid=e._isValid),o}xn.fn=ff.prototype;xn.invalid=zL;function vo(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function tw(e,t){var r={};return r.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function eF(e,t){var r;return e.isValid()&&t.isValid()?(t=uv(t,e),e.isBefore(t)?r=tw(e,t):(r=tw(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function ZS(e,t){return function(r,n){var s,o;return n!==null&&!isNaN(+n)&&(bS(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=r,r=n,n=o),s=xn(r,n),GS(this,s,e),this}}function GS(e,t,r,n){var s=t._milliseconds,o=Fp(t._days),i=Fp(t._months);e.isValid()&&(n=n??!0,i&&DS(e,Rl(e,"Month")+i*r),o&&NS(e,"Date",Rl(e,"Date")+o*r),s&&e._d.setTime(e._d.valueOf()+s*r),n&&me.updateOffset(e,o||i))}var tF=ZS(1,"add"),rF=ZS(-1,"subtract");function KS(e){return typeof e=="string"||e instanceof String}function nF(e){return vn(e)||cc(e)||KS(e)||vs(e)||oF(e)||sF(e)||e===null||e===void 0}function sF(e){var t=jo(e)&&!Yg(e),r=!1,n=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],s,o,i=n.length;for(s=0;sr.valueOf():r.valueOf()9999?wu(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Un(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",wu(r,"Z")):wu(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function wF(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",r,n,s,o;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),r="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",s="-MM-DD[T]HH:mm:ss.SSS",o=t+'[")]',this.format(r+n+s+o)}function xF(e){e||(e=this.isUtc()?me.defaultFormatUtc:me.defaultFormat);var t=wu(this,e);return this.localeData().postformat(t)}function _F(e,t){return this.isValid()&&(vn(e)&&e.isValid()||_t(e).isValid())?xn({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function bF(e){return this.from(_t(),e)}function SF(e,t){return this.isValid()&&(vn(e)&&e.isValid()||_t(e).isValid())?xn({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function kF(e){return this.to(_t(),e)}function qS(e){var t;return e===void 0?this._locale._abbr:(t=Cs(e),t!=null&&(this._locale=t),this)}var XS=Qr("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function QS(){return this._locale}var ad=1e3,Fi=60*ad,ld=60*Fi,JS=(365*400+97)*24*ld;function zi(e,t){return(e%t+t)%t}function ek(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-JS:new Date(e,t,r).valueOf()}function tk(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-JS:Date.UTC(e,t,r)}function CF(e){var t,r;if(e=Jr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?tk:ek,e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=zi(t+(this._isUTC?0:this.utcOffset()*Fi),ld);break;case"minute":t=this._d.valueOf(),t-=zi(t,Fi);break;case"second":t=this._d.valueOf(),t-=zi(t,ad);break}return this._d.setTime(t),me.updateOffset(this,!0),this}function EF(e){var t,r;if(e=Jr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?tk:ek,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=ld-zi(t+(this._isUTC?0:this.utcOffset()*Fi),ld)-1;break;case"minute":t=this._d.valueOf(),t+=Fi-zi(t,Fi)-1;break;case"second":t=this._d.valueOf(),t+=ad-zi(t,ad)-1;break}return this._d.setTime(t),me.updateOffset(this,!0),this}function TF(){return this._d.valueOf()-(this._offset||0)*6e4}function RF(){return Math.floor(this.valueOf()/1e3)}function NF(){return new Date(this.valueOf())}function PF(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function jF(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function DF(){return this.isValid()?this.toISOString():null}function OF(){return Zg(this)}function AF(){return Vs({},Ve(this))}function MF(){return Ve(this).overflow}function IF(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Re("N",0,0,"eraAbbr");Re("NN",0,0,"eraAbbr");Re("NNN",0,0,"eraAbbr");Re("NNNN",0,0,"eraName");Re("NNNNN",0,0,"eraNarrow");Re("y",["y",1],"yo","eraYear");Re("y",["yy",2],0,"eraYear");Re("y",["yyy",3],0,"eraYear");Re("y",["yyyy",4],0,"eraYear");xe("N",dv);xe("NN",dv);xe("NNN",dv);xe("NNNN",ZF);xe("NNNNN",GF);pt(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,n){var s=r._locale.erasParse(e,n,r._strict);s?Ve(r).era=s:Ve(r).invalidEra=e});xe("y",da);xe("yy",da);xe("yyy",da);xe("yyyy",da);xe("yo",KF);pt(["y","yy","yyy","yyyy"],ir);pt(["yo"],function(e,t,r,n){var s;r._locale._eraYearOrdinalRegex&&(s=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[ir]=r._locale.eraYearOrdinalParse(e,s):t[ir]=parseInt(e,10)});function LF(e,t){var r,n,s,o=this._eras||Cs("en")._eras;for(r=0,n=o.length;r=0)return o[n]}function zF(e,t){var r=e.since<=e.until?1:-1;return t===void 0?me(e.since).year():me(e.since).year()+(t-e.offset)*r}function UF(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;eo&&(t=o),r4.call(this,e,t,r,n,s))}function r4(e,t,r,n,s){var o=MS(e,t,r,n,s),i=Nl(o.year,0,o.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}Re("Q",0,"Qo","quarter");xe("Q",kS);pt("Q",function(e,t){t[ns]=(Ke(e)-1)*3});function n4(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Re("D",["DD",2],"Do","date");xe("D",bt,fa);xe("DD",bt,$r);xe("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});pt(["D","DD"],Tn);pt("Do",function(e,t){t[Tn]=Ke(e.match(bt)[0])});var nk=ha("Date",!0);Re("DDD",["DDDD",3],"DDDo","dayOfYear");xe("DDD",of);xe("DDDD",CS);pt(["DDD","DDDD"],function(e,t,r){r._dayOfYear=Ke(e)});function s4(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Re("m",["mm",2],0,"minute");xe("m",bt,ev);xe("mm",bt,$r);pt(["m","mm"],ln);var o4=ha("Minutes",!1);Re("s",["ss",2],0,"second");xe("s",bt,ev);xe("ss",bt,$r);pt(["s","ss"],ss);var i4=ha("Seconds",!1);Re("S",0,0,function(){return~~(this.millisecond()/100)});Re(0,["SS",2],0,function(){return~~(this.millisecond()/10)});Re(0,["SSS",3],0,"millisecond");Re(0,["SSSS",4],0,function(){return this.millisecond()*10});Re(0,["SSSSS",5],0,function(){return this.millisecond()*100});Re(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});Re(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});Re(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});Re(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});xe("S",of,kS);xe("SS",of,$r);xe("SSS",of,CS);var Ws,sk;for(Ws="SSSS";Ws.length<=9;Ws+="S")xe(Ws,da);function a4(e,t){t[To]=Ke(("0."+e)*1e3)}for(Ws="S";Ws.length<=9;Ws+="S")pt(Ws,a4);sk=ha("Milliseconds",!1);Re("z",0,0,"zoneAbbr");Re("zz",0,0,"zoneName");function l4(){return this._isUTC?"UTC":""}function c4(){return this._isUTC?"Coordinated Universal Time":""}var ae=uc.prototype;ae.add=tF;ae.calendar=lF;ae.clone=cF;ae.diff=gF;ae.endOf=EF;ae.format=xF;ae.from=_F;ae.fromNow=bF;ae.to=SF;ae.toNow=kF;ae.get=wI;ae.invalidAt=MF;ae.isAfter=uF;ae.isBefore=dF;ae.isBetween=fF;ae.isSame=hF;ae.isSameOrAfter=pF;ae.isSameOrBefore=mF;ae.isValid=OF;ae.lang=XS;ae.locale=qS;ae.localeData=QS;ae.max=OL;ae.min=DL;ae.parsingFlags=AF;ae.set=xI;ae.startOf=CF;ae.subtract=rF;ae.toArray=PF;ae.toObject=jF;ae.toDate=NF;ae.toISOString=yF;ae.inspect=wF;typeof Symbol<"u"&&Symbol.for!=null&&(ae[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});ae.toJSON=DF;ae.toString=vF;ae.unix=RF;ae.valueOf=TF;ae.creationData=IF;ae.eraName=UF;ae.eraNarrow=$F;ae.eraAbbr=VF;ae.eraYear=WF;ae.year=RS;ae.isLeapYear=yI;ae.weekYear=qF;ae.isoWeekYear=XF;ae.quarter=ae.quarters=n4;ae.month=OS;ae.daysInMonth=NI;ae.week=ae.weeks=LI;ae.isoWeek=ae.isoWeeks=FI;ae.weeksInYear=e4;ae.weeksInWeekYear=t4;ae.isoWeeksInYear=QF;ae.isoWeeksInISOWeekYear=JF;ae.date=nk;ae.day=ae.days=XI;ae.weekday=QI;ae.isoWeekday=JI;ae.dayOfYear=s4;ae.hour=ae.hours=iL;ae.minute=ae.minutes=o4;ae.second=ae.seconds=i4;ae.millisecond=ae.milliseconds=sk;ae.utcOffset=VL;ae.utc=BL;ae.local=HL;ae.parseZone=YL;ae.hasAlignedHourOffset=ZL;ae.isDST=GL;ae.isLocal=qL;ae.isUtcOffset=XL;ae.isUtc=YS;ae.isUTC=YS;ae.zoneAbbr=l4;ae.zoneName=c4;ae.dates=Qr("dates accessor is deprecated. Use date instead.",nk);ae.months=Qr("months accessor is deprecated. Use month instead",OS);ae.years=Qr("years accessor is deprecated. Use year instead",RS);ae.zone=Qr("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",WL);ae.isDSTShifted=Qr("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",KL);function u4(e){return _t(e*1e3)}function d4(){return _t.apply(null,arguments).parseZone()}function ok(e){return e}var it=Kg.prototype;it.calendar=qM;it.longDateFormat=eI;it.invalidDate=rI;it.ordinal=oI;it.preparse=ok;it.postformat=ok;it.relativeTime=aI;it.pastFuture=lI;it.set=GM;it.eras=LF;it.erasParse=FF;it.erasConvertYear=zF;it.erasAbbrRegex=HF;it.erasNameRegex=BF;it.erasNarrowRegex=YF;it.months=CI;it.monthsShort=EI;it.monthsParse=RI;it.monthsRegex=jI;it.monthsShortRegex=PI;it.week=OI;it.firstDayOfYear=II;it.firstDayOfWeek=MI;it.weekdays=YI;it.weekdaysMin=GI;it.weekdaysShort=ZI;it.weekdaysParse=qI;it.weekdaysRegex=eL;it.weekdaysShortRegex=tL;it.weekdaysMinRegex=rL;it.isPM=sL;it.meridiem=aL;function cd(e,t,r,n){var s=Cs(),o=zn().set(n,t);return s[r](o,e)}function ik(e,t,r){if(vs(e)&&(t=e,e=void 0),e=e||"",t!=null)return cd(e,t,r,"month");var n,s=[];for(n=0;n<12;n++)s[n]=cd(e,n,r,"month");return s}function hv(e,t,r,n){typeof e=="boolean"?(vs(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,vs(t)&&(r=t,t=void 0),t=t||"");var s=Cs(),o=e?s._week.dow:0,i,a=[];if(r!=null)return cd(t,(r+o)%7,n,"day");for(i=0;i<7;i++)a[i]=cd(t,(i+o)%7,n,"day");return a}function f4(e,t){return ik(e,t,"months")}function h4(e,t){return ik(e,t,"monthsShort")}function p4(e,t,r){return hv(e,t,r,"weekdays")}function m4(e,t,r){return hv(e,t,r,"weekdaysShort")}function g4(e,t,r){return hv(e,t,r,"weekdaysMin")}Js("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,r=Ke(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+r}});me.lang=Qr("moment.lang is deprecated. Use moment.locale instead.",Js);me.langData=Qr("moment.langData is deprecated. Use moment.localeData instead.",Cs);var Zn=Math.abs;function v4(){var e=this._data;return this._milliseconds=Zn(this._milliseconds),this._days=Zn(this._days),this._months=Zn(this._months),e.milliseconds=Zn(e.milliseconds),e.seconds=Zn(e.seconds),e.minutes=Zn(e.minutes),e.hours=Zn(e.hours),e.months=Zn(e.months),e.years=Zn(e.years),this}function ak(e,t,r,n){var s=xn(t,r);return e._milliseconds+=n*s._milliseconds,e._days+=n*s._days,e._months+=n*s._months,e._bubble()}function y4(e,t){return ak(this,e,t,1)}function w4(e,t){return ak(this,e,t,-1)}function rw(e){return e<0?Math.floor(e):Math.ceil(e)}function x4(){var e=this._milliseconds,t=this._days,r=this._months,n=this._data,s,o,i,a,l;return e>=0&&t>=0&&r>=0||e<=0&&t<=0&&r<=0||(e+=rw(Up(r)+t)*864e5,t=0,r=0),n.milliseconds=e%1e3,s=Yr(e/1e3),n.seconds=s%60,o=Yr(s/60),n.minutes=o%60,i=Yr(o/60),n.hours=i%24,t+=Yr(i/24),l=Yr(lk(t)),r+=l,t-=rw(Up(l)),a=Yr(r/12),r%=12,n.days=t,n.months=r,n.years=a,this}function lk(e){return e*4800/146097}function Up(e){return e*146097/4800}function _4(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if(e=Jr(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+n/864e5,r=this._months+lk(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(Up(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return t*24+n/36e5;case"minute":return t*1440+n/6e4;case"second":return t*86400+n/1e3;case"millisecond":return Math.floor(t*864e5)+n;default:throw new Error("Unknown unit "+e)}}function Es(e){return function(){return this.as(e)}}var ck=Es("ms"),b4=Es("s"),S4=Es("m"),k4=Es("h"),C4=Es("d"),E4=Es("w"),T4=Es("M"),R4=Es("Q"),N4=Es("y"),P4=ck;function j4(){return xn(this)}function D4(e){return e=Jr(e),this.isValid()?this[e+"s"]():NaN}function Xo(e){return function(){return this.isValid()?this._data[e]:NaN}}var O4=Xo("milliseconds"),A4=Xo("seconds"),M4=Xo("minutes"),I4=Xo("hours"),L4=Xo("days"),F4=Xo("months"),z4=Xo("years");function U4(){return Yr(this.days()/7)}var Qn=Math.round,Ci={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function $4(e,t,r,n,s){return s.relativeTime(t||1,!!r,e,n)}function V4(e,t,r,n){var s=xn(e).abs(),o=Qn(s.as("s")),i=Qn(s.as("m")),a=Qn(s.as("h")),l=Qn(s.as("d")),c=Qn(s.as("M")),f=Qn(s.as("w")),d=Qn(s.as("y")),h=o<=r.ss&&["s",o]||o0,h[4]=n,$4.apply(null,h)}function W4(e){return e===void 0?Qn:typeof e=="function"?(Qn=e,!0):!1}function B4(e,t){return Ci[e]===void 0?!1:t===void 0?Ci[e]:(Ci[e]=t,e==="s"&&(Ci.ss=t-1),!0)}function H4(e,t){if(!this.isValid())return this.localeData().invalidDate();var r=!1,n=Ci,s,o;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(r=e),typeof t=="object"&&(n=Object.assign({},Ci,t),t.s!=null&&t.ss==null&&(n.ss=t.s-1)),s=this.localeData(),o=V4(this,!r,n,s),r&&(o=s.pastFuture(+this,o)),s.postformat(o)}var xh=Math.abs;function li(e){return(e>0)-(e<0)||+e}function pf(){if(!this.isValid())return this.localeData().invalidDate();var e=xh(this._milliseconds)/1e3,t=xh(this._days),r=xh(this._months),n,s,o,i,a=this.asSeconds(),l,c,f,d;return a?(n=Yr(e/60),s=Yr(n/60),e%=60,n%=60,o=Yr(r/12),r%=12,i=e?e.toFixed(3).replace(/\.?0+$/,""):"",l=a<0?"-":"",c=li(this._months)!==li(a)?"-":"",f=li(this._days)!==li(a)?"-":"",d=li(this._milliseconds)!==li(a)?"-":"",l+"P"+(o?c+o+"Y":"")+(r?c+r+"M":"")+(t?f+t+"D":"")+(s||n||e?"T":"")+(s?d+s+"H":"")+(n?d+n+"M":"")+(e?d+i+"S":"")):"P0D"}var Je=ff.prototype;Je.isValid=FL;Je.abs=v4;Je.add=y4;Je.subtract=w4;Je.as=_4;Je.asMilliseconds=ck;Je.asSeconds=b4;Je.asMinutes=S4;Je.asHours=k4;Je.asDays=C4;Je.asWeeks=E4;Je.asMonths=T4;Je.asQuarters=R4;Je.asYears=N4;Je.valueOf=P4;Je._bubble=x4;Je.clone=j4;Je.get=D4;Je.milliseconds=O4;Je.seconds=A4;Je.minutes=M4;Je.hours=I4;Je.days=L4;Je.weeks=U4;Je.months=F4;Je.years=z4;Je.humanize=H4;Je.toISOString=pf;Je.toString=pf;Je.toJSON=pf;Je.locale=qS;Je.localeData=QS;Je.toIsoString=Qr("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",pf);Je.lang=XS;Re("X",0,0,"unix");Re("x",0,0,"valueOf");xe("x",lf);xe("X",fI);pt("X",function(e,t,r){r._d=new Date(parseFloat(e)*1e3)});pt("x",function(e,t,r){r._d=new Date(Ke(e))});//! moment.js +me.version="2.30.1";YM(_t);me.fn=ae;me.min=AL;me.max=ML;me.now=IL;me.utc=zn;me.unix=u4;me.months=f4;me.isDate=cc;me.locale=Js;me.invalid=nf;me.duration=xn;me.isMoment=vn;me.weekdays=p4;me.parseZone=d4;me.localeData=Cs;me.isDuration=xu;me.monthsShort=h4;me.weekdaysMin=g4;me.defineLocale=ov;me.updateLocale=dL;me.locales=fL;me.weekdaysShort=m4;me.normalizeUnits=Jr;me.relativeTimeRounding=W4;me.relativeTimeThreshold=B4;me.calendarFormat=aF;me.prototype=ae;me.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const Y4=async()=>await jt().collection("access").getFullList({sort:"-created",filter:"deleted = null"}),pv=async e=>e.id?await jt().collection("access").update(e.id,e):await jt().collection("access").create(e),Z4=async e=>(e.deleted=me.utc().format("YYYY-MM-DD HH:mm:ss"),await jt().collection("access").update(e.id,e)),G4=(e,t)=>{switch(t.type){case"SET_ACCESSES":return{...e,accesses:t.payload};case"ADD_ACCESS":return{...e,accesses:[t.payload,...e.accesses]};case"DELETE_ACCESS":return{...e,accesses:e.accesses.filter(r=>r.id!==t.payload)};case"UPDATE_ACCESS":return{...e,accesses:e.accesses.map(r=>r.id===t.payload.id?t.payload:r)};default:return e}},uk=w.createContext({}),hc=()=>w.useContext(uk),K4=({children:e})=>{const[t,r]=w.useReducer(G4,{accesses:[]});w.useEffect(()=>{(async()=>{const a=await Y4();r({type:"SET_ACCESSES",payload:a})})()},[]);const n=w.useCallback(i=>{r({type:"DELETE_ACCESS",payload:i})},[]),s=w.useCallback(i=>{r({type:"ADD_ACCESS",payload:i})},[]),o=w.useCallback(i=>{r({type:"UPDATE_ACCESS",payload:i})},[]);return u.jsx(uk.Provider,{value:{config:{accesses:t.accesses},deleteAccess:n,addAccess:s,updateAccess:o},children:e&&e})};function q4(){const e=Ss(),t=po();if(!jt().authStore.isValid||!jt().authStore.isAdmin)return u.jsx(J_,{to:"/login"});const r=t.pathname,n=i=>(console.log(r),i==r?"bg-muted text-primary":"text-muted-foreground"),s=()=>{jt().authStore.clear(),e("/login")},o=()=>{e("/setting/password")};return u.jsx(u.Fragment,{children:u.jsx(K4,{children:u.jsxs("div",{className:"grid min-h-screen w-full md:grid-cols-[220px_1fr] lg:grid-cols-[280px_1fr]",children:[u.jsx("div",{className:"hidden border-r bg-muted/40 md:block",children:u.jsxs("div",{className:"flex h-full max-h-screen flex-col gap-2",children:[u.jsx("div",{className:"flex h-14 items-center border-b px-4 lg:h-[60px] lg:px-6",children:u.jsxs(Kn,{to:"/",className:"flex items-center gap-2 font-semibold",children:[u.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),u.jsx("span",{className:"",children:"Certimate"})]})}),u.jsx("div",{className:"flex-1",children:u.jsxs("nav",{className:"grid items-start px-2 text-sm font-medium lg:px-4",children:[u.jsxs(Kn,{to:"/",className:we("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",n("/")),children:[u.jsx(kp,{className:"h-4 w-4"}),"域名列表"]}),u.jsxs(Kn,{to:"/access",className:we("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",n("/access")),children:[u.jsx(_0,{className:"h-4 w-4"}),"授权管理"]}),u.jsxs(Kn,{to:"/history",className:we("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",n("/history")),children:[u.jsx(w0,{className:"h-4 w-4"}),"部署历史"]})]})})]})}),u.jsxs("div",{className:"flex flex-col",children:[u.jsxs("header",{className:"flex h-14 items-center gap-4 border-b bg-muted/40 px-4 lg:h-[60px] lg:px-6",children:[u.jsxs(uS,{children:[u.jsx(dS,{asChild:!0,children:u.jsxs(Lt,{variant:"outline",size:"icon",className:"shrink-0 md:hidden",children:[u.jsx(WP,{className:"h-5 w-5"}),u.jsx("span",{className:"sr-only",children:"Toggle navigation menu"})]})}),u.jsx(Bg,{side:"left",className:"flex flex-col",children:u.jsxs("nav",{className:"grid gap-2 text-lg font-medium",children:[u.jsxs(Kn,{to:"/",className:"flex items-center gap-2 text-lg font-semibold",children:[u.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),u.jsx("span",{className:"",children:"Certimate"}),u.jsx("span",{className:"sr-only",children:"Certimate"})]}),u.jsxs(Kn,{to:"/",className:we("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",n("/")),children:[u.jsx(kp,{className:"h-5 w-5"}),"域名列表"]}),u.jsxs(Kn,{to:"/access",className:we("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",n("/dns_provider")),children:[u.jsx(_0,{className:"h-5 w-5"}),"授权管理"]}),u.jsxs(Kn,{to:"/history",className:we("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",n("/history")),children:[u.jsx(w0,{className:"h-5 w-5"}),"部署历史"]})]})})]}),u.jsx("div",{className:"w-full flex-1"}),u.jsxs(uM,{children:[u.jsx(dM,{asChild:!0,children:u.jsxs(Lt,{variant:"secondary",size:"icon",className:"rounded-full",children:[u.jsx($P,{className:"h-5 w-5"}),u.jsx("span",{className:"sr-only",children:"Toggle user menu"})]})}),u.jsxs(Bb,{align:"end",children:[u.jsx(Hb,{children:"账户"}),u.jsx(Yb,{}),u.jsx(Op,{onClick:o,children:"设置"}),u.jsx(Op,{onClick:s,children:"退出"})]})]})]}),u.jsxs("main",{className:"flex flex-1 flex-col gap-4 p-4 lg:gap-6 lg:p-6 relative",children:[u.jsx(lg,{}),u.jsxs("div",{className:"fixed right-0 bottom-0 w-full flex justify-between p-5",children:[u.jsx("div",{className:""}),u.jsx("div",{className:"text-muted-foreground text-sm hover:text-stone-900",children:u.jsx("a",{href:"https://github.com/usual2970/certimate/releases",target:"_blank",children:"Certimate v0.0.5"})})]})]})]})]})})})}var X4="Separator",nw="horizontal",Q4=["horizontal","vertical"],dk=w.forwardRef((e,t)=>{const{decorative:r,orientation:n=nw,...s}=e,o=J4(n)?n:nw,a=r?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return u.jsx(De.div,{"data-orientation":o,...a,...s,ref:t})});dk.displayName=X4;function J4(e){return Q4.includes(e)}var fk=dk;const Kt=w.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},s)=>u.jsx(fk,{ref:s,decorative:r,orientation:t,className:we("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));Kt.displayName=fk.displayName;const hk=({phase:e,phaseSuccess:t})=>{let r=u.jsx(u.Fragment,{children:" "});return e==="check"&&(t?r=u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),u.jsx(Kt,{className:"h-1 grow"}),u.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"获取"}),u.jsx(Kt,{className:"h-1 grow"}),u.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]}):r=u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"text-xs text-nowrap text-red-600",children:"检查 "}),u.jsx(Kt,{className:"h-1 grow"}),u.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"获取"}),u.jsx(Kt,{className:"h-1 grow"}),u.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]})),e==="apply"&&(t?r=u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),u.jsx(Kt,{className:"h-1 grow bg-green-600"}),u.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"获取"}),u.jsx(Kt,{className:"h-1 grow"}),u.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]}):r=u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),u.jsx(Kt,{className:"h-1 grow bg-green-600"}),u.jsx("div",{className:"text-xs text-nowrap text-red-600",children:"获取"}),u.jsx(Kt,{className:"h-1 grow"}),u.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]})),e==="deploy"&&(t?r=u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),u.jsx(Kt,{className:"h-1 grow bg-green-600"}),u.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"获取"}),u.jsx(Kt,{className:"h-1 grow bg-green-600"}),u.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"部署"})]}):r=u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),u.jsx(Kt,{className:"h-1 grow bg-green-600"}),u.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"获取"}),u.jsx(Kt,{className:"h-1 grow bg-green-600"}),u.jsx("div",{className:"text-xs text-nowrap text-red-600",children:"部署"})]})),r},sw=({when:e,children:t,fallback:r})=>e?t:r;var pk="AlertDialog",[e3,mU]=Er(pk,[Gb]),Ts=Gb(),mk=e=>{const{__scopeAlertDialog:t,...r}=e,n=Ts(t);return u.jsx($g,{...n,...r,modal:!0})};mk.displayName=pk;var t3="AlertDialogTrigger",gk=w.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Ts(r);return u.jsx(Vg,{...s,...n,ref:t})});gk.displayName=t3;var r3="AlertDialogPortal",vk=e=>{const{__scopeAlertDialog:t,...r}=e,n=Ts(t);return u.jsx(Wg,{...n,...r})};vk.displayName=r3;var n3="AlertDialogOverlay",yk=w.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Ts(r);return u.jsx(oc,{...s,...n,ref:t})});yk.displayName=n3;var Ui="AlertDialogContent",[s3,o3]=e3(Ui),wk=w.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...s}=e,o=Ts(r),i=w.useRef(null),a=ze(t,i),l=w.useRef(null);return u.jsx(_M,{contentName:Ui,titleName:xk,docsSlug:"alert-dialog",children:u.jsx(s3,{scope:r,cancelRef:l,children:u.jsxs(ic,{role:"alertdialog",...o,...s,ref:a,onOpenAutoFocus:le(s.onOpenAutoFocus,c=>{var f;c.preventDefault(),(f=l.current)==null||f.focus({preventScroll:!0})}),onPointerDownOutside:c=>c.preventDefault(),onInteractOutside:c=>c.preventDefault(),children:[u.jsx(ug,{children:n}),u.jsx(a3,{contentRef:i})]})})})});wk.displayName=Ui;var xk="AlertDialogTitle",_k=w.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Ts(r);return u.jsx(ac,{...s,...n,ref:t})});_k.displayName=xk;var bk="AlertDialogDescription",Sk=w.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Ts(r);return u.jsx(lc,{...s,...n,ref:t})});Sk.displayName=bk;var i3="AlertDialogAction",kk=w.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Ts(r);return u.jsx(rf,{...s,...n,ref:t})});kk.displayName=i3;var Ck="AlertDialogCancel",Ek=w.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:s}=o3(Ck,r),o=Ts(r),i=ze(t,s);return u.jsx(rf,{...o,...n,ref:i})});Ek.displayName=Ck;var a3=({contentRef:e})=>{const t=`\`${Ui}\` requires a description for the component to be accessible for screen reader users. + +You can add a description to the \`${Ui}\` by passing a \`${bk}\` component as a child, which also benefits sighted users by adding visible context to the dialog. + +Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Ui}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. + +For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return w.useEffect(()=>{var n;document.getElementById((n=e.current)==null?void 0:n.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},l3=mk,c3=gk,u3=vk,Tk=yk,Rk=wk,Nk=kk,Pk=Ek,jk=_k,Dk=Sk;const d3=l3,f3=c3,h3=u3,Ok=w.forwardRef(({className:e,...t},r)=>u.jsx(Tk,{className:we("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));Ok.displayName=Tk.displayName;const Ak=w.forwardRef(({className:e,...t},r)=>u.jsxs(h3,{children:[u.jsx(Ok,{}),u.jsx(Rk,{ref:r,className:we("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));Ak.displayName=Rk.displayName;const Mk=({className:e,...t})=>u.jsx("div",{className:we("flex flex-col space-y-2 text-center sm:text-left",e),...t});Mk.displayName="AlertDialogHeader";const Ik=({className:e,...t})=>u.jsx("div",{className:we("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ik.displayName="AlertDialogFooter";const Lk=w.forwardRef(({className:e,...t},r)=>u.jsx(jk,{ref:r,className:we("text-lg font-semibold",e),...t}));Lk.displayName=jk.displayName;const Fk=w.forwardRef(({className:e,...t},r)=>u.jsx(Dk,{ref:r,className:we("text-sm text-muted-foreground",e),...t}));Fk.displayName=Dk.displayName;const zk=w.forwardRef(({className:e,...t},r)=>u.jsx(Nk,{ref:r,className:we(fg(),e),...t}));zk.displayName=Nk.displayName;const Uk=w.forwardRef(({className:e,...t},r)=>u.jsx(Pk,{ref:r,className:we(fg({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Uk.displayName=Pk.displayName;function mv(e){const t=w.useRef({value:e,previous:e});return w.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var gv="Switch",[p3,gU]=Er(gv),[m3,g3]=p3(gv),$k=w.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:s,defaultChecked:o,required:i,disabled:a,value:l="on",onCheckedChange:c,...f}=e,[d,h]=w.useState(null),m=ze(t,v=>h(v)),y=w.useRef(!1),p=d?!!d.closest("form"):!0,[x=!1,g]=ps({prop:s,defaultProp:o,onChange:c});return u.jsxs(m3,{scope:r,checked:x,disabled:a,children:[u.jsx(De.button,{type:"button",role:"switch","aria-checked":x,"aria-required":i,"data-state":Bk(x),"data-disabled":a?"":void 0,disabled:a,value:l,...f,ref:m,onClick:le(e.onClick,v=>{g(_=>!_),p&&(y.current=v.isPropagationStopped(),y.current||v.stopPropagation())})}),p&&u.jsx(v3,{control:d,bubbles:!y.current,name:n,value:l,checked:x,required:i,disabled:a,style:{transform:"translateX(-100%)"}})]})});$k.displayName=gv;var Vk="SwitchThumb",Wk=w.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,s=g3(Vk,r);return u.jsx(De.span,{"data-state":Bk(s.checked),"data-disabled":s.disabled?"":void 0,...n,ref:t})});Wk.displayName=Vk;var v3=e=>{const{control:t,checked:r,bubbles:n=!0,...s}=e,o=w.useRef(null),i=mv(r),a=_g(t);return w.useEffect(()=>{const l=o.current,c=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(c,"checked").set;if(i!==r&&d){const h=new Event("click",{bubbles:n});d.call(l,r),l.dispatchEvent(h)}},[i,r,n]),u.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:o,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Bk(e){return e?"checked":"unchecked"}var Hk=$k,y3=Wk;const Yk=w.forwardRef(({className:e,...t},r)=>u.jsx(Hk,{className:we("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:r,children:u.jsx(y3,{className:we("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));Yk.displayName=Hk.displayName;var w3="VisuallyHidden",pc=w.forwardRef((e,t)=>u.jsx(De.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));pc.displayName=w3;var x3=pc,vv="ToastProvider",[yv,_3,b3]=Yd("Toast"),[Zk,vU]=Er("Toast",[b3]),[S3,mf]=Zk(vv),Gk=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:o=50,children:i}=e,[a,l]=w.useState(null),[c,f]=w.useState(0),d=w.useRef(!1),h=w.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${vv}\`. Expected non-empty \`string\`.`),u.jsx(yv.Provider,{scope:t,children:u.jsx(S3,{scope:t,label:r,duration:n,swipeDirection:s,swipeThreshold:o,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:w.useCallback(()=>f(m=>m+1),[]),onToastRemove:w.useCallback(()=>f(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:h,children:i})})};Gk.displayName=vv;var Kk="ToastViewport",k3=["F8"],$p="toast.viewportPause",Vp="toast.viewportResume",qk=w.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=k3,label:s="Notifications ({hotkey})",...o}=e,i=mf(Kk,r),a=_3(r),l=w.useRef(null),c=w.useRef(null),f=w.useRef(null),d=w.useRef(null),h=ze(t,d,i.onViewportChange),m=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=i.toastCount>0;w.useEffect(()=>{const x=g=>{var _;n.every(C=>g[C]||g.code===C)&&((_=d.current)==null||_.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[n]),w.useEffect(()=>{const x=l.current,g=d.current;if(y&&x&&g){const v=()=>{if(!i.isClosePausedRef.current){const T=new CustomEvent($p);g.dispatchEvent(T),i.isClosePausedRef.current=!0}},_=()=>{if(i.isClosePausedRef.current){const T=new CustomEvent(Vp);g.dispatchEvent(T),i.isClosePausedRef.current=!1}},C=T=>{!x.contains(T.relatedTarget)&&_()},E=()=>{x.contains(document.activeElement)||_()};return x.addEventListener("focusin",v),x.addEventListener("focusout",C),x.addEventListener("pointermove",v),x.addEventListener("pointerleave",E),window.addEventListener("blur",v),window.addEventListener("focus",_),()=>{x.removeEventListener("focusin",v),x.removeEventListener("focusout",C),x.removeEventListener("pointermove",v),x.removeEventListener("pointerleave",E),window.removeEventListener("blur",v),window.removeEventListener("focus",_)}}},[y,i.isClosePausedRef]);const p=w.useCallback(({tabbingDirection:x})=>{const v=a().map(_=>{const C=_.ref.current,E=[C,...L3(C)];return x==="forwards"?E:E.reverse()});return(x==="forwards"?v.reverse():v).flat()},[a]);return w.useEffect(()=>{const x=d.current;if(x){const g=v=>{var E,T,P;const _=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!_){const O=document.activeElement,j=v.shiftKey;if(v.target===x&&j){(E=c.current)==null||E.focus();return}const R=p({tabbingDirection:j?"backwards":"forwards"}),F=R.findIndex(b=>b===O);_h(R.slice(F+1))?v.preventDefault():j?(T=c.current)==null||T.focus():(P=f.current)==null||P.focus()}};return x.addEventListener("keydown",g),()=>x.removeEventListener("keydown",g)}},[a,p]),u.jsxs(Vj,{ref:l,role:"region","aria-label":s.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&u.jsx(Wp,{ref:c,onFocusFromOutsideViewport:()=>{const x=p({tabbingDirection:"forwards"});_h(x)}}),u.jsx(yv.Slot,{scope:r,children:u.jsx(De.ol,{tabIndex:-1,...o,ref:h})}),y&&u.jsx(Wp,{ref:f,onFocusFromOutsideViewport:()=>{const x=p({tabbingDirection:"backwards"});_h(x)}})]})});qk.displayName=Kk;var Xk="ToastFocusProxy",Wp=w.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=e,o=mf(Xk,r);return u.jsx(pc,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:i=>{var c;const a=i.relatedTarget;!((c=o.viewport)!=null&&c.contains(a))&&n()}})});Wp.displayName=Xk;var gf="Toast",C3="toast.swipeStart",E3="toast.swipeMove",T3="toast.swipeCancel",R3="toast.swipeEnd",Qk=w.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:o,...i}=e,[a=!0,l]=ps({prop:n,defaultProp:s,onChange:o});return u.jsx(vr,{present:r||a,children:u.jsx(j3,{open:a,...i,ref:t,onClose:()=>l(!1),onPause:Pt(e.onPause),onResume:Pt(e.onResume),onSwipeStart:le(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:le(e.onSwipeMove,c=>{const{x:f,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:le(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:le(e.onSwipeEnd,c=>{const{x:f,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});Qk.displayName=gf;var[N3,P3]=Zk(gf,{onClose(){}}),j3=w.forwardRef((e,t)=>{const{__scopeToast:r,type:n="foreground",duration:s,open:o,onClose:i,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:f,onSwipeMove:d,onSwipeCancel:h,onSwipeEnd:m,...y}=e,p=mf(gf,r),[x,g]=w.useState(null),v=ze(t,b=>g(b)),_=w.useRef(null),C=w.useRef(null),E=s||p.duration,T=w.useRef(0),P=w.useRef(E),O=w.useRef(0),{onToastAdd:j,onToastRemove:L}=p,q=Pt(()=>{var V;(x==null?void 0:x.contains(document.activeElement))&&((V=p.viewport)==null||V.focus()),i()}),R=w.useCallback(b=>{!b||b===1/0||(window.clearTimeout(O.current),T.current=new Date().getTime(),O.current=window.setTimeout(q,b))},[q]);w.useEffect(()=>{const b=p.viewport;if(b){const V=()=>{R(P.current),c==null||c()},te=()=>{const W=new Date().getTime()-T.current;P.current=P.current-W,window.clearTimeout(O.current),l==null||l()};return b.addEventListener($p,te),b.addEventListener(Vp,V),()=>{b.removeEventListener($p,te),b.removeEventListener(Vp,V)}}},[p.viewport,E,l,c,R]),w.useEffect(()=>{o&&!p.isClosePausedRef.current&&R(E)},[o,E,p.isClosePausedRef,R]),w.useEffect(()=>(j(),()=>L()),[j,L]);const F=w.useMemo(()=>x?oC(x):null,[x]);return p.viewport?u.jsxs(u.Fragment,{children:[F&&u.jsx(D3,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:F}),u.jsx(N3,{scope:r,onClose:q,children:xs.createPortal(u.jsx(yv.ItemSlot,{scope:r,children:u.jsx($j,{asChild:!0,onEscapeKeyDown:le(a,()=>{p.isFocusedToastEscapeKeyDownRef.current||q(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:u.jsx(De.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":p.swipeDirection,...y,ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:le(e.onKeyDown,b=>{b.key==="Escape"&&(a==null||a(b.nativeEvent),b.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,q()))}),onPointerDown:le(e.onPointerDown,b=>{b.button===0&&(_.current={x:b.clientX,y:b.clientY})}),onPointerMove:le(e.onPointerMove,b=>{if(!_.current)return;const V=b.clientX-_.current.x,te=b.clientY-_.current.y,W=!!C.current,Z=["left","right"].includes(p.swipeDirection),I=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,Q=Z?I(0,V):0,z=Z?0:I(0,te),$=b.pointerType==="touch"?10:2,de={x:Q,y:z},ne={originalEvent:b,delta:de};W?(C.current=de,eu(E3,d,ne,{discrete:!1})):ow(de,p.swipeDirection,$)?(C.current=de,eu(C3,f,ne,{discrete:!1}),b.target.setPointerCapture(b.pointerId)):(Math.abs(V)>$||Math.abs(te)>$)&&(_.current=null)}),onPointerUp:le(e.onPointerUp,b=>{const V=C.current,te=b.target;if(te.hasPointerCapture(b.pointerId)&&te.releasePointerCapture(b.pointerId),C.current=null,_.current=null,V){const W=b.currentTarget,Z={originalEvent:b,delta:V};ow(V,p.swipeDirection,p.swipeThreshold)?eu(R3,m,Z,{discrete:!0}):eu(T3,h,Z,{discrete:!0}),W.addEventListener("click",I=>I.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),D3=e=>{const{__scopeToast:t,children:r,...n}=e,s=mf(gf,t),[o,i]=w.useState(!1),[a,l]=w.useState(!1);return M3(()=>i(!0)),w.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:u.jsx(rc,{asChild:!0,children:u.jsx(pc,{...n,children:o&&u.jsxs(u.Fragment,{children:[s.label," ",r]})})})},O3="ToastTitle",Jk=w.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return u.jsx(De.div,{...n,ref:t})});Jk.displayName=O3;var A3="ToastDescription",eC=w.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return u.jsx(De.div,{...n,ref:t})});eC.displayName=A3;var tC="ToastAction",rC=w.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?u.jsx(sC,{altText:r,asChild:!0,children:u.jsx(wv,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${tC}\`. Expected non-empty \`string\`.`),null)});rC.displayName=tC;var nC="ToastClose",wv=w.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,s=P3(nC,r);return u.jsx(sC,{asChild:!0,children:u.jsx(De.button,{type:"button",...n,ref:t,onClick:le(e.onClick,s.onClose)})})});wv.displayName=nC;var sC=w.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...s}=e;return u.jsx(De.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:t})});function oC(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),I3(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",o=n.dataset.radixToastAnnounceExclude==="";if(!s)if(o){const i=n.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...oC(n))}}),t}function eu(e,t,r,{discrete:n}){const s=r.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?hg(s,o):s.dispatchEvent(o)}var ow=(e,t,r=0)=>{const n=Math.abs(e.x),s=Math.abs(e.y),o=n>s;return t==="left"||t==="right"?o&&n>r:!o&&s>r};function M3(e=()=>{}){const t=Pt(e);rr(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function I3(e){return e.nodeType===e.ELEMENT_NODE}function L3(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function _h(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var F3=Gk,iC=qk,aC=Qk,lC=Jk,cC=eC,uC=rC,dC=wv;const z3=F3,fC=w.forwardRef(({className:e,...t},r)=>u.jsx(iC,{ref:r,className:we("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));fC.displayName=iC.displayName;const U3=Jl("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),hC=w.forwardRef(({className:e,variant:t,...r},n)=>u.jsx(aC,{ref:n,className:we(U3({variant:t}),e),...r}));hC.displayName=aC.displayName;const $3=w.forwardRef(({className:e,...t},r)=>u.jsx(uC,{ref:r,className:we("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));$3.displayName=uC.displayName;const pC=w.forwardRef(({className:e,...t},r)=>u.jsx(dC,{ref:r,className:we("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:u.jsx(cg,{className:"h-4 w-4"})}));pC.displayName=dC.displayName;const mC=w.forwardRef(({className:e,...t},r)=>u.jsx(lC,{ref:r,className:we("text-sm font-semibold",e),...t}));mC.displayName=lC.displayName;const gC=w.forwardRef(({className:e,...t},r)=>u.jsx(cC,{ref:r,className:we("text-sm opacity-90",e),...t}));gC.displayName=cC.displayName;const V3=1,W3=1e6;let bh=0;function B3(){return bh=(bh+1)%Number.MAX_SAFE_INTEGER,bh.toString()}const Sh=new Map,iw=e=>{if(Sh.has(e))return;const t=setTimeout(()=>{Sh.delete(e),el({type:"REMOVE_TOAST",toastId:e})},W3);Sh.set(e,t)},H3=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,V3)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?iw(r):e.toasts.forEach(n=>{iw(n.id)}),{...e,toasts:e.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},bu=[];let Su={toasts:[]};function el(e){Su=H3(Su,e),bu.forEach(t=>{t(Su)})}function Y3({...e}){const t=B3(),r=s=>el({type:"UPDATE_TOAST",toast:{...s,id:t}}),n=()=>el({type:"DISMISS_TOAST",toastId:t});return el({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||n()}}}),{id:t,dismiss:n,update:r}}function vf(){const[e,t]=w.useState(Su);return w.useEffect(()=>(bu.push(t),()=>{const r=bu.indexOf(t);r>-1&&bu.splice(r,1)}),[e]),{...e,toast:Y3,dismiss:r=>el({type:"DISMISS_TOAST",toastId:r})}}function xv(){const{toasts:e}=vf();return u.jsxs(z3,{children:[e.map(function({id:t,title:r,description:n,action:s,...o}){return u.jsxs(hC,{...o,children:[u.jsxs("div",{className:"grid gap-1",children:[r&&u.jsx(mC,{children:r}),n&&u.jsx(gC,{children:n})]}),s,u.jsx(pC,{})]},t)}),u.jsx(fC,{})]})}var[yf,yU]=Er("Tooltip",[ua]),wf=ua(),vC="TooltipProvider",Z3=700,Bp="tooltip.open",[G3,_v]=yf(vC),yC=e=>{const{__scopeTooltip:t,delayDuration:r=Z3,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:o}=e,[i,a]=w.useState(!0),l=w.useRef(!1),c=w.useRef(0);return w.useEffect(()=>{const f=c.current;return()=>window.clearTimeout(f)},[]),u.jsx(G3,{scope:t,isOpenDelayed:i,delayDuration:r,onOpen:w.useCallback(()=>{window.clearTimeout(c.current),a(!1)},[]),onClose:w.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a(!0),n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:w.useCallback(f=>{l.current=f},[]),disableHoverableContent:s,children:o})};yC.displayName=vC;var xf="Tooltip",[K3,_f]=yf(xf),wC=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:s=!1,onOpenChange:o,disableHoverableContent:i,delayDuration:a}=e,l=_v(xf,e.__scopeTooltip),c=wf(t),[f,d]=w.useState(null),h=On(),m=w.useRef(0),y=i??l.disableHoverableContent,p=a??l.delayDuration,x=w.useRef(!1),[g=!1,v]=ps({prop:n,defaultProp:s,onChange:P=>{P?(l.onOpen(),document.dispatchEvent(new CustomEvent(Bp))):l.onClose(),o==null||o(P)}}),_=w.useMemo(()=>g?x.current?"delayed-open":"instant-open":"closed",[g]),C=w.useCallback(()=>{window.clearTimeout(m.current),x.current=!1,v(!0)},[v]),E=w.useCallback(()=>{window.clearTimeout(m.current),v(!1)},[v]),T=w.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{x.current=!0,v(!0)},p)},[p,v]);return w.useEffect(()=>()=>window.clearTimeout(m.current),[]),u.jsx(kg,{...c,children:u.jsx(K3,{scope:t,contentId:h,open:g,stateAttribute:_,trigger:f,onTriggerChange:d,onTriggerEnter:w.useCallback(()=>{l.isOpenDelayed?T():C()},[l.isOpenDelayed,T,C]),onTriggerLeave:w.useCallback(()=>{y?E():window.clearTimeout(m.current)},[E,y]),onOpen:C,onClose:E,disableHoverableContent:y,children:r})})};wC.displayName=xf;var Hp="TooltipTrigger",xC=w.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=_f(Hp,r),o=_v(Hp,r),i=wf(r),a=w.useRef(null),l=ze(t,a,s.onTriggerChange),c=w.useRef(!1),f=w.useRef(!1),d=w.useCallback(()=>c.current=!1,[]);return w.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),u.jsx(Cg,{asChild:!0,...i,children:u.jsx(De.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:l,onPointerMove:le(e.onPointerMove,h=>{h.pointerType!=="touch"&&!f.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),f.current=!0)}),onPointerLeave:le(e.onPointerLeave,()=>{s.onTriggerLeave(),f.current=!1}),onPointerDown:le(e.onPointerDown,()=>{c.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:le(e.onFocus,()=>{c.current||s.onOpen()}),onBlur:le(e.onBlur,s.onClose),onClick:le(e.onClick,s.onClose)})})});xC.displayName=Hp;var q3="TooltipPortal",[wU,X3]=yf(q3,{forceMount:void 0}),qi="TooltipContent",bv=w.forwardRef((e,t)=>{const r=X3(qi,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...o}=e,i=_f(qi,e.__scopeTooltip);return u.jsx(vr,{present:n||i.open,children:i.disableHoverableContent?u.jsx(_C,{side:s,...o,ref:t}):u.jsx(Q3,{side:s,...o,ref:t})})}),Q3=w.forwardRef((e,t)=>{const r=_f(qi,e.__scopeTooltip),n=_v(qi,e.__scopeTooltip),s=w.useRef(null),o=ze(t,s),[i,a]=w.useState(null),{trigger:l,onClose:c}=r,f=s.current,{onPointerInTransitChange:d}=n,h=w.useCallback(()=>{a(null),d(!1)},[d]),m=w.useCallback((y,p)=>{const x=y.currentTarget,g={x:y.clientX,y:y.clientY},v=r5(g,x.getBoundingClientRect()),_=n5(g,v),C=s5(p.getBoundingClientRect()),E=i5([..._,...C]);a(E),d(!0)},[d]);return w.useEffect(()=>()=>h(),[h]),w.useEffect(()=>{if(l&&f){const y=x=>m(x,f),p=x=>m(x,l);return l.addEventListener("pointerleave",y),f.addEventListener("pointerleave",p),()=>{l.removeEventListener("pointerleave",y),f.removeEventListener("pointerleave",p)}}},[l,f,m,h]),w.useEffect(()=>{if(i){const y=p=>{const x=p.target,g={x:p.clientX,y:p.clientY},v=(l==null?void 0:l.contains(x))||(f==null?void 0:f.contains(x)),_=!o5(g,i);v?h():_&&(h(),c())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[l,f,i,c,h]),u.jsx(_C,{...e,ref:o})}),[J3,e5]=yf(xf,{isInside:!1}),_C=w.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:i,...a}=e,l=_f(qi,r),c=wf(r),{onClose:f}=l;return w.useEffect(()=>(document.addEventListener(Bp,f),()=>document.removeEventListener(Bp,f)),[f]),w.useEffect(()=>{if(l.trigger){const d=h=>{const m=h.target;m!=null&&m.contains(l.trigger)&&f()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,f]),u.jsx(aa,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:d=>d.preventDefault(),onDismiss:f,children:u.jsxs(Eg,{"data-state":l.stateAttribute,...c,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[u.jsx(ug,{children:n}),u.jsx(J3,{scope:r,isInside:!0,children:u.jsx(x3,{id:l.contentId,role:"tooltip",children:s||n})})]})})});bv.displayName=qi;var bC="TooltipArrow",t5=w.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=wf(r);return e5(bC,r).isInside?null:u.jsx(Tg,{...s,...n,ref:t})});t5.displayName=bC;function r5(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(r,n,s,o)){case o:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function n5(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function s5(e){const{top:t,right:r,bottom:n,left:s}=e;return[{x:s,y:t},{x:r,y:t},{x:r,y:n},{x:s,y:n}]}function o5(e,t){const{x:r,y:n}=e;let s=!1;for(let o=0,i=t.length-1;on!=f>n&&r<(c-a)*(n-l)/(f-l)+a&&(s=!s)}return s}function i5(e){const t=e.slice();return t.sort((r,n)=>r.xn.x?1:r.yn.y?1:0),a5(t)}function a5(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n=2;){const o=t[t.length-1],i=t[t.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))t.pop();else break}t.push(s)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const s=e[n];for(;r.length>=2;){const o=r[r.length-1],i=r[r.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))r.pop();else break}r.push(s)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var l5=wC,c5=xC,SC=bv;const u5=l5,d5=c5,f5=w.forwardRef(({className:e,sideOffset:t=4,...r},n)=>u.jsx(SC,{ref:n,sideOffset:t,className:we("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));f5.displayName=SC.displayName;function tu(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var kC={exports:{}};/*! + +JSZip v3.10.1 - A JavaScript class for generating and reading zip files + + +(c) 2009-2016 Stuart Knightley +Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown. + +JSZip uses the library pako released under the MIT license : +https://github.com/nodeca/pako/blob/main/LICENSE +*/(function(e,t){(function(r){e.exports=r()})(function(){return function r(n,s,o){function i(c,f){if(!s[c]){if(!n[c]){var d=typeof tu=="function"&&tu;if(!f&&d)return d(c,!0);if(a)return a(c,!0);var h=new Error("Cannot find module '"+c+"'");throw h.code="MODULE_NOT_FOUND",h}var m=s[c]={exports:{}};n[c][0].call(m.exports,function(y){var p=n[c][1][y];return i(p||y)},m,m.exports,r,n,s,o)}return s[c].exports}for(var a=typeof tu=="function"&&tu,l=0;l>2,m=(3&c)<<4|f>>4,y=1<_?(15&f)<<2|d>>6:64,p=2<_?63&d:64,x.push(a.charAt(h)+a.charAt(m)+a.charAt(y)+a.charAt(p));return x.join("")},s.decode=function(l){var c,f,d,h,m,y,p=0,x=0,g="data:";if(l.substr(0,g.length)===g)throw new Error("Invalid base64 input, it looks like a data url.");var v,_=3*(l=l.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(l.charAt(l.length-1)===a.charAt(64)&&_--,l.charAt(l.length-2)===a.charAt(64)&&_--,_%1!=0)throw new Error("Invalid base64 input, bad content length.");for(v=i.uint8array?new Uint8Array(0|_):new Array(0|_);p>4,f=(15&h)<<4|(m=a.indexOf(l.charAt(p++)))>>2,d=(3&m)<<6|(y=a.indexOf(l.charAt(p++))),v[x++]=c,m!==64&&(v[x++]=f),y!==64&&(v[x++]=d);return v}},{"./support":30,"./utils":32}],2:[function(r,n,s){var o=r("./external"),i=r("./stream/DataWorker"),a=r("./stream/Crc32Probe"),l=r("./stream/DataLengthProbe");function c(f,d,h,m,y){this.compressedSize=f,this.uncompressedSize=d,this.crc32=h,this.compression=m,this.compressedContent=y}c.prototype={getContentWorker:function(){var f=new i(o.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),d=this;return f.on("end",function(){if(this.streamInfo.data_length!==d.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),f},getCompressedWorker:function(){return new i(o.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},c.createWorkerFrom=function(f,d,h){return f.pipe(new a).pipe(new l("uncompressedSize")).pipe(d.compressWorker(h)).pipe(new l("compressedSize")).withStreamInfo("compression",d)},n.exports=c},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(r,n,s){var o=r("./stream/GenericWorker");s.STORE={magic:"\0\0",compressWorker:function(){return new o("STORE compression")},uncompressWorker:function(){return new o("STORE decompression")}},s.DEFLATE=r("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(r,n,s){var o=r("./utils"),i=function(){for(var a,l=[],c=0;c<256;c++){a=c;for(var f=0;f<8;f++)a=1&a?3988292384^a>>>1:a>>>1;l[c]=a}return l}();n.exports=function(a,l){return a!==void 0&&a.length?o.getTypeOf(a)!=="string"?function(c,f,d,h){var m=i,y=h+d;c^=-1;for(var p=h;p>>8^m[255&(c^f[p])];return-1^c}(0|l,a,a.length,0):function(c,f,d,h){var m=i,y=h+d;c^=-1;for(var p=h;p>>8^m[255&(c^f.charCodeAt(p))];return-1^c}(0|l,a,a.length,0):0}},{"./utils":32}],5:[function(r,n,s){s.base64=!1,s.binary=!1,s.dir=!1,s.createFolders=!0,s.date=null,s.compression=null,s.compressionOptions=null,s.comment=null,s.unixPermissions=null,s.dosPermissions=null},{}],6:[function(r,n,s){var o=null;o=typeof Promise<"u"?Promise:r("lie"),n.exports={Promise:o}},{lie:37}],7:[function(r,n,s){var o=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",i=r("pako"),a=r("./utils"),l=r("./stream/GenericWorker"),c=o?"uint8array":"array";function f(d,h){l.call(this,"FlateWorker/"+d),this._pako=null,this._pakoAction=d,this._pakoOptions=h,this.meta={}}s.magic="\b\0",a.inherits(f,l),f.prototype.processChunk=function(d){this.meta=d.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(c,d.data),!1)},f.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},f.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},f.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var d=this;this._pako.onData=function(h){d.push({data:h,meta:d.meta})}},s.compressWorker=function(d){return new f("Deflate",d)},s.uncompressWorker=function(){return new f("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(r,n,s){function o(m,y){var p,x="";for(p=0;p>>=8;return x}function i(m,y,p,x,g,v){var _,C,E=m.file,T=m.compression,P=v!==c.utf8encode,O=a.transformTo("string",v(E.name)),j=a.transformTo("string",c.utf8encode(E.name)),L=E.comment,q=a.transformTo("string",v(L)),R=a.transformTo("string",c.utf8encode(L)),F=j.length!==E.name.length,b=R.length!==L.length,V="",te="",W="",Z=E.dir,I=E.date,Q={crc32:0,compressedSize:0,uncompressedSize:0};y&&!p||(Q.crc32=m.crc32,Q.compressedSize=m.compressedSize,Q.uncompressedSize=m.uncompressedSize);var z=0;y&&(z|=8),P||!F&&!b||(z|=2048);var $=0,de=0;Z&&($|=16),g==="UNIX"?(de=798,$|=function(se,Ee){var fe=se;return se||(fe=Ee?16893:33204),(65535&fe)<<16}(E.unixPermissions,Z)):(de=20,$|=function(se){return 63&(se||0)}(E.dosPermissions)),_=I.getUTCHours(),_<<=6,_|=I.getUTCMinutes(),_<<=5,_|=I.getUTCSeconds()/2,C=I.getUTCFullYear()-1980,C<<=4,C|=I.getUTCMonth()+1,C<<=5,C|=I.getUTCDate(),F&&(te=o(1,1)+o(f(O),4)+j,V+="up"+o(te.length,2)+te),b&&(W=o(1,1)+o(f(q),4)+R,V+="uc"+o(W.length,2)+W);var ne="";return ne+=` +\0`,ne+=o(z,2),ne+=T.magic,ne+=o(_,2),ne+=o(C,2),ne+=o(Q.crc32,4),ne+=o(Q.compressedSize,4),ne+=o(Q.uncompressedSize,4),ne+=o(O.length,2),ne+=o(V.length,2),{fileRecord:d.LOCAL_FILE_HEADER+ne+O+V,dirRecord:d.CENTRAL_FILE_HEADER+o(de,2)+ne+o(q.length,2)+"\0\0\0\0"+o($,4)+o(x,4)+O+V+q}}var a=r("../utils"),l=r("../stream/GenericWorker"),c=r("../utf8"),f=r("../crc32"),d=r("../signature");function h(m,y,p,x){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=y,this.zipPlatform=p,this.encodeFileName=x,this.streamFiles=m,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(h,l),h.prototype.push=function(m){var y=m.meta.percent||0,p=this.entriesCount,x=this._sources.length;this.accumulate?this.contentBuffer.push(m):(this.bytesWritten+=m.data.length,l.prototype.push.call(this,{data:m.data,meta:{currentFile:this.currentFile,percent:p?(y+100*(p-x-1))/p:100}}))},h.prototype.openedSource=function(m){this.currentSourceOffset=this.bytesWritten,this.currentFile=m.file.name;var y=this.streamFiles&&!m.file.dir;if(y){var p=i(m,y,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:p.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(m){this.accumulate=!1;var y=this.streamFiles&&!m.file.dir,p=i(m,y,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(p.dirRecord),y)this.push({data:function(x){return d.DATA_DESCRIPTOR+o(x.crc32,4)+o(x.compressedSize,4)+o(x.uncompressedSize,4)}(m),meta:{percent:100}});else for(this.push({data:p.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var m=this.bytesWritten,y=0;y=this.index;l--)c=(c<<8)+this.byteAt(l);return this.index+=a,c},readString:function(a){return o.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},n.exports=i},{"../utils":32}],19:[function(r,n,s){var o=r("./Uint8ArrayReader");function i(a){o.call(this,a)}r("../utils").inherits(i,o),i.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(r,n,s){var o=r("./DataReader");function i(a){o.call(this,a)}r("../utils").inherits(i,o),i.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},i.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},i.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},i.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=i},{"../utils":32,"./DataReader":18}],21:[function(r,n,s){var o=r("./ArrayReader");function i(a){o.call(this,a)}r("../utils").inherits(i,o),i.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(r,n,s){var o=r("../utils"),i=r("../support"),a=r("./ArrayReader"),l=r("./StringReader"),c=r("./NodeBufferReader"),f=r("./Uint8ArrayReader");n.exports=function(d){var h=o.getTypeOf(d);return o.checkSupport(h),h!=="string"||i.uint8array?h==="nodebuffer"?new c(d):i.uint8array?new f(o.transformTo("uint8array",d)):new a(o.transformTo("array",d)):new l(d)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(r,n,s){s.LOCAL_FILE_HEADER="PK",s.CENTRAL_FILE_HEADER="PK",s.CENTRAL_DIRECTORY_END="PK",s.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",s.ZIP64_CENTRAL_DIRECTORY_END="PK",s.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(r,n,s){var o=r("./GenericWorker"),i=r("../utils");function a(l){o.call(this,"ConvertWorker to "+l),this.destType=l}i.inherits(a,o),a.prototype.processChunk=function(l){this.push({data:i.transformTo(this.destType,l.data),meta:l.meta})},n.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(r,n,s){var o=r("./GenericWorker"),i=r("../crc32");function a(){o.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}r("../utils").inherits(a,o),a.prototype.processChunk=function(l){this.streamInfo.crc32=i(l.data,this.streamInfo.crc32||0),this.push(l)},n.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(r,n,s){var o=r("../utils"),i=r("./GenericWorker");function a(l){i.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}o.inherits(a,i),a.prototype.processChunk=function(l){if(l){var c=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=c+l.data.length}i.prototype.processChunk.call(this,l)},n.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(r,n,s){var o=r("../utils"),i=r("./GenericWorker");function a(l){i.call(this,"DataWorker");var c=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(f){c.dataIsReady=!0,c.data=f,c.max=f&&f.length||0,c.type=o.getTypeOf(f),c.isPaused||c._tickAndRepeat()},function(f){c.error(f)})}o.inherits(a,i),a.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,o.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(o.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,c=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,c);break;case"uint8array":l=this.data.subarray(this.index,c);break;case"array":case"nodebuffer":l=this.data.slice(this.index,c)}return this.index=c,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},n.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(r,n,s){function o(i){this.name=i||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}o.prototype={push:function(i){this.emit("data",i)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(i){this.emit("error",i)}return!0},error:function(i){return!this.isFinished&&(this.isPaused?this.generatedError=i:(this.isFinished=!0,this.emit("error",i),this.previous&&this.previous.error(i),this.cleanUp()),!0)},on:function(i,a){return this._listeners[i].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(i,a){if(this._listeners[i])for(var l=0;l "+i:i}},n.exports=o},{}],29:[function(r,n,s){var o=r("../utils"),i=r("./ConvertWorker"),a=r("./GenericWorker"),l=r("../base64"),c=r("../support"),f=r("../external"),d=null;if(c.nodestream)try{d=r("../nodejs/NodejsStreamOutputAdapter")}catch{}function h(y,p){return new f.Promise(function(x,g){var v=[],_=y._internalType,C=y._outputType,E=y._mimeType;y.on("data",function(T,P){v.push(T),p&&p(P)}).on("error",function(T){v=[],g(T)}).on("end",function(){try{var T=function(P,O,j){switch(P){case"blob":return o.newBlob(o.transformTo("arraybuffer",O),j);case"base64":return l.encode(O);default:return o.transformTo(P,O)}}(C,function(P,O){var j,L=0,q=null,R=0;for(j=0;j"u")s.blob=!1;else{var o=new ArrayBuffer(0);try{s.blob=new Blob([o],{type:"application/zip"}).size===0}catch{try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(o),s.blob=i.getBlob("application/zip").size===0}catch{s.blob=!1}}}try{s.nodestream=!!r("readable-stream").Readable}catch{s.nodestream=!1}},{"readable-stream":16}],31:[function(r,n,s){for(var o=r("./utils"),i=r("./support"),a=r("./nodejsUtils"),l=r("./stream/GenericWorker"),c=new Array(256),f=0;f<256;f++)c[f]=252<=f?6:248<=f?5:240<=f?4:224<=f?3:192<=f?2:1;c[254]=c[254]=1;function d(){l.call(this,"utf-8 decode"),this.leftOver=null}function h(){l.call(this,"utf-8 encode")}s.utf8encode=function(m){return i.nodebuffer?a.newBufferFrom(m,"utf-8"):function(y){var p,x,g,v,_,C=y.length,E=0;for(v=0;v>>6:(x<65536?p[_++]=224|x>>>12:(p[_++]=240|x>>>18,p[_++]=128|x>>>12&63),p[_++]=128|x>>>6&63),p[_++]=128|63&x);return p}(m)},s.utf8decode=function(m){return i.nodebuffer?o.transformTo("nodebuffer",m).toString("utf-8"):function(y){var p,x,g,v,_=y.length,C=new Array(2*_);for(p=x=0;p<_;)if((g=y[p++])<128)C[x++]=g;else if(4<(v=c[g]))C[x++]=65533,p+=v-1;else{for(g&=v===2?31:v===3?15:7;1>10&1023,C[x++]=56320|1023&g)}return C.length!==x&&(C.subarray?C=C.subarray(0,x):C.length=x),o.applyFromCharCode(C)}(m=o.transformTo(i.uint8array?"uint8array":"array",m))},o.inherits(d,l),d.prototype.processChunk=function(m){var y=o.transformTo(i.uint8array?"uint8array":"array",m.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var p=y;(y=new Uint8Array(p.length+this.leftOver.length)).set(this.leftOver,0),y.set(p,this.leftOver.length)}else y=this.leftOver.concat(y);this.leftOver=null}var x=function(v,_){var C;for((_=_||v.length)>v.length&&(_=v.length),C=_-1;0<=C&&(192&v[C])==128;)C--;return C<0||C===0?_:C+c[v[C]]>_?C:_}(y),g=y;x!==y.length&&(i.uint8array?(g=y.subarray(0,x),this.leftOver=y.subarray(x,y.length)):(g=y.slice(0,x),this.leftOver=y.slice(x,y.length))),this.push({data:s.utf8decode(g),meta:m.meta})},d.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=d,o.inherits(h,l),h.prototype.processChunk=function(m){this.push({data:s.utf8encode(m.data),meta:m.meta})},s.Utf8EncodeWorker=h},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(r,n,s){var o=r("./support"),i=r("./base64"),a=r("./nodejsUtils"),l=r("./external");function c(p){return p}function f(p,x){for(var g=0;g>8;this.dir=!!(16&this.externalFileAttributes),m==0&&(this.dosPermissions=63&this.externalFileAttributes),m==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var m=o(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=m.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=m.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=m.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=m.readInt(4))}},readExtraFields:function(m){var y,p,x,g=m.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});m.index+4>>6:(m<65536?h[x++]=224|m>>>12:(h[x++]=240|m>>>18,h[x++]=128|m>>>12&63),h[x++]=128|m>>>6&63),h[x++]=128|63&m);return h},s.buf2binstring=function(d){return f(d,d.length)},s.binstring2buf=function(d){for(var h=new o.Buf8(d.length),m=0,y=h.length;m>10&1023,v[y++]=56320|1023&p)}return f(v,y)},s.utf8border=function(d,h){var m;for((h=h||d.length)>d.length&&(h=d.length),m=h-1;0<=m&&(192&d[m])==128;)m--;return m<0||m===0?h:m+l[d[m]]>h?m:h}},{"./common":41}],43:[function(r,n,s){n.exports=function(o,i,a,l){for(var c=65535&o|0,f=o>>>16&65535|0,d=0;a!==0;){for(a-=d=2e3>>1:i>>>1;a[l]=i}return a}();n.exports=function(i,a,l,c){var f=o,d=c+l;i^=-1;for(var h=c;h>>8^f[255&(i^a[h])];return-1^i}},{}],46:[function(r,n,s){var o,i=r("../utils/common"),a=r("./trees"),l=r("./adler32"),c=r("./crc32"),f=r("./messages"),d=0,h=4,m=0,y=-2,p=-1,x=4,g=2,v=8,_=9,C=286,E=30,T=19,P=2*C+1,O=15,j=3,L=258,q=L+j+1,R=42,F=113,b=1,V=2,te=3,W=4;function Z(k,J){return k.msg=f[J],J}function I(k){return(k<<1)-(4k.avail_out&&(G=k.avail_out),G!==0&&(i.arraySet(k.output,J.pending_buf,J.pending_out,G,k.next_out),k.next_out+=G,J.pending_out+=G,k.total_out+=G,k.avail_out-=G,J.pending-=G,J.pending===0&&(J.pending_out=0))}function $(k,J){a._tr_flush_block(k,0<=k.block_start?k.block_start:-1,k.strstart-k.block_start,J),k.block_start=k.strstart,z(k.strm)}function de(k,J){k.pending_buf[k.pending++]=J}function ne(k,J){k.pending_buf[k.pending++]=J>>>8&255,k.pending_buf[k.pending++]=255&J}function se(k,J){var G,D,S=k.max_chain_length,N=k.strstart,A=k.prev_length,Y=k.nice_match,M=k.strstart>k.w_size-q?k.strstart-(k.w_size-q):0,H=k.window,X=k.w_mask,ee=k.prev,he=k.strstart+L,Le=H[N+A-1],Oe=H[N+A];k.prev_length>=k.good_match&&(S>>=2),Y>k.lookahead&&(Y=k.lookahead);do if(H[(G=J)+A]===Oe&&H[G+A-1]===Le&&H[G]===H[N]&&H[++G]===H[N+1]){N+=2,G++;do;while(H[++N]===H[++G]&&H[++N]===H[++G]&&H[++N]===H[++G]&&H[++N]===H[++G]&&H[++N]===H[++G]&&H[++N]===H[++G]&&H[++N]===H[++G]&&H[++N]===H[++G]&&NM&&--S!=0);return A<=k.lookahead?A:k.lookahead}function Ee(k){var J,G,D,S,N,A,Y,M,H,X,ee=k.w_size;do{if(S=k.window_size-k.lookahead-k.strstart,k.strstart>=ee+(ee-q)){for(i.arraySet(k.window,k.window,ee,ee,0),k.match_start-=ee,k.strstart-=ee,k.block_start-=ee,J=G=k.hash_size;D=k.head[--J],k.head[J]=ee<=D?D-ee:0,--G;);for(J=G=ee;D=k.prev[--J],k.prev[J]=ee<=D?D-ee:0,--G;);S+=ee}if(k.strm.avail_in===0)break;if(A=k.strm,Y=k.window,M=k.strstart+k.lookahead,H=S,X=void 0,X=A.avail_in,H=j)for(N=k.strstart-k.insert,k.ins_h=k.window[N],k.ins_h=(k.ins_h<=j&&(k.ins_h=(k.ins_h<=j)if(D=a._tr_tally(k,k.strstart-k.match_start,k.match_length-j),k.lookahead-=k.match_length,k.match_length<=k.max_lazy_match&&k.lookahead>=j){for(k.match_length--;k.strstart++,k.ins_h=(k.ins_h<=j&&(k.ins_h=(k.ins_h<=j&&k.match_length<=k.prev_length){for(S=k.strstart+k.lookahead-j,D=a._tr_tally(k,k.strstart-1-k.prev_match,k.prev_length-j),k.lookahead-=k.prev_length-1,k.prev_length-=2;++k.strstart<=S&&(k.ins_h=(k.ins_h<k.pending_buf_size-5&&(G=k.pending_buf_size-5);;){if(k.lookahead<=1){if(Ee(k),k.lookahead===0&&J===d)return b;if(k.lookahead===0)break}k.strstart+=k.lookahead,k.lookahead=0;var D=k.block_start+G;if((k.strstart===0||k.strstart>=D)&&(k.lookahead=k.strstart-D,k.strstart=D,$(k,!1),k.strm.avail_out===0)||k.strstart-k.block_start>=k.w_size-q&&($(k,!1),k.strm.avail_out===0))return b}return k.insert=0,J===h?($(k,!0),k.strm.avail_out===0?te:W):(k.strstart>k.block_start&&($(k,!1),k.strm.avail_out),b)}),new be(4,4,8,4,fe),new be(4,5,16,8,fe),new be(4,6,32,32,fe),new be(4,4,16,16,ge),new be(8,16,32,32,ge),new be(8,16,128,128,ge),new be(8,32,128,256,ge),new be(32,128,258,1024,ge),new be(32,258,258,4096,ge)],s.deflateInit=function(k,J){return qe(k,J,v,15,8,0)},s.deflateInit2=qe,s.deflateReset=Se,s.deflateResetKeep=Te,s.deflateSetHeader=function(k,J){return k&&k.state?k.state.wrap!==2?y:(k.state.gzhead=J,m):y},s.deflate=function(k,J){var G,D,S,N;if(!k||!k.state||5>8&255),de(D,D.gzhead.time>>16&255),de(D,D.gzhead.time>>24&255),de(D,D.level===9?2:2<=D.strategy||D.level<2?4:0),de(D,255&D.gzhead.os),D.gzhead.extra&&D.gzhead.extra.length&&(de(D,255&D.gzhead.extra.length),de(D,D.gzhead.extra.length>>8&255)),D.gzhead.hcrc&&(k.adler=c(k.adler,D.pending_buf,D.pending,0)),D.gzindex=0,D.status=69):(de(D,0),de(D,0),de(D,0),de(D,0),de(D,0),de(D,D.level===9?2:2<=D.strategy||D.level<2?4:0),de(D,3),D.status=F);else{var A=v+(D.w_bits-8<<4)<<8;A|=(2<=D.strategy||D.level<2?0:D.level<6?1:D.level===6?2:3)<<6,D.strstart!==0&&(A|=32),A+=31-A%31,D.status=F,ne(D,A),D.strstart!==0&&(ne(D,k.adler>>>16),ne(D,65535&k.adler)),k.adler=1}if(D.status===69)if(D.gzhead.extra){for(S=D.pending;D.gzindex<(65535&D.gzhead.extra.length)&&(D.pending!==D.pending_buf_size||(D.gzhead.hcrc&&D.pending>S&&(k.adler=c(k.adler,D.pending_buf,D.pending-S,S)),z(k),S=D.pending,D.pending!==D.pending_buf_size));)de(D,255&D.gzhead.extra[D.gzindex]),D.gzindex++;D.gzhead.hcrc&&D.pending>S&&(k.adler=c(k.adler,D.pending_buf,D.pending-S,S)),D.gzindex===D.gzhead.extra.length&&(D.gzindex=0,D.status=73)}else D.status=73;if(D.status===73)if(D.gzhead.name){S=D.pending;do{if(D.pending===D.pending_buf_size&&(D.gzhead.hcrc&&D.pending>S&&(k.adler=c(k.adler,D.pending_buf,D.pending-S,S)),z(k),S=D.pending,D.pending===D.pending_buf_size)){N=1;break}N=D.gzindexS&&(k.adler=c(k.adler,D.pending_buf,D.pending-S,S)),N===0&&(D.gzindex=0,D.status=91)}else D.status=91;if(D.status===91)if(D.gzhead.comment){S=D.pending;do{if(D.pending===D.pending_buf_size&&(D.gzhead.hcrc&&D.pending>S&&(k.adler=c(k.adler,D.pending_buf,D.pending-S,S)),z(k),S=D.pending,D.pending===D.pending_buf_size)){N=1;break}N=D.gzindexS&&(k.adler=c(k.adler,D.pending_buf,D.pending-S,S)),N===0&&(D.status=103)}else D.status=103;if(D.status===103&&(D.gzhead.hcrc?(D.pending+2>D.pending_buf_size&&z(k),D.pending+2<=D.pending_buf_size&&(de(D,255&k.adler),de(D,k.adler>>8&255),k.adler=0,D.status=F)):D.status=F),D.pending!==0){if(z(k),k.avail_out===0)return D.last_flush=-1,m}else if(k.avail_in===0&&I(J)<=I(G)&&J!==h)return Z(k,-5);if(D.status===666&&k.avail_in!==0)return Z(k,-5);if(k.avail_in!==0||D.lookahead!==0||J!==d&&D.status!==666){var Y=D.strategy===2?function(M,H){for(var X;;){if(M.lookahead===0&&(Ee(M),M.lookahead===0)){if(H===d)return b;break}if(M.match_length=0,X=a._tr_tally(M,0,M.window[M.strstart]),M.lookahead--,M.strstart++,X&&($(M,!1),M.strm.avail_out===0))return b}return M.insert=0,H===h?($(M,!0),M.strm.avail_out===0?te:W):M.last_lit&&($(M,!1),M.strm.avail_out===0)?b:V}(D,J):D.strategy===3?function(M,H){for(var X,ee,he,Le,Oe=M.window;;){if(M.lookahead<=L){if(Ee(M),M.lookahead<=L&&H===d)return b;if(M.lookahead===0)break}if(M.match_length=0,M.lookahead>=j&&0M.lookahead&&(M.match_length=M.lookahead)}if(M.match_length>=j?(X=a._tr_tally(M,1,M.match_length-j),M.lookahead-=M.match_length,M.strstart+=M.match_length,M.match_length=0):(X=a._tr_tally(M,0,M.window[M.strstart]),M.lookahead--,M.strstart++),X&&($(M,!1),M.strm.avail_out===0))return b}return M.insert=0,H===h?($(M,!0),M.strm.avail_out===0?te:W):M.last_lit&&($(M,!1),M.strm.avail_out===0)?b:V}(D,J):o[D.level].func(D,J);if(Y!==te&&Y!==W||(D.status=666),Y===b||Y===te)return k.avail_out===0&&(D.last_flush=-1),m;if(Y===V&&(J===1?a._tr_align(D):J!==5&&(a._tr_stored_block(D,0,0,!1),J===3&&(Q(D.head),D.lookahead===0&&(D.strstart=0,D.block_start=0,D.insert=0))),z(k),k.avail_out===0))return D.last_flush=-1,m}return J!==h?m:D.wrap<=0?1:(D.wrap===2?(de(D,255&k.adler),de(D,k.adler>>8&255),de(D,k.adler>>16&255),de(D,k.adler>>24&255),de(D,255&k.total_in),de(D,k.total_in>>8&255),de(D,k.total_in>>16&255),de(D,k.total_in>>24&255)):(ne(D,k.adler>>>16),ne(D,65535&k.adler)),z(k),0=G.w_size&&(N===0&&(Q(G.head),G.strstart=0,G.block_start=0,G.insert=0),H=new i.Buf8(G.w_size),i.arraySet(H,J,X-G.w_size,G.w_size,0),J=H,X=G.w_size),A=k.avail_in,Y=k.next_in,M=k.input,k.avail_in=X,k.next_in=0,k.input=J,Ee(G);G.lookahead>=j;){for(D=G.strstart,S=G.lookahead-(j-1);G.ins_h=(G.ins_h<>>=j=O>>>24,_-=j,(j=O>>>16&255)===0)V[f++]=65535&O;else{if(!(16&j)){if(!(64&j)){O=C[(65535&O)+(v&(1<>>=j,_-=j),_<15&&(v+=b[l++]<<_,_+=8,v+=b[l++]<<_,_+=8),O=E[v&P];r:for(;;){if(v>>>=j=O>>>24,_-=j,!(16&(j=O>>>16&255))){if(!(64&j)){O=E[(65535&O)+(v&(1<>>=j,_-=j,(j=f-d)>3,v&=(1<<(_-=L<<3))-1,o.next_in=l,o.next_out=f,o.avail_in=l>>24&255)+(R>>>8&65280)+((65280&R)<<8)+((255&R)<<24)}function v(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new o.Buf16(320),this.work=new o.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function _(R){var F;return R&&R.state?(F=R.state,R.total_in=R.total_out=F.total=0,R.msg="",F.wrap&&(R.adler=1&F.wrap),F.mode=y,F.last=0,F.havedict=0,F.dmax=32768,F.head=null,F.hold=0,F.bits=0,F.lencode=F.lendyn=new o.Buf32(p),F.distcode=F.distdyn=new o.Buf32(x),F.sane=1,F.back=-1,h):m}function C(R){var F;return R&&R.state?((F=R.state).wsize=0,F.whave=0,F.wnext=0,_(R)):m}function E(R,F){var b,V;return R&&R.state?(V=R.state,F<0?(b=0,F=-F):(b=1+(F>>4),F<48&&(F&=15)),F&&(F<8||15=W.wsize?(o.arraySet(W.window,F,b-W.wsize,W.wsize,0),W.wnext=0,W.whave=W.wsize):(V<(te=W.wsize-W.wnext)&&(te=V),o.arraySet(W.window,F,b-V,te,W.wnext),(V-=te)?(o.arraySet(W.window,F,b-V,V,0),W.wnext=V,W.whave=W.wsize):(W.wnext+=te,W.wnext===W.wsize&&(W.wnext=0),W.whave>>8&255,b.check=a(b.check,N,2,0),$=z=0,b.mode=2;break}if(b.flags=0,b.head&&(b.head.done=!1),!(1&b.wrap)||(((255&z)<<8)+(z>>8))%31){R.msg="incorrect header check",b.mode=30;break}if((15&z)!=8){R.msg="unknown compression method",b.mode=30;break}if($-=4,k=8+(15&(z>>>=4)),b.wbits===0)b.wbits=k;else if(k>b.wbits){R.msg="invalid window size",b.mode=30;break}b.dmax=1<>8&1),512&b.flags&&(N[0]=255&z,N[1]=z>>>8&255,b.check=a(b.check,N,2,0)),$=z=0,b.mode=3;case 3:for(;$<32;){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}b.head&&(b.head.time=z),512&b.flags&&(N[0]=255&z,N[1]=z>>>8&255,N[2]=z>>>16&255,N[3]=z>>>24&255,b.check=a(b.check,N,4,0)),$=z=0,b.mode=4;case 4:for(;$<16;){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}b.head&&(b.head.xflags=255&z,b.head.os=z>>8),512&b.flags&&(N[0]=255&z,N[1]=z>>>8&255,b.check=a(b.check,N,2,0)),$=z=0,b.mode=5;case 5:if(1024&b.flags){for(;$<16;){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}b.length=z,b.head&&(b.head.extra_len=z),512&b.flags&&(N[0]=255&z,N[1]=z>>>8&255,b.check=a(b.check,N,2,0)),$=z=0}else b.head&&(b.head.extra=null);b.mode=6;case 6:if(1024&b.flags&&(I<(se=b.length)&&(se=I),se&&(b.head&&(k=b.head.extra_len-b.length,b.head.extra||(b.head.extra=new Array(b.head.extra_len)),o.arraySet(b.head.extra,V,W,se,k)),512&b.flags&&(b.check=a(b.check,V,se,W)),I-=se,W+=se,b.length-=se),b.length))break e;b.length=0,b.mode=7;case 7:if(2048&b.flags){if(I===0)break e;for(se=0;k=V[W+se++],b.head&&k&&b.length<65536&&(b.head.name+=String.fromCharCode(k)),k&&se>9&1,b.head.done=!0),R.adler=b.check=0,b.mode=12;break;case 10:for(;$<32;){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}R.adler=b.check=g(z),$=z=0,b.mode=11;case 11:if(b.havedict===0)return R.next_out=Z,R.avail_out=Q,R.next_in=W,R.avail_in=I,b.hold=z,b.bits=$,2;R.adler=b.check=1,b.mode=12;case 12:if(F===5||F===6)break e;case 13:if(b.last){z>>>=7&$,$-=7&$,b.mode=27;break}for(;$<3;){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}switch(b.last=1&z,$-=1,3&(z>>>=1)){case 0:b.mode=14;break;case 1:if(L(b),b.mode=20,F!==6)break;z>>>=2,$-=2;break e;case 2:b.mode=17;break;case 3:R.msg="invalid block type",b.mode=30}z>>>=2,$-=2;break;case 14:for(z>>>=7&$,$-=7&$;$<32;){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}if((65535&z)!=(z>>>16^65535)){R.msg="invalid stored block lengths",b.mode=30;break}if(b.length=65535&z,$=z=0,b.mode=15,F===6)break e;case 15:b.mode=16;case 16:if(se=b.length){if(I>>=5,$-=5,b.ndist=1+(31&z),z>>>=5,$-=5,b.ncode=4+(15&z),z>>>=4,$-=4,286>>=3,$-=3}for(;b.have<19;)b.lens[A[b.have++]]=0;if(b.lencode=b.lendyn,b.lenbits=7,G={bits:b.lenbits},J=c(0,b.lens,0,19,b.lencode,0,b.work,G),b.lenbits=G.bits,J){R.msg="invalid code lengths set",b.mode=30;break}b.have=0,b.mode=19;case 19:for(;b.have>>16&255,Pe=65535&S,!((ge=S>>>24)<=$);){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}if(Pe<16)z>>>=ge,$-=ge,b.lens[b.have++]=Pe;else{if(Pe===16){for(D=ge+2;$>>=ge,$-=ge,b.have===0){R.msg="invalid bit length repeat",b.mode=30;break}k=b.lens[b.have-1],se=3+(3&z),z>>>=2,$-=2}else if(Pe===17){for(D=ge+3;$>>=ge)),z>>>=3,$-=3}else{for(D=ge+7;$>>=ge)),z>>>=7,$-=7}if(b.have+se>b.nlen+b.ndist){R.msg="invalid bit length repeat",b.mode=30;break}for(;se--;)b.lens[b.have++]=k}}if(b.mode===30)break;if(b.lens[256]===0){R.msg="invalid code -- missing end-of-block",b.mode=30;break}if(b.lenbits=9,G={bits:b.lenbits},J=c(f,b.lens,0,b.nlen,b.lencode,0,b.work,G),b.lenbits=G.bits,J){R.msg="invalid literal/lengths set",b.mode=30;break}if(b.distbits=6,b.distcode=b.distdyn,G={bits:b.distbits},J=c(d,b.lens,b.nlen,b.ndist,b.distcode,0,b.work,G),b.distbits=G.bits,J){R.msg="invalid distances set",b.mode=30;break}if(b.mode=20,F===6)break e;case 20:b.mode=21;case 21:if(6<=I&&258<=Q){R.next_out=Z,R.avail_out=Q,R.next_in=W,R.avail_in=I,b.hold=z,b.bits=$,l(R,ne),Z=R.next_out,te=R.output,Q=R.avail_out,W=R.next_in,V=R.input,I=R.avail_in,z=b.hold,$=b.bits,b.mode===12&&(b.back=-1);break}for(b.back=0;be=(S=b.lencode[z&(1<>>16&255,Pe=65535&S,!((ge=S>>>24)<=$);){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}if(be&&!(240&be)){for(Te=ge,Se=be,qe=Pe;be=(S=b.lencode[qe+((z&(1<>Te)])>>>16&255,Pe=65535&S,!(Te+(ge=S>>>24)<=$);){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}z>>>=Te,$-=Te,b.back+=Te}if(z>>>=ge,$-=ge,b.back+=ge,b.length=Pe,be===0){b.mode=26;break}if(32&be){b.back=-1,b.mode=12;break}if(64&be){R.msg="invalid literal/length code",b.mode=30;break}b.extra=15&be,b.mode=22;case 22:if(b.extra){for(D=b.extra;$>>=b.extra,$-=b.extra,b.back+=b.extra}b.was=b.length,b.mode=23;case 23:for(;be=(S=b.distcode[z&(1<>>16&255,Pe=65535&S,!((ge=S>>>24)<=$);){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}if(!(240&be)){for(Te=ge,Se=be,qe=Pe;be=(S=b.distcode[qe+((z&(1<>Te)])>>>16&255,Pe=65535&S,!(Te+(ge=S>>>24)<=$);){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}z>>>=Te,$-=Te,b.back+=Te}if(z>>>=ge,$-=ge,b.back+=ge,64&be){R.msg="invalid distance code",b.mode=30;break}b.offset=Pe,b.extra=15&be,b.mode=24;case 24:if(b.extra){for(D=b.extra;$>>=b.extra,$-=b.extra,b.back+=b.extra}if(b.offset>b.dmax){R.msg="invalid distance too far back",b.mode=30;break}b.mode=25;case 25:if(Q===0)break e;if(se=ne-Q,b.offset>se){if((se=b.offset-se)>b.whave&&b.sane){R.msg="invalid distance too far back",b.mode=30;break}Ee=se>b.wnext?(se-=b.wnext,b.wsize-se):b.wnext-se,se>b.length&&(se=b.length),fe=b.window}else fe=te,Ee=Z-b.offset,se=b.length;for(QP?(j=Ee[fe+x[F]],$[de+x[F]]):(j=96,0),v=1<>Z)+(_-=v)]=O<<24|j<<16|L|0,_!==0;);for(v=1<>=1;if(v!==0?(z&=v-1,z+=v):z=0,F++,--ne[R]==0){if(R===V)break;R=d[h+x[F]]}if(te>>7)]}function de(S,N){S.pending_buf[S.pending++]=255&N,S.pending_buf[S.pending++]=N>>>8&255}function ne(S,N,A){S.bi_valid>g-A?(S.bi_buf|=N<>g-S.bi_valid,S.bi_valid+=A-g):(S.bi_buf|=N<>>=1,A<<=1,0<--N;);return A>>>1}function fe(S,N,A){var Y,M,H=new Array(x+1),X=0;for(Y=1;Y<=x;Y++)H[Y]=X=X+A[Y-1]<<1;for(M=0;M<=N;M++){var ee=S[2*M+1];ee!==0&&(S[2*M]=Ee(H[ee]++,ee))}}function ge(S){var N;for(N=0;N>1;1<=A;A--)Te(S,H,A);for(M=he;A=S.heap[1],S.heap[1]=S.heap[S.heap_len--],Te(S,H,1),Y=S.heap[1],S.heap[--S.heap_max]=A,S.heap[--S.heap_max]=Y,H[2*M]=H[2*A]+H[2*Y],S.depth[M]=(S.depth[A]>=S.depth[Y]?S.depth[A]:S.depth[Y])+1,H[2*A+1]=H[2*Y+1]=M,S.heap[1]=M++,Te(S,H,1),2<=S.heap_len;);S.heap[--S.heap_max]=S.heap[1],function(Oe,St){var Vr,Wt,Vn,et,Wn,Bn,Wr=St.dyn_tree,yc=St.max_code,wc=St.stat_desc.static_tree,Qo=St.stat_desc.has_stree,xc=St.stat_desc.extra_bits,Jo=St.stat_desc.extra_base,_n=St.stat_desc.max_length,Rs=0;for(et=0;et<=x;et++)Oe.bl_count[et]=0;for(Wr[2*Oe.heap[Oe.heap_max]+1]=0,Vr=Oe.heap_max+1;Vr>=7;M>>=1)if(1&Le&&ee.dyn_ltree[2*he]!==0)return i;if(ee.dyn_ltree[18]!==0||ee.dyn_ltree[20]!==0||ee.dyn_ltree[26]!==0)return a;for(he=32;he>>3,(H=S.static_len+3+7>>>3)<=M&&(M=H)):M=H=A+5,A+4<=M&&N!==-1?D(S,N,A,Y):S.strategy===4||H===M?(ne(S,2+(Y?1:0),3),Se(S,q,R)):(ne(S,4+(Y?1:0),3),function(ee,he,Le,Oe){var St;for(ne(ee,he-257,5),ne(ee,Le-1,5),ne(ee,Oe-4,4),St=0;St>>8&255,S.pending_buf[S.d_buf+2*S.last_lit+1]=255&N,S.pending_buf[S.l_buf+S.last_lit]=255&A,S.last_lit++,N===0?S.dyn_ltree[2*A]++:(S.matches++,N--,S.dyn_ltree[2*(b[A]+d+1)]++,S.dyn_dtree[2*$(N)]++),S.last_lit===S.lit_bufsize-1},s._tr_align=function(S){ne(S,2,3),se(S,_,q),function(N){N.bi_valid===16?(de(N,N.bi_buf),N.bi_buf=0,N.bi_valid=0):8<=N.bi_valid&&(N.pending_buf[N.pending++]=255&N.bi_buf,N.bi_buf>>=8,N.bi_valid-=8)}(S)}},{"../utils/common":41}],53:[function(r,n,s){n.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(r,n,s){(function(o){(function(i,a){if(!i.setImmediate){var l,c,f,d,h=1,m={},y=!1,p=i.document,x=Object.getPrototypeOf&&Object.getPrototypeOf(i);x=x&&x.setTimeout?x:i,l={}.toString.call(i.process)==="[object process]"?function(C){process.nextTick(function(){v(C)})}:function(){if(i.postMessage&&!i.importScripts){var C=!0,E=i.onmessage;return i.onmessage=function(){C=!1},i.postMessage("","*"),i.onmessage=E,C}}()?(d="setImmediate$"+Math.random()+"$",i.addEventListener?i.addEventListener("message",_,!1):i.attachEvent("onmessage",_),function(C){i.postMessage(d+C,"*")}):i.MessageChannel?((f=new MessageChannel).port1.onmessage=function(C){v(C.data)},function(C){f.port2.postMessage(C)}):p&&"onreadystatechange"in p.createElement("script")?(c=p.documentElement,function(C){var E=p.createElement("script");E.onreadystatechange=function(){v(C),E.onreadystatechange=null,c.removeChild(E),E=null},c.appendChild(E)}):function(C){setTimeout(v,0,C)},x.setImmediate=function(C){typeof C!="function"&&(C=new Function(""+C));for(var E=new Array(arguments.length-1),T=0;T"u"?o===void 0?this:o:self)}).call(this,typeof Cc<"u"?Cc:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(kC);var h5=kC.exports;const p5=cm(h5);function m5(e){return new Promise((t,r)=>{const n=new FileReader;n.onload=()=>{n.result?t(n.result.toString()):r("No content found")},n.onerror=()=>r(n.error),n.readAsText(e)})}const g5=async(e,t)=>{const r=new p5;t.forEach(o=>{r.file(o.name,o.content)});const n=await r.generateAsync({type:"blob"}),s=document.createElement("a");s.href=URL.createObjectURL(n),s.download=e,s.click()},Dl=e=>{const t=new Date(e);return new Intl.DateTimeFormat("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1,timeZone:"Asia/Shanghai"}).format(t)},v5=e=>Dl(e).split(" ")[0],y5=async()=>jt().collection("domains").getFullList({sort:"-created",expand:"lastDeployment"}),w5=async e=>await jt().collection("domains").getOne(e),Yp=async e=>e.id?await jt().collection("domains").update(e.id,e):await jt().collection("domains").create(e),x5=async e=>await jt().collection("domains").delete(e),_5=(e,t)=>jt().collection("domains").subscribe(e,r=>{r.action==="update"&&t(r.record)},{expand:"lastDeployment"}),b5=e=>{jt().collection("domains").unsubscribe(e)},S5=()=>{const e=vf(),t=Ss(),r=()=>{t("/edit")},n=d=>{t(`/edit?id=${d}`)},s=d=>{t(`/history?domain=${d}`)},o=async d=>{try{await x5(d),a(i.filter(h=>h.id!==d))}catch(h){console.error("Error deleting domain:",h)}},[i,a]=w.useState([]);w.useEffect(()=>{(async()=>{const h=await y5();a(h)})()},[]);const l=async d=>{const h=i.filter(x=>x.id===d),m=h[0].enabled,y=h[0];y.enabled=!m,await Yp(y);const p=i.map(x=>x.id===d?{...x,checked:!m}:x);a(p)},c=async d=>{try{b5(d.id),_5(d.id,h=>{console.log(h);const m=i.map(y=>y.id===h.id?{...h}:y);a(m)}),d.rightnow=!0,await Yp(d),e.toast({title:"操作成功",description:"已发起部署,请稍后查看部署日志。"})}catch{e.toast({title:"执行失败",description:u.jsxs(u.Fragment,{children:["执行失败,请查看",u.jsx(Kn,{to:`/history?domain=${d.id}`,className:"underline text-blue-500",children:"部署日志"}),"查看详情。"]}),variant:"destructive"})}},f=async d=>{const h=`${d.id}-${d.domain}.zip`,m=[{name:`${d.domain}.pem`,content:d.certificate?d.certificate:""},{name:`${d.domain}.key`,content:d.privateKey?d.privateKey:""}];await g5(h,m)};return u.jsx(u.Fragment,{children:u.jsxs("div",{className:"",children:[u.jsx(xv,{}),u.jsxs("div",{className:"flex justify-between items-center",children:[u.jsx("div",{className:"text-muted-foreground",children:"域名列表"}),u.jsx(Lt,{onClick:r,children:"新增域名"})]}),i.length?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b sm:p-2 mt-5",children:[u.jsx("div",{className:"w-40",children:"域名"}),u.jsx("div",{className:"w-48",children:"有效期限"}),u.jsx("div",{className:"w-32",children:"最近执行状态"}),u.jsx("div",{className:"w-64",children:"最近执行阶段"}),u.jsx("div",{className:"w-40 sm:ml-2",children:"最近执行时间"}),u.jsx("div",{className:"w-32",children:"是否启用"}),u.jsx("div",{className:"grow",children:"操作"})]}),u.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"域名"}),i.map(d=>{var h,m,y,p,x,g;return u.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b sm:p-2 hover:bg-muted/50 text-sm",children:[u.jsx("div",{className:"sm:w-40 w-full pt-1 sm:pt-0 flex items-center",children:d.domain}),u.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:u.jsx("div",{children:d.expiredAt?u.jsxs(u.Fragment,{children:[u.jsx("div",{children:"有效期90天"}),u.jsxs("div",{children:[v5(d.expiredAt),"到期"]})]}):"---"})}),u.jsx("div",{className:"sm:w-32 w-full pt-1 sm:pt-0 flex items-center",children:d.lastDeployedAt&&((h=d.expand)!=null&&h.lastDeployment)?u.jsx(u.Fragment,{children:((m=d.expand.lastDeployment)==null?void 0:m.phase)==="deploy"&&((y=d.expand.lastDeployment)!=null&&y.phaseSuccess)?u.jsx(n1,{size:16,className:"text-green-700"}):u.jsx(s1,{size:16,className:"text-red-700"})}):"---"}),u.jsx("div",{className:"sm:w-64 w-full pt-1 sm:pt-0 flex items-center",children:d.lastDeployedAt&&((p=d.expand)!=null&&p.lastDeployment)?u.jsx(hk,{phase:(x=d.expand.lastDeployment)==null?void 0:x.phase,phaseSuccess:(g=d.expand.lastDeployment)==null?void 0:g.phaseSuccess}):"---"}),u.jsx("div",{className:"sm:w-40 pt-1 sm:pt-0 sm:ml-2 flex items-center",children:d.lastDeployedAt?Dl(d.lastDeployedAt):"---"}),u.jsx("div",{className:"sm:w-32 flex items-center",children:u.jsx(yC,{children:u.jsxs(u5,{children:[u.jsx(d5,{children:u.jsx(Yk,{checked:d.enabled,onCheckedChange:()=>{l(d.id)}})}),u.jsx(bv,{children:u.jsx("div",{className:"border rounded-sm px-3 bg-background text-muted-foreground text-xs",children:d.enabled?"禁用":"启用"})})]})})}),u.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[u.jsx(Lt,{variant:"link",className:"p-0",onClick:()=>s(d.id),children:"部署历史"}),u.jsxs(sw,{when:!!d.enabled,children:[u.jsx(Kt,{orientation:"vertical",className:"h-4 mx-2"}),u.jsx(Lt,{variant:"link",className:"p-0",onClick:()=>c(d),children:"立即部署"})]}),u.jsxs(sw,{when:!!d.expiredAt,children:[u.jsx(Kt,{orientation:"vertical",className:"h-4 mx-2"}),u.jsx(Lt,{variant:"link",className:"p-0",onClick:()=>f(d),children:"下载"})]}),!d.enabled&&u.jsxs(u.Fragment,{children:[u.jsx(Kt,{orientation:"vertical",className:"h-4 mx-2"}),u.jsxs(d3,{children:[u.jsx(f3,{asChild:!0,children:u.jsx(Lt,{variant:"link",className:"p-0",children:"删除"})}),u.jsxs(Ak,{children:[u.jsxs(Mk,{children:[u.jsx(Lk,{children:"删除域名"}),u.jsx(Fk,{children:"确定要删除域名吗?"})]}),u.jsxs(Ik,{children:[u.jsx(Uk,{children:"取消"}),u.jsx(zk,{onClick:()=>{o(d.id)},children:"确认"})]})]})]}),u.jsx(Kt,{orientation:"vertical",className:"h-4 mx-2"}),u.jsx(Lt,{variant:"link",className:"p-0",onClick:()=>n(d.id),children:"编辑"})]})]})]},d.id)})]}):u.jsx(u.Fragment,{children:u.jsxs("div",{className:"flex flex-col items-center mt-10",children:[u.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:u.jsx(kp,{size:40,className:"text-primary"})}),u.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:"请添加域名开始部署证书吧。"}),u.jsx(Lt,{onClick:r,className:"mt-3",children:"添加域名"})]})})]})})},ht=w.forwardRef(({className:e,type:t,...r},n)=>u.jsx("input",{type:t,className:we("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...r}));ht.displayName="Input";var mc=e=>e.type==="checkbox",Ei=e=>e instanceof Date,fr=e=>e==null;const CC=e=>typeof e=="object";var Gt=e=>!fr(e)&&!Array.isArray(e)&&CC(e)&&!Ei(e),EC=e=>Gt(e)&&e.target?mc(e.target)?e.target.checked:e.target.value:e,k5=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,TC=(e,t)=>e.has(k5(t)),C5=e=>{const t=e.constructor&&e.constructor.prototype;return Gt(t)&&t.hasOwnProperty("isPrototypeOf")},Sv=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function xr(e){let t;const r=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(Sv&&(e instanceof Blob||e instanceof FileList))&&(r||Gt(e)))if(t=r?[]:{},!r&&!C5(e))t=e;else for(const n in e)e.hasOwnProperty(n)&&(t[n]=xr(e[n]));else return e;return t}var bf=e=>Array.isArray(e)?e.filter(Boolean):[],It=e=>e===void 0,ce=(e,t,r)=>{if(!t||!Gt(e))return r;const n=bf(t.split(/[,[\].]+?/)).reduce((s,o)=>fr(s)?s:s[o],e);return It(n)||n===e?It(e[t])?r:e[t]:n},Rn=e=>typeof e=="boolean",kv=e=>/^\w*$/.test(e),RC=e=>bf(e.replace(/["|']|\]/g,"").split(/\.|\[/)),ct=(e,t,r)=>{let n=-1;const s=kv(t)?[t]:RC(t),o=s.length,i=o-1;for(;++nGe.useContext(NC),E5=e=>{const{children:t,...r}=e;return Ge.createElement(NC.Provider,{value:r},t)};var PC=(e,t,r,n=!0)=>{const s={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(s,o,{get:()=>{const i=o;return t._proxyFormState[i]!==an.all&&(t._proxyFormState[i]=!n||an.all),r&&(r[i]=!0),e[i]}});return s},Nr=e=>Gt(e)&&!Object.keys(e).length,jC=(e,t,r,n)=>{r(e);const{name:s,...o}=e;return Nr(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(i=>t[i]===(!n||an.all))},tl=e=>Array.isArray(e)?e:[e],DC=(e,t,r)=>!e||!t||e===t||tl(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n)));function Cv(e){const t=Ge.useRef(e);t.current=e,Ge.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}function T5(e){const t=Sf(),{control:r=t.control,disabled:n,name:s,exact:o}=e||{},[i,a]=Ge.useState(r._formState),l=Ge.useRef(!0),c=Ge.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),f=Ge.useRef(s);return f.current=s,Cv({disabled:n,next:d=>l.current&&DC(f.current,d.name,o)&&jC(d,c.current,r._updateFormState)&&a({...r._formState,...d}),subject:r._subjects.state}),Ge.useEffect(()=>(l.current=!0,c.current.isValid&&r._updateValid(!0),()=>{l.current=!1}),[r]),PC(i,r,c.current,!1)}var Pn=e=>typeof e=="string",OC=(e,t,r,n,s)=>Pn(e)?(n&&t.watch.add(e),ce(r,e,s)):Array.isArray(e)?e.map(o=>(n&&t.watch.add(o),ce(r,o))):(n&&(t.watchAll=!0),r);function R5(e){const t=Sf(),{control:r=t.control,name:n,defaultValue:s,disabled:o,exact:i}=e||{},a=Ge.useRef(n);a.current=n,Cv({disabled:o,subject:r._subjects.values,next:f=>{DC(a.current,f.name,i)&&c(xr(OC(a.current,r._names,f.values||r._formValues,!1,s)))}});const[l,c]=Ge.useState(r._getWatch(n,s));return Ge.useEffect(()=>r._removeUnmounted()),l}function N5(e){const t=Sf(),{name:r,disabled:n,control:s=t.control,shouldUnregister:o}=e,i=TC(s._names.array,r),a=R5({control:s,name:r,defaultValue:ce(s._formValues,r,ce(s._defaultValues,r,e.defaultValue)),exact:!0}),l=T5({control:s,name:r}),c=Ge.useRef(s.register(r,{...e.rules,value:a,...Rn(e.disabled)?{disabled:e.disabled}:{}}));return Ge.useEffect(()=>{const f=s._options.shouldUnregister||o,d=(h,m)=>{const y=ce(s._fields,h);y&&y._f&&(y._f.mount=m)};if(d(r,!0),f){const h=xr(ce(s._options.defaultValues,r));ct(s._defaultValues,r,h),It(ce(s._formValues,r))&&ct(s._formValues,r,h)}return()=>{(i?f&&!s._state.action:f)?s.unregister(r):d(r,!1)}},[r,s,i,o]),Ge.useEffect(()=>{ce(s._fields,r)&&s._updateDisabledField({disabled:n,fields:s._fields,name:r,value:ce(s._fields,r)._f.value})},[n,r,s]),{field:{name:r,value:a,...Rn(n)||l.disabled?{disabled:l.disabled||n}:{},onChange:Ge.useCallback(f=>c.current.onChange({target:{value:EC(f),name:r},type:ud.CHANGE}),[r]),onBlur:Ge.useCallback(()=>c.current.onBlur({target:{value:ce(s._formValues,r),name:r},type:ud.BLUR}),[r,s]),ref:f=>{const d=ce(s._fields,r);d&&f&&(d._f.ref={focus:()=>f.focus(),select:()=>f.select(),setCustomValidity:h=>f.setCustomValidity(h),reportValidity:()=>f.reportValidity()})}},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!ce(l.errors,r)},isDirty:{enumerable:!0,get:()=>!!ce(l.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!ce(l.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!ce(l.validatingFields,r)},error:{enumerable:!0,get:()=>ce(l.errors,r)}})}}const P5=e=>e.render(N5(e));var AC=(e,t,r,n,s)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:s||!0}}:{},aw=e=>({isOnSubmit:!e||e===an.onSubmit,isOnBlur:e===an.onBlur,isOnChange:e===an.onChange,isOnAll:e===an.all,isOnTouch:e===an.onTouched}),lw=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const rl=(e,t,r,n)=>{for(const s of r||Object.keys(e)){const o=ce(e,s);if(o){const{_f:i,...a}=o;if(i){if(i.refs&&i.refs[0]&&t(i.refs[0],s)&&!n)break;if(i.ref&&t(i.ref,i.name)&&!n)break;rl(a,t)}else Gt(a)&&rl(a,t)}}};var j5=(e,t,r)=>{const n=tl(ce(e,r));return ct(n,"root",t[r]),ct(e,r,n),e},Ev=e=>e.type==="file",Bs=e=>typeof e=="function",dd=e=>{if(!Sv)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},ku=e=>Pn(e),Tv=e=>e.type==="radio",fd=e=>e instanceof RegExp;const cw={value:!1,isValid:!1},uw={value:!0,isValid:!0};var MC=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&&!It(e[0].attributes.value)?It(e[0].value)||e[0].value===""?uw:{value:e[0].value,isValid:!0}:uw:cw}return cw};const dw={isValid:!1,value:null};var IC=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,dw):dw;function fw(e,t,r="validate"){if(ku(e)||Array.isArray(e)&&e.every(ku)||Rn(e)&&!e)return{type:r,message:ku(e)?e:"",ref:t}}var ci=e=>Gt(e)&&!fd(e)?e:{value:e,message:""},hw=async(e,t,r,n,s)=>{const{ref:o,refs:i,required:a,maxLength:l,minLength:c,min:f,max:d,pattern:h,validate:m,name:y,valueAsNumber:p,mount:x,disabled:g}=e._f,v=ce(t,y);if(!x||g)return{};const _=i?i[0]:o,C=R=>{n&&_.reportValidity&&(_.setCustomValidity(Rn(R)?"":R||""),_.reportValidity())},E={},T=Tv(o),P=mc(o),O=T||P,j=(p||Ev(o))&&It(o.value)&&It(v)||dd(o)&&o.value===""||v===""||Array.isArray(v)&&!v.length,L=AC.bind(null,y,r,E),q=(R,F,b,V=Gn.maxLength,te=Gn.minLength)=>{const W=R?F:b;E[y]={type:R?V:te,message:W,ref:o,...L(R?V:te,W)}};if(s?!Array.isArray(v)||!v.length:a&&(!O&&(j||fr(v))||Rn(v)&&!v||P&&!MC(i).isValid||T&&!IC(i).isValid)){const{value:R,message:F}=ku(a)?{value:!!a,message:a}:ci(a);if(R&&(E[y]={type:Gn.required,message:F,ref:_,...L(Gn.required,F)},!r))return C(F),E}if(!j&&(!fr(f)||!fr(d))){let R,F;const b=ci(d),V=ci(f);if(!fr(v)&&!isNaN(v)){const te=o.valueAsNumber||v&&+v;fr(b.value)||(R=te>b.value),fr(V.value)||(F=tenew Date(new Date().toDateString()+" "+Q),Z=o.type=="time",I=o.type=="week";Pn(b.value)&&v&&(R=Z?W(v)>W(b.value):I?v>b.value:te>new Date(b.value)),Pn(V.value)&&v&&(F=Z?W(v)+R.value,V=!fr(F.value)&&v.length<+F.value;if((b||V)&&(q(b,R.message,F.message),!r))return C(E[y].message),E}if(h&&!j&&Pn(v)){const{value:R,message:F}=ci(h);if(fd(R)&&!v.match(R)&&(E[y]={type:Gn.pattern,message:F,ref:o,...L(Gn.pattern,F)},!r))return C(F),E}if(m){if(Bs(m)){const R=await m(v,t),F=fw(R,_);if(F&&(E[y]={...F,...L(Gn.validate,F.message)},!r))return C(F.message),E}else if(Gt(m)){let R={};for(const F in m){if(!Nr(R)&&!r)break;const b=fw(await m[F](v,t),_,F);b&&(R={...b,...L(F,b.message)},C(b.message),r&&(E[y]=R))}if(!Nr(R)&&(E[y]={ref:_,...R},!r))return E}}return C(!0),E};function D5(e,t){const r=t.slice(0,-1).length;let n=0;for(;n{let e=[];return{get observers(){return e},next:s=>{for(const o of e)o.next&&o.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(o=>o!==s)}}),unsubscribe:()=>{e=[]}}},hd=e=>fr(e)||!CC(e);function Ro(e,t){if(hd(e)||hd(t))return e===t;if(Ei(e)&&Ei(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const s of r){const o=e[s];if(!n.includes(s))return!1;if(s!=="ref"){const i=t[s];if(Ei(o)&&Ei(i)||Gt(o)&&Gt(i)||Array.isArray(o)&&Array.isArray(i)?!Ro(o,i):o!==i)return!1}}return!0}var LC=e=>e.type==="select-multiple",A5=e=>Tv(e)||mc(e),Ch=e=>dd(e)&&e.isConnected,FC=e=>{for(const t in e)if(Bs(e[t]))return!0;return!1};function pd(e,t={}){const r=Array.isArray(e);if(Gt(e)||r)for(const n in e)Array.isArray(e[n])||Gt(e[n])&&!FC(e[n])?(t[n]=Array.isArray(e[n])?[]:{},pd(e[n],t[n])):fr(e[n])||(t[n]=!0);return t}function zC(e,t,r){const n=Array.isArray(e);if(Gt(e)||n)for(const s in e)Array.isArray(e[s])||Gt(e[s])&&!FC(e[s])?It(t)||hd(r[s])?r[s]=Array.isArray(e[s])?pd(e[s],[]):{...pd(e[s])}:zC(e[s],fr(t)?{}:t[s],r[s]):r[s]=!Ro(e[s],t[s]);return r}var ru=(e,t)=>zC(e,t,pd(t)),UC=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>It(e)?e:t?e===""?NaN:e&&+e:r&&Pn(e)?new Date(e):n?n(e):e;function Eh(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return Ev(t)?t.files:Tv(t)?IC(e.refs).value:LC(t)?[...t.selectedOptions].map(({value:r})=>r):mc(t)?MC(e.refs).value:UC(It(t.value)?e.ref.value:t.value,e)}var M5=(e,t,r,n)=>{const s={};for(const o of e){const i=ce(t,o);i&&ct(s,o,i._f)}return{criteriaMode:r,names:[...e],fields:s,shouldUseNativeValidation:n}},Aa=e=>It(e)?e:fd(e)?e.source:Gt(e)?fd(e.value)?e.value.source:e.value:e,I5=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function pw(e,t,r){const n=ce(e,r);if(n||kv(r))return{error:n,name:r};const s=r.split(".");for(;s.length;){const o=s.join("."),i=ce(t,o),a=ce(e,o);if(i&&!Array.isArray(i)&&r!==o)return{name:r};if(a&&a.type)return{name:o,error:a};s.pop()}return{name:r}}var L5=(e,t,r,n,s)=>s.isOnAll?!1:!r&&s.isOnTouch?!(t||e):(r?n.isOnBlur:s.isOnBlur)?!e:(r?n.isOnChange:s.isOnChange)?e:!0,F5=(e,t)=>!bf(ce(e,t)).length&&Bt(e,t);const z5={mode:an.onSubmit,reValidateMode:an.onChange,shouldFocusError:!0};function U5(e={}){let t={...z5,...e},r={submitCount:0,isDirty:!1,isLoading:Bs(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},s=Gt(t.defaultValues)||Gt(t.values)?xr(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:xr(s),i={action:!1,mount:!1,watch:!1},a={mount:new Set,unMount:new Set,array:new Set,watch:new Set},l,c=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={values:kh(),array:kh(),state:kh()},h=aw(t.mode),m=aw(t.reValidateMode),y=t.criteriaMode===an.all,p=S=>N=>{clearTimeout(c),c=setTimeout(S,N)},x=async S=>{if(f.isValid||S){const N=t.resolver?Nr((await O()).errors):await L(n,!0);N!==r.isValid&&d.state.next({isValid:N})}},g=(S,N)=>{(f.isValidating||f.validatingFields)&&((S||Array.from(a.mount)).forEach(A=>{A&&(N?ct(r.validatingFields,A,N):Bt(r.validatingFields,A))}),d.state.next({validatingFields:r.validatingFields,isValidating:!Nr(r.validatingFields)}))},v=(S,N=[],A,Y,M=!0,H=!0)=>{if(Y&&A){if(i.action=!0,H&&Array.isArray(ce(n,S))){const X=A(ce(n,S),Y.argA,Y.argB);M&&ct(n,S,X)}if(H&&Array.isArray(ce(r.errors,S))){const X=A(ce(r.errors,S),Y.argA,Y.argB);M&&ct(r.errors,S,X),F5(r.errors,S)}if(f.touchedFields&&H&&Array.isArray(ce(r.touchedFields,S))){const X=A(ce(r.touchedFields,S),Y.argA,Y.argB);M&&ct(r.touchedFields,S,X)}f.dirtyFields&&(r.dirtyFields=ru(s,o)),d.state.next({name:S,isDirty:R(S,N),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else ct(o,S,N)},_=(S,N)=>{ct(r.errors,S,N),d.state.next({errors:r.errors})},C=S=>{r.errors=S,d.state.next({errors:r.errors,isValid:!1})},E=(S,N,A,Y)=>{const M=ce(n,S);if(M){const H=ce(o,S,It(A)?ce(s,S):A);It(H)||Y&&Y.defaultChecked||N?ct(o,S,N?H:Eh(M._f)):V(S,H),i.mount&&x()}},T=(S,N,A,Y,M)=>{let H=!1,X=!1;const ee={name:S},he=!!(ce(n,S)&&ce(n,S)._f&&ce(n,S)._f.disabled);if(!A||Y){f.isDirty&&(X=r.isDirty,r.isDirty=ee.isDirty=R(),H=X!==ee.isDirty);const Le=he||Ro(ce(s,S),N);X=!!(!he&&ce(r.dirtyFields,S)),Le||he?Bt(r.dirtyFields,S):ct(r.dirtyFields,S,!0),ee.dirtyFields=r.dirtyFields,H=H||f.dirtyFields&&X!==!Le}if(A){const Le=ce(r.touchedFields,S);Le||(ct(r.touchedFields,S,A),ee.touchedFields=r.touchedFields,H=H||f.touchedFields&&Le!==A)}return H&&M&&d.state.next(ee),H?ee:{}},P=(S,N,A,Y)=>{const M=ce(r.errors,S),H=f.isValid&&Rn(N)&&r.isValid!==N;if(e.delayError&&A?(l=p(()=>_(S,A)),l(e.delayError)):(clearTimeout(c),l=null,A?ct(r.errors,S,A):Bt(r.errors,S)),(A?!Ro(M,A):M)||!Nr(Y)||H){const X={...Y,...H&&Rn(N)?{isValid:N}:{},errors:r.errors,name:S};r={...r,...X},d.state.next(X)}},O=async S=>{g(S,!0);const N=await t.resolver(o,t.context,M5(S||a.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return g(S),N},j=async S=>{const{errors:N}=await O(S);if(S)for(const A of S){const Y=ce(N,A);Y?ct(r.errors,A,Y):Bt(r.errors,A)}else r.errors=N;return N},L=async(S,N,A={valid:!0})=>{for(const Y in S){const M=S[Y];if(M){const{_f:H,...X}=M;if(H){const ee=a.array.has(H.name);g([Y],!0);const he=await hw(M,o,y,t.shouldUseNativeValidation&&!N,ee);if(g([Y]),he[H.name]&&(A.valid=!1,N))break;!N&&(ce(he,H.name)?ee?j5(r.errors,he,H.name):ct(r.errors,H.name,he[H.name]):Bt(r.errors,H.name))}X&&await L(X,N,A)}}return A.valid},q=()=>{for(const S of a.unMount){const N=ce(n,S);N&&(N._f.refs?N._f.refs.every(A=>!Ch(A)):!Ch(N._f.ref))&&Ee(S)}a.unMount=new Set},R=(S,N)=>(S&&N&&ct(o,S,N),!Ro(z(),s)),F=(S,N,A)=>OC(S,a,{...i.mount?o:It(N)?s:Pn(S)?{[S]:N}:N},A,N),b=S=>bf(ce(i.mount?o:s,S,e.shouldUnregister?ce(s,S,[]):[])),V=(S,N,A={})=>{const Y=ce(n,S);let M=N;if(Y){const H=Y._f;H&&(!H.disabled&&ct(o,S,UC(N,H)),M=dd(H.ref)&&fr(N)?"":N,LC(H.ref)?[...H.ref.options].forEach(X=>X.selected=M.includes(X.value)):H.refs?mc(H.ref)?H.refs.length>1?H.refs.forEach(X=>(!X.defaultChecked||!X.disabled)&&(X.checked=Array.isArray(M)?!!M.find(ee=>ee===X.value):M===X.value)):H.refs[0]&&(H.refs[0].checked=!!M):H.refs.forEach(X=>X.checked=X.value===M):Ev(H.ref)?H.ref.value="":(H.ref.value=M,H.ref.type||d.values.next({name:S,values:{...o}})))}(A.shouldDirty||A.shouldTouch)&&T(S,M,A.shouldTouch,A.shouldDirty,!0),A.shouldValidate&&Q(S)},te=(S,N,A)=>{for(const Y in N){const M=N[Y],H=`${S}.${Y}`,X=ce(n,H);(a.array.has(S)||!hd(M)||X&&!X._f)&&!Ei(M)?te(H,M,A):V(H,M,A)}},W=(S,N,A={})=>{const Y=ce(n,S),M=a.array.has(S),H=xr(N);ct(o,S,H),M?(d.array.next({name:S,values:{...o}}),(f.isDirty||f.dirtyFields)&&A.shouldDirty&&d.state.next({name:S,dirtyFields:ru(s,o),isDirty:R(S,H)})):Y&&!Y._f&&!fr(H)?te(S,H,A):V(S,H,A),lw(S,a)&&d.state.next({...r}),d.values.next({name:i.mount?S:void 0,values:{...o}})},Z=async S=>{i.mount=!0;const N=S.target;let A=N.name,Y=!0;const M=ce(n,A),H=()=>N.type?Eh(M._f):EC(S),X=ee=>{Y=Number.isNaN(ee)||ee===ce(o,A,ee)};if(M){let ee,he;const Le=H(),Oe=S.type===ud.BLUR||S.type===ud.FOCUS_OUT,St=!I5(M._f)&&!t.resolver&&!ce(r.errors,A)&&!M._f.deps||L5(Oe,ce(r.touchedFields,A),r.isSubmitted,m,h),Vr=lw(A,a,Oe);ct(o,A,Le),Oe?(M._f.onBlur&&M._f.onBlur(S),l&&l(0)):M._f.onChange&&M._f.onChange(S);const Wt=T(A,Le,Oe,!1),Vn=!Nr(Wt)||Vr;if(!Oe&&d.values.next({name:A,type:S.type,values:{...o}}),St)return f.isValid&&x(),Vn&&d.state.next({name:A,...Vr?{}:Wt});if(!Oe&&Vr&&d.state.next({...r}),t.resolver){const{errors:et}=await O([A]);if(X(Le),Y){const Wn=pw(r.errors,n,A),Bn=pw(et,n,Wn.name||A);ee=Bn.error,A=Bn.name,he=Nr(et)}}else g([A],!0),ee=(await hw(M,o,y,t.shouldUseNativeValidation))[A],g([A]),X(Le),Y&&(ee?he=!1:f.isValid&&(he=await L(n,!0)));Y&&(M._f.deps&&Q(M._f.deps),P(A,he,ee,Wt))}},I=(S,N)=>{if(ce(r.errors,N)&&S.focus)return S.focus(),1},Q=async(S,N={})=>{let A,Y;const M=tl(S);if(t.resolver){const H=await j(It(S)?S:M);A=Nr(H),Y=S?!M.some(X=>ce(H,X)):A}else S?(Y=(await Promise.all(M.map(async H=>{const X=ce(n,H);return await L(X&&X._f?{[H]:X}:X)}))).every(Boolean),!(!Y&&!r.isValid)&&x()):Y=A=await L(n);return d.state.next({...!Pn(S)||f.isValid&&A!==r.isValid?{}:{name:S},...t.resolver||!S?{isValid:A}:{},errors:r.errors}),N.shouldFocus&&!Y&&rl(n,I,S?M:a.mount),Y},z=S=>{const N={...i.mount?o:s};return It(S)?N:Pn(S)?ce(N,S):S.map(A=>ce(N,A))},$=(S,N)=>({invalid:!!ce((N||r).errors,S),isDirty:!!ce((N||r).dirtyFields,S),error:ce((N||r).errors,S),isValidating:!!ce(r.validatingFields,S),isTouched:!!ce((N||r).touchedFields,S)}),de=S=>{S&&tl(S).forEach(N=>Bt(r.errors,N)),d.state.next({errors:S?r.errors:{}})},ne=(S,N,A)=>{const Y=(ce(n,S,{_f:{}})._f||{}).ref,M=ce(r.errors,S)||{},{ref:H,message:X,type:ee,...he}=M;ct(r.errors,S,{...he,...N,ref:Y}),d.state.next({name:S,errors:r.errors,isValid:!1}),A&&A.shouldFocus&&Y&&Y.focus&&Y.focus()},se=(S,N)=>Bs(S)?d.values.subscribe({next:A=>S(F(void 0,N),A)}):F(S,N,!0),Ee=(S,N={})=>{for(const A of S?tl(S):a.mount)a.mount.delete(A),a.array.delete(A),N.keepValue||(Bt(n,A),Bt(o,A)),!N.keepError&&Bt(r.errors,A),!N.keepDirty&&Bt(r.dirtyFields,A),!N.keepTouched&&Bt(r.touchedFields,A),!N.keepIsValidating&&Bt(r.validatingFields,A),!t.shouldUnregister&&!N.keepDefaultValue&&Bt(s,A);d.values.next({values:{...o}}),d.state.next({...r,...N.keepDirty?{isDirty:R()}:{}}),!N.keepIsValid&&x()},fe=({disabled:S,name:N,field:A,fields:Y,value:M})=>{if(Rn(S)&&i.mount||S){const H=S?void 0:It(M)?Eh(A?A._f:ce(Y,N)._f):M;ct(o,N,H),T(N,H,!1,!1,!0)}},ge=(S,N={})=>{let A=ce(n,S);const Y=Rn(N.disabled);return ct(n,S,{...A||{},_f:{...A&&A._f?A._f:{ref:{name:S}},name:S,mount:!0,...N}}),a.mount.add(S),A?fe({field:A,disabled:N.disabled,name:S,value:N.value}):E(S,!0,N.value),{...Y?{disabled:N.disabled}:{},...t.progressive?{required:!!N.required,min:Aa(N.min),max:Aa(N.max),minLength:Aa(N.minLength),maxLength:Aa(N.maxLength),pattern:Aa(N.pattern)}:{},name:S,onChange:Z,onBlur:Z,ref:M=>{if(M){ge(S,N),A=ce(n,S);const H=It(M.value)&&M.querySelectorAll&&M.querySelectorAll("input,select,textarea")[0]||M,X=A5(H),ee=A._f.refs||[];if(X?ee.find(he=>he===H):H===A._f.ref)return;ct(n,S,{_f:{...A._f,...X?{refs:[...ee.filter(Ch),H,...Array.isArray(ce(s,S))?[{}]:[]],ref:{type:H.type,name:S}}:{ref:H}}}),E(S,!1,void 0,H)}else A=ce(n,S,{}),A._f&&(A._f.mount=!1),(t.shouldUnregister||N.shouldUnregister)&&!(TC(a.array,S)&&i.action)&&a.unMount.add(S)}}},be=()=>t.shouldFocusError&&rl(n,I,a.mount),Pe=S=>{Rn(S)&&(d.state.next({disabled:S}),rl(n,(N,A)=>{const Y=ce(n,A);Y&&(N.disabled=Y._f.disabled||S,Array.isArray(Y._f.refs)&&Y._f.refs.forEach(M=>{M.disabled=Y._f.disabled||S}))},0,!1))},Te=(S,N)=>async A=>{let Y;A&&(A.preventDefault&&A.preventDefault(),A.persist&&A.persist());let M=xr(o);if(d.state.next({isSubmitting:!0}),t.resolver){const{errors:H,values:X}=await O();r.errors=H,M=X}else await L(n);if(Bt(r.errors,"root"),Nr(r.errors)){d.state.next({errors:{}});try{await S(M,A)}catch(H){Y=H}}else N&&await N({...r.errors},A),be(),setTimeout(be);if(d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Nr(r.errors)&&!Y,submitCount:r.submitCount+1,errors:r.errors}),Y)throw Y},Se=(S,N={})=>{ce(n,S)&&(It(N.defaultValue)?W(S,xr(ce(s,S))):(W(S,N.defaultValue),ct(s,S,xr(N.defaultValue))),N.keepTouched||Bt(r.touchedFields,S),N.keepDirty||(Bt(r.dirtyFields,S),r.isDirty=N.defaultValue?R(S,xr(ce(s,S))):R()),N.keepError||(Bt(r.errors,S),f.isValid&&x()),d.state.next({...r}))},qe=(S,N={})=>{const A=S?xr(S):s,Y=xr(A),M=Nr(S),H=M?s:Y;if(N.keepDefaultValues||(s=A),!N.keepValues){if(N.keepDirtyValues)for(const X of a.mount)ce(r.dirtyFields,X)?ct(H,X,ce(o,X)):W(X,ce(H,X));else{if(Sv&&It(S))for(const X of a.mount){const ee=ce(n,X);if(ee&&ee._f){const he=Array.isArray(ee._f.refs)?ee._f.refs[0]:ee._f.ref;if(dd(he)){const Le=he.closest("form");if(Le){Le.reset();break}}}}n={}}o=e.shouldUnregister?N.keepDefaultValues?xr(s):{}:xr(H),d.array.next({values:{...H}}),d.values.next({values:{...H}})}a={mount:N.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!f.isValid||!!N.keepIsValid||!!N.keepDirtyValues,i.watch=!!e.shouldUnregister,d.state.next({submitCount:N.keepSubmitCount?r.submitCount:0,isDirty:M?!1:N.keepDirty?r.isDirty:!!(N.keepDefaultValues&&!Ro(S,s)),isSubmitted:N.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:M?{}:N.keepDirtyValues?N.keepDefaultValues&&o?ru(s,o):r.dirtyFields:N.keepDefaultValues&&S?ru(s,S):N.keepDirty?r.dirtyFields:{},touchedFields:N.keepTouched?r.touchedFields:{},errors:N.keepErrors?r.errors:{},isSubmitSuccessful:N.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},k=(S,N)=>qe(Bs(S)?S(o):S,N);return{control:{register:ge,unregister:Ee,getFieldState:$,handleSubmit:Te,setError:ne,_executeSchema:O,_getWatch:F,_getDirty:R,_updateValid:x,_removeUnmounted:q,_updateFieldArray:v,_updateDisabledField:fe,_getFieldArray:b,_reset:qe,_resetDefaultValues:()=>Bs(t.defaultValues)&&t.defaultValues().then(S=>{k(S,t.resetOptions),d.state.next({isLoading:!1})}),_updateFormState:S=>{r={...r,...S}},_disableForm:Pe,_subjects:d,_proxyFormState:f,_setErrors:C,get _fields(){return n},get _formValues(){return o},get _state(){return i},set _state(S){i=S},get _defaultValues(){return s},get _names(){return a},set _names(S){a=S},get _formState(){return r},set _formState(S){r=S},get _options(){return t},set _options(S){t={...t,...S}}},trigger:Q,register:ge,handleSubmit:Te,watch:se,setValue:W,getValues:z,reset:k,resetField:Se,clearErrors:de,unregister:Ee,setError:ne,setFocus:(S,N={})=>{const A=ce(n,S),Y=A&&A._f;if(Y){const M=Y.refs?Y.refs[0]:Y.ref;M.focus&&(M.focus(),N.shouldSelect&&M.select())}},getFieldState:$}}function pa(e={}){const t=Ge.useRef(),r=Ge.useRef(),[n,s]=Ge.useState({isDirty:!1,isValidating:!1,isLoading:Bs(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Bs(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...U5(e),formState:n});const o=t.current.control;return o._options=e,Cv({subject:o._subjects.state,next:i=>{jC(i,o._proxyFormState,o._updateFormState,!0)&&s({...o._formState})}}),Ge.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),Ge.useEffect(()=>{if(o._proxyFormState.isDirty){const i=o._getDirty();i!==n.isDirty&&o._subjects.state.next({isDirty:i})}},[o,n.isDirty]),Ge.useEffect(()=>{e.values&&!Ro(e.values,r.current)?(o._reset(e.values,o._options.resetOptions),r.current=e.values,s(i=>({...i}))):o._resetDefaultValues()},[e.values,o]),Ge.useEffect(()=>{e.errors&&o._setErrors(e.errors)},[e.errors,o]),Ge.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),Ge.useEffect(()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})},[e.shouldUnregister,o]),t.current.formState=PC(n,o),t.current}const mw=(e,t,r)=>{if(e&&"reportValidity"in e){const n=ce(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},$C=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?mw(n.ref,r,e):n.refs&&n.refs.forEach(s=>mw(s,r,e))}},$5=(e,t)=>{t.shouldUseNativeValidation&&$C(e,t);const r={};for(const n in e){const s=ce(t.fields,n),o=Object.assign(e[n]||{},{ref:s&&s.ref});if(V5(t.names||Object.keys(e),n)){const i=Object.assign({},ce(r,n));ct(i,"root",o),ct(r,n,i)}else ct(r,n,o)}return r},V5=(e,t)=>e.some(r=>r.startsWith(t+"."));var W5=function(e,t){for(var r={};e.length;){var n=e[0],s=n.code,o=n.message,i=n.path.join(".");if(!r[i])if("unionErrors"in n){var a=n.unionErrors[0].errors[0];r[i]={message:a.message,type:a.code}}else r[i]={message:o,type:s};if("unionErrors"in n&&n.unionErrors.forEach(function(f){return f.errors.forEach(function(d){return e.push(d)})}),t){var l=r[i].types,c=l&&l[n.code];r[i]=AC(i,t,r,s,c?[].concat(c,n.message):n.message)}e.shift()}return r},ma=function(e,t,r){return r===void 0&&(r={}),function(n,s,o){try{return Promise.resolve(function(i,a){try{var l=Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](n,t)).then(function(c){return o.shouldUseNativeValidation&&$C({},o),{errors:{},values:r.raw?n:c}})}catch(c){return a(c)}return l&&l.then?l.then(void 0,a):l}(0,function(i){if(function(a){return Array.isArray(a==null?void 0:a.errors)}(i))return{values:{},errors:$5(W5(i.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw i}))}catch(i){return Promise.reject(i)}}},Qe;(function(e){e.assertEqual=s=>s;function t(s){}e.assertIs=t;function r(s){throw new Error}e.assertNever=r,e.arrayToEnum=s=>{const o={};for(const i of s)o[i]=i;return o},e.getValidEnumValues=s=>{const o=e.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),i={};for(const a of o)i[a]=s[a];return e.objectValues(i)},e.objectValues=s=>e.objectKeys(s).map(function(o){return s[o]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&o.push(i);return o},e.find=(s,o)=>{for(const i of s)if(o(i))return i},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function n(s,o=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}e.joinValues=n,e.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(Qe||(Qe={}));var Zp;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(Zp||(Zp={}));const ye=Qe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),zs=e=>{switch(typeof e){case"undefined":return ye.undefined;case"string":return ye.string;case"number":return isNaN(e)?ye.nan:ye.number;case"boolean":return ye.boolean;case"function":return ye.function;case"bigint":return ye.bigint;case"symbol":return ye.symbol;case"object":return Array.isArray(e)?ye.array:e===null?ye.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ye.promise:typeof Map<"u"&&e instanceof Map?ye.map:typeof Set<"u"&&e instanceof Set?ye.set:typeof Date<"u"&&e instanceof Date?ye.date:ye.object;default:return ye.unknown}},ie=Qe.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),B5=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Lr extends Error{constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const r=t||function(o){return o.message},n={_errors:[]},s=o=>{for(const i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)n._errors.push(r(i));else{let a=n,l=0;for(;lr.message){const r={},n=[];for(const s of this.issues)s.path.length>0?(r[s.path[0]]=r[s.path[0]]||[],r[s.path[0]].push(t(s))):n.push(t(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}Lr.create=e=>new Lr(e);const Xi=(e,t)=>{let r;switch(e.code){case ie.invalid_type:e.received===ye.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case ie.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Qe.jsonStringifyReplacer)}`;break;case ie.unrecognized_keys:r=`Unrecognized key(s) in object: ${Qe.joinValues(e.keys,", ")}`;break;case ie.invalid_union:r="Invalid input";break;case ie.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Qe.joinValues(e.options)}`;break;case ie.invalid_enum_value:r=`Invalid enum value. Expected ${Qe.joinValues(e.options)}, received '${e.received}'`;break;case ie.invalid_arguments:r="Invalid function arguments";break;case ie.invalid_return_type:r="Invalid function return type";break;case ie.invalid_date:r="Invalid date";break;case ie.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:Qe.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case ie.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case ie.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case ie.custom:r="Invalid input";break;case ie.invalid_intersection_types:r="Intersection results could not be merged";break;case ie.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case ie.not_finite:r="Number must be finite";break;default:r=t.defaultError,Qe.assertNever(e)}return{message:r}};let VC=Xi;function H5(e){VC=e}function md(){return VC}const gd=e=>{const{data:t,path:r,errorMaps:n,issueData:s}=e,o=[...r,...s.path||[]],i={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let a="";const l=n.filter(c=>!!c).slice().reverse();for(const c of l)a=c(i,{data:t,defaultError:a}).message;return{...s,path:o,message:a}},Y5=[];function pe(e,t){const r=md(),n=gd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===Xi?void 0:Xi].filter(s=>!!s)});e.common.issues.push(n)}class lr{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const n=[];for(const s of r){if(s.status==="aborted")return Ie;s.status==="dirty"&&t.dirty(),n.push(s.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){const n=[];for(const s of r){const o=await s.key,i=await s.value;n.push({key:o,value:i})}return lr.mergeObjectSync(t,n)}static mergeObjectSync(t,r){const n={};for(const s of r){const{key:o,value:i}=s;if(o.status==="aborted"||i.status==="aborted")return Ie;o.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof i.value<"u"||s.alwaysSet)&&(n[o.value]=i.value)}return{status:t.value,value:n}}}const Ie=Object.freeze({status:"aborted"}),Ti=e=>({status:"dirty",value:e}),pr=e=>({status:"valid",value:e}),Gp=e=>e.status==="aborted",Kp=e=>e.status==="dirty",Ol=e=>e.status==="valid",Al=e=>typeof Promise<"u"&&e instanceof Promise;function vd(e,t,r,n){if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function WC(e,t,r,n,s){if(typeof t=="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,r),r}var Ce;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ce||(Ce={}));var $a,Va;class Ln{constructor(t,r,n,s){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const gw=(e,t)=>{if(Ol(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new Lr(e.common.issues);return this._error=r,this._error}}};function Fe(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:s}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(i,a)=>{var l,c;const{message:f}=e;return i.code==="invalid_enum_value"?{message:f??a.defaultError}:typeof a.data>"u"?{message:(l=f??n)!==null&&l!==void 0?l:a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:(c=f??r)!==null&&c!==void 0?c:a.defaultError}},description:s}}class Be{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return zs(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:zs(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new lr,ctx:{common:t.parent.common,data:t.data,parsedType:zs(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(Al(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){const r=this._parse(t);return Promise.resolve(r)}parse(t,r){const n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){var n;const s={common:{issues:[],async:(n=r==null?void 0:r.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:zs(t)},o=this._parseSync({data:t,path:s.path,parent:s});return gw(s,o)}async parseAsync(t,r){const n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:zs(t)},s=this._parse({data:t,path:n.path,parent:n}),o=await(Al(s)?s:Promise.resolve(s));return gw(n,o)}refine(t,r){const n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,o)=>{const i=t(s),a=()=>o.addIssue({code:ie.custom,...n(s)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,r){return this._refinement((n,s)=>t(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(t){return new yn({schema:this,typeName:Ae.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return An.create(this,this._def)}nullable(){return lo.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return fn.create(this,this._def)}promise(){return Ji.create(this,this._def)}or(t){return Fl.create([this,t],this._def)}and(t){return zl.create(this,t,this._def)}transform(t){return new yn({...Fe(this._def),schema:this,typeName:Ae.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new Bl({...Fe(this._def),innerType:this,defaultValue:r,typeName:Ae.ZodDefault})}brand(){return new Rv({typeName:Ae.ZodBranded,type:this,...Fe(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new Hl({...Fe(this._def),innerType:this,catchValue:r,typeName:Ae.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return gc.create(this,t)}readonly(){return Yl.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Z5=/^c[^\s-]{8,}$/i,G5=/^[0-9a-z]+$/,K5=/^[0-9A-HJKMNP-TV-Z]{26}$/,q5=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,X5=/^[a-z0-9_-]{21}$/i,Q5=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,J5=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ez="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Th;const tz=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,rz=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,nz=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,BC="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",sz=new RegExp(`^${BC}$`);function HC(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function oz(e){return new RegExp(`^${HC(e)}$`)}function YC(e){let t=`${BC}T${HC(e)}`;const r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function iz(e,t){return!!((t==="v4"||!t)&&tz.test(e)||(t==="v6"||!t)&&rz.test(e))}class cn extends Be{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ye.string){const o=this._getOrReturnCtx(t);return pe(o,{code:ie.invalid_type,expected:ye.string,received:o.parsedType}),Ie}const n=new lr;let s;for(const o of this._def.checks)if(o.kind==="min")t.data.lengtho.value&&(s=this._getOrReturnCtx(t,s),pe(s,{code:ie.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){const i=t.data.length>o.value,a=t.data.lengtht.test(s),{validation:r,code:ie.invalid_string,...Ce.errToObj(n)})}_addCheck(t){return new cn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ce.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ce.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ce.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ce.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ce.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ce.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ce.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ce.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ce.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ce.errToObj(t)})}datetime(t){var r,n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(r=t==null?void 0:t.offset)!==null&&r!==void 0?r:!1,local:(n=t==null?void 0:t.local)!==null&&n!==void 0?n:!1,...Ce.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Ce.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Ce.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...Ce.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...Ce.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...Ce.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...Ce.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...Ce.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...Ce.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...Ce.errToObj(r)})}nonempty(t){return this.min(1,Ce.errToObj(t))}trim(){return new cn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new cn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new cn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value{var t;return new cn({checks:[],typeName:Ae.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Fe(e)})};function az(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=r>n?r:n,o=parseInt(e.toFixed(s).replace(".","")),i=parseInt(t.toFixed(s).replace(".",""));return o%i/Math.pow(10,s)}class oo extends Be{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ye.number){const o=this._getOrReturnCtx(t);return pe(o,{code:ie.invalid_type,expected:ye.number,received:o.parsedType}),Ie}let n;const s=new lr;for(const o of this._def.checks)o.kind==="int"?Qe.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),pe(n,{code:ie.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),pe(n,{code:ie.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?az(t.data,o.value)!==0&&(n=this._getOrReturnCtx(t,n),pe(n,{code:ie.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),pe(n,{code:ie.not_finite,message:o.message}),s.dirty()):Qe.assertNever(o);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Ce.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Ce.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Ce.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Ce.toString(r))}setLimit(t,r,n,s){return new oo({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Ce.toString(s)}]})}_addCheck(t){return new oo({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ce.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ce.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Ce.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:Ce.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ce.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ce.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.valuet.kind==="int"||t.kind==="multipleOf"&&Qe.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.valuenew oo({checks:[],typeName:Ae.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Fe(e)});class io extends Be{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==ye.bigint){const o=this._getOrReturnCtx(t);return pe(o,{code:ie.invalid_type,expected:ye.bigint,received:o.parsedType}),Ie}let n;const s=new lr;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),pe(n,{code:ie.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),pe(n,{code:ie.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):Qe.assertNever(o);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Ce.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Ce.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Ce.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Ce.toString(r))}setLimit(t,r,n,s){return new io({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Ce.toString(s)}]})}_addCheck(t){return new io({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ce.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Ce.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value{var t;return new io({checks:[],typeName:Ae.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Fe(e)})};class Ml extends Be{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ye.boolean){const n=this._getOrReturnCtx(t);return pe(n,{code:ie.invalid_type,expected:ye.boolean,received:n.parsedType}),Ie}return pr(t.data)}}Ml.create=e=>new Ml({typeName:Ae.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Fe(e)});class Wo extends Be{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ye.date){const o=this._getOrReturnCtx(t);return pe(o,{code:ie.invalid_type,expected:ye.date,received:o.parsedType}),Ie}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return pe(o,{code:ie.invalid_date}),Ie}const n=new lr;let s;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()o.value&&(s=this._getOrReturnCtx(t,s),pe(s,{code:ie.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):Qe.assertNever(o);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Wo({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:Ce.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:Ce.toString(r)})}get minDate(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.valuenew Wo({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ae.ZodDate,...Fe(e)});class yd extends Be{_parse(t){if(this._getType(t)!==ye.symbol){const n=this._getOrReturnCtx(t);return pe(n,{code:ie.invalid_type,expected:ye.symbol,received:n.parsedType}),Ie}return pr(t.data)}}yd.create=e=>new yd({typeName:Ae.ZodSymbol,...Fe(e)});class Il extends Be{_parse(t){if(this._getType(t)!==ye.undefined){const n=this._getOrReturnCtx(t);return pe(n,{code:ie.invalid_type,expected:ye.undefined,received:n.parsedType}),Ie}return pr(t.data)}}Il.create=e=>new Il({typeName:Ae.ZodUndefined,...Fe(e)});class Ll extends Be{_parse(t){if(this._getType(t)!==ye.null){const n=this._getOrReturnCtx(t);return pe(n,{code:ie.invalid_type,expected:ye.null,received:n.parsedType}),Ie}return pr(t.data)}}Ll.create=e=>new Ll({typeName:Ae.ZodNull,...Fe(e)});class Qi extends Be{constructor(){super(...arguments),this._any=!0}_parse(t){return pr(t.data)}}Qi.create=e=>new Qi({typeName:Ae.ZodAny,...Fe(e)});class Do extends Be{constructor(){super(...arguments),this._unknown=!0}_parse(t){return pr(t.data)}}Do.create=e=>new Do({typeName:Ae.ZodUnknown,...Fe(e)});class ys extends Be{_parse(t){const r=this._getOrReturnCtx(t);return pe(r,{code:ie.invalid_type,expected:ye.never,received:r.parsedType}),Ie}}ys.create=e=>new ys({typeName:Ae.ZodNever,...Fe(e)});class wd extends Be{_parse(t){if(this._getType(t)!==ye.undefined){const n=this._getOrReturnCtx(t);return pe(n,{code:ie.invalid_type,expected:ye.void,received:n.parsedType}),Ie}return pr(t.data)}}wd.create=e=>new wd({typeName:Ae.ZodVoid,...Fe(e)});class fn extends Be{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),s=this._def;if(r.parsedType!==ye.array)return pe(r,{code:ie.invalid_type,expected:ye.array,received:r.parsedType}),Ie;if(s.exactLength!==null){const i=r.data.length>s.exactLength.value,a=r.data.lengths.maxLength.value&&(pe(r,{code:ie.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((i,a)=>s.type._parseAsync(new Ln(r,i,r.path,a)))).then(i=>lr.mergeArray(n,i));const o=[...r.data].map((i,a)=>s.type._parseSync(new Ln(r,i,r.path,a)));return lr.mergeArray(n,o)}get element(){return this._def.type}min(t,r){return new fn({...this._def,minLength:{value:t,message:Ce.toString(r)}})}max(t,r){return new fn({...this._def,maxLength:{value:t,message:Ce.toString(r)}})}length(t,r){return new fn({...this._def,exactLength:{value:t,message:Ce.toString(r)}})}nonempty(t){return this.min(1,t)}}fn.create=(e,t)=>new fn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ae.ZodArray,...Fe(t)});function di(e){if(e instanceof Tt){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=An.create(di(n))}return new Tt({...e._def,shape:()=>t})}else return e instanceof fn?new fn({...e._def,type:di(e.element)}):e instanceof An?An.create(di(e.unwrap())):e instanceof lo?lo.create(di(e.unwrap())):e instanceof Fn?Fn.create(e.items.map(t=>di(t))):e}class Tt extends Be{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),r=Qe.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==ye.object){const c=this._getOrReturnCtx(t);return pe(c,{code:ie.invalid_type,expected:ye.object,received:c.parsedType}),Ie}const{status:n,ctx:s}=this._processInputParams(t),{shape:o,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof ys&&this._def.unknownKeys==="strip"))for(const c in s.data)i.includes(c)||a.push(c);const l=[];for(const c of i){const f=o[c],d=s.data[c];l.push({key:{status:"valid",value:c},value:f._parse(new Ln(s,d,s.path,c)),alwaysSet:c in s.data})}if(this._def.catchall instanceof ys){const c=this._def.unknownKeys;if(c==="passthrough")for(const f of a)l.push({key:{status:"valid",value:f},value:{status:"valid",value:s.data[f]}});else if(c==="strict")a.length>0&&(pe(s,{code:ie.unrecognized_keys,keys:a}),n.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const f of a){const d=s.data[f];l.push({key:{status:"valid",value:f},value:c._parse(new Ln(s,d,s.path,f)),alwaysSet:f in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const c=[];for(const f of l){const d=await f.key,h=await f.value;c.push({key:d,value:h,alwaysSet:f.alwaysSet})}return c}).then(c=>lr.mergeObjectSync(n,c)):lr.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(t){return Ce.errToObj,new Tt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var s,o,i,a;const l=(i=(o=(s=this._def).errorMap)===null||o===void 0?void 0:o.call(s,r,n).message)!==null&&i!==void 0?i:n.defaultError;return r.code==="unrecognized_keys"?{message:(a=Ce.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new Tt({...this._def,unknownKeys:"strip"})}passthrough(){return new Tt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Tt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Tt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ae.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new Tt({...this._def,catchall:t})}pick(t){const r={};return Qe.objectKeys(t).forEach(n=>{t[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new Tt({...this._def,shape:()=>r})}omit(t){const r={};return Qe.objectKeys(this.shape).forEach(n=>{t[n]||(r[n]=this.shape[n])}),new Tt({...this._def,shape:()=>r})}deepPartial(){return di(this)}partial(t){const r={};return Qe.objectKeys(this.shape).forEach(n=>{const s=this.shape[n];t&&!t[n]?r[n]=s:r[n]=s.optional()}),new Tt({...this._def,shape:()=>r})}required(t){const r={};return Qe.objectKeys(this.shape).forEach(n=>{if(t&&!t[n])r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof An;)o=o._def.innerType;r[n]=o}}),new Tt({...this._def,shape:()=>r})}keyof(){return ZC(Qe.objectKeys(this.shape))}}Tt.create=(e,t)=>new Tt({shape:()=>e,unknownKeys:"strip",catchall:ys.create(),typeName:Ae.ZodObject,...Fe(t)});Tt.strictCreate=(e,t)=>new Tt({shape:()=>e,unknownKeys:"strict",catchall:ys.create(),typeName:Ae.ZodObject,...Fe(t)});Tt.lazycreate=(e,t)=>new Tt({shape:e,unknownKeys:"strip",catchall:ys.create(),typeName:Ae.ZodObject,...Fe(t)});class Fl extends Be{_parse(t){const{ctx:r}=this._processInputParams(t),n=this._def.options;function s(o){for(const a of o)if(a.result.status==="valid")return a.result;for(const a of o)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;const i=o.map(a=>new Lr(a.ctx.common.issues));return pe(r,{code:ie.invalid_union,unionErrors:i}),Ie}if(r.common.async)return Promise.all(n.map(async o=>{const i={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:i}),ctx:i}})).then(s);{let o;const i=[];for(const l of n){const c={...r,common:{...r.common,issues:[]},parent:null},f=l._parseSync({data:r.data,path:r.path,parent:c});if(f.status==="valid")return f;f.status==="dirty"&&!o&&(o={result:f,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;const a=i.map(l=>new Lr(l));return pe(r,{code:ie.invalid_union,unionErrors:a}),Ie}}get options(){return this._def.options}}Fl.create=(e,t)=>new Fl({options:e,typeName:Ae.ZodUnion,...Fe(t)});const qn=e=>e instanceof $l?qn(e.schema):e instanceof yn?qn(e.innerType()):e instanceof Vl?[e.value]:e instanceof ao?e.options:e instanceof Wl?Qe.objectValues(e.enum):e instanceof Bl?qn(e._def.innerType):e instanceof Il?[void 0]:e instanceof Ll?[null]:e instanceof An?[void 0,...qn(e.unwrap())]:e instanceof lo?[null,...qn(e.unwrap())]:e instanceof Rv||e instanceof Yl?qn(e.unwrap()):e instanceof Hl?qn(e._def.innerType):[];class kf extends Be{_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==ye.object)return pe(r,{code:ie.invalid_type,expected:ye.object,received:r.parsedType}),Ie;const n=this.discriminator,s=r.data[n],o=this.optionsMap.get(s);return o?r.common.async?o._parseAsync({data:r.data,path:r.path,parent:r}):o._parseSync({data:r.data,path:r.path,parent:r}):(pe(r,{code:ie.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Ie)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){const s=new Map;for(const o of r){const i=qn(o.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of i){if(s.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);s.set(a,o)}}return new kf({typeName:Ae.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:s,...Fe(n)})}}function qp(e,t){const r=zs(e),n=zs(t);if(e===t)return{valid:!0,data:e};if(r===ye.object&&n===ye.object){const s=Qe.objectKeys(t),o=Qe.objectKeys(e).filter(a=>s.indexOf(a)!==-1),i={...e,...t};for(const a of o){const l=qp(e[a],t[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(r===ye.array&&n===ye.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let o=0;o{if(Gp(o)||Gp(i))return Ie;const a=qp(o.value,i.value);return a.valid?((Kp(o)||Kp(i))&&r.dirty(),{status:r.value,value:a.data}):(pe(n,{code:ie.invalid_intersection_types}),Ie)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,i])=>s(o,i)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}zl.create=(e,t,r)=>new zl({left:e,right:t,typeName:Ae.ZodIntersection,...Fe(r)});class Fn extends Be{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ye.array)return pe(n,{code:ie.invalid_type,expected:ye.array,received:n.parsedType}),Ie;if(n.data.lengththis._def.items.length&&(pe(n,{code:ie.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const o=[...n.data].map((i,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Ln(n,i,n.path,a)):null}).filter(i=>!!i);return n.common.async?Promise.all(o).then(i=>lr.mergeArray(r,i)):lr.mergeArray(r,o)}get items(){return this._def.items}rest(t){return new Fn({...this._def,rest:t})}}Fn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Fn({items:e,typeName:Ae.ZodTuple,rest:null,...Fe(t)})};class Ul extends Be{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ye.object)return pe(n,{code:ie.invalid_type,expected:ye.object,received:n.parsedType}),Ie;const s=[],o=this._def.keyType,i=this._def.valueType;for(const a in n.data)s.push({key:o._parse(new Ln(n,a,n.path,a)),value:i._parse(new Ln(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?lr.mergeObjectAsync(r,s):lr.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof Be?new Ul({keyType:t,valueType:r,typeName:Ae.ZodRecord,...Fe(n)}):new Ul({keyType:cn.create(),valueType:t,typeName:Ae.ZodRecord,...Fe(r)})}}class xd extends Be{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ye.map)return pe(n,{code:ie.invalid_type,expected:ye.map,received:n.parsedType}),Ie;const s=this._def.keyType,o=this._def.valueType,i=[...n.data.entries()].map(([a,l],c)=>({key:s._parse(new Ln(n,a,n.path,[c,"key"])),value:o._parse(new Ln(n,l,n.path,[c,"value"]))}));if(n.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of i){const c=await l.key,f=await l.value;if(c.status==="aborted"||f.status==="aborted")return Ie;(c.status==="dirty"||f.status==="dirty")&&r.dirty(),a.set(c.value,f.value)}return{status:r.value,value:a}})}else{const a=new Map;for(const l of i){const c=l.key,f=l.value;if(c.status==="aborted"||f.status==="aborted")return Ie;(c.status==="dirty"||f.status==="dirty")&&r.dirty(),a.set(c.value,f.value)}return{status:r.value,value:a}}}}xd.create=(e,t,r)=>new xd({valueType:t,keyType:e,typeName:Ae.ZodMap,...Fe(r)});class Bo extends Be{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ye.set)return pe(n,{code:ie.invalid_type,expected:ye.set,received:n.parsedType}),Ie;const s=this._def;s.minSize!==null&&n.data.sizes.maxSize.value&&(pe(n,{code:ie.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());const o=this._def.valueType;function i(l){const c=new Set;for(const f of l){if(f.status==="aborted")return Ie;f.status==="dirty"&&r.dirty(),c.add(f.value)}return{status:r.value,value:c}}const a=[...n.data.values()].map((l,c)=>o._parse(new Ln(n,l,n.path,c)));return n.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,r){return new Bo({...this._def,minSize:{value:t,message:Ce.toString(r)}})}max(t,r){return new Bo({...this._def,maxSize:{value:t,message:Ce.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}Bo.create=(e,t)=>new Bo({valueType:e,minSize:null,maxSize:null,typeName:Ae.ZodSet,...Fe(t)});class $i extends Be{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==ye.function)return pe(r,{code:ie.invalid_type,expected:ye.function,received:r.parsedType}),Ie;function n(a,l){return gd({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,md(),Xi].filter(c=>!!c),issueData:{code:ie.invalid_arguments,argumentsError:l}})}function s(a,l){return gd({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,md(),Xi].filter(c=>!!c),issueData:{code:ie.invalid_return_type,returnTypeError:l}})}const o={errorMap:r.common.contextualErrorMap},i=r.data;if(this._def.returns instanceof Ji){const a=this;return pr(async function(...l){const c=new Lr([]),f=await a._def.args.parseAsync(l,o).catch(m=>{throw c.addIssue(n(l,m)),c}),d=await Reflect.apply(i,this,f);return await a._def.returns._def.type.parseAsync(d,o).catch(m=>{throw c.addIssue(s(d,m)),c})})}else{const a=this;return pr(function(...l){const c=a._def.args.safeParse(l,o);if(!c.success)throw new Lr([n(l,c.error)]);const f=Reflect.apply(i,this,c.data),d=a._def.returns.safeParse(f,o);if(!d.success)throw new Lr([s(f,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new $i({...this._def,args:Fn.create(t).rest(Do.create())})}returns(t){return new $i({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new $i({args:t||Fn.create([]).rest(Do.create()),returns:r||Do.create(),typeName:Ae.ZodFunction,...Fe(n)})}}class $l extends Be{get schema(){return this._def.getter()}_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}$l.create=(e,t)=>new $l({getter:e,typeName:Ae.ZodLazy,...Fe(t)});class Vl extends Be{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return pe(r,{received:r.data,code:ie.invalid_literal,expected:this._def.value}),Ie}return{status:"valid",value:t.data}}get value(){return this._def.value}}Vl.create=(e,t)=>new Vl({value:e,typeName:Ae.ZodLiteral,...Fe(t)});function ZC(e,t){return new ao({values:e,typeName:Ae.ZodEnum,...Fe(t)})}class ao extends Be{constructor(){super(...arguments),$a.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return pe(r,{expected:Qe.joinValues(n),received:r.parsedType,code:ie.invalid_type}),Ie}if(vd(this,$a)||WC(this,$a,new Set(this._def.values)),!vd(this,$a).has(t.data)){const r=this._getOrReturnCtx(t),n=this._def.values;return pe(r,{received:r.data,code:ie.invalid_enum_value,options:n}),Ie}return pr(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return ao.create(t,{...this._def,...r})}exclude(t,r=this._def){return ao.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}}$a=new WeakMap;ao.create=ZC;class Wl extends Be{constructor(){super(...arguments),Va.set(this,void 0)}_parse(t){const r=Qe.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==ye.string&&n.parsedType!==ye.number){const s=Qe.objectValues(r);return pe(n,{expected:Qe.joinValues(s),received:n.parsedType,code:ie.invalid_type}),Ie}if(vd(this,Va)||WC(this,Va,new Set(Qe.getValidEnumValues(this._def.values))),!vd(this,Va).has(t.data)){const s=Qe.objectValues(r);return pe(n,{received:n.data,code:ie.invalid_enum_value,options:s}),Ie}return pr(t.data)}get enum(){return this._def.values}}Va=new WeakMap;Wl.create=(e,t)=>new Wl({values:e,typeName:Ae.ZodNativeEnum,...Fe(t)});class Ji extends Be{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==ye.promise&&r.common.async===!1)return pe(r,{code:ie.invalid_type,expected:ye.promise,received:r.parsedType}),Ie;const n=r.parsedType===ye.promise?r.data:Promise.resolve(r.data);return pr(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}}Ji.create=(e,t)=>new Ji({type:e,typeName:Ae.ZodPromise,...Fe(t)});class yn extends Be{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ae.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:n}=this._processInputParams(t),s=this._def.effect||null,o={addIssue:i=>{pe(n,i),i.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){const i=s.transform(n.data,o);if(n.common.async)return Promise.resolve(i).then(async a=>{if(r.value==="aborted")return Ie;const l=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return l.status==="aborted"?Ie:l.status==="dirty"||r.value==="dirty"?Ti(l.value):l});{if(r.value==="aborted")return Ie;const a=this._def.schema._parseSync({data:i,path:n.path,parent:n});return a.status==="aborted"?Ie:a.status==="dirty"||r.value==="dirty"?Ti(a.value):a}}if(s.type==="refinement"){const i=a=>{const l=s.refinement(a,o);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?Ie:(a.status==="dirty"&&r.dirty(),i(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?Ie:(a.status==="dirty"&&r.dirty(),i(a.value).then(()=>({status:r.value,value:a.value}))))}if(s.type==="transform")if(n.common.async===!1){const i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Ol(i))return i;const a=s.transform(i.value,o);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>Ol(i)?Promise.resolve(s.transform(i.value,o)).then(a=>({status:r.value,value:a})):i);Qe.assertNever(s)}}yn.create=(e,t,r)=>new yn({schema:e,typeName:Ae.ZodEffects,effect:t,...Fe(r)});yn.createWithPreprocess=(e,t,r)=>new yn({schema:t,effect:{type:"preprocess",transform:e},typeName:Ae.ZodEffects,...Fe(r)});class An extends Be{_parse(t){return this._getType(t)===ye.undefined?pr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}An.create=(e,t)=>new An({innerType:e,typeName:Ae.ZodOptional,...Fe(t)});class lo extends Be{_parse(t){return this._getType(t)===ye.null?pr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}lo.create=(e,t)=>new lo({innerType:e,typeName:Ae.ZodNullable,...Fe(t)});class Bl extends Be{_parse(t){const{ctx:r}=this._processInputParams(t);let n=r.data;return r.parsedType===ye.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}Bl.create=(e,t)=>new Bl({innerType:e,typeName:Ae.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Fe(t)});class Hl extends Be{_parse(t){const{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Al(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Lr(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Lr(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Hl.create=(e,t)=>new Hl({innerType:e,typeName:Ae.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Fe(t)});class _d extends Be{_parse(t){if(this._getType(t)!==ye.nan){const n=this._getOrReturnCtx(t);return pe(n,{code:ie.invalid_type,expected:ye.nan,received:n.parsedType}),Ie}return{status:"valid",value:t.data}}}_d.create=e=>new _d({typeName:Ae.ZodNaN,...Fe(e)});const lz=Symbol("zod_brand");class Rv extends Be{_parse(t){const{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class gc extends Be{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?Ie:o.status==="dirty"?(r.dirty(),Ti(o.value)):this._def.out._parseAsync({data:o.value,path:n.path,parent:n})})();{const s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?Ie:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(t,r){return new gc({in:t,out:r,typeName:Ae.ZodPipeline})}}class Yl extends Be{_parse(t){const r=this._def.innerType._parse(t),n=s=>(Ol(s)&&(s.value=Object.freeze(s.value)),s);return Al(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}}Yl.create=(e,t)=>new Yl({innerType:e,typeName:Ae.ZodReadonly,...Fe(t)});function GC(e,t={},r){return e?Qi.create().superRefine((n,s)=>{var o,i;if(!e(n)){const a=typeof t=="function"?t(n):typeof t=="string"?{message:t}:t,l=(i=(o=a.fatal)!==null&&o!==void 0?o:r)!==null&&i!==void 0?i:!0,c=typeof a=="string"?{message:a}:a;s.addIssue({code:"custom",...c,fatal:l})}}):Qi.create()}const cz={object:Tt.lazycreate};var Ae;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ae||(Ae={}));const uz=(e,t={message:`Input not instance of ${e.name}`})=>GC(r=>r instanceof e,t),KC=cn.create,qC=oo.create,dz=_d.create,fz=io.create,XC=Ml.create,hz=Wo.create,pz=yd.create,mz=Il.create,gz=Ll.create,vz=Qi.create,yz=Do.create,wz=ys.create,xz=wd.create,_z=fn.create,bz=Tt.create,Sz=Tt.strictCreate,kz=Fl.create,Cz=kf.create,Ez=zl.create,Tz=Fn.create,Rz=Ul.create,Nz=xd.create,Pz=Bo.create,jz=$i.create,Dz=$l.create,Oz=Vl.create,Az=ao.create,Mz=Wl.create,Iz=Ji.create,vw=yn.create,Lz=An.create,Fz=lo.create,zz=yn.createWithPreprocess,Uz=gc.create,$z=()=>KC().optional(),Vz=()=>qC().optional(),Wz=()=>XC().optional(),Bz={string:e=>cn.create({...e,coerce:!0}),number:e=>oo.create({...e,coerce:!0}),boolean:e=>Ml.create({...e,coerce:!0}),bigint:e=>io.create({...e,coerce:!0}),date:e=>Wo.create({...e,coerce:!0})},Hz=Ie;var He=Object.freeze({__proto__:null,defaultErrorMap:Xi,setErrorMap:H5,getErrorMap:md,makeIssue:gd,EMPTY_PATH:Y5,addIssueToContext:pe,ParseStatus:lr,INVALID:Ie,DIRTY:Ti,OK:pr,isAborted:Gp,isDirty:Kp,isValid:Ol,isAsync:Al,get util(){return Qe},get objectUtil(){return Zp},ZodParsedType:ye,getParsedType:zs,ZodType:Be,datetimeRegex:YC,ZodString:cn,ZodNumber:oo,ZodBigInt:io,ZodBoolean:Ml,ZodDate:Wo,ZodSymbol:yd,ZodUndefined:Il,ZodNull:Ll,ZodAny:Qi,ZodUnknown:Do,ZodNever:ys,ZodVoid:wd,ZodArray:fn,ZodObject:Tt,ZodUnion:Fl,ZodDiscriminatedUnion:kf,ZodIntersection:zl,ZodTuple:Fn,ZodRecord:Ul,ZodMap:xd,ZodSet:Bo,ZodFunction:$i,ZodLazy:$l,ZodLiteral:Vl,ZodEnum:ao,ZodNativeEnum:Wl,ZodPromise:Ji,ZodEffects:yn,ZodTransformer:yn,ZodOptional:An,ZodNullable:lo,ZodDefault:Bl,ZodCatch:Hl,ZodNaN:_d,BRAND:lz,ZodBranded:Rv,ZodPipeline:gc,ZodReadonly:Yl,custom:GC,Schema:Be,ZodSchema:Be,late:cz,get ZodFirstPartyTypeKind(){return Ae},coerce:Bz,any:vz,array:_z,bigint:fz,boolean:XC,date:hz,discriminatedUnion:Cz,effect:vw,enum:Az,function:jz,instanceof:uz,intersection:Ez,lazy:Dz,literal:Oz,map:Nz,nan:dz,nativeEnum:Mz,never:wz,null:gz,nullable:Fz,number:qC,object:bz,oboolean:Wz,onumber:Vz,optional:Lz,ostring:$z,pipeline:Uz,preprocess:zz,promise:Iz,record:Rz,set:Pz,strictObject:Sz,string:KC,symbol:pz,transformer:vw,tuple:Tz,undefined:mz,union:kz,unknown:yz,void:xz,NEVER:Hz,ZodIssueCode:ie,quotelessJson:B5,ZodError:Lr}),Yz="Label",QC=w.forwardRef((e,t)=>u.jsx(De.label,{...e,ref:t,onMouseDown:r=>{var s;r.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));QC.displayName=Yz;var JC=QC;const Zz=Jl("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Zl=w.forwardRef(({className:e,...t},r)=>u.jsx(JC,{ref:r,className:we(Zz(),e),...t}));Zl.displayName=JC.displayName;const ga=E5,eE=w.createContext({}),at=({...e})=>u.jsx(eE.Provider,{value:{name:e.name},children:u.jsx(P5,{...e})}),Cf=()=>{const e=w.useContext(eE),t=w.useContext(tE),{getFieldState:r,formState:n}=Sf(),s=r(e.name,n);if(!e)throw new Error("useFormField should be used within ");const{id:o}=t;return{id:o,name:e.name,formItemId:`${o}-form-item`,formDescriptionId:`${o}-form-item-description`,formMessageId:`${o}-form-item-message`,...s}},tE=w.createContext({}),rt=w.forwardRef(({className:e,...t},r)=>{const n=w.useId();return u.jsx(tE.Provider,{value:{id:n},children:u.jsx("div",{ref:r,className:we("space-y-2",e),...t})})});rt.displayName="FormItem";const nt=w.forwardRef(({className:e,...t},r)=>{const{error:n,formItemId:s}=Cf();return u.jsx(Zl,{ref:r,className:we(n&&"text-destructive",e),htmlFor:s,...t})});nt.displayName="FormLabel";const st=w.forwardRef(({...e},t)=>{const{error:r,formItemId:n,formDescriptionId:s,formMessageId:o}=Cf();return u.jsx(hs,{ref:t,id:n,"aria-describedby":r?`${s} ${o}`:`${s}`,"aria-invalid":!!r,...e})});st.displayName="FormControl";const Gz=w.forwardRef(({className:e,...t},r)=>{const{formDescriptionId:n}=Cf();return u.jsx("p",{ref:r,id:n,className:we("text-sm text-muted-foreground",e),...t})});Gz.displayName="FormDescription";const Xe=w.forwardRef(({className:e,children:t,...r},n)=>{const{error:s,formMessageId:o}=Cf(),i=s?String(s==null?void 0:s.message):t;return i?u.jsx("p",{ref:n,id:o,className:we("text-sm font-medium text-destructive",e),...r,children:i}):null});Xe.displayName="FormMessage";function Xp(e,[t,r]){return Math.min(r,Math.max(t,e))}var Kz=[" ","Enter","ArrowUp","ArrowDown"],qz=[" ","Enter"],vc="Select",[Ef,Tf,Xz]=Yd(vc),[va,xU]=Er(vc,[Xz,ua]),Rf=ua(),[Qz,mo]=va(vc),[Jz,e6]=va(vc),rE=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:s,onOpenChange:o,value:i,defaultValue:a,onValueChange:l,dir:c,name:f,autoComplete:d,disabled:h,required:m}=e,y=Rf(t),[p,x]=w.useState(null),[g,v]=w.useState(null),[_,C]=w.useState(!1),E=ec(c),[T=!1,P]=ps({prop:n,defaultProp:s,onChange:o}),[O,j]=ps({prop:i,defaultProp:a,onChange:l}),L=w.useRef(null),q=p?!!p.closest("form"):!0,[R,F]=w.useState(new Set),b=Array.from(R).map(V=>V.props.value).join(";");return u.jsx(kg,{...y,children:u.jsxs(Qz,{required:m,scope:t,trigger:p,onTriggerChange:x,valueNode:g,onValueNodeChange:v,valueNodeHasChildren:_,onValueNodeHasChildrenChange:C,contentId:On(),value:O,onValueChange:j,open:T,onOpenChange:P,dir:E,triggerPointerDownPosRef:L,disabled:h,children:[u.jsx(Ef.Provider,{scope:t,children:u.jsx(Jz,{scope:e.__scopeSelect,onNativeOptionAdd:w.useCallback(V=>{F(te=>new Set(te).add(V))},[]),onNativeOptionRemove:w.useCallback(V=>{F(te=>{const W=new Set(te);return W.delete(V),W})},[]),children:r})}),q?u.jsxs(RE,{"aria-hidden":!0,required:m,tabIndex:-1,name:f,autoComplete:d,value:O,onChange:V=>j(V.target.value),disabled:h,children:[O===void 0?u.jsx("option",{value:""}):null,Array.from(R)]},b):null]})})};rE.displayName=vc;var nE="SelectTrigger",sE=w.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...s}=e,o=Rf(r),i=mo(nE,r),a=i.disabled||n,l=ze(t,i.onTriggerChange),c=Tf(r),[f,d,h]=NE(y=>{const p=c().filter(v=>!v.disabled),x=p.find(v=>v.value===i.value),g=PE(p,y,x);g!==void 0&&i.onValueChange(g.value)}),m=()=>{a||(i.onOpenChange(!0),h())};return u.jsx(Cg,{asChild:!0,...o,children:u.jsx(De.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":TE(i.value)?"":void 0,...s,ref:l,onClick:le(s.onClick,y=>{y.currentTarget.focus()}),onPointerDown:le(s.onPointerDown,y=>{const p=y.target;p.hasPointerCapture(y.pointerId)&&p.releasePointerCapture(y.pointerId),y.button===0&&y.ctrlKey===!1&&(m(),i.triggerPointerDownPosRef.current={x:Math.round(y.pageX),y:Math.round(y.pageY)},y.preventDefault())}),onKeyDown:le(s.onKeyDown,y=>{const p=f.current!=="";!(y.ctrlKey||y.altKey||y.metaKey)&&y.key.length===1&&d(y.key),!(p&&y.key===" ")&&Kz.includes(y.key)&&(m(),y.preventDefault())})})})});sE.displayName=nE;var oE="SelectValue",iE=w.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,children:o,placeholder:i="",...a}=e,l=mo(oE,r),{onValueNodeHasChildrenChange:c}=l,f=o!==void 0,d=ze(t,l.onValueNodeChange);return rr(()=>{c(f)},[c,f]),u.jsx(De.span,{...a,ref:d,style:{pointerEvents:"none"},children:TE(l.value)?u.jsx(u.Fragment,{children:i}):o})});iE.displayName=oE;var t6="SelectIcon",aE=w.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...s}=e;return u.jsx(De.span,{"aria-hidden":!0,...s,ref:t,children:n||"▼"})});aE.displayName=t6;var r6="SelectPortal",lE=e=>u.jsx(rc,{asChild:!0,...e});lE.displayName=r6;var Ho="SelectContent",cE=w.forwardRef((e,t)=>{const r=mo(Ho,e.__scopeSelect),[n,s]=w.useState();if(rr(()=>{s(new DocumentFragment)},[]),!r.open){const o=n;return o?xs.createPortal(u.jsx(uE,{scope:e.__scopeSelect,children:u.jsx(Ef.Slot,{scope:e.__scopeSelect,children:u.jsx("div",{children:e.children})})}),o):null}return u.jsx(dE,{...e,ref:t})});cE.displayName=Ho;var Jn=10,[uE,go]=va(Ho),n6="SelectContentImpl",dE=w.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:i,side:a,sideOffset:l,align:c,alignOffset:f,arrowPadding:d,collisionBoundary:h,collisionPadding:m,sticky:y,hideWhenDetached:p,avoidCollisions:x,...g}=e,v=mo(Ho,r),[_,C]=w.useState(null),[E,T]=w.useState(null),P=ze(t,fe=>C(fe)),[O,j]=w.useState(null),[L,q]=w.useState(null),R=Tf(r),[F,b]=w.useState(!1),V=w.useRef(!1);w.useEffect(()=>{if(_)return Rg(_)},[_]),pg();const te=w.useCallback(fe=>{const[ge,...be]=R().map(Se=>Se.ref.current),[Pe]=be.slice(-1),Te=document.activeElement;for(const Se of fe)if(Se===Te||(Se==null||Se.scrollIntoView({block:"nearest"}),Se===ge&&E&&(E.scrollTop=0),Se===Pe&&E&&(E.scrollTop=E.scrollHeight),Se==null||Se.focus(),document.activeElement!==Te))return},[R,E]),W=w.useCallback(()=>te([O,_]),[te,O,_]);w.useEffect(()=>{F&&W()},[F,W]);const{onOpenChange:Z,triggerPointerDownPosRef:I}=v;w.useEffect(()=>{if(_){let fe={x:0,y:0};const ge=Pe=>{var Te,Se;fe={x:Math.abs(Math.round(Pe.pageX)-(((Te=I.current)==null?void 0:Te.x)??0)),y:Math.abs(Math.round(Pe.pageY)-(((Se=I.current)==null?void 0:Se.y)??0))}},be=Pe=>{fe.x<=10&&fe.y<=10?Pe.preventDefault():_.contains(Pe.target)||Z(!1),document.removeEventListener("pointermove",ge),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",ge),document.addEventListener("pointerup",be,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ge),document.removeEventListener("pointerup",be,{capture:!0})}}},[_,Z,I]),w.useEffect(()=>{const fe=()=>Z(!1);return window.addEventListener("blur",fe),window.addEventListener("resize",fe),()=>{window.removeEventListener("blur",fe),window.removeEventListener("resize",fe)}},[Z]);const[Q,z]=NE(fe=>{const ge=R().filter(Te=>!Te.disabled),be=ge.find(Te=>Te.ref.current===document.activeElement),Pe=PE(ge,fe,be);Pe&&setTimeout(()=>Pe.ref.current.focus())}),$=w.useCallback((fe,ge,be)=>{const Pe=!V.current&&!be;(v.value!==void 0&&v.value===ge||Pe)&&(j(fe),Pe&&(V.current=!0))},[v.value]),de=w.useCallback(()=>_==null?void 0:_.focus(),[_]),ne=w.useCallback((fe,ge,be)=>{const Pe=!V.current&&!be;(v.value!==void 0&&v.value===ge||Pe)&&q(fe)},[v.value]),se=n==="popper"?Qp:fE,Ee=se===Qp?{side:a,sideOffset:l,align:c,alignOffset:f,arrowPadding:d,collisionBoundary:h,collisionPadding:m,sticky:y,hideWhenDetached:p,avoidCollisions:x}:{};return u.jsx(uE,{scope:r,content:_,viewport:E,onViewportChange:T,itemRefCallback:$,selectedItem:O,onItemLeave:de,itemTextRefCallback:ne,focusSelectedItem:W,selectedItemText:L,position:n,isPositioned:F,searchRef:Q,children:u.jsx(Jd,{as:hs,allowPinchZoom:!0,children:u.jsx(Zd,{asChild:!0,trapped:v.open,onMountAutoFocus:fe=>{fe.preventDefault()},onUnmountAutoFocus:le(s,fe=>{var ge;(ge=v.trigger)==null||ge.focus({preventScroll:!0}),fe.preventDefault()}),children:u.jsx(aa,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:fe=>fe.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:u.jsx(se,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:fe=>fe.preventDefault(),...g,...Ee,onPlaced:()=>b(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:le(g.onKeyDown,fe=>{const ge=fe.ctrlKey||fe.altKey||fe.metaKey;if(fe.key==="Tab"&&fe.preventDefault(),!ge&&fe.key.length===1&&z(fe.key),["ArrowUp","ArrowDown","Home","End"].includes(fe.key)){let Pe=R().filter(Te=>!Te.disabled).map(Te=>Te.ref.current);if(["ArrowUp","End"].includes(fe.key)&&(Pe=Pe.slice().reverse()),["ArrowUp","ArrowDown"].includes(fe.key)){const Te=fe.target,Se=Pe.indexOf(Te);Pe=Pe.slice(Se+1)}setTimeout(()=>te(Pe)),fe.preventDefault()}})})})})})})});dE.displayName=n6;var s6="SelectItemAlignedPosition",fE=w.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...s}=e,o=mo(Ho,r),i=go(Ho,r),[a,l]=w.useState(null),[c,f]=w.useState(null),d=ze(t,P=>f(P)),h=Tf(r),m=w.useRef(!1),y=w.useRef(!0),{viewport:p,selectedItem:x,selectedItemText:g,focusSelectedItem:v}=i,_=w.useCallback(()=>{if(o.trigger&&o.valueNode&&a&&c&&p&&x&&g){const P=o.trigger.getBoundingClientRect(),O=c.getBoundingClientRect(),j=o.valueNode.getBoundingClientRect(),L=g.getBoundingClientRect();if(o.dir!=="rtl"){const Te=L.left-O.left,Se=j.left-Te,qe=P.left-Se,k=P.width+qe,J=Math.max(k,O.width),G=window.innerWidth-Jn,D=Xp(Se,[Jn,G-J]);a.style.minWidth=k+"px",a.style.left=D+"px"}else{const Te=O.right-L.right,Se=window.innerWidth-j.right-Te,qe=window.innerWidth-P.right-Se,k=P.width+qe,J=Math.max(k,O.width),G=window.innerWidth-Jn,D=Xp(Se,[Jn,G-J]);a.style.minWidth=k+"px",a.style.right=D+"px"}const q=h(),R=window.innerHeight-Jn*2,F=p.scrollHeight,b=window.getComputedStyle(c),V=parseInt(b.borderTopWidth,10),te=parseInt(b.paddingTop,10),W=parseInt(b.borderBottomWidth,10),Z=parseInt(b.paddingBottom,10),I=V+te+F+Z+W,Q=Math.min(x.offsetHeight*5,I),z=window.getComputedStyle(p),$=parseInt(z.paddingTop,10),de=parseInt(z.paddingBottom,10),ne=P.top+P.height/2-Jn,se=R-ne,Ee=x.offsetHeight/2,fe=x.offsetTop+Ee,ge=V+te+fe,be=I-ge;if(ge<=ne){const Te=x===q[q.length-1].ref.current;a.style.bottom="0px";const Se=c.clientHeight-p.offsetTop-p.offsetHeight,qe=Math.max(se,Ee+(Te?de:0)+Se+W),k=ge+qe;a.style.height=k+"px"}else{const Te=x===q[0].ref.current;a.style.top="0px";const qe=Math.max(ne,V+p.offsetTop+(Te?$:0)+Ee)+be;a.style.height=qe+"px",p.scrollTop=ge-ne+p.offsetTop}a.style.margin=`${Jn}px 0`,a.style.minHeight=Q+"px",a.style.maxHeight=R+"px",n==null||n(),requestAnimationFrame(()=>m.current=!0)}},[h,o.trigger,o.valueNode,a,c,p,x,g,o.dir,n]);rr(()=>_(),[_]);const[C,E]=w.useState();rr(()=>{c&&E(window.getComputedStyle(c).zIndex)},[c]);const T=w.useCallback(P=>{P&&y.current===!0&&(_(),v==null||v(),y.current=!1)},[_,v]);return u.jsx(i6,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:m,onScrollButtonChange:T,children:u.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:u.jsx(De.div,{...s,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});fE.displayName=s6;var o6="SelectPopperPosition",Qp=w.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=Jn,...o}=e,i=Rf(r);return u.jsx(Eg,{...i,...o,ref:t,align:n,collisionPadding:s,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Qp.displayName=o6;var[i6,Nv]=va(Ho,{}),Jp="SelectViewport",hE=w.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...s}=e,o=go(Jp,r),i=Nv(Jp,r),a=ze(t,o.onViewportChange),l=w.useRef(0);return u.jsxs(u.Fragment,{children:[u.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),u.jsx(Ef.Slot,{scope:r,children:u.jsx(De.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"auto",...s.style},onScroll:le(s.onScroll,c=>{const f=c.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:h}=i;if(h!=null&&h.current&&d){const m=Math.abs(l.current-f.scrollTop);if(m>0){const y=window.innerHeight-Jn*2,p=parseFloat(d.style.minHeight),x=parseFloat(d.style.height),g=Math.max(p,x);if(g0?C:0,d.style.justifyContent="flex-end")}}}l.current=f.scrollTop})})})]})});hE.displayName=Jp;var pE="SelectGroup",[a6,l6]=va(pE),mE=w.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=On();return u.jsx(a6,{scope:r,id:s,children:u.jsx(De.div,{role:"group","aria-labelledby":s,...n,ref:t})})});mE.displayName=pE;var gE="SelectLabel",vE=w.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=l6(gE,r);return u.jsx(De.div,{id:s.id,...n,ref:t})});vE.displayName=gE;var bd="SelectItem",[c6,yE]=va(bd),wE=w.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:o,...i}=e,a=mo(bd,r),l=go(bd,r),c=a.value===n,[f,d]=w.useState(o??""),[h,m]=w.useState(!1),y=ze(t,g=>{var v;return(v=l.itemRefCallback)==null?void 0:v.call(l,g,n,s)}),p=On(),x=()=>{s||(a.onValueChange(n),a.onOpenChange(!1))};if(n==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return u.jsx(c6,{scope:r,value:n,disabled:s,textId:p,isSelected:c,onItemTextChange:w.useCallback(g=>{d(v=>v||((g==null?void 0:g.textContent)??"").trim())},[]),children:u.jsx(Ef.ItemSlot,{scope:r,value:n,disabled:s,textValue:f,children:u.jsx(De.div,{role:"option","aria-labelledby":p,"data-highlighted":h?"":void 0,"aria-selected":c&&h,"data-state":c?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...i,ref:y,onFocus:le(i.onFocus,()=>m(!0)),onBlur:le(i.onBlur,()=>m(!1)),onPointerUp:le(i.onPointerUp,x),onPointerMove:le(i.onPointerMove,g=>{var v;s?(v=l.onItemLeave)==null||v.call(l):g.currentTarget.focus({preventScroll:!0})}),onPointerLeave:le(i.onPointerLeave,g=>{var v;g.currentTarget===document.activeElement&&((v=l.onItemLeave)==null||v.call(l))}),onKeyDown:le(i.onKeyDown,g=>{var _;((_=l.searchRef)==null?void 0:_.current)!==""&&g.key===" "||(qz.includes(g.key)&&x(),g.key===" "&&g.preventDefault())})})})})});wE.displayName=bd;var Wa="SelectItemText",xE=w.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,...o}=e,i=mo(Wa,r),a=go(Wa,r),l=yE(Wa,r),c=e6(Wa,r),[f,d]=w.useState(null),h=ze(t,g=>d(g),l.onItemTextChange,g=>{var v;return(v=a.itemTextRefCallback)==null?void 0:v.call(a,g,l.value,l.disabled)}),m=f==null?void 0:f.textContent,y=w.useMemo(()=>u.jsx("option",{value:l.value,disabled:l.disabled,children:m},l.value),[l.disabled,l.value,m]),{onNativeOptionAdd:p,onNativeOptionRemove:x}=c;return rr(()=>(p(y),()=>x(y)),[p,x,y]),u.jsxs(u.Fragment,{children:[u.jsx(De.span,{id:l.textId,...o,ref:h}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?xs.createPortal(o.children,i.valueNode):null]})});xE.displayName=Wa;var _E="SelectItemIndicator",bE=w.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return yE(_E,r).isSelected?u.jsx(De.span,{"aria-hidden":!0,...n,ref:t}):null});bE.displayName=_E;var em="SelectScrollUpButton",SE=w.forwardRef((e,t)=>{const r=go(em,e.__scopeSelect),n=Nv(em,e.__scopeSelect),[s,o]=w.useState(!1),i=ze(t,n.onScrollButtonChange);return rr(()=>{if(r.viewport&&r.isPositioned){let a=function(){const c=l.scrollTop>0;o(c)};const l=r.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),s?u.jsx(CE,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});SE.displayName=em;var tm="SelectScrollDownButton",kE=w.forwardRef((e,t)=>{const r=go(tm,e.__scopeSelect),n=Nv(tm,e.__scopeSelect),[s,o]=w.useState(!1),i=ze(t,n.onScrollButtonChange);return rr(()=>{if(r.viewport&&r.isPositioned){let a=function(){const c=l.scrollHeight-l.clientHeight,f=Math.ceil(l.scrollTop)l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),s?u.jsx(CE,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});kE.displayName=tm;var CE=w.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...s}=e,o=go("SelectScrollButton",r),i=w.useRef(null),a=Tf(r),l=w.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return w.useEffect(()=>()=>l(),[l]),rr(()=>{var f;const c=a().find(d=>d.ref.current===document.activeElement);(f=c==null?void 0:c.ref.current)==null||f.scrollIntoView({block:"nearest"})},[a]),u.jsx(De.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:le(s.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(n,50))}),onPointerMove:le(s.onPointerMove,()=>{var c;(c=o.onItemLeave)==null||c.call(o),i.current===null&&(i.current=window.setInterval(n,50))}),onPointerLeave:le(s.onPointerLeave,()=>{l()})})}),u6="SelectSeparator",EE=w.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return u.jsx(De.div,{"aria-hidden":!0,...n,ref:t})});EE.displayName=u6;var rm="SelectArrow",d6=w.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=Rf(r),o=mo(rm,r),i=go(rm,r);return o.open&&i.position==="popper"?u.jsx(Tg,{...s,...n,ref:t}):null});d6.displayName=rm;function TE(e){return e===""||e===void 0}var RE=w.forwardRef((e,t)=>{const{value:r,...n}=e,s=w.useRef(null),o=ze(t,s),i=mv(r);return w.useEffect(()=>{const a=s.current,l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==r&&f){const d=new Event("change",{bubbles:!0});f.call(a,r),a.dispatchEvent(d)}},[i,r]),u.jsx(pc,{asChild:!0,children:u.jsx("select",{...n,ref:o,defaultValue:r})})});RE.displayName="BubbleSelect";function NE(e){const t=Pt(e),r=w.useRef(""),n=w.useRef(0),s=w.useCallback(i=>{const a=r.current+i;t(a),function l(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),o=w.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return w.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,o]}function PE(e,t,r){const s=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,o=r?e.indexOf(r):-1;let i=f6(e,Math.max(o,0));s.length===1&&(i=i.filter(c=>c!==r));const l=i.find(c=>c.textValue.toLowerCase().startsWith(s.toLowerCase()));return l!==r?l:void 0}function f6(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var h6=rE,jE=sE,p6=iE,m6=aE,g6=lE,DE=cE,v6=hE,y6=mE,OE=vE,AE=wE,w6=xE,x6=bE,ME=SE,IE=kE,LE=EE;const yw=h6,ww=y6,xw=p6,nm=w.forwardRef(({className:e,children:t,...r},n)=>u.jsxs(jE,{ref:n,className:we("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[t,u.jsx(m6,{asChild:!0,children:u.jsx(r1,{className:"h-4 w-4 opacity-50"})})]}));nm.displayName=jE.displayName;const FE=w.forwardRef(({className:e,...t},r)=>u.jsx(ME,{ref:r,className:we("flex cursor-default items-center justify-center py-1",e),...t,children:u.jsx(UP,{className:"h-4 w-4"})}));FE.displayName=ME.displayName;const zE=w.forwardRef(({className:e,...t},r)=>u.jsx(IE,{ref:r,className:we("flex cursor-default items-center justify-center py-1",e),...t,children:u.jsx(r1,{className:"h-4 w-4"})}));zE.displayName=IE.displayName;const sm=w.forwardRef(({className:e,children:t,position:r="popper",...n},s)=>u.jsx(g6,{children:u.jsxs(DE,{ref:s,className:we("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:[u.jsx(FE,{}),u.jsx(v6,{className:we("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),u.jsx(zE,{})]})}));sm.displayName=DE.displayName;const om=w.forwardRef(({className:e,...t},r)=>u.jsx(OE,{ref:r,className:we("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));om.displayName=OE.displayName;const im=w.forwardRef(({className:e,children:t,...r},n)=>u.jsxs(AE,{ref:n,className:we("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(x6,{children:u.jsx(t1,{className:"h-4 w-4"})})}),u.jsx(w6,{children:t})]}));im.displayName=AE.displayName;const _6=w.forwardRef(({className:e,...t},r)=>u.jsx(LE,{ref:r,className:we("-mx-1 my-1 h-px bg-muted",e),...t}));_6.displayName=LE.displayName;const am=new Map([["aliyun-cdn",["阿里云-CDN","/imgs/providers/aliyun.svg"]],["aliyun-oss",["阿里云-OSS","/imgs/providers/aliyun.svg"]],["ssh",["SSH部署","/imgs/providers/ssh.png"]]]),b6=Array.from(am.keys()),S6=$g,k6=Vg,C6=Wg,UE=w.forwardRef(({className:e,...t},r)=>u.jsx(oc,{ref:r,className:we("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));UE.displayName=oc.displayName;const $E=w.forwardRef(({className:e,children:t,...r},n)=>u.jsxs(C6,{children:[u.jsx(UE,{}),u.jsxs(ic,{ref:n,className:we("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,u.jsxs(rf,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[u.jsx(cg,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));$E.displayName=ic.displayName;const VE=({className:e,...t})=>u.jsx("div",{className:we("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});VE.displayName="DialogHeader";const WE=w.forwardRef(({className:e,...t},r)=>u.jsx(ac,{ref:r,className:we("text-lg font-semibold leading-none tracking-tight",e),...t}));WE.displayName=ac.displayName;const E6=w.forwardRef(({className:e,...t},r)=>u.jsx(lc,{ref:r,className:we("text-sm text-muted-foreground",e),...t}));E6.displayName=lc.displayName;const Oo=new Map([["tencent",["腾讯云","/imgs/providers/tencent.svg"]],["aliyun",["阿里云","/imgs/providers/aliyun.svg"]],["ssh",["SSH部署","/imgs/providers/ssh.png"]]]),Pv=He.union([He.literal("aliyun"),He.literal("tencent"),He.literal("ssh")],{message:"请选择云服务商"}),T6=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=hc(),s=He.object({id:He.string().optional(),name:He.string().min(1).max(64),configType:Pv,secretId:He.string().min(1).max(64),secretKey:He.string().min(1).max(64)});let o={secretId:"",secretKey:""};e&&(o=e.config);const i=pa({resolver:ma(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"tencent",secretId:o.secretId,secretKey:o.secretKey}}),a=async l=>{const c={id:l.id,name:l.name,configType:l.configType,config:{secretId:l.secretId,secretKey:l.secretKey}};try{const f=await pv(c);if(t(),c.id=f.id,c.created=f.created,c.updated=f.updated,l.id){n(c);return}r(c)}catch(f){Object.entries(f.response.data).forEach(([h,m])=>{i.setError(h,{type:"manual",message:m.message})})}};return u.jsx(u.Fragment,{children:u.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:u.jsx(ga,{...i,children:u.jsxs("form",{onSubmit:l=>{l.stopPropagation(),i.handleSubmit(a)(l)},className:"space-y-8",children:[u.jsx(at,{control:i.control,name:"name",render:({field:l})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"名称"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入授权名称",...l})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"id",render:({field:l})=>u.jsxs(rt,{className:"hidden",children:[u.jsx(nt,{children:"配置类型"}),u.jsx(st,{children:u.jsx(ht,{...l})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"configType",render:({field:l})=>u.jsxs(rt,{className:"hidden",children:[u.jsx(nt,{children:"配置类型"}),u.jsx(st,{children:u.jsx(ht,{...l})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"secretId",render:({field:l})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"SecretId"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入SecretId",...l})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"secretKey",render:({field:l})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"SecretKey"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入SecretKey",...l})}),u.jsx(Xe,{})]})}),u.jsx("div",{className:"flex justify-end",children:u.jsx(Lt,{type:"submit",children:"保存"})})]})})})})},R6=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=hc(),s=He.object({id:He.string().optional(),name:He.string().min(1).max(64),configType:Pv,accessKeyId:He.string().min(1).max(64),accessSecretId:He.string().min(1).max(64)});let o={accessKeyId:"",accessKeySecret:""};e&&(o=e.config);const i=pa({resolver:ma(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"aliyun",accessKeyId:o.accessKeyId,accessSecretId:o.accessKeySecret}}),a=async l=>{const c={id:l.id,name:l.name,configType:l.configType,config:{accessKeyId:l.accessKeyId,accessKeySecret:l.accessSecretId}};try{const f=await pv(c);if(t(),c.id=f.id,c.created=f.created,c.updated=f.updated,l.id){n(c);return}r(c)}catch(f){Object.entries(f.response.data).forEach(([h,m])=>{i.setError(h,{type:"manual",message:m.message})});return}};return u.jsx(u.Fragment,{children:u.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:u.jsx(ga,{...i,children:u.jsxs("form",{onSubmit:l=>{l.stopPropagation(),i.handleSubmit(a)(l)},className:"space-y-8",children:[u.jsx(at,{control:i.control,name:"name",render:({field:l})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"名称"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入授权名称",...l})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"id",render:({field:l})=>u.jsxs(rt,{className:"hidden",children:[u.jsx(nt,{children:"配置类型"}),u.jsx(st,{children:u.jsx(ht,{...l})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"configType",render:({field:l})=>u.jsxs(rt,{className:"hidden",children:[u.jsx(nt,{children:"配置类型"}),u.jsx(st,{children:u.jsx(ht,{...l})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"accessKeyId",render:({field:l})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"AccessKeyId"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入AccessKeyId",...l})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"accessSecretId",render:({field:l})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"AccessKeySecret"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入AccessKeySecret",...l})}),u.jsx(Xe,{})]})}),u.jsx(Xe,{}),u.jsx("div",{className:"flex justify-end",children:u.jsx(Lt,{type:"submit",children:"保存"})})]})})})})};var jv="Radio",[N6,BE]=Er(jv),[P6,j6]=N6(jv),HE=w.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:s=!1,required:o,disabled:i,value:a="on",onCheck:l,...c}=e,[f,d]=w.useState(null),h=ze(t,p=>d(p)),m=w.useRef(!1),y=f?!!f.closest("form"):!0;return u.jsxs(P6,{scope:r,checked:s,disabled:i,children:[u.jsx(De.button,{type:"button",role:"radio","aria-checked":s,"data-state":GE(s),"data-disabled":i?"":void 0,disabled:i,value:a,...c,ref:h,onClick:le(e.onClick,p=>{s||l==null||l(),y&&(m.current=p.isPropagationStopped(),m.current||p.stopPropagation())})}),y&&u.jsx(D6,{control:f,bubbles:!m.current,name:n,value:a,checked:s,required:o,disabled:i,style:{transform:"translateX(-100%)"}})]})});HE.displayName=jv;var YE="RadioIndicator",ZE=w.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...s}=e,o=j6(YE,r);return u.jsx(vr,{present:n||o.checked,children:u.jsx(De.span,{"data-state":GE(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:t})})});ZE.displayName=YE;var D6=e=>{const{control:t,checked:r,bubbles:n=!0,...s}=e,o=w.useRef(null),i=mv(r),a=_g(t);return w.useEffect(()=>{const l=o.current,c=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(c,"checked").set;if(i!==r&&d){const h=new Event("click",{bubbles:n});d.call(l,r),l.dispatchEvent(h)}},[i,r,n]),u.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:o,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function GE(e){return e?"checked":"unchecked"}var O6=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Dv="RadioGroup",[A6,_U]=Er(Dv,[Xd,BE]),KE=Xd(),qE=BE(),[M6,I6]=A6(Dv),XE=w.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:s,value:o,required:i=!1,disabled:a=!1,orientation:l,dir:c,loop:f=!0,onValueChange:d,...h}=e,m=KE(r),y=ec(c),[p,x]=ps({prop:o,defaultProp:s,onChange:d});return u.jsx(M6,{scope:r,name:n,required:i,disabled:a,value:p,onValueChange:x,children:u.jsx($1,{asChild:!0,...m,orientation:l,dir:y,loop:f,children:u.jsx(De.div,{role:"radiogroup","aria-required":i,"aria-orientation":l,"data-disabled":a?"":void 0,dir:y,...h,ref:t})})})});XE.displayName=Dv;var QE="RadioGroupItem",JE=w.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...s}=e,o=I6(QE,r),i=o.disabled||n,a=KE(r),l=qE(r),c=w.useRef(null),f=ze(t,c),d=o.value===s.value,h=w.useRef(!1);return w.useEffect(()=>{const m=p=>{O6.includes(p.key)&&(h.current=!0)},y=()=>h.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",y),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",y)}},[]),u.jsx(V1,{asChild:!0,...a,focusable:!i,active:d,children:u.jsx(HE,{disabled:i,required:o.required,checked:d,...l,...s,name:o.name,ref:f,onCheck:()=>o.onValueChange(s.value),onKeyDown:le(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:le(s.onFocus,()=>{var m;h.current&&((m=c.current)==null||m.click())})})})});JE.displayName=QE;var L6="RadioGroupIndicator",eT=w.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,s=qE(r);return u.jsx(ZE,{...s,...n,ref:t})});eT.displayName=L6;var tT=XE,rT=JE,F6=eT;const Ov=w.forwardRef(({className:e,...t},r)=>u.jsx(tT,{className:we("grid gap-2",e),...t,ref:r}));Ov.displayName=tT.displayName;const Av=w.forwardRef(({className:e,...t},r)=>u.jsx(rT,{ref:r,className:we("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:u.jsx(F6,{className:"flex items-center justify-center",children:u.jsx(o1,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Av.displayName=rT.displayName;const nT=w.forwardRef(({className:e,...t},r)=>u.jsx("textarea",{className:we("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...t}));nT.displayName="Textarea";const z6=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=hc(),s=He.object({id:He.string().optional(),name:He.string().min(1).max(64),configType:Pv,host:He.string().ip({message:"请输入合法的IP地址"}),port:He.string().min(1).max(5),username:He.string().min(1).max(64),password:He.string().min(0).max(64),key:He.string().min(0).max(20480),keyFile:He.string().optional(),command:He.string().min(1).max(2048),certPath:He.string().min(0).max(2048),keyPath:He.string().min(0).max(2048)});let o={host:"127.0.0.1",port:"22",username:"root",password:"",key:"",keyFile:"",command:"sudo service nginx restart",certPath:"/etc/nginx/ssl/certificate.crt",keyPath:"/etc/nginx/ssl/private.key"};e&&(o=e.config);const i=pa({resolver:ma(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"ssh",host:o.host,port:o.port,username:o.username,password:o.password,key:o.key,keyFile:o.keyFile,certPath:o.certPath,keyPath:o.keyPath,command:o.command}}),a=async c=>{console.log(c);const f={id:c.id,name:c.name,configType:c.configType,config:{host:c.host,port:c.port,username:c.username,password:c.password,key:c.key,command:c.command,certPath:c.certPath,keyPath:c.keyPath}};try{const d=await pv(f);if(t(),f.id=d.id,f.created=d.created,f.updated=d.updated,c.id){n(f);return}r(f)}catch(d){Object.entries(d.response.data).forEach(([m,y])=>{i.setError(m,{type:"manual",message:y.message})});return}},l=async c=>{var h;const f=(h=c.target.files)==null?void 0:h[0];if(!f)return;const d=await m5(f);i.setValue("key",d),i.setValue("keyFile","")};return u.jsx(u.Fragment,{children:u.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:u.jsx(ga,{...i,children:u.jsxs("form",{onSubmit:c=>{c.stopPropagation(),i.handleSubmit(a)(c)},className:"space-y-3",children:[u.jsx(at,{control:i.control,name:"name",render:({field:c})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"名称"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入授权名称",...c})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"id",render:({field:c})=>u.jsxs(rt,{className:"hidden",children:[u.jsx(nt,{children:"配置类型"}),u.jsx(st,{children:u.jsx(ht,{...c})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"configType",render:({field:c})=>u.jsxs(rt,{className:"hidden",children:[u.jsx(nt,{children:"配置类型"}),u.jsx(st,{children:u.jsx(ht,{...c})}),u.jsx(Xe,{})]})}),u.jsxs("div",{className:"flex space-x-2",children:[u.jsx(at,{control:i.control,name:"host",render:({field:c})=>u.jsxs(rt,{className:"grow",children:[u.jsx(nt,{children:"服务器IP"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入Host",...c})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"port",render:({field:c})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"SSH端口"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入Port",...c,type:"number"})}),u.jsx(Xe,{})]})})]}),u.jsx(at,{control:i.control,name:"username",render:({field:c})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"用户名"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入用户名",...c})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"password",render:({field:c})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"密码"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入密码",...c,type:"password"})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"key",render:({field:c})=>u.jsxs(rt,{hidden:!0,children:[u.jsx(nt,{children:"Key(使用证书登录)"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入Key",...c})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"keyFile",render:({field:c})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"Key(使用证书登录)"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入Key",...c,type:"file",onChange:l})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"certPath",render:({field:c})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"证书上传路径"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入证书上传路径",...c})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"keyPath",render:({field:c})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"私钥上传路径"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入私钥上传路径",...c})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:i.control,name:"command",render:({field:c})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"Command"}),u.jsx(st,{children:u.jsx(nT,{placeholder:"请输入要执行的命令",...c})}),u.jsx(Xe,{})]})}),u.jsx(Xe,{}),u.jsx("div",{className:"flex justify-end",children:u.jsx(Lt,{type:"submit",children:"保存"})})]})})})})};function nl({trigger:e,op:t,data:r,className:n}){const[s,o]=w.useState(!1),i=Array.from(Oo.keys()),[a,l]=w.useState((r==null?void 0:r.configType)||"");let c=u.jsx(u.Fragment,{children:" "});switch(a){case"tencent":c=u.jsx(T6,{data:r,onAfterReq:()=>{o(!1)}});break;case"aliyun":c=u.jsx(R6,{data:r,onAfterReq:()=>{o(!1)}});break;case"ssh":c=u.jsx(z6,{data:r,onAfterReq:()=>{o(!1)}});break}const f=d=>d==a?"border-primary":"";return u.jsxs(S6,{onOpenChange:o,open:s,children:[u.jsx(k6,{asChild:!0,className:we(n),children:e}),u.jsxs($E,{className:"sm:max-w-[600px] w-full",children:[u.jsx(VE,{children:u.jsxs(WE,{children:[t=="add"?"添加":"编辑","授权"]})}),u.jsxs("div",{className:"container",children:[u.jsx(Zl,{children:"服务商"}),u.jsx(Ov,{value:a,className:"flex mt-3 space-x-2",onValueChange:d=>{console.log(d),l(d)},children:i.map(d=>{var h,m;return u.jsx("div",{className:"flex items-center space-x-2",children:u.jsxs(Zl,{children:[u.jsx(Av,{value:d,hidden:!0}),u.jsxs("div",{className:we("flex items-center space-x-2 border p-2 rounded cursor-pointer",f(d)),children:[u.jsx("img",{src:(h=Oo.get(d))==null?void 0:h[1],className:"h-6"}),u.jsx("div",{children:(m=Oo.get(d))==null?void 0:m[0]})]})]})},d)})}),c]})]})]})}const U6=()=>{const{config:{accesses:e}}=hc(),[t,r]=w.useState(),n=po();w.useEffect(()=>{const y=new URLSearchParams(n.search).get("id");y&&(async()=>{const x=await w5(y);r(x)})()},[n.search]);const s=He.object({id:He.string().optional(),domain:He.string().regex(/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,{message:"请输入正确的域名"}),access:He.string().regex(/^[a-zA-Z0-9]+$/,{message:"请选择DNS服务商授权配置"}),targetAccess:He.string().regex(/^[a-zA-Z0-9]+$/,{message:"请选择部署服务商配置"}),targetType:He.string().regex(/^[a-zA-Z0-9-]+$/,{message:"请选择部署服务类型"})}),o=pa({resolver:ma(s),defaultValues:{id:"",domain:"",access:"",targetAccess:"",targetType:""}});w.useEffect(()=>{t&&o.reset({id:t.id,domain:t.domain,access:t.access,targetAccess:t.targetAccess,targetType:t.targetType})},[t,o]);const[i,a]=w.useState(t?t.targetType:""),l=e.filter(m=>{if(i=="")return!0;const y=o.getValues().targetType.split("-");return m.configType===y[0]}),{toast:c}=vf(),f=Ss(),d=async m=>{const y={id:m.id,crontab:"0 0 * * *",domain:m.domain,access:m.access,targetAccess:m.targetAccess,targetType:m.targetType};try{await Yp(y);let p="域名编辑成功";y.id==""&&(p="域名添加成功"),c({title:"成功",description:p}),f("/")}catch(p){Object.entries(p.response.data).forEach(([g,v])=>{o.setError(g,{type:"manual",message:v.message})});return}},h=m=>o.getValues().targetType==m?"border-primary":"";return u.jsx(u.Fragment,{children:u.jsxs("div",{className:"",children:[u.jsx(xv,{}),u.jsxs("div",{className:"border-b h-10 text-muted-foreground",children:[t!=null&&t.id?"编辑":"新增","域名"]}),u.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:u.jsx(ga,{...o,children:u.jsxs("form",{onSubmit:o.handleSubmit(d),className:"space-y-8",children:[u.jsx(at,{control:o.control,name:"domain",render:({field:m})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"域名"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"请输入域名",...m})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:o.control,name:"access",render:({field:m})=>u.jsxs(rt,{children:[u.jsxs(nt,{className:"flex w-full justify-between",children:[u.jsx("div",{children:"DNS 服务商授权配置"}),u.jsx(nl,{trigger:u.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[u.jsx(x0,{size:14}),"新增"]}),op:"add"})]}),u.jsx(st,{children:u.jsxs(yw,{...m,value:m.value,onValueChange:y=>{o.setValue("access",y)},children:[u.jsx(nm,{children:u.jsx(xw,{placeholder:"请选择授权配置"})}),u.jsx(sm,{children:u.jsxs(ww,{children:[u.jsx(om,{children:"服务商授权配置"}),e.map(y=>{var p;return u.jsx(im,{value:y.id,children:u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx("img",{className:"w-6",src:(p=Oo.get(y.configType))==null?void 0:p[1]}),u.jsx("div",{children:y.name})]})},y.id)})]})})]})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:o.control,name:"targetType",render:({field:m})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"部署服务类型"}),u.jsx(st,{children:u.jsx(Ov,{className:"flex mt-3 space-x-2",onValueChange:y=>{a(y),o.setValue("targetType",y)},...m,children:b6.map(y=>{var p,x;return u.jsx("div",{className:"flex items-center space-x-2",children:u.jsxs(Zl,{children:[u.jsx(Av,{value:y,id:y,hidden:!0}),u.jsxs("div",{className:we("flex items-center space-x-2 border p-2 rounded cursor-pointer",h(y)),children:[u.jsx("img",{src:(p=am.get(y))==null?void 0:p[1],className:"h-6"}),u.jsx("div",{children:(x=am.get(y))==null?void 0:x[0]})]})]})},y)})})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:o.control,name:"targetAccess",render:({field:m})=>u.jsxs(rt,{children:[u.jsxs(nt,{className:"w-full flex justify-between",children:[u.jsx("div",{children:"部署服务商授权配置"}),u.jsx(nl,{trigger:u.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[u.jsx(x0,{size:14}),"新增"]}),op:"add"})]}),u.jsx(st,{children:u.jsxs(yw,{...m,onValueChange:y=>{o.setValue("targetAccess",y)},children:[u.jsx(nm,{children:u.jsx(xw,{placeholder:"请选择授权配置"})}),u.jsx(sm,{children:u.jsxs(ww,{children:[u.jsx(om,{children:"服务商授权配置"}),l.map(y=>{var p;return u.jsx(im,{value:y.id,children:u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx("img",{className:"w-6",src:(p=Oo.get(y.configType))==null?void 0:p[1]}),u.jsx("div",{children:y.name})]})},y.id)})]})})]})}),u.jsx(Xe,{})]})}),u.jsx("div",{className:"flex justify-end",children:u.jsx(Lt,{type:"submit",children:"保存"})})]})})})]})})},$6=()=>{const{config:e,deleteAccess:t}=hc(),{accesses:r}=e,n=async s=>{const o=await Z4(s);t(o.id)};return u.jsxs("div",{className:"",children:[u.jsxs("div",{className:"flex justify-between items-center",children:[u.jsx("div",{className:"text-muted-foreground",children:"授权管理"}),u.jsx(nl,{trigger:u.jsx(Lt,{children:"添加授权"}),op:"add"})]}),r.length===0?u.jsxs("div",{className:"flex flex-col items-center mt-10",children:[u.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:u.jsx(VP,{size:40,className:"text-primary"})}),u.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:"请添加授权开始部署证书吧。"}),u.jsx(nl,{trigger:u.jsx(Lt,{children:"添加授权"}),op:"add",className:"mt-3"})]}):u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b sm:p-2 mt-5",children:[u.jsx("div",{className:"w-48",children:"名称"}),u.jsx("div",{className:"w-48",children:"服务商"}),u.jsx("div",{className:"w-52",children:"创建时间"}),u.jsx("div",{className:"w-52",children:"更新时间"}),u.jsx("div",{className:"grow",children:"操作"})]}),u.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"授权列表"}),r.map(s=>{var o,i;return u.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b sm:p-2 hover:bg-muted/50 text-sm",children:[u.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:s.name}),u.jsxs("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center space-x-2",children:[u.jsx("img",{src:(o=Oo.get(s.configType))==null?void 0:o[1],className:"w-6"}),u.jsx("div",{children:(i=Oo.get(s.configType))==null?void 0:i[0]})]}),u.jsxs("div",{className:"sm:w-52 w-full pt-1 sm:pt-0 flex items-center",children:["创建于 ",s.created&&Dl(s.created)]}),u.jsxs("div",{className:"sm:w-52 w-full pt-1 sm:pt-0 flex items-center",children:["更新于 ",s.updated&&Dl(s.updated)]}),u.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[u.jsx(nl,{trigger:u.jsx(Lt,{variant:"link",className:"p-0",children:"编辑"}),op:"edit",data:s}),u.jsx(Kt,{orientation:"vertical",className:"h-4 mx-2"}),u.jsx(Lt,{variant:"link",className:"p-0",onClick:()=>{n(s)},children:"删除"})]})]},s.id)})]})]})},V6=Jl("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),sT=w.forwardRef(({className:e,variant:t,...r},n)=>u.jsx("div",{ref:n,role:"alert",className:we(V6({variant:t}),e),...r}));sT.displayName="Alert";const oT=w.forwardRef(({className:e,...t},r)=>u.jsx("h5",{ref:r,className:we("mb-1 font-medium leading-none tracking-tight",e),...t}));oT.displayName="AlertTitle";const iT=w.forwardRef(({className:e,...t},r)=>u.jsx("div",{ref:r,className:we("text-sm [&_p]:leading-relaxed",e),...t}));iT.displayName="AlertDescription";function W6(e,t){return w.useReducer((r,n)=>t[r][n]??r,e)}var Mv="ScrollArea",[aT,bU]=Er(Mv),[B6,en]=aT(Mv),lT=w.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:s,scrollHideDelay:o=600,...i}=e,[a,l]=w.useState(null),[c,f]=w.useState(null),[d,h]=w.useState(null),[m,y]=w.useState(null),[p,x]=w.useState(null),[g,v]=w.useState(0),[_,C]=w.useState(0),[E,T]=w.useState(!1),[P,O]=w.useState(!1),j=ze(t,q=>l(q)),L=ec(s);return u.jsx(B6,{scope:r,type:n,dir:L,scrollHideDelay:o,scrollArea:a,viewport:c,onViewportChange:f,content:d,onContentChange:h,scrollbarX:m,onScrollbarXChange:y,scrollbarXEnabled:E,onScrollbarXEnabledChange:T,scrollbarY:p,onScrollbarYChange:x,scrollbarYEnabled:P,onScrollbarYEnabledChange:O,onCornerWidthChange:v,onCornerHeightChange:C,children:u.jsx(De.div,{dir:L,...i,ref:j,style:{position:"relative","--radix-scroll-area-corner-width":g+"px","--radix-scroll-area-corner-height":_+"px",...e.style}})})});lT.displayName=Mv;var cT="ScrollAreaViewport",uT=w.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:s,...o}=e,i=en(cT,r),a=w.useRef(null),l=ze(t,a,i.onViewportChange);return u.jsxs(u.Fragment,{children:[u.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),u.jsx(De.div,{"data-radix-scroll-area-viewport":"",...o,ref:l,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:u.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});uT.displayName=cT;var $n="ScrollAreaScrollbar",Iv=w.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=en($n,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:i}=s,a=e.orientation==="horizontal";return w.useEffect(()=>(a?o(!0):i(!0),()=>{a?o(!1):i(!1)}),[a,o,i]),s.type==="hover"?u.jsx(H6,{...n,ref:t,forceMount:r}):s.type==="scroll"?u.jsx(Y6,{...n,ref:t,forceMount:r}):s.type==="auto"?u.jsx(dT,{...n,ref:t,forceMount:r}):s.type==="always"?u.jsx(Lv,{...n,ref:t}):null});Iv.displayName=$n;var H6=w.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=en($n,e.__scopeScrollArea),[o,i]=w.useState(!1);return w.useEffect(()=>{const a=s.scrollArea;let l=0;if(a){const c=()=>{window.clearTimeout(l),i(!0)},f=()=>{l=window.setTimeout(()=>i(!1),s.scrollHideDelay)};return a.addEventListener("pointerenter",c),a.addEventListener("pointerleave",f),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",c),a.removeEventListener("pointerleave",f)}}},[s.scrollArea,s.scrollHideDelay]),u.jsx(vr,{present:r||o,children:u.jsx(dT,{"data-state":o?"visible":"hidden",...n,ref:t})})}),Y6=w.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=en($n,e.__scopeScrollArea),o=e.orientation==="horizontal",i=Pf(()=>l("SCROLL_END"),100),[a,l]=W6("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return w.useEffect(()=>{if(a==="idle"){const c=window.setTimeout(()=>l("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(c)}},[a,s.scrollHideDelay,l]),w.useEffect(()=>{const c=s.viewport,f=o?"scrollLeft":"scrollTop";if(c){let d=c[f];const h=()=>{const m=c[f];d!==m&&(l("SCROLL"),i()),d=m};return c.addEventListener("scroll",h),()=>c.removeEventListener("scroll",h)}},[s.viewport,o,l,i]),u.jsx(vr,{present:r||a!=="hidden",children:u.jsx(Lv,{"data-state":a==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:le(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:le(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),dT=w.forwardRef((e,t)=>{const r=en($n,e.__scopeScrollArea),{forceMount:n,...s}=e,[o,i]=w.useState(!1),a=e.orientation==="horizontal",l=Pf(()=>{if(r.viewport){const c=r.viewport.offsetWidth{const{orientation:r="vertical",...n}=e,s=en($n,e.__scopeScrollArea),o=w.useRef(null),i=w.useRef(0),[a,l]=w.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=gT(a.viewport,a.content),f={...n,sizes:a,onSizesChange:l,hasThumb:c>0&&c<1,onThumbChange:h=>o.current=h,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:h=>i.current=h};function d(h,m){return Q6(h,i.current,a,m)}return r==="horizontal"?u.jsx(Z6,{...f,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const h=s.viewport.scrollLeft,m=_w(h,a,s.dir);o.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:h=>{s.viewport&&(s.viewport.scrollLeft=h)},onDragScroll:h=>{s.viewport&&(s.viewport.scrollLeft=d(h,s.dir))}}):r==="vertical"?u.jsx(G6,{...f,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const h=s.viewport.scrollTop,m=_w(h,a);o.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:h=>{s.viewport&&(s.viewport.scrollTop=h)},onDragScroll:h=>{s.viewport&&(s.viewport.scrollTop=d(h))}}):null}),Z6=w.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...s}=e,o=en($n,e.__scopeScrollArea),[i,a]=w.useState(),l=w.useRef(null),c=ze(t,l,o.onScrollbarXChange);return w.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),u.jsx(hT,{"data-orientation":"horizontal",...s,ref:c,sizes:r,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Nf(r)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,d)=>{if(o.viewport){const h=o.viewport.scrollLeft+f.deltaX;e.onWheelScroll(h),yT(h,d)&&f.preventDefault()}},onResize:()=>{l.current&&o.viewport&&i&&n({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:kd(i.paddingLeft),paddingEnd:kd(i.paddingRight)}})}})}),G6=w.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...s}=e,o=en($n,e.__scopeScrollArea),[i,a]=w.useState(),l=w.useRef(null),c=ze(t,l,o.onScrollbarYChange);return w.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),u.jsx(hT,{"data-orientation":"vertical",...s,ref:c,sizes:r,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Nf(r)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,d)=>{if(o.viewport){const h=o.viewport.scrollTop+f.deltaY;e.onWheelScroll(h),yT(h,d)&&f.preventDefault()}},onResize:()=>{l.current&&o.viewport&&i&&n({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:kd(i.paddingTop),paddingEnd:kd(i.paddingBottom)}})}})}),[K6,fT]=aT($n),hT=w.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:s,onThumbChange:o,onThumbPointerUp:i,onThumbPointerDown:a,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:f,onResize:d,...h}=e,m=en($n,r),[y,p]=w.useState(null),x=ze(t,j=>p(j)),g=w.useRef(null),v=w.useRef(""),_=m.viewport,C=n.content-n.viewport,E=Pt(f),T=Pt(l),P=Pf(d,10);function O(j){if(g.current){const L=j.clientX-g.current.left,q=j.clientY-g.current.top;c({x:L,y:q})}}return w.useEffect(()=>{const j=L=>{const q=L.target;(y==null?void 0:y.contains(q))&&E(L,C)};return document.addEventListener("wheel",j,{passive:!1}),()=>document.removeEventListener("wheel",j,{passive:!1})},[_,y,C,E]),w.useEffect(T,[n,T]),ea(y,P),ea(m.content,P),u.jsx(K6,{scope:r,scrollbar:y,hasThumb:s,onThumbChange:Pt(o),onThumbPointerUp:Pt(i),onThumbPositionChange:T,onThumbPointerDown:Pt(a),children:u.jsx(De.div,{...h,ref:x,style:{position:"absolute",...h.style},onPointerDown:le(e.onPointerDown,j=>{j.button===0&&(j.target.setPointerCapture(j.pointerId),g.current=y.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),O(j))}),onPointerMove:le(e.onPointerMove,O),onPointerUp:le(e.onPointerUp,j=>{const L=j.target;L.hasPointerCapture(j.pointerId)&&L.releasePointerCapture(j.pointerId),document.body.style.webkitUserSelect=v.current,m.viewport&&(m.viewport.style.scrollBehavior=""),g.current=null})})})}),Sd="ScrollAreaThumb",pT=w.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=fT(Sd,e.__scopeScrollArea);return u.jsx(vr,{present:r||s.hasThumb,children:u.jsx(q6,{ref:t,...n})})}),q6=w.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...s}=e,o=en(Sd,r),i=fT(Sd,r),{onThumbPositionChange:a}=i,l=ze(t,d=>i.onThumbChange(d)),c=w.useRef(),f=Pf(()=>{c.current&&(c.current(),c.current=void 0)},100);return w.useEffect(()=>{const d=o.viewport;if(d){const h=()=>{if(f(),!c.current){const m=J6(d,a);c.current=m,a()}};return a(),d.addEventListener("scroll",h),()=>d.removeEventListener("scroll",h)}},[o.viewport,f,a]),u.jsx(De.div,{"data-state":i.hasThumb?"visible":"hidden",...s,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:le(e.onPointerDownCapture,d=>{const m=d.target.getBoundingClientRect(),y=d.clientX-m.left,p=d.clientY-m.top;i.onThumbPointerDown({x:y,y:p})}),onPointerUp:le(e.onPointerUp,i.onThumbPointerUp)})});pT.displayName=Sd;var Fv="ScrollAreaCorner",mT=w.forwardRef((e,t)=>{const r=en(Fv,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?u.jsx(X6,{...e,ref:t}):null});mT.displayName=Fv;var X6=w.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,s=en(Fv,r),[o,i]=w.useState(0),[a,l]=w.useState(0),c=!!(o&&a);return ea(s.scrollbarX,()=>{var d;const f=((d=s.scrollbarX)==null?void 0:d.offsetHeight)||0;s.onCornerHeightChange(f),l(f)}),ea(s.scrollbarY,()=>{var d;const f=((d=s.scrollbarY)==null?void 0:d.offsetWidth)||0;s.onCornerWidthChange(f),i(f)}),c?u.jsx(De.div,{...n,ref:t,style:{width:o,height:a,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function kd(e){return e?parseInt(e,10):0}function gT(e,t){const r=e/t;return isNaN(r)?0:r}function Nf(e){const t=gT(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function Q6(e,t,r,n="ltr"){const s=Nf(r),o=s/2,i=t||o,a=s-i,l=r.scrollbar.paddingStart+i,c=r.scrollbar.size-r.scrollbar.paddingEnd-a,f=r.content-r.viewport,d=n==="ltr"?[0,f]:[f*-1,0];return vT([l,c],d)(e)}function _w(e,t,r="ltr"){const n=Nf(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-s,i=t.content-t.viewport,a=o-n,l=r==="ltr"?[0,i]:[i*-1,0],c=Xp(e,l);return vT([0,i],[0,a])(c)}function vT(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function yT(e,t){return e>0&&e{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function s(){const o={left:e.scrollLeft,top:e.scrollTop},i=r.left!==o.left,a=r.top!==o.top;(i||a)&&t(),r=o,n=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(n)};function Pf(e,t){const r=Pt(e),n=w.useRef(0);return w.useEffect(()=>()=>window.clearTimeout(n.current),[]),w.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function ea(e,t){const r=Pt(t);rr(()=>{let n=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return s.observe(e),()=>{window.cancelAnimationFrame(n),s.unobserve(e)}}},[e,r])}var wT=lT,eU=uT,tU=mT;const xT=w.forwardRef(({className:e,children:t,...r},n)=>u.jsxs(wT,{ref:n,className:we("relative overflow-hidden",e),...r,children:[u.jsx(eU,{className:"h-full w-full rounded-[inherit]",children:t}),u.jsx(_T,{}),u.jsx(tU,{})]}));xT.displayName=wT.displayName;const _T=w.forwardRef(({className:e,orientation:t="vertical",...r},n)=>u.jsx(Iv,{ref:n,orientation:t,className:we("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:u.jsx(pT,{className:"relative flex-1 rounded-full bg-border"})}));_T.displayName=Iv.displayName;const rU=async e=>{let t=1;e.page&&(t=e.page);let r=50;e.perPage&&(r=e.perPage);let n="domain!=null";return e.domain&&(n=`domain="${e.domain}"`),await jt().collection("deployments").getList(t,r,{filter:n,sort:"-deployedAt",expand:"domain"})},nU=()=>{const e=Ss(),[t,r]=w.useState(),[n]=MP(),s=n.get("domain");return w.useEffect(()=>{(async()=>{const i={};s&&(i.domain=s);const a=await rU(i);r(a.items)})()},[s]),u.jsxs(xT,{className:"h-[80vh] overflow-hidden",children:[u.jsx("div",{className:"text-muted-foreground",children:"部署历史"}),t!=null&&t.length?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b sm:p-2 mt-5",children:[u.jsx("div",{className:"w-48",children:"域名"}),u.jsx("div",{className:"w-24",children:"状态"}),u.jsx("div",{className:"w-56",children:"阶段"}),u.jsx("div",{className:"w-56 sm:ml-2 text-center",children:"最近执行时间"}),u.jsx("div",{className:"grow",children:"操作"})]}),u.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"部署历史"}),t==null?void 0:t.map(o=>{var i,a;return u.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b sm:p-2 hover:bg-muted/50 text-sm",children:[u.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:(i=o.expand.domain)==null?void 0:i.domain}),u.jsx("div",{className:"sm:w-24 w-full pt-1 sm:pt-0 flex items-center",children:o.phase==="deploy"&&o.phaseSuccess?u.jsx(n1,{size:16,className:"text-green-700"}):u.jsx(s1,{size:16,className:"text-red-700"})}),u.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center",children:u.jsx(hk,{phase:o.phase,phaseSuccess:o.phaseSuccess})}),u.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center sm:justify-center",children:Dl(o.deployedAt)}),u.jsx("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0 sm:ml-2",children:u.jsxs(uS,{children:[u.jsx(dS,{asChild:!0,children:u.jsx(Lt,{variant:"link",className:"p-0",children:"日志"})}),u.jsxs(Bg,{className:"sm:max-w-5xl",children:[u.jsx(hS,{children:u.jsxs(pS,{children:[(a=o.expand.domain)==null?void 0:a.domain,"-",o.id,"部署详情"]})}),u.jsxs("div",{className:"bg-gray-950 text-stone-100 p-5 text-sm h-[80dvh]",children:[o.log.check&&u.jsx(u.Fragment,{children:o.log.check.map(l=>u.jsxs("div",{className:"flex flex-col mt-2",children:[u.jsxs("div",{className:"flex",children:[u.jsxs("div",{children:["[",l.time,"]"]}),u.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&u.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))}),o.log.apply&&u.jsx(u.Fragment,{children:o.log.apply.map(l=>u.jsxs("div",{className:"flex flex-col mt-2",children:[u.jsxs("div",{className:"flex",children:[u.jsxs("div",{children:["[",l.time,"]"]}),u.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&u.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))}),o.log.deploy&&u.jsx(u.Fragment,{children:o.log.deploy.map(l=>u.jsxs("div",{className:"flex flex-col mt-2",children:[u.jsxs("div",{className:"flex",children:[u.jsxs("div",{children:["[",l.time,"]"]}),u.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&u.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))})]})]})]})})]},o.id)})]}):u.jsx(u.Fragment,{children:u.jsxs(sT,{className:"max-w-[40em] mx-auto mt-20",children:[u.jsx(oT,{children:"暂无数据"}),u.jsxs(iT,{children:[u.jsxs("div",{className:"flex items-center mt-5",children:[u.jsx("div",{children:u.jsx(BP,{className:"text-yellow-400",size:36})}),u.jsxs("div",{className:"ml-2",children:[" ","你暂未创建任何部署,请先添加域名进行部署吧!"]})]}),u.jsx("div",{className:"mt-2 flex justify-end",children:u.jsx(Lt,{onClick:()=>{e("/")},children:"添加域名"})})]})]})})]})},lm=e=>e instanceof Error?e.message:typeof e=="object"&&e!==null&&"message"in e?String(e.message):typeof e=="string"?e:"Something went wrong",sU=He.object({username:He.string().email({message:"请输入正确的邮箱地址"}),password:He.string().min(10,{message:"密码至少10个字符"})}),oU=()=>{const e=pa({resolver:ma(sU),defaultValues:{username:"",password:""}}),t=async n=>{try{await jt().admins.authWithPassword(n.username,n.password),r("/")}catch(s){const o=lm(s);e.setError("username",{message:o}),e.setError("password",{message:o})}},r=Ss();return u.jsxs("div",{className:"max-w-[35em] border mx-auto mt-32 p-10 rounded-md shadow-md",children:[u.jsx("div",{className:"flex justify-center mb-10",children:u.jsx("img",{src:"/vite.svg",className:"w-16"})}),u.jsx(ga,{...e,children:u.jsxs("form",{onSubmit:e.handleSubmit(t),className:"space-y-8",children:[u.jsx(at,{control:e.control,name:"username",render:({field:n})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"用户名"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"email",...n})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:e.control,name:"password",render:({field:n})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"密码"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"shadcn",...n,type:"password"})}),u.jsx(Xe,{})]})}),u.jsx("div",{className:"flex justify-end",children:u.jsx(Lt,{type:"submit",children:"登录"})})]})})]})},iU=()=>jt().authStore.isValid&&jt().authStore.isAdmin?u.jsx(J_,{to:"/"}):u.jsx("div",{className:"container",children:u.jsx(lg,{})}),aU=He.object({oldPassword:He.string().min(10,{message:"密码至少10个字符"}),newPassword:He.string().min(10,{message:"密码至少10个字符"}),confirmPassword:He.string().min(10,{message:"密码至少10个字符"})}).refine(e=>e.newPassword===e.confirmPassword,{message:"两次密码不一致",path:["confirmPassword"]}),lU=()=>{const{toast:e}=vf(),t=Ss(),r=pa({resolver:ma(aU),defaultValues:{oldPassword:"",newPassword:"",confirmPassword:""}}),n=async s=>{var o,i;try{await jt().admins.authWithPassword((o=jt().authStore.model)==null?void 0:o.email,s.oldPassword)}catch(a){const l=lm(a);r.setError("oldPassword",{message:l})}try{await jt().admins.update((i=jt().authStore.model)==null?void 0:i.id,{password:s.newPassword,passwordConfirm:s.confirmPassword}),jt().authStore.clear(),e({title:"修改密码成功",description:"请重新登录"}),setTimeout(()=>{t("/login")},500)}catch(a){const l=lm(a);e({title:"修改密码失败",description:l,variant:"destructive"})}};return u.jsx(u.Fragment,{children:u.jsx(ga,{...r,children:u.jsxs("form",{onSubmit:r.handleSubmit(n),className:"space-y-8",children:[u.jsx(at,{control:r.control,name:"oldPassword",render:({field:s})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"当前密码"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"当前密码",...s,type:"password"})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:r.control,name:"newPassword",render:({field:s})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"新密码"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"newPassword",...s,type:"password"})}),u.jsx(Xe,{})]})}),u.jsx(at,{control:r.control,name:"confirmPassword",render:({field:s})=>u.jsxs(rt,{children:[u.jsx(nt,{children:"确认密码"}),u.jsx(st,{children:u.jsx(ht,{placeholder:"confirmPassword",...s,type:"password"})}),u.jsx(Xe,{})]})}),u.jsx("div",{className:"flex justify-end",children:u.jsx(Lt,{type:"submit",children:"确认修改"})})]})})})},cU=()=>u.jsxs("div",{children:[u.jsx(xv,{}),u.jsx("div",{className:"text-muted-foreground",children:"设置密码"}),u.jsx("div",{className:"w-full sm:w-[35em] mt-10 flex flex-col p-3",children:u.jsx(lg,{})})]}),uU=xP([{path:"/",element:u.jsx(q4,{}),children:[{path:"/",element:u.jsx(S5,{})},{path:"/edit",element:u.jsx(U6,{})},{path:"/access",element:u.jsx($6,{})},{path:"/history",element:u.jsx(nU,{})},{path:"/setting",element:u.jsx(cU,{}),children:[{path:"/setting/password",element:u.jsx(lU,{})}]}]},{path:"/login",element:u.jsx(iU,{}),children:[{path:"/login",element:u.jsx(oU,{})}]},{path:"/about",element:u.jsx("div",{children:"About"})}]);Rh.createRoot(document.getElementById("root")).render(u.jsx(Ge.StrictMode,{children:u.jsx(NP,{router:uU})}))});export default dU();