From 116b520ee8e5e5a41ae03c1ebc3b8a5cb18e04ab Mon Sep 17 00:00:00 2001 From: yoan <536464346@qq.com> Date: Thu, 22 Aug 2024 22:26:18 +0800 Subject: [PATCH] add release action --- .github/workflow/release.yml | 36 ++++ ui/dist/assets/index-127rBbJX.css | 1 + ui/dist/assets/index-3QHTbODC.js | 228 ++++++++++++++++++++++++++ ui/dist/assets/index-5KJiNPtI.js | 228 -------------------------- ui/dist/assets/index-D631C4rs.css | 1 - ui/dist/imgs/providers/aliyun.svg | 1 + ui/dist/imgs/providers/baidu.svg | 1 + ui/dist/imgs/providers/baisan.avif | Bin 0 -> 2163 bytes ui/dist/imgs/providers/qiniu.svg | 1 + ui/dist/imgs/providers/ssh.png | Bin 0 -> 1002 bytes ui/dist/imgs/providers/tencent.svg | 1 + ui/dist/imgs/providers/volcengine.svg | 13 ++ ui/dist/imgs/providers/wangsu.svg | 9 + ui/dist/index.html | 4 +- 14 files changed, 293 insertions(+), 231 deletions(-) create mode 100644 .github/workflow/release.yml create mode 100644 ui/dist/assets/index-127rBbJX.css create mode 100644 ui/dist/assets/index-3QHTbODC.js delete mode 100644 ui/dist/assets/index-5KJiNPtI.js delete mode 100644 ui/dist/assets/index-D631C4rs.css create mode 100644 ui/dist/imgs/providers/aliyun.svg create mode 100644 ui/dist/imgs/providers/baidu.svg create mode 100644 ui/dist/imgs/providers/baisan.avif create mode 100644 ui/dist/imgs/providers/qiniu.svg create mode 100644 ui/dist/imgs/providers/ssh.png create mode 100644 ui/dist/imgs/providers/tencent.svg create mode 100644 ui/dist/imgs/providers/volcengine.svg create mode 100644 ui/dist/imgs/providers/wangsu.svg diff --git a/.github/workflow/release.yml b/.github/workflow/release.yml new file mode 100644 index 00000000..ff147145 --- /dev/null +++ b/.github/workflow/release.yml @@ -0,0 +1,36 @@ +name: basebuild + +on: + pull_request: + push: + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 20.11.0 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: ">=1.22.5" + + - name: Build Admin dashboard UI + run: npm --prefix=./ui run build + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v3 + with: + distribution: goreleaser + version: latest + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/ui/dist/assets/index-127rBbJX.css b/ui/dist/assets/index-127rBbJX.css new file mode 100644 index 00000000..b21d3b11 --- /dev/null +++ b/ui/dist/assets/index-127rBbJX.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-\[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}.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-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}.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-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-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.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-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\: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\: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-3QHTbODC.js b/ui/dist/assets/index-3QHTbODC.js new file mode 100644 index 00000000..667c9078 --- /dev/null +++ b/ui/dist/assets/index-3QHTbODC.js @@ -0,0 +1,228 @@ +var ZE=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var fz=ZE((bz,fu)=>{function tw(e,t){for(var n=0;nr[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"]'))r(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"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(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 r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();function nw(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rw={exports:{}},ud={},sw={exports:{}},Re={};/** + * @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 Al=Symbol.for("react.element"),qE=Symbol.for("react.portal"),QE=Symbol.for("react.fragment"),XE=Symbol.for("react.strict_mode"),JE=Symbol.for("react.profiler"),eT=Symbol.for("react.provider"),tT=Symbol.for("react.context"),nT=Symbol.for("react.forward_ref"),rT=Symbol.for("react.suspense"),sT=Symbol.for("react.memo"),oT=Symbol.for("react.lazy"),Sv=Symbol.iterator;function iT(e){return e===null||typeof e!="object"?null:(e=Sv&&e[Sv]||e["@@iterator"],typeof e=="function"?e:null)}var ow={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},iw=Object.assign,aw={};function Yi(e,t,n){this.props=e,this.context=t,this.refs=aw,this.updater=n||ow}Yi.prototype.isReactComponent={};Yi.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")};Yi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function lw(){}lw.prototype=Yi.prototype;function Hp(e,t,n){this.props=e,this.context=t,this.refs=aw,this.updater=n||ow}var Gp=Hp.prototype=new lw;Gp.constructor=Hp;iw(Gp,Yi.prototype);Gp.isPureReactComponent=!0;var bv=Array.isArray,cw=Object.prototype.hasOwnProperty,Kp={current:null},uw={key:!0,ref:!0,__self:!0,__source:!0};function dw(e,t,n){var r,s={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)cw.call(t,r)&&!uw.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1>>1,me=I[le];if(0>>1;les(gt,q))Ues(ce,gt)?(I[le]=ce,I[Ue]=q,le=Ue):(I[le]=gt,I[Pe]=q,le=Pe);else if(Ues(ce,q))I[le]=ce,I[Ue]=q,le=Ue;else break e}}return D}function s(I,D){var q=I.sortIndex-D.sortIndex;return q!==0?q:I.id-D.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=[],u=[],d=1,f=null,p=3,x=!1,g=!1,v=!1,_=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(I){for(var D=n(u);D!==null;){if(D.callback===null)r(u);else if(D.startTime<=I)r(u),D.sortIndex=D.expirationTime,t(l,D);else break;D=n(u)}}function b(I){if(v=!1,w(I),!g)if(n(l)!==null)g=!0,ne(C);else{var D=n(u);D!==null&&W(b,D.startTime-I)}}function C(I,D){g=!1,v&&(v=!1,y(R),R=-1),x=!0;var q=p;try{for(w(D),f=n(l);f!==null&&(!(f.expirationTime>D)||I&&!Z());){var le=f.callback;if(typeof le=="function"){f.callback=null,p=f.priorityLevel;var me=le(f.expirationTime<=D);D=e.unstable_now(),typeof me=="function"?f.callback=me:f===n(l)&&r(l),w(D)}else r(l);f=n(l)}if(f!==null)var rt=!0;else{var Pe=n(u);Pe!==null&&W(b,Pe.startTime-D),rt=!1}return rt}finally{f=null,p=q,x=!1}}var S=!1,N=null,R=-1,F=5,L=-1;function Z(){return!(e.unstable_now()-LI||125le?(I.sortIndex=q,t(u,I),n(l)===null&&I===n(u)&&(v?(y(R),R=-1):v=!0,W(b,q-le))):(I.sortIndex=me,t(l,I),g||x||(g=!0,ne(C))),I},e.unstable_shouldYield=Z,e.unstable_wrapCallback=function(I){var D=p;return function(){var q=p;p=D;try{return I.apply(this,arguments)}finally{p=q}}}})(vw);gw.exports=vw;var vT=gw.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 yT=h,Dn=vT;function $(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),mh=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]*$/,kv={},Ev={};function wT(e){return mh.call(Ev,e)?!0:mh.call(kv,e)?!1:xT.test(e)?Ev[e]=!0:(kv[e]=!0,!1)}function _T(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function ST(e,t,n,r){if(t===null||typeof t>"u"||_T(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.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 dn(e,t,n,r,s,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var Bt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Bt[e]=new dn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Bt[t]=new dn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Bt[e]=new dn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Bt[e]=new dn(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){Bt[e]=new dn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Bt[e]=new dn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Bt[e]=new dn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Bt[e]=new dn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Bt[e]=new dn(e,5,!1,e.toLowerCase(),null,!1,!1)});var qp=/[\-:]([a-z])/g;function Qp(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(qp,Qp);Bt[t]=new dn(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(qp,Qp);Bt[t]=new dn(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(qp,Qp);Bt[t]=new dn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Bt[e]=new dn(e,1,!1,e.toLowerCase(),null,!1,!1)});Bt.xlinkHref=new dn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Bt[e]=new dn(e,1,!1,e.toLowerCase(),null,!0,!0)});function Xp(e,t,n,r){var s=Bt.hasOwnProperty(t)?Bt[t]:null;(s!==null?s.type!==0:r||!(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{wf=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Sa(e):""}function bT(e){switch(e.tag){case 5:return Sa(e.type);case 16:return Sa("Lazy");case 13:return Sa("Suspense");case 19:return Sa("SuspenseList");case 0:case 2:case 15:return e=_f(e.type,!1),e;case 11:return e=_f(e.type.render,!1),e;case 1:return e=_f(e.type,!0),e;default:return""}}function xh(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 ri:return"Fragment";case ni:return"Portal";case gh:return"Profiler";case Jp:return"StrictMode";case vh:return"Suspense";case yh:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ww:return(e.displayName||"Context")+".Consumer";case xw:return(e._context.displayName||"Context")+".Provider";case em:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case tm:return t=e.displayName||null,t!==null?t:xh(e.type)||"Memo";case ks:t=e._payload,e=e._init;try{return xh(e(t))}catch{}}return null}function CT(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 xh(t);case 8:return t===Jp?"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 Ys(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Sw(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function kT(e){var t=Sw(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function gc(e){e._valueTracker||(e._valueTracker=kT(e))}function bw(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Sw(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function hu(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 wh(e,t){var n=t.checked;return bt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Nv(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ys(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Cw(e,t){t=t.checked,t!=null&&Xp(e,"checked",t,!1)}function _h(e,t){Cw(e,t);var n=Ys(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Sh(e,t.type,n):t.hasOwnProperty("defaultValue")&&Sh(e,t.type,Ys(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Rv(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Sh(e,t,n){(t!=="number"||hu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ba=Array.isArray;function yi(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s"+t.valueOf().toString()+"",t=vc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ha(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ja={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},ET=["Webkit","ms","Moz","O"];Object.keys(ja).forEach(function(e){ET.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ja[t]=ja[e]})});function Nw(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ja.hasOwnProperty(e)&&ja[e]?(""+t).trim():t+"px"}function Rw(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=Nw(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var TT=bt({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 kh(e,t){if(t){if(TT[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error($(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error($(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error($(61))}if(t.style!=null&&typeof t.style!="object")throw Error($(62))}}function Eh(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 Th=null;function nm(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Nh=null,xi=null,wi=null;function Dv(e){if(e=Fl(e)){if(typeof Nh!="function")throw Error($(280));var t=e.stateNode;t&&(t=md(t),Nh(e.stateNode,e.type,t))}}function Pw(e){xi?wi?wi.push(e):wi=[e]:xi=e}function jw(){if(xi){var e=xi,t=wi;if(wi=xi=null,Dv(e),t)for(e=0;e>>=0,e===0?32:31-(FT(e)/UT|0)|0}var yc=64,xc=4194304;function Ca(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 vu(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~s;a!==0?r=Ca(a):(o&=i,o!==0&&(r=Ca(o)))}else i=n&~s,i!==0?r=Ca(i):o!==0&&(r=Ca(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,o=t&-t,s>=o||s===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Il(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-rr(t),e[t]=n}function WT(e,t){var n=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 r=e.eventTimes;for(e=e.expirationTimes;0=Ma),Vv=" ",zv=!1;function Qw(e,t){switch(e){case"keyup":return vN.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Xw(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var si=!1;function xN(e,t){switch(e){case"compositionend":return Xw(t);case"keypress":return t.which!==32?null:(zv=!0,Vv);case"textInput":return e=t.data,e===Vv&&zv?null:e;default:return null}}function wN(e,t){if(si)return e==="compositionend"||!um&&Qw(e,t)?(e=Zw(),Gc=am=Ps=null,si=!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:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Hv(n)}}function n0(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?n0(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function r0(){for(var e=window,t=hu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=hu(e.document)}return t}function dm(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 RN(e){var t=r0(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&n0(n.ownerDocument.documentElement,n)){if(r!==null&&dm(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,o=Math.min(r.start,s);r=r.end===void 0?o:Math.min(r.end,s),!e.extend&&o>r&&(s=r,r=o,o=s),s=Gv(n,o);var i=Gv(n,r);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>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,oi=null,Oh=null,Aa=null,Ah=!1;function Kv(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ah||oi==null||oi!==hu(r)||(r=oi,"selectionStart"in r&&dm(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Aa&&Xa(Aa,r)||(Aa=r,r=wu(Oh,"onSelect"),0li||(e.current=Vh[li],Vh[li]=null,li--)}function it(e,t){li++,Vh[li]=e.current,e.current=t}var Bs={},Xt=eo(Bs),yn=eo(!1),ko=Bs;function Mi(e,t){var n=e.type.contextTypes;if(!n)return Bs;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in n)s[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function xn(e){return e=e.childContextTypes,e!=null}function Su(){ut(yn),ut(Xt)}function ty(e,t,n){if(Xt.current!==Bs)throw Error($(168));it(Xt,t),it(yn,n)}function f0(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error($(108,CT(e)||"Unknown",s));return bt({},n,r)}function bu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Bs,ko=Xt.current,it(Xt,e),it(yn,yn.current),!0}function ny(e,t,n){var r=e.stateNode;if(!r)throw Error($(169));n?(e=f0(e,t,ko),r.__reactInternalMemoizedMergedChildContext=e,ut(yn),ut(Xt),it(Xt,e)):ut(yn),it(yn,n)}var Wr=null,gd=!1,Af=!1;function h0(e){Wr===null?Wr=[e]:Wr.push(e)}function VN(e){gd=!0,h0(e)}function to(){if(!Af&&Wr!==null){Af=!0;var e=0,t=Je;try{var n=Wr;for(Je=1;e>=i,s-=i,Yr=1<<32-rr(t)+s|n<R?(F=N,N=null):F=N.sibling;var L=p(y,N,w[R],b);if(L===null){N===null&&(N=F);break}e&&N&&L.alternate===null&&t(y,N),m=o(L,m,R),S===null?C=L:S.sibling=L,S=L,N=F}if(R===w.length)return n(y,N),mt&&lo(y,R),C;if(N===null){for(;RR?(F=N,N=null):F=N.sibling;var Z=p(y,N,L.value,b);if(Z===null){N===null&&(N=F);break}e&&N&&Z.alternate===null&&t(y,N),m=o(Z,m,R),S===null?C=Z:S.sibling=Z,S=Z,N=F}if(L.done)return n(y,N),mt&&lo(y,R),C;if(N===null){for(;!L.done;R++,L=w.next())L=f(y,L.value,b),L!==null&&(m=o(L,m,R),S===null?C=L:S.sibling=L,S=L);return mt&&lo(y,R),C}for(N=r(y,N);!L.done;R++,L=w.next())L=x(N,y,R,L.value,b),L!==null&&(e&&L.alternate!==null&&N.delete(L.key===null?R:L.key),m=o(L,m,R),S===null?C=L:S.sibling=L,S=L);return e&&N.forEach(function(M){return t(y,M)}),mt&&lo(y,R),C}function _(y,m,w,b){if(typeof w=="object"&&w!==null&&w.type===ri&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case mc:e:{for(var C=w.key,S=m;S!==null;){if(S.key===C){if(C=w.type,C===ri){if(S.tag===7){n(y,S.sibling),m=s(S,w.props.children),m.return=y,y=m;break e}}else if(S.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===ks&&oy(C)===S.type){n(y,S.sibling),m=s(S,w.props),m.ref=da(y,S,w),m.return=y,y=m;break e}n(y,S);break}else t(y,S);S=S.sibling}w.type===ri?(m=_o(w.props.children,y.mode,b,w.key),m.return=y,y=m):(b=tu(w.type,w.key,w.props,null,y.mode,b),b.ref=da(y,m,w),b.return=y,y=b)}return i(y);case ni:e:{for(S=w.key;m!==null;){if(m.key===S)if(m.tag===4&&m.stateNode.containerInfo===w.containerInfo&&m.stateNode.implementation===w.implementation){n(y,m.sibling),m=s(m,w.children||[]),m.return=y,y=m;break e}else{n(y,m);break}else t(y,m);m=m.sibling}m=Wf(w,y.mode,b),m.return=y,y=m}return i(y);case ks:return S=w._init,_(y,m,S(w._payload),b)}if(ba(w))return g(y,m,w,b);if(ia(w))return v(y,m,w,b);Ec(y,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,m!==null&&m.tag===6?(n(y,m.sibling),m=s(m,w),m.return=y,y=m):(n(y,m),m=zf(w,y.mode,b),m.return=y,y=m),i(y)):n(y,m)}return _}var Ai=v0(!0),y0=v0(!1),Eu=eo(null),Tu=null,di=null,mm=null;function gm(){mm=di=Tu=null}function vm(e){var t=Eu.current;ut(Eu),e._currentValue=t}function Yh(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Si(e,t){Tu=e,mm=di=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(vn=!0),e.firstContext=null)}function Wn(e){var t=e._currentValue;if(mm!==e)if(e={context:e,memoizedValue:t,next:null},di===null){if(Tu===null)throw Error($(308));di=e,Tu.dependencies={lanes:0,firstContext:e}}else di=di.next=e;return t}var ho=null;function ym(e){ho===null?ho=[e]:ho.push(e)}function x0(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,ym(t)):(n.next=s.next,s.next=n),t.interleaved=n,es(e,r)}function es(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Es=!1;function xm(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function w0(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 Kr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Us(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ze&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,es(e,n)}return s=r.interleaved,s===null?(t.next=t,ym(r)):(t.next=s.next,s.next=t),r.interleaved=t,es(e,n)}function Zc(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,sm(e,n)}}function iy(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?s=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?s=o=t:o=o.next=t}else s=o=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Nu(e,t,n,r){var s=e.updateQueue;Es=!1;var o=s.firstBaseUpdate,i=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,i===null?o=u:i.next=u,i=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==i&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=l))}if(o!==null){var f=s.baseState;i=0,d=u=l=null,a=o;do{var p=a.lane,x=a.eventTime;if((r&p)===p){d!==null&&(d=d.next={eventTime:x,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var g=e,v=a;switch(p=t,x=n,v.tag){case 1:if(g=v.payload,typeof g=="function"){f=g.call(x,f,p);break e}f=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=v.payload,p=typeof g=="function"?g.call(x,f,p):g,p==null)break e;f=bt({},f,p);break e;case 2:Es=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,p=s.effects,p===null?s.effects=[a]:p.push(a))}else x={eventTime:x,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=x,l=f):d=d.next=x,i|=p;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;p=a,a=p.next,p.next=null,s.lastBaseUpdate=p,s.shared.pending=null}}while(!0);if(d===null&&(l=f),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=d,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);No|=i,e.lanes=i,e.memoizedState=f}}function ay(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Lf.transition;Lf.transition={};try{e(!1),t()}finally{Je=n,Lf.transition=r}}function L0(){return Yn().memoizedState}function BN(e,t,n){var r=Vs(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},F0(e))U0(t,n);else if(n=x0(e,t,n,r),n!==null){var s=ln();sr(n,e,r,s),$0(n,t,r)}}function HN(e,t,n){var r=Vs(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(F0(e))U0(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,n);if(s.hasEagerState=!0,s.eagerState=a,ir(a,i)){var l=t.interleaved;l===null?(s.next=s,ym(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=x0(e,t,s,r),n!==null&&(s=ln(),sr(n,e,r,s),$0(n,t,r))}}function F0(e){var t=e.alternate;return e===St||t!==null&&t===St}function U0(e,t){Ia=Pu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function $0(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,sm(e,n)}}var ju={readContext:Wn,useCallback:Gt,useContext:Gt,useEffect:Gt,useImperativeHandle:Gt,useInsertionEffect:Gt,useLayoutEffect:Gt,useMemo:Gt,useReducer:Gt,useRef:Gt,useState:Gt,useDebugValue:Gt,useDeferredValue:Gt,useTransition:Gt,useMutableSource:Gt,useSyncExternalStore:Gt,useId:Gt,unstable_isNewReconciler:!1},GN={readContext:Wn,useCallback:function(e,t){return vr().memoizedState=[e,t===void 0?null:t],e},useContext:Wn,useEffect:cy,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Qc(4194308,4,D0.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Qc(4194308,4,e,t)},useInsertionEffect:function(e,t){return Qc(4,2,e,t)},useMemo:function(e,t){var n=vr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=vr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=BN.bind(null,St,e),[r.memoizedState,e]},useRef:function(e){var t=vr();return e={current:e},t.memoizedState=e},useState:ly,useDebugValue:Tm,useDeferredValue:function(e){return vr().memoizedState=e},useTransition:function(){var e=ly(!1),t=e[0];return e=YN.bind(null,e[1]),vr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=St,s=vr();if(mt){if(n===void 0)throw Error($(407));n=n()}else{if(n=t(),Ut===null)throw Error($(349));To&30||C0(r,t,n)}s.memoizedState=n;var o={value:n,getSnapshot:t};return s.queue=o,cy(E0.bind(null,r,o,e),[e]),r.flags|=2048,il(9,k0.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=vr(),t=Ut.identifierPrefix;if(mt){var n=Br,r=Yr;n=(r&~(1<<32-rr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=sl++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[yr]=t,e[tl]=r,q0(e,t,!1,!1),t.stateNode=e;e:{switch(i=Eh(n,r),n){case"dialog":lt("cancel",e),lt("close",e),s=r;break;case"iframe":case"object":case"embed":lt("load",e),s=r;break;case"video":case"audio":for(s=0;sFi&&(t.flags|=128,r=!0,fa(o,!1),t.lanes=4194304)}else{if(!r)if(e=Ru(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),fa(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!mt)return Kt(t),null}else 2*Nt()-o.renderingStartTime>Fi&&n!==1073741824&&(t.flags|=128,r=!0,fa(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Nt(),t.sibling=null,n=_t.current,it(_t,r?n&1|2:n&1),t):(Kt(t),null);case 22:case 23:return Mm(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Cn&1073741824&&(Kt(t),t.subtreeFlags&6&&(t.flags|=8192)):Kt(t),null;case 24:return null;case 25:return null}throw Error($(156,t.tag))}function tR(e,t){switch(hm(t),t.tag){case 1:return xn(t.type)&&Su(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ii(),ut(yn),ut(Xt),Sm(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return _m(t),null;case 13:if(ut(_t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error($(340));Oi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ut(_t),null;case 4:return Ii(),null;case 10:return vm(t.type._context),null;case 22:case 23:return Mm(),null;case 24:return null;default:return null}}var Nc=!1,Zt=!1,nR=typeof WeakSet=="function"?WeakSet:Set,ie=null;function fi(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){kt(e,t,r)}else n.current=null}function Jh(e,t,n){try{n()}catch(r){kt(e,t,r)}}var wy=!1;function rR(e,t){if(Ih=yu,e=r0(),dm(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,a=-1,l=-1,u=0,d=0,f=e,p=null;t:for(;;){for(var x;f!==n||s!==0&&f.nodeType!==3||(a=i+s),f!==o||r!==0&&f.nodeType!==3||(l=i+r),f.nodeType===3&&(i+=f.nodeValue.length),(x=f.firstChild)!==null;)p=f,f=x;for(;;){if(f===e)break t;if(p===n&&++u===s&&(a=i),p===o&&++d===r&&(l=i),(x=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=x}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Lh={focusedElem:e,selectionRange:n},yu=!1,ie=t;ie!==null;)if(t=ie,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ie=e;else for(;ie!==null;){t=ie;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var v=g.memoizedProps,_=g.memoizedState,y=t.stateNode,m=y.getSnapshotBeforeUpdate(t.elementType===t.type?v:qn(t.type,v),_);y.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error($(163))}}catch(b){kt(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,ie=e;break}ie=t.return}return g=wy,wy=!1,g}function La(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var o=s.destroy;s.destroy=void 0,o!==void 0&&Jh(t,n,o)}s=s.next}while(s!==r)}}function xd(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ep(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function J0(e){var t=e.alternate;t!==null&&(e.alternate=null,J0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[yr],delete t[tl],delete t[$h],delete t[UN],delete t[$N])),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 e_(e){return e.tag===5||e.tag===3||e.tag===4}function _y(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||e_(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 tp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=_u));else if(r!==4&&(e=e.child,e!==null))for(tp(e,t,n),e=e.sibling;e!==null;)tp(e,t,n),e=e.sibling}function np(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(np(e,t,n),e=e.sibling;e!==null;)np(e,t,n),e=e.sibling}var zt=null,Qn=!1;function ws(e,t,n){for(n=n.child;n!==null;)t_(e,t,n),n=n.sibling}function t_(e,t,n){if(Cr&&typeof Cr.onCommitFiberUnmount=="function")try{Cr.onCommitFiberUnmount(dd,n)}catch{}switch(n.tag){case 5:Zt||fi(n,t);case 6:var r=zt,s=Qn;zt=null,ws(e,t,n),zt=r,Qn=s,zt!==null&&(Qn?(e=zt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):zt.removeChild(n.stateNode));break;case 18:zt!==null&&(Qn?(e=zt,n=n.stateNode,e.nodeType===8?Of(e.parentNode,n):e.nodeType===1&&Of(e,n),qa(e)):Of(zt,n.stateNode));break;case 4:r=zt,s=Qn,zt=n.stateNode.containerInfo,Qn=!0,ws(e,t,n),zt=r,Qn=s;break;case 0:case 11:case 14:case 15:if(!Zt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var o=s,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&Jh(n,t,i),s=s.next}while(s!==r)}ws(e,t,n);break;case 1:if(!Zt&&(fi(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){kt(n,t,a)}ws(e,t,n);break;case 21:ws(e,t,n);break;case 22:n.mode&1?(Zt=(r=Zt)||n.memoizedState!==null,ws(e,t,n),Zt=r):ws(e,t,n);break;default:ws(e,t,n)}}function Sy(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new nR),t.forEach(function(r){var s=fR.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Zn(e,t){var n=t.deletions;if(n!==null)for(var r=0;rs&&(s=i),r&=~o}if(r=s,r=Nt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*oR(r/1960))-r,10e?16:e,js===null)var r=!1;else{if(e=js,js=null,Ou=0,ze&6)throw Error($(331));var s=ze;for(ze|=4,ie=e.current;ie!==null;){var o=ie,i=o.child;if(ie.flags&16){var a=o.deletions;if(a!==null){for(var l=0;lNt()-jm?wo(e,0):Pm|=n),wn(e,t)}function c_(e,t){t===0&&(e.mode&1?(t=xc,xc<<=1,!(xc&130023424)&&(xc=4194304)):t=1);var n=ln();e=es(e,t),e!==null&&(Il(e,t,n),wn(e,n))}function dR(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),c_(e,n)}function fR(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error($(314))}r!==null&&r.delete(t),c_(e,n)}var u_;u_=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||yn.current)vn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return vn=!1,JN(e,t,n);vn=!!(e.flags&131072)}else vn=!1,mt&&t.flags&1048576&&p0(t,ku,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Xc(e,t),e=t.pendingProps;var s=Mi(t,Xt.current);Si(t,n),s=Cm(null,t,r,e,s,n);var o=km();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,xn(r)?(o=!0,bu(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,xm(t),s.updater=yd,t.stateNode=s,s._reactInternals=t,Hh(t,r,e,n),t=Zh(null,t,r,!0,o,n)):(t.tag=0,mt&&o&&fm(t),on(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Xc(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=pR(r),e=qn(r,e),s){case 0:t=Kh(null,t,r,e,n);break e;case 1:t=vy(null,t,r,e,n);break e;case 11:t=my(null,t,r,e,n);break e;case 14:t=gy(null,t,r,qn(r.type,e),n);break e}throw Error($(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:qn(r,s),Kh(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:qn(r,s),vy(e,t,r,s,n);case 3:e:{if(G0(t),e===null)throw Error($(387));r=t.pendingProps,o=t.memoizedState,s=o.element,w0(e,t),Nu(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=Li(Error($(423)),t),t=yy(e,t,r,n,s);break e}else if(r!==s){s=Li(Error($(424)),t),t=yy(e,t,r,n,s);break e}else for(Tn=Fs(t.stateNode.containerInfo.firstChild),Nn=t,mt=!0,Jn=null,n=y0(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Oi(),r===s){t=ts(e,t,n);break e}on(e,t,r,n)}t=t.child}return t;case 5:return _0(t),e===null&&Wh(t),r=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,Fh(r,s)?i=null:o!==null&&Fh(r,o)&&(t.flags|=32),H0(e,t),on(e,t,i,n),t.child;case 6:return e===null&&Wh(t),null;case 13:return K0(e,t,n);case 4:return wm(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ai(t,null,r,n):on(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:qn(r,s),my(e,t,r,s,n);case 7:return on(e,t,t.pendingProps,n),t.child;case 8:return on(e,t,t.pendingProps.children,n),t.child;case 12:return on(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,o=t.memoizedProps,i=s.value,it(Eu,r._currentValue),r._currentValue=i,o!==null)if(ir(o.value,i)){if(o.children===s.children&&!yn.current){t=ts(e,t,n);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===r){if(o.tag===1){l=Kr(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Yh(o.return,n,t),a.lanes|=n;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($(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Yh(i,n,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}on(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Si(t,n),s=Wn(s),r=r(s),t.flags|=1,on(e,t,r,n),t.child;case 14:return r=t.type,s=qn(r,t.pendingProps),s=qn(r.type,s),gy(e,t,r,s,n);case 15:return Y0(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:qn(r,s),Xc(e,t),t.tag=1,xn(r)?(e=!0,bu(t)):e=!1,Si(t,n),V0(t,r,s),Hh(t,r,s,n),Zh(null,t,r,!0,e,n);case 19:return Z0(e,t,n);case 22:return B0(e,t,n)}throw Error($(156,t.tag))};function d_(e,t){return Fw(e,t)}function hR(e,t,n,r){this.tag=e,this.key=n,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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $n(e,t,n,r){return new hR(e,t,n,r)}function Am(e){return e=e.prototype,!(!e||!e.isReactComponent)}function pR(e){if(typeof e=="function")return Am(e)?1:0;if(e!=null){if(e=e.$$typeof,e===em)return 11;if(e===tm)return 14}return 2}function zs(e,t){var n=e.alternate;return n===null?(n=$n(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function tu(e,t,n,r,s,o){var i=2;if(r=e,typeof e=="function")Am(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case ri:return _o(n.children,s,o,t);case Jp:i=8,s|=8;break;case gh:return e=$n(12,n,t,s|2),e.elementType=gh,e.lanes=o,e;case vh:return e=$n(13,n,t,s),e.elementType=vh,e.lanes=o,e;case yh:return e=$n(19,n,t,s),e.elementType=yh,e.lanes=o,e;case _w:return _d(n,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case xw:i=10;break e;case ww:i=9;break e;case em:i=11;break e;case tm:i=14;break e;case ks:i=16,r=null;break e}throw Error($(130,e==null?e:typeof e,""))}return t=$n(i,n,t,s),t.elementType=e,t.type=r,t.lanes=o,t}function _o(e,t,n,r){return e=$n(7,e,r,t),e.lanes=n,e}function _d(e,t,n,r){return e=$n(22,e,r,t),e.elementType=_w,e.lanes=n,e.stateNode={isHidden:!1},e}function zf(e,t,n){return e=$n(6,e,null,t),e.lanes=n,e}function Wf(e,t,n){return t=$n(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function mR(e,t,n,r,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=bf(0),this.expirationTimes=bf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bf(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Im(e,t,n,r,s,o,i,a,l){return e=new mR(e,t,n,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=$n(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},xm(o),e}function gR(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(m_)}catch(e){console.error(e)}}m_(),mw.exports=Mn;var cs=mw.exports;const g_=nw(cs),_R=tw({__proto__:null,default:g_},[cs]);var Py=cs;ph.createRoot=Py.createRoot,ph.hydrateRoot=Py.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 wt(){return wt=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Po(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function bR(){return Math.random().toString(36).substr(2,8)}function Dy(e,t){return{usr:e.state,key:e.key,idx:t}}function ll(e,t,n,r){return n===void 0&&(n=null),wt({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?us(t):t,{state:n,key:t&&t.key||r||bR()})}function jo(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function us(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function CR(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:o=!1}=r,i=s.history,a=Pt.Pop,l=null,u=d();u==null&&(u=0,i.replaceState(wt({},i.state,{idx:u}),""));function d(){return(i.state||{idx:null}).idx}function f(){a=Pt.Pop;let _=d(),y=_==null?null:_-u;u=_,l&&l({action:a,location:v.location,delta:y})}function p(_,y){a=Pt.Push;let m=ll(v.location,_,y);n&&n(m,_),u=d()+1;let w=Dy(m,u),b=v.createHref(m);try{i.pushState(w,"",b)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;s.location.assign(b)}o&&l&&l({action:a,location:v.location,delta:1})}function x(_,y){a=Pt.Replace;let m=ll(v.location,_,y);n&&n(m,_),u=d();let w=Dy(m,u),b=v.createHref(m);i.replaceState(w,"",b),o&&l&&l({action:a,location:v.location,delta:0})}function g(_){let y=s.location.origin!=="null"?s.location.origin:s.location.href,m=typeof _=="string"?_:jo(_);return m=m.replace(/ $/,"%20"),Ne(y,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,y)}let v={get action(){return a},get location(){return e(s,i)},listen(_){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(jy,f),l=_,()=>{s.removeEventListener(jy,f),l=null}},createHref(_){return t(s,_)},createURL:g,encodeLocation(_){let y=g(_);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:p,replace:x,go(_){return i.go(_)}};return v}var ot;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(ot||(ot={}));const kR=new Set(["lazy","caseSensitive","path","id","index","children"]);function ER(e){return e.index===!0}function cl(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((s,o)=>{let i=[...n,String(o)],a=typeof s.id=="string"?s.id:i.join("-");if(Ne(s.index!==!0||!s.children,"Cannot specify children on an index route"),Ne(!r[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),ER(s)){let l=wt({},s,t(s),{id:a});return r[a]=l,l}else{let l=wt({},s,t(s),{id:a,children:void 0});return r[a]=l,s.children&&(l.children=cl(s.children,t,i,r)),l}})}function uo(e,t,n){return n===void 0&&(n="/"),nu(e,t,n,!1)}function nu(e,t,n,r){let s=typeof t=="string"?us(t):t,o=Gi(s.pathname||"/",n);if(o==null)return null;let i=v_(e);NR(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("/")&&(Ne(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=Zr([r,l.relativePath]),d=n.concat(l);o.children&&o.children.length>0&&(Ne(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),v_(o.children,t,d,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:AR(u,o.index),routesMeta:d})};return e.forEach((o,i)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))s(o,i);else for(let l of y_(o.path))s(o,i,l)}),t}function y_(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return s?[o,""]:[o];let i=y_(r.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 NR(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:IR(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const RR=/^:[\w-]+$/,PR=3,jR=2,DR=1,MR=10,OR=-2,My=e=>e==="*";function AR(e,t){let n=e.split("/"),r=n.length;return n.some(My)&&(r+=OR),t&&(r+=jR),n.filter(s=>!My(s)).reduce((s,o)=>s+(RR.test(o)?PR:o===""?DR:MR),r)}function IR(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function LR(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,s={},o="/",i=[];for(let a=0;a{let{paramName:p,isOptional:x}=d;if(p==="*"){let v=a[f]||"";i=o.slice(0,o.length-v.length).replace(/(.)\/+$/,"$1")}const g=a[f];return x&&!g?u[p]=void 0:u[p]=(g||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function FR(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Po(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 r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function UR(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Po(!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 Gi(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function $R(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?us(e):e;return{pathname:n?n.startsWith("/")?n:VR(n,t):t,search:WR(r),hash:YR(s)}}function VR(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function Yf(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function x_(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Ed(e,t){let n=x_(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Td(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=us(e):(s=wt({},e),Ne(!s.pathname||!s.pathname.includes("?"),Yf("?","pathname","search",s)),Ne(!s.pathname||!s.pathname.includes("#"),Yf("#","pathname","hash",s)),Ne(!s.search||!s.search.includes("#"),Yf("#","search","hash",s)));let o=e===""||s.pathname==="",i=o?"/":s.pathname,a;if(i==null)a=n;else{let f=t.length-1;if(!r&&i.startsWith("..")){let p=i.split("/");for(;p[0]==="..";)p.shift(),f-=1;s.pathname=p.join("/")}a=f>=0?t[f]:"/"}let l=$R(s,a),u=i&&i!=="/"&&i.endsWith("/"),d=(o||i===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}const Zr=e=>e.join("/").replace(/\/\/+/g,"/"),zR=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),WR=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,YR=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class $m{constructor(t,n,r,s){s===void 0&&(s=!1),this.status=t,this.statusText=n||"",this.internal=s,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Nd(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const w_=["post","put","patch","delete"],BR=new Set(w_),HR=["get",...w_],GR=new Set(HR),KR=new Set([301,302,303,307,308]),ZR=new Set([307,308]),Bf={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},qR={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},pa={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Vm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,QR=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),__="remix-router-transitions";function XR(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;Ne(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 E=e.detectErrorBoundary;s=T=>({hasErrorBoundary:E(T)})}else s=QR;let o={},i=cl(e.routes,s,void 0,o),a,l=e.basename||"/",u=e.unstable_dataStrategy||rP,d=e.unstable_patchRoutesOnMiss,f=wt({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),p=null,x=new Set,g=null,v=null,_=null,y=e.hydrationData!=null,m=uo(i,e.history.location,l),w=null;if(m==null&&!d){let E=sn(404,{pathname:e.history.location.pathname}),{matches:T,route:j}=Yy(i);m=T,w={[j.id]:E}}m&&d&&!e.hydrationData&&vf(m,i,e.history.location.pathname).active&&(m=null);let b;if(!m)b=!1,m=[];else if(m.some(E=>E.route.lazy))b=!1;else if(!m.some(E=>E.route.loader))b=!0;else if(f.v7_partialHydration){let E=e.hydrationData?e.hydrationData.loaderData:null,T=e.hydrationData?e.hydrationData.errors:null,j=U=>U.route.loader?typeof U.route.loader=="function"&&U.route.loader.hydrate===!0?!1:E&&E[U.route.id]!==void 0||T&&T[U.route.id]!==void 0:!0;if(T){let U=m.findIndex(re=>T[re.route.id]!==void 0);b=m.slice(0,U+1).every(j)}else b=m.every(j)}else b=e.hydrationData!=null;let C,S={historyAction:e.history.action,location:e.history.location,matches:m,initialized:b,navigation:Bf,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||w,fetchers:new Map,blockers:new Map},N=Pt.Pop,R=!1,F,L=!1,Z=new Map,M=null,B=!1,A=!1,H=[],ne=[],W=new Map,I=0,D=-1,q=new Map,le=new Set,me=new Map,rt=new Map,Pe=new Set,gt=new Map,Ue=new Map,ce=new Map,je=!1;function Be(){if(p=e.history.listen(E=>{let{action:T,location:j,delta:U}=E;if(je){je=!1;return}Po(Ue.size===0||U!=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 re=yv({currentLocation:S.location,nextLocation:j,historyAction:T});if(re&&U!=null){je=!0,e.history.go(U*-1),lc(re,{state:"blocked",location:j,proceed(){lc(re,{state:"proceeding",proceed:void 0,reset:void 0,location:j}),e.history.go(U)},reset(){let de=new Map(S.blockers);de.set(re,pa),_e({blockers:de})}});return}return hn(T,j)}),n){gP(t,Z);let E=()=>vP(t,Z);t.addEventListener("pagehide",E),M=()=>t.removeEventListener("pagehide",E)}return S.initialized||hn(Pt.Pop,S.location,{initialHydration:!0}),C}function $e(){p&&p(),M&&M(),x.clear(),F&&F.abort(),S.fetchers.forEach((E,T)=>ys(T)),S.blockers.forEach((E,T)=>vv(T))}function Ve(E){return x.add(E),()=>x.delete(E)}function _e(E,T){T===void 0&&(T={}),S=wt({},S,E);let j=[],U=[];f.v7_fetcherPersist&&S.fetchers.forEach((re,de)=>{re.state==="idle"&&(Pe.has(de)?U.push(de):j.push(de))}),[...x].forEach(re=>re(S,{deletedFetchers:U,unstable_viewTransitionOpts:T.viewTransitionOpts,unstable_flushSync:T.flushSync===!0})),f.v7_fetcherPersist&&(j.forEach(re=>S.fetchers.delete(re)),U.forEach(re=>ys(re)))}function vt(E,T,j){var U,re;let{flushSync:de}=j===void 0?{}:j,ye=S.actionData!=null&&S.navigation.formMethod!=null&&Xn(S.navigation.formMethod)&&S.navigation.state==="loading"&&((U=E.state)==null?void 0:U._isRedirect)!==!0,K;T.actionData?Object.keys(T.actionData).length>0?K=T.actionData:K=null:ye?K=S.actionData:K=null;let be=T.loaderData?zy(S.loaderData,T.loaderData,T.matches||[],T.errors):S.loaderData,pe=S.blockers;pe.size>0&&(pe=new Map(pe),pe.forEach((Ze,st)=>pe.set(st,pa)));let ge=R===!0||S.navigation.formMethod!=null&&Xn(S.navigation.formMethod)&&((re=E.state)==null?void 0:re._isRedirect)!==!0;a&&(i=a,a=void 0),B||N===Pt.Pop||(N===Pt.Push?e.history.push(E,E.state):N===Pt.Replace&&e.history.replace(E,E.state));let et;if(N===Pt.Pop){let Ze=Z.get(S.location.pathname);Ze&&Ze.has(E.pathname)?et={currentLocation:S.location,nextLocation:E}:Z.has(E.pathname)&&(et={currentLocation:E,nextLocation:S.location})}else if(L){let Ze=Z.get(S.location.pathname);Ze?Ze.add(E.pathname):(Ze=new Set([E.pathname]),Z.set(S.location.pathname,Ze)),et={currentLocation:S.location,nextLocation:E}}_e(wt({},T,{actionData:K,loaderData:be,historyAction:N,location:E,initialized:!0,navigation:Bf,revalidation:"idle",restoreScrollPosition:wv(E,T.matches||S.matches),preventScrollReset:ge,blockers:pe}),{viewTransitionOpts:et,flushSync:de===!0}),N=Pt.Pop,R=!1,L=!1,B=!1,A=!1,H=[],ne=[]}async function Ht(E,T){if(typeof E=="number"){e.history.go(E);return}let j=ap(S.location,S.matches,l,f.v7_prependBasename,E,f.v7_relativeSplatPath,T==null?void 0:T.fromRouteId,T==null?void 0:T.relative),{path:U,submission:re,error:de}=Ay(f.v7_normalizeFormMethod,!1,j,T),ye=S.location,K=ll(S.location,U,T&&T.state);K=wt({},K,e.history.encodeLocation(K));let be=T&&T.replace!=null?T.replace:void 0,pe=Pt.Push;be===!0?pe=Pt.Replace:be===!1||re!=null&&Xn(re.formMethod)&&re.formAction===S.location.pathname+S.location.search&&(pe=Pt.Replace);let ge=T&&"preventScrollReset"in T?T.preventScrollReset===!0:void 0,et=(T&&T.unstable_flushSync)===!0,Ze=yv({currentLocation:ye,nextLocation:K,historyAction:pe});if(Ze){lc(Ze,{state:"blocked",location:K,proceed(){lc(Ze,{state:"proceeding",proceed:void 0,reset:void 0,location:K}),Ht(E,T)},reset(){let st=new Map(S.blockers);st.set(Ze,pa),_e({blockers:st})}});return}return await hn(pe,K,{submission:re,pendingError:de,preventScrollReset:ge,replace:T&&T.replace,enableViewTransition:T&&T.unstable_viewTransition,flushSync:et})}function gs(){if($t(),_e({revalidation:"loading"}),S.navigation.state!=="submitting"){if(S.navigation.state==="idle"){hn(S.historyAction,S.location,{startUninterruptedRevalidation:!0});return}hn(N||S.historyAction,S.navigation.location,{overrideNavigation:S.navigation})}}async function hn(E,T,j){F&&F.abort(),F=null,N=E,B=(j&&j.startUninterruptedRevalidation)===!0,BE(S.location,S.matches),R=(j&&j.preventScrollReset)===!0,L=(j&&j.enableViewTransition)===!0;let U=a||i,re=j&&j.overrideNavigation,de=uo(U,T,l),ye=(j&&j.flushSync)===!0,K=vf(de,U,T.pathname);if(K.active&&K.matches&&(de=K.matches),!de){let{error:Ge,notFoundMatches:Vt,route:Rt}=mf(T.pathname);vt(T,{matches:Vt,loaderData:{},errors:{[Rt.id]:Ge}},{flushSync:ye});return}if(S.initialized&&!A&&cP(S.location,T)&&!(j&&j.submission&&Xn(j.submission.formMethod))){vt(T,{matches:de},{flushSync:ye});return}F=new AbortController;let be=Ko(e.history,T,F.signal,j&&j.submission),pe;if(j&&j.pendingError)pe=[pi(de).route.id,{type:ot.error,error:j.pendingError}];else if(j&&j.submission&&Xn(j.submission.formMethod)){let Ge=await vs(be,T,j.submission,de,K.active,{replace:j.replace,flushSync:ye});if(Ge.shortCircuited)return;if(Ge.pendingActionResult){let[Vt,Rt]=Ge.pendingActionResult;if(kn(Rt)&&Nd(Rt.error)&&Rt.error.status===404){F=null,vt(T,{matches:Ge.matches,loaderData:{},errors:{[Vt]:Rt.error}});return}}de=Ge.matches||de,pe=Ge.pendingActionResult,re=Hf(T,j.submission),ye=!1,K.active=!1,be=Ko(e.history,be.url,be.signal)}let{shortCircuited:ge,matches:et,loaderData:Ze,errors:st}=await k(be,T,de,K.active,re,j&&j.submission,j&&j.fetcherSubmission,j&&j.replace,j&&j.initialHydration===!0,ye,pe);ge||(F=null,vt(T,wt({matches:et||de},Wy(pe),{loaderData:Ze,errors:st})))}async function vs(E,T,j,U,re,de){de===void 0&&(de={}),$t();let ye=pP(T,j);if(_e({navigation:ye},{flushSync:de.flushSync===!0}),re){let pe=await uc(U,T.pathname,E.signal);if(pe.type==="aborted")return{shortCircuited:!0};if(pe.type==="error"){let{boundaryId:ge,error:et}=cc(T.pathname,pe);return{matches:pe.partialMatches,pendingActionResult:[ge,{type:ot.error,error:et}]}}else if(pe.matches)U=pe.matches;else{let{notFoundMatches:ge,error:et,route:Ze}=mf(T.pathname);return{matches:ge,pendingActionResult:[Ze.id,{type:ot.error,error:et}]}}}let K,be=Ea(U,T);if(!be.route.action&&!be.route.lazy)K={type:ot.error,error:sn(405,{method:E.method,pathname:T.pathname,routeId:be.route.id})};else if(K=(await De("action",E,[be],U))[0],E.signal.aborted)return{shortCircuited:!0};if(go(K)){let pe;return de&&de.replace!=null?pe=de.replace:pe=Uy(K.response.headers.get("Location"),new URL(E.url),l)===S.location.pathname+S.location.search,await ue(E,K,{submission:j,replace:pe}),{shortCircuited:!0}}if(mo(K))throw sn(400,{type:"defer-action"});if(kn(K)){let pe=pi(U,be.route.id);return(de&&de.replace)!==!0&&(N=Pt.Push),{matches:U,pendingActionResult:[pe.route.id,K]}}return{matches:U,pendingActionResult:[be.route.id,K]}}async function k(E,T,j,U,re,de,ye,K,be,pe,ge){let et=re||Hf(T,de),Ze=de||ye||Gy(et),st=!B&&(!f.v7_partialHydration||!be);if(U){if(st){let Ct=P(ge);_e(wt({navigation:et},Ct!==void 0?{actionData:Ct}:{}),{flushSync:pe})}let Ee=await uc(j,T.pathname,E.signal);if(Ee.type==="aborted")return{shortCircuited:!0};if(Ee.type==="error"){let{boundaryId:Ct,error:_n}=cc(T.pathname,Ee);return{matches:Ee.partialMatches,loaderData:{},errors:{[Ct]:_n}}}else if(Ee.matches)j=Ee.matches;else{let{error:Ct,notFoundMatches:_n,route:ht}=mf(T.pathname);return{matches:_n,loaderData:{},errors:{[ht.id]:Ct}}}}let Ge=a||i,[Vt,Rt]=Iy(e.history,S,j,Ze,T,f.v7_partialHydration&&be===!0,f.v7_skipActionErrorRevalidation,A,H,ne,Pe,me,le,Ge,l,ge);if(gf(Ee=>!(j&&j.some(Ct=>Ct.route.id===Ee))||Vt&&Vt.some(Ct=>Ct.route.id===Ee)),D=++I,Vt.length===0&&Rt.length===0){let Ee=sa();return vt(T,wt({matches:j,loaderData:{},errors:ge&&kn(ge[1])?{[ge[0]]:ge[1].error}:null},Wy(ge),Ee?{fetchers:new Map(S.fetchers)}:{}),{flushSync:pe}),{shortCircuited:!0}}if(st){let Ee={};if(!U){Ee.navigation=et;let Ct=P(ge);Ct!==void 0&&(Ee.actionData=Ct)}Rt.length>0&&(Ee.fetchers=O(Rt)),_e(Ee,{flushSync:pe})}Rt.forEach(Ee=>{W.has(Ee.key)&&Kn(Ee.key),Ee.controller&&W.set(Ee.key,Ee.controller)});let oa=()=>Rt.forEach(Ee=>Kn(Ee.key));F&&F.signal.addEventListener("abort",oa);let{loaderResults:xs,fetcherResults:Yo}=await yt(S.matches,j,Vt,Rt,E);if(E.signal.aborted)return{shortCircuited:!0};F&&F.signal.removeEventListener("abort",oa),Rt.forEach(Ee=>W.delete(Ee.key));let Bo=By([...xs,...Yo]);if(Bo){if(Bo.idx>=Vt.length){let Ee=Rt[Bo.idx-Vt.length].key;le.add(Ee)}return await ue(E,Bo.result,{replace:K}),{shortCircuited:!0}}let{loaderData:Ho,errors:mr}=Vy(S,j,Vt,xs,ge,Rt,Yo,gt);gt.forEach((Ee,Ct)=>{Ee.subscribe(_n=>{(_n||Ee.done)&>.delete(Ct)})}),f.v7_partialHydration&&be&&S.errors&&Object.entries(S.errors).filter(Ee=>{let[Ct]=Ee;return!Vt.some(_n=>_n.route.id===Ct)}).forEach(Ee=>{let[Ct,_n]=Ee;mr=Object.assign(mr||{},{[Ct]:_n})});let dc=sa(),fc=gv(D),hc=dc||fc||Rt.length>0;return wt({matches:j,loaderData:Ho,errors:mr},hc?{fetchers:new Map(S.fetchers)}:{})}function P(E){if(E&&!kn(E[1]))return{[E[0]]:E[1].data};if(S.actionData)return Object.keys(S.actionData).length===0?null:S.actionData}function O(E){return E.forEach(T=>{let j=S.fetchers.get(T.key),U=ma(void 0,j?j.data:void 0);S.fetchers.set(T.key,U)}),new Map(S.fetchers)}function J(E,T,j,U){if(r)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(E)&&Kn(E);let re=(U&&U.unstable_flushSync)===!0,de=a||i,ye=ap(S.location,S.matches,l,f.v7_prependBasename,j,f.v7_relativeSplatPath,T,U==null?void 0:U.relative),K=uo(de,ye,l),be=vf(K,de,ye);if(be.active&&be.matches&&(K=be.matches),!K){Gn(E,T,sn(404,{pathname:ye}),{flushSync:re});return}let{path:pe,submission:ge,error:et}=Ay(f.v7_normalizeFormMethod,!0,ye,U);if(et){Gn(E,T,et,{flushSync:re});return}let Ze=Ea(K,pe);if(R=(U&&U.preventScrollReset)===!0,ge&&Xn(ge.formMethod)){Q(E,T,pe,Ze,K,be.active,re,ge);return}me.set(E,{routeId:T,path:pe}),Y(E,T,pe,Ze,K,be.active,re,ge)}async function Q(E,T,j,U,re,de,ye,K){$t(),me.delete(E);function be(ht){if(!ht.route.action&&!ht.route.lazy){let Or=sn(405,{method:K.formMethod,pathname:j,routeId:T});return Gn(E,T,Or,{flushSync:ye}),!0}return!1}if(!de&&be(U))return;let pe=S.fetchers.get(E);rn(E,mP(K,pe),{flushSync:ye});let ge=new AbortController,et=Ko(e.history,j,ge.signal,K);if(de){let ht=await uc(re,j,et.signal);if(ht.type==="aborted")return;if(ht.type==="error"){let{error:Or}=cc(j,ht);Gn(E,T,Or,{flushSync:ye});return}else if(ht.matches){if(re=ht.matches,U=Ea(re,j),be(U))return}else{Gn(E,T,sn(404,{pathname:j}),{flushSync:ye});return}}W.set(E,ge);let Ze=I,Ge=(await De("action",et,[U],re))[0];if(et.signal.aborted){W.get(E)===ge&&W.delete(E);return}if(f.v7_fetcherPersist&&Pe.has(E)){if(go(Ge)||kn(Ge)){rn(E,bs(void 0));return}}else{if(go(Ge))if(W.delete(E),D>Ze){rn(E,bs(void 0));return}else return le.add(E),rn(E,ma(K)),ue(et,Ge,{fetcherSubmission:K});if(kn(Ge)){Gn(E,T,Ge.error);return}}if(mo(Ge))throw sn(400,{type:"defer-action"});let Vt=S.navigation.location||S.location,Rt=Ko(e.history,Vt,ge.signal),oa=a||i,xs=S.navigation.state!=="idle"?uo(oa,S.navigation.location,l):S.matches;Ne(xs,"Didn't find any matches after fetcher action");let Yo=++I;q.set(E,Yo);let Bo=ma(K,Ge.data);S.fetchers.set(E,Bo);let[Ho,mr]=Iy(e.history,S,xs,K,Vt,!1,f.v7_skipActionErrorRevalidation,A,H,ne,Pe,me,le,oa,l,[U.route.id,Ge]);mr.filter(ht=>ht.key!==E).forEach(ht=>{let Or=ht.key,_v=S.fetchers.get(Or),KE=ma(void 0,_v?_v.data:void 0);S.fetchers.set(Or,KE),W.has(Or)&&Kn(Or),ht.controller&&W.set(Or,ht.controller)}),_e({fetchers:new Map(S.fetchers)});let dc=()=>mr.forEach(ht=>Kn(ht.key));ge.signal.addEventListener("abort",dc);let{loaderResults:fc,fetcherResults:hc}=await yt(S.matches,xs,Ho,mr,Rt);if(ge.signal.aborted)return;ge.signal.removeEventListener("abort",dc),q.delete(E),W.delete(E),mr.forEach(ht=>W.delete(ht.key));let Ee=By([...fc,...hc]);if(Ee){if(Ee.idx>=Ho.length){let ht=mr[Ee.idx-Ho.length].key;le.add(ht)}return ue(Rt,Ee.result)}let{loaderData:Ct,errors:_n}=Vy(S,S.matches,Ho,fc,void 0,mr,hc,gt);if(S.fetchers.has(E)){let ht=bs(Ge.data);S.fetchers.set(E,ht)}gv(Yo),S.navigation.state==="loading"&&Yo>D?(Ne(N,"Expected pending action"),F&&F.abort(),vt(S.navigation.location,{matches:xs,loaderData:Ct,errors:_n,fetchers:new Map(S.fetchers)})):(_e({errors:_n,loaderData:zy(S.loaderData,Ct,xs,_n),fetchers:new Map(S.fetchers)}),A=!1)}async function Y(E,T,j,U,re,de,ye,K){let be=S.fetchers.get(E);rn(E,ma(K,be?be.data:void 0),{flushSync:ye});let pe=new AbortController,ge=Ko(e.history,j,pe.signal);if(de){let Ge=await uc(re,j,ge.signal);if(Ge.type==="aborted")return;if(Ge.type==="error"){let{error:Vt}=cc(j,Ge);Gn(E,T,Vt,{flushSync:ye});return}else if(Ge.matches)re=Ge.matches,U=Ea(re,j);else{Gn(E,T,sn(404,{pathname:j}),{flushSync:ye});return}}W.set(E,pe);let et=I,st=(await De("loader",ge,[U],re))[0];if(mo(st)&&(st=await E_(st,ge.signal,!0)||st),W.get(E)===pe&&W.delete(E),!ge.signal.aborted){if(Pe.has(E)){rn(E,bs(void 0));return}if(go(st))if(D>et){rn(E,bs(void 0));return}else{le.add(E),await ue(ge,st);return}if(kn(st)){Gn(E,T,st.error);return}Ne(!mo(st),"Unhandled fetcher deferred data"),rn(E,bs(st.data))}}async function ue(E,T,j){let{submission:U,fetcherSubmission:re,replace:de}=j===void 0?{}:j;T.response.headers.has("X-Remix-Revalidate")&&(A=!0);let ye=T.response.headers.get("Location");Ne(ye,"Expected a Location header on the redirect Response"),ye=Uy(ye,new URL(E.url),l);let K=ll(S.location,ye,{_isRedirect:!0});if(n){let st=!1;if(T.response.headers.has("X-Remix-Reload-Document"))st=!0;else if(Vm.test(ye)){const Ge=e.history.createURL(ye);st=Ge.origin!==t.location.origin||Gi(Ge.pathname,l)==null}if(st){de?t.location.replace(ye):t.location.assign(ye);return}}F=null;let be=de===!0?Pt.Replace:Pt.Push,{formMethod:pe,formAction:ge,formEncType:et}=S.navigation;!U&&!re&&pe&&ge&&et&&(U=Gy(S.navigation));let Ze=U||re;if(ZR.has(T.response.status)&&Ze&&Xn(Ze.formMethod))await hn(be,K,{submission:wt({},Ze,{formAction:ye}),preventScrollReset:R});else{let st=Hf(K,U);await hn(be,K,{overrideNavigation:st,fetcherSubmission:re,preventScrollReset:R})}}async function De(E,T,j,U){try{let re=await sP(u,E,T,j,U,o,s);return await Promise.all(re.map((de,ye)=>{if(dP(de)){let K=de.result;return{type:ot.redirect,response:aP(K,T,j[ye].route.id,U,l,f.v7_relativeSplatPath)}}return iP(de)}))}catch(re){return j.map(()=>({type:ot.error,error:re}))}}async function yt(E,T,j,U,re){let[de,...ye]=await Promise.all([j.length?De("loader",re,j,T):[],...U.map(K=>{if(K.matches&&K.match&&K.controller){let be=Ko(e.history,K.path,K.controller.signal);return De("loader",be,[K.match],K.matches).then(pe=>pe[0])}else return Promise.resolve({type:ot.error,error:sn(404,{pathname:K.path})})})]);return await Promise.all([Hy(E,j,de,de.map(()=>re.signal),!1,S.loaderData),Hy(E,U.map(K=>K.match),ye,U.map(K=>K.controller?K.controller.signal:null),!0)]),{loaderResults:de,fetcherResults:ye}}function $t(){A=!0,H.push(...gf()),me.forEach((E,T)=>{W.has(T)&&(ne.push(T),Kn(T))})}function rn(E,T,j){j===void 0&&(j={}),S.fetchers.set(E,T),_e({fetchers:new Map(S.fetchers)},{flushSync:(j&&j.flushSync)===!0})}function Gn(E,T,j,U){U===void 0&&(U={});let re=pi(S.matches,T);ys(E),_e({errors:{[re.route.id]:j},fetchers:new Map(S.fetchers)},{flushSync:(U&&U.flushSync)===!0})}function Wo(E){return f.v7_fetcherPersist&&(rt.set(E,(rt.get(E)||0)+1),Pe.has(E)&&Pe.delete(E)),S.fetchers.get(E)||qR}function ys(E){let T=S.fetchers.get(E);W.has(E)&&!(T&&T.state==="loading"&&q.has(E))&&Kn(E),me.delete(E),q.delete(E),le.delete(E),Pe.delete(E),S.fetchers.delete(E)}function pf(E){if(f.v7_fetcherPersist){let T=(rt.get(E)||0)-1;T<=0?(rt.delete(E),Pe.add(E)):rt.set(E,T)}else ys(E);_e({fetchers:new Map(S.fetchers)})}function Kn(E){let T=W.get(E);Ne(T,"Expected fetch controller: "+E),T.abort(),W.delete(E)}function ac(E){for(let T of E){let j=Wo(T),U=bs(j.data);S.fetchers.set(T,U)}}function sa(){let E=[],T=!1;for(let j of le){let U=S.fetchers.get(j);Ne(U,"Expected fetcher: "+j),U.state==="loading"&&(le.delete(j),E.push(j),T=!0)}return ac(E),T}function gv(E){let T=[];for(let[j,U]of q)if(U0}function WE(E,T){let j=S.blockers.get(E)||pa;return Ue.get(E)!==T&&Ue.set(E,T),j}function vv(E){S.blockers.delete(E),Ue.delete(E)}function lc(E,T){let j=S.blockers.get(E)||pa;Ne(j.state==="unblocked"&&T.state==="blocked"||j.state==="blocked"&&T.state==="blocked"||j.state==="blocked"&&T.state==="proceeding"||j.state==="blocked"&&T.state==="unblocked"||j.state==="proceeding"&&T.state==="unblocked","Invalid blocker state transition: "+j.state+" -> "+T.state);let U=new Map(S.blockers);U.set(E,T),_e({blockers:U})}function yv(E){let{currentLocation:T,nextLocation:j,historyAction:U}=E;if(Ue.size===0)return;Ue.size>1&&Po(!1,"A router only supports one blocker at a time");let re=Array.from(Ue.entries()),[de,ye]=re[re.length-1],K=S.blockers.get(de);if(!(K&&K.state==="proceeding")&&ye({currentLocation:T,nextLocation:j,historyAction:U}))return de}function mf(E){let T=sn(404,{pathname:E}),j=a||i,{matches:U,route:re}=Yy(j);return gf(),{notFoundMatches:U,route:re,error:T}}function cc(E,T){return{boundaryId:pi(T.partialMatches).route.id,error:sn(400,{type:"route-discovery",pathname:E,message:T.error!=null&&"message"in T.error?T.error:String(T.error)})}}function gf(E){let T=[];return gt.forEach((j,U)=>{(!E||E(U))&&(j.cancel(),T.push(U),gt.delete(U))}),T}function YE(E,T,j){if(g=E,_=T,v=j||null,!y&&S.navigation===Bf){y=!0;let U=wv(S.location,S.matches);U!=null&&_e({restoreScrollPosition:U})}return()=>{g=null,_=null,v=null}}function xv(E,T){return v&&v(E,T.map(U=>TR(U,S.loaderData)))||E.key}function BE(E,T){if(g&&_){let j=xv(E,T);g[j]=_()}}function wv(E,T){if(g){let j=xv(E,T),U=g[j];if(typeof U=="number")return U}return null}function vf(E,T,j){if(d)if(E){let U=E[E.length-1].route;if(U.path&&(U.path==="*"||U.path.endsWith("/*")))return{active:!0,matches:nu(T,j,l,!0)}}else return{active:!0,matches:nu(T,j,l,!0)||[]};return{active:!1,matches:null}}async function uc(E,T,j){let U=E,re=U.length>0?U[U.length-1].route:null;for(;;){let de=a==null,ye=a||i;try{await nP(d,T,U,ye,o,s,ce,j)}catch(ge){return{type:"error",error:ge,partialMatches:U}}finally{de&&(i=[...i])}if(j.aborted)return{type:"aborted"};let K=uo(ye,T,l),be=!1;if(K){let ge=K[K.length-1].route;if(ge.index)return{type:"success",matches:K};if(ge.path&&ge.path.length>0)if(ge.path==="*")be=!0;else return{type:"success",matches:K}}let pe=nu(ye,T,l,!0);if(!pe||U.map(ge=>ge.route.id).join("-")===pe.map(ge=>ge.route.id).join("-"))return{type:"success",matches:be?K:null};if(U=pe,re=U[U.length-1].route,re.path==="*")return{type:"success",matches:U}}}function HE(E){o={},a=cl(E,s,void 0,o)}function GE(E,T){let j=a==null;b_(E,T,a||i,o,s),j&&(i=[...i],_e({}))}return C={get basename(){return l},get future(){return f},get state(){return S},get routes(){return i},get window(){return t},initialize:Be,subscribe:Ve,enableScrollRestoration:YE,navigate:Ht,fetch:J,revalidate:gs,createHref:E=>e.history.createHref(E),encodeLocation:E=>e.history.encodeLocation(E),getFetcher:Wo,deleteFetcher:pf,dispose:$e,getBlocker:WE,deleteBlocker:vv,patchRoutes:GE,_internalFetchControllers:W,_internalActiveDeferreds:gt,_internalSetRoutes:HE},C}function JR(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function ap(e,t,n,r,s,o,i,a){let l,u;if(i){l=[];for(let f of t)if(l.push(f),f.route.id===i){u=f;break}}else l=t,u=t[t.length-1];let d=Td(s||".",Ed(l,o),Gi(e.pathname,n)||e.pathname,a==="path");return s==null&&(d.search=e.search,d.hash=e.hash),(s==null||s===""||s===".")&&u&&u.route.index&&!zm(d.search)&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(d.pathname=d.pathname==="/"?n:Zr([n,d.pathname])),jo(d)}function Ay(e,t,n,r){if(!r||!JR(r))return{path:n};if(r.formMethod&&!hP(r.formMethod))return{path:n,error:sn(405,{method:r.formMethod})};let s=()=>({path:n,error:sn(400,{type:"invalid-body"})}),o=r.formMethod||"get",i=e?o.toUpperCase():o.toLowerCase(),a=C_(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Xn(i))return s();let p=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((x,g)=>{let[v,_]=g;return""+x+v+"="+_+` +`},""):String(r.body);return{path:n,submission:{formMethod:i,formAction:a,formEncType:r.formEncType,formData:void 0,json:void 0,text:p}}}else if(r.formEncType==="application/json"){if(!Xn(i))return s();try{let p=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:i,formAction:a,formEncType:r.formEncType,formData:void 0,json:p,text:void 0}}}catch{return s()}}}Ne(typeof FormData=="function","FormData is not available in this environment");let l,u;if(r.formData)l=lp(r.formData),u=r.formData;else if(r.body instanceof FormData)l=lp(r.body),u=r.body;else if(r.body instanceof URLSearchParams)l=r.body,u=$y(l);else if(r.body==null)l=new URLSearchParams,u=new FormData;else try{l=new URLSearchParams(r.body),u=$y(l)}catch{return s()}let d={formMethod:i,formAction:a,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(Xn(d.formMethod))return{path:n,submission:d};let f=us(n);return t&&f.search&&zm(f.search)&&l.append("index",""),f.search="?"+l,{path:jo(f),submission:d}}function eP(e,t){let n=e;if(t){let r=e.findIndex(s=>s.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function Iy(e,t,n,r,s,o,i,a,l,u,d,f,p,x,g,v){let _=v?kn(v[1])?v[1].error:v[1].data:void 0,y=e.createURL(t.location),m=e.createURL(s),w=v&&kn(v[1])?v[0]:void 0,b=w?eP(n,w):n,C=v?v[1].statusCode:void 0,S=i&&C&&C>=400,N=b.filter((F,L)=>{let{route:Z}=F;if(Z.lazy)return!0;if(Z.loader==null)return!1;if(o)return typeof Z.loader!="function"||Z.loader.hydrate?!0:t.loaderData[Z.id]===void 0&&(!t.errors||t.errors[Z.id]===void 0);if(tP(t.loaderData,t.matches[L],F)||l.some(A=>A===F.route.id))return!0;let M=t.matches[L],B=F;return Ly(F,wt({currentUrl:y,currentParams:M.params,nextUrl:m,nextParams:B.params},r,{actionResult:_,actionStatus:C,defaultShouldRevalidate:S?!1:a||y.pathname+y.search===m.pathname+m.search||y.search!==m.search||S_(M,B)}))}),R=[];return f.forEach((F,L)=>{if(o||!n.some(H=>H.route.id===F.routeId)||d.has(L))return;let Z=uo(x,F.path,g);if(!Z){R.push({key:L,routeId:F.routeId,path:F.path,matches:null,match:null,controller:null});return}let M=t.fetchers.get(L),B=Ea(Z,F.path),A=!1;p.has(L)?A=!1:u.includes(L)?A=!0:M&&M.state!=="idle"&&M.data===void 0?A=a:A=Ly(B,wt({currentUrl:y,currentParams:t.matches[t.matches.length-1].params,nextUrl:m,nextParams:n[n.length-1].params},r,{actionResult:_,actionStatus:C,defaultShouldRevalidate:S?!1:a})),A&&R.push({key:L,routeId:F.routeId,path:F.path,matches:Z,match:B,controller:new AbortController})}),[N,R]}function tP(e,t,n){let r=!t||n.route.id!==t.route.id,s=e[n.route.id]===void 0;return r||s}function S_(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function Ly(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function nP(e,t,n,r,s,o,i,a){let l=[t,...n.map(u=>u.route.id)].join("-");try{let u=i.get(l);u||(u=e({path:t,matches:n,patch:(d,f)=>{a.aborted||b_(d,f,r,s,o)}}),i.set(l,u)),u&&uP(u)&&await u}finally{i.delete(l)}}function b_(e,t,n,r,s){if(e){var o;let i=r[e];Ne(i,"No route found to patch children into: routeId = "+e);let a=cl(t,s,[e,"patch",String(((o=i.children)==null?void 0:o.length)||"0")],r);i.children?i.children.push(...a):i.children=a}else{let i=cl(t,s,["patch",String(n.length||"0")],r);n.push(...i)}}async function Fy(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let s=n[e.id];Ne(s,"No route found in manifest");let o={};for(let i in r){let l=s[i]!==void 0&&i!=="hasErrorBoundary";Po(!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&&!kR.has(i)&&(o[i]=r[i])}Object.assign(s,o),Object.assign(s,wt({},t(s),{lazy:void 0}))}function rP(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function sP(e,t,n,r,s,o,i,a){let l=r.reduce((f,p)=>f.add(p.route.id),new Set),u=new Set,d=await e({matches:s.map(f=>{let p=l.has(f.route.id);return wt({},f,{shouldLoad:p,resolve:g=>(u.add(f.route.id),p?oP(t,n,f,o,i,g,a):Promise.resolve({type:ot.data,result:void 0}))})}),request:n,params:s[0].params,context:a});return s.forEach(f=>Ne(u.has(f.route.id),'`match.resolve()` was not called for route id "'+f.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),d.filter((f,p)=>l.has(s[p].route.id))}async function oP(e,t,n,r,s,o,i){let a,l,u=d=>{let f,p=new Promise((v,_)=>f=_);l=()=>f(),t.signal.addEventListener("abort",l);let x=v=>typeof d!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):d({request:t,params:n.params,context:i},...v!==void 0?[v]:[]),g;return o?g=o(v=>x(v)):g=(async()=>{try{return{type:"data",result:await x()}}catch(v){return{type:"error",result:v}}})(),Promise.race([g,p])};try{let d=n.route[e];if(n.route.lazy)if(d){let f,[p]=await Promise.all([u(d).catch(x=>{f=x}),Fy(n.route,s,r)]);if(f!==void 0)throw f;a=p}else if(await Fy(n.route,s,r),d=n.route[e],d)a=await u(d);else if(e==="action"){let f=new URL(t.url),p=f.pathname+f.search;throw sn(405,{method:t.method,pathname:p,routeId:n.route.id})}else return{type:ot.data,result:void 0};else if(d)a=await u(d);else{let f=new URL(t.url),p=f.pathname+f.search;throw sn(404,{pathname:p})}Ne(a.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(d){return{type:ot.error,result:d}}finally{l&&t.signal.removeEventListener("abort",l)}return a}async function iP(e){let{result:t,type:n,status:r}=e;if(k_(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:ot.error,error:a}}return n===ot.error?{type:ot.error,error:new $m(t.status,t.statusText,i),statusCode:t.status,headers:t.headers}:{type:ot.data,data:i,statusCode:t.status,headers:t.headers}}if(n===ot.error)return{type:ot.error,error:t,statusCode:Nd(t)?t.status:r};if(fP(t)){var s,o;return{type:ot.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:ot.data,data:t,statusCode:r}}function aP(e,t,n,r,s,o){let i=e.headers.get("Location");if(Ne(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!Vm.test(i)){let a=r.slice(0,r.findIndex(l=>l.route.id===n)+1);i=ap(new URL(t.url),a,s,!0,i,o),e.headers.set("Location",i)}return e}function Uy(e,t,n){if(Vm.test(e)){let r=e,s=r.startsWith("//")?new URL(t.protocol+r):new URL(r),o=Gi(s.pathname,n)!=null;if(s.origin===t.origin&&o)return s.pathname+s.search+s.hash}return e}function Ko(e,t,n,r){let s=e.createURL(C_(t)).toString(),o={signal:n};if(r&&Xn(r.formMethod)){let{formMethod:i,formEncType:a}=r;o.method=i.toUpperCase(),a==="application/json"?(o.headers=new Headers({"Content-Type":a}),o.body=JSON.stringify(r.json)):a==="text/plain"?o.body=r.text:a==="application/x-www-form-urlencoded"&&r.formData?o.body=lp(r.formData):o.body=r.formData}return new Request(s,o)}function lp(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function $y(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function lP(e,t,n,r,s,o){let i={},a=null,l,u=!1,d={},f=r&&kn(r[1])?r[1].error:void 0;return n.forEach((p,x)=>{let g=t[x].route.id;if(Ne(!go(p),"Cannot handle redirect results in processLoaderData"),kn(p)){let v=p.error;f!==void 0&&(v=f,f=void 0),a=a||{};{let _=pi(e,g);a[_.route.id]==null&&(a[_.route.id]=v)}i[g]=void 0,u||(u=!0,l=Nd(p.error)?p.error.status:500),p.headers&&(d[g]=p.headers)}else mo(p)?(s.set(g,p.deferredData),i[g]=p.deferredData.data,p.statusCode!=null&&p.statusCode!==200&&!u&&(l=p.statusCode),p.headers&&(d[g]=p.headers)):(i[g]=p.data,p.statusCode&&p.statusCode!==200&&!u&&(l=p.statusCode),p.headers&&(d[g]=p.headers))}),f!==void 0&&r&&(a={[r[0]]:f},i[r[0]]=void 0),{loaderData:i,errors:a,statusCode:l||200,loaderHeaders:d}}function Vy(e,t,n,r,s,o,i,a){let{loaderData:l,errors:u}=lP(t,n,r,s,a);for(let d=0;dr.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function Yy(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function sn(e,t){let{pathname:n,routeId:r,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 "'+n+'" - the `unstable_patchRoutesOnMiss()` '+(`function threw the following error: +`+i):s&&n&&r?l="You made a "+s+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"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 "'+r+'" does not match URL "'+n+'"'):e===404?(a="Not Found",l='No route matches URL "'+n+'"'):e===405&&(a="Method Not Allowed",s&&n&&r?l="You made a "+s.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":s&&(l='Invalid request method "'+s.toUpperCase()+'"')),new $m(e||500,a,new Error(l),!0)}function By(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(go(n))return{result:n,idx:t}}}function C_(e){let t=typeof e=="string"?us(e):e;return jo(wt({},t,{hash:""}))}function cP(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function uP(e){return typeof e=="object"&&e!=null&&"then"in e}function dP(e){return k_(e.result)&&KR.has(e.result.status)}function mo(e){return e.type===ot.deferred}function kn(e){return e.type===ot.error}function go(e){return(e&&e.type)===ot.redirect}function fP(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 k_(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function hP(e){return GR.has(e.toLowerCase())}function Xn(e){return BR.has(e.toLowerCase())}async function Hy(e,t,n,r,s,o){for(let i=0;if.route.id===l.route.id),d=u!=null&&!S_(u,l)&&(o&&o[l.route.id])!==void 0;if(mo(a)&&(s||d)){let f=r[i];Ne(f,"Expected an AbortSignal for revalidating fetcher deferred result"),await E_(a,f,s).then(p=>{p&&(n[i]=p||n[i])})}}}async function E_(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:ot.data,data:e.deferredData.unwrappedData}}catch(s){return{type:ot.error,error:s}}return{type:ot.data,data:e.deferredData.data}}}function zm(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Ea(e,t){let n=typeof t=="string"?us(t).search:t.search;if(e[e.length-1].route.index&&zm(n||""))return e[e.length-1];let r=x_(e);return r[r.length-1]}function Gy(e){let{formMethod:t,formAction:n,formEncType:r,text:s,formData:o,json:i}=e;if(!(!t||!n||!r)){if(s!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:s};if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:i,text:void 0}}}function Hf(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 pP(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 ma(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 mP(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 bs(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 gP(e,t){try{let n=e.sessionStorage.getItem(__);if(n){let r=JSON.parse(n);for(let[s,o]of Object.entries(r||{}))o&&Array.isArray(o)&&t.set(s,new Set(o||[]))}}catch{}}function vP(e,t){if(t.size>0){let n={};for(let[r,s]of t)n[r]=[...s];try{e.sessionStorage.setItem(__,JSON.stringify(n))}catch(r){Po(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** + * 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 Lu(){return Lu=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),h.useCallback(function(u,d){if(d===void 0&&(d={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let f=Td(u,JSON.parse(i),o,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Zr([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,i,o,e])}const wP=h.createContext(null);function _P(e){let t=h.useContext(ds).outlet;return t&&h.createElement(wP.Provider,{value:e},t)}function P_(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=h.useContext(no),{matches:s}=h.useContext(ds),{pathname:o}=ro(),i=JSON.stringify(Ed(s,r.v7_relativeSplatPath));return h.useMemo(()=>Td(e,JSON.parse(i),o,n==="path"),[e,i,o,n])}function SP(e,t,n,r){Ki()||Ne(!1);let{navigator:s}=h.useContext(no),{matches:o}=h.useContext(ds),i=o[o.length-1],a=i?i.params:{};i&&i.pathname;let l=i?i.pathnameBase:"/";i&&i.route;let u=ro(),d;d=u;let f=d.pathname||"/",p=f;if(l!=="/"){let v=l.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(v.length).join("/")}let x=uo(e,{pathname:p});return TP(x&&x.map(v=>Object.assign({},v,{params:Object.assign({},a,v.params),pathname:Zr([l,s.encodeLocation?s.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?l:Zr([l,s.encodeLocation?s.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),o,n,r)}function bP(){let e=jP(),t=Nd(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return h.createElement(h.Fragment,null,h.createElement("h2",null,"Unexpected Application Error!"),h.createElement("h3",{style:{fontStyle:"italic"}},t),n?h.createElement("pre",{style:s},n):null,null)}const CP=h.createElement(bP,null);class kP extends h.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,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?h.createElement(ds.Provider,{value:this.props.routeContext},h.createElement(N_.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function EP(e){let{routeContext:t,match:n,children:r}=e,s=h.useContext(Rd);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),h.createElement(ds.Provider,{value:t},r)}function TP(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if((o=n)!=null&&o.errors)e=n.matches;else return null}let i=e,a=(s=n)==null?void 0:s.errors;if(a!=null){let d=i.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);d>=0||Ne(!1),i=i.slice(0,Math.min(i.length,d+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d=0?i=i.slice(0,u+1):i=[i[0]];break}}}return i.reduceRight((d,f,p)=>{let x,g=!1,v=null,_=null;n&&(x=a&&f.route.id?a[f.route.id]:void 0,v=f.route.errorElement||CP,l&&(u<0&&p===0?(MP("route-fallback"),g=!0,_=null):u===p&&(g=!0,_=f.route.hydrateFallbackElement||null)));let y=t.concat(i.slice(0,p+1)),m=()=>{let w;return x?w=v:g?w=_:f.route.Component?w=h.createElement(f.route.Component,null):f.route.element?w=f.route.element:w=d,h.createElement(EP,{match:f,routeContext:{outlet:d,matches:y,isDataRoute:n!=null},children:w})};return n&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?h.createElement(kP,{location:n.location,revalidation:n.revalidation,component:v,error:x,children:m(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):m()},null)}var j_=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(j_||{}),Fu=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}(Fu||{});function NP(e){let t=h.useContext(Rd);return t||Ne(!1),t}function RP(e){let t=h.useContext(T_);return t||Ne(!1),t}function PP(e){let t=h.useContext(ds);return t||Ne(!1),t}function D_(e){let t=PP(),n=t.matches[t.matches.length-1];return n.route.id||Ne(!1),n.route.id}function jP(){var e;let t=h.useContext(N_),n=RP(Fu.UseRouteError),r=D_(Fu.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function DP(){let{router:e}=NP(j_.UseNavigateStable),t=D_(Fu.UseNavigateStable),n=h.useRef(!1);return R_(()=>{n.current=!0}),h.useCallback(function(s,o){o===void 0&&(o={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Lu({fromRouteId:t},o)))},[e,t])}const Ky={};function MP(e,t,n){Ky[e]||(Ky[e]=!0)}function M_(e){let{to:t,replace:n,state:r,relative:s}=e;Ki()||Ne(!1);let{future:o,static:i}=h.useContext(no),{matches:a}=h.useContext(ds),{pathname:l}=ro(),u=so(),d=Td(t,Ed(a,o.v7_relativeSplatPath),l,s==="path"),f=JSON.stringify(d);return h.useEffect(()=>u(JSON.parse(f),{replace:n,state:r,relative:s}),[u,f,s,n,r]),null}function O_(e){return _P(e.context)}function OP(e){let{basename:t="/",children:n=null,location:r,navigationType:s=Pt.Pop,navigator:o,static:i=!1,future:a}=e;Ki()&&Ne(!1);let l=t.replace(/^\/*/,"/"),u=h.useMemo(()=>({basename:l,navigator:o,static:i,future:Lu({v7_relativeSplatPath:!1},a)}),[l,a,o,i]);typeof r=="string"&&(r=us(r));let{pathname:d="/",search:f="",hash:p="",state:x=null,key:g="default"}=r,v=h.useMemo(()=>{let _=Gi(d,l);return _==null?null:{location:{pathname:_,search:f,hash:p,state:x,key:g},navigationType:s}},[l,d,f,p,x,g,s]);return v==null?null:h.createElement(no.Provider,{value:u},h.createElement(Wm.Provider,{children:n,value:v}))}new Promise(()=>{});function AP(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:h.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:h.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:h.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 ul(){return ul=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[s]=e[s]);return n}function LP(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function FP(e,t){return e.button===0&&(!t||t==="_self")&&!LP(e)}function cp(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function UP(e,t){let n=cp(e);return t&&t.forEach((r,s)=>{n.has(s)||t.getAll(s).forEach(o=>{n.append(s,o)})}),n}const $P=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],VP="6";try{window.__reactRouterVersion=VP}catch{}function zP(e,t){return XR({basename:void 0,future:ul({},void 0,{v7_prependBasename:!0}),history:SR({window:void 0}),hydrationData:WP(),routes:e,mapRouteProperties:AP,unstable_dataStrategy:void 0,unstable_patchRoutesOnMiss:void 0,window:void 0}).initialize()}function WP(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=ul({},t,{errors:YP(t.errors)})),t}function YP(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,s]of t)if(s&&s.__type==="RouteErrorResponse")n[r]=new $m(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="",n[r]=i}catch{}}if(n[r]==null){let o=new Error(s.message);o.stack="",n[r]=o}}else n[r]=s;return n}const BP=h.createContext({isTransitioning:!1}),HP=h.createContext(new Map),GP="startTransition",Zy=hw[GP],KP="flushSync",qy=_R[KP];function ZP(e){Zy?Zy(e):e()}function ga(e){qy?qy(e):e()}class qP{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function QP(e){let{fallbackElement:t,router:n,future:r}=e,[s,o]=h.useState(n.state),[i,a]=h.useState(),[l,u]=h.useState({isTransitioning:!1}),[d,f]=h.useState(),[p,x]=h.useState(),[g,v]=h.useState(),_=h.useRef(new Map),{v7_startTransition:y}=r||{},m=h.useCallback(R=>{y?ZP(R):R()},[y]),w=h.useCallback((R,F)=>{let{deletedFetchers:L,unstable_flushSync:Z,unstable_viewTransitionOpts:M}=F;L.forEach(A=>_.current.delete(A)),R.fetchers.forEach((A,H)=>{A.data!==void 0&&_.current.set(H,A.data)});let B=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!M||B){Z?ga(()=>o(R)):m(()=>o(R));return}if(Z){ga(()=>{p&&(d&&d.resolve(),p.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:M.currentLocation,nextLocation:M.nextLocation})});let A=n.window.document.startViewTransition(()=>{ga(()=>o(R))});A.finished.finally(()=>{ga(()=>{f(void 0),x(void 0),a(void 0),u({isTransitioning:!1})})}),ga(()=>x(A));return}p?(d&&d.resolve(),p.skipTransition(),v({state:R,currentLocation:M.currentLocation,nextLocation:M.nextLocation})):(a(R),u({isTransitioning:!0,flushSync:!1,currentLocation:M.currentLocation,nextLocation:M.nextLocation}))},[n.window,p,d,_,m]);h.useLayoutEffect(()=>n.subscribe(w),[n,w]),h.useEffect(()=>{l.isTransitioning&&!l.flushSync&&f(new qP)},[l]),h.useEffect(()=>{if(d&&i&&n.window){let R=i,F=d.promise,L=n.window.document.startViewTransition(async()=>{m(()=>o(R)),await F});L.finished.finally(()=>{f(void 0),x(void 0),a(void 0),u({isTransitioning:!1})}),x(L)}},[m,i,d,n.window]),h.useEffect(()=>{d&&i&&s.location.key===i.location.key&&d.resolve()},[d,p,s.location,i]),h.useEffect(()=>{!l.isTransitioning&&g&&(a(g.state),u({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}),v(void 0))},[l.isTransitioning,g]),h.useEffect(()=>{},[]);let b=h.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:R=>n.navigate(R),push:(R,F,L)=>n.navigate(R,{state:F,preventScrollReset:L==null?void 0:L.preventScrollReset}),replace:(R,F,L)=>n.navigate(R,{replace:!0,state:F,preventScrollReset:L==null?void 0:L.preventScrollReset})}),[n]),C=n.basename||"/",S=h.useMemo(()=>({router:n,navigator:b,static:!1,basename:C}),[n,b,C]),N=h.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return h.createElement(h.Fragment,null,h.createElement(Rd.Provider,{value:S},h.createElement(T_.Provider,{value:s},h.createElement(HP.Provider,{value:_.current},h.createElement(BP.Provider,{value:l},h.createElement(OP,{basename:C,location:s.location,navigationType:s.historyAction,navigator:b,future:N},s.initialized||n.future.v7_partialHydration?h.createElement(XP,{routes:n.routes,future:n.future,state:s}):t))))),null)}const XP=h.memo(JP);function JP(e){let{routes:t,future:n,state:r}=e;return SP(t,void 0,r,n)}const ej=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",tj=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Fr=h.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:o,replace:i,state:a,target:l,to:u,preventScrollReset:d,unstable_viewTransition:f}=t,p=IP(t,$P),{basename:x}=h.useContext(no),g,v=!1;if(typeof u=="string"&&tj.test(u)&&(g=u,ej))try{let w=new URL(window.location.href),b=u.startsWith("//")?new URL(w.protocol+u):new URL(u),C=Gi(b.pathname,x);b.origin===w.origin&&C!=null?u=C+b.search+b.hash:v=!0}catch{}let _=yP(u,{relative:s}),y=nj(u,{replace:i,state:a,target:l,preventScrollReset:d,relative:s,unstable_viewTransition:f});function m(w){r&&r(w),w.defaultPrevented||y(w)}return h.createElement("a",ul({},p,{href:g||_,onClick:v||o?r:m,ref:n,target:l}))});var Qy;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Qy||(Qy={}));var Xy;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Xy||(Xy={}));function nj(e,t){let{target:n,replace:r,state:s,preventScrollReset:o,relative:i,unstable_viewTransition:a}=t===void 0?{}:t,l=so(),u=ro(),d=P_(e,{relative:i});return h.useCallback(f=>{if(FP(f,n)){f.preventDefault();let p=r!==void 0?r:jo(u)===jo(d);l(e,{replace:p,state:s,preventScrollReset:o,relative:i,unstable_viewTransition:a})}},[u,l,d,r,s,n,e,o,i,a])}function rj(e){let t=h.useRef(cp(e)),n=h.useRef(!1),r=ro(),s=h.useMemo(()=>UP(r.search,n.current?null:t.current),[r.search]),o=so(),i=h.useCallback((a,l)=>{const u=cp(typeof a=="function"?a(s):a);n.current=!0,o("?"+u,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 sj=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),A_=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).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 oj={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 ij=h.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:i,...a},l)=>h.createElement("svg",{ref:l,...oj,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:A_("lucide",s),...a},[...i.map(([u,d])=>h.createElement(u,d)),...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 nn=(e,t)=>{const n=h.forwardRef(({className:r,...s},o)=>h.createElement(ij,{ref:o,iconNode:t,className:A_(`lucide-${sj(e)}`,r),...s}));return n.displayName=`${e}`,n};/** + * @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 I_=nn("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 L_=nn("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 aj=nn("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 lj=nn("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 F_=nn("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 cj=nn("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 U_=nn("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 $_=nn("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 up=nn("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 Jy=nn("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 uj=nn("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 dj=nn("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 ex=nn("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 tx=nn("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 fj=nn("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 Ym=nn("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function hj(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Pd(...e){return t=>e.forEach(n=>hj(n,t))}function Ae(...e){return h.useCallback(Pd(...e),e)}var ns=h.forwardRef((e,t)=>{const{children:n,...r}=e,s=h.Children.toArray(n),o=s.find(pj);if(o){const i=o.props.children,a=s.map(l=>l===o?h.Children.count(i)>1?h.Children.only(null):h.isValidElement(i)?i.props.children:null:l);return c.jsx(dp,{...r,ref:t,children:h.isValidElement(i)?h.cloneElement(i,void 0,a):null})}return c.jsx(dp,{...r,ref:t,children:n})});ns.displayName="Slot";var dp=h.forwardRef((e,t)=>{const{children:n,...r}=e;if(h.isValidElement(n)){const s=gj(n);return h.cloneElement(n,{...mj(r,n.props),ref:t?Pd(t,s):s})}return h.Children.count(n)>1?h.Children.only(null):null});dp.displayName="SlotClone";var Bm=({children:e})=>c.jsx(c.Fragment,{children:e});function pj(e){return h.isValidElement(e)&&e.type===Bm}function mj(e,t){const n={...t};for(const r in t){const s=e[r],o=t[r];/^on[A-Z]/.test(r)?s&&o?n[r]=(...a)=>{o(...a),s(...a)}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function gj(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function V_(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ttypeof e=="boolean"?"".concat(e):e===0?"0":e,rx=vj,$l=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return rx(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:o}=t,i=Object.keys(s).map(u=>{const d=n==null?void 0:n[u],f=o==null?void 0:o[u];if(d===null)return null;const p=nx(d)||nx(f);return s[u][p]}),a=n&&Object.entries(n).reduce((u,d)=>{let[f,p]=d;return p===void 0||(u[f]=p),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:f,className:p,...x}=d;return Object.entries(x).every(g=>{let[v,_]=g;return Array.isArray(_)?_.includes({...o,...a}[v]):{...o,...a}[v]===_})?[...u,f,p]:u},[]);return rx(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)};function z_(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=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 sx=/^\[(.+)\]$/;function wj(e){if(sx.test(e)){const t=sx.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function _j(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return bj(Object.entries(e.classGroups),n).forEach(([o,i])=>{fp(i,r,o,t)}),r}function fp(e,t,n,r){e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:ox(t,s);o.classGroupId=n;return}if(typeof s=="function"){if(Sj(s)){fp(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([o,i])=>{fp(i,ox(t,o),n,r)})})}function ox(e,t){let n=e;return t.split(Hm).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function Sj(e){return e.isThemeGetter}function bj(e,t){return t?e.map(([n,r])=>{const s=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,a])=>[t+i,a])):o);return[n,s]}):e}function Cj(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function s(o,i){n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)}return{get(o){let i=n.get(o);if(i!==void 0)return i;if((i=r.get(o))!==void 0)return s(o,i),i},set(o,i){n.has(o)?n.set(o,i):s(o,i)}}}const Y_="!";function kj(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],o=t.length;function i(a){const l=[];let u=0,d=0,f;for(let _=0;_d?f-d:void 0;return{modifiers:l,hasImportantModifier:x,baseClassName:g,maybePostfixModifierPosition:v}}return n?function(l){return n({className:l,parseClassName:i})}:i}function Ej(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function Tj(e){return{cache:Cj(e.cacheSize),parseClassName:kj(e),...xj(e)}}const Nj=/\s+/;function Rj(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,o=new Set;return e.trim().split(Nj).map(i=>{const{modifiers:a,hasImportantModifier:l,baseClassName:u,maybePostfixModifierPosition:d}=n(i);let f=!!d,p=r(f?u.substring(0,d):u);if(!p){if(!f)return{isTailwindClass:!1,originalClassName:i};if(p=r(u),!p)return{isTailwindClass:!1,originalClassName:i};f=!1}const x=Ej(a).join(":");return{isTailwindClass:!0,modifierId:l?x+Y_:x,classGroupId:p,originalClassName:i,hasPostfixModifier:f}}).reverse().filter(i=>{if(!i.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:u}=i,d=a+l;return o.has(d)?!1:(o.add(d),s(l,u).forEach(f=>o.add(a+f)),!0)}).reverse().map(i=>i.originalClassName).join(" ")}function Pj(){let e=0,t,n,r="";for(;ef(d),e());return n=Tj(u),r=n.cache.get,s=n.cache.set,o=a,a(l)}function a(l){const u=r(l);if(u)return u;const d=Rj(l,n);return s(l,d),d}return function(){return o(Pj.apply(null,arguments))}}function at(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const H_=/^\[(?:([a-z-]+):)?(.+)\]$/i,Dj=/^\d+\/\d+$/,Mj=new Set(["px","full","screen"]),Oj=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Aj=/\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$/,Ij=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Lj=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Fj=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Ar(e){return vo(e)||Mj.has(e)||Dj.test(e)}function _s(e){return Zi(e,"length",Hj)}function vo(e){return!!e&&!Number.isNaN(Number(e))}function jc(e){return Zi(e,"number",vo)}function va(e){return!!e&&Number.isInteger(Number(e))}function Uj(e){return e.endsWith("%")&&vo(e.slice(0,-1))}function Ce(e){return H_.test(e)}function Ss(e){return Oj.test(e)}const $j=new Set(["length","size","percentage"]);function Vj(e){return Zi(e,$j,G_)}function zj(e){return Zi(e,"position",G_)}const Wj=new Set(["image","url"]);function Yj(e){return Zi(e,Wj,Kj)}function Bj(e){return Zi(e,"",Gj)}function ya(){return!0}function Zi(e,t,n){const r=H_.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function Hj(e){return Aj.test(e)&&!Ij.test(e)}function G_(){return!1}function Gj(e){return Lj.test(e)}function Kj(e){return Fj.test(e)}function Zj(){const e=at("colors"),t=at("spacing"),n=at("blur"),r=at("brightness"),s=at("borderColor"),o=at("borderRadius"),i=at("borderSpacing"),a=at("borderWidth"),l=at("contrast"),u=at("grayscale"),d=at("hueRotate"),f=at("invert"),p=at("gap"),x=at("gradientColorStops"),g=at("gradientColorStopPositions"),v=at("inset"),_=at("margin"),y=at("opacity"),m=at("padding"),w=at("saturate"),b=at("scale"),C=at("sepia"),S=at("skew"),N=at("space"),R=at("translate"),F=()=>["auto","contain","none"],L=()=>["auto","hidden","clip","visible","scroll"],Z=()=>["auto",Ce,t],M=()=>[Ce,t],B=()=>["",Ar,_s],A=()=>["auto",vo,Ce],H=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ne=()=>["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"],I=()=>["start","end","center","between","around","evenly","stretch"],D=()=>["","0",Ce],q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],le=()=>[vo,jc],me=()=>[vo,Ce];return{cacheSize:500,separator:":",theme:{colors:[ya],spacing:[Ar,_s],blur:["none","",Ss,Ce],brightness:le(),borderColor:[e],borderRadius:["none","","full",Ss,Ce],borderSpacing:M(),borderWidth:B(),contrast:le(),grayscale:D(),hueRotate:me(),invert:D(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[Uj,_s],inset:Z(),margin:Z(),opacity:le(),padding:M(),saturate:le(),scale:le(),sepia:D(),skew:me(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",Ce]}],container:["container"],columns:[{columns:[Ss]}],"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:[...H(),Ce]}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",va,Ce]}],basis:[{basis:Z()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ce]}],grow:[{grow:D()}],shrink:[{shrink:D()}],order:[{order:["first","last","none",va,Ce]}],"grid-cols":[{"grid-cols":[ya]}],"col-start-end":[{col:["auto",{span:["full",va,Ce]},Ce]}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":[ya]}],"row-start-end":[{row:["auto",{span:[va,Ce]},Ce]}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ce]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ce]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...I()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...I(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...I(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[m]}],px:[{px:[m]}],py:[{py:[m]}],ps:[{ps:[m]}],pe:[{pe:[m]}],pt:[{pt:[m]}],pr:[{pr:[m]}],pb:[{pb:[m]}],pl:[{pl:[m]}],m:[{m:[_]}],mx:[{mx:[_]}],my:[{my:[_]}],ms:[{ms:[_]}],me:[{me:[_]}],mt:[{mt:[_]}],mr:[{mr:[_]}],mb:[{mb:[_]}],ml:[{ml:[_]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ce,t]}],"min-w":[{"min-w":[Ce,t,"min","max","fit"]}],"max-w":[{"max-w":[Ce,t,"none","full","min","max","fit","prose",{screen:[Ss]},Ss]}],h:[{h:[Ce,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ce,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ce,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ce,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ss,_s]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",jc]}],"font-family":[{font:[ya]}],"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",Ce]}],"line-clamp":[{"line-clamp":["none",vo,jc]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ar,Ce]}],"list-image":[{"list-image":["none",Ce]}],"list-style-type":[{list:["none","disc","decimal",Ce]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ne(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ar,_s]}],"underline-offset":[{"underline-offset":["auto",Ar,Ce]}],"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:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ce]}],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",Ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...H(),zj]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Vj]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Yj]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[x]}],"gradient-via":[{via:[x]}],"gradient-to":[{to:[x]}],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":[y]}],"border-style":[{border:[...ne(),"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":[y]}],"divide-style":[{divide:ne()}],"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:["",...ne()]}],"outline-offset":[{"outline-offset":[Ar,Ce]}],"outline-w":[{outline:[Ar,_s]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[Ar,_s]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ss,Bj]}],"shadow-color":[{shadow:[ya]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...W(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":W()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Ss,Ce]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[w]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"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",Ce]}],duration:[{duration:me()}],ease:[{ease:["linear","in","out","in-out",Ce]}],delay:[{delay:me()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ce]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[va,Ce]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ce]}],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",Ce]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"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",Ce]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ar,_s,jc]}],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 qj=jj(Zj);function ae(...e){return qj(yj(e))}const Gm=$l("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"}}),jt=h.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},o)=>{const i=r?ns:"button";return c.jsx(i,{className:ae(Gm({variant:t,size:n,className:e})),ref:o,...s})});jt.displayName="Button";function X(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function Qj(e,t){const n=h.createContext(t);function r(o){const{children:i,...a}=o,l=h.useMemo(()=>a,Object.values(a));return c.jsx(n.Provider,{value:l,children:i})}function s(o){const i=h.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return r.displayName=e+"Provider",[r,s]}function An(e,t=[]){let n=[];function r(o,i){const a=h.createContext(i),l=n.length;n=[...n,i];function u(f){const{scope:p,children:x,...g}=f,v=(p==null?void 0:p[e][l])||a,_=h.useMemo(()=>g,Object.values(g));return c.jsx(v.Provider,{value:_,children:x})}function d(f,p){const x=(p==null?void 0:p[e][l])||a,g=h.useContext(x);if(g)return g;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,d]}const s=()=>{const o=n.map(i=>h.createContext(i));return function(a){const l=(a==null?void 0:a[e])||o;return h.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[r,Xj(s,...t)]}function Xj(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const i=r.reduce((a,{useScope:l,scopeName:u})=>{const f=l(o)[`__scope${u}`];return{...a,...f}},{});return h.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function Jt(e){const t=h.useRef(e);return h.useEffect(()=>{t.current=e}),h.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function rs({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,s]=Jj({defaultProp:t,onChange:n}),o=e!==void 0,i=o?e:r,a=Jt(n),l=h.useCallback(u=>{if(o){const f=typeof u=="function"?u(e):u;f!==e&&a(f)}else s(u)},[o,e,s,a]);return[i,l]}function Jj({defaultProp:e,onChange:t}){const n=h.useState(e),[r]=n,s=h.useRef(r),o=Jt(t);return h.useEffect(()=>{s.current!==r&&(o(r),s.current=r)},[r,s,o]),n}var eD=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],we=eD.reduce((e,t)=>{const n=h.forwardRef((r,s)=>{const{asChild:o,...i}=r,a=o?ns:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(a,{...i,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Km(e,t){e&&cs.flushSync(()=>e.dispatchEvent(t))}function jd(e){const t=e+"CollectionProvider",[n,r]=An(t),[s,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=x=>{const{scope:g,children:v}=x,_=Me.useRef(null),y=Me.useRef(new Map).current;return c.jsx(s,{scope:g,itemMap:y,collectionRef:_,children:v})};i.displayName=t;const a=e+"CollectionSlot",l=Me.forwardRef((x,g)=>{const{scope:v,children:_}=x,y=o(a,v),m=Ae(g,y.collectionRef);return c.jsx(ns,{ref:m,children:_})});l.displayName=a;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=Me.forwardRef((x,g)=>{const{scope:v,children:_,...y}=x,m=Me.useRef(null),w=Ae(g,m),b=o(u,v);return Me.useEffect(()=>(b.itemMap.set(m,{ref:m,...y}),()=>void b.itemMap.delete(m))),c.jsx(ns,{[d]:"",ref:w,children:_})});f.displayName=u;function p(x){const g=o(e+"CollectionConsumer",x);return Me.useCallback(()=>{const _=g.collectionRef.current;if(!_)return[];const y=Array.from(_.querySelectorAll(`[${d}]`));return Array.from(g.itemMap.values()).sort((b,C)=>y.indexOf(b.ref.current)-y.indexOf(C.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:i,Slot:l,ItemSlot:f},p,r]}var tD=h.createContext(void 0);function Dd(e){const t=h.useContext(tD);return e||t||"ltr"}function nD(e,t=globalThis==null?void 0:globalThis.document){const n=Jt(e);h.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var rD="DismissableLayer",hp="dismissableLayer.update",sD="dismissableLayer.pointerDownOutside",oD="dismissableLayer.focusOutside",ix,K_=h.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),qi=h.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:i,onDismiss:a,...l}=e,u=h.useContext(K_),[d,f]=h.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,x]=h.useState({}),g=Ae(t,N=>f(N)),v=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=v.indexOf(_),m=d?v.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,b=m>=y,C=aD(N=>{const R=N.target,F=[...u.branches].some(L=>L.contains(R));!b||F||(s==null||s(N),i==null||i(N),N.defaultPrevented||a==null||a())},p),S=lD(N=>{const R=N.target;[...u.branches].some(L=>L.contains(R))||(o==null||o(N),i==null||i(N),N.defaultPrevented||a==null||a())},p);return nD(N=>{m===u.layers.size-1&&(r==null||r(N),!N.defaultPrevented&&a&&(N.preventDefault(),a()))},p),h.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(ix=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),ax(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=ix)}},[d,p,n,u]),h.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),ax())},[d,u]),h.useEffect(()=>{const N=()=>x({});return document.addEventListener(hp,N),()=>document.removeEventListener(hp,N)},[]),c.jsx(we.div,{...l,ref:g,style:{pointerEvents:w?b?"auto":"none":void 0,...e.style},onFocusCapture:X(e.onFocusCapture,S.onFocusCapture),onBlurCapture:X(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:X(e.onPointerDownCapture,C.onPointerDownCapture)})});qi.displayName=rD;var iD="DismissableLayerBranch",Z_=h.forwardRef((e,t)=>{const n=h.useContext(K_),r=h.useRef(null),s=Ae(t,r);return h.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),c.jsx(we.div,{...e,ref:s})});Z_.displayName=iD;function aD(e,t=globalThis==null?void 0:globalThis.document){const n=Jt(e),r=h.useRef(!1),s=h.useRef(()=>{});return h.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let l=function(){q_(sD,n,u,{discrete:!0})};const u={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);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function lD(e,t=globalThis==null?void 0:globalThis.document){const n=Jt(e),r=h.useRef(!1);return h.useEffect(()=>{const s=o=>{o.target&&!r.current&&q_(oD,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ax(){const e=new CustomEvent(hp);document.dispatchEvent(e)}function q_(e,t,n,{discrete:r}){const s=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?Km(s,o):s.dispatchEvent(o)}var cD=qi,uD=Z_,Gf=0;function Zm(){h.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??lx()),document.body.insertAdjacentElement("beforeend",e[1]??lx()),Gf++,()=>{Gf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Gf--}},[])}function lx(){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 Kf="focusScope.autoFocusOnMount",Zf="focusScope.autoFocusOnUnmount",cx={bubbles:!1,cancelable:!0},dD="FocusScope",Md=h.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...i}=e,[a,l]=h.useState(null),u=Jt(s),d=Jt(o),f=h.useRef(null),p=Ae(t,v=>l(v)),x=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(r){let v=function(w){if(x.paused||!a)return;const b=w.target;a.contains(b)?f.current=b:Cs(f.current,{select:!0})},_=function(w){if(x.paused||!a)return;const b=w.relatedTarget;b!==null&&(a.contains(b)||Cs(f.current,{select:!0}))},y=function(w){if(document.activeElement===document.body)for(const C of w)C.removedNodes.length>0&&Cs(a)};document.addEventListener("focusin",v),document.addEventListener("focusout",_);const m=new MutationObserver(y);return a&&m.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",_),m.disconnect()}}},[r,a,x.paused]),h.useEffect(()=>{if(a){dx.add(x);const v=document.activeElement;if(!a.contains(v)){const y=new CustomEvent(Kf,cx);a.addEventListener(Kf,u),a.dispatchEvent(y),y.defaultPrevented||(fD(vD(Q_(a)),{select:!0}),document.activeElement===v&&Cs(a))}return()=>{a.removeEventListener(Kf,u),setTimeout(()=>{const y=new CustomEvent(Zf,cx);a.addEventListener(Zf,d),a.dispatchEvent(y),y.defaultPrevented||Cs(v??document.body,{select:!0}),a.removeEventListener(Zf,d),dx.remove(x)},0)}}},[a,u,d,x]);const g=h.useCallback(v=>{if(!n&&!r||x.paused)return;const _=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,y=document.activeElement;if(_&&y){const m=v.currentTarget,[w,b]=hD(m);w&&b?!v.shiftKey&&y===b?(v.preventDefault(),n&&Cs(w,{select:!0})):v.shiftKey&&y===w&&(v.preventDefault(),n&&Cs(b,{select:!0})):y===m&&v.preventDefault()}},[n,r,x.paused]);return c.jsx(we.div,{tabIndex:-1,...i,ref:p,onKeyDown:g})});Md.displayName=dD;function fD(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Cs(r,{select:t}),document.activeElement!==n)return}function hD(e){const t=Q_(e),n=ux(t,e),r=ux(t.reverse(),e);return[n,r]}function Q_(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ux(e,t){for(const n of e)if(!pD(n,{upTo:t}))return n}function pD(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 mD(e){return e instanceof HTMLInputElement&&"select"in e}function Cs(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&mD(e)&&t&&e.select()}}var dx=gD();function gD(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=fx(e,t),e.unshift(t)},remove(t){var n;e=fx(e,t),(n=e[0])==null||n.resume()}}}function fx(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function vD(e){return e.filter(t=>t.tagName!=="A")}var en=globalThis!=null&&globalThis.document?h.useLayoutEffect:()=>{},yD=hw.useId||(()=>{}),xD=0;function Er(e){const[t,n]=h.useState(yD());return en(()=>{n(r=>r??String(xD++))},[e]),t?`radix-${t}`:""}const wD=["top","right","bottom","left"],Sr=Math.min,En=Math.max,Uu=Math.round,Dc=Math.floor,Hs=e=>({x:e,y:e}),_D={left:"right",right:"left",bottom:"top",top:"bottom"},SD={start:"end",end:"start"};function pp(e,t,n){return En(e,Sr(t,n))}function ss(e,t){return typeof e=="function"?e(t):e}function os(e){return e.split("-")[0]}function Qi(e){return e.split("-")[1]}function qm(e){return e==="x"?"y":"x"}function Qm(e){return e==="y"?"height":"width"}function Gs(e){return["top","bottom"].includes(os(e))?"y":"x"}function Xm(e){return qm(Gs(e))}function bD(e,t,n){n===void 0&&(n=!1);const r=Qi(e),s=Xm(e),o=Qm(s);let i=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=$u(i)),[i,$u(i)]}function CD(e){const t=$u(e);return[mp(e),t,mp(t)]}function mp(e){return e.replace(/start|end/g,t=>SD[t])}function kD(e,t,n){const r=["left","right"],s=["right","left"],o=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?s:r:t?r:s;case"left":case"right":return t?o:i;default:return[]}}function ED(e,t,n,r){const s=Qi(e);let o=kD(os(e),n==="start",r);return s&&(o=o.map(i=>i+"-"+s),t&&(o=o.concat(o.map(mp)))),o}function $u(e){return e.replace(/left|right|bottom|top/g,t=>_D[t])}function TD(e){return{top:0,right:0,bottom:0,left:0,...e}}function X_(e){return typeof e!="number"?TD(e):{top:e,right:e,bottom:e,left:e}}function Vu(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function hx(e,t,n){let{reference:r,floating:s}=e;const o=Gs(t),i=Xm(t),a=Qm(i),l=os(t),u=o==="y",d=r.x+r.width/2-s.width/2,f=r.y+r.height/2-s.height/2,p=r[a]/2-s[a]/2;let x;switch(l){case"top":x={x:d,y:r.y-s.height};break;case"bottom":x={x:d,y:r.y+r.height};break;case"right":x={x:r.x+r.width,y:f};break;case"left":x={x:r.x-s.width,y:f};break;default:x={x:r.x,y:r.y}}switch(Qi(t)){case"start":x[i]-=p*(n&&u?-1:1);break;case"end":x[i]+=p*(n&&u?-1:1);break}return x}const ND=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:o=[],platform:i}=n,a=o.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:f}=hx(u,r,l),p=r,x={},g=0;for(let v=0;v({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:o,platform:i,elements:a,middlewareData:l}=t,{element:u,padding:d=0}=ss(e,t)||{};if(u==null)return{};const f=X_(d),p={x:n,y:r},x=Xm(s),g=Qm(x),v=await i.getDimensions(u),_=x==="y",y=_?"top":"left",m=_?"bottom":"right",w=_?"clientHeight":"clientWidth",b=o.reference[g]+o.reference[x]-p[x]-o.floating[g],C=p[x]-o.reference[x],S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let N=S?S[w]:0;(!N||!await(i.isElement==null?void 0:i.isElement(S)))&&(N=a.floating[w]||o.floating[g]);const R=b/2-C/2,F=N/2-v[g]/2-1,L=Sr(f[y],F),Z=Sr(f[m],F),M=L,B=N-v[g]-Z,A=N/2-v[g]/2+R,H=pp(M,A,B),ne=!l.arrow&&Qi(s)!=null&&A!==H&&o.reference[g]/2-(AA<=0)){var Z,M;const A=(((Z=o.flip)==null?void 0:Z.index)||0)+1,H=N[A];if(H)return{data:{index:A,overflows:L},reset:{placement:H}};let ne=(M=L.filter(W=>W.overflows[0]<=0).sort((W,I)=>W.overflows[1]-I.overflows[1])[0])==null?void 0:M.placement;if(!ne)switch(x){case"bestFit":{var B;const W=(B=L.filter(I=>{if(S){const D=Gs(I.placement);return D===m||D==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(D=>D>0).reduce((D,q)=>D+q,0)]).sort((I,D)=>I[1]-D[1])[0])==null?void 0:B[0];W&&(ne=W);break}case"initialPlacement":ne=a;break}if(s!==ne)return{reset:{placement:ne}}}return{}}}};function px(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function mx(e){return wD.some(t=>e[t]>=0)}const jD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=ss(e,t);switch(r){case"referenceHidden":{const o=await dl(t,{...s,elementContext:"reference"}),i=px(o,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:mx(i)}}}case"escaped":{const o=await dl(t,{...s,altBoundary:!0}),i=px(o,n.floating);return{data:{escapedOffsets:i,escaped:mx(i)}}}default:return{}}}}};async function DD(e,t){const{placement:n,platform:r,elements:s}=e,o=await(r.isRTL==null?void 0:r.isRTL(s.floating)),i=os(n),a=Qi(n),l=Gs(n)==="y",u=["left","top"].includes(i)?-1:1,d=o&&l?-1:1,f=ss(t,e);let{mainAxis:p,crossAxis:x,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof g=="number"&&(x=a==="end"?g*-1:g),l?{x:x*d,y:p*u}:{x:p*u,y:x*d}}const MD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:o,placement:i,middlewareData:a}=t,l=await DD(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:s+l.x,y:o+l.y,data:{...l,placement:i}}}}},OD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:a={fn:_=>{let{x:y,y:m}=_;return{x:y,y:m}}},...l}=ss(e,t),u={x:n,y:r},d=await dl(t,l),f=Gs(os(s)),p=qm(f);let x=u[p],g=u[f];if(o){const _=p==="y"?"top":"left",y=p==="y"?"bottom":"right",m=x+d[_],w=x-d[y];x=pp(m,x,w)}if(i){const _=f==="y"?"top":"left",y=f==="y"?"bottom":"right",m=g+d[_],w=g-d[y];g=pp(m,g,w)}const v=a.fn({...t,[p]:x,[f]:g});return{...v,data:{x:v.x-n,y:v.y-r}}}}},AD=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:o,middlewareData:i}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=ss(e,t),d={x:n,y:r},f=Gs(s),p=qm(f);let x=d[p],g=d[f];const v=ss(a,t),_=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const w=p==="y"?"height":"width",b=o.reference[p]-o.floating[w]+_.mainAxis,C=o.reference[p]+o.reference[w]-_.mainAxis;xC&&(x=C)}if(u){var y,m;const w=p==="y"?"width":"height",b=["top","left"].includes(os(s)),C=o.reference[f]-o.floating[w]+(b&&((y=i.offset)==null?void 0:y[f])||0)+(b?0:_.crossAxis),S=o.reference[f]+o.reference[w]+(b?0:((m=i.offset)==null?void 0:m[f])||0)-(b?_.crossAxis:0);gS&&(g=S)}return{[p]:x,[f]:g}}}},ID=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:s,elements:o}=t,{apply:i=()=>{},...a}=ss(e,t),l=await dl(t,a),u=os(n),d=Qi(n),f=Gs(n)==="y",{width:p,height:x}=r.floating;let g,v;u==="top"||u==="bottom"?(g=u,v=d===(await(s.isRTL==null?void 0:s.isRTL(o.floating))?"start":"end")?"left":"right"):(v=u,g=d==="end"?"top":"bottom");const _=x-l.top-l.bottom,y=p-l.left-l.right,m=Sr(x-l[g],_),w=Sr(p-l[v],y),b=!t.middlewareData.shift;let C=m,S=w;if(f?S=d||b?Sr(w,y):y:C=d||b?Sr(m,_):_,b&&!d){const R=En(l.left,0),F=En(l.right,0),L=En(l.top,0),Z=En(l.bottom,0);f?S=p-2*(R!==0||F!==0?R+F:En(l.left,l.right)):C=x-2*(L!==0||Z!==0?L+Z:En(l.top,l.bottom))}await i({...t,availableWidth:S,availableHeight:C});const N=await s.getDimensions(o.floating);return p!==N.width||x!==N.height?{reset:{rects:!0}}:{}}}};function Xi(e){return J_(e)?(e.nodeName||"").toLowerCase():"#document"}function Rn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function fs(e){var t;return(t=(J_(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function J_(e){return e instanceof Node||e instanceof Rn(e).Node}function ar(e){return e instanceof Element||e instanceof Rn(e).Element}function Nr(e){return e instanceof HTMLElement||e instanceof Rn(e).HTMLElement}function gx(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Rn(e).ShadowRoot}function Vl(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=lr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(s)}function LD(e){return["table","td","th"].includes(Xi(e))}function Od(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Jm(e){const t=eg(),n=ar(e)?lr(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function FD(e){let t=Ks(e);for(;Nr(t)&&!Ui(t);){if(Jm(t))return t;if(Od(t))return null;t=Ks(t)}return null}function eg(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ui(e){return["html","body","#document"].includes(Xi(e))}function lr(e){return Rn(e).getComputedStyle(e)}function Ad(e){return ar(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ks(e){if(Xi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||gx(e)&&e.host||fs(e);return gx(t)?t.host:t}function eS(e){const t=Ks(e);return Ui(t)?e.ownerDocument?e.ownerDocument.body:e.body:Nr(t)&&Vl(t)?t:eS(t)}function fl(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=eS(e),o=s===((r=e.ownerDocument)==null?void 0:r.body),i=Rn(s);return o?t.concat(i,i.visualViewport||[],Vl(s)?s:[],i.frameElement&&n?fl(i.frameElement):[]):t.concat(s,fl(s,[],n))}function tS(e){const t=lr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Nr(e),o=s?e.offsetWidth:n,i=s?e.offsetHeight:r,a=Uu(n)!==o||Uu(r)!==i;return a&&(n=o,r=i),{width:n,height:r,$:a}}function tg(e){return ar(e)?e:e.contextElement}function Ci(e){const t=tg(e);if(!Nr(t))return Hs(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:o}=tS(t);let i=(o?Uu(n.width):n.width)/r,a=(o?Uu(n.height):n.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const UD=Hs(0);function nS(e){const t=Rn(e);return!eg()||!t.visualViewport?UD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function $D(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Rn(e)?!1:t}function Do(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),o=tg(e);let i=Hs(1);t&&(r?ar(r)&&(i=Ci(r)):i=Ci(e));const a=$D(o,n,r)?nS(o):Hs(0);let l=(s.left+a.x)/i.x,u=(s.top+a.y)/i.y,d=s.width/i.x,f=s.height/i.y;if(o){const p=Rn(o),x=r&&ar(r)?Rn(r):r;let g=p,v=g.frameElement;for(;v&&r&&x!==g;){const _=Ci(v),y=v.getBoundingClientRect(),m=lr(v),w=y.left+(v.clientLeft+parseFloat(m.paddingLeft))*_.x,b=y.top+(v.clientTop+parseFloat(m.paddingTop))*_.y;l*=_.x,u*=_.y,d*=_.x,f*=_.y,l+=w,u+=b,g=Rn(v),v=g.frameElement}}return Vu({width:d,height:f,x:l,y:u})}function VD(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const o=s==="fixed",i=fs(r),a=t?Od(t.floating):!1;if(r===i||a&&o)return n;let l={scrollLeft:0,scrollTop:0},u=Hs(1);const d=Hs(0),f=Nr(r);if((f||!f&&!o)&&((Xi(r)!=="body"||Vl(i))&&(l=Ad(r)),Nr(r))){const p=Do(r);u=Ci(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x,y:n.y*u.y-l.scrollTop*u.y+d.y}}function zD(e){return Array.from(e.getClientRects())}function rS(e){return Do(fs(e)).left+Ad(e).scrollLeft}function WD(e){const t=fs(e),n=Ad(e),r=e.ownerDocument.body,s=En(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=En(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+rS(e);const a=-n.scrollTop;return lr(r).direction==="rtl"&&(i+=En(t.clientWidth,r.clientWidth)-s),{width:s,height:o,x:i,y:a}}function YD(e,t){const n=Rn(e),r=fs(e),s=n.visualViewport;let o=r.clientWidth,i=r.clientHeight,a=0,l=0;if(s){o=s.width,i=s.height;const u=eg();(!u||u&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:i,x:a,y:l}}function BD(e,t){const n=Do(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,o=Nr(e)?Ci(e):Hs(1),i=e.clientWidth*o.x,a=e.clientHeight*o.y,l=s*o.x,u=r*o.y;return{width:i,height:a,x:l,y:u}}function vx(e,t,n){let r;if(t==="viewport")r=YD(e,n);else if(t==="document")r=WD(fs(e));else if(ar(t))r=BD(t,n);else{const s=nS(e);r={...t,x:t.x-s.x,y:t.y-s.y}}return Vu(r)}function sS(e,t){const n=Ks(e);return n===t||!ar(n)||Ui(n)?!1:lr(n).position==="fixed"||sS(n,t)}function HD(e,t){const n=t.get(e);if(n)return n;let r=fl(e,[],!1).filter(a=>ar(a)&&Xi(a)!=="body"),s=null;const o=lr(e).position==="fixed";let i=o?Ks(e):e;for(;ar(i)&&!Ui(i);){const a=lr(i),l=Jm(i);!l&&a.position==="fixed"&&(s=null),(o?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||Vl(i)&&!l&&sS(e,i))?r=r.filter(d=>d!==i):s=a,i=Ks(i)}return t.set(e,r),r}function GD(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const i=[...n==="clippingAncestors"?Od(t)?[]:HD(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((u,d)=>{const f=vx(t,d,s);return u.top=En(f.top,u.top),u.right=Sr(f.right,u.right),u.bottom=Sr(f.bottom,u.bottom),u.left=En(f.left,u.left),u},vx(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function KD(e){const{width:t,height:n}=tS(e);return{width:t,height:n}}function ZD(e,t,n){const r=Nr(t),s=fs(t),o=n==="fixed",i=Do(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=Hs(0);if(r||!r&&!o)if((Xi(t)!=="body"||Vl(s))&&(a=Ad(t)),r){const f=Do(t,!0,o,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else s&&(l.x=rS(s));const u=i.left+a.scrollLeft-l.x,d=i.top+a.scrollTop-l.y;return{x:u,y:d,width:i.width,height:i.height}}function qf(e){return lr(e).position==="static"}function yx(e,t){return!Nr(e)||lr(e).position==="fixed"?null:t?t(e):e.offsetParent}function oS(e,t){const n=Rn(e);if(Od(e))return n;if(!Nr(e)){let s=Ks(e);for(;s&&!Ui(s);){if(ar(s)&&!qf(s))return s;s=Ks(s)}return n}let r=yx(e,t);for(;r&&LD(r)&&qf(r);)r=yx(r,t);return r&&Ui(r)&&qf(r)&&!Jm(r)?n:r||FD(e)||n}const qD=async function(e){const t=this.getOffsetParent||oS,n=this.getDimensions,r=await n(e.floating);return{reference:ZD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function QD(e){return lr(e).direction==="rtl"}const XD={convertOffsetParentRelativeRectToViewportRelativeRect:VD,getDocumentElement:fs,getClippingRect:GD,getOffsetParent:oS,getElementRects:qD,getClientRects:zD,getDimensions:KD,getScale:Ci,isElement:ar,isRTL:QD};function JD(e,t){let n=null,r;const s=fs(e);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const{left:u,top:d,width:f,height:p}=e.getBoundingClientRect();if(a||t(),!f||!p)return;const x=Dc(d),g=Dc(s.clientWidth-(u+f)),v=Dc(s.clientHeight-(d+p)),_=Dc(u),m={rootMargin:-x+"px "+-g+"px "+-v+"px "+-_+"px",threshold:En(0,Sr(1,l))||1};let w=!0;function b(C){const S=C[0].intersectionRatio;if(S!==l){if(!w)return i();S?i(!1,S):r=setTimeout(()=>{i(!1,1e-7)},1e3)}w=!1}try{n=new IntersectionObserver(b,{...m,root:s.ownerDocument})}catch{n=new IntersectionObserver(b,m)}n.observe(e)}return i(!0),o}function eM(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=tg(e),d=s||o?[...u?fl(u):[],...fl(t)]:[];d.forEach(y=>{s&&y.addEventListener("scroll",n,{passive:!0}),o&&y.addEventListener("resize",n)});const f=u&&a?JD(u,n):null;let p=-1,x=null;i&&(x=new ResizeObserver(y=>{let[m]=y;m&&m.target===u&&x&&(x.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=x)==null||w.observe(t)})),n()}),u&&!l&&x.observe(u),x.observe(t));let g,v=l?Do(e):null;l&&_();function _(){const y=Do(e);v&&(y.x!==v.x||y.y!==v.y||y.width!==v.width||y.height!==v.height)&&n(),v=y,g=requestAnimationFrame(_)}return n(),()=>{var y;d.forEach(m=>{s&&m.removeEventListener("scroll",n),o&&m.removeEventListener("resize",n)}),f==null||f(),(y=x)==null||y.disconnect(),x=null,l&&cancelAnimationFrame(g)}}const tM=MD,nM=OD,rM=PD,sM=ID,oM=jD,xx=RD,iM=AD,aM=(e,t,n)=>{const r=new Map,s={platform:XD,...n},o={...s.platform,_c:r};return ND(e,t,{...s,platform:o})};var ru=typeof document<"u"?h.useLayoutEffect:h.useEffect;function zu(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 n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!zu(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const o=s[r];if(!(o==="_owner"&&e.$$typeof)&&!zu(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function iS(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function wx(e,t){const n=iS(e);return Math.round(t*n)/n}function _x(e){const t=h.useRef(e);return ru(()=>{t.current=e}),t}function lM(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:o,floating:i}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[d,f]=h.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,x]=h.useState(r);zu(p,r)||x(r);const[g,v]=h.useState(null),[_,y]=h.useState(null),m=h.useCallback(W=>{W!==S.current&&(S.current=W,v(W))},[]),w=h.useCallback(W=>{W!==N.current&&(N.current=W,y(W))},[]),b=o||g,C=i||_,S=h.useRef(null),N=h.useRef(null),R=h.useRef(d),F=l!=null,L=_x(l),Z=_x(s),M=h.useCallback(()=>{if(!S.current||!N.current)return;const W={placement:t,strategy:n,middleware:p};Z.current&&(W.platform=Z.current),aM(S.current,N.current,W).then(I=>{const D={...I,isPositioned:!0};B.current&&!zu(R.current,D)&&(R.current=D,cs.flushSync(()=>{f(D)}))})},[p,t,n,Z]);ru(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(W=>({...W,isPositioned:!1})))},[u]);const B=h.useRef(!1);ru(()=>(B.current=!0,()=>{B.current=!1}),[]),ru(()=>{if(b&&(S.current=b),C&&(N.current=C),b&&C){if(L.current)return L.current(b,C,M);M()}},[b,C,M,L,F]);const A=h.useMemo(()=>({reference:S,floating:N,setReference:m,setFloating:w}),[m,w]),H=h.useMemo(()=>({reference:b,floating:C}),[b,C]),ne=h.useMemo(()=>{const W={position:n,left:0,top:0};if(!H.floating)return W;const I=wx(H.floating,d.x),D=wx(H.floating,d.y);return a?{...W,transform:"translate("+I+"px, "+D+"px)",...iS(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:I,top:D}},[n,a,H.floating,d.x,d.y]);return h.useMemo(()=>({...d,update:M,refs:A,elements:H,floatingStyles:ne}),[d,M,A,H,ne])}const cM=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?xx({element:r.current,padding:s}).fn(n):{}:r?xx({element:r,padding:s}).fn(n):{}}}},uM=(e,t)=>({...tM(e),options:[e,t]}),dM=(e,t)=>({...nM(e),options:[e,t]}),fM=(e,t)=>({...iM(e),options:[e,t]}),hM=(e,t)=>({...rM(e),options:[e,t]}),pM=(e,t)=>({...sM(e),options:[e,t]}),mM=(e,t)=>({...oM(e),options:[e,t]}),gM=(e,t)=>({...cM(e),options:[e,t]});var vM="Arrow",aS=h.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...o}=e;return c.jsx(we.svg,{...o,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});aS.displayName=vM;var yM=aS;function ng(e){const[t,n]=h.useState(void 0);return en(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=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,u=Array.isArray(l)?l[0]:l;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var rg="Popper",[lS,Ji]=An(rg),[xM,cS]=lS(rg),uS=e=>{const{__scopePopper:t,children:n}=e,[r,s]=h.useState(null);return c.jsx(xM,{scope:t,anchor:r,onAnchorChange:s,children:n})};uS.displayName=rg;var dS="PopperAnchor",fS=h.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,o=cS(dS,n),i=h.useRef(null),a=Ae(t,i);return h.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:c.jsx(we.div,{...s,ref:a})});fS.displayName=dS;var sg="PopperContent",[wM,_M]=lS(sg),hS=h.forwardRef((e,t)=>{var ce,je,Be,$e,Ve,_e;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:o="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:x="optimized",onPlaced:g,...v}=e,_=cS(sg,n),[y,m]=h.useState(null),w=Ae(t,vt=>m(vt)),[b,C]=h.useState(null),S=ng(b),N=(S==null?void 0:S.width)??0,R=(S==null?void 0:S.height)??0,F=r+(o!=="center"?"-"+o:""),L=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},Z=Array.isArray(u)?u:[u],M=Z.length>0,B={padding:L,boundary:Z.filter(bM),altBoundary:M},{refs:A,floatingStyles:H,placement:ne,isPositioned:W,middlewareData:I}=lM({strategy:"fixed",placement:F,whileElementsMounted:(...vt)=>eM(...vt,{animationFrame:x==="always"}),elements:{reference:_.anchor},middleware:[uM({mainAxis:s+R,alignmentAxis:i}),l&&dM({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?fM():void 0,...B}),l&&hM({...B}),pM({...B,apply:({elements:vt,rects:Ht,availableWidth:gs,availableHeight:hn})=>{const{width:vs,height:k}=Ht.reference,P=vt.floating.style;P.setProperty("--radix-popper-available-width",`${gs}px`),P.setProperty("--radix-popper-available-height",`${hn}px`),P.setProperty("--radix-popper-anchor-width",`${vs}px`),P.setProperty("--radix-popper-anchor-height",`${k}px`)}}),b&&gM({element:b,padding:a}),CM({arrowWidth:N,arrowHeight:R}),p&&mM({strategy:"referenceHidden",...B})]}),[D,q]=gS(ne),le=Jt(g);en(()=>{W&&(le==null||le())},[W,le]);const me=(ce=I.arrow)==null?void 0:ce.x,rt=(je=I.arrow)==null?void 0:je.y,Pe=((Be=I.arrow)==null?void 0:Be.centerOffset)!==0,[gt,Ue]=h.useState();return en(()=>{y&&Ue(window.getComputedStyle(y).zIndex)},[y]),c.jsx("div",{ref:A.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:W?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:gt,"--radix-popper-transform-origin":[($e=I.transformOrigin)==null?void 0:$e.x,(Ve=I.transformOrigin)==null?void 0:Ve.y].join(" "),...((_e=I.hide)==null?void 0:_e.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(wM,{scope:n,placedSide:D,onArrowChange:C,arrowX:me,arrowY:rt,shouldHideArrow:Pe,children:c.jsx(we.div,{"data-side":D,"data-align":q,...v,ref:w,style:{...v.style,animation:W?void 0:"none"}})})})});hS.displayName=sg;var pS="PopperArrow",SM={top:"bottom",right:"left",bottom:"top",left:"right"},mS=h.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,o=_M(pS,r),i=SM[o.placedSide];return c.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:c.jsx(yM,{...s,ref:n,style:{...s.style,display:"block"}})})});mS.displayName=pS;function bM(e){return e!==null}var CM=e=>({name:"transformOrigin",options:e,fn(t){var _,y,m;const{placement:n,rects:r,middlewareData:s}=t,i=((_=s.arrow)==null?void 0:_.centerOffset)!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,d]=gS(n),f={start:"0%",center:"50%",end:"100%"}[d],p=(((y=s.arrow)==null?void 0:y.x)??0)+a/2,x=(((m=s.arrow)==null?void 0:m.y)??0)+l/2;let g="",v="";return u==="bottom"?(g=i?f:`${p}px`,v=`${-l}px`):u==="top"?(g=i?f:`${p}px`,v=`${r.floating.height+l}px`):u==="right"?(g=`${-l}px`,v=i?f:`${x}px`):u==="left"&&(g=`${r.floating.width+l}px`,v=i?f:`${x}px`),{data:{x:g,y:v}}}});function gS(e){const[t,n="center"]=e.split("-");return[t,n]}var og=uS,ig=fS,ag=hS,lg=mS,kM="Portal",zl=h.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[s,o]=h.useState(!1);en(()=>o(!0),[]);const i=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?g_.createPortal(c.jsx(we.div,{...r,ref:t}),i):null});zl.displayName=kM;function EM(e,t){return h.useReducer((n,r)=>t[n][r]??n,e)}var fr=e=>{const{present:t,children:n}=e,r=TM(t),s=typeof n=="function"?n({present:r.isPresent}):h.Children.only(n),o=Ae(r.ref,NM(s));return typeof n=="function"||r.isPresent?h.cloneElement(s,{ref:o}):null};fr.displayName="Presence";function TM(e){const[t,n]=h.useState(),r=h.useRef({}),s=h.useRef(e),o=h.useRef("none"),i=e?"mounted":"unmounted",[a,l]=EM(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.useEffect(()=>{const u=Mc(r.current);o.current=a==="mounted"?u:"none"},[a]),en(()=>{const u=r.current,d=s.current;if(d!==e){const p=o.current,x=Mc(u);e?l("MOUNT"):x==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&p!==x?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),en(()=>{if(t){const u=f=>{const x=Mc(r.current).includes(f.animationName);f.target===t&&x&&cs.flushSync(()=>l("ANIMATION_END"))},d=f=>{f.target===t&&(o.current=Mc(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:h.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Mc(e){return(e==null?void 0:e.animationName)||"none"}function NM(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Qf="rovingFocusGroup.onEntryFocus",RM={bubbles:!1,cancelable:!0},Id="RovingFocusGroup",[gp,vS,PM]=jd(Id),[jM,Ld]=An(Id,[PM]),[DM,MM]=jM(Id),yS=h.forwardRef((e,t)=>c.jsx(gp.Provider,{scope:e.__scopeRovingFocusGroup,children:c.jsx(gp.Slot,{scope:e.__scopeRovingFocusGroup,children:c.jsx(OM,{...e,ref:t})})}));yS.displayName=Id;var OM=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:o,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,p=h.useRef(null),x=Ae(t,p),g=Dd(o),[v=null,_]=rs({prop:i,defaultProp:a,onChange:l}),[y,m]=h.useState(!1),w=Jt(u),b=vS(n),C=h.useRef(!1),[S,N]=h.useState(0);return h.useEffect(()=>{const R=p.current;if(R)return R.addEventListener(Qf,w),()=>R.removeEventListener(Qf,w)},[w]),c.jsx(DM,{scope:n,orientation:r,dir:g,loop:s,currentTabStopId:v,onItemFocus:h.useCallback(R=>_(R),[_]),onItemShiftTab:h.useCallback(()=>m(!0),[]),onFocusableItemAdd:h.useCallback(()=>N(R=>R+1),[]),onFocusableItemRemove:h.useCallback(()=>N(R=>R-1),[]),children:c.jsx(we.div,{tabIndex:y||S===0?-1:0,"data-orientation":r,...f,ref:x,style:{outline:"none",...e.style},onMouseDown:X(e.onMouseDown,()=>{C.current=!0}),onFocus:X(e.onFocus,R=>{const F=!C.current;if(R.target===R.currentTarget&&F&&!y){const L=new CustomEvent(Qf,RM);if(R.currentTarget.dispatchEvent(L),!L.defaultPrevented){const Z=b().filter(ne=>ne.focusable),M=Z.find(ne=>ne.active),B=Z.find(ne=>ne.id===v),H=[M,B,...Z].filter(Boolean).map(ne=>ne.ref.current);_S(H,d)}}C.current=!1}),onBlur:X(e.onBlur,()=>m(!1))})})}),xS="RovingFocusGroupItem",wS=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:o,...i}=e,a=Er(),l=o||a,u=MM(xS,n),d=u.currentTabStopId===l,f=vS(n),{onFocusableItemAdd:p,onFocusableItemRemove:x}=u;return h.useEffect(()=>{if(r)return p(),()=>x()},[r,p,x]),c.jsx(gp.ItemSlot,{scope:n,id:l,focusable:r,active:s,children:c.jsx(we.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...i,ref:t,onMouseDown:X(e.onMouseDown,g=>{r?u.onItemFocus(l):g.preventDefault()}),onFocus:X(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:X(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){u.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const v=LM(g,u.orientation,u.dir);if(v!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let y=f().filter(m=>m.focusable).map(m=>m.ref.current);if(v==="last")y.reverse();else if(v==="prev"||v==="next"){v==="prev"&&y.reverse();const m=y.indexOf(g.currentTarget);y=u.loop?FM(y,m+1):y.slice(m+1)}setTimeout(()=>_S(y))}})})})});wS.displayName=xS;var AM={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function IM(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function LM(e,t,n){const r=IM(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return AM[r]}function _S(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function FM(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var SS=yS,bS=wS,UM=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Zo=new WeakMap,Oc=new WeakMap,Ac={},Xf=0,CS=function(e){return e&&(e.host||CS(e.parentNode))},$M=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=CS(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},VM=function(e,t,n,r){var s=$M(t,Array.isArray(e)?e:[e]);Ac[n]||(Ac[n]=new WeakMap);var o=Ac[n],i=[],a=new Set,l=new Set(s),u=function(f){!f||a.has(f)||(a.add(f),u(f.parentNode))};s.forEach(u);var d=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(p){if(a.has(p))d(p);else try{var x=p.getAttribute(r),g=x!==null&&x!=="false",v=(Zo.get(p)||0)+1,_=(o.get(p)||0)+1;Zo.set(p,v),o.set(p,_),i.push(p),v===1&&g&&Oc.set(p,!0),_===1&&p.setAttribute(n,"true"),g||p.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",p,y)}})};return d(t),a.clear(),Xf++,function(){i.forEach(function(f){var p=Zo.get(f)-1,x=o.get(f)-1;Zo.set(f,p),o.set(f,x),p||(Oc.has(f)||f.removeAttribute(r),Oc.delete(f)),x||f.removeAttribute(n)}),Xf--,Xf||(Zo=new WeakMap,Zo=new WeakMap,Oc=new WeakMap,Ac={})}},cg=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=UM(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),VM(r,s,n,"aria-hidden")):function(){return null}},xr=function(){return xr=Object.assign||function(t){for(var n,r=1,s=arguments.length;r"u")return sO;var t=oO(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},aO=NS(),ki="data-scroll-locked",lO=function(e,t,n,r){var s=e.left,o=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),` + .`.concat(WM,` { + overflow: hidden `).concat(r,`; + padding-right: `).concat(a,"px ").concat(r,`; + } + body[`).concat(ki,`] { + overflow: hidden `).concat(r,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(r,";"),n==="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(r,`; + `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),` + } + + .`).concat(su,` { + right: `).concat(a,"px ").concat(r,`; + } + + .`).concat(ou,` { + margin-right: `).concat(a,"px ").concat(r,`; + } + + .`).concat(su," .").concat(su,` { + right: 0 `).concat(r,`; + } + + .`).concat(ou," .").concat(ou,` { + margin-right: 0 `).concat(r,`; + } + + body[`).concat(ki,`] { + `).concat(YM,": ").concat(a,`px; + } +`)},bx=function(){var e=parseInt(document.body.getAttribute(ki)||"0",10);return isFinite(e)?e:0},cO=function(){h.useEffect(function(){return document.body.setAttribute(ki,(bx()+1).toString()),function(){var e=bx()-1;e<=0?document.body.removeAttribute(ki):document.body.setAttribute(ki,e.toString())}},[])},uO=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;cO();var o=h.useMemo(function(){return iO(s)},[s]);return h.createElement(aO,{styles:lO(o,!t,s,n?"":"!important")})},vp=!1;if(typeof window<"u")try{var Ic=Object.defineProperty({},"passive",{get:function(){return vp=!0,!0}});window.addEventListener("test",Ic,Ic),window.removeEventListener("test",Ic,Ic)}catch{vp=!1}var qo=vp?{passive:!1}:!1,dO=function(e){return e.tagName==="TEXTAREA"},RS=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!dO(e)&&n[t]==="visible")},fO=function(e){return RS(e,"overflowY")},hO=function(e){return RS(e,"overflowX")},Cx=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=PS(e,r);if(s){var o=jS(e,r),i=o[1],a=o[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},pO=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},mO=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},PS=function(e,t){return e==="v"?fO(t):hO(t)},jS=function(e,t){return e==="v"?pO(t):mO(t)},gO=function(e,t){return e==="h"&&t==="rtl"?-1:1},vO=function(e,t,n,r,s){var o=gO(e,window.getComputedStyle(t).direction),i=o*r,a=n.target,l=t.contains(a),u=!1,d=i>0,f=0,p=0;do{var x=jS(e,a),g=x[0],v=x[1],_=x[2],y=v-_-o*g;(g||y)&&PS(e,a)&&(f+=y,p+=g),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(d&&(Math.abs(f)<1||!s)||!d&&(Math.abs(p)<1||!s))&&(u=!0),u},Lc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},kx=function(e){return[e.deltaX,e.deltaY]},Ex=function(e){return e&&"current"in e?e.current:e},yO=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;} +`)},wO=0,Qo=[];function _O(e){var t=h.useRef([]),n=h.useRef([0,0]),r=h.useRef(),s=h.useState(wO++)[0],o=h.useState(NS)[0],i=h.useRef(e);h.useEffect(function(){i.current=e},[e]),h.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var v=zM([e.lockRef.current],(e.shards||[]).map(Ex),!0).filter(Boolean);return v.forEach(function(_){return _.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),v.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var a=h.useCallback(function(v,_){if("touches"in v&&v.touches.length===2)return!i.current.allowPinchZoom;var y=Lc(v),m=n.current,w="deltaX"in v?v.deltaX:m[0]-y[0],b="deltaY"in v?v.deltaY:m[1]-y[1],C,S=v.target,N=Math.abs(w)>Math.abs(b)?"h":"v";if("touches"in v&&N==="h"&&S.type==="range")return!1;var R=Cx(N,S);if(!R)return!0;if(R?C=N:(C=N==="v"?"h":"v",R=Cx(N,S)),!R)return!1;if(!r.current&&"changedTouches"in v&&(w||b)&&(r.current=C),!C)return!0;var F=r.current||C;return vO(F,_,v,F==="h"?w:b,!0)},[]),l=h.useCallback(function(v){var _=v;if(!(!Qo.length||Qo[Qo.length-1]!==o)){var y="deltaY"in _?kx(_):Lc(_),m=t.current.filter(function(C){return C.name===_.type&&(C.target===_.target||_.target===C.shadowParent)&&yO(C.delta,y)})[0];if(m&&m.should){_.cancelable&&_.preventDefault();return}if(!m){var w=(i.current.shards||[]).map(Ex).filter(Boolean).filter(function(C){return C.contains(_.target)}),b=w.length>0?a(_,w[0]):!i.current.noIsolation;b&&_.cancelable&&_.preventDefault()}}},[]),u=h.useCallback(function(v,_,y,m){var w={name:v,delta:_,target:y,should:m,shadowParent:SO(y)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(b){return b!==w})},1)},[]),d=h.useCallback(function(v){n.current=Lc(v),r.current=void 0},[]),f=h.useCallback(function(v){u(v.type,kx(v),v.target,a(v,e.lockRef.current))},[]),p=h.useCallback(function(v){u(v.type,Lc(v),v.target,a(v,e.lockRef.current))},[]);h.useEffect(function(){return Qo.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",l,qo),document.addEventListener("touchmove",l,qo),document.addEventListener("touchstart",d,qo),function(){Qo=Qo.filter(function(v){return v!==o}),document.removeEventListener("wheel",l,qo),document.removeEventListener("touchmove",l,qo),document.removeEventListener("touchstart",d,qo)}},[]);var x=e.removeScrollBar,g=e.inert;return h.createElement(h.Fragment,null,g?h.createElement(o,{styles:xO(s)}):null,x?h.createElement(uO,{gapMode:e.gapMode}):null)}function SO(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const bO=QM(TS,_O);var Ud=h.forwardRef(function(e,t){return h.createElement(Fd,xr({},e,{ref:t,sideCar:bO}))});Ud.classNames=Fd.classNames;var yp=["Enter"," "],CO=["ArrowDown","PageUp","Home"],DS=["ArrowUp","PageDown","End"],kO=[...CO,...DS],EO={ltr:[...yp,"ArrowRight"],rtl:[...yp,"ArrowLeft"]},TO={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Wl="Menu",[hl,NO,RO]=jd(Wl),[Uo,MS]=An(Wl,[RO,Ji,Ld]),$d=Ji(),OS=Ld(),[PO,$o]=Uo(Wl),[jO,Yl]=Uo(Wl),AS=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:s,onOpenChange:o,modal:i=!0}=e,a=$d(t),[l,u]=h.useState(null),d=h.useRef(!1),f=Jt(o),p=Dd(s);return h.useEffect(()=>{const x=()=>{d.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>d.current=!1;return document.addEventListener("keydown",x,{capture:!0}),()=>{document.removeEventListener("keydown",x,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),c.jsx(og,{...a,children:c.jsx(PO,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:u,children:c.jsx(jO,{scope:t,onClose:h.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:p,modal:i,children:r})})})};AS.displayName=Wl;var DO="MenuAnchor",ug=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=$d(n);return c.jsx(ig,{...s,...r,ref:t})});ug.displayName=DO;var dg="MenuPortal",[MO,IS]=Uo(dg,{forceMount:void 0}),LS=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:s}=e,o=$o(dg,t);return c.jsx(MO,{scope:t,forceMount:n,children:c.jsx(fr,{present:n||o.open,children:c.jsx(zl,{asChild:!0,container:s,children:r})})})};LS.displayName=dg;var zn="MenuContent",[OO,fg]=Uo(zn),FS=h.forwardRef((e,t)=>{const n=IS(zn,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,o=$o(zn,e.__scopeMenu),i=Yl(zn,e.__scopeMenu);return c.jsx(hl.Provider,{scope:e.__scopeMenu,children:c.jsx(fr,{present:r||o.open,children:c.jsx(hl.Slot,{scope:e.__scopeMenu,children:i.modal?c.jsx(AO,{...s,ref:t}):c.jsx(IO,{...s,ref:t})})})})}),AO=h.forwardRef((e,t)=>{const n=$o(zn,e.__scopeMenu),r=h.useRef(null),s=Ae(t,r);return h.useEffect(()=>{const o=r.current;if(o)return cg(o)},[]),c.jsx(hg,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:X(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),IO=h.forwardRef((e,t)=>{const n=$o(zn,e.__scopeMenu);return c.jsx(hg,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),hg=h.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:s,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:x,disableOutsideScroll:g,...v}=e,_=$o(zn,n),y=Yl(zn,n),m=$d(n),w=OS(n),b=NO(n),[C,S]=h.useState(null),N=h.useRef(null),R=Ae(t,N,_.onContentChange),F=h.useRef(0),L=h.useRef(""),Z=h.useRef(0),M=h.useRef(null),B=h.useRef("right"),A=h.useRef(0),H=g?Ud:h.Fragment,ne=g?{as:ns,allowPinchZoom:!0}:void 0,W=D=>{var ce,je;const q=L.current+D,le=b().filter(Be=>!Be.disabled),me=document.activeElement,rt=(ce=le.find(Be=>Be.ref.current===me))==null?void 0:ce.textValue,Pe=le.map(Be=>Be.textValue),gt=KO(Pe,q,rt),Ue=(je=le.find(Be=>Be.textValue===gt))==null?void 0:je.ref.current;(function Be($e){L.current=$e,window.clearTimeout(F.current),$e!==""&&(F.current=window.setTimeout(()=>Be(""),1e3))})(q),Ue&&setTimeout(()=>Ue.focus())};h.useEffect(()=>()=>window.clearTimeout(F.current),[]),Zm();const I=h.useCallback(D=>{var le,me;return B.current===((le=M.current)==null?void 0:le.side)&&qO(D,(me=M.current)==null?void 0:me.area)},[]);return c.jsx(OO,{scope:n,searchRef:L,onItemEnter:h.useCallback(D=>{I(D)&&D.preventDefault()},[I]),onItemLeave:h.useCallback(D=>{var q;I(D)||((q=N.current)==null||q.focus(),S(null))},[I]),onTriggerLeave:h.useCallback(D=>{I(D)&&D.preventDefault()},[I]),pointerGraceTimerRef:Z,onPointerGraceIntentChange:h.useCallback(D=>{M.current=D},[]),children:c.jsx(H,{...ne,children:c.jsx(Md,{asChild:!0,trapped:s,onMountAutoFocus:X(o,D=>{var q;D.preventDefault(),(q=N.current)==null||q.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:c.jsx(qi,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:x,children:c.jsx(SS,{asChild:!0,...w,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:S,onEntryFocus:X(l,D=>{y.isUsingKeyboardRef.current||D.preventDefault()}),preventScrollOnEntryFocus:!0,children:c.jsx(ag,{role:"menu","aria-orientation":"vertical","data-state":e1(_.open),"data-radix-menu-content":"",dir:y.dir,...m,...v,ref:R,style:{outline:"none",...v.style},onKeyDown:X(v.onKeyDown,D=>{const le=D.target.closest("[data-radix-menu-content]")===D.currentTarget,me=D.ctrlKey||D.altKey||D.metaKey,rt=D.key.length===1;le&&(D.key==="Tab"&&D.preventDefault(),!me&&rt&&W(D.key));const Pe=N.current;if(D.target!==Pe||!kO.includes(D.key))return;D.preventDefault();const Ue=b().filter(ce=>!ce.disabled).map(ce=>ce.ref.current);DS.includes(D.key)&&Ue.reverse(),HO(Ue)}),onBlur:X(e.onBlur,D=>{D.currentTarget.contains(D.target)||(window.clearTimeout(F.current),L.current="")}),onPointerMove:X(e.onPointerMove,pl(D=>{const q=D.target,le=A.current!==D.clientX;if(D.currentTarget.contains(q)&&le){const me=D.clientX>A.current?"right":"left";B.current=me,A.current=D.clientX}}))})})})})})})});FS.displayName=zn;var LO="MenuGroup",pg=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(we.div,{role:"group",...r,ref:t})});pg.displayName=LO;var FO="MenuLabel",US=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(we.div,{...r,ref:t})});US.displayName=FO;var Wu="MenuItem",Tx="menu.itemSelect",Vd=h.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...s}=e,o=h.useRef(null),i=Yl(Wu,e.__scopeMenu),a=fg(Wu,e.__scopeMenu),l=Ae(t,o),u=h.useRef(!1),d=()=>{const f=o.current;if(!n&&f){const p=new CustomEvent(Tx,{bubbles:!0,cancelable:!0});f.addEventListener(Tx,x=>r==null?void 0:r(x),{once:!0}),Km(f,p),p.defaultPrevented?u.current=!1:i.onClose()}};return c.jsx($S,{...s,ref:l,disabled:n,onClick:X(e.onClick,d),onPointerDown:f=>{var p;(p=e.onPointerDown)==null||p.call(e,f),u.current=!0},onPointerUp:X(e.onPointerUp,f=>{var p;u.current||(p=f.currentTarget)==null||p.click()}),onKeyDown:X(e.onKeyDown,f=>{const p=a.searchRef.current!=="";n||p&&f.key===" "||yp.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});Vd.displayName=Wu;var $S=h.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:s,...o}=e,i=fg(Wu,n),a=OS(n),l=h.useRef(null),u=Ae(t,l),[d,f]=h.useState(!1),[p,x]=h.useState("");return h.useEffect(()=>{const g=l.current;g&&x((g.textContent??"").trim())},[o.children]),c.jsx(hl.ItemSlot,{scope:n,disabled:r,textValue:s??p,children:c.jsx(bS,{asChild:!0,...a,focusable:!r,children:c.jsx(we.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:u,onPointerMove:X(e.onPointerMove,pl(g=>{r?i.onItemLeave(g):(i.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:X(e.onPointerLeave,pl(g=>i.onItemLeave(g))),onFocus:X(e.onFocus,()=>f(!0)),onBlur:X(e.onBlur,()=>f(!1))})})})}),UO="MenuCheckboxItem",VS=h.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...s}=e;return c.jsx(HS,{scope:e.__scopeMenu,checked:n,children:c.jsx(Vd,{role:"menuitemcheckbox","aria-checked":Yu(n)?"mixed":n,...s,ref:t,"data-state":gg(n),onSelect:X(s.onSelect,()=>r==null?void 0:r(Yu(n)?!0:!n),{checkForDefaultPrevented:!1})})})});VS.displayName=UO;var zS="MenuRadioGroup",[$O,VO]=Uo(zS,{value:void 0,onValueChange:()=>{}}),WS=h.forwardRef((e,t)=>{const{value:n,onValueChange:r,...s}=e,o=Jt(r);return c.jsx($O,{scope:e.__scopeMenu,value:n,onValueChange:o,children:c.jsx(pg,{...s,ref:t})})});WS.displayName=zS;var YS="MenuRadioItem",BS=h.forwardRef((e,t)=>{const{value:n,...r}=e,s=VO(YS,e.__scopeMenu),o=n===s.value;return c.jsx(HS,{scope:e.__scopeMenu,checked:o,children:c.jsx(Vd,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":gg(o),onSelect:X(r.onSelect,()=>{var i;return(i=s.onValueChange)==null?void 0:i.call(s,n)},{checkForDefaultPrevented:!1})})})});BS.displayName=YS;var mg="MenuItemIndicator",[HS,zO]=Uo(mg,{checked:!1}),GS=h.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...s}=e,o=zO(mg,n);return c.jsx(fr,{present:r||Yu(o.checked)||o.checked===!0,children:c.jsx(we.span,{...s,ref:t,"data-state":gg(o.checked)})})});GS.displayName=mg;var WO="MenuSeparator",KS=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(we.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});KS.displayName=WO;var YO="MenuArrow",ZS=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=$d(n);return c.jsx(lg,{...s,...r,ref:t})});ZS.displayName=YO;var BO="MenuSub",[pz,qS]=Uo(BO),Ta="MenuSubTrigger",QS=h.forwardRef((e,t)=>{const n=$o(Ta,e.__scopeMenu),r=Yl(Ta,e.__scopeMenu),s=qS(Ta,e.__scopeMenu),o=fg(Ta,e.__scopeMenu),i=h.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:l}=o,u={__scopeMenu:e.__scopeMenu},d=h.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return h.useEffect(()=>d,[d]),h.useEffect(()=>{const f=a.current;return()=>{window.clearTimeout(f),l(null)}},[a,l]),c.jsx(ug,{asChild:!0,...u,children:c.jsx($S,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":s.contentId,"data-state":e1(n.open),...e,ref:Pd(t,s.onTriggerChange),onClick:f=>{var p;(p=e.onClick)==null||p.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:X(e.onPointerMove,pl(f=>{o.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(o.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:X(e.onPointerLeave,pl(f=>{var x,g;d();const p=(x=n.content)==null?void 0:x.getBoundingClientRect();if(p){const v=(g=n.content)==null?void 0:g.dataset.side,_=v==="right",y=_?-5:5,m=p[_?"left":"right"],w=p[_?"right":"left"];o.onPointerGraceIntentChange({area:[{x:f.clientX+y,y:f.clientY},{x:m,y:p.top},{x:w,y:p.top},{x:w,y:p.bottom},{x:m,y:p.bottom}],side:v}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(f),f.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:X(e.onKeyDown,f=>{var x;const p=o.searchRef.current!=="";e.disabled||p&&f.key===" "||EO[r.dir].includes(f.key)&&(n.onOpenChange(!0),(x=n.content)==null||x.focus(),f.preventDefault())})})})});QS.displayName=Ta;var XS="MenuSubContent",JS=h.forwardRef((e,t)=>{const n=IS(zn,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,o=$o(zn,e.__scopeMenu),i=Yl(zn,e.__scopeMenu),a=qS(XS,e.__scopeMenu),l=h.useRef(null),u=Ae(t,l);return c.jsx(hl.Provider,{scope:e.__scopeMenu,children:c.jsx(fr,{present:r||o.open,children:c.jsx(hl.Slot,{scope:e.__scopeMenu,children:c.jsx(hg,{id:a.contentId,"aria-labelledby":a.triggerId,...s,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var f;i.isUsingKeyboardRef.current&&((f=l.current)==null||f.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:X(e.onFocusOutside,d=>{d.target!==a.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:X(e.onEscapeKeyDown,d=>{i.onClose(),d.preventDefault()}),onKeyDown:X(e.onKeyDown,d=>{var x;const f=d.currentTarget.contains(d.target),p=TO[i.dir].includes(d.key);f&&p&&(o.onOpenChange(!1),(x=a.trigger)==null||x.focus(),d.preventDefault())})})})})})});JS.displayName=XS;function e1(e){return e?"open":"closed"}function Yu(e){return e==="indeterminate"}function gg(e){return Yu(e)?"indeterminate":e?"checked":"unchecked"}function HO(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function GO(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function KO(e,t,n){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let i=GO(e,Math.max(o,0));s.length===1&&(i=i.filter(u=>u!==n));const l=i.find(u=>u.toLowerCase().startsWith(s.toLowerCase()));return l!==n?l:void 0}function ZO(e,t){const{x:n,y:r}=e;let s=!1;for(let o=0,i=t.length-1;or!=d>r&&n<(u-a)*(r-l)/(d-l)+a&&(s=!s)}return s}function qO(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return ZO(n,t)}function pl(e){return t=>t.pointerType==="mouse"?e(t):void 0}var QO=AS,XO=ug,JO=LS,eA=FS,tA=pg,nA=US,rA=Vd,sA=VS,oA=WS,iA=BS,aA=GS,lA=KS,cA=ZS,uA=QS,dA=JS,vg="DropdownMenu",[fA,mz]=An(vg,[MS]),fn=MS(),[hA,t1]=fA(vg),n1=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:s,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,l=fn(t),u=h.useRef(null),[d=!1,f]=rs({prop:s,defaultProp:o,onChange:i});return c.jsx(hA,{scope:t,triggerId:Er(),triggerRef:u,contentId:Er(),open:d,onOpenChange:f,onOpenToggle:h.useCallback(()=>f(p=>!p),[f]),modal:a,children:c.jsx(QO,{...l,open:d,onOpenChange:f,dir:r,modal:a,children:n})})};n1.displayName=vg;var r1="DropdownMenuTrigger",s1=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...s}=e,o=t1(r1,n),i=fn(n);return c.jsx(XO,{asChild:!0,...i,children:c.jsx(we.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":r?"":void 0,disabled:r,...s,ref:Pd(t,o.triggerRef),onPointerDown:X(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(o.onOpenToggle(),o.open||a.preventDefault())}),onKeyDown:X(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&o.onOpenToggle(),a.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});s1.displayName=r1;var pA="DropdownMenuPortal",o1=e=>{const{__scopeDropdownMenu:t,...n}=e,r=fn(t);return c.jsx(JO,{...r,...n})};o1.displayName=pA;var i1="DropdownMenuContent",a1=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=t1(i1,n),o=fn(n),i=h.useRef(!1);return c.jsx(eA,{id:s.contentId,"aria-labelledby":s.triggerId,...o,...r,ref:t,onCloseAutoFocus:X(e.onCloseAutoFocus,a=>{var l;i.current||(l=s.triggerRef.current)==null||l.focus(),i.current=!1,a.preventDefault()}),onInteractOutside:X(e.onInteractOutside,a=>{const l=a.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,d=l.button===2||u;(!s.modal||d)&&(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)"}})});a1.displayName=i1;var mA="DropdownMenuGroup",gA=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=fn(n);return c.jsx(tA,{...s,...r,ref:t})});gA.displayName=mA;var vA="DropdownMenuLabel",l1=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=fn(n);return c.jsx(nA,{...s,...r,ref:t})});l1.displayName=vA;var yA="DropdownMenuItem",c1=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=fn(n);return c.jsx(rA,{...s,...r,ref:t})});c1.displayName=yA;var xA="DropdownMenuCheckboxItem",u1=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=fn(n);return c.jsx(sA,{...s,...r,ref:t})});u1.displayName=xA;var wA="DropdownMenuRadioGroup",_A=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=fn(n);return c.jsx(oA,{...s,...r,ref:t})});_A.displayName=wA;var SA="DropdownMenuRadioItem",d1=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=fn(n);return c.jsx(iA,{...s,...r,ref:t})});d1.displayName=SA;var bA="DropdownMenuItemIndicator",f1=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=fn(n);return c.jsx(aA,{...s,...r,ref:t})});f1.displayName=bA;var CA="DropdownMenuSeparator",h1=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=fn(n);return c.jsx(lA,{...s,...r,ref:t})});h1.displayName=CA;var kA="DropdownMenuArrow",EA=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=fn(n);return c.jsx(cA,{...s,...r,ref:t})});EA.displayName=kA;var TA="DropdownMenuSubTrigger",p1=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=fn(n);return c.jsx(uA,{...s,...r,ref:t})});p1.displayName=TA;var NA="DropdownMenuSubContent",m1=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=fn(n);return c.jsx(dA,{...s,...r,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)"}})});m1.displayName=NA;var RA=n1,PA=s1,jA=o1,g1=a1,v1=l1,y1=c1,x1=u1,w1=d1,_1=f1,S1=h1,b1=p1,C1=m1;const DA=RA,MA=PA,OA=h.forwardRef(({className:e,inset:t,children:n,...r},s)=>c.jsxs(b1,{ref:s,className:ae("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),...r,children:[n,c.jsx(aj,{className:"ml-auto h-4 w-4"})]}));OA.displayName=b1.displayName;const AA=h.forwardRef(({className:e,...t},n)=>c.jsx(C1,{ref:n,className:ae("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}));AA.displayName=C1.displayName;const k1=h.forwardRef(({className:e,sideOffset:t=4,...n},r)=>c.jsx(jA,{children:c.jsx(g1,{ref:r,sideOffset:t,className:ae("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),...n})}));k1.displayName=g1.displayName;const E1=h.forwardRef(({className:e,inset:t,...n},r)=>c.jsx(y1,{ref:r,className:ae("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),...n}));E1.displayName=y1.displayName;const IA=h.forwardRef(({className:e,children:t,checked:n,...r},s)=>c.jsxs(x1,{ref:s,className:ae("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:n,...r,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(_1,{children:c.jsx(I_,{className:"h-4 w-4"})})}),t]}));IA.displayName=x1.displayName;const LA=h.forwardRef(({className:e,children:t,...n},r)=>c.jsxs(w1,{ref:r,className:ae("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),...n,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(_1,{children:c.jsx($_,{className:"h-2 w-2 fill-current"})})}),t]}));LA.displayName=w1.displayName;const T1=h.forwardRef(({className:e,inset:t,...n},r)=>c.jsx(v1,{ref:r,className:ae("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));T1.displayName=v1.displayName;const N1=h.forwardRef(({className:e,...t},n)=>c.jsx(S1,{ref:n,className:ae("-mx-1 my-1 h-px bg-muted",e),...t}));N1.displayName=S1.displayName;var yg="Dialog",[R1,P1]=An(yg),[FA,hr]=R1(yg),j1=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:s,onOpenChange:o,modal:i=!0}=e,a=h.useRef(null),l=h.useRef(null),[u=!1,d]=rs({prop:r,defaultProp:s,onChange:o});return c.jsx(FA,{scope:t,triggerRef:a,contentRef:l,contentId:Er(),titleId:Er(),descriptionId:Er(),open:u,onOpenChange:d,onOpenToggle:h.useCallback(()=>d(f=>!f),[d]),modal:i,children:n})};j1.displayName=yg;var D1="DialogTrigger",M1=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=hr(D1,n),o=Ae(t,s.triggerRef);return c.jsx(we.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":_g(s.open),...r,ref:o,onClick:X(e.onClick,s.onOpenToggle)})});M1.displayName=D1;var xg="DialogPortal",[UA,O1]=R1(xg,{forceMount:void 0}),A1=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:s}=e,o=hr(xg,t);return c.jsx(UA,{scope:t,forceMount:n,children:h.Children.map(r,i=>c.jsx(fr,{present:n||o.open,children:c.jsx(zl,{asChild:!0,container:s,children:i})}))})};A1.displayName=xg;var Bu="DialogOverlay",I1=h.forwardRef((e,t)=>{const n=O1(Bu,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=hr(Bu,e.__scopeDialog);return o.modal?c.jsx(fr,{present:r||o.open,children:c.jsx($A,{...s,ref:t})}):null});I1.displayName=Bu;var $A=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=hr(Bu,n);return c.jsx(Ud,{as:ns,allowPinchZoom:!0,shards:[s.contentRef],children:c.jsx(we.div,{"data-state":_g(s.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Mo="DialogContent",L1=h.forwardRef((e,t)=>{const n=O1(Mo,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=hr(Mo,e.__scopeDialog);return c.jsx(fr,{present:r||o.open,children:o.modal?c.jsx(VA,{...s,ref:t}):c.jsx(zA,{...s,ref:t})})});L1.displayName=Mo;var VA=h.forwardRef((e,t)=>{const n=hr(Mo,e.__scopeDialog),r=h.useRef(null),s=Ae(t,n.contentRef,r);return h.useEffect(()=>{const o=r.current;if(o)return cg(o)},[]),c.jsx(F1,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:X(e.onCloseAutoFocus,o=>{var i;o.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:X(e.onPointerDownOutside,o=>{const i=o.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&o.preventDefault()}),onFocusOutside:X(e.onFocusOutside,o=>o.preventDefault())})}),zA=h.forwardRef((e,t)=>{const n=hr(Mo,e.__scopeDialog),r=h.useRef(!1),s=h.useRef(!1);return c.jsx(F1,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,o),o.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),o.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:o=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const i=o.target;((u=n.triggerRef.current)==null?void 0:u.contains(i))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),F1=h.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:o,...i}=e,a=hr(Mo,n),l=h.useRef(null),u=Ae(t,l);return Zm(),c.jsxs(c.Fragment,{children:[c.jsx(Md,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:o,children:c.jsx(qi,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":_g(a.open),...i,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(YA,{titleId:a.titleId}),c.jsx(HA,{contentRef:l,descriptionId:a.descriptionId})]})]})}),wg="DialogTitle",U1=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=hr(wg,n);return c.jsx(we.h2,{id:s.titleId,...r,ref:t})});U1.displayName=wg;var $1="DialogDescription",V1=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=hr($1,n);return c.jsx(we.p,{id:s.descriptionId,...r,ref:t})});V1.displayName=$1;var z1="DialogClose",W1=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=hr(z1,n);return c.jsx(we.button,{type:"button",...r,ref:t,onClick:X(e.onClick,()=>s.onOpenChange(!1))})});W1.displayName=z1;function _g(e){return e?"open":"closed"}var Y1="DialogTitleWarning",[WA,B1]=Qj(Y1,{contentName:Mo,titleName:wg,docsSlug:"dialog"}),YA=({titleId:e})=>{const t=B1(Y1),n=`\`${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 h.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},BA="DialogDescriptionWarning",HA=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${B1(BA).contentName}}.`;return h.useEffect(()=>{var o;const s=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Sg=j1,bg=M1,Cg=A1,Bl=I1,Hl=L1,Gl=U1,Kl=V1,zd=W1;const H1=Sg,G1=bg,GA=Cg,K1=h.forwardRef(({className:e,...t},n)=>c.jsx(Bl,{className:ae("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:n}));K1.displayName=Bl.displayName;const KA=$l("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"}}),kg=h.forwardRef(({side:e="right",className:t,children:n,...r},s)=>c.jsxs(GA,{children:[c.jsx(K1,{}),c.jsxs(Hl,{ref:s,className:ae(KA({side:e}),t),...r,children:[n,c.jsxs(zd,{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:[c.jsx(Ym,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));kg.displayName=Hl.displayName;const Z1=({className:e,...t})=>c.jsx("div",{className:ae("flex flex-col space-y-2 text-center sm:text-left",e),...t});Z1.displayName="SheetHeader";const q1=h.forwardRef(({className:e,...t},n)=>c.jsx(Gl,{ref:n,className:ae("text-lg font-semibold text-foreground",e),...t}));q1.displayName=Gl.displayName;const ZA=h.forwardRef(({className:e,...t},n)=>c.jsx(Kl,{ref:n,className:ae("text-sm text-muted-foreground",e),...t}));ZA.displayName=Kl.displayName;class Pn extends Error{constructor(t){var n,r,s,o;super("ClientResponseError"),this.url="",this.status=0,this.response={},this.isAbort=!1,this.originalError=null,Object.setPrototypeOf(this,Pn.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 Pn||(this.originalError=t),typeof DOMException<"u"&&t instanceof DOMException&&(this.isAbort=!0),this.name="ClientResponseError "+this.status,this.message=(n=this.response)==null?void 0:n.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=(r=this.originalError)==null?void 0:r.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 Fc=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function qA(e,t){const n={};if(typeof e!="string")return n;const r=Object.assign({},{}).decode||QA;let s=0;for(;s0&&(!n.exp||n.exp-t>Date.now()/1e3))}Q1=typeof atob!="function"||JA?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 n,r,s=0,o=0,i="";r=t.charAt(o++);~r&&(n=s%4?64*n+r:r,s++%4)?i+=String.fromCharCode(255&n>>(-2*s&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return i}:atob;const Rx="pb_auth";class eI{constructor(){this.baseToken="",this.baseModel=null,this._onChangeCallbacks=[]}get token(){return this.baseToken}get model(){return this.baseModel}get isValid(){return!X1(this.token)}get isAdmin(){return Ei(this.token).type==="admin"}get isAuthRecord(){return Ei(this.token).type==="authRecord"}save(t,n){this.baseToken=t||"",this.baseModel=n||null,this.triggerChange()}clear(){this.baseToken="",this.baseModel=null,this.triggerChange()}loadFromCookie(t,n=Rx){const r=qA(t||"")[n]||"";let s={};try{s=JSON.parse(r),(typeof s===null||typeof s!="object"||Array.isArray(s))&&(s={})}catch{}this.save(s.token||"",s.model||null)}exportToCookie(t,n=Rx){var l,u;const r={secure:!0,sameSite:!0,httpOnly:!0,path:"/"},s=Ei(this.token);r.expires=s!=null&&s.exp?new Date(1e3*s.exp):new Date("1970-01-01"),t=Object.assign({},r,t);const o={token:this.token,model:this.model?JSON.parse(JSON.stringify(this.model)):null};let i=Nx(n,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:(u=o==null?void 0:o.model)==null?void 0:u.email};const d=["collectionId","username","verified"];for(const f in this.model)d.includes(f)&&(o.model[f]=this.model[f]);i=Nx(n,JSON.stringify(o),t)}return i}onChange(t,n=!1){return this._onChangeCallbacks.push(t),n&&t(this.token,this.model),()=>{for(let r=this._onChangeCallbacks.length-1;r>=0;r--)if(this._onChangeCallbacks[r]==t)return delete this._onChangeCallbacks[r],void this._onChangeCallbacks.splice(r,1)}}triggerChange(){for(const t of this._onChangeCallbacks)t&&t(this.token,this.model)}}class tI extends eI{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,n){this._storageSet(this.storageKey,{token:t,model:n}),super.save(t,n)}clear(){this._storageRemove(this.storageKey),super.clear()}_storageGet(t){if(typeof window<"u"&&(window!=null&&window.localStorage)){const n=window.localStorage.getItem(t)||"";try{return JSON.parse(n)}catch{return n}}return this.storageFallback[t]}_storageSet(t,n){if(typeof window<"u"&&(window!=null&&window.localStorage)){let r=n;typeof n!="string"&&(r=JSON.stringify(n)),window.localStorage.setItem(t,r)}else this.storageFallback[t]=n}_storageRemove(t){var n;typeof window<"u"&&(window!=null&&window.localStorage)&&((n=window.localStorage)==null||n.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 n=this._storageGet(this.storageKey)||{};super.save(n.token||"",n.model||null)})}}class Vo{constructor(t){this.client=t}}class nI extends Vo{async getAll(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/settings",t)}async update(t,n){return n=Object.assign({method:"PATCH",body:t},n),this.client.send("/api/settings",n)}async testS3(t="storage",n){return n=Object.assign({method:"POST",body:{filesystem:t}},n),this.client.send("/api/settings/test/s3",n).then(()=>!0)}async testEmail(t,n,r){return r=Object.assign({method:"POST",body:{email:t,template:n}},r),this.client.send("/api/settings/test/email",r).then(()=>!0)}async generateAppleClientSecret(t,n,r,s,o,i){return i=Object.assign({method:"POST",body:{clientId:t,teamId:n,keyId:r,privateKey:s,duration:o}},i),this.client.send("/api/settings/apple/generate-client-secret",i)}}class Eg extends Vo{decode(t){return t}async getFullList(t,n){if(typeof t=="number")return this._getFullList(t,n);let r=500;return(n=Object.assign({},t,n)).batch&&(r=n.batch,delete n.batch),this._getFullList(r,n)}async getList(t=1,n=30,r){return(r=Object.assign({method:"GET"},r)).query=Object.assign({page:t,perPage:n},r.query),this.client.send(this.baseCrudPath,r).then(s=>{var o;return s.items=((o=s.items)==null?void 0:o.map(i=>this.decode(i)))||[],s})}async getFirstListItem(t,n){return(n=Object.assign({requestKey:"one_by_filter_"+this.baseCrudPath+"_"+t},n)).query=Object.assign({filter:t,skipTotal:1},n.query),this.getList(1,1,n).then(r=>{var s;if(!((s=r==null?void 0:r.items)!=null&&s.length))throw new Pn({status:404,response:{code:404,message:"The requested resource wasn't found.",data:{}}});return r.items[0]})}async getOne(t,n){if(!t)throw new Pn({url:this.client.buildUrl(this.baseCrudPath+"/"),status:404,response:{code:404,message:"Missing required record id.",data:{}}});return n=Object.assign({method:"GET"},n),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),n).then(r=>this.decode(r))}async create(t,n){return n=Object.assign({method:"POST",body:t},n),this.client.send(this.baseCrudPath,n).then(r=>this.decode(r))}async update(t,n,r){return r=Object.assign({method:"PATCH",body:n},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),r).then(s=>this.decode(s))}async delete(t,n){return n=Object.assign({method:"DELETE"},n),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),n).then(()=>!0)}_getFullList(t=500,n){(n=n||{}).query=Object.assign({skipTotal:1},n.query);let r=[],s=async o=>this.getList(o,t||500,n).then(i=>{const a=i.items;return r=r.concat(a),a.length==i.perPage?s(o+1):r});return s(1)}}function Sn(e,t,n,r){const s=r!==void 0;return s||n!==void 0?s?(console.warn(e),t.body=Object.assign({},t.body,n),t.query=Object.assign({},t.query,r),t):Object.assign(t,n):t}function nh(e){var t;(t=e._resetAutoRefresh)==null||t.call(e)}class rI extends Eg{get baseCrudPath(){return"/api/admins"}async update(t,n,r){return super.update(t,n,r).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,n){return super.delete(t,n).then(r=>{var s,o;return r&&((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(),r})}authResponse(t){const n=this.decode((t==null?void 0:t.admin)||{});return t!=null&&t.token&&(t!=null&&t.admin)&&this.client.authStore.save(t.token,n),Object.assign({},t,{token:(t==null?void 0:t.token)||"",admin:n})}async authWithPassword(t,n,r,s){let o={method:"POST",body:{identity:t,password:n}};o=Sn("This form of authWithPassword(email, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(email, pass, options?).",o,r,s);const i=o.autoRefreshThreshold;delete o.autoRefreshThreshold,o.autoRefresh||nh(this.client);let a=await this.client.send(this.baseCrudPath+"/auth-with-password",o);return a=this.authResponse(a),i&&function(u,d,f,p){nh(u);const x=u.beforeSend,g=u.authStore.model,v=u.authStore.onChange((_,y)=>{(!_||(y==null?void 0:y.id)!=(g==null?void 0:g.id)||(y!=null&&y.collectionId||g!=null&&g.collectionId)&&(y==null?void 0:y.collectionId)!=(g==null?void 0:g.collectionId))&&nh(u)});u._resetAutoRefresh=function(){v(),u.beforeSend=x,delete u._resetAutoRefresh},u.beforeSend=async(_,y)=>{var C;const m=u.authStore.token;if((C=y.query)!=null&&C.autoRefresh)return x?x(_,y):{url:_,sendOptions:y};let w=u.authStore.isValid;if(w&&X1(u.authStore.token,d))try{await f()}catch{w=!1}w||await p();const b=y.headers||{};for(let S in b)if(S.toLowerCase()=="authorization"&&m==b[S]&&u.authStore.token){b[S]=u.authStore.token;break}return y.headers=b,x?x(_,y):{url:_,sendOptions:y}}}(this.client,i,()=>this.authRefresh({autoRefresh:!0}),()=>this.authWithPassword(t,n,Object.assign({autoRefresh:!0},o))),a}async authRefresh(t,n){let r={method:"POST"};return r=Sn("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",r,t,n),this.client.send(this.baseCrudPath+"/auth-refresh",r).then(this.authResponse.bind(this))}async requestPasswordReset(t,n,r){let s={method:"POST",body:{email:t}};return s=Sn("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",s,n,r),this.client.send(this.baseCrudPath+"/request-password-reset",s).then(()=>!0)}async confirmPasswordReset(t,n,r,s,o){let i={method:"POST",body:{token:t,password:n,passwordConfirm:r}};return i=Sn("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 sI=["requestKey","$cancelKey","$autoCancel","fetch","headers","body","query","params","cache","credentials","headers","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy","signal","window"];function J1(e){if(e){e.query=e.query||{};for(let t in e)sI.includes(t)||(e.query[t]=e[t],delete e[t])}}class eb extends Vo{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,n,r){var i;if(!t)throw new Error("topic must be set.");let s=t;if(r){J1(r);const a="options="+encodeURIComponent(JSON.stringify({query:r.query,headers:r.headers}));s+=(s.includes("?")?"&":"?")+a}const o=function(a){const l=a;let u;try{u=JSON.parse(l==null?void 0:l.data)}catch{}n(u||{})};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 r;let n=!1;if(t){const s=this.getSubscriptionsByTopic(t);for(let o in s)if(this.hasSubscriptionListeners(o)){for(let i of this.subscriptions[o])(r=this.eventSource)==null||r.removeEventListener(o,i);delete this.subscriptions[o],n||(n=!0)}}else this.subscriptions={};this.hasSubscriptionListeners()?n&&await this.submitSubscriptions():this.disconnect()}async unsubscribeByPrefix(t){var r;let n=!1;for(let s in this.subscriptions)if((s+"?").startsWith(t)){n=!0;for(let o of this.subscriptions[s])(r=this.eventSource)==null||r.removeEventListener(s,o);delete this.subscriptions[s]}n&&(this.hasSubscriptionListeners()?await this.submitSubscriptions():this.disconnect())}async unsubscribeByTopicAndListener(t,n){var o;let r=!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]===n&&(a=!0,delete this.subscriptions[i][l],this.subscriptions[i].splice(l,1),(o=this.eventSource)==null||o.removeEventListener(i,n));a&&(this.subscriptions[i].length||delete this.subscriptions[i],r||this.hasSubscriptionListeners(i)||(r=!0))}this.hasSubscriptionListeners()?r&&await this.submitSubscriptions():this.disconnect()}hasSubscriptionListeners(t){var n,r;if(this.subscriptions=this.subscriptions||{},t)return!!((n=this.subscriptions[t])!=null&&n.length);for(let s in this.subscriptions)if((r=this.subscriptions[s])!=null&&r.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 n={};t=t.includes("?")?t:t+"?";for(let r in this.subscriptions)(r+"?").startsWith(t)&&(n[r]=this.subscriptions[r]);return n}getNonEmptySubscriptionKeys(){const t=[];for(let n in this.subscriptions)this.subscriptions[n].length&&t.push(n);return t}addAllSubscriptionListeners(){if(this.eventSource){this.removeAllSubscriptionListeners();for(let t in this.subscriptions)for(let n of this.subscriptions[t])this.eventSource.addEventListener(t,n)}}removeAllSubscriptionListeners(){if(this.eventSource)for(let t in this.subscriptions)for(let n of this.subscriptions[t])this.eventSource.removeEventListener(t,n)}async connect(){if(!(this.reconnectAttempts>0))return new Promise((t,n)=>{this.pendingConnects.push({resolve:t,reject:n}),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 n=t;this.clientId=n==null?void 0:n.lastEventId,this.submitSubscriptions().then(async()=>{let r=3;for(;this.hasUnsentSubscriptions()&&r>0;)r--,await this.submitSubscriptions()}).then(()=>{for(let s of this.pendingConnects)s.resolve();this.pendingConnects=[],this.reconnectAttempts=0,clearTimeout(this.reconnectTimeoutId),clearTimeout(this.connectTimeoutId);const r=this.getSubscriptionsByTopic("PB_CONNECT");for(let s in r)for(let o of r[s])o(t)}).catch(r=>{this.clientId="",this.connectErrorHandler(r)})})}hasUnsentSubscriptions(){const t=this.getNonEmptySubscriptionKeys();if(t.length!=this.lastSentSubscriptions.length)return!0;for(const n of t)if(!this.lastSentSubscriptions.includes(n))return!0;return!1}connectErrorHandler(t){if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),!this.clientId&&!this.reconnectAttempts||this.reconnectAttempts>this.maxReconnectAttempts){for(let r of this.pendingConnects)r.reject(new Pn(t));return this.pendingConnects=[],void this.disconnect()}this.disconnect(!0);const n=this.predefinedReconnectIntervals[this.reconnectAttempts]||this.predefinedReconnectIntervals[this.predefinedReconnectIntervals.length-1];this.reconnectAttempts++,this.reconnectTimeoutId=setTimeout(()=>{this.initConnect()},n)}disconnect(t=!1){var n;if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),this.removeAllSubscriptionListeners(),this.client.cancelRequest(this.getSubscriptionsCancelKey()),(n=this.eventSource)==null||n.close(),this.eventSource=null,this.clientId="",!t){this.reconnectAttempts=0;for(let r of this.pendingConnects)r.resolve();this.pendingConnects=[]}}}class oI extends Eg{constructor(t,n){super(t),this.collectionIdOrName=n}get baseCrudPath(){return this.baseCollectionPath+"/records"}get baseCollectionPath(){return"/api/collections/"+encodeURIComponent(this.collectionIdOrName)}async subscribe(t,n,r){if(!t)throw new Error("Missing topic.");if(!n)throw new Error("Missing subscription callback.");return this.client.realtime.subscribe(this.collectionIdOrName+"/"+t,n,r)}async unsubscribe(t){return t?this.client.realtime.unsubscribe(this.collectionIdOrName+"/"+t):this.client.realtime.unsubscribeByPrefix(this.collectionIdOrName)}async getFullList(t,n){if(typeof t=="number")return super.getFullList(t,n);const r=Object.assign({},t,n);return super.getFullList(r)}async getList(t=1,n=30,r){return super.getList(t,n,r)}async getFirstListItem(t,n){return super.getFirstListItem(t,n)}async getOne(t,n){return super.getOne(t,n)}async create(t,n){return super.create(t,n)}async update(t,n,r){return super.update(t,n,r).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,n){return super.delete(t,n).then(r=>{var s,o,i;return!r||((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(),r})}authResponse(t){const n=this.decode((t==null?void 0:t.record)||{});return this.client.authStore.save(t==null?void 0:t.token,n),Object.assign({},t,{token:(t==null?void 0:t.token)||"",record:n})}async listAuthMethods(t){return t=Object.assign({method:"GET"},t),this.client.send(this.baseCollectionPath+"/auth-methods",t).then(n=>Object.assign({},n,{usernamePassword:!!(n!=null&&n.usernamePassword),emailPassword:!!(n!=null&&n.emailPassword),authProviders:Array.isArray(n==null?void 0:n.authProviders)?n==null?void 0:n.authProviders:[]}))}async authWithPassword(t,n,r,s){let o={method:"POST",body:{identity:t,password:n}};return o=Sn("This form of authWithPassword(usernameOrEmail, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(usernameOrEmail, pass, options?).",o,r,s),this.client.send(this.baseCollectionPath+"/auth-with-password",o).then(i=>this.authResponse(i))}async authWithOAuth2Code(t,n,r,s,o,i,a){let l={method:"POST",body:{provider:t,code:n,codeVerifier:r,redirectUrl:s,createData:o}};return l=Sn("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(u=>this.authResponse(u))}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 n=(t==null?void 0:t[0])||{};let r=null;n.urlCallback||(r=Px(void 0));const s=new eb(this.client);function o(){r==null||r.close(),s.unsubscribe()}const i={},a=n.requestKey;return a&&(i.requestKey=a),this.listAuthMethods(i).then(l=>{var p;const u=l.authProviders.find(x=>x.name===n.provider);if(!u)throw new Pn(new Error(`Missing or invalid provider "${n.provider}".`));const d=this.client.buildUrl("/api/oauth2-redirect"),f=a?(p=this.client.cancelControllers)==null?void 0:p[a]:void 0;return f&&(f.signal.onabort=()=>{o()}),new Promise(async(x,g)=>{var v;try{await s.subscribe("@oauth2",async w=>{var C;const b=s.clientId;try{if(!w.state||b!==w.state)throw new Error("State parameters don't match.");if(w.error||!w.code)throw new Error("OAuth2 redirect error or missing code: "+w.error);const S=Object.assign({},n);delete S.provider,delete S.scopes,delete S.createData,delete S.urlCallback,(C=f==null?void 0:f.signal)!=null&&C.onabort&&(f.signal.onabort=null);const N=await this.authWithOAuth2Code(u.name,w.code,u.codeVerifier,d,n.createData,S);x(N)}catch(S){g(new Pn(S))}o()});const _={state:s.clientId};(v=n.scopes)!=null&&v.length&&(_.scope=n.scopes.join(" "));const y=this._replaceQueryParams(u.authUrl+d,_);await(n.urlCallback||function(w){r?r.location.href=w:r=Px(w)})(y)}catch(_){o(),g(new Pn(_))}})}).catch(l=>{throw o(),l})}async authRefresh(t,n){let r={method:"POST"};return r=Sn("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",r,t,n),this.client.send(this.baseCollectionPath+"/auth-refresh",r).then(s=>this.authResponse(s))}async requestPasswordReset(t,n,r){let s={method:"POST",body:{email:t}};return s=Sn("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",s,n,r),this.client.send(this.baseCollectionPath+"/request-password-reset",s).then(()=>!0)}async confirmPasswordReset(t,n,r,s,o){let i={method:"POST",body:{token:t,password:n,passwordConfirm:r}};return i=Sn("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,n,r){let s={method:"POST",body:{email:t}};return s=Sn("This form of requestVerification(email, body?, query?) is deprecated. Consider replacing it with requestVerification(email, options?).",s,n,r),this.client.send(this.baseCollectionPath+"/request-verification",s).then(()=>!0)}async confirmVerification(t,n,r){let s={method:"POST",body:{token:t}};return s=Sn("This form of confirmVerification(token, body?, query?) is deprecated. Consider replacing it with confirmVerification(token, options?).",s,n,r),this.client.send(this.baseCollectionPath+"/confirm-verification",s).then(()=>{const o=Ei(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,n,r){let s={method:"POST",body:{newEmail:t}};return s=Sn("This form of requestEmailChange(newEmail, body?, query?) is deprecated. Consider replacing it with requestEmailChange(newEmail, options?).",s,n,r),this.client.send(this.baseCollectionPath+"/request-email-change",s).then(()=>!0)}async confirmEmailChange(t,n,r,s){let o={method:"POST",body:{token:t,password:n}};return o=Sn("This form of confirmEmailChange(token, password, body?, query?) is deprecated. Consider replacing it with confirmEmailChange(token, password, options?).",o,r,s),this.client.send(this.baseCollectionPath+"/confirm-email-change",o).then(()=>{const i=Ei(t),a=this.client.authStore.model;return a&&a.id===i.id&&a.collectionId===i.collectionId&&this.client.authStore.clear(),!0})}async listExternalAuths(t,n){return n=Object.assign({method:"GET"},n),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t)+"/external-auths",n)}async unlinkExternalAuth(t,n,r){return r=Object.assign({method:"DELETE"},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t)+"/external-auths/"+encodeURIComponent(n),r).then(()=>!0)}_replaceQueryParams(t,n={}){let r=t,s="";t.indexOf("?")>=0&&(r=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 n)n.hasOwnProperty(a)&&(n[a]==null?delete o[a]:o[a]=n[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!=""?r+"?"+s:r}}function Px(e){if(typeof window>"u"||!(window!=null&&window.open))throw new Pn(new Error("Not in a browser context - please pass a custom urlCallback function."));let t=1024,n=768,r=window.innerWidth,s=window.innerHeight;t=t>r?r:t,n=n>s?s:n;let o=r/2-t/2,i=s/2-n/2;return window.open(e,"popup_window","width="+t+",height="+n+",top="+i+",left="+o+",resizable,menubar=no")}class iI extends Eg{get baseCrudPath(){return"/api/collections"}async import(t,n=!1,r){return r=Object.assign({method:"PUT",body:{collections:t,deleteMissing:n}},r),this.client.send(this.baseCrudPath+"/import",r).then(()=>!0)}}class aI extends Vo{async getList(t=1,n=30,r){return(r=Object.assign({method:"GET"},r)).query=Object.assign({page:t,perPage:n},r.query),this.client.send("/api/logs",r)}async getOne(t,n){if(!t)throw new Pn({url:this.client.buildUrl("/api/logs/"),status:404,response:{code:404,message:"Missing required log id.",data:{}}});return n=Object.assign({method:"GET"},n),this.client.send("/api/logs/"+encodeURIComponent(t),n)}async getStats(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/logs/stats",t)}}class lI extends Vo{async check(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/health",t)}}class cI extends Vo{getUrl(t,n,r={}){if(!n||!(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(n));let o=this.client.buildUrl(s.join("/"));if(Object.keys(r).length){r.download===!1&&delete r.download;const i=new URLSearchParams(r);o+=(o.includes("?")?"&":"?")+i}return o}async getToken(t){return t=Object.assign({method:"POST"},t),this.client.send("/api/files/token",t).then(n=>(n==null?void 0:n.token)||"")}}class uI extends Vo{async getFullList(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/backups",t)}async create(t,n){return n=Object.assign({method:"POST",body:{name:t}},n),this.client.send("/api/backups",n).then(()=>!0)}async upload(t,n){return n=Object.assign({method:"POST",body:t},n),this.client.send("/api/backups/upload",n).then(()=>!0)}async delete(t,n){return n=Object.assign({method:"DELETE"},n),this.client.send(`/api/backups/${encodeURIComponent(t)}`,n).then(()=>!0)}async restore(t,n){return n=Object.assign({method:"POST"},n),this.client.send(`/api/backups/${encodeURIComponent(t)}/restore`,n).then(()=>!0)}getDownloadUrl(t,n){return this.client.buildUrl(`/api/backups/${encodeURIComponent(n)}?token=${encodeURIComponent(t)}`)}}class dI{constructor(t="/",n,r="en-US"){this.cancelControllers={},this.recordServices={},this.enableAutoCancellation=!0,this.baseUrl=t,this.lang=r,this.authStore=n||new tI,this.admins=new rI(this),this.collections=new iI(this),this.files=new cI(this),this.logs=new aI(this),this.settings=new nI(this),this.realtime=new eb(this),this.health=new lI(this),this.backups=new uI(this)}collection(t){return this.recordServices[t]||(this.recordServices[t]=new oI(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,n){if(!n)return t;for(let r in n){let s=n[r];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("{:"+r+"}",s)}return t}getFileUrl(t,n,r={}){return this.files.getUrl(t,n,r)}buildUrl(t){var r;let n=this.baseUrl;return typeof window>"u"||!window.location||n.startsWith("https://")||n.startsWith("http://")||(n=(r=window.location.origin)!=null&&r.endsWith("/")?window.location.origin.substring(0,window.location.origin.length-1):window.location.origin||"",this.baseUrl.startsWith("/")||(n+=window.location.pathname||"/",n+=n.endsWith("/")?"":"/"),n+=this.baseUrl),t&&(n+=n.endsWith("/")?"":"/",n+=t.startsWith("/")?t.substring(1):t),n}async send(t,n){n=this.initSendOptions(t,n);let r=this.buildUrl(t);if(this.beforeSend){const s=Object.assign({},await this.beforeSend(r,n));s.url!==void 0||s.options!==void 0?(r=s.url||r,n=s.options||n):Object.keys(s).length&&(n=s,console!=null&&console.warn&&console.warn("Deprecated format of beforeSend return: please use `return { url, options }`, instead of `return options`."))}if(n.query!==void 0){const s=this.serializeQueryParams(n.query);s&&(r+=(r.includes("?")?"&":"?")+s),delete n.query}return this.getHeader(n.headers,"Content-Type")=="application/json"&&n.body&&typeof n.body!="string"&&(n.body=JSON.stringify(n.body)),(n.fetch||fetch)(r,n).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 Pn({url:s.url,status:s.status,data:o});return o}).catch(s=>{throw new Pn(s)})}initSendOptions(t,n){if((n=Object.assign({method:"GET"},n)).body=this.convertToFormDataIfNeeded(n.body),J1(n),n.query=Object.assign({},n.params,n.query),n.requestKey===void 0&&(n.$autoCancel===!1||n.query.$autoCancel===!1?n.requestKey=null:(n.$cancelKey||n.query.$cancelKey)&&(n.requestKey=n.$cancelKey||n.query.$cancelKey)),delete n.$autoCancel,delete n.query.$autoCancel,delete n.$cancelKey,delete n.query.$cancelKey,this.getHeader(n.headers,"Content-Type")!==null||this.isFormData(n.body)||(n.headers=Object.assign({},n.headers,{"Content-Type":"application/json"})),this.getHeader(n.headers,"Accept-Language")===null&&(n.headers=Object.assign({},n.headers,{"Accept-Language":this.lang})),this.authStore.token&&this.getHeader(n.headers,"Authorization")===null&&(n.headers=Object.assign({},n.headers,{Authorization:this.authStore.token})),this.enableAutoCancellation&&n.requestKey!==null){const r=n.requestKey||(n.method||"GET")+t;delete n.requestKey,this.cancelRequest(r);const s=new AbortController;this.cancelControllers[r]=s,n.signal=s.signal}return n}convertToFormDataIfNeeded(t){if(typeof FormData>"u"||t===void 0||typeof t!="object"||t===null||this.isFormData(t)||!this.hasBlobField(t))return t;const n=new FormData;for(const r in t){const s=t[r];if(typeof s!="object"||this.hasBlobField({data:s})){const o=Array.isArray(s)?s:[s];for(let i of o)n.append(r,i)}else{let o={};o[r]=s,n.append("@jsonPayload",JSON.stringify(o))}}return n}hasBlobField(t){for(const n in t){const r=Array.isArray(t[n])?t[n]:[t[n]];for(const s of r)if(typeof Blob<"u"&&s instanceof Blob||typeof File<"u"&&s instanceof File)return!0}return!1}getHeader(t,n){t=t||{},n=n.toLowerCase();for(let r in t)if(r.toLowerCase()==n)return t[r];return null}isFormData(t){return t&&(t.constructor.name==="FormData"||typeof FormData<"u"&&t instanceof FormData)}serializeQueryParams(t){const n=[];for(const r in t){if(t[r]===null)continue;const s=t[r],o=encodeURIComponent(r);if(Array.isArray(s))for(const i of s)n.push(o+"="+encodeURIComponent(i));else s instanceof Date?n.push(o+"="+encodeURIComponent(s.toISOString())):typeof s!==null&&typeof s=="object"?n.push(o+"="+encodeURIComponent(JSON.stringify(s))):n.push(o+"="+encodeURIComponent(s))}return n.join("&")}}let Uc;const qt=()=>Uc||(Uc=new dI("http://127.0.0.1:8090"),Uc);//! moment.js +//! version : 2.30.1 +//! authors : Tim Wood, Iskren Chernev, Moment.js contributors +//! license : MIT +//! momentjs.com +var tb;function te(){return tb.apply(null,arguments)}function fI(e){tb=e}function cr(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function So(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function We(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Tg(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(We(e,t))return!1;return!0}function pn(e){return e===void 0}function is(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function Zl(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function nb(e,t){var n=[],r,s=e.length;for(r=0;r>>0,r;for(r=0;r0)for(n=0;n=0;return(o?n?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+r}var jg=/(\[[^\[]*\])|(\\)?([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,$c=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,sh={},Ti={};function he(e,t,n,r){var s=r;typeof r=="string"&&(s=function(){return this[r]()}),e&&(Ti[e]=s),t&&(Ti[t[0]]=function(){return Rr(s.apply(this,arguments),t[1],t[2])}),n&&(Ti[n]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function vI(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function yI(e){var t=e.match(jg),n,r;for(n=0,r=t.length;n=0&&$c.test(e);)e=e.replace($c,r),$c.lastIndex=0,n-=1;return e}var xI={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 wI(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(jg).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var _I="Invalid date";function SI(){return this._invalidDate}var bI="%d",CI=/\d{1,2}/;function kI(e){return this._ordinal.replace("%d",e)}var EI={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 TI(e,t,n,r){var s=this._relativeTime[n];return Mr(s)?s(e,t,n,r):s.replace(/%d/i,e)}function NI(e,t){var n=this._relativeTime[e>0?"future":"past"];return Mr(n)?n(t):n.replace(/%s/i,t)}var Mx={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 Hn(e){return typeof e=="string"?Mx[e]||Mx[e.toLowerCase()]:void 0}function Dg(e){var t={},n,r;for(r in e)We(e,r)&&(n=Hn(r),n&&(t[n]=e[r]));return t}var RI={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 PI(e){var t=[],n;for(n in e)We(e,n)&&t.push({unit:n,priority:RI[n]});return t.sort(function(r,s){return r.priority-s.priority}),t}var ib=/\d/,In=/\d\d/,ab=/\d{3}/,Mg=/\d{4}/,Yd=/[+-]?\d{6}/,ft=/\d\d?/,lb=/\d\d\d\d?/,cb=/\d\d\d\d\d\d?/,Bd=/\d{1,3}/,Og=/\d{1,4}/,Hd=/[+-]?\d{1,6}/,ea=/\d+/,Gd=/[+-]?\d+/,jI=/Z|[+-]\d\d:?\d\d/gi,Kd=/Z|[+-]\d\d(?::?\d\d)?/gi,DI=/[+-]?\d+(\.\d{1,3})?/,Ql=/[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,ta=/^[1-9]\d?/,Ag=/^([1-9]\d|\d)/,Hu;Hu={};function oe(e,t,n){Hu[e]=Mr(t)?t:function(r,s){return r&&n?n:t}}function MI(e,t){return We(Hu,e)?Hu[e](t._strict,t._locale):new RegExp(OI(e))}function OI(e){return qr(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,r,s,o){return n||r||s||o}))}function qr(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Un(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Oe(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=Un(t)),n}var Sp={};function nt(e,t){var n,r=t,s;for(typeof e=="string"&&(e=[e]),is(t)&&(r=function(o,i){i[t]=Oe(o)}),s=e.length,n=0;n68?1900:2e3)};var ub=na("FullYear",!0);function FI(){return Zd(this.year())}function na(e,t){return function(n){return n!=null?(db(this,e,n),te.updateOffset(this,t),this):ml(this,e)}}function ml(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function db(e,t,n){var r,s,o,i,a;if(!(!e.isValid()||isNaN(n))){switch(r=e._d,s=e._isUTC,t){case"Milliseconds":return void(s?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(s?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(s?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(s?r.setUTCHours(n):r.setHours(n));case"Date":return void(s?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}o=n,i=e.month(),a=e.date(),a=a===29&&i===1&&!Zd(o)?28:a,s?r.setUTCFullYear(o,i,a):r.setFullYear(o,i,a)}}function UI(e){return e=Hn(e),Mr(this[e])?this[e]():this}function $I(e,t){if(typeof e=="object"){e=Dg(e);var n=PI(e),r,s=n.length;for(r=0;r=0?(a=new Date(e+400,t,n,r,s,o,i),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,n,r,s,o,i),a}function gl(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Gu(e,t,n){var r=7+t-n,s=(7+gl(e,0,r).getUTCDay()-t)%7;return-s+r-1}function vb(e,t,n,r,s){var o=(7+n-r)%7,i=Gu(e,r,s),a=1+7*(t-1)+o+i,l,u;return a<=0?(l=e-1,u=$a(l)+a):a>$a(e)?(l=e+1,u=a-$a(e)):(l=e,u=a),{year:l,dayOfYear:u}}function vl(e,t,n){var r=Gu(e.year(),t,n),s=Math.floor((e.dayOfYear()-r-1)/7)+1,o,i;return s<1?(i=e.year()-1,o=s+Qr(i,t,n)):s>Qr(e.year(),t,n)?(o=s-Qr(e.year(),t,n),i=e.year()+1):(i=e.year(),o=s),{week:o,year:i}}function Qr(e,t,n){var r=Gu(e,t,n),s=Gu(e+1,t,n);return($a(e)-r+s)/7}he("w",["ww",2],"wo","week");he("W",["WW",2],"Wo","isoWeek");oe("w",ft,ta);oe("ww",ft,In);oe("W",ft,ta);oe("WW",ft,In);Xl(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=Oe(e)});function JI(e){return vl(e,this._week.dow,this._week.doy).week}var e2={dow:0,doy:6};function t2(){return this._week.dow}function n2(){return this._week.doy}function r2(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function s2(e){var t=vl(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}he("d",0,"do","day");he("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});he("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});he("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});he("e",0,0,"weekday");he("E",0,0,"isoWeekday");oe("d",ft);oe("e",ft);oe("E",ft);oe("dd",function(e,t){return t.weekdaysMinRegex(e)});oe("ddd",function(e,t){return t.weekdaysShortRegex(e)});oe("dddd",function(e,t){return t.weekdaysRegex(e)});Xl(["dd","ddd","dddd"],function(e,t,n,r){var s=n._locale.weekdaysParse(e,r,n._strict);s!=null?t.d=s:ke(n).invalidWeekday=e});Xl(["d","e","E"],function(e,t,n,r){t[r]=Oe(e)});function o2(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function i2(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Lg(e,t){return e.slice(t,7).concat(e.slice(0,t))}var a2="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),yb="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),l2="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),c2=Ql,u2=Ql,d2=Ql;function f2(e,t){var n=cr(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Lg(n,this._week.dow):e?n[e.day()]:n}function h2(e){return e===!0?Lg(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function p2(e){return e===!0?Lg(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function m2(e,t,n){var r,s,o,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=Dr([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?t==="dddd"?(s=Tt.call(this._weekdaysParse,i),s!==-1?s:null):t==="ddd"?(s=Tt.call(this._shortWeekdaysParse,i),s!==-1?s:null):(s=Tt.call(this._minWeekdaysParse,i),s!==-1?s:null):t==="dddd"?(s=Tt.call(this._weekdaysParse,i),s!==-1||(s=Tt.call(this._shortWeekdaysParse,i),s!==-1)?s:(s=Tt.call(this._minWeekdaysParse,i),s!==-1?s:null)):t==="ddd"?(s=Tt.call(this._shortWeekdaysParse,i),s!==-1||(s=Tt.call(this._weekdaysParse,i),s!==-1)?s:(s=Tt.call(this._minWeekdaysParse,i),s!==-1?s:null)):(s=Tt.call(this._minWeekdaysParse,i),s!==-1||(s=Tt.call(this._weekdaysParse,i),s!==-1)?s:(s=Tt.call(this._shortWeekdaysParse,i),s!==-1?s:null))}function g2(e,t,n){var r,s,o;if(this._weekdaysParseExact)return m2.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(s=Dr([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(s,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(s,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(s,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function v2(e){if(!this.isValid())return e!=null?this:NaN;var t=ml(this,"Day");return e!=null?(e=o2(e,this.localeData()),this.add(e-t,"d")):t}function y2(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 x2(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=i2(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function w2(e){return this._weekdaysParseExact?(We(this,"_weekdaysRegex")||Fg.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(We(this,"_weekdaysRegex")||(this._weekdaysRegex=c2),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function _2(e){return this._weekdaysParseExact?(We(this,"_weekdaysRegex")||Fg.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(We(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=u2),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function S2(e){return this._weekdaysParseExact?(We(this,"_weekdaysRegex")||Fg.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(We(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=d2),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Fg(){function e(d,f){return f.length-d.length}var t=[],n=[],r=[],s=[],o,i,a,l,u;for(o=0;o<7;o++)i=Dr([2e3,1]).day(o),a=qr(this.weekdaysMin(i,"")),l=qr(this.weekdaysShort(i,"")),u=qr(this.weekdays(i,"")),t.push(a),n.push(l),r.push(u),s.push(a),s.push(l),s.push(u);t.sort(e),n.sort(e),r.sort(e),s.sort(e),this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Ug(){return this.hours()%12||12}function b2(){return this.hours()||24}he("H",["HH",2],0,"hour");he("h",["hh",2],0,Ug);he("k",["kk",2],0,b2);he("hmm",0,0,function(){return""+Ug.apply(this)+Rr(this.minutes(),2)});he("hmmss",0,0,function(){return""+Ug.apply(this)+Rr(this.minutes(),2)+Rr(this.seconds(),2)});he("Hmm",0,0,function(){return""+this.hours()+Rr(this.minutes(),2)});he("Hmmss",0,0,function(){return""+this.hours()+Rr(this.minutes(),2)+Rr(this.seconds(),2)});function xb(e,t){he(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}xb("a",!0);xb("A",!1);function wb(e,t){return t._meridiemParse}oe("a",wb);oe("A",wb);oe("H",ft,Ag);oe("h",ft,ta);oe("k",ft,ta);oe("HH",ft,In);oe("hh",ft,In);oe("kk",ft,In);oe("hmm",lb);oe("hmmss",cb);oe("Hmm",lb);oe("Hmmss",cb);nt(["H","HH"],It);nt(["k","kk"],function(e,t,n){var r=Oe(e);t[It]=r===24?0:r});nt(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});nt(["h","hh"],function(e,t,n){t[It]=Oe(e),ke(n).bigHour=!0});nt("hmm",function(e,t,n){var r=e.length-2;t[It]=Oe(e.substr(0,r)),t[tr]=Oe(e.substr(r)),ke(n).bigHour=!0});nt("hmmss",function(e,t,n){var r=e.length-4,s=e.length-2;t[It]=Oe(e.substr(0,r)),t[tr]=Oe(e.substr(r,2)),t[Gr]=Oe(e.substr(s)),ke(n).bigHour=!0});nt("Hmm",function(e,t,n){var r=e.length-2;t[It]=Oe(e.substr(0,r)),t[tr]=Oe(e.substr(r))});nt("Hmmss",function(e,t,n){var r=e.length-4,s=e.length-2;t[It]=Oe(e.substr(0,r)),t[tr]=Oe(e.substr(r,2)),t[Gr]=Oe(e.substr(s))});function C2(e){return(e+"").toLowerCase().charAt(0)==="p"}var k2=/[ap]\.?m?\.?/i,E2=na("Hours",!0);function T2(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var _b={calendar:mI,longDateFormat:xI,invalidDate:_I,ordinal:bI,dayOfMonthOrdinalParse:CI,relativeTime:EI,months:zI,monthsShort:fb,week:e2,weekdays:a2,weekdaysMin:l2,weekdaysShort:yb,meridiemParse:k2},pt={},xa={},yl;function N2(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(s=qd(o.slice(0,n).join("-")),s)return s;if(r&&r.length>=n&&N2(o,r)>=n-1)break;n--}t++}return yl}function P2(e){return!!(e&&e.match("^[^/\\\\]*$"))}function qd(e){var t=null,n;if(pt[e]===void 0&&typeof fu<"u"&&fu&&fu.exports&&P2(e))try{t=yl._abbr,n=require,n("./locale/"+e),Ws(t)}catch{pt[e]=null}return pt[e]}function Ws(e,t){var n;return e&&(pn(t)?n=hs(e):n=$g(e,t),n?yl=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),yl._abbr}function $g(e,t){if(t!==null){var n,r=_b;if(t.abbr=e,pt[e]!=null)sb("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."),r=pt[e]._config;else if(t.parentLocale!=null)if(pt[t.parentLocale]!=null)r=pt[t.parentLocale]._config;else if(n=qd(t.parentLocale),n!=null)r=n._config;else return xa[t.parentLocale]||(xa[t.parentLocale]=[]),xa[t.parentLocale].push({name:e,config:t}),null;return pt[e]=new Pg(wp(r,t)),xa[e]&&xa[e].forEach(function(s){$g(s.name,s.config)}),Ws(e),pt[e]}else return delete pt[e],null}function j2(e,t){if(t!=null){var n,r,s=_b;pt[e]!=null&&pt[e].parentLocale!=null?pt[e].set(wp(pt[e]._config,t)):(r=qd(e),r!=null&&(s=r._config),t=wp(s,t),r==null&&(t.abbr=e),n=new Pg(t),n.parentLocale=pt[e],pt[e]=n),Ws(e)}else pt[e]!=null&&(pt[e].parentLocale!=null?(pt[e]=pt[e].parentLocale,e===Ws()&&Ws(e)):pt[e]!=null&&delete pt[e]);return pt[e]}function hs(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return yl;if(!cr(e)){if(t=qd(e),t)return t;e=[e]}return R2(e)}function D2(){return _p(pt)}function Vg(e){var t,n=e._a;return n&&ke(e).overflow===-2&&(t=n[Hr]<0||n[Hr]>11?Hr:n[wr]<1||n[wr]>Ig(n[Qt],n[Hr])?wr:n[It]<0||n[It]>24||n[It]===24&&(n[tr]!==0||n[Gr]!==0||n[yo]!==0)?It:n[tr]<0||n[tr]>59?tr:n[Gr]<0||n[Gr]>59?Gr:n[yo]<0||n[yo]>999?yo:-1,ke(e)._overflowDayOfYear&&(twr)&&(t=wr),ke(e)._overflowWeeks&&t===-1&&(t=II),ke(e)._overflowWeekday&&t===-1&&(t=LI),ke(e).overflow=t),e}var M2=/^\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)?)?$/,O2=/^\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)?)?$/,A2=/Z|[+-]\d\d(?::?\d\d)?/,Vc=[["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]],oh=[["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/]],I2=/^\/?Date\((-?\d+)/i,L2=/^(?:(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}))$/,F2={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 Sb(e){var t,n,r=e._i,s=M2.exec(r)||O2.exec(r),o,i,a,l,u=Vc.length,d=oh.length;if(s){for(ke(e).iso=!0,t=0,n=u;t$a(i)||e._dayOfYear===0)&&(ke(e)._overflowDayOfYear=!0),n=gl(i,0,e._dayOfYear),e._a[Hr]=n.getUTCMonth(),e._a[wr]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=s[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[It]===24&&e._a[tr]===0&&e._a[Gr]===0&&e._a[yo]===0&&(e._nextDay=!0,e._a[It]=0),e._d=(e._useUTC?gl:XI).apply(null,r),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[It]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==o&&(ke(e).weekdayMismatch=!0)}}function H2(e){var t,n,r,s,o,i,a,l,u;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(o=1,i=4,n=ei(t.GG,e._a[Qt],vl(dt(),1,4).year),r=ei(t.W,1),s=ei(t.E,1),(s<1||s>7)&&(l=!0)):(o=e._locale._week.dow,i=e._locale._week.doy,u=vl(dt(),o,i),n=ei(t.gg,e._a[Qt],u.year),r=ei(t.w,u.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),r<1||r>Qr(n,o,i)?ke(e)._overflowWeeks=!0:l!=null?ke(e)._overflowWeekday=!0:(a=vb(n,r,s,o,i),e._a[Qt]=a.year,e._dayOfYear=a.dayOfYear)}te.ISO_8601=function(){};te.RFC_2822=function(){};function Wg(e){if(e._f===te.ISO_8601){Sb(e);return}if(e._f===te.RFC_2822){bb(e);return}e._a=[],ke(e).empty=!0;var t=""+e._i,n,r,s,o,i,a=t.length,l=0,u,d;for(s=ob(e._f,e._locale).match(jg)||[],d=s.length,n=0;n0&&ke(e).unusedInput.push(i),t=t.slice(t.indexOf(r)+r.length),l+=r.length),Ti[o]?(r?ke(e).empty=!1:ke(e).unusedTokens.push(o),AI(o,r,e)):e._strict&&!r&&ke(e).unusedTokens.push(o);ke(e).charsLeftOver=a-l,t.length>0&&ke(e).unusedInput.push(t),e._a[It]<=12&&ke(e).bigHour===!0&&e._a[It]>0&&(ke(e).bigHour=void 0),ke(e).parsedDateParts=e._a.slice(0),ke(e).meridiem=e._meridiem,e._a[It]=G2(e._locale,e._a[It],e._meridiem),u=ke(e).era,u!==null&&(e._a[Qt]=e._locale.erasConvertYear(u,e._a[Qt])),zg(e),Vg(e)}function G2(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function K2(e){var t,n,r,s,o,i,a=!1,l=e._f.length;if(l===0){ke(e).invalidFormat=!0,e._d=new Date(NaN);return}for(s=0;sthis?this:e:Wd()});function Eb(e,t){var n,r;if(t.length===1&&cr(t[0])&&(t=t[0]),!t.length)return dt();for(n=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function mL(){if(!pn(this._isDSTShifted))return this._isDSTShifted;var e={},t;return Rg(e,this),e=Cb(e),e._a?(t=e._isUTC?Dr(e._a):dt(e._a),this._isDSTShifted=this.isValid()&&iL(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function gL(){return this.isValid()?!this._isUTC:!1}function vL(){return this.isValid()?this._isUTC:!1}function Nb(){return this.isValid()?this._isUTC&&this._offset===0:!1}var yL=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,xL=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function pr(e,t){var n=e,r=null,s,o,i;return au(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:is(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=yL.exec(e))?(s=r[1]==="-"?-1:1,n={y:0,d:Oe(r[wr])*s,h:Oe(r[It])*s,m:Oe(r[tr])*s,s:Oe(r[Gr])*s,ms:Oe(bp(r[yo]*1e3))*s}):(r=xL.exec(e))?(s=r[1]==="-"?-1:1,n={y:ao(r[2],s),M:ao(r[3],s),w:ao(r[4],s),d:ao(r[5],s),h:ao(r[6],s),m:ao(r[7],s),s:ao(r[8],s)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(i=wL(dt(n.from),dt(n.to)),n={},n.ms=i.milliseconds,n.M=i.months),o=new Qd(n),au(e)&&We(e,"_locale")&&(o._locale=e._locale),au(e)&&We(e,"_isValid")&&(o._isValid=e._isValid),o}pr.fn=Qd.prototype;pr.invalid=oL;function ao(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Ax(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function wL(e,t){var n;return e.isValid()&&t.isValid()?(t=Bg(t,e),e.isBefore(t)?n=Ax(e,t):(n=Ax(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Rb(e,t){return function(n,r){var s,o;return r!==null&&!isNaN(+r)&&(sb(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=n,n=r,r=o),s=pr(n,r),Pb(this,s,e),this}}function Pb(e,t,n,r){var s=t._milliseconds,o=bp(t._days),i=bp(t._months);e.isValid()&&(r=r??!0,i&&pb(e,ml(e,"Month")+i*n),o&&db(e,"Date",ml(e,"Date")+o*n),s&&e._d.setTime(e._d.valueOf()+s*n),r&&te.updateOffset(e,o||i))}var _L=Rb(1,"add"),SL=Rb(-1,"subtract");function jb(e){return typeof e=="string"||e instanceof String}function bL(e){return ur(e)||Zl(e)||jb(e)||is(e)||kL(e)||CL(e)||e===null||e===void 0}function CL(e){var t=So(e)&&!Tg(e),n=!1,r=["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=r.length;for(s=0;sn.valueOf():n.valueOf()9999?iu(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Mr(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",iu(n,"Z")):iu(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function UL(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,s,o;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",s="-MM-DD[T]HH:mm:ss.SSS",o=t+'[")]',this.format(n+r+s+o)}function $L(e){e||(e=this.isUtc()?te.defaultFormatUtc:te.defaultFormat);var t=iu(this,e);return this.localeData().postformat(t)}function VL(e,t){return this.isValid()&&(ur(e)&&e.isValid()||dt(e).isValid())?pr({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function zL(e){return this.from(dt(),e)}function WL(e,t){return this.isValid()&&(ur(e)&&e.isValid()||dt(e).isValid())?pr({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function YL(e){return this.to(dt(),e)}function Db(e){var t;return e===void 0?this._locale._abbr:(t=hs(e),t!=null&&(this._locale=t),this)}var Mb=Bn("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 Ob(){return this._locale}var Ku=1e3,Ni=60*Ku,Zu=60*Ni,Ab=(365*400+97)*24*Zu;function Ri(e,t){return(e%t+t)%t}function Ib(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-Ab:new Date(e,t,n).valueOf()}function Lb(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-Ab:Date.UTC(e,t,n)}function BL(e){var t,n;if(e=Hn(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Lb:Ib,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Ri(t+(this._isUTC?0:this.utcOffset()*Ni),Zu);break;case"minute":t=this._d.valueOf(),t-=Ri(t,Ni);break;case"second":t=this._d.valueOf(),t-=Ri(t,Ku);break}return this._d.setTime(t),te.updateOffset(this,!0),this}function HL(e){var t,n;if(e=Hn(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Lb:Ib,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Zu-Ri(t+(this._isUTC?0:this.utcOffset()*Ni),Zu)-1;break;case"minute":t=this._d.valueOf(),t+=Ni-Ri(t,Ni)-1;break;case"second":t=this._d.valueOf(),t+=Ku-Ri(t,Ku)-1;break}return this._d.setTime(t),te.updateOffset(this,!0),this}function GL(){return this._d.valueOf()-(this._offset||0)*6e4}function KL(){return Math.floor(this.valueOf()/1e3)}function ZL(){return new Date(this.valueOf())}function qL(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function QL(){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 XL(){return this.isValid()?this.toISOString():null}function JL(){return Ng(this)}function eF(){return Ds({},ke(this))}function tF(){return ke(this).overflow}function nF(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}he("N",0,0,"eraAbbr");he("NN",0,0,"eraAbbr");he("NNN",0,0,"eraAbbr");he("NNNN",0,0,"eraName");he("NNNNN",0,0,"eraNarrow");he("y",["y",1],"yo","eraYear");he("y",["yy",2],0,"eraYear");he("y",["yyy",3],0,"eraYear");he("y",["yyyy",4],0,"eraYear");oe("N",Hg);oe("NN",Hg);oe("NNN",Hg);oe("NNNN",hF);oe("NNNNN",pF);nt(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var s=n._locale.erasParse(e,r,n._strict);s?ke(n).era=s:ke(n).invalidEra=e});oe("y",ea);oe("yy",ea);oe("yyy",ea);oe("yyyy",ea);oe("yo",mF);nt(["y","yy","yyy","yyyy"],Qt);nt(["yo"],function(e,t,n,r){var s;n._locale._eraYearOrdinalRegex&&(s=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Qt]=n._locale.eraYearOrdinalParse(e,s):t[Qt]=parseInt(e,10)});function rF(e,t){var n,r,s,o=this._eras||hs("en")._eras;for(n=0,r=o.length;n=0)return o[r]}function oF(e,t){var n=e.since<=e.until?1:-1;return t===void 0?te(e.since).year():te(e.since).year()+(t-e.offset)*n}function iF(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;eo&&(t=o),SF.call(this,e,t,n,r,s))}function SF(e,t,n,r,s){var o=vb(e,t,n,r,s),i=gl(o.year,0,o.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}he("Q",0,"Qo","quarter");oe("Q",ib);nt("Q",function(e,t){t[Hr]=(Oe(e)-1)*3});function bF(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}he("D",["DD",2],"Do","date");oe("D",ft,ta);oe("DD",ft,In);oe("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});nt(["D","DD"],wr);nt("Do",function(e,t){t[wr]=Oe(e.match(ft)[0])});var Ub=na("Date",!0);he("DDD",["DDDD",3],"DDDo","dayOfYear");oe("DDD",Bd);oe("DDDD",ab);nt(["DDD","DDDD"],function(e,t,n){n._dayOfYear=Oe(e)});function CF(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}he("m",["mm",2],0,"minute");oe("m",ft,Ag);oe("mm",ft,In);nt(["m","mm"],tr);var kF=na("Minutes",!1);he("s",["ss",2],0,"second");oe("s",ft,Ag);oe("ss",ft,In);nt(["s","ss"],Gr);var EF=na("Seconds",!1);he("S",0,0,function(){return~~(this.millisecond()/100)});he(0,["SS",2],0,function(){return~~(this.millisecond()/10)});he(0,["SSS",3],0,"millisecond");he(0,["SSSS",4],0,function(){return this.millisecond()*10});he(0,["SSSSS",5],0,function(){return this.millisecond()*100});he(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});he(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});he(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});he(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});oe("S",Bd,ib);oe("SS",Bd,In);oe("SSS",Bd,ab);var Ms,$b;for(Ms="SSSS";Ms.length<=9;Ms+="S")oe(Ms,ea);function TF(e,t){t[yo]=Oe(("0."+e)*1e3)}for(Ms="S";Ms.length<=9;Ms+="S")nt(Ms,TF);$b=na("Milliseconds",!1);he("z",0,0,"zoneAbbr");he("zz",0,0,"zoneName");function NF(){return this._isUTC?"UTC":""}function RF(){return this._isUTC?"Coordinated Universal Time":""}var z=ql.prototype;z.add=_L;z.calendar=NL;z.clone=RL;z.diff=IL;z.endOf=HL;z.format=$L;z.from=VL;z.fromNow=zL;z.to=WL;z.toNow=YL;z.get=UI;z.invalidAt=tF;z.isAfter=PL;z.isBefore=jL;z.isBetween=DL;z.isSame=ML;z.isSameOrAfter=OL;z.isSameOrBefore=AL;z.isValid=JL;z.lang=Mb;z.locale=Db;z.localeData=Ob;z.max=J2;z.min=X2;z.parsingFlags=eF;z.set=$I;z.startOf=BL;z.subtract=SL;z.toArray=qL;z.toObject=QL;z.toDate=ZL;z.toISOString=FL;z.inspect=UL;typeof Symbol<"u"&&Symbol.for!=null&&(z[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});z.toJSON=XL;z.toString=LL;z.unix=KL;z.valueOf=GL;z.creationData=nF;z.eraName=iF;z.eraNarrow=aF;z.eraAbbr=lF;z.eraYear=cF;z.year=ub;z.isLeapYear=FI;z.weekYear=gF;z.isoWeekYear=vF;z.quarter=z.quarters=bF;z.month=mb;z.daysInMonth=ZI;z.week=z.weeks=r2;z.isoWeek=z.isoWeeks=s2;z.weeksInYear=wF;z.weeksInWeekYear=_F;z.isoWeeksInYear=yF;z.isoWeeksInISOWeekYear=xF;z.date=Ub;z.day=z.days=v2;z.weekday=y2;z.isoWeekday=x2;z.dayOfYear=CF;z.hour=z.hours=E2;z.minute=z.minutes=kF;z.second=z.seconds=EF;z.millisecond=z.milliseconds=$b;z.utcOffset=lL;z.utc=uL;z.local=dL;z.parseZone=fL;z.hasAlignedHourOffset=hL;z.isDST=pL;z.isLocal=gL;z.isUtcOffset=vL;z.isUtc=Nb;z.isUTC=Nb;z.zoneAbbr=NF;z.zoneName=RF;z.dates=Bn("dates accessor is deprecated. Use date instead.",Ub);z.months=Bn("months accessor is deprecated. Use month instead",mb);z.years=Bn("years accessor is deprecated. Use year instead",ub);z.zone=Bn("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",cL);z.isDSTShifted=Bn("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",mL);function PF(e){return dt(e*1e3)}function jF(){return dt.apply(null,arguments).parseZone()}function Vb(e){return e}var Ye=Pg.prototype;Ye.calendar=gI;Ye.longDateFormat=wI;Ye.invalidDate=SI;Ye.ordinal=kI;Ye.preparse=Vb;Ye.postformat=Vb;Ye.relativeTime=TI;Ye.pastFuture=NI;Ye.set=pI;Ye.eras=rF;Ye.erasParse=sF;Ye.erasConvertYear=oF;Ye.erasAbbrRegex=dF;Ye.erasNameRegex=uF;Ye.erasNarrowRegex=fF;Ye.months=BI;Ye.monthsShort=HI;Ye.monthsParse=KI;Ye.monthsRegex=QI;Ye.monthsShortRegex=qI;Ye.week=JI;Ye.firstDayOfYear=n2;Ye.firstDayOfWeek=t2;Ye.weekdays=f2;Ye.weekdaysMin=p2;Ye.weekdaysShort=h2;Ye.weekdaysParse=g2;Ye.weekdaysRegex=w2;Ye.weekdaysShortRegex=_2;Ye.weekdaysMinRegex=S2;Ye.isPM=C2;Ye.meridiem=T2;function qu(e,t,n,r){var s=hs(),o=Dr().set(r,t);return s[n](o,e)}function zb(e,t,n){if(is(e)&&(t=e,e=void 0),e=e||"",t!=null)return qu(e,t,n,"month");var r,s=[];for(r=0;r<12;r++)s[r]=qu(e,r,n,"month");return s}function Kg(e,t,n,r){typeof e=="boolean"?(is(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,is(t)&&(n=t,t=void 0),t=t||"");var s=hs(),o=e?s._week.dow:0,i,a=[];if(n!=null)return qu(t,(n+o)%7,r,"day");for(i=0;i<7;i++)a[i]=qu(t,(i+o)%7,r,"day");return a}function DF(e,t){return zb(e,t,"months")}function MF(e,t){return zb(e,t,"monthsShort")}function OF(e,t,n){return Kg(e,t,n,"weekdays")}function AF(e,t,n){return Kg(e,t,n,"weekdaysShort")}function IF(e,t,n){return Kg(e,t,n,"weekdaysMin")}Ws("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,n=Oe(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});te.lang=Bn("moment.lang is deprecated. Use moment.locale instead.",Ws);te.langData=Bn("moment.langData is deprecated. Use moment.localeData instead.",hs);var Ir=Math.abs;function LF(){var e=this._data;return this._milliseconds=Ir(this._milliseconds),this._days=Ir(this._days),this._months=Ir(this._months),e.milliseconds=Ir(e.milliseconds),e.seconds=Ir(e.seconds),e.minutes=Ir(e.minutes),e.hours=Ir(e.hours),e.months=Ir(e.months),e.years=Ir(e.years),this}function Wb(e,t,n,r){var s=pr(t,n);return e._milliseconds+=r*s._milliseconds,e._days+=r*s._days,e._months+=r*s._months,e._bubble()}function FF(e,t){return Wb(this,e,t,1)}function UF(e,t){return Wb(this,e,t,-1)}function Ix(e){return e<0?Math.floor(e):Math.ceil(e)}function $F(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,s,o,i,a,l;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Ix(kp(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,s=Un(e/1e3),r.seconds=s%60,o=Un(s/60),r.minutes=o%60,i=Un(o/60),r.hours=i%24,t+=Un(i/24),l=Un(Yb(t)),n+=l,t-=Ix(kp(l)),a=Un(n/12),n%=12,r.days=t,r.months=n,r.years=a,this}function Yb(e){return e*4800/146097}function kp(e){return e*146097/4800}function VF(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=Hn(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+Yb(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(kp(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function ps(e){return function(){return this.as(e)}}var Bb=ps("ms"),zF=ps("s"),WF=ps("m"),YF=ps("h"),BF=ps("d"),HF=ps("w"),GF=ps("M"),KF=ps("Q"),ZF=ps("y"),qF=Bb;function QF(){return pr(this)}function XF(e){return e=Hn(e),this.isValid()?this[e+"s"]():NaN}function zo(e){return function(){return this.isValid()?this._data[e]:NaN}}var JF=zo("milliseconds"),e4=zo("seconds"),t4=zo("minutes"),n4=zo("hours"),r4=zo("days"),s4=zo("months"),o4=zo("years");function i4(){return Un(this.days()/7)}var Vr=Math.round,mi={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function a4(e,t,n,r,s){return s.relativeTime(t||1,!!n,e,r)}function l4(e,t,n,r){var s=pr(e).abs(),o=Vr(s.as("s")),i=Vr(s.as("m")),a=Vr(s.as("h")),l=Vr(s.as("d")),u=Vr(s.as("M")),d=Vr(s.as("w")),f=Vr(s.as("y")),p=o<=n.ss&&["s",o]||o0,p[4]=r,a4.apply(null,p)}function c4(e){return e===void 0?Vr:typeof e=="function"?(Vr=e,!0):!1}function u4(e,t){return mi[e]===void 0?!1:t===void 0?mi[e]:(mi[e]=t,e==="s"&&(mi.ss=t-1),!0)}function d4(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=mi,s,o;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},mi,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),s=this.localeData(),o=l4(this,!n,r,s),n&&(o=s.pastFuture(+this,o)),s.postformat(o)}var ih=Math.abs;function Xo(e){return(e>0)-(e<0)||+e}function Jd(){if(!this.isValid())return this.localeData().invalidDate();var e=ih(this._milliseconds)/1e3,t=ih(this._days),n=ih(this._months),r,s,o,i,a=this.asSeconds(),l,u,d,f;return a?(r=Un(e/60),s=Un(r/60),e%=60,r%=60,o=Un(n/12),n%=12,i=e?e.toFixed(3).replace(/\.?0+$/,""):"",l=a<0?"-":"",u=Xo(this._months)!==Xo(a)?"-":"",d=Xo(this._days)!==Xo(a)?"-":"",f=Xo(this._milliseconds)!==Xo(a)?"-":"",l+"P"+(o?u+o+"Y":"")+(n?u+n+"M":"")+(t?d+t+"D":"")+(s||r||e?"T":"")+(s?f+s+"H":"")+(r?f+r+"M":"")+(e?f+i+"S":"")):"P0D"}var Fe=Qd.prototype;Fe.isValid=sL;Fe.abs=LF;Fe.add=FF;Fe.subtract=UF;Fe.as=VF;Fe.asMilliseconds=Bb;Fe.asSeconds=zF;Fe.asMinutes=WF;Fe.asHours=YF;Fe.asDays=BF;Fe.asWeeks=HF;Fe.asMonths=GF;Fe.asQuarters=KF;Fe.asYears=ZF;Fe.valueOf=qF;Fe._bubble=$F;Fe.clone=QF;Fe.get=XF;Fe.milliseconds=JF;Fe.seconds=e4;Fe.minutes=t4;Fe.hours=n4;Fe.days=r4;Fe.weeks=i4;Fe.months=s4;Fe.years=o4;Fe.humanize=d4;Fe.toISOString=Jd;Fe.toString=Jd;Fe.toJSON=Jd;Fe.locale=Db;Fe.localeData=Ob;Fe.toIsoString=Bn("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Jd);Fe.lang=Mb;he("X",0,0,"unix");he("x",0,0,"valueOf");oe("x",Gd);oe("X",DI);nt("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});nt("x",function(e,t,n){n._d=new Date(Oe(e))});//! moment.js +te.version="2.30.1";fI(dt);te.fn=z;te.min=eL;te.max=tL;te.now=nL;te.utc=Dr;te.unix=PF;te.months=DF;te.isDate=Zl;te.locale=Ws;te.invalid=Wd;te.duration=pr;te.isMoment=ur;te.weekdays=OF;te.parseZone=jF;te.localeData=hs;te.isDuration=au;te.monthsShort=MF;te.weekdaysMin=IF;te.defineLocale=$g;te.updateLocale=j2;te.locales=D2;te.weekdaysShort=AF;te.normalizeUnits=Hn;te.relativeTimeRounding=c4;te.relativeTimeThreshold=u4;te.calendarFormat=TL;te.prototype=z;te.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 f4=async()=>await qt().collection("access").getFullList({sort:"-created",filter:"deleted = null"}),Zg=async e=>e.id?await qt().collection("access").update(e.id,e):await qt().collection("access").create(e),h4=async e=>(e.deleted=te.utc().format("YYYY-MM-DD HH:mm:ss"),await qt().collection("access").update(e.id,e)),p4=(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(n=>n.id!==t.payload)};case"UPDATE_ACCESS":return{...e,accesses:e.accesses.map(n=>n.id===t.payload.id?t.payload:n)};default:return e}},Hb=h.createContext({}),Jl=()=>h.useContext(Hb),m4=({children:e})=>{const[t,n]=h.useReducer(p4,{accesses:[]});h.useEffect(()=>{(async()=>{const a=await f4();n({type:"SET_ACCESSES",payload:a})})()},[]);const r=h.useCallback(i=>{n({type:"DELETE_ACCESS",payload:i})},[]),s=h.useCallback(i=>{n({type:"ADD_ACCESS",payload:i})},[]),o=h.useCallback(i=>{n({type:"UPDATE_ACCESS",payload:i})},[]);return c.jsx(Hb.Provider,{value:{config:{accesses:t.accesses},deleteAccess:r,addAccess:s,updateAccess:o},children:e&&e})};function g4(){const e=so(),t=ro();if(!qt().authStore.isValid||!qt().authStore.isAdmin)return c.jsx(M_,{to:"/login"});const n=t.pathname,r=o=>(console.log(n),o==n?"bg-muted text-primary":"text-muted-foreground"),s=()=>{qt().authStore.clear(),e("/login")};return c.jsx(c.Fragment,{children:c.jsx(m4,{children:c.jsxs("div",{className:"grid min-h-screen w-full md:grid-cols-[220px_1fr] lg:grid-cols-[280px_1fr]",children:[c.jsx("div",{className:"hidden border-r bg-muted/40 md:block",children:c.jsxs("div",{className:"flex h-full max-h-screen flex-col gap-2",children:[c.jsx("div",{className:"flex h-14 items-center border-b px-4 lg:h-[60px] lg:px-6",children:c.jsxs(Fr,{to:"/",className:"flex items-center gap-2 font-semibold",children:[c.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),c.jsx("span",{className:"",children:"Certimate"})]})}),c.jsx("div",{className:"flex-1",children:c.jsxs("nav",{className:"grid items-start px-2 text-sm font-medium lg:px-4",children:[c.jsxs(Fr,{to:"/",className:ae("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",r("/")),children:[c.jsx(up,{className:"h-4 w-4"}),"域名列表"]}),c.jsxs(Fr,{to:"/access",className:ae("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",r("/access")),children:[c.jsx(tx,{className:"h-4 w-4"}),"授权管理"]}),c.jsxs(Fr,{to:"/history",className:ae("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",r("/history")),children:[c.jsx(Jy,{className:"h-4 w-4"}),"部署历史"]})]})})]})}),c.jsxs("div",{className:"flex flex-col",children:[c.jsxs("header",{className:"flex h-14 items-center gap-4 border-b bg-muted/40 px-4 lg:h-[60px] lg:px-6",children:[c.jsxs(H1,{children:[c.jsx(G1,{asChild:!0,children:c.jsxs(jt,{variant:"outline",size:"icon",className:"shrink-0 md:hidden",children:[c.jsx(dj,{className:"h-5 w-5"}),c.jsx("span",{className:"sr-only",children:"Toggle navigation menu"})]})}),c.jsx(kg,{side:"left",className:"flex flex-col",children:c.jsxs("nav",{className:"grid gap-2 text-lg font-medium",children:[c.jsxs(Fr,{to:"/",className:"flex items-center gap-2 text-lg font-semibold",children:[c.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),c.jsx("span",{className:"",children:"Certimate"}),c.jsx("span",{className:"sr-only",children:"Certimate"})]}),c.jsxs(Fr,{to:"/",className:ae("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",r("/")),children:[c.jsx(up,{className:"h-5 w-5"}),"域名列表"]}),c.jsxs(Fr,{to:"/access",className:ae("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",r("/dns_provider")),children:[c.jsx(tx,{className:"h-5 w-5"}),"授权管理"]}),c.jsxs(Fr,{to:"/history",className:ae("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",r("/history")),children:[c.jsx(Jy,{className:"h-5 w-5"}),"部署历史"]})]})})]}),c.jsx("div",{className:"w-full flex-1"}),c.jsxs(DA,{children:[c.jsx(MA,{asChild:!0,children:c.jsxs(jt,{variant:"secondary",size:"icon",className:"rounded-full",children:[c.jsx(cj,{className:"h-5 w-5"}),c.jsx("span",{className:"sr-only",children:"Toggle user menu"})]})}),c.jsxs(k1,{align:"end",children:[c.jsx(T1,{children:"My Account"}),c.jsx(N1,{}),c.jsx(E1,{onClick:s,children:"Logout"})]})]})]}),c.jsx("main",{className:"flex flex-1 flex-col gap-4 p-4 lg:gap-6 lg:p-6",children:c.jsx(O_,{})})]})]})})})}var v4="Separator",Lx="horizontal",y4=["horizontal","vertical"],Gb=h.forwardRef((e,t)=>{const{decorative:n,orientation:r=Lx,...s}=e,o=x4(r)?r:Lx,a=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return c.jsx(we.div,{"data-orientation":o,...a,...s,ref:t})});Gb.displayName=v4;function x4(e){return y4.includes(e)}var Kb=Gb;const Wt=h.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},s)=>c.jsx(Kb,{ref:s,decorative:n,orientation:t,className:ae("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));Wt.displayName=Kb.displayName;const Zb=({phase:e,phaseSuccess:t})=>{let n=c.jsx(c.Fragment,{children:" "});return e==="check"&&(t?n=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),c.jsx(Wt,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"获取"}),c.jsx(Wt,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]}):n=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-red-600",children:"检查 "}),c.jsx(Wt,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"获取"}),c.jsx(Wt,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]})),e==="apply"&&(t?n=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),c.jsx(Wt,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"获取"}),c.jsx(Wt,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]}):n=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),c.jsx(Wt,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-red-600",children:"获取"}),c.jsx(Wt,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]})),e==="deploy"&&(t?n=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),c.jsx(Wt,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"获取"}),c.jsx(Wt,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"部署"})]}):n=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),c.jsx(Wt,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"获取"}),c.jsx(Wt,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-red-600",children:"部署"})]})),n},w4=({when:e,children:t,fallback:n})=>e?t:n;var qb="AlertDialog",[_4,gz]=An(qb,[P1]),ms=P1(),Qb=e=>{const{__scopeAlertDialog:t,...n}=e,r=ms(t);return c.jsx(Sg,{...r,...n,modal:!0})};Qb.displayName=qb;var S4="AlertDialogTrigger",Xb=h.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=ms(n);return c.jsx(bg,{...s,...r,ref:t})});Xb.displayName=S4;var b4="AlertDialogPortal",Jb=e=>{const{__scopeAlertDialog:t,...n}=e,r=ms(t);return c.jsx(Cg,{...r,...n})};Jb.displayName=b4;var C4="AlertDialogOverlay",eC=h.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=ms(n);return c.jsx(Bl,{...s,...r,ref:t})});eC.displayName=C4;var Pi="AlertDialogContent",[k4,E4]=_4(Pi),tC=h.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...s}=e,o=ms(n),i=h.useRef(null),a=Ae(t,i),l=h.useRef(null);return c.jsx(WA,{contentName:Pi,titleName:nC,docsSlug:"alert-dialog",children:c.jsx(k4,{scope:n,cancelRef:l,children:c.jsxs(Hl,{role:"alertdialog",...o,...s,ref:a,onOpenAutoFocus:X(s.onOpenAutoFocus,u=>{var d;u.preventDefault(),(d=l.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[c.jsx(Bm,{children:r}),c.jsx(N4,{contentRef:i})]})})})});tC.displayName=Pi;var nC="AlertDialogTitle",rC=h.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=ms(n);return c.jsx(Gl,{...s,...r,ref:t})});rC.displayName=nC;var sC="AlertDialogDescription",oC=h.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=ms(n);return c.jsx(Kl,{...s,...r,ref:t})});oC.displayName=sC;var T4="AlertDialogAction",iC=h.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=ms(n);return c.jsx(zd,{...s,...r,ref:t})});iC.displayName=T4;var aC="AlertDialogCancel",lC=h.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:s}=E4(aC,n),o=ms(n),i=Ae(t,s);return c.jsx(zd,{...o,...r,ref:i})});lC.displayName=aC;var N4=({contentRef:e})=>{const t=`\`${Pi}\` requires a description for the component to be accessible for screen reader users. + +You can add a description to the \`${Pi}\` by passing a \`${sC}\` 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 \`${Pi}\`. 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 h.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},R4=Qb,P4=Xb,j4=Jb,cC=eC,uC=tC,dC=iC,fC=lC,hC=rC,pC=oC;const D4=R4,M4=P4,O4=j4,mC=h.forwardRef(({className:e,...t},n)=>c.jsx(cC,{className:ae("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:n}));mC.displayName=cC.displayName;const gC=h.forwardRef(({className:e,...t},n)=>c.jsxs(O4,{children:[c.jsx(mC,{}),c.jsx(uC,{ref:n,className:ae("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})]}));gC.displayName=uC.displayName;const vC=({className:e,...t})=>c.jsx("div",{className:ae("flex flex-col space-y-2 text-center sm:text-left",e),...t});vC.displayName="AlertDialogHeader";const yC=({className:e,...t})=>c.jsx("div",{className:ae("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});yC.displayName="AlertDialogFooter";const xC=h.forwardRef(({className:e,...t},n)=>c.jsx(hC,{ref:n,className:ae("text-lg font-semibold",e),...t}));xC.displayName=hC.displayName;const wC=h.forwardRef(({className:e,...t},n)=>c.jsx(pC,{ref:n,className:ae("text-sm text-muted-foreground",e),...t}));wC.displayName=pC.displayName;const _C=h.forwardRef(({className:e,...t},n)=>c.jsx(dC,{ref:n,className:ae(Gm(),e),...t}));_C.displayName=dC.displayName;const SC=h.forwardRef(({className:e,...t},n)=>c.jsx(fC,{ref:n,className:ae(Gm({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));SC.displayName=fC.displayName;function qg(e){const t=h.useRef({value:e,previous:e});return h.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Qg="Switch",[A4,vz]=An(Qg),[I4,L4]=A4(Qg),bC=h.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:s,defaultChecked:o,required:i,disabled:a,value:l="on",onCheckedChange:u,...d}=e,[f,p]=h.useState(null),x=Ae(t,m=>p(m)),g=h.useRef(!1),v=f?!!f.closest("form"):!0,[_=!1,y]=rs({prop:s,defaultProp:o,onChange:u});return c.jsxs(I4,{scope:n,checked:_,disabled:a,children:[c.jsx(we.button,{type:"button",role:"switch","aria-checked":_,"aria-required":i,"data-state":EC(_),"data-disabled":a?"":void 0,disabled:a,value:l,...d,ref:x,onClick:X(e.onClick,m=>{y(w=>!w),v&&(g.current=m.isPropagationStopped(),g.current||m.stopPropagation())})}),v&&c.jsx(F4,{control:f,bubbles:!g.current,name:r,value:l,checked:_,required:i,disabled:a,style:{transform:"translateX(-100%)"}})]})});bC.displayName=Qg;var CC="SwitchThumb",kC=h.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,s=L4(CC,n);return c.jsx(we.span,{"data-state":EC(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t})});kC.displayName=CC;var F4=e=>{const{control:t,checked:n,bubbles:r=!0,...s}=e,o=h.useRef(null),i=qg(n),a=ng(t);return h.useEffect(()=>{const l=o.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(i!==n&&f){const p=new Event("click",{bubbles:r});f.call(l,n),l.dispatchEvent(p)}},[i,n,r]),c.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:o,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function EC(e){return e?"checked":"unchecked"}var TC=bC,U4=kC;const NC=h.forwardRef(({className:e,...t},n)=>c.jsx(TC,{className:ae("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:n,children:c.jsx(U4,{className:ae("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")})}));NC.displayName=TC.displayName;var $4="VisuallyHidden",ec=h.forwardRef((e,t)=>c.jsx(we.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}}));ec.displayName=$4;var V4=ec,Xg="ToastProvider",[Jg,z4,W4]=jd("Toast"),[RC,yz]=An("Toast",[W4]),[Y4,ef]=RC(Xg),PC=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:o=50,children:i}=e,[a,l]=h.useState(null),[u,d]=h.useState(0),f=h.useRef(!1),p=h.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Xg}\`. Expected non-empty \`string\`.`),c.jsx(Jg.Provider,{scope:t,children:c.jsx(Y4,{scope:t,label:n,duration:r,swipeDirection:s,swipeThreshold:o,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:h.useCallback(()=>d(x=>x+1),[]),onToastRemove:h.useCallback(()=>d(x=>x-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:p,children:i})})};PC.displayName=Xg;var jC="ToastViewport",B4=["F8"],Ep="toast.viewportPause",Tp="toast.viewportResume",DC=h.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=B4,label:s="Notifications ({hotkey})",...o}=e,i=ef(jC,n),a=z4(n),l=h.useRef(null),u=h.useRef(null),d=h.useRef(null),f=h.useRef(null),p=Ae(t,f,i.onViewportChange),x=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),g=i.toastCount>0;h.useEffect(()=>{const _=y=>{var w;r.every(b=>y[b]||y.code===b)&&((w=f.current)==null||w.focus())};return document.addEventListener("keydown",_),()=>document.removeEventListener("keydown",_)},[r]),h.useEffect(()=>{const _=l.current,y=f.current;if(g&&_&&y){const m=()=>{if(!i.isClosePausedRef.current){const S=new CustomEvent(Ep);y.dispatchEvent(S),i.isClosePausedRef.current=!0}},w=()=>{if(i.isClosePausedRef.current){const S=new CustomEvent(Tp);y.dispatchEvent(S),i.isClosePausedRef.current=!1}},b=S=>{!_.contains(S.relatedTarget)&&w()},C=()=>{_.contains(document.activeElement)||w()};return _.addEventListener("focusin",m),_.addEventListener("focusout",b),_.addEventListener("pointermove",m),_.addEventListener("pointerleave",C),window.addEventListener("blur",m),window.addEventListener("focus",w),()=>{_.removeEventListener("focusin",m),_.removeEventListener("focusout",b),_.removeEventListener("pointermove",m),_.removeEventListener("pointerleave",C),window.removeEventListener("blur",m),window.removeEventListener("focus",w)}}},[g,i.isClosePausedRef]);const v=h.useCallback(({tabbingDirection:_})=>{const m=a().map(w=>{const b=w.ref.current,C=[b,...sU(b)];return _==="forwards"?C:C.reverse()});return(_==="forwards"?m.reverse():m).flat()},[a]);return h.useEffect(()=>{const _=f.current;if(_){const y=m=>{var C,S,N;const w=m.altKey||m.ctrlKey||m.metaKey;if(m.key==="Tab"&&!w){const R=document.activeElement,F=m.shiftKey;if(m.target===_&&F){(C=u.current)==null||C.focus();return}const M=v({tabbingDirection:F?"backwards":"forwards"}),B=M.findIndex(A=>A===R);ah(M.slice(B+1))?m.preventDefault():F?(S=u.current)==null||S.focus():(N=d.current)==null||N.focus()}};return _.addEventListener("keydown",y),()=>_.removeEventListener("keydown",y)}},[a,v]),c.jsxs(uD,{ref:l,role:"region","aria-label":s.replace("{hotkey}",x),tabIndex:-1,style:{pointerEvents:g?void 0:"none"},children:[g&&c.jsx(Np,{ref:u,onFocusFromOutsideViewport:()=>{const _=v({tabbingDirection:"forwards"});ah(_)}}),c.jsx(Jg.Slot,{scope:n,children:c.jsx(we.ol,{tabIndex:-1,...o,ref:p})}),g&&c.jsx(Np,{ref:d,onFocusFromOutsideViewport:()=>{const _=v({tabbingDirection:"backwards"});ah(_)}})]})});DC.displayName=jC;var MC="ToastFocusProxy",Np=h.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=e,o=ef(MC,n);return c.jsx(ec,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:i=>{var u;const a=i.relatedTarget;!((u=o.viewport)!=null&&u.contains(a))&&r()}})});Np.displayName=MC;var tf="Toast",H4="toast.swipeStart",G4="toast.swipeMove",K4="toast.swipeCancel",Z4="toast.swipeEnd",OC=h.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:o,...i}=e,[a=!0,l]=rs({prop:r,defaultProp:s,onChange:o});return c.jsx(fr,{present:n||a,children:c.jsx(X4,{open:a,...i,ref:t,onClose:()=>l(!1),onPause:Jt(e.onPause),onResume:Jt(e.onResume),onSwipeStart:X(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:X(e.onSwipeMove,u=>{const{x:d,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:X(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:X(e.onSwipeEnd,u=>{const{x:d,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),l(!1)})})})});OC.displayName=tf;var[q4,Q4]=RC(tf,{onClose(){}}),X4=h.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:o,onClose:i,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:p,onSwipeEnd:x,...g}=e,v=ef(tf,n),[_,y]=h.useState(null),m=Ae(t,A=>y(A)),w=h.useRef(null),b=h.useRef(null),C=s||v.duration,S=h.useRef(0),N=h.useRef(C),R=h.useRef(0),{onToastAdd:F,onToastRemove:L}=v,Z=Jt(()=>{var H;(_==null?void 0:_.contains(document.activeElement))&&((H=v.viewport)==null||H.focus()),i()}),M=h.useCallback(A=>{!A||A===1/0||(window.clearTimeout(R.current),S.current=new Date().getTime(),R.current=window.setTimeout(Z,A))},[Z]);h.useEffect(()=>{const A=v.viewport;if(A){const H=()=>{M(N.current),u==null||u()},ne=()=>{const W=new Date().getTime()-S.current;N.current=N.current-W,window.clearTimeout(R.current),l==null||l()};return A.addEventListener(Ep,ne),A.addEventListener(Tp,H),()=>{A.removeEventListener(Ep,ne),A.removeEventListener(Tp,H)}}},[v.viewport,C,l,u,M]),h.useEffect(()=>{o&&!v.isClosePausedRef.current&&M(C)},[o,C,v.isClosePausedRef,M]),h.useEffect(()=>(F(),()=>L()),[F,L]);const B=h.useMemo(()=>_?VC(_):null,[_]);return v.viewport?c.jsxs(c.Fragment,{children:[B&&c.jsx(J4,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:B}),c.jsx(q4,{scope:n,onClose:Z,children:cs.createPortal(c.jsx(Jg.ItemSlot,{scope:n,children:c.jsx(cD,{asChild:!0,onEscapeKeyDown:X(a,()=>{v.isFocusedToastEscapeKeyDownRef.current||Z(),v.isFocusedToastEscapeKeyDownRef.current=!1}),children:c.jsx(we.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":v.swipeDirection,...g,ref:m,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:X(e.onKeyDown,A=>{A.key==="Escape"&&(a==null||a(A.nativeEvent),A.nativeEvent.defaultPrevented||(v.isFocusedToastEscapeKeyDownRef.current=!0,Z()))}),onPointerDown:X(e.onPointerDown,A=>{A.button===0&&(w.current={x:A.clientX,y:A.clientY})}),onPointerMove:X(e.onPointerMove,A=>{if(!w.current)return;const H=A.clientX-w.current.x,ne=A.clientY-w.current.y,W=!!b.current,I=["left","right"].includes(v.swipeDirection),D=["left","up"].includes(v.swipeDirection)?Math.min:Math.max,q=I?D(0,H):0,le=I?0:D(0,ne),me=A.pointerType==="touch"?10:2,rt={x:q,y:le},Pe={originalEvent:A,delta:rt};W?(b.current=rt,zc(G4,f,Pe,{discrete:!1})):Fx(rt,v.swipeDirection,me)?(b.current=rt,zc(H4,d,Pe,{discrete:!1}),A.target.setPointerCapture(A.pointerId)):(Math.abs(H)>me||Math.abs(ne)>me)&&(w.current=null)}),onPointerUp:X(e.onPointerUp,A=>{const H=b.current,ne=A.target;if(ne.hasPointerCapture(A.pointerId)&&ne.releasePointerCapture(A.pointerId),b.current=null,w.current=null,H){const W=A.currentTarget,I={originalEvent:A,delta:H};Fx(H,v.swipeDirection,v.swipeThreshold)?zc(Z4,x,I,{discrete:!0}):zc(K4,p,I,{discrete:!0}),W.addEventListener("click",D=>D.preventDefault(),{once:!0})}})})})}),v.viewport)})]}):null}),J4=e=>{const{__scopeToast:t,children:n,...r}=e,s=ef(tf,t),[o,i]=h.useState(!1),[a,l]=h.useState(!1);return nU(()=>i(!0)),h.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:c.jsx(zl,{asChild:!0,children:c.jsx(ec,{...r,children:o&&c.jsxs(c.Fragment,{children:[s.label," ",n]})})})},eU="ToastTitle",AC=h.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return c.jsx(we.div,{...r,ref:t})});AC.displayName=eU;var tU="ToastDescription",IC=h.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return c.jsx(we.div,{...r,ref:t})});IC.displayName=tU;var LC="ToastAction",FC=h.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?c.jsx($C,{altText:n,asChild:!0,children:c.jsx(ev,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${LC}\`. Expected non-empty \`string\`.`),null)});FC.displayName=LC;var UC="ToastClose",ev=h.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,s=Q4(UC,n);return c.jsx($C,{asChild:!0,children:c.jsx(we.button,{type:"button",...r,ref:t,onClick:X(e.onClick,s.onClose)})})});ev.displayName=UC;var $C=h.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...s}=e;return c.jsx(we.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:t})});function VC(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),rU(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",o=r.dataset.radixToastAnnounceExclude==="";if(!s)if(o){const i=r.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...VC(r))}}),t}function zc(e,t,n,{discrete:r}){const s=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?Km(s,o):s.dispatchEvent(o)}var Fx=(e,t,n=0)=>{const r=Math.abs(e.x),s=Math.abs(e.y),o=r>s;return t==="left"||t==="right"?o&&r>n:!o&&s>n};function nU(e=()=>{}){const t=Jt(e);en(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function rU(e){return e.nodeType===e.ELEMENT_NODE}function sU(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ah(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var oU=PC,zC=DC,WC=OC,YC=AC,BC=IC,HC=FC,GC=ev;const iU=oU,KC=h.forwardRef(({className:e,...t},n)=>c.jsx(zC,{ref:n,className:ae("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}));KC.displayName=zC.displayName;const aU=$l("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"}}),ZC=h.forwardRef(({className:e,variant:t,...n},r)=>c.jsx(WC,{ref:r,className:ae(aU({variant:t}),e),...n}));ZC.displayName=WC.displayName;const lU=h.forwardRef(({className:e,...t},n)=>c.jsx(HC,{ref:n,className:ae("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}));lU.displayName=HC.displayName;const qC=h.forwardRef(({className:e,...t},n)=>c.jsx(GC,{ref:n,className:ae("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:c.jsx(Ym,{className:"h-4 w-4"})}));qC.displayName=GC.displayName;const QC=h.forwardRef(({className:e,...t},n)=>c.jsx(YC,{ref:n,className:ae("text-sm font-semibold",e),...t}));QC.displayName=YC.displayName;const XC=h.forwardRef(({className:e,...t},n)=>c.jsx(BC,{ref:n,className:ae("text-sm opacity-90",e),...t}));XC.displayName=BC.displayName;const cU=1,uU=1e6;let lh=0;function dU(){return lh=(lh+1)%Number.MAX_SAFE_INTEGER,lh.toString()}const ch=new Map,Ux=e=>{if(ch.has(e))return;const t=setTimeout(()=>{ch.delete(e),Va({type:"REMOVE_TOAST",toastId:e})},uU);ch.set(e,t)},fU=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,cU)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?Ux(n):e.toasts.forEach(r=>{Ux(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},cu=[];let uu={toasts:[]};function Va(e){uu=fU(uu,e),cu.forEach(t=>{t(uu)})}function hU({...e}){const t=dU(),n=s=>Va({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>Va({type:"DISMISS_TOAST",toastId:t});return Va({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function tv(){const[e,t]=h.useState(uu);return h.useEffect(()=>(cu.push(t),()=>{const n=cu.indexOf(t);n>-1&&cu.splice(n,1)}),[e]),{...e,toast:hU,dismiss:n=>Va({type:"DISMISS_TOAST",toastId:n})}}function JC(){const{toasts:e}=tv();return c.jsxs(iU,{children:[e.map(function({id:t,title:n,description:r,action:s,...o}){return c.jsxs(ZC,{...o,children:[c.jsxs("div",{className:"grid gap-1",children:[n&&c.jsx(QC,{children:n}),r&&c.jsx(XC,{children:r})]}),s,c.jsx(qC,{})]},t)}),c.jsx(KC,{})]})}var[nf,xz]=An("Tooltip",[Ji]),rf=Ji(),ek="TooltipProvider",pU=700,Rp="tooltip.open",[mU,nv]=nf(ek),tk=e=>{const{__scopeTooltip:t,delayDuration:n=pU,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:o}=e,[i,a]=h.useState(!0),l=h.useRef(!1),u=h.useRef(0);return h.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),c.jsx(mU,{scope:t,isOpenDelayed:i,delayDuration:n,onOpen:h.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:h.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:h.useCallback(d=>{l.current=d},[]),disableHoverableContent:s,children:o})};tk.displayName=ek;var sf="Tooltip",[gU,of]=nf(sf),nk=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:s=!1,onOpenChange:o,disableHoverableContent:i,delayDuration:a}=e,l=nv(sf,e.__scopeTooltip),u=rf(t),[d,f]=h.useState(null),p=Er(),x=h.useRef(0),g=i??l.disableHoverableContent,v=a??l.delayDuration,_=h.useRef(!1),[y=!1,m]=rs({prop:r,defaultProp:s,onChange:N=>{N?(l.onOpen(),document.dispatchEvent(new CustomEvent(Rp))):l.onClose(),o==null||o(N)}}),w=h.useMemo(()=>y?_.current?"delayed-open":"instant-open":"closed",[y]),b=h.useCallback(()=>{window.clearTimeout(x.current),_.current=!1,m(!0)},[m]),C=h.useCallback(()=>{window.clearTimeout(x.current),m(!1)},[m]),S=h.useCallback(()=>{window.clearTimeout(x.current),x.current=window.setTimeout(()=>{_.current=!0,m(!0)},v)},[v,m]);return h.useEffect(()=>()=>window.clearTimeout(x.current),[]),c.jsx(og,{...u,children:c.jsx(gU,{scope:t,contentId:p,open:y,stateAttribute:w,trigger:d,onTriggerChange:f,onTriggerEnter:h.useCallback(()=>{l.isOpenDelayed?S():b()},[l.isOpenDelayed,S,b]),onTriggerLeave:h.useCallback(()=>{g?C():window.clearTimeout(x.current)},[C,g]),onOpen:b,onClose:C,disableHoverableContent:g,children:n})})};nk.displayName=sf;var Pp="TooltipTrigger",rk=h.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=of(Pp,n),o=nv(Pp,n),i=rf(n),a=h.useRef(null),l=Ae(t,a,s.onTriggerChange),u=h.useRef(!1),d=h.useRef(!1),f=h.useCallback(()=>u.current=!1,[]);return h.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),c.jsx(ig,{asChild:!0,...i,children:c.jsx(we.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:l,onPointerMove:X(e.onPointerMove,p=>{p.pointerType!=="touch"&&!d.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:X(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:X(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:X(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:X(e.onBlur,s.onClose),onClick:X(e.onClick,s.onClose)})})});rk.displayName=Pp;var vU="TooltipPortal",[wz,yU]=nf(vU,{forceMount:void 0}),$i="TooltipContent",rv=h.forwardRef((e,t)=>{const n=yU($i,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...o}=e,i=of($i,e.__scopeTooltip);return c.jsx(fr,{present:r||i.open,children:i.disableHoverableContent?c.jsx(sk,{side:s,...o,ref:t}):c.jsx(xU,{side:s,...o,ref:t})})}),xU=h.forwardRef((e,t)=>{const n=of($i,e.__scopeTooltip),r=nv($i,e.__scopeTooltip),s=h.useRef(null),o=Ae(t,s),[i,a]=h.useState(null),{trigger:l,onClose:u}=n,d=s.current,{onPointerInTransitChange:f}=r,p=h.useCallback(()=>{a(null),f(!1)},[f]),x=h.useCallback((g,v)=>{const _=g.currentTarget,y={x:g.clientX,y:g.clientY},m=bU(y,_.getBoundingClientRect()),w=CU(y,m),b=kU(v.getBoundingClientRect()),C=TU([...w,...b]);a(C),f(!0)},[f]);return h.useEffect(()=>()=>p(),[p]),h.useEffect(()=>{if(l&&d){const g=_=>x(_,d),v=_=>x(_,l);return l.addEventListener("pointerleave",g),d.addEventListener("pointerleave",v),()=>{l.removeEventListener("pointerleave",g),d.removeEventListener("pointerleave",v)}}},[l,d,x,p]),h.useEffect(()=>{if(i){const g=v=>{const _=v.target,y={x:v.clientX,y:v.clientY},m=(l==null?void 0:l.contains(_))||(d==null?void 0:d.contains(_)),w=!EU(y,i);m?p():w&&(p(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,d,i,u,p]),c.jsx(sk,{...e,ref:o})}),[wU,_U]=nf(sf,{isInside:!1}),sk=h.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:i,...a}=e,l=of($i,n),u=rf(n),{onClose:d}=l;return h.useEffect(()=>(document.addEventListener(Rp,d),()=>document.removeEventListener(Rp,d)),[d]),h.useEffect(()=>{if(l.trigger){const f=p=>{const x=p.target;x!=null&&x.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),c.jsx(qi,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:c.jsxs(ag,{"data-state":l.stateAttribute,...u,...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:[c.jsx(Bm,{children:r}),c.jsx(wU,{scope:n,isInside:!0,children:c.jsx(V4,{id:l.contentId,role:"tooltip",children:s||r})})]})})});rv.displayName=$i;var ok="TooltipArrow",SU=h.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=rf(n);return _U(ok,n).isInside?null:c.jsx(lg,{...s,...r,ref:t})});SU.displayName=ok;function bU(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,s,o)){case o:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function CU(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function kU(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function EU(e,t){const{x:n,y:r}=e;let s=!1;for(let o=0,i=t.length-1;or!=d>r&&n<(u-a)*(r-l)/(d-l)+a&&(s=!s)}return s}function TU(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),NU(t)}function NU(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=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 n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const o=n[n.length-1],i=n[n.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var RU=nk,PU=rk,ik=rv;const jU=RU,DU=PU,MU=h.forwardRef(({className:e,sideOffset:t=4,...n},r)=>c.jsx(ik,{ref:r,sideOffset:t,className:ae("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),...n}));MU.displayName=ik.displayName;const xl=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)},OU=e=>xl(e).split(" ")[0],AU=async()=>qt().collection("domains").getFullList({sort:"-created",expand:"lastDeployment"}),IU=async e=>await qt().collection("domains").getOne(e),jp=async e=>e.id?await qt().collection("domains").update(e.id,e):await qt().collection("domains").create(e),LU=async e=>await qt().collection("domains").delete(e),FU=()=>{const e=tv(),t=so(),n=()=>{t("/edit")},r=d=>{t(`/edit?id=${d}`)},s=d=>{t(`/history?domain=${d}`)},o=async d=>{try{await LU(d),a(i.filter(f=>f.id!==d))}catch(f){console.error("Error deleting domain:",f)}},[i,a]=h.useState([]);h.useEffect(()=>{(async()=>{const f=await AU();a(f)})()},[]);const l=async d=>{const f=i.filter(v=>v.id===d),p=f[0].enabled,x=f[0];x.enabled=!p,await jp(x);const g=i.map(v=>v.id===d?{...v,checked:!p}:v);a(g)},u=async d=>{try{d.rightnow=!0;const f=await jp(d),p=i.map(x=>x.id===f.id?{...f}:x);a(p),e.toast({title:"执行成功",description:"执行成功"}),setTimeout(()=>{t(0)},1e3)}catch{e.toast({title:"执行失败",description:c.jsxs(c.Fragment,{children:["执行失败,请查看",c.jsx(Fr,{to:`/history?domain=${d.id}`,className:"underline text-blue-500",children:"部署日志"}),"查看详情。"]}),variant:"destructive"})}};return c.jsx(c.Fragment,{children:c.jsxs("div",{className:"",children:[c.jsx(JC,{}),c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsx("div",{className:"text-muted-foreground",children:"域名列表"}),c.jsx(jt,{onClick:n,children:"新增域名"})]}),i.length?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b sm:p-2 mt-5",children:[c.jsx("div",{className:"w-40",children:"域名"}),c.jsx("div",{className:"w-48",children:"有效期限"}),c.jsx("div",{className:"w-32",children:"最近执行状态"}),c.jsx("div",{className:"w-64",children:"最近执行阶段"}),c.jsx("div",{className:"w-40 sm:ml-2",children:"最近执行时间"}),c.jsx("div",{className:"w-32",children:"是否启用"}),c.jsx("div",{className:"grow",children:"操作"})]}),c.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"域名"}),i.map(d=>{var f,p,x,g,v,_;return c.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b sm:p-2 hover:bg-muted/50 text-sm",children:[c.jsx("div",{className:"sm:w-40 w-full pt-1 sm:pt-0 flex items-center",children:d.domain}),c.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:c.jsx("div",{children:d.expiredAt?c.jsxs(c.Fragment,{children:[c.jsx("div",{children:"有效期90天"}),c.jsxs("div",{children:[OU(d.expiredAt),"到期"]})]}):"---"})}),c.jsx("div",{className:"sm:w-32 w-full pt-1 sm:pt-0 flex items-center",children:d.lastDeployedAt&&((f=d.expand)!=null&&f.lastDeployment)?c.jsx(c.Fragment,{children:((p=d.expand.lastDeployment)==null?void 0:p.phase)==="deploy"&&((x=d.expand.lastDeployment)!=null&&x.phaseSuccess)?c.jsx(F_,{size:16,className:"text-green-700"}):c.jsx(U_,{size:16,className:"text-red-700"})}):"---"}),c.jsx("div",{className:"sm:w-64 w-full pt-1 sm:pt-0 flex items-center",children:d.lastDeployedAt&&((g=d.expand)!=null&&g.lastDeployment)?c.jsx(Zb,{phase:(v=d.expand.lastDeployment)==null?void 0:v.phase,phaseSuccess:(_=d.expand.lastDeployment)==null?void 0:_.phaseSuccess}):"---"}),c.jsx("div",{className:"sm:w-40 pt-1 sm:pt-0 sm:ml-2 flex items-center",children:d.lastDeployedAt?xl(d.lastDeployedAt):"---"}),c.jsx("div",{className:"sm:w-32 flex items-center",children:c.jsx(tk,{children:c.jsxs(jU,{children:[c.jsx(DU,{children:c.jsx(NC,{checked:d.enabled,onCheckedChange:()=>{l(d.id)}})}),c.jsx(rv,{children:c.jsx("div",{className:"border rounded-sm px-3 bg-background text-muted-foreground text-xs",children:d.enabled?"禁用":"启用"})})]})})}),c.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[c.jsx(jt,{variant:"link",className:"p-0",onClick:()=>s(d.id),children:"部署历史"}),c.jsxs(w4,{when:!!d.enabled,children:[c.jsx(Wt,{orientation:"vertical",className:"h-4 mx-2"}),c.jsx(jt,{variant:"link",className:"p-0",onClick:()=>u(d),children:"立即部署"})]}),!d.enabled&&c.jsxs(c.Fragment,{children:[c.jsx(Wt,{orientation:"vertical",className:"h-4 mx-2"}),c.jsxs(D4,{children:[c.jsx(M4,{asChild:!0,children:c.jsx(jt,{variant:"link",className:"p-0",children:"删除"})}),c.jsxs(gC,{children:[c.jsxs(vC,{children:[c.jsx(xC,{children:"删除域名"}),c.jsx(wC,{children:"确定要删除域名吗?"})]}),c.jsxs(yC,{children:[c.jsx(SC,{children:"取消"}),c.jsx(_C,{onClick:()=>{o(d.id)},children:"确认"})]})]})]}),c.jsx(Wt,{orientation:"vertical",className:"h-4 mx-2"}),c.jsx(jt,{variant:"link",className:"p-0",onClick:()=>r(d.id),children:"编辑"})]})]})]},d.id)})]}):c.jsx(c.Fragment,{children:c.jsxs("div",{className:"flex flex-col items-center mt-10",children:[c.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:c.jsx(up,{size:40,className:"text-primary"})}),c.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:"请添加域名开始部署证书吧。"}),c.jsx(jt,{onClick:n,className:"mt-3",children:"添加域名"})]})})]})})},ct=h.forwardRef(({className:e,type:t,...n},r)=>c.jsx("input",{type:t,className:ae("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:r,...n}));ct.displayName="Input";var tc=e=>e.type==="checkbox",gi=e=>e instanceof Date,an=e=>e==null;const ak=e=>typeof e=="object";var Lt=e=>!an(e)&&!Array.isArray(e)&&ak(e)&&!gi(e),lk=e=>Lt(e)&&e.target?tc(e.target)?e.target.checked:e.target.value:e,UU=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,ck=(e,t)=>e.has(UU(t)),$U=e=>{const t=e.constructor&&e.constructor.prototype;return Lt(t)&&t.hasOwnProperty("isPrototypeOf")},sv=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function mn(e){let t;const n=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))&&(n||Lt(e)))if(t=n?[]:{},!n&&!$U(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=mn(e[r]));else return e;return t}var af=e=>Array.isArray(e)?e.filter(Boolean):[],Et=e=>e===void 0,G=(e,t,n)=>{if(!t||!Lt(e))return n;const r=af(t.split(/[,[\].]+?/)).reduce((s,o)=>an(s)?s:s[o],e);return Et(r)||r===e?Et(e[t])?n:e[t]:r},_r=e=>typeof e=="boolean",ov=e=>/^\w*$/.test(e),uk=e=>af(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Ke=(e,t,n)=>{let r=-1;const s=ov(t)?[t]:uk(t),o=s.length,i=o-1;for(;++rMe.useContext(dk),VU=e=>{const{children:t,...n}=e;return Me.createElement(dk.Provider,{value:n},t)};var fk=(e,t,n,r=!0)=>{const s={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(s,o,{get:()=>{const i=o;return t._proxyFormState[i]!==er.all&&(t._proxyFormState[i]=!r||er.all),n&&(n[i]=!0),e[i]}});return s},bn=e=>Lt(e)&&!Object.keys(e).length,hk=(e,t,n,r)=>{n(e);const{name:s,...o}=e;return bn(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(i=>t[i]===(!r||er.all))},za=e=>Array.isArray(e)?e:[e],pk=(e,t,n)=>!e||!t||e===t||za(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function iv(e){const t=Me.useRef(e);t.current=e,Me.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function zU(e){const t=lf(),{control:n=t.control,disabled:r,name:s,exact:o}=e||{},[i,a]=Me.useState(n._formState),l=Me.useRef(!0),u=Me.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=Me.useRef(s);return d.current=s,iv({disabled:r,next:f=>l.current&&pk(d.current,f.name,o)&&hk(f,u.current,n._updateFormState)&&a({...n._formState,...f}),subject:n._subjects.state}),Me.useEffect(()=>(l.current=!0,u.current.isValid&&n._updateValid(!0),()=>{l.current=!1}),[n]),fk(i,n,u.current,!1)}var br=e=>typeof e=="string",mk=(e,t,n,r,s)=>br(e)?(r&&t.watch.add(e),G(n,e,s)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),G(n,o))):(r&&(t.watchAll=!0),n);function WU(e){const t=lf(),{control:n=t.control,name:r,defaultValue:s,disabled:o,exact:i}=e||{},a=Me.useRef(r);a.current=r,iv({disabled:o,subject:n._subjects.values,next:d=>{pk(a.current,d.name,i)&&u(mn(mk(a.current,n._names,d.values||n._formValues,!1,s)))}});const[l,u]=Me.useState(n._getWatch(r,s));return Me.useEffect(()=>n._removeUnmounted()),l}function YU(e){const t=lf(),{name:n,disabled:r,control:s=t.control,shouldUnregister:o}=e,i=ck(s._names.array,n),a=WU({control:s,name:n,defaultValue:G(s._formValues,n,G(s._defaultValues,n,e.defaultValue)),exact:!0}),l=zU({control:s,name:n}),u=Me.useRef(s.register(n,{...e.rules,value:a,..._r(e.disabled)?{disabled:e.disabled}:{}}));return Me.useEffect(()=>{const d=s._options.shouldUnregister||o,f=(p,x)=>{const g=G(s._fields,p);g&&g._f&&(g._f.mount=x)};if(f(n,!0),d){const p=mn(G(s._options.defaultValues,n));Ke(s._defaultValues,n,p),Et(G(s._formValues,n))&&Ke(s._formValues,n,p)}return()=>{(i?d&&!s._state.action:d)?s.unregister(n):f(n,!1)}},[n,s,i,o]),Me.useEffect(()=>{G(s._fields,n)&&s._updateDisabledField({disabled:r,fields:s._fields,name:n,value:G(s._fields,n)._f.value})},[r,n,s]),{field:{name:n,value:a,..._r(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:Me.useCallback(d=>u.current.onChange({target:{value:lk(d),name:n},type:Qu.CHANGE}),[n]),onBlur:Me.useCallback(()=>u.current.onBlur({target:{value:G(s._formValues,n),name:n},type:Qu.BLUR}),[n,s]),ref:d=>{const f=G(s._fields,n);f&&d&&(f._f.ref={focus:()=>d.focus(),select:()=>d.select(),setCustomValidity:p=>d.setCustomValidity(p),reportValidity:()=>d.reportValidity()})}},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!G(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!G(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!G(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!G(l.validatingFields,n)},error:{enumerable:!0,get:()=>G(l.errors,n)}})}}const BU=e=>e.render(YU(e));var gk=(e,t,n,r,s)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:s||!0}}:{},$x=e=>({isOnSubmit:!e||e===er.onSubmit,isOnBlur:e===er.onBlur,isOnChange:e===er.onChange,isOnAll:e===er.all,isOnTouch:e===er.onTouched}),Vx=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Wa=(e,t,n,r)=>{for(const s of n||Object.keys(e)){const o=G(e,s);if(o){const{_f:i,...a}=o;if(i){if(i.refs&&i.refs[0]&&t(i.refs[0],s)&&!r)break;if(i.ref&&t(i.ref,i.name)&&!r)break;Wa(a,t)}else Lt(a)&&Wa(a,t)}}};var HU=(e,t,n)=>{const r=za(G(e,n));return Ke(r,"root",t[n]),Ke(e,n,r),e},av=e=>e.type==="file",Os=e=>typeof e=="function",Xu=e=>{if(!sv)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},du=e=>br(e),lv=e=>e.type==="radio",Ju=e=>e instanceof RegExp;const zx={value:!1,isValid:!1},Wx={value:!0,isValid:!0};var vk=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Et(e[0].attributes.value)?Et(e[0].value)||e[0].value===""?Wx:{value:e[0].value,isValid:!0}:Wx:zx}return zx};const Yx={isValid:!1,value:null};var yk=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,Yx):Yx;function Bx(e,t,n="validate"){if(du(e)||Array.isArray(e)&&e.every(du)||_r(e)&&!e)return{type:n,message:du(e)?e:"",ref:t}}var Jo=e=>Lt(e)&&!Ju(e)?e:{value:e,message:""},Hx=async(e,t,n,r,s)=>{const{ref:o,refs:i,required:a,maxLength:l,minLength:u,min:d,max:f,pattern:p,validate:x,name:g,valueAsNumber:v,mount:_,disabled:y}=e._f,m=G(t,g);if(!_||y)return{};const w=i?i[0]:o,b=M=>{r&&w.reportValidity&&(w.setCustomValidity(_r(M)?"":M||""),w.reportValidity())},C={},S=lv(o),N=tc(o),R=S||N,F=(v||av(o))&&Et(o.value)&&Et(m)||Xu(o)&&o.value===""||m===""||Array.isArray(m)&&!m.length,L=gk.bind(null,g,n,C),Z=(M,B,A,H=Lr.maxLength,ne=Lr.minLength)=>{const W=M?B:A;C[g]={type:M?H:ne,message:W,ref:o,...L(M?H:ne,W)}};if(s?!Array.isArray(m)||!m.length:a&&(!R&&(F||an(m))||_r(m)&&!m||N&&!vk(i).isValid||S&&!yk(i).isValid)){const{value:M,message:B}=du(a)?{value:!!a,message:a}:Jo(a);if(M&&(C[g]={type:Lr.required,message:B,ref:w,...L(Lr.required,B)},!n))return b(B),C}if(!F&&(!an(d)||!an(f))){let M,B;const A=Jo(f),H=Jo(d);if(!an(m)&&!isNaN(m)){const ne=o.valueAsNumber||m&&+m;an(A.value)||(M=ne>A.value),an(H.value)||(B=nenew Date(new Date().toDateString()+" "+q),I=o.type=="time",D=o.type=="week";br(A.value)&&m&&(M=I?W(m)>W(A.value):D?m>A.value:ne>new Date(A.value)),br(H.value)&&m&&(B=I?W(m)+M.value,H=!an(B.value)&&m.length<+B.value;if((A||H)&&(Z(A,M.message,B.message),!n))return b(C[g].message),C}if(p&&!F&&br(m)){const{value:M,message:B}=Jo(p);if(Ju(M)&&!m.match(M)&&(C[g]={type:Lr.pattern,message:B,ref:o,...L(Lr.pattern,B)},!n))return b(B),C}if(x){if(Os(x)){const M=await x(m,t),B=Bx(M,w);if(B&&(C[g]={...B,...L(Lr.validate,B.message)},!n))return b(B.message),C}else if(Lt(x)){let M={};for(const B in x){if(!bn(M)&&!n)break;const A=Bx(await x[B](m,t),w,B);A&&(M={...A,...L(B,A.message)},b(A.message),n&&(C[g]=M))}if(!bn(M)&&(C[g]={ref:w,...M},!n))return C}}return b(!0),C};function GU(e,t){const n=t.slice(0,-1).length;let r=0;for(;r{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=[]}}},ed=e=>an(e)||!ak(e);function xo(e,t){if(ed(e)||ed(t))return e===t;if(gi(e)&&gi(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const s of n){const o=e[s];if(!r.includes(s))return!1;if(s!=="ref"){const i=t[s];if(gi(o)&&gi(i)||Lt(o)&&Lt(i)||Array.isArray(o)&&Array.isArray(i)?!xo(o,i):o!==i)return!1}}return!0}var xk=e=>e.type==="select-multiple",ZU=e=>lv(e)||tc(e),dh=e=>Xu(e)&&e.isConnected,wk=e=>{for(const t in e)if(Os(e[t]))return!0;return!1};function td(e,t={}){const n=Array.isArray(e);if(Lt(e)||n)for(const r in e)Array.isArray(e[r])||Lt(e[r])&&!wk(e[r])?(t[r]=Array.isArray(e[r])?[]:{},td(e[r],t[r])):an(e[r])||(t[r]=!0);return t}function _k(e,t,n){const r=Array.isArray(e);if(Lt(e)||r)for(const s in e)Array.isArray(e[s])||Lt(e[s])&&!wk(e[s])?Et(t)||ed(n[s])?n[s]=Array.isArray(e[s])?td(e[s],[]):{...td(e[s])}:_k(e[s],an(t)?{}:t[s],n[s]):n[s]=!xo(e[s],t[s]);return n}var Wc=(e,t)=>_k(e,t,td(t)),Sk=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Et(e)?e:t?e===""?NaN:e&&+e:n&&br(e)?new Date(e):r?r(e):e;function fh(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return av(t)?t.files:lv(t)?yk(e.refs).value:xk(t)?[...t.selectedOptions].map(({value:n})=>n):tc(t)?vk(e.refs).value:Sk(Et(t.value)?e.ref.value:t.value,e)}var qU=(e,t,n,r)=>{const s={};for(const o of e){const i=G(t,o);i&&Ke(s,o,i._f)}return{criteriaMode:n,names:[...e],fields:s,shouldUseNativeValidation:r}},_a=e=>Et(e)?e:Ju(e)?e.source:Lt(e)?Ju(e.value)?e.value.source:e.value:e,QU=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Gx(e,t,n){const r=G(e,n);if(r||ov(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const o=s.join("."),i=G(t,o),a=G(e,o);if(i&&!Array.isArray(i)&&n!==o)return{name:n};if(a&&a.type)return{name:o,error:a};s.pop()}return{name:n}}var XU=(e,t,n,r,s)=>s.isOnAll?!1:!n&&s.isOnTouch?!(t||e):(n?r.isOnBlur:s.isOnBlur)?!e:(n?r.isOnChange:s.isOnChange)?e:!0,JU=(e,t)=>!af(G(e,t)).length&&Mt(e,t);const e$={mode:er.onSubmit,reValidateMode:er.onChange,shouldFocusError:!0};function t$(e={}){let t={...e$,...e},n={submitCount:0,isDirty:!1,isLoading:Os(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},s=Lt(t.defaultValues)||Lt(t.values)?mn(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:mn(s),i={action:!1,mount:!1,watch:!1},a={mount:new Set,unMount:new Set,array:new Set,watch:new Set},l,u=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:uh(),array:uh(),state:uh()},p=$x(t.mode),x=$x(t.reValidateMode),g=t.criteriaMode===er.all,v=k=>P=>{clearTimeout(u),u=setTimeout(k,P)},_=async k=>{if(d.isValid||k){const P=t.resolver?bn((await R()).errors):await L(r,!0);P!==n.isValid&&f.state.next({isValid:P})}},y=(k,P)=>{(d.isValidating||d.validatingFields)&&((k||Array.from(a.mount)).forEach(O=>{O&&(P?Ke(n.validatingFields,O,P):Mt(n.validatingFields,O))}),f.state.next({validatingFields:n.validatingFields,isValidating:!bn(n.validatingFields)}))},m=(k,P=[],O,J,Q=!0,Y=!0)=>{if(J&&O){if(i.action=!0,Y&&Array.isArray(G(r,k))){const ue=O(G(r,k),J.argA,J.argB);Q&&Ke(r,k,ue)}if(Y&&Array.isArray(G(n.errors,k))){const ue=O(G(n.errors,k),J.argA,J.argB);Q&&Ke(n.errors,k,ue),JU(n.errors,k)}if(d.touchedFields&&Y&&Array.isArray(G(n.touchedFields,k))){const ue=O(G(n.touchedFields,k),J.argA,J.argB);Q&&Ke(n.touchedFields,k,ue)}d.dirtyFields&&(n.dirtyFields=Wc(s,o)),f.state.next({name:k,isDirty:M(k,P),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Ke(o,k,P)},w=(k,P)=>{Ke(n.errors,k,P),f.state.next({errors:n.errors})},b=k=>{n.errors=k,f.state.next({errors:n.errors,isValid:!1})},C=(k,P,O,J)=>{const Q=G(r,k);if(Q){const Y=G(o,k,Et(O)?G(s,k):O);Et(Y)||J&&J.defaultChecked||P?Ke(o,k,P?Y:fh(Q._f)):H(k,Y),i.mount&&_()}},S=(k,P,O,J,Q)=>{let Y=!1,ue=!1;const De={name:k},yt=!!(G(r,k)&&G(r,k)._f&&G(r,k)._f.disabled);if(!O||J){d.isDirty&&(ue=n.isDirty,n.isDirty=De.isDirty=M(),Y=ue!==De.isDirty);const $t=yt||xo(G(s,k),P);ue=!!(!yt&&G(n.dirtyFields,k)),$t||yt?Mt(n.dirtyFields,k):Ke(n.dirtyFields,k,!0),De.dirtyFields=n.dirtyFields,Y=Y||d.dirtyFields&&ue!==!$t}if(O){const $t=G(n.touchedFields,k);$t||(Ke(n.touchedFields,k,O),De.touchedFields=n.touchedFields,Y=Y||d.touchedFields&&$t!==O)}return Y&&Q&&f.state.next(De),Y?De:{}},N=(k,P,O,J)=>{const Q=G(n.errors,k),Y=d.isValid&&_r(P)&&n.isValid!==P;if(e.delayError&&O?(l=v(()=>w(k,O)),l(e.delayError)):(clearTimeout(u),l=null,O?Ke(n.errors,k,O):Mt(n.errors,k)),(O?!xo(Q,O):Q)||!bn(J)||Y){const ue={...J,...Y&&_r(P)?{isValid:P}:{},errors:n.errors,name:k};n={...n,...ue},f.state.next(ue)}},R=async k=>{y(k,!0);const P=await t.resolver(o,t.context,qU(k||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return y(k),P},F=async k=>{const{errors:P}=await R(k);if(k)for(const O of k){const J=G(P,O);J?Ke(n.errors,O,J):Mt(n.errors,O)}else n.errors=P;return P},L=async(k,P,O={valid:!0})=>{for(const J in k){const Q=k[J];if(Q){const{_f:Y,...ue}=Q;if(Y){const De=a.array.has(Y.name);y([J],!0);const yt=await Hx(Q,o,g,t.shouldUseNativeValidation&&!P,De);if(y([J]),yt[Y.name]&&(O.valid=!1,P))break;!P&&(G(yt,Y.name)?De?HU(n.errors,yt,Y.name):Ke(n.errors,Y.name,yt[Y.name]):Mt(n.errors,Y.name))}ue&&await L(ue,P,O)}}return O.valid},Z=()=>{for(const k of a.unMount){const P=G(r,k);P&&(P._f.refs?P._f.refs.every(O=>!dh(O)):!dh(P._f.ref))&&Ue(k)}a.unMount=new Set},M=(k,P)=>(k&&P&&Ke(o,k,P),!xo(le(),s)),B=(k,P,O)=>mk(k,a,{...i.mount?o:Et(P)?s:br(k)?{[k]:P}:P},O,P),A=k=>af(G(i.mount?o:s,k,e.shouldUnregister?G(s,k,[]):[])),H=(k,P,O={})=>{const J=G(r,k);let Q=P;if(J){const Y=J._f;Y&&(!Y.disabled&&Ke(o,k,Sk(P,Y)),Q=Xu(Y.ref)&&an(P)?"":P,xk(Y.ref)?[...Y.ref.options].forEach(ue=>ue.selected=Q.includes(ue.value)):Y.refs?tc(Y.ref)?Y.refs.length>1?Y.refs.forEach(ue=>(!ue.defaultChecked||!ue.disabled)&&(ue.checked=Array.isArray(Q)?!!Q.find(De=>De===ue.value):Q===ue.value)):Y.refs[0]&&(Y.refs[0].checked=!!Q):Y.refs.forEach(ue=>ue.checked=ue.value===Q):av(Y.ref)?Y.ref.value="":(Y.ref.value=Q,Y.ref.type||f.values.next({name:k,values:{...o}})))}(O.shouldDirty||O.shouldTouch)&&S(k,Q,O.shouldTouch,O.shouldDirty,!0),O.shouldValidate&&q(k)},ne=(k,P,O)=>{for(const J in P){const Q=P[J],Y=`${k}.${J}`,ue=G(r,Y);(a.array.has(k)||!ed(Q)||ue&&!ue._f)&&!gi(Q)?ne(Y,Q,O):H(Y,Q,O)}},W=(k,P,O={})=>{const J=G(r,k),Q=a.array.has(k),Y=mn(P);Ke(o,k,Y),Q?(f.array.next({name:k,values:{...o}}),(d.isDirty||d.dirtyFields)&&O.shouldDirty&&f.state.next({name:k,dirtyFields:Wc(s,o),isDirty:M(k,Y)})):J&&!J._f&&!an(Y)?ne(k,Y,O):H(k,Y,O),Vx(k,a)&&f.state.next({...n}),f.values.next({name:i.mount?k:void 0,values:{...o}})},I=async k=>{i.mount=!0;const P=k.target;let O=P.name,J=!0;const Q=G(r,O),Y=()=>P.type?fh(Q._f):lk(k),ue=De=>{J=Number.isNaN(De)||De===G(o,O,De)};if(Q){let De,yt;const $t=Y(),rn=k.type===Qu.BLUR||k.type===Qu.FOCUS_OUT,Gn=!QU(Q._f)&&!t.resolver&&!G(n.errors,O)&&!Q._f.deps||XU(rn,G(n.touchedFields,O),n.isSubmitted,x,p),Wo=Vx(O,a,rn);Ke(o,O,$t),rn?(Q._f.onBlur&&Q._f.onBlur(k),l&&l(0)):Q._f.onChange&&Q._f.onChange(k);const ys=S(O,$t,rn,!1),pf=!bn(ys)||Wo;if(!rn&&f.values.next({name:O,type:k.type,values:{...o}}),Gn)return d.isValid&&_(),pf&&f.state.next({name:O,...Wo?{}:ys});if(!rn&&Wo&&f.state.next({...n}),t.resolver){const{errors:Kn}=await R([O]);if(ue($t),J){const ac=Gx(n.errors,r,O),sa=Gx(Kn,r,ac.name||O);De=sa.error,O=sa.name,yt=bn(Kn)}}else y([O],!0),De=(await Hx(Q,o,g,t.shouldUseNativeValidation))[O],y([O]),ue($t),J&&(De?yt=!1:d.isValid&&(yt=await L(r,!0)));J&&(Q._f.deps&&q(Q._f.deps),N(O,yt,De,ys))}},D=(k,P)=>{if(G(n.errors,P)&&k.focus)return k.focus(),1},q=async(k,P={})=>{let O,J;const Q=za(k);if(t.resolver){const Y=await F(Et(k)?k:Q);O=bn(Y),J=k?!Q.some(ue=>G(Y,ue)):O}else k?(J=(await Promise.all(Q.map(async Y=>{const ue=G(r,Y);return await L(ue&&ue._f?{[Y]:ue}:ue)}))).every(Boolean),!(!J&&!n.isValid)&&_()):J=O=await L(r);return f.state.next({...!br(k)||d.isValid&&O!==n.isValid?{}:{name:k},...t.resolver||!k?{isValid:O}:{},errors:n.errors}),P.shouldFocus&&!J&&Wa(r,D,k?Q:a.mount),J},le=k=>{const P={...i.mount?o:s};return Et(k)?P:br(k)?G(P,k):k.map(O=>G(P,O))},me=(k,P)=>({invalid:!!G((P||n).errors,k),isDirty:!!G((P||n).dirtyFields,k),error:G((P||n).errors,k),isValidating:!!G(n.validatingFields,k),isTouched:!!G((P||n).touchedFields,k)}),rt=k=>{k&&za(k).forEach(P=>Mt(n.errors,P)),f.state.next({errors:k?n.errors:{}})},Pe=(k,P,O)=>{const J=(G(r,k,{_f:{}})._f||{}).ref,Q=G(n.errors,k)||{},{ref:Y,message:ue,type:De,...yt}=Q;Ke(n.errors,k,{...yt,...P,ref:J}),f.state.next({name:k,errors:n.errors,isValid:!1}),O&&O.shouldFocus&&J&&J.focus&&J.focus()},gt=(k,P)=>Os(k)?f.values.subscribe({next:O=>k(B(void 0,P),O)}):B(k,P,!0),Ue=(k,P={})=>{for(const O of k?za(k):a.mount)a.mount.delete(O),a.array.delete(O),P.keepValue||(Mt(r,O),Mt(o,O)),!P.keepError&&Mt(n.errors,O),!P.keepDirty&&Mt(n.dirtyFields,O),!P.keepTouched&&Mt(n.touchedFields,O),!P.keepIsValidating&&Mt(n.validatingFields,O),!t.shouldUnregister&&!P.keepDefaultValue&&Mt(s,O);f.values.next({values:{...o}}),f.state.next({...n,...P.keepDirty?{isDirty:M()}:{}}),!P.keepIsValid&&_()},ce=({disabled:k,name:P,field:O,fields:J,value:Q})=>{if(_r(k)&&i.mount||k){const Y=k?void 0:Et(Q)?fh(O?O._f:G(J,P)._f):Q;Ke(o,P,Y),S(P,Y,!1,!1,!0)}},je=(k,P={})=>{let O=G(r,k);const J=_r(P.disabled);return Ke(r,k,{...O||{},_f:{...O&&O._f?O._f:{ref:{name:k}},name:k,mount:!0,...P}}),a.mount.add(k),O?ce({field:O,disabled:P.disabled,name:k,value:P.value}):C(k,!0,P.value),{...J?{disabled:P.disabled}:{},...t.progressive?{required:!!P.required,min:_a(P.min),max:_a(P.max),minLength:_a(P.minLength),maxLength:_a(P.maxLength),pattern:_a(P.pattern)}:{},name:k,onChange:I,onBlur:I,ref:Q=>{if(Q){je(k,P),O=G(r,k);const Y=Et(Q.value)&&Q.querySelectorAll&&Q.querySelectorAll("input,select,textarea")[0]||Q,ue=ZU(Y),De=O._f.refs||[];if(ue?De.find(yt=>yt===Y):Y===O._f.ref)return;Ke(r,k,{_f:{...O._f,...ue?{refs:[...De.filter(dh),Y,...Array.isArray(G(s,k))?[{}]:[]],ref:{type:Y.type,name:k}}:{ref:Y}}}),C(k,!1,void 0,Y)}else O=G(r,k,{}),O._f&&(O._f.mount=!1),(t.shouldUnregister||P.shouldUnregister)&&!(ck(a.array,k)&&i.action)&&a.unMount.add(k)}}},Be=()=>t.shouldFocusError&&Wa(r,D,a.mount),$e=k=>{_r(k)&&(f.state.next({disabled:k}),Wa(r,(P,O)=>{const J=G(r,O);J&&(P.disabled=J._f.disabled||k,Array.isArray(J._f.refs)&&J._f.refs.forEach(Q=>{Q.disabled=J._f.disabled||k}))},0,!1))},Ve=(k,P)=>async O=>{let J;O&&(O.preventDefault&&O.preventDefault(),O.persist&&O.persist());let Q=mn(o);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:Y,values:ue}=await R();n.errors=Y,Q=ue}else await L(r);if(Mt(n.errors,"root"),bn(n.errors)){f.state.next({errors:{}});try{await k(Q,O)}catch(Y){J=Y}}else P&&await P({...n.errors},O),Be(),setTimeout(Be);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:bn(n.errors)&&!J,submitCount:n.submitCount+1,errors:n.errors}),J)throw J},_e=(k,P={})=>{G(r,k)&&(Et(P.defaultValue)?W(k,mn(G(s,k))):(W(k,P.defaultValue),Ke(s,k,mn(P.defaultValue))),P.keepTouched||Mt(n.touchedFields,k),P.keepDirty||(Mt(n.dirtyFields,k),n.isDirty=P.defaultValue?M(k,mn(G(s,k))):M()),P.keepError||(Mt(n.errors,k),d.isValid&&_()),f.state.next({...n}))},vt=(k,P={})=>{const O=k?mn(k):s,J=mn(O),Q=bn(k),Y=Q?s:J;if(P.keepDefaultValues||(s=O),!P.keepValues){if(P.keepDirtyValues)for(const ue of a.mount)G(n.dirtyFields,ue)?Ke(Y,ue,G(o,ue)):W(ue,G(Y,ue));else{if(sv&&Et(k))for(const ue of a.mount){const De=G(r,ue);if(De&&De._f){const yt=Array.isArray(De._f.refs)?De._f.refs[0]:De._f.ref;if(Xu(yt)){const $t=yt.closest("form");if($t){$t.reset();break}}}}r={}}o=e.shouldUnregister?P.keepDefaultValues?mn(s):{}:mn(Y),f.array.next({values:{...Y}}),f.values.next({values:{...Y}})}a={mount:P.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!d.isValid||!!P.keepIsValid||!!P.keepDirtyValues,i.watch=!!e.shouldUnregister,f.state.next({submitCount:P.keepSubmitCount?n.submitCount:0,isDirty:Q?!1:P.keepDirty?n.isDirty:!!(P.keepDefaultValues&&!xo(k,s)),isSubmitted:P.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:Q?{}:P.keepDirtyValues?P.keepDefaultValues&&o?Wc(s,o):n.dirtyFields:P.keepDefaultValues&&k?Wc(s,k):P.keepDirty?n.dirtyFields:{},touchedFields:P.keepTouched?n.touchedFields:{},errors:P.keepErrors?n.errors:{},isSubmitSuccessful:P.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Ht=(k,P)=>vt(Os(k)?k(o):k,P);return{control:{register:je,unregister:Ue,getFieldState:me,handleSubmit:Ve,setError:Pe,_executeSchema:R,_getWatch:B,_getDirty:M,_updateValid:_,_removeUnmounted:Z,_updateFieldArray:m,_updateDisabledField:ce,_getFieldArray:A,_reset:vt,_resetDefaultValues:()=>Os(t.defaultValues)&&t.defaultValues().then(k=>{Ht(k,t.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:k=>{n={...n,...k}},_disableForm:$e,_subjects:f,_proxyFormState:d,_setErrors:b,get _fields(){return r},get _formValues(){return o},get _state(){return i},set _state(k){i=k},get _defaultValues(){return s},get _names(){return a},set _names(k){a=k},get _formState(){return n},set _formState(k){n=k},get _options(){return t},set _options(k){t={...t,...k}}},trigger:q,register:je,handleSubmit:Ve,watch:gt,setValue:W,getValues:le,reset:Ht,resetField:_e,clearErrors:rt,unregister:Ue,setError:Pe,setFocus:(k,P={})=>{const O=G(r,k),J=O&&O._f;if(J){const Q=J.refs?J.refs[0]:J.ref;Q.focus&&(Q.focus(),P.shouldSelect&&Q.select())}},getFieldState:me}}function nc(e={}){const t=Me.useRef(),n=Me.useRef(),[r,s]=Me.useState({isDirty:!1,isValidating:!1,isLoading:Os(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Os(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...t$(e),formState:r});const o=t.current.control;return o._options=e,iv({subject:o._subjects.state,next:i=>{hk(i,o._proxyFormState,o._updateFormState,!0)&&s({...o._formState})}}),Me.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),Me.useEffect(()=>{if(o._proxyFormState.isDirty){const i=o._getDirty();i!==r.isDirty&&o._subjects.state.next({isDirty:i})}},[o,r.isDirty]),Me.useEffect(()=>{e.values&&!xo(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,s(i=>({...i}))):o._resetDefaultValues()},[e.values,o]),Me.useEffect(()=>{e.errors&&o._setErrors(e.errors)},[e.errors,o]),Me.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()}),Me.useEffect(()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})},[e.shouldUnregister,o]),t.current.formState=fk(r,o),t.current}const Kx=(e,t,n)=>{if(e&&"reportValidity"in e){const r=G(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},bk=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?Kx(r.ref,n,e):r.refs&&r.refs.forEach(s=>Kx(s,n,e))}},n$=(e,t)=>{t.shouldUseNativeValidation&&bk(e,t);const n={};for(const r in e){const s=G(t.fields,r),o=Object.assign(e[r]||{},{ref:s&&s.ref});if(r$(t.names||Object.keys(e),r)){const i=Object.assign({},G(n,r));Ke(i,"root",o),Ke(n,r,i)}else Ke(n,r,o)}return n},r$=(e,t)=>e.some(n=>n.startsWith(t+"."));var s$=function(e,t){for(var n={};e.length;){var r=e[0],s=r.code,o=r.message,i=r.path.join(".");if(!n[i])if("unionErrors"in r){var a=r.unionErrors[0].errors[0];n[i]={message:a.message,type:a.code}}else n[i]={message:o,type:s};if("unionErrors"in r&&r.unionErrors.forEach(function(d){return d.errors.forEach(function(f){return e.push(f)})}),t){var l=n[i].types,u=l&&l[r.code];n[i]=gk(i,t,n,s,u?[].concat(u,r.message):r.message)}e.shift()}return n},rc=function(e,t,n){return n===void 0&&(n={}),function(r,s,o){try{return Promise.resolve(function(i,a){try{var l=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(u){return o.shouldUseNativeValidation&&bk({},o),{errors:{},values:n.raw?r:u}})}catch(u){return a(u)}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:n$(s$(i.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw i}))}catch(i){return Promise.reject(i)}}},Le;(function(e){e.assertEqual=s=>s;function t(s){}e.assertIs=t;function n(s){throw new Error}e.assertNever=n,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 r(s,o=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(Le||(Le={}));var Dp;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Dp||(Dp={}));const se=Le.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Rs=e=>{switch(typeof e){case"undefined":return se.undefined;case"string":return se.string;case"number":return isNaN(e)?se.nan:se.number;case"boolean":return se.boolean;case"function":return se.function;case"bigint":return se.bigint;case"symbol":return se.symbol;case"object":return Array.isArray(e)?se.array:e===null?se.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?se.promise:typeof Map<"u"&&e instanceof Map?se.map:typeof Set<"u"&&e instanceof Set?se.set:typeof Date<"u"&&e instanceof Date?se.date:se.object;default:return se.unknown}},V=Le.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"]),o$=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class jn extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(o){return o.message},r={_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)r._errors.push(n(i));else{let a=r,l=0;for(;ln.message){const n={},r=[];for(const s of this.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):r.push(t(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}jn.create=e=>new jn(e);const Vi=(e,t)=>{let n;switch(e.code){case V.invalid_type:e.received===se.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case V.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Le.jsonStringifyReplacer)}`;break;case V.unrecognized_keys:n=`Unrecognized key(s) in object: ${Le.joinValues(e.keys,", ")}`;break;case V.invalid_union:n="Invalid input";break;case V.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Le.joinValues(e.options)}`;break;case V.invalid_enum_value:n=`Invalid enum value. Expected ${Le.joinValues(e.options)}, received '${e.received}'`;break;case V.invalid_arguments:n="Invalid function arguments";break;case V.invalid_return_type:n="Invalid function return type";break;case V.invalid_date:n="Invalid date";break;case V.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Le.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case V.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case V.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case V.custom:n="Invalid input";break;case V.invalid_intersection_types:n="Intersection results could not be merged";break;case V.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case V.not_finite:n="Number must be finite";break;default:n=t.defaultError,Le.assertNever(e)}return{message:n}};let Ck=Vi;function i$(e){Ck=e}function nd(){return Ck}const rd=e=>{const{data:t,path:n,errorMaps:r,issueData:s}=e,o=[...n,...s.path||[]],i={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let a="";const l=r.filter(u=>!!u).slice().reverse();for(const u of l)a=u(i,{data:t,defaultError:a}).message;return{...s,path:o,message:a}},a$=[];function ee(e,t){const n=nd(),r=rd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Vi?void 0:Vi].filter(s=>!!s)});e.common.issues.push(r)}class tn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const s of n){if(s.status==="aborted")return xe;s.status==="dirty"&&t.dirty(),r.push(s.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const s of n){const o=await s.key,i=await s.value;r.push({key:o,value:i})}return tn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const s of n){const{key:o,value:i}=s;if(o.status==="aborted"||i.status==="aborted")return xe;o.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof i.value<"u"||s.alwaysSet)&&(r[o.value]=i.value)}return{status:t.value,value:r}}}const xe=Object.freeze({status:"aborted"}),vi=e=>({status:"dirty",value:e}),cn=e=>({status:"valid",value:e}),Mp=e=>e.status==="aborted",Op=e=>e.status==="dirty",wl=e=>e.status==="valid",_l=e=>typeof Promise<"u"&&e instanceof Promise;function sd(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function kk(e,t,n,r,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,n),n}var fe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(fe||(fe={}));var Na,Ra;class Pr{constructor(t,n,r,s){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,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 Zx=(e,t)=>{if(wl(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 n=new jn(e.common.issues);return this._error=n,this._error}}};function Se(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:s}=e;if(t&&(n||r))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,u;const{message:d}=e;return i.code==="invalid_enum_value"?{message:d??a.defaultError}:typeof a.data>"u"?{message:(l=d??r)!==null&&l!==void 0?l:a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:(u=d??n)!==null&&u!==void 0?u:a.defaultError}},description:s}}class Te{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 Rs(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Rs(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new tn,ctx:{common:t.parent.common,data:t.data,parsedType:Rs(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(_l(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const s={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Rs(t)},o=this._parseSync({data:t,path:s.path,parent:s});return Zx(s,o)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Rs(t)},s=this._parse({data:t,path:r.path,parent:r}),o=await(_l(s)?s:Promise.resolve(s));return Zx(r,o)}refine(t,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,o)=>{const i=t(s),a=()=>o.addIssue({code:V.custom,...r(s)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,s)=>t(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(t){return new dr({schema:this,typeName:ve.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Tr.create(this,this._def)}nullable(){return Xs.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return or.create(this,this._def)}promise(){return Wi.create(this,this._def)}or(t){return kl.create([this,t],this._def)}and(t){return El.create(this,t,this._def)}transform(t){return new dr({...Se(this._def),schema:this,typeName:ve.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new jl({...Se(this._def),innerType:this,defaultValue:n,typeName:ve.ZodDefault})}brand(){return new cv({typeName:ve.ZodBranded,type:this,...Se(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Dl({...Se(this._def),innerType:this,catchValue:n,typeName:ve.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return sc.create(this,t)}readonly(){return Ml.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const l$=/^c[^\s-]{8,}$/i,c$=/^[0-9a-z]+$/,u$=/^[0-9A-HJKMNP-TV-Z]{26}$/,d$=/^[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,f$=/^[a-z0-9_-]{21}$/i,h$=/^[-+]?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)?)??$/,p$=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,m$="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let hh;const g$=/^(?:(?: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])$/,v$=/^(([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})))$/,y$=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ek="((\\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])))",x$=new RegExp(`^${Ek}$`);function Tk(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 w$(e){return new RegExp(`^${Tk(e)}$`)}function Nk(e){let t=`${Ek}T${Tk(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function _$(e,t){return!!((t==="v4"||!t)&&g$.test(e)||(t==="v6"||!t)&&v$.test(e))}class nr extends Te{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==se.string){const o=this._getOrReturnCtx(t);return ee(o,{code:V.invalid_type,expected:se.string,received:o.parsedType}),xe}const r=new tn;let s;for(const o of this._def.checks)if(o.kind==="min")t.data.lengtho.value&&(s=this._getOrReturnCtx(t,s),ee(s,{code:V.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const i=t.data.length>o.value,a=t.data.lengtht.test(s),{validation:n,code:V.invalid_string,...fe.errToObj(r)})}_addCheck(t){return new nr({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...fe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...fe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...fe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...fe.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...fe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...fe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...fe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...fe.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...fe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...fe.errToObj(t)})}datetime(t){var n,r;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:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...fe.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,...fe.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...fe.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...fe.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...fe.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...fe.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...fe.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...fe.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...fe.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...fe.errToObj(n)})}nonempty(t){return this.min(1,fe.errToObj(t))}trim(){return new nr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new nr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new nr({...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 n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new nr({checks:[],typeName:ve.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Se(e)})};function S$(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,s=n>r?n:r,o=parseInt(e.toFixed(s).replace(".","")),i=parseInt(t.toFixed(s).replace(".",""));return o%i/Math.pow(10,s)}class Zs extends Te{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)!==se.number){const o=this._getOrReturnCtx(t);return ee(o,{code:V.invalid_type,expected:se.number,received:o.parsedType}),xe}let r;const s=new tn;for(const o of this._def.checks)o.kind==="int"?Le.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{code:V.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:V.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?S$(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),ee(r,{code:V.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{code:V.not_finite,message:o.message}),s.dirty()):Le.assertNever(o);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,fe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,fe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,fe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,fe.toString(n))}setLimit(t,n,r,s){return new Zs({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:fe.toString(s)}]})}_addCheck(t){return new Zs({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:fe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:fe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:fe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:fe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:fe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:fe.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:fe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:fe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:fe.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuet.kind==="int"||t.kind==="multipleOf"&&Le.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.valuenew Zs({checks:[],typeName:ve.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Se(e)});class qs extends Te{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)!==se.bigint){const o=this._getOrReturnCtx(t);return ee(o,{code:V.invalid_type,expected:se.bigint,received:o.parsedType}),xe}let r;const s=new tn;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:V.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:V.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):Le.assertNever(o);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,fe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,fe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,fe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,fe.toString(n))}setLimit(t,n,r,s){return new qs({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:fe.toString(s)}]})}_addCheck(t){return new qs({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:fe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:fe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:fe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:fe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:fe.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new qs({checks:[],typeName:ve.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Se(e)})};class Sl extends Te{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==se.boolean){const r=this._getOrReturnCtx(t);return ee(r,{code:V.invalid_type,expected:se.boolean,received:r.parsedType}),xe}return cn(t.data)}}Sl.create=e=>new Sl({typeName:ve.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Se(e)});class Oo extends Te{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==se.date){const o=this._getOrReturnCtx(t);return ee(o,{code:V.invalid_type,expected:se.date,received:o.parsedType}),xe}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return ee(o,{code:V.invalid_date}),xe}const r=new tn;let s;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()o.value&&(s=this._getOrReturnCtx(t,s),ee(s,{code:V.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):Le.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Oo({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:fe.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:fe.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuenew Oo({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:ve.ZodDate,...Se(e)});class od extends Te{_parse(t){if(this._getType(t)!==se.symbol){const r=this._getOrReturnCtx(t);return ee(r,{code:V.invalid_type,expected:se.symbol,received:r.parsedType}),xe}return cn(t.data)}}od.create=e=>new od({typeName:ve.ZodSymbol,...Se(e)});class bl extends Te{_parse(t){if(this._getType(t)!==se.undefined){const r=this._getOrReturnCtx(t);return ee(r,{code:V.invalid_type,expected:se.undefined,received:r.parsedType}),xe}return cn(t.data)}}bl.create=e=>new bl({typeName:ve.ZodUndefined,...Se(e)});class Cl extends Te{_parse(t){if(this._getType(t)!==se.null){const r=this._getOrReturnCtx(t);return ee(r,{code:V.invalid_type,expected:se.null,received:r.parsedType}),xe}return cn(t.data)}}Cl.create=e=>new Cl({typeName:ve.ZodNull,...Se(e)});class zi extends Te{constructor(){super(...arguments),this._any=!0}_parse(t){return cn(t.data)}}zi.create=e=>new zi({typeName:ve.ZodAny,...Se(e)});class bo extends Te{constructor(){super(...arguments),this._unknown=!0}_parse(t){return cn(t.data)}}bo.create=e=>new bo({typeName:ve.ZodUnknown,...Se(e)});class as extends Te{_parse(t){const n=this._getOrReturnCtx(t);return ee(n,{code:V.invalid_type,expected:se.never,received:n.parsedType}),xe}}as.create=e=>new as({typeName:ve.ZodNever,...Se(e)});class id extends Te{_parse(t){if(this._getType(t)!==se.undefined){const r=this._getOrReturnCtx(t);return ee(r,{code:V.invalid_type,expected:se.void,received:r.parsedType}),xe}return cn(t.data)}}id.create=e=>new id({typeName:ve.ZodVoid,...Se(e)});class or extends Te{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),s=this._def;if(n.parsedType!==se.array)return ee(n,{code:V.invalid_type,expected:se.array,received:n.parsedType}),xe;if(s.exactLength!==null){const i=n.data.length>s.exactLength.value,a=n.data.lengths.maxLength.value&&(ee(n,{code:V.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((i,a)=>s.type._parseAsync(new Pr(n,i,n.path,a)))).then(i=>tn.mergeArray(r,i));const o=[...n.data].map((i,a)=>s.type._parseSync(new Pr(n,i,n.path,a)));return tn.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new or({...this._def,minLength:{value:t,message:fe.toString(n)}})}max(t,n){return new or({...this._def,maxLength:{value:t,message:fe.toString(n)}})}length(t,n){return new or({...this._def,exactLength:{value:t,message:fe.toString(n)}})}nonempty(t){return this.min(1,t)}}or.create=(e,t)=>new or({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ve.ZodArray,...Se(t)});function ti(e){if(e instanceof xt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Tr.create(ti(r))}return new xt({...e._def,shape:()=>t})}else return e instanceof or?new or({...e._def,type:ti(e.element)}):e instanceof Tr?Tr.create(ti(e.unwrap())):e instanceof Xs?Xs.create(ti(e.unwrap())):e instanceof jr?jr.create(e.items.map(t=>ti(t))):e}class xt extends Te{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(),n=Le.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==se.object){const u=this._getOrReturnCtx(t);return ee(u,{code:V.invalid_type,expected:se.object,received:u.parsedType}),xe}const{status:r,ctx:s}=this._processInputParams(t),{shape:o,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof as&&this._def.unknownKeys==="strip"))for(const u in s.data)i.includes(u)||a.push(u);const l=[];for(const u of i){const d=o[u],f=s.data[u];l.push({key:{status:"valid",value:u},value:d._parse(new Pr(s,f,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof as){const u=this._def.unknownKeys;if(u==="passthrough")for(const d of a)l.push({key:{status:"valid",value:d},value:{status:"valid",value:s.data[d]}});else if(u==="strict")a.length>0&&(ee(s,{code:V.unrecognized_keys,keys:a}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const d of a){const f=s.data[d];l.push({key:{status:"valid",value:d},value:u._parse(new Pr(s,f,s.path,d)),alwaysSet:d in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const u=[];for(const d of l){const f=await d.key,p=await d.value;u.push({key:f,value:p,alwaysSet:d.alwaysSet})}return u}).then(u=>tn.mergeObjectSync(r,u)):tn.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return fe.errToObj,new xt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var s,o,i,a;const l=(i=(o=(s=this._def).errorMap)===null||o===void 0?void 0:o.call(s,n,r).message)!==null&&i!==void 0?i:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=fe.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new xt({...this._def,unknownKeys:"strip"})}passthrough(){return new xt({...this._def,unknownKeys:"passthrough"})}extend(t){return new xt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new xt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ve.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new xt({...this._def,catchall:t})}pick(t){const n={};return Le.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new xt({...this._def,shape:()=>n})}omit(t){const n={};return Le.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new xt({...this._def,shape:()=>n})}deepPartial(){return ti(this)}partial(t){const n={};return Le.objectKeys(this.shape).forEach(r=>{const s=this.shape[r];t&&!t[r]?n[r]=s:n[r]=s.optional()}),new xt({...this._def,shape:()=>n})}required(t){const n={};return Le.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof Tr;)o=o._def.innerType;n[r]=o}}),new xt({...this._def,shape:()=>n})}keyof(){return Rk(Le.objectKeys(this.shape))}}xt.create=(e,t)=>new xt({shape:()=>e,unknownKeys:"strip",catchall:as.create(),typeName:ve.ZodObject,...Se(t)});xt.strictCreate=(e,t)=>new xt({shape:()=>e,unknownKeys:"strict",catchall:as.create(),typeName:ve.ZodObject,...Se(t)});xt.lazycreate=(e,t)=>new xt({shape:e,unknownKeys:"strip",catchall:as.create(),typeName:ve.ZodObject,...Se(t)});class kl extends Te{_parse(t){const{ctx:n}=this._processInputParams(t),r=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 n.common.issues.push(...a.ctx.common.issues),a.result;const i=o.map(a=>new jn(a.ctx.common.issues));return ee(n,{code:V.invalid_union,unionErrors:i}),xe}if(n.common.async)return Promise.all(r.map(async o=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(s);{let o;const i=[];for(const l of r){const u={...n,common:{...n.common,issues:[]},parent:null},d=l._parseSync({data:n.data,path:n.path,parent:u});if(d.status==="valid")return d;d.status==="dirty"&&!o&&(o={result:d,ctx:u}),u.common.issues.length&&i.push(u.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const a=i.map(l=>new jn(l));return ee(n,{code:V.invalid_union,unionErrors:a}),xe}}get options(){return this._def.options}}kl.create=(e,t)=>new kl({options:e,typeName:ve.ZodUnion,...Se(t)});const Ur=e=>e instanceof Nl?Ur(e.schema):e instanceof dr?Ur(e.innerType()):e instanceof Rl?[e.value]:e instanceof Qs?e.options:e instanceof Pl?Le.objectValues(e.enum):e instanceof jl?Ur(e._def.innerType):e instanceof bl?[void 0]:e instanceof Cl?[null]:e instanceof Tr?[void 0,...Ur(e.unwrap())]:e instanceof Xs?[null,...Ur(e.unwrap())]:e instanceof cv||e instanceof Ml?Ur(e.unwrap()):e instanceof Dl?Ur(e._def.innerType):[];class cf extends Te{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==se.object)return ee(n,{code:V.invalid_type,expected:se.object,received:n.parsedType}),xe;const r=this.discriminator,s=n.data[r],o=this.optionsMap.get(s);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(ee(n,{code:V.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),xe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const s=new Map;for(const o of n){const i=Ur(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 cf({typeName:ve.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:s,...Se(r)})}}function Ap(e,t){const n=Rs(e),r=Rs(t);if(e===t)return{valid:!0,data:e};if(n===se.object&&r===se.object){const s=Le.objectKeys(t),o=Le.objectKeys(e).filter(a=>s.indexOf(a)!==-1),i={...e,...t};for(const a of o){const l=Ap(e[a],t[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(n===se.array&&r===se.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let o=0;o{if(Mp(o)||Mp(i))return xe;const a=Ap(o.value,i.value);return a.valid?((Op(o)||Op(i))&&n.dirty(),{status:n.value,value:a.data}):(ee(r,{code:V.invalid_intersection_types}),xe)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,i])=>s(o,i)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}El.create=(e,t,n)=>new El({left:e,right:t,typeName:ve.ZodIntersection,...Se(n)});class jr extends Te{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.array)return ee(r,{code:V.invalid_type,expected:se.array,received:r.parsedType}),xe;if(r.data.lengththis._def.items.length&&(ee(r,{code:V.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((i,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Pr(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(o).then(i=>tn.mergeArray(n,i)):tn.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new jr({...this._def,rest:t})}}jr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new jr({items:e,typeName:ve.ZodTuple,rest:null,...Se(t)})};class Tl extends Te{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.object)return ee(r,{code:V.invalid_type,expected:se.object,received:r.parsedType}),xe;const s=[],o=this._def.keyType,i=this._def.valueType;for(const a in r.data)s.push({key:o._parse(new Pr(r,a,r.path,a)),value:i._parse(new Pr(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?tn.mergeObjectAsync(n,s):tn.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Te?new Tl({keyType:t,valueType:n,typeName:ve.ZodRecord,...Se(r)}):new Tl({keyType:nr.create(),valueType:t,typeName:ve.ZodRecord,...Se(n)})}}class ad extends Te{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.map)return ee(r,{code:V.invalid_type,expected:se.map,received:r.parsedType}),xe;const s=this._def.keyType,o=this._def.valueType,i=[...r.data.entries()].map(([a,l],u)=>({key:s._parse(new Pr(r,a,r.path,[u,"key"])),value:o._parse(new Pr(r,l,r.path,[u,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of i){const u=await l.key,d=await l.value;if(u.status==="aborted"||d.status==="aborted")return xe;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),a.set(u.value,d.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of i){const u=l.key,d=l.value;if(u.status==="aborted"||d.status==="aborted")return xe;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),a.set(u.value,d.value)}return{status:n.value,value:a}}}}ad.create=(e,t,n)=>new ad({valueType:t,keyType:e,typeName:ve.ZodMap,...Se(n)});class Ao extends Te{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.set)return ee(r,{code:V.invalid_type,expected:se.set,received:r.parsedType}),xe;const s=this._def;s.minSize!==null&&r.data.sizes.maxSize.value&&(ee(r,{code:V.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const o=this._def.valueType;function i(l){const u=new Set;for(const d of l){if(d.status==="aborted")return xe;d.status==="dirty"&&n.dirty(),u.add(d.value)}return{status:n.value,value:u}}const a=[...r.data.values()].map((l,u)=>o._parse(new Pr(r,l,r.path,u)));return r.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,n){return new Ao({...this._def,minSize:{value:t,message:fe.toString(n)}})}max(t,n){return new Ao({...this._def,maxSize:{value:t,message:fe.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Ao.create=(e,t)=>new Ao({valueType:e,minSize:null,maxSize:null,typeName:ve.ZodSet,...Se(t)});class ji extends Te{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==se.function)return ee(n,{code:V.invalid_type,expected:se.function,received:n.parsedType}),xe;function r(a,l){return rd({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,nd(),Vi].filter(u=>!!u),issueData:{code:V.invalid_arguments,argumentsError:l}})}function s(a,l){return rd({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,nd(),Vi].filter(u=>!!u),issueData:{code:V.invalid_return_type,returnTypeError:l}})}const o={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof Wi){const a=this;return cn(async function(...l){const u=new jn([]),d=await a._def.args.parseAsync(l,o).catch(x=>{throw u.addIssue(r(l,x)),u}),f=await Reflect.apply(i,this,d);return await a._def.returns._def.type.parseAsync(f,o).catch(x=>{throw u.addIssue(s(f,x)),u})})}else{const a=this;return cn(function(...l){const u=a._def.args.safeParse(l,o);if(!u.success)throw new jn([r(l,u.error)]);const d=Reflect.apply(i,this,u.data),f=a._def.returns.safeParse(d,o);if(!f.success)throw new jn([s(d,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new ji({...this._def,args:jr.create(t).rest(bo.create())})}returns(t){return new ji({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new ji({args:t||jr.create([]).rest(bo.create()),returns:n||bo.create(),typeName:ve.ZodFunction,...Se(r)})}}class Nl extends Te{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Nl.create=(e,t)=>new Nl({getter:e,typeName:ve.ZodLazy,...Se(t)});class Rl extends Te{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ee(n,{received:n.data,code:V.invalid_literal,expected:this._def.value}),xe}return{status:"valid",value:t.data}}get value(){return this._def.value}}Rl.create=(e,t)=>new Rl({value:e,typeName:ve.ZodLiteral,...Se(t)});function Rk(e,t){return new Qs({values:e,typeName:ve.ZodEnum,...Se(t)})}class Qs extends Te{constructor(){super(...arguments),Na.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ee(n,{expected:Le.joinValues(r),received:n.parsedType,code:V.invalid_type}),xe}if(sd(this,Na)||kk(this,Na,new Set(this._def.values)),!sd(this,Na).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ee(n,{received:n.data,code:V.invalid_enum_value,options:r}),xe}return cn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Qs.create(t,{...this._def,...n})}exclude(t,n=this._def){return Qs.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Na=new WeakMap;Qs.create=Rk;class Pl extends Te{constructor(){super(...arguments),Ra.set(this,void 0)}_parse(t){const n=Le.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==se.string&&r.parsedType!==se.number){const s=Le.objectValues(n);return ee(r,{expected:Le.joinValues(s),received:r.parsedType,code:V.invalid_type}),xe}if(sd(this,Ra)||kk(this,Ra,new Set(Le.getValidEnumValues(this._def.values))),!sd(this,Ra).has(t.data)){const s=Le.objectValues(n);return ee(r,{received:r.data,code:V.invalid_enum_value,options:s}),xe}return cn(t.data)}get enum(){return this._def.values}}Ra=new WeakMap;Pl.create=(e,t)=>new Pl({values:e,typeName:ve.ZodNativeEnum,...Se(t)});class Wi extends Te{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==se.promise&&n.common.async===!1)return ee(n,{code:V.invalid_type,expected:se.promise,received:n.parsedType}),xe;const r=n.parsedType===se.promise?n.data:Promise.resolve(n.data);return cn(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Wi.create=(e,t)=>new Wi({type:e,typeName:ve.ZodPromise,...Se(t)});class dr extends Te{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ve.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=this._def.effect||null,o={addIssue:i=>{ee(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){const i=s.transform(r.data,o);if(r.common.async)return Promise.resolve(i).then(async a=>{if(n.value==="aborted")return xe;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?xe:l.status==="dirty"||n.value==="dirty"?vi(l.value):l});{if(n.value==="aborted")return xe;const a=this._def.schema._parseSync({data:i,path:r.path,parent:r});return a.status==="aborted"?xe:a.status==="dirty"||n.value==="dirty"?vi(a.value):a}}if(s.type==="refinement"){const i=a=>{const l=s.refinement(a,o);if(r.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(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?xe:(a.status==="dirty"&&n.dirty(),i(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?xe:(a.status==="dirty"&&n.dirty(),i(a.value).then(()=>({status:n.value,value:a.value}))))}if(s.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!wl(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:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>wl(i)?Promise.resolve(s.transform(i.value,o)).then(a=>({status:n.value,value:a})):i);Le.assertNever(s)}}dr.create=(e,t,n)=>new dr({schema:e,typeName:ve.ZodEffects,effect:t,...Se(n)});dr.createWithPreprocess=(e,t,n)=>new dr({schema:t,effect:{type:"preprocess",transform:e},typeName:ve.ZodEffects,...Se(n)});class Tr extends Te{_parse(t){return this._getType(t)===se.undefined?cn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Tr.create=(e,t)=>new Tr({innerType:e,typeName:ve.ZodOptional,...Se(t)});class Xs extends Te{_parse(t){return this._getType(t)===se.null?cn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Xs.create=(e,t)=>new Xs({innerType:e,typeName:ve.ZodNullable,...Se(t)});class jl extends Te{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===se.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}jl.create=(e,t)=>new jl({innerType:e,typeName:ve.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Se(t)});class Dl extends Te{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return _l(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new jn(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new jn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Dl.create=(e,t)=>new Dl({innerType:e,typeName:ve.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Se(t)});class ld extends Te{_parse(t){if(this._getType(t)!==se.nan){const r=this._getOrReturnCtx(t);return ee(r,{code:V.invalid_type,expected:se.nan,received:r.parsedType}),xe}return{status:"valid",value:t.data}}}ld.create=e=>new ld({typeName:ve.ZodNaN,...Se(e)});const b$=Symbol("zod_brand");class cv extends Te{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class sc extends Te{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?xe:o.status==="dirty"?(n.dirty(),vi(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?xe:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(t,n){return new sc({in:t,out:n,typeName:ve.ZodPipeline})}}class Ml extends Te{_parse(t){const n=this._def.innerType._parse(t),r=s=>(wl(s)&&(s.value=Object.freeze(s.value)),s);return _l(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}Ml.create=(e,t)=>new Ml({innerType:e,typeName:ve.ZodReadonly,...Se(t)});function Pk(e,t={},n){return e?zi.create().superRefine((r,s)=>{var o,i;if(!e(r)){const a=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,l=(i=(o=a.fatal)!==null&&o!==void 0?o:n)!==null&&i!==void 0?i:!0,u=typeof a=="string"?{message:a}:a;s.addIssue({code:"custom",...u,fatal:l})}}):zi.create()}const C$={object:xt.lazycreate};var ve;(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"})(ve||(ve={}));const k$=(e,t={message:`Input not instance of ${e.name}`})=>Pk(n=>n instanceof e,t),jk=nr.create,Dk=Zs.create,E$=ld.create,T$=qs.create,Mk=Sl.create,N$=Oo.create,R$=od.create,P$=bl.create,j$=Cl.create,D$=zi.create,M$=bo.create,O$=as.create,A$=id.create,I$=or.create,L$=xt.create,F$=xt.strictCreate,U$=kl.create,$$=cf.create,V$=El.create,z$=jr.create,W$=Tl.create,Y$=ad.create,B$=Ao.create,H$=ji.create,G$=Nl.create,K$=Rl.create,Z$=Qs.create,q$=Pl.create,Q$=Wi.create,qx=dr.create,X$=Tr.create,J$=Xs.create,eV=dr.createWithPreprocess,tV=sc.create,nV=()=>jk().optional(),rV=()=>Dk().optional(),sV=()=>Mk().optional(),oV={string:e=>nr.create({...e,coerce:!0}),number:e=>Zs.create({...e,coerce:!0}),boolean:e=>Sl.create({...e,coerce:!0}),bigint:e=>qs.create({...e,coerce:!0}),date:e=>Oo.create({...e,coerce:!0})},iV=xe;var Ie=Object.freeze({__proto__:null,defaultErrorMap:Vi,setErrorMap:i$,getErrorMap:nd,makeIssue:rd,EMPTY_PATH:a$,addIssueToContext:ee,ParseStatus:tn,INVALID:xe,DIRTY:vi,OK:cn,isAborted:Mp,isDirty:Op,isValid:wl,isAsync:_l,get util(){return Le},get objectUtil(){return Dp},ZodParsedType:se,getParsedType:Rs,ZodType:Te,datetimeRegex:Nk,ZodString:nr,ZodNumber:Zs,ZodBigInt:qs,ZodBoolean:Sl,ZodDate:Oo,ZodSymbol:od,ZodUndefined:bl,ZodNull:Cl,ZodAny:zi,ZodUnknown:bo,ZodNever:as,ZodVoid:id,ZodArray:or,ZodObject:xt,ZodUnion:kl,ZodDiscriminatedUnion:cf,ZodIntersection:El,ZodTuple:jr,ZodRecord:Tl,ZodMap:ad,ZodSet:Ao,ZodFunction:ji,ZodLazy:Nl,ZodLiteral:Rl,ZodEnum:Qs,ZodNativeEnum:Pl,ZodPromise:Wi,ZodEffects:dr,ZodTransformer:dr,ZodOptional:Tr,ZodNullable:Xs,ZodDefault:jl,ZodCatch:Dl,ZodNaN:ld,BRAND:b$,ZodBranded:cv,ZodPipeline:sc,ZodReadonly:Ml,custom:Pk,Schema:Te,ZodSchema:Te,late:C$,get ZodFirstPartyTypeKind(){return ve},coerce:oV,any:D$,array:I$,bigint:T$,boolean:Mk,date:N$,discriminatedUnion:$$,effect:qx,enum:Z$,function:H$,instanceof:k$,intersection:V$,lazy:G$,literal:K$,map:Y$,nan:E$,nativeEnum:q$,never:O$,null:j$,nullable:J$,number:Dk,object:L$,oboolean:sV,onumber:rV,optional:X$,ostring:nV,pipeline:tV,preprocess:eV,promise:Q$,record:W$,set:B$,strictObject:F$,string:jk,symbol:R$,transformer:qx,tuple:z$,undefined:P$,union:U$,unknown:M$,void:A$,NEVER:iV,ZodIssueCode:V,quotelessJson:o$,ZodError:jn}),aV="Label",Ok=h.forwardRef((e,t)=>c.jsx(we.label,{...e,ref:t,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Ok.displayName=aV;var Ak=Ok;const lV=$l("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ol=h.forwardRef(({className:e,...t},n)=>c.jsx(Ak,{ref:n,className:ae(lV(),e),...t}));Ol.displayName=Ak.displayName;const oc=VU,Ik=h.createContext({}),tt=({...e})=>c.jsx(Ik.Provider,{value:{name:e.name},children:c.jsx(BU,{...e})}),uf=()=>{const e=h.useContext(Ik),t=h.useContext(Lk),{getFieldState:n,formState:r}=lf(),s=n(e.name,r);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}},Lk=h.createContext({}),qe=h.forwardRef(({className:e,...t},n)=>{const r=h.useId();return c.jsx(Lk.Provider,{value:{id:r},children:c.jsx("div",{ref:n,className:ae("space-y-2",e),...t})})});qe.displayName="FormItem";const Qe=h.forwardRef(({className:e,...t},n)=>{const{error:r,formItemId:s}=uf();return c.jsx(Ol,{ref:n,className:ae(r&&"text-destructive",e),htmlFor:s,...t})});Qe.displayName="FormLabel";const Xe=h.forwardRef(({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:s,formMessageId:o}=uf();return c.jsx(ns,{ref:t,id:r,"aria-describedby":n?`${s} ${o}`:`${s}`,"aria-invalid":!!n,...e})});Xe.displayName="FormControl";const cV=h.forwardRef(({className:e,...t},n)=>{const{formDescriptionId:r}=uf();return c.jsx("p",{ref:n,id:r,className:ae("text-sm text-muted-foreground",e),...t})});cV.displayName="FormDescription";const He=h.forwardRef(({className:e,children:t,...n},r)=>{const{error:s,formMessageId:o}=uf(),i=s?String(s==null?void 0:s.message):t;return i?c.jsx("p",{ref:r,id:o,className:ae("text-sm font-medium text-destructive",e),...n,children:i}):null});He.displayName="FormMessage";function Qx(e,[t,n]){return Math.min(n,Math.max(t,e))}var uV=[" ","Enter","ArrowUp","ArrowDown"],dV=[" ","Enter"],ic="Select",[df,ff,fV]=jd(ic),[ra,_z]=An(ic,[fV,Ji]),hf=Ji(),[hV,oo]=ra(ic),[pV,mV]=ra(ic),Fk=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:s,onOpenChange:o,value:i,defaultValue:a,onValueChange:l,dir:u,name:d,autoComplete:f,disabled:p,required:x}=e,g=hf(t),[v,_]=h.useState(null),[y,m]=h.useState(null),[w,b]=h.useState(!1),C=Dd(u),[S=!1,N]=rs({prop:r,defaultProp:s,onChange:o}),[R,F]=rs({prop:i,defaultProp:a,onChange:l}),L=h.useRef(null),Z=v?!!v.closest("form"):!0,[M,B]=h.useState(new Set),A=Array.from(M).map(H=>H.props.value).join(";");return c.jsx(og,{...g,children:c.jsxs(hV,{required:x,scope:t,trigger:v,onTriggerChange:_,valueNode:y,onValueNodeChange:m,valueNodeHasChildren:w,onValueNodeHasChildrenChange:b,contentId:Er(),value:R,onValueChange:F,open:S,onOpenChange:N,dir:C,triggerPointerDownPosRef:L,disabled:p,children:[c.jsx(df.Provider,{scope:t,children:c.jsx(pV,{scope:e.__scopeSelect,onNativeOptionAdd:h.useCallback(H=>{B(ne=>new Set(ne).add(H))},[]),onNativeOptionRemove:h.useCallback(H=>{B(ne=>{const W=new Set(ne);return W.delete(H),W})},[]),children:n})}),Z?c.jsxs(uE,{"aria-hidden":!0,required:x,tabIndex:-1,name:d,autoComplete:f,value:R,onChange:H=>F(H.target.value),disabled:p,children:[R===void 0?c.jsx("option",{value:""}):null,Array.from(M)]},A):null]})})};Fk.displayName=ic;var Uk="SelectTrigger",$k=h.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...s}=e,o=hf(n),i=oo(Uk,n),a=i.disabled||r,l=Ae(t,i.onTriggerChange),u=ff(n),[d,f,p]=dE(g=>{const v=u().filter(m=>!m.disabled),_=v.find(m=>m.value===i.value),y=fE(v,g,_);y!==void 0&&i.onValueChange(y.value)}),x=()=>{a||(i.onOpenChange(!0),p())};return c.jsx(ig,{asChild:!0,...o,children:c.jsx(we.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":cE(i.value)?"":void 0,...s,ref:l,onClick:X(s.onClick,g=>{g.currentTarget.focus()}),onPointerDown:X(s.onPointerDown,g=>{const v=g.target;v.hasPointerCapture(g.pointerId)&&v.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&(x(),i.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)},g.preventDefault())}),onKeyDown:X(s.onKeyDown,g=>{const v=d.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&f(g.key),!(v&&g.key===" ")&&uV.includes(g.key)&&(x(),g.preventDefault())})})})});$k.displayName=Uk;var Vk="SelectValue",zk=h.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,children:o,placeholder:i="",...a}=e,l=oo(Vk,n),{onValueNodeHasChildrenChange:u}=l,d=o!==void 0,f=Ae(t,l.onValueNodeChange);return en(()=>{u(d)},[u,d]),c.jsx(we.span,{...a,ref:f,style:{pointerEvents:"none"},children:cE(l.value)?c.jsx(c.Fragment,{children:i}):o})});zk.displayName=Vk;var gV="SelectIcon",Wk=h.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...s}=e;return c.jsx(we.span,{"aria-hidden":!0,...s,ref:t,children:r||"▼"})});Wk.displayName=gV;var vV="SelectPortal",Yk=e=>c.jsx(zl,{asChild:!0,...e});Yk.displayName=vV;var Io="SelectContent",Bk=h.forwardRef((e,t)=>{const n=oo(Io,e.__scopeSelect),[r,s]=h.useState();if(en(()=>{s(new DocumentFragment)},[]),!n.open){const o=r;return o?cs.createPortal(c.jsx(Hk,{scope:e.__scopeSelect,children:c.jsx(df.Slot,{scope:e.__scopeSelect,children:c.jsx("div",{children:e.children})})}),o):null}return c.jsx(Gk,{...e,ref:t})});Bk.displayName=Io;var zr=10,[Hk,io]=ra(Io),yV="SelectContentImpl",Gk=h.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:i,side:a,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:x,sticky:g,hideWhenDetached:v,avoidCollisions:_,...y}=e,m=oo(Io,n),[w,b]=h.useState(null),[C,S]=h.useState(null),N=Ae(t,ce=>b(ce)),[R,F]=h.useState(null),[L,Z]=h.useState(null),M=ff(n),[B,A]=h.useState(!1),H=h.useRef(!1);h.useEffect(()=>{if(w)return cg(w)},[w]),Zm();const ne=h.useCallback(ce=>{const[je,...Be]=M().map(_e=>_e.ref.current),[$e]=Be.slice(-1),Ve=document.activeElement;for(const _e of ce)if(_e===Ve||(_e==null||_e.scrollIntoView({block:"nearest"}),_e===je&&C&&(C.scrollTop=0),_e===$e&&C&&(C.scrollTop=C.scrollHeight),_e==null||_e.focus(),document.activeElement!==Ve))return},[M,C]),W=h.useCallback(()=>ne([R,w]),[ne,R,w]);h.useEffect(()=>{B&&W()},[B,W]);const{onOpenChange:I,triggerPointerDownPosRef:D}=m;h.useEffect(()=>{if(w){let ce={x:0,y:0};const je=$e=>{var Ve,_e;ce={x:Math.abs(Math.round($e.pageX)-(((Ve=D.current)==null?void 0:Ve.x)??0)),y:Math.abs(Math.round($e.pageY)-(((_e=D.current)==null?void 0:_e.y)??0))}},Be=$e=>{ce.x<=10&&ce.y<=10?$e.preventDefault():w.contains($e.target)||I(!1),document.removeEventListener("pointermove",je),D.current=null};return D.current!==null&&(document.addEventListener("pointermove",je),document.addEventListener("pointerup",Be,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",je),document.removeEventListener("pointerup",Be,{capture:!0})}}},[w,I,D]),h.useEffect(()=>{const ce=()=>I(!1);return window.addEventListener("blur",ce),window.addEventListener("resize",ce),()=>{window.removeEventListener("blur",ce),window.removeEventListener("resize",ce)}},[I]);const[q,le]=dE(ce=>{const je=M().filter(Ve=>!Ve.disabled),Be=je.find(Ve=>Ve.ref.current===document.activeElement),$e=fE(je,ce,Be);$e&&setTimeout(()=>$e.ref.current.focus())}),me=h.useCallback((ce,je,Be)=>{const $e=!H.current&&!Be;(m.value!==void 0&&m.value===je||$e)&&(F(ce),$e&&(H.current=!0))},[m.value]),rt=h.useCallback(()=>w==null?void 0:w.focus(),[w]),Pe=h.useCallback((ce,je,Be)=>{const $e=!H.current&&!Be;(m.value!==void 0&&m.value===je||$e)&&Z(ce)},[m.value]),gt=r==="popper"?Ip:Kk,Ue=gt===Ip?{side:a,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:x,sticky:g,hideWhenDetached:v,avoidCollisions:_}:{};return c.jsx(Hk,{scope:n,content:w,viewport:C,onViewportChange:S,itemRefCallback:me,selectedItem:R,onItemLeave:rt,itemTextRefCallback:Pe,focusSelectedItem:W,selectedItemText:L,position:r,isPositioned:B,searchRef:q,children:c.jsx(Ud,{as:ns,allowPinchZoom:!0,children:c.jsx(Md,{asChild:!0,trapped:m.open,onMountAutoFocus:ce=>{ce.preventDefault()},onUnmountAutoFocus:X(s,ce=>{var je;(je=m.trigger)==null||je.focus({preventScroll:!0}),ce.preventDefault()}),children:c.jsx(qi,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:ce=>ce.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:c.jsx(gt,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:ce=>ce.preventDefault(),...y,...Ue,onPlaced:()=>A(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:X(y.onKeyDown,ce=>{const je=ce.ctrlKey||ce.altKey||ce.metaKey;if(ce.key==="Tab"&&ce.preventDefault(),!je&&ce.key.length===1&&le(ce.key),["ArrowUp","ArrowDown","Home","End"].includes(ce.key)){let $e=M().filter(Ve=>!Ve.disabled).map(Ve=>Ve.ref.current);if(["ArrowUp","End"].includes(ce.key)&&($e=$e.slice().reverse()),["ArrowUp","ArrowDown"].includes(ce.key)){const Ve=ce.target,_e=$e.indexOf(Ve);$e=$e.slice(_e+1)}setTimeout(()=>ne($e)),ce.preventDefault()}})})})})})})});Gk.displayName=yV;var xV="SelectItemAlignedPosition",Kk=h.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...s}=e,o=oo(Io,n),i=io(Io,n),[a,l]=h.useState(null),[u,d]=h.useState(null),f=Ae(t,N=>d(N)),p=ff(n),x=h.useRef(!1),g=h.useRef(!0),{viewport:v,selectedItem:_,selectedItemText:y,focusSelectedItem:m}=i,w=h.useCallback(()=>{if(o.trigger&&o.valueNode&&a&&u&&v&&_&&y){const N=o.trigger.getBoundingClientRect(),R=u.getBoundingClientRect(),F=o.valueNode.getBoundingClientRect(),L=y.getBoundingClientRect();if(o.dir!=="rtl"){const Ve=L.left-R.left,_e=F.left-Ve,vt=N.left-_e,Ht=N.width+vt,gs=Math.max(Ht,R.width),hn=window.innerWidth-zr,vs=Qx(_e,[zr,hn-gs]);a.style.minWidth=Ht+"px",a.style.left=vs+"px"}else{const Ve=R.right-L.right,_e=window.innerWidth-F.right-Ve,vt=window.innerWidth-N.right-_e,Ht=N.width+vt,gs=Math.max(Ht,R.width),hn=window.innerWidth-zr,vs=Qx(_e,[zr,hn-gs]);a.style.minWidth=Ht+"px",a.style.right=vs+"px"}const Z=p(),M=window.innerHeight-zr*2,B=v.scrollHeight,A=window.getComputedStyle(u),H=parseInt(A.borderTopWidth,10),ne=parseInt(A.paddingTop,10),W=parseInt(A.borderBottomWidth,10),I=parseInt(A.paddingBottom,10),D=H+ne+B+I+W,q=Math.min(_.offsetHeight*5,D),le=window.getComputedStyle(v),me=parseInt(le.paddingTop,10),rt=parseInt(le.paddingBottom,10),Pe=N.top+N.height/2-zr,gt=M-Pe,Ue=_.offsetHeight/2,ce=_.offsetTop+Ue,je=H+ne+ce,Be=D-je;if(je<=Pe){const Ve=_===Z[Z.length-1].ref.current;a.style.bottom="0px";const _e=u.clientHeight-v.offsetTop-v.offsetHeight,vt=Math.max(gt,Ue+(Ve?rt:0)+_e+W),Ht=je+vt;a.style.height=Ht+"px"}else{const Ve=_===Z[0].ref.current;a.style.top="0px";const vt=Math.max(Pe,H+v.offsetTop+(Ve?me:0)+Ue)+Be;a.style.height=vt+"px",v.scrollTop=je-Pe+v.offsetTop}a.style.margin=`${zr}px 0`,a.style.minHeight=q+"px",a.style.maxHeight=M+"px",r==null||r(),requestAnimationFrame(()=>x.current=!0)}},[p,o.trigger,o.valueNode,a,u,v,_,y,o.dir,r]);en(()=>w(),[w]);const[b,C]=h.useState();en(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const S=h.useCallback(N=>{N&&g.current===!0&&(w(),m==null||m(),g.current=!1)},[w,m]);return c.jsx(_V,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:x,onScrollButtonChange:S,children:c.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:b},children:c.jsx(we.div,{...s,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});Kk.displayName=xV;var wV="SelectPopperPosition",Ip=h.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=zr,...o}=e,i=hf(n);return c.jsx(ag,{...i,...o,ref:t,align:r,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)"}})});Ip.displayName=wV;var[_V,uv]=ra(Io,{}),Lp="SelectViewport",Zk=h.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...s}=e,o=io(Lp,n),i=uv(Lp,n),a=Ae(t,o.onViewportChange),l=h.useRef(0);return c.jsxs(c.Fragment,{children:[c.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:r}),c.jsx(df.Slot,{scope:n,children:c.jsx(we.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"auto",...s.style},onScroll:X(s.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:p}=i;if(p!=null&&p.current&&f){const x=Math.abs(l.current-d.scrollTop);if(x>0){const g=window.innerHeight-zr*2,v=parseFloat(f.style.minHeight),_=parseFloat(f.style.height),y=Math.max(v,_);if(y0?b:0,f.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});Zk.displayName=Lp;var qk="SelectGroup",[SV,bV]=ra(qk),Qk=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=Er();return c.jsx(SV,{scope:n,id:s,children:c.jsx(we.div,{role:"group","aria-labelledby":s,...r,ref:t})})});Qk.displayName=qk;var Xk="SelectLabel",Jk=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=bV(Xk,n);return c.jsx(we.div,{id:s.id,...r,ref:t})});Jk.displayName=Xk;var cd="SelectItem",[CV,eE]=ra(cd),tE=h.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:o,...i}=e,a=oo(cd,n),l=io(cd,n),u=a.value===r,[d,f]=h.useState(o??""),[p,x]=h.useState(!1),g=Ae(t,y=>{var m;return(m=l.itemRefCallback)==null?void 0:m.call(l,y,r,s)}),v=Er(),_=()=>{s||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")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 c.jsx(CV,{scope:n,value:r,disabled:s,textId:v,isSelected:u,onItemTextChange:h.useCallback(y=>{f(m=>m||((y==null?void 0:y.textContent)??"").trim())},[]),children:c.jsx(df.ItemSlot,{scope:n,value:r,disabled:s,textValue:d,children:c.jsx(we.div,{role:"option","aria-labelledby":v,"data-highlighted":p?"":void 0,"aria-selected":u&&p,"data-state":u?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...i,ref:g,onFocus:X(i.onFocus,()=>x(!0)),onBlur:X(i.onBlur,()=>x(!1)),onPointerUp:X(i.onPointerUp,_),onPointerMove:X(i.onPointerMove,y=>{var m;s?(m=l.onItemLeave)==null||m.call(l):y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:X(i.onPointerLeave,y=>{var m;y.currentTarget===document.activeElement&&((m=l.onItemLeave)==null||m.call(l))}),onKeyDown:X(i.onKeyDown,y=>{var w;((w=l.searchRef)==null?void 0:w.current)!==""&&y.key===" "||(dV.includes(y.key)&&_(),y.key===" "&&y.preventDefault())})})})})});tE.displayName=cd;var Pa="SelectItemText",nE=h.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,...o}=e,i=oo(Pa,n),a=io(Pa,n),l=eE(Pa,n),u=mV(Pa,n),[d,f]=h.useState(null),p=Ae(t,y=>f(y),l.onItemTextChange,y=>{var m;return(m=a.itemTextRefCallback)==null?void 0:m.call(a,y,l.value,l.disabled)}),x=d==null?void 0:d.textContent,g=h.useMemo(()=>c.jsx("option",{value:l.value,disabled:l.disabled,children:x},l.value),[l.disabled,l.value,x]),{onNativeOptionAdd:v,onNativeOptionRemove:_}=u;return en(()=>(v(g),()=>_(g)),[v,_,g]),c.jsxs(c.Fragment,{children:[c.jsx(we.span,{id:l.textId,...o,ref:p}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?cs.createPortal(o.children,i.valueNode):null]})});nE.displayName=Pa;var rE="SelectItemIndicator",sE=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return eE(rE,n).isSelected?c.jsx(we.span,{"aria-hidden":!0,...r,ref:t}):null});sE.displayName=rE;var Fp="SelectScrollUpButton",oE=h.forwardRef((e,t)=>{const n=io(Fp,e.__scopeSelect),r=uv(Fp,e.__scopeSelect),[s,o]=h.useState(!1),i=Ae(t,r.onScrollButtonChange);return en(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=l.scrollTop>0;o(u)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?c.jsx(aE,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});oE.displayName=Fp;var Up="SelectScrollDownButton",iE=h.forwardRef((e,t)=>{const n=io(Up,e.__scopeSelect),r=uv(Up,e.__scopeSelect),[s,o]=h.useState(!1),i=Ae(t,r.onScrollButtonChange);return en(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?c.jsx(aE,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});iE.displayName=Up;var aE=h.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=e,o=io("SelectScrollButton",n),i=h.useRef(null),a=ff(n),l=h.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return h.useEffect(()=>()=>l(),[l]),en(()=>{var d;const u=a().find(f=>f.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[a]),c.jsx(we.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:X(s.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:X(s.onPointerMove,()=>{var u;(u=o.onItemLeave)==null||u.call(o),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:X(s.onPointerLeave,()=>{l()})})}),kV="SelectSeparator",lE=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return c.jsx(we.div,{"aria-hidden":!0,...r,ref:t})});lE.displayName=kV;var $p="SelectArrow",EV=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=hf(n),o=oo($p,n),i=io($p,n);return o.open&&i.position==="popper"?c.jsx(lg,{...s,...r,ref:t}):null});EV.displayName=$p;function cE(e){return e===""||e===void 0}var uE=h.forwardRef((e,t)=>{const{value:n,...r}=e,s=h.useRef(null),o=Ae(t,s),i=qg(n);return h.useEffect(()=>{const a=s.current,l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==n&&d){const f=new Event("change",{bubbles:!0});d.call(a,n),a.dispatchEvent(f)}},[i,n]),c.jsx(ec,{asChild:!0,children:c.jsx("select",{...r,ref:o,defaultValue:n})})});uE.displayName="BubbleSelect";function dE(e){const t=Jt(e),n=h.useRef(""),r=h.useRef(0),s=h.useCallback(i=>{const a=n.current+i;t(a),function l(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),o=h.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return h.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,o]}function fE(e,t,n){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let i=TV(e,Math.max(o,0));s.length===1&&(i=i.filter(u=>u!==n));const l=i.find(u=>u.textValue.toLowerCase().startsWith(s.toLowerCase()));return l!==n?l:void 0}function TV(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var NV=Fk,hE=$k,RV=zk,PV=Wk,jV=Yk,pE=Bk,DV=Zk,MV=Qk,mE=Jk,gE=tE,OV=nE,AV=sE,vE=oE,yE=iE,xE=lE;const Xx=NV,Jx=MV,ew=RV,Vp=h.forwardRef(({className:e,children:t,...n},r)=>c.jsxs(hE,{ref:r,className:ae("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),...n,children:[t,c.jsx(PV,{asChild:!0,children:c.jsx(L_,{className:"h-4 w-4 opacity-50"})})]}));Vp.displayName=hE.displayName;const wE=h.forwardRef(({className:e,...t},n)=>c.jsx(vE,{ref:n,className:ae("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(lj,{className:"h-4 w-4"})}));wE.displayName=vE.displayName;const _E=h.forwardRef(({className:e,...t},n)=>c.jsx(yE,{ref:n,className:ae("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(L_,{className:"h-4 w-4"})}));_E.displayName=yE.displayName;const zp=h.forwardRef(({className:e,children:t,position:n="popper",...r},s)=>c.jsx(jV,{children:c.jsxs(pE,{ref:s,className:ae("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",n==="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:n,...r,children:[c.jsx(wE,{}),c.jsx(DV,{className:ae("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),c.jsx(_E,{})]})}));zp.displayName=pE.displayName;const Wp=h.forwardRef(({className:e,...t},n)=>c.jsx(mE,{ref:n,className:ae("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Wp.displayName=mE.displayName;const Yp=h.forwardRef(({className:e,children:t,...n},r)=>c.jsxs(gE,{ref:r,className:ae("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),...n,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(AV,{children:c.jsx(I_,{className:"h-4 w-4"})})}),c.jsx(OV,{children:t})]}));Yp.displayName=gE.displayName;const IV=h.forwardRef(({className:e,...t},n)=>c.jsx(xE,{ref:n,className:ae("-mx-1 my-1 h-px bg-muted",e),...t}));IV.displayName=xE.displayName;const Bp=new Map([["aliyun-cdn",["阿里云-CDN","/imgs/providers/aliyun.svg"]],["aliyun-oss",["阿里云-OSS","/imgs/providers/aliyun.svg"]],["ssh",["SSH部署","/imgs/providers/ssh.png"]]]),LV=Array.from(Bp.keys()),FV=Sg,UV=bg,$V=Cg,SE=h.forwardRef(({className:e,...t},n)=>c.jsx(Bl,{ref:n,className:ae("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}));SE.displayName=Bl.displayName;const bE=h.forwardRef(({className:e,children:t,...n},r)=>c.jsxs($V,{children:[c.jsx(SE,{}),c.jsxs(Hl,{ref:r,className:ae("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),...n,children:[t,c.jsxs(zd,{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:[c.jsx(Ym,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));bE.displayName=Hl.displayName;const CE=({className:e,...t})=>c.jsx("div",{className:ae("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});CE.displayName="DialogHeader";const kE=h.forwardRef(({className:e,...t},n)=>c.jsx(Gl,{ref:n,className:ae("text-lg font-semibold leading-none tracking-tight",e),...t}));kE.displayName=Gl.displayName;const VV=h.forwardRef(({className:e,...t},n)=>c.jsx(Kl,{ref:n,className:ae("text-sm text-muted-foreground",e),...t}));VV.displayName=Kl.displayName;const Co=new Map([["tencent",["腾讯云","/imgs/providers/tencent.svg"]],["aliyun",["阿里云","/imgs/providers/aliyun.svg"]],["ssh",["SSH部署","/imgs/providers/ssh.png"]]]),dv=Ie.union([Ie.literal("aliyun"),Ie.literal("tencent"),Ie.literal("ssh")],{message:"请选择云服务商"}),zV=({data:e,onAfterReq:t})=>{const{addAccess:n,updateAccess:r}=Jl(),s=Ie.object({id:Ie.string().optional(),name:Ie.string().min(1).max(64),configType:dv,secretId:Ie.string().min(1).max(64),secretKey:Ie.string().min(1).max(64)});let o={secretId:"",secretKey:""};e&&(o=e.config);const i=nc({resolver:rc(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 u={id:l.id,name:l.name,configType:l.configType,config:{secretId:l.secretId,secretKey:l.secretKey}};try{const d=await Zg(u);if(t(),u.id=d.id,u.created=d.created,u.updated=d.updated,l.id){r(u);return}n(u)}catch(d){Object.entries(d.response.data).forEach(([p,x])=>{i.setError(p,{type:"manual",message:x.message})})}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(oc,{...i,children:c.jsxs("form",{onSubmit:l=>{l.stopPropagation(),i.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(tt,{control:i.control,name:"name",render:({field:l})=>c.jsxs(qe,{children:[c.jsx(Qe,{children:"名称"}),c.jsx(Xe,{children:c.jsx(ct,{placeholder:"请输入授权名称",...l})}),c.jsx(He,{})]})}),c.jsx(tt,{control:i.control,name:"id",render:({field:l})=>c.jsxs(qe,{className:"hidden",children:[c.jsx(Qe,{children:"配置类型"}),c.jsx(Xe,{children:c.jsx(ct,{...l})}),c.jsx(He,{})]})}),c.jsx(tt,{control:i.control,name:"configType",render:({field:l})=>c.jsxs(qe,{className:"hidden",children:[c.jsx(Qe,{children:"配置类型"}),c.jsx(Xe,{children:c.jsx(ct,{...l})}),c.jsx(He,{})]})}),c.jsx(tt,{control:i.control,name:"secretId",render:({field:l})=>c.jsxs(qe,{children:[c.jsx(Qe,{children:"SecretId"}),c.jsx(Xe,{children:c.jsx(ct,{placeholder:"请输入SecretId",...l})}),c.jsx(He,{})]})}),c.jsx(tt,{control:i.control,name:"secretKey",render:({field:l})=>c.jsxs(qe,{children:[c.jsx(Qe,{children:"SecretKey"}),c.jsx(Xe,{children:c.jsx(ct,{placeholder:"请输入SecretKey",...l})}),c.jsx(He,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(jt,{type:"submit",children:"保存"})})]})})})})},WV=({data:e,onAfterReq:t})=>{const{addAccess:n,updateAccess:r}=Jl(),s=Ie.object({id:Ie.string().optional(),name:Ie.string().min(1).max(64),configType:dv,accessKeyId:Ie.string().min(1).max(64),accessSecretId:Ie.string().min(1).max(64)});let o={accessKeyId:"",accessKeySecret:""};e&&(o=e.config);const i=nc({resolver:rc(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 u={id:l.id,name:l.name,configType:l.configType,config:{accessKeyId:l.accessKeyId,accessKeySecret:l.accessSecretId}};try{const d=await Zg(u);if(t(),u.id=d.id,u.created=d.created,u.updated=d.updated,l.id){r(u);return}n(u)}catch(d){Object.entries(d.response.data).forEach(([p,x])=>{i.setError(p,{type:"manual",message:x.message})});return}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(oc,{...i,children:c.jsxs("form",{onSubmit:l=>{l.stopPropagation(),i.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(tt,{control:i.control,name:"name",render:({field:l})=>c.jsxs(qe,{children:[c.jsx(Qe,{children:"名称"}),c.jsx(Xe,{children:c.jsx(ct,{placeholder:"请输入授权名称",...l})}),c.jsx(He,{})]})}),c.jsx(tt,{control:i.control,name:"id",render:({field:l})=>c.jsxs(qe,{className:"hidden",children:[c.jsx(Qe,{children:"配置类型"}),c.jsx(Xe,{children:c.jsx(ct,{...l})}),c.jsx(He,{})]})}),c.jsx(tt,{control:i.control,name:"configType",render:({field:l})=>c.jsxs(qe,{className:"hidden",children:[c.jsx(Qe,{children:"配置类型"}),c.jsx(Xe,{children:c.jsx(ct,{...l})}),c.jsx(He,{})]})}),c.jsx(tt,{control:i.control,name:"accessKeyId",render:({field:l})=>c.jsxs(qe,{children:[c.jsx(Qe,{children:"AccessKeyId"}),c.jsx(Xe,{children:c.jsx(ct,{placeholder:"请输入AccessKeyId",...l})}),c.jsx(He,{})]})}),c.jsx(tt,{control:i.control,name:"accessSecretId",render:({field:l})=>c.jsxs(qe,{children:[c.jsx(Qe,{children:"AccessKeySecret"}),c.jsx(Xe,{children:c.jsx(ct,{placeholder:"请输入AccessKeySecret",...l})}),c.jsx(He,{})]})}),c.jsx(He,{}),c.jsx("div",{className:"flex justify-end",children:c.jsx(jt,{type:"submit",children:"保存"})})]})})})})};var fv="Radio",[YV,EE]=An(fv),[BV,HV]=YV(fv),TE=h.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:s=!1,required:o,disabled:i,value:a="on",onCheck:l,...u}=e,[d,f]=h.useState(null),p=Ae(t,v=>f(v)),x=h.useRef(!1),g=d?!!d.closest("form"):!0;return c.jsxs(BV,{scope:n,checked:s,disabled:i,children:[c.jsx(we.button,{type:"button",role:"radio","aria-checked":s,"data-state":PE(s),"data-disabled":i?"":void 0,disabled:i,value:a,...u,ref:p,onClick:X(e.onClick,v=>{s||l==null||l(),g&&(x.current=v.isPropagationStopped(),x.current||v.stopPropagation())})}),g&&c.jsx(GV,{control:d,bubbles:!x.current,name:r,value:a,checked:s,required:o,disabled:i,style:{transform:"translateX(-100%)"}})]})});TE.displayName=fv;var NE="RadioIndicator",RE=h.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...s}=e,o=HV(NE,n);return c.jsx(fr,{present:r||o.checked,children:c.jsx(we.span,{"data-state":PE(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:t})})});RE.displayName=NE;var GV=e=>{const{control:t,checked:n,bubbles:r=!0,...s}=e,o=h.useRef(null),i=qg(n),a=ng(t);return h.useEffect(()=>{const l=o.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(i!==n&&f){const p=new Event("click",{bubbles:r});f.call(l,n),l.dispatchEvent(p)}},[i,n,r]),c.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:o,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function PE(e){return e?"checked":"unchecked"}var KV=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],hv="RadioGroup",[ZV,Sz]=An(hv,[Ld,EE]),jE=Ld(),DE=EE(),[qV,QV]=ZV(hv),ME=h.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:s,value:o,required:i=!1,disabled:a=!1,orientation:l,dir:u,loop:d=!0,onValueChange:f,...p}=e,x=jE(n),g=Dd(u),[v,_]=rs({prop:o,defaultProp:s,onChange:f});return c.jsx(qV,{scope:n,name:r,required:i,disabled:a,value:v,onValueChange:_,children:c.jsx(SS,{asChild:!0,...x,orientation:l,dir:g,loop:d,children:c.jsx(we.div,{role:"radiogroup","aria-required":i,"aria-orientation":l,"data-disabled":a?"":void 0,dir:g,...p,ref:t})})})});ME.displayName=hv;var OE="RadioGroupItem",AE=h.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...s}=e,o=QV(OE,n),i=o.disabled||r,a=jE(n),l=DE(n),u=h.useRef(null),d=Ae(t,u),f=o.value===s.value,p=h.useRef(!1);return h.useEffect(()=>{const x=v=>{KV.includes(v.key)&&(p.current=!0)},g=()=>p.current=!1;return document.addEventListener("keydown",x),document.addEventListener("keyup",g),()=>{document.removeEventListener("keydown",x),document.removeEventListener("keyup",g)}},[]),c.jsx(bS,{asChild:!0,...a,focusable:!i,active:f,children:c.jsx(TE,{disabled:i,required:o.required,checked:f,...l,...s,name:o.name,ref:d,onCheck:()=>o.onValueChange(s.value),onKeyDown:X(x=>{x.key==="Enter"&&x.preventDefault()}),onFocus:X(s.onFocus,()=>{var x;p.current&&((x=u.current)==null||x.click())})})})});AE.displayName=OE;var XV="RadioGroupIndicator",IE=h.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,s=DE(n);return c.jsx(RE,{...s,...r,ref:t})});IE.displayName=XV;var LE=ME,FE=AE,JV=IE;const pv=h.forwardRef(({className:e,...t},n)=>c.jsx(LE,{className:ae("grid gap-2",e),...t,ref:n}));pv.displayName=LE.displayName;const mv=h.forwardRef(({className:e,...t},n)=>c.jsx(FE,{ref:n,className:ae("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:c.jsx(JV,{className:"flex items-center justify-center",children:c.jsx($_,{className:"h-2.5 w-2.5 fill-current text-current"})})}));mv.displayName=FE.displayName;const UE=h.forwardRef(({className:e,...t},n)=>c.jsx("textarea",{className:ae("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:n,...t}));UE.displayName="Textarea";function ez(e){return new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{r.result?t(r.result.toString()):n("No content found")},r.onerror=()=>n(r.error),r.readAsText(e)})}const tz=({data:e,onAfterReq:t})=>{const{addAccess:n,updateAccess:r}=Jl(),s=Ie.object({id:Ie.string().optional(),name:Ie.string().min(1).max(64),configType:dv,host:Ie.string().ip({message:"请输入合法的IP地址"}),port:Ie.string().min(1).max(5),username:Ie.string().min(1).max(64),password:Ie.string().min(0).max(64),key:Ie.string().min(0).max(20480),keyFile:Ie.string().optional(),command:Ie.string().min(1).max(2048),certPath:Ie.string().min(0).max(2048),keyPath:Ie.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=nc({resolver:rc(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 u=>{console.log(u);const d={id:u.id,name:u.name,configType:u.configType,config:{host:u.host,port:u.port,username:u.username,password:u.password,key:u.key,command:u.command,certPath:u.certPath,keyPath:u.keyPath}};try{const f=await Zg(d);if(t(),d.id=f.id,d.created=f.created,d.updated=f.updated,u.id){r(d);return}n(d)}catch(f){Object.entries(f.response.data).forEach(([x,g])=>{i.setError(x,{type:"manual",message:g.message})});return}},l=async u=>{var p;const d=(p=u.target.files)==null?void 0:p[0];if(!d)return;const f=await ez(d);i.setValue("key",f),i.setValue("keyFile","")};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(oc,{...i,children:c.jsxs("form",{onSubmit:u=>{u.stopPropagation(),i.handleSubmit(a)(u)},className:"space-y-3",children:[c.jsx(tt,{control:i.control,name:"name",render:({field:u})=>c.jsxs(qe,{children:[c.jsx(Qe,{children:"名称"}),c.jsx(Xe,{children:c.jsx(ct,{placeholder:"请输入授权名称",...u})}),c.jsx(He,{})]})}),c.jsx(tt,{control:i.control,name:"id",render:({field:u})=>c.jsxs(qe,{className:"hidden",children:[c.jsx(Qe,{children:"配置类型"}),c.jsx(Xe,{children:c.jsx(ct,{...u})}),c.jsx(He,{})]})}),c.jsx(tt,{control:i.control,name:"configType",render:({field:u})=>c.jsxs(qe,{className:"hidden",children:[c.jsx(Qe,{children:"配置类型"}),c.jsx(Xe,{children:c.jsx(ct,{...u})}),c.jsx(He,{})]})}),c.jsxs("div",{className:"flex space-x-2",children:[c.jsx(tt,{control:i.control,name:"host",render:({field:u})=>c.jsxs(qe,{className:"grow",children:[c.jsx(Qe,{children:"服务器IP"}),c.jsx(Xe,{children:c.jsx(ct,{placeholder:"请输入Host",...u})}),c.jsx(He,{})]})}),c.jsx(tt,{control:i.control,name:"port",render:({field:u})=>c.jsxs(qe,{children:[c.jsx(Qe,{children:"SSH端口"}),c.jsx(Xe,{children:c.jsx(ct,{placeholder:"请输入Port",...u,type:"number"})}),c.jsx(He,{})]})})]}),c.jsx(tt,{control:i.control,name:"username",render:({field:u})=>c.jsxs(qe,{children:[c.jsx(Qe,{children:"用户名"}),c.jsx(Xe,{children:c.jsx(ct,{placeholder:"请输入用户名",...u})}),c.jsx(He,{})]})}),c.jsx(tt,{control:i.control,name:"password",render:({field:u})=>c.jsxs(qe,{children:[c.jsx(Qe,{children:"密码"}),c.jsx(Xe,{children:c.jsx(ct,{placeholder:"请输入密码",...u})}),c.jsx(He,{})]})}),c.jsx(tt,{control:i.control,name:"key",render:({field:u})=>c.jsxs(qe,{hidden:!0,children:[c.jsx(Qe,{children:"Key(使用证书登录)"}),c.jsx(Xe,{children:c.jsx(ct,{placeholder:"请输入Key",...u})}),c.jsx(He,{})]})}),c.jsx(tt,{control:i.control,name:"keyFile",render:({field:u})=>c.jsxs(qe,{children:[c.jsx(Qe,{children:"Key(使用证书登录)"}),c.jsx(Xe,{children:c.jsx(ct,{placeholder:"请输入Key",...u,type:"file",onChange:l})}),c.jsx(He,{})]})}),c.jsx(tt,{control:i.control,name:"certPath",render:({field:u})=>c.jsxs(qe,{children:[c.jsx(Qe,{children:"证书上传路径"}),c.jsx(Xe,{children:c.jsx(ct,{placeholder:"请输入证书上传路径",...u})}),c.jsx(He,{})]})}),c.jsx(tt,{control:i.control,name:"keyPath",render:({field:u})=>c.jsxs(qe,{children:[c.jsx(Qe,{children:"私钥上传路径"}),c.jsx(Xe,{children:c.jsx(ct,{placeholder:"请输入私钥上传路径",...u})}),c.jsx(He,{})]})}),c.jsx(tt,{control:i.control,name:"command",render:({field:u})=>c.jsxs(qe,{children:[c.jsx(Qe,{children:"Command"}),c.jsx(Xe,{children:c.jsx(UE,{placeholder:"请输入要执行的命令",...u})}),c.jsx(He,{})]})}),c.jsx(He,{}),c.jsx("div",{className:"flex justify-end",children:c.jsx(jt,{type:"submit",children:"保存"})})]})})})})};function Ya({trigger:e,op:t,data:n,className:r}){const[s,o]=h.useState(!1),i=Array.from(Co.keys()),[a,l]=h.useState((n==null?void 0:n.configType)||"");let u=c.jsx(c.Fragment,{children:" "});switch(a){case"tencent":u=c.jsx(zV,{data:n,onAfterReq:()=>{o(!1)}});break;case"aliyun":u=c.jsx(WV,{data:n,onAfterReq:()=>{o(!1)}});break;case"ssh":u=c.jsx(tz,{data:n,onAfterReq:()=>{o(!1)}});break}const d=f=>f==a?"border-primary":"";return c.jsxs(FV,{onOpenChange:o,open:s,children:[c.jsx(UV,{asChild:!0,className:ae(r),children:e}),c.jsxs(bE,{className:"sm:max-w-[600px] w-full",children:[c.jsx(CE,{children:c.jsxs(kE,{children:[t=="add"?"添加":"编辑","授权"]})}),c.jsxs("div",{className:"container",children:[c.jsx(Ol,{children:"服务商"}),c.jsx(pv,{value:a,className:"flex mt-3 space-x-2",onValueChange:l,children:i.map(f=>{var p,x;return c.jsxs("div",{className:"flex items-center space-x-2",children:[c.jsx(mv,{value:f,id:f,hidden:!0}),c.jsx(Ol,{htmlFor:f,children:c.jsxs("div",{className:ae("flex items-center space-x-2 border p-2 rounded cursor-pointer",d(f)),children:[c.jsx("img",{src:(p=Co.get(f))==null?void 0:p[1],className:"h-6"}),c.jsx("div",{children:(x=Co.get(f))==null?void 0:x[0]})]})})]},f)})}),u]})]})]})}const nz=()=>{const{config:{accesses:e}}=Jl(),[t,n]=h.useState(),r=ro();h.useEffect(()=>{const g=new URLSearchParams(r.search).get("id");g&&(async()=>{const _=await IU(g);n(_)})()},[r.search]);const s=Ie.object({id:Ie.string().optional(),domain:Ie.string().regex(new RegExp("^(?!-)[A-Za-z0-9-]{1,63}(?{t&&o.reset({id:t.id,domain:t.domain,access:t.access,targetAccess:t.targetAccess,targetType:t.targetType})},[t,o]);const[i,a]=h.useState(t?t.targetType:""),l=e.filter(x=>{if(i=="")return!0;const g=o.getValues().targetType.split("-");return x.configType===g[0]}),{toast:u}=tv(),d=so(),f=async x=>{const g={id:x.id,crontab:"0 0 * * *",domain:x.domain,access:x.access,targetAccess:x.targetAccess,targetType:x.targetType};try{await jp(g);let v="域名编辑成功";g.id==""&&(v="域名添加成功"),u({title:"成功",description:v}),d("/")}catch(v){Object.entries(v.response.data).forEach(([y,m])=>{o.setError(y,{type:"manual",message:m.message})});return}},p=x=>o.getValues().targetType==x?"border-primary":"";return c.jsx(c.Fragment,{children:c.jsxs("div",{className:"",children:[c.jsx(JC,{}),c.jsxs("div",{className:"border-b h-10 text-muted-foreground",children:[t!=null&&t.id?"编辑":"新增","域名"]}),c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(oc,{...o,children:c.jsxs("form",{onSubmit:o.handleSubmit(f),className:"space-y-8",children:[c.jsx(tt,{control:o.control,name:"domain",render:({field:x})=>c.jsxs(qe,{children:[c.jsx(Qe,{children:"域名"}),c.jsx(Xe,{children:c.jsx(ct,{placeholder:"请输入域名",...x})}),c.jsx(He,{})]})}),c.jsx(tt,{control:o.control,name:"access",render:({field:x})=>c.jsxs(qe,{children:[c.jsxs(Qe,{className:"flex w-full justify-between",children:[c.jsx("div",{children:"DNS 服务商授权配置"}),c.jsx(Ya,{trigger:c.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[c.jsx(ex,{size:14}),"新增"]}),op:"add"})]}),c.jsx(Xe,{children:c.jsxs(Xx,{...x,value:x.value,onValueChange:g=>{o.setValue("access",g)},children:[c.jsx(Vp,{children:c.jsx(ew,{placeholder:"请选择授权配置"})}),c.jsx(zp,{children:c.jsxs(Jx,{children:[c.jsx(Wp,{children:"服务商授权配置"}),e.map(g=>{var v;return c.jsx(Yp,{value:g.id,children:c.jsxs("div",{className:"flex items-center space-x-2",children:[c.jsx("img",{className:"w-6",src:(v=Co.get(g.configType))==null?void 0:v[1]}),c.jsx("div",{children:g.name})]})},g.id)})]})})]})}),c.jsx(He,{})]})}),c.jsx(tt,{control:o.control,name:"targetType",render:({field:x})=>c.jsxs(qe,{children:[c.jsx(Qe,{children:"部署服务类型"}),c.jsx(Xe,{children:c.jsx(pv,{className:"flex mt-3 space-x-2",onValueChange:g=>{a(g),o.setValue("targetType",g)},...x,children:LV.map(g=>{var v,_;return c.jsx("div",{className:"flex items-center space-x-2",children:c.jsxs(Ol,{children:[c.jsx(mv,{value:g,id:g,hidden:!0}),c.jsxs("div",{className:ae("flex items-center space-x-2 border p-2 rounded cursor-pointer",p(g)),children:[c.jsx("img",{src:(v=Bp.get(g))==null?void 0:v[1],className:"h-6"}),c.jsx("div",{children:(_=Bp.get(g))==null?void 0:_[0]})]})]})},g)})})}),c.jsx(He,{})]})}),c.jsx(tt,{control:o.control,name:"targetAccess",render:({field:x})=>c.jsxs(qe,{children:[c.jsxs(Qe,{className:"w-full flex justify-between",children:[c.jsx("div",{children:"部署服务商授权配置"}),c.jsx(Ya,{trigger:c.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[c.jsx(ex,{size:14}),"新增"]}),op:"add"})]}),c.jsx(Xe,{children:c.jsxs(Xx,{...x,onValueChange:g=>{o.setValue("targetAccess",g)},children:[c.jsx(Vp,{children:c.jsx(ew,{placeholder:"请选择授权配置"})}),c.jsx(zp,{children:c.jsxs(Jx,{children:[c.jsx(Wp,{children:"服务商授权配置"}),l.map(g=>{var v;return c.jsx(Yp,{value:g.id,children:c.jsxs("div",{className:"flex items-center space-x-2",children:[c.jsx("img",{className:"w-6",src:(v=Co.get(g.configType))==null?void 0:v[1]}),c.jsx("div",{children:g.name})]})},g.id)})]})})]})}),c.jsx(He,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(jt,{type:"submit",children:"保存"})})]})})})]})})},rz=()=>{const{config:e,deleteAccess:t}=Jl(),{accesses:n}=e,r=async s=>{const o=await h4(s);t(o.id)};return c.jsxs("div",{className:"",children:[c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsx("div",{className:"text-muted-foreground",children:"授权管理"}),c.jsx(Ya,{trigger:c.jsx(jt,{children:"添加授权"}),op:"add"})]}),n.length===0?c.jsxs("div",{className:"flex flex-col items-center mt-10",children:[c.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:c.jsx(uj,{size:40,className:"text-primary"})}),c.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:"请添加授权开始部署证书吧。"}),c.jsx(Ya,{trigger:c.jsx(jt,{children:"添加授权"}),op:"add",className:"mt-3"})]}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b sm:p-2 mt-5",children:[c.jsx("div",{className:"w-48",children:"名称"}),c.jsx("div",{className:"w-48",children:"服务商"}),c.jsx("div",{className:"w-52",children:"创建时间"}),c.jsx("div",{className:"w-52",children:"更新时间"}),c.jsx("div",{className:"grow",children:"操作"})]}),c.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"授权列表"}),n.map(s=>{var o,i;return c.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b sm:p-2 hover:bg-muted/50 text-sm",children:[c.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:s.name}),c.jsxs("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center space-x-2",children:[c.jsx("img",{src:(o=Co.get(s.configType))==null?void 0:o[1],className:"w-6"}),c.jsx("div",{children:(i=Co.get(s.configType))==null?void 0:i[0]})]}),c.jsxs("div",{className:"sm:w-52 w-full pt-1 sm:pt-0 flex items-center",children:["创建于 ",s.created&&xl(s.created)]}),c.jsxs("div",{className:"sm:w-52 w-full pt-1 sm:pt-0 flex items-center",children:["更新于 ",s.updated&&xl(s.updated)]}),c.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[c.jsx(Ya,{trigger:c.jsx(jt,{variant:"link",className:"p-0",children:"编辑"}),op:"edit",data:s}),c.jsx(Wt,{orientation:"vertical",className:"h-4 mx-2"}),c.jsx(jt,{variant:"link",className:"p-0",onClick:()=>{r(s)},children:"删除"})]})]},s.id)})]})]})},sz=$l("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"}}),$E=h.forwardRef(({className:e,variant:t,...n},r)=>c.jsx("div",{ref:r,role:"alert",className:ae(sz({variant:t}),e),...n}));$E.displayName="Alert";const VE=h.forwardRef(({className:e,...t},n)=>c.jsx("h5",{ref:n,className:ae("mb-1 font-medium leading-none tracking-tight",e),...t}));VE.displayName="AlertTitle";const zE=h.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:ae("text-sm [&_p]:leading-relaxed",e),...t}));zE.displayName="AlertDescription";const oz=async e=>{let t=1;e.page&&(t=e.page);let n=50;e.perPage&&(n=e.perPage);let r="domain!=null";return e.domain&&(r=`domain="${e.domain}"`),await qt().collection("deployments").getList(t,n,{filter:r,sort:"-deployedAt",expand:"domain"})},iz=()=>{const e=so(),[t,n]=h.useState(),[r]=rj(),s=r.get("domain");return h.useEffect(()=>{(async()=>{const i={};s&&(i.domain=s);const a=await oz(i);n(a.items)})()},[s]),c.jsxs("div",{children:[c.jsx("div",{className:"text-muted-foreground",children:"部署历史"}),t!=null&&t.length?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b sm:p-2 mt-5",children:[c.jsx("div",{className:"w-48",children:"域名"}),c.jsx("div",{className:"w-24",children:"状态"}),c.jsx("div",{className:"w-56",children:"阶段"}),c.jsx("div",{className:"w-56 sm:ml-2 text-center",children:"最近执行时间"}),c.jsx("div",{className:"grow",children:"操作"})]}),c.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"部署历史"}),t==null?void 0:t.map(o=>{var i,a;return c.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b sm:p-2 hover:bg-muted/50 text-sm",children:[c.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}),c.jsx("div",{className:"sm:w-24 w-full pt-1 sm:pt-0 flex items-center",children:o.phase==="deploy"&&o.phaseSuccess?c.jsx(F_,{size:16,className:"text-green-700"}):c.jsx(U_,{size:16,className:"text-red-700"})}),c.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center",children:c.jsx(Zb,{phase:o.phase,phaseSuccess:o.phaseSuccess})}),c.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center sm:justify-center",children:xl(o.deployedAt)}),c.jsx("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0 sm:ml-2",children:c.jsxs(H1,{children:[c.jsx(G1,{asChild:!0,children:c.jsx(jt,{variant:"link",className:"p-0",children:"日志"})}),c.jsxs(kg,{className:"sm:max-w-5xl",children:[c.jsx(Z1,{children:c.jsxs(q1,{children:[(a=o.expand.domain)==null?void 0:a.domain,"-",o.id,"部署详情"]})}),c.jsxs("div",{className:"bg-gray-950 text-stone-100 p-5 text-sm h-[80dvh]",children:[o.log.check&&c.jsx(c.Fragment,{children:o.log.check.map(l=>c.jsxs("div",{className:"flex flex-col mt-2",children:[c.jsxs("div",{className:"flex",children:[c.jsxs("div",{children:["[",l.time,"]"]}),c.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&c.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))}),o.log.apply&&c.jsx(c.Fragment,{children:o.log.apply.map(l=>c.jsxs("div",{className:"flex flex-col mt-2",children:[c.jsxs("div",{className:"flex",children:[c.jsxs("div",{children:["[",l.time,"]"]}),c.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&c.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))}),o.log.deploy&&c.jsx(c.Fragment,{children:o.log.deploy.map(l=>c.jsxs("div",{className:"flex flex-col mt-2",children:[c.jsxs("div",{className:"flex",children:[c.jsxs("div",{children:["[",l.time,"]"]}),c.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&c.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))})]})]})]})})]},o.id)})]}):c.jsx(c.Fragment,{children:c.jsxs($E,{className:"max-w-[40em] mx-auto mt-20",children:[c.jsx(VE,{children:"暂无数据"}),c.jsxs(zE,{children:[c.jsxs("div",{className:"flex items-center mt-5",children:[c.jsx("div",{children:c.jsx(fj,{className:"text-yellow-400",size:36})}),c.jsxs("div",{className:"ml-2",children:[" ","你暂未创建任何部署,请先添加域名进行部署吧!"]})]}),c.jsx("div",{className:"mt-2 flex justify-end",children:c.jsx(jt,{onClick:()=>{e("/")},children:"添加域名"})})]})]})})]})},az=e=>e instanceof Error?e.message:typeof e=="object"&&e!==null&&"message"in e?String(e.message):typeof e=="string"?e:"Something went wrong",lz=Ie.object({username:Ie.string().email({message:"请输入正确的邮箱地址"}),password:Ie.string().min(10,{message:"密码至少10个字符"})}),cz=()=>{const e=nc({resolver:rc(lz),defaultValues:{username:"",password:""}}),t=async r=>{try{await qt().admins.authWithPassword(r.username,r.password),n("/")}catch(s){const o=az(s);e.setError("username",{message:o}),e.setError("password",{message:o})}},n=so();return c.jsxs("div",{className:"max-w-[35em] border mx-auto mt-32 p-10 rounded-md shadow-md",children:[c.jsx("div",{className:"flex justify-center mb-10",children:c.jsx("img",{src:"/vite.svg",className:"w-16"})}),c.jsx(oc,{...e,children:c.jsxs("form",{onSubmit:e.handleSubmit(t),className:"space-y-8",children:[c.jsx(tt,{control:e.control,name:"username",render:({field:r})=>c.jsxs(qe,{children:[c.jsx(Qe,{children:"用户名"}),c.jsx(Xe,{children:c.jsx(ct,{placeholder:"email",...r})}),c.jsx(He,{})]})}),c.jsx(tt,{control:e.control,name:"password",render:({field:r})=>c.jsxs(qe,{children:[c.jsx(Qe,{children:"密码"}),c.jsx(Xe,{children:c.jsx(ct,{placeholder:"shadcn",...r,type:"password"})}),c.jsx(He,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(jt,{type:"submit",children:"登录"})})]})})]})},uz=()=>qt().authStore.isValid&&qt().authStore.isAdmin?c.jsx(M_,{to:"/"}):c.jsx("div",{className:"container",children:c.jsx(O_,{})}),dz=zP([{path:"/",element:c.jsx(g4,{}),children:[{path:"/",element:c.jsx(FU,{})},{path:"/edit",element:c.jsx(nz,{})},{path:"/access",element:c.jsx(rz,{})},{path:"/history",element:c.jsx(iz,{})}]},{path:"/login",element:c.jsx(uz,{}),children:[{path:"/login",element:c.jsx(cz,{})}]},{path:"/about",element:c.jsx("div",{children:"About"})}]);ph.createRoot(document.getElementById("root")).render(c.jsx(Me.StrictMode,{children:c.jsx(QP,{router:dz})}))});export default fz(); diff --git a/ui/dist/assets/index-5KJiNPtI.js b/ui/dist/assets/index-5KJiNPtI.js deleted file mode 100644 index 02c5989c..00000000 --- a/ui/dist/assets/index-5KJiNPtI.js +++ /dev/null @@ -1,228 +0,0 @@ -var TE=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var OV=TE((YV,hu)=>{function Bx(e,t){for(var n=0;nr[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"]'))r(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"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(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 r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();function Hx(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Gx={exports:{}},dd={},Kx={exports:{}},Re={};/** - * @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 Ll=Symbol.for("react.element"),NE=Symbol.for("react.portal"),RE=Symbol.for("react.fragment"),PE=Symbol.for("react.strict_mode"),DE=Symbol.for("react.profiler"),ME=Symbol.for("react.provider"),jE=Symbol.for("react.context"),OE=Symbol.for("react.forward_ref"),AE=Symbol.for("react.suspense"),IE=Symbol.for("react.memo"),LE=Symbol.for("react.lazy"),mv=Symbol.iterator;function FE(e){return e===null||typeof e!="object"?null:(e=mv&&e[mv]||e["@@iterator"],typeof e=="function"?e:null)}var Zx={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},qx=Object.assign,Qx={};function Wi(e,t,n){this.props=e,this.context=t,this.refs=Qx,this.updater=n||Zx}Wi.prototype.isReactComponent={};Wi.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")};Wi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Xx(){}Xx.prototype=Wi.prototype;function Bp(e,t,n){this.props=e,this.context=t,this.refs=Qx,this.updater=n||Zx}var Hp=Bp.prototype=new Xx;Hp.constructor=Bp;qx(Hp,Wi.prototype);Hp.isPureReactComponent=!0;var gv=Array.isArray,Jx=Object.prototype.hasOwnProperty,Gp={current:null},ew={key:!0,ref:!0,__self:!0,__source:!0};function tw(e,t,n){var r,s={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)Jx.call(t,r)&&!ew.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1>>1,me=I[ae];if(0>>1;aes(ct,q))Fes(le,ct)?(I[ae]=le,I[Fe]=q,ae=Fe):(I[ae]=ct,I[Pe]=q,ae=Pe);else if(Fes(le,q))I[ae]=le,I[Fe]=q,ae=Fe;else break e}}return M}function s(I,M){var q=I.sortIndex-M.sortIndex;return q!==0?q:I.id-M.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=[],d=1,f=null,p=3,x=!1,y=!1,v=!1,_=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(I){for(var M=n(c);M!==null;){if(M.callback===null)r(c);else if(M.startTime<=I)r(c),M.sortIndex=M.expirationTime,t(l,M);else break;M=n(c)}}function b(I){if(v=!1,w(I),!y)if(n(l)!==null)y=!0,ne(C);else{var M=n(c);M!==null&&W(b,M.startTime-I)}}function C(I,M){y=!1,v&&(v=!1,g(R),R=-1),x=!0;var q=p;try{for(w(M),f=n(l);f!==null&&(!(f.expirationTime>M)||I&&!Z());){var ae=f.callback;if(typeof ae=="function"){f.callback=null,p=f.priorityLevel;var me=ae(f.expirationTime<=M);M=e.unstable_now(),typeof me=="function"?f.callback=me:f===n(l)&&r(l),w(M)}else r(l);f=n(l)}if(f!==null)var Qe=!0;else{var Pe=n(c);Pe!==null&&W(b,Pe.startTime-M),Qe=!1}return Qe}finally{f=null,p=q,x=!1}}var S=!1,N=null,R=-1,F=5,L=-1;function Z(){return!(e.unstable_now()-LI||125ae?(I.sortIndex=q,t(c,I),n(l)===null&&I===n(c)&&(v?(g(R),R=-1):v=!0,W(b,q-ae))):(I.sortIndex=me,t(l,I),y||x||(y=!0,ne(C))),I},e.unstable_shouldYield=Z,e.unstable_wrapCallback=function(I){var M=p;return function(){var q=p;p=M;try{return I.apply(this,arguments)}finally{p=q}}}})(aw);iw.exports=aw;var ZE=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 qE=h,Mn=ZE;function $(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),yh=Object.prototype.hasOwnProperty,QE=/^[: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]*$/,yv={},xv={};function XE(e){return yh.call(xv,e)?!0:yh.call(yv,e)?!1:QE.test(e)?xv[e]=!0:(yv[e]=!0,!1)}function JE(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function eT(e,t,n,r){if(t===null||typeof t>"u"||JE(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.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 un(e,t,n,r,s,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var Wt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Wt[e]=new un(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Wt[t]=new un(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Wt[e]=new un(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Wt[e]=new un(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){Wt[e]=new un(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Wt[e]=new un(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Wt[e]=new un(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Wt[e]=new un(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Wt[e]=new un(e,5,!1,e.toLowerCase(),null,!1,!1)});var Zp=/[\-:]([a-z])/g;function qp(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(Zp,qp);Wt[t]=new un(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(Zp,qp);Wt[t]=new un(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(Zp,qp);Wt[t]=new un(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Wt[e]=new un(e,1,!1,e.toLowerCase(),null,!1,!1)});Wt.xlinkHref=new un("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Wt[e]=new un(e,1,!1,e.toLowerCase(),null,!0,!0)});function Qp(e,t,n,r){var s=Wt.hasOwnProperty(t)?Wt[t]:null;(s!==null?s.type!==0:r||!(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{bf=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?_a(e):""}function tT(e){switch(e.tag){case 5:return _a(e.type);case 16:return _a("Lazy");case 13:return _a("Suspense");case 19:return _a("SuspenseList");case 0:case 2:case 15:return e=Cf(e.type,!1),e;case 11:return e=Cf(e.type.render,!1),e;case 1:return e=Cf(e.type,!0),e;default:return""}}function Sh(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 ni:return"Fragment";case ti:return"Portal";case xh:return"Profiler";case Xp:return"StrictMode";case wh:return"Suspense";case _h:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case uw:return(e.displayName||"Context")+".Consumer";case cw:return(e._context.displayName||"Context")+".Provider";case Jp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case em:return t=e.displayName||null,t!==null?t:Sh(e.type)||"Memo";case Cs:t=e._payload,e=e._init;try{return Sh(e(t))}catch{}}return null}function nT(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 Sh(t);case 8:return t===Xp?"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 Ws(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function fw(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function rT(e){var t=fw(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function pc(e){e._valueTracker||(e._valueTracker=rT(e))}function hw(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=fw(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function pu(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 bh(e,t){var n=t.checked;return gt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function _v(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ws(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function pw(e,t){t=t.checked,t!=null&&Qp(e,"checked",t,!1)}function Ch(e,t){pw(e,t);var n=Ws(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?kh(e,t.type,n):t.hasOwnProperty("defaultValue")&&kh(e,t.type,Ws(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Sv(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function kh(e,t,n){(t!=="number"||pu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Sa=Array.isArray;function vi(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s"+t.valueOf().toString()+"",t=mc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Za(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Pa={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},sT=["Webkit","ms","Moz","O"];Object.keys(Pa).forEach(function(e){sT.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Pa[t]=Pa[e]})});function yw(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Pa.hasOwnProperty(e)&&Pa[e]?(""+t).trim():t+"px"}function xw(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=yw(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var oT=gt({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 Nh(e,t){if(t){if(oT[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error($(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error($(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error($(61))}if(t.style!=null&&typeof t.style!="object")throw Error($(62))}}function Rh(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 Ph=null;function tm(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Dh=null,yi=null,xi=null;function kv(e){if(e=$l(e)){if(typeof Dh!="function")throw Error($(280));var t=e.stateNode;t&&(t=gd(t),Dh(e.stateNode,e.type,t))}}function ww(e){yi?xi?xi.push(e):xi=[e]:yi=e}function _w(){if(yi){var e=yi,t=xi;if(xi=yi=null,kv(e),t)for(e=0;e>>=0,e===0?32:31-(gT(e)/vT|0)|0}var gc=64,vc=4194304;function ba(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 yu(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~s;a!==0?r=ba(a):(o&=i,o!==0&&(r=ba(o)))}else i=n&~s,i!==0?r=ba(i):o!==0&&(r=ba(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,o=t&-t,s>=o||s===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Fl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-nr(t),e[t]=n}function _T(e,t){var n=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 r=e.eventTimes;for(e=e.expirationTimes;0=Ma),Ov=" ",Av=!1;function Vw(e,t){switch(e){case"keyup":return ZT.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zw(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ri=!1;function QT(e,t){switch(e){case"compositionend":return zw(t);case"keypress":return t.which!==32?null:(Av=!0,Ov);case"textInput":return e=t.data,e===Ov&&Av?null:e;default:return null}}function XT(e,t){if(ri)return e==="compositionend"||!cm&&Vw(e,t)?(e=Uw(),Bc=im=Rs=null,ri=!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:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Uv(n)}}function Hw(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Hw(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Gw(){for(var e=window,t=pu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=pu(e.document)}return t}function um(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 aN(e){var t=Gw(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Hw(n.ownerDocument.documentElement,n)){if(r!==null&&um(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,o=Math.min(r.start,s);r=r.end===void 0?o:Math.min(r.end,s),!e.extend&&o>r&&(s=r,r=o,o=s),s=$v(n,o);var i=$v(n,r);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>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,si=null,Lh=null,Oa=null,Fh=!1;function Vv(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Fh||si==null||si!==pu(r)||(r=si,"selectionStart"in r&&um(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Oa&&tl(Oa,r)||(Oa=r,r=_u(Lh,"onSelect"),0ai||(e.current=Yh[ai],Yh[ai]=null,ai--)}function et(e,t){ai++,Yh[ai]=e.current,e.current=t}var Ys={},Qt=eo(Ys),yn=eo(!1),Co=Ys;function Mi(e,t){var n=e.type.contextTypes;if(!n)return Ys;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in n)s[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function xn(e){return e=e.childContextTypes,e!=null}function bu(){rt(yn),rt(Qt)}function Kv(e,t,n){if(Qt.current!==Ys)throw Error($(168));et(Qt,t),et(yn,n)}function n0(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error($(108,nT(e)||"Unknown",s));return gt({},n,r)}function Cu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ys,Co=Qt.current,et(Qt,e),et(yn,yn.current),!0}function Zv(e,t,n){var r=e.stateNode;if(!r)throw Error($(169));n?(e=n0(e,t,Co),r.__reactInternalMemoizedMergedChildContext=e,rt(yn),rt(Qt),et(Qt,e)):rt(yn),et(yn,n)}var Wr=null,vd=!1,Ff=!1;function r0(e){Wr===null?Wr=[e]:Wr.push(e)}function xN(e){vd=!0,r0(e)}function to(){if(!Ff&&Wr!==null){Ff=!0;var e=0,t=Ke;try{var n=Wr;for(Ke=1;e>=i,s-=i,Yr=1<<32-nr(t)+s|n<R?(F=N,N=null):F=N.sibling;var L=p(g,N,w[R],b);if(L===null){N===null&&(N=F);break}e&&N&&L.alternate===null&&t(g,N),m=o(L,m,R),S===null?C=L:S.sibling=L,S=L,N=F}if(R===w.length)return n(g,N),lt&&lo(g,R),C;if(N===null){for(;RR?(F=N,N=null):F=N.sibling;var Z=p(g,N,L.value,b);if(Z===null){N===null&&(N=F);break}e&&N&&Z.alternate===null&&t(g,N),m=o(Z,m,R),S===null?C=Z:S.sibling=Z,S=Z,N=F}if(L.done)return n(g,N),lt&&lo(g,R),C;if(N===null){for(;!L.done;R++,L=w.next())L=f(g,L.value,b),L!==null&&(m=o(L,m,R),S===null?C=L:S.sibling=L,S=L);return lt&&lo(g,R),C}for(N=r(g,N);!L.done;R++,L=w.next())L=x(N,g,R,L.value,b),L!==null&&(e&&L.alternate!==null&&N.delete(L.key===null?R:L.key),m=o(L,m,R),S===null?C=L:S.sibling=L,S=L);return e&&N.forEach(function(j){return t(g,j)}),lt&&lo(g,R),C}function _(g,m,w,b){if(typeof w=="object"&&w!==null&&w.type===ni&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case hc:e:{for(var C=w.key,S=m;S!==null;){if(S.key===C){if(C=w.type,C===ni){if(S.tag===7){n(g,S.sibling),m=s(S,w.props.children),m.return=g,g=m;break e}}else if(S.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Cs&&Xv(C)===S.type){n(g,S.sibling),m=s(S,w.props),m.ref=ua(g,S,w),m.return=g,g=m;break e}n(g,S);break}else t(g,S);S=S.sibling}w.type===ni?(m=_o(w.props.children,g.mode,b,w.key),m.return=g,g=m):(b=Jc(w.type,w.key,w.props,null,g.mode,b),b.ref=ua(g,m,w),b.return=g,g=b)}return i(g);case ti:e:{for(S=w.key;m!==null;){if(m.key===S)if(m.tag===4&&m.stateNode.containerInfo===w.containerInfo&&m.stateNode.implementation===w.implementation){n(g,m.sibling),m=s(m,w.children||[]),m.return=g,g=m;break e}else{n(g,m);break}else t(g,m);m=m.sibling}m=Hf(w,g.mode,b),m.return=g,g=m}return i(g);case Cs:return S=w._init,_(g,m,S(w._payload),b)}if(Sa(w))return y(g,m,w,b);if(oa(w))return v(g,m,w,b);Cc(g,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,m!==null&&m.tag===6?(n(g,m.sibling),m=s(m,w),m.return=g,g=m):(n(g,m),m=Bf(w,g.mode,b),m.return=g,g=m),i(g)):n(g,m)}return _}var Oi=a0(!0),l0=a0(!1),Tu=eo(null),Nu=null,ui=null,pm=null;function mm(){pm=ui=Nu=null}function gm(e){var t=Tu.current;rt(Tu),e._currentValue=t}function Gh(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function _i(e,t){Nu=e,pm=ui=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(vn=!0),e.firstContext=null)}function zn(e){var t=e._currentValue;if(pm!==e)if(e={context:e,memoizedValue:t,next:null},ui===null){if(Nu===null)throw Error($(308));ui=e,Nu.dependencies={lanes:0,firstContext:e}}else ui=ui.next=e;return t}var ho=null;function vm(e){ho===null?ho=[e]:ho.push(e)}function c0(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,vm(t)):(n.next=s.next,s.next=n),t.interleaved=n,es(e,r)}function es(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var ks=!1;function ym(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function u0(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 Kr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Fs(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ve&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,es(e,n)}return s=r.interleaved,s===null?(t.next=t,vm(r)):(t.next=s.next,s.next=t),r.interleaved=t,es(e,n)}function Gc(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,rm(e,n)}}function Jv(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?s=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?s=o=t:o=o.next=t}else s=o=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ru(e,t,n,r){var s=e.updateQueue;ks=!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 d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==i&&(a===null?d.firstBaseUpdate=c:a.next=c,d.lastBaseUpdate=l))}if(o!==null){var f=s.baseState;i=0,d=c=l=null,a=o;do{var p=a.lane,x=a.eventTime;if((r&p)===p){d!==null&&(d=d.next={eventTime:x,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var y=e,v=a;switch(p=t,x=n,v.tag){case 1:if(y=v.payload,typeof y=="function"){f=y.call(x,f,p);break e}f=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=v.payload,p=typeof y=="function"?y.call(x,f,p):y,p==null)break e;f=gt({},f,p);break e;case 2:ks=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,p=s.effects,p===null?s.effects=[a]:p.push(a))}else x={eventTime:x,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(c=d=x,l=f):d=d.next=x,i|=p;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;p=a,a=p.next,p.next=null,s.lastBaseUpdate=p,s.shared.pending=null}}while(!0);if(d===null&&(l=f),s.baseState=l,s.firstBaseUpdate=c,s.lastBaseUpdate=d,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);To|=i,e.lanes=i,e.memoizedState=f}}function ey(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=$f.transition;$f.transition={};try{e(!1),t()}finally{Ke=n,$f.transition=r}}function T0(){return Wn().memoizedState}function bN(e,t,n){var r=$s(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},N0(e))R0(t,n);else if(n=c0(e,t,n,r),n!==null){var s=an();rr(n,e,r,s),P0(n,t,r)}}function CN(e,t,n){var r=$s(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(N0(e))R0(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,n);if(s.hasEagerState=!0,s.eagerState=a,or(a,i)){var l=t.interleaved;l===null?(s.next=s,vm(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=c0(e,t,s,r),n!==null&&(s=an(),rr(n,e,r,s),P0(n,t,r))}}function N0(e){var t=e.alternate;return e===mt||t!==null&&t===mt}function R0(e,t){Aa=Du=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function P0(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,rm(e,n)}}var Mu={readContext:zn,useCallback:Bt,useContext:Bt,useEffect:Bt,useImperativeHandle:Bt,useInsertionEffect:Bt,useLayoutEffect:Bt,useMemo:Bt,useReducer:Bt,useRef:Bt,useState:Bt,useDebugValue:Bt,useDeferredValue:Bt,useTransition:Bt,useMutableSource:Bt,useSyncExternalStore:Bt,useId:Bt,unstable_isNewReconciler:!1},kN={readContext:zn,useCallback:function(e,t){return gr().memoizedState=[e,t===void 0?null:t],e},useContext:zn,useEffect:ny,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Zc(4194308,4,S0.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Zc(4194308,4,e,t)},useInsertionEffect:function(e,t){return Zc(4,2,e,t)},useMemo:function(e,t){var n=gr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=gr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=bN.bind(null,mt,e),[r.memoizedState,e]},useRef:function(e){var t=gr();return e={current:e},t.memoizedState=e},useState:ty,useDebugValue:Em,useDeferredValue:function(e){return gr().memoizedState=e},useTransition:function(){var e=ty(!1),t=e[0];return e=SN.bind(null,e[1]),gr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=mt,s=gr();if(lt){if(n===void 0)throw Error($(407));n=n()}else{if(n=t(),Ot===null)throw Error($(349));Eo&30||p0(r,t,n)}s.memoizedState=n;var o={value:n,getSnapshot:t};return s.queue=o,ny(g0.bind(null,r,o,e),[e]),r.flags|=2048,cl(9,m0.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=gr(),t=Ot.identifierPrefix;if(lt){var n=Br,r=Yr;n=(r&~(1<<32-nr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=al++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[vr]=t,e[sl]=r,$0(e,t,!1,!1),t.stateNode=e;e:{switch(i=Rh(n,r),n){case"dialog":nt("cancel",e),nt("close",e),s=r;break;case"iframe":case"object":case"embed":nt("load",e),s=r;break;case"video":case"audio":for(s=0;sLi&&(t.flags|=128,r=!0,da(o,!1),t.lanes=4194304)}else{if(!r)if(e=Pu(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),da(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!lt)return Ht(t),null}else 2*St()-o.renderingStartTime>Li&&n!==1073741824&&(t.flags|=128,r=!0,da(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=St(),t.sibling=null,n=pt.current,et(pt,r?n&1|2:n&1),t):(Ht(t),null);case 22:case 23:return Mm(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Cn&1073741824&&(Ht(t),t.subtreeFlags&6&&(t.flags|=8192)):Ht(t),null;case 24:return null;case 25:return null}throw Error($(156,t.tag))}function jN(e,t){switch(fm(t),t.tag){case 1:return xn(t.type)&&bu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ai(),rt(yn),rt(Qt),_m(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return wm(t),null;case 13:if(rt(pt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error($(340));ji()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return rt(pt),null;case 4:return Ai(),null;case 10:return gm(t.type._context),null;case 22:case 23:return Mm(),null;case 24:return null;default:return null}}var Ec=!1,Gt=!1,ON=typeof WeakSet=="function"?WeakSet:Set,ie=null;function di(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){yt(e,t,r)}else n.current=null}function np(e,t,n){try{n()}catch(r){yt(e,t,r)}}var hy=!1;function AN(e,t){if(Uh=xu,e=Gw(),um(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,a=-1,l=-1,c=0,d=0,f=e,p=null;t:for(;;){for(var x;f!==n||s!==0&&f.nodeType!==3||(a=i+s),f!==o||r!==0&&f.nodeType!==3||(l=i+r),f.nodeType===3&&(i+=f.nodeValue.length),(x=f.firstChild)!==null;)p=f,f=x;for(;;){if(f===e)break t;if(p===n&&++c===s&&(a=i),p===o&&++d===r&&(l=i),(x=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=x}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for($h={focusedElem:e,selectionRange:n},xu=!1,ie=t;ie!==null;)if(t=ie,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ie=e;else for(;ie!==null;){t=ie;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 v=y.memoizedProps,_=y.memoizedState,g=t.stateNode,m=g.getSnapshotBeforeUpdate(t.elementType===t.type?v:Zn(t.type,v),_);g.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error($(163))}}catch(b){yt(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,ie=e;break}ie=t.return}return y=hy,hy=!1,y}function Ia(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var o=s.destroy;s.destroy=void 0,o!==void 0&&np(t,n,o)}s=s.next}while(s!==r)}}function wd(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function rp(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function W0(e){var t=e.alternate;t!==null&&(e.alternate=null,W0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[vr],delete t[sl],delete t[Wh],delete t[vN],delete t[yN])),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 Y0(e){return e.tag===5||e.tag===3||e.tag===4}function py(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Y0(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 sp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Su));else if(r!==4&&(e=e.child,e!==null))for(sp(e,t,n),e=e.sibling;e!==null;)sp(e,t,n),e=e.sibling}function op(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(op(e,t,n),e=e.sibling;e!==null;)op(e,t,n),e=e.sibling}var Lt=null,qn=!1;function xs(e,t,n){for(n=n.child;n!==null;)B0(e,t,n),n=n.sibling}function B0(e,t,n){if(br&&typeof br.onCommitFiberUnmount=="function")try{br.onCommitFiberUnmount(fd,n)}catch{}switch(n.tag){case 5:Gt||di(n,t);case 6:var r=Lt,s=qn;Lt=null,xs(e,t,n),Lt=r,qn=s,Lt!==null&&(qn?(e=Lt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Lt.removeChild(n.stateNode));break;case 18:Lt!==null&&(qn?(e=Lt,n=n.stateNode,e.nodeType===8?Lf(e.parentNode,n):e.nodeType===1&&Lf(e,n),Ja(e)):Lf(Lt,n.stateNode));break;case 4:r=Lt,s=qn,Lt=n.stateNode.containerInfo,qn=!0,xs(e,t,n),Lt=r,qn=s;break;case 0:case 11:case 14:case 15:if(!Gt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var o=s,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&np(n,t,i),s=s.next}while(s!==r)}xs(e,t,n);break;case 1:if(!Gt&&(di(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){yt(n,t,a)}xs(e,t,n);break;case 21:xs(e,t,n);break;case 22:n.mode&1?(Gt=(r=Gt)||n.memoizedState!==null,xs(e,t,n),Gt=r):xs(e,t,n);break;default:xs(e,t,n)}}function my(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new ON),t.forEach(function(r){var s=YN.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Kn(e,t){var n=t.deletions;if(n!==null)for(var r=0;rs&&(s=i),r&=~o}if(r=s,r=St()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*LN(r/1960))-r,10e?16:e,Ps===null)var r=!1;else{if(e=Ps,Ps=null,Au=0,Ve&6)throw Error($(331));var s=Ve;for(Ve|=4,ie=e.current;ie!==null;){var o=ie,i=o.child;if(ie.flags&16){var a=o.deletions;if(a!==null){for(var l=0;lSt()-Pm?wo(e,0):Rm|=n),wn(e,t)}function J0(e,t){t===0&&(e.mode&1?(t=vc,vc<<=1,!(vc&130023424)&&(vc=4194304)):t=1);var n=an();e=es(e,t),e!==null&&(Fl(e,t,n),wn(e,n))}function WN(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),J0(e,n)}function YN(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error($(314))}r!==null&&r.delete(t),J0(e,n)}var e_;e_=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||yn.current)vn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return vn=!1,DN(e,t,n);vn=!!(e.flags&131072)}else vn=!1,lt&&t.flags&1048576&&s0(t,Eu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;qc(e,t),e=t.pendingProps;var s=Mi(t,Qt.current);_i(t,n),s=bm(null,t,r,e,s,n);var o=Cm();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,xn(r)?(o=!0,Cu(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,ym(t),s.updater=xd,t.stateNode=s,s._reactInternals=t,Zh(t,r,e,n),t=Xh(null,t,r,!0,o,n)):(t.tag=0,lt&&o&&dm(t),sn(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(qc(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=HN(r),e=Zn(r,e),s){case 0:t=Qh(null,t,r,e,n);break e;case 1:t=uy(null,t,r,e,n);break e;case 11:t=ly(null,t,r,e,n);break e;case 14:t=cy(null,t,r,Zn(r.type,e),n);break e}throw Error($(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Zn(r,s),Qh(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Zn(r,s),uy(e,t,r,s,n);case 3:e:{if(L0(t),e===null)throw Error($(387));r=t.pendingProps,o=t.memoizedState,s=o.element,u0(e,t),Ru(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=Ii(Error($(423)),t),t=dy(e,t,r,n,s);break e}else if(r!==s){s=Ii(Error($(424)),t),t=dy(e,t,r,n,s);break e}else for(Tn=Ls(t.stateNode.containerInfo.firstChild),Nn=t,lt=!0,Xn=null,n=l0(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ji(),r===s){t=ts(e,t,n);break e}sn(e,t,r,n)}t=t.child}return t;case 5:return d0(t),e===null&&Hh(t),r=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,Vh(r,s)?i=null:o!==null&&Vh(r,o)&&(t.flags|=32),I0(e,t),sn(e,t,i,n),t.child;case 6:return e===null&&Hh(t),null;case 13:return F0(e,t,n);case 4:return xm(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Oi(t,null,r,n):sn(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Zn(r,s),ly(e,t,r,s,n);case 7:return sn(e,t,t.pendingProps,n),t.child;case 8:return sn(e,t,t.pendingProps.children,n),t.child;case 12:return sn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,o=t.memoizedProps,i=s.value,et(Tu,r._currentValue),r._currentValue=i,o!==null)if(or(o.value,i)){if(o.children===s.children&&!yn.current){t=ts(e,t,n);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===r){if(o.tag===1){l=Kr(-1,n&-n),l.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?l.next=l:(l.next=d.next,d.next=l),c.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Gh(o.return,n,t),a.lanes|=n;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($(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Gh(i,n,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}sn(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,_i(t,n),s=zn(s),r=r(s),t.flags|=1,sn(e,t,r,n),t.child;case 14:return r=t.type,s=Zn(r,t.pendingProps),s=Zn(r.type,s),cy(e,t,r,s,n);case 15:return O0(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Zn(r,s),qc(e,t),t.tag=1,xn(r)?(e=!0,Cu(t)):e=!1,_i(t,n),D0(t,r,s),Zh(t,r,s,n),Xh(null,t,r,!0,e,n);case 19:return U0(e,t,n);case 22:return A0(e,t,n)}throw Error($(156,t.tag))};function t_(e,t){return Nw(e,t)}function BN(e,t,n,r){this.tag=e,this.key=n,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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Un(e,t,n,r){return new BN(e,t,n,r)}function Om(e){return e=e.prototype,!(!e||!e.isReactComponent)}function HN(e){if(typeof e=="function")return Om(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Jp)return 11;if(e===em)return 14}return 2}function Vs(e,t){var n=e.alternate;return n===null?(n=Un(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Jc(e,t,n,r,s,o){var i=2;if(r=e,typeof e=="function")Om(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case ni:return _o(n.children,s,o,t);case Xp:i=8,s|=8;break;case xh:return e=Un(12,n,t,s|2),e.elementType=xh,e.lanes=o,e;case wh:return e=Un(13,n,t,s),e.elementType=wh,e.lanes=o,e;case _h:return e=Un(19,n,t,s),e.elementType=_h,e.lanes=o,e;case dw:return Sd(n,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case cw:i=10;break e;case uw:i=9;break e;case Jp:i=11;break e;case em:i=14;break e;case Cs:i=16,r=null;break e}throw Error($(130,e==null?e:typeof e,""))}return t=Un(i,n,t,s),t.elementType=e,t.type=r,t.lanes=o,t}function _o(e,t,n,r){return e=Un(7,e,r,t),e.lanes=n,e}function Sd(e,t,n,r){return e=Un(22,e,r,t),e.elementType=dw,e.lanes=n,e.stateNode={isHidden:!1},e}function Bf(e,t,n){return e=Un(6,e,null,t),e.lanes=n,e}function Hf(e,t,n){return t=Un(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function GN(e,t,n,r,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=Ef(0),this.expirationTimes=Ef(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ef(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Am(e,t,n,r,s,o,i,a,l){return e=new GN(e,t,n,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Un(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ym(o),e}function KN(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(o_)}catch(e){console.error(e)}}o_(),ow.exports=jn;var ls=ow.exports;const i_=Hx(ls),JN=Bx({__proto__:null,default:i_},[ls]);var by=ls;vh.createRoot=by.createRoot,vh.hydrateRoot=by.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 ht(){return ht=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Ro(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function tR(){return Math.random().toString(36).substr(2,8)}function ky(e,t){return{usr:e.state,key:e.key,idx:t}}function dl(e,t,n,r){return n===void 0&&(n=null),ht({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?cs(t):t,{state:n,key:t&&t.key||r||tR()})}function Po(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function cs(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function nR(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:o=!1}=r,i=s.history,a=Ct.Pop,l=null,c=d();c==null&&(c=0,i.replaceState(ht({},i.state,{idx:c}),""));function d(){return(i.state||{idx:null}).idx}function f(){a=Ct.Pop;let _=d(),g=_==null?null:_-c;c=_,l&&l({action:a,location:v.location,delta:g})}function p(_,g){a=Ct.Push;let m=dl(v.location,_,g);n&&n(m,_),c=d()+1;let w=ky(m,c),b=v.createHref(m);try{i.pushState(w,"",b)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;s.location.assign(b)}o&&l&&l({action:a,location:v.location,delta:1})}function x(_,g){a=Ct.Replace;let m=dl(v.location,_,g);n&&n(m,_),c=d();let w=ky(m,c),b=v.createHref(m);i.replaceState(w,"",b),o&&l&&l({action:a,location:v.location,delta:0})}function y(_){let g=s.location.origin!=="null"?s.location.origin:s.location.href,m=typeof _=="string"?_:Po(_);return m=m.replace(/ $/,"%20"),Ne(g,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,g)}let v={get action(){return a},get location(){return e(s,i)},listen(_){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(Cy,f),l=_,()=>{s.removeEventListener(Cy,f),l=null}},createHref(_){return t(s,_)},createURL:y,encodeLocation(_){let g=y(_);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:p,replace:x,go(_){return i.go(_)}};return v}var Je;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Je||(Je={}));const rR=new Set(["lazy","caseSensitive","path","id","index","children"]);function sR(e){return e.index===!0}function fl(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((s,o)=>{let i=[...n,String(o)],a=typeof s.id=="string"?s.id:i.join("-");if(Ne(s.index!==!0||!s.children,"Cannot specify children on an index route"),Ne(!r[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),sR(s)){let l=ht({},s,t(s),{id:a});return r[a]=l,l}else{let l=ht({},s,t(s),{id:a,children:void 0});return r[a]=l,s.children&&(l.children=fl(s.children,t,i,r)),l}})}function uo(e,t,n){return n===void 0&&(n="/"),eu(e,t,n,!1)}function eu(e,t,n,r){let s=typeof t=="string"?cs(t):t,o=Hi(s.pathname||"/",n);if(o==null)return null;let i=a_(e);iR(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("/")&&(Ne(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=Zr([r,l.relativePath]),d=n.concat(l);o.children&&o.children.length>0&&(Ne(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),a_(o.children,t,d,c)),!(o.path==null&&!o.index)&&t.push({path:c,score:hR(c,o.index),routesMeta:d})};return e.forEach((o,i)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))s(o,i);else for(let l of l_(o.path))s(o,i,l)}),t}function l_(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return s?[o,""]:[o];let i=l_(r.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 iR(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:pR(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const aR=/^:[\w-]+$/,lR=3,cR=2,uR=1,dR=10,fR=-2,Ey=e=>e==="*";function hR(e,t){let n=e.split("/"),r=n.length;return n.some(Ey)&&(r+=fR),t&&(r+=cR),n.filter(s=>!Ey(s)).reduce((s,o)=>s+(aR.test(o)?lR:o===""?uR:dR),r)}function pR(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function mR(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,s={},o="/",i=[];for(let a=0;a{let{paramName:p,isOptional:x}=d;if(p==="*"){let v=a[f]||"";i=o.slice(0,o.length-v.length).replace(/(.)\/+$/,"$1")}const y=a[f];return x&&!y?c[p]=void 0:c[p]=(y||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:i,pattern:e}}function gR(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Ro(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 r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function vR(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ro(!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 Hi(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function yR(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?cs(e):e;return{pathname:n?n.startsWith("/")?n:xR(n,t):t,search:_R(r),hash:SR(s)}}function xR(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function Gf(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function c_(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Td(e,t){let n=c_(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Nd(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=cs(e):(s=ht({},e),Ne(!s.pathname||!s.pathname.includes("?"),Gf("?","pathname","search",s)),Ne(!s.pathname||!s.pathname.includes("#"),Gf("#","pathname","hash",s)),Ne(!s.search||!s.search.includes("#"),Gf("#","search","hash",s)));let o=e===""||s.pathname==="",i=o?"/":s.pathname,a;if(i==null)a=n;else{let f=t.length-1;if(!r&&i.startsWith("..")){let p=i.split("/");for(;p[0]==="..";)p.shift(),f-=1;s.pathname=p.join("/")}a=f>=0?t[f]:"/"}let l=yR(s,a),c=i&&i!=="/"&&i.endsWith("/"),d=(o||i===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}const Zr=e=>e.join("/").replace(/\/\/+/g,"/"),wR=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),_R=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,SR=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Um{constructor(t,n,r,s){s===void 0&&(s=!1),this.status=t,this.statusText=n||"",this.internal=s,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Rd(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"],bR=new Set(u_),CR=["get",...u_],kR=new Set(CR),ER=new Set([301,302,303,307,308]),TR=new Set([307,308]),Kf={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},NR={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ha={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},$m=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,RR=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),d_="remix-router-transitions";function PR(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;Ne(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 E=e.detectErrorBoundary;s=T=>({hasErrorBoundary:E(T)})}else s=RR;let o={},i=fl(e.routes,s,void 0,o),a,l=e.basename||"/",c=e.unstable_dataStrategy||AR,d=e.unstable_patchRoutesOnMiss,f=ht({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),p=null,x=new Set,y=null,v=null,_=null,g=e.hydrationData!=null,m=uo(i,e.history.location,l),w=null;if(m==null&&!d){let E=rn(404,{pathname:e.history.location.pathname}),{matches:T,route:D}=Ly(i);m=T,w={[D.id]:E}}m&&d&&!e.hydrationData&&wf(m,i,e.history.location.pathname).active&&(m=null);let b;if(!m)b=!1,m=[];else if(m.some(E=>E.route.lazy))b=!1;else if(!m.some(E=>E.route.loader))b=!0;else if(f.v7_partialHydration){let E=e.hydrationData?e.hydrationData.loaderData:null,T=e.hydrationData?e.hydrationData.errors:null,D=U=>U.route.loader?typeof U.route.loader=="function"&&U.route.loader.hydrate===!0?!1:E&&E[U.route.id]!==void 0||T&&T[U.route.id]!==void 0:!0;if(T){let U=m.findIndex(re=>T[re.route.id]!==void 0);b=m.slice(0,U+1).every(D)}else b=m.every(D)}else b=e.hydrationData!=null;let C,S={historyAction:e.history.action,location:e.history.location,matches:m,initialized:b,navigation:Kf,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||w,fetchers:new Map,blockers:new Map},N=Ct.Pop,R=!1,F,L=!1,Z=new Map,j=null,B=!1,A=!1,H=[],ne=[],W=new Map,I=0,M=-1,q=new Map,ae=new Set,me=new Map,Qe=new Map,Pe=new Set,ct=new Map,Fe=new Map,le=new Map,De=!1;function Ye(){if(p=e.history.listen(E=>{let{action:T,location:D,delta:U}=E;if(De){De=!1;return}Ro(Fe.size===0||U!=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 re=dv({currentLocation:S.location,nextLocation:D,historyAction:T});if(re&&U!=null){De=!0,e.history.go(U*-1),ic(re,{state:"blocked",location:D,proceed(){ic(re,{state:"proceeding",proceed:void 0,reset:void 0,location:D}),e.history.go(U)},reset(){let de=new Map(S.blockers);de.set(re,ha),we({blockers:de})}});return}return fn(T,D)}),n){KR(t,Z);let E=()=>ZR(t,Z);t.addEventListener("pagehide",E),j=()=>t.removeEventListener("pagehide",E)}return S.initialized||fn(Ct.Pop,S.location,{initialHydration:!0}),C}function Ue(){p&&p(),j&&j(),x.clear(),F&&F.abort(),S.fetchers.forEach((E,T)=>vs(T)),S.blockers.forEach((E,T)=>uv(T))}function $e(E){return x.add(E),()=>x.delete(E)}function we(E,T){T===void 0&&(T={}),S=ht({},S,E);let D=[],U=[];f.v7_fetcherPersist&&S.fetchers.forEach((re,de)=>{re.state==="idle"&&(Pe.has(de)?U.push(de):D.push(de))}),[...x].forEach(re=>re(S,{deletedFetchers:U,unstable_viewTransitionOpts:T.viewTransitionOpts,unstable_flushSync:T.flushSync===!0})),f.v7_fetcherPersist&&(D.forEach(re=>S.fetchers.delete(re)),U.forEach(re=>vs(re)))}function ut(E,T,D){var U,re;let{flushSync:de}=D===void 0?{}:D,ye=S.actionData!=null&&S.navigation.formMethod!=null&&Qn(S.navigation.formMethod)&&S.navigation.state==="loading"&&((U=E.state)==null?void 0:U._isRedirect)!==!0,K;T.actionData?Object.keys(T.actionData).length>0?K=T.actionData:K=null:ye?K=S.actionData:K=null;let be=T.loaderData?Ay(S.loaderData,T.loaderData,T.matches||[],T.errors):S.loaderData,pe=S.blockers;pe.size>0&&(pe=new Map(pe),pe.forEach((Ge,Xe)=>pe.set(Xe,ha)));let ge=R===!0||S.navigation.formMethod!=null&&Qn(S.navigation.formMethod)&&((re=E.state)==null?void 0:re._isRedirect)!==!0;a&&(i=a,a=void 0),B||N===Ct.Pop||(N===Ct.Push?e.history.push(E,E.state):N===Ct.Replace&&e.history.replace(E,E.state));let Ze;if(N===Ct.Pop){let Ge=Z.get(S.location.pathname);Ge&&Ge.has(E.pathname)?Ze={currentLocation:S.location,nextLocation:E}:Z.has(E.pathname)&&(Ze={currentLocation:E,nextLocation:S.location})}else if(L){let Ge=Z.get(S.location.pathname);Ge?Ge.add(E.pathname):(Ge=new Set([E.pathname]),Z.set(S.location.pathname,Ge)),Ze={currentLocation:S.location,nextLocation:E}}we(ht({},T,{actionData:K,loaderData:be,historyAction:N,location:E,initialized:!0,navigation:Kf,revalidation:"idle",restoreScrollPosition:hv(E,T.matches||S.matches),preventScrollReset:ge,blockers:pe}),{viewTransitionOpts:Ze,flushSync:de===!0}),N=Ct.Pop,R=!1,L=!1,B=!1,A=!1,H=[],ne=[]}async function Yt(E,T){if(typeof E=="number"){e.history.go(E);return}let D=up(S.location,S.matches,l,f.v7_prependBasename,E,f.v7_relativeSplatPath,T==null?void 0:T.fromRouteId,T==null?void 0:T.relative),{path:U,submission:re,error:de}=Ny(f.v7_normalizeFormMethod,!1,D,T),ye=S.location,K=dl(S.location,U,T&&T.state);K=ht({},K,e.history.encodeLocation(K));let be=T&&T.replace!=null?T.replace:void 0,pe=Ct.Push;be===!0?pe=Ct.Replace:be===!1||re!=null&&Qn(re.formMethod)&&re.formAction===S.location.pathname+S.location.search&&(pe=Ct.Replace);let ge=T&&"preventScrollReset"in T?T.preventScrollReset===!0:void 0,Ze=(T&&T.unstable_flushSync)===!0,Ge=dv({currentLocation:ye,nextLocation:K,historyAction:pe});if(Ge){ic(Ge,{state:"blocked",location:K,proceed(){ic(Ge,{state:"proceeding",proceed:void 0,reset:void 0,location:K}),Yt(E,T)},reset(){let Xe=new Map(S.blockers);Xe.set(Ge,ha),we({blockers:Xe})}});return}return await fn(pe,K,{submission:re,pendingError:de,preventScrollReset:ge,replace:T&&T.replace,enableViewTransition:T&&T.unstable_viewTransition,flushSync:Ze})}function ms(){if(At(),we({revalidation:"loading"}),S.navigation.state!=="submitting"){if(S.navigation.state==="idle"){fn(S.historyAction,S.location,{startUninterruptedRevalidation:!0});return}fn(N||S.historyAction,S.navigation.location,{overrideNavigation:S.navigation})}}async function fn(E,T,D){F&&F.abort(),F=null,N=E,B=(D&&D.startUninterruptedRevalidation)===!0,bE(S.location,S.matches),R=(D&&D.preventScrollReset)===!0,L=(D&&D.enableViewTransition)===!0;let U=a||i,re=D&&D.overrideNavigation,de=uo(U,T,l),ye=(D&&D.flushSync)===!0,K=wf(de,U,T.pathname);if(K.active&&K.matches&&(de=K.matches),!de){let{error:Be,notFoundMatches:It,route:bt}=yf(T.pathname);ut(T,{matches:It,loaderData:{},errors:{[bt.id]:Be}},{flushSync:ye});return}if(S.initialized&&!A&&VR(S.location,T)&&!(D&&D.submission&&Qn(D.submission.formMethod))){ut(T,{matches:de},{flushSync:ye});return}F=new AbortController;let be=Go(e.history,T,F.signal,D&&D.submission),pe;if(D&&D.pendingError)pe=[hi(de).route.id,{type:Je.error,error:D.pendingError}];else if(D&&D.submission&&Qn(D.submission.formMethod)){let Be=await gs(be,T,D.submission,de,K.active,{replace:D.replace,flushSync:ye});if(Be.shortCircuited)return;if(Be.pendingActionResult){let[It,bt]=Be.pendingActionResult;if(kn(bt)&&Rd(bt.error)&&bt.error.status===404){F=null,ut(T,{matches:Be.matches,loaderData:{},errors:{[It]:bt.error}});return}}de=Be.matches||de,pe=Be.pendingActionResult,re=Zf(T,D.submission),ye=!1,K.active=!1,be=Go(e.history,be.url,be.signal)}let{shortCircuited:ge,matches:Ze,loaderData:Ge,errors:Xe}=await k(be,T,de,K.active,re,D&&D.submission,D&&D.fetcherSubmission,D&&D.replace,D&&D.initialHydration===!0,ye,pe);ge||(F=null,ut(T,ht({matches:Ze||de},Iy(pe),{loaderData:Ge,errors:Xe})))}async function gs(E,T,D,U,re,de){de===void 0&&(de={}),At();let ye=HR(T,D);if(we({navigation:ye},{flushSync:de.flushSync===!0}),re){let pe=await lc(U,T.pathname,E.signal);if(pe.type==="aborted")return{shortCircuited:!0};if(pe.type==="error"){let{boundaryId:ge,error:Ze}=ac(T.pathname,pe);return{matches:pe.partialMatches,pendingActionResult:[ge,{type:Je.error,error:Ze}]}}else if(pe.matches)U=pe.matches;else{let{notFoundMatches:ge,error:Ze,route:Ge}=yf(T.pathname);return{matches:ge,pendingActionResult:[Ge.id,{type:Je.error,error:Ze}]}}}let K,be=ka(U,T);if(!be.route.action&&!be.route.lazy)K={type:Je.error,error:rn(405,{method:E.method,pathname:T.pathname,routeId:be.route.id})};else if(K=(await Me("action",E,[be],U))[0],E.signal.aborted)return{shortCircuited:!0};if(go(K)){let pe;return de&&de.replace!=null?pe=de.replace:pe=My(K.response.headers.get("Location"),new URL(E.url),l)===S.location.pathname+S.location.search,await ce(E,K,{submission:D,replace:pe}),{shortCircuited:!0}}if(mo(K))throw rn(400,{type:"defer-action"});if(kn(K)){let pe=hi(U,be.route.id);return(de&&de.replace)!==!0&&(N=Ct.Push),{matches:U,pendingActionResult:[pe.route.id,K]}}return{matches:U,pendingActionResult:[be.route.id,K]}}async function k(E,T,D,U,re,de,ye,K,be,pe,ge){let Ze=re||Zf(T,de),Ge=de||ye||$y(Ze),Xe=!B&&(!f.v7_partialHydration||!be);if(U){if(Xe){let vt=P(ge);we(ht({navigation:Ze},vt!==void 0?{actionData:vt}:{}),{flushSync:pe})}let Ee=await lc(D,T.pathname,E.signal);if(Ee.type==="aborted")return{shortCircuited:!0};if(Ee.type==="error"){let{boundaryId:vt,error:_n}=ac(T.pathname,Ee);return{matches:Ee.partialMatches,loaderData:{},errors:{[vt]:_n}}}else if(Ee.matches)D=Ee.matches;else{let{error:vt,notFoundMatches:_n,route:it}=yf(T.pathname);return{matches:_n,loaderData:{},errors:{[it.id]:vt}}}}let Be=a||i,[It,bt]=Ry(e.history,S,D,Ge,T,f.v7_partialHydration&&be===!0,f.v7_skipActionErrorRevalidation,A,H,ne,Pe,me,ae,Be,l,ge);if(xf(Ee=>!(D&&D.some(vt=>vt.route.id===Ee))||It&&It.some(vt=>vt.route.id===Ee)),M=++I,It.length===0&&bt.length===0){let Ee=ra();return ut(T,ht({matches:D,loaderData:{},errors:ge&&kn(ge[1])?{[ge[0]]:ge[1].error}:null},Iy(ge),Ee?{fetchers:new Map(S.fetchers)}:{}),{flushSync:pe}),{shortCircuited:!0}}if(Xe){let Ee={};if(!U){Ee.navigation=Ze;let vt=P(ge);vt!==void 0&&(Ee.actionData=vt)}bt.length>0&&(Ee.fetchers=O(bt)),we(Ee,{flushSync:pe})}bt.forEach(Ee=>{W.has(Ee.key)&&Gn(Ee.key),Ee.controller&&W.set(Ee.key,Ee.controller)});let sa=()=>bt.forEach(Ee=>Gn(Ee.key));F&&F.signal.addEventListener("abort",sa);let{loaderResults:ys,fetcherResults:Wo}=await dt(S.matches,D,It,bt,E);if(E.signal.aborted)return{shortCircuited:!0};F&&F.signal.removeEventListener("abort",sa),bt.forEach(Ee=>W.delete(Ee.key));let Yo=Fy([...ys,...Wo]);if(Yo){if(Yo.idx>=It.length){let Ee=bt[Yo.idx-It.length].key;ae.add(Ee)}return await ce(E,Yo.result,{replace:K}),{shortCircuited:!0}}let{loaderData:Bo,errors:pr}=Oy(S,D,It,ys,ge,bt,Wo,ct);ct.forEach((Ee,vt)=>{Ee.subscribe(_n=>{(_n||Ee.done)&&ct.delete(vt)})}),f.v7_partialHydration&&be&&S.errors&&Object.entries(S.errors).filter(Ee=>{let[vt]=Ee;return!It.some(_n=>_n.route.id===vt)}).forEach(Ee=>{let[vt,_n]=Ee;pr=Object.assign(pr||{},{[vt]:_n})});let cc=ra(),uc=cv(M),dc=cc||uc||bt.length>0;return ht({matches:D,loaderData:Bo,errors:pr},dc?{fetchers:new Map(S.fetchers)}:{})}function P(E){if(E&&!kn(E[1]))return{[E[0]]:E[1].data};if(S.actionData)return Object.keys(S.actionData).length===0?null:S.actionData}function O(E){return E.forEach(T=>{let D=S.fetchers.get(T.key),U=pa(void 0,D?D.data:void 0);S.fetchers.set(T.key,U)}),new Map(S.fetchers)}function X(E,T,D,U){if(r)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(E)&&Gn(E);let re=(U&&U.unstable_flushSync)===!0,de=a||i,ye=up(S.location,S.matches,l,f.v7_prependBasename,D,f.v7_relativeSplatPath,T,U==null?void 0:U.relative),K=uo(de,ye,l),be=wf(K,de,ye);if(be.active&&be.matches&&(K=be.matches),!K){Hn(E,T,rn(404,{pathname:ye}),{flushSync:re});return}let{path:pe,submission:ge,error:Ze}=Ny(f.v7_normalizeFormMethod,!0,ye,U);if(Ze){Hn(E,T,Ze,{flushSync:re});return}let Ge=ka(K,pe);if(R=(U&&U.preventScrollReset)===!0,ge&&Qn(ge.formMethod)){Q(E,T,pe,Ge,K,be.active,re,ge);return}me.set(E,{routeId:T,path:pe}),Y(E,T,pe,Ge,K,be.active,re,ge)}async function Q(E,T,D,U,re,de,ye,K){At(),me.delete(E);function be(it){if(!it.route.action&&!it.route.lazy){let Or=rn(405,{method:K.formMethod,pathname:D,routeId:T});return Hn(E,T,Or,{flushSync:ye}),!0}return!1}if(!de&&be(U))return;let pe=S.fetchers.get(E);nn(E,GR(K,pe),{flushSync:ye});let ge=new AbortController,Ze=Go(e.history,D,ge.signal,K);if(de){let it=await lc(re,D,Ze.signal);if(it.type==="aborted")return;if(it.type==="error"){let{error:Or}=ac(D,it);Hn(E,T,Or,{flushSync:ye});return}else if(it.matches){if(re=it.matches,U=ka(re,D),be(U))return}else{Hn(E,T,rn(404,{pathname:D}),{flushSync:ye});return}}W.set(E,ge);let Ge=I,Be=(await Me("action",Ze,[U],re))[0];if(Ze.signal.aborted){W.get(E)===ge&&W.delete(E);return}if(f.v7_fetcherPersist&&Pe.has(E)){if(go(Be)||kn(Be)){nn(E,Ss(void 0));return}}else{if(go(Be))if(W.delete(E),M>Ge){nn(E,Ss(void 0));return}else return ae.add(E),nn(E,pa(K)),ce(Ze,Be,{fetcherSubmission:K});if(kn(Be)){Hn(E,T,Be.error);return}}if(mo(Be))throw rn(400,{type:"defer-action"});let It=S.navigation.location||S.location,bt=Go(e.history,It,ge.signal),sa=a||i,ys=S.navigation.state!=="idle"?uo(sa,S.navigation.location,l):S.matches;Ne(ys,"Didn't find any matches after fetcher action");let Wo=++I;q.set(E,Wo);let Yo=pa(K,Be.data);S.fetchers.set(E,Yo);let[Bo,pr]=Ry(e.history,S,ys,K,It,!1,f.v7_skipActionErrorRevalidation,A,H,ne,Pe,me,ae,sa,l,[U.route.id,Be]);pr.filter(it=>it.key!==E).forEach(it=>{let Or=it.key,pv=S.fetchers.get(Or),EE=pa(void 0,pv?pv.data:void 0);S.fetchers.set(Or,EE),W.has(Or)&&Gn(Or),it.controller&&W.set(Or,it.controller)}),we({fetchers:new Map(S.fetchers)});let cc=()=>pr.forEach(it=>Gn(it.key));ge.signal.addEventListener("abort",cc);let{loaderResults:uc,fetcherResults:dc}=await dt(S.matches,ys,Bo,pr,bt);if(ge.signal.aborted)return;ge.signal.removeEventListener("abort",cc),q.delete(E),W.delete(E),pr.forEach(it=>W.delete(it.key));let Ee=Fy([...uc,...dc]);if(Ee){if(Ee.idx>=Bo.length){let it=pr[Ee.idx-Bo.length].key;ae.add(it)}return ce(bt,Ee.result)}let{loaderData:vt,errors:_n}=Oy(S,S.matches,Bo,uc,void 0,pr,dc,ct);if(S.fetchers.has(E)){let it=Ss(Be.data);S.fetchers.set(E,it)}cv(Wo),S.navigation.state==="loading"&&Wo>M?(Ne(N,"Expected pending action"),F&&F.abort(),ut(S.navigation.location,{matches:ys,loaderData:vt,errors:_n,fetchers:new Map(S.fetchers)})):(we({errors:_n,loaderData:Ay(S.loaderData,vt,ys,_n),fetchers:new Map(S.fetchers)}),A=!1)}async function Y(E,T,D,U,re,de,ye,K){let be=S.fetchers.get(E);nn(E,pa(K,be?be.data:void 0),{flushSync:ye});let pe=new AbortController,ge=Go(e.history,D,pe.signal);if(de){let Be=await lc(re,D,ge.signal);if(Be.type==="aborted")return;if(Be.type==="error"){let{error:It}=ac(D,Be);Hn(E,T,It,{flushSync:ye});return}else if(Be.matches)re=Be.matches,U=ka(re,D);else{Hn(E,T,rn(404,{pathname:D}),{flushSync:ye});return}}W.set(E,pe);let Ze=I,Xe=(await Me("loader",ge,[U],re))[0];if(mo(Xe)&&(Xe=await g_(Xe,ge.signal,!0)||Xe),W.get(E)===pe&&W.delete(E),!ge.signal.aborted){if(Pe.has(E)){nn(E,Ss(void 0));return}if(go(Xe))if(M>Ze){nn(E,Ss(void 0));return}else{ae.add(E),await ce(ge,Xe);return}if(kn(Xe)){Hn(E,T,Xe.error);return}Ne(!mo(Xe),"Unhandled fetcher deferred data"),nn(E,Ss(Xe.data))}}async function ce(E,T,D){let{submission:U,fetcherSubmission:re,replace:de}=D===void 0?{}:D;T.response.headers.has("X-Remix-Revalidate")&&(A=!0);let ye=T.response.headers.get("Location");Ne(ye,"Expected a Location header on the redirect Response"),ye=My(ye,new URL(E.url),l);let K=dl(S.location,ye,{_isRedirect:!0});if(n){let Xe=!1;if(T.response.headers.has("X-Remix-Reload-Document"))Xe=!0;else if($m.test(ye)){const Be=e.history.createURL(ye);Xe=Be.origin!==t.location.origin||Hi(Be.pathname,l)==null}if(Xe){de?t.location.replace(ye):t.location.assign(ye);return}}F=null;let be=de===!0?Ct.Replace:Ct.Push,{formMethod:pe,formAction:ge,formEncType:Ze}=S.navigation;!U&&!re&&pe&&ge&&Ze&&(U=$y(S.navigation));let Ge=U||re;if(TR.has(T.response.status)&&Ge&&Qn(Ge.formMethod))await fn(be,K,{submission:ht({},Ge,{formAction:ye}),preventScrollReset:R});else{let Xe=Zf(K,U);await fn(be,K,{overrideNavigation:Xe,fetcherSubmission:re,preventScrollReset:R})}}async function Me(E,T,D,U){try{let re=await IR(c,E,T,D,U,o,s);return await Promise.all(re.map((de,ye)=>{if(WR(de)){let K=de.result;return{type:Je.redirect,response:UR(K,T,D[ye].route.id,U,l,f.v7_relativeSplatPath)}}return FR(de)}))}catch(re){return D.map(()=>({type:Je.error,error:re}))}}async function dt(E,T,D,U,re){let[de,...ye]=await Promise.all([D.length?Me("loader",re,D,T):[],...U.map(K=>{if(K.matches&&K.match&&K.controller){let be=Go(e.history,K.path,K.controller.signal);return Me("loader",be,[K.match],K.matches).then(pe=>pe[0])}else return Promise.resolve({type:Je.error,error:rn(404,{pathname:K.path})})})]);return await Promise.all([Uy(E,D,de,de.map(()=>re.signal),!1,S.loaderData),Uy(E,U.map(K=>K.match),ye,U.map(K=>K.controller?K.controller.signal:null),!0)]),{loaderResults:de,fetcherResults:ye}}function At(){A=!0,H.push(...xf()),me.forEach((E,T)=>{W.has(T)&&(ne.push(T),Gn(T))})}function nn(E,T,D){D===void 0&&(D={}),S.fetchers.set(E,T),we({fetchers:new Map(S.fetchers)},{flushSync:(D&&D.flushSync)===!0})}function Hn(E,T,D,U){U===void 0&&(U={});let re=hi(S.matches,T);vs(E),we({errors:{[re.route.id]:D},fetchers:new Map(S.fetchers)},{flushSync:(U&&U.flushSync)===!0})}function zo(E){return f.v7_fetcherPersist&&(Qe.set(E,(Qe.get(E)||0)+1),Pe.has(E)&&Pe.delete(E)),S.fetchers.get(E)||NR}function vs(E){let T=S.fetchers.get(E);W.has(E)&&!(T&&T.state==="loading"&&q.has(E))&&Gn(E),me.delete(E),q.delete(E),ae.delete(E),Pe.delete(E),S.fetchers.delete(E)}function vf(E){if(f.v7_fetcherPersist){let T=(Qe.get(E)||0)-1;T<=0?(Qe.delete(E),Pe.add(E)):Qe.set(E,T)}else vs(E);we({fetchers:new Map(S.fetchers)})}function Gn(E){let T=W.get(E);Ne(T,"Expected fetch controller: "+E),T.abort(),W.delete(E)}function oc(E){for(let T of E){let D=zo(T),U=Ss(D.data);S.fetchers.set(T,U)}}function ra(){let E=[],T=!1;for(let D of ae){let U=S.fetchers.get(D);Ne(U,"Expected fetcher: "+D),U.state==="loading"&&(ae.delete(D),E.push(D),T=!0)}return oc(E),T}function cv(E){let T=[];for(let[D,U]of q)if(U0}function _E(E,T){let D=S.blockers.get(E)||ha;return Fe.get(E)!==T&&Fe.set(E,T),D}function uv(E){S.blockers.delete(E),Fe.delete(E)}function ic(E,T){let D=S.blockers.get(E)||ha;Ne(D.state==="unblocked"&&T.state==="blocked"||D.state==="blocked"&&T.state==="blocked"||D.state==="blocked"&&T.state==="proceeding"||D.state==="blocked"&&T.state==="unblocked"||D.state==="proceeding"&&T.state==="unblocked","Invalid blocker state transition: "+D.state+" -> "+T.state);let U=new Map(S.blockers);U.set(E,T),we({blockers:U})}function dv(E){let{currentLocation:T,nextLocation:D,historyAction:U}=E;if(Fe.size===0)return;Fe.size>1&&Ro(!1,"A router only supports one blocker at a time");let re=Array.from(Fe.entries()),[de,ye]=re[re.length-1],K=S.blockers.get(de);if(!(K&&K.state==="proceeding")&&ye({currentLocation:T,nextLocation:D,historyAction:U}))return de}function yf(E){let T=rn(404,{pathname:E}),D=a||i,{matches:U,route:re}=Ly(D);return xf(),{notFoundMatches:U,route:re,error:T}}function ac(E,T){return{boundaryId:hi(T.partialMatches).route.id,error:rn(400,{type:"route-discovery",pathname:E,message:T.error!=null&&"message"in T.error?T.error:String(T.error)})}}function xf(E){let T=[];return ct.forEach((D,U)=>{(!E||E(U))&&(D.cancel(),T.push(U),ct.delete(U))}),T}function SE(E,T,D){if(y=E,_=T,v=D||null,!g&&S.navigation===Kf){g=!0;let U=hv(S.location,S.matches);U!=null&&we({restoreScrollPosition:U})}return()=>{y=null,_=null,v=null}}function fv(E,T){return v&&v(E,T.map(U=>oR(U,S.loaderData)))||E.key}function bE(E,T){if(y&&_){let D=fv(E,T);y[D]=_()}}function hv(E,T){if(y){let D=fv(E,T),U=y[D];if(typeof U=="number")return U}return null}function wf(E,T,D){if(d)if(E){let U=E[E.length-1].route;if(U.path&&(U.path==="*"||U.path.endsWith("/*")))return{active:!0,matches:eu(T,D,l,!0)}}else return{active:!0,matches:eu(T,D,l,!0)||[]};return{active:!1,matches:null}}async function lc(E,T,D){let U=E,re=U.length>0?U[U.length-1].route:null;for(;;){let de=a==null,ye=a||i;try{await OR(d,T,U,ye,o,s,le,D)}catch(ge){return{type:"error",error:ge,partialMatches:U}}finally{de&&(i=[...i])}if(D.aborted)return{type:"aborted"};let K=uo(ye,T,l),be=!1;if(K){let ge=K[K.length-1].route;if(ge.index)return{type:"success",matches:K};if(ge.path&&ge.path.length>0)if(ge.path==="*")be=!0;else return{type:"success",matches:K}}let pe=eu(ye,T,l,!0);if(!pe||U.map(ge=>ge.route.id).join("-")===pe.map(ge=>ge.route.id).join("-"))return{type:"success",matches:be?K:null};if(U=pe,re=U[U.length-1].route,re.path==="*")return{type:"success",matches:U}}}function CE(E){o={},a=fl(E,s,void 0,o)}function kE(E,T){let D=a==null;h_(E,T,a||i,o,s),D&&(i=[...i],we({}))}return C={get basename(){return l},get future(){return f},get state(){return S},get routes(){return i},get window(){return t},initialize:Ye,subscribe:$e,enableScrollRestoration:SE,navigate:Yt,fetch:X,revalidate:ms,createHref:E=>e.history.createHref(E),encodeLocation:E=>e.history.encodeLocation(E),getFetcher:zo,deleteFetcher:vf,dispose:Ue,getBlocker:_E,deleteBlocker:uv,patchRoutes:kE,_internalFetchControllers:W,_internalActiveDeferreds:ct,_internalSetRoutes:CE},C}function DR(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function up(e,t,n,r,s,o,i,a){let l,c;if(i){l=[];for(let f of t)if(l.push(f),f.route.id===i){c=f;break}}else l=t,c=t[t.length-1];let d=Nd(s||".",Td(l,o),Hi(e.pathname,n)||e.pathname,a==="path");return s==null&&(d.search=e.search,d.hash=e.hash),(s==null||s===""||s===".")&&c&&c.route.index&&!Vm(d.search)&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(d.pathname=d.pathname==="/"?n:Zr([n,d.pathname])),Po(d)}function Ny(e,t,n,r){if(!r||!DR(r))return{path:n};if(r.formMethod&&!BR(r.formMethod))return{path:n,error:rn(405,{method:r.formMethod})};let s=()=>({path:n,error:rn(400,{type:"invalid-body"})}),o=r.formMethod||"get",i=e?o.toUpperCase():o.toLowerCase(),a=p_(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Qn(i))return s();let p=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((x,y)=>{let[v,_]=y;return""+x+v+"="+_+` -`},""):String(r.body);return{path:n,submission:{formMethod:i,formAction:a,formEncType:r.formEncType,formData:void 0,json:void 0,text:p}}}else if(r.formEncType==="application/json"){if(!Qn(i))return s();try{let p=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:i,formAction:a,formEncType:r.formEncType,formData:void 0,json:p,text:void 0}}}catch{return s()}}}Ne(typeof FormData=="function","FormData is not available in this environment");let l,c;if(r.formData)l=dp(r.formData),c=r.formData;else if(r.body instanceof FormData)l=dp(r.body),c=r.body;else if(r.body instanceof URLSearchParams)l=r.body,c=jy(l);else if(r.body==null)l=new URLSearchParams,c=new FormData;else try{l=new URLSearchParams(r.body),c=jy(l)}catch{return s()}let d={formMethod:i,formAction:a,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(Qn(d.formMethod))return{path:n,submission:d};let f=cs(n);return t&&f.search&&Vm(f.search)&&l.append("index",""),f.search="?"+l,{path:Po(f),submission:d}}function MR(e,t){let n=e;if(t){let r=e.findIndex(s=>s.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function Ry(e,t,n,r,s,o,i,a,l,c,d,f,p,x,y,v){let _=v?kn(v[1])?v[1].error:v[1].data:void 0,g=e.createURL(t.location),m=e.createURL(s),w=v&&kn(v[1])?v[0]:void 0,b=w?MR(n,w):n,C=v?v[1].statusCode:void 0,S=i&&C&&C>=400,N=b.filter((F,L)=>{let{route:Z}=F;if(Z.lazy)return!0;if(Z.loader==null)return!1;if(o)return typeof Z.loader!="function"||Z.loader.hydrate?!0:t.loaderData[Z.id]===void 0&&(!t.errors||t.errors[Z.id]===void 0);if(jR(t.loaderData,t.matches[L],F)||l.some(A=>A===F.route.id))return!0;let j=t.matches[L],B=F;return Py(F,ht({currentUrl:g,currentParams:j.params,nextUrl:m,nextParams:B.params},r,{actionResult:_,actionStatus:C,defaultShouldRevalidate:S?!1:a||g.pathname+g.search===m.pathname+m.search||g.search!==m.search||f_(j,B)}))}),R=[];return f.forEach((F,L)=>{if(o||!n.some(H=>H.route.id===F.routeId)||d.has(L))return;let Z=uo(x,F.path,y);if(!Z){R.push({key:L,routeId:F.routeId,path:F.path,matches:null,match:null,controller:null});return}let j=t.fetchers.get(L),B=ka(Z,F.path),A=!1;p.has(L)?A=!1:c.includes(L)?A=!0:j&&j.state!=="idle"&&j.data===void 0?A=a:A=Py(B,ht({currentUrl:g,currentParams:t.matches[t.matches.length-1].params,nextUrl:m,nextParams:n[n.length-1].params},r,{actionResult:_,actionStatus:C,defaultShouldRevalidate:S?!1:a})),A&&R.push({key:L,routeId:F.routeId,path:F.path,matches:Z,match:B,controller:new AbortController})}),[N,R]}function jR(e,t,n){let r=!t||n.route.id!==t.route.id,s=e[n.route.id]===void 0;return r||s}function f_(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function Py(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function OR(e,t,n,r,s,o,i,a){let l=[t,...n.map(c=>c.route.id)].join("-");try{let c=i.get(l);c||(c=e({path:t,matches:n,patch:(d,f)=>{a.aborted||h_(d,f,r,s,o)}}),i.set(l,c)),c&&zR(c)&&await c}finally{i.delete(l)}}function h_(e,t,n,r,s){if(e){var o;let i=r[e];Ne(i,"No route found to patch children into: routeId = "+e);let a=fl(t,s,[e,"patch",String(((o=i.children)==null?void 0:o.length)||"0")],r);i.children?i.children.push(...a):i.children=a}else{let i=fl(t,s,["patch",String(n.length||"0")],r);n.push(...i)}}async function Dy(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let s=n[e.id];Ne(s,"No route found in manifest");let o={};for(let i in r){let l=s[i]!==void 0&&i!=="hasErrorBoundary";Ro(!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&&!rR.has(i)&&(o[i]=r[i])}Object.assign(s,o),Object.assign(s,ht({},t(s),{lazy:void 0}))}function AR(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function IR(e,t,n,r,s,o,i,a){let l=r.reduce((f,p)=>f.add(p.route.id),new Set),c=new Set,d=await e({matches:s.map(f=>{let p=l.has(f.route.id);return ht({},f,{shouldLoad:p,resolve:y=>(c.add(f.route.id),p?LR(t,n,f,o,i,y,a):Promise.resolve({type:Je.data,result:void 0}))})}),request:n,params:s[0].params,context:a});return s.forEach(f=>Ne(c.has(f.route.id),'`match.resolve()` was not called for route id "'+f.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),d.filter((f,p)=>l.has(s[p].route.id))}async function LR(e,t,n,r,s,o,i){let a,l,c=d=>{let f,p=new Promise((v,_)=>f=_);l=()=>f(),t.signal.addEventListener("abort",l);let x=v=>typeof d!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):d({request:t,params:n.params,context:i},...v!==void 0?[v]:[]),y;return o?y=o(v=>x(v)):y=(async()=>{try{return{type:"data",result:await x()}}catch(v){return{type:"error",result:v}}})(),Promise.race([y,p])};try{let d=n.route[e];if(n.route.lazy)if(d){let f,[p]=await Promise.all([c(d).catch(x=>{f=x}),Dy(n.route,s,r)]);if(f!==void 0)throw f;a=p}else if(await Dy(n.route,s,r),d=n.route[e],d)a=await c(d);else if(e==="action"){let f=new URL(t.url),p=f.pathname+f.search;throw rn(405,{method:t.method,pathname:p,routeId:n.route.id})}else return{type:Je.data,result:void 0};else if(d)a=await c(d);else{let f=new URL(t.url),p=f.pathname+f.search;throw rn(404,{pathname:p})}Ne(a.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(d){return{type:Je.error,result:d}}finally{l&&t.signal.removeEventListener("abort",l)}return a}async function FR(e){let{result:t,type:n,status:r}=e;if(m_(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:Je.error,error:a}}return n===Je.error?{type:Je.error,error:new Um(t.status,t.statusText,i),statusCode:t.status,headers:t.headers}:{type:Je.data,data:i,statusCode:t.status,headers:t.headers}}if(n===Je.error)return{type:Je.error,error:t,statusCode:Rd(t)?t.status:r};if(YR(t)){var s,o;return{type:Je.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:Je.data,data:t,statusCode:r}}function UR(e,t,n,r,s,o){let i=e.headers.get("Location");if(Ne(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!$m.test(i)){let a=r.slice(0,r.findIndex(l=>l.route.id===n)+1);i=up(new URL(t.url),a,s,!0,i,o),e.headers.set("Location",i)}return e}function My(e,t,n){if($m.test(e)){let r=e,s=r.startsWith("//")?new URL(t.protocol+r):new URL(r),o=Hi(s.pathname,n)!=null;if(s.origin===t.origin&&o)return s.pathname+s.search+s.hash}return e}function Go(e,t,n,r){let s=e.createURL(p_(t)).toString(),o={signal:n};if(r&&Qn(r.formMethod)){let{formMethod:i,formEncType:a}=r;o.method=i.toUpperCase(),a==="application/json"?(o.headers=new Headers({"Content-Type":a}),o.body=JSON.stringify(r.json)):a==="text/plain"?o.body=r.text:a==="application/x-www-form-urlencoded"&&r.formData?o.body=dp(r.formData):o.body=r.formData}return new Request(s,o)}function dp(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function jy(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function $R(e,t,n,r,s,o){let i={},a=null,l,c=!1,d={},f=r&&kn(r[1])?r[1].error:void 0;return n.forEach((p,x)=>{let y=t[x].route.id;if(Ne(!go(p),"Cannot handle redirect results in processLoaderData"),kn(p)){let v=p.error;f!==void 0&&(v=f,f=void 0),a=a||{};{let _=hi(e,y);a[_.route.id]==null&&(a[_.route.id]=v)}i[y]=void 0,c||(c=!0,l=Rd(p.error)?p.error.status:500),p.headers&&(d[y]=p.headers)}else mo(p)?(s.set(y,p.deferredData),i[y]=p.deferredData.data,p.statusCode!=null&&p.statusCode!==200&&!c&&(l=p.statusCode),p.headers&&(d[y]=p.headers)):(i[y]=p.data,p.statusCode&&p.statusCode!==200&&!c&&(l=p.statusCode),p.headers&&(d[y]=p.headers))}),f!==void 0&&r&&(a={[r[0]]:f},i[r[0]]=void 0),{loaderData:i,errors:a,statusCode:l||200,loaderHeaders:d}}function Oy(e,t,n,r,s,o,i,a){let{loaderData:l,errors:c}=$R(t,n,r,s,a);for(let d=0;dr.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function Ly(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function rn(e,t){let{pathname:n,routeId:r,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 "'+n+'" - the `unstable_patchRoutesOnMiss()` '+(`function threw the following error: -`+i):s&&n&&r?l="You made a "+s+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"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 "'+r+'" does not match URL "'+n+'"'):e===404?(a="Not Found",l='No route matches URL "'+n+'"'):e===405&&(a="Method Not Allowed",s&&n&&r?l="You made a "+s.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":s&&(l='Invalid request method "'+s.toUpperCase()+'"')),new Um(e||500,a,new Error(l),!0)}function Fy(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(go(n))return{result:n,idx:t}}}function p_(e){let t=typeof e=="string"?cs(e):e;return Po(ht({},t,{hash:""}))}function VR(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function zR(e){return typeof e=="object"&&e!=null&&"then"in e}function WR(e){return m_(e.result)&&ER.has(e.result.status)}function mo(e){return e.type===Je.deferred}function kn(e){return e.type===Je.error}function go(e){return(e&&e.type)===Je.redirect}function YR(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 m_(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function BR(e){return kR.has(e.toLowerCase())}function Qn(e){return bR.has(e.toLowerCase())}async function Uy(e,t,n,r,s,o){for(let i=0;if.route.id===l.route.id),d=c!=null&&!f_(c,l)&&(o&&o[l.route.id])!==void 0;if(mo(a)&&(s||d)){let f=r[i];Ne(f,"Expected an AbortSignal for revalidating fetcher deferred result"),await g_(a,f,s).then(p=>{p&&(n[i]=p||n[i])})}}}async function g_(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:Je.data,data:e.deferredData.unwrappedData}}catch(s){return{type:Je.error,error:s}}return{type:Je.data,data:e.deferredData.data}}}function Vm(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function ka(e,t){let n=typeof t=="string"?cs(t).search:t.search;if(e[e.length-1].route.index&&Vm(n||""))return e[e.length-1];let r=c_(e);return r[r.length-1]}function $y(e){let{formMethod:t,formAction:n,formEncType:r,text:s,formData:o,json:i}=e;if(!(!t||!n||!r)){if(s!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:s};if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:i,text:void 0}}}function Zf(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 HR(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 pa(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 GR(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 Ss(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 KR(e,t){try{let n=e.sessionStorage.getItem(d_);if(n){let r=JSON.parse(n);for(let[s,o]of Object.entries(r||{}))o&&Array.isArray(o)&&t.set(s,new Set(o||[]))}}catch{}}function ZR(e,t){if(t.size>0){let n={};for(let[r,s]of t)n[r]=[...s];try{e.sessionStorage.setItem(d_,JSON.stringify(n))}catch(r){Ro(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** - * 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 Fu(){return Fu=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),h.useCallback(function(c,d){if(d===void 0&&(d={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let f=Nd(c,JSON.parse(i),o,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Zr([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,i,o,e])}const XR=h.createContext(null);function JR(e){let t=h.useContext(us).outlet;return t&&h.createElement(XR.Provider,{value:e},t)}function w_(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=h.useContext(no),{matches:s}=h.useContext(us),{pathname:o}=ro(),i=JSON.stringify(Td(s,r.v7_relativeSplatPath));return h.useMemo(()=>Nd(e,JSON.parse(i),o,n==="path"),[e,i,o,n])}function eP(e,t,n,r){Gi()||Ne(!1);let{navigator:s}=h.useContext(no),{matches:o}=h.useContext(us),i=o[o.length-1],a=i?i.params:{};i&&i.pathname;let l=i?i.pathnameBase:"/";i&&i.route;let c=ro(),d;d=c;let f=d.pathname||"/",p=f;if(l!=="/"){let v=l.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(v.length).join("/")}let x=uo(e,{pathname:p});return oP(x&&x.map(v=>Object.assign({},v,{params:Object.assign({},a,v.params),pathname:Zr([l,s.encodeLocation?s.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?l:Zr([l,s.encodeLocation?s.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),o,n,r)}function tP(){let e=cP(),t=Rd(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return h.createElement(h.Fragment,null,h.createElement("h2",null,"Unexpected Application Error!"),h.createElement("h3",{style:{fontStyle:"italic"}},t),n?h.createElement("pre",{style:s},n):null,null)}const nP=h.createElement(tP,null);class rP extends h.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,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?h.createElement(us.Provider,{value:this.props.routeContext},h.createElement(y_.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function sP(e){let{routeContext:t,match:n,children:r}=e,s=h.useContext(Pd);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),h.createElement(us.Provider,{value:t},r)}function oP(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if((o=n)!=null&&o.errors)e=n.matches;else return null}let i=e,a=(s=n)==null?void 0:s.errors;if(a!=null){let d=i.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);d>=0||Ne(!1),i=i.slice(0,Math.min(i.length,d+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d=0?i=i.slice(0,c+1):i=[i[0]];break}}}return i.reduceRight((d,f,p)=>{let x,y=!1,v=null,_=null;n&&(x=a&&f.route.id?a[f.route.id]:void 0,v=f.route.errorElement||nP,l&&(c<0&&p===0?(dP("route-fallback"),y=!0,_=null):c===p&&(y=!0,_=f.route.hydrateFallbackElement||null)));let g=t.concat(i.slice(0,p+1)),m=()=>{let w;return x?w=v:y?w=_:f.route.Component?w=h.createElement(f.route.Component,null):f.route.element?w=f.route.element:w=d,h.createElement(sP,{match:f,routeContext:{outlet:d,matches:g,isDataRoute:n!=null},children:w})};return n&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?h.createElement(rP,{location:n.location,revalidation:n.revalidation,component:v,error:x,children:m(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):m()},null)}var __=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(__||{}),Uu=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}(Uu||{});function iP(e){let t=h.useContext(Pd);return t||Ne(!1),t}function aP(e){let t=h.useContext(v_);return t||Ne(!1),t}function lP(e){let t=h.useContext(us);return t||Ne(!1),t}function S_(e){let t=lP(),n=t.matches[t.matches.length-1];return n.route.id||Ne(!1),n.route.id}function cP(){var e;let t=h.useContext(y_),n=aP(Uu.UseRouteError),r=S_(Uu.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function uP(){let{router:e}=iP(__.UseNavigateStable),t=S_(Uu.UseNavigateStable),n=h.useRef(!1);return x_(()=>{n.current=!0}),h.useCallback(function(s,o){o===void 0&&(o={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Fu({fromRouteId:t},o)))},[e,t])}const Vy={};function dP(e,t,n){Vy[e]||(Vy[e]=!0)}function b_(e){let{to:t,replace:n,state:r,relative:s}=e;Gi()||Ne(!1);let{future:o,static:i}=h.useContext(no),{matches:a}=h.useContext(us),{pathname:l}=ro(),c=so(),d=Nd(t,Td(a,o.v7_relativeSplatPath),l,s==="path"),f=JSON.stringify(d);return h.useEffect(()=>c(JSON.parse(f),{replace:n,state:r,relative:s}),[c,f,s,n,r]),null}function C_(e){return JR(e.context)}function fP(e){let{basename:t="/",children:n=null,location:r,navigationType:s=Ct.Pop,navigator:o,static:i=!1,future:a}=e;Gi()&&Ne(!1);let l=t.replace(/^\/*/,"/"),c=h.useMemo(()=>({basename:l,navigator:o,static:i,future:Fu({v7_relativeSplatPath:!1},a)}),[l,a,o,i]);typeof r=="string"&&(r=cs(r));let{pathname:d="/",search:f="",hash:p="",state:x=null,key:y="default"}=r,v=h.useMemo(()=>{let _=Hi(d,l);return _==null?null:{location:{pathname:_,search:f,hash:p,state:x,key:y},navigationType:s}},[l,d,f,p,x,y,s]);return v==null?null:h.createElement(no.Provider,{value:c},h.createElement(zm.Provider,{children:n,value:v}))}new Promise(()=>{});function hP(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:h.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:h.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:h.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 hl(){return hl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[s]=e[s]);return n}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 fp(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function vP(e,t){let n=fp(e);return t&&t.forEach((r,s)=>{n.has(s)||t.getAll(s).forEach(o=>{n.append(s,o)})}),n}const yP=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],xP="6";try{window.__reactRouterVersion=xP}catch{}function wP(e,t){return PR({basename:void 0,future:hl({},void 0,{v7_prependBasename:!0}),history:eR({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=hl({},t,{errors:SP(t.errors)})),t}function SP(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,s]of t)if(s&&s.__type==="RouteErrorResponse")n[r]=new Um(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="",n[r]=i}catch{}}if(n[r]==null){let o=new Error(s.message);o.stack="",n[r]=o}}else n[r]=s;return n}const bP=h.createContext({isTransitioning:!1}),CP=h.createContext(new Map),kP="startTransition",zy=rw[kP],EP="flushSync",Wy=JN[EP];function TP(e){zy?zy(e):e()}function ma(e){Wy?Wy(e):e()}class NP{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function RP(e){let{fallbackElement:t,router:n,future:r}=e,[s,o]=h.useState(n.state),[i,a]=h.useState(),[l,c]=h.useState({isTransitioning:!1}),[d,f]=h.useState(),[p,x]=h.useState(),[y,v]=h.useState(),_=h.useRef(new Map),{v7_startTransition:g}=r||{},m=h.useCallback(R=>{g?TP(R):R()},[g]),w=h.useCallback((R,F)=>{let{deletedFetchers:L,unstable_flushSync:Z,unstable_viewTransitionOpts:j}=F;L.forEach(A=>_.current.delete(A)),R.fetchers.forEach((A,H)=>{A.data!==void 0&&_.current.set(H,A.data)});let B=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!j||B){Z?ma(()=>o(R)):m(()=>o(R));return}if(Z){ma(()=>{p&&(d&&d.resolve(),p.skipTransition()),c({isTransitioning:!0,flushSync:!0,currentLocation:j.currentLocation,nextLocation:j.nextLocation})});let A=n.window.document.startViewTransition(()=>{ma(()=>o(R))});A.finished.finally(()=>{ma(()=>{f(void 0),x(void 0),a(void 0),c({isTransitioning:!1})})}),ma(()=>x(A));return}p?(d&&d.resolve(),p.skipTransition(),v({state:R,currentLocation:j.currentLocation,nextLocation:j.nextLocation})):(a(R),c({isTransitioning:!0,flushSync:!1,currentLocation:j.currentLocation,nextLocation:j.nextLocation}))},[n.window,p,d,_,m]);h.useLayoutEffect(()=>n.subscribe(w),[n,w]),h.useEffect(()=>{l.isTransitioning&&!l.flushSync&&f(new NP)},[l]),h.useEffect(()=>{if(d&&i&&n.window){let R=i,F=d.promise,L=n.window.document.startViewTransition(async()=>{m(()=>o(R)),await F});L.finished.finally(()=>{f(void 0),x(void 0),a(void 0),c({isTransitioning:!1})}),x(L)}},[m,i,d,n.window]),h.useEffect(()=>{d&&i&&s.location.key===i.location.key&&d.resolve()},[d,p,s.location,i]),h.useEffect(()=>{!l.isTransitioning&&y&&(a(y.state),c({isTransitioning:!0,flushSync:!1,currentLocation:y.currentLocation,nextLocation:y.nextLocation}),v(void 0))},[l.isTransitioning,y]),h.useEffect(()=>{},[]);let b=h.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:R=>n.navigate(R),push:(R,F,L)=>n.navigate(R,{state:F,preventScrollReset:L==null?void 0:L.preventScrollReset}),replace:(R,F,L)=>n.navigate(R,{replace:!0,state:F,preventScrollReset:L==null?void 0:L.preventScrollReset})}),[n]),C=n.basename||"/",S=h.useMemo(()=>({router:n,navigator:b,static:!1,basename:C}),[n,b,C]),N=h.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return h.createElement(h.Fragment,null,h.createElement(Pd.Provider,{value:S},h.createElement(v_.Provider,{value:s},h.createElement(CP.Provider,{value:_.current},h.createElement(bP.Provider,{value:l},h.createElement(fP,{basename:C,location:s.location,navigationType:s.historyAction,navigator:b,future:N},s.initialized||n.future.v7_partialHydration?h.createElement(PP,{routes:n.routes,future:n.future,state:s}):t))))),null)}const PP=h.memo(DP);function DP(e){let{routes:t,future:n,state:r}=e;return eP(t,void 0,r,n)}const MP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",jP=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Fr=h.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:o,replace:i,state:a,target:l,to:c,preventScrollReset:d,unstable_viewTransition:f}=t,p=pP(t,yP),{basename:x}=h.useContext(no),y,v=!1;if(typeof c=="string"&&jP.test(c)&&(y=c,MP))try{let w=new URL(window.location.href),b=c.startsWith("//")?new URL(w.protocol+c):new URL(c),C=Hi(b.pathname,x);b.origin===w.origin&&C!=null?c=C+b.search+b.hash:v=!0}catch{}let _=qR(c,{relative:s}),g=OP(c,{replace:i,state:a,target:l,preventScrollReset:d,relative:s,unstable_viewTransition:f});function m(w){r&&r(w),w.defaultPrevented||g(w)}return h.createElement("a",hl({},p,{href:y||_,onClick:v||o?r:m,ref:n,target:l}))});var Yy;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Yy||(Yy={}));var By;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(By||(By={}));function OP(e,t){let{target:n,replace:r,state:s,preventScrollReset:o,relative:i,unstable_viewTransition:a}=t===void 0?{}:t,l=so(),c=ro(),d=w_(e,{relative:i});return h.useCallback(f=>{if(gP(f,n)){f.preventDefault();let p=r!==void 0?r:Po(c)===Po(d);l(e,{replace:p,state:s,preventScrollReset:o,relative:i,unstable_viewTransition:a})}},[c,l,d,r,s,n,e,o,i,a])}function AP(e){let t=h.useRef(fp(e)),n=h.useRef(!1),r=ro(),s=h.useMemo(()=>vP(r.search,n.current?null:t.current),[r.search]),o=so(),i=h.useCallback((a,l)=>{const c=fp(typeof a=="function"?a(s):a);n.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(),k_=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).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=h.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:i,...a},l)=>h.createElement("svg",{ref:l,...LP,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:k_("lucide",s),...a},[...i.map(([c,d])=>h.createElement(c,d)),...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 tn=(e,t)=>{const n=h.forwardRef(({className:r,...s},o)=>h.createElement(FP,{ref:o,iconNode:t,className:k_(`lucide-${IP(e)}`,r),...s}));return n.displayName=`${e}`,n};/** - * @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 E_=tn("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 T_=tn("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 UP=tn("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 $P=tn("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 N_=tn("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 VP=tn("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 R_=tn("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 zP=tn("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 hp=tn("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 Hy=tn("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 WP=tn("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 YP=tn("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 Gy=tn("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 Ky=tn("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=tn("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 Wm=tn("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 Dd(...e){return t=>e.forEach(n=>HP(n,t))}function Ie(...e){return h.useCallback(Dd(...e),e)}var ns=h.forwardRef((e,t)=>{const{children:n,...r}=e,s=h.Children.toArray(n),o=s.find(GP);if(o){const i=o.props.children,a=s.map(l=>l===o?h.Children.count(i)>1?h.Children.only(null):h.isValidElement(i)?i.props.children:null:l);return u.jsx(pp,{...r,ref:t,children:h.isValidElement(i)?h.cloneElement(i,void 0,a):null})}return u.jsx(pp,{...r,ref:t,children:n})});ns.displayName="Slot";var pp=h.forwardRef((e,t)=>{const{children:n,...r}=e;if(h.isValidElement(n)){const s=ZP(n);return h.cloneElement(n,{...KP(r,n.props),ref:t?Dd(t,s):s})}return h.Children.count(n)>1?h.Children.only(null):null});pp.displayName="SlotClone";var Ym=({children:e})=>u.jsx(u.Fragment,{children:e});function GP(e){return h.isValidElement(e)&&e.type===Ym}function KP(e,t){const n={...t};for(const r in t){const s=e[r],o=t[r];/^on[A-Z]/.test(r)?s&&o?n[r]=(...a)=>{o(...a),s(...a)}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function ZP(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function P_(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ttypeof e=="boolean"?"".concat(e):e===0?"0":e,qy=qP,zl=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return qy(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:o}=t,i=Object.keys(s).map(c=>{const d=n==null?void 0:n[c],f=o==null?void 0:o[c];if(d===null)return null;const p=Zy(d)||Zy(f);return s[c][p]}),a=n&&Object.entries(n).reduce((c,d)=>{let[f,p]=d;return p===void 0||(c[f]=p),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,d)=>{let{class:f,className:p,...x}=d;return Object.entries(x).every(y=>{let[v,_]=y;return Array.isArray(_)?_.includes({...o,...a}[v]):{...o,...a}[v]===_})?[...c,f,p]:c},[]);return qy(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)};function D_(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=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 Qy=/^\[(.+)\]$/;function JP(e){if(Qy.test(e)){const t=Qy.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function eD(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return nD(Object.entries(e.classGroups),n).forEach(([o,i])=>{mp(i,r,o,t)}),r}function mp(e,t,n,r){e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:Xy(t,s);o.classGroupId=n;return}if(typeof s=="function"){if(tD(s)){mp(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([o,i])=>{mp(i,Xy(t,o),n,r)})})}function Xy(e,t){let n=e;return t.split(Bm).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function tD(e){return e.isThemeGetter}function nD(e,t){return t?e.map(([n,r])=>{const s=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,a])=>[t+i,a])):o);return[n,s]}):e}function rD(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function s(o,i){n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)}return{get(o){let i=n.get(o);if(i!==void 0)return i;if((i=r.get(o))!==void 0)return s(o,i),i},set(o,i){n.has(o)?n.set(o,i):s(o,i)}}}const j_="!";function sD(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],o=t.length;function i(a){const l=[];let c=0,d=0,f;for(let _=0;_d?f-d:void 0;return{modifiers:l,hasImportantModifier:x,baseClassName:y,maybePostfixModifierPosition:v}}return n?function(l){return n({className:l,parseClassName:i})}:i}function oD(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function iD(e){return{cache:rD(e.cacheSize),parseClassName:sD(e),...XP(e)}}const aD=/\s+/;function lD(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,o=new Set;return e.trim().split(aD).map(i=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:d}=n(i);let f=!!d,p=r(f?c.substring(0,d):c);if(!p){if(!f)return{isTailwindClass:!1,originalClassName:i};if(p=r(c),!p)return{isTailwindClass:!1,originalClassName:i};f=!1}const x=oD(a).join(":");return{isTailwindClass:!0,modifierId:l?x+j_:x,classGroupId:p,originalClassName:i,hasPostfixModifier:f}}).reverse().filter(i=>{if(!i.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:c}=i,d=a+l;return o.has(d)?!1:(o.add(d),s(l,c).forEach(f=>o.add(a+f)),!0)}).reverse().map(i=>i.originalClassName).join(" ")}function cD(){let e=0,t,n,r="";for(;ef(d),e());return n=iD(c),r=n.cache.get,s=n.cache.set,o=a,a(l)}function a(l){const c=r(l);if(c)return c;const d=lD(l,n);return s(l,d),d}return function(){return o(cD.apply(null,arguments))}}function tt(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const A_=/^\[(?:([a-z-]+):)?(.+)\]$/i,dD=/^\d+\/\d+$/,fD=new Set(["px","full","screen"]),hD=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,pD=/\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$/,mD=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,gD=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,vD=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Ar(e){return vo(e)||fD.has(e)||dD.test(e)}function ws(e){return Ki(e,"length",kD)}function vo(e){return!!e&&!Number.isNaN(Number(e))}function Rc(e){return Ki(e,"number",vo)}function ga(e){return!!e&&Number.isInteger(Number(e))}function yD(e){return e.endsWith("%")&&vo(e.slice(0,-1))}function Ce(e){return A_.test(e)}function _s(e){return hD.test(e)}const xD=new Set(["length","size","percentage"]);function wD(e){return Ki(e,xD,I_)}function _D(e){return Ki(e,"position",I_)}const SD=new Set(["image","url"]);function bD(e){return Ki(e,SD,TD)}function CD(e){return Ki(e,"",ED)}function va(){return!0}function Ki(e,t,n){const r=A_.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function kD(e){return pD.test(e)&&!mD.test(e)}function I_(){return!1}function ED(e){return gD.test(e)}function TD(e){return vD.test(e)}function ND(){const e=tt("colors"),t=tt("spacing"),n=tt("blur"),r=tt("brightness"),s=tt("borderColor"),o=tt("borderRadius"),i=tt("borderSpacing"),a=tt("borderWidth"),l=tt("contrast"),c=tt("grayscale"),d=tt("hueRotate"),f=tt("invert"),p=tt("gap"),x=tt("gradientColorStops"),y=tt("gradientColorStopPositions"),v=tt("inset"),_=tt("margin"),g=tt("opacity"),m=tt("padding"),w=tt("saturate"),b=tt("scale"),C=tt("sepia"),S=tt("skew"),N=tt("space"),R=tt("translate"),F=()=>["auto","contain","none"],L=()=>["auto","hidden","clip","visible","scroll"],Z=()=>["auto",Ce,t],j=()=>[Ce,t],B=()=>["",Ar,ws],A=()=>["auto",vo,Ce],H=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ne=()=>["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"],I=()=>["start","end","center","between","around","evenly","stretch"],M=()=>["","0",Ce],q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ae=()=>[vo,Rc],me=()=>[vo,Ce];return{cacheSize:500,separator:":",theme:{colors:[va],spacing:[Ar,ws],blur:["none","",_s,Ce],brightness:ae(),borderColor:[e],borderRadius:["none","","full",_s,Ce],borderSpacing:j(),borderWidth:B(),contrast:ae(),grayscale:M(),hueRotate:me(),invert:M(),gap:j(),gradientColorStops:[e],gradientColorStopPositions:[yD,ws],inset:Z(),margin:Z(),opacity:ae(),padding:j(),saturate:ae(),scale:ae(),sepia:M(),skew:me(),space:j(),translate:j()},classGroups:{aspect:[{aspect:["auto","square","video",Ce]}],container:["container"],columns:[{columns:[_s]}],"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:[...H(),Ce]}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ga,Ce]}],basis:[{basis:Z()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ce]}],grow:[{grow:M()}],shrink:[{shrink:M()}],order:[{order:["first","last","none",ga,Ce]}],"grid-cols":[{"grid-cols":[va]}],"col-start-end":[{col:["auto",{span:["full",ga,Ce]},Ce]}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":[va]}],"row-start-end":[{row:["auto",{span:[ga,Ce]},Ce]}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ce]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ce]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...I()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...I(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...I(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[m]}],px:[{px:[m]}],py:[{py:[m]}],ps:[{ps:[m]}],pe:[{pe:[m]}],pt:[{pt:[m]}],pr:[{pr:[m]}],pb:[{pb:[m]}],pl:[{pl:[m]}],m:[{m:[_]}],mx:[{mx:[_]}],my:[{my:[_]}],ms:[{ms:[_]}],me:[{me:[_]}],mt:[{mt:[_]}],mr:[{mr:[_]}],mb:[{mb:[_]}],ml:[{ml:[_]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ce,t]}],"min-w":[{"min-w":[Ce,t,"min","max","fit"]}],"max-w":[{"max-w":[Ce,t,"none","full","min","max","fit","prose",{screen:[_s]},_s]}],h:[{h:[Ce,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ce,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ce,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ce,t,"auto","min","max","fit"]}],"font-size":[{text:["base",_s,ws]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Rc]}],"font-family":[{font:[va]}],"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",Ce]}],"line-clamp":[{"line-clamp":["none",vo,Rc]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ar,Ce]}],"list-image":[{"list-image":["none",Ce]}],"list-style-type":[{list:["none","disc","decimal",Ce]}],"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:[...ne(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ar,ws]}],"underline-offset":[{"underline-offset":["auto",Ar,Ce]}],"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:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ce]}],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",Ce]}],"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:[...H(),_D]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",wD]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},bD]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[x]}],"gradient-via":[{via:[x]}],"gradient-to":[{to:[x]}],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:[...ne(),"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:ne()}],"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:["",...ne()]}],"outline-offset":[{"outline-offset":[Ar,Ce]}],"outline-w":[{outline:[Ar,ws]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[Ar,ws]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",_s,CD]}],"shadow-color":[{shadow:[va]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...W(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":W()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",_s,Ce]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[w]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"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",Ce]}],duration:[{duration:me()}],ease:[{ease:["linear","in","out","in-out",Ce]}],delay:[{delay:me()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ce]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[ga,Ce]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ce]}],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",Ce]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"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",Ce]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ar,ws,Rc]}],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 RD=uD(ND);function ue(...e){return RD(QP(e))}const Hm=zl("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"}}),Nt=h.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},o)=>{const i=r?ns:"button";return u.jsx(i,{className:ue(Hm({variant:t,size:n,className:e})),ref:o,...s})});Nt.displayName="Button";function ee(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function PD(e,t){const n=h.createContext(t);function r(o){const{children:i,...a}=o,l=h.useMemo(()=>a,Object.values(a));return u.jsx(n.Provider,{value:l,children:i})}function s(o){const i=h.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return r.displayName=e+"Provider",[r,s]}function dr(e,t=[]){let n=[];function r(o,i){const a=h.createContext(i),l=n.length;n=[...n,i];function c(f){const{scope:p,children:x,...y}=f,v=(p==null?void 0:p[e][l])||a,_=h.useMemo(()=>y,Object.values(y));return u.jsx(v.Provider,{value:_,children:x})}function d(f,p){const x=(p==null?void 0:p[e][l])||a,y=h.useContext(x);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${o}\``)}return c.displayName=o+"Provider",[c,d]}const s=()=>{const o=n.map(i=>h.createContext(i));return function(a){const l=(a==null?void 0:a[e])||o;return h.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[r,DD(s,...t)]}function DD(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const i=r.reduce((a,{useScope:l,scopeName:c})=>{const f=l(o)[`__scope${c}`];return{...a,...f}},{});return h.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function Xt(e){const t=h.useRef(e);return h.useEffect(()=>{t.current=e}),h.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Bs({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,s]=MD({defaultProp:t,onChange:n}),o=e!==void 0,i=o?e:r,a=Xt(n),l=h.useCallback(c=>{if(o){const f=typeof c=="function"?c(e):c;f!==e&&a(f)}else s(c)},[o,e,s,a]);return[i,l]}function MD({defaultProp:e,onChange:t}){const n=h.useState(e),[r]=n,s=h.useRef(r),o=Xt(t);return h.useEffect(()=>{s.current!==r&&(o(r),s.current=r)},[r,s,o]),n}var jD=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],_e=jD.reduce((e,t)=>{const n=h.forwardRef((r,s)=>{const{asChild:o,...i}=r,a=o?ns:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(a,{...i,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Gm(e,t){e&&ls.flushSync(()=>e.dispatchEvent(t))}function Md(e){const t=e+"CollectionProvider",[n,r]=dr(t),[s,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=x=>{const{scope:y,children:v}=x,_=je.useRef(null),g=je.useRef(new Map).current;return u.jsx(s,{scope:y,itemMap:g,collectionRef:_,children:v})};i.displayName=t;const a=e+"CollectionSlot",l=je.forwardRef((x,y)=>{const{scope:v,children:_}=x,g=o(a,v),m=Ie(y,g.collectionRef);return u.jsx(ns,{ref:m,children:_})});l.displayName=a;const c=e+"CollectionItemSlot",d="data-radix-collection-item",f=je.forwardRef((x,y)=>{const{scope:v,children:_,...g}=x,m=je.useRef(null),w=Ie(y,m),b=o(c,v);return je.useEffect(()=>(b.itemMap.set(m,{ref:m,...g}),()=>void b.itemMap.delete(m))),u.jsx(ns,{[d]:"",ref:w,children:_})});f.displayName=c;function p(x){const y=o(e+"CollectionConsumer",x);return je.useCallback(()=>{const _=y.collectionRef.current;if(!_)return[];const g=Array.from(_.querySelectorAll(`[${d}]`));return Array.from(y.itemMap.values()).sort((b,C)=>g.indexOf(b.ref.current)-g.indexOf(C.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:i,Slot:l,ItemSlot:f},p,r]}var OD=h.createContext(void 0);function Km(e){const t=h.useContext(OD);return e||t||"ltr"}function AD(e,t=globalThis==null?void 0:globalThis.document){const n=Xt(e);h.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var ID="DismissableLayer",gp="dismissableLayer.update",LD="dismissableLayer.pointerDownOutside",FD="dismissableLayer.focusOutside",Jy,L_=h.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Zi=h.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:i,onDismiss:a,...l}=e,c=h.useContext(L_),[d,f]=h.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,x]=h.useState({}),y=Ie(t,N=>f(N)),v=Array.from(c.layers),[_]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),g=v.indexOf(_),m=d?v.indexOf(d):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,b=m>=g,C=$D(N=>{const R=N.target,F=[...c.branches].some(L=>L.contains(R));!b||F||(s==null||s(N),i==null||i(N),N.defaultPrevented||a==null||a())},p),S=VD(N=>{const R=N.target;[...c.branches].some(L=>L.contains(R))||(o==null||o(N),i==null||i(N),N.defaultPrevented||a==null||a())},p);return AD(N=>{m===c.layers.size-1&&(r==null||r(N),!N.defaultPrevented&&a&&(N.preventDefault(),a()))},p),h.useEffect(()=>{if(d)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Jy=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),ex(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Jy)}},[d,p,n,c]),h.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),ex())},[d,c]),h.useEffect(()=>{const N=()=>x({});return document.addEventListener(gp,N),()=>document.removeEventListener(gp,N)},[]),u.jsx(_e.div,{...l,ref:y,style:{pointerEvents:w?b?"auto":"none":void 0,...e.style},onFocusCapture:ee(e.onFocusCapture,S.onFocusCapture),onBlurCapture:ee(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:ee(e.onPointerDownCapture,C.onPointerDownCapture)})});Zi.displayName=ID;var UD="DismissableLayerBranch",F_=h.forwardRef((e,t)=>{const n=h.useContext(L_),r=h.useRef(null),s=Ie(t,r);return h.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),u.jsx(_e.div,{...e,ref:s})});F_.displayName=UD;function $D(e,t=globalThis==null?void 0:globalThis.document){const n=Xt(e),r=h.useRef(!1),s=h.useRef(()=>{});return h.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let l=function(){U_(LD,n,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);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function VD(e,t=globalThis==null?void 0:globalThis.document){const n=Xt(e),r=h.useRef(!1);return h.useEffect(()=>{const s=o=>{o.target&&!r.current&&U_(FD,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ex(){const e=new CustomEvent(gp);document.dispatchEvent(e)}function U_(e,t,n,{discrete:r}){const s=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?Gm(s,o):s.dispatchEvent(o)}var zD=Zi,WD=F_,qf=0;function Zm(){h.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??tx()),document.body.insertAdjacentElement("beforeend",e[1]??tx()),qf++,()=>{qf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),qf--}},[])}function tx(){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 Qf="focusScope.autoFocusOnMount",Xf="focusScope.autoFocusOnUnmount",nx={bubbles:!1,cancelable:!0},YD="FocusScope",jd=h.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...i}=e,[a,l]=h.useState(null),c=Xt(s),d=Xt(o),f=h.useRef(null),p=Ie(t,v=>l(v)),x=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(r){let v=function(w){if(x.paused||!a)return;const b=w.target;a.contains(b)?f.current=b:bs(f.current,{select:!0})},_=function(w){if(x.paused||!a)return;const b=w.relatedTarget;b!==null&&(a.contains(b)||bs(f.current,{select:!0}))},g=function(w){if(document.activeElement===document.body)for(const C of w)C.removedNodes.length>0&&bs(a)};document.addEventListener("focusin",v),document.addEventListener("focusout",_);const m=new MutationObserver(g);return a&&m.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",_),m.disconnect()}}},[r,a,x.paused]),h.useEffect(()=>{if(a){sx.add(x);const v=document.activeElement;if(!a.contains(v)){const g=new CustomEvent(Qf,nx);a.addEventListener(Qf,c),a.dispatchEvent(g),g.defaultPrevented||(BD(qD($_(a)),{select:!0}),document.activeElement===v&&bs(a))}return()=>{a.removeEventListener(Qf,c),setTimeout(()=>{const g=new CustomEvent(Xf,nx);a.addEventListener(Xf,d),a.dispatchEvent(g),g.defaultPrevented||bs(v??document.body,{select:!0}),a.removeEventListener(Xf,d),sx.remove(x)},0)}}},[a,c,d,x]);const y=h.useCallback(v=>{if(!n&&!r||x.paused)return;const _=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,g=document.activeElement;if(_&&g){const m=v.currentTarget,[w,b]=HD(m);w&&b?!v.shiftKey&&g===b?(v.preventDefault(),n&&bs(w,{select:!0})):v.shiftKey&&g===w&&(v.preventDefault(),n&&bs(b,{select:!0})):g===m&&v.preventDefault()}},[n,r,x.paused]);return u.jsx(_e.div,{tabIndex:-1,...i,ref:p,onKeyDown:y})});jd.displayName=YD;function BD(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(bs(r,{select:t}),document.activeElement!==n)return}function HD(e){const t=$_(e),n=rx(t,e),r=rx(t.reverse(),e);return[n,r]}function $_(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function rx(e,t){for(const n of e)if(!GD(n,{upTo:t}))return n}function GD(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 KD(e){return e instanceof HTMLInputElement&&"select"in e}function bs(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&KD(e)&&t&&e.select()}}var sx=ZD();function ZD(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ox(e,t),e.unshift(t)},remove(t){var n;e=ox(e,t),(n=e[0])==null||n.resume()}}}function ox(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function qD(e){return e.filter(t=>t.tagName!=="A")}var Jt=globalThis!=null&&globalThis.document?h.useLayoutEffect:()=>{},QD=rw.useId||(()=>{}),XD=0;function kr(e){const[t,n]=h.useState(QD());return Jt(()=>{n(r=>r??String(XD++))},[e]),t?`radix-${t}`:""}const JD=["top","right","bottom","left"],_r=Math.min,En=Math.max,$u=Math.round,Pc=Math.floor,Hs=e=>({x:e,y:e}),eM={left:"right",right:"left",bottom:"top",top:"bottom"},tM={start:"end",end:"start"};function vp(e,t,n){return En(e,_r(t,n))}function rs(e,t){return typeof e=="function"?e(t):e}function ss(e){return e.split("-")[0]}function qi(e){return e.split("-")[1]}function qm(e){return e==="x"?"y":"x"}function Qm(e){return e==="y"?"height":"width"}function Gs(e){return["top","bottom"].includes(ss(e))?"y":"x"}function Xm(e){return qm(Gs(e))}function nM(e,t,n){n===void 0&&(n=!1);const r=qi(e),s=Xm(e),o=Qm(s);let i=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=Vu(i)),[i,Vu(i)]}function rM(e){const t=Vu(e);return[yp(e),t,yp(t)]}function yp(e){return e.replace(/start|end/g,t=>tM[t])}function sM(e,t,n){const r=["left","right"],s=["right","left"],o=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?s:r:t?r:s;case"left":case"right":return t?o:i;default:return[]}}function oM(e,t,n,r){const s=qi(e);let o=sM(ss(e),n==="start",r);return s&&(o=o.map(i=>i+"-"+s),t&&(o=o.concat(o.map(yp)))),o}function Vu(e){return e.replace(/left|right|bottom|top/g,t=>eM[t])}function iM(e){return{top:0,right:0,bottom:0,left:0,...e}}function V_(e){return typeof e!="number"?iM(e):{top:e,right:e,bottom:e,left:e}}function zu(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function ix(e,t,n){let{reference:r,floating:s}=e;const o=Gs(t),i=Xm(t),a=Qm(i),l=ss(t),c=o==="y",d=r.x+r.width/2-s.width/2,f=r.y+r.height/2-s.height/2,p=r[a]/2-s[a]/2;let x;switch(l){case"top":x={x:d,y:r.y-s.height};break;case"bottom":x={x:d,y:r.y+r.height};break;case"right":x={x:r.x+r.width,y:f};break;case"left":x={x:r.x-s.width,y:f};break;default:x={x:r.x,y:r.y}}switch(qi(t)){case"start":x[i]-=p*(n&&c?-1:1);break;case"end":x[i]+=p*(n&&c?-1:1);break}return x}const aM=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:o=[],platform:i}=n,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:d,y:f}=ix(c,r,l),p=r,x={},y=0;for(let v=0;v({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:o,platform:i,elements:a,middlewareData:l}=t,{element:c,padding:d=0}=rs(e,t)||{};if(c==null)return{};const f=V_(d),p={x:n,y:r},x=Xm(s),y=Qm(x),v=await i.getDimensions(c),_=x==="y",g=_?"top":"left",m=_?"bottom":"right",w=_?"clientHeight":"clientWidth",b=o.reference[y]+o.reference[x]-p[x]-o.floating[y],C=p[x]-o.reference[x],S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let N=S?S[w]:0;(!N||!await(i.isElement==null?void 0:i.isElement(S)))&&(N=a.floating[w]||o.floating[y]);const R=b/2-C/2,F=N/2-v[y]/2-1,L=_r(f[g],F),Z=_r(f[m],F),j=L,B=N-v[y]-Z,A=N/2-v[y]/2+R,H=vp(j,A,B),ne=!l.arrow&&qi(s)!=null&&A!==H&&o.reference[y]/2-(AA<=0)){var Z,j;const A=(((Z=o.flip)==null?void 0:Z.index)||0)+1,H=N[A];if(H)return{data:{index:A,overflows:L},reset:{placement:H}};let ne=(j=L.filter(W=>W.overflows[0]<=0).sort((W,I)=>W.overflows[1]-I.overflows[1])[0])==null?void 0:j.placement;if(!ne)switch(x){case"bestFit":{var B;const W=(B=L.filter(I=>{if(S){const M=Gs(I.placement);return M===m||M==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(M=>M>0).reduce((M,q)=>M+q,0)]).sort((I,M)=>I[1]-M[1])[0])==null?void 0:B[0];W&&(ne=W);break}case"initialPlacement":ne=a;break}if(s!==ne)return{reset:{placement:ne}}}return{}}}};function ax(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function lx(e){return JD.some(t=>e[t]>=0)}const uM=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=rs(e,t);switch(r){case"referenceHidden":{const o=await pl(t,{...s,elementContext:"reference"}),i=ax(o,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:lx(i)}}}case"escaped":{const o=await pl(t,{...s,altBoundary:!0}),i=ax(o,n.floating);return{data:{escapedOffsets:i,escaped:lx(i)}}}default:return{}}}}};async function dM(e,t){const{placement:n,platform:r,elements:s}=e,o=await(r.isRTL==null?void 0:r.isRTL(s.floating)),i=ss(n),a=qi(n),l=Gs(n)==="y",c=["left","top"].includes(i)?-1:1,d=o&&l?-1:1,f=rs(t,e);let{mainAxis:p,crossAxis:x,alignmentAxis:y}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof y=="number"&&(x=a==="end"?y*-1:y),l?{x:x*d,y:p*c}:{x:p*c,y:x*d}}const fM=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:o,placement:i,middlewareData:a}=t,l=await dM(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:s+l.x,y:o+l.y,data:{...l,placement:i}}}}},hM=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:a={fn:_=>{let{x:g,y:m}=_;return{x:g,y:m}}},...l}=rs(e,t),c={x:n,y:r},d=await pl(t,l),f=Gs(ss(s)),p=qm(f);let x=c[p],y=c[f];if(o){const _=p==="y"?"top":"left",g=p==="y"?"bottom":"right",m=x+d[_],w=x-d[g];x=vp(m,x,w)}if(i){const _=f==="y"?"top":"left",g=f==="y"?"bottom":"right",m=y+d[_],w=y-d[g];y=vp(m,y,w)}const v=a.fn({...t,[p]:x,[f]:y});return{...v,data:{x:v.x-n,y:v.y-r}}}}},pM=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:o,middlewareData:i}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=rs(e,t),d={x:n,y:r},f=Gs(s),p=qm(f);let x=d[p],y=d[f];const v=rs(a,t),_=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const w=p==="y"?"height":"width",b=o.reference[p]-o.floating[w]+_.mainAxis,C=o.reference[p]+o.reference[w]-_.mainAxis;xC&&(x=C)}if(c){var g,m;const w=p==="y"?"width":"height",b=["top","left"].includes(ss(s)),C=o.reference[f]-o.floating[w]+(b&&((g=i.offset)==null?void 0:g[f])||0)+(b?0:_.crossAxis),S=o.reference[f]+o.reference[w]+(b?0:((m=i.offset)==null?void 0:m[f])||0)-(b?_.crossAxis:0);yS&&(y=S)}return{[p]:x,[f]:y}}}},mM=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:s,elements:o}=t,{apply:i=()=>{},...a}=rs(e,t),l=await pl(t,a),c=ss(n),d=qi(n),f=Gs(n)==="y",{width:p,height:x}=r.floating;let y,v;c==="top"||c==="bottom"?(y=c,v=d===(await(s.isRTL==null?void 0:s.isRTL(o.floating))?"start":"end")?"left":"right"):(v=c,y=d==="end"?"top":"bottom");const _=x-l.top-l.bottom,g=p-l.left-l.right,m=_r(x-l[y],_),w=_r(p-l[v],g),b=!t.middlewareData.shift;let C=m,S=w;if(f?S=d||b?_r(w,g):g:C=d||b?_r(m,_):_,b&&!d){const R=En(l.left,0),F=En(l.right,0),L=En(l.top,0),Z=En(l.bottom,0);f?S=p-2*(R!==0||F!==0?R+F:En(l.left,l.right)):C=x-2*(L!==0||Z!==0?L+Z:En(l.top,l.bottom))}await i({...t,availableWidth:S,availableHeight:C});const N=await s.getDimensions(o.floating);return p!==N.width||x!==N.height?{reset:{rects:!0}}:{}}}};function Qi(e){return z_(e)?(e.nodeName||"").toLowerCase():"#document"}function Rn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ds(e){var t;return(t=(z_(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function z_(e){return e instanceof Node||e instanceof Rn(e).Node}function ir(e){return e instanceof Element||e instanceof Rn(e).Element}function Tr(e){return e instanceof HTMLElement||e instanceof Rn(e).HTMLElement}function cx(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Rn(e).ShadowRoot}function Wl(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=ar(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(s)}function gM(e){return["table","td","th"].includes(Qi(e))}function Od(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Jm(e){const t=eg(),n=ir(e)?ar(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function vM(e){let t=Ks(e);for(;Tr(t)&&!Fi(t);){if(Jm(t))return t;if(Od(t))return null;t=Ks(t)}return null}function eg(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Fi(e){return["html","body","#document"].includes(Qi(e))}function ar(e){return Rn(e).getComputedStyle(e)}function Ad(e){return ir(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ks(e){if(Qi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||cx(e)&&e.host||ds(e);return cx(t)?t.host:t}function W_(e){const t=Ks(e);return Fi(t)?e.ownerDocument?e.ownerDocument.body:e.body:Tr(t)&&Wl(t)?t:W_(t)}function ml(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=W_(e),o=s===((r=e.ownerDocument)==null?void 0:r.body),i=Rn(s);return o?t.concat(i,i.visualViewport||[],Wl(s)?s:[],i.frameElement&&n?ml(i.frameElement):[]):t.concat(s,ml(s,[],n))}function Y_(e){const t=ar(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Tr(e),o=s?e.offsetWidth:n,i=s?e.offsetHeight:r,a=$u(n)!==o||$u(r)!==i;return a&&(n=o,r=i),{width:n,height:r,$:a}}function tg(e){return ir(e)?e:e.contextElement}function bi(e){const t=tg(e);if(!Tr(t))return Hs(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:o}=Y_(t);let i=(o?$u(n.width):n.width)/r,a=(o?$u(n.height):n.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const yM=Hs(0);function B_(e){const t=Rn(e);return!eg()||!t.visualViewport?yM:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function xM(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Rn(e)?!1:t}function Do(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),o=tg(e);let i=Hs(1);t&&(r?ir(r)&&(i=bi(r)):i=bi(e));const a=xM(o,n,r)?B_(o):Hs(0);let l=(s.left+a.x)/i.x,c=(s.top+a.y)/i.y,d=s.width/i.x,f=s.height/i.y;if(o){const p=Rn(o),x=r&&ir(r)?Rn(r):r;let y=p,v=y.frameElement;for(;v&&r&&x!==y;){const _=bi(v),g=v.getBoundingClientRect(),m=ar(v),w=g.left+(v.clientLeft+parseFloat(m.paddingLeft))*_.x,b=g.top+(v.clientTop+parseFloat(m.paddingTop))*_.y;l*=_.x,c*=_.y,d*=_.x,f*=_.y,l+=w,c+=b,y=Rn(v),v=y.frameElement}}return zu({width:d,height:f,x:l,y:c})}function wM(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const o=s==="fixed",i=ds(r),a=t?Od(t.floating):!1;if(r===i||a&&o)return n;let l={scrollLeft:0,scrollTop:0},c=Hs(1);const d=Hs(0),f=Tr(r);if((f||!f&&!o)&&((Qi(r)!=="body"||Wl(i))&&(l=Ad(r)),Tr(r))){const p=Do(r);c=bi(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x,y:n.y*c.y-l.scrollTop*c.y+d.y}}function _M(e){return Array.from(e.getClientRects())}function H_(e){return Do(ds(e)).left+Ad(e).scrollLeft}function SM(e){const t=ds(e),n=Ad(e),r=e.ownerDocument.body,s=En(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=En(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+H_(e);const a=-n.scrollTop;return ar(r).direction==="rtl"&&(i+=En(t.clientWidth,r.clientWidth)-s),{width:s,height:o,x:i,y:a}}function bM(e,t){const n=Rn(e),r=ds(e),s=n.visualViewport;let o=r.clientWidth,i=r.clientHeight,a=0,l=0;if(s){o=s.width,i=s.height;const c=eg();(!c||c&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:i,x:a,y:l}}function CM(e,t){const n=Do(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,o=Tr(e)?bi(e):Hs(1),i=e.clientWidth*o.x,a=e.clientHeight*o.y,l=s*o.x,c=r*o.y;return{width:i,height:a,x:l,y:c}}function ux(e,t,n){let r;if(t==="viewport")r=bM(e,n);else if(t==="document")r=SM(ds(e));else if(ir(t))r=CM(t,n);else{const s=B_(e);r={...t,x:t.x-s.x,y:t.y-s.y}}return zu(r)}function G_(e,t){const n=Ks(e);return n===t||!ir(n)||Fi(n)?!1:ar(n).position==="fixed"||G_(n,t)}function kM(e,t){const n=t.get(e);if(n)return n;let r=ml(e,[],!1).filter(a=>ir(a)&&Qi(a)!=="body"),s=null;const o=ar(e).position==="fixed";let i=o?Ks(e):e;for(;ir(i)&&!Fi(i);){const a=ar(i),l=Jm(i);!l&&a.position==="fixed"&&(s=null),(o?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||Wl(i)&&!l&&G_(e,i))?r=r.filter(d=>d!==i):s=a,i=Ks(i)}return t.set(e,r),r}function EM(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const i=[...n==="clippingAncestors"?Od(t)?[]:kM(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,d)=>{const f=ux(t,d,s);return c.top=En(f.top,c.top),c.right=_r(f.right,c.right),c.bottom=_r(f.bottom,c.bottom),c.left=En(f.left,c.left),c},ux(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function TM(e){const{width:t,height:n}=Y_(e);return{width:t,height:n}}function NM(e,t,n){const r=Tr(t),s=ds(t),o=n==="fixed",i=Do(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=Hs(0);if(r||!r&&!o)if((Qi(t)!=="body"||Wl(s))&&(a=Ad(t)),r){const f=Do(t,!0,o,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else s&&(l.x=H_(s));const c=i.left+a.scrollLeft-l.x,d=i.top+a.scrollTop-l.y;return{x:c,y:d,width:i.width,height:i.height}}function Jf(e){return ar(e).position==="static"}function dx(e,t){return!Tr(e)||ar(e).position==="fixed"?null:t?t(e):e.offsetParent}function K_(e,t){const n=Rn(e);if(Od(e))return n;if(!Tr(e)){let s=Ks(e);for(;s&&!Fi(s);){if(ir(s)&&!Jf(s))return s;s=Ks(s)}return n}let r=dx(e,t);for(;r&&gM(r)&&Jf(r);)r=dx(r,t);return r&&Fi(r)&&Jf(r)&&!Jm(r)?n:r||vM(e)||n}const RM=async function(e){const t=this.getOffsetParent||K_,n=this.getDimensions,r=await n(e.floating);return{reference:NM(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function PM(e){return ar(e).direction==="rtl"}const DM={convertOffsetParentRelativeRectToViewportRelativeRect:wM,getDocumentElement:ds,getClippingRect:EM,getOffsetParent:K_,getElementRects:RM,getClientRects:_M,getDimensions:TM,getScale:bi,isElement:ir,isRTL:PM};function MM(e,t){let n=null,r;const s=ds(e);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const{left:c,top:d,width:f,height:p}=e.getBoundingClientRect();if(a||t(),!f||!p)return;const x=Pc(d),y=Pc(s.clientWidth-(c+f)),v=Pc(s.clientHeight-(d+p)),_=Pc(c),m={rootMargin:-x+"px "+-y+"px "+-v+"px "+-_+"px",threshold:En(0,_r(1,l))||1};let w=!0;function b(C){const S=C[0].intersectionRatio;if(S!==l){if(!w)return i();S?i(!1,S):r=setTimeout(()=>{i(!1,1e-7)},1e3)}w=!1}try{n=new IntersectionObserver(b,{...m,root:s.ownerDocument})}catch{n=new IntersectionObserver(b,m)}n.observe(e)}return i(!0),o}function jM(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=tg(e),d=s||o?[...c?ml(c):[],...ml(t)]:[];d.forEach(g=>{s&&g.addEventListener("scroll",n,{passive:!0}),o&&g.addEventListener("resize",n)});const f=c&&a?MM(c,n):null;let p=-1,x=null;i&&(x=new ResizeObserver(g=>{let[m]=g;m&&m.target===c&&x&&(x.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=x)==null||w.observe(t)})),n()}),c&&!l&&x.observe(c),x.observe(t));let y,v=l?Do(e):null;l&&_();function _(){const g=Do(e);v&&(g.x!==v.x||g.y!==v.y||g.width!==v.width||g.height!==v.height)&&n(),v=g,y=requestAnimationFrame(_)}return n(),()=>{var g;d.forEach(m=>{s&&m.removeEventListener("scroll",n),o&&m.removeEventListener("resize",n)}),f==null||f(),(g=x)==null||g.disconnect(),x=null,l&&cancelAnimationFrame(y)}}const OM=fM,AM=hM,IM=cM,LM=mM,FM=uM,fx=lM,UM=pM,$M=(e,t,n)=>{const r=new Map,s={platform:DM,...n},o={...s.platform,_c:r};return aM(e,t,{...s,platform:o})};var tu=typeof document<"u"?h.useLayoutEffect:h.useEffect;function Wu(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 n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Wu(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const o=s[r];if(!(o==="_owner"&&e.$$typeof)&&!Wu(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Z_(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function hx(e,t){const n=Z_(e);return Math.round(t*n)/n}function px(e){const t=h.useRef(e);return tu(()=>{t.current=e}),t}function VM(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:o,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[d,f]=h.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,x]=h.useState(r);Wu(p,r)||x(r);const[y,v]=h.useState(null),[_,g]=h.useState(null),m=h.useCallback(W=>{W!==S.current&&(S.current=W,v(W))},[]),w=h.useCallback(W=>{W!==N.current&&(N.current=W,g(W))},[]),b=o||y,C=i||_,S=h.useRef(null),N=h.useRef(null),R=h.useRef(d),F=l!=null,L=px(l),Z=px(s),j=h.useCallback(()=>{if(!S.current||!N.current)return;const W={placement:t,strategy:n,middleware:p};Z.current&&(W.platform=Z.current),$M(S.current,N.current,W).then(I=>{const M={...I,isPositioned:!0};B.current&&!Wu(R.current,M)&&(R.current=M,ls.flushSync(()=>{f(M)}))})},[p,t,n,Z]);tu(()=>{c===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(W=>({...W,isPositioned:!1})))},[c]);const B=h.useRef(!1);tu(()=>(B.current=!0,()=>{B.current=!1}),[]),tu(()=>{if(b&&(S.current=b),C&&(N.current=C),b&&C){if(L.current)return L.current(b,C,j);j()}},[b,C,j,L,F]);const A=h.useMemo(()=>({reference:S,floating:N,setReference:m,setFloating:w}),[m,w]),H=h.useMemo(()=>({reference:b,floating:C}),[b,C]),ne=h.useMemo(()=>{const W={position:n,left:0,top:0};if(!H.floating)return W;const I=hx(H.floating,d.x),M=hx(H.floating,d.y);return a?{...W,transform:"translate("+I+"px, "+M+"px)",...Z_(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:I,top:M}},[n,a,H.floating,d.x,d.y]);return h.useMemo(()=>({...d,update:j,refs:A,elements:H,floatingStyles:ne}),[d,j,A,H,ne])}const zM=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?fx({element:r.current,padding:s}).fn(n):{}:r?fx({element:r,padding:s}).fn(n):{}}}},WM=(e,t)=>({...OM(e),options:[e,t]}),YM=(e,t)=>({...AM(e),options:[e,t]}),BM=(e,t)=>({...UM(e),options:[e,t]}),HM=(e,t)=>({...IM(e),options:[e,t]}),GM=(e,t)=>({...LM(e),options:[e,t]}),KM=(e,t)=>({...FM(e),options:[e,t]}),ZM=(e,t)=>({...zM(e),options:[e,t]});var qM="Arrow",q_=h.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...o}=e;return u.jsx(_e.svg,{...o,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});q_.displayName=qM;var QM=q_;function Q_(e){const[t,n]=h.useState(void 0);return Jt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=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;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var ng="Popper",[X_,Xi]=dr(ng),[XM,J_]=X_(ng),eS=e=>{const{__scopePopper:t,children:n}=e,[r,s]=h.useState(null);return u.jsx(XM,{scope:t,anchor:r,onAnchorChange:s,children:n})};eS.displayName=ng;var tS="PopperAnchor",nS=h.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,o=J_(tS,n),i=h.useRef(null),a=Ie(t,i);return h.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:u.jsx(_e.div,{...s,ref:a})});nS.displayName=tS;var rg="PopperContent",[JM,ej]=X_(rg),rS=h.forwardRef((e,t)=>{var le,De,Ye,Ue,$e,we;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:o="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:x="optimized",onPlaced:y,...v}=e,_=J_(rg,n),[g,m]=h.useState(null),w=Ie(t,ut=>m(ut)),[b,C]=h.useState(null),S=Q_(b),N=(S==null?void 0:S.width)??0,R=(S==null?void 0:S.height)??0,F=r+(o!=="center"?"-"+o:""),L=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},Z=Array.isArray(c)?c:[c],j=Z.length>0,B={padding:L,boundary:Z.filter(nj),altBoundary:j},{refs:A,floatingStyles:H,placement:ne,isPositioned:W,middlewareData:I}=VM({strategy:"fixed",placement:F,whileElementsMounted:(...ut)=>jM(...ut,{animationFrame:x==="always"}),elements:{reference:_.anchor},middleware:[WM({mainAxis:s+R,alignmentAxis:i}),l&&YM({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?BM():void 0,...B}),l&&HM({...B}),GM({...B,apply:({elements:ut,rects:Yt,availableWidth:ms,availableHeight:fn})=>{const{width:gs,height:k}=Yt.reference,P=ut.floating.style;P.setProperty("--radix-popper-available-width",`${ms}px`),P.setProperty("--radix-popper-available-height",`${fn}px`),P.setProperty("--radix-popper-anchor-width",`${gs}px`),P.setProperty("--radix-popper-anchor-height",`${k}px`)}}),b&&ZM({element:b,padding:a}),rj({arrowWidth:N,arrowHeight:R}),p&&KM({strategy:"referenceHidden",...B})]}),[M,q]=iS(ne),ae=Xt(y);Jt(()=>{W&&(ae==null||ae())},[W,ae]);const me=(le=I.arrow)==null?void 0:le.x,Qe=(De=I.arrow)==null?void 0:De.y,Pe=((Ye=I.arrow)==null?void 0:Ye.centerOffset)!==0,[ct,Fe]=h.useState();return Jt(()=>{g&&Fe(window.getComputedStyle(g).zIndex)},[g]),u.jsx("div",{ref:A.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:W?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ct,"--radix-popper-transform-origin":[(Ue=I.transformOrigin)==null?void 0:Ue.x,($e=I.transformOrigin)==null?void 0:$e.y].join(" "),...((we=I.hide)==null?void 0:we.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(JM,{scope:n,placedSide:M,onArrowChange:C,arrowX:me,arrowY:Qe,shouldHideArrow:Pe,children:u.jsx(_e.div,{"data-side":M,"data-align":q,...v,ref:w,style:{...v.style,animation:W?void 0:"none"}})})})});rS.displayName=rg;var sS="PopperArrow",tj={top:"bottom",right:"left",bottom:"top",left:"right"},oS=h.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,o=ej(sS,r),i=tj[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(QM,{...s,ref:n,style:{...s.style,display:"block"}})})});oS.displayName=sS;function nj(e){return e!==null}var rj=e=>({name:"transformOrigin",options:e,fn(t){var _,g,m;const{placement:n,rects:r,middlewareData:s}=t,i=((_=s.arrow)==null?void 0:_.centerOffset)!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[c,d]=iS(n),f={start:"0%",center:"50%",end:"100%"}[d],p=(((g=s.arrow)==null?void 0:g.x)??0)+a/2,x=(((m=s.arrow)==null?void 0:m.y)??0)+l/2;let y="",v="";return c==="bottom"?(y=i?f:`${p}px`,v=`${-l}px`):c==="top"?(y=i?f:`${p}px`,v=`${r.floating.height+l}px`):c==="right"?(y=`${-l}px`,v=i?f:`${x}px`):c==="left"&&(y=`${r.floating.width+l}px`,v=i?f:`${x}px`),{data:{x:y,y:v}}}});function iS(e){const[t,n="center"]=e.split("-");return[t,n]}var sg=eS,og=nS,ig=rS,ag=oS,sj="Portal",Yl=h.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[s,o]=h.useState(!1);Jt(()=>o(!0),[]);const i=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?i_.createPortal(u.jsx(_e.div,{...r,ref:t}),i):null});Yl.displayName=sj;function oj(e,t){return h.useReducer((n,r)=>t[n][r]??n,e)}var Dr=e=>{const{present:t,children:n}=e,r=ij(t),s=typeof n=="function"?n({present:r.isPresent}):h.Children.only(n),o=Ie(r.ref,aj(s));return typeof n=="function"||r.isPresent?h.cloneElement(s,{ref:o}):null};Dr.displayName="Presence";function ij(e){const[t,n]=h.useState(),r=h.useRef({}),s=h.useRef(e),o=h.useRef("none"),i=e?"mounted":"unmounted",[a,l]=oj(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.useEffect(()=>{const c=Dc(r.current);o.current=a==="mounted"?c:"none"},[a]),Jt(()=>{const c=r.current,d=s.current;if(d!==e){const p=o.current,x=Dc(c);e?l("MOUNT"):x==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&p!==x?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),Jt(()=>{if(t){const c=f=>{const x=Dc(r.current).includes(f.animationName);f.target===t&&x&&ls.flushSync(()=>l("ANIMATION_END"))},d=f=>{f.target===t&&(o.current=Dc(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:h.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function Dc(e){return(e==null?void 0:e.animationName)||"none"}function aj(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var eh="rovingFocusGroup.onEntryFocus",lj={bubbles:!1,cancelable:!0},Id="RovingFocusGroup",[xp,aS,cj]=Md(Id),[uj,lS]=dr(Id,[cj]),[dj,fj]=uj(Id),cS=h.forwardRef((e,t)=>u.jsx(xp.Provider,{scope:e.__scopeRovingFocusGroup,children:u.jsx(xp.Slot,{scope:e.__scopeRovingFocusGroup,children:u.jsx(hj,{...e,ref:t})})}));cS.displayName=Id;var hj=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:o,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...f}=e,p=h.useRef(null),x=Ie(t,p),y=Km(o),[v=null,_]=Bs({prop:i,defaultProp:a,onChange:l}),[g,m]=h.useState(!1),w=Xt(c),b=aS(n),C=h.useRef(!1),[S,N]=h.useState(0);return h.useEffect(()=>{const R=p.current;if(R)return R.addEventListener(eh,w),()=>R.removeEventListener(eh,w)},[w]),u.jsx(dj,{scope:n,orientation:r,dir:y,loop:s,currentTabStopId:v,onItemFocus:h.useCallback(R=>_(R),[_]),onItemShiftTab:h.useCallback(()=>m(!0),[]),onFocusableItemAdd:h.useCallback(()=>N(R=>R+1),[]),onFocusableItemRemove:h.useCallback(()=>N(R=>R-1),[]),children:u.jsx(_e.div,{tabIndex:g||S===0?-1:0,"data-orientation":r,...f,ref:x,style:{outline:"none",...e.style},onMouseDown:ee(e.onMouseDown,()=>{C.current=!0}),onFocus:ee(e.onFocus,R=>{const F=!C.current;if(R.target===R.currentTarget&&F&&!g){const L=new CustomEvent(eh,lj);if(R.currentTarget.dispatchEvent(L),!L.defaultPrevented){const Z=b().filter(ne=>ne.focusable),j=Z.find(ne=>ne.active),B=Z.find(ne=>ne.id===v),H=[j,B,...Z].filter(Boolean).map(ne=>ne.ref.current);fS(H,d)}}C.current=!1}),onBlur:ee(e.onBlur,()=>m(!1))})})}),uS="RovingFocusGroupItem",dS=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:o,...i}=e,a=kr(),l=o||a,c=fj(uS,n),d=c.currentTabStopId===l,f=aS(n),{onFocusableItemAdd:p,onFocusableItemRemove:x}=c;return h.useEffect(()=>{if(r)return p(),()=>x()},[r,p,x]),u.jsx(xp.ItemSlot,{scope:n,id:l,focusable:r,active:s,children:u.jsx(_e.span,{tabIndex:d?0:-1,"data-orientation":c.orientation,...i,ref:t,onMouseDown:ee(e.onMouseDown,y=>{r?c.onItemFocus(l):y.preventDefault()}),onFocus:ee(e.onFocus,()=>c.onItemFocus(l)),onKeyDown:ee(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){c.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const v=gj(y,c.orientation,c.dir);if(v!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let g=f().filter(m=>m.focusable).map(m=>m.ref.current);if(v==="last")g.reverse();else if(v==="prev"||v==="next"){v==="prev"&&g.reverse();const m=g.indexOf(y.currentTarget);g=c.loop?vj(g,m+1):g.slice(m+1)}setTimeout(()=>fS(g))}})})})});dS.displayName=uS;var pj={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function mj(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function gj(e,t,n){const r=mj(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return pj[r]}function fS(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function vj(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var yj=cS,xj=dS,wj=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ko=new WeakMap,Mc=new WeakMap,jc={},th=0,hS=function(e){return e&&(e.host||hS(e.parentNode))},_j=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=hS(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Sj=function(e,t,n,r){var s=_j(t,Array.isArray(e)?e:[e]);jc[n]||(jc[n]=new WeakMap);var o=jc[n],i=[],a=new Set,l=new Set(s),c=function(f){!f||a.has(f)||(a.add(f),c(f.parentNode))};s.forEach(c);var d=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(p){if(a.has(p))d(p);else try{var x=p.getAttribute(r),y=x!==null&&x!=="false",v=(Ko.get(p)||0)+1,_=(o.get(p)||0)+1;Ko.set(p,v),o.set(p,_),i.push(p),v===1&&y&&Mc.set(p,!0),_===1&&p.setAttribute(n,"true"),y||p.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",p,g)}})};return d(t),a.clear(),th++,function(){i.forEach(function(f){var p=Ko.get(f)-1,x=o.get(f)-1;Ko.set(f,p),o.set(f,x),p||(Mc.has(f)||f.removeAttribute(r),Mc.delete(f)),x||f.removeAttribute(n)}),th--,th||(Ko=new WeakMap,Ko=new WeakMap,Mc=new WeakMap,jc={})}},lg=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=wj(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),Sj(r,s,n,"aria-hidden")):function(){return null}},yr=function(){return yr=Object.assign||function(t){for(var n,r=1,s=arguments.length;r"u")return Uj;var t=$j(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},zj=vS(),Ci="data-scroll-locked",Wj=function(e,t,n,r){var s=e.left,o=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),` - .`.concat(Cj,` { - overflow: hidden `).concat(r,`; - padding-right: `).concat(a,"px ").concat(r,`; - } - body[`).concat(Ci,`] { - overflow: hidden `).concat(r,`; - overscroll-behavior: contain; - `).concat([t&&"position: relative ".concat(r,";"),n==="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(r,`; - `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),` - } - - .`).concat(nu,` { - right: `).concat(a,"px ").concat(r,`; - } - - .`).concat(ru,` { - margin-right: `).concat(a,"px ").concat(r,`; - } - - .`).concat(nu," .").concat(nu,` { - right: 0 `).concat(r,`; - } - - .`).concat(ru," .").concat(ru,` { - margin-right: 0 `).concat(r,`; - } - - body[`).concat(Ci,`] { - `).concat(kj,": ").concat(a,`px; - } -`)},gx=function(){var e=parseInt(document.body.getAttribute(Ci)||"0",10);return isFinite(e)?e:0},Yj=function(){h.useEffect(function(){return document.body.setAttribute(Ci,(gx()+1).toString()),function(){var e=gx()-1;e<=0?document.body.removeAttribute(Ci):document.body.setAttribute(Ci,e.toString())}},[])},Bj=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;Yj();var o=h.useMemo(function(){return Vj(s)},[s]);return h.createElement(zj,{styles:Wj(o,!t,s,n?"":"!important")})},wp=!1;if(typeof window<"u")try{var Oc=Object.defineProperty({},"passive",{get:function(){return wp=!0,!0}});window.addEventListener("test",Oc,Oc),window.removeEventListener("test",Oc,Oc)}catch{wp=!1}var Zo=wp?{passive:!1}:!1,Hj=function(e){return e.tagName==="TEXTAREA"},yS=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Hj(e)&&n[t]==="visible")},Gj=function(e){return yS(e,"overflowY")},Kj=function(e){return yS(e,"overflowX")},vx=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=xS(e,r);if(s){var o=wS(e,r),i=o[1],a=o[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Zj=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},qj=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},xS=function(e,t){return e==="v"?Gj(t):Kj(t)},wS=function(e,t){return e==="v"?Zj(t):qj(t)},Qj=function(e,t){return e==="h"&&t==="rtl"?-1:1},Xj=function(e,t,n,r,s){var o=Qj(e,window.getComputedStyle(t).direction),i=o*r,a=n.target,l=t.contains(a),c=!1,d=i>0,f=0,p=0;do{var x=wS(e,a),y=x[0],v=x[1],_=x[2],g=v-_-o*y;(y||g)&&xS(e,a)&&(f+=g,p+=y),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(d&&(Math.abs(f)<1||!s)||!d&&(Math.abs(p)<1||!s))&&(c=!0),c},Ac=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},yx=function(e){return[e.deltaX,e.deltaY]},xx=function(e){return e&&"current"in e?e.current:e},Jj=function(e,t){return e[0]===t[0]&&e[1]===t[1]},eO=function(e){return` - .block-interactivity-`.concat(e,` {pointer-events: none;} - .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},tO=0,qo=[];function nO(e){var t=h.useRef([]),n=h.useRef([0,0]),r=h.useRef(),s=h.useState(tO++)[0],o=h.useState(vS)[0],i=h.useRef(e);h.useEffect(function(){i.current=e},[e]),h.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var v=bj([e.lockRef.current],(e.shards||[]).map(xx),!0).filter(Boolean);return v.forEach(function(_){return _.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),v.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var a=h.useCallback(function(v,_){if("touches"in v&&v.touches.length===2)return!i.current.allowPinchZoom;var g=Ac(v),m=n.current,w="deltaX"in v?v.deltaX:m[0]-g[0],b="deltaY"in v?v.deltaY:m[1]-g[1],C,S=v.target,N=Math.abs(w)>Math.abs(b)?"h":"v";if("touches"in v&&N==="h"&&S.type==="range")return!1;var R=vx(N,S);if(!R)return!0;if(R?C=N:(C=N==="v"?"h":"v",R=vx(N,S)),!R)return!1;if(!r.current&&"changedTouches"in v&&(w||b)&&(r.current=C),!C)return!0;var F=r.current||C;return Xj(F,_,v,F==="h"?w:b,!0)},[]),l=h.useCallback(function(v){var _=v;if(!(!qo.length||qo[qo.length-1]!==o)){var g="deltaY"in _?yx(_):Ac(_),m=t.current.filter(function(C){return C.name===_.type&&(C.target===_.target||_.target===C.shadowParent)&&Jj(C.delta,g)})[0];if(m&&m.should){_.cancelable&&_.preventDefault();return}if(!m){var w=(i.current.shards||[]).map(xx).filter(Boolean).filter(function(C){return C.contains(_.target)}),b=w.length>0?a(_,w[0]):!i.current.noIsolation;b&&_.cancelable&&_.preventDefault()}}},[]),c=h.useCallback(function(v,_,g,m){var w={name:v,delta:_,target:g,should:m,shadowParent:rO(g)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(b){return b!==w})},1)},[]),d=h.useCallback(function(v){n.current=Ac(v),r.current=void 0},[]),f=h.useCallback(function(v){c(v.type,yx(v),v.target,a(v,e.lockRef.current))},[]),p=h.useCallback(function(v){c(v.type,Ac(v),v.target,a(v,e.lockRef.current))},[]);h.useEffect(function(){return qo.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",l,Zo),document.addEventListener("touchmove",l,Zo),document.addEventListener("touchstart",d,Zo),function(){qo=qo.filter(function(v){return v!==o}),document.removeEventListener("wheel",l,Zo),document.removeEventListener("touchmove",l,Zo),document.removeEventListener("touchstart",d,Zo)}},[]);var x=e.removeScrollBar,y=e.inert;return h.createElement(h.Fragment,null,y?h.createElement(o,{styles:eO(s)}):null,x?h.createElement(Bj,{gapMode:e.gapMode}):null)}function rO(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const sO=Mj(gS,nO);var Fd=h.forwardRef(function(e,t){return h.createElement(Ld,yr({},e,{ref:t,sideCar:sO}))});Fd.classNames=Ld.classNames;var _p=["Enter"," "],oO=["ArrowDown","PageUp","Home"],_S=["ArrowUp","PageDown","End"],iO=[...oO,..._S],aO={ltr:[..._p,"ArrowRight"],rtl:[..._p,"ArrowLeft"]},lO={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Bl="Menu",[gl,cO,uO]=Md(Bl),[Fo,SS]=dr(Bl,[uO,Xi,lS]),Ud=Xi(),bS=lS(),[dO,Uo]=Fo(Bl),[fO,Hl]=Fo(Bl),CS=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:s,onOpenChange:o,modal:i=!0}=e,a=Ud(t),[l,c]=h.useState(null),d=h.useRef(!1),f=Xt(o),p=Km(s);return h.useEffect(()=>{const x=()=>{d.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>d.current=!1;return document.addEventListener("keydown",x,{capture:!0}),()=>{document.removeEventListener("keydown",x,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),u.jsx(sg,{...a,children:u.jsx(dO,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:c,children:u.jsx(fO,{scope:t,onClose:h.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:p,modal:i,children:r})})})};CS.displayName=Bl;var hO="MenuAnchor",cg=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=Ud(n);return u.jsx(og,{...s,...r,ref:t})});cg.displayName=hO;var ug="MenuPortal",[pO,kS]=Fo(ug,{forceMount:void 0}),ES=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:s}=e,o=Uo(ug,t);return u.jsx(pO,{scope:t,forceMount:n,children:u.jsx(Dr,{present:n||o.open,children:u.jsx(Yl,{asChild:!0,container:s,children:r})})})};ES.displayName=ug;var Vn="MenuContent",[mO,dg]=Fo(Vn),TS=h.forwardRef((e,t)=>{const n=kS(Vn,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,o=Uo(Vn,e.__scopeMenu),i=Hl(Vn,e.__scopeMenu);return u.jsx(gl.Provider,{scope:e.__scopeMenu,children:u.jsx(Dr,{present:r||o.open,children:u.jsx(gl.Slot,{scope:e.__scopeMenu,children:i.modal?u.jsx(gO,{...s,ref:t}):u.jsx(vO,{...s,ref:t})})})})}),gO=h.forwardRef((e,t)=>{const n=Uo(Vn,e.__scopeMenu),r=h.useRef(null),s=Ie(t,r);return h.useEffect(()=>{const o=r.current;if(o)return lg(o)},[]),u.jsx(fg,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ee(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),vO=h.forwardRef((e,t)=>{const n=Uo(Vn,e.__scopeMenu);return u.jsx(fg,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),fg=h.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:s,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:x,disableOutsideScroll:y,...v}=e,_=Uo(Vn,n),g=Hl(Vn,n),m=Ud(n),w=bS(n),b=cO(n),[C,S]=h.useState(null),N=h.useRef(null),R=Ie(t,N,_.onContentChange),F=h.useRef(0),L=h.useRef(""),Z=h.useRef(0),j=h.useRef(null),B=h.useRef("right"),A=h.useRef(0),H=y?Fd:h.Fragment,ne=y?{as:ns,allowPinchZoom:!0}:void 0,W=M=>{var le,De;const q=L.current+M,ae=b().filter(Ye=>!Ye.disabled),me=document.activeElement,Qe=(le=ae.find(Ye=>Ye.ref.current===me))==null?void 0:le.textValue,Pe=ae.map(Ye=>Ye.textValue),ct=RO(Pe,q,Qe),Fe=(De=ae.find(Ye=>Ye.textValue===ct))==null?void 0:De.ref.current;(function Ye(Ue){L.current=Ue,window.clearTimeout(F.current),Ue!==""&&(F.current=window.setTimeout(()=>Ye(""),1e3))})(q),Fe&&setTimeout(()=>Fe.focus())};h.useEffect(()=>()=>window.clearTimeout(F.current),[]),Zm();const I=h.useCallback(M=>{var ae,me;return B.current===((ae=j.current)==null?void 0:ae.side)&&DO(M,(me=j.current)==null?void 0:me.area)},[]);return u.jsx(mO,{scope:n,searchRef:L,onItemEnter:h.useCallback(M=>{I(M)&&M.preventDefault()},[I]),onItemLeave:h.useCallback(M=>{var q;I(M)||((q=N.current)==null||q.focus(),S(null))},[I]),onTriggerLeave:h.useCallback(M=>{I(M)&&M.preventDefault()},[I]),pointerGraceTimerRef:Z,onPointerGraceIntentChange:h.useCallback(M=>{j.current=M},[]),children:u.jsx(H,{...ne,children:u.jsx(jd,{asChild:!0,trapped:s,onMountAutoFocus:ee(o,M=>{var q;M.preventDefault(),(q=N.current)==null||q.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:u.jsx(Zi,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:x,children:u.jsx(yj,{asChild:!0,...w,dir:g.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:S,onEntryFocus:ee(l,M=>{g.isUsingKeyboardRef.current||M.preventDefault()}),preventScrollOnEntryFocus:!0,children:u.jsx(ig,{role:"menu","aria-orientation":"vertical","data-state":WS(_.open),"data-radix-menu-content":"",dir:g.dir,...m,...v,ref:R,style:{outline:"none",...v.style},onKeyDown:ee(v.onKeyDown,M=>{const ae=M.target.closest("[data-radix-menu-content]")===M.currentTarget,me=M.ctrlKey||M.altKey||M.metaKey,Qe=M.key.length===1;ae&&(M.key==="Tab"&&M.preventDefault(),!me&&Qe&&W(M.key));const Pe=N.current;if(M.target!==Pe||!iO.includes(M.key))return;M.preventDefault();const Fe=b().filter(le=>!le.disabled).map(le=>le.ref.current);_S.includes(M.key)&&Fe.reverse(),TO(Fe)}),onBlur:ee(e.onBlur,M=>{M.currentTarget.contains(M.target)||(window.clearTimeout(F.current),L.current="")}),onPointerMove:ee(e.onPointerMove,vl(M=>{const q=M.target,ae=A.current!==M.clientX;if(M.currentTarget.contains(q)&&ae){const me=M.clientX>A.current?"right":"left";B.current=me,A.current=M.clientX}}))})})})})})})});TS.displayName=Vn;var yO="MenuGroup",hg=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return u.jsx(_e.div,{role:"group",...r,ref:t})});hg.displayName=yO;var xO="MenuLabel",NS=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return u.jsx(_e.div,{...r,ref:t})});NS.displayName=xO;var Yu="MenuItem",wx="menu.itemSelect",$d=h.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...s}=e,o=h.useRef(null),i=Hl(Yu,e.__scopeMenu),a=dg(Yu,e.__scopeMenu),l=Ie(t,o),c=h.useRef(!1),d=()=>{const f=o.current;if(!n&&f){const p=new CustomEvent(wx,{bubbles:!0,cancelable:!0});f.addEventListener(wx,x=>r==null?void 0:r(x),{once:!0}),Gm(f,p),p.defaultPrevented?c.current=!1:i.onClose()}};return u.jsx(RS,{...s,ref:l,disabled:n,onClick:ee(e.onClick,d),onPointerDown:f=>{var p;(p=e.onPointerDown)==null||p.call(e,f),c.current=!0},onPointerUp:ee(e.onPointerUp,f=>{var p;c.current||(p=f.currentTarget)==null||p.click()}),onKeyDown:ee(e.onKeyDown,f=>{const p=a.searchRef.current!=="";n||p&&f.key===" "||_p.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});$d.displayName=Yu;var RS=h.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:s,...o}=e,i=dg(Yu,n),a=bS(n),l=h.useRef(null),c=Ie(t,l),[d,f]=h.useState(!1),[p,x]=h.useState("");return h.useEffect(()=>{const y=l.current;y&&x((y.textContent??"").trim())},[o.children]),u.jsx(gl.ItemSlot,{scope:n,disabled:r,textValue:s??p,children:u.jsx(xj,{asChild:!0,...a,focusable:!r,children:u.jsx(_e.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:c,onPointerMove:ee(e.onPointerMove,vl(y=>{r?i.onItemLeave(y):(i.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ee(e.onPointerLeave,vl(y=>i.onItemLeave(y))),onFocus:ee(e.onFocus,()=>f(!0)),onBlur:ee(e.onBlur,()=>f(!1))})})})}),wO="MenuCheckboxItem",PS=h.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...s}=e;return u.jsx(AS,{scope:e.__scopeMenu,checked:n,children:u.jsx($d,{role:"menuitemcheckbox","aria-checked":Bu(n)?"mixed":n,...s,ref:t,"data-state":mg(n),onSelect:ee(s.onSelect,()=>r==null?void 0:r(Bu(n)?!0:!n),{checkForDefaultPrevented:!1})})})});PS.displayName=wO;var DS="MenuRadioGroup",[_O,SO]=Fo(DS,{value:void 0,onValueChange:()=>{}}),MS=h.forwardRef((e,t)=>{const{value:n,onValueChange:r,...s}=e,o=Xt(r);return u.jsx(_O,{scope:e.__scopeMenu,value:n,onValueChange:o,children:u.jsx(hg,{...s,ref:t})})});MS.displayName=DS;var jS="MenuRadioItem",OS=h.forwardRef((e,t)=>{const{value:n,...r}=e,s=SO(jS,e.__scopeMenu),o=n===s.value;return u.jsx(AS,{scope:e.__scopeMenu,checked:o,children:u.jsx($d,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":mg(o),onSelect:ee(r.onSelect,()=>{var i;return(i=s.onValueChange)==null?void 0:i.call(s,n)},{checkForDefaultPrevented:!1})})})});OS.displayName=jS;var pg="MenuItemIndicator",[AS,bO]=Fo(pg,{checked:!1}),IS=h.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...s}=e,o=bO(pg,n);return u.jsx(Dr,{present:r||Bu(o.checked)||o.checked===!0,children:u.jsx(_e.span,{...s,ref:t,"data-state":mg(o.checked)})})});IS.displayName=pg;var CO="MenuSeparator",LS=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return u.jsx(_e.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});LS.displayName=CO;var kO="MenuArrow",FS=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=Ud(n);return u.jsx(ag,{...s,...r,ref:t})});FS.displayName=kO;var EO="MenuSub",[IV,US]=Fo(EO),Ea="MenuSubTrigger",$S=h.forwardRef((e,t)=>{const n=Uo(Ea,e.__scopeMenu),r=Hl(Ea,e.__scopeMenu),s=US(Ea,e.__scopeMenu),o=dg(Ea,e.__scopeMenu),i=h.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:l}=o,c={__scopeMenu:e.__scopeMenu},d=h.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return h.useEffect(()=>d,[d]),h.useEffect(()=>{const f=a.current;return()=>{window.clearTimeout(f),l(null)}},[a,l]),u.jsx(cg,{asChild:!0,...c,children:u.jsx(RS,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":s.contentId,"data-state":WS(n.open),...e,ref:Dd(t,s.onTriggerChange),onClick:f=>{var p;(p=e.onClick)==null||p.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ee(e.onPointerMove,vl(f=>{o.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(o.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:ee(e.onPointerLeave,vl(f=>{var x,y;d();const p=(x=n.content)==null?void 0:x.getBoundingClientRect();if(p){const v=(y=n.content)==null?void 0:y.dataset.side,_=v==="right",g=_?-5:5,m=p[_?"left":"right"],w=p[_?"right":"left"];o.onPointerGraceIntentChange({area:[{x:f.clientX+g,y:f.clientY},{x:m,y:p.top},{x:w,y:p.top},{x:w,y:p.bottom},{x:m,y:p.bottom}],side:v}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(f),f.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:ee(e.onKeyDown,f=>{var x;const p=o.searchRef.current!=="";e.disabled||p&&f.key===" "||aO[r.dir].includes(f.key)&&(n.onOpenChange(!0),(x=n.content)==null||x.focus(),f.preventDefault())})})})});$S.displayName=Ea;var VS="MenuSubContent",zS=h.forwardRef((e,t)=>{const n=kS(Vn,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,o=Uo(Vn,e.__scopeMenu),i=Hl(Vn,e.__scopeMenu),a=US(VS,e.__scopeMenu),l=h.useRef(null),c=Ie(t,l);return u.jsx(gl.Provider,{scope:e.__scopeMenu,children:u.jsx(Dr,{present:r||o.open,children:u.jsx(gl.Slot,{scope:e.__scopeMenu,children:u.jsx(fg,{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:d=>{var f;i.isUsingKeyboardRef.current&&((f=l.current)==null||f.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:ee(e.onFocusOutside,d=>{d.target!==a.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:ee(e.onEscapeKeyDown,d=>{i.onClose(),d.preventDefault()}),onKeyDown:ee(e.onKeyDown,d=>{var x;const f=d.currentTarget.contains(d.target),p=lO[i.dir].includes(d.key);f&&p&&(o.onOpenChange(!1),(x=a.trigger)==null||x.focus(),d.preventDefault())})})})})})});zS.displayName=VS;function WS(e){return e?"open":"closed"}function Bu(e){return e==="indeterminate"}function mg(e){return Bu(e)?"indeterminate":e?"checked":"unchecked"}function TO(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function NO(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function RO(e,t,n){const s=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let i=NO(e,Math.max(o,0));s.length===1&&(i=i.filter(c=>c!==n));const l=i.find(c=>c.toLowerCase().startsWith(s.toLowerCase()));return l!==n?l:void 0}function PO(e,t){const{x:n,y:r}=e;let s=!1;for(let o=0,i=t.length-1;or!=d>r&&n<(c-a)*(r-l)/(d-l)+a&&(s=!s)}return s}function DO(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return PO(n,t)}function vl(e){return t=>t.pointerType==="mouse"?e(t):void 0}var MO=CS,jO=cg,OO=ES,AO=TS,IO=hg,LO=NS,FO=$d,UO=PS,$O=MS,VO=OS,zO=IS,WO=LS,YO=FS,BO=$S,HO=zS,gg="DropdownMenu",[GO,LV]=dr(gg,[SS]),dn=SS(),[KO,YS]=GO(gg),BS=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:s,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,l=dn(t),c=h.useRef(null),[d=!1,f]=Bs({prop:s,defaultProp:o,onChange:i});return u.jsx(KO,{scope:t,triggerId:kr(),triggerRef:c,contentId:kr(),open:d,onOpenChange:f,onOpenToggle:h.useCallback(()=>f(p=>!p),[f]),modal:a,children:u.jsx(MO,{...l,open:d,onOpenChange:f,dir:r,modal:a,children:n})})};BS.displayName=gg;var HS="DropdownMenuTrigger",GS=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...s}=e,o=YS(HS,n),i=dn(n);return u.jsx(jO,{asChild:!0,...i,children:u.jsx(_e.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":r?"":void 0,disabled:r,...s,ref:Dd(t,o.triggerRef),onPointerDown:ee(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(o.onOpenToggle(),o.open||a.preventDefault())}),onKeyDown:ee(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&o.onOpenToggle(),a.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});GS.displayName=HS;var ZO="DropdownMenuPortal",KS=e=>{const{__scopeDropdownMenu:t,...n}=e,r=dn(t);return u.jsx(OO,{...r,...n})};KS.displayName=ZO;var ZS="DropdownMenuContent",qS=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=YS(ZS,n),o=dn(n),i=h.useRef(!1);return u.jsx(AO,{id:s.contentId,"aria-labelledby":s.triggerId,...o,...r,ref:t,onCloseAutoFocus:ee(e.onCloseAutoFocus,a=>{var l;i.current||(l=s.triggerRef.current)==null||l.focus(),i.current=!1,a.preventDefault()}),onInteractOutside:ee(e.onInteractOutside,a=>{const l=a.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,d=l.button===2||c;(!s.modal||d)&&(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)"}})});qS.displayName=ZS;var qO="DropdownMenuGroup",QO=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=dn(n);return u.jsx(IO,{...s,...r,ref:t})});QO.displayName=qO;var XO="DropdownMenuLabel",QS=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=dn(n);return u.jsx(LO,{...s,...r,ref:t})});QS.displayName=XO;var JO="DropdownMenuItem",XS=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=dn(n);return u.jsx(FO,{...s,...r,ref:t})});XS.displayName=JO;var eA="DropdownMenuCheckboxItem",JS=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=dn(n);return u.jsx(UO,{...s,...r,ref:t})});JS.displayName=eA;var tA="DropdownMenuRadioGroup",nA=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=dn(n);return u.jsx($O,{...s,...r,ref:t})});nA.displayName=tA;var rA="DropdownMenuRadioItem",e1=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=dn(n);return u.jsx(VO,{...s,...r,ref:t})});e1.displayName=rA;var sA="DropdownMenuItemIndicator",t1=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=dn(n);return u.jsx(zO,{...s,...r,ref:t})});t1.displayName=sA;var oA="DropdownMenuSeparator",n1=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=dn(n);return u.jsx(WO,{...s,...r,ref:t})});n1.displayName=oA;var iA="DropdownMenuArrow",aA=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=dn(n);return u.jsx(YO,{...s,...r,ref:t})});aA.displayName=iA;var lA="DropdownMenuSubTrigger",r1=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=dn(n);return u.jsx(BO,{...s,...r,ref:t})});r1.displayName=lA;var cA="DropdownMenuSubContent",s1=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=dn(n);return u.jsx(HO,{...s,...r,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)"}})});s1.displayName=cA;var uA=BS,dA=GS,fA=KS,o1=qS,i1=QS,a1=XS,l1=JS,c1=e1,u1=t1,d1=n1,f1=r1,h1=s1;const hA=uA,pA=dA,mA=h.forwardRef(({className:e,inset:t,children:n,...r},s)=>u.jsxs(f1,{ref:s,className:ue("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),...r,children:[n,u.jsx(UP,{className:"ml-auto h-4 w-4"})]}));mA.displayName=f1.displayName;const gA=h.forwardRef(({className:e,...t},n)=>u.jsx(h1,{ref:n,className:ue("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}));gA.displayName=h1.displayName;const p1=h.forwardRef(({className:e,sideOffset:t=4,...n},r)=>u.jsx(fA,{children:u.jsx(o1,{ref:r,sideOffset:t,className:ue("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),...n})}));p1.displayName=o1.displayName;const m1=h.forwardRef(({className:e,inset:t,...n},r)=>u.jsx(a1,{ref:r,className:ue("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),...n}));m1.displayName=a1.displayName;const vA=h.forwardRef(({className:e,children:t,checked:n,...r},s)=>u.jsxs(l1,{ref:s,className:ue("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:n,...r,children:[u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(u1,{children:u.jsx(E_,{className:"h-4 w-4"})})}),t]}));vA.displayName=l1.displayName;const yA=h.forwardRef(({className:e,children:t,...n},r)=>u.jsxs(c1,{ref:r,className:ue("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),...n,children:[u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(u1,{children:u.jsx(zP,{className:"h-2 w-2 fill-current"})})}),t]}));yA.displayName=c1.displayName;const g1=h.forwardRef(({className:e,inset:t,...n},r)=>u.jsx(i1,{ref:r,className:ue("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));g1.displayName=i1.displayName;const v1=h.forwardRef(({className:e,...t},n)=>u.jsx(d1,{ref:n,className:ue("-mx-1 my-1 h-px bg-muted",e),...t}));v1.displayName=d1.displayName;var vg="Dialog",[y1,x1]=dr(vg),[xA,fr]=y1(vg),w1=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:s,onOpenChange:o,modal:i=!0}=e,a=h.useRef(null),l=h.useRef(null),[c=!1,d]=Bs({prop:r,defaultProp:s,onChange:o});return u.jsx(xA,{scope:t,triggerRef:a,contentRef:l,contentId:kr(),titleId:kr(),descriptionId:kr(),open:c,onOpenChange:d,onOpenToggle:h.useCallback(()=>d(f=>!f),[d]),modal:i,children:n})};w1.displayName=vg;var _1="DialogTrigger",S1=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=fr(_1,n),o=Ie(t,s.triggerRef);return u.jsx(_e.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":wg(s.open),...r,ref:o,onClick:ee(e.onClick,s.onOpenToggle)})});S1.displayName=_1;var yg="DialogPortal",[wA,b1]=y1(yg,{forceMount:void 0}),C1=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:s}=e,o=fr(yg,t);return u.jsx(wA,{scope:t,forceMount:n,children:h.Children.map(r,i=>u.jsx(Dr,{present:n||o.open,children:u.jsx(Yl,{asChild:!0,container:s,children:i})}))})};C1.displayName=yg;var Hu="DialogOverlay",k1=h.forwardRef((e,t)=>{const n=b1(Hu,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=fr(Hu,e.__scopeDialog);return o.modal?u.jsx(Dr,{present:r||o.open,children:u.jsx(_A,{...s,ref:t})}):null});k1.displayName=Hu;var _A=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=fr(Hu,n);return u.jsx(Fd,{as:ns,allowPinchZoom:!0,shards:[s.contentRef],children:u.jsx(_e.div,{"data-state":wg(s.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Mo="DialogContent",E1=h.forwardRef((e,t)=>{const n=b1(Mo,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=fr(Mo,e.__scopeDialog);return u.jsx(Dr,{present:r||o.open,children:o.modal?u.jsx(SA,{...s,ref:t}):u.jsx(bA,{...s,ref:t})})});E1.displayName=Mo;var SA=h.forwardRef((e,t)=>{const n=fr(Mo,e.__scopeDialog),r=h.useRef(null),s=Ie(t,n.contentRef,r);return h.useEffect(()=>{const o=r.current;if(o)return lg(o)},[]),u.jsx(T1,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ee(e.onCloseAutoFocus,o=>{var i;o.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:ee(e.onPointerDownOutside,o=>{const i=o.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&o.preventDefault()}),onFocusOutside:ee(e.onFocusOutside,o=>o.preventDefault())})}),bA=h.forwardRef((e,t)=>{const n=fr(Mo,e.__scopeDialog),r=h.useRef(!1),s=h.useRef(!1);return u.jsx(T1,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,o),o.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),o.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:o=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const i=o.target;((c=n.triggerRef.current)==null?void 0:c.contains(i))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),T1=h.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:o,...i}=e,a=fr(Mo,n),l=h.useRef(null),c=Ie(t,l);return Zm(),u.jsxs(u.Fragment,{children:[u.jsx(jd,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:o,children:u.jsx(Zi,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":wg(a.open),...i,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx(kA,{titleId:a.titleId}),u.jsx(TA,{contentRef:l,descriptionId:a.descriptionId})]})]})}),xg="DialogTitle",N1=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=fr(xg,n);return u.jsx(_e.h2,{id:s.titleId,...r,ref:t})});N1.displayName=xg;var R1="DialogDescription",P1=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=fr(R1,n);return u.jsx(_e.p,{id:s.descriptionId,...r,ref:t})});P1.displayName=R1;var D1="DialogClose",M1=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=fr(D1,n);return u.jsx(_e.button,{type:"button",...r,ref:t,onClick:ee(e.onClick,()=>s.onOpenChange(!1))})});M1.displayName=D1;function wg(e){return e?"open":"closed"}var j1="DialogTitleWarning",[CA,O1]=PD(j1,{contentName:Mo,titleName:xg,docsSlug:"dialog"}),kA=({titleId:e})=>{const t=O1(j1),n=`\`${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 h.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},EA="DialogDescriptionWarning",TA=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${O1(EA).contentName}}.`;return h.useEffect(()=>{var o;const s=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},_g=w1,Sg=S1,bg=C1,Gl=k1,Kl=E1,Zl=N1,ql=P1,Vd=M1;const A1=_g,I1=Sg,NA=bg,L1=h.forwardRef(({className:e,...t},n)=>u.jsx(Gl,{className:ue("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:n}));L1.displayName=Gl.displayName;const RA=zl("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"}}),Cg=h.forwardRef(({side:e="right",className:t,children:n,...r},s)=>u.jsxs(NA,{children:[u.jsx(L1,{}),u.jsxs(Kl,{ref:s,className:ue(RA({side:e}),t),...r,children:[n,u.jsxs(Vd,{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(Wm,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Cg.displayName=Kl.displayName;const F1=({className:e,...t})=>u.jsx("div",{className:ue("flex flex-col space-y-2 text-center sm:text-left",e),...t});F1.displayName="SheetHeader";const U1=h.forwardRef(({className:e,...t},n)=>u.jsx(Zl,{ref:n,className:ue("text-lg font-semibold text-foreground",e),...t}));U1.displayName=Zl.displayName;const PA=h.forwardRef(({className:e,...t},n)=>u.jsx(ql,{ref:n,className:ue("text-sm text-muted-foreground",e),...t}));PA.displayName=ql.displayName;class Pn extends Error{constructor(t){var n,r,s,o;super("ClientResponseError"),this.url="",this.status=0,this.response={},this.isAbort=!1,this.originalError=null,Object.setPrototypeOf(this,Pn.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 Pn||(this.originalError=t),typeof DOMException<"u"&&t instanceof DOMException&&(this.isAbort=!0),this.name="ClientResponseError "+this.status,this.message=(n=this.response)==null?void 0:n.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=(r=this.originalError)==null?void 0:r.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 Ic=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function DA(e,t){const n={};if(typeof e!="string")return n;const r=Object.assign({},{}).decode||MA;let s=0;for(;s0&&(!n.exp||n.exp-t>Date.now()/1e3))}$1=typeof atob!="function"||OA?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 n,r,s=0,o=0,i="";r=t.charAt(o++);~r&&(n=s%4?64*n+r:r,s++%4)?i+=String.fromCharCode(255&n>>(-2*s&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return i}:atob;const Sx="pb_auth";class AA{constructor(){this.baseToken="",this.baseModel=null,this._onChangeCallbacks=[]}get token(){return this.baseToken}get model(){return this.baseModel}get isValid(){return!V1(this.token)}get isAdmin(){return ki(this.token).type==="admin"}get isAuthRecord(){return ki(this.token).type==="authRecord"}save(t,n){this.baseToken=t||"",this.baseModel=n||null,this.triggerChange()}clear(){this.baseToken="",this.baseModel=null,this.triggerChange()}loadFromCookie(t,n=Sx){const r=DA(t||"")[n]||"";let s={};try{s=JSON.parse(r),(typeof s===null||typeof s!="object"||Array.isArray(s))&&(s={})}catch{}this.save(s.token||"",s.model||null)}exportToCookie(t,n=Sx){var l,c;const r={secure:!0,sameSite:!0,httpOnly:!0,path:"/"},s=ki(this.token);r.expires=s!=null&&s.exp?new Date(1e3*s.exp):new Date("1970-01-01"),t=Object.assign({},r,t);const o={token:this.token,model:this.model?JSON.parse(JSON.stringify(this.model)):null};let i=_x(n,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 d=["collectionId","username","verified"];for(const f in this.model)d.includes(f)&&(o.model[f]=this.model[f]);i=_x(n,JSON.stringify(o),t)}return i}onChange(t,n=!1){return this._onChangeCallbacks.push(t),n&&t(this.token,this.model),()=>{for(let r=this._onChangeCallbacks.length-1;r>=0;r--)if(this._onChangeCallbacks[r]==t)return delete this._onChangeCallbacks[r],void this._onChangeCallbacks.splice(r,1)}}triggerChange(){for(const t of this._onChangeCallbacks)t&&t(this.token,this.model)}}class IA extends AA{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,n){this._storageSet(this.storageKey,{token:t,model:n}),super.save(t,n)}clear(){this._storageRemove(this.storageKey),super.clear()}_storageGet(t){if(typeof window<"u"&&(window!=null&&window.localStorage)){const n=window.localStorage.getItem(t)||"";try{return JSON.parse(n)}catch{return n}}return this.storageFallback[t]}_storageSet(t,n){if(typeof window<"u"&&(window!=null&&window.localStorage)){let r=n;typeof n!="string"&&(r=JSON.stringify(n)),window.localStorage.setItem(t,r)}else this.storageFallback[t]=n}_storageRemove(t){var n;typeof window<"u"&&(window!=null&&window.localStorage)&&((n=window.localStorage)==null||n.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 n=this._storageGet(this.storageKey)||{};super.save(n.token||"",n.model||null)})}}class $o{constructor(t){this.client=t}}class LA extends $o{async getAll(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/settings",t)}async update(t,n){return n=Object.assign({method:"PATCH",body:t},n),this.client.send("/api/settings",n)}async testS3(t="storage",n){return n=Object.assign({method:"POST",body:{filesystem:t}},n),this.client.send("/api/settings/test/s3",n).then(()=>!0)}async testEmail(t,n,r){return r=Object.assign({method:"POST",body:{email:t,template:n}},r),this.client.send("/api/settings/test/email",r).then(()=>!0)}async generateAppleClientSecret(t,n,r,s,o,i){return i=Object.assign({method:"POST",body:{clientId:t,teamId:n,keyId:r,privateKey:s,duration:o}},i),this.client.send("/api/settings/apple/generate-client-secret",i)}}class kg extends $o{decode(t){return t}async getFullList(t,n){if(typeof t=="number")return this._getFullList(t,n);let r=500;return(n=Object.assign({},t,n)).batch&&(r=n.batch,delete n.batch),this._getFullList(r,n)}async getList(t=1,n=30,r){return(r=Object.assign({method:"GET"},r)).query=Object.assign({page:t,perPage:n},r.query),this.client.send(this.baseCrudPath,r).then(s=>{var o;return s.items=((o=s.items)==null?void 0:o.map(i=>this.decode(i)))||[],s})}async getFirstListItem(t,n){return(n=Object.assign({requestKey:"one_by_filter_"+this.baseCrudPath+"_"+t},n)).query=Object.assign({filter:t,skipTotal:1},n.query),this.getList(1,1,n).then(r=>{var s;if(!((s=r==null?void 0:r.items)!=null&&s.length))throw new Pn({status:404,response:{code:404,message:"The requested resource wasn't found.",data:{}}});return r.items[0]})}async getOne(t,n){if(!t)throw new Pn({url:this.client.buildUrl(this.baseCrudPath+"/"),status:404,response:{code:404,message:"Missing required record id.",data:{}}});return n=Object.assign({method:"GET"},n),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),n).then(r=>this.decode(r))}async create(t,n){return n=Object.assign({method:"POST",body:t},n),this.client.send(this.baseCrudPath,n).then(r=>this.decode(r))}async update(t,n,r){return r=Object.assign({method:"PATCH",body:n},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),r).then(s=>this.decode(s))}async delete(t,n){return n=Object.assign({method:"DELETE"},n),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),n).then(()=>!0)}_getFullList(t=500,n){(n=n||{}).query=Object.assign({skipTotal:1},n.query);let r=[],s=async o=>this.getList(o,t||500,n).then(i=>{const a=i.items;return r=r.concat(a),a.length==i.perPage?s(o+1):r});return s(1)}}function Sn(e,t,n,r){const s=r!==void 0;return s||n!==void 0?s?(console.warn(e),t.body=Object.assign({},t.body,n),t.query=Object.assign({},t.query,r),t):Object.assign(t,n):t}function oh(e){var t;(t=e._resetAutoRefresh)==null||t.call(e)}class FA extends kg{get baseCrudPath(){return"/api/admins"}async update(t,n,r){return super.update(t,n,r).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,n){return super.delete(t,n).then(r=>{var s,o;return r&&((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(),r})}authResponse(t){const n=this.decode((t==null?void 0:t.admin)||{});return t!=null&&t.token&&(t!=null&&t.admin)&&this.client.authStore.save(t.token,n),Object.assign({},t,{token:(t==null?void 0:t.token)||"",admin:n})}async authWithPassword(t,n,r,s){let o={method:"POST",body:{identity:t,password:n}};o=Sn("This form of authWithPassword(email, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(email, pass, options?).",o,r,s);const i=o.autoRefreshThreshold;delete o.autoRefreshThreshold,o.autoRefresh||oh(this.client);let a=await this.client.send(this.baseCrudPath+"/auth-with-password",o);return a=this.authResponse(a),i&&function(c,d,f,p){oh(c);const x=c.beforeSend,y=c.authStore.model,v=c.authStore.onChange((_,g)=>{(!_||(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))&&oh(c)});c._resetAutoRefresh=function(){v(),c.beforeSend=x,delete c._resetAutoRefresh},c.beforeSend=async(_,g)=>{var C;const m=c.authStore.token;if((C=g.query)!=null&&C.autoRefresh)return x?x(_,g):{url:_,sendOptions:g};let w=c.authStore.isValid;if(w&&V1(c.authStore.token,d))try{await f()}catch{w=!1}w||await p();const b=g.headers||{};for(let S in b)if(S.toLowerCase()=="authorization"&&m==b[S]&&c.authStore.token){b[S]=c.authStore.token;break}return g.headers=b,x?x(_,g):{url:_,sendOptions:g}}}(this.client,i,()=>this.authRefresh({autoRefresh:!0}),()=>this.authWithPassword(t,n,Object.assign({autoRefresh:!0},o))),a}async authRefresh(t,n){let r={method:"POST"};return r=Sn("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",r,t,n),this.client.send(this.baseCrudPath+"/auth-refresh",r).then(this.authResponse.bind(this))}async requestPasswordReset(t,n,r){let s={method:"POST",body:{email:t}};return s=Sn("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",s,n,r),this.client.send(this.baseCrudPath+"/request-password-reset",s).then(()=>!0)}async confirmPasswordReset(t,n,r,s,o){let i={method:"POST",body:{token:t,password:n,passwordConfirm:r}};return i=Sn("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 UA=["requestKey","$cancelKey","$autoCancel","fetch","headers","body","query","params","cache","credentials","headers","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy","signal","window"];function z1(e){if(e){e.query=e.query||{};for(let t in e)UA.includes(t)||(e.query[t]=e[t],delete e[t])}}class W1 extends $o{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,n,r){var i;if(!t)throw new Error("topic must be set.");let s=t;if(r){z1(r);const a="options="+encodeURIComponent(JSON.stringify({query:r.query,headers:r.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{}n(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 r;let n=!1;if(t){const s=this.getSubscriptionsByTopic(t);for(let o in s)if(this.hasSubscriptionListeners(o)){for(let i of this.subscriptions[o])(r=this.eventSource)==null||r.removeEventListener(o,i);delete this.subscriptions[o],n||(n=!0)}}else this.subscriptions={};this.hasSubscriptionListeners()?n&&await this.submitSubscriptions():this.disconnect()}async unsubscribeByPrefix(t){var r;let n=!1;for(let s in this.subscriptions)if((s+"?").startsWith(t)){n=!0;for(let o of this.subscriptions[s])(r=this.eventSource)==null||r.removeEventListener(s,o);delete this.subscriptions[s]}n&&(this.hasSubscriptionListeners()?await this.submitSubscriptions():this.disconnect())}async unsubscribeByTopicAndListener(t,n){var o;let r=!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]===n&&(a=!0,delete this.subscriptions[i][l],this.subscriptions[i].splice(l,1),(o=this.eventSource)==null||o.removeEventListener(i,n));a&&(this.subscriptions[i].length||delete this.subscriptions[i],r||this.hasSubscriptionListeners(i)||(r=!0))}this.hasSubscriptionListeners()?r&&await this.submitSubscriptions():this.disconnect()}hasSubscriptionListeners(t){var n,r;if(this.subscriptions=this.subscriptions||{},t)return!!((n=this.subscriptions[t])!=null&&n.length);for(let s in this.subscriptions)if((r=this.subscriptions[s])!=null&&r.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 n={};t=t.includes("?")?t:t+"?";for(let r in this.subscriptions)(r+"?").startsWith(t)&&(n[r]=this.subscriptions[r]);return n}getNonEmptySubscriptionKeys(){const t=[];for(let n in this.subscriptions)this.subscriptions[n].length&&t.push(n);return t}addAllSubscriptionListeners(){if(this.eventSource){this.removeAllSubscriptionListeners();for(let t in this.subscriptions)for(let n of this.subscriptions[t])this.eventSource.addEventListener(t,n)}}removeAllSubscriptionListeners(){if(this.eventSource)for(let t in this.subscriptions)for(let n of this.subscriptions[t])this.eventSource.removeEventListener(t,n)}async connect(){if(!(this.reconnectAttempts>0))return new Promise((t,n)=>{this.pendingConnects.push({resolve:t,reject:n}),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 n=t;this.clientId=n==null?void 0:n.lastEventId,this.submitSubscriptions().then(async()=>{let r=3;for(;this.hasUnsentSubscriptions()&&r>0;)r--,await this.submitSubscriptions()}).then(()=>{for(let s of this.pendingConnects)s.resolve();this.pendingConnects=[],this.reconnectAttempts=0,clearTimeout(this.reconnectTimeoutId),clearTimeout(this.connectTimeoutId);const r=this.getSubscriptionsByTopic("PB_CONNECT");for(let s in r)for(let o of r[s])o(t)}).catch(r=>{this.clientId="",this.connectErrorHandler(r)})})}hasUnsentSubscriptions(){const t=this.getNonEmptySubscriptionKeys();if(t.length!=this.lastSentSubscriptions.length)return!0;for(const n of t)if(!this.lastSentSubscriptions.includes(n))return!0;return!1}connectErrorHandler(t){if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),!this.clientId&&!this.reconnectAttempts||this.reconnectAttempts>this.maxReconnectAttempts){for(let r of this.pendingConnects)r.reject(new Pn(t));return this.pendingConnects=[],void this.disconnect()}this.disconnect(!0);const n=this.predefinedReconnectIntervals[this.reconnectAttempts]||this.predefinedReconnectIntervals[this.predefinedReconnectIntervals.length-1];this.reconnectAttempts++,this.reconnectTimeoutId=setTimeout(()=>{this.initConnect()},n)}disconnect(t=!1){var n;if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),this.removeAllSubscriptionListeners(),this.client.cancelRequest(this.getSubscriptionsCancelKey()),(n=this.eventSource)==null||n.close(),this.eventSource=null,this.clientId="",!t){this.reconnectAttempts=0;for(let r of this.pendingConnects)r.resolve();this.pendingConnects=[]}}}class $A extends kg{constructor(t,n){super(t),this.collectionIdOrName=n}get baseCrudPath(){return this.baseCollectionPath+"/records"}get baseCollectionPath(){return"/api/collections/"+encodeURIComponent(this.collectionIdOrName)}async subscribe(t,n,r){if(!t)throw new Error("Missing topic.");if(!n)throw new Error("Missing subscription callback.");return this.client.realtime.subscribe(this.collectionIdOrName+"/"+t,n,r)}async unsubscribe(t){return t?this.client.realtime.unsubscribe(this.collectionIdOrName+"/"+t):this.client.realtime.unsubscribeByPrefix(this.collectionIdOrName)}async getFullList(t,n){if(typeof t=="number")return super.getFullList(t,n);const r=Object.assign({},t,n);return super.getFullList(r)}async getList(t=1,n=30,r){return super.getList(t,n,r)}async getFirstListItem(t,n){return super.getFirstListItem(t,n)}async getOne(t,n){return super.getOne(t,n)}async create(t,n){return super.create(t,n)}async update(t,n,r){return super.update(t,n,r).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,n){return super.delete(t,n).then(r=>{var s,o,i;return!r||((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(),r})}authResponse(t){const n=this.decode((t==null?void 0:t.record)||{});return this.client.authStore.save(t==null?void 0:t.token,n),Object.assign({},t,{token:(t==null?void 0:t.token)||"",record:n})}async listAuthMethods(t){return t=Object.assign({method:"GET"},t),this.client.send(this.baseCollectionPath+"/auth-methods",t).then(n=>Object.assign({},n,{usernamePassword:!!(n!=null&&n.usernamePassword),emailPassword:!!(n!=null&&n.emailPassword),authProviders:Array.isArray(n==null?void 0:n.authProviders)?n==null?void 0:n.authProviders:[]}))}async authWithPassword(t,n,r,s){let o={method:"POST",body:{identity:t,password:n}};return o=Sn("This form of authWithPassword(usernameOrEmail, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(usernameOrEmail, pass, options?).",o,r,s),this.client.send(this.baseCollectionPath+"/auth-with-password",o).then(i=>this.authResponse(i))}async authWithOAuth2Code(t,n,r,s,o,i,a){let l={method:"POST",body:{provider:t,code:n,codeVerifier:r,redirectUrl:s,createData:o}};return l=Sn("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 n=(t==null?void 0:t[0])||{};let r=null;n.urlCallback||(r=bx(void 0));const s=new W1(this.client);function o(){r==null||r.close(),s.unsubscribe()}const i={},a=n.requestKey;return a&&(i.requestKey=a),this.listAuthMethods(i).then(l=>{var p;const c=l.authProviders.find(x=>x.name===n.provider);if(!c)throw new Pn(new Error(`Missing or invalid provider "${n.provider}".`));const d=this.client.buildUrl("/api/oauth2-redirect"),f=a?(p=this.client.cancelControllers)==null?void 0:p[a]:void 0;return f&&(f.signal.onabort=()=>{o()}),new Promise(async(x,y)=>{var v;try{await s.subscribe("@oauth2",async w=>{var C;const b=s.clientId;try{if(!w.state||b!==w.state)throw new Error("State parameters don't match.");if(w.error||!w.code)throw new Error("OAuth2 redirect error or missing code: "+w.error);const S=Object.assign({},n);delete S.provider,delete S.scopes,delete S.createData,delete S.urlCallback,(C=f==null?void 0:f.signal)!=null&&C.onabort&&(f.signal.onabort=null);const N=await this.authWithOAuth2Code(c.name,w.code,c.codeVerifier,d,n.createData,S);x(N)}catch(S){y(new Pn(S))}o()});const _={state:s.clientId};(v=n.scopes)!=null&&v.length&&(_.scope=n.scopes.join(" "));const g=this._replaceQueryParams(c.authUrl+d,_);await(n.urlCallback||function(w){r?r.location.href=w:r=bx(w)})(g)}catch(_){o(),y(new Pn(_))}})}).catch(l=>{throw o(),l})}async authRefresh(t,n){let r={method:"POST"};return r=Sn("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",r,t,n),this.client.send(this.baseCollectionPath+"/auth-refresh",r).then(s=>this.authResponse(s))}async requestPasswordReset(t,n,r){let s={method:"POST",body:{email:t}};return s=Sn("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",s,n,r),this.client.send(this.baseCollectionPath+"/request-password-reset",s).then(()=>!0)}async confirmPasswordReset(t,n,r,s,o){let i={method:"POST",body:{token:t,password:n,passwordConfirm:r}};return i=Sn("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,n,r){let s={method:"POST",body:{email:t}};return s=Sn("This form of requestVerification(email, body?, query?) is deprecated. Consider replacing it with requestVerification(email, options?).",s,n,r),this.client.send(this.baseCollectionPath+"/request-verification",s).then(()=>!0)}async confirmVerification(t,n,r){let s={method:"POST",body:{token:t}};return s=Sn("This form of confirmVerification(token, body?, query?) is deprecated. Consider replacing it with confirmVerification(token, options?).",s,n,r),this.client.send(this.baseCollectionPath+"/confirm-verification",s).then(()=>{const o=ki(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,n,r){let s={method:"POST",body:{newEmail:t}};return s=Sn("This form of requestEmailChange(newEmail, body?, query?) is deprecated. Consider replacing it with requestEmailChange(newEmail, options?).",s,n,r),this.client.send(this.baseCollectionPath+"/request-email-change",s).then(()=>!0)}async confirmEmailChange(t,n,r,s){let o={method:"POST",body:{token:t,password:n}};return o=Sn("This form of confirmEmailChange(token, password, body?, query?) is deprecated. Consider replacing it with confirmEmailChange(token, password, options?).",o,r,s),this.client.send(this.baseCollectionPath+"/confirm-email-change",o).then(()=>{const i=ki(t),a=this.client.authStore.model;return a&&a.id===i.id&&a.collectionId===i.collectionId&&this.client.authStore.clear(),!0})}async listExternalAuths(t,n){return n=Object.assign({method:"GET"},n),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t)+"/external-auths",n)}async unlinkExternalAuth(t,n,r){return r=Object.assign({method:"DELETE"},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t)+"/external-auths/"+encodeURIComponent(n),r).then(()=>!0)}_replaceQueryParams(t,n={}){let r=t,s="";t.indexOf("?")>=0&&(r=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 n)n.hasOwnProperty(a)&&(n[a]==null?delete o[a]:o[a]=n[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!=""?r+"?"+s:r}}function bx(e){if(typeof window>"u"||!(window!=null&&window.open))throw new Pn(new Error("Not in a browser context - please pass a custom urlCallback function."));let t=1024,n=768,r=window.innerWidth,s=window.innerHeight;t=t>r?r:t,n=n>s?s:n;let o=r/2-t/2,i=s/2-n/2;return window.open(e,"popup_window","width="+t+",height="+n+",top="+i+",left="+o+",resizable,menubar=no")}class VA extends kg{get baseCrudPath(){return"/api/collections"}async import(t,n=!1,r){return r=Object.assign({method:"PUT",body:{collections:t,deleteMissing:n}},r),this.client.send(this.baseCrudPath+"/import",r).then(()=>!0)}}class zA extends $o{async getList(t=1,n=30,r){return(r=Object.assign({method:"GET"},r)).query=Object.assign({page:t,perPage:n},r.query),this.client.send("/api/logs",r)}async getOne(t,n){if(!t)throw new Pn({url:this.client.buildUrl("/api/logs/"),status:404,response:{code:404,message:"Missing required log id.",data:{}}});return n=Object.assign({method:"GET"},n),this.client.send("/api/logs/"+encodeURIComponent(t),n)}async getStats(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/logs/stats",t)}}class WA extends $o{async check(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/health",t)}}class YA extends $o{getUrl(t,n,r={}){if(!n||!(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(n));let o=this.client.buildUrl(s.join("/"));if(Object.keys(r).length){r.download===!1&&delete r.download;const i=new URLSearchParams(r);o+=(o.includes("?")?"&":"?")+i}return o}async getToken(t){return t=Object.assign({method:"POST"},t),this.client.send("/api/files/token",t).then(n=>(n==null?void 0:n.token)||"")}}class BA extends $o{async getFullList(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/backups",t)}async create(t,n){return n=Object.assign({method:"POST",body:{name:t}},n),this.client.send("/api/backups",n).then(()=>!0)}async upload(t,n){return n=Object.assign({method:"POST",body:t},n),this.client.send("/api/backups/upload",n).then(()=>!0)}async delete(t,n){return n=Object.assign({method:"DELETE"},n),this.client.send(`/api/backups/${encodeURIComponent(t)}`,n).then(()=>!0)}async restore(t,n){return n=Object.assign({method:"POST"},n),this.client.send(`/api/backups/${encodeURIComponent(t)}/restore`,n).then(()=>!0)}getDownloadUrl(t,n){return this.client.buildUrl(`/api/backups/${encodeURIComponent(n)}?token=${encodeURIComponent(t)}`)}}class HA{constructor(t="/",n,r="en-US"){this.cancelControllers={},this.recordServices={},this.enableAutoCancellation=!0,this.baseUrl=t,this.lang=r,this.authStore=n||new IA,this.admins=new FA(this),this.collections=new VA(this),this.files=new YA(this),this.logs=new zA(this),this.settings=new LA(this),this.realtime=new W1(this),this.health=new WA(this),this.backups=new BA(this)}collection(t){return this.recordServices[t]||(this.recordServices[t]=new $A(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,n){if(!n)return t;for(let r in n){let s=n[r];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("{:"+r+"}",s)}return t}getFileUrl(t,n,r={}){return this.files.getUrl(t,n,r)}buildUrl(t){var r;let n=this.baseUrl;return typeof window>"u"||!window.location||n.startsWith("https://")||n.startsWith("http://")||(n=(r=window.location.origin)!=null&&r.endsWith("/")?window.location.origin.substring(0,window.location.origin.length-1):window.location.origin||"",this.baseUrl.startsWith("/")||(n+=window.location.pathname||"/",n+=n.endsWith("/")?"":"/"),n+=this.baseUrl),t&&(n+=n.endsWith("/")?"":"/",n+=t.startsWith("/")?t.substring(1):t),n}async send(t,n){n=this.initSendOptions(t,n);let r=this.buildUrl(t);if(this.beforeSend){const s=Object.assign({},await this.beforeSend(r,n));s.url!==void 0||s.options!==void 0?(r=s.url||r,n=s.options||n):Object.keys(s).length&&(n=s,console!=null&&console.warn&&console.warn("Deprecated format of beforeSend return: please use `return { url, options }`, instead of `return options`."))}if(n.query!==void 0){const s=this.serializeQueryParams(n.query);s&&(r+=(r.includes("?")?"&":"?")+s),delete n.query}return this.getHeader(n.headers,"Content-Type")=="application/json"&&n.body&&typeof n.body!="string"&&(n.body=JSON.stringify(n.body)),(n.fetch||fetch)(r,n).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 Pn({url:s.url,status:s.status,data:o});return o}).catch(s=>{throw new Pn(s)})}initSendOptions(t,n){if((n=Object.assign({method:"GET"},n)).body=this.convertToFormDataIfNeeded(n.body),z1(n),n.query=Object.assign({},n.params,n.query),n.requestKey===void 0&&(n.$autoCancel===!1||n.query.$autoCancel===!1?n.requestKey=null:(n.$cancelKey||n.query.$cancelKey)&&(n.requestKey=n.$cancelKey||n.query.$cancelKey)),delete n.$autoCancel,delete n.query.$autoCancel,delete n.$cancelKey,delete n.query.$cancelKey,this.getHeader(n.headers,"Content-Type")!==null||this.isFormData(n.body)||(n.headers=Object.assign({},n.headers,{"Content-Type":"application/json"})),this.getHeader(n.headers,"Accept-Language")===null&&(n.headers=Object.assign({},n.headers,{"Accept-Language":this.lang})),this.authStore.token&&this.getHeader(n.headers,"Authorization")===null&&(n.headers=Object.assign({},n.headers,{Authorization:this.authStore.token})),this.enableAutoCancellation&&n.requestKey!==null){const r=n.requestKey||(n.method||"GET")+t;delete n.requestKey,this.cancelRequest(r);const s=new AbortController;this.cancelControllers[r]=s,n.signal=s.signal}return n}convertToFormDataIfNeeded(t){if(typeof FormData>"u"||t===void 0||typeof t!="object"||t===null||this.isFormData(t)||!this.hasBlobField(t))return t;const n=new FormData;for(const r in t){const s=t[r];if(typeof s!="object"||this.hasBlobField({data:s})){const o=Array.isArray(s)?s:[s];for(let i of o)n.append(r,i)}else{let o={};o[r]=s,n.append("@jsonPayload",JSON.stringify(o))}}return n}hasBlobField(t){for(const n in t){const r=Array.isArray(t[n])?t[n]:[t[n]];for(const s of r)if(typeof Blob<"u"&&s instanceof Blob||typeof File<"u"&&s instanceof File)return!0}return!1}getHeader(t,n){t=t||{},n=n.toLowerCase();for(let r in t)if(r.toLowerCase()==n)return t[r];return null}isFormData(t){return t&&(t.constructor.name==="FormData"||typeof FormData<"u"&&t instanceof FormData)}serializeQueryParams(t){const n=[];for(const r in t){if(t[r]===null)continue;const s=t[r],o=encodeURIComponent(r);if(Array.isArray(s))for(const i of s)n.push(o+"="+encodeURIComponent(i));else s instanceof Date?n.push(o+"="+encodeURIComponent(s.toISOString())):typeof s!==null&&typeof s=="object"?n.push(o+"="+encodeURIComponent(JSON.stringify(s))):n.push(o+"="+encodeURIComponent(s))}return n.join("&")}}let Lc;const Zt=()=>Lc||(Lc=new HA("http://127.0.0.1:8090"),Lc);//! moment.js -//! version : 2.30.1 -//! authors : Tim Wood, Iskren Chernev, Moment.js contributors -//! license : MIT -//! momentjs.com -var Y1;function te(){return Y1.apply(null,arguments)}function GA(e){Y1=e}function lr(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function So(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function ze(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Eg(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(ze(e,t))return!1;return!0}function hn(e){return e===void 0}function os(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function Ql(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function B1(e,t){var n=[],r,s=e.length;for(r=0;r>>0,r;for(r=0;r0)for(n=0;n=0;return(o?n?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+r}var Pg=/(\[[^\[]*\])|(\\)?([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,Fc=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ah={},Ei={};function he(e,t,n,r){var s=r;typeof r=="string"&&(s=function(){return this[r]()}),e&&(Ei[e]=s),t&&(Ei[t[0]]=function(){return Nr(s.apply(this,arguments),t[1],t[2])}),n&&(Ei[n]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function XA(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function JA(e){var t=e.match(Pg),n,r;for(n=0,r=t.length;n=0&&Fc.test(e);)e=e.replace(Fc,r),Fc.lastIndex=0,n-=1;return e}var eI={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 tI(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(Pg).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var nI="Invalid date";function rI(){return this._invalidDate}var sI="%d",oI=/\d{1,2}/;function iI(e){return this._ordinal.replace("%d",e)}var aI={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 lI(e,t,n,r){var s=this._relativeTime[n];return jr(s)?s(e,t,n,r):s.replace(/%d/i,e)}function cI(e,t){var n=this._relativeTime[e>0?"future":"past"];return jr(n)?n(t):n.replace(/%s/i,t)}var Ex={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 Bn(e){return typeof e=="string"?Ex[e]||Ex[e.toLowerCase()]:void 0}function Dg(e){var t={},n,r;for(r in e)ze(e,r)&&(n=Bn(r),n&&(t[n]=e[r]));return t}var uI={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 dI(e){var t=[],n;for(n in e)ze(e,n)&&t.push({unit:n,priority:uI[n]});return t.sort(function(r,s){return r.priority-s.priority}),t}var Z1=/\d/,An=/\d\d/,q1=/\d{3}/,Mg=/\d{4}/,Wd=/[+-]?\d{6}/,ot=/\d\d?/,Q1=/\d\d\d\d?/,X1=/\d\d\d\d\d\d?/,Yd=/\d{1,3}/,jg=/\d{1,4}/,Bd=/[+-]?\d{1,6}/,Ji=/\d+/,Hd=/[+-]?\d+/,fI=/Z|[+-]\d\d:?\d\d/gi,Gd=/Z|[+-]\d\d(?::?\d\d)?/gi,hI=/[+-]?\d+(\.\d{1,3})?/,Jl=/[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,ea=/^[1-9]\d?/,Og=/^([1-9]\d|\d)/,Gu;Gu={};function oe(e,t,n){Gu[e]=jr(t)?t:function(r,s){return r&&n?n:t}}function pI(e,t){return ze(Gu,e)?Gu[e](t._strict,t._locale):new RegExp(mI(e))}function mI(e){return qr(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,r,s,o){return n||r||s||o}))}function qr(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Fn(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Oe(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=Fn(t)),n}var kp={};function qe(e,t){var n,r=t,s;for(typeof e=="string"&&(e=[e]),os(t)&&(r=function(o,i){i[t]=Oe(o)}),s=e.length,n=0;n68?1900:2e3)};var J1=ta("FullYear",!0);function xI(){return Kd(this.year())}function ta(e,t){return function(n){return n!=null?(eb(this,e,n),te.updateOffset(this,t),this):yl(this,e)}}function yl(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function eb(e,t,n){var r,s,o,i,a;if(!(!e.isValid()||isNaN(n))){switch(r=e._d,s=e._isUTC,t){case"Milliseconds":return void(s?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(s?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(s?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(s?r.setUTCHours(n):r.setHours(n));case"Date":return void(s?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}o=n,i=e.month(),a=e.date(),a=a===29&&i===1&&!Kd(o)?28:a,s?r.setUTCFullYear(o,i,a):r.setFullYear(o,i,a)}}function wI(e){return e=Bn(e),jr(this[e])?this[e]():this}function _I(e,t){if(typeof e=="object"){e=Dg(e);var n=dI(e),r,s=n.length;for(r=0;r=0?(a=new Date(e+400,t,n,r,s,o,i),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,n,r,s,o,i),a}function xl(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Ku(e,t,n){var r=7+t-n,s=(7+xl(e,0,r).getUTCDay()-t)%7;return-s+r-1}function ib(e,t,n,r,s){var o=(7+n-r)%7,i=Ku(e,r,s),a=1+7*(t-1)+o+i,l,c;return a<=0?(l=e-1,c=Ua(l)+a):a>Ua(e)?(l=e+1,c=a-Ua(e)):(l=e,c=a),{year:l,dayOfYear:c}}function wl(e,t,n){var r=Ku(e.year(),t,n),s=Math.floor((e.dayOfYear()-r-1)/7)+1,o,i;return s<1?(i=e.year()-1,o=s+Qr(i,t,n)):s>Qr(e.year(),t,n)?(o=s-Qr(e.year(),t,n),i=e.year()+1):(i=e.year(),o=s),{week:o,year:i}}function Qr(e,t,n){var r=Ku(e,t,n),s=Ku(e+1,t,n);return(Ua(e)-r+s)/7}he("w",["ww",2],"wo","week");he("W",["WW",2],"Wo","isoWeek");oe("w",ot,ea);oe("ww",ot,An);oe("W",ot,ea);oe("WW",ot,An);ec(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=Oe(e)});function OI(e){return wl(e,this._week.dow,this._week.doy).week}var AI={dow:0,doy:6};function II(){return this._week.dow}function LI(){return this._week.doy}function FI(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function UI(e){var t=wl(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}he("d",0,"do","day");he("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});he("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});he("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});he("e",0,0,"weekday");he("E",0,0,"isoWeekday");oe("d",ot);oe("e",ot);oe("E",ot);oe("dd",function(e,t){return t.weekdaysMinRegex(e)});oe("ddd",function(e,t){return t.weekdaysShortRegex(e)});oe("dddd",function(e,t){return t.weekdaysRegex(e)});ec(["dd","ddd","dddd"],function(e,t,n,r){var s=n._locale.weekdaysParse(e,r,n._strict);s!=null?t.d=s:ke(n).invalidWeekday=e});ec(["d","e","E"],function(e,t,n,r){t[r]=Oe(e)});function $I(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function VI(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Ig(e,t){return e.slice(t,7).concat(e.slice(0,t))}var zI="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ab="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),WI="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),YI=Jl,BI=Jl,HI=Jl;function GI(e,t){var n=lr(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Ig(n,this._week.dow):e?n[e.day()]:n}function KI(e){return e===!0?Ig(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function ZI(e){return e===!0?Ig(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function qI(e,t,n){var r,s,o,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=Mr([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?t==="dddd"?(s=_t.call(this._weekdaysParse,i),s!==-1?s:null):t==="ddd"?(s=_t.call(this._shortWeekdaysParse,i),s!==-1?s:null):(s=_t.call(this._minWeekdaysParse,i),s!==-1?s:null):t==="dddd"?(s=_t.call(this._weekdaysParse,i),s!==-1||(s=_t.call(this._shortWeekdaysParse,i),s!==-1)?s:(s=_t.call(this._minWeekdaysParse,i),s!==-1?s:null)):t==="ddd"?(s=_t.call(this._shortWeekdaysParse,i),s!==-1||(s=_t.call(this._weekdaysParse,i),s!==-1)?s:(s=_t.call(this._minWeekdaysParse,i),s!==-1?s:null)):(s=_t.call(this._minWeekdaysParse,i),s!==-1||(s=_t.call(this._weekdaysParse,i),s!==-1)?s:(s=_t.call(this._shortWeekdaysParse,i),s!==-1?s:null))}function QI(e,t,n){var r,s,o;if(this._weekdaysParseExact)return qI.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(s=Mr([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(s,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(s,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(s,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function XI(e){if(!this.isValid())return e!=null?this:NaN;var t=yl(this,"Day");return e!=null?(e=$I(e,this.localeData()),this.add(e-t,"d")):t}function JI(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 e2(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=VI(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function t2(e){return this._weekdaysParseExact?(ze(this,"_weekdaysRegex")||Lg.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(ze(this,"_weekdaysRegex")||(this._weekdaysRegex=YI),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function n2(e){return this._weekdaysParseExact?(ze(this,"_weekdaysRegex")||Lg.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(ze(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=BI),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function r2(e){return this._weekdaysParseExact?(ze(this,"_weekdaysRegex")||Lg.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(ze(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=HI),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Lg(){function e(d,f){return f.length-d.length}var t=[],n=[],r=[],s=[],o,i,a,l,c;for(o=0;o<7;o++)i=Mr([2e3,1]).day(o),a=qr(this.weekdaysMin(i,"")),l=qr(this.weekdaysShort(i,"")),c=qr(this.weekdays(i,"")),t.push(a),n.push(l),r.push(c),s.push(a),s.push(l),s.push(c);t.sort(e),n.sort(e),r.sort(e),s.sort(e),this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Fg(){return this.hours()%12||12}function s2(){return this.hours()||24}he("H",["HH",2],0,"hour");he("h",["hh",2],0,Fg);he("k",["kk",2],0,s2);he("hmm",0,0,function(){return""+Fg.apply(this)+Nr(this.minutes(),2)});he("hmmss",0,0,function(){return""+Fg.apply(this)+Nr(this.minutes(),2)+Nr(this.seconds(),2)});he("Hmm",0,0,function(){return""+this.hours()+Nr(this.minutes(),2)});he("Hmmss",0,0,function(){return""+this.hours()+Nr(this.minutes(),2)+Nr(this.seconds(),2)});function lb(e,t){he(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}lb("a",!0);lb("A",!1);function cb(e,t){return t._meridiemParse}oe("a",cb);oe("A",cb);oe("H",ot,Og);oe("h",ot,ea);oe("k",ot,ea);oe("HH",ot,An);oe("hh",ot,An);oe("kk",ot,An);oe("hmm",Q1);oe("hmmss",X1);oe("Hmm",Q1);oe("Hmmss",X1);qe(["H","HH"],Pt);qe(["k","kk"],function(e,t,n){var r=Oe(e);t[Pt]=r===24?0:r});qe(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});qe(["h","hh"],function(e,t,n){t[Pt]=Oe(e),ke(n).bigHour=!0});qe("hmm",function(e,t,n){var r=e.length-2;t[Pt]=Oe(e.substr(0,r)),t[er]=Oe(e.substr(r)),ke(n).bigHour=!0});qe("hmmss",function(e,t,n){var r=e.length-4,s=e.length-2;t[Pt]=Oe(e.substr(0,r)),t[er]=Oe(e.substr(r,2)),t[Gr]=Oe(e.substr(s)),ke(n).bigHour=!0});qe("Hmm",function(e,t,n){var r=e.length-2;t[Pt]=Oe(e.substr(0,r)),t[er]=Oe(e.substr(r))});qe("Hmmss",function(e,t,n){var r=e.length-4,s=e.length-2;t[Pt]=Oe(e.substr(0,r)),t[er]=Oe(e.substr(r,2)),t[Gr]=Oe(e.substr(s))});function o2(e){return(e+"").toLowerCase().charAt(0)==="p"}var i2=/[ap]\.?m?\.?/i,a2=ta("Hours",!0);function l2(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var ub={calendar:qA,longDateFormat:eI,invalidDate:nI,ordinal:sI,dayOfMonthOrdinalParse:oI,relativeTime:aI,months:bI,monthsShort:tb,week:AI,weekdays:zI,weekdaysMin:WI,weekdaysShort:ab,meridiemParse:i2},at={},ya={},_l;function c2(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(s=Zd(o.slice(0,n).join("-")),s)return s;if(r&&r.length>=n&&c2(o,r)>=n-1)break;n--}t++}return _l}function d2(e){return!!(e&&e.match("^[^/\\\\]*$"))}function Zd(e){var t=null,n;if(at[e]===void 0&&typeof hu<"u"&&hu&&hu.exports&&d2(e))try{t=_l._abbr,n=require,n("./locale/"+e),zs(t)}catch{at[e]=null}return at[e]}function zs(e,t){var n;return e&&(hn(t)?n=fs(e):n=Ug(e,t),n?_l=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),_l._abbr}function Ug(e,t){if(t!==null){var n,r=ub;if(t.abbr=e,at[e]!=null)G1("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."),r=at[e]._config;else if(t.parentLocale!=null)if(at[t.parentLocale]!=null)r=at[t.parentLocale]._config;else if(n=Zd(t.parentLocale),n!=null)r=n._config;else return ya[t.parentLocale]||(ya[t.parentLocale]=[]),ya[t.parentLocale].push({name:e,config:t}),null;return at[e]=new Rg(bp(r,t)),ya[e]&&ya[e].forEach(function(s){Ug(s.name,s.config)}),zs(e),at[e]}else return delete at[e],null}function f2(e,t){if(t!=null){var n,r,s=ub;at[e]!=null&&at[e].parentLocale!=null?at[e].set(bp(at[e]._config,t)):(r=Zd(e),r!=null&&(s=r._config),t=bp(s,t),r==null&&(t.abbr=e),n=new Rg(t),n.parentLocale=at[e],at[e]=n),zs(e)}else at[e]!=null&&(at[e].parentLocale!=null?(at[e]=at[e].parentLocale,e===zs()&&zs(e)):at[e]!=null&&delete at[e]);return at[e]}function fs(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return _l;if(!lr(e)){if(t=Zd(e),t)return t;e=[e]}return u2(e)}function h2(){return Cp(at)}function $g(e){var t,n=e._a;return n&&ke(e).overflow===-2&&(t=n[Hr]<0||n[Hr]>11?Hr:n[xr]<1||n[xr]>Ag(n[qt],n[Hr])?xr:n[Pt]<0||n[Pt]>24||n[Pt]===24&&(n[er]!==0||n[Gr]!==0||n[yo]!==0)?Pt:n[er]<0||n[er]>59?er:n[Gr]<0||n[Gr]>59?Gr:n[yo]<0||n[yo]>999?yo:-1,ke(e)._overflowDayOfYear&&(txr)&&(t=xr),ke(e)._overflowWeeks&&t===-1&&(t=vI),ke(e)._overflowWeekday&&t===-1&&(t=yI),ke(e).overflow=t),e}var p2=/^\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)?)?$/,m2=/^\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)?)?$/,g2=/Z|[+-]\d\d(?::?\d\d)?/,Uc=[["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]],lh=[["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/]],v2=/^\/?Date\((-?\d+)/i,y2=/^(?:(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}))$/,x2={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 db(e){var t,n,r=e._i,s=p2.exec(r)||m2.exec(r),o,i,a,l,c=Uc.length,d=lh.length;if(s){for(ke(e).iso=!0,t=0,n=c;tUa(i)||e._dayOfYear===0)&&(ke(e)._overflowDayOfYear=!0),n=xl(i,0,e._dayOfYear),e._a[Hr]=n.getUTCMonth(),e._a[xr]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=s[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[Pt]===24&&e._a[er]===0&&e._a[Gr]===0&&e._a[yo]===0&&(e._nextDay=!0,e._a[Pt]=0),e._d=(e._useUTC?xl:jI).apply(null,r),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Pt]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==o&&(ke(e).weekdayMismatch=!0)}}function T2(e){var t,n,r,s,o,i,a,l,c;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(o=1,i=4,n=Jo(t.GG,e._a[qt],wl(st(),1,4).year),r=Jo(t.W,1),s=Jo(t.E,1),(s<1||s>7)&&(l=!0)):(o=e._locale._week.dow,i=e._locale._week.doy,c=wl(st(),o,i),n=Jo(t.gg,e._a[qt],c.year),r=Jo(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),r<1||r>Qr(n,o,i)?ke(e)._overflowWeeks=!0:l!=null?ke(e)._overflowWeekday=!0:(a=ib(n,r,s,o,i),e._a[qt]=a.year,e._dayOfYear=a.dayOfYear)}te.ISO_8601=function(){};te.RFC_2822=function(){};function zg(e){if(e._f===te.ISO_8601){db(e);return}if(e._f===te.RFC_2822){fb(e);return}e._a=[],ke(e).empty=!0;var t=""+e._i,n,r,s,o,i,a=t.length,l=0,c,d;for(s=K1(e._f,e._locale).match(Pg)||[],d=s.length,n=0;n0&&ke(e).unusedInput.push(i),t=t.slice(t.indexOf(r)+r.length),l+=r.length),Ei[o]?(r?ke(e).empty=!1:ke(e).unusedTokens.push(o),gI(o,r,e)):e._strict&&!r&&ke(e).unusedTokens.push(o);ke(e).charsLeftOver=a-l,t.length>0&&ke(e).unusedInput.push(t),e._a[Pt]<=12&&ke(e).bigHour===!0&&e._a[Pt]>0&&(ke(e).bigHour=void 0),ke(e).parsedDateParts=e._a.slice(0),ke(e).meridiem=e._meridiem,e._a[Pt]=N2(e._locale,e._a[Pt],e._meridiem),c=ke(e).era,c!==null&&(e._a[qt]=e._locale.erasConvertYear(c,e._a[qt])),Vg(e),$g(e)}function N2(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function R2(e){var t,n,r,s,o,i,a=!1,l=e._f.length;if(l===0){ke(e).invalidFormat=!0,e._d=new Date(NaN);return}for(s=0;sthis?this:e:zd()});function mb(e,t){var n,r;if(t.length===1&&lr(t[0])&&(t=t[0]),!t.length)return st();for(n=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function q2(){if(!hn(this._isDSTShifted))return this._isDSTShifted;var e={},t;return Ng(e,this),e=hb(e),e._a?(t=e._isUTC?Mr(e._a):st(e._a),this._isDSTShifted=this.isValid()&&V2(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Q2(){return this.isValid()?!this._isUTC:!1}function X2(){return this.isValid()?this._isUTC:!1}function vb(){return this.isValid()?this._isUTC&&this._offset===0:!1}var J2=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,eL=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function hr(e,t){var n=e,r=null,s,o,i;return ou(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:os(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=J2.exec(e))?(s=r[1]==="-"?-1:1,n={y:0,d:Oe(r[xr])*s,h:Oe(r[Pt])*s,m:Oe(r[er])*s,s:Oe(r[Gr])*s,ms:Oe(Ep(r[yo]*1e3))*s}):(r=eL.exec(e))?(s=r[1]==="-"?-1:1,n={y:ao(r[2],s),M:ao(r[3],s),w:ao(r[4],s),d:ao(r[5],s),h:ao(r[6],s),m:ao(r[7],s),s:ao(r[8],s)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(i=tL(st(n.from),st(n.to)),n={},n.ms=i.milliseconds,n.M=i.months),o=new qd(n),ou(e)&&ze(e,"_locale")&&(o._locale=e._locale),ou(e)&&ze(e,"_isValid")&&(o._isValid=e._isValid),o}hr.fn=qd.prototype;hr.invalid=$2;function ao(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Nx(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function tL(e,t){var n;return e.isValid()&&t.isValid()?(t=Yg(t,e),e.isBefore(t)?n=Nx(e,t):(n=Nx(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function yb(e,t){return function(n,r){var s,o;return r!==null&&!isNaN(+r)&&(G1(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=n,n=r,r=o),s=hr(n,r),xb(this,s,e),this}}function xb(e,t,n,r){var s=t._milliseconds,o=Ep(t._days),i=Ep(t._months);e.isValid()&&(r=r??!0,i&&rb(e,yl(e,"Month")+i*n),o&&eb(e,"Date",yl(e,"Date")+o*n),s&&e._d.setTime(e._d.valueOf()+s*n),r&&te.updateOffset(e,o||i))}var nL=yb(1,"add"),rL=yb(-1,"subtract");function wb(e){return typeof e=="string"||e instanceof String}function sL(e){return cr(e)||Ql(e)||wb(e)||os(e)||iL(e)||oL(e)||e===null||e===void 0}function oL(e){var t=So(e)&&!Eg(e),n=!1,r=["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=r.length;for(s=0;sn.valueOf():n.valueOf()9999?su(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):jr(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",su(n,"Z")):su(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function wL(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,s,o;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",s="-MM-DD[T]HH:mm:ss.SSS",o=t+'[")]',this.format(n+r+s+o)}function _L(e){e||(e=this.isUtc()?te.defaultFormatUtc:te.defaultFormat);var t=su(this,e);return this.localeData().postformat(t)}function SL(e,t){return this.isValid()&&(cr(e)&&e.isValid()||st(e).isValid())?hr({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function bL(e){return this.from(st(),e)}function CL(e,t){return this.isValid()&&(cr(e)&&e.isValid()||st(e).isValid())?hr({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function kL(e){return this.to(st(),e)}function _b(e){var t;return e===void 0?this._locale._abbr:(t=fs(e),t!=null&&(this._locale=t),this)}var Sb=Yn("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 bb(){return this._locale}var Zu=1e3,Ti=60*Zu,qu=60*Ti,Cb=(365*400+97)*24*qu;function Ni(e,t){return(e%t+t)%t}function kb(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-Cb:new Date(e,t,n).valueOf()}function Eb(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-Cb:Date.UTC(e,t,n)}function EL(e){var t,n;if(e=Bn(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Eb:kb,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Ni(t+(this._isUTC?0:this.utcOffset()*Ti),qu);break;case"minute":t=this._d.valueOf(),t-=Ni(t,Ti);break;case"second":t=this._d.valueOf(),t-=Ni(t,Zu);break}return this._d.setTime(t),te.updateOffset(this,!0),this}function TL(e){var t,n;if(e=Bn(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Eb:kb,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=qu-Ni(t+(this._isUTC?0:this.utcOffset()*Ti),qu)-1;break;case"minute":t=this._d.valueOf(),t+=Ti-Ni(t,Ti)-1;break;case"second":t=this._d.valueOf(),t+=Zu-Ni(t,Zu)-1;break}return this._d.setTime(t),te.updateOffset(this,!0),this}function NL(){return this._d.valueOf()-(this._offset||0)*6e4}function RL(){return Math.floor(this.valueOf()/1e3)}function PL(){return new Date(this.valueOf())}function DL(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function ML(){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 jL(){return this.isValid()?this.toISOString():null}function OL(){return Tg(this)}function AL(){return Ds({},ke(this))}function IL(){return ke(this).overflow}function LL(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}he("N",0,0,"eraAbbr");he("NN",0,0,"eraAbbr");he("NNN",0,0,"eraAbbr");he("NNNN",0,0,"eraName");he("NNNNN",0,0,"eraNarrow");he("y",["y",1],"yo","eraYear");he("y",["yy",2],0,"eraYear");he("y",["yyy",3],0,"eraYear");he("y",["yyyy",4],0,"eraYear");oe("N",Bg);oe("NN",Bg);oe("NNN",Bg);oe("NNNN",KL);oe("NNNNN",ZL);qe(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var s=n._locale.erasParse(e,r,n._strict);s?ke(n).era=s:ke(n).invalidEra=e});oe("y",Ji);oe("yy",Ji);oe("yyy",Ji);oe("yyyy",Ji);oe("yo",qL);qe(["y","yy","yyy","yyyy"],qt);qe(["yo"],function(e,t,n,r){var s;n._locale._eraYearOrdinalRegex&&(s=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[qt]=n._locale.eraYearOrdinalParse(e,s):t[qt]=parseInt(e,10)});function FL(e,t){var n,r,s,o=this._eras||fs("en")._eras;for(n=0,r=o.length;n=0)return o[r]}function $L(e,t){var n=e.since<=e.until?1:-1;return t===void 0?te(e.since).year():te(e.since).year()+(t-e.offset)*n}function VL(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;eo&&(t=o),rF.call(this,e,t,n,r,s))}function rF(e,t,n,r,s){var o=ib(e,t,n,r,s),i=xl(o.year,0,o.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}he("Q",0,"Qo","quarter");oe("Q",Z1);qe("Q",function(e,t){t[Hr]=(Oe(e)-1)*3});function sF(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}he("D",["DD",2],"Do","date");oe("D",ot,ea);oe("DD",ot,An);oe("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});qe(["D","DD"],xr);qe("Do",function(e,t){t[xr]=Oe(e.match(ot)[0])});var Nb=ta("Date",!0);he("DDD",["DDDD",3],"DDDo","dayOfYear");oe("DDD",Yd);oe("DDDD",q1);qe(["DDD","DDDD"],function(e,t,n){n._dayOfYear=Oe(e)});function oF(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}he("m",["mm",2],0,"minute");oe("m",ot,Og);oe("mm",ot,An);qe(["m","mm"],er);var iF=ta("Minutes",!1);he("s",["ss",2],0,"second");oe("s",ot,Og);oe("ss",ot,An);qe(["s","ss"],Gr);var aF=ta("Seconds",!1);he("S",0,0,function(){return~~(this.millisecond()/100)});he(0,["SS",2],0,function(){return~~(this.millisecond()/10)});he(0,["SSS",3],0,"millisecond");he(0,["SSSS",4],0,function(){return this.millisecond()*10});he(0,["SSSSS",5],0,function(){return this.millisecond()*100});he(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});he(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});he(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});he(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});oe("S",Yd,Z1);oe("SS",Yd,An);oe("SSS",Yd,q1);var Ms,Rb;for(Ms="SSSS";Ms.length<=9;Ms+="S")oe(Ms,Ji);function lF(e,t){t[yo]=Oe(("0."+e)*1e3)}for(Ms="S";Ms.length<=9;Ms+="S")qe(Ms,lF);Rb=ta("Milliseconds",!1);he("z",0,0,"zoneAbbr");he("zz",0,0,"zoneName");function cF(){return this._isUTC?"UTC":""}function uF(){return this._isUTC?"Coordinated Universal Time":""}var z=Xl.prototype;z.add=nL;z.calendar=cL;z.clone=uL;z.diff=vL;z.endOf=TL;z.format=_L;z.from=SL;z.fromNow=bL;z.to=CL;z.toNow=kL;z.get=wI;z.invalidAt=IL;z.isAfter=dL;z.isBefore=fL;z.isBetween=hL;z.isSame=pL;z.isSameOrAfter=mL;z.isSameOrBefore=gL;z.isValid=OL;z.lang=Sb;z.locale=_b;z.localeData=bb;z.max=O2;z.min=j2;z.parsingFlags=AL;z.set=_I;z.startOf=EL;z.subtract=rL;z.toArray=DL;z.toObject=ML;z.toDate=PL;z.toISOString=xL;z.inspect=wL;typeof Symbol<"u"&&Symbol.for!=null&&(z[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});z.toJSON=jL;z.toString=yL;z.unix=RL;z.valueOf=NL;z.creationData=LL;z.eraName=VL;z.eraNarrow=zL;z.eraAbbr=WL;z.eraYear=YL;z.year=J1;z.isLeapYear=xI;z.weekYear=QL;z.isoWeekYear=XL;z.quarter=z.quarters=sF;z.month=sb;z.daysInMonth=PI;z.week=z.weeks=FI;z.isoWeek=z.isoWeeks=UI;z.weeksInYear=tF;z.weeksInWeekYear=nF;z.isoWeeksInYear=JL;z.isoWeeksInISOWeekYear=eF;z.date=Nb;z.day=z.days=XI;z.weekday=JI;z.isoWeekday=e2;z.dayOfYear=oF;z.hour=z.hours=a2;z.minute=z.minutes=iF;z.second=z.seconds=aF;z.millisecond=z.milliseconds=Rb;z.utcOffset=W2;z.utc=B2;z.local=H2;z.parseZone=G2;z.hasAlignedHourOffset=K2;z.isDST=Z2;z.isLocal=Q2;z.isUtcOffset=X2;z.isUtc=vb;z.isUTC=vb;z.zoneAbbr=cF;z.zoneName=uF;z.dates=Yn("dates accessor is deprecated. Use date instead.",Nb);z.months=Yn("months accessor is deprecated. Use month instead",sb);z.years=Yn("years accessor is deprecated. Use year instead",J1);z.zone=Yn("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Y2);z.isDSTShifted=Yn("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",q2);function dF(e){return st(e*1e3)}function fF(){return st.apply(null,arguments).parseZone()}function Pb(e){return e}var We=Rg.prototype;We.calendar=QA;We.longDateFormat=tI;We.invalidDate=rI;We.ordinal=iI;We.preparse=Pb;We.postformat=Pb;We.relativeTime=lI;We.pastFuture=cI;We.set=ZA;We.eras=FL;We.erasParse=UL;We.erasConvertYear=$L;We.erasAbbrRegex=HL;We.erasNameRegex=BL;We.erasNarrowRegex=GL;We.months=EI;We.monthsShort=TI;We.monthsParse=RI;We.monthsRegex=MI;We.monthsShortRegex=DI;We.week=OI;We.firstDayOfYear=LI;We.firstDayOfWeek=II;We.weekdays=GI;We.weekdaysMin=ZI;We.weekdaysShort=KI;We.weekdaysParse=QI;We.weekdaysRegex=t2;We.weekdaysShortRegex=n2;We.weekdaysMinRegex=r2;We.isPM=o2;We.meridiem=l2;function Qu(e,t,n,r){var s=fs(),o=Mr().set(r,t);return s[n](o,e)}function Db(e,t,n){if(os(e)&&(t=e,e=void 0),e=e||"",t!=null)return Qu(e,t,n,"month");var r,s=[];for(r=0;r<12;r++)s[r]=Qu(e,r,n,"month");return s}function Gg(e,t,n,r){typeof e=="boolean"?(os(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,os(t)&&(n=t,t=void 0),t=t||"");var s=fs(),o=e?s._week.dow:0,i,a=[];if(n!=null)return Qu(t,(n+o)%7,r,"day");for(i=0;i<7;i++)a[i]=Qu(t,(i+o)%7,r,"day");return a}function hF(e,t){return Db(e,t,"months")}function pF(e,t){return Db(e,t,"monthsShort")}function mF(e,t,n){return Gg(e,t,n,"weekdays")}function gF(e,t,n){return Gg(e,t,n,"weekdaysShort")}function vF(e,t,n){return Gg(e,t,n,"weekdaysMin")}zs("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,n=Oe(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});te.lang=Yn("moment.lang is deprecated. Use moment.locale instead.",zs);te.langData=Yn("moment.langData is deprecated. Use moment.localeData instead.",fs);var Ir=Math.abs;function yF(){var e=this._data;return this._milliseconds=Ir(this._milliseconds),this._days=Ir(this._days),this._months=Ir(this._months),e.milliseconds=Ir(e.milliseconds),e.seconds=Ir(e.seconds),e.minutes=Ir(e.minutes),e.hours=Ir(e.hours),e.months=Ir(e.months),e.years=Ir(e.years),this}function Mb(e,t,n,r){var s=hr(t,n);return e._milliseconds+=r*s._milliseconds,e._days+=r*s._days,e._months+=r*s._months,e._bubble()}function xF(e,t){return Mb(this,e,t,1)}function wF(e,t){return Mb(this,e,t,-1)}function Rx(e){return e<0?Math.floor(e):Math.ceil(e)}function _F(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,s,o,i,a,l;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Rx(Np(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,s=Fn(e/1e3),r.seconds=s%60,o=Fn(s/60),r.minutes=o%60,i=Fn(o/60),r.hours=i%24,t+=Fn(i/24),l=Fn(jb(t)),n+=l,t-=Rx(Np(l)),a=Fn(n/12),n%=12,r.days=t,r.months=n,r.years=a,this}function jb(e){return e*4800/146097}function Np(e){return e*146097/4800}function SF(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=Bn(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+jb(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Np(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function hs(e){return function(){return this.as(e)}}var Ob=hs("ms"),bF=hs("s"),CF=hs("m"),kF=hs("h"),EF=hs("d"),TF=hs("w"),NF=hs("M"),RF=hs("Q"),PF=hs("y"),DF=Ob;function MF(){return hr(this)}function jF(e){return e=Bn(e),this.isValid()?this[e+"s"]():NaN}function Vo(e){return function(){return this.isValid()?this._data[e]:NaN}}var OF=Vo("milliseconds"),AF=Vo("seconds"),IF=Vo("minutes"),LF=Vo("hours"),FF=Vo("days"),UF=Vo("months"),$F=Vo("years");function VF(){return Fn(this.days()/7)}var Vr=Math.round,pi={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function zF(e,t,n,r,s){return s.relativeTime(t||1,!!n,e,r)}function WF(e,t,n,r){var s=hr(e).abs(),o=Vr(s.as("s")),i=Vr(s.as("m")),a=Vr(s.as("h")),l=Vr(s.as("d")),c=Vr(s.as("M")),d=Vr(s.as("w")),f=Vr(s.as("y")),p=o<=n.ss&&["s",o]||o0,p[4]=r,zF.apply(null,p)}function YF(e){return e===void 0?Vr:typeof e=="function"?(Vr=e,!0):!1}function BF(e,t){return pi[e]===void 0?!1:t===void 0?pi[e]:(pi[e]=t,e==="s"&&(pi.ss=t-1),!0)}function HF(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=pi,s,o;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},pi,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),s=this.localeData(),o=WF(this,!n,r,s),n&&(o=s.pastFuture(+this,o)),s.postformat(o)}var ch=Math.abs;function Qo(e){return(e>0)-(e<0)||+e}function Xd(){if(!this.isValid())return this.localeData().invalidDate();var e=ch(this._milliseconds)/1e3,t=ch(this._days),n=ch(this._months),r,s,o,i,a=this.asSeconds(),l,c,d,f;return a?(r=Fn(e/60),s=Fn(r/60),e%=60,r%=60,o=Fn(n/12),n%=12,i=e?e.toFixed(3).replace(/\.?0+$/,""):"",l=a<0?"-":"",c=Qo(this._months)!==Qo(a)?"-":"",d=Qo(this._days)!==Qo(a)?"-":"",f=Qo(this._milliseconds)!==Qo(a)?"-":"",l+"P"+(o?c+o+"Y":"")+(n?c+n+"M":"")+(t?d+t+"D":"")+(s||r||e?"T":"")+(s?f+s+"H":"")+(r?f+r+"M":"")+(e?f+i+"S":"")):"P0D"}var Le=qd.prototype;Le.isValid=U2;Le.abs=yF;Le.add=xF;Le.subtract=wF;Le.as=SF;Le.asMilliseconds=Ob;Le.asSeconds=bF;Le.asMinutes=CF;Le.asHours=kF;Le.asDays=EF;Le.asWeeks=TF;Le.asMonths=NF;Le.asQuarters=RF;Le.asYears=PF;Le.valueOf=DF;Le._bubble=_F;Le.clone=MF;Le.get=jF;Le.milliseconds=OF;Le.seconds=AF;Le.minutes=IF;Le.hours=LF;Le.days=FF;Le.weeks=VF;Le.months=UF;Le.years=$F;Le.humanize=HF;Le.toISOString=Xd;Le.toString=Xd;Le.toJSON=Xd;Le.locale=_b;Le.localeData=bb;Le.toIsoString=Yn("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Xd);Le.lang=Sb;he("X",0,0,"unix");he("x",0,0,"valueOf");oe("x",Hd);oe("X",hI);qe("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});qe("x",function(e,t,n){n._d=new Date(Oe(e))});//! moment.js -te.version="2.30.1";GA(st);te.fn=z;te.min=A2;te.max=I2;te.now=L2;te.utc=Mr;te.unix=dF;te.months=hF;te.isDate=Ql;te.locale=zs;te.invalid=zd;te.duration=hr;te.isMoment=cr;te.weekdays=mF;te.parseZone=fF;te.localeData=fs;te.isDuration=ou;te.monthsShort=pF;te.weekdaysMin=vF;te.defineLocale=Ug;te.updateLocale=f2;te.locales=h2;te.weekdaysShort=gF;te.normalizeUnits=Bn;te.relativeTimeRounding=YF;te.relativeTimeThreshold=BF;te.calendarFormat=lL;te.prototype=z;te.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 GF=async()=>await Zt().collection("access").getFullList({sort:"-created",filter:"deleted = null"}),Ab=async e=>e.id?await Zt().collection("access").update(e.id,e):await Zt().collection("access").create(e),KF=async e=>(e.deleted=te.utc().format("YYYY-MM-DD HH:mm:ss"),await Zt().collection("access").update(e.id,e)),ZF=(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(n=>n.id!==t.payload)};case"UPDATE_ACCESS":return{...e,accesses:e.accesses.map(n=>n.id===t.payload.id?t.payload:n)};default:return e}},Ib=h.createContext({}),Jd=()=>h.useContext(Ib),qF=({children:e})=>{const[t,n]=h.useReducer(ZF,{accesses:[]});h.useEffect(()=>{(async()=>{const a=await GF();n({type:"SET_ACCESSES",payload:a})})()},[]);const r=h.useCallback(i=>{n({type:"DELETE_ACCESS",payload:i})},[]),s=h.useCallback(i=>{n({type:"ADD_ACCESS",payload:i})},[]),o=h.useCallback(i=>{n({type:"UPDATE_ACCESS",payload:i})},[]);return u.jsx(Ib.Provider,{value:{config:{accesses:t.accesses},deleteAccess:r,addAccess:s,updateAccess:o},children:e&&e})};function QF(){const e=so(),t=ro();if(!Zt().authStore.isValid||!Zt().authStore.isAdmin)return u.jsx(b_,{to:"/login"});const n=t.pathname,r=o=>(console.log(n),o==n?"bg-muted text-primary":"text-muted-foreground"),s=()=>{Zt().authStore.clear(),e("/login")};return u.jsx(u.Fragment,{children:u.jsx(qF,{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(Fr,{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(Fr,{to:"/",className:ue("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",r("/")),children:[u.jsx(hp,{className:"h-4 w-4"}),"域名列表"]}),u.jsxs(Fr,{to:"/access",className:ue("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",r("/access")),children:[u.jsx(Ky,{className:"h-4 w-4"}),"授权管理"]}),u.jsxs(Fr,{to:"/history",className:ue("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",r("/history")),children:[u.jsx(Hy,{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(A1,{children:[u.jsx(I1,{asChild:!0,children:u.jsxs(Nt,{variant:"outline",size:"icon",className:"shrink-0 md:hidden",children:[u.jsx(YP,{className:"h-5 w-5"}),u.jsx("span",{className:"sr-only",children:"Toggle navigation menu"})]})}),u.jsx(Cg,{side:"left",className:"flex flex-col",children:u.jsxs("nav",{className:"grid gap-2 text-lg font-medium",children:[u.jsxs(Fr,{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(Fr,{to:"/",className:ue("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",r("/")),children:[u.jsx(hp,{className:"h-5 w-5"}),"域名列表"]}),u.jsxs(Fr,{to:"/access",className:ue("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",r("/dns_provider")),children:[u.jsx(Ky,{className:"h-5 w-5"}),"授权管理"]}),u.jsxs(Fr,{to:"/history",className:ue("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",r("/history")),children:[u.jsx(Hy,{className:"h-5 w-5"}),"部署历史"]})]})})]}),u.jsx("div",{className:"w-full flex-1"}),u.jsxs(hA,{children:[u.jsx(pA,{asChild:!0,children:u.jsxs(Nt,{variant:"secondary",size:"icon",className:"rounded-full",children:[u.jsx(VP,{className:"h-5 w-5"}),u.jsx("span",{className:"sr-only",children:"Toggle user menu"})]})}),u.jsxs(p1,{align:"end",children:[u.jsx(g1,{children:"My Account"}),u.jsx(v1,{}),u.jsx(m1,{onClick:s,children:"Logout"})]})]})]}),u.jsx("main",{className:"flex flex-1 flex-col gap-4 p-4 lg:gap-6 lg:p-6",children:u.jsx(C_,{})})]})]})})})}var XF="Separator",Px="horizontal",JF=["horizontal","vertical"],Lb=h.forwardRef((e,t)=>{const{decorative:n,orientation:r=Px,...s}=e,o=e4(r)?r:Px,a=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return u.jsx(_e.div,{"data-orientation":o,...a,...s,ref:t})});Lb.displayName=XF;function e4(e){return JF.includes(e)}var Fb=Lb;const Ft=h.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},s)=>u.jsx(Fb,{ref:s,decorative:n,orientation:t,className:ue("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));Ft.displayName=Fb.displayName;const Ub=({phase:e,phaseSuccess:t})=>{let n=u.jsx(u.Fragment,{children:" "});return e==="check"&&(t?n=u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),u.jsx(Ft,{className:"h-1 grow"}),u.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"获取"}),u.jsx(Ft,{className:"h-1 grow"}),u.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]}):n=u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"text-xs text-nowrap text-red-600",children:"检查 "}),u.jsx(Ft,{className:"h-1 grow"}),u.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"获取"}),u.jsx(Ft,{className:"h-1 grow"}),u.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]})),e==="apply"&&(t?n=u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),u.jsx(Ft,{className:"h-1 grow bg-green-600"}),u.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"获取"}),u.jsx(Ft,{className:"h-1 grow"}),u.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]}):n=u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),u.jsx(Ft,{className:"h-1 grow bg-green-600"}),u.jsx("div",{className:"text-xs text-nowrap text-red-600",children:"获取"}),u.jsx(Ft,{className:"h-1 grow"}),u.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]})),e==="deploy"&&(t?n=u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),u.jsx(Ft,{className:"h-1 grow bg-green-600"}),u.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"获取"}),u.jsx(Ft,{className:"h-1 grow bg-green-600"}),u.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"部署"})]}):n=u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),u.jsx(Ft,{className:"h-1 grow bg-green-600"}),u.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"获取"}),u.jsx(Ft,{className:"h-1 grow bg-green-600"}),u.jsx("div",{className:"text-xs text-nowrap text-red-600",children:"部署"})]})),n},t4=({when:e,children:t,fallback:n})=>e?t:n;var $b="AlertDialog",[n4,FV]=dr($b,[x1]),ps=x1(),Vb=e=>{const{__scopeAlertDialog:t,...n}=e,r=ps(t);return u.jsx(_g,{...r,...n,modal:!0})};Vb.displayName=$b;var r4="AlertDialogTrigger",zb=h.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=ps(n);return u.jsx(Sg,{...s,...r,ref:t})});zb.displayName=r4;var s4="AlertDialogPortal",Wb=e=>{const{__scopeAlertDialog:t,...n}=e,r=ps(t);return u.jsx(bg,{...r,...n})};Wb.displayName=s4;var o4="AlertDialogOverlay",Yb=h.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=ps(n);return u.jsx(Gl,{...s,...r,ref:t})});Yb.displayName=o4;var Ri="AlertDialogContent",[i4,a4]=n4(Ri),Bb=h.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...s}=e,o=ps(n),i=h.useRef(null),a=Ie(t,i),l=h.useRef(null);return u.jsx(CA,{contentName:Ri,titleName:Hb,docsSlug:"alert-dialog",children:u.jsx(i4,{scope:n,cancelRef:l,children:u.jsxs(Kl,{role:"alertdialog",...o,...s,ref:a,onOpenAutoFocus:ee(s.onOpenAutoFocus,c=>{var d;c.preventDefault(),(d=l.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:c=>c.preventDefault(),onInteractOutside:c=>c.preventDefault(),children:[u.jsx(Ym,{children:r}),u.jsx(c4,{contentRef:i})]})})})});Bb.displayName=Ri;var Hb="AlertDialogTitle",Gb=h.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=ps(n);return u.jsx(Zl,{...s,...r,ref:t})});Gb.displayName=Hb;var Kb="AlertDialogDescription",Zb=h.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=ps(n);return u.jsx(ql,{...s,...r,ref:t})});Zb.displayName=Kb;var l4="AlertDialogAction",qb=h.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=ps(n);return u.jsx(Vd,{...s,...r,ref:t})});qb.displayName=l4;var Qb="AlertDialogCancel",Xb=h.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:s}=a4(Qb,n),o=ps(n),i=Ie(t,s);return u.jsx(Vd,{...o,...r,ref:i})});Xb.displayName=Qb;var c4=({contentRef:e})=>{const t=`\`${Ri}\` requires a description for the component to be accessible for screen reader users. - -You can add a description to the \`${Ri}\` by passing a \`${Kb}\` 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 \`${Ri}\`. 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 h.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},u4=Vb,d4=zb,f4=Wb,Jb=Yb,eC=Bb,tC=qb,nC=Xb,rC=Gb,sC=Zb;const h4=u4,p4=d4,m4=f4,oC=h.forwardRef(({className:e,...t},n)=>u.jsx(Jb,{className:ue("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:n}));oC.displayName=Jb.displayName;const iC=h.forwardRef(({className:e,...t},n)=>u.jsxs(m4,{children:[u.jsx(oC,{}),u.jsx(eC,{ref:n,className:ue("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})]}));iC.displayName=eC.displayName;const aC=({className:e,...t})=>u.jsx("div",{className:ue("flex flex-col space-y-2 text-center sm:text-left",e),...t});aC.displayName="AlertDialogHeader";const lC=({className:e,...t})=>u.jsx("div",{className:ue("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});lC.displayName="AlertDialogFooter";const cC=h.forwardRef(({className:e,...t},n)=>u.jsx(rC,{ref:n,className:ue("text-lg font-semibold",e),...t}));cC.displayName=rC.displayName;const uC=h.forwardRef(({className:e,...t},n)=>u.jsx(sC,{ref:n,className:ue("text-sm text-muted-foreground",e),...t}));uC.displayName=sC.displayName;const dC=h.forwardRef(({className:e,...t},n)=>u.jsx(tC,{ref:n,className:ue(Hm(),e),...t}));dC.displayName=tC.displayName;const fC=h.forwardRef(({className:e,...t},n)=>u.jsx(nC,{ref:n,className:ue(Hm({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));fC.displayName=nC.displayName;function hC(e){const t=h.useRef({value:e,previous:e});return h.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Kg="Switch",[g4,UV]=dr(Kg),[v4,y4]=g4(Kg),pC=h.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:s,defaultChecked:o,required:i,disabled:a,value:l="on",onCheckedChange:c,...d}=e,[f,p]=h.useState(null),x=Ie(t,m=>p(m)),y=h.useRef(!1),v=f?!!f.closest("form"):!0,[_=!1,g]=Bs({prop:s,defaultProp:o,onChange:c});return u.jsxs(v4,{scope:n,checked:_,disabled:a,children:[u.jsx(_e.button,{type:"button",role:"switch","aria-checked":_,"aria-required":i,"data-state":vC(_),"data-disabled":a?"":void 0,disabled:a,value:l,...d,ref:x,onClick:ee(e.onClick,m=>{g(w=>!w),v&&(y.current=m.isPropagationStopped(),y.current||m.stopPropagation())})}),v&&u.jsx(x4,{control:f,bubbles:!y.current,name:r,value:l,checked:_,required:i,disabled:a,style:{transform:"translateX(-100%)"}})]})});pC.displayName=Kg;var mC="SwitchThumb",gC=h.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,s=y4(mC,n);return u.jsx(_e.span,{"data-state":vC(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t})});gC.displayName=mC;var x4=e=>{const{control:t,checked:n,bubbles:r=!0,...s}=e,o=h.useRef(null),i=hC(n),a=Q_(t);return h.useEffect(()=>{const l=o.current,c=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(c,"checked").set;if(i!==n&&f){const p=new Event("click",{bubbles:r});f.call(l,n),l.dispatchEvent(p)}},[i,n,r]),u.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:o,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function vC(e){return e?"checked":"unchecked"}var yC=pC,w4=gC;const xC=h.forwardRef(({className:e,...t},n)=>u.jsx(yC,{className:ue("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:n,children:u.jsx(w4,{className:ue("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")})}));xC.displayName=yC.displayName;var _4="VisuallyHidden",tc=h.forwardRef((e,t)=>u.jsx(_e.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}}));tc.displayName=_4;var S4=tc,Zg="ToastProvider",[qg,b4,C4]=Md("Toast"),[wC,$V]=dr("Toast",[C4]),[k4,ef]=wC(Zg),_C=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:o=50,children:i}=e,[a,l]=h.useState(null),[c,d]=h.useState(0),f=h.useRef(!1),p=h.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Zg}\`. Expected non-empty \`string\`.`),u.jsx(qg.Provider,{scope:t,children:u.jsx(k4,{scope:t,label:n,duration:r,swipeDirection:s,swipeThreshold:o,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:h.useCallback(()=>d(x=>x+1),[]),onToastRemove:h.useCallback(()=>d(x=>x-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:p,children:i})})};_C.displayName=Zg;var SC="ToastViewport",E4=["F8"],Rp="toast.viewportPause",Pp="toast.viewportResume",bC=h.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=E4,label:s="Notifications ({hotkey})",...o}=e,i=ef(SC,n),a=b4(n),l=h.useRef(null),c=h.useRef(null),d=h.useRef(null),f=h.useRef(null),p=Ie(t,f,i.onViewportChange),x=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=i.toastCount>0;h.useEffect(()=>{const _=g=>{var w;r.every(b=>g[b]||g.code===b)&&((w=f.current)==null||w.focus())};return document.addEventListener("keydown",_),()=>document.removeEventListener("keydown",_)},[r]),h.useEffect(()=>{const _=l.current,g=f.current;if(y&&_&&g){const m=()=>{if(!i.isClosePausedRef.current){const S=new CustomEvent(Rp);g.dispatchEvent(S),i.isClosePausedRef.current=!0}},w=()=>{if(i.isClosePausedRef.current){const S=new CustomEvent(Pp);g.dispatchEvent(S),i.isClosePausedRef.current=!1}},b=S=>{!_.contains(S.relatedTarget)&&w()},C=()=>{_.contains(document.activeElement)||w()};return _.addEventListener("focusin",m),_.addEventListener("focusout",b),_.addEventListener("pointermove",m),_.addEventListener("pointerleave",C),window.addEventListener("blur",m),window.addEventListener("focus",w),()=>{_.removeEventListener("focusin",m),_.removeEventListener("focusout",b),_.removeEventListener("pointermove",m),_.removeEventListener("pointerleave",C),window.removeEventListener("blur",m),window.removeEventListener("focus",w)}}},[y,i.isClosePausedRef]);const v=h.useCallback(({tabbingDirection:_})=>{const m=a().map(w=>{const b=w.ref.current,C=[b,...U4(b)];return _==="forwards"?C:C.reverse()});return(_==="forwards"?m.reverse():m).flat()},[a]);return h.useEffect(()=>{const _=f.current;if(_){const g=m=>{var C,S,N;const w=m.altKey||m.ctrlKey||m.metaKey;if(m.key==="Tab"&&!w){const R=document.activeElement,F=m.shiftKey;if(m.target===_&&F){(C=c.current)==null||C.focus();return}const j=v({tabbingDirection:F?"backwards":"forwards"}),B=j.findIndex(A=>A===R);uh(j.slice(B+1))?m.preventDefault():F?(S=c.current)==null||S.focus():(N=d.current)==null||N.focus()}};return _.addEventListener("keydown",g),()=>_.removeEventListener("keydown",g)}},[a,v]),u.jsxs(WD,{ref:l,role:"region","aria-label":s.replace("{hotkey}",x),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&u.jsx(Dp,{ref:c,onFocusFromOutsideViewport:()=>{const _=v({tabbingDirection:"forwards"});uh(_)}}),u.jsx(qg.Slot,{scope:n,children:u.jsx(_e.ol,{tabIndex:-1,...o,ref:p})}),y&&u.jsx(Dp,{ref:d,onFocusFromOutsideViewport:()=>{const _=v({tabbingDirection:"backwards"});uh(_)}})]})});bC.displayName=SC;var CC="ToastFocusProxy",Dp=h.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=e,o=ef(CC,n);return u.jsx(tc,{"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))&&r()}})});Dp.displayName=CC;var tf="Toast",T4="toast.swipeStart",N4="toast.swipeMove",R4="toast.swipeCancel",P4="toast.swipeEnd",kC=h.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:o,...i}=e,[a=!0,l]=Bs({prop:r,defaultProp:s,onChange:o});return u.jsx(Dr,{present:n||a,children:u.jsx(j4,{open:a,...i,ref:t,onClose:()=>l(!1),onPause:Xt(e.onPause),onResume:Xt(e.onResume),onSwipeStart:ee(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ee(e.onSwipeMove,c=>{const{x:d,y:f}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:ee(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:ee(e.onSwipeEnd,c=>{const{x:d,y:f}=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",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),l(!1)})})})});kC.displayName=tf;var[D4,M4]=wC(tf,{onClose(){}}),j4=h.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:o,onClose:i,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:p,onSwipeEnd:x,...y}=e,v=ef(tf,n),[_,g]=h.useState(null),m=Ie(t,A=>g(A)),w=h.useRef(null),b=h.useRef(null),C=s||v.duration,S=h.useRef(0),N=h.useRef(C),R=h.useRef(0),{onToastAdd:F,onToastRemove:L}=v,Z=Xt(()=>{var H;(_==null?void 0:_.contains(document.activeElement))&&((H=v.viewport)==null||H.focus()),i()}),j=h.useCallback(A=>{!A||A===1/0||(window.clearTimeout(R.current),S.current=new Date().getTime(),R.current=window.setTimeout(Z,A))},[Z]);h.useEffect(()=>{const A=v.viewport;if(A){const H=()=>{j(N.current),c==null||c()},ne=()=>{const W=new Date().getTime()-S.current;N.current=N.current-W,window.clearTimeout(R.current),l==null||l()};return A.addEventListener(Rp,ne),A.addEventListener(Pp,H),()=>{A.removeEventListener(Rp,ne),A.removeEventListener(Pp,H)}}},[v.viewport,C,l,c,j]),h.useEffect(()=>{o&&!v.isClosePausedRef.current&&j(C)},[o,C,v.isClosePausedRef,j]),h.useEffect(()=>(F(),()=>L()),[F,L]);const B=h.useMemo(()=>_?MC(_):null,[_]);return v.viewport?u.jsxs(u.Fragment,{children:[B&&u.jsx(O4,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:B}),u.jsx(D4,{scope:n,onClose:Z,children:ls.createPortal(u.jsx(qg.ItemSlot,{scope:n,children:u.jsx(zD,{asChild:!0,onEscapeKeyDown:ee(a,()=>{v.isFocusedToastEscapeKeyDownRef.current||Z(),v.isFocusedToastEscapeKeyDownRef.current=!1}),children:u.jsx(_e.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":v.swipeDirection,...y,ref:m,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ee(e.onKeyDown,A=>{A.key==="Escape"&&(a==null||a(A.nativeEvent),A.nativeEvent.defaultPrevented||(v.isFocusedToastEscapeKeyDownRef.current=!0,Z()))}),onPointerDown:ee(e.onPointerDown,A=>{A.button===0&&(w.current={x:A.clientX,y:A.clientY})}),onPointerMove:ee(e.onPointerMove,A=>{if(!w.current)return;const H=A.clientX-w.current.x,ne=A.clientY-w.current.y,W=!!b.current,I=["left","right"].includes(v.swipeDirection),M=["left","up"].includes(v.swipeDirection)?Math.min:Math.max,q=I?M(0,H):0,ae=I?0:M(0,ne),me=A.pointerType==="touch"?10:2,Qe={x:q,y:ae},Pe={originalEvent:A,delta:Qe};W?(b.current=Qe,$c(N4,f,Pe,{discrete:!1})):Dx(Qe,v.swipeDirection,me)?(b.current=Qe,$c(T4,d,Pe,{discrete:!1}),A.target.setPointerCapture(A.pointerId)):(Math.abs(H)>me||Math.abs(ne)>me)&&(w.current=null)}),onPointerUp:ee(e.onPointerUp,A=>{const H=b.current,ne=A.target;if(ne.hasPointerCapture(A.pointerId)&&ne.releasePointerCapture(A.pointerId),b.current=null,w.current=null,H){const W=A.currentTarget,I={originalEvent:A,delta:H};Dx(H,v.swipeDirection,v.swipeThreshold)?$c(P4,x,I,{discrete:!0}):$c(R4,p,I,{discrete:!0}),W.addEventListener("click",M=>M.preventDefault(),{once:!0})}})})})}),v.viewport)})]}):null}),O4=e=>{const{__scopeToast:t,children:n,...r}=e,s=ef(tf,t),[o,i]=h.useState(!1),[a,l]=h.useState(!1);return L4(()=>i(!0)),h.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:u.jsx(Yl,{asChild:!0,children:u.jsx(tc,{...r,children:o&&u.jsxs(u.Fragment,{children:[s.label," ",n]})})})},A4="ToastTitle",EC=h.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return u.jsx(_e.div,{...r,ref:t})});EC.displayName=A4;var I4="ToastDescription",TC=h.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return u.jsx(_e.div,{...r,ref:t})});TC.displayName=I4;var NC="ToastAction",RC=h.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?u.jsx(DC,{altText:n,asChild:!0,children:u.jsx(Qg,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${NC}\`. Expected non-empty \`string\`.`),null)});RC.displayName=NC;var PC="ToastClose",Qg=h.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,s=M4(PC,n);return u.jsx(DC,{asChild:!0,children:u.jsx(_e.button,{type:"button",...r,ref:t,onClick:ee(e.onClick,s.onClose)})})});Qg.displayName=PC;var DC=h.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...s}=e;return u.jsx(_e.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:t})});function MC(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),F4(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",o=r.dataset.radixToastAnnounceExclude==="";if(!s)if(o){const i=r.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...MC(r))}}),t}function $c(e,t,n,{discrete:r}){const s=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?Gm(s,o):s.dispatchEvent(o)}var Dx=(e,t,n=0)=>{const r=Math.abs(e.x),s=Math.abs(e.y),o=r>s;return t==="left"||t==="right"?o&&r>n:!o&&s>n};function L4(e=()=>{}){const t=Xt(e);Jt(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function F4(e){return e.nodeType===e.ELEMENT_NODE}function U4(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function uh(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var $4=_C,jC=bC,OC=kC,AC=EC,IC=TC,LC=RC,FC=Qg;const V4=$4,UC=h.forwardRef(({className:e,...t},n)=>u.jsx(jC,{ref:n,className:ue("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}));UC.displayName=jC.displayName;const z4=zl("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"}}),$C=h.forwardRef(({className:e,variant:t,...n},r)=>u.jsx(OC,{ref:r,className:ue(z4({variant:t}),e),...n}));$C.displayName=OC.displayName;const W4=h.forwardRef(({className:e,...t},n)=>u.jsx(LC,{ref:n,className:ue("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}));W4.displayName=LC.displayName;const VC=h.forwardRef(({className:e,...t},n)=>u.jsx(FC,{ref:n,className:ue("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(Wm,{className:"h-4 w-4"})}));VC.displayName=FC.displayName;const zC=h.forwardRef(({className:e,...t},n)=>u.jsx(AC,{ref:n,className:ue("text-sm font-semibold",e),...t}));zC.displayName=AC.displayName;const WC=h.forwardRef(({className:e,...t},n)=>u.jsx(IC,{ref:n,className:ue("text-sm opacity-90",e),...t}));WC.displayName=IC.displayName;const Y4=1,B4=1e6;let dh=0;function H4(){return dh=(dh+1)%Number.MAX_SAFE_INTEGER,dh.toString()}const fh=new Map,Mx=e=>{if(fh.has(e))return;const t=setTimeout(()=>{fh.delete(e),$a({type:"REMOVE_TOAST",toastId:e})},B4);fh.set(e,t)},G4=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Y4)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?Mx(n):e.toasts.forEach(r=>{Mx(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},au=[];let lu={toasts:[]};function $a(e){lu=G4(lu,e),au.forEach(t=>{t(lu)})}function K4({...e}){const t=H4(),n=s=>$a({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>$a({type:"DISMISS_TOAST",toastId:t});return $a({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function Xg(){const[e,t]=h.useState(lu);return h.useEffect(()=>(au.push(t),()=>{const n=au.indexOf(t);n>-1&&au.splice(n,1)}),[e]),{...e,toast:K4,dismiss:n=>$a({type:"DISMISS_TOAST",toastId:n})}}function YC(){const{toasts:e}=Xg();return u.jsxs(V4,{children:[e.map(function({id:t,title:n,description:r,action:s,...o}){return u.jsxs($C,{...o,children:[u.jsxs("div",{className:"grid gap-1",children:[n&&u.jsx(zC,{children:n}),r&&u.jsx(WC,{children:r})]}),s,u.jsx(VC,{})]},t)}),u.jsx(UC,{})]})}var[nf,VV]=dr("Tooltip",[Xi]),rf=Xi(),BC="TooltipProvider",Z4=700,Mp="tooltip.open",[q4,Jg]=nf(BC),HC=e=>{const{__scopeTooltip:t,delayDuration:n=Z4,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:o}=e,[i,a]=h.useState(!0),l=h.useRef(!1),c=h.useRef(0);return h.useEffect(()=>{const d=c.current;return()=>window.clearTimeout(d)},[]),u.jsx(q4,{scope:t,isOpenDelayed:i,delayDuration:n,onOpen:h.useCallback(()=>{window.clearTimeout(c.current),a(!1)},[]),onClose:h.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:h.useCallback(d=>{l.current=d},[]),disableHoverableContent:s,children:o})};HC.displayName=BC;var sf="Tooltip",[Q4,of]=nf(sf),GC=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:s=!1,onOpenChange:o,disableHoverableContent:i,delayDuration:a}=e,l=Jg(sf,e.__scopeTooltip),c=rf(t),[d,f]=h.useState(null),p=kr(),x=h.useRef(0),y=i??l.disableHoverableContent,v=a??l.delayDuration,_=h.useRef(!1),[g=!1,m]=Bs({prop:r,defaultProp:s,onChange:N=>{N?(l.onOpen(),document.dispatchEvent(new CustomEvent(Mp))):l.onClose(),o==null||o(N)}}),w=h.useMemo(()=>g?_.current?"delayed-open":"instant-open":"closed",[g]),b=h.useCallback(()=>{window.clearTimeout(x.current),_.current=!1,m(!0)},[m]),C=h.useCallback(()=>{window.clearTimeout(x.current),m(!1)},[m]),S=h.useCallback(()=>{window.clearTimeout(x.current),x.current=window.setTimeout(()=>{_.current=!0,m(!0)},v)},[v,m]);return h.useEffect(()=>()=>window.clearTimeout(x.current),[]),u.jsx(sg,{...c,children:u.jsx(Q4,{scope:t,contentId:p,open:g,stateAttribute:w,trigger:d,onTriggerChange:f,onTriggerEnter:h.useCallback(()=>{l.isOpenDelayed?S():b()},[l.isOpenDelayed,S,b]),onTriggerLeave:h.useCallback(()=>{y?C():window.clearTimeout(x.current)},[C,y]),onOpen:b,onClose:C,disableHoverableContent:y,children:n})})};GC.displayName=sf;var jp="TooltipTrigger",KC=h.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=of(jp,n),o=Jg(jp,n),i=rf(n),a=h.useRef(null),l=Ie(t,a,s.onTriggerChange),c=h.useRef(!1),d=h.useRef(!1),f=h.useCallback(()=>c.current=!1,[]);return h.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),u.jsx(og,{asChild:!0,...i,children:u.jsx(_e.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:l,onPointerMove:ee(e.onPointerMove,p=>{p.pointerType!=="touch"&&!d.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:ee(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:ee(e.onPointerDown,()=>{c.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:ee(e.onFocus,()=>{c.current||s.onOpen()}),onBlur:ee(e.onBlur,s.onClose),onClick:ee(e.onClick,s.onClose)})})});KC.displayName=jp;var X4="TooltipPortal",[zV,J4]=nf(X4,{forceMount:void 0}),Ui="TooltipContent",ev=h.forwardRef((e,t)=>{const n=J4(Ui,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...o}=e,i=of(Ui,e.__scopeTooltip);return u.jsx(Dr,{present:r||i.open,children:i.disableHoverableContent?u.jsx(ZC,{side:s,...o,ref:t}):u.jsx(eU,{side:s,...o,ref:t})})}),eU=h.forwardRef((e,t)=>{const n=of(Ui,e.__scopeTooltip),r=Jg(Ui,e.__scopeTooltip),s=h.useRef(null),o=Ie(t,s),[i,a]=h.useState(null),{trigger:l,onClose:c}=n,d=s.current,{onPointerInTransitChange:f}=r,p=h.useCallback(()=>{a(null),f(!1)},[f]),x=h.useCallback((y,v)=>{const _=y.currentTarget,g={x:y.clientX,y:y.clientY},m=sU(g,_.getBoundingClientRect()),w=oU(g,m),b=iU(v.getBoundingClientRect()),C=lU([...w,...b]);a(C),f(!0)},[f]);return h.useEffect(()=>()=>p(),[p]),h.useEffect(()=>{if(l&&d){const y=_=>x(_,d),v=_=>x(_,l);return l.addEventListener("pointerleave",y),d.addEventListener("pointerleave",v),()=>{l.removeEventListener("pointerleave",y),d.removeEventListener("pointerleave",v)}}},[l,d,x,p]),h.useEffect(()=>{if(i){const y=v=>{const _=v.target,g={x:v.clientX,y:v.clientY},m=(l==null?void 0:l.contains(_))||(d==null?void 0:d.contains(_)),w=!aU(g,i);m?p():w&&(p(),c())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[l,d,i,c,p]),u.jsx(ZC,{...e,ref:o})}),[tU,nU]=nf(sf,{isInside:!1}),ZC=h.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:i,...a}=e,l=of(Ui,n),c=rf(n),{onClose:d}=l;return h.useEffect(()=>(document.addEventListener(Mp,d),()=>document.removeEventListener(Mp,d)),[d]),h.useEffect(()=>{if(l.trigger){const f=p=>{const x=p.target;x!=null&&x.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),u.jsx(Zi,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:u.jsxs(ig,{"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(Ym,{children:r}),u.jsx(tU,{scope:n,isInside:!0,children:u.jsx(S4,{id:l.contentId,role:"tooltip",children:s||r})})]})})});ev.displayName=Ui;var qC="TooltipArrow",rU=h.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=rf(n);return nU(qC,n).isInside?null:u.jsx(ag,{...s,...r,ref:t})});rU.displayName=qC;function sU(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,s,o)){case o:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function oU(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function iU(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function aU(e,t){const{x:n,y:r}=e;let s=!1;for(let o=0,i=t.length-1;or!=d>r&&n<(c-a)*(r-l)/(d-l)+a&&(s=!s)}return s}function lU(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),cU(t)}function cU(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=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 n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const o=n[n.length-1],i=n[n.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var uU=GC,dU=KC,QC=ev;const fU=uU,hU=dU,pU=h.forwardRef(({className:e,sideOffset:t=4,...n},r)=>u.jsx(QC,{ref:r,sideOffset:t,className:ue("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),...n}));pU.displayName=QC.displayName;const Sl=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)},mU=e=>Sl(e).split(" ")[0],gU=async()=>Zt().collection("domains").getFullList({sort:"-created",expand:"lastDeployment"}),vU=async e=>await Zt().collection("domains").getOne(e),Op=async e=>e.id?await Zt().collection("domains").update(e.id,e):await Zt().collection("domains").create(e),yU=async e=>await Zt().collection("domains").delete(e),xU=()=>{const e=Xg(),t=so(),n=()=>{t("/edit")},r=d=>{t(`/edit?id=${d}`)},s=d=>{t(`/history?domain=${d}`)},o=async d=>{try{await yU(d),a(i.filter(f=>f.id!==d))}catch(f){console.error("Error deleting domain:",f)}},[i,a]=h.useState([]);h.useEffect(()=>{(async()=>{const f=await gU();a(f)})()},[]);const l=async d=>{const f=i.filter(v=>v.id===d),p=f[0].enabled,x=f[0];x.enabled=!p,await Op(x);const y=i.map(v=>v.id===d?{...v,checked:!p}:v);a(y)},c=async d=>{try{d.rightnow=!0;const f=await Op(d),p=i.map(x=>x.id===f.id?{...f}:x);a(p)}catch{e.toast({title:"执行失败",description:u.jsxs(u.Fragment,{children:["执行失败,请查看",u.jsx(Fr,{to:`/history?domain=${d.id}`,className:"underline text-blue-500",children:"部署日志"}),"查看详情。"]}),variant:"destructive"})}};return u.jsx(u.Fragment,{children:u.jsxs("div",{className:"",children:[u.jsx(YC,{}),u.jsxs("div",{className:"flex justify-between items-center",children:[u.jsx("div",{className:"text-muted-foreground",children:"域名列表"}),u.jsx(Nt,{onClick:n,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 f,p,x,y,v,_;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:[mU(d.expiredAt),"到期"]})]}):"---"})}),u.jsx("div",{className:"sm:w-32 w-full pt-1 sm:pt-0 flex items-center",children:d.lastDeployedAt&&((f=d.expand)!=null&&f.lastDeployment)?u.jsx(u.Fragment,{children:((p=d.expand.lastDeployment)==null?void 0:p.phase)==="deploy"&&((x=d.expand.lastDeployment)!=null&&x.phaseSuccess)?u.jsx(N_,{size:16,className:"text-green-700"}):u.jsx(R_,{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&&((y=d.expand)!=null&&y.lastDeployment)?u.jsx(Ub,{phase:(v=d.expand.lastDeployment)==null?void 0:v.phase,phaseSuccess:(_=d.expand.lastDeployment)==null?void 0:_.phaseSuccess}):"---"}),u.jsx("div",{className:"sm:w-40 pt-1 sm:pt-0 sm:ml-2 flex items-center",children:d.lastDeployedAt?Sl(d.lastDeployedAt):"---"}),u.jsx("div",{className:"sm:w-32 flex items-center",children:u.jsx(HC,{children:u.jsxs(fU,{children:[u.jsx(hU,{children:u.jsx(xC,{checked:d.enabled,onCheckedChange:()=>{l(d.id)}})}),u.jsx(ev,{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(Nt,{variant:"link",className:"p-0",onClick:()=>s(d.id),children:"部署历史"}),u.jsxs(t4,{when:!!d.enabled,children:[u.jsx(Ft,{orientation:"vertical",className:"h-4 mx-2"}),u.jsx(Nt,{variant:"link",className:"p-0",onClick:()=>c(d),children:"立即执行"})]}),!d.enabled&&u.jsxs(u.Fragment,{children:[u.jsx(Ft,{orientation:"vertical",className:"h-4 mx-2"}),u.jsxs(h4,{children:[u.jsx(p4,{asChild:!0,children:u.jsx(Nt,{variant:"link",className:"p-0",children:"删除"})}),u.jsxs(iC,{children:[u.jsxs(aC,{children:[u.jsx(cC,{children:"删除域名"}),u.jsx(uC,{children:"确定要删除域名吗?"})]}),u.jsxs(lC,{children:[u.jsx(fC,{children:"取消"}),u.jsx(dC,{onClick:()=>{o(d.id)},children:"确认"})]})]})]}),u.jsx(Ft,{orientation:"vertical",className:"h-4 mx-2"}),u.jsx(Nt,{variant:"link",className:"p-0",onClick:()=>r(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(hp,{size:40,className:"text-primary"})}),u.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:"请添加域名开始部署证书吧。"}),u.jsx(Nt,{onClick:n,className:"mt-3",children:"添加域名"})]})})]})})},gn=h.forwardRef(({className:e,type:t,...n},r)=>u.jsx("input",{type:t,className:ue("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:r,...n}));gn.displayName="Input";var nc=e=>e.type==="checkbox",mi=e=>e instanceof Date,on=e=>e==null;const XC=e=>typeof e=="object";var Dt=e=>!on(e)&&!Array.isArray(e)&&XC(e)&&!mi(e),JC=e=>Dt(e)&&e.target?nc(e.target)?e.target.checked:e.target.value:e,wU=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,ek=(e,t)=>e.has(wU(t)),_U=e=>{const t=e.constructor&&e.constructor.prototype;return Dt(t)&&t.hasOwnProperty("isPrototypeOf")},tv=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function pn(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(tv&&(e instanceof Blob||e instanceof FileList))&&(n||Dt(e)))if(t=n?[]:{},!n&&!_U(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=pn(e[r]));else return e;return t}var af=e=>Array.isArray(e)?e.filter(Boolean):[],xt=e=>e===void 0,G=(e,t,n)=>{if(!t||!Dt(e))return n;const r=af(t.split(/[,[\].]+?/)).reduce((s,o)=>on(s)?s:s[o],e);return xt(r)||r===e?xt(e[t])?n:e[t]:r},wr=e=>typeof e=="boolean",nv=e=>/^\w*$/.test(e),tk=e=>af(e.replace(/["|']|\]/g,"").split(/\.|\[/)),He=(e,t,n)=>{let r=-1;const s=nv(t)?[t]:tk(t),o=s.length,i=o-1;for(;++rje.useContext(nk),SU=e=>{const{children:t,...n}=e;return je.createElement(nk.Provider,{value:n},t)};var rk=(e,t,n,r=!0)=>{const s={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(s,o,{get:()=>{const i=o;return t._proxyFormState[i]!==Jn.all&&(t._proxyFormState[i]=!r||Jn.all),n&&(n[i]=!0),e[i]}});return s},bn=e=>Dt(e)&&!Object.keys(e).length,sk=(e,t,n,r)=>{n(e);const{name:s,...o}=e;return bn(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(i=>t[i]===(!r||Jn.all))},Va=e=>Array.isArray(e)?e:[e],ok=(e,t,n)=>!e||!t||e===t||Va(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function rv(e){const t=je.useRef(e);t.current=e,je.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function bU(e){const t=lf(),{control:n=t.control,disabled:r,name:s,exact:o}=e||{},[i,a]=je.useState(n._formState),l=je.useRef(!0),c=je.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=je.useRef(s);return d.current=s,rv({disabled:r,next:f=>l.current&&ok(d.current,f.name,o)&&sk(f,c.current,n._updateFormState)&&a({...n._formState,...f}),subject:n._subjects.state}),je.useEffect(()=>(l.current=!0,c.current.isValid&&n._updateValid(!0),()=>{l.current=!1}),[n]),rk(i,n,c.current,!1)}var Sr=e=>typeof e=="string",ik=(e,t,n,r,s)=>Sr(e)?(r&&t.watch.add(e),G(n,e,s)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),G(n,o))):(r&&(t.watchAll=!0),n);function CU(e){const t=lf(),{control:n=t.control,name:r,defaultValue:s,disabled:o,exact:i}=e||{},a=je.useRef(r);a.current=r,rv({disabled:o,subject:n._subjects.values,next:d=>{ok(a.current,d.name,i)&&c(pn(ik(a.current,n._names,d.values||n._formValues,!1,s)))}});const[l,c]=je.useState(n._getWatch(r,s));return je.useEffect(()=>n._removeUnmounted()),l}function kU(e){const t=lf(),{name:n,disabled:r,control:s=t.control,shouldUnregister:o}=e,i=ek(s._names.array,n),a=CU({control:s,name:n,defaultValue:G(s._formValues,n,G(s._defaultValues,n,e.defaultValue)),exact:!0}),l=bU({control:s,name:n}),c=je.useRef(s.register(n,{...e.rules,value:a,...wr(e.disabled)?{disabled:e.disabled}:{}}));return je.useEffect(()=>{const d=s._options.shouldUnregister||o,f=(p,x)=>{const y=G(s._fields,p);y&&y._f&&(y._f.mount=x)};if(f(n,!0),d){const p=pn(G(s._options.defaultValues,n));He(s._defaultValues,n,p),xt(G(s._formValues,n))&&He(s._formValues,n,p)}return()=>{(i?d&&!s._state.action:d)?s.unregister(n):f(n,!1)}},[n,s,i,o]),je.useEffect(()=>{G(s._fields,n)&&s._updateDisabledField({disabled:r,fields:s._fields,name:n,value:G(s._fields,n)._f.value})},[r,n,s]),{field:{name:n,value:a,...wr(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:je.useCallback(d=>c.current.onChange({target:{value:JC(d),name:n},type:Xu.CHANGE}),[n]),onBlur:je.useCallback(()=>c.current.onBlur({target:{value:G(s._formValues,n),name:n},type:Xu.BLUR}),[n,s]),ref:d=>{const f=G(s._fields,n);f&&d&&(f._f.ref={focus:()=>d.focus(),select:()=>d.select(),setCustomValidity:p=>d.setCustomValidity(p),reportValidity:()=>d.reportValidity()})}},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!G(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!G(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!G(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!G(l.validatingFields,n)},error:{enumerable:!0,get:()=>G(l.errors,n)}})}}const EU=e=>e.render(kU(e));var ak=(e,t,n,r,s)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:s||!0}}:{},jx=e=>({isOnSubmit:!e||e===Jn.onSubmit,isOnBlur:e===Jn.onBlur,isOnChange:e===Jn.onChange,isOnAll:e===Jn.all,isOnTouch:e===Jn.onTouched}),Ox=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const za=(e,t,n,r)=>{for(const s of n||Object.keys(e)){const o=G(e,s);if(o){const{_f:i,...a}=o;if(i){if(i.refs&&i.refs[0]&&t(i.refs[0],s)&&!r)break;if(i.ref&&t(i.ref,i.name)&&!r)break;za(a,t)}else Dt(a)&&za(a,t)}}};var TU=(e,t,n)=>{const r=Va(G(e,n));return He(r,"root",t[n]),He(e,n,r),e},sv=e=>e.type==="file",js=e=>typeof e=="function",Ju=e=>{if(!tv)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},cu=e=>Sr(e),ov=e=>e.type==="radio",ed=e=>e instanceof RegExp;const Ax={value:!1,isValid:!1},Ix={value:!0,isValid:!0};var lk=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!xt(e[0].attributes.value)?xt(e[0].value)||e[0].value===""?Ix:{value:e[0].value,isValid:!0}:Ix:Ax}return Ax};const Lx={isValid:!1,value:null};var ck=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,Lx):Lx;function Fx(e,t,n="validate"){if(cu(e)||Array.isArray(e)&&e.every(cu)||wr(e)&&!e)return{type:n,message:cu(e)?e:"",ref:t}}var Xo=e=>Dt(e)&&!ed(e)?e:{value:e,message:""},Ux=async(e,t,n,r,s)=>{const{ref:o,refs:i,required:a,maxLength:l,minLength:c,min:d,max:f,pattern:p,validate:x,name:y,valueAsNumber:v,mount:_,disabled:g}=e._f,m=G(t,y);if(!_||g)return{};const w=i?i[0]:o,b=j=>{r&&w.reportValidity&&(w.setCustomValidity(wr(j)?"":j||""),w.reportValidity())},C={},S=ov(o),N=nc(o),R=S||N,F=(v||sv(o))&&xt(o.value)&&xt(m)||Ju(o)&&o.value===""||m===""||Array.isArray(m)&&!m.length,L=ak.bind(null,y,n,C),Z=(j,B,A,H=Lr.maxLength,ne=Lr.minLength)=>{const W=j?B:A;C[y]={type:j?H:ne,message:W,ref:o,...L(j?H:ne,W)}};if(s?!Array.isArray(m)||!m.length:a&&(!R&&(F||on(m))||wr(m)&&!m||N&&!lk(i).isValid||S&&!ck(i).isValid)){const{value:j,message:B}=cu(a)?{value:!!a,message:a}:Xo(a);if(j&&(C[y]={type:Lr.required,message:B,ref:w,...L(Lr.required,B)},!n))return b(B),C}if(!F&&(!on(d)||!on(f))){let j,B;const A=Xo(f),H=Xo(d);if(!on(m)&&!isNaN(m)){const ne=o.valueAsNumber||m&&+m;on(A.value)||(j=ne>A.value),on(H.value)||(B=nenew Date(new Date().toDateString()+" "+q),I=o.type=="time",M=o.type=="week";Sr(A.value)&&m&&(j=I?W(m)>W(A.value):M?m>A.value:ne>new Date(A.value)),Sr(H.value)&&m&&(B=I?W(m)+j.value,H=!on(B.value)&&m.length<+B.value;if((A||H)&&(Z(A,j.message,B.message),!n))return b(C[y].message),C}if(p&&!F&&Sr(m)){const{value:j,message:B}=Xo(p);if(ed(j)&&!m.match(j)&&(C[y]={type:Lr.pattern,message:B,ref:o,...L(Lr.pattern,B)},!n))return b(B),C}if(x){if(js(x)){const j=await x(m,t),B=Fx(j,w);if(B&&(C[y]={...B,...L(Lr.validate,B.message)},!n))return b(B.message),C}else if(Dt(x)){let j={};for(const B in x){if(!bn(j)&&!n)break;const A=Fx(await x[B](m,t),w,B);A&&(j={...A,...L(B,A.message)},b(A.message),n&&(C[y]=j))}if(!bn(j)&&(C[y]={ref:w,...j},!n))return C}}return b(!0),C};function NU(e,t){const n=t.slice(0,-1).length;let r=0;for(;r{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=[]}}},td=e=>on(e)||!XC(e);function xo(e,t){if(td(e)||td(t))return e===t;if(mi(e)&&mi(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const s of n){const o=e[s];if(!r.includes(s))return!1;if(s!=="ref"){const i=t[s];if(mi(o)&&mi(i)||Dt(o)&&Dt(i)||Array.isArray(o)&&Array.isArray(i)?!xo(o,i):o!==i)return!1}}return!0}var uk=e=>e.type==="select-multiple",PU=e=>ov(e)||nc(e),ph=e=>Ju(e)&&e.isConnected,dk=e=>{for(const t in e)if(js(e[t]))return!0;return!1};function nd(e,t={}){const n=Array.isArray(e);if(Dt(e)||n)for(const r in e)Array.isArray(e[r])||Dt(e[r])&&!dk(e[r])?(t[r]=Array.isArray(e[r])?[]:{},nd(e[r],t[r])):on(e[r])||(t[r]=!0);return t}function fk(e,t,n){const r=Array.isArray(e);if(Dt(e)||r)for(const s in e)Array.isArray(e[s])||Dt(e[s])&&!dk(e[s])?xt(t)||td(n[s])?n[s]=Array.isArray(e[s])?nd(e[s],[]):{...nd(e[s])}:fk(e[s],on(t)?{}:t[s],n[s]):n[s]=!xo(e[s],t[s]);return n}var Vc=(e,t)=>fk(e,t,nd(t)),hk=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>xt(e)?e:t?e===""?NaN:e&&+e:n&&Sr(e)?new Date(e):r?r(e):e;function mh(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return sv(t)?t.files:ov(t)?ck(e.refs).value:uk(t)?[...t.selectedOptions].map(({value:n})=>n):nc(t)?lk(e.refs).value:hk(xt(t.value)?e.ref.value:t.value,e)}var DU=(e,t,n,r)=>{const s={};for(const o of e){const i=G(t,o);i&&He(s,o,i._f)}return{criteriaMode:n,names:[...e],fields:s,shouldUseNativeValidation:r}},wa=e=>xt(e)?e:ed(e)?e.source:Dt(e)?ed(e.value)?e.value.source:e.value:e,MU=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function $x(e,t,n){const r=G(e,n);if(r||nv(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const o=s.join("."),i=G(t,o),a=G(e,o);if(i&&!Array.isArray(i)&&n!==o)return{name:n};if(a&&a.type)return{name:o,error:a};s.pop()}return{name:n}}var jU=(e,t,n,r,s)=>s.isOnAll?!1:!n&&s.isOnTouch?!(t||e):(n?r.isOnBlur:s.isOnBlur)?!e:(n?r.isOnChange:s.isOnChange)?e:!0,OU=(e,t)=>!af(G(e,t)).length&&Et(e,t);const AU={mode:Jn.onSubmit,reValidateMode:Jn.onChange,shouldFocusError:!0};function IU(e={}){let t={...AU,...e},n={submitCount:0,isDirty:!1,isLoading:js(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},s=Dt(t.defaultValues)||Dt(t.values)?pn(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:pn(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 d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:hh(),array:hh(),state:hh()},p=jx(t.mode),x=jx(t.reValidateMode),y=t.criteriaMode===Jn.all,v=k=>P=>{clearTimeout(c),c=setTimeout(k,P)},_=async k=>{if(d.isValid||k){const P=t.resolver?bn((await R()).errors):await L(r,!0);P!==n.isValid&&f.state.next({isValid:P})}},g=(k,P)=>{(d.isValidating||d.validatingFields)&&((k||Array.from(a.mount)).forEach(O=>{O&&(P?He(n.validatingFields,O,P):Et(n.validatingFields,O))}),f.state.next({validatingFields:n.validatingFields,isValidating:!bn(n.validatingFields)}))},m=(k,P=[],O,X,Q=!0,Y=!0)=>{if(X&&O){if(i.action=!0,Y&&Array.isArray(G(r,k))){const ce=O(G(r,k),X.argA,X.argB);Q&&He(r,k,ce)}if(Y&&Array.isArray(G(n.errors,k))){const ce=O(G(n.errors,k),X.argA,X.argB);Q&&He(n.errors,k,ce),OU(n.errors,k)}if(d.touchedFields&&Y&&Array.isArray(G(n.touchedFields,k))){const ce=O(G(n.touchedFields,k),X.argA,X.argB);Q&&He(n.touchedFields,k,ce)}d.dirtyFields&&(n.dirtyFields=Vc(s,o)),f.state.next({name:k,isDirty:j(k,P),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else He(o,k,P)},w=(k,P)=>{He(n.errors,k,P),f.state.next({errors:n.errors})},b=k=>{n.errors=k,f.state.next({errors:n.errors,isValid:!1})},C=(k,P,O,X)=>{const Q=G(r,k);if(Q){const Y=G(o,k,xt(O)?G(s,k):O);xt(Y)||X&&X.defaultChecked||P?He(o,k,P?Y:mh(Q._f)):H(k,Y),i.mount&&_()}},S=(k,P,O,X,Q)=>{let Y=!1,ce=!1;const Me={name:k},dt=!!(G(r,k)&&G(r,k)._f&&G(r,k)._f.disabled);if(!O||X){d.isDirty&&(ce=n.isDirty,n.isDirty=Me.isDirty=j(),Y=ce!==Me.isDirty);const At=dt||xo(G(s,k),P);ce=!!(!dt&&G(n.dirtyFields,k)),At||dt?Et(n.dirtyFields,k):He(n.dirtyFields,k,!0),Me.dirtyFields=n.dirtyFields,Y=Y||d.dirtyFields&&ce!==!At}if(O){const At=G(n.touchedFields,k);At||(He(n.touchedFields,k,O),Me.touchedFields=n.touchedFields,Y=Y||d.touchedFields&&At!==O)}return Y&&Q&&f.state.next(Me),Y?Me:{}},N=(k,P,O,X)=>{const Q=G(n.errors,k),Y=d.isValid&&wr(P)&&n.isValid!==P;if(e.delayError&&O?(l=v(()=>w(k,O)),l(e.delayError)):(clearTimeout(c),l=null,O?He(n.errors,k,O):Et(n.errors,k)),(O?!xo(Q,O):Q)||!bn(X)||Y){const ce={...X,...Y&&wr(P)?{isValid:P}:{},errors:n.errors,name:k};n={...n,...ce},f.state.next(ce)}},R=async k=>{g(k,!0);const P=await t.resolver(o,t.context,DU(k||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return g(k),P},F=async k=>{const{errors:P}=await R(k);if(k)for(const O of k){const X=G(P,O);X?He(n.errors,O,X):Et(n.errors,O)}else n.errors=P;return P},L=async(k,P,O={valid:!0})=>{for(const X in k){const Q=k[X];if(Q){const{_f:Y,...ce}=Q;if(Y){const Me=a.array.has(Y.name);g([X],!0);const dt=await Ux(Q,o,y,t.shouldUseNativeValidation&&!P,Me);if(g([X]),dt[Y.name]&&(O.valid=!1,P))break;!P&&(G(dt,Y.name)?Me?TU(n.errors,dt,Y.name):He(n.errors,Y.name,dt[Y.name]):Et(n.errors,Y.name))}ce&&await L(ce,P,O)}}return O.valid},Z=()=>{for(const k of a.unMount){const P=G(r,k);P&&(P._f.refs?P._f.refs.every(O=>!ph(O)):!ph(P._f.ref))&&Fe(k)}a.unMount=new Set},j=(k,P)=>(k&&P&&He(o,k,P),!xo(ae(),s)),B=(k,P,O)=>ik(k,a,{...i.mount?o:xt(P)?s:Sr(k)?{[k]:P}:P},O,P),A=k=>af(G(i.mount?o:s,k,e.shouldUnregister?G(s,k,[]):[])),H=(k,P,O={})=>{const X=G(r,k);let Q=P;if(X){const Y=X._f;Y&&(!Y.disabled&&He(o,k,hk(P,Y)),Q=Ju(Y.ref)&&on(P)?"":P,uk(Y.ref)?[...Y.ref.options].forEach(ce=>ce.selected=Q.includes(ce.value)):Y.refs?nc(Y.ref)?Y.refs.length>1?Y.refs.forEach(ce=>(!ce.defaultChecked||!ce.disabled)&&(ce.checked=Array.isArray(Q)?!!Q.find(Me=>Me===ce.value):Q===ce.value)):Y.refs[0]&&(Y.refs[0].checked=!!Q):Y.refs.forEach(ce=>ce.checked=ce.value===Q):sv(Y.ref)?Y.ref.value="":(Y.ref.value=Q,Y.ref.type||f.values.next({name:k,values:{...o}})))}(O.shouldDirty||O.shouldTouch)&&S(k,Q,O.shouldTouch,O.shouldDirty,!0),O.shouldValidate&&q(k)},ne=(k,P,O)=>{for(const X in P){const Q=P[X],Y=`${k}.${X}`,ce=G(r,Y);(a.array.has(k)||!td(Q)||ce&&!ce._f)&&!mi(Q)?ne(Y,Q,O):H(Y,Q,O)}},W=(k,P,O={})=>{const X=G(r,k),Q=a.array.has(k),Y=pn(P);He(o,k,Y),Q?(f.array.next({name:k,values:{...o}}),(d.isDirty||d.dirtyFields)&&O.shouldDirty&&f.state.next({name:k,dirtyFields:Vc(s,o),isDirty:j(k,Y)})):X&&!X._f&&!on(Y)?ne(k,Y,O):H(k,Y,O),Ox(k,a)&&f.state.next({...n}),f.values.next({name:i.mount?k:void 0,values:{...o}})},I=async k=>{i.mount=!0;const P=k.target;let O=P.name,X=!0;const Q=G(r,O),Y=()=>P.type?mh(Q._f):JC(k),ce=Me=>{X=Number.isNaN(Me)||Me===G(o,O,Me)};if(Q){let Me,dt;const At=Y(),nn=k.type===Xu.BLUR||k.type===Xu.FOCUS_OUT,Hn=!MU(Q._f)&&!t.resolver&&!G(n.errors,O)&&!Q._f.deps||jU(nn,G(n.touchedFields,O),n.isSubmitted,x,p),zo=Ox(O,a,nn);He(o,O,At),nn?(Q._f.onBlur&&Q._f.onBlur(k),l&&l(0)):Q._f.onChange&&Q._f.onChange(k);const vs=S(O,At,nn,!1),vf=!bn(vs)||zo;if(!nn&&f.values.next({name:O,type:k.type,values:{...o}}),Hn)return d.isValid&&_(),vf&&f.state.next({name:O,...zo?{}:vs});if(!nn&&zo&&f.state.next({...n}),t.resolver){const{errors:Gn}=await R([O]);if(ce(At),X){const oc=$x(n.errors,r,O),ra=$x(Gn,r,oc.name||O);Me=ra.error,O=ra.name,dt=bn(Gn)}}else g([O],!0),Me=(await Ux(Q,o,y,t.shouldUseNativeValidation))[O],g([O]),ce(At),X&&(Me?dt=!1:d.isValid&&(dt=await L(r,!0)));X&&(Q._f.deps&&q(Q._f.deps),N(O,dt,Me,vs))}},M=(k,P)=>{if(G(n.errors,P)&&k.focus)return k.focus(),1},q=async(k,P={})=>{let O,X;const Q=Va(k);if(t.resolver){const Y=await F(xt(k)?k:Q);O=bn(Y),X=k?!Q.some(ce=>G(Y,ce)):O}else k?(X=(await Promise.all(Q.map(async Y=>{const ce=G(r,Y);return await L(ce&&ce._f?{[Y]:ce}:ce)}))).every(Boolean),!(!X&&!n.isValid)&&_()):X=O=await L(r);return f.state.next({...!Sr(k)||d.isValid&&O!==n.isValid?{}:{name:k},...t.resolver||!k?{isValid:O}:{},errors:n.errors}),P.shouldFocus&&!X&&za(r,M,k?Q:a.mount),X},ae=k=>{const P={...i.mount?o:s};return xt(k)?P:Sr(k)?G(P,k):k.map(O=>G(P,O))},me=(k,P)=>({invalid:!!G((P||n).errors,k),isDirty:!!G((P||n).dirtyFields,k),error:G((P||n).errors,k),isValidating:!!G(n.validatingFields,k),isTouched:!!G((P||n).touchedFields,k)}),Qe=k=>{k&&Va(k).forEach(P=>Et(n.errors,P)),f.state.next({errors:k?n.errors:{}})},Pe=(k,P,O)=>{const X=(G(r,k,{_f:{}})._f||{}).ref,Q=G(n.errors,k)||{},{ref:Y,message:ce,type:Me,...dt}=Q;He(n.errors,k,{...dt,...P,ref:X}),f.state.next({name:k,errors:n.errors,isValid:!1}),O&&O.shouldFocus&&X&&X.focus&&X.focus()},ct=(k,P)=>js(k)?f.values.subscribe({next:O=>k(B(void 0,P),O)}):B(k,P,!0),Fe=(k,P={})=>{for(const O of k?Va(k):a.mount)a.mount.delete(O),a.array.delete(O),P.keepValue||(Et(r,O),Et(o,O)),!P.keepError&&Et(n.errors,O),!P.keepDirty&&Et(n.dirtyFields,O),!P.keepTouched&&Et(n.touchedFields,O),!P.keepIsValidating&&Et(n.validatingFields,O),!t.shouldUnregister&&!P.keepDefaultValue&&Et(s,O);f.values.next({values:{...o}}),f.state.next({...n,...P.keepDirty?{isDirty:j()}:{}}),!P.keepIsValid&&_()},le=({disabled:k,name:P,field:O,fields:X,value:Q})=>{if(wr(k)&&i.mount||k){const Y=k?void 0:xt(Q)?mh(O?O._f:G(X,P)._f):Q;He(o,P,Y),S(P,Y,!1,!1,!0)}},De=(k,P={})=>{let O=G(r,k);const X=wr(P.disabled);return He(r,k,{...O||{},_f:{...O&&O._f?O._f:{ref:{name:k}},name:k,mount:!0,...P}}),a.mount.add(k),O?le({field:O,disabled:P.disabled,name:k,value:P.value}):C(k,!0,P.value),{...X?{disabled:P.disabled}:{},...t.progressive?{required:!!P.required,min:wa(P.min),max:wa(P.max),minLength:wa(P.minLength),maxLength:wa(P.maxLength),pattern:wa(P.pattern)}:{},name:k,onChange:I,onBlur:I,ref:Q=>{if(Q){De(k,P),O=G(r,k);const Y=xt(Q.value)&&Q.querySelectorAll&&Q.querySelectorAll("input,select,textarea")[0]||Q,ce=PU(Y),Me=O._f.refs||[];if(ce?Me.find(dt=>dt===Y):Y===O._f.ref)return;He(r,k,{_f:{...O._f,...ce?{refs:[...Me.filter(ph),Y,...Array.isArray(G(s,k))?[{}]:[]],ref:{type:Y.type,name:k}}:{ref:Y}}}),C(k,!1,void 0,Y)}else O=G(r,k,{}),O._f&&(O._f.mount=!1),(t.shouldUnregister||P.shouldUnregister)&&!(ek(a.array,k)&&i.action)&&a.unMount.add(k)}}},Ye=()=>t.shouldFocusError&&za(r,M,a.mount),Ue=k=>{wr(k)&&(f.state.next({disabled:k}),za(r,(P,O)=>{const X=G(r,O);X&&(P.disabled=X._f.disabled||k,Array.isArray(X._f.refs)&&X._f.refs.forEach(Q=>{Q.disabled=X._f.disabled||k}))},0,!1))},$e=(k,P)=>async O=>{let X;O&&(O.preventDefault&&O.preventDefault(),O.persist&&O.persist());let Q=pn(o);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:Y,values:ce}=await R();n.errors=Y,Q=ce}else await L(r);if(Et(n.errors,"root"),bn(n.errors)){f.state.next({errors:{}});try{await k(Q,O)}catch(Y){X=Y}}else P&&await P({...n.errors},O),Ye(),setTimeout(Ye);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:bn(n.errors)&&!X,submitCount:n.submitCount+1,errors:n.errors}),X)throw X},we=(k,P={})=>{G(r,k)&&(xt(P.defaultValue)?W(k,pn(G(s,k))):(W(k,P.defaultValue),He(s,k,pn(P.defaultValue))),P.keepTouched||Et(n.touchedFields,k),P.keepDirty||(Et(n.dirtyFields,k),n.isDirty=P.defaultValue?j(k,pn(G(s,k))):j()),P.keepError||(Et(n.errors,k),d.isValid&&_()),f.state.next({...n}))},ut=(k,P={})=>{const O=k?pn(k):s,X=pn(O),Q=bn(k),Y=Q?s:X;if(P.keepDefaultValues||(s=O),!P.keepValues){if(P.keepDirtyValues)for(const ce of a.mount)G(n.dirtyFields,ce)?He(Y,ce,G(o,ce)):W(ce,G(Y,ce));else{if(tv&&xt(k))for(const ce of a.mount){const Me=G(r,ce);if(Me&&Me._f){const dt=Array.isArray(Me._f.refs)?Me._f.refs[0]:Me._f.ref;if(Ju(dt)){const At=dt.closest("form");if(At){At.reset();break}}}}r={}}o=e.shouldUnregister?P.keepDefaultValues?pn(s):{}:pn(Y),f.array.next({values:{...Y}}),f.values.next({values:{...Y}})}a={mount:P.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!d.isValid||!!P.keepIsValid||!!P.keepDirtyValues,i.watch=!!e.shouldUnregister,f.state.next({submitCount:P.keepSubmitCount?n.submitCount:0,isDirty:Q?!1:P.keepDirty?n.isDirty:!!(P.keepDefaultValues&&!xo(k,s)),isSubmitted:P.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:Q?{}:P.keepDirtyValues?P.keepDefaultValues&&o?Vc(s,o):n.dirtyFields:P.keepDefaultValues&&k?Vc(s,k):P.keepDirty?n.dirtyFields:{},touchedFields:P.keepTouched?n.touchedFields:{},errors:P.keepErrors?n.errors:{},isSubmitSuccessful:P.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Yt=(k,P)=>ut(js(k)?k(o):k,P);return{control:{register:De,unregister:Fe,getFieldState:me,handleSubmit:$e,setError:Pe,_executeSchema:R,_getWatch:B,_getDirty:j,_updateValid:_,_removeUnmounted:Z,_updateFieldArray:m,_updateDisabledField:le,_getFieldArray:A,_reset:ut,_resetDefaultValues:()=>js(t.defaultValues)&&t.defaultValues().then(k=>{Yt(k,t.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:k=>{n={...n,...k}},_disableForm:Ue,_subjects:f,_proxyFormState:d,_setErrors:b,get _fields(){return r},get _formValues(){return o},get _state(){return i},set _state(k){i=k},get _defaultValues(){return s},get _names(){return a},set _names(k){a=k},get _formState(){return n},set _formState(k){n=k},get _options(){return t},set _options(k){t={...t,...k}}},trigger:q,register:De,handleSubmit:$e,watch:ct,setValue:W,getValues:ae,reset:Yt,resetField:we,clearErrors:Qe,unregister:Fe,setError:Pe,setFocus:(k,P={})=>{const O=G(r,k),X=O&&O._f;if(X){const Q=X.refs?X.refs[0]:X.ref;Q.focus&&(Q.focus(),P.shouldSelect&&Q.select())}},getFieldState:me}}function cf(e={}){const t=je.useRef(),n=je.useRef(),[r,s]=je.useState({isDirty:!1,isValidating:!1,isLoading:js(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:js(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...IU(e),formState:r});const o=t.current.control;return o._options=e,rv({subject:o._subjects.state,next:i=>{sk(i,o._proxyFormState,o._updateFormState,!0)&&s({...o._formState})}}),je.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),je.useEffect(()=>{if(o._proxyFormState.isDirty){const i=o._getDirty();i!==r.isDirty&&o._subjects.state.next({isDirty:i})}},[o,r.isDirty]),je.useEffect(()=>{e.values&&!xo(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,s(i=>({...i}))):o._resetDefaultValues()},[e.values,o]),je.useEffect(()=>{e.errors&&o._setErrors(e.errors)},[e.errors,o]),je.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()}),je.useEffect(()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})},[e.shouldUnregister,o]),t.current.formState=rk(r,o),t.current}const Vx=(e,t,n)=>{if(e&&"reportValidity"in e){const r=G(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},pk=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?Vx(r.ref,n,e):r.refs&&r.refs.forEach(s=>Vx(s,n,e))}},LU=(e,t)=>{t.shouldUseNativeValidation&&pk(e,t);const n={};for(const r in e){const s=G(t.fields,r),o=Object.assign(e[r]||{},{ref:s&&s.ref});if(FU(t.names||Object.keys(e),r)){const i=Object.assign({},G(n,r));He(i,"root",o),He(n,r,i)}else He(n,r,o)}return n},FU=(e,t)=>e.some(n=>n.startsWith(t+"."));var UU=function(e,t){for(var n={};e.length;){var r=e[0],s=r.code,o=r.message,i=r.path.join(".");if(!n[i])if("unionErrors"in r){var a=r.unionErrors[0].errors[0];n[i]={message:a.message,type:a.code}}else n[i]={message:o,type:s};if("unionErrors"in r&&r.unionErrors.forEach(function(d){return d.errors.forEach(function(f){return e.push(f)})}),t){var l=n[i].types,c=l&&l[r.code];n[i]=ak(i,t,n,s,c?[].concat(c,r.message):r.message)}e.shift()}return n},uf=function(e,t,n){return n===void 0&&(n={}),function(r,s,o){try{return Promise.resolve(function(i,a){try{var l=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(c){return o.shouldUseNativeValidation&&pk({},o),{errors:{},values:n.raw?r: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:LU(UU(i.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw i}))}catch(i){return Promise.reject(i)}}},Ae;(function(e){e.assertEqual=s=>s;function t(s){}e.assertIs=t;function n(s){throw new Error}e.assertNever=n,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 r(s,o=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(Ae||(Ae={}));var Ap;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Ap||(Ap={}));const se=Ae.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ns=e=>{switch(typeof e){case"undefined":return se.undefined;case"string":return se.string;case"number":return isNaN(e)?se.nan:se.number;case"boolean":return se.boolean;case"function":return se.function;case"bigint":return se.bigint;case"symbol":return se.symbol;case"object":return Array.isArray(e)?se.array:e===null?se.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?se.promise:typeof Map<"u"&&e instanceof Map?se.map:typeof Set<"u"&&e instanceof Set?se.set:typeof Date<"u"&&e instanceof Date?se.date:se.object;default:return se.unknown}},V=Ae.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"]),$U=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Dn extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(o){return o.message},r={_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)r._errors.push(n(i));else{let a=r,l=0;for(;ln.message){const n={},r=[];for(const s of this.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):r.push(t(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Dn.create=e=>new Dn(e);const $i=(e,t)=>{let n;switch(e.code){case V.invalid_type:e.received===se.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case V.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Ae.jsonStringifyReplacer)}`;break;case V.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ae.joinValues(e.keys,", ")}`;break;case V.invalid_union:n="Invalid input";break;case V.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ae.joinValues(e.options)}`;break;case V.invalid_enum_value:n=`Invalid enum value. Expected ${Ae.joinValues(e.options)}, received '${e.received}'`;break;case V.invalid_arguments:n="Invalid function arguments";break;case V.invalid_return_type:n="Invalid function return type";break;case V.invalid_date:n="Invalid date";break;case V.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Ae.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case V.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case V.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case V.custom:n="Invalid input";break;case V.invalid_intersection_types:n="Intersection results could not be merged";break;case V.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case V.not_finite:n="Number must be finite";break;default:n=t.defaultError,Ae.assertNever(e)}return{message:n}};let mk=$i;function VU(e){mk=e}function rd(){return mk}const sd=e=>{const{data:t,path:n,errorMaps:r,issueData:s}=e,o=[...n,...s.path||[]],i={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(i,{data:t,defaultError:a}).message;return{...s,path:o,message:a}},zU=[];function J(e,t){const n=rd(),r=sd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===$i?void 0:$i].filter(s=>!!s)});e.common.issues.push(r)}class en{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const s of n){if(s.status==="aborted")return xe;s.status==="dirty"&&t.dirty(),r.push(s.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const s of n){const o=await s.key,i=await s.value;r.push({key:o,value:i})}return en.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const s of n){const{key:o,value:i}=s;if(o.status==="aborted"||i.status==="aborted")return xe;o.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof i.value<"u"||s.alwaysSet)&&(r[o.value]=i.value)}return{status:t.value,value:r}}}const xe=Object.freeze({status:"aborted"}),gi=e=>({status:"dirty",value:e}),ln=e=>({status:"valid",value:e}),Ip=e=>e.status==="aborted",Lp=e=>e.status==="dirty",bl=e=>e.status==="valid",Cl=e=>typeof Promise<"u"&&e instanceof Promise;function od(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function gk(e,t,n,r,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,n),n}var fe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(fe||(fe={}));var Ta,Na;class Rr{constructor(t,n,r,s){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,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 zx=(e,t)=>{if(bl(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 n=new Dn(e.common.issues);return this._error=n,this._error}}};function Se(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:s}=e;if(t&&(n||r))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:d}=e;return i.code==="invalid_enum_value"?{message:d??a.defaultError}:typeof a.data>"u"?{message:(l=d??r)!==null&&l!==void 0?l:a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:(c=d??n)!==null&&c!==void 0?c:a.defaultError}},description:s}}class Te{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 Ns(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Ns(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new en,ctx:{common:t.parent.common,data:t.data,parsedType:Ns(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Cl(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const s={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ns(t)},o=this._parseSync({data:t,path:s.path,parent:s});return zx(s,o)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ns(t)},s=this._parse({data:t,path:r.path,parent:r}),o=await(Cl(s)?s:Promise.resolve(s));return zx(r,o)}refine(t,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,o)=>{const i=t(s),a=()=>o.addIssue({code:V.custom,...r(s)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,s)=>t(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(t){return new ur({schema:this,typeName:ve.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Er.create(this,this._def)}nullable(){return Xs.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return sr.create(this,this._def)}promise(){return zi.create(this,this._def)}or(t){return Nl.create([this,t],this._def)}and(t){return Rl.create(this,t,this._def)}transform(t){return new ur({...Se(this._def),schema:this,typeName:ve.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Ol({...Se(this._def),innerType:this,defaultValue:n,typeName:ve.ZodDefault})}brand(){return new iv({typeName:ve.ZodBranded,type:this,...Se(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Al({...Se(this._def),innerType:this,catchValue:n,typeName:ve.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return rc.create(this,t)}readonly(){return Il.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const WU=/^c[^\s-]{8,}$/i,YU=/^[0-9a-z]+$/,BU=/^[0-9A-HJKMNP-TV-Z]{26}$/,HU=/^[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,GU=/^[a-z0-9_-]{21}$/i,KU=/^[-+]?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)?)??$/,ZU=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,qU="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let gh;const QU=/^(?:(?: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])$/,XU=/^(([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})))$/,JU=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,vk="((\\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])))",e$=new RegExp(`^${vk}$`);function yk(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 t$(e){return new RegExp(`^${yk(e)}$`)}function xk(e){let t=`${vk}T${yk(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function n$(e,t){return!!((t==="v4"||!t)&&QU.test(e)||(t==="v6"||!t)&&XU.test(e))}class tr extends Te{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==se.string){const o=this._getOrReturnCtx(t);return J(o,{code:V.invalid_type,expected:se.string,received:o.parsedType}),xe}const r=new en;let s;for(const o of this._def.checks)if(o.kind==="min")t.data.lengtho.value&&(s=this._getOrReturnCtx(t,s),J(s,{code:V.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const i=t.data.length>o.value,a=t.data.lengtht.test(s),{validation:n,code:V.invalid_string,...fe.errToObj(r)})}_addCheck(t){return new tr({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...fe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...fe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...fe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...fe.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...fe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...fe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...fe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...fe.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...fe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...fe.errToObj(t)})}datetime(t){var n,r;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:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...fe.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,...fe.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...fe.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...fe.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...fe.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...fe.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...fe.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...fe.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...fe.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...fe.errToObj(n)})}nonempty(t){return this.min(1,fe.errToObj(t))}trim(){return new tr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new tr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new tr({...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 n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new tr({checks:[],typeName:ve.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Se(e)})};function r$(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,s=n>r?n:r,o=parseInt(e.toFixed(s).replace(".","")),i=parseInt(t.toFixed(s).replace(".",""));return o%i/Math.pow(10,s)}class Zs extends Te{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)!==se.number){const o=this._getOrReturnCtx(t);return J(o,{code:V.invalid_type,expected:se.number,received:o.parsedType}),xe}let r;const s=new en;for(const o of this._def.checks)o.kind==="int"?Ae.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),J(r,{code:V.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),J(r,{code:V.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?r$(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),J(r,{code:V.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),J(r,{code:V.not_finite,message:o.message}),s.dirty()):Ae.assertNever(o);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,fe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,fe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,fe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,fe.toString(n))}setLimit(t,n,r,s){return new Zs({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:fe.toString(s)}]})}_addCheck(t){return new Zs({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:fe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:fe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:fe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:fe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:fe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:fe.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:fe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:fe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:fe.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuet.kind==="int"||t.kind==="multipleOf"&&Ae.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.valuenew Zs({checks:[],typeName:ve.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Se(e)});class qs extends Te{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)!==se.bigint){const o=this._getOrReturnCtx(t);return J(o,{code:V.invalid_type,expected:se.bigint,received:o.parsedType}),xe}let r;const s=new en;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),J(r,{code:V.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),J(r,{code:V.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):Ae.assertNever(o);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,fe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,fe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,fe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,fe.toString(n))}setLimit(t,n,r,s){return new qs({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:fe.toString(s)}]})}_addCheck(t){return new qs({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:fe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:fe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:fe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:fe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:fe.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new qs({checks:[],typeName:ve.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Se(e)})};class kl extends Te{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==se.boolean){const r=this._getOrReturnCtx(t);return J(r,{code:V.invalid_type,expected:se.boolean,received:r.parsedType}),xe}return ln(t.data)}}kl.create=e=>new kl({typeName:ve.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Se(e)});class jo extends Te{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==se.date){const o=this._getOrReturnCtx(t);return J(o,{code:V.invalid_type,expected:se.date,received:o.parsedType}),xe}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return J(o,{code:V.invalid_date}),xe}const r=new en;let s;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()o.value&&(s=this._getOrReturnCtx(t,s),J(s,{code:V.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):Ae.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new jo({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:fe.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:fe.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuenew jo({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:ve.ZodDate,...Se(e)});class id extends Te{_parse(t){if(this._getType(t)!==se.symbol){const r=this._getOrReturnCtx(t);return J(r,{code:V.invalid_type,expected:se.symbol,received:r.parsedType}),xe}return ln(t.data)}}id.create=e=>new id({typeName:ve.ZodSymbol,...Se(e)});class El extends Te{_parse(t){if(this._getType(t)!==se.undefined){const r=this._getOrReturnCtx(t);return J(r,{code:V.invalid_type,expected:se.undefined,received:r.parsedType}),xe}return ln(t.data)}}El.create=e=>new El({typeName:ve.ZodUndefined,...Se(e)});class Tl extends Te{_parse(t){if(this._getType(t)!==se.null){const r=this._getOrReturnCtx(t);return J(r,{code:V.invalid_type,expected:se.null,received:r.parsedType}),xe}return ln(t.data)}}Tl.create=e=>new Tl({typeName:ve.ZodNull,...Se(e)});class Vi extends Te{constructor(){super(...arguments),this._any=!0}_parse(t){return ln(t.data)}}Vi.create=e=>new Vi({typeName:ve.ZodAny,...Se(e)});class bo extends Te{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ln(t.data)}}bo.create=e=>new bo({typeName:ve.ZodUnknown,...Se(e)});class is extends Te{_parse(t){const n=this._getOrReturnCtx(t);return J(n,{code:V.invalid_type,expected:se.never,received:n.parsedType}),xe}}is.create=e=>new is({typeName:ve.ZodNever,...Se(e)});class ad extends Te{_parse(t){if(this._getType(t)!==se.undefined){const r=this._getOrReturnCtx(t);return J(r,{code:V.invalid_type,expected:se.void,received:r.parsedType}),xe}return ln(t.data)}}ad.create=e=>new ad({typeName:ve.ZodVoid,...Se(e)});class sr extends Te{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),s=this._def;if(n.parsedType!==se.array)return J(n,{code:V.invalid_type,expected:se.array,received:n.parsedType}),xe;if(s.exactLength!==null){const i=n.data.length>s.exactLength.value,a=n.data.lengths.maxLength.value&&(J(n,{code:V.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((i,a)=>s.type._parseAsync(new Rr(n,i,n.path,a)))).then(i=>en.mergeArray(r,i));const o=[...n.data].map((i,a)=>s.type._parseSync(new Rr(n,i,n.path,a)));return en.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new sr({...this._def,minLength:{value:t,message:fe.toString(n)}})}max(t,n){return new sr({...this._def,maxLength:{value:t,message:fe.toString(n)}})}length(t,n){return new sr({...this._def,exactLength:{value:t,message:fe.toString(n)}})}nonempty(t){return this.min(1,t)}}sr.create=(e,t)=>new sr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ve.ZodArray,...Se(t)});function ei(e){if(e instanceof ft){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Er.create(ei(r))}return new ft({...e._def,shape:()=>t})}else return e instanceof sr?new sr({...e._def,type:ei(e.element)}):e instanceof Er?Er.create(ei(e.unwrap())):e instanceof Xs?Xs.create(ei(e.unwrap())):e instanceof Pr?Pr.create(e.items.map(t=>ei(t))):e}class ft extends Te{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(),n=Ae.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==se.object){const c=this._getOrReturnCtx(t);return J(c,{code:V.invalid_type,expected:se.object,received:c.parsedType}),xe}const{status:r,ctx:s}=this._processInputParams(t),{shape:o,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof is&&this._def.unknownKeys==="strip"))for(const c in s.data)i.includes(c)||a.push(c);const l=[];for(const c of i){const d=o[c],f=s.data[c];l.push({key:{status:"valid",value:c},value:d._parse(new Rr(s,f,s.path,c)),alwaysSet:c in s.data})}if(this._def.catchall instanceof is){const c=this._def.unknownKeys;if(c==="passthrough")for(const d of a)l.push({key:{status:"valid",value:d},value:{status:"valid",value:s.data[d]}});else if(c==="strict")a.length>0&&(J(s,{code:V.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const d of a){const f=s.data[d];l.push({key:{status:"valid",value:d},value:c._parse(new Rr(s,f,s.path,d)),alwaysSet:d in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const c=[];for(const d of l){const f=await d.key,p=await d.value;c.push({key:f,value:p,alwaysSet:d.alwaysSet})}return c}).then(c=>en.mergeObjectSync(r,c)):en.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return fe.errToObj,new ft({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var s,o,i,a;const l=(i=(o=(s=this._def).errorMap)===null||o===void 0?void 0:o.call(s,n,r).message)!==null&&i!==void 0?i:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=fe.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new ft({...this._def,unknownKeys:"strip"})}passthrough(){return new ft({...this._def,unknownKeys:"passthrough"})}extend(t){return new ft({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new ft({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ve.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new ft({...this._def,catchall:t})}pick(t){const n={};return Ae.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new ft({...this._def,shape:()=>n})}omit(t){const n={};return Ae.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new ft({...this._def,shape:()=>n})}deepPartial(){return ei(this)}partial(t){const n={};return Ae.objectKeys(this.shape).forEach(r=>{const s=this.shape[r];t&&!t[r]?n[r]=s:n[r]=s.optional()}),new ft({...this._def,shape:()=>n})}required(t){const n={};return Ae.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof Er;)o=o._def.innerType;n[r]=o}}),new ft({...this._def,shape:()=>n})}keyof(){return wk(Ae.objectKeys(this.shape))}}ft.create=(e,t)=>new ft({shape:()=>e,unknownKeys:"strip",catchall:is.create(),typeName:ve.ZodObject,...Se(t)});ft.strictCreate=(e,t)=>new ft({shape:()=>e,unknownKeys:"strict",catchall:is.create(),typeName:ve.ZodObject,...Se(t)});ft.lazycreate=(e,t)=>new ft({shape:e,unknownKeys:"strip",catchall:is.create(),typeName:ve.ZodObject,...Se(t)});class Nl extends Te{_parse(t){const{ctx:n}=this._processInputParams(t),r=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 n.common.issues.push(...a.ctx.common.issues),a.result;const i=o.map(a=>new Dn(a.ctx.common.issues));return J(n,{code:V.invalid_union,unionErrors:i}),xe}if(n.common.async)return Promise.all(r.map(async o=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(s);{let o;const i=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},d=l._parseSync({data:n.data,path:n.path,parent:c});if(d.status==="valid")return d;d.status==="dirty"&&!o&&(o={result:d,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const a=i.map(l=>new Dn(l));return J(n,{code:V.invalid_union,unionErrors:a}),xe}}get options(){return this._def.options}}Nl.create=(e,t)=>new Nl({options:e,typeName:ve.ZodUnion,...Se(t)});const Ur=e=>e instanceof Dl?Ur(e.schema):e instanceof ur?Ur(e.innerType()):e instanceof Ml?[e.value]:e instanceof Qs?e.options:e instanceof jl?Ae.objectValues(e.enum):e instanceof Ol?Ur(e._def.innerType):e instanceof El?[void 0]:e instanceof Tl?[null]:e instanceof Er?[void 0,...Ur(e.unwrap())]:e instanceof Xs?[null,...Ur(e.unwrap())]:e instanceof iv||e instanceof Il?Ur(e.unwrap()):e instanceof Al?Ur(e._def.innerType):[];class df extends Te{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==se.object)return J(n,{code:V.invalid_type,expected:se.object,received:n.parsedType}),xe;const r=this.discriminator,s=n.data[r],o=this.optionsMap.get(s);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(J(n,{code:V.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),xe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const s=new Map;for(const o of n){const i=Ur(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 df({typeName:ve.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:s,...Se(r)})}}function Fp(e,t){const n=Ns(e),r=Ns(t);if(e===t)return{valid:!0,data:e};if(n===se.object&&r===se.object){const s=Ae.objectKeys(t),o=Ae.objectKeys(e).filter(a=>s.indexOf(a)!==-1),i={...e,...t};for(const a of o){const l=Fp(e[a],t[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(n===se.array&&r===se.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let o=0;o{if(Ip(o)||Ip(i))return xe;const a=Fp(o.value,i.value);return a.valid?((Lp(o)||Lp(i))&&n.dirty(),{status:n.value,value:a.data}):(J(r,{code:V.invalid_intersection_types}),xe)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,i])=>s(o,i)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Rl.create=(e,t,n)=>new Rl({left:e,right:t,typeName:ve.ZodIntersection,...Se(n)});class Pr extends Te{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.array)return J(r,{code:V.invalid_type,expected:se.array,received:r.parsedType}),xe;if(r.data.lengththis._def.items.length&&(J(r,{code:V.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((i,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Rr(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(o).then(i=>en.mergeArray(n,i)):en.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new Pr({...this._def,rest:t})}}Pr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Pr({items:e,typeName:ve.ZodTuple,rest:null,...Se(t)})};class Pl extends Te{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.object)return J(r,{code:V.invalid_type,expected:se.object,received:r.parsedType}),xe;const s=[],o=this._def.keyType,i=this._def.valueType;for(const a in r.data)s.push({key:o._parse(new Rr(r,a,r.path,a)),value:i._parse(new Rr(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?en.mergeObjectAsync(n,s):en.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Te?new Pl({keyType:t,valueType:n,typeName:ve.ZodRecord,...Se(r)}):new Pl({keyType:tr.create(),valueType:t,typeName:ve.ZodRecord,...Se(n)})}}class ld extends Te{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.map)return J(r,{code:V.invalid_type,expected:se.map,received:r.parsedType}),xe;const s=this._def.keyType,o=this._def.valueType,i=[...r.data.entries()].map(([a,l],c)=>({key:s._parse(new Rr(r,a,r.path,[c,"key"])),value:o._parse(new Rr(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of i){const c=await l.key,d=await l.value;if(c.status==="aborted"||d.status==="aborted")return xe;(c.status==="dirty"||d.status==="dirty")&&n.dirty(),a.set(c.value,d.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of i){const c=l.key,d=l.value;if(c.status==="aborted"||d.status==="aborted")return xe;(c.status==="dirty"||d.status==="dirty")&&n.dirty(),a.set(c.value,d.value)}return{status:n.value,value:a}}}}ld.create=(e,t,n)=>new ld({valueType:t,keyType:e,typeName:ve.ZodMap,...Se(n)});class Oo extends Te{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.set)return J(r,{code:V.invalid_type,expected:se.set,received:r.parsedType}),xe;const s=this._def;s.minSize!==null&&r.data.sizes.maxSize.value&&(J(r,{code:V.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const o=this._def.valueType;function i(l){const c=new Set;for(const d of l){if(d.status==="aborted")return xe;d.status==="dirty"&&n.dirty(),c.add(d.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>o._parse(new Rr(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,n){return new Oo({...this._def,minSize:{value:t,message:fe.toString(n)}})}max(t,n){return new Oo({...this._def,maxSize:{value:t,message:fe.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Oo.create=(e,t)=>new Oo({valueType:e,minSize:null,maxSize:null,typeName:ve.ZodSet,...Se(t)});class Pi extends Te{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==se.function)return J(n,{code:V.invalid_type,expected:se.function,received:n.parsedType}),xe;function r(a,l){return sd({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,rd(),$i].filter(c=>!!c),issueData:{code:V.invalid_arguments,argumentsError:l}})}function s(a,l){return sd({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,rd(),$i].filter(c=>!!c),issueData:{code:V.invalid_return_type,returnTypeError:l}})}const o={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof zi){const a=this;return ln(async function(...l){const c=new Dn([]),d=await a._def.args.parseAsync(l,o).catch(x=>{throw c.addIssue(r(l,x)),c}),f=await Reflect.apply(i,this,d);return await a._def.returns._def.type.parseAsync(f,o).catch(x=>{throw c.addIssue(s(f,x)),c})})}else{const a=this;return ln(function(...l){const c=a._def.args.safeParse(l,o);if(!c.success)throw new Dn([r(l,c.error)]);const d=Reflect.apply(i,this,c.data),f=a._def.returns.safeParse(d,o);if(!f.success)throw new Dn([s(d,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Pi({...this._def,args:Pr.create(t).rest(bo.create())})}returns(t){return new Pi({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Pi({args:t||Pr.create([]).rest(bo.create()),returns:n||bo.create(),typeName:ve.ZodFunction,...Se(r)})}}class Dl extends Te{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Dl.create=(e,t)=>new Dl({getter:e,typeName:ve.ZodLazy,...Se(t)});class Ml extends Te{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return J(n,{received:n.data,code:V.invalid_literal,expected:this._def.value}),xe}return{status:"valid",value:t.data}}get value(){return this._def.value}}Ml.create=(e,t)=>new Ml({value:e,typeName:ve.ZodLiteral,...Se(t)});function wk(e,t){return new Qs({values:e,typeName:ve.ZodEnum,...Se(t)})}class Qs extends Te{constructor(){super(...arguments),Ta.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return J(n,{expected:Ae.joinValues(r),received:n.parsedType,code:V.invalid_type}),xe}if(od(this,Ta)||gk(this,Ta,new Set(this._def.values)),!od(this,Ta).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return J(n,{received:n.data,code:V.invalid_enum_value,options:r}),xe}return ln(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Qs.create(t,{...this._def,...n})}exclude(t,n=this._def){return Qs.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ta=new WeakMap;Qs.create=wk;class jl extends Te{constructor(){super(...arguments),Na.set(this,void 0)}_parse(t){const n=Ae.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==se.string&&r.parsedType!==se.number){const s=Ae.objectValues(n);return J(r,{expected:Ae.joinValues(s),received:r.parsedType,code:V.invalid_type}),xe}if(od(this,Na)||gk(this,Na,new Set(Ae.getValidEnumValues(this._def.values))),!od(this,Na).has(t.data)){const s=Ae.objectValues(n);return J(r,{received:r.data,code:V.invalid_enum_value,options:s}),xe}return ln(t.data)}get enum(){return this._def.values}}Na=new WeakMap;jl.create=(e,t)=>new jl({values:e,typeName:ve.ZodNativeEnum,...Se(t)});class zi extends Te{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==se.promise&&n.common.async===!1)return J(n,{code:V.invalid_type,expected:se.promise,received:n.parsedType}),xe;const r=n.parsedType===se.promise?n.data:Promise.resolve(n.data);return ln(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}zi.create=(e,t)=>new zi({type:e,typeName:ve.ZodPromise,...Se(t)});class ur extends Te{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ve.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=this._def.effect||null,o={addIssue:i=>{J(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){const i=s.transform(r.data,o);if(r.common.async)return Promise.resolve(i).then(async a=>{if(n.value==="aborted")return xe;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?xe:l.status==="dirty"||n.value==="dirty"?gi(l.value):l});{if(n.value==="aborted")return xe;const a=this._def.schema._parseSync({data:i,path:r.path,parent:r});return a.status==="aborted"?xe:a.status==="dirty"||n.value==="dirty"?gi(a.value):a}}if(s.type==="refinement"){const i=a=>{const l=s.refinement(a,o);if(r.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(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?xe:(a.status==="dirty"&&n.dirty(),i(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?xe:(a.status==="dirty"&&n.dirty(),i(a.value).then(()=>({status:n.value,value:a.value}))))}if(s.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!bl(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:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>bl(i)?Promise.resolve(s.transform(i.value,o)).then(a=>({status:n.value,value:a})):i);Ae.assertNever(s)}}ur.create=(e,t,n)=>new ur({schema:e,typeName:ve.ZodEffects,effect:t,...Se(n)});ur.createWithPreprocess=(e,t,n)=>new ur({schema:t,effect:{type:"preprocess",transform:e},typeName:ve.ZodEffects,...Se(n)});class Er extends Te{_parse(t){return this._getType(t)===se.undefined?ln(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Er.create=(e,t)=>new Er({innerType:e,typeName:ve.ZodOptional,...Se(t)});class Xs extends Te{_parse(t){return this._getType(t)===se.null?ln(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Xs.create=(e,t)=>new Xs({innerType:e,typeName:ve.ZodNullable,...Se(t)});class Ol extends Te{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===se.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Ol.create=(e,t)=>new Ol({innerType:e,typeName:ve.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Se(t)});class Al extends Te{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Cl(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Dn(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Dn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Al.create=(e,t)=>new Al({innerType:e,typeName:ve.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Se(t)});class cd extends Te{_parse(t){if(this._getType(t)!==se.nan){const r=this._getOrReturnCtx(t);return J(r,{code:V.invalid_type,expected:se.nan,received:r.parsedType}),xe}return{status:"valid",value:t.data}}}cd.create=e=>new cd({typeName:ve.ZodNaN,...Se(e)});const s$=Symbol("zod_brand");class iv extends Te{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class rc extends Te{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?xe:o.status==="dirty"?(n.dirty(),gi(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?xe:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(t,n){return new rc({in:t,out:n,typeName:ve.ZodPipeline})}}class Il extends Te{_parse(t){const n=this._def.innerType._parse(t),r=s=>(bl(s)&&(s.value=Object.freeze(s.value)),s);return Cl(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}Il.create=(e,t)=>new Il({innerType:e,typeName:ve.ZodReadonly,...Se(t)});function _k(e,t={},n){return e?Vi.create().superRefine((r,s)=>{var o,i;if(!e(r)){const a=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,l=(i=(o=a.fatal)!==null&&o!==void 0?o:n)!==null&&i!==void 0?i:!0,c=typeof a=="string"?{message:a}:a;s.addIssue({code:"custom",...c,fatal:l})}}):Vi.create()}const o$={object:ft.lazycreate};var ve;(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"})(ve||(ve={}));const i$=(e,t={message:`Input not instance of ${e.name}`})=>_k(n=>n instanceof e,t),Sk=tr.create,bk=Zs.create,a$=cd.create,l$=qs.create,Ck=kl.create,c$=jo.create,u$=id.create,d$=El.create,f$=Tl.create,h$=Vi.create,p$=bo.create,m$=is.create,g$=ad.create,v$=sr.create,y$=ft.create,x$=ft.strictCreate,w$=Nl.create,_$=df.create,S$=Rl.create,b$=Pr.create,C$=Pl.create,k$=ld.create,E$=Oo.create,T$=Pi.create,N$=Dl.create,R$=Ml.create,P$=Qs.create,D$=jl.create,M$=zi.create,Wx=ur.create,j$=Er.create,O$=Xs.create,A$=ur.createWithPreprocess,I$=rc.create,L$=()=>Sk().optional(),F$=()=>bk().optional(),U$=()=>Ck().optional(),$$={string:e=>tr.create({...e,coerce:!0}),number:e=>Zs.create({...e,coerce:!0}),boolean:e=>kl.create({...e,coerce:!0}),bigint:e=>qs.create({...e,coerce:!0}),date:e=>jo.create({...e,coerce:!0})},V$=xe;var wt=Object.freeze({__proto__:null,defaultErrorMap:$i,setErrorMap:VU,getErrorMap:rd,makeIssue:sd,EMPTY_PATH:zU,addIssueToContext:J,ParseStatus:en,INVALID:xe,DIRTY:gi,OK:ln,isAborted:Ip,isDirty:Lp,isValid:bl,isAsync:Cl,get util(){return Ae},get objectUtil(){return Ap},ZodParsedType:se,getParsedType:Ns,ZodType:Te,datetimeRegex:xk,ZodString:tr,ZodNumber:Zs,ZodBigInt:qs,ZodBoolean:kl,ZodDate:jo,ZodSymbol:id,ZodUndefined:El,ZodNull:Tl,ZodAny:Vi,ZodUnknown:bo,ZodNever:is,ZodVoid:ad,ZodArray:sr,ZodObject:ft,ZodUnion:Nl,ZodDiscriminatedUnion:df,ZodIntersection:Rl,ZodTuple:Pr,ZodRecord:Pl,ZodMap:ld,ZodSet:Oo,ZodFunction:Pi,ZodLazy:Dl,ZodLiteral:Ml,ZodEnum:Qs,ZodNativeEnum:jl,ZodPromise:zi,ZodEffects:ur,ZodTransformer:ur,ZodOptional:Er,ZodNullable:Xs,ZodDefault:Ol,ZodCatch:Al,ZodNaN:cd,BRAND:s$,ZodBranded:iv,ZodPipeline:rc,ZodReadonly:Il,custom:_k,Schema:Te,ZodSchema:Te,late:o$,get ZodFirstPartyTypeKind(){return ve},coerce:$$,any:h$,array:v$,bigint:l$,boolean:Ck,date:c$,discriminatedUnion:_$,effect:Wx,enum:P$,function:T$,instanceof:i$,intersection:S$,lazy:N$,literal:R$,map:k$,nan:a$,nativeEnum:D$,never:m$,null:f$,nullable:O$,number:bk,object:y$,oboolean:U$,onumber:F$,optional:j$,ostring:L$,pipeline:I$,preprocess:A$,promise:M$,record:C$,set:E$,strictObject:x$,string:Sk,symbol:u$,transformer:Wx,tuple:b$,undefined:d$,union:w$,unknown:p$,void:g$,NEVER:V$,ZodIssueCode:V,quotelessJson:$U,ZodError:Dn}),z$="Label",kk=h.forwardRef((e,t)=>u.jsx(_e.label,{...e,ref:t,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));kk.displayName=z$;var Ek=kk;const W$=zl("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),av=h.forwardRef(({className:e,...t},n)=>u.jsx(Ek,{ref:n,className:ue(W$(),e),...t}));av.displayName=Ek.displayName;const ff=SU,Tk=h.createContext({}),Kt=({...e})=>u.jsx(Tk.Provider,{value:{name:e.name},children:u.jsx(EU,{...e})}),hf=()=>{const e=h.useContext(Tk),t=h.useContext(Nk),{getFieldState:n,formState:r}=lf(),s=n(e.name,r);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}},Nk=h.createContext({}),Ut=h.forwardRef(({className:e,...t},n)=>{const r=h.useId();return u.jsx(Nk.Provider,{value:{id:r},children:u.jsx("div",{ref:n,className:ue("space-y-2",e),...t})})});Ut.displayName="FormItem";const $t=h.forwardRef(({className:e,...t},n)=>{const{error:r,formItemId:s}=hf();return u.jsx(av,{ref:n,className:ue(r&&"text-destructive",e),htmlFor:s,...t})});$t.displayName="FormLabel";const Vt=h.forwardRef(({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:s,formMessageId:o}=hf();return u.jsx(ns,{ref:t,id:r,"aria-describedby":n?`${s} ${o}`:`${s}`,"aria-invalid":!!n,...e})});Vt.displayName="FormControl";const Y$=h.forwardRef(({className:e,...t},n)=>{const{formDescriptionId:r}=hf();return u.jsx("p",{ref:n,id:r,className:ue("text-sm text-muted-foreground",e),...t})});Y$.displayName="FormDescription";const jt=h.forwardRef(({className:e,children:t,...n},r)=>{const{error:s,formMessageId:o}=hf(),i=s?String(s==null?void 0:s.message):t;return i?u.jsx("p",{ref:r,id:o,className:ue("text-sm font-medium text-destructive",e),...n,children:i}):null});jt.displayName="FormMessage";function Yx(e,[t,n]){return Math.min(n,Math.max(t,e))}var B$=[" ","Enter","ArrowUp","ArrowDown"],H$=[" ","Enter"],sc="Select",[pf,mf,G$]=Md(sc),[na,WV]=dr(sc,[G$,Xi]),gf=Xi(),[K$,oo]=na(sc),[Z$,q$]=na(sc),Rk=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:s,onOpenChange:o,value:i,defaultValue:a,onValueChange:l,dir:c,name:d,autoComplete:f,disabled:p,required:x}=e,y=gf(t),[v,_]=h.useState(null),[g,m]=h.useState(null),[w,b]=h.useState(!1),C=Km(c),[S=!1,N]=Bs({prop:r,defaultProp:s,onChange:o}),[R,F]=Bs({prop:i,defaultProp:a,onChange:l}),L=h.useRef(null),Z=v?!!v.closest("form"):!0,[j,B]=h.useState(new Set),A=Array.from(j).map(H=>H.props.value).join(";");return u.jsx(sg,{...y,children:u.jsxs(K$,{required:x,scope:t,trigger:v,onTriggerChange:_,valueNode:g,onValueNodeChange:m,valueNodeHasChildren:w,onValueNodeHasChildrenChange:b,contentId:kr(),value:R,onValueChange:F,open:S,onOpenChange:N,dir:C,triggerPointerDownPosRef:L,disabled:p,children:[u.jsx(pf.Provider,{scope:t,children:u.jsx(Z$,{scope:e.__scopeSelect,onNativeOptionAdd:h.useCallback(H=>{B(ne=>new Set(ne).add(H))},[]),onNativeOptionRemove:h.useCallback(H=>{B(ne=>{const W=new Set(ne);return W.delete(H),W})},[]),children:n})}),Z?u.jsxs(tE,{"aria-hidden":!0,required:x,tabIndex:-1,name:d,autoComplete:f,value:R,onChange:H=>F(H.target.value),disabled:p,children:[R===void 0?u.jsx("option",{value:""}):null,Array.from(j)]},A):null]})})};Rk.displayName=sc;var Pk="SelectTrigger",Dk=h.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...s}=e,o=gf(n),i=oo(Pk,n),a=i.disabled||r,l=Ie(t,i.onTriggerChange),c=mf(n),[d,f,p]=nE(y=>{const v=c().filter(m=>!m.disabled),_=v.find(m=>m.value===i.value),g=rE(v,y,_);g!==void 0&&i.onValueChange(g.value)}),x=()=>{a||(i.onOpenChange(!0),p())};return u.jsx(og,{asChild:!0,...o,children:u.jsx(_e.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":eE(i.value)?"":void 0,...s,ref:l,onClick:ee(s.onClick,y=>{y.currentTarget.focus()}),onPointerDown:ee(s.onPointerDown,y=>{const v=y.target;v.hasPointerCapture(y.pointerId)&&v.releasePointerCapture(y.pointerId),y.button===0&&y.ctrlKey===!1&&(x(),i.triggerPointerDownPosRef.current={x:Math.round(y.pageX),y:Math.round(y.pageY)},y.preventDefault())}),onKeyDown:ee(s.onKeyDown,y=>{const v=d.current!=="";!(y.ctrlKey||y.altKey||y.metaKey)&&y.key.length===1&&f(y.key),!(v&&y.key===" ")&&B$.includes(y.key)&&(x(),y.preventDefault())})})})});Dk.displayName=Pk;var Mk="SelectValue",jk=h.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,children:o,placeholder:i="",...a}=e,l=oo(Mk,n),{onValueNodeHasChildrenChange:c}=l,d=o!==void 0,f=Ie(t,l.onValueNodeChange);return Jt(()=>{c(d)},[c,d]),u.jsx(_e.span,{...a,ref:f,style:{pointerEvents:"none"},children:eE(l.value)?u.jsx(u.Fragment,{children:i}):o})});jk.displayName=Mk;var Q$="SelectIcon",Ok=h.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...s}=e;return u.jsx(_e.span,{"aria-hidden":!0,...s,ref:t,children:r||"▼"})});Ok.displayName=Q$;var X$="SelectPortal",Ak=e=>u.jsx(Yl,{asChild:!0,...e});Ak.displayName=X$;var Ao="SelectContent",Ik=h.forwardRef((e,t)=>{const n=oo(Ao,e.__scopeSelect),[r,s]=h.useState();if(Jt(()=>{s(new DocumentFragment)},[]),!n.open){const o=r;return o?ls.createPortal(u.jsx(Lk,{scope:e.__scopeSelect,children:u.jsx(pf.Slot,{scope:e.__scopeSelect,children:u.jsx("div",{children:e.children})})}),o):null}return u.jsx(Fk,{...e,ref:t})});Ik.displayName=Ao;var zr=10,[Lk,io]=na(Ao),J$="SelectContentImpl",Fk=h.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:i,side:a,sideOffset:l,align:c,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:x,sticky:y,hideWhenDetached:v,avoidCollisions:_,...g}=e,m=oo(Ao,n),[w,b]=h.useState(null),[C,S]=h.useState(null),N=Ie(t,le=>b(le)),[R,F]=h.useState(null),[L,Z]=h.useState(null),j=mf(n),[B,A]=h.useState(!1),H=h.useRef(!1);h.useEffect(()=>{if(w)return lg(w)},[w]),Zm();const ne=h.useCallback(le=>{const[De,...Ye]=j().map(we=>we.ref.current),[Ue]=Ye.slice(-1),$e=document.activeElement;for(const we of le)if(we===$e||(we==null||we.scrollIntoView({block:"nearest"}),we===De&&C&&(C.scrollTop=0),we===Ue&&C&&(C.scrollTop=C.scrollHeight),we==null||we.focus(),document.activeElement!==$e))return},[j,C]),W=h.useCallback(()=>ne([R,w]),[ne,R,w]);h.useEffect(()=>{B&&W()},[B,W]);const{onOpenChange:I,triggerPointerDownPosRef:M}=m;h.useEffect(()=>{if(w){let le={x:0,y:0};const De=Ue=>{var $e,we;le={x:Math.abs(Math.round(Ue.pageX)-((($e=M.current)==null?void 0:$e.x)??0)),y:Math.abs(Math.round(Ue.pageY)-(((we=M.current)==null?void 0:we.y)??0))}},Ye=Ue=>{le.x<=10&&le.y<=10?Ue.preventDefault():w.contains(Ue.target)||I(!1),document.removeEventListener("pointermove",De),M.current=null};return M.current!==null&&(document.addEventListener("pointermove",De),document.addEventListener("pointerup",Ye,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",De),document.removeEventListener("pointerup",Ye,{capture:!0})}}},[w,I,M]),h.useEffect(()=>{const le=()=>I(!1);return window.addEventListener("blur",le),window.addEventListener("resize",le),()=>{window.removeEventListener("blur",le),window.removeEventListener("resize",le)}},[I]);const[q,ae]=nE(le=>{const De=j().filter($e=>!$e.disabled),Ye=De.find($e=>$e.ref.current===document.activeElement),Ue=rE(De,le,Ye);Ue&&setTimeout(()=>Ue.ref.current.focus())}),me=h.useCallback((le,De,Ye)=>{const Ue=!H.current&&!Ye;(m.value!==void 0&&m.value===De||Ue)&&(F(le),Ue&&(H.current=!0))},[m.value]),Qe=h.useCallback(()=>w==null?void 0:w.focus(),[w]),Pe=h.useCallback((le,De,Ye)=>{const Ue=!H.current&&!Ye;(m.value!==void 0&&m.value===De||Ue)&&Z(le)},[m.value]),ct=r==="popper"?Up:Uk,Fe=ct===Up?{side:a,sideOffset:l,align:c,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:x,sticky:y,hideWhenDetached:v,avoidCollisions:_}:{};return u.jsx(Lk,{scope:n,content:w,viewport:C,onViewportChange:S,itemRefCallback:me,selectedItem:R,onItemLeave:Qe,itemTextRefCallback:Pe,focusSelectedItem:W,selectedItemText:L,position:r,isPositioned:B,searchRef:q,children:u.jsx(Fd,{as:ns,allowPinchZoom:!0,children:u.jsx(jd,{asChild:!0,trapped:m.open,onMountAutoFocus:le=>{le.preventDefault()},onUnmountAutoFocus:ee(s,le=>{var De;(De=m.trigger)==null||De.focus({preventScroll:!0}),le.preventDefault()}),children:u.jsx(Zi,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:le=>le.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:u.jsx(ct,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:le=>le.preventDefault(),...g,...Fe,onPlaced:()=>A(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:ee(g.onKeyDown,le=>{const De=le.ctrlKey||le.altKey||le.metaKey;if(le.key==="Tab"&&le.preventDefault(),!De&&le.key.length===1&&ae(le.key),["ArrowUp","ArrowDown","Home","End"].includes(le.key)){let Ue=j().filter($e=>!$e.disabled).map($e=>$e.ref.current);if(["ArrowUp","End"].includes(le.key)&&(Ue=Ue.slice().reverse()),["ArrowUp","ArrowDown"].includes(le.key)){const $e=le.target,we=Ue.indexOf($e);Ue=Ue.slice(we+1)}setTimeout(()=>ne(Ue)),le.preventDefault()}})})})})})})});Fk.displayName=J$;var eV="SelectItemAlignedPosition",Uk=h.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...s}=e,o=oo(Ao,n),i=io(Ao,n),[a,l]=h.useState(null),[c,d]=h.useState(null),f=Ie(t,N=>d(N)),p=mf(n),x=h.useRef(!1),y=h.useRef(!0),{viewport:v,selectedItem:_,selectedItemText:g,focusSelectedItem:m}=i,w=h.useCallback(()=>{if(o.trigger&&o.valueNode&&a&&c&&v&&_&&g){const N=o.trigger.getBoundingClientRect(),R=c.getBoundingClientRect(),F=o.valueNode.getBoundingClientRect(),L=g.getBoundingClientRect();if(o.dir!=="rtl"){const $e=L.left-R.left,we=F.left-$e,ut=N.left-we,Yt=N.width+ut,ms=Math.max(Yt,R.width),fn=window.innerWidth-zr,gs=Yx(we,[zr,fn-ms]);a.style.minWidth=Yt+"px",a.style.left=gs+"px"}else{const $e=R.right-L.right,we=window.innerWidth-F.right-$e,ut=window.innerWidth-N.right-we,Yt=N.width+ut,ms=Math.max(Yt,R.width),fn=window.innerWidth-zr,gs=Yx(we,[zr,fn-ms]);a.style.minWidth=Yt+"px",a.style.right=gs+"px"}const Z=p(),j=window.innerHeight-zr*2,B=v.scrollHeight,A=window.getComputedStyle(c),H=parseInt(A.borderTopWidth,10),ne=parseInt(A.paddingTop,10),W=parseInt(A.borderBottomWidth,10),I=parseInt(A.paddingBottom,10),M=H+ne+B+I+W,q=Math.min(_.offsetHeight*5,M),ae=window.getComputedStyle(v),me=parseInt(ae.paddingTop,10),Qe=parseInt(ae.paddingBottom,10),Pe=N.top+N.height/2-zr,ct=j-Pe,Fe=_.offsetHeight/2,le=_.offsetTop+Fe,De=H+ne+le,Ye=M-De;if(De<=Pe){const $e=_===Z[Z.length-1].ref.current;a.style.bottom="0px";const we=c.clientHeight-v.offsetTop-v.offsetHeight,ut=Math.max(ct,Fe+($e?Qe:0)+we+W),Yt=De+ut;a.style.height=Yt+"px"}else{const $e=_===Z[0].ref.current;a.style.top="0px";const ut=Math.max(Pe,H+v.offsetTop+($e?me:0)+Fe)+Ye;a.style.height=ut+"px",v.scrollTop=De-Pe+v.offsetTop}a.style.margin=`${zr}px 0`,a.style.minHeight=q+"px",a.style.maxHeight=j+"px",r==null||r(),requestAnimationFrame(()=>x.current=!0)}},[p,o.trigger,o.valueNode,a,c,v,_,g,o.dir,r]);Jt(()=>w(),[w]);const[b,C]=h.useState();Jt(()=>{c&&C(window.getComputedStyle(c).zIndex)},[c]);const S=h.useCallback(N=>{N&&y.current===!0&&(w(),m==null||m(),y.current=!1)},[w,m]);return u.jsx(nV,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:x,onScrollButtonChange:S,children:u.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:b},children:u.jsx(_e.div,{...s,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});Uk.displayName=eV;var tV="SelectPopperPosition",Up=h.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=zr,...o}=e,i=gf(n);return u.jsx(ig,{...i,...o,ref:t,align:r,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)"}})});Up.displayName=tV;var[nV,lv]=na(Ao,{}),$p="SelectViewport",$k=h.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...s}=e,o=io($p,n),i=lv($p,n),a=Ie(t,o.onViewportChange),l=h.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:r}),u.jsx(pf.Slot,{scope:n,children:u.jsx(_e.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"auto",...s.style},onScroll:ee(s.onScroll,c=>{const d=c.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:p}=i;if(p!=null&&p.current&&f){const x=Math.abs(l.current-d.scrollTop);if(x>0){const y=window.innerHeight-zr*2,v=parseFloat(f.style.minHeight),_=parseFloat(f.style.height),g=Math.max(v,_);if(g0?b:0,f.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});$k.displayName=$p;var Vk="SelectGroup",[rV,sV]=na(Vk),zk=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=kr();return u.jsx(rV,{scope:n,id:s,children:u.jsx(_e.div,{role:"group","aria-labelledby":s,...r,ref:t})})});zk.displayName=Vk;var Wk="SelectLabel",Yk=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=sV(Wk,n);return u.jsx(_e.div,{id:s.id,...r,ref:t})});Yk.displayName=Wk;var ud="SelectItem",[oV,Bk]=na(ud),Hk=h.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:o,...i}=e,a=oo(ud,n),l=io(ud,n),c=a.value===r,[d,f]=h.useState(o??""),[p,x]=h.useState(!1),y=Ie(t,g=>{var m;return(m=l.itemRefCallback)==null?void 0:m.call(l,g,r,s)}),v=kr(),_=()=>{s||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")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(oV,{scope:n,value:r,disabled:s,textId:v,isSelected:c,onItemTextChange:h.useCallback(g=>{f(m=>m||((g==null?void 0:g.textContent)??"").trim())},[]),children:u.jsx(pf.ItemSlot,{scope:n,value:r,disabled:s,textValue:d,children:u.jsx(_e.div,{role:"option","aria-labelledby":v,"data-highlighted":p?"":void 0,"aria-selected":c&&p,"data-state":c?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...i,ref:y,onFocus:ee(i.onFocus,()=>x(!0)),onBlur:ee(i.onBlur,()=>x(!1)),onPointerUp:ee(i.onPointerUp,_),onPointerMove:ee(i.onPointerMove,g=>{var m;s?(m=l.onItemLeave)==null||m.call(l):g.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ee(i.onPointerLeave,g=>{var m;g.currentTarget===document.activeElement&&((m=l.onItemLeave)==null||m.call(l))}),onKeyDown:ee(i.onKeyDown,g=>{var w;((w=l.searchRef)==null?void 0:w.current)!==""&&g.key===" "||(H$.includes(g.key)&&_(),g.key===" "&&g.preventDefault())})})})})});Hk.displayName=ud;var Ra="SelectItemText",Gk=h.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,...o}=e,i=oo(Ra,n),a=io(Ra,n),l=Bk(Ra,n),c=q$(Ra,n),[d,f]=h.useState(null),p=Ie(t,g=>f(g),l.onItemTextChange,g=>{var m;return(m=a.itemTextRefCallback)==null?void 0:m.call(a,g,l.value,l.disabled)}),x=d==null?void 0:d.textContent,y=h.useMemo(()=>u.jsx("option",{value:l.value,disabled:l.disabled,children:x},l.value),[l.disabled,l.value,x]),{onNativeOptionAdd:v,onNativeOptionRemove:_}=c;return Jt(()=>(v(y),()=>_(y)),[v,_,y]),u.jsxs(u.Fragment,{children:[u.jsx(_e.span,{id:l.textId,...o,ref:p}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?ls.createPortal(o.children,i.valueNode):null]})});Gk.displayName=Ra;var Kk="SelectItemIndicator",Zk=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Bk(Kk,n).isSelected?u.jsx(_e.span,{"aria-hidden":!0,...r,ref:t}):null});Zk.displayName=Kk;var Vp="SelectScrollUpButton",qk=h.forwardRef((e,t)=>{const n=io(Vp,e.__scopeSelect),r=lv(Vp,e.__scopeSelect),[s,o]=h.useState(!1),i=Ie(t,r.onScrollButtonChange);return Jt(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollTop>0;o(c)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?u.jsx(Xk,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});qk.displayName=Vp;var zp="SelectScrollDownButton",Qk=h.forwardRef((e,t)=>{const n=io(zp,e.__scopeSelect),r=lv(zp,e.__scopeSelect),[s,o]=h.useState(!1),i=Ie(t,r.onScrollButtonChange);return Jt(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?u.jsx(Xk,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});Qk.displayName=zp;var Xk=h.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=e,o=io("SelectScrollButton",n),i=h.useRef(null),a=mf(n),l=h.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return h.useEffect(()=>()=>l(),[l]),Jt(()=>{var d;const c=a().find(f=>f.ref.current===document.activeElement);(d=c==null?void 0:c.ref.current)==null||d.scrollIntoView({block:"nearest"})},[a]),u.jsx(_e.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:ee(s.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:ee(s.onPointerMove,()=>{var c;(c=o.onItemLeave)==null||c.call(o),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:ee(s.onPointerLeave,()=>{l()})})}),iV="SelectSeparator",Jk=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return u.jsx(_e.div,{"aria-hidden":!0,...r,ref:t})});Jk.displayName=iV;var Wp="SelectArrow",aV=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=gf(n),o=oo(Wp,n),i=io(Wp,n);return o.open&&i.position==="popper"?u.jsx(ag,{...s,...r,ref:t}):null});aV.displayName=Wp;function eE(e){return e===""||e===void 0}var tE=h.forwardRef((e,t)=>{const{value:n,...r}=e,s=h.useRef(null),o=Ie(t,s),i=hC(n);return h.useEffect(()=>{const a=s.current,l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==n&&d){const f=new Event("change",{bubbles:!0});d.call(a,n),a.dispatchEvent(f)}},[i,n]),u.jsx(tc,{asChild:!0,children:u.jsx("select",{...r,ref:o,defaultValue:n})})});tE.displayName="BubbleSelect";function nE(e){const t=Xt(e),n=h.useRef(""),r=h.useRef(0),s=h.useCallback(i=>{const a=n.current+i;t(a),function l(c){n.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),o=h.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return h.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,o]}function rE(e,t,n){const s=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let i=lV(e,Math.max(o,0));s.length===1&&(i=i.filter(c=>c!==n));const l=i.find(c=>c.textValue.toLowerCase().startsWith(s.toLowerCase()));return l!==n?l:void 0}function lV(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var cV=Rk,sE=Dk,uV=jk,dV=Ok,fV=Ak,oE=Ik,hV=$k,pV=zk,iE=Yk,aE=Hk,mV=Gk,gV=Zk,lE=qk,cE=Qk,uE=Jk;const uu=cV,du=pV,fu=uV,Wa=h.forwardRef(({className:e,children:t,...n},r)=>u.jsxs(sE,{ref:r,className:ue("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),...n,children:[t,u.jsx(dV,{asChild:!0,children:u.jsx(T_,{className:"h-4 w-4 opacity-50"})})]}));Wa.displayName=sE.displayName;const dE=h.forwardRef(({className:e,...t},n)=>u.jsx(lE,{ref:n,className:ue("flex cursor-default items-center justify-center py-1",e),...t,children:u.jsx($P,{className:"h-4 w-4"})}));dE.displayName=lE.displayName;const fE=h.forwardRef(({className:e,...t},n)=>u.jsx(cE,{ref:n,className:ue("flex cursor-default items-center justify-center py-1",e),...t,children:u.jsx(T_,{className:"h-4 w-4"})}));fE.displayName=cE.displayName;const Ya=h.forwardRef(({className:e,children:t,position:n="popper",...r},s)=>u.jsx(fV,{children:u.jsxs(oE,{ref:s,className:ue("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",n==="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:n,...r,children:[u.jsx(dE,{}),u.jsx(hV,{className:ue("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),u.jsx(fE,{})]})}));Ya.displayName=oE.displayName;const Ba=h.forwardRef(({className:e,...t},n)=>u.jsx(iE,{ref:n,className:ue("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Ba.displayName=iE.displayName;const Ha=h.forwardRef(({className:e,children:t,...n},r)=>u.jsxs(aE,{ref:r,className:ue("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),...n,children:[u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(gV,{children:u.jsx(E_,{className:"h-4 w-4"})})}),u.jsx(mV,{children:t})]}));Ha.displayName=aE.displayName;const vV=h.forwardRef(({className:e,...t},n)=>u.jsx(uE,{ref:n,className:ue("-mx-1 my-1 h-px bg-muted",e),...t}));vV.displayName=uE.displayName;const yV=_g,xV=Sg,wV=bg,hE=h.forwardRef(({className:e,...t},n)=>u.jsx(Gl,{ref:n,className:ue("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}));hE.displayName=Gl.displayName;const pE=h.forwardRef(({className:e,children:t,...n},r)=>u.jsxs(wV,{children:[u.jsx(hE,{}),u.jsxs(Kl,{ref:r,className:ue("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),...n,children:[t,u.jsxs(Vd,{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(Wm,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));pE.displayName=Kl.displayName;const mE=({className:e,...t})=>u.jsx("div",{className:ue("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});mE.displayName="DialogHeader";const gE=h.forwardRef(({className:e,...t},n)=>u.jsx(Zl,{ref:n,className:ue("text-lg font-semibold leading-none tracking-tight",e),...t}));gE.displayName=Zl.displayName;const _V=h.forwardRef(({className:e,...t},n)=>u.jsx(ql,{ref:n,className:ue("text-sm text-muted-foreground",e),...t}));_V.displayName=ql.displayName;const Yp=new Map([["tencent","腾讯云"],["aliyun","阿里云"]]),vE=wt.union([wt.literal("aliyun"),wt.literal("tencent")],{message:"请选择云服务商"}),SV=({data:e,onAfterReq:t})=>{const{addAccess:n,updateAccess:r}=Jd(),s=wt.object({id:wt.string().optional(),name:wt.string().min(1).max(64),configType:vE,secretId:wt.string().min(1).max(64),secretKey:wt.string().min(1).max(64)});let o={secretId:"",secretKey:""};e&&(o=e.config);const i=cf({resolver:uf(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 d=await Ab(c);if(t(),c.id=d.id,c.created=d.created,c.updated=d.updated,l.id){r(c);return}n(c)}catch(d){Object.entries(d.response.data).forEach(([p,x])=>{i.setError(p,{type:"manual",message:x.message})})}};return u.jsx(u.Fragment,{children:u.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:u.jsx(ff,{...i,children:u.jsxs("form",{onSubmit:l=>{l.stopPropagation(),i.handleSubmit(a)(l)},className:"space-y-8",children:[u.jsx(Kt,{control:i.control,name:"name",render:({field:l})=>u.jsxs(Ut,{children:[u.jsx($t,{children:"名称"}),u.jsx(Vt,{children:u.jsx(gn,{placeholder:"请输入授权名称",...l})}),u.jsx(jt,{})]})}),u.jsx(Kt,{control:i.control,name:"id",render:({field:l})=>u.jsxs(Ut,{className:"hidden",children:[u.jsx($t,{children:"配置类型"}),u.jsx(Vt,{children:u.jsx(gn,{...l})}),u.jsx(jt,{})]})}),u.jsx(Kt,{control:i.control,name:"configType",render:({field:l})=>u.jsxs(Ut,{className:"hidden",children:[u.jsx($t,{children:"配置类型"}),u.jsx(Vt,{children:u.jsx(gn,{...l})}),u.jsx(jt,{})]})}),u.jsx(Kt,{control:i.control,name:"secretId",render:({field:l})=>u.jsxs(Ut,{children:[u.jsx($t,{children:"SecretId"}),u.jsx(Vt,{children:u.jsx(gn,{placeholder:"请输入SecretId",...l})}),u.jsx(jt,{})]})}),u.jsx(Kt,{control:i.control,name:"secretKey",render:({field:l})=>u.jsxs(Ut,{children:[u.jsx($t,{children:"SecretKey"}),u.jsx(Vt,{children:u.jsx(gn,{placeholder:"请输入SecretKey",...l})}),u.jsx(jt,{})]})}),u.jsx("div",{className:"flex justify-end",children:u.jsx(Nt,{type:"submit",children:"保存"})})]})})})})},bV=({data:e,onAfterReq:t})=>{const{addAccess:n,updateAccess:r}=Jd(),s=wt.object({id:wt.string().optional(),name:wt.string().min(1).max(64),configType:vE,accessKeyId:wt.string().min(1).max(64),accessSecretId:wt.string().min(1).max(64)});let o={accessKeyId:"",accessKeySecret:""};e&&(o=e.config);const i=cf({resolver:uf(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 d=await Ab(c);if(t(),c.id=d.id,c.created=d.created,c.updated=d.updated,l.id){r(c);return}n(c)}catch(d){Object.entries(d.response.data).forEach(([p,x])=>{i.setError(p,{type:"manual",message:x.message})});return}};return u.jsx(u.Fragment,{children:u.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:u.jsx(ff,{...i,children:u.jsxs("form",{onSubmit:l=>{l.stopPropagation(),i.handleSubmit(a)(l)},className:"space-y-8",children:[u.jsx(Kt,{control:i.control,name:"name",render:({field:l})=>u.jsxs(Ut,{children:[u.jsx($t,{children:"名称"}),u.jsx(Vt,{children:u.jsx(gn,{placeholder:"请输入授权名称",...l})}),u.jsx(jt,{})]})}),u.jsx(Kt,{control:i.control,name:"id",render:({field:l})=>u.jsxs(Ut,{className:"hidden",children:[u.jsx($t,{children:"配置类型"}),u.jsx(Vt,{children:u.jsx(gn,{...l})}),u.jsx(jt,{})]})}),u.jsx(Kt,{control:i.control,name:"configType",render:({field:l})=>u.jsxs(Ut,{className:"hidden",children:[u.jsx($t,{children:"配置类型"}),u.jsx(Vt,{children:u.jsx(gn,{...l})}),u.jsx(jt,{})]})}),u.jsx(Kt,{control:i.control,name:"accessKeyId",render:({field:l})=>u.jsxs(Ut,{children:[u.jsx($t,{children:"AccessKeyId"}),u.jsx(Vt,{children:u.jsx(gn,{placeholder:"请输入AccessKeyId",...l})}),u.jsx(jt,{})]})}),u.jsx(Kt,{control:i.control,name:"accessSecretId",render:({field:l})=>u.jsxs(Ut,{children:[u.jsx($t,{children:"AccessKeySecret"}),u.jsx(Vt,{children:u.jsx(gn,{placeholder:"请输入AccessKeySecret",...l})}),u.jsx(jt,{})]})}),u.jsx(jt,{}),u.jsx("div",{className:"flex justify-end",children:u.jsx(Nt,{type:"submit",children:"保存"})})]})})})})};function Ga({trigger:e,op:t,data:n,className:r}){const[s,o]=h.useState(!1),i=Array.from(Yp.keys()),[a,l]=h.useState((n==null?void 0:n.configType)||"");let c=u.jsx(u.Fragment,{children:" "});switch(a){case"tencent":c=u.jsx(SV,{data:n,onAfterReq:()=>{o(!1)}});break;case"aliyun":c=u.jsx(bV,{data:n,onAfterReq:()=>{o(!1)}});break}return u.jsxs(yV,{onOpenChange:o,open:s,children:[u.jsx(xV,{asChild:!0,className:ue(r),children:e}),u.jsxs(pE,{className:"sm:max-w-[600px] w-full",children:[u.jsx(mE,{children:u.jsxs(gE,{children:[t=="add"?"添加":"编辑","授权"]})}),u.jsxs("div",{className:"container",children:[u.jsx(av,{children:"服务商"}),u.jsxs(uu,{onValueChange:d=>{l(d)},value:a,children:[u.jsx(Wa,{className:"mt-3",children:u.jsx(fu,{placeholder:"选择服务商"})}),u.jsx(Ya,{children:u.jsxs(du,{children:[u.jsx(Ba,{children:"服务商"}),i.map(d=>u.jsx(Ha,{value:d,children:Yp.get(d)}))]})})]}),c]})]})]})}const CV=()=>{const{config:{accesses:e}}=Jd(),[t,n]=h.useState(),r=ro();h.useEffect(()=>{const x=new URLSearchParams(r.search).get("id");x&&(async()=>{const v=await vU(x);n(v)})()},[r.search]);const s=wt.object({id:wt.string().optional(),domain:wt.string().regex(new RegExp("^(?!-)[A-Za-z0-9-]{1,63}(?{t&&o.reset({id:t.id,domain:t.domain,access:t.access,targetAccess:t.targetAccess,targetType:t.targetType})},[t,o]);const[i,a]=h.useState(t?t.targetType:""),l=e.filter(p=>{if(i=="")return!0;const x=o.getValues().targetType.split("-");return p.configType===x[0]}),{toast:c}=Xg(),d=so(),f=async p=>{const x={id:p.id,crontab:"0 0 * * *",domain:p.domain,access:p.access,targetAccess:p.targetAccess,targetType:p.targetType};try{await Op(x);let y="域名编辑成功";x.id==""&&(y="域名添加成功"),c({title:"成功",description:y}),d("/")}catch(y){Object.entries(y.response.data).forEach(([_,g])=>{o.setError(_,{type:"manual",message:g.message})});return}};return u.jsx(u.Fragment,{children:u.jsxs("div",{className:"",children:[u.jsx(YC,{}),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(ff,{...o,children:u.jsxs("form",{onSubmit:o.handleSubmit(f),className:"space-y-8",children:[u.jsx(Kt,{control:o.control,name:"domain",render:({field:p})=>u.jsxs(Ut,{children:[u.jsx($t,{children:"域名"}),u.jsx(Vt,{children:u.jsx(gn,{placeholder:"请输入域名",...p})}),u.jsx(jt,{})]})}),u.jsx(Kt,{control:o.control,name:"access",render:({field:p})=>u.jsxs(Ut,{children:[u.jsxs($t,{className:"flex w-full justify-between",children:[u.jsx("div",{children:"DNS 服务商授权配置"}),u.jsx(Ga,{trigger:u.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[u.jsx(Gy,{size:14}),"新增"]}),op:"add"})]}),u.jsx(Vt,{children:u.jsxs(uu,{...p,value:p.value,onValueChange:x=>{o.setValue("access",x)},children:[u.jsx(Wa,{children:u.jsx(fu,{placeholder:"请选择授权配置"})}),u.jsx(Ya,{children:u.jsxs(du,{children:[u.jsx(Ba,{children:"服务商授权配置"}),e.map(x=>u.jsx(Ha,{value:x.id,children:x.name},x.id))]})})]})}),u.jsx(jt,{})]})}),u.jsx(Kt,{control:o.control,name:"targetType",render:({field:p})=>u.jsxs(Ut,{children:[u.jsx($t,{children:"部署服务类型"}),u.jsx(Vt,{children:u.jsxs(uu,{...p,onValueChange:x=>{a(x),o.setValue("targetType",x)},children:[u.jsx(Wa,{children:u.jsx(fu,{placeholder:"请选择部署服务类型"})}),u.jsx(Ya,{children:u.jsxs(du,{children:[u.jsx(Ba,{children:"部署服务类型"}),u.jsx(Ha,{value:"aliyun-oss",children:"阿里云-OSS"})]})})]})}),u.jsx(jt,{})]})}),u.jsx(Kt,{control:o.control,name:"targetAccess",render:({field:p})=>u.jsxs(Ut,{children:[u.jsxs($t,{className:"w-full flex justify-between",children:[u.jsx("div",{children:"部署服务商授权配置"}),u.jsx(Ga,{trigger:u.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[u.jsx(Gy,{size:14}),"新增"]}),op:"add"})]}),u.jsx(Vt,{children:u.jsxs(uu,{...p,onValueChange:x=>{o.setValue("targetAccess",x)},children:[u.jsx(Wa,{children:u.jsx(fu,{placeholder:"请选择授权配置"})}),u.jsx(Ya,{children:u.jsxs(du,{children:[u.jsx(Ba,{children:"服务商授权配置"}),l.map(x=>u.jsx(Ha,{value:x.id,children:x.name},x.id))]})})]})}),u.jsx(jt,{})]})}),u.jsx("div",{className:"flex justify-end",children:u.jsx(Nt,{type:"submit",children:"保存"})})]})})})]})})},kV=()=>{const{config:e,deleteAccess:t}=Jd(),{accesses:n}=e,r=async s=>{const o=await KF(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(Ga,{trigger:u.jsx(Nt,{children:"添加授权"}),op:"add"})]}),n.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(WP,{size:40,className:"text-primary"})}),u.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:"请添加授权开始部署证书吧。"}),u.jsx(Ga,{trigger:u.jsx(Nt,{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:"授权列表"}),n.map(s=>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.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:Yp.get(s.configType)}),u.jsxs("div",{className:"sm:w-52 w-full pt-1 sm:pt-0 flex items-center",children:["创建于 ",s.created&&Sl(s.created)]}),u.jsxs("div",{className:"sm:w-52 w-full pt-1 sm:pt-0 flex items-center",children:["更新于 ",s.updated&&Sl(s.updated)]}),u.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[u.jsx(Ga,{trigger:u.jsx(Nt,{variant:"link",className:"p-0",children:"编辑"}),op:"edit",data:s}),u.jsx(Ft,{orientation:"vertical",className:"h-4 mx-2"}),u.jsx(Nt,{variant:"link",className:"p-0",onClick:()=>{r(s)},children:"删除"})]})]},s.id))]})]})},EV=zl("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"}}),yE=h.forwardRef(({className:e,variant:t,...n},r)=>u.jsx("div",{ref:r,role:"alert",className:ue(EV({variant:t}),e),...n}));yE.displayName="Alert";const xE=h.forwardRef(({className:e,...t},n)=>u.jsx("h5",{ref:n,className:ue("mb-1 font-medium leading-none tracking-tight",e),...t}));xE.displayName="AlertTitle";const wE=h.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:ue("text-sm [&_p]:leading-relaxed",e),...t}));wE.displayName="AlertDescription";const TV=async e=>{let t=1;e.page&&(t=e.page);let n=50;e.perPage&&(n=e.perPage);let r="domain!=null";return e.domain&&(r=`domain="${e.domain}"`),await Zt().collection("deployments").getList(t,n,{filter:r,sort:"-deployedAt",expand:"domain"})},NV=()=>{const e=so(),[t,n]=h.useState(),[r]=AP(),s=r.get("domain");return h.useEffect(()=>{(async()=>{const i={};s&&(i.domain=s);const a=await TV(i);n(a.items)})()},[s]),u.jsxs("div",{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(N_,{size:16,className:"text-green-700"}):u.jsx(R_,{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(Ub,{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:Sl(o.deployedAt)}),u.jsx("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0 sm:ml-2",children:u.jsxs(A1,{children:[u.jsx(I1,{asChild:!0,children:u.jsx(Nt,{variant:"link",className:"p-0",children:"日志"})}),u.jsxs(Cg,{className:"sm:max-w-5xl",children:[u.jsx(F1,{children:u.jsxs(U1,{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(yE,{className:"max-w-[40em] mx-auto mt-20",children:[u.jsx(xE,{children:"暂无数据"}),u.jsxs(wE,{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(Nt,{onClick:()=>{e("/")},children:"添加域名"})})]})]})})]})},RV=e=>e instanceof Error?e.message:typeof e=="object"&&e!==null&&"message"in e?String(e.message):typeof e=="string"?e:"Something went wrong",PV=wt.object({username:wt.string().email({message:"请输入正确的邮箱地址"}),password:wt.string().min(10,{message:"密码至少10个字符"})}),DV=()=>{const e=cf({resolver:uf(PV),defaultValues:{username:"",password:""}}),t=async r=>{try{await Zt().admins.authWithPassword(r.username,r.password),n("/")}catch(s){const o=RV(s);e.setError("username",{message:o}),e.setError("password",{message:o})}},n=so();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(ff,{...e,children:u.jsxs("form",{onSubmit:e.handleSubmit(t),className:"space-y-8",children:[u.jsx(Kt,{control:e.control,name:"username",render:({field:r})=>u.jsxs(Ut,{children:[u.jsx($t,{children:"用户名"}),u.jsx(Vt,{children:u.jsx(gn,{placeholder:"email",...r})}),u.jsx(jt,{})]})}),u.jsx(Kt,{control:e.control,name:"password",render:({field:r})=>u.jsxs(Ut,{children:[u.jsx($t,{children:"密码"}),u.jsx(Vt,{children:u.jsx(gn,{placeholder:"shadcn",...r,type:"password"})}),u.jsx(jt,{})]})}),u.jsx("div",{className:"flex justify-end",children:u.jsx(Nt,{type:"submit",children:"登录"})})]})})]})},MV=()=>Zt().authStore.isValid&&Zt().authStore.isAdmin?u.jsx(b_,{to:"/"}):u.jsx("div",{className:"container",children:u.jsx(C_,{})}),jV=wP([{path:"/",element:u.jsx(QF,{}),children:[{path:"/",element:u.jsx(xU,{})},{path:"/edit",element:u.jsx(CV,{})},{path:"/access",element:u.jsx(kV,{})},{path:"/history",element:u.jsx(NV,{})}]},{path:"/login",element:u.jsx(MV,{}),children:[{path:"/login",element:u.jsx(DV,{})}]},{path:"/about",element:u.jsx("div",{children:"About"})}]);vh.createRoot(document.getElementById("root")).render(u.jsx(je.StrictMode,{children:u.jsx(RP,{router:jV})}))});export default OV(); diff --git a/ui/dist/assets/index-D631C4rs.css b/ui/dist/assets/index-D631C4rs.css deleted file mode 100644 index b4030b09..00000000 --- a/ui/dist/assets/index-D631C4rs.css +++ /dev/null @@ -1 +0,0 @@ -*,: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}.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-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-\[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-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-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}.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-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-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-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-transparent{border-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-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-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.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-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-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\: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\: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/imgs/providers/aliyun.svg b/ui/dist/imgs/providers/aliyun.svg new file mode 100644 index 00000000..dedad191 --- /dev/null +++ b/ui/dist/imgs/providers/aliyun.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ui/dist/imgs/providers/baidu.svg b/ui/dist/imgs/providers/baidu.svg new file mode 100644 index 00000000..5ac20a05 --- /dev/null +++ b/ui/dist/imgs/providers/baidu.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ui/dist/imgs/providers/baisan.avif b/ui/dist/imgs/providers/baisan.avif new file mode 100644 index 0000000000000000000000000000000000000000..1313cda9e89f185f687e9a0b1ec50912b989fbc8 GIT binary patch literal 2163 zcmYjR2{@E(7k-(c(Kl)=ks-3x*kbIIeGidsDoSGvUNd6`lZ>)6RQl788WKY!VI*7f z^GULWw8)YqeYT9U)-+%EX7qRc|8rf>bDwkW`#I-4?{%&h0D%2LR2l^v1qK1U#YYkt zgeHO5AXh82H2?@)CE=-9KF3?AkU(O@FB1SLAddRm<|7dd_?>1K1*DR;IRW0O2@=UT zzGn*nf&f3l+t7FbfUNQSZBL+{NA>b-YY+_E?qr)m@*F&0!oPuy(m~shiRA4D{>SiW zK4V3sgkbqfBp8AJl>q>DVb4Vqw`=mNJ_RWe6dv9NDL66@CBaAvo`?Kp`QMG8fYBg7 z0D-|^Jb+`P&^CzxoF9_Fk%(v+tGi6AzDW{UmYzC1`FZNGzemG`lr0)ojH0)*ArVLm!THsB=@`?7oR(~mOBVs#<}t0T{?_jWKZb%5%yI0ozE9hs8omax`(Eazufa9>!`q(b#$mxP|e>v`V_-@x{a%&rb{KD(ViuUfeT>j3pHoN$V}mz3@mCKd13DhaFJHlvH&N zK0dnnS`MuzW>y?KJr>yhO6@FZcF0&bN)mzp*dS#t?^nLiZ*e3Zjojz?ge|M5Eg|W< zOv-2+H0nj9f4@;usr`O4|1{Zft!a>%X5!7^I_RtpwzdVTC4cjkcX3J&(0x1Rv2n>& z%`Wuv*VHQ4iEHE+=4F8{9_v_by=blgB|PTyoqbsoIR|4Zy)*IF>ztImO-+gweO1!e znq^i4C-(M(7Y=JM5dJfk1x94q1=ag{708Cqc0rn(`N~@MLr`~!*vxPt-GkoaF+2U( z;4Ic+rMoC8j+JKS4K?q^(_)Qxi{;<*H}GnofxonxI`AW%s&IH0+5yFzWD))(Cqbd2 zFx|g)@P-+1AKpwVsQD6d{lN|~h&JNEvZ(3@Iv^9>mQh7>p4K{(XSt-e?i-o_3oC5s zVR8@MeO#^LpqbfKt{X^==@)i1nz}Q9qR@Uk?2z;;0j=hXZe$EOv;Vhy`diF1fFeSLD@g$V+q!Y?ak#gt;LZ}|>T zSl^0QRAYIjzW(G$z%uZ-1DEhV)4* zN|Bjt$W+F?o24kZIwvFU%r}exqe&Lcon&c82+teJ1$AvIx{2F{Gml917R;ZKK4itX zcA0ZbbN!NvL*7ui*$P7=CpdM<{pZ^{n5KDBsH4kp&e4JL?nJ7sR+-4%$DOhz4b0M= zeQ&oop=dGVQ+HkuigrkkOcnbg+ju{Jw3i7{O5#Oa%H8Il%OTzO^Ri=3N}P8lwcKLW z+q3`Qot|Y@*?UZ(Y&Q)q8I9Su1U?c0R)iTX^4mE40-}do?RDG^ z9r3S*_!J){Yc@uzh%hs*(d-<1EcW}h2y9G9o@C+aTM~`WS`TSCDzt#d`wqfx)t>Nw zUVIM1r2kA0(W+Ca>ds;ZjE7dFI7CIFP{Sg`YwrrwHKx+VH1sY`&dcV>NfKO}s$^=_ z7aTX5i)t&V6%ugv6#TyU!a})R%_;#79b1>|)9^f=)+Z(3f6qiH`PJWx`DO*pE{eFW ztP8~_b<7gu`iuS!98E8=g}$lVNOnt_nE>`TLN1w0+crwUoM>UI@&*>4fkLv|i7T%vzV!Ps6U94b-F9y@`>&{hU))wx}!(+k}G6#-xd?56)L>p2^1@Rkr@S(-7}| z3ox7_jDFJp(m?MJu(`pq@eCDYMIB%$VZ`q^b*kmM)}>EaAjdAH`#eoCy*|#c_L=b& PZ_iG4Q?9&zuX^$y-dLD5 literal 0 HcmV?d00001 diff --git a/ui/dist/imgs/providers/qiniu.svg b/ui/dist/imgs/providers/qiniu.svg new file mode 100644 index 00000000..4088190b --- /dev/null +++ b/ui/dist/imgs/providers/qiniu.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ui/dist/imgs/providers/ssh.png b/ui/dist/imgs/providers/ssh.png new file mode 100644 index 0000000000000000000000000000000000000000..d43cf03acb2b63496861ec0fecb37793aa9981cb GIT binary patch literal 1002 zcmeAS@N?(olHy`uVBq!ia0vp^DImM4wIg!tvun1O1nB^I^W&h<(Vz~c9GbnWv(in z9eOR>-g5OsZ4vYd$Q0a?v2>zzxl~8D0b5+*{il0p-aaGw?{f8id6{?5{>?1j_kND0 zaq-T{lO9|2fzi1VW9D%e{t!9?e^BRU9H+ z$!P~47$3T;q|I7!Ub{JH`SWsbj-9!RQ-q4LHwbw8>$E62NljA?>sY@`Qz=T*S|)2y*xVSvvz6h{ApiAKWquPyXvu2^`FV2N-sY@JMWNteBRl#_0v~H zm&PRb?_b{b(Q3;*yU3?ECf(BuNmtZ0dbeasT*Rb0o*g_jw`-ow@n1Tn%=_00hq{CB}e@ouNmwRcR=dXmHdN$AZ#9w+GR2nS#UqF0u$%@o# z^?Uzplktq70`k4sCczWw-3~?P@~5uaJfTkeY3AqK#~!)Gt~%#bHE-9d-ts3?K;pko zJf3oCUF*z$$LcHI24>G~-QtkHbF zE5DtY{7vWYy23=W*?YJBvp!M!!1@7K!JftEw3qmLocoy)r8r4%+6rI*ieB1Nw5?h5 zz}BEru}gay|7*Nlv&8)Q=bzqZ(|Gm(qcZS8uxG#5wMdWir|-_abm@W%e?#syot6qt zU~;GcCWmdniAU|ipBKcd-ga{F \ No newline at end of file diff --git a/ui/dist/imgs/providers/volcengine.svg b/ui/dist/imgs/providers/volcengine.svg new file mode 100644 index 00000000..32d508d0 --- /dev/null +++ b/ui/dist/imgs/providers/volcengine.svg @@ -0,0 +1,13 @@ + + + appbar_logo_dark.2 + + + + + + + + + + \ No newline at end of file diff --git a/ui/dist/imgs/providers/wangsu.svg b/ui/dist/imgs/providers/wangsu.svg new file mode 100644 index 00000000..585b00c5 --- /dev/null +++ b/ui/dist/imgs/providers/wangsu.svg @@ -0,0 +1,9 @@ + + + wangsu + + + + + + \ No newline at end of file diff --git a/ui/dist/index.html b/ui/dist/index.html index 71031739..c390025b 100644 --- a/ui/dist/index.html +++ b/ui/dist/index.html @@ -5,8 +5,8 @@ Certimate - Your Trusted SSL Automation Partner - - + +