Changeset 3468633
- Timestamp:
- 02/24/2026 12:29:19 PM (5 weeks ago)
- Location:
- codeideal-open-fields/trunk
- Files:
-
- 10 edited
-
assets/admin/js/admin.js (modified) (6 diffs)
-
assets/admin/js/block-editor.js (modified) (7 diffs)
-
assets/admin/js/relational-fields.js (modified) (9 diffs)
-
codeideal-open-fields.php (modified) (2 diffs)
-
includes/admin/class-cofld-meta-box.php (modified) (1 diff)
-
includes/class-cofld-assets.php (modified) (1 diff)
-
includes/class-cofld-block.php (modified) (1 diff)
-
includes/class-cofld.php (modified) (1 diff)
-
languages/codeideal-open-fields.pot (modified) (1 diff)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
codeideal-open-fields/trunk/assets/admin/js/admin.js
r3468387 r3468633 1 1 /*! Codeideal Open Fields - Source: https://github.com/novincode/openfields/tree/main/admin/src - Build: pnpm run build */ 2 var q1=Object.defineProperty;var _g=e=>{throw TypeError(e)};var Q1=(e,n,o)=>n in e?q1(e,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[n]=o;var _d=(e,n,o)=>Q1(e,typeof n!="symbol"?n+"":n,o),Dd=(e,n,o)=>n.has(e)||_g("Cannot "+o);var Q=(e,n,o)=>(Dd(e,n,"read from private field"),o?o.call(e):n.get(e)),Ke=(e,n,o)=>n.has(e)?_g("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,o),Ae=(e,n,o,s)=>(Dd(e,n,"write to private field"),s?s.call(e,o):n.set(e,o),o),en=(e,n,o)=>(Dd(e,n,"access private method"),o);var wl=(e,n,o,s)=>({set _(a){Ae(e,n,a,o)},get _(){return Q(e,n,s)}});function J1(e,n){for(var o=0;o<n.length;o++){const s=n[o];if(typeof s!="string"&&!Array.isArray(s)){for(const a in s)if(a!=="default"&&!(a in e)){const l=Object.getOwnPropertyDescriptor(s,a);l&&Object.defineProperty(e,a,l.get?l:{enumerable:!0,get:()=>s[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function py(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ad={exports:{}},_i={},Od={exports:{}},Be={};/** 2 var MD=Object.defineProperty;var aS=T=>{throw TypeError(T)};var ID=(T,nt,St)=>nt in T?MD(T,nt,{enumerable:!0,configurable:!0,writable:!0,value:St}):T[nt]=St;var rh=(T,nt,St)=>ID(T,typeof nt!="symbol"?nt+"":nt,St),oh=(T,nt,St)=>nt.has(T)||aS("Cannot "+St);var J=(T,nt,St)=>(oh(T,nt,"read from private field"),St?St.call(T):nt.get(T)),Xe=(T,nt,St)=>nt.has(T)?aS("Cannot add the same private member more than once"):nt instanceof WeakSet?nt.add(T):nt.set(T,St),Oe=(T,nt,St,To)=>(oh(T,nt,"write to private field"),To?To.call(T,St):nt.set(T,St),St),rn=(T,nt,St)=>(oh(T,nt,"access private method"),St);var tu=(T,nt,St,To)=>({set _(ti){Oe(T,nt,ti,St)},get _(){return J(T,nt,To)}});(function(T){"use strict";var no,bf,b0,zo,ro,Es,S0,Ns,oo,ks,C0,$o,_0,Bo,js,An,Uo,zt,Li,Ho,Qn,Vr,E0,Fi,gr,an,Vo,vr,Ro,N0,Tr,Jn,zi,k0,yr,j0,yt,so,io,Rs,Ts,ao,Ps,Ds,R0;var nt=document.createElement("style");nt.textContent=`*,: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: }/*! tailwindcss v3.4.18 | MIT License | https://tailwindcss.com 3 */*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background: 0 0% 100%;--foreground: 222.2 84% 4.9%;--card: 0 0% 100%;--card-foreground: 222.2 84% 4.9%;--popover: 0 0% 100%;--popover-foreground: 222.2 84% 4.9%;--primary: 222.2 47.4% 11.2%;--primary-foreground: 210 40% 98%;--secondary: 210 40% 96.1%;--secondary-foreground: 222.2 47.4% 11.2%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 46.9%;--accent: 210 40% 96.1%;--accent-foreground: 222.2 47.4% 11.2%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 40% 98%;--border: 214.3 31.8% 91.4%;--input: 214.3 31.8% 91.4%;--ring: 222.2 84% 4.9%;--radius: .5rem;--wp-menu-height-mobile: 46px;--wp-menu-height-desktop: 32px}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}.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}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.bottom-0{bottom:0}.end-1{inset-inline-end:.25rem}.end-3{inset-inline-end:.75rem}.end-4{inset-inline-end:1rem}.left-\\[50\\%\\]{left:50%}.start-2{inset-inline-start:.5rem}.top-0{top:0}.top-1{top:.25rem}.top-1\\/2{top:50%}.top-4{top:1rem}.top-\\[42px\\]{top:42px}.top-\\[50\\%\\]{top:50%}.z-50{z-index:50}.z-\\[10000\\]{z-index:10000}.z-\\[100\\]{z-index:100}.z-\\[30\\]{z-index:30}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-3{margin-top:.75rem;margin-bottom:.75rem}.-mb-px{margin-bottom:-1px}.-me-2\\.5{margin-inline-end:-.625rem}.-ms-5{margin-inline-start:-1.25rem}.-mt-6{margin-top:-1.5rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.me-1{margin-inline-end:.25rem}.me-2{margin-inline-end:.5rem}.ml-auto{margin-left:auto}.ms-1{margin-inline-start:.25rem}.ms-2{margin-inline-start:.5rem}.ms-4{margin-inline-start:1rem}.mt-0\\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-24{margin-top:6rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-auto{margin-top:auto}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-2{height:.5rem}.h-2\\.5{height:.625rem}.h-3{height:.75rem}.h-3\\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-96{height:24rem}.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-\\[--radix-select-content-available-height\\]{max-height:var(--radix-select-content-available-height)}.max-h-\\[300px\\]{max-height:300px}.max-h-screen{max-height:100vh}.min-h-10{min-height:2.5rem}.min-h-\\[calc\\(100vh-200px\\)\\]{min-height:calc(100vh - 200px)}.w-11{width:2.75rem}.w-12{width:3rem}.w-2\\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\\.5{width:.875rem}.w-4{width:1rem}.w-40{width:10rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-72{width:18rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\\[100px\\]{width:100px}.w-\\[130px\\]{width:130px}.w-\\[140px\\]{width:140px}.w-\\[160px\\]{width:160px}.w-\\[var\\(--radix-popover-trigger-width\\)\\]{width:var(--radix-popover-trigger-width)}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-\\[8rem\\]{min-width:8rem}.min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.min-w-max{min-width:-moz-max-content;min-width:max-content}.max-w-5xl{max-width:64rem}.max-w-lg{max-width:32rem}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.flex-auto{flex:1 1 auto}.flex-shrink-0,.shrink-0{flex-shrink:0}.grow{flex-grow:1}.origin-\\[--radix-popover-content-transform-origin\\]{transform-origin:var(--radix-popover-content-transform-origin)}.origin-\\[--radix-select-content-transform-origin\\]{transform-origin:var(--radix-select-content-transform-origin)}.-translate-y-1\\/2{--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))}.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))}.rotate-180{--tw-rotate: 180deg;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))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.items-stretch{align-items:stretch}.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}.gap-6{gap:1.5rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-0\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-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-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity, 1))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-\\[inherit\\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.rounded-t-\\[10px\\]{border-top-left-radius:10px;border-top-right-radius:10px}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-s{border-inline-start-width:1px}.border-s-2{border-inline-start-width:2px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-border{border-color:hsl(var(--border))}.border-destructive{border-color:hsl(var(--destructive))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-input{border-color:hsl(var(--input))}.border-primary{border-color:hsl(var(--primary))}.border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.border-s-transparent{border-inline-start-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-accent{background-color:hsl(var(--accent))}.bg-background{background-color:hsl(var(--background))}.bg-black\\/80{background-color:#000c}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-gray-50\\/50{background-color:#f9fafb80}.bg-muted{background-color:hsl(var(--muted))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-rose-50{--tw-bg-opacity: 1;background-color:rgb(255 241 242 / var(--tw-bg-opacity, 1))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.p-0{padding:0}.p-1{padding:.25rem}.p-12{padding:3rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-\\[1px\\]{padding:1px}.px-0{padding-left:0;padding-right:0}.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-6{padding-left:1.5rem;padding-right:1.5rem}.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-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pe-1{padding-inline-end:.25rem}.pe-2{padding-inline-end:.5rem}.pe-6{padding-inline-end:1.5rem}.ps-4{padding-inline-start:1rem}.ps-8{padding-inline-start:2rem}.ps-9{padding-inline-start:2.25rem}.pt-0{padding-top:0}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.text-center{text-align:center}.text-start{text-align:start}.text-end{text-align:end}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-foreground\\/50{color:hsl(var(--foreground) / .5)}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.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-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-rose-600{--tw-text-opacity: 1;color:rgb(225 29 72 / var(--tw-text-opacity, 1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-90{opacity:.9}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.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-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;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,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-shadow{transition-property:box-shadow;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}@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))}}.duration-200{animation-duration:.2s}.openfields-admin{margin-top:-.625rem;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif}.openfields-admin *,.openfields-admin *:before,.openfields-admin *:after{box-sizing:border-box}.openfields-field{margin-bottom:1rem}.openfields-field__label{margin-bottom:.25rem;display:flex;align-items:center;gap:.25rem}.openfields-field__label label{font-size:.875rem;line-height:1.25rem;font-weight:500}.openfields-field__required{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.openfields-field__description{margin-top:.25rem;font-size:.75rem;line-height:1rem;--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.openfields-field__input input,.openfields-field__input select,.openfields-field__input textarea{width:100%}.openfields-radio-group,.openfields-checkbox-group{display:flex;flex-direction:column;gap:.5rem}.openfields-radio-group label,.openfields-checkbox-group label{display:flex;cursor:pointer;align-items:center;gap:.5rem}.openfields-switch{position:relative;display:inline-flex;height:1.5rem;width:2.75rem;cursor:pointer;align-items:center;border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.openfields-switch:has(input:checked){background-color:hsl(var(--primary))}.openfields-switch input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.openfields-switch__slider{position:absolute;inset-inline-start:.125rem;height:1.25rem;width:1.25rem;border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.openfields-switch input:checked+.openfields-switch__slider{transform:translate(1.25rem)}[dir=rtl] .openfields-switch input:checked+.openfields-switch__slider{transform:translate(-1.25rem)}.openfields-image-field,.openfields-file-field{display:flex;align-items:center;gap:.75rem}.openfields-image-preview{display:flex;height:5rem;width:5rem;align-items:center;justify-content:center;overflow:hidden;border-radius:.25rem;--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.openfields-image-preview img{height:100%;width:100%;-o-object-fit:cover;object-fit:cover}.openfields-field--hidden{display:none}.openfields-meta-box{padding:.5rem}@keyframes slideIn{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.animate-slide-in{animation:slideIn .2s ease-out}label{margin-bottom:.5rem}.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}.file\\:text-foreground::file-selector-button{color:hsl(var(--foreground))}.placeholder\\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.hover\\:border-blue-300:hover{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.hover\\:border-blue-400:hover{--tw-border-opacity: 1;border-color:rgb(96 165 250 / var(--tw-border-opacity, 1))}.hover\\:border-blue-500:hover{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.hover\\:border-gray-300:hover{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.hover\\:border-gray-400:hover{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity, 1))}.hover\\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\\:bg-blue-50:hover{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.hover\\:bg-destructive\\/80:hover{background-color:hsl(var(--destructive) / .8)}.hover\\:bg-destructive\\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.hover\\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\\:bg-primary\\/80:hover{background-color:hsl(var(--primary) / .8)}.hover\\:bg-primary\\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\\:bg-red-50:hover{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.hover\\:bg-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity, 1))}.hover\\:bg-rose-100:hover{--tw-bg-opacity: 1;background-color:rgb(255 228 230 / var(--tw-bg-opacity, 1))}.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-blue-600:hover{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.hover\\:text-foreground:hover{color:hsl(var(--foreground))}.hover\\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.hover\\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.hover\\:text-red-600:hover{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.hover\\:text-red-700:hover{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-100:hover{opacity:1}.hover\\:shadow-md:hover{--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)}.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-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.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-0: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(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)}.focus-visible\\:ring-1: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(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.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))}.active\\:cursor-grabbing:active{cursor:grabbing}.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.toaster .group-\\[\\.toaster\\]\\:border-border{border-color:hsl(var(--border))}.group.toast .group-\\[\\.toast\\]\\:bg-muted{background-color:hsl(var(--muted))}.group.toast .group-\\[\\.toast\\]\\:bg-primary{background-color:hsl(var(--primary))}.group.toaster .group-\\[\\.toaster\\]\\:bg-background{background-color:hsl(var(--background))}.group.destructive .group-\\[\\.destructive\\]\\:text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.group.toast .group-\\[\\.toast\\]\\:text-muted-foreground{color:hsl(var(--muted-foreground))}.group.toast .group-\\[\\.toast\\]\\:text-primary-foreground{color:hsl(var(--primary-foreground))}.group.toaster .group-\\[\\.toaster\\]\\:text-foreground{color:hsl(var(--foreground))}.group.toaster .group-\\[\\.toaster\\]\\: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)}.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, 1))}.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, 1))}.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\\=true\\]\\:pointer-events-none[data-disabled=true],.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))}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height)}to{height:0}}.data-\\[state\\=closed\\]\\:animate-accordion-up[data-state=closed]{animation:accordion-up .2s ease-out}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height)}}.data-\\[state\\=open\\]\\:animate-accordion-down[data-state=open]{animation:accordion-down .2s ease-out}.data-\\[selected\\=\\'true\\'\\]\\:bg-accent[data-selected=true]{background-color:hsl(var(--accent))}.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\\=unchecked\\]\\:bg-input[data-state=unchecked]{background-color:hsl(var(--input))}.data-\\[placeholder\\]\\:text-muted-foreground[data-placeholder]{color:hsl(var(--muted-foreground))}.data-\\[selected\\=true\\]\\:text-accent-foreground[data-selected=true]{color:hsl(var(--accent-foreground))}.data-\\[state\\=open\\]\\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\\[disabled\\=true\\]\\:opacity-50[data-disabled=true],.data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.data-\\[swipe\\=move\\]\\:transition-none[data-swipe=move]{transition-property:none}.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-left-1\\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\\[state\\=closed\\]\\:slide-out-to-right-full[data-state=closed]{--tw-exit-translate-x: 100%}.data-\\[state\\=closed\\]\\:slide-out-to-top-\\[48\\%\\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\\[state\\=open\\]\\:slide-in-from-left-1\\/2[data-state=open]{--tw-enter-translate-x: -50%}.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%}@media(min-width:640px){.sm\\:bottom-0{bottom:0}.sm\\:end-0{inset-inline-end:0px}.sm\\:top-auto{top:auto}.sm\\:mt-0{margin-top:0}.sm\\:inline{display:inline}.sm\\:hidden{display:none}.sm\\:w-64{width:16rem}.sm\\:w-auto{width:auto}.sm\\:max-w-\\[425px\\]{max-width:425px}.sm\\:flex-row{flex-direction:row}.sm\\:flex-col{flex-direction:column}.sm\\:items-center{align-items:center}.sm\\:justify-start{justify-content:flex-start}.sm\\:justify-end{justify-content:flex-end}.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-6{padding:1.5rem}.sm\\:px-4{padding-left:1rem;padding-right:1rem}.sm\\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\\:text-start{text-align:start}.sm\\:text-2xl{font-size:1.5rem;line-height:2rem}.data-\\[state\\=open\\]\\:sm\\:slide-in-from-bottom-full[data-state=open]{--tw-enter-translate-y: 100%}}@media(min-width:768px){.md\\:top-\\[32px\\]{top:32px}.md\\:block{display:block}.md\\:hidden{display:none}.md\\:max-w-\\[420px\\]{max-width:420px}.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\\:text-sm{font-size:.875rem;line-height:1.25rem}}.\\[\\&\\+div\\]\\:text-xs+div{font-size:.75rem;line-height:1rem}.\\[\\&\\>span\\]\\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\\[\\&\\[data-state\\=open\\]\\>svg\\]\\:rotate-180[data-state=open]>svg{--tw-rotate: 180deg;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))}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:py-1\\.5 [cmdk-group-heading]{padding-top:.375rem;padding-bottom:.375rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:font-medium [cmdk-group-heading]{font-weight:500}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:text-muted-foreground [cmdk-group-heading]{color:hsl(var(--muted-foreground))}.\\[\\&_\\[cmdk-group\\]\\:not\\(\\[hidden\\]\\)_\\~\\[cmdk-group\\]\\]\\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\\[\\&_\\[cmdk-group\\]\\]\\:px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\\[\\&_\\[cmdk-input\\]\\]\\:h-12 [cmdk-input]{height:3rem}.\\[\\&_\\[cmdk-item\\]\\]\\:px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-item\\]\\]\\:py-3 [cmdk-item]{padding-top:.75rem;padding-bottom:.75rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:h-5 [cmdk-item] svg{height:1.25rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:w-5 [cmdk-item] svg{width:1.25rem}.\\[\\&_svg\\]\\:pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:size-4 svg{width:1rem;height:1rem}.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0} 4 /*$vite$:1*/`,document.head.appendChild(nt);function St(e,n){for(var o=0;o<n.length;o++){const s=n[o];if(typeof s!="string"&&!Array.isArray(s)){for(const a in s)if(a!=="default"&&!(a in e)){const l=Object.getOwnPropertyDescriptor(s,a);l&&Object.defineProperty(e,a,l.get?l:{enumerable:!0,get:()=>s[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function To(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ti={exports:{}},ni={},nu={exports:{}},Ue={};/** 3 5 * @license React 4 6 * react.production.min.js … … 8 10 * This source code is licensed under the MIT license found in the 9 11 * LICENSE file in the root directory of this source tree. 10 */var Dg;function Z1(){if(Dg)return Be;Dg=1;var e=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),f=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),m=Symbol.iterator;function b(O){return O===null||typeof O!="object"?null:(O=m&&O[m]||O["@@iterator"],typeof O=="function"?O:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,w={};function S(O,K,ne){this.props=O,this.context=K,this.refs=w,this.updater=ne||E}S.prototype.isReactComponent={},S.prototype.setState=function(O,K){if(typeof O!="object"&&typeof O!="function"&&O!=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,O,K,"setState")},S.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function C(){}C.prototype=S.prototype;function j(O,K,ne){this.props=O,this.context=K,this.refs=w,this.updater=ne||E}var N=j.prototype=new C;N.constructor=j,T(N,S.prototype),N.isPureReactComponent=!0;var k=Array.isArray,P=Object.prototype.hasOwnProperty,D={current:null},_={key:!0,ref:!0,__self:!0,__source:!0};function L(O,K,ne){var G,de={},he=null,ae=null;if(K!=null)for(G in K.ref!==void 0&&(ae=K.ref),K.key!==void 0&&(he=""+K.key),K)P.call(K,G)&&!_.hasOwnProperty(G)&&(de[G]=K[G]);var se=arguments.length-2;if(se===1)de.children=ne;else if(1<se){for(var ye=Array(se),fe=0;fe<se;fe++)ye[fe]=arguments[fe+2];de.children=ye}if(O&&O.defaultProps)for(G in se=O.defaultProps,se)de[G]===void 0&&(de[G]=se[G]);return{$$typeof:e,type:O,key:he,ref:ae,props:de,_owner:D.current}}function H(O,K){return{$$typeof:e,type:O.type,key:K,ref:O.ref,props:O.props,_owner:O._owner}}function W(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function U(O){var K={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(ne){return K[ne]})}var ee=/\/+/g;function Y(O,K){return typeof O=="object"&&O!==null&&O.key!=null?U(""+O.key):K.toString(36)}function X(O,K,ne,G,de){var he=typeof O;(he==="undefined"||he==="boolean")&&(O=null);var ae=!1;if(O===null)ae=!0;else switch(he){case"string":case"number":ae=!0;break;case"object":switch(O.$$typeof){case e:case n:ae=!0}}if(ae)return ae=O,de=de(ae),O=G===""?"."+Y(ae,0):G,k(de)?(ne="",O!=null&&(ne=O.replace(ee,"$&/")+"/"),X(de,K,ne,"",function(fe){return fe})):de!=null&&(W(de)&&(de=H(de,ne+(!de.key||ae&&ae.key===de.key?"":(""+de.key).replace(ee,"$&/")+"/")+O)),K.push(de)),1;if(ae=0,G=G===""?".":G+":",k(O))for(var se=0;se<O.length;se++){he=O[se];var ye=G+Y(he,se);ae+=X(he,K,ne,ye,de)}else if(ye=b(O),typeof ye=="function")for(O=ye.call(O),se=0;!(he=O.next()).done;)he=he.value,ye=G+Y(he,se++),ae+=X(he,K,ne,ye,de);else if(he==="object")throw K=String(O),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.");return ae}function le(O,K,ne){if(O==null)return O;var G=[],de=0;return X(O,G,"","",function(he){return K.call(ne,he,de++)}),G}function Z(O){if(O._status===-1){var K=O._result;K=K(),K.then(function(ne){(O._status===0||O._status===-1)&&(O._status=1,O._result=ne)},function(ne){(O._status===0||O._status===-1)&&(O._status=2,O._result=ne)}),O._status===-1&&(O._status=0,O._result=K)}if(O._status===1)return O._result.default;throw O._result}var q={current:null},z={transition:null},J={ReactCurrentDispatcher:q,ReactCurrentBatchConfig:z,ReactCurrentOwner:D};function te(){throw Error("act(...) is not supported in production builds of React.")}return Be.Children={map:le,forEach:function(O,K,ne){le(O,function(){K.apply(this,arguments)},ne)},count:function(O){var K=0;return le(O,function(){K++}),K},toArray:function(O){return le(O,function(K){return K})||[]},only:function(O){if(!W(O))throw Error("React.Children.only expected to receive a single React element child.");return O}},Be.Component=S,Be.Fragment=o,Be.Profiler=a,Be.PureComponent=j,Be.StrictMode=s,Be.Suspense=h,Be.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=J,Be.act=te,Be.cloneElement=function(O,K,ne){if(O==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+O+".");var G=T({},O.props),de=O.key,he=O.ref,ae=O._owner;if(K!=null){if(K.ref!==void 0&&(he=K.ref,ae=D.current),K.key!==void 0&&(de=""+K.key),O.type&&O.type.defaultProps)var se=O.type.defaultProps;for(ye in K)P.call(K,ye)&&!_.hasOwnProperty(ye)&&(G[ye]=K[ye]===void 0&&se!==void 0?se[ye]:K[ye])}var ye=arguments.length-2;if(ye===1)G.children=ne;else if(1<ye){se=Array(ye);for(var fe=0;fe<ye;fe++)se[fe]=arguments[fe+2];G.children=se}return{$$typeof:e,type:O.type,key:de,ref:he,props:G,_owner:ae}},Be.createContext=function(O){return O={$$typeof:f,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},O.Provider={$$typeof:l,_context:O},O.Consumer=O},Be.createElement=L,Be.createFactory=function(O){var K=L.bind(null,O);return K.type=O,K},Be.createRef=function(){return{current:null}},Be.forwardRef=function(O){return{$$typeof:d,render:O}},Be.isValidElement=W,Be.lazy=function(O){return{$$typeof:x,_payload:{_status:-1,_result:O},_init:Z}},Be.memo=function(O,K){return{$$typeof:v,type:O,compare:K===void 0?null:K}},Be.startTransition=function(O){var K=z.transition;z.transition={};try{O()}finally{z.transition=K}},Be.unstable_act=te,Be.useCallback=function(O,K){return q.current.useCallback(O,K)},Be.useContext=function(O){return q.current.useContext(O)},Be.useDebugValue=function(){},Be.useDeferredValue=function(O){return q.current.useDeferredValue(O)},Be.useEffect=function(O,K){return q.current.useEffect(O,K)},Be.useId=function(){return q.current.useId()},Be.useImperativeHandle=function(O,K,ne){return q.current.useImperativeHandle(O,K,ne)},Be.useInsertionEffect=function(O,K){return q.current.useInsertionEffect(O,K)},Be.useLayoutEffect=function(O,K){return q.current.useLayoutEffect(O,K)},Be.useMemo=function(O,K){return q.current.useMemo(O,K)},Be.useReducer=function(O,K,ne){return q.current.useReducer(O,K,ne)},Be.useRef=function(O){return q.current.useRef(O)},Be.useState=function(O){return q.current.useState(O)},Be.useSyncExternalStore=function(O,K,ne){return q.current.useSyncExternalStore(O,K,ne)},Be.useTransition=function(){return q.current.useTransition()},Be.version="18.3.1",Be}var Ag;function Gf(){return Ag||(Ag=1,Od.exports=Z1()),Od.exports}/**12 */var sh;function lS(){if(sh)return Ue;sh=1;var e=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),f=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),m=Symbol.iterator;function b(M){return M===null||typeof M!="object"?null:(M=m&&M[m]||M["@@iterator"],typeof M=="function"?M:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,x={};function S(M,K,re){this.props=M,this.context=K,this.refs=x,this.updater=re||E}S.prototype.isReactComponent={},S.prototype.setState=function(M,K){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,K,"setState")},S.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function C(){}C.prototype=S.prototype;function N(M,K,re){this.props=M,this.context=K,this.refs=x,this.updater=re||E}var _=N.prototype=new C;_.constructor=N,j(_,S.prototype),_.isPureReactComponent=!0;var R=Array.isArray,P=Object.prototype.hasOwnProperty,A={current:null},D={key:!0,ref:!0,__self:!0,__source:!0};function F(M,K,re){var G,fe={},me=null,le=null;if(K!=null)for(G in K.ref!==void 0&&(le=K.ref),K.key!==void 0&&(me=""+K.key),K)P.call(K,G)&&!D.hasOwnProperty(G)&&(fe[G]=K[G]);var ie=arguments.length-2;if(ie===1)fe.children=re;else if(1<ie){for(var we=Array(ie),pe=0;pe<ie;pe++)we[pe]=arguments[pe+2];fe.children=we}if(M&&M.defaultProps)for(G in ie=M.defaultProps,ie)fe[G]===void 0&&(fe[G]=ie[G]);return{$$typeof:e,type:M,key:me,ref:le,props:fe,_owner:A.current}}function V(M,K){return{$$typeof:e,type:M.type,key:K,ref:M.ref,props:M.props,_owner:M._owner}}function Y(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function H(M){var K={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(re){return K[re]})}var te=/\/+/g;function X(M,K){return typeof M=="object"&&M!==null&&M.key!=null?H(""+M.key):K.toString(36)}function q(M,K,re,G,fe){var me=typeof M;(me==="undefined"||me==="boolean")&&(M=null);var le=!1;if(M===null)le=!0;else switch(me){case"string":case"number":le=!0;break;case"object":switch(M.$$typeof){case e:case n:le=!0}}if(le)return le=M,fe=fe(le),M=G===""?"."+X(le,0):G,R(fe)?(re="",M!=null&&(re=M.replace(te,"$&/")+"/"),q(fe,K,re,"",function(pe){return pe})):fe!=null&&(Y(fe)&&(fe=V(fe,re+(!fe.key||le&&le.key===fe.key?"":(""+fe.key).replace(te,"$&/")+"/")+M)),K.push(fe)),1;if(le=0,G=G===""?".":G+":",R(M))for(var ie=0;ie<M.length;ie++){me=M[ie];var we=G+X(me,ie);le+=q(me,K,re,we,fe)}else if(we=b(M),typeof we=="function")for(M=we.call(M),ie=0;!(me=M.next()).done;)me=me.value,we=G+X(me,ie++),le+=q(me,K,re,we,fe);else if(me==="object")throw K=String(M),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.");return le}function ce(M,K,re){if(M==null)return M;var G=[],fe=0;return q(M,G,"","",function(me){return K.call(re,me,fe++)}),G}function ee(M){if(M._status===-1){var K=M._result;K=K(),K.then(function(re){(M._status===0||M._status===-1)&&(M._status=1,M._result=re)},function(re){(M._status===0||M._status===-1)&&(M._status=2,M._result=re)}),M._status===-1&&(M._status=0,M._result=K)}if(M._status===1)return M._result.default;throw M._result}var Q={current:null},B={transition:null},Z={ReactCurrentDispatcher:Q,ReactCurrentBatchConfig:B,ReactCurrentOwner:A};function ne(){throw Error("act(...) is not supported in production builds of React.")}return Ue.Children={map:ce,forEach:function(M,K,re){ce(M,function(){K.apply(this,arguments)},re)},count:function(M){var K=0;return ce(M,function(){K++}),K},toArray:function(M){return ce(M,function(K){return K})||[]},only:function(M){if(!Y(M))throw Error("React.Children.only expected to receive a single React element child.");return M}},Ue.Component=S,Ue.Fragment=o,Ue.Profiler=a,Ue.PureComponent=N,Ue.StrictMode=s,Ue.Suspense=h,Ue.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Z,Ue.act=ne,Ue.cloneElement=function(M,K,re){if(M==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+M+".");var G=j({},M.props),fe=M.key,me=M.ref,le=M._owner;if(K!=null){if(K.ref!==void 0&&(me=K.ref,le=A.current),K.key!==void 0&&(fe=""+K.key),M.type&&M.type.defaultProps)var ie=M.type.defaultProps;for(we in K)P.call(K,we)&&!D.hasOwnProperty(we)&&(G[we]=K[we]===void 0&&ie!==void 0?ie[we]:K[we])}var we=arguments.length-2;if(we===1)G.children=re;else if(1<we){ie=Array(we);for(var pe=0;pe<we;pe++)ie[pe]=arguments[pe+2];G.children=ie}return{$$typeof:e,type:M.type,key:fe,ref:me,props:G,_owner:le}},Ue.createContext=function(M){return M={$$typeof:f,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},M.Provider={$$typeof:l,_context:M},M.Consumer=M},Ue.createElement=F,Ue.createFactory=function(M){var K=F.bind(null,M);return K.type=M,K},Ue.createRef=function(){return{current:null}},Ue.forwardRef=function(M){return{$$typeof:d,render:M}},Ue.isValidElement=Y,Ue.lazy=function(M){return{$$typeof:w,_payload:{_status:-1,_result:M},_init:ee}},Ue.memo=function(M,K){return{$$typeof:v,type:M,compare:K===void 0?null:K}},Ue.startTransition=function(M){var K=B.transition;B.transition={};try{M()}finally{B.transition=K}},Ue.unstable_act=ne,Ue.useCallback=function(M,K){return Q.current.useCallback(M,K)},Ue.useContext=function(M){return Q.current.useContext(M)},Ue.useDebugValue=function(){},Ue.useDeferredValue=function(M){return Q.current.useDeferredValue(M)},Ue.useEffect=function(M,K){return Q.current.useEffect(M,K)},Ue.useId=function(){return Q.current.useId()},Ue.useImperativeHandle=function(M,K,re){return Q.current.useImperativeHandle(M,K,re)},Ue.useInsertionEffect=function(M,K){return Q.current.useInsertionEffect(M,K)},Ue.useLayoutEffect=function(M,K){return Q.current.useLayoutEffect(M,K)},Ue.useMemo=function(M,K){return Q.current.useMemo(M,K)},Ue.useReducer=function(M,K,re){return Q.current.useReducer(M,K,re)},Ue.useRef=function(M){return Q.current.useRef(M)},Ue.useState=function(M){return Q.current.useState(M)},Ue.useSyncExternalStore=function(M,K,re){return Q.current.useSyncExternalStore(M,K,re)},Ue.useTransition=function(){return Q.current.useTransition()},Ue.version="18.3.1",Ue}var ih;function ru(){return ih||(ih=1,nu.exports=lS()),nu.exports}/** 11 13 * @license React 12 14 * react-jsx-runtime.production.min.js … … 16 18 * This source code is licensed under the MIT license found in the 17 19 * LICENSE file in the root directory of this source tree. 18 */var Og;function eC(){if(Og)return _i;Og=1;var e=Gf(),n=Symbol.for("react.element"),o=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function f(d,h,v){var x,m={},b=null,E=null;v!==void 0&&(b=""+v),h.key!==void 0&&(b=""+h.key),h.ref!==void 0&&(E=h.ref);for(x in h)s.call(h,x)&&!l.hasOwnProperty(x)&&(m[x]=h[x]);if(d&&d.defaultProps)for(x in h=d.defaultProps,h)m[x]===void 0&&(m[x]=h[x]);return{$$typeof:n,type:d,key:b,ref:E,props:m,_owner:a.current}}return _i.Fragment=o,_i.jsx=f,_i.jsxs=f,_i}var Mg;function tC(){return Mg||(Mg=1,Ad.exports=eC()),Ad.exports}var c=tC(),g=Gf();const F=py(g),Xf=J1({__proto__:null,default:F},[g]);var bl={},Md={exports:{}},gn={},Id={exports:{}},Ld={};/**20 */var ah;function cS(){if(ah)return ni;ah=1;var e=ru(),n=Symbol.for("react.element"),o=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function f(d,h,v){var w,m={},b=null,E=null;v!==void 0&&(b=""+v),h.key!==void 0&&(b=""+h.key),h.ref!==void 0&&(E=h.ref);for(w in h)s.call(h,w)&&!l.hasOwnProperty(w)&&(m[w]=h[w]);if(d&&d.defaultProps)for(w in h=d.defaultProps,h)m[w]===void 0&&(m[w]=h[w]);return{$$typeof:n,type:d,key:b,ref:E,props:m,_owner:a.current}}return ni.Fragment=o,ni.jsx=f,ni.jsxs=f,ni}var lh;function uS(){return lh||(lh=1,ti.exports=cS()),ti.exports}var c=uS(),g=ru();const z=To(g),ou=St({__proto__:null,default:z},[g]);var xa={},su={exports:{}},un={},iu={exports:{}},au={};/** 19 21 * @license React 20 22 * scheduler.production.min.js … … 24 26 * This source code is licensed under the MIT license found in the 25 27 * LICENSE file in the root directory of this source tree. 26 */var Ig;function nC(){return Ig||(Ig=1,(function(e){function n(z,J){var te=z.length;z.push(J);e:for(;0<te;){var O=te-1>>>1,K=z[O];if(0<a(K,J))z[O]=J,z[te]=K,te=O;else break e}}function o(z){return z.length===0?null:z[0]}function s(z){if(z.length===0)return null;var J=z[0],te=z.pop();if(te!==J){z[0]=te;e:for(var O=0,K=z.length,ne=K>>>1;O<ne;){var G=2*(O+1)-1,de=z[G],he=G+1,ae=z[he];if(0>a(de,te))he<K&&0>a(ae,de)?(z[O]=ae,z[he]=te,O=he):(z[O]=de,z[G]=te,O=G);else if(he<K&&0>a(ae,te))z[O]=ae,z[he]=te,O=he;else break e}}return J}function a(z,J){var te=z.sortIndex-J.sortIndex;return te!==0?te:z.id-J.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var f=Date,d=f.now();e.unstable_now=function(){return f.now()-d}}var h=[],v=[],x=1,m=null,b=3,E=!1,T=!1,w=!1,S=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function N(z){for(var J=o(v);J!==null;){if(J.callback===null)s(v);else if(J.startTime<=z)s(v),J.sortIndex=J.expirationTime,n(h,J);else break;J=o(v)}}function k(z){if(w=!1,N(z),!T)if(o(h)!==null)T=!0,Z(P);else{var J=o(v);J!==null&&q(k,J.startTime-z)}}function P(z,J){T=!1,w&&(w=!1,C(L),L=-1),E=!0;var te=b;try{for(N(J),m=o(h);m!==null&&(!(m.expirationTime>J)||z&&!U());){var O=m.callback;if(typeof O=="function"){m.callback=null,b=m.priorityLevel;var K=O(m.expirationTime<=J);J=e.unstable_now(),typeof K=="function"?m.callback=K:m===o(h)&&s(h),N(J)}else s(h);m=o(h)}if(m!==null)var ne=!0;else{var G=o(v);G!==null&&q(k,G.startTime-J),ne=!1}return ne}finally{m=null,b=te,E=!1}}var D=!1,_=null,L=-1,H=5,W=-1;function U(){return!(e.unstable_now()-W<H)}function ee(){if(_!==null){var z=e.unstable_now();W=z;var J=!0;try{J=_(!0,z)}finally{J?Y():(D=!1,_=null)}}else D=!1}var Y;if(typeof j=="function")Y=function(){j(ee)};else if(typeof MessageChannel<"u"){var X=new MessageChannel,le=X.port2;X.port1.onmessage=ee,Y=function(){le.postMessage(null)}}else Y=function(){S(ee,0)};function Z(z){_=z,D||(D=!0,Y())}function q(z,J){L=S(function(){z(e.unstable_now())},J)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(z){z.callback=null},e.unstable_continueExecution=function(){T||E||(T=!0,Z(P))},e.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):H=0<z?Math.floor(1e3/z):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_getFirstCallbackNode=function(){return o(h)},e.unstable_next=function(z){switch(b){case 1:case 2:case 3:var J=3;break;default:J=b}var te=b;b=J;try{return z()}finally{b=te}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(z,J){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var te=b;b=z;try{return J()}finally{b=te}},e.unstable_scheduleCallback=function(z,J,te){var O=e.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?O+te:O):te=O,z){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=te+K,z={id:x++,callback:J,priorityLevel:z,startTime:te,expirationTime:K,sortIndex:-1},te>O?(z.sortIndex=te,n(v,z),o(h)===null&&z===o(v)&&(w?(C(L),L=-1):w=!0,q(k,te-O))):(z.sortIndex=K,n(h,z),T||E||(T=!0,Z(P))),z},e.unstable_shouldYield=U,e.unstable_wrapCallback=function(z){var J=b;return function(){var te=b;b=J;try{return z.apply(this,arguments)}finally{b=te}}}})(Ld)),Ld}var Lg;function rC(){return Lg||(Lg=1,Id.exports=nC()),Id.exports}/**28 */var ch;function dS(){return ch||(ch=1,(function(e){function n(B,Z){var ne=B.length;B.push(Z);e:for(;0<ne;){var M=ne-1>>>1,K=B[M];if(0<a(K,Z))B[M]=Z,B[ne]=K,ne=M;else break e}}function o(B){return B.length===0?null:B[0]}function s(B){if(B.length===0)return null;var Z=B[0],ne=B.pop();if(ne!==Z){B[0]=ne;e:for(var M=0,K=B.length,re=K>>>1;M<re;){var G=2*(M+1)-1,fe=B[G],me=G+1,le=B[me];if(0>a(fe,ne))me<K&&0>a(le,fe)?(B[M]=le,B[me]=ne,M=me):(B[M]=fe,B[G]=ne,M=G);else if(me<K&&0>a(le,ne))B[M]=le,B[me]=ne,M=me;else break e}}return Z}function a(B,Z){var ne=B.sortIndex-Z.sortIndex;return ne!==0?ne:B.id-Z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var f=Date,d=f.now();e.unstable_now=function(){return f.now()-d}}var h=[],v=[],w=1,m=null,b=3,E=!1,j=!1,x=!1,S=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(B){for(var Z=o(v);Z!==null;){if(Z.callback===null)s(v);else if(Z.startTime<=B)s(v),Z.sortIndex=Z.expirationTime,n(h,Z);else break;Z=o(v)}}function R(B){if(x=!1,_(B),!j)if(o(h)!==null)j=!0,ee(P);else{var Z=o(v);Z!==null&&Q(R,Z.startTime-B)}}function P(B,Z){j=!1,x&&(x=!1,C(F),F=-1),E=!0;var ne=b;try{for(_(Z),m=o(h);m!==null&&(!(m.expirationTime>Z)||B&&!H());){var M=m.callback;if(typeof M=="function"){m.callback=null,b=m.priorityLevel;var K=M(m.expirationTime<=Z);Z=e.unstable_now(),typeof K=="function"?m.callback=K:m===o(h)&&s(h),_(Z)}else s(h);m=o(h)}if(m!==null)var re=!0;else{var G=o(v);G!==null&&Q(R,G.startTime-Z),re=!1}return re}finally{m=null,b=ne,E=!1}}var A=!1,D=null,F=-1,V=5,Y=-1;function H(){return!(e.unstable_now()-Y<V)}function te(){if(D!==null){var B=e.unstable_now();Y=B;var Z=!0;try{Z=D(!0,B)}finally{Z?X():(A=!1,D=null)}}else A=!1}var X;if(typeof N=="function")X=function(){N(te)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,ce=q.port2;q.port1.onmessage=te,X=function(){ce.postMessage(null)}}else X=function(){S(te,0)};function ee(B){D=B,A||(A=!0,X())}function Q(B,Z){F=S(function(){B(e.unstable_now())},Z)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(B){B.callback=null},e.unstable_continueExecution=function(){j||E||(j=!0,ee(P))},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):V=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_getFirstCallbackNode=function(){return o(h)},e.unstable_next=function(B){switch(b){case 1:case 2:case 3:var Z=3;break;default:Z=b}var ne=b;b=Z;try{return B()}finally{b=ne}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(B,Z){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var ne=b;b=B;try{return Z()}finally{b=ne}},e.unstable_scheduleCallback=function(B,Z,ne){var M=e.unstable_now();switch(typeof ne=="object"&&ne!==null?(ne=ne.delay,ne=typeof ne=="number"&&0<ne?M+ne:M):ne=M,B){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=ne+K,B={id:w++,callback:Z,priorityLevel:B,startTime:ne,expirationTime:K,sortIndex:-1},ne>M?(B.sortIndex=ne,n(v,B),o(h)===null&&B===o(v)&&(x?(C(F),F=-1):x=!0,Q(R,ne-M))):(B.sortIndex=K,n(h,B),j||E||(j=!0,ee(P))),B},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(B){var Z=b;return function(){var ne=b;b=Z;try{return B.apply(this,arguments)}finally{b=ne}}}})(au)),au}var uh;function fS(){return uh||(uh=1,iu.exports=dS()),iu.exports}/** 27 29 * @license React 28 30 * react-dom.production.min.js … … 32 34 * This source code is licensed under the MIT license found in the 33 35 * LICENSE file in the root directory of this source tree. 34 */var Fg;function oC(){if(Fg)return gn;Fg=1;var e=Gf(),n=rC();function o(t){for(var r="https://reactjs.org/docs/error-decoder.html?invariant="+t,i=1;i<arguments.length;i++)r+="&args[]="+encodeURIComponent(arguments[i]);return"Minified React error #"+t+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=new Set,a={};function l(t,r){f(t,r),f(t+"Capture",r)}function f(t,r){for(a[t]=r,t=0;t<r.length;t++)s.add(r[t])}var d=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,v=/^[: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]*$/,x={},m={};function b(t){return h.call(m,t)?!0:h.call(x,t)?!1:v.test(t)?m[t]=!0:(x[t]=!0,!1)}function E(t,r,i,u){if(i!==null&&i.type===0)return!1;switch(typeof r){case"function":case"symbol":return!0;case"boolean":return u?!1:i!==null?!i.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function T(t,r,i,u){if(r===null||typeof r>"u"||E(t,r,i,u))return!0;if(u)return!1;if(i!==null)switch(i.type){case 3:return!r;case 4:return r===!1;case 5:return isNaN(r);case 6:return isNaN(r)||1>r}return!1}function w(t,r,i,u,p,y,R){this.acceptsBooleans=r===2||r===3||r===4,this.attributeName=u,this.attributeNamespace=p,this.mustUseProperty=i,this.propertyName=t,this.type=r,this.sanitizeURL=y,this.removeEmptyString=R}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){S[t]=new w(t,0,!1,t,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var r=t[0];S[r]=new w(r,1,!1,t[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(t){S[t]=new w(t,2,!1,t.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){S[t]=new w(t,2,!1,t,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(t){S[t]=new w(t,3,!1,t.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(t){S[t]=new w(t,3,!0,t,null,!1,!1)}),["capture","download"].forEach(function(t){S[t]=new w(t,4,!1,t,null,!1,!1)}),["cols","rows","size","span"].forEach(function(t){S[t]=new w(t,6,!1,t,null,!1,!1)}),["rowSpan","start"].forEach(function(t){S[t]=new w(t,5,!1,t.toLowerCase(),null,!1,!1)});var C=/[\-:]([a-z])/g;function j(t){return t[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(t){var r=t.replace(C,j);S[r]=new w(r,1,!1,t,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var r=t.replace(C,j);S[r]=new w(r,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(t){var r=t.replace(C,j);S[r]=new w(r,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(t){S[t]=new w(t,1,!1,t.toLowerCase(),null,!1,!1)}),S.xlinkHref=new w("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(t){S[t]=new w(t,1,!1,t.toLowerCase(),null,!0,!0)});function N(t,r,i,u){var p=S.hasOwnProperty(r)?S[r]:null;(p!==null?p.type!==0:u||!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(T(r,i,p,u)&&(i=null),u||p===null?b(r)&&(i===null?t.removeAttribute(r):t.setAttribute(r,""+i)):p.mustUseProperty?t[p.propertyName]=i===null?p.type===3?!1:"":i:(r=p.attributeName,u=p.attributeNamespace,i===null?t.removeAttribute(r):(p=p.type,i=p===3||p===4&&i===!0?"":""+i,u?t.setAttributeNS(u,r,i):t.setAttribute(r,i))))}var k=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,P=Symbol.for("react.element"),D=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),H=Symbol.for("react.profiler"),W=Symbol.for("react.provider"),U=Symbol.for("react.context"),ee=Symbol.for("react.forward_ref"),Y=Symbol.for("react.suspense"),X=Symbol.for("react.suspense_list"),le=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),q=Symbol.for("react.offscreen"),z=Symbol.iterator;function J(t){return t===null||typeof t!="object"?null:(t=z&&t[z]||t["@@iterator"],typeof t=="function"?t:null)}var te=Object.assign,O;function K(t){if(O===void 0)try{throw Error()}catch(i){var r=i.stack.trim().match(/\n( *(at )?)/);O=r&&r[1]||""}return`35 `+ O+t}var ne=!1;function G(t,r){if(!t||ne)return"";ne=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(r)if(r=function(){throw Error()},Object.defineProperty(r.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(r,[])}catch(V){var u=V}Reflect.construct(t,[],r)}else{try{r.call()}catch(V){u=V}t.call(r.prototype)}else{try{throw Error()}catch(V){u=V}t()}}catch(V){if(V&&u&&typeof V.stack=="string"){for(var p=V.stack.split(`36 */var dh;function pS(){if(dh)return un;dh=1;var e=ru(),n=fS();function o(t){for(var r="https://reactjs.org/docs/error-decoder.html?invariant="+t,i=1;i<arguments.length;i++)r+="&args[]="+encodeURIComponent(arguments[i]);return"Minified React error #"+t+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=new Set,a={};function l(t,r){f(t,r),f(t+"Capture",r)}function f(t,r){for(a[t]=r,t=0;t<r.length;t++)s.add(r[t])}var d=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,v=/^[: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]*$/,w={},m={};function b(t){return h.call(m,t)?!0:h.call(w,t)?!1:v.test(t)?m[t]=!0:(w[t]=!0,!1)}function E(t,r,i,u){if(i!==null&&i.type===0)return!1;switch(typeof r){case"function":case"symbol":return!0;case"boolean":return u?!1:i!==null?!i.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function j(t,r,i,u){if(r===null||typeof r>"u"||E(t,r,i,u))return!0;if(u)return!1;if(i!==null)switch(i.type){case 3:return!r;case 4:return r===!1;case 5:return isNaN(r);case 6:return isNaN(r)||1>r}return!1}function x(t,r,i,u,p,y,k){this.acceptsBooleans=r===2||r===3||r===4,this.attributeName=u,this.attributeNamespace=p,this.mustUseProperty=i,this.propertyName=t,this.type=r,this.sanitizeURL=y,this.removeEmptyString=k}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){S[t]=new x(t,0,!1,t,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var r=t[0];S[r]=new x(r,1,!1,t[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(t){S[t]=new x(t,2,!1,t.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){S[t]=new x(t,2,!1,t,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(t){S[t]=new x(t,3,!1,t.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(t){S[t]=new x(t,3,!0,t,null,!1,!1)}),["capture","download"].forEach(function(t){S[t]=new x(t,4,!1,t,null,!1,!1)}),["cols","rows","size","span"].forEach(function(t){S[t]=new x(t,6,!1,t,null,!1,!1)}),["rowSpan","start"].forEach(function(t){S[t]=new x(t,5,!1,t.toLowerCase(),null,!1,!1)});var C=/[\-:]([a-z])/g;function N(t){return t[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(t){var r=t.replace(C,N);S[r]=new x(r,1,!1,t,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var r=t.replace(C,N);S[r]=new x(r,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(t){var r=t.replace(C,N);S[r]=new x(r,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(t){S[t]=new x(t,1,!1,t.toLowerCase(),null,!1,!1)}),S.xlinkHref=new x("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(t){S[t]=new x(t,1,!1,t.toLowerCase(),null,!0,!0)});function _(t,r,i,u){var p=S.hasOwnProperty(r)?S[r]:null;(p!==null?p.type!==0:u||!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(j(r,i,p,u)&&(i=null),u||p===null?b(r)&&(i===null?t.removeAttribute(r):t.setAttribute(r,""+i)):p.mustUseProperty?t[p.propertyName]=i===null?p.type===3?!1:"":i:(r=p.attributeName,u=p.attributeNamespace,i===null?t.removeAttribute(r):(p=p.type,i=p===3||p===4&&i===!0?"":""+i,u?t.setAttributeNS(u,r,i):t.setAttribute(r,i))))}var R=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,P=Symbol.for("react.element"),A=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),F=Symbol.for("react.strict_mode"),V=Symbol.for("react.profiler"),Y=Symbol.for("react.provider"),H=Symbol.for("react.context"),te=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),q=Symbol.for("react.suspense_list"),ce=Symbol.for("react.memo"),ee=Symbol.for("react.lazy"),Q=Symbol.for("react.offscreen"),B=Symbol.iterator;function Z(t){return t===null||typeof t!="object"?null:(t=B&&t[B]||t["@@iterator"],typeof t=="function"?t:null)}var ne=Object.assign,M;function K(t){if(M===void 0)try{throw Error()}catch(i){var r=i.stack.trim().match(/\n( *(at )?)/);M=r&&r[1]||""}return` 37 `+M+t}var re=!1;function G(t,r){if(!t||re)return"";re=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(r)if(r=function(){throw Error()},Object.defineProperty(r.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(r,[])}catch(W){var u=W}Reflect.construct(t,[],r)}else{try{r.call()}catch(W){u=W}t.call(r.prototype)}else{try{throw Error()}catch(W){u=W}t()}}catch(W){if(W&&u&&typeof W.stack=="string"){for(var p=W.stack.split(` 36 38 `),y=u.stack.split(` 37 `), R=p.length-1,A=y.length-1;1<=R&&0<=A&&p[R]!==y[A];)A--;for(;1<=R&&0<=A;R--,A--)if(p[R]!==y[A]){if(R!==1||A!==1)do if(R--,A--,0>A||p[R]!==y[A]){var M=`38 `+p[ R].replace(" at new "," at ");return t.displayName&&M.includes("<anonymous>")&&(M=M.replace("<anonymous>",t.displayName)),M}while(1<=R&&0<=A);break}}}finally{ne=!1,Error.prepareStackTrace=i}return(t=t?t.displayName||t.name:"")?K(t):""}function de(t){switch(t.tag){case 5:return K(t.type);case 16:return K("Lazy");case 13:return K("Suspense");case 19:return K("SuspenseList");case 0:case 2:case 15:return t=G(t.type,!1),t;case 11:return t=G(t.type.render,!1),t;case 1:return t=G(t.type,!0),t;default:return""}}function he(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case _:return"Fragment";case D:return"Portal";case H:return"Profiler";case L:return"StrictMode";case Y:return"Suspense";case X:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case U:return(t.displayName||"Context")+".Consumer";case W:return(t._context.displayName||"Context")+".Provider";case ee:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case le:return r=t.displayName||null,r!==null?r:he(t.type)||"Memo";case Z:r=t._payload,t=t._init;try{return he(t(r))}catch{}}return null}function ae(t){var r=t.type;switch(t.tag){case 24:return"Cache";case 9:return(r.displayName||"Context")+".Consumer";case 10:return(r._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=r.render,t=t.displayName||t.name||"",r.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return r;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return he(r);case 8:return r===L?"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 r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r}return null}function se(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function ye(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function fe(t){var r=ye(t)?"checked":"value",i=Object.getOwnPropertyDescriptor(t.constructor.prototype,r),u=""+t[r];if(!t.hasOwnProperty(r)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var p=i.get,y=i.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return p.call(this)},set:function(R){u=""+R,y.call(this,R)}}),Object.defineProperty(t,r,{enumerable:i.enumerable}),{getValue:function(){return u},setValue:function(R){u=""+R},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function Ne(t){t._valueTracker||(t._valueTracker=fe(t))}function ce(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var i=r.getValue(),u="";return t&&(u=ye(t)?t.checked?"true":"false":t.value),t=u,t!==i?(r.setValue(t),!0):!1}function Oe(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function pe(t,r){var i=r.checked;return te({},r,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:i??t._wrapperState.initialChecked})}function Ze(t,r){var i=r.defaultValue==null?"":r.defaultValue,u=r.checked!=null?r.checked:r.defaultChecked;i=se(r.value!=null?r.value:i),t._wrapperState={initialChecked:u,initialValue:i,controlled:r.type==="checkbox"||r.type==="radio"?r.checked!=null:r.value!=null}}function wt(t,r){r=r.checked,r!=null&&N(t,"checked",r,!1)}function gt(t,r){wt(t,r);var i=se(r.value),u=r.type;if(i!=null)u==="number"?(i===0&&t.value===""||t.value!=i)&&(t.value=""+i):t.value!==""+i&&(t.value=""+i);else if(u==="submit"||u==="reset"){t.removeAttribute("value");return}r.hasOwnProperty("value")?at(t,r.type,i):r.hasOwnProperty("defaultValue")&&at(t,r.type,se(r.defaultValue)),r.checked==null&&r.defaultChecked!=null&&(t.defaultChecked=!!r.defaultChecked)}function jn(t,r,i){if(r.hasOwnProperty("value")||r.hasOwnProperty("defaultValue")){var u=r.type;if(!(u!=="submit"&&u!=="reset"||r.value!==void 0&&r.value!==null))return;r=""+t._wrapperState.initialValue,i||r===t.value||(t.value=r),t.defaultValue=r}i=t.name,i!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,i!==""&&(t.name=i)}function at(t,r,i){(r!=="number"||Oe(t.ownerDocument)!==t)&&(i==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+i&&(t.defaultValue=""+i))}var ut=Array.isArray;function Xt(t,r,i,u){if(t=t.options,r){r={};for(var p=0;p<i.length;p++)r["$"+i[p]]=!0;for(i=0;i<t.length;i++)p=r.hasOwnProperty("$"+t[i].value),t[i].selected!==p&&(t[i].selected=p),p&&u&&(t[i].defaultSelected=!0)}else{for(i=""+se(i),r=null,p=0;p<t.length;p++){if(t[p].value===i){t[p].selected=!0,u&&(t[p].defaultSelected=!0);return}r!==null||t[p].disabled||(r=t[p])}r!==null&&(r.selected=!0)}}function lt(t,r){if(r.dangerouslySetInnerHTML!=null)throw Error(o(91));return te({},r,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function Dt(t,r){var i=r.value;if(i==null){if(i=r.children,r=r.defaultValue,i!=null){if(r!=null)throw Error(o(92));if(ut(i)){if(1<i.length)throw Error(o(93));i=i[0]}r=i}r==null&&(r=""),i=r}t._wrapperState={initialValue:se(i)}}function Sr(t,r){var i=se(r.value),u=se(r.defaultValue);i!=null&&(i=""+i,i!==t.value&&(t.value=i),r.defaultValue==null&&t.defaultValue!==i&&(t.defaultValue=i)),u!=null&&(t.defaultValue=""+u)}function Cr(t){var r=t.textContent;r===t._wrapperState.initialValue&&r!==""&&r!==null&&(t.value=r)}function $n(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function an(t,r){return t==null||t==="http://www.w3.org/1999/xhtml"?$n(r):t==="http://www.w3.org/2000/svg"&&r==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var Nt,ln=(function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(r,i,u,p){MSApp.execUnsafeLocalFunction(function(){return t(r,i,u,p)})}:t})(function(t,r){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=r;else{for(Nt=Nt||document.createElement("div"),Nt.innerHTML="<svg>"+r.valueOf().toString()+"</svg>",r=Nt.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;r.firstChild;)t.appendChild(r.firstChild)}});function At(t,r){if(r){var i=t.firstChild;if(i&&i===t.lastChild&&i.nodeType===3){i.nodeValue=r;return}}t.textContent=r}var jt={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},Ht=["Webkit","ms","Moz","O"];Object.keys(jt).forEach(function(t){Ht.forEach(function(r){r=r+t.charAt(0).toUpperCase()+t.substring(1),jt[r]=jt[t]})});function Er(t,r,i){return r==null||typeof r=="boolean"||r===""?"":i||typeof r!="number"||r===0||jt.hasOwnProperty(t)&&jt[t]?(""+r).trim():r+"px"}function Ur(t,r){t=t.style;for(var i in r)if(r.hasOwnProperty(i)){var u=i.indexOf("--")===0,p=Er(i,r[i],u);i==="float"&&(i="cssFloat"),u?t.setProperty(i,p):t[i]=p}}var sr=te({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 zn(t,r){if(r){if(sr[t]&&(r.children!=null||r.dangerouslySetInnerHTML!=null))throw Error(o(137,t));if(r.dangerouslySetInnerHTML!=null){if(r.children!=null)throw Error(o(60));if(typeof r.dangerouslySetInnerHTML!="object"||!("__html"in r.dangerouslySetInnerHTML))throw Error(o(61))}if(r.style!=null&&typeof r.style!="object")throw Error(o(62))}}function Nr(t,r){if(t.indexOf("-")===-1)return typeof r.is=="string";switch(t){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 Rn=null;function we(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var He=null,Ve=null,Ce=null;function Le(t){if(t=gi(t)){if(typeof He!="function")throw Error(o(280));var r=t.stateNode;r&&(r=Ma(r),He(t.stateNode,t.type,r))}}function me(t){Ve?Ce?Ce.push(t):Ce=[t]:Ve=t}function De(){if(Ve){var t=Ve,r=Ce;if(Ce=Ve=null,Le(t),r)for(t=0;t<r.length;t++)Le(r[t])}}function Fe(t,r){return t(r)}function Me(){}var tt=!1;function We(t,r,i){if(tt)return t(r,i);tt=!0;try{return Fe(t,r,i)}finally{tt=!1,(Ve!==null||Ce!==null)&&(Me(),De())}}function Pe(t,r){var i=t.stateNode;if(i===null)return null;var u=Ma(i);if(u===null)return null;i=u[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(t=t.type,u=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!u;break e;default:t=!1}if(t)return null;if(i&&typeof i!="function")throw Error(o(231,r,typeof i));return i}var vt=!1;if(d)try{var qe={};Object.defineProperty(qe,"passive",{get:function(){vt=!0}}),window.addEventListener("test",qe,qe),window.removeEventListener("test",qe,qe)}catch{vt=!1}function dt(t,r,i,u,p,y,R,A,M){var V=Array.prototype.slice.call(arguments,3);try{r.apply(i,V)}catch(oe){this.onError(oe)}}var cn=!1,Ot=null,un=!1,jr=null,Qs={onError:function(t){cn=!0,Ot=t}};function oS(t,r,i,u,p,y,R,A,M){cn=!1,Ot=null,dt.apply(Qs,arguments)}function sS(t,r,i,u,p,y,R,A,M){if(oS.apply(this,arguments),cn){if(cn){var V=Ot;cn=!1,Ot=null}else throw Error(o(198));un||(un=!0,jr=V)}}function Ro(t){var r=t,i=t;if(t.alternate)for(;r.return;)r=r.return;else{t=r;do r=t,(r.flags&4098)!==0&&(i=r.return),t=r.return;while(t)}return r.tag===3?i:null}function eh(t){if(t.tag===13){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function th(t){if(Ro(t)!==t)throw Error(o(188))}function iS(t){var r=t.alternate;if(!r){if(r=Ro(t),r===null)throw Error(o(188));return r!==t?null:t}for(var i=t,u=r;;){var p=i.return;if(p===null)break;var y=p.alternate;if(y===null){if(u=p.return,u!==null){i=u;continue}break}if(p.child===y.child){for(y=p.child;y;){if(y===i)return th(p),t;if(y===u)return th(p),r;y=y.sibling}throw Error(o(188))}if(i.return!==u.return)i=p,u=y;else{for(var R=!1,A=p.child;A;){if(A===i){R=!0,i=p,u=y;break}if(A===u){R=!0,u=p,i=y;break}A=A.sibling}if(!R){for(A=y.child;A;){if(A===i){R=!0,i=y,u=p;break}if(A===u){R=!0,u=y,i=p;break}A=A.sibling}if(!R)throw Error(o(189))}}if(i.alternate!==u)throw Error(o(190))}if(i.tag!==3)throw Error(o(188));return i.stateNode.current===i?t:r}function nh(t){return t=iS(t),t!==null?rh(t):null}function rh(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var r=rh(t);if(r!==null)return r;t=t.sibling}return null}var oh=n.unstable_scheduleCallback,sh=n.unstable_cancelCallback,aS=n.unstable_shouldYield,lS=n.unstable_requestPaint,bt=n.unstable_now,cS=n.unstable_getCurrentPriorityLevel,Qc=n.unstable_ImmediatePriority,ih=n.unstable_UserBlockingPriority,ma=n.unstable_NormalPriority,uS=n.unstable_LowPriority,ah=n.unstable_IdlePriority,ga=null,ir=null;function dS(t){if(ir&&typeof ir.onCommitFiberRoot=="function")try{ir.onCommitFiberRoot(ga,t,void 0,(t.current.flags&128)===128)}catch{}}var Bn=Math.clz32?Math.clz32:hS,fS=Math.log,pS=Math.LN2;function hS(t){return t>>>=0,t===0?32:31-(fS(t)/pS|0)|0}var va=64,ya=4194304;function Js(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function xa(t,r){var i=t.pendingLanes;if(i===0)return 0;var u=0,p=t.suspendedLanes,y=t.pingedLanes,R=i&268435455;if(R!==0){var A=R&~p;A!==0?u=Js(A):(y&=R,y!==0&&(u=Js(y)))}else R=i&~p,R!==0?u=Js(R):y!==0&&(u=Js(y));if(u===0)return 0;if(r!==0&&r!==u&&(r&p)===0&&(p=u&-u,y=r&-r,p>=y||p===16&&(y&4194240)!==0))return r;if((u&4)!==0&&(u|=i&16),r=t.entangledLanes,r!==0)for(t=t.entanglements,r&=u;0<r;)i=31-Bn(r),p=1<<i,u|=t[i],r&=~p;return u}function mS(t,r){switch(t){case 1:case 2:case 4:return r+250;case 8:case 16:case 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 r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function gS(t,r){for(var i=t.suspendedLanes,u=t.pingedLanes,p=t.expirationTimes,y=t.pendingLanes;0<y;){var R=31-Bn(y),A=1<<R,M=p[R];M===-1?((A&i)===0||(A&u)!==0)&&(p[R]=mS(A,r)):M<=r&&(t.expiredLanes|=A),y&=~A}}function Jc(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function lh(){var t=va;return va<<=1,(va&4194240)===0&&(va=64),t}function Zc(t){for(var r=[],i=0;31>i;i++)r.push(t);return r}function Zs(t,r,i){t.pendingLanes|=r,r!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,r=31-Bn(r),t[r]=i}function vS(t,r){var i=t.pendingLanes&~r;t.pendingLanes=r,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=r,t.mutableReadLanes&=r,t.entangledLanes&=r,r=t.entanglements;var u=t.eventTimes;for(t=t.expirationTimes;0<i;){var p=31-Bn(i),y=1<<p;r[p]=0,u[p]=-1,t[p]=-1,i&=~y}}function eu(t,r){var i=t.entangledLanes|=r;for(t=t.entanglements;i;){var u=31-Bn(i),p=1<<u;p&r|t[u]&r&&(t[u]|=r),i&=~p}}var et=0;function ch(t){return t&=-t,1<t?4<t?(t&268435455)!==0?16:536870912:4:1}var uh,tu,dh,fh,ph,nu=!1,wa=[],Hr=null,Vr=null,Wr=null,ei=new Map,ti=new Map,Kr=[],yS="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function hh(t,r){switch(t){case"focusin":case"focusout":Hr=null;break;case"dragenter":case"dragleave":Vr=null;break;case"mouseover":case"mouseout":Wr=null;break;case"pointerover":case"pointerout":ei.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":ti.delete(r.pointerId)}}function ni(t,r,i,u,p,y){return t===null||t.nativeEvent!==y?(t={blockedOn:r,domEventName:i,eventSystemFlags:u,nativeEvent:y,targetContainers:[p]},r!==null&&(r=gi(r),r!==null&&tu(r)),t):(t.eventSystemFlags|=u,r=t.targetContainers,p!==null&&r.indexOf(p)===-1&&r.push(p),t)}function xS(t,r,i,u,p){switch(r){case"focusin":return Hr=ni(Hr,t,r,i,u,p),!0;case"dragenter":return Vr=ni(Vr,t,r,i,u,p),!0;case"mouseover":return Wr=ni(Wr,t,r,i,u,p),!0;case"pointerover":var y=p.pointerId;return ei.set(y,ni(ei.get(y)||null,t,r,i,u,p)),!0;case"gotpointercapture":return y=p.pointerId,ti.set(y,ni(ti.get(y)||null,t,r,i,u,p)),!0}return!1}function mh(t){var r=To(t.target);if(r!==null){var i=Ro(r);if(i!==null){if(r=i.tag,r===13){if(r=eh(i),r!==null){t.blockedOn=r,ph(t.priority,function(){dh(i)});return}}else if(r===3&&i.stateNode.current.memoizedState.isDehydrated){t.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}t.blockedOn=null}function ba(t){if(t.blockedOn!==null)return!1;for(var r=t.targetContainers;0<r.length;){var i=ou(t.domEventName,t.eventSystemFlags,r[0],t.nativeEvent);if(i===null){i=t.nativeEvent;var u=new i.constructor(i.type,i);Rn=u,i.target.dispatchEvent(u),Rn=null}else return r=gi(i),r!==null&&tu(r),t.blockedOn=i,!1;r.shift()}return!0}function gh(t,r,i){ba(t)&&i.delete(r)}function wS(){nu=!1,Hr!==null&&ba(Hr)&&(Hr=null),Vr!==null&&ba(Vr)&&(Vr=null),Wr!==null&&ba(Wr)&&(Wr=null),ei.forEach(gh),ti.forEach(gh)}function ri(t,r){t.blockedOn===r&&(t.blockedOn=null,nu||(nu=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,wS)))}function oi(t){function r(p){return ri(p,t)}if(0<wa.length){ri(wa[0],t);for(var i=1;i<wa.length;i++){var u=wa[i];u.blockedOn===t&&(u.blockedOn=null)}}for(Hr!==null&&ri(Hr,t),Vr!==null&&ri(Vr,t),Wr!==null&&ri(Wr,t),ei.forEach(r),ti.forEach(r),i=0;i<Kr.length;i++)u=Kr[i],u.blockedOn===t&&(u.blockedOn=null);for(;0<Kr.length&&(i=Kr[0],i.blockedOn===null);)mh(i),i.blockedOn===null&&Kr.shift()}var es=k.ReactCurrentBatchConfig,Sa=!0;function bS(t,r,i,u){var p=et,y=es.transition;es.transition=null;try{et=1,ru(t,r,i,u)}finally{et=p,es.transition=y}}function SS(t,r,i,u){var p=et,y=es.transition;es.transition=null;try{et=4,ru(t,r,i,u)}finally{et=p,es.transition=y}}function ru(t,r,i,u){if(Sa){var p=ou(t,r,i,u);if(p===null)bu(t,r,u,Ca,i),hh(t,u);else if(xS(p,t,r,i,u))u.stopPropagation();else if(hh(t,u),r&4&&-1<yS.indexOf(t)){for(;p!==null;){var y=gi(p);if(y!==null&&uh(y),y=ou(t,r,i,u),y===null&&bu(t,r,u,Ca,i),y===p)break;p=y}p!==null&&u.stopPropagation()}else bu(t,r,u,null,i)}}var Ca=null;function ou(t,r,i,u){if(Ca=null,t=we(u),t=To(t),t!==null)if(r=Ro(t),r===null)t=null;else if(i=r.tag,i===13){if(t=eh(r),t!==null)return t;t=null}else if(i===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;t=null}else r!==t&&(t=null);return Ca=t,null}function vh(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(cS()){case Qc:return 1;case ih:return 4;case ma:case uS:return 16;case ah:return 536870912;default:return 16}default:return 16}}var Yr=null,su=null,Ea=null;function yh(){if(Ea)return Ea;var t,r=su,i=r.length,u,p="value"in Yr?Yr.value:Yr.textContent,y=p.length;for(t=0;t<i&&r[t]===p[t];t++);var R=i-t;for(u=1;u<=R&&r[i-u]===p[y-u];u++);return Ea=p.slice(t,1<u?1-u:void 0)}function Na(t){var r=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&r===13&&(t=13)):t=r,t===10&&(t=13),32<=t||t===13?t:0}function ja(){return!0}function xh(){return!1}function wn(t){function r(i,u,p,y,R){this._reactName=i,this._targetInst=p,this.type=u,this.nativeEvent=y,this.target=R,this.currentTarget=null;for(var A in t)t.hasOwnProperty(A)&&(i=t[A],this[A]=i?i(y):y[A]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?ja:xh,this.isPropagationStopped=xh,this}return te(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=ja)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=ja)},persist:function(){},isPersistent:ja}),r}var ts={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},iu=wn(ts),si=te({},ts,{view:0,detail:0}),CS=wn(si),au,lu,ii,Ra=te({},si,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:uu,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==ii&&(ii&&t.type==="mousemove"?(au=t.screenX-ii.screenX,lu=t.screenY-ii.screenY):lu=au=0,ii=t),au)},movementY:function(t){return"movementY"in t?t.movementY:lu}}),wh=wn(Ra),ES=te({},Ra,{dataTransfer:0}),NS=wn(ES),jS=te({},si,{relatedTarget:0}),cu=wn(jS),RS=te({},ts,{animationName:0,elapsedTime:0,pseudoElement:0}),TS=wn(RS),kS=te({},ts,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),PS=wn(kS),_S=te({},ts,{data:0}),bh=wn(_S),DS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},AS={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},OS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function MS(t){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(t):(t=OS[t])?!!r[t]:!1}function uu(){return MS}var IS=te({},si,{key:function(t){if(t.key){var r=DS[t.key]||t.key;if(r!=="Unidentified")return r}return t.type==="keypress"?(t=Na(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?AS[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:uu,charCode:function(t){return t.type==="keypress"?Na(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Na(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),LS=wn(IS),FS=te({},Ra,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Sh=wn(FS),$S=te({},si,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:uu}),zS=wn($S),BS=te({},ts,{propertyName:0,elapsedTime:0,pseudoElement:0}),US=wn(BS),HS=te({},Ra,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),VS=wn(HS),WS=[9,13,27,32],du=d&&"CompositionEvent"in window,ai=null;d&&"documentMode"in document&&(ai=document.documentMode);var KS=d&&"TextEvent"in window&&!ai,Ch=d&&(!du||ai&&8<ai&&11>=ai),Eh=" ",Nh=!1;function jh(t,r){switch(t){case"keyup":return WS.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Rh(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ns=!1;function YS(t,r){switch(t){case"compositionend":return Rh(r);case"keypress":return r.which!==32?null:(Nh=!0,Eh);case"textInput":return t=r.data,t===Eh&&Nh?null:t;default:return null}}function GS(t,r){if(ns)return t==="compositionend"||!du&&jh(t,r)?(t=yh(),Ea=su=Yr=null,ns=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Ch&&r.locale!=="ko"?null:r.data;default:return null}}var XS={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Th(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r==="input"?!!XS[t.type]:r==="textarea"}function kh(t,r,i,u){me(u),r=Da(r,"onChange"),0<r.length&&(i=new iu("onChange","change",null,i,u),t.push({event:i,listeners:r}))}var li=null,ci=null;function qS(t){Yh(t,0)}function Ta(t){var r=as(t);if(ce(r))return t}function QS(t,r){if(t==="change")return r}var Ph=!1;if(d){var fu;if(d){var pu="oninput"in document;if(!pu){var _h=document.createElement("div");_h.setAttribute("oninput","return;"),pu=typeof _h.oninput=="function"}fu=pu}else fu=!1;Ph=fu&&(!document.documentMode||9<document.documentMode)}function Dh(){li&&(li.detachEvent("onpropertychange",Ah),ci=li=null)}function Ah(t){if(t.propertyName==="value"&&Ta(ci)){var r=[];kh(r,ci,t,we(t)),We(qS,r)}}function JS(t,r,i){t==="focusin"?(Dh(),li=r,ci=i,li.attachEvent("onpropertychange",Ah)):t==="focusout"&&Dh()}function ZS(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Ta(ci)}function e1(t,r){if(t==="click")return Ta(r)}function t1(t,r){if(t==="input"||t==="change")return Ta(r)}function n1(t,r){return t===r&&(t!==0||1/t===1/r)||t!==t&&r!==r}var Un=typeof Object.is=="function"?Object.is:n1;function ui(t,r){if(Un(t,r))return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null)return!1;var i=Object.keys(t),u=Object.keys(r);if(i.length!==u.length)return!1;for(u=0;u<i.length;u++){var p=i[u];if(!h.call(r,p)||!Un(t[p],r[p]))return!1}return!0}function Oh(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Mh(t,r){var i=Oh(t);t=0;for(var u;i;){if(i.nodeType===3){if(u=t+i.textContent.length,t<=r&&u>=r)return{node:i,offset:r-t};t=u}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Oh(i)}}function Ih(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?Ih(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function Lh(){for(var t=window,r=Oe();r instanceof t.HTMLIFrameElement;){try{var i=typeof r.contentWindow.location.href=="string"}catch{i=!1}if(i)t=r.contentWindow;else break;r=Oe(t.document)}return r}function hu(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r&&(r==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||r==="textarea"||t.contentEditable==="true")}function r1(t){var r=Lh(),i=t.focusedElem,u=t.selectionRange;if(r!==i&&i&&i.ownerDocument&&Ih(i.ownerDocument.documentElement,i)){if(u!==null&&hu(i)){if(r=u.start,t=u.end,t===void 0&&(t=r),"selectionStart"in i)i.selectionStart=r,i.selectionEnd=Math.min(t,i.value.length);else if(t=(r=i.ownerDocument||document)&&r.defaultView||window,t.getSelection){t=t.getSelection();var p=i.textContent.length,y=Math.min(u.start,p);u=u.end===void 0?y:Math.min(u.end,p),!t.extend&&y>u&&(p=u,u=y,y=p),p=Mh(i,y);var R=Mh(i,u);p&&R&&(t.rangeCount!==1||t.anchorNode!==p.node||t.anchorOffset!==p.offset||t.focusNode!==R.node||t.focusOffset!==R.offset)&&(r=r.createRange(),r.setStart(p.node,p.offset),t.removeAllRanges(),y>u?(t.addRange(r),t.extend(R.node,R.offset)):(r.setEnd(R.node,R.offset),t.addRange(r)))}}for(r=[],t=i;t=t.parentNode;)t.nodeType===1&&r.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof i.focus=="function"&&i.focus(),i=0;i<r.length;i++)t=r[i],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var o1=d&&"documentMode"in document&&11>=document.documentMode,rs=null,mu=null,di=null,gu=!1;function Fh(t,r,i){var u=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;gu||rs==null||rs!==Oe(u)||(u=rs,"selectionStart"in u&&hu(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),di&&ui(di,u)||(di=u,u=Da(mu,"onSelect"),0<u.length&&(r=new iu("onSelect","select",null,r,i),t.push({event:r,listeners:u}),r.target=rs)))}function ka(t,r){var i={};return i[t.toLowerCase()]=r.toLowerCase(),i["Webkit"+t]="webkit"+r,i["Moz"+t]="moz"+r,i}var os={animationend:ka("Animation","AnimationEnd"),animationiteration:ka("Animation","AnimationIteration"),animationstart:ka("Animation","AnimationStart"),transitionend:ka("Transition","TransitionEnd")},vu={},$h={};d&&($h=document.createElement("div").style,"AnimationEvent"in window||(delete os.animationend.animation,delete os.animationiteration.animation,delete os.animationstart.animation),"TransitionEvent"in window||delete os.transitionend.transition);function Pa(t){if(vu[t])return vu[t];if(!os[t])return t;var r=os[t],i;for(i in r)if(r.hasOwnProperty(i)&&i in $h)return vu[t]=r[i];return t}var zh=Pa("animationend"),Bh=Pa("animationiteration"),Uh=Pa("animationstart"),Hh=Pa("transitionend"),Vh=new Map,Wh="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Gr(t,r){Vh.set(t,r),l(r,[t])}for(var yu=0;yu<Wh.length;yu++){var xu=Wh[yu],s1=xu.toLowerCase(),i1=xu[0].toUpperCase()+xu.slice(1);Gr(s1,"on"+i1)}Gr(zh,"onAnimationEnd"),Gr(Bh,"onAnimationIteration"),Gr(Uh,"onAnimationStart"),Gr("dblclick","onDoubleClick"),Gr("focusin","onFocus"),Gr("focusout","onBlur"),Gr(Hh,"onTransitionEnd"),f("onMouseEnter",["mouseout","mouseover"]),f("onMouseLeave",["mouseout","mouseover"]),f("onPointerEnter",["pointerout","pointerover"]),f("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),a1=new Set("cancel close invalid load scroll toggle".split(" ").concat(fi));function Kh(t,r,i){var u=t.type||"unknown-event";t.currentTarget=i,sS(u,r,void 0,t),t.currentTarget=null}function Yh(t,r){r=(r&4)!==0;for(var i=0;i<t.length;i++){var u=t[i],p=u.event;u=u.listeners;e:{var y=void 0;if(r)for(var R=u.length-1;0<=R;R--){var A=u[R],M=A.instance,V=A.currentTarget;if(A=A.listener,M!==y&&p.isPropagationStopped())break e;Kh(p,A,V),y=M}else for(R=0;R<u.length;R++){if(A=u[R],M=A.instance,V=A.currentTarget,A=A.listener,M!==y&&p.isPropagationStopped())break e;Kh(p,A,V),y=M}}}if(un)throw t=jr,un=!1,jr=null,t}function rt(t,r){var i=r[Ru];i===void 0&&(i=r[Ru]=new Set);var u=t+"__bubble";i.has(u)||(Gh(r,t,2,!1),i.add(u))}function wu(t,r,i){var u=0;r&&(u|=4),Gh(i,t,u,r)}var _a="_reactListening"+Math.random().toString(36).slice(2);function pi(t){if(!t[_a]){t[_a]=!0,s.forEach(function(i){i!=="selectionchange"&&(a1.has(i)||wu(i,!1,t),wu(i,!0,t))});var r=t.nodeType===9?t:t.ownerDocument;r===null||r[_a]||(r[_a]=!0,wu("selectionchange",!1,r))}}function Gh(t,r,i,u){switch(vh(r)){case 1:var p=bS;break;case 4:p=SS;break;default:p=ru}i=p.bind(null,r,i,t),p=void 0,!vt||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(p=!0),u?p!==void 0?t.addEventListener(r,i,{capture:!0,passive:p}):t.addEventListener(r,i,!0):p!==void 0?t.addEventListener(r,i,{passive:p}):t.addEventListener(r,i,!1)}function bu(t,r,i,u,p){var y=u;if((r&1)===0&&(r&2)===0&&u!==null)e:for(;;){if(u===null)return;var R=u.tag;if(R===3||R===4){var A=u.stateNode.containerInfo;if(A===p||A.nodeType===8&&A.parentNode===p)break;if(R===4)for(R=u.return;R!==null;){var M=R.tag;if((M===3||M===4)&&(M=R.stateNode.containerInfo,M===p||M.nodeType===8&&M.parentNode===p))return;R=R.return}for(;A!==null;){if(R=To(A),R===null)return;if(M=R.tag,M===5||M===6){u=y=R;continue e}A=A.parentNode}}u=u.return}We(function(){var V=y,oe=we(i),ie=[];e:{var re=Vh.get(t);if(re!==void 0){var ge=iu,xe=t;switch(t){case"keypress":if(Na(i)===0)break e;case"keydown":case"keyup":ge=LS;break;case"focusin":xe="focus",ge=cu;break;case"focusout":xe="blur",ge=cu;break;case"beforeblur":case"afterblur":ge=cu;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ge=wh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ge=NS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ge=zS;break;case zh:case Bh:case Uh:ge=TS;break;case Hh:ge=US;break;case"scroll":ge=CS;break;case"wheel":ge=VS;break;case"copy":case"cut":case"paste":ge=PS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ge=Sh}var be=(r&4)!==0,St=!be&&t==="scroll",$=be?re!==null?re+"Capture":null:re;be=[];for(var I=V,B;I!==null;){B=I;var ue=B.stateNode;if(B.tag===5&&ue!==null&&(B=ue,$!==null&&(ue=Pe(I,$),ue!=null&&be.push(hi(I,ue,B)))),St)break;I=I.return}0<be.length&&(re=new ge(re,xe,null,i,oe),ie.push({event:re,listeners:be}))}}if((r&7)===0){e:{if(re=t==="mouseover"||t==="pointerover",ge=t==="mouseout"||t==="pointerout",re&&i!==Rn&&(xe=i.relatedTarget||i.fromElement)&&(To(xe)||xe[Rr]))break e;if((ge||re)&&(re=oe.window===oe?oe:(re=oe.ownerDocument)?re.defaultView||re.parentWindow:window,ge?(xe=i.relatedTarget||i.toElement,ge=V,xe=xe?To(xe):null,xe!==null&&(St=Ro(xe),xe!==St||xe.tag!==5&&xe.tag!==6)&&(xe=null)):(ge=null,xe=V),ge!==xe)){if(be=wh,ue="onMouseLeave",$="onMouseEnter",I="mouse",(t==="pointerout"||t==="pointerover")&&(be=Sh,ue="onPointerLeave",$="onPointerEnter",I="pointer"),St=ge==null?re:as(ge),B=xe==null?re:as(xe),re=new be(ue,I+"leave",ge,i,oe),re.target=St,re.relatedTarget=B,ue=null,To(oe)===V&&(be=new be($,I+"enter",xe,i,oe),be.target=B,be.relatedTarget=St,ue=be),St=ue,ge&&xe)t:{for(be=ge,$=xe,I=0,B=be;B;B=ss(B))I++;for(B=0,ue=$;ue;ue=ss(ue))B++;for(;0<I-B;)be=ss(be),I--;for(;0<B-I;)$=ss($),B--;for(;I--;){if(be===$||$!==null&&be===$.alternate)break t;be=ss(be),$=ss($)}be=null}else be=null;ge!==null&&Xh(ie,re,ge,be,!1),xe!==null&&St!==null&&Xh(ie,St,xe,be,!0)}}e:{if(re=V?as(V):window,ge=re.nodeName&&re.nodeName.toLowerCase(),ge==="select"||ge==="input"&&re.type==="file")var Se=QS;else if(Th(re))if(Ph)Se=t1;else{Se=ZS;var Re=JS}else(ge=re.nodeName)&&ge.toLowerCase()==="input"&&(re.type==="checkbox"||re.type==="radio")&&(Se=e1);if(Se&&(Se=Se(t,V))){kh(ie,Se,i,oe);break e}Re&&Re(t,re,V),t==="focusout"&&(Re=re._wrapperState)&&Re.controlled&&re.type==="number"&&at(re,"number",re.value)}switch(Re=V?as(V):window,t){case"focusin":(Th(Re)||Re.contentEditable==="true")&&(rs=Re,mu=V,di=null);break;case"focusout":di=mu=rs=null;break;case"mousedown":gu=!0;break;case"contextmenu":case"mouseup":case"dragend":gu=!1,Fh(ie,i,oe);break;case"selectionchange":if(o1)break;case"keydown":case"keyup":Fh(ie,i,oe)}var Te;if(du)e:{switch(t){case"compositionstart":var _e="onCompositionStart";break e;case"compositionend":_e="onCompositionEnd";break e;case"compositionupdate":_e="onCompositionUpdate";break e}_e=void 0}else ns?jh(t,i)&&(_e="onCompositionEnd"):t==="keydown"&&i.keyCode===229&&(_e="onCompositionStart");_e&&(Ch&&i.locale!=="ko"&&(ns||_e!=="onCompositionStart"?_e==="onCompositionEnd"&&ns&&(Te=yh()):(Yr=oe,su="value"in Yr?Yr.value:Yr.textContent,ns=!0)),Re=Da(V,_e),0<Re.length&&(_e=new bh(_e,t,null,i,oe),ie.push({event:_e,listeners:Re}),Te?_e.data=Te:(Te=Rh(i),Te!==null&&(_e.data=Te)))),(Te=KS?YS(t,i):GS(t,i))&&(V=Da(V,"onBeforeInput"),0<V.length&&(oe=new bh("onBeforeInput","beforeinput",null,i,oe),ie.push({event:oe,listeners:V}),oe.data=Te))}Yh(ie,r)})}function hi(t,r,i){return{instance:t,listener:r,currentTarget:i}}function Da(t,r){for(var i=r+"Capture",u=[];t!==null;){var p=t,y=p.stateNode;p.tag===5&&y!==null&&(p=y,y=Pe(t,i),y!=null&&u.unshift(hi(t,y,p)),y=Pe(t,r),y!=null&&u.push(hi(t,y,p))),t=t.return}return u}function ss(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function Xh(t,r,i,u,p){for(var y=r._reactName,R=[];i!==null&&i!==u;){var A=i,M=A.alternate,V=A.stateNode;if(M!==null&&M===u)break;A.tag===5&&V!==null&&(A=V,p?(M=Pe(i,y),M!=null&&R.unshift(hi(i,M,A))):p||(M=Pe(i,y),M!=null&&R.push(hi(i,M,A)))),i=i.return}R.length!==0&&t.push({event:r,listeners:R})}var l1=/\r\n?/g,c1=/\u0000|\uFFFD/g;function qh(t){return(typeof t=="string"?t:""+t).replace(l1,`39 `).replace( c1,"")}function Aa(t,r,i){if(r=qh(r),qh(t)!==r&&i)throw Error(o(425))}function Oa(){}var Su=null,Cu=null;function Eu(t,r){return t==="textarea"||t==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var Nu=typeof setTimeout=="function"?setTimeout:void 0,u1=typeof clearTimeout=="function"?clearTimeout:void 0,Qh=typeof Promise=="function"?Promise:void 0,d1=typeof queueMicrotask=="function"?queueMicrotask:typeof Qh<"u"?function(t){return Qh.resolve(null).then(t).catch(f1)}:Nu;function f1(t){setTimeout(function(){throw t})}function ju(t,r){var i=r,u=0;do{var p=i.nextSibling;if(t.removeChild(i),p&&p.nodeType===8)if(i=p.data,i==="/$"){if(u===0){t.removeChild(p),oi(r);return}u--}else i!=="$"&&i!=="$?"&&i!=="$!"||u++;i=p}while(i);oi(r)}function Xr(t){for(;t!=null;t=t.nextSibling){var r=t.nodeType;if(r===1||r===3)break;if(r===8){if(r=t.data,r==="$"||r==="$!"||r==="$?")break;if(r==="/$")return null}}return t}function Jh(t){t=t.previousSibling;for(var r=0;t;){if(t.nodeType===8){var i=t.data;if(i==="$"||i==="$!"||i==="$?"){if(r===0)return t;r--}else i==="/$"&&r++}t=t.previousSibling}return null}var is=Math.random().toString(36).slice(2),ar="__reactFiber$"+is,mi="__reactProps$"+is,Rr="__reactContainer$"+is,Ru="__reactEvents$"+is,p1="__reactListeners$"+is,h1="__reactHandles$"+is;function To(t){var r=t[ar];if(r)return r;for(var i=t.parentNode;i;){if(r=i[Rr]||i[ar]){if(i=r.alternate,r.child!==null||i!==null&&i.child!==null)for(t=Jh(t);t!==null;){if(i=t[ar])return i;t=Jh(t)}return r}t=i,i=t.parentNode}return null}function gi(t){return t=t[ar]||t[Rr],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function as(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(o(33))}function Ma(t){return t[mi]||null}var Tu=[],ls=-1;function qr(t){return{current:t}}function ot(t){0>ls||(t.current=Tu[ls],Tu[ls]=null,ls--)}function nt(t,r){ls++,Tu[ls]=t.current,t.current=r}var Qr={},qt=qr(Qr),dn=qr(!1),ko=Qr;function cs(t,r){var i=t.type.contextTypes;if(!i)return Qr;var u=t.stateNode;if(u&&u.__reactInternalMemoizedUnmaskedChildContext===r)return u.__reactInternalMemoizedMaskedChildContext;var p={},y;for(y in i)p[y]=r[y];return u&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=r,t.__reactInternalMemoizedMaskedChildContext=p),p}function fn(t){return t=t.childContextTypes,t!=null}function Ia(){ot(dn),ot(qt)}function Zh(t,r,i){if(qt.current!==Qr)throw Error(o(168));nt(qt,r),nt(dn,i)}function em(t,r,i){var u=t.stateNode;if(r=r.childContextTypes,typeof u.getChildContext!="function")return i;u=u.getChildContext();for(var p in u)if(!(p in r))throw Error(o(108,ae(t)||"Unknown",p));return te({},i,u)}function La(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Qr,ko=qt.current,nt(qt,t),nt(dn,dn.current),!0}function tm(t,r,i){var u=t.stateNode;if(!u)throw Error(o(169));i?(t=em(t,r,ko),u.__reactInternalMemoizedMergedChildContext=t,ot(dn),ot(qt),nt(qt,t)):ot(dn),nt(dn,i)}var Tr=null,Fa=!1,ku=!1;function nm(t){Tr===null?Tr=[t]:Tr.push(t)}function m1(t){Fa=!0,nm(t)}function Jr(){if(!ku&&Tr!==null){ku=!0;var t=0,r=et;try{var i=Tr;for(et=1;t<i.length;t++){var u=i[t];do u=u(!0);while(u!==null)}Tr=null,Fa=!1}catch(p){throw Tr!==null&&(Tr=Tr.slice(t+1)),oh(Qc,Jr),p}finally{et=r,ku=!1}}return null}var us=[],ds=0,$a=null,za=0,Tn=[],kn=0,Po=null,kr=1,Pr="";function _o(t,r){us[ds++]=za,us[ds++]=$a,$a=t,za=r}function rm(t,r,i){Tn[kn++]=kr,Tn[kn++]=Pr,Tn[kn++]=Po,Po=t;var u=kr;t=Pr;var p=32-Bn(u)-1;u&=~(1<<p),i+=1;var y=32-Bn(r)+p;if(30<y){var R=p-p%5;y=(u&(1<<R)-1).toString(32),u>>=R,p-=R,kr=1<<32-Bn(r)+p|i<<p|u,Pr=y+t}else kr=1<<y|i<<p|u,Pr=t}function Pu(t){t.return!==null&&(_o(t,1),rm(t,1,0))}function _u(t){for(;t===$a;)$a=us[--ds],us[ds]=null,za=us[--ds],us[ds]=null;for(;t===Po;)Po=Tn[--kn],Tn[kn]=null,Pr=Tn[--kn],Tn[kn]=null,kr=Tn[--kn],Tn[kn]=null}var bn=null,Sn=null,ct=!1,Hn=null;function om(t,r){var i=An(5,null,null,0);i.elementType="DELETED",i.stateNode=r,i.return=t,r=t.deletions,r===null?(t.deletions=[i],t.flags|=16):r.push(i)}function sm(t,r){switch(t.tag){case 5:var i=t.type;return r=r.nodeType!==1||i.toLowerCase()!==r.nodeName.toLowerCase()?null:r,r!==null?(t.stateNode=r,bn=t,Sn=Xr(r.firstChild),!0):!1;case 6:return r=t.pendingProps===""||r.nodeType!==3?null:r,r!==null?(t.stateNode=r,bn=t,Sn=null,!0):!1;case 13:return r=r.nodeType!==8?null:r,r!==null?(i=Po!==null?{id:kr,overflow:Pr}:null,t.memoizedState={dehydrated:r,treeContext:i,retryLane:1073741824},i=An(18,null,null,0),i.stateNode=r,i.return=t,t.child=i,bn=t,Sn=null,!0):!1;default:return!1}}function Du(t){return(t.mode&1)!==0&&(t.flags&128)===0}function Au(t){if(ct){var r=Sn;if(r){var i=r;if(!sm(t,r)){if(Du(t))throw Error(o(418));r=Xr(i.nextSibling);var u=bn;r&&sm(t,r)?om(u,i):(t.flags=t.flags&-4097|2,ct=!1,bn=t)}}else{if(Du(t))throw Error(o(418));t.flags=t.flags&-4097|2,ct=!1,bn=t}}}function im(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;bn=t}function Ba(t){if(t!==bn)return!1;if(!ct)return im(t),ct=!0,!1;var r;if((r=t.tag!==3)&&!(r=t.tag!==5)&&(r=t.type,r=r!=="head"&&r!=="body"&&!Eu(t.type,t.memoizedProps)),r&&(r=Sn)){if(Du(t))throw am(),Error(o(418));for(;r;)om(t,r),r=Xr(r.nextSibling)}if(im(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(317));e:{for(t=t.nextSibling,r=0;t;){if(t.nodeType===8){var i=t.data;if(i==="/$"){if(r===0){Sn=Xr(t.nextSibling);break e}r--}else i!=="$"&&i!=="$!"&&i!=="$?"||r++}t=t.nextSibling}Sn=null}}else Sn=bn?Xr(t.stateNode.nextSibling):null;return!0}function am(){for(var t=Sn;t;)t=Xr(t.nextSibling)}function fs(){Sn=bn=null,ct=!1}function Ou(t){Hn===null?Hn=[t]:Hn.push(t)}var g1=k.ReactCurrentBatchConfig;function vi(t,r,i){if(t=i.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(i._owner){if(i=i._owner,i){if(i.tag!==1)throw Error(o(309));var u=i.stateNode}if(!u)throw Error(o(147,t));var p=u,y=""+t;return r!==null&&r.ref!==null&&typeof r.ref=="function"&&r.ref._stringRef===y?r.ref:(r=function(R){var A=p.refs;R===null?delete A[y]:A[y]=R},r._stringRef=y,r)}if(typeof t!="string")throw Error(o(284));if(!i._owner)throw Error(o(290,t))}return t}function Ua(t,r){throw t=Object.prototype.toString.call(r),Error(o(31,t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t))}function lm(t){var r=t._init;return r(t._payload)}function cm(t){function r($,I){if(t){var B=$.deletions;B===null?($.deletions=[I],$.flags|=16):B.push(I)}}function i($,I){if(!t)return null;for(;I!==null;)r($,I),I=I.sibling;return null}function u($,I){for($=new Map;I!==null;)I.key!==null?$.set(I.key,I):$.set(I.index,I),I=I.sibling;return $}function p($,I){return $=io($,I),$.index=0,$.sibling=null,$}function y($,I,B){return $.index=B,t?(B=$.alternate,B!==null?(B=B.index,B<I?($.flags|=2,I):B):($.flags|=2,I)):($.flags|=1048576,I)}function R($){return t&&$.alternate===null&&($.flags|=2),$}function A($,I,B,ue){return I===null||I.tag!==6?(I=Nd(B,$.mode,ue),I.return=$,I):(I=p(I,B),I.return=$,I)}function M($,I,B,ue){var Se=B.type;return Se===_?oe($,I,B.props.children,ue,B.key):I!==null&&(I.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===Z&&lm(Se)===I.type)?(ue=p(I,B.props),ue.ref=vi($,I,B),ue.return=$,ue):(ue=fl(B.type,B.key,B.props,null,$.mode,ue),ue.ref=vi($,I,B),ue.return=$,ue)}function V($,I,B,ue){return I===null||I.tag!==4||I.stateNode.containerInfo!==B.containerInfo||I.stateNode.implementation!==B.implementation?(I=jd(B,$.mode,ue),I.return=$,I):(I=p(I,B.children||[]),I.return=$,I)}function oe($,I,B,ue,Se){return I===null||I.tag!==7?(I=$o(B,$.mode,ue,Se),I.return=$,I):(I=p(I,B),I.return=$,I)}function ie($,I,B){if(typeof I=="string"&&I!==""||typeof I=="number")return I=Nd(""+I,$.mode,B),I.return=$,I;if(typeof I=="object"&&I!==null){switch(I.$$typeof){case P:return B=fl(I.type,I.key,I.props,null,$.mode,B),B.ref=vi($,null,I),B.return=$,B;case D:return I=jd(I,$.mode,B),I.return=$,I;case Z:var ue=I._init;return ie($,ue(I._payload),B)}if(ut(I)||J(I))return I=$o(I,$.mode,B,null),I.return=$,I;Ua($,I)}return null}function re($,I,B,ue){var Se=I!==null?I.key:null;if(typeof B=="string"&&B!==""||typeof B=="number")return Se!==null?null:A($,I,""+B,ue);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case P:return B.key===Se?M($,I,B,ue):null;case D:return B.key===Se?V($,I,B,ue):null;case Z:return Se=B._init,re($,I,Se(B._payload),ue)}if(ut(B)||J(B))return Se!==null?null:oe($,I,B,ue,null);Ua($,B)}return null}function ge($,I,B,ue,Se){if(typeof ue=="string"&&ue!==""||typeof ue=="number")return $=$.get(B)||null,A(I,$,""+ue,Se);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case P:return $=$.get(ue.key===null?B:ue.key)||null,M(I,$,ue,Se);case D:return $=$.get(ue.key===null?B:ue.key)||null,V(I,$,ue,Se);case Z:var Re=ue._init;return ge($,I,B,Re(ue._payload),Se)}if(ut(ue)||J(ue))return $=$.get(B)||null,oe(I,$,ue,Se,null);Ua(I,ue)}return null}function xe($,I,B,ue){for(var Se=null,Re=null,Te=I,_e=I=0,Lt=null;Te!==null&&_e<B.length;_e++){Te.index>_e?(Lt=Te,Te=null):Lt=Te.sibling;var Xe=re($,Te,B[_e],ue);if(Xe===null){Te===null&&(Te=Lt);break}t&&Te&&Xe.alternate===null&&r($,Te),I=y(Xe,I,_e),Re===null?Se=Xe:Re.sibling=Xe,Re=Xe,Te=Lt}if(_e===B.length)return i($,Te),ct&&_o($,_e),Se;if(Te===null){for(;_e<B.length;_e++)Te=ie($,B[_e],ue),Te!==null&&(I=y(Te,I,_e),Re===null?Se=Te:Re.sibling=Te,Re=Te);return ct&&_o($,_e),Se}for(Te=u($,Te);_e<B.length;_e++)Lt=ge(Te,$,_e,B[_e],ue),Lt!==null&&(t&&Lt.alternate!==null&&Te.delete(Lt.key===null?_e:Lt.key),I=y(Lt,I,_e),Re===null?Se=Lt:Re.sibling=Lt,Re=Lt);return t&&Te.forEach(function(ao){return r($,ao)}),ct&&_o($,_e),Se}function be($,I,B,ue){var Se=J(B);if(typeof Se!="function")throw Error(o(150));if(B=Se.call(B),B==null)throw Error(o(151));for(var Re=Se=null,Te=I,_e=I=0,Lt=null,Xe=B.next();Te!==null&&!Xe.done;_e++,Xe=B.next()){Te.index>_e?(Lt=Te,Te=null):Lt=Te.sibling;var ao=re($,Te,Xe.value,ue);if(ao===null){Te===null&&(Te=Lt);break}t&&Te&&ao.alternate===null&&r($,Te),I=y(ao,I,_e),Re===null?Se=ao:Re.sibling=ao,Re=ao,Te=Lt}if(Xe.done)return i($,Te),ct&&_o($,_e),Se;if(Te===null){for(;!Xe.done;_e++,Xe=B.next())Xe=ie($,Xe.value,ue),Xe!==null&&(I=y(Xe,I,_e),Re===null?Se=Xe:Re.sibling=Xe,Re=Xe);return ct&&_o($,_e),Se}for(Te=u($,Te);!Xe.done;_e++,Xe=B.next())Xe=ge(Te,$,_e,Xe.value,ue),Xe!==null&&(t&&Xe.alternate!==null&&Te.delete(Xe.key===null?_e:Xe.key),I=y(Xe,I,_e),Re===null?Se=Xe:Re.sibling=Xe,Re=Xe);return t&&Te.forEach(function(X1){return r($,X1)}),ct&&_o($,_e),Se}function St($,I,B,ue){if(typeof B=="object"&&B!==null&&B.type===_&&B.key===null&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case P:e:{for(var Se=B.key,Re=I;Re!==null;){if(Re.key===Se){if(Se=B.type,Se===_){if(Re.tag===7){i($,Re.sibling),I=p(Re,B.props.children),I.return=$,$=I;break e}}else if(Re.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===Z&&lm(Se)===Re.type){i($,Re.sibling),I=p(Re,B.props),I.ref=vi($,Re,B),I.return=$,$=I;break e}i($,Re);break}else r($,Re);Re=Re.sibling}B.type===_?(I=$o(B.props.children,$.mode,ue,B.key),I.return=$,$=I):(ue=fl(B.type,B.key,B.props,null,$.mode,ue),ue.ref=vi($,I,B),ue.return=$,$=ue)}return R($);case D:e:{for(Re=B.key;I!==null;){if(I.key===Re)if(I.tag===4&&I.stateNode.containerInfo===B.containerInfo&&I.stateNode.implementation===B.implementation){i($,I.sibling),I=p(I,B.children||[]),I.return=$,$=I;break e}else{i($,I);break}else r($,I);I=I.sibling}I=jd(B,$.mode,ue),I.return=$,$=I}return R($);case Z:return Re=B._init,St($,I,Re(B._payload),ue)}if(ut(B))return xe($,I,B,ue);if(J(B))return be($,I,B,ue);Ua($,B)}return typeof B=="string"&&B!==""||typeof B=="number"?(B=""+B,I!==null&&I.tag===6?(i($,I.sibling),I=p(I,B),I.return=$,$=I):(i($,I),I=Nd(B,$.mode,ue),I.return=$,$=I),R($)):i($,I)}return St}var ps=cm(!0),um=cm(!1),Ha=qr(null),Va=null,hs=null,Mu=null;function Iu(){Mu=hs=Va=null}function Lu(t){var r=Ha.current;ot(Ha),t._currentValue=r}function Fu(t,r,i){for(;t!==null;){var u=t.alternate;if((t.childLanes&r)!==r?(t.childLanes|=r,u!==null&&(u.childLanes|=r)):u!==null&&(u.childLanes&r)!==r&&(u.childLanes|=r),t===i)break;t=t.return}}function ms(t,r){Va=t,Mu=hs=null,t=t.dependencies,t!==null&&t.firstContext!==null&&((t.lanes&r)!==0&&(pn=!0),t.firstContext=null)}function Pn(t){var r=t._currentValue;if(Mu!==t)if(t={context:t,memoizedValue:r,next:null},hs===null){if(Va===null)throw Error(o(308));hs=t,Va.dependencies={lanes:0,firstContext:t}}else hs=hs.next=t;return r}var Do=null;function $u(t){Do===null?Do=[t]:Do.push(t)}function dm(t,r,i,u){var p=r.interleaved;return p===null?(i.next=i,$u(r)):(i.next=p.next,p.next=i),r.interleaved=i,_r(t,u)}function _r(t,r){t.lanes|=r;var i=t.alternate;for(i!==null&&(i.lanes|=r),i=t,t=t.return;t!==null;)t.childLanes|=r,i=t.alternate,i!==null&&(i.childLanes|=r),i=t,t=t.return;return i.tag===3?i.stateNode:null}var Zr=!1;function zu(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function fm(t,r){t=t.updateQueue,r.updateQueue===t&&(r.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Dr(t,r){return{eventTime:t,lane:r,tag:0,payload:null,callback:null,next:null}}function eo(t,r,i){var u=t.updateQueue;if(u===null)return null;if(u=u.shared,(Ge&2)!==0){var p=u.pending;return p===null?r.next=r:(r.next=p.next,p.next=r),u.pending=r,_r(t,i)}return p=u.interleaved,p===null?(r.next=r,$u(u)):(r.next=p.next,p.next=r),u.interleaved=r,_r(t,i)}function Wa(t,r,i){if(r=r.updateQueue,r!==null&&(r=r.shared,(i&4194240)!==0)){var u=r.lanes;u&=t.pendingLanes,i|=u,r.lanes=i,eu(t,i)}}function pm(t,r){var i=t.updateQueue,u=t.alternate;if(u!==null&&(u=u.updateQueue,i===u)){var p=null,y=null;if(i=i.firstBaseUpdate,i!==null){do{var R={eventTime:i.eventTime,lane:i.lane,tag:i.tag,payload:i.payload,callback:i.callback,next:null};y===null?p=y=R:y=y.next=R,i=i.next}while(i!==null);y===null?p=y=r:y=y.next=r}else p=y=r;i={baseState:u.baseState,firstBaseUpdate:p,lastBaseUpdate:y,shared:u.shared,effects:u.effects},t.updateQueue=i;return}t=i.lastBaseUpdate,t===null?i.firstBaseUpdate=r:t.next=r,i.lastBaseUpdate=r}function Ka(t,r,i,u){var p=t.updateQueue;Zr=!1;var y=p.firstBaseUpdate,R=p.lastBaseUpdate,A=p.shared.pending;if(A!==null){p.shared.pending=null;var M=A,V=M.next;M.next=null,R===null?y=V:R.next=V,R=M;var oe=t.alternate;oe!==null&&(oe=oe.updateQueue,A=oe.lastBaseUpdate,A!==R&&(A===null?oe.firstBaseUpdate=V:A.next=V,oe.lastBaseUpdate=M))}if(y!==null){var ie=p.baseState;R=0,oe=V=M=null,A=y;do{var re=A.lane,ge=A.eventTime;if((u&re)===re){oe!==null&&(oe=oe.next={eventTime:ge,lane:0,tag:A.tag,payload:A.payload,callback:A.callback,next:null});e:{var xe=t,be=A;switch(re=r,ge=i,be.tag){case 1:if(xe=be.payload,typeof xe=="function"){ie=xe.call(ge,ie,re);break e}ie=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=be.payload,re=typeof xe=="function"?xe.call(ge,ie,re):xe,re==null)break e;ie=te({},ie,re);break e;case 2:Zr=!0}}A.callback!==null&&A.lane!==0&&(t.flags|=64,re=p.effects,re===null?p.effects=[A]:re.push(A))}else ge={eventTime:ge,lane:re,tag:A.tag,payload:A.payload,callback:A.callback,next:null},oe===null?(V=oe=ge,M=ie):oe=oe.next=ge,R|=re;if(A=A.next,A===null){if(A=p.shared.pending,A===null)break;re=A,A=re.next,re.next=null,p.lastBaseUpdate=re,p.shared.pending=null}}while(!0);if(oe===null&&(M=ie),p.baseState=M,p.firstBaseUpdate=V,p.lastBaseUpdate=oe,r=p.shared.interleaved,r!==null){p=r;do R|=p.lane,p=p.next;while(p!==r)}else y===null&&(p.shared.lanes=0);Mo|=R,t.lanes=R,t.memoizedState=ie}}function hm(t,r,i){if(t=r.effects,r.effects=null,t!==null)for(r=0;r<t.length;r++){var u=t[r],p=u.callback;if(p!==null){if(u.callback=null,u=i,typeof p!="function")throw Error(o(191,p));p.call(u)}}}var yi={},lr=qr(yi),xi=qr(yi),wi=qr(yi);function Ao(t){if(t===yi)throw Error(o(174));return t}function Bu(t,r){switch(nt(wi,r),nt(xi,t),nt(lr,yi),t=r.nodeType,t){case 9:case 11:r=(r=r.documentElement)?r.namespaceURI:an(null,"");break;default:t=t===8?r.parentNode:r,r=t.namespaceURI||null,t=t.tagName,r=an(r,t)}ot(lr),nt(lr,r)}function gs(){ot(lr),ot(xi),ot(wi)}function mm(t){Ao(wi.current);var r=Ao(lr.current),i=an(r,t.type);r!==i&&(nt(xi,t),nt(lr,i))}function Uu(t){xi.current===t&&(ot(lr),ot(xi))}var ft=qr(0);function Ya(t){for(var r=t;r!==null;){if(r.tag===13){var i=r.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||i.data==="$?"||i.data==="$!"))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!==void 0){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var Hu=[];function Vu(){for(var t=0;t<Hu.length;t++)Hu[t]._workInProgressVersionPrimary=null;Hu.length=0}var Ga=k.ReactCurrentDispatcher,Wu=k.ReactCurrentBatchConfig,Oo=0,pt=null,Rt=null,Mt=null,Xa=!1,bi=!1,Si=0,v1=0;function Qt(){throw Error(o(321))}function Ku(t,r){if(r===null)return!1;for(var i=0;i<r.length&&i<t.length;i++)if(!Un(t[i],r[i]))return!1;return!0}function Yu(t,r,i,u,p,y){if(Oo=y,pt=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,Ga.current=t===null||t.memoizedState===null?b1:S1,t=i(u,p),bi){y=0;do{if(bi=!1,Si=0,25<=y)throw Error(o(301));y+=1,Mt=Rt=null,r.updateQueue=null,Ga.current=C1,t=i(u,p)}while(bi)}if(Ga.current=Ja,r=Rt!==null&&Rt.next!==null,Oo=0,Mt=Rt=pt=null,Xa=!1,r)throw Error(o(300));return t}function Gu(){var t=Si!==0;return Si=0,t}function cr(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Mt===null?pt.memoizedState=Mt=t:Mt=Mt.next=t,Mt}function _n(){if(Rt===null){var t=pt.alternate;t=t!==null?t.memoizedState:null}else t=Rt.next;var r=Mt===null?pt.memoizedState:Mt.next;if(r!==null)Mt=r,Rt=t;else{if(t===null)throw Error(o(310));Rt=t,t={memoizedState:Rt.memoizedState,baseState:Rt.baseState,baseQueue:Rt.baseQueue,queue:Rt.queue,next:null},Mt===null?pt.memoizedState=Mt=t:Mt=Mt.next=t}return Mt}function Ci(t,r){return typeof r=="function"?r(t):r}function Xu(t){var r=_n(),i=r.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=t;var u=Rt,p=u.baseQueue,y=i.pending;if(y!==null){if(p!==null){var R=p.next;p.next=y.next,y.next=R}u.baseQueue=p=y,i.pending=null}if(p!==null){y=p.next,u=u.baseState;var A=R=null,M=null,V=y;do{var oe=V.lane;if((Oo&oe)===oe)M!==null&&(M=M.next={lane:0,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null}),u=V.hasEagerState?V.eagerState:t(u,V.action);else{var ie={lane:oe,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null};M===null?(A=M=ie,R=u):M=M.next=ie,pt.lanes|=oe,Mo|=oe}V=V.next}while(V!==null&&V!==y);M===null?R=u:M.next=A,Un(u,r.memoizedState)||(pn=!0),r.memoizedState=u,r.baseState=R,r.baseQueue=M,i.lastRenderedState=u}if(t=i.interleaved,t!==null){p=t;do y=p.lane,pt.lanes|=y,Mo|=y,p=p.next;while(p!==t)}else p===null&&(i.lanes=0);return[r.memoizedState,i.dispatch]}function qu(t){var r=_n(),i=r.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=t;var u=i.dispatch,p=i.pending,y=r.memoizedState;if(p!==null){i.pending=null;var R=p=p.next;do y=t(y,R.action),R=R.next;while(R!==p);Un(y,r.memoizedState)||(pn=!0),r.memoizedState=y,r.baseQueue===null&&(r.baseState=y),i.lastRenderedState=y}return[y,u]}function gm(){}function vm(t,r){var i=pt,u=_n(),p=r(),y=!Un(u.memoizedState,p);if(y&&(u.memoizedState=p,pn=!0),u=u.queue,Qu(wm.bind(null,i,u,t),[t]),u.getSnapshot!==r||y||Mt!==null&&Mt.memoizedState.tag&1){if(i.flags|=2048,Ei(9,xm.bind(null,i,u,p,r),void 0,null),It===null)throw Error(o(349));(Oo&30)!==0||ym(i,r,p)}return p}function ym(t,r,i){t.flags|=16384,t={getSnapshot:r,value:i},r=pt.updateQueue,r===null?(r={lastEffect:null,stores:null},pt.updateQueue=r,r.stores=[t]):(i=r.stores,i===null?r.stores=[t]:i.push(t))}function xm(t,r,i,u){r.value=i,r.getSnapshot=u,bm(r)&&Sm(t)}function wm(t,r,i){return i(function(){bm(r)&&Sm(t)})}function bm(t){var r=t.getSnapshot;t=t.value;try{var i=r();return!Un(t,i)}catch{return!0}}function Sm(t){var r=_r(t,1);r!==null&&Yn(r,t,1,-1)}function Cm(t){var r=cr();return typeof t=="function"&&(t=t()),r.memoizedState=r.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ci,lastRenderedState:t},r.queue=t,t=t.dispatch=w1.bind(null,pt,t),[r.memoizedState,t]}function Ei(t,r,i,u){return t={tag:t,create:r,destroy:i,deps:u,next:null},r=pt.updateQueue,r===null?(r={lastEffect:null,stores:null},pt.updateQueue=r,r.lastEffect=t.next=t):(i=r.lastEffect,i===null?r.lastEffect=t.next=t:(u=i.next,i.next=t,t.next=u,r.lastEffect=t)),t}function Em(){return _n().memoizedState}function qa(t,r,i,u){var p=cr();pt.flags|=t,p.memoizedState=Ei(1|r,i,void 0,u===void 0?null:u)}function Qa(t,r,i,u){var p=_n();u=u===void 0?null:u;var y=void 0;if(Rt!==null){var R=Rt.memoizedState;if(y=R.destroy,u!==null&&Ku(u,R.deps)){p.memoizedState=Ei(r,i,y,u);return}}pt.flags|=t,p.memoizedState=Ei(1|r,i,y,u)}function Nm(t,r){return qa(8390656,8,t,r)}function Qu(t,r){return Qa(2048,8,t,r)}function jm(t,r){return Qa(4,2,t,r)}function Rm(t,r){return Qa(4,4,t,r)}function Tm(t,r){if(typeof r=="function")return t=t(),r(t),function(){r(null)};if(r!=null)return t=t(),r.current=t,function(){r.current=null}}function km(t,r,i){return i=i!=null?i.concat([t]):null,Qa(4,4,Tm.bind(null,r,t),i)}function Ju(){}function Pm(t,r){var i=_n();r=r===void 0?null:r;var u=i.memoizedState;return u!==null&&r!==null&&Ku(r,u[1])?u[0]:(i.memoizedState=[t,r],t)}function _m(t,r){var i=_n();r=r===void 0?null:r;var u=i.memoizedState;return u!==null&&r!==null&&Ku(r,u[1])?u[0]:(t=t(),i.memoizedState=[t,r],t)}function Dm(t,r,i){return(Oo&21)===0?(t.baseState&&(t.baseState=!1,pn=!0),t.memoizedState=i):(Un(i,r)||(i=lh(),pt.lanes|=i,Mo|=i,t.baseState=!0),r)}function y1(t,r){var i=et;et=i!==0&&4>i?i:4,t(!0);var u=Wu.transition;Wu.transition={};try{t(!1),r()}finally{et=i,Wu.transition=u}}function Am(){return _n().memoizedState}function x1(t,r,i){var u=oo(t);if(i={lane:u,action:i,hasEagerState:!1,eagerState:null,next:null},Om(t))Mm(r,i);else if(i=dm(t,r,i,u),i!==null){var p=nn();Yn(i,t,u,p),Im(i,r,u)}}function w1(t,r,i){var u=oo(t),p={lane:u,action:i,hasEagerState:!1,eagerState:null,next:null};if(Om(t))Mm(r,p);else{var y=t.alternate;if(t.lanes===0&&(y===null||y.lanes===0)&&(y=r.lastRenderedReducer,y!==null))try{var R=r.lastRenderedState,A=y(R,i);if(p.hasEagerState=!0,p.eagerState=A,Un(A,R)){var M=r.interleaved;M===null?(p.next=p,$u(r)):(p.next=M.next,M.next=p),r.interleaved=p;return}}catch{}finally{}i=dm(t,r,p,u),i!==null&&(p=nn(),Yn(i,t,u,p),Im(i,r,u))}}function Om(t){var r=t.alternate;return t===pt||r!==null&&r===pt}function Mm(t,r){bi=Xa=!0;var i=t.pending;i===null?r.next=r:(r.next=i.next,i.next=r),t.pending=r}function Im(t,r,i){if((i&4194240)!==0){var u=r.lanes;u&=t.pendingLanes,i|=u,r.lanes=i,eu(t,i)}}var Ja={readContext:Pn,useCallback:Qt,useContext:Qt,useEffect:Qt,useImperativeHandle:Qt,useInsertionEffect:Qt,useLayoutEffect:Qt,useMemo:Qt,useReducer:Qt,useRef:Qt,useState:Qt,useDebugValue:Qt,useDeferredValue:Qt,useTransition:Qt,useMutableSource:Qt,useSyncExternalStore:Qt,useId:Qt,unstable_isNewReconciler:!1},b1={readContext:Pn,useCallback:function(t,r){return cr().memoizedState=[t,r===void 0?null:r],t},useContext:Pn,useEffect:Nm,useImperativeHandle:function(t,r,i){return i=i!=null?i.concat([t]):null,qa(4194308,4,Tm.bind(null,r,t),i)},useLayoutEffect:function(t,r){return qa(4194308,4,t,r)},useInsertionEffect:function(t,r){return qa(4,2,t,r)},useMemo:function(t,r){var i=cr();return r=r===void 0?null:r,t=t(),i.memoizedState=[t,r],t},useReducer:function(t,r,i){var u=cr();return r=i!==void 0?i(r):r,u.memoizedState=u.baseState=r,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:r},u.queue=t,t=t.dispatch=x1.bind(null,pt,t),[u.memoizedState,t]},useRef:function(t){var r=cr();return t={current:t},r.memoizedState=t},useState:Cm,useDebugValue:Ju,useDeferredValue:function(t){return cr().memoizedState=t},useTransition:function(){var t=Cm(!1),r=t[0];return t=y1.bind(null,t[1]),cr().memoizedState=t,[r,t]},useMutableSource:function(){},useSyncExternalStore:function(t,r,i){var u=pt,p=cr();if(ct){if(i===void 0)throw Error(o(407));i=i()}else{if(i=r(),It===null)throw Error(o(349));(Oo&30)!==0||ym(u,r,i)}p.memoizedState=i;var y={value:i,getSnapshot:r};return p.queue=y,Nm(wm.bind(null,u,y,t),[t]),u.flags|=2048,Ei(9,xm.bind(null,u,y,i,r),void 0,null),i},useId:function(){var t=cr(),r=It.identifierPrefix;if(ct){var i=Pr,u=kr;i=(u&~(1<<32-Bn(u)-1)).toString(32)+i,r=":"+r+"R"+i,i=Si++,0<i&&(r+="H"+i.toString(32)),r+=":"}else i=v1++,r=":"+r+"r"+i.toString(32)+":";return t.memoizedState=r},unstable_isNewReconciler:!1},S1={readContext:Pn,useCallback:Pm,useContext:Pn,useEffect:Qu,useImperativeHandle:km,useInsertionEffect:jm,useLayoutEffect:Rm,useMemo:_m,useReducer:Xu,useRef:Em,useState:function(){return Xu(Ci)},useDebugValue:Ju,useDeferredValue:function(t){var r=_n();return Dm(r,Rt.memoizedState,t)},useTransition:function(){var t=Xu(Ci)[0],r=_n().memoizedState;return[t,r]},useMutableSource:gm,useSyncExternalStore:vm,useId:Am,unstable_isNewReconciler:!1},C1={readContext:Pn,useCallback:Pm,useContext:Pn,useEffect:Qu,useImperativeHandle:km,useInsertionEffect:jm,useLayoutEffect:Rm,useMemo:_m,useReducer:qu,useRef:Em,useState:function(){return qu(Ci)},useDebugValue:Ju,useDeferredValue:function(t){var r=_n();return Rt===null?r.memoizedState=t:Dm(r,Rt.memoizedState,t)},useTransition:function(){var t=qu(Ci)[0],r=_n().memoizedState;return[t,r]},useMutableSource:gm,useSyncExternalStore:vm,useId:Am,unstable_isNewReconciler:!1};function Vn(t,r){if(t&&t.defaultProps){r=te({},r),t=t.defaultProps;for(var i in t)r[i]===void 0&&(r[i]=t[i]);return r}return r}function Zu(t,r,i,u){r=t.memoizedState,i=i(u,r),i=i==null?r:te({},r,i),t.memoizedState=i,t.lanes===0&&(t.updateQueue.baseState=i)}var Za={isMounted:function(t){return(t=t._reactInternals)?Ro(t)===t:!1},enqueueSetState:function(t,r,i){t=t._reactInternals;var u=nn(),p=oo(t),y=Dr(u,p);y.payload=r,i!=null&&(y.callback=i),r=eo(t,y,p),r!==null&&(Yn(r,t,p,u),Wa(r,t,p))},enqueueReplaceState:function(t,r,i){t=t._reactInternals;var u=nn(),p=oo(t),y=Dr(u,p);y.tag=1,y.payload=r,i!=null&&(y.callback=i),r=eo(t,y,p),r!==null&&(Yn(r,t,p,u),Wa(r,t,p))},enqueueForceUpdate:function(t,r){t=t._reactInternals;var i=nn(),u=oo(t),p=Dr(i,u);p.tag=2,r!=null&&(p.callback=r),r=eo(t,p,u),r!==null&&(Yn(r,t,u,i),Wa(r,t,u))}};function Lm(t,r,i,u,p,y,R){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(u,y,R):r.prototype&&r.prototype.isPureReactComponent?!ui(i,u)||!ui(p,y):!0}function Fm(t,r,i){var u=!1,p=Qr,y=r.contextType;return typeof y=="object"&&y!==null?y=Pn(y):(p=fn(r)?ko:qt.current,u=r.contextTypes,y=(u=u!=null)?cs(t,p):Qr),r=new r(i,y),t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=Za,t.stateNode=r,r._reactInternals=t,u&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=p,t.__reactInternalMemoizedMaskedChildContext=y),r}function $m(t,r,i,u){t=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(i,u),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(i,u),r.state!==t&&Za.enqueueReplaceState(r,r.state,null)}function ed(t,r,i,u){var p=t.stateNode;p.props=i,p.state=t.memoizedState,p.refs={},zu(t);var y=r.contextType;typeof y=="object"&&y!==null?p.context=Pn(y):(y=fn(r)?ko:qt.current,p.context=cs(t,y)),p.state=t.memoizedState,y=r.getDerivedStateFromProps,typeof y=="function"&&(Zu(t,r,y,i),p.state=t.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(r=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),r!==p.state&&Za.enqueueReplaceState(p,p.state,null),Ka(t,i,p,u),p.state=t.memoizedState),typeof p.componentDidMount=="function"&&(t.flags|=4194308)}function vs(t,r){try{var i="",u=r;do i+=de(u),u=u.return;while(u);var p=i}catch(y){p=`39 `),k=p.length-1,O=y.length-1;1<=k&&0<=O&&p[k]!==y[O];)O--;for(;1<=k&&0<=O;k--,O--)if(p[k]!==y[O]){if(k!==1||O!==1)do if(k--,O--,0>O||p[k]!==y[O]){var I=` 40 `+p[k].replace(" at new "," at ");return t.displayName&&I.includes("<anonymous>")&&(I=I.replace("<anonymous>",t.displayName)),I}while(1<=k&&0<=O);break}}}finally{re=!1,Error.prepareStackTrace=i}return(t=t?t.displayName||t.name:"")?K(t):""}function fe(t){switch(t.tag){case 5:return K(t.type);case 16:return K("Lazy");case 13:return K("Suspense");case 19:return K("SuspenseList");case 0:case 2:case 15:return t=G(t.type,!1),t;case 11:return t=G(t.type.render,!1),t;case 1:return t=G(t.type,!0),t;default:return""}}function me(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case D:return"Fragment";case A:return"Portal";case V:return"Profiler";case F:return"StrictMode";case X:return"Suspense";case q:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case H:return(t.displayName||"Context")+".Consumer";case Y:return(t._context.displayName||"Context")+".Provider";case te:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case ce:return r=t.displayName||null,r!==null?r:me(t.type)||"Memo";case ee:r=t._payload,t=t._init;try{return me(t(r))}catch{}}return null}function le(t){var r=t.type;switch(t.tag){case 24:return"Cache";case 9:return(r.displayName||"Context")+".Consumer";case 10:return(r._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=r.render,t=t.displayName||t.name||"",r.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return r;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return me(r);case 8:return r===F?"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 r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r}return null}function ie(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function we(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function pe(t){var r=we(t)?"checked":"value",i=Object.getOwnPropertyDescriptor(t.constructor.prototype,r),u=""+t[r];if(!t.hasOwnProperty(r)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var p=i.get,y=i.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return p.call(this)},set:function(k){u=""+k,y.call(this,k)}}),Object.defineProperty(t,r,{enumerable:i.enumerable}),{getValue:function(){return u},setValue:function(k){u=""+k},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function Ne(t){t._valueTracker||(t._valueTracker=pe(t))}function ue(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var i=r.getValue(),u="";return t&&(u=we(t)?t.checked?"true":"false":t.value),t=u,t!==i?(r.setValue(t),!0):!1}function Me(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function he(t,r){var i=r.checked;return ne({},r,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:i??t._wrapperState.initialChecked})}function et(t,r){var i=r.defaultValue==null?"":r.defaultValue,u=r.checked!=null?r.checked:r.defaultChecked;i=ie(r.value!=null?r.value:i),t._wrapperState={initialChecked:u,initialValue:i,controlled:r.type==="checkbox"||r.type==="radio"?r.checked!=null:r.value!=null}}function Ct(t,r){r=r.checked,r!=null&&_(t,"checked",r,!1)}function wt(t,r){Ct(t,r);var i=ie(r.value),u=r.type;if(i!=null)u==="number"?(i===0&&t.value===""||t.value!=i)&&(t.value=""+i):t.value!==""+i&&(t.value=""+i);else if(u==="submit"||u==="reset"){t.removeAttribute("value");return}r.hasOwnProperty("value")?ct(t,r.type,i):r.hasOwnProperty("defaultValue")&&ct(t,r.type,ie(r.defaultValue)),r.checked==null&&r.defaultChecked!=null&&(t.defaultChecked=!!r.defaultChecked)}function On(t,r,i){if(r.hasOwnProperty("value")||r.hasOwnProperty("defaultValue")){var u=r.type;if(!(u!=="submit"&&u!=="reset"||r.value!==void 0&&r.value!==null))return;r=""+t._wrapperState.initialValue,i||r===t.value||(t.value=r),t.defaultValue=r}i=t.name,i!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,i!==""&&(t.name=i)}function ct(t,r,i){(r!=="number"||Me(t.ownerDocument)!==t)&&(i==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+i&&(t.defaultValue=""+i))}var ht=Array.isArray;function Jt(t,r,i,u){if(t=t.options,r){r={};for(var p=0;p<i.length;p++)r["$"+i[p]]=!0;for(i=0;i<t.length;i++)p=r.hasOwnProperty("$"+t[i].value),t[i].selected!==p&&(t[i].selected=p),p&&u&&(t[i].defaultSelected=!0)}else{for(i=""+ie(i),r=null,p=0;p<t.length;p++){if(t[p].value===i){t[p].selected=!0,u&&(t[p].defaultSelected=!0);return}r!==null||t[p].disabled||(r=t[p])}r!==null&&(r.selected=!0)}}function ut(t,r){if(r.dangerouslySetInnerHTML!=null)throw Error(o(91));return ne({},r,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function $t(t,r){var i=r.value;if(i==null){if(i=r.children,r=r.defaultValue,i!=null){if(r!=null)throw Error(o(92));if(ht(i)){if(1<i.length)throw Error(o(93));i=i[0]}r=i}r==null&&(r=""),i=r}t._wrapperState={initialValue:ie(i)}}function Pr(t,r){var i=ie(r.value),u=ie(r.defaultValue);i!=null&&(i=""+i,i!==t.value&&(t.value=i),r.defaultValue==null&&t.defaultValue!==i&&(t.defaultValue=i)),u!=null&&(t.defaultValue=""+u)}function Dr(t){var r=t.textContent;r===t._wrapperState.initialValue&&r!==""&&r!==null&&(t.value=r)}function Zn(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function hn(t,r){return t==null||t==="http://www.w3.org/1999/xhtml"?Zn(r):t==="http://www.w3.org/2000/svg"&&r==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var Pt,mn=(function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(r,i,u,p){MSApp.execUnsafeLocalFunction(function(){return t(r,i,u,p)})}:t})(function(t,r){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=r;else{for(Pt=Pt||document.createElement("div"),Pt.innerHTML="<svg>"+r.valueOf().toString()+"</svg>",r=Pt.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;r.firstChild;)t.appendChild(r.firstChild)}});function Bt(t,r){if(r){var i=t.firstChild;if(i&&i===t.lastChild&&i.nodeType===3){i.nodeValue=r;return}}t.textContent=r}var Dt={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},Gt=["Webkit","ms","Moz","O"];Object.keys(Dt).forEach(function(t){Gt.forEach(function(r){r=r+t.charAt(0).toUpperCase()+t.substring(1),Dt[r]=Dt[t]})});function Ar(t,r,i){return r==null||typeof r=="boolean"||r===""?"":i||typeof r!="number"||r===0||Dt.hasOwnProperty(t)&&Dt[t]?(""+r).trim():r+"px"}function lo(t,r){t=t.style;for(var i in r)if(r.hasOwnProperty(i)){var u=i.indexOf("--")===0,p=Ar(i,r[i],u);i==="float"&&(i="cssFloat"),u?t.setProperty(i,p):t[i]=p}}var wr=ne({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 er(t,r){if(r){if(wr[t]&&(r.children!=null||r.dangerouslySetInnerHTML!=null))throw Error(o(137,t));if(r.dangerouslySetInnerHTML!=null){if(r.children!=null)throw Error(o(60));if(typeof r.dangerouslySetInnerHTML!="object"||!("__html"in r.dangerouslySetInnerHTML))throw Error(o(61))}if(r.style!=null&&typeof r.style!="object")throw Error(o(62))}}function Or(t,r){if(t.indexOf("-")===-1)return typeof r.is=="string";switch(t){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 Mn=null;function be(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Ve=null,We=null,_e=null;function ze(t){if(t=sa(t)){if(typeof Ve!="function")throw Error(o(280));var r=t.stateNode;r&&(r=gc(r),Ve(t.stateNode,t.type,r))}}function ge(t){We?_e?_e.push(t):_e=[t]:We=t}function Ae(){if(We){var t=We,r=_e;if(_e=We=null,ze(t),r)for(t=0;t<r.length;t++)ze(r[t])}}function $e(t,r){return t(r)}function Le(){}var rt=!1;function Ye(t,r,i){if(rt)return t(r,i);rt=!0;try{return $e(t,r,i)}finally{rt=!1,(We!==null||_e!==null)&&(Le(),Ae())}}function Pe(t,r){var i=t.stateNode;if(i===null)return null;var u=gc(i);if(u===null)return null;i=u[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(t=t.type,u=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!u;break e;default:t=!1}if(t)return null;if(i&&typeof i!="function")throw Error(o(231,r,typeof i));return i}var xt=!1;if(d)try{var Je={};Object.defineProperty(Je,"passive",{get:function(){xt=!0}}),window.addEventListener("test",Je,Je),window.removeEventListener("test",Je,Je)}catch{xt=!1}function mt(t,r,i,u,p,y,k,O,I){var W=Array.prototype.slice.call(arguments,3);try{r.apply(i,W)}catch(se){this.onError(se)}}var gn=!1,Ut=null,vn=!1,Mr=null,$i={onError:function(t){gn=!0,Ut=t}};function HT(t,r,i,u,p,y,k,O,I){gn=!1,Ut=null,mt.apply($i,arguments)}function VT(t,r,i,u,p,y,k,O,I){if(HT.apply(this,arguments),gn){if(gn){var W=Ut;gn=!1,Ut=null}else throw Error(o(198));vn||(vn=!0,Mr=W)}}function Wo(t){var r=t,i=t;if(t.alternate)for(;r.return;)r=r.return;else{t=r;do r=t,(r.flags&4098)!==0&&(i=r.return),t=r.return;while(t)}return r.tag===3?i:null}function T0(t){if(t.tag===13){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function P0(t){if(Wo(t)!==t)throw Error(o(188))}function WT(t){var r=t.alternate;if(!r){if(r=Wo(t),r===null)throw Error(o(188));return r!==t?null:t}for(var i=t,u=r;;){var p=i.return;if(p===null)break;var y=p.alternate;if(y===null){if(u=p.return,u!==null){i=u;continue}break}if(p.child===y.child){for(y=p.child;y;){if(y===i)return P0(p),t;if(y===u)return P0(p),r;y=y.sibling}throw Error(o(188))}if(i.return!==u.return)i=p,u=y;else{for(var k=!1,O=p.child;O;){if(O===i){k=!0,i=p,u=y;break}if(O===u){k=!0,u=p,i=y;break}O=O.sibling}if(!k){for(O=y.child;O;){if(O===i){k=!0,i=y,u=p;break}if(O===u){k=!0,u=y,i=p;break}O=O.sibling}if(!k)throw Error(o(189))}}if(i.alternate!==u)throw Error(o(190))}if(i.tag!==3)throw Error(o(188));return i.stateNode.current===i?t:r}function D0(t){return t=WT(t),t!==null?A0(t):null}function A0(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var r=A0(t);if(r!==null)return r;t=t.sibling}return null}var O0=n.unstable_scheduleCallback,M0=n.unstable_cancelCallback,YT=n.unstable_shouldYield,KT=n.unstable_requestPaint,_t=n.unstable_now,XT=n.unstable_getCurrentPriorityLevel,Sf=n.unstable_ImmediatePriority,I0=n.unstable_UserBlockingPriority,ql=n.unstable_NormalPriority,GT=n.unstable_LowPriority,L0=n.unstable_IdlePriority,Ql=null,xr=null;function qT(t){if(xr&&typeof xr.onCommitFiberRoot=="function")try{xr.onCommitFiberRoot(Ql,t,void 0,(t.current.flags&128)===128)}catch{}}var tr=Math.clz32?Math.clz32:ZT,QT=Math.log,JT=Math.LN2;function ZT(t){return t>>>=0,t===0?32:31-(QT(t)/JT|0)|0}var Jl=64,Zl=4194304;function Bi(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function ec(t,r){var i=t.pendingLanes;if(i===0)return 0;var u=0,p=t.suspendedLanes,y=t.pingedLanes,k=i&268435455;if(k!==0){var O=k&~p;O!==0?u=Bi(O):(y&=k,y!==0&&(u=Bi(y)))}else k=i&~p,k!==0?u=Bi(k):y!==0&&(u=Bi(y));if(u===0)return 0;if(r!==0&&r!==u&&(r&p)===0&&(p=u&-u,y=r&-r,p>=y||p===16&&(y&4194240)!==0))return r;if((u&4)!==0&&(u|=i&16),r=t.entangledLanes,r!==0)for(t=t.entanglements,r&=u;0<r;)i=31-tr(r),p=1<<i,u|=t[i],r&=~p;return u}function eP(t,r){switch(t){case 1:case 2:case 4:return r+250;case 8:case 16:case 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 r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function tP(t,r){for(var i=t.suspendedLanes,u=t.pingedLanes,p=t.expirationTimes,y=t.pendingLanes;0<y;){var k=31-tr(y),O=1<<k,I=p[k];I===-1?((O&i)===0||(O&u)!==0)&&(p[k]=eP(O,r)):I<=r&&(t.expiredLanes|=O),y&=~O}}function Cf(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function F0(){var t=Jl;return Jl<<=1,(Jl&4194240)===0&&(Jl=64),t}function _f(t){for(var r=[],i=0;31>i;i++)r.push(t);return r}function Ui(t,r,i){t.pendingLanes|=r,r!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,r=31-tr(r),t[r]=i}function nP(t,r){var i=t.pendingLanes&~r;t.pendingLanes=r,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=r,t.mutableReadLanes&=r,t.entangledLanes&=r,r=t.entanglements;var u=t.eventTimes;for(t=t.expirationTimes;0<i;){var p=31-tr(i),y=1<<p;r[p]=0,u[p]=-1,t[p]=-1,i&=~y}}function Ef(t,r){var i=t.entangledLanes|=r;for(t=t.entanglements;i;){var u=31-tr(i),p=1<<u;p&r|t[u]&r&&(t[u]|=r),i&=~p}}var tt=0;function z0(t){return t&=-t,1<t?4<t?(t&268435455)!==0?16:536870912:4:1}var $0,Nf,B0,U0,H0,kf=!1,tc=[],co=null,uo=null,fo=null,Hi=new Map,Vi=new Map,po=[],rP="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function V0(t,r){switch(t){case"focusin":case"focusout":co=null;break;case"dragenter":case"dragleave":uo=null;break;case"mouseover":case"mouseout":fo=null;break;case"pointerover":case"pointerout":Hi.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Vi.delete(r.pointerId)}}function Wi(t,r,i,u,p,y){return t===null||t.nativeEvent!==y?(t={blockedOn:r,domEventName:i,eventSystemFlags:u,nativeEvent:y,targetContainers:[p]},r!==null&&(r=sa(r),r!==null&&Nf(r)),t):(t.eventSystemFlags|=u,r=t.targetContainers,p!==null&&r.indexOf(p)===-1&&r.push(p),t)}function oP(t,r,i,u,p){switch(r){case"focusin":return co=Wi(co,t,r,i,u,p),!0;case"dragenter":return uo=Wi(uo,t,r,i,u,p),!0;case"mouseover":return fo=Wi(fo,t,r,i,u,p),!0;case"pointerover":var y=p.pointerId;return Hi.set(y,Wi(Hi.get(y)||null,t,r,i,u,p)),!0;case"gotpointercapture":return y=p.pointerId,Vi.set(y,Wi(Vi.get(y)||null,t,r,i,u,p)),!0}return!1}function W0(t){var r=Yo(t.target);if(r!==null){var i=Wo(r);if(i!==null){if(r=i.tag,r===13){if(r=T0(i),r!==null){t.blockedOn=r,H0(t.priority,function(){B0(i)});return}}else if(r===3&&i.stateNode.current.memoizedState.isDehydrated){t.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}t.blockedOn=null}function nc(t){if(t.blockedOn!==null)return!1;for(var r=t.targetContainers;0<r.length;){var i=Rf(t.domEventName,t.eventSystemFlags,r[0],t.nativeEvent);if(i===null){i=t.nativeEvent;var u=new i.constructor(i.type,i);Mn=u,i.target.dispatchEvent(u),Mn=null}else return r=sa(i),r!==null&&Nf(r),t.blockedOn=i,!1;r.shift()}return!0}function Y0(t,r,i){nc(t)&&i.delete(r)}function sP(){kf=!1,co!==null&&nc(co)&&(co=null),uo!==null&&nc(uo)&&(uo=null),fo!==null&&nc(fo)&&(fo=null),Hi.forEach(Y0),Vi.forEach(Y0)}function Yi(t,r){t.blockedOn===r&&(t.blockedOn=null,kf||(kf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,sP)))}function Ki(t){function r(p){return Yi(p,t)}if(0<tc.length){Yi(tc[0],t);for(var i=1;i<tc.length;i++){var u=tc[i];u.blockedOn===t&&(u.blockedOn=null)}}for(co!==null&&Yi(co,t),uo!==null&&Yi(uo,t),fo!==null&&Yi(fo,t),Hi.forEach(r),Vi.forEach(r),i=0;i<po.length;i++)u=po[i],u.blockedOn===t&&(u.blockedOn=null);for(;0<po.length&&(i=po[0],i.blockedOn===null);)W0(i),i.blockedOn===null&&po.shift()}var As=R.ReactCurrentBatchConfig,rc=!0;function iP(t,r,i,u){var p=tt,y=As.transition;As.transition=null;try{tt=1,jf(t,r,i,u)}finally{tt=p,As.transition=y}}function aP(t,r,i,u){var p=tt,y=As.transition;As.transition=null;try{tt=4,jf(t,r,i,u)}finally{tt=p,As.transition=y}}function jf(t,r,i,u){if(rc){var p=Rf(t,r,i,u);if(p===null)Yf(t,r,u,oc,i),V0(t,u);else if(oP(p,t,r,i,u))u.stopPropagation();else if(V0(t,u),r&4&&-1<rP.indexOf(t)){for(;p!==null;){var y=sa(p);if(y!==null&&$0(y),y=Rf(t,r,i,u),y===null&&Yf(t,r,u,oc,i),y===p)break;p=y}p!==null&&u.stopPropagation()}else Yf(t,r,u,null,i)}}var oc=null;function Rf(t,r,i,u){if(oc=null,t=be(u),t=Yo(t),t!==null)if(r=Wo(t),r===null)t=null;else if(i=r.tag,i===13){if(t=T0(r),t!==null)return t;t=null}else if(i===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;t=null}else r!==t&&(t=null);return oc=t,null}function K0(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(XT()){case Sf:return 1;case I0:return 4;case ql:case GT:return 16;case L0:return 536870912;default:return 16}default:return 16}}var ho=null,Tf=null,sc=null;function X0(){if(sc)return sc;var t,r=Tf,i=r.length,u,p="value"in ho?ho.value:ho.textContent,y=p.length;for(t=0;t<i&&r[t]===p[t];t++);var k=i-t;for(u=1;u<=k&&r[i-u]===p[y-u];u++);return sc=p.slice(t,1<u?1-u:void 0)}function ic(t){var r=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&r===13&&(t=13)):t=r,t===10&&(t=13),32<=t||t===13?t:0}function ac(){return!0}function G0(){return!1}function En(t){function r(i,u,p,y,k){this._reactName=i,this._targetInst=p,this.type=u,this.nativeEvent=y,this.target=k,this.currentTarget=null;for(var O in t)t.hasOwnProperty(O)&&(i=t[O],this[O]=i?i(y):y[O]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?ac:G0,this.isPropagationStopped=G0,this}return ne(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=ac)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=ac)},persist:function(){},isPersistent:ac}),r}var Os={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Pf=En(Os),Xi=ne({},Os,{view:0,detail:0}),lP=En(Xi),Df,Af,Gi,lc=ne({},Xi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Mf,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Gi&&(Gi&&t.type==="mousemove"?(Df=t.screenX-Gi.screenX,Af=t.screenY-Gi.screenY):Af=Df=0,Gi=t),Df)},movementY:function(t){return"movementY"in t?t.movementY:Af}}),q0=En(lc),cP=ne({},lc,{dataTransfer:0}),uP=En(cP),dP=ne({},Xi,{relatedTarget:0}),Of=En(dP),fP=ne({},Os,{animationName:0,elapsedTime:0,pseudoElement:0}),pP=En(fP),hP=ne({},Os,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),mP=En(hP),gP=ne({},Os,{data:0}),Q0=En(gP),vP={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},yP={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},wP={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xP(t){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(t):(t=wP[t])?!!r[t]:!1}function Mf(){return xP}var bP=ne({},Xi,{key:function(t){if(t.key){var r=vP[t.key]||t.key;if(r!=="Unidentified")return r}return t.type==="keypress"?(t=ic(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?yP[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Mf,charCode:function(t){return t.type==="keypress"?ic(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?ic(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),SP=En(bP),CP=ne({},lc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),J0=En(CP),_P=ne({},Xi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Mf}),EP=En(_P),NP=ne({},Os,{propertyName:0,elapsedTime:0,pseudoElement:0}),kP=En(NP),jP=ne({},lc,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),RP=En(jP),TP=[9,13,27,32],If=d&&"CompositionEvent"in window,qi=null;d&&"documentMode"in document&&(qi=document.documentMode);var PP=d&&"TextEvent"in window&&!qi,Z0=d&&(!If||qi&&8<qi&&11>=qi),ex=" ",tx=!1;function nx(t,r){switch(t){case"keyup":return TP.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function rx(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ms=!1;function DP(t,r){switch(t){case"compositionend":return rx(r);case"keypress":return r.which!==32?null:(tx=!0,ex);case"textInput":return t=r.data,t===ex&&tx?null:t;default:return null}}function AP(t,r){if(Ms)return t==="compositionend"||!If&&nx(t,r)?(t=X0(),sc=Tf=ho=null,Ms=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Z0&&r.locale!=="ko"?null:r.data;default:return null}}var OP={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ox(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r==="input"?!!OP[t.type]:r==="textarea"}function sx(t,r,i,u){ge(u),r=pc(r,"onChange"),0<r.length&&(i=new Pf("onChange","change",null,i,u),t.push({event:i,listeners:r}))}var Qi=null,Ji=null;function MP(t){Cx(t,0)}function cc(t){var r=$s(t);if(ue(r))return t}function IP(t,r){if(t==="change")return r}var ix=!1;if(d){var Lf;if(d){var Ff="oninput"in document;if(!Ff){var ax=document.createElement("div");ax.setAttribute("oninput","return;"),Ff=typeof ax.oninput=="function"}Lf=Ff}else Lf=!1;ix=Lf&&(!document.documentMode||9<document.documentMode)}function lx(){Qi&&(Qi.detachEvent("onpropertychange",cx),Ji=Qi=null)}function cx(t){if(t.propertyName==="value"&&cc(Ji)){var r=[];sx(r,Ji,t,be(t)),Ye(MP,r)}}function LP(t,r,i){t==="focusin"?(lx(),Qi=r,Ji=i,Qi.attachEvent("onpropertychange",cx)):t==="focusout"&&lx()}function FP(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return cc(Ji)}function zP(t,r){if(t==="click")return cc(r)}function $P(t,r){if(t==="input"||t==="change")return cc(r)}function BP(t,r){return t===r&&(t!==0||1/t===1/r)||t!==t&&r!==r}var nr=typeof Object.is=="function"?Object.is:BP;function Zi(t,r){if(nr(t,r))return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null)return!1;var i=Object.keys(t),u=Object.keys(r);if(i.length!==u.length)return!1;for(u=0;u<i.length;u++){var p=i[u];if(!h.call(r,p)||!nr(t[p],r[p]))return!1}return!0}function ux(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function dx(t,r){var i=ux(t);t=0;for(var u;i;){if(i.nodeType===3){if(u=t+i.textContent.length,t<=r&&u>=r)return{node:i,offset:r-t};t=u}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=ux(i)}}function fx(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?fx(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function px(){for(var t=window,r=Me();r instanceof t.HTMLIFrameElement;){try{var i=typeof r.contentWindow.location.href=="string"}catch{i=!1}if(i)t=r.contentWindow;else break;r=Me(t.document)}return r}function zf(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r&&(r==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||r==="textarea"||t.contentEditable==="true")}function UP(t){var r=px(),i=t.focusedElem,u=t.selectionRange;if(r!==i&&i&&i.ownerDocument&&fx(i.ownerDocument.documentElement,i)){if(u!==null&&zf(i)){if(r=u.start,t=u.end,t===void 0&&(t=r),"selectionStart"in i)i.selectionStart=r,i.selectionEnd=Math.min(t,i.value.length);else if(t=(r=i.ownerDocument||document)&&r.defaultView||window,t.getSelection){t=t.getSelection();var p=i.textContent.length,y=Math.min(u.start,p);u=u.end===void 0?y:Math.min(u.end,p),!t.extend&&y>u&&(p=u,u=y,y=p),p=dx(i,y);var k=dx(i,u);p&&k&&(t.rangeCount!==1||t.anchorNode!==p.node||t.anchorOffset!==p.offset||t.focusNode!==k.node||t.focusOffset!==k.offset)&&(r=r.createRange(),r.setStart(p.node,p.offset),t.removeAllRanges(),y>u?(t.addRange(r),t.extend(k.node,k.offset)):(r.setEnd(k.node,k.offset),t.addRange(r)))}}for(r=[],t=i;t=t.parentNode;)t.nodeType===1&&r.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof i.focus=="function"&&i.focus(),i=0;i<r.length;i++)t=r[i],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var HP=d&&"documentMode"in document&&11>=document.documentMode,Is=null,$f=null,ea=null,Bf=!1;function hx(t,r,i){var u=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Bf||Is==null||Is!==Me(u)||(u=Is,"selectionStart"in u&&zf(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),ea&&Zi(ea,u)||(ea=u,u=pc($f,"onSelect"),0<u.length&&(r=new Pf("onSelect","select",null,r,i),t.push({event:r,listeners:u}),r.target=Is)))}function uc(t,r){var i={};return i[t.toLowerCase()]=r.toLowerCase(),i["Webkit"+t]="webkit"+r,i["Moz"+t]="moz"+r,i}var Ls={animationend:uc("Animation","AnimationEnd"),animationiteration:uc("Animation","AnimationIteration"),animationstart:uc("Animation","AnimationStart"),transitionend:uc("Transition","TransitionEnd")},Uf={},mx={};d&&(mx=document.createElement("div").style,"AnimationEvent"in window||(delete Ls.animationend.animation,delete Ls.animationiteration.animation,delete Ls.animationstart.animation),"TransitionEvent"in window||delete Ls.transitionend.transition);function dc(t){if(Uf[t])return Uf[t];if(!Ls[t])return t;var r=Ls[t],i;for(i in r)if(r.hasOwnProperty(i)&&i in mx)return Uf[t]=r[i];return t}var gx=dc("animationend"),vx=dc("animationiteration"),yx=dc("animationstart"),wx=dc("transitionend"),xx=new Map,bx="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function mo(t,r){xx.set(t,r),l(r,[t])}for(var Hf=0;Hf<bx.length;Hf++){var Vf=bx[Hf],VP=Vf.toLowerCase(),WP=Vf[0].toUpperCase()+Vf.slice(1);mo(VP,"on"+WP)}mo(gx,"onAnimationEnd"),mo(vx,"onAnimationIteration"),mo(yx,"onAnimationStart"),mo("dblclick","onDoubleClick"),mo("focusin","onFocus"),mo("focusout","onBlur"),mo(wx,"onTransitionEnd"),f("onMouseEnter",["mouseout","mouseover"]),f("onMouseLeave",["mouseout","mouseover"]),f("onPointerEnter",["pointerout","pointerover"]),f("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ta="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),YP=new Set("cancel close invalid load scroll toggle".split(" ").concat(ta));function Sx(t,r,i){var u=t.type||"unknown-event";t.currentTarget=i,VT(u,r,void 0,t),t.currentTarget=null}function Cx(t,r){r=(r&4)!==0;for(var i=0;i<t.length;i++){var u=t[i],p=u.event;u=u.listeners;e:{var y=void 0;if(r)for(var k=u.length-1;0<=k;k--){var O=u[k],I=O.instance,W=O.currentTarget;if(O=O.listener,I!==y&&p.isPropagationStopped())break e;Sx(p,O,W),y=I}else for(k=0;k<u.length;k++){if(O=u[k],I=O.instance,W=O.currentTarget,O=O.listener,I!==y&&p.isPropagationStopped())break e;Sx(p,O,W),y=I}}}if(vn)throw t=Mr,vn=!1,Mr=null,t}function at(t,r){var i=r[Jf];i===void 0&&(i=r[Jf]=new Set);var u=t+"__bubble";i.has(u)||(_x(r,t,2,!1),i.add(u))}function Wf(t,r,i){var u=0;r&&(u|=4),_x(i,t,u,r)}var fc="_reactListening"+Math.random().toString(36).slice(2);function na(t){if(!t[fc]){t[fc]=!0,s.forEach(function(i){i!=="selectionchange"&&(YP.has(i)||Wf(i,!1,t),Wf(i,!0,t))});var r=t.nodeType===9?t:t.ownerDocument;r===null||r[fc]||(r[fc]=!0,Wf("selectionchange",!1,r))}}function _x(t,r,i,u){switch(K0(r)){case 1:var p=iP;break;case 4:p=aP;break;default:p=jf}i=p.bind(null,r,i,t),p=void 0,!xt||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(p=!0),u?p!==void 0?t.addEventListener(r,i,{capture:!0,passive:p}):t.addEventListener(r,i,!0):p!==void 0?t.addEventListener(r,i,{passive:p}):t.addEventListener(r,i,!1)}function Yf(t,r,i,u,p){var y=u;if((r&1)===0&&(r&2)===0&&u!==null)e:for(;;){if(u===null)return;var k=u.tag;if(k===3||k===4){var O=u.stateNode.containerInfo;if(O===p||O.nodeType===8&&O.parentNode===p)break;if(k===4)for(k=u.return;k!==null;){var I=k.tag;if((I===3||I===4)&&(I=k.stateNode.containerInfo,I===p||I.nodeType===8&&I.parentNode===p))return;k=k.return}for(;O!==null;){if(k=Yo(O),k===null)return;if(I=k.tag,I===5||I===6){u=y=k;continue e}O=O.parentNode}}u=u.return}Ye(function(){var W=y,se=be(i),ae=[];e:{var oe=xx.get(t);if(oe!==void 0){var ve=Pf,xe=t;switch(t){case"keypress":if(ic(i)===0)break e;case"keydown":case"keyup":ve=SP;break;case"focusin":xe="focus",ve=Of;break;case"focusout":xe="blur",ve=Of;break;case"beforeblur":case"afterblur":ve=Of;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ve=q0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ve=uP;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ve=EP;break;case gx:case vx:case yx:ve=pP;break;case wx:ve=kP;break;case"scroll":ve=lP;break;case"wheel":ve=RP;break;case"copy":case"cut":case"paste":ve=mP;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ve=J0}var Se=(r&4)!==0,Et=!Se&&t==="scroll",$=Se?oe!==null?oe+"Capture":null:oe;Se=[];for(var L=W,U;L!==null;){U=L;var de=U.stateNode;if(U.tag===5&&de!==null&&(U=de,$!==null&&(de=Pe(L,$),de!=null&&Se.push(ra(L,de,U)))),Et)break;L=L.return}0<Se.length&&(oe=new ve(oe,xe,null,i,se),ae.push({event:oe,listeners:Se}))}}if((r&7)===0){e:{if(oe=t==="mouseover"||t==="pointerover",ve=t==="mouseout"||t==="pointerout",oe&&i!==Mn&&(xe=i.relatedTarget||i.fromElement)&&(Yo(xe)||xe[Ir]))break e;if((ve||oe)&&(oe=se.window===se?se:(oe=se.ownerDocument)?oe.defaultView||oe.parentWindow:window,ve?(xe=i.relatedTarget||i.toElement,ve=W,xe=xe?Yo(xe):null,xe!==null&&(Et=Wo(xe),xe!==Et||xe.tag!==5&&xe.tag!==6)&&(xe=null)):(ve=null,xe=W),ve!==xe)){if(Se=q0,de="onMouseLeave",$="onMouseEnter",L="mouse",(t==="pointerout"||t==="pointerover")&&(Se=J0,de="onPointerLeave",$="onPointerEnter",L="pointer"),Et=ve==null?oe:$s(ve),U=xe==null?oe:$s(xe),oe=new Se(de,L+"leave",ve,i,se),oe.target=Et,oe.relatedTarget=U,de=null,Yo(se)===W&&(Se=new Se($,L+"enter",xe,i,se),Se.target=U,Se.relatedTarget=Et,de=Se),Et=de,ve&&xe)t:{for(Se=ve,$=xe,L=0,U=Se;U;U=Fs(U))L++;for(U=0,de=$;de;de=Fs(de))U++;for(;0<L-U;)Se=Fs(Se),L--;for(;0<U-L;)$=Fs($),U--;for(;L--;){if(Se===$||$!==null&&Se===$.alternate)break t;Se=Fs(Se),$=Fs($)}Se=null}else Se=null;ve!==null&&Ex(ae,oe,ve,Se,!1),xe!==null&&Et!==null&&Ex(ae,Et,xe,Se,!0)}}e:{if(oe=W?$s(W):window,ve=oe.nodeName&&oe.nodeName.toLowerCase(),ve==="select"||ve==="input"&&oe.type==="file")var Ce=IP;else if(ox(oe))if(ix)Ce=$P;else{Ce=FP;var je=LP}else(ve=oe.nodeName)&&ve.toLowerCase()==="input"&&(oe.type==="checkbox"||oe.type==="radio")&&(Ce=zP);if(Ce&&(Ce=Ce(t,W))){sx(ae,Ce,i,se);break e}je&&je(t,oe,W),t==="focusout"&&(je=oe._wrapperState)&&je.controlled&&oe.type==="number"&&ct(oe,"number",oe.value)}switch(je=W?$s(W):window,t){case"focusin":(ox(je)||je.contentEditable==="true")&&(Is=je,$f=W,ea=null);break;case"focusout":ea=$f=Is=null;break;case"mousedown":Bf=!0;break;case"contextmenu":case"mouseup":case"dragend":Bf=!1,hx(ae,i,se);break;case"selectionchange":if(HP)break;case"keydown":case"keyup":hx(ae,i,se)}var Re;if(If)e:{switch(t){case"compositionstart":var De="onCompositionStart";break e;case"compositionend":De="onCompositionEnd";break e;case"compositionupdate":De="onCompositionUpdate";break e}De=void 0}else Ms?nx(t,i)&&(De="onCompositionEnd"):t==="keydown"&&i.keyCode===229&&(De="onCompositionStart");De&&(Z0&&i.locale!=="ko"&&(Ms||De!=="onCompositionStart"?De==="onCompositionEnd"&&Ms&&(Re=X0()):(ho=se,Tf="value"in ho?ho.value:ho.textContent,Ms=!0)),je=pc(W,De),0<je.length&&(De=new Q0(De,t,null,i,se),ae.push({event:De,listeners:je}),Re?De.data=Re:(Re=rx(i),Re!==null&&(De.data=Re)))),(Re=PP?DP(t,i):AP(t,i))&&(W=pc(W,"onBeforeInput"),0<W.length&&(se=new Q0("onBeforeInput","beforeinput",null,i,se),ae.push({event:se,listeners:W}),se.data=Re))}Cx(ae,r)})}function ra(t,r,i){return{instance:t,listener:r,currentTarget:i}}function pc(t,r){for(var i=r+"Capture",u=[];t!==null;){var p=t,y=p.stateNode;p.tag===5&&y!==null&&(p=y,y=Pe(t,i),y!=null&&u.unshift(ra(t,y,p)),y=Pe(t,r),y!=null&&u.push(ra(t,y,p))),t=t.return}return u}function Fs(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function Ex(t,r,i,u,p){for(var y=r._reactName,k=[];i!==null&&i!==u;){var O=i,I=O.alternate,W=O.stateNode;if(I!==null&&I===u)break;O.tag===5&&W!==null&&(O=W,p?(I=Pe(i,y),I!=null&&k.unshift(ra(i,I,O))):p||(I=Pe(i,y),I!=null&&k.push(ra(i,I,O)))),i=i.return}k.length!==0&&t.push({event:r,listeners:k})}var KP=/\r\n?/g,XP=/\u0000|\uFFFD/g;function Nx(t){return(typeof t=="string"?t:""+t).replace(KP,` 41 `).replace(XP,"")}function hc(t,r,i){if(r=Nx(r),Nx(t)!==r&&i)throw Error(o(425))}function mc(){}var Kf=null,Xf=null;function Gf(t,r){return t==="textarea"||t==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var qf=typeof setTimeout=="function"?setTimeout:void 0,GP=typeof clearTimeout=="function"?clearTimeout:void 0,kx=typeof Promise=="function"?Promise:void 0,qP=typeof queueMicrotask=="function"?queueMicrotask:typeof kx<"u"?function(t){return kx.resolve(null).then(t).catch(QP)}:qf;function QP(t){setTimeout(function(){throw t})}function Qf(t,r){var i=r,u=0;do{var p=i.nextSibling;if(t.removeChild(i),p&&p.nodeType===8)if(i=p.data,i==="/$"){if(u===0){t.removeChild(p),Ki(r);return}u--}else i!=="$"&&i!=="$?"&&i!=="$!"||u++;i=p}while(i);Ki(r)}function go(t){for(;t!=null;t=t.nextSibling){var r=t.nodeType;if(r===1||r===3)break;if(r===8){if(r=t.data,r==="$"||r==="$!"||r==="$?")break;if(r==="/$")return null}}return t}function jx(t){t=t.previousSibling;for(var r=0;t;){if(t.nodeType===8){var i=t.data;if(i==="$"||i==="$!"||i==="$?"){if(r===0)return t;r--}else i==="/$"&&r++}t=t.previousSibling}return null}var zs=Math.random().toString(36).slice(2),br="__reactFiber$"+zs,oa="__reactProps$"+zs,Ir="__reactContainer$"+zs,Jf="__reactEvents$"+zs,JP="__reactListeners$"+zs,ZP="__reactHandles$"+zs;function Yo(t){var r=t[br];if(r)return r;for(var i=t.parentNode;i;){if(r=i[Ir]||i[br]){if(i=r.alternate,r.child!==null||i!==null&&i.child!==null)for(t=jx(t);t!==null;){if(i=t[br])return i;t=jx(t)}return r}t=i,i=t.parentNode}return null}function sa(t){return t=t[br]||t[Ir],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function $s(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(o(33))}function gc(t){return t[oa]||null}var Zf=[],Bs=-1;function vo(t){return{current:t}}function lt(t){0>Bs||(t.current=Zf[Bs],Zf[Bs]=null,Bs--)}function ot(t,r){Bs++,Zf[Bs]=t.current,t.current=r}var yo={},Zt=vo(yo),yn=vo(!1),Ko=yo;function Us(t,r){var i=t.type.contextTypes;if(!i)return yo;var u=t.stateNode;if(u&&u.__reactInternalMemoizedUnmaskedChildContext===r)return u.__reactInternalMemoizedMaskedChildContext;var p={},y;for(y in i)p[y]=r[y];return u&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=r,t.__reactInternalMemoizedMaskedChildContext=p),p}function wn(t){return t=t.childContextTypes,t!=null}function vc(){lt(yn),lt(Zt)}function Rx(t,r,i){if(Zt.current!==yo)throw Error(o(168));ot(Zt,r),ot(yn,i)}function Tx(t,r,i){var u=t.stateNode;if(r=r.childContextTypes,typeof u.getChildContext!="function")return i;u=u.getChildContext();for(var p in u)if(!(p in r))throw Error(o(108,le(t)||"Unknown",p));return ne({},i,u)}function yc(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||yo,Ko=Zt.current,ot(Zt,t),ot(yn,yn.current),!0}function Px(t,r,i){var u=t.stateNode;if(!u)throw Error(o(169));i?(t=Tx(t,r,Ko),u.__reactInternalMemoizedMergedChildContext=t,lt(yn),lt(Zt),ot(Zt,t)):lt(yn),ot(yn,i)}var Lr=null,wc=!1,ep=!1;function Dx(t){Lr===null?Lr=[t]:Lr.push(t)}function eD(t){wc=!0,Dx(t)}function wo(){if(!ep&&Lr!==null){ep=!0;var t=0,r=tt;try{var i=Lr;for(tt=1;t<i.length;t++){var u=i[t];do u=u(!0);while(u!==null)}Lr=null,wc=!1}catch(p){throw Lr!==null&&(Lr=Lr.slice(t+1)),O0(Sf,wo),p}finally{tt=r,ep=!1}}return null}var Hs=[],Vs=0,xc=null,bc=0,In=[],Ln=0,Xo=null,Fr=1,zr="";function Go(t,r){Hs[Vs++]=bc,Hs[Vs++]=xc,xc=t,bc=r}function Ax(t,r,i){In[Ln++]=Fr,In[Ln++]=zr,In[Ln++]=Xo,Xo=t;var u=Fr;t=zr;var p=32-tr(u)-1;u&=~(1<<p),i+=1;var y=32-tr(r)+p;if(30<y){var k=p-p%5;y=(u&(1<<k)-1).toString(32),u>>=k,p-=k,Fr=1<<32-tr(r)+p|i<<p|u,zr=y+t}else Fr=1<<y|i<<p|u,zr=t}function tp(t){t.return!==null&&(Go(t,1),Ax(t,1,0))}function np(t){for(;t===xc;)xc=Hs[--Vs],Hs[Vs]=null,bc=Hs[--Vs],Hs[Vs]=null;for(;t===Xo;)Xo=In[--Ln],In[Ln]=null,zr=In[--Ln],In[Ln]=null,Fr=In[--Ln],In[Ln]=null}var Nn=null,kn=null,dt=!1,rr=null;function Ox(t,r){var i=Bn(5,null,null,0);i.elementType="DELETED",i.stateNode=r,i.return=t,r=t.deletions,r===null?(t.deletions=[i],t.flags|=16):r.push(i)}function Mx(t,r){switch(t.tag){case 5:var i=t.type;return r=r.nodeType!==1||i.toLowerCase()!==r.nodeName.toLowerCase()?null:r,r!==null?(t.stateNode=r,Nn=t,kn=go(r.firstChild),!0):!1;case 6:return r=t.pendingProps===""||r.nodeType!==3?null:r,r!==null?(t.stateNode=r,Nn=t,kn=null,!0):!1;case 13:return r=r.nodeType!==8?null:r,r!==null?(i=Xo!==null?{id:Fr,overflow:zr}:null,t.memoizedState={dehydrated:r,treeContext:i,retryLane:1073741824},i=Bn(18,null,null,0),i.stateNode=r,i.return=t,t.child=i,Nn=t,kn=null,!0):!1;default:return!1}}function rp(t){return(t.mode&1)!==0&&(t.flags&128)===0}function op(t){if(dt){var r=kn;if(r){var i=r;if(!Mx(t,r)){if(rp(t))throw Error(o(418));r=go(i.nextSibling);var u=Nn;r&&Mx(t,r)?Ox(u,i):(t.flags=t.flags&-4097|2,dt=!1,Nn=t)}}else{if(rp(t))throw Error(o(418));t.flags=t.flags&-4097|2,dt=!1,Nn=t}}}function Ix(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Nn=t}function Sc(t){if(t!==Nn)return!1;if(!dt)return Ix(t),dt=!0,!1;var r;if((r=t.tag!==3)&&!(r=t.tag!==5)&&(r=t.type,r=r!=="head"&&r!=="body"&&!Gf(t.type,t.memoizedProps)),r&&(r=kn)){if(rp(t))throw Lx(),Error(o(418));for(;r;)Ox(t,r),r=go(r.nextSibling)}if(Ix(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(317));e:{for(t=t.nextSibling,r=0;t;){if(t.nodeType===8){var i=t.data;if(i==="/$"){if(r===0){kn=go(t.nextSibling);break e}r--}else i!=="$"&&i!=="$!"&&i!=="$?"||r++}t=t.nextSibling}kn=null}}else kn=Nn?go(t.stateNode.nextSibling):null;return!0}function Lx(){for(var t=kn;t;)t=go(t.nextSibling)}function Ws(){kn=Nn=null,dt=!1}function sp(t){rr===null?rr=[t]:rr.push(t)}var tD=R.ReactCurrentBatchConfig;function ia(t,r,i){if(t=i.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(i._owner){if(i=i._owner,i){if(i.tag!==1)throw Error(o(309));var u=i.stateNode}if(!u)throw Error(o(147,t));var p=u,y=""+t;return r!==null&&r.ref!==null&&typeof r.ref=="function"&&r.ref._stringRef===y?r.ref:(r=function(k){var O=p.refs;k===null?delete O[y]:O[y]=k},r._stringRef=y,r)}if(typeof t!="string")throw Error(o(284));if(!i._owner)throw Error(o(290,t))}return t}function Cc(t,r){throw t=Object.prototype.toString.call(r),Error(o(31,t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t))}function Fx(t){var r=t._init;return r(t._payload)}function zx(t){function r($,L){if(t){var U=$.deletions;U===null?($.deletions=[L],$.flags|=16):U.push(L)}}function i($,L){if(!t)return null;for(;L!==null;)r($,L),L=L.sibling;return null}function u($,L){for($=new Map;L!==null;)L.key!==null?$.set(L.key,L):$.set(L.index,L),L=L.sibling;return $}function p($,L){return $=ko($,L),$.index=0,$.sibling=null,$}function y($,L,U){return $.index=U,t?(U=$.alternate,U!==null?(U=U.index,U<L?($.flags|=2,L):U):($.flags|=2,L)):($.flags|=1048576,L)}function k($){return t&&$.alternate===null&&($.flags|=2),$}function O($,L,U,de){return L===null||L.tag!==6?(L=Qp(U,$.mode,de),L.return=$,L):(L=p(L,U),L.return=$,L)}function I($,L,U,de){var Ce=U.type;return Ce===D?se($,L,U.props.children,de,U.key):L!==null&&(L.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===ee&&Fx(Ce)===L.type)?(de=p(L,U.props),de.ref=ia($,L,U),de.return=$,de):(de=Kc(U.type,U.key,U.props,null,$.mode,de),de.ref=ia($,L,U),de.return=$,de)}function W($,L,U,de){return L===null||L.tag!==4||L.stateNode.containerInfo!==U.containerInfo||L.stateNode.implementation!==U.implementation?(L=Jp(U,$.mode,de),L.return=$,L):(L=p(L,U.children||[]),L.return=$,L)}function se($,L,U,de,Ce){return L===null||L.tag!==7?(L=rs(U,$.mode,de,Ce),L.return=$,L):(L=p(L,U),L.return=$,L)}function ae($,L,U){if(typeof L=="string"&&L!==""||typeof L=="number")return L=Qp(""+L,$.mode,U),L.return=$,L;if(typeof L=="object"&&L!==null){switch(L.$$typeof){case P:return U=Kc(L.type,L.key,L.props,null,$.mode,U),U.ref=ia($,null,L),U.return=$,U;case A:return L=Jp(L,$.mode,U),L.return=$,L;case ee:var de=L._init;return ae($,de(L._payload),U)}if(ht(L)||Z(L))return L=rs(L,$.mode,U,null),L.return=$,L;Cc($,L)}return null}function oe($,L,U,de){var Ce=L!==null?L.key:null;if(typeof U=="string"&&U!==""||typeof U=="number")return Ce!==null?null:O($,L,""+U,de);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case P:return U.key===Ce?I($,L,U,de):null;case A:return U.key===Ce?W($,L,U,de):null;case ee:return Ce=U._init,oe($,L,Ce(U._payload),de)}if(ht(U)||Z(U))return Ce!==null?null:se($,L,U,de,null);Cc($,U)}return null}function ve($,L,U,de,Ce){if(typeof de=="string"&&de!==""||typeof de=="number")return $=$.get(U)||null,O(L,$,""+de,Ce);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case P:return $=$.get(de.key===null?U:de.key)||null,I(L,$,de,Ce);case A:return $=$.get(de.key===null?U:de.key)||null,W(L,$,de,Ce);case ee:var je=de._init;return ve($,L,U,je(de._payload),Ce)}if(ht(de)||Z(de))return $=$.get(U)||null,se(L,$,de,Ce,null);Cc(L,de)}return null}function xe($,L,U,de){for(var Ce=null,je=null,Re=L,De=L=0,Wt=null;Re!==null&&De<U.length;De++){Re.index>De?(Wt=Re,Re=null):Wt=Re.sibling;var qe=oe($,Re,U[De],de);if(qe===null){Re===null&&(Re=Wt);break}t&&Re&&qe.alternate===null&&r($,Re),L=y(qe,L,De),je===null?Ce=qe:je.sibling=qe,je=qe,Re=Wt}if(De===U.length)return i($,Re),dt&&Go($,De),Ce;if(Re===null){for(;De<U.length;De++)Re=ae($,U[De],de),Re!==null&&(L=y(Re,L,De),je===null?Ce=Re:je.sibling=Re,je=Re);return dt&&Go($,De),Ce}for(Re=u($,Re);De<U.length;De++)Wt=ve(Re,$,De,U[De],de),Wt!==null&&(t&&Wt.alternate!==null&&Re.delete(Wt.key===null?De:Wt.key),L=y(Wt,L,De),je===null?Ce=Wt:je.sibling=Wt,je=Wt);return t&&Re.forEach(function(jo){return r($,jo)}),dt&&Go($,De),Ce}function Se($,L,U,de){var Ce=Z(U);if(typeof Ce!="function")throw Error(o(150));if(U=Ce.call(U),U==null)throw Error(o(151));for(var je=Ce=null,Re=L,De=L=0,Wt=null,qe=U.next();Re!==null&&!qe.done;De++,qe=U.next()){Re.index>De?(Wt=Re,Re=null):Wt=Re.sibling;var jo=oe($,Re,qe.value,de);if(jo===null){Re===null&&(Re=Wt);break}t&&Re&&jo.alternate===null&&r($,Re),L=y(jo,L,De),je===null?Ce=jo:je.sibling=jo,je=jo,Re=Wt}if(qe.done)return i($,Re),dt&&Go($,De),Ce;if(Re===null){for(;!qe.done;De++,qe=U.next())qe=ae($,qe.value,de),qe!==null&&(L=y(qe,L,De),je===null?Ce=qe:je.sibling=qe,je=qe);return dt&&Go($,De),Ce}for(Re=u($,Re);!qe.done;De++,qe=U.next())qe=ve(Re,$,De,qe.value,de),qe!==null&&(t&&qe.alternate!==null&&Re.delete(qe.key===null?De:qe.key),L=y(qe,L,De),je===null?Ce=qe:je.sibling=qe,je=qe);return t&&Re.forEach(function(OD){return r($,OD)}),dt&&Go($,De),Ce}function Et($,L,U,de){if(typeof U=="object"&&U!==null&&U.type===D&&U.key===null&&(U=U.props.children),typeof U=="object"&&U!==null){switch(U.$$typeof){case P:e:{for(var Ce=U.key,je=L;je!==null;){if(je.key===Ce){if(Ce=U.type,Ce===D){if(je.tag===7){i($,je.sibling),L=p(je,U.props.children),L.return=$,$=L;break e}}else if(je.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===ee&&Fx(Ce)===je.type){i($,je.sibling),L=p(je,U.props),L.ref=ia($,je,U),L.return=$,$=L;break e}i($,je);break}else r($,je);je=je.sibling}U.type===D?(L=rs(U.props.children,$.mode,de,U.key),L.return=$,$=L):(de=Kc(U.type,U.key,U.props,null,$.mode,de),de.ref=ia($,L,U),de.return=$,$=de)}return k($);case A:e:{for(je=U.key;L!==null;){if(L.key===je)if(L.tag===4&&L.stateNode.containerInfo===U.containerInfo&&L.stateNode.implementation===U.implementation){i($,L.sibling),L=p(L,U.children||[]),L.return=$,$=L;break e}else{i($,L);break}else r($,L);L=L.sibling}L=Jp(U,$.mode,de),L.return=$,$=L}return k($);case ee:return je=U._init,Et($,L,je(U._payload),de)}if(ht(U))return xe($,L,U,de);if(Z(U))return Se($,L,U,de);Cc($,U)}return typeof U=="string"&&U!==""||typeof U=="number"?(U=""+U,L!==null&&L.tag===6?(i($,L.sibling),L=p(L,U),L.return=$,$=L):(i($,L),L=Qp(U,$.mode,de),L.return=$,$=L),k($)):i($,L)}return Et}var Ys=zx(!0),$x=zx(!1),_c=vo(null),Ec=null,Ks=null,ip=null;function ap(){ip=Ks=Ec=null}function lp(t){var r=_c.current;lt(_c),t._currentValue=r}function cp(t,r,i){for(;t!==null;){var u=t.alternate;if((t.childLanes&r)!==r?(t.childLanes|=r,u!==null&&(u.childLanes|=r)):u!==null&&(u.childLanes&r)!==r&&(u.childLanes|=r),t===i)break;t=t.return}}function Xs(t,r){Ec=t,ip=Ks=null,t=t.dependencies,t!==null&&t.firstContext!==null&&((t.lanes&r)!==0&&(xn=!0),t.firstContext=null)}function Fn(t){var r=t._currentValue;if(ip!==t)if(t={context:t,memoizedValue:r,next:null},Ks===null){if(Ec===null)throw Error(o(308));Ks=t,Ec.dependencies={lanes:0,firstContext:t}}else Ks=Ks.next=t;return r}var qo=null;function up(t){qo===null?qo=[t]:qo.push(t)}function Bx(t,r,i,u){var p=r.interleaved;return p===null?(i.next=i,up(r)):(i.next=p.next,p.next=i),r.interleaved=i,$r(t,u)}function $r(t,r){t.lanes|=r;var i=t.alternate;for(i!==null&&(i.lanes|=r),i=t,t=t.return;t!==null;)t.childLanes|=r,i=t.alternate,i!==null&&(i.childLanes|=r),i=t,t=t.return;return i.tag===3?i.stateNode:null}var xo=!1;function dp(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ux(t,r){t=t.updateQueue,r.updateQueue===t&&(r.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Br(t,r){return{eventTime:t,lane:r,tag:0,payload:null,callback:null,next:null}}function bo(t,r,i){var u=t.updateQueue;if(u===null)return null;if(u=u.shared,(Ge&2)!==0){var p=u.pending;return p===null?r.next=r:(r.next=p.next,p.next=r),u.pending=r,$r(t,i)}return p=u.interleaved,p===null?(r.next=r,up(u)):(r.next=p.next,p.next=r),u.interleaved=r,$r(t,i)}function Nc(t,r,i){if(r=r.updateQueue,r!==null&&(r=r.shared,(i&4194240)!==0)){var u=r.lanes;u&=t.pendingLanes,i|=u,r.lanes=i,Ef(t,i)}}function Hx(t,r){var i=t.updateQueue,u=t.alternate;if(u!==null&&(u=u.updateQueue,i===u)){var p=null,y=null;if(i=i.firstBaseUpdate,i!==null){do{var k={eventTime:i.eventTime,lane:i.lane,tag:i.tag,payload:i.payload,callback:i.callback,next:null};y===null?p=y=k:y=y.next=k,i=i.next}while(i!==null);y===null?p=y=r:y=y.next=r}else p=y=r;i={baseState:u.baseState,firstBaseUpdate:p,lastBaseUpdate:y,shared:u.shared,effects:u.effects},t.updateQueue=i;return}t=i.lastBaseUpdate,t===null?i.firstBaseUpdate=r:t.next=r,i.lastBaseUpdate=r}function kc(t,r,i,u){var p=t.updateQueue;xo=!1;var y=p.firstBaseUpdate,k=p.lastBaseUpdate,O=p.shared.pending;if(O!==null){p.shared.pending=null;var I=O,W=I.next;I.next=null,k===null?y=W:k.next=W,k=I;var se=t.alternate;se!==null&&(se=se.updateQueue,O=se.lastBaseUpdate,O!==k&&(O===null?se.firstBaseUpdate=W:O.next=W,se.lastBaseUpdate=I))}if(y!==null){var ae=p.baseState;k=0,se=W=I=null,O=y;do{var oe=O.lane,ve=O.eventTime;if((u&oe)===oe){se!==null&&(se=se.next={eventTime:ve,lane:0,tag:O.tag,payload:O.payload,callback:O.callback,next:null});e:{var xe=t,Se=O;switch(oe=r,ve=i,Se.tag){case 1:if(xe=Se.payload,typeof xe=="function"){ae=xe.call(ve,ae,oe);break e}ae=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=Se.payload,oe=typeof xe=="function"?xe.call(ve,ae,oe):xe,oe==null)break e;ae=ne({},ae,oe);break e;case 2:xo=!0}}O.callback!==null&&O.lane!==0&&(t.flags|=64,oe=p.effects,oe===null?p.effects=[O]:oe.push(O))}else ve={eventTime:ve,lane:oe,tag:O.tag,payload:O.payload,callback:O.callback,next:null},se===null?(W=se=ve,I=ae):se=se.next=ve,k|=oe;if(O=O.next,O===null){if(O=p.shared.pending,O===null)break;oe=O,O=oe.next,oe.next=null,p.lastBaseUpdate=oe,p.shared.pending=null}}while(!0);if(se===null&&(I=ae),p.baseState=I,p.firstBaseUpdate=W,p.lastBaseUpdate=se,r=p.shared.interleaved,r!==null){p=r;do k|=p.lane,p=p.next;while(p!==r)}else y===null&&(p.shared.lanes=0);Zo|=k,t.lanes=k,t.memoizedState=ae}}function Vx(t,r,i){if(t=r.effects,r.effects=null,t!==null)for(r=0;r<t.length;r++){var u=t[r],p=u.callback;if(p!==null){if(u.callback=null,u=i,typeof p!="function")throw Error(o(191,p));p.call(u)}}}var aa={},Sr=vo(aa),la=vo(aa),ca=vo(aa);function Qo(t){if(t===aa)throw Error(o(174));return t}function fp(t,r){switch(ot(ca,r),ot(la,t),ot(Sr,aa),t=r.nodeType,t){case 9:case 11:r=(r=r.documentElement)?r.namespaceURI:hn(null,"");break;default:t=t===8?r.parentNode:r,r=t.namespaceURI||null,t=t.tagName,r=hn(r,t)}lt(Sr),ot(Sr,r)}function Gs(){lt(Sr),lt(la),lt(ca)}function Wx(t){Qo(ca.current);var r=Qo(Sr.current),i=hn(r,t.type);r!==i&&(ot(la,t),ot(Sr,i))}function pp(t){la.current===t&&(lt(Sr),lt(la))}var gt=vo(0);function jc(t){for(var r=t;r!==null;){if(r.tag===13){var i=r.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||i.data==="$?"||i.data==="$!"))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!==void 0){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var hp=[];function mp(){for(var t=0;t<hp.length;t++)hp[t]._workInProgressVersionPrimary=null;hp.length=0}var Rc=R.ReactCurrentDispatcher,gp=R.ReactCurrentBatchConfig,Jo=0,vt=null,At=null,Ht=null,Tc=!1,ua=!1,da=0,nD=0;function en(){throw Error(o(321))}function vp(t,r){if(r===null)return!1;for(var i=0;i<r.length&&i<t.length;i++)if(!nr(t[i],r[i]))return!1;return!0}function yp(t,r,i,u,p,y){if(Jo=y,vt=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,Rc.current=t===null||t.memoizedState===null?iD:aD,t=i(u,p),ua){y=0;do{if(ua=!1,da=0,25<=y)throw Error(o(301));y+=1,Ht=At=null,r.updateQueue=null,Rc.current=lD,t=i(u,p)}while(ua)}if(Rc.current=Ac,r=At!==null&&At.next!==null,Jo=0,Ht=At=vt=null,Tc=!1,r)throw Error(o(300));return t}function xp(){var t=da!==0;return da=0,t}function Cr(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ht===null?vt.memoizedState=Ht=t:Ht=Ht.next=t,Ht}function zn(){if(At===null){var t=vt.alternate;t=t!==null?t.memoizedState:null}else t=At.next;var r=Ht===null?vt.memoizedState:Ht.next;if(r!==null)Ht=r,At=t;else{if(t===null)throw Error(o(310));At=t,t={memoizedState:At.memoizedState,baseState:At.baseState,baseQueue:At.baseQueue,queue:At.queue,next:null},Ht===null?vt.memoizedState=Ht=t:Ht=Ht.next=t}return Ht}function fa(t,r){return typeof r=="function"?r(t):r}function bp(t){var r=zn(),i=r.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=t;var u=At,p=u.baseQueue,y=i.pending;if(y!==null){if(p!==null){var k=p.next;p.next=y.next,y.next=k}u.baseQueue=p=y,i.pending=null}if(p!==null){y=p.next,u=u.baseState;var O=k=null,I=null,W=y;do{var se=W.lane;if((Jo&se)===se)I!==null&&(I=I.next={lane:0,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null}),u=W.hasEagerState?W.eagerState:t(u,W.action);else{var ae={lane:se,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null};I===null?(O=I=ae,k=u):I=I.next=ae,vt.lanes|=se,Zo|=se}W=W.next}while(W!==null&&W!==y);I===null?k=u:I.next=O,nr(u,r.memoizedState)||(xn=!0),r.memoizedState=u,r.baseState=k,r.baseQueue=I,i.lastRenderedState=u}if(t=i.interleaved,t!==null){p=t;do y=p.lane,vt.lanes|=y,Zo|=y,p=p.next;while(p!==t)}else p===null&&(i.lanes=0);return[r.memoizedState,i.dispatch]}function Sp(t){var r=zn(),i=r.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=t;var u=i.dispatch,p=i.pending,y=r.memoizedState;if(p!==null){i.pending=null;var k=p=p.next;do y=t(y,k.action),k=k.next;while(k!==p);nr(y,r.memoizedState)||(xn=!0),r.memoizedState=y,r.baseQueue===null&&(r.baseState=y),i.lastRenderedState=y}return[y,u]}function Yx(){}function Kx(t,r){var i=vt,u=zn(),p=r(),y=!nr(u.memoizedState,p);if(y&&(u.memoizedState=p,xn=!0),u=u.queue,Cp(qx.bind(null,i,u,t),[t]),u.getSnapshot!==r||y||Ht!==null&&Ht.memoizedState.tag&1){if(i.flags|=2048,pa(9,Gx.bind(null,i,u,p,r),void 0,null),Vt===null)throw Error(o(349));(Jo&30)!==0||Xx(i,r,p)}return p}function Xx(t,r,i){t.flags|=16384,t={getSnapshot:r,value:i},r=vt.updateQueue,r===null?(r={lastEffect:null,stores:null},vt.updateQueue=r,r.stores=[t]):(i=r.stores,i===null?r.stores=[t]:i.push(t))}function Gx(t,r,i,u){r.value=i,r.getSnapshot=u,Qx(r)&&Jx(t)}function qx(t,r,i){return i(function(){Qx(r)&&Jx(t)})}function Qx(t){var r=t.getSnapshot;t=t.value;try{var i=r();return!nr(t,i)}catch{return!0}}function Jx(t){var r=$r(t,1);r!==null&&ar(r,t,1,-1)}function Zx(t){var r=Cr();return typeof t=="function"&&(t=t()),r.memoizedState=r.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:fa,lastRenderedState:t},r.queue=t,t=t.dispatch=sD.bind(null,vt,t),[r.memoizedState,t]}function pa(t,r,i,u){return t={tag:t,create:r,destroy:i,deps:u,next:null},r=vt.updateQueue,r===null?(r={lastEffect:null,stores:null},vt.updateQueue=r,r.lastEffect=t.next=t):(i=r.lastEffect,i===null?r.lastEffect=t.next=t:(u=i.next,i.next=t,t.next=u,r.lastEffect=t)),t}function eb(){return zn().memoizedState}function Pc(t,r,i,u){var p=Cr();vt.flags|=t,p.memoizedState=pa(1|r,i,void 0,u===void 0?null:u)}function Dc(t,r,i,u){var p=zn();u=u===void 0?null:u;var y=void 0;if(At!==null){var k=At.memoizedState;if(y=k.destroy,u!==null&&vp(u,k.deps)){p.memoizedState=pa(r,i,y,u);return}}vt.flags|=t,p.memoizedState=pa(1|r,i,y,u)}function tb(t,r){return Pc(8390656,8,t,r)}function Cp(t,r){return Dc(2048,8,t,r)}function nb(t,r){return Dc(4,2,t,r)}function rb(t,r){return Dc(4,4,t,r)}function ob(t,r){if(typeof r=="function")return t=t(),r(t),function(){r(null)};if(r!=null)return t=t(),r.current=t,function(){r.current=null}}function sb(t,r,i){return i=i!=null?i.concat([t]):null,Dc(4,4,ob.bind(null,r,t),i)}function _p(){}function ib(t,r){var i=zn();r=r===void 0?null:r;var u=i.memoizedState;return u!==null&&r!==null&&vp(r,u[1])?u[0]:(i.memoizedState=[t,r],t)}function ab(t,r){var i=zn();r=r===void 0?null:r;var u=i.memoizedState;return u!==null&&r!==null&&vp(r,u[1])?u[0]:(t=t(),i.memoizedState=[t,r],t)}function lb(t,r,i){return(Jo&21)===0?(t.baseState&&(t.baseState=!1,xn=!0),t.memoizedState=i):(nr(i,r)||(i=F0(),vt.lanes|=i,Zo|=i,t.baseState=!0),r)}function rD(t,r){var i=tt;tt=i!==0&&4>i?i:4,t(!0);var u=gp.transition;gp.transition={};try{t(!1),r()}finally{tt=i,gp.transition=u}}function cb(){return zn().memoizedState}function oD(t,r,i){var u=Eo(t);if(i={lane:u,action:i,hasEagerState:!1,eagerState:null,next:null},ub(t))db(r,i);else if(i=Bx(t,r,i,u),i!==null){var p=cn();ar(i,t,u,p),fb(i,r,u)}}function sD(t,r,i){var u=Eo(t),p={lane:u,action:i,hasEagerState:!1,eagerState:null,next:null};if(ub(t))db(r,p);else{var y=t.alternate;if(t.lanes===0&&(y===null||y.lanes===0)&&(y=r.lastRenderedReducer,y!==null))try{var k=r.lastRenderedState,O=y(k,i);if(p.hasEagerState=!0,p.eagerState=O,nr(O,k)){var I=r.interleaved;I===null?(p.next=p,up(r)):(p.next=I.next,I.next=p),r.interleaved=p;return}}catch{}finally{}i=Bx(t,r,p,u),i!==null&&(p=cn(),ar(i,t,u,p),fb(i,r,u))}}function ub(t){var r=t.alternate;return t===vt||r!==null&&r===vt}function db(t,r){ua=Tc=!0;var i=t.pending;i===null?r.next=r:(r.next=i.next,i.next=r),t.pending=r}function fb(t,r,i){if((i&4194240)!==0){var u=r.lanes;u&=t.pendingLanes,i|=u,r.lanes=i,Ef(t,i)}}var Ac={readContext:Fn,useCallback:en,useContext:en,useEffect:en,useImperativeHandle:en,useInsertionEffect:en,useLayoutEffect:en,useMemo:en,useReducer:en,useRef:en,useState:en,useDebugValue:en,useDeferredValue:en,useTransition:en,useMutableSource:en,useSyncExternalStore:en,useId:en,unstable_isNewReconciler:!1},iD={readContext:Fn,useCallback:function(t,r){return Cr().memoizedState=[t,r===void 0?null:r],t},useContext:Fn,useEffect:tb,useImperativeHandle:function(t,r,i){return i=i!=null?i.concat([t]):null,Pc(4194308,4,ob.bind(null,r,t),i)},useLayoutEffect:function(t,r){return Pc(4194308,4,t,r)},useInsertionEffect:function(t,r){return Pc(4,2,t,r)},useMemo:function(t,r){var i=Cr();return r=r===void 0?null:r,t=t(),i.memoizedState=[t,r],t},useReducer:function(t,r,i){var u=Cr();return r=i!==void 0?i(r):r,u.memoizedState=u.baseState=r,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:r},u.queue=t,t=t.dispatch=oD.bind(null,vt,t),[u.memoizedState,t]},useRef:function(t){var r=Cr();return t={current:t},r.memoizedState=t},useState:Zx,useDebugValue:_p,useDeferredValue:function(t){return Cr().memoizedState=t},useTransition:function(){var t=Zx(!1),r=t[0];return t=rD.bind(null,t[1]),Cr().memoizedState=t,[r,t]},useMutableSource:function(){},useSyncExternalStore:function(t,r,i){var u=vt,p=Cr();if(dt){if(i===void 0)throw Error(o(407));i=i()}else{if(i=r(),Vt===null)throw Error(o(349));(Jo&30)!==0||Xx(u,r,i)}p.memoizedState=i;var y={value:i,getSnapshot:r};return p.queue=y,tb(qx.bind(null,u,y,t),[t]),u.flags|=2048,pa(9,Gx.bind(null,u,y,i,r),void 0,null),i},useId:function(){var t=Cr(),r=Vt.identifierPrefix;if(dt){var i=zr,u=Fr;i=(u&~(1<<32-tr(u)-1)).toString(32)+i,r=":"+r+"R"+i,i=da++,0<i&&(r+="H"+i.toString(32)),r+=":"}else i=nD++,r=":"+r+"r"+i.toString(32)+":";return t.memoizedState=r},unstable_isNewReconciler:!1},aD={readContext:Fn,useCallback:ib,useContext:Fn,useEffect:Cp,useImperativeHandle:sb,useInsertionEffect:nb,useLayoutEffect:rb,useMemo:ab,useReducer:bp,useRef:eb,useState:function(){return bp(fa)},useDebugValue:_p,useDeferredValue:function(t){var r=zn();return lb(r,At.memoizedState,t)},useTransition:function(){var t=bp(fa)[0],r=zn().memoizedState;return[t,r]},useMutableSource:Yx,useSyncExternalStore:Kx,useId:cb,unstable_isNewReconciler:!1},lD={readContext:Fn,useCallback:ib,useContext:Fn,useEffect:Cp,useImperativeHandle:sb,useInsertionEffect:nb,useLayoutEffect:rb,useMemo:ab,useReducer:Sp,useRef:eb,useState:function(){return Sp(fa)},useDebugValue:_p,useDeferredValue:function(t){var r=zn();return At===null?r.memoizedState=t:lb(r,At.memoizedState,t)},useTransition:function(){var t=Sp(fa)[0],r=zn().memoizedState;return[t,r]},useMutableSource:Yx,useSyncExternalStore:Kx,useId:cb,unstable_isNewReconciler:!1};function or(t,r){if(t&&t.defaultProps){r=ne({},r),t=t.defaultProps;for(var i in t)r[i]===void 0&&(r[i]=t[i]);return r}return r}function Ep(t,r,i,u){r=t.memoizedState,i=i(u,r),i=i==null?r:ne({},r,i),t.memoizedState=i,t.lanes===0&&(t.updateQueue.baseState=i)}var Oc={isMounted:function(t){return(t=t._reactInternals)?Wo(t)===t:!1},enqueueSetState:function(t,r,i){t=t._reactInternals;var u=cn(),p=Eo(t),y=Br(u,p);y.payload=r,i!=null&&(y.callback=i),r=bo(t,y,p),r!==null&&(ar(r,t,p,u),Nc(r,t,p))},enqueueReplaceState:function(t,r,i){t=t._reactInternals;var u=cn(),p=Eo(t),y=Br(u,p);y.tag=1,y.payload=r,i!=null&&(y.callback=i),r=bo(t,y,p),r!==null&&(ar(r,t,p,u),Nc(r,t,p))},enqueueForceUpdate:function(t,r){t=t._reactInternals;var i=cn(),u=Eo(t),p=Br(i,u);p.tag=2,r!=null&&(p.callback=r),r=bo(t,p,u),r!==null&&(ar(r,t,u,i),Nc(r,t,u))}};function pb(t,r,i,u,p,y,k){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(u,y,k):r.prototype&&r.prototype.isPureReactComponent?!Zi(i,u)||!Zi(p,y):!0}function hb(t,r,i){var u=!1,p=yo,y=r.contextType;return typeof y=="object"&&y!==null?y=Fn(y):(p=wn(r)?Ko:Zt.current,u=r.contextTypes,y=(u=u!=null)?Us(t,p):yo),r=new r(i,y),t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=Oc,t.stateNode=r,r._reactInternals=t,u&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=p,t.__reactInternalMemoizedMaskedChildContext=y),r}function mb(t,r,i,u){t=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(i,u),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(i,u),r.state!==t&&Oc.enqueueReplaceState(r,r.state,null)}function Np(t,r,i,u){var p=t.stateNode;p.props=i,p.state=t.memoizedState,p.refs={},dp(t);var y=r.contextType;typeof y=="object"&&y!==null?p.context=Fn(y):(y=wn(r)?Ko:Zt.current,p.context=Us(t,y)),p.state=t.memoizedState,y=r.getDerivedStateFromProps,typeof y=="function"&&(Ep(t,r,y,i),p.state=t.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(r=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),r!==p.state&&Oc.enqueueReplaceState(p,p.state,null),kc(t,i,p,u),p.state=t.memoizedState),typeof p.componentDidMount=="function"&&(t.flags|=4194308)}function qs(t,r){try{var i="",u=r;do i+=fe(u),u=u.return;while(u);var p=i}catch(y){p=` 40 42 Error generating stack: `+y.message+` 41 `+y.stack}return{value:t,source:r,stack:p,digest:null}}function td(t,r,i){return{value:t,source:null,stack:i??null,digest:r??null}}function nd(t,r){try{console.error(r.value)}catch(i){setTimeout(function(){throw i})}}var E1=typeof WeakMap=="function"?WeakMap:Map;function zm(t,r,i){i=Dr(-1,i),i.tag=3,i.payload={element:null};var u=r.value;return i.callback=function(){il||(il=!0,vd=u),nd(t,r)},i}function Bm(t,r,i){i=Dr(-1,i),i.tag=3;var u=t.type.getDerivedStateFromError;if(typeof u=="function"){var p=r.value;i.payload=function(){return u(p)},i.callback=function(){nd(t,r)}}var y=t.stateNode;return y!==null&&typeof y.componentDidCatch=="function"&&(i.callback=function(){nd(t,r),typeof u!="function"&&(no===null?no=new Set([this]):no.add(this));var R=r.stack;this.componentDidCatch(r.value,{componentStack:R!==null?R:""})}),i}function Um(t,r,i){var u=t.pingCache;if(u===null){u=t.pingCache=new E1;var p=new Set;u.set(r,p)}else p=u.get(r),p===void 0&&(p=new Set,u.set(r,p));p.has(i)||(p.add(i),t=F1.bind(null,t,r,i),r.then(t,t))}function Hm(t){do{var r;if((r=t.tag===13)&&(r=t.memoizedState,r=r!==null?r.dehydrated!==null:!0),r)return t;t=t.return}while(t!==null);return null}function Vm(t,r,i,u,p){return(t.mode&1)===0?(t===r?t.flags|=65536:(t.flags|=128,i.flags|=131072,i.flags&=-52805,i.tag===1&&(i.alternate===null?i.tag=17:(r=Dr(-1,1),r.tag=2,eo(i,r,1))),i.lanes|=1),t):(t.flags|=65536,t.lanes=p,t)}var N1=k.ReactCurrentOwner,pn=!1;function tn(t,r,i,u){r.child=t===null?um(r,null,i,u):ps(r,t.child,i,u)}function Wm(t,r,i,u,p){i=i.render;var y=r.ref;return ms(r,p),u=Yu(t,r,i,u,y,p),i=Gu(),t!==null&&!pn?(r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~p,Ar(t,r,p)):(ct&&i&&Pu(r),r.flags|=1,tn(t,r,u,p),r.child)}function Km(t,r,i,u,p){if(t===null){var y=i.type;return typeof y=="function"&&!Ed(y)&&y.defaultProps===void 0&&i.compare===null&&i.defaultProps===void 0?(r.tag=15,r.type=y,Ym(t,r,y,u,p)):(t=fl(i.type,null,u,r,r.mode,p),t.ref=r.ref,t.return=r,r.child=t)}if(y=t.child,(t.lanes&p)===0){var R=y.memoizedProps;if(i=i.compare,i=i!==null?i:ui,i(R,u)&&t.ref===r.ref)return Ar(t,r,p)}return r.flags|=1,t=io(y,u),t.ref=r.ref,t.return=r,r.child=t}function Ym(t,r,i,u,p){if(t!==null){var y=t.memoizedProps;if(ui(y,u)&&t.ref===r.ref)if(pn=!1,r.pendingProps=u=y,(t.lanes&p)!==0)(t.flags&131072)!==0&&(pn=!0);else return r.lanes=t.lanes,Ar(t,r,p)}return rd(t,r,i,u,p)}function Gm(t,r,i){var u=r.pendingProps,p=u.children,y=t!==null?t.memoizedState:null;if(u.mode==="hidden")if((r.mode&1)===0)r.memoizedState={baseLanes:0,cachePool:null,transitions:null},nt(xs,Cn),Cn|=i;else{if((i&1073741824)===0)return t=y!==null?y.baseLanes|i:i,r.lanes=r.childLanes=1073741824,r.memoizedState={baseLanes:t,cachePool:null,transitions:null},r.updateQueue=null,nt(xs,Cn),Cn|=t,null;r.memoizedState={baseLanes:0,cachePool:null,transitions:null},u=y!==null?y.baseLanes:i,nt(xs,Cn),Cn|=u}else y!==null?(u=y.baseLanes|i,r.memoizedState=null):u=i,nt(xs,Cn),Cn|=u;return tn(t,r,p,i),r.child}function Xm(t,r){var i=r.ref;(t===null&&i!==null||t!==null&&t.ref!==i)&&(r.flags|=512,r.flags|=2097152)}function rd(t,r,i,u,p){var y=fn(i)?ko:qt.current;return y=cs(r,y),ms(r,p),i=Yu(t,r,i,u,y,p),u=Gu(),t!==null&&!pn?(r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~p,Ar(t,r,p)):(ct&&u&&Pu(r),r.flags|=1,tn(t,r,i,p),r.child)}function qm(t,r,i,u,p){if(fn(i)){var y=!0;La(r)}else y=!1;if(ms(r,p),r.stateNode===null)tl(t,r),Fm(r,i,u),ed(r,i,u,p),u=!0;else if(t===null){var R=r.stateNode,A=r.memoizedProps;R.props=A;var M=R.context,V=i.contextType;typeof V=="object"&&V!==null?V=Pn(V):(V=fn(i)?ko:qt.current,V=cs(r,V));var oe=i.getDerivedStateFromProps,ie=typeof oe=="function"||typeof R.getSnapshotBeforeUpdate=="function";ie||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(A!==u||M!==V)&&$m(r,R,u,V),Zr=!1;var re=r.memoizedState;R.state=re,Ka(r,u,R,p),M=r.memoizedState,A!==u||re!==M||dn.current||Zr?(typeof oe=="function"&&(Zu(r,i,oe,u),M=r.memoizedState),(A=Zr||Lm(r,i,A,u,re,M,V))?(ie||typeof R.UNSAFE_componentWillMount!="function"&&typeof R.componentWillMount!="function"||(typeof R.componentWillMount=="function"&&R.componentWillMount(),typeof R.UNSAFE_componentWillMount=="function"&&R.UNSAFE_componentWillMount()),typeof R.componentDidMount=="function"&&(r.flags|=4194308)):(typeof R.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=u,r.memoizedState=M),R.props=u,R.state=M,R.context=V,u=A):(typeof R.componentDidMount=="function"&&(r.flags|=4194308),u=!1)}else{R=r.stateNode,fm(t,r),A=r.memoizedProps,V=r.type===r.elementType?A:Vn(r.type,A),R.props=V,ie=r.pendingProps,re=R.context,M=i.contextType,typeof M=="object"&&M!==null?M=Pn(M):(M=fn(i)?ko:qt.current,M=cs(r,M));var ge=i.getDerivedStateFromProps;(oe=typeof ge=="function"||typeof R.getSnapshotBeforeUpdate=="function")||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(A!==ie||re!==M)&&$m(r,R,u,M),Zr=!1,re=r.memoizedState,R.state=re,Ka(r,u,R,p);var xe=r.memoizedState;A!==ie||re!==xe||dn.current||Zr?(typeof ge=="function"&&(Zu(r,i,ge,u),xe=r.memoizedState),(V=Zr||Lm(r,i,V,u,re,xe,M)||!1)?(oe||typeof R.UNSAFE_componentWillUpdate!="function"&&typeof R.componentWillUpdate!="function"||(typeof R.componentWillUpdate=="function"&&R.componentWillUpdate(u,xe,M),typeof R.UNSAFE_componentWillUpdate=="function"&&R.UNSAFE_componentWillUpdate(u,xe,M)),typeof R.componentDidUpdate=="function"&&(r.flags|=4),typeof R.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof R.componentDidUpdate!="function"||A===t.memoizedProps&&re===t.memoizedState||(r.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||A===t.memoizedProps&&re===t.memoizedState||(r.flags|=1024),r.memoizedProps=u,r.memoizedState=xe),R.props=u,R.state=xe,R.context=M,u=V):(typeof R.componentDidUpdate!="function"||A===t.memoizedProps&&re===t.memoizedState||(r.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||A===t.memoizedProps&&re===t.memoizedState||(r.flags|=1024),u=!1)}return od(t,r,i,u,y,p)}function od(t,r,i,u,p,y){Xm(t,r);var R=(r.flags&128)!==0;if(!u&&!R)return p&&tm(r,i,!1),Ar(t,r,y);u=r.stateNode,N1.current=r;var A=R&&typeof i.getDerivedStateFromError!="function"?null:u.render();return r.flags|=1,t!==null&&R?(r.child=ps(r,t.child,null,y),r.child=ps(r,null,A,y)):tn(t,r,A,y),r.memoizedState=u.state,p&&tm(r,i,!0),r.child}function Qm(t){var r=t.stateNode;r.pendingContext?Zh(t,r.pendingContext,r.pendingContext!==r.context):r.context&&Zh(t,r.context,!1),Bu(t,r.containerInfo)}function Jm(t,r,i,u,p){return fs(),Ou(p),r.flags|=256,tn(t,r,i,u),r.child}var sd={dehydrated:null,treeContext:null,retryLane:0};function id(t){return{baseLanes:t,cachePool:null,transitions:null}}function Zm(t,r,i){var u=r.pendingProps,p=ft.current,y=!1,R=(r.flags&128)!==0,A;if((A=R)||(A=t!==null&&t.memoizedState===null?!1:(p&2)!==0),A?(y=!0,r.flags&=-129):(t===null||t.memoizedState!==null)&&(p|=1),nt(ft,p&1),t===null)return Au(r),t=r.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?((r.mode&1)===0?r.lanes=1:t.data==="$!"?r.lanes=8:r.lanes=1073741824,null):(R=u.children,t=u.fallback,y?(u=r.mode,y=r.child,R={mode:"hidden",children:R},(u&1)===0&&y!==null?(y.childLanes=0,y.pendingProps=R):y=pl(R,u,0,null),t=$o(t,u,i,null),y.return=r,t.return=r,y.sibling=t,r.child=y,r.child.memoizedState=id(i),r.memoizedState=sd,t):ad(r,R));if(p=t.memoizedState,p!==null&&(A=p.dehydrated,A!==null))return j1(t,r,R,u,A,p,i);if(y){y=u.fallback,R=r.mode,p=t.child,A=p.sibling;var M={mode:"hidden",children:u.children};return(R&1)===0&&r.child!==p?(u=r.child,u.childLanes=0,u.pendingProps=M,r.deletions=null):(u=io(p,M),u.subtreeFlags=p.subtreeFlags&14680064),A!==null?y=io(A,y):(y=$o(y,R,i,null),y.flags|=2),y.return=r,u.return=r,u.sibling=y,r.child=u,u=y,y=r.child,R=t.child.memoizedState,R=R===null?id(i):{baseLanes:R.baseLanes|i,cachePool:null,transitions:R.transitions},y.memoizedState=R,y.childLanes=t.childLanes&~i,r.memoizedState=sd,u}return y=t.child,t=y.sibling,u=io(y,{mode:"visible",children:u.children}),(r.mode&1)===0&&(u.lanes=i),u.return=r,u.sibling=null,t!==null&&(i=r.deletions,i===null?(r.deletions=[t],r.flags|=16):i.push(t)),r.child=u,r.memoizedState=null,u}function ad(t,r){return r=pl({mode:"visible",children:r},t.mode,0,null),r.return=t,t.child=r}function el(t,r,i,u){return u!==null&&Ou(u),ps(r,t.child,null,i),t=ad(r,r.pendingProps.children),t.flags|=2,r.memoizedState=null,t}function j1(t,r,i,u,p,y,R){if(i)return r.flags&256?(r.flags&=-257,u=td(Error(o(422))),el(t,r,R,u)):r.memoizedState!==null?(r.child=t.child,r.flags|=128,null):(y=u.fallback,p=r.mode,u=pl({mode:"visible",children:u.children},p,0,null),y=$o(y,p,R,null),y.flags|=2,u.return=r,y.return=r,u.sibling=y,r.child=u,(r.mode&1)!==0&&ps(r,t.child,null,R),r.child.memoizedState=id(R),r.memoizedState=sd,y);if((r.mode&1)===0)return el(t,r,R,null);if(p.data==="$!"){if(u=p.nextSibling&&p.nextSibling.dataset,u)var A=u.dgst;return u=A,y=Error(o(419)),u=td(y,u,void 0),el(t,r,R,u)}if(A=(R&t.childLanes)!==0,pn||A){if(u=It,u!==null){switch(R&-R){case 4:p=2;break;case 16:p=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:p=32;break;case 536870912:p=268435456;break;default:p=0}p=(p&(u.suspendedLanes|R))!==0?0:p,p!==0&&p!==y.retryLane&&(y.retryLane=p,_r(t,p),Yn(u,t,p,-1))}return Cd(),u=td(Error(o(421))),el(t,r,R,u)}return p.data==="$?"?(r.flags|=128,r.child=t.child,r=$1.bind(null,t),p._reactRetry=r,null):(t=y.treeContext,Sn=Xr(p.nextSibling),bn=r,ct=!0,Hn=null,t!==null&&(Tn[kn++]=kr,Tn[kn++]=Pr,Tn[kn++]=Po,kr=t.id,Pr=t.overflow,Po=r),r=ad(r,u.children),r.flags|=4096,r)}function eg(t,r,i){t.lanes|=r;var u=t.alternate;u!==null&&(u.lanes|=r),Fu(t.return,r,i)}function ld(t,r,i,u,p){var y=t.memoizedState;y===null?t.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:u,tail:i,tailMode:p}:(y.isBackwards=r,y.rendering=null,y.renderingStartTime=0,y.last=u,y.tail=i,y.tailMode=p)}function tg(t,r,i){var u=r.pendingProps,p=u.revealOrder,y=u.tail;if(tn(t,r,u.children,i),u=ft.current,(u&2)!==0)u=u&1|2,r.flags|=128;else{if(t!==null&&(t.flags&128)!==0)e:for(t=r.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&eg(t,i,r);else if(t.tag===19)eg(t,i,r);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===r)break e;for(;t.sibling===null;){if(t.return===null||t.return===r)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}u&=1}if(nt(ft,u),(r.mode&1)===0)r.memoizedState=null;else switch(p){case"forwards":for(i=r.child,p=null;i!==null;)t=i.alternate,t!==null&&Ya(t)===null&&(p=i),i=i.sibling;i=p,i===null?(p=r.child,r.child=null):(p=i.sibling,i.sibling=null),ld(r,!1,p,i,y);break;case"backwards":for(i=null,p=r.child,r.child=null;p!==null;){if(t=p.alternate,t!==null&&Ya(t)===null){r.child=p;break}t=p.sibling,p.sibling=i,i=p,p=t}ld(r,!0,i,null,y);break;case"together":ld(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function tl(t,r){(r.mode&1)===0&&t!==null&&(t.alternate=null,r.alternate=null,r.flags|=2)}function Ar(t,r,i){if(t!==null&&(r.dependencies=t.dependencies),Mo|=r.lanes,(i&r.childLanes)===0)return null;if(t!==null&&r.child!==t.child)throw Error(o(153));if(r.child!==null){for(t=r.child,i=io(t,t.pendingProps),r.child=i,i.return=r;t.sibling!==null;)t=t.sibling,i=i.sibling=io(t,t.pendingProps),i.return=r;i.sibling=null}return r.child}function R1(t,r,i){switch(r.tag){case 3:Qm(r),fs();break;case 5:mm(r);break;case 1:fn(r.type)&&La(r);break;case 4:Bu(r,r.stateNode.containerInfo);break;case 10:var u=r.type._context,p=r.memoizedProps.value;nt(Ha,u._currentValue),u._currentValue=p;break;case 13:if(u=r.memoizedState,u!==null)return u.dehydrated!==null?(nt(ft,ft.current&1),r.flags|=128,null):(i&r.child.childLanes)!==0?Zm(t,r,i):(nt(ft,ft.current&1),t=Ar(t,r,i),t!==null?t.sibling:null);nt(ft,ft.current&1);break;case 19:if(u=(i&r.childLanes)!==0,(t.flags&128)!==0){if(u)return tg(t,r,i);r.flags|=128}if(p=r.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),nt(ft,ft.current),u)break;return null;case 22:case 23:return r.lanes=0,Gm(t,r,i)}return Ar(t,r,i)}var ng,cd,rg,og;ng=function(t,r){for(var i=r.child;i!==null;){if(i.tag===5||i.tag===6)t.appendChild(i.stateNode);else if(i.tag!==4&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return;i=i.return}i.sibling.return=i.return,i=i.sibling}},cd=function(){},rg=function(t,r,i,u){var p=t.memoizedProps;if(p!==u){t=r.stateNode,Ao(lr.current);var y=null;switch(i){case"input":p=pe(t,p),u=pe(t,u),y=[];break;case"select":p=te({},p,{value:void 0}),u=te({},u,{value:void 0}),y=[];break;case"textarea":p=lt(t,p),u=lt(t,u),y=[];break;default:typeof p.onClick!="function"&&typeof u.onClick=="function"&&(t.onclick=Oa)}zn(i,u);var R;i=null;for(V in p)if(!u.hasOwnProperty(V)&&p.hasOwnProperty(V)&&p[V]!=null)if(V==="style"){var A=p[V];for(R in A)A.hasOwnProperty(R)&&(i||(i={}),i[R]="")}else V!=="dangerouslySetInnerHTML"&&V!=="children"&&V!=="suppressContentEditableWarning"&&V!=="suppressHydrationWarning"&&V!=="autoFocus"&&(a.hasOwnProperty(V)?y||(y=[]):(y=y||[]).push(V,null));for(V in u){var M=u[V];if(A=p!=null?p[V]:void 0,u.hasOwnProperty(V)&&M!==A&&(M!=null||A!=null))if(V==="style")if(A){for(R in A)!A.hasOwnProperty(R)||M&&M.hasOwnProperty(R)||(i||(i={}),i[R]="");for(R in M)M.hasOwnProperty(R)&&A[R]!==M[R]&&(i||(i={}),i[R]=M[R])}else i||(y||(y=[]),y.push(V,i)),i=M;else V==="dangerouslySetInnerHTML"?(M=M?M.__html:void 0,A=A?A.__html:void 0,M!=null&&A!==M&&(y=y||[]).push(V,M)):V==="children"?typeof M!="string"&&typeof M!="number"||(y=y||[]).push(V,""+M):V!=="suppressContentEditableWarning"&&V!=="suppressHydrationWarning"&&(a.hasOwnProperty(V)?(M!=null&&V==="onScroll"&&rt("scroll",t),y||A===M||(y=[])):(y=y||[]).push(V,M))}i&&(y=y||[]).push("style",i);var V=y;(r.updateQueue=V)&&(r.flags|=4)}},og=function(t,r,i,u){i!==u&&(r.flags|=4)};function Ni(t,r){if(!ct)switch(t.tailMode){case"hidden":r=t.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?t.tail=null:i.sibling=null;break;case"collapsed":i=t.tail;for(var u=null;i!==null;)i.alternate!==null&&(u=i),i=i.sibling;u===null?r||t.tail===null?t.tail=null:t.tail.sibling=null:u.sibling=null}}function Jt(t){var r=t.alternate!==null&&t.alternate.child===t.child,i=0,u=0;if(r)for(var p=t.child;p!==null;)i|=p.lanes|p.childLanes,u|=p.subtreeFlags&14680064,u|=p.flags&14680064,p.return=t,p=p.sibling;else for(p=t.child;p!==null;)i|=p.lanes|p.childLanes,u|=p.subtreeFlags,u|=p.flags,p.return=t,p=p.sibling;return t.subtreeFlags|=u,t.childLanes=i,r}function T1(t,r,i){var u=r.pendingProps;switch(_u(r),r.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Jt(r),null;case 1:return fn(r.type)&&Ia(),Jt(r),null;case 3:return u=r.stateNode,gs(),ot(dn),ot(qt),Vu(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(t===null||t.child===null)&&(Ba(r)?r.flags|=4:t===null||t.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Hn!==null&&(wd(Hn),Hn=null))),cd(t,r),Jt(r),null;case 5:Uu(r);var p=Ao(wi.current);if(i=r.type,t!==null&&r.stateNode!=null)rg(t,r,i,u,p),t.ref!==r.ref&&(r.flags|=512,r.flags|=2097152);else{if(!u){if(r.stateNode===null)throw Error(o(166));return Jt(r),null}if(t=Ao(lr.current),Ba(r)){u=r.stateNode,i=r.type;var y=r.memoizedProps;switch(u[ar]=r,u[mi]=y,t=(r.mode&1)!==0,i){case"dialog":rt("cancel",u),rt("close",u);break;case"iframe":case"object":case"embed":rt("load",u);break;case"video":case"audio":for(p=0;p<fi.length;p++)rt(fi[p],u);break;case"source":rt("error",u);break;case"img":case"image":case"link":rt("error",u),rt("load",u);break;case"details":rt("toggle",u);break;case"input":Ze(u,y),rt("invalid",u);break;case"select":u._wrapperState={wasMultiple:!!y.multiple},rt("invalid",u);break;case"textarea":Dt(u,y),rt("invalid",u)}zn(i,y),p=null;for(var R in y)if(y.hasOwnProperty(R)){var A=y[R];R==="children"?typeof A=="string"?u.textContent!==A&&(y.suppressHydrationWarning!==!0&&Aa(u.textContent,A,t),p=["children",A]):typeof A=="number"&&u.textContent!==""+A&&(y.suppressHydrationWarning!==!0&&Aa(u.textContent,A,t),p=["children",""+A]):a.hasOwnProperty(R)&&A!=null&&R==="onScroll"&&rt("scroll",u)}switch(i){case"input":Ne(u),jn(u,y,!0);break;case"textarea":Ne(u),Cr(u);break;case"select":case"option":break;default:typeof y.onClick=="function"&&(u.onclick=Oa)}u=p,r.updateQueue=u,u!==null&&(r.flags|=4)}else{R=p.nodeType===9?p:p.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=$n(i)),t==="http://www.w3.org/1999/xhtml"?i==="script"?(t=R.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof u.is=="string"?t=R.createElement(i,{is:u.is}):(t=R.createElement(i),i==="select"&&(R=t,u.multiple?R.multiple=!0:u.size&&(R.size=u.size))):t=R.createElementNS(t,i),t[ar]=r,t[mi]=u,ng(t,r,!1,!1),r.stateNode=t;e:{switch(R=Nr(i,u),i){case"dialog":rt("cancel",t),rt("close",t),p=u;break;case"iframe":case"object":case"embed":rt("load",t),p=u;break;case"video":case"audio":for(p=0;p<fi.length;p++)rt(fi[p],t);p=u;break;case"source":rt("error",t),p=u;break;case"img":case"image":case"link":rt("error",t),rt("load",t),p=u;break;case"details":rt("toggle",t),p=u;break;case"input":Ze(t,u),p=pe(t,u),rt("invalid",t);break;case"option":p=u;break;case"select":t._wrapperState={wasMultiple:!!u.multiple},p=te({},u,{value:void 0}),rt("invalid",t);break;case"textarea":Dt(t,u),p=lt(t,u),rt("invalid",t);break;default:p=u}zn(i,p),A=p;for(y in A)if(A.hasOwnProperty(y)){var M=A[y];y==="style"?Ur(t,M):y==="dangerouslySetInnerHTML"?(M=M?M.__html:void 0,M!=null&&ln(t,M)):y==="children"?typeof M=="string"?(i!=="textarea"||M!=="")&&At(t,M):typeof M=="number"&&At(t,""+M):y!=="suppressContentEditableWarning"&&y!=="suppressHydrationWarning"&&y!=="autoFocus"&&(a.hasOwnProperty(y)?M!=null&&y==="onScroll"&&rt("scroll",t):M!=null&&N(t,y,M,R))}switch(i){case"input":Ne(t),jn(t,u,!1);break;case"textarea":Ne(t),Cr(t);break;case"option":u.value!=null&&t.setAttribute("value",""+se(u.value));break;case"select":t.multiple=!!u.multiple,y=u.value,y!=null?Xt(t,!!u.multiple,y,!1):u.defaultValue!=null&&Xt(t,!!u.multiple,u.defaultValue,!0);break;default:typeof p.onClick=="function"&&(t.onclick=Oa)}switch(i){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}}u&&(r.flags|=4)}r.ref!==null&&(r.flags|=512,r.flags|=2097152)}return Jt(r),null;case 6:if(t&&r.stateNode!=null)og(t,r,t.memoizedProps,u);else{if(typeof u!="string"&&r.stateNode===null)throw Error(o(166));if(i=Ao(wi.current),Ao(lr.current),Ba(r)){if(u=r.stateNode,i=r.memoizedProps,u[ar]=r,(y=u.nodeValue!==i)&&(t=bn,t!==null))switch(t.tag){case 3:Aa(u.nodeValue,i,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&Aa(u.nodeValue,i,(t.mode&1)!==0)}y&&(r.flags|=4)}else u=(i.nodeType===9?i:i.ownerDocument).createTextNode(u),u[ar]=r,r.stateNode=u}return Jt(r),null;case 13:if(ot(ft),u=r.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(ct&&Sn!==null&&(r.mode&1)!==0&&(r.flags&128)===0)am(),fs(),r.flags|=98560,y=!1;else if(y=Ba(r),u!==null&&u.dehydrated!==null){if(t===null){if(!y)throw Error(o(318));if(y=r.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(o(317));y[ar]=r}else fs(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Jt(r),y=!1}else Hn!==null&&(wd(Hn),Hn=null),y=!0;if(!y)return r.flags&65536?r:null}return(r.flags&128)!==0?(r.lanes=i,r):(u=u!==null,u!==(t!==null&&t.memoizedState!==null)&&u&&(r.child.flags|=8192,(r.mode&1)!==0&&(t===null||(ft.current&1)!==0?Tt===0&&(Tt=3):Cd())),r.updateQueue!==null&&(r.flags|=4),Jt(r),null);case 4:return gs(),cd(t,r),t===null&&pi(r.stateNode.containerInfo),Jt(r),null;case 10:return Lu(r.type._context),Jt(r),null;case 17:return fn(r.type)&&Ia(),Jt(r),null;case 19:if(ot(ft),y=r.memoizedState,y===null)return Jt(r),null;if(u=(r.flags&128)!==0,R=y.rendering,R===null)if(u)Ni(y,!1);else{if(Tt!==0||t!==null&&(t.flags&128)!==0)for(t=r.child;t!==null;){if(R=Ya(t),R!==null){for(r.flags|=128,Ni(y,!1),u=R.updateQueue,u!==null&&(r.updateQueue=u,r.flags|=4),r.subtreeFlags=0,u=i,i=r.child;i!==null;)y=i,t=u,y.flags&=14680066,R=y.alternate,R===null?(y.childLanes=0,y.lanes=t,y.child=null,y.subtreeFlags=0,y.memoizedProps=null,y.memoizedState=null,y.updateQueue=null,y.dependencies=null,y.stateNode=null):(y.childLanes=R.childLanes,y.lanes=R.lanes,y.child=R.child,y.subtreeFlags=0,y.deletions=null,y.memoizedProps=R.memoizedProps,y.memoizedState=R.memoizedState,y.updateQueue=R.updateQueue,y.type=R.type,t=R.dependencies,y.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),i=i.sibling;return nt(ft,ft.current&1|2),r.child}t=t.sibling}y.tail!==null&&bt()>ws&&(r.flags|=128,u=!0,Ni(y,!1),r.lanes=4194304)}else{if(!u)if(t=Ya(R),t!==null){if(r.flags|=128,u=!0,i=t.updateQueue,i!==null&&(r.updateQueue=i,r.flags|=4),Ni(y,!0),y.tail===null&&y.tailMode==="hidden"&&!R.alternate&&!ct)return Jt(r),null}else 2*bt()-y.renderingStartTime>ws&&i!==1073741824&&(r.flags|=128,u=!0,Ni(y,!1),r.lanes=4194304);y.isBackwards?(R.sibling=r.child,r.child=R):(i=y.last,i!==null?i.sibling=R:r.child=R,y.last=R)}return y.tail!==null?(r=y.tail,y.rendering=r,y.tail=r.sibling,y.renderingStartTime=bt(),r.sibling=null,i=ft.current,nt(ft,u?i&1|2:i&1),r):(Jt(r),null);case 22:case 23:return Sd(),u=r.memoizedState!==null,t!==null&&t.memoizedState!==null!==u&&(r.flags|=8192),u&&(r.mode&1)!==0?(Cn&1073741824)!==0&&(Jt(r),r.subtreeFlags&6&&(r.flags|=8192)):Jt(r),null;case 24:return null;case 25:return null}throw Error(o(156,r.tag))}function k1(t,r){switch(_u(r),r.tag){case 1:return fn(r.type)&&Ia(),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return gs(),ot(dn),ot(qt),Vu(),t=r.flags,(t&65536)!==0&&(t&128)===0?(r.flags=t&-65537|128,r):null;case 5:return Uu(r),null;case 13:if(ot(ft),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(o(340));fs()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return ot(ft),null;case 4:return gs(),null;case 10:return Lu(r.type._context),null;case 22:case 23:return Sd(),null;case 24:return null;default:return null}}var nl=!1,Zt=!1,P1=typeof WeakSet=="function"?WeakSet:Set,ve=null;function ys(t,r){var i=t.ref;if(i!==null)if(typeof i=="function")try{i(null)}catch(u){yt(t,r,u)}else i.current=null}function ud(t,r,i){try{i()}catch(u){yt(t,r,u)}}var sg=!1;function _1(t,r){if(Su=Sa,t=Lh(),hu(t)){if("selectionStart"in t)var i={start:t.selectionStart,end:t.selectionEnd};else e:{i=(i=t.ownerDocument)&&i.defaultView||window;var u=i.getSelection&&i.getSelection();if(u&&u.rangeCount!==0){i=u.anchorNode;var p=u.anchorOffset,y=u.focusNode;u=u.focusOffset;try{i.nodeType,y.nodeType}catch{i=null;break e}var R=0,A=-1,M=-1,V=0,oe=0,ie=t,re=null;t:for(;;){for(var ge;ie!==i||p!==0&&ie.nodeType!==3||(A=R+p),ie!==y||u!==0&&ie.nodeType!==3||(M=R+u),ie.nodeType===3&&(R+=ie.nodeValue.length),(ge=ie.firstChild)!==null;)re=ie,ie=ge;for(;;){if(ie===t)break t;if(re===i&&++V===p&&(A=R),re===y&&++oe===u&&(M=R),(ge=ie.nextSibling)!==null)break;ie=re,re=ie.parentNode}ie=ge}i=A===-1||M===-1?null:{start:A,end:M}}else i=null}i=i||{start:0,end:0}}else i=null;for(Cu={focusedElem:t,selectionRange:i},Sa=!1,ve=r;ve!==null;)if(r=ve,t=r.child,(r.subtreeFlags&1028)!==0&&t!==null)t.return=r,ve=t;else for(;ve!==null;){r=ve;try{var xe=r.alternate;if((r.flags&1024)!==0)switch(r.tag){case 0:case 11:case 15:break;case 1:if(xe!==null){var be=xe.memoizedProps,St=xe.memoizedState,$=r.stateNode,I=$.getSnapshotBeforeUpdate(r.elementType===r.type?be:Vn(r.type,be),St);$.__reactInternalSnapshotBeforeUpdate=I}break;case 3:var B=r.stateNode.containerInfo;B.nodeType===1?B.textContent="":B.nodeType===9&&B.documentElement&&B.removeChild(B.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(ue){yt(r,r.return,ue)}if(t=r.sibling,t!==null){t.return=r.return,ve=t;break}ve=r.return}return xe=sg,sg=!1,xe}function ji(t,r,i){var u=r.updateQueue;if(u=u!==null?u.lastEffect:null,u!==null){var p=u=u.next;do{if((p.tag&t)===t){var y=p.destroy;p.destroy=void 0,y!==void 0&&ud(r,i,y)}p=p.next}while(p!==u)}}function rl(t,r){if(r=r.updateQueue,r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var u=i.create;i.destroy=u()}i=i.next}while(i!==r)}}function dd(t){var r=t.ref;if(r!==null){var i=t.stateNode;switch(t.tag){case 5:t=i;break;default:t=i}typeof r=="function"?r(t):r.current=t}}function ig(t){var r=t.alternate;r!==null&&(t.alternate=null,ig(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&(delete r[ar],delete r[mi],delete r[Ru],delete r[p1],delete r[h1])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function ag(t){return t.tag===5||t.tag===3||t.tag===4}function lg(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||ag(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function fd(t,r,i){var u=t.tag;if(u===5||u===6)t=t.stateNode,r?i.nodeType===8?i.parentNode.insertBefore(t,r):i.insertBefore(t,r):(i.nodeType===8?(r=i.parentNode,r.insertBefore(t,i)):(r=i,r.appendChild(t)),i=i._reactRootContainer,i!=null||r.onclick!==null||(r.onclick=Oa));else if(u!==4&&(t=t.child,t!==null))for(fd(t,r,i),t=t.sibling;t!==null;)fd(t,r,i),t=t.sibling}function pd(t,r,i){var u=t.tag;if(u===5||u===6)t=t.stateNode,r?i.insertBefore(t,r):i.appendChild(t);else if(u!==4&&(t=t.child,t!==null))for(pd(t,r,i),t=t.sibling;t!==null;)pd(t,r,i),t=t.sibling}var Vt=null,Wn=!1;function to(t,r,i){for(i=i.child;i!==null;)cg(t,r,i),i=i.sibling}function cg(t,r,i){if(ir&&typeof ir.onCommitFiberUnmount=="function")try{ir.onCommitFiberUnmount(ga,i)}catch{}switch(i.tag){case 5:Zt||ys(i,r);case 6:var u=Vt,p=Wn;Vt=null,to(t,r,i),Vt=u,Wn=p,Vt!==null&&(Wn?(t=Vt,i=i.stateNode,t.nodeType===8?t.parentNode.removeChild(i):t.removeChild(i)):Vt.removeChild(i.stateNode));break;case 18:Vt!==null&&(Wn?(t=Vt,i=i.stateNode,t.nodeType===8?ju(t.parentNode,i):t.nodeType===1&&ju(t,i),oi(t)):ju(Vt,i.stateNode));break;case 4:u=Vt,p=Wn,Vt=i.stateNode.containerInfo,Wn=!0,to(t,r,i),Vt=u,Wn=p;break;case 0:case 11:case 14:case 15:if(!Zt&&(u=i.updateQueue,u!==null&&(u=u.lastEffect,u!==null))){p=u=u.next;do{var y=p,R=y.destroy;y=y.tag,R!==void 0&&((y&2)!==0||(y&4)!==0)&&ud(i,r,R),p=p.next}while(p!==u)}to(t,r,i);break;case 1:if(!Zt&&(ys(i,r),u=i.stateNode,typeof u.componentWillUnmount=="function"))try{u.props=i.memoizedProps,u.state=i.memoizedState,u.componentWillUnmount()}catch(A){yt(i,r,A)}to(t,r,i);break;case 21:to(t,r,i);break;case 22:i.mode&1?(Zt=(u=Zt)||i.memoizedState!==null,to(t,r,i),Zt=u):to(t,r,i);break;default:to(t,r,i)}}function ug(t){var r=t.updateQueue;if(r!==null){t.updateQueue=null;var i=t.stateNode;i===null&&(i=t.stateNode=new P1),r.forEach(function(u){var p=z1.bind(null,t,u);i.has(u)||(i.add(u),u.then(p,p))})}}function Kn(t,r){var i=r.deletions;if(i!==null)for(var u=0;u<i.length;u++){var p=i[u];try{var y=t,R=r,A=R;e:for(;A!==null;){switch(A.tag){case 5:Vt=A.stateNode,Wn=!1;break e;case 3:Vt=A.stateNode.containerInfo,Wn=!0;break e;case 4:Vt=A.stateNode.containerInfo,Wn=!0;break e}A=A.return}if(Vt===null)throw Error(o(160));cg(y,R,p),Vt=null,Wn=!1;var M=p.alternate;M!==null&&(M.return=null),p.return=null}catch(V){yt(p,r,V)}}if(r.subtreeFlags&12854)for(r=r.child;r!==null;)dg(r,t),r=r.sibling}function dg(t,r){var i=t.alternate,u=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Kn(r,t),ur(t),u&4){try{ji(3,t,t.return),rl(3,t)}catch(be){yt(t,t.return,be)}try{ji(5,t,t.return)}catch(be){yt(t,t.return,be)}}break;case 1:Kn(r,t),ur(t),u&512&&i!==null&&ys(i,i.return);break;case 5:if(Kn(r,t),ur(t),u&512&&i!==null&&ys(i,i.return),t.flags&32){var p=t.stateNode;try{At(p,"")}catch(be){yt(t,t.return,be)}}if(u&4&&(p=t.stateNode,p!=null)){var y=t.memoizedProps,R=i!==null?i.memoizedProps:y,A=t.type,M=t.updateQueue;if(t.updateQueue=null,M!==null)try{A==="input"&&y.type==="radio"&&y.name!=null&&wt(p,y),Nr(A,R);var V=Nr(A,y);for(R=0;R<M.length;R+=2){var oe=M[R],ie=M[R+1];oe==="style"?Ur(p,ie):oe==="dangerouslySetInnerHTML"?ln(p,ie):oe==="children"?At(p,ie):N(p,oe,ie,V)}switch(A){case"input":gt(p,y);break;case"textarea":Sr(p,y);break;case"select":var re=p._wrapperState.wasMultiple;p._wrapperState.wasMultiple=!!y.multiple;var ge=y.value;ge!=null?Xt(p,!!y.multiple,ge,!1):re!==!!y.multiple&&(y.defaultValue!=null?Xt(p,!!y.multiple,y.defaultValue,!0):Xt(p,!!y.multiple,y.multiple?[]:"",!1))}p[mi]=y}catch(be){yt(t,t.return,be)}}break;case 6:if(Kn(r,t),ur(t),u&4){if(t.stateNode===null)throw Error(o(162));p=t.stateNode,y=t.memoizedProps;try{p.nodeValue=y}catch(be){yt(t,t.return,be)}}break;case 3:if(Kn(r,t),ur(t),u&4&&i!==null&&i.memoizedState.isDehydrated)try{oi(r.containerInfo)}catch(be){yt(t,t.return,be)}break;case 4:Kn(r,t),ur(t);break;case 13:Kn(r,t),ur(t),p=t.child,p.flags&8192&&(y=p.memoizedState!==null,p.stateNode.isHidden=y,!y||p.alternate!==null&&p.alternate.memoizedState!==null||(gd=bt())),u&4&&ug(t);break;case 22:if(oe=i!==null&&i.memoizedState!==null,t.mode&1?(Zt=(V=Zt)||oe,Kn(r,t),Zt=V):Kn(r,t),ur(t),u&8192){if(V=t.memoizedState!==null,(t.stateNode.isHidden=V)&&!oe&&(t.mode&1)!==0)for(ve=t,oe=t.child;oe!==null;){for(ie=ve=oe;ve!==null;){switch(re=ve,ge=re.child,re.tag){case 0:case 11:case 14:case 15:ji(4,re,re.return);break;case 1:ys(re,re.return);var xe=re.stateNode;if(typeof xe.componentWillUnmount=="function"){u=re,i=re.return;try{r=u,xe.props=r.memoizedProps,xe.state=r.memoizedState,xe.componentWillUnmount()}catch(be){yt(u,i,be)}}break;case 5:ys(re,re.return);break;case 22:if(re.memoizedState!==null){hg(ie);continue}}ge!==null?(ge.return=re,ve=ge):hg(ie)}oe=oe.sibling}e:for(oe=null,ie=t;;){if(ie.tag===5){if(oe===null){oe=ie;try{p=ie.stateNode,V?(y=p.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none"):(A=ie.stateNode,M=ie.memoizedProps.style,R=M!=null&&M.hasOwnProperty("display")?M.display:null,A.style.display=Er("display",R))}catch(be){yt(t,t.return,be)}}}else if(ie.tag===6){if(oe===null)try{ie.stateNode.nodeValue=V?"":ie.memoizedProps}catch(be){yt(t,t.return,be)}}else if((ie.tag!==22&&ie.tag!==23||ie.memoizedState===null||ie===t)&&ie.child!==null){ie.child.return=ie,ie=ie.child;continue}if(ie===t)break e;for(;ie.sibling===null;){if(ie.return===null||ie.return===t)break e;oe===ie&&(oe=null),ie=ie.return}oe===ie&&(oe=null),ie.sibling.return=ie.return,ie=ie.sibling}}break;case 19:Kn(r,t),ur(t),u&4&&ug(t);break;case 21:break;default:Kn(r,t),ur(t)}}function ur(t){var r=t.flags;if(r&2){try{e:{for(var i=t.return;i!==null;){if(ag(i)){var u=i;break e}i=i.return}throw Error(o(160))}switch(u.tag){case 5:var p=u.stateNode;u.flags&32&&(At(p,""),u.flags&=-33);var y=lg(t);pd(t,y,p);break;case 3:case 4:var R=u.stateNode.containerInfo,A=lg(t);fd(t,A,R);break;default:throw Error(o(161))}}catch(M){yt(t,t.return,M)}t.flags&=-3}r&4096&&(t.flags&=-4097)}function D1(t,r,i){ve=t,fg(t)}function fg(t,r,i){for(var u=(t.mode&1)!==0;ve!==null;){var p=ve,y=p.child;if(p.tag===22&&u){var R=p.memoizedState!==null||nl;if(!R){var A=p.alternate,M=A!==null&&A.memoizedState!==null||Zt;A=nl;var V=Zt;if(nl=R,(Zt=M)&&!V)for(ve=p;ve!==null;)R=ve,M=R.child,R.tag===22&&R.memoizedState!==null?mg(p):M!==null?(M.return=R,ve=M):mg(p);for(;y!==null;)ve=y,fg(y),y=y.sibling;ve=p,nl=A,Zt=V}pg(t)}else(p.subtreeFlags&8772)!==0&&y!==null?(y.return=p,ve=y):pg(t)}}function pg(t){for(;ve!==null;){var r=ve;if((r.flags&8772)!==0){var i=r.alternate;try{if((r.flags&8772)!==0)switch(r.tag){case 0:case 11:case 15:Zt||rl(5,r);break;case 1:var u=r.stateNode;if(r.flags&4&&!Zt)if(i===null)u.componentDidMount();else{var p=r.elementType===r.type?i.memoizedProps:Vn(r.type,i.memoizedProps);u.componentDidUpdate(p,i.memoizedState,u.__reactInternalSnapshotBeforeUpdate)}var y=r.updateQueue;y!==null&&hm(r,y,u);break;case 3:var R=r.updateQueue;if(R!==null){if(i=null,r.child!==null)switch(r.child.tag){case 5:i=r.child.stateNode;break;case 1:i=r.child.stateNode}hm(r,R,i)}break;case 5:var A=r.stateNode;if(i===null&&r.flags&4){i=A;var M=r.memoizedProps;switch(r.type){case"button":case"input":case"select":case"textarea":M.autoFocus&&i.focus();break;case"img":M.src&&(i.src=M.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(r.memoizedState===null){var V=r.alternate;if(V!==null){var oe=V.memoizedState;if(oe!==null){var ie=oe.dehydrated;ie!==null&&oi(ie)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(o(163))}Zt||r.flags&512&&dd(r)}catch(re){yt(r,r.return,re)}}if(r===t){ve=null;break}if(i=r.sibling,i!==null){i.return=r.return,ve=i;break}ve=r.return}}function hg(t){for(;ve!==null;){var r=ve;if(r===t){ve=null;break}var i=r.sibling;if(i!==null){i.return=r.return,ve=i;break}ve=r.return}}function mg(t){for(;ve!==null;){var r=ve;try{switch(r.tag){case 0:case 11:case 15:var i=r.return;try{rl(4,r)}catch(M){yt(r,i,M)}break;case 1:var u=r.stateNode;if(typeof u.componentDidMount=="function"){var p=r.return;try{u.componentDidMount()}catch(M){yt(r,p,M)}}var y=r.return;try{dd(r)}catch(M){yt(r,y,M)}break;case 5:var R=r.return;try{dd(r)}catch(M){yt(r,R,M)}}}catch(M){yt(r,r.return,M)}if(r===t){ve=null;break}var A=r.sibling;if(A!==null){A.return=r.return,ve=A;break}ve=r.return}}var A1=Math.ceil,ol=k.ReactCurrentDispatcher,hd=k.ReactCurrentOwner,Dn=k.ReactCurrentBatchConfig,Ge=0,It=null,Ct=null,Wt=0,Cn=0,xs=qr(0),Tt=0,Ri=null,Mo=0,sl=0,md=0,Ti=null,hn=null,gd=0,ws=1/0,Or=null,il=!1,vd=null,no=null,al=!1,ro=null,ll=0,ki=0,yd=null,cl=-1,ul=0;function nn(){return(Ge&6)!==0?bt():cl!==-1?cl:cl=bt()}function oo(t){return(t.mode&1)===0?1:(Ge&2)!==0&&Wt!==0?Wt&-Wt:g1.transition!==null?(ul===0&&(ul=lh()),ul):(t=et,t!==0||(t=window.event,t=t===void 0?16:vh(t.type)),t)}function Yn(t,r,i,u){if(50<ki)throw ki=0,yd=null,Error(o(185));Zs(t,i,u),((Ge&2)===0||t!==It)&&(t===It&&((Ge&2)===0&&(sl|=i),Tt===4&&so(t,Wt)),mn(t,u),i===1&&Ge===0&&(r.mode&1)===0&&(ws=bt()+500,Fa&&Jr()))}function mn(t,r){var i=t.callbackNode;gS(t,r);var u=xa(t,t===It?Wt:0);if(u===0)i!==null&&sh(i),t.callbackNode=null,t.callbackPriority=0;else if(r=u&-u,t.callbackPriority!==r){if(i!=null&&sh(i),r===1)t.tag===0?m1(vg.bind(null,t)):nm(vg.bind(null,t)),d1(function(){(Ge&6)===0&&Jr()}),i=null;else{switch(ch(u)){case 1:i=Qc;break;case 4:i=ih;break;case 16:i=ma;break;case 536870912:i=ah;break;default:i=ma}i=Ng(i,gg.bind(null,t))}t.callbackPriority=r,t.callbackNode=i}}function gg(t,r){if(cl=-1,ul=0,(Ge&6)!==0)throw Error(o(327));var i=t.callbackNode;if(bs()&&t.callbackNode!==i)return null;var u=xa(t,t===It?Wt:0);if(u===0)return null;if((u&30)!==0||(u&t.expiredLanes)!==0||r)r=dl(t,u);else{r=u;var p=Ge;Ge|=2;var y=xg();(It!==t||Wt!==r)&&(Or=null,ws=bt()+500,Lo(t,r));do try{I1();break}catch(A){yg(t,A)}while(!0);Iu(),ol.current=y,Ge=p,Ct!==null?r=0:(It=null,Wt=0,r=Tt)}if(r!==0){if(r===2&&(p=Jc(t),p!==0&&(u=p,r=xd(t,p))),r===1)throw i=Ri,Lo(t,0),so(t,u),mn(t,bt()),i;if(r===6)so(t,u);else{if(p=t.current.alternate,(u&30)===0&&!O1(p)&&(r=dl(t,u),r===2&&(y=Jc(t),y!==0&&(u=y,r=xd(t,y))),r===1))throw i=Ri,Lo(t,0),so(t,u),mn(t,bt()),i;switch(t.finishedWork=p,t.finishedLanes=u,r){case 0:case 1:throw Error(o(345));case 2:Fo(t,hn,Or);break;case 3:if(so(t,u),(u&130023424)===u&&(r=gd+500-bt(),10<r)){if(xa(t,0)!==0)break;if(p=t.suspendedLanes,(p&u)!==u){nn(),t.pingedLanes|=t.suspendedLanes&p;break}t.timeoutHandle=Nu(Fo.bind(null,t,hn,Or),r);break}Fo(t,hn,Or);break;case 4:if(so(t,u),(u&4194240)===u)break;for(r=t.eventTimes,p=-1;0<u;){var R=31-Bn(u);y=1<<R,R=r[R],R>p&&(p=R),u&=~y}if(u=p,u=bt()-u,u=(120>u?120:480>u?480:1080>u?1080:1920>u?1920:3e3>u?3e3:4320>u?4320:1960*A1(u/1960))-u,10<u){t.timeoutHandle=Nu(Fo.bind(null,t,hn,Or),u);break}Fo(t,hn,Or);break;case 5:Fo(t,hn,Or);break;default:throw Error(o(329))}}}return mn(t,bt()),t.callbackNode===i?gg.bind(null,t):null}function xd(t,r){var i=Ti;return t.current.memoizedState.isDehydrated&&(Lo(t,r).flags|=256),t=dl(t,r),t!==2&&(r=hn,hn=i,r!==null&&wd(r)),t}function wd(t){hn===null?hn=t:hn.push.apply(hn,t)}function O1(t){for(var r=t;;){if(r.flags&16384){var i=r.updateQueue;if(i!==null&&(i=i.stores,i!==null))for(var u=0;u<i.length;u++){var p=i[u],y=p.getSnapshot;p=p.value;try{if(!Un(y(),p))return!1}catch{return!1}}}if(i=r.child,r.subtreeFlags&16384&&i!==null)i.return=r,r=i;else{if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function so(t,r){for(r&=~md,r&=~sl,t.suspendedLanes|=r,t.pingedLanes&=~r,t=t.expirationTimes;0<r;){var i=31-Bn(r),u=1<<i;t[i]=-1,r&=~u}}function vg(t){if((Ge&6)!==0)throw Error(o(327));bs();var r=xa(t,0);if((r&1)===0)return mn(t,bt()),null;var i=dl(t,r);if(t.tag!==0&&i===2){var u=Jc(t);u!==0&&(r=u,i=xd(t,u))}if(i===1)throw i=Ri,Lo(t,0),so(t,r),mn(t,bt()),i;if(i===6)throw Error(o(345));return t.finishedWork=t.current.alternate,t.finishedLanes=r,Fo(t,hn,Or),mn(t,bt()),null}function bd(t,r){var i=Ge;Ge|=1;try{return t(r)}finally{Ge=i,Ge===0&&(ws=bt()+500,Fa&&Jr())}}function Io(t){ro!==null&&ro.tag===0&&(Ge&6)===0&&bs();var r=Ge;Ge|=1;var i=Dn.transition,u=et;try{if(Dn.transition=null,et=1,t)return t()}finally{et=u,Dn.transition=i,Ge=r,(Ge&6)===0&&Jr()}}function Sd(){Cn=xs.current,ot(xs)}function Lo(t,r){t.finishedWork=null,t.finishedLanes=0;var i=t.timeoutHandle;if(i!==-1&&(t.timeoutHandle=-1,u1(i)),Ct!==null)for(i=Ct.return;i!==null;){var u=i;switch(_u(u),u.tag){case 1:u=u.type.childContextTypes,u!=null&&Ia();break;case 3:gs(),ot(dn),ot(qt),Vu();break;case 5:Uu(u);break;case 4:gs();break;case 13:ot(ft);break;case 19:ot(ft);break;case 10:Lu(u.type._context);break;case 22:case 23:Sd()}i=i.return}if(It=t,Ct=t=io(t.current,null),Wt=Cn=r,Tt=0,Ri=null,md=sl=Mo=0,hn=Ti=null,Do!==null){for(r=0;r<Do.length;r++)if(i=Do[r],u=i.interleaved,u!==null){i.interleaved=null;var p=u.next,y=i.pending;if(y!==null){var R=y.next;y.next=p,u.next=R}i.pending=u}Do=null}return t}function yg(t,r){do{var i=Ct;try{if(Iu(),Ga.current=Ja,Xa){for(var u=pt.memoizedState;u!==null;){var p=u.queue;p!==null&&(p.pending=null),u=u.next}Xa=!1}if(Oo=0,Mt=Rt=pt=null,bi=!1,Si=0,hd.current=null,i===null||i.return===null){Tt=1,Ri=r,Ct=null;break}e:{var y=t,R=i.return,A=i,M=r;if(r=Wt,A.flags|=32768,M!==null&&typeof M=="object"&&typeof M.then=="function"){var V=M,oe=A,ie=oe.tag;if((oe.mode&1)===0&&(ie===0||ie===11||ie===15)){var re=oe.alternate;re?(oe.updateQueue=re.updateQueue,oe.memoizedState=re.memoizedState,oe.lanes=re.lanes):(oe.updateQueue=null,oe.memoizedState=null)}var ge=Hm(R);if(ge!==null){ge.flags&=-257,Vm(ge,R,A,y,r),ge.mode&1&&Um(y,V,r),r=ge,M=V;var xe=r.updateQueue;if(xe===null){var be=new Set;be.add(M),r.updateQueue=be}else xe.add(M);break e}else{if((r&1)===0){Um(y,V,r),Cd();break e}M=Error(o(426))}}else if(ct&&A.mode&1){var St=Hm(R);if(St!==null){(St.flags&65536)===0&&(St.flags|=256),Vm(St,R,A,y,r),Ou(vs(M,A));break e}}y=M=vs(M,A),Tt!==4&&(Tt=2),Ti===null?Ti=[y]:Ti.push(y),y=R;do{switch(y.tag){case 3:y.flags|=65536,r&=-r,y.lanes|=r;var $=zm(y,M,r);pm(y,$);break e;case 1:A=M;var I=y.type,B=y.stateNode;if((y.flags&128)===0&&(typeof I.getDerivedStateFromError=="function"||B!==null&&typeof B.componentDidCatch=="function"&&(no===null||!no.has(B)))){y.flags|=65536,r&=-r,y.lanes|=r;var ue=Bm(y,A,r);pm(y,ue);break e}}y=y.return}while(y!==null)}bg(i)}catch(Se){r=Se,Ct===i&&i!==null&&(Ct=i=i.return);continue}break}while(!0)}function xg(){var t=ol.current;return ol.current=Ja,t===null?Ja:t}function Cd(){(Tt===0||Tt===3||Tt===2)&&(Tt=4),It===null||(Mo&268435455)===0&&(sl&268435455)===0||so(It,Wt)}function dl(t,r){var i=Ge;Ge|=2;var u=xg();(It!==t||Wt!==r)&&(Or=null,Lo(t,r));do try{M1();break}catch(p){yg(t,p)}while(!0);if(Iu(),Ge=i,ol.current=u,Ct!==null)throw Error(o(261));return It=null,Wt=0,Tt}function M1(){for(;Ct!==null;)wg(Ct)}function I1(){for(;Ct!==null&&!aS();)wg(Ct)}function wg(t){var r=Eg(t.alternate,t,Cn);t.memoizedProps=t.pendingProps,r===null?bg(t):Ct=r,hd.current=null}function bg(t){var r=t;do{var i=r.alternate;if(t=r.return,(r.flags&32768)===0){if(i=T1(i,r,Cn),i!==null){Ct=i;return}}else{if(i=k1(i,r),i!==null){i.flags&=32767,Ct=i;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{Tt=6,Ct=null;return}}if(r=r.sibling,r!==null){Ct=r;return}Ct=r=t}while(r!==null);Tt===0&&(Tt=5)}function Fo(t,r,i){var u=et,p=Dn.transition;try{Dn.transition=null,et=1,L1(t,r,i,u)}finally{Dn.transition=p,et=u}return null}function L1(t,r,i,u){do bs();while(ro!==null);if((Ge&6)!==0)throw Error(o(327));i=t.finishedWork;var p=t.finishedLanes;if(i===null)return null;if(t.finishedWork=null,t.finishedLanes=0,i===t.current)throw Error(o(177));t.callbackNode=null,t.callbackPriority=0;var y=i.lanes|i.childLanes;if(vS(t,y),t===It&&(Ct=It=null,Wt=0),(i.subtreeFlags&2064)===0&&(i.flags&2064)===0||al||(al=!0,Ng(ma,function(){return bs(),null})),y=(i.flags&15990)!==0,(i.subtreeFlags&15990)!==0||y){y=Dn.transition,Dn.transition=null;var R=et;et=1;var A=Ge;Ge|=4,hd.current=null,_1(t,i),dg(i,t),r1(Cu),Sa=!!Su,Cu=Su=null,t.current=i,D1(i),lS(),Ge=A,et=R,Dn.transition=y}else t.current=i;if(al&&(al=!1,ro=t,ll=p),y=t.pendingLanes,y===0&&(no=null),dS(i.stateNode),mn(t,bt()),r!==null)for(u=t.onRecoverableError,i=0;i<r.length;i++)p=r[i],u(p.value,{componentStack:p.stack,digest:p.digest});if(il)throw il=!1,t=vd,vd=null,t;return(ll&1)!==0&&t.tag!==0&&bs(),y=t.pendingLanes,(y&1)!==0?t===yd?ki++:(ki=0,yd=t):ki=0,Jr(),null}function bs(){if(ro!==null){var t=ch(ll),r=Dn.transition,i=et;try{if(Dn.transition=null,et=16>t?16:t,ro===null)var u=!1;else{if(t=ro,ro=null,ll=0,(Ge&6)!==0)throw Error(o(331));var p=Ge;for(Ge|=4,ve=t.current;ve!==null;){var y=ve,R=y.child;if((ve.flags&16)!==0){var A=y.deletions;if(A!==null){for(var M=0;M<A.length;M++){var V=A[M];for(ve=V;ve!==null;){var oe=ve;switch(oe.tag){case 0:case 11:case 15:ji(8,oe,y)}var ie=oe.child;if(ie!==null)ie.return=oe,ve=ie;else for(;ve!==null;){oe=ve;var re=oe.sibling,ge=oe.return;if(ig(oe),oe===V){ve=null;break}if(re!==null){re.return=ge,ve=re;break}ve=ge}}}var xe=y.alternate;if(xe!==null){var be=xe.child;if(be!==null){xe.child=null;do{var St=be.sibling;be.sibling=null,be=St}while(be!==null)}}ve=y}}if((y.subtreeFlags&2064)!==0&&R!==null)R.return=y,ve=R;else e:for(;ve!==null;){if(y=ve,(y.flags&2048)!==0)switch(y.tag){case 0:case 11:case 15:ji(9,y,y.return)}var $=y.sibling;if($!==null){$.return=y.return,ve=$;break e}ve=y.return}}var I=t.current;for(ve=I;ve!==null;){R=ve;var B=R.child;if((R.subtreeFlags&2064)!==0&&B!==null)B.return=R,ve=B;else e:for(R=I;ve!==null;){if(A=ve,(A.flags&2048)!==0)try{switch(A.tag){case 0:case 11:case 15:rl(9,A)}}catch(Se){yt(A,A.return,Se)}if(A===R){ve=null;break e}var ue=A.sibling;if(ue!==null){ue.return=A.return,ve=ue;break e}ve=A.return}}if(Ge=p,Jr(),ir&&typeof ir.onPostCommitFiberRoot=="function")try{ir.onPostCommitFiberRoot(ga,t)}catch{}u=!0}return u}finally{et=i,Dn.transition=r}}return!1}function Sg(t,r,i){r=vs(i,r),r=zm(t,r,1),t=eo(t,r,1),r=nn(),t!==null&&(Zs(t,1,r),mn(t,r))}function yt(t,r,i){if(t.tag===3)Sg(t,t,i);else for(;r!==null;){if(r.tag===3){Sg(r,t,i);break}else if(r.tag===1){var u=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(no===null||!no.has(u))){t=vs(i,t),t=Bm(r,t,1),r=eo(r,t,1),t=nn(),r!==null&&(Zs(r,1,t),mn(r,t));break}}r=r.return}}function F1(t,r,i){var u=t.pingCache;u!==null&&u.delete(r),r=nn(),t.pingedLanes|=t.suspendedLanes&i,It===t&&(Wt&i)===i&&(Tt===4||Tt===3&&(Wt&130023424)===Wt&&500>bt()-gd?Lo(t,0):md|=i),mn(t,r)}function Cg(t,r){r===0&&((t.mode&1)===0?r=1:(r=ya,ya<<=1,(ya&130023424)===0&&(ya=4194304)));var i=nn();t=_r(t,r),t!==null&&(Zs(t,r,i),mn(t,i))}function $1(t){var r=t.memoizedState,i=0;r!==null&&(i=r.retryLane),Cg(t,i)}function z1(t,r){var i=0;switch(t.tag){case 13:var u=t.stateNode,p=t.memoizedState;p!==null&&(i=p.retryLane);break;case 19:u=t.stateNode;break;default:throw Error(o(314))}u!==null&&u.delete(r),Cg(t,i)}var Eg;Eg=function(t,r,i){if(t!==null)if(t.memoizedProps!==r.pendingProps||dn.current)pn=!0;else{if((t.lanes&i)===0&&(r.flags&128)===0)return pn=!1,R1(t,r,i);pn=(t.flags&131072)!==0}else pn=!1,ct&&(r.flags&1048576)!==0&&rm(r,za,r.index);switch(r.lanes=0,r.tag){case 2:var u=r.type;tl(t,r),t=r.pendingProps;var p=cs(r,qt.current);ms(r,i),p=Yu(null,r,u,t,p,i);var y=Gu();return r.flags|=1,typeof p=="object"&&p!==null&&typeof p.render=="function"&&p.$$typeof===void 0?(r.tag=1,r.memoizedState=null,r.updateQueue=null,fn(u)?(y=!0,La(r)):y=!1,r.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,zu(r),p.updater=Za,r.stateNode=p,p._reactInternals=r,ed(r,u,t,i),r=od(null,r,u,!0,y,i)):(r.tag=0,ct&&y&&Pu(r),tn(null,r,p,i),r=r.child),r;case 16:u=r.elementType;e:{switch(tl(t,r),t=r.pendingProps,p=u._init,u=p(u._payload),r.type=u,p=r.tag=U1(u),t=Vn(u,t),p){case 0:r=rd(null,r,u,t,i);break e;case 1:r=qm(null,r,u,t,i);break e;case 11:r=Wm(null,r,u,t,i);break e;case 14:r=Km(null,r,u,Vn(u.type,t),i);break e}throw Error(o(306,u,""))}return r;case 0:return u=r.type,p=r.pendingProps,p=r.elementType===u?p:Vn(u,p),rd(t,r,u,p,i);case 1:return u=r.type,p=r.pendingProps,p=r.elementType===u?p:Vn(u,p),qm(t,r,u,p,i);case 3:e:{if(Qm(r),t===null)throw Error(o(387));u=r.pendingProps,y=r.memoizedState,p=y.element,fm(t,r),Ka(r,u,null,i);var R=r.memoizedState;if(u=R.element,y.isDehydrated)if(y={element:u,isDehydrated:!1,cache:R.cache,pendingSuspenseBoundaries:R.pendingSuspenseBoundaries,transitions:R.transitions},r.updateQueue.baseState=y,r.memoizedState=y,r.flags&256){p=vs(Error(o(423)),r),r=Jm(t,r,u,i,p);break e}else if(u!==p){p=vs(Error(o(424)),r),r=Jm(t,r,u,i,p);break e}else for(Sn=Xr(r.stateNode.containerInfo.firstChild),bn=r,ct=!0,Hn=null,i=um(r,null,u,i),r.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(fs(),u===p){r=Ar(t,r,i);break e}tn(t,r,u,i)}r=r.child}return r;case 5:return mm(r),t===null&&Au(r),u=r.type,p=r.pendingProps,y=t!==null?t.memoizedProps:null,R=p.children,Eu(u,p)?R=null:y!==null&&Eu(u,y)&&(r.flags|=32),Xm(t,r),tn(t,r,R,i),r.child;case 6:return t===null&&Au(r),null;case 13:return Zm(t,r,i);case 4:return Bu(r,r.stateNode.containerInfo),u=r.pendingProps,t===null?r.child=ps(r,null,u,i):tn(t,r,u,i),r.child;case 11:return u=r.type,p=r.pendingProps,p=r.elementType===u?p:Vn(u,p),Wm(t,r,u,p,i);case 7:return tn(t,r,r.pendingProps,i),r.child;case 8:return tn(t,r,r.pendingProps.children,i),r.child;case 12:return tn(t,r,r.pendingProps.children,i),r.child;case 10:e:{if(u=r.type._context,p=r.pendingProps,y=r.memoizedProps,R=p.value,nt(Ha,u._currentValue),u._currentValue=R,y!==null)if(Un(y.value,R)){if(y.children===p.children&&!dn.current){r=Ar(t,r,i);break e}}else for(y=r.child,y!==null&&(y.return=r);y!==null;){var A=y.dependencies;if(A!==null){R=y.child;for(var M=A.firstContext;M!==null;){if(M.context===u){if(y.tag===1){M=Dr(-1,i&-i),M.tag=2;var V=y.updateQueue;if(V!==null){V=V.shared;var oe=V.pending;oe===null?M.next=M:(M.next=oe.next,oe.next=M),V.pending=M}}y.lanes|=i,M=y.alternate,M!==null&&(M.lanes|=i),Fu(y.return,i,r),A.lanes|=i;break}M=M.next}}else if(y.tag===10)R=y.type===r.type?null:y.child;else if(y.tag===18){if(R=y.return,R===null)throw Error(o(341));R.lanes|=i,A=R.alternate,A!==null&&(A.lanes|=i),Fu(R,i,r),R=y.sibling}else R=y.child;if(R!==null)R.return=y;else for(R=y;R!==null;){if(R===r){R=null;break}if(y=R.sibling,y!==null){y.return=R.return,R=y;break}R=R.return}y=R}tn(t,r,p.children,i),r=r.child}return r;case 9:return p=r.type,u=r.pendingProps.children,ms(r,i),p=Pn(p),u=u(p),r.flags|=1,tn(t,r,u,i),r.child;case 14:return u=r.type,p=Vn(u,r.pendingProps),p=Vn(u.type,p),Km(t,r,u,p,i);case 15:return Ym(t,r,r.type,r.pendingProps,i);case 17:return u=r.type,p=r.pendingProps,p=r.elementType===u?p:Vn(u,p),tl(t,r),r.tag=1,fn(u)?(t=!0,La(r)):t=!1,ms(r,i),Fm(r,u,p),ed(r,u,p,i),od(null,r,u,!0,t,i);case 19:return tg(t,r,i);case 22:return Gm(t,r,i)}throw Error(o(156,r.tag))};function Ng(t,r){return oh(t,r)}function B1(t,r,i,u){this.tag=t,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function An(t,r,i,u){return new B1(t,r,i,u)}function Ed(t){return t=t.prototype,!(!t||!t.isReactComponent)}function U1(t){if(typeof t=="function")return Ed(t)?1:0;if(t!=null){if(t=t.$$typeof,t===ee)return 11;if(t===le)return 14}return 2}function io(t,r){var i=t.alternate;return i===null?(i=An(t.tag,r,t.key,t.mode),i.elementType=t.elementType,i.type=t.type,i.stateNode=t.stateNode,i.alternate=t,t.alternate=i):(i.pendingProps=r,i.type=t.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=t.flags&14680064,i.childLanes=t.childLanes,i.lanes=t.lanes,i.child=t.child,i.memoizedProps=t.memoizedProps,i.memoizedState=t.memoizedState,i.updateQueue=t.updateQueue,r=t.dependencies,i.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},i.sibling=t.sibling,i.index=t.index,i.ref=t.ref,i}function fl(t,r,i,u,p,y){var R=2;if(u=t,typeof t=="function")Ed(t)&&(R=1);else if(typeof t=="string")R=5;else e:switch(t){case _:return $o(i.children,p,y,r);case L:R=8,p|=8;break;case H:return t=An(12,i,r,p|2),t.elementType=H,t.lanes=y,t;case Y:return t=An(13,i,r,p),t.elementType=Y,t.lanes=y,t;case X:return t=An(19,i,r,p),t.elementType=X,t.lanes=y,t;case q:return pl(i,p,y,r);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case W:R=10;break e;case U:R=9;break e;case ee:R=11;break e;case le:R=14;break e;case Z:R=16,u=null;break e}throw Error(o(130,t==null?t:typeof t,""))}return r=An(R,i,r,p),r.elementType=t,r.type=u,r.lanes=y,r}function $o(t,r,i,u){return t=An(7,t,u,r),t.lanes=i,t}function pl(t,r,i,u){return t=An(22,t,u,r),t.elementType=q,t.lanes=i,t.stateNode={isHidden:!1},t}function Nd(t,r,i){return t=An(6,t,null,r),t.lanes=i,t}function jd(t,r,i){return r=An(4,t.children!==null?t.children:[],t.key,r),r.lanes=i,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}function H1(t,r,i,u,p){this.tag=r,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Zc(0),this.expirationTimes=Zc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zc(0),this.identifierPrefix=u,this.onRecoverableError=p,this.mutableSourceEagerHydrationData=null}function Rd(t,r,i,u,p,y,R,A,M){return t=new H1(t,r,i,A,M),r===1?(r=1,y===!0&&(r|=8)):r=0,y=An(3,null,null,r),t.current=y,y.stateNode=t,y.memoizedState={element:u,isDehydrated:i,cache:null,transitions:null,pendingSuspenseBoundaries:null},zu(y),t}function V1(t,r,i){var u=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:D,key:u==null?null:""+u,children:t,containerInfo:r,implementation:i}}function jg(t){if(!t)return Qr;t=t._reactInternals;e:{if(Ro(t)!==t||t.tag!==1)throw Error(o(170));var r=t;do{switch(r.tag){case 3:r=r.stateNode.context;break e;case 1:if(fn(r.type)){r=r.stateNode.__reactInternalMemoizedMergedChildContext;break e}}r=r.return}while(r!==null);throw Error(o(171))}if(t.tag===1){var i=t.type;if(fn(i))return em(t,i,r)}return r}function Rg(t,r,i,u,p,y,R,A,M){return t=Rd(i,u,!0,t,p,y,R,A,M),t.context=jg(null),i=t.current,u=nn(),p=oo(i),y=Dr(u,p),y.callback=r??null,eo(i,y,p),t.current.lanes=p,Zs(t,p,u),mn(t,u),t}function hl(t,r,i,u){var p=r.current,y=nn(),R=oo(p);return i=jg(i),r.context===null?r.context=i:r.pendingContext=i,r=Dr(y,R),r.payload={element:t},u=u===void 0?null:u,u!==null&&(r.callback=u),t=eo(p,r,R),t!==null&&(Yn(t,p,R,y),Wa(t,p,R)),R}function ml(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function Tg(t,r){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var i=t.retryLane;t.retryLane=i!==0&&i<r?i:r}}function Td(t,r){Tg(t,r),(t=t.alternate)&&Tg(t,r)}function W1(){return null}var kg=typeof reportError=="function"?reportError:function(t){console.error(t)};function kd(t){this._internalRoot=t}gl.prototype.render=kd.prototype.render=function(t){var r=this._internalRoot;if(r===null)throw Error(o(409));hl(t,r,null,null)},gl.prototype.unmount=kd.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var r=t.containerInfo;Io(function(){hl(null,t,null,null)}),r[Rr]=null}};function gl(t){this._internalRoot=t}gl.prototype.unstable_scheduleHydration=function(t){if(t){var r=fh();t={blockedOn:null,target:t,priority:r};for(var i=0;i<Kr.length&&r!==0&&r<Kr[i].priority;i++);Kr.splice(i,0,t),i===0&&mh(t)}};function Pd(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function vl(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function Pg(){}function K1(t,r,i,u,p){if(p){if(typeof u=="function"){var y=u;u=function(){var V=ml(R);y.call(V)}}var R=Rg(r,u,t,0,null,!1,!1,"",Pg);return t._reactRootContainer=R,t[Rr]=R.current,pi(t.nodeType===8?t.parentNode:t),Io(),R}for(;p=t.lastChild;)t.removeChild(p);if(typeof u=="function"){var A=u;u=function(){var V=ml(M);A.call(V)}}var M=Rd(t,0,!1,null,null,!1,!1,"",Pg);return t._reactRootContainer=M,t[Rr]=M.current,pi(t.nodeType===8?t.parentNode:t),Io(function(){hl(r,M,i,u)}),M}function yl(t,r,i,u,p){var y=i._reactRootContainer;if(y){var R=y;if(typeof p=="function"){var A=p;p=function(){var M=ml(R);A.call(M)}}hl(r,R,t,p)}else R=K1(i,r,t,p,u);return ml(R)}uh=function(t){switch(t.tag){case 3:var r=t.stateNode;if(r.current.memoizedState.isDehydrated){var i=Js(r.pendingLanes);i!==0&&(eu(r,i|1),mn(r,bt()),(Ge&6)===0&&(ws=bt()+500,Jr()))}break;case 13:Io(function(){var u=_r(t,1);if(u!==null){var p=nn();Yn(u,t,1,p)}}),Td(t,1)}},tu=function(t){if(t.tag===13){var r=_r(t,134217728);if(r!==null){var i=nn();Yn(r,t,134217728,i)}Td(t,134217728)}},dh=function(t){if(t.tag===13){var r=oo(t),i=_r(t,r);if(i!==null){var u=nn();Yn(i,t,r,u)}Td(t,r)}},fh=function(){return et},ph=function(t,r){var i=et;try{return et=t,r()}finally{et=i}},He=function(t,r,i){switch(r){case"input":if(gt(t,i),r=i.name,i.type==="radio"&&r!=null){for(i=t;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll("input[name="+JSON.stringify(""+r)+'][type="radio"]'),r=0;r<i.length;r++){var u=i[r];if(u!==t&&u.form===t.form){var p=Ma(u);if(!p)throw Error(o(90));ce(u),gt(u,p)}}}break;case"textarea":Sr(t,i);break;case"select":r=i.value,r!=null&&Xt(t,!!i.multiple,r,!1)}},Fe=bd,Me=Io;var Y1={usingClientEntryPoint:!1,Events:[gi,as,Ma,me,De,bd]},Pi={findFiberByHostInstance:To,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},G1={bundleType:Pi.bundleType,version:Pi.version,rendererPackageName:Pi.rendererPackageName,rendererConfig:Pi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:k.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=nh(t),t===null?null:t.stateNode},findFiberByHostInstance:Pi.findFiberByHostInstance||W1,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var xl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!xl.isDisabled&&xl.supportsFiber)try{ga=xl.inject(G1),ir=xl}catch{}}return gn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Y1,gn.createPortal=function(t,r){var i=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Pd(r))throw Error(o(200));return V1(t,r,null,i)},gn.createRoot=function(t,r){if(!Pd(t))throw Error(o(299));var i=!1,u="",p=kg;return r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(u=r.identifierPrefix),r.onRecoverableError!==void 0&&(p=r.onRecoverableError)),r=Rd(t,1,!1,null,null,i,!1,u,p),t[Rr]=r.current,pi(t.nodeType===8?t.parentNode:t),new kd(r)},gn.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var r=t._reactInternals;if(r===void 0)throw typeof t.render=="function"?Error(o(188)):(t=Object.keys(t).join(","),Error(o(268,t)));return t=nh(r),t=t===null?null:t.stateNode,t},gn.flushSync=function(t){return Io(t)},gn.hydrate=function(t,r,i){if(!vl(r))throw Error(o(200));return yl(null,t,r,!0,i)},gn.hydrateRoot=function(t,r,i){if(!Pd(t))throw Error(o(405));var u=i!=null&&i.hydratedSources||null,p=!1,y="",R=kg;if(i!=null&&(i.unstable_strictMode===!0&&(p=!0),i.identifierPrefix!==void 0&&(y=i.identifierPrefix),i.onRecoverableError!==void 0&&(R=i.onRecoverableError)),r=Rg(r,null,t,1,i??null,p,!1,y,R),t[Rr]=r.current,pi(t),u)for(t=0;t<u.length;t++)i=u[t],p=i._getVersion,p=p(i._source),r.mutableSourceEagerHydrationData==null?r.mutableSourceEagerHydrationData=[i,p]:r.mutableSourceEagerHydrationData.push(i,p);return new gl(r)},gn.render=function(t,r,i){if(!vl(r))throw Error(o(200));return yl(null,t,r,!1,i)},gn.unmountComponentAtNode=function(t){if(!vl(t))throw Error(o(40));return t._reactRootContainer?(Io(function(){yl(null,null,t,!1,function(){t._reactRootContainer=null,t[Rr]=null})}),!0):!1},gn.unstable_batchedUpdates=bd,gn.unstable_renderSubtreeIntoContainer=function(t,r,i,u){if(!vl(i))throw Error(o(200));if(t==null||t._reactInternals===void 0)throw Error(o(38));return yl(t,r,i,!1,u)},gn.version="18.3.1-next-f1338f8080-20240426",gn}var $g;function hy(){if($g)return Md.exports;$g=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),Md.exports=oC(),Md.exports}var zg;function sC(){if(zg)return bl;zg=1;var e=hy();return bl.createRoot=e.createRoot,bl.hydrateRoot=e.hydrateRoot,bl}var iC=sC(),mc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},aC={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)},ho,Yf,oy,lC=(oy=class{constructor(){Ke(this,ho,aC);Ke(this,Yf,!1)}setTimeoutProvider(e){Ae(this,ho,e)}setTimeout(e,n){return Q(this,ho).setTimeout(e,n)}clearTimeout(e){Q(this,ho).clearTimeout(e)}setInterval(e,n){return Q(this,ho).setInterval(e,n)}clearInterval(e){Q(this,ho).clearInterval(e)}},ho=new WeakMap,Yf=new WeakMap,oy),df=new lC;function cC(e){setTimeout(e,0)}var gc=typeof window>"u"||"Deno"in globalThis;function Xn(){}function uC(e,n){return typeof e=="function"?e(n):e}function dC(e){return typeof e=="number"&&e>=0&&e!==1/0}function fC(e,n){return Math.max(e+(n||0)-Date.now(),0)}function ff(e,n){return typeof e=="function"?e(n):e}function pC(e,n){return typeof e=="function"?e(n):e}function Bg(e,n){const{type:o="all",exact:s,fetchStatus:a,predicate:l,queryKey:f,stale:d}=e;if(f){if(s){if(n.queryHash!==qf(f,n.options))return!1}else if(!Vi(n.queryKey,f))return!1}if(o!=="all"){const h=n.isActive();if(o==="active"&&!h||o==="inactive"&&h)return!1}return!(typeof d=="boolean"&&n.isStale()!==d||a&&a!==n.state.fetchStatus||l&&!l(n))}function Ug(e,n){const{exact:o,status:s,predicate:a,mutationKey:l}=e;if(l){if(!n.options.mutationKey)return!1;if(o){if(Hi(n.options.mutationKey)!==Hi(l))return!1}else if(!Vi(n.options.mutationKey,l))return!1}return!(s&&n.state.status!==s||a&&!a(n))}function qf(e,n){return((n==null?void 0:n.queryKeyHashFn)||Hi)(e)}function Hi(e){return JSON.stringify(e,(n,o)=>pf(o)?Object.keys(o).sort().reduce((s,a)=>(s[a]=o[a],s),{}):o)}function Vi(e,n){return e===n?!0:typeof e!=typeof n?!1:e&&n&&typeof e=="object"&&typeof n=="object"?Object.keys(n).every(o=>Vi(e[o],n[o])):!1}var hC=Object.prototype.hasOwnProperty;function my(e,n){if(e===n)return e;const o=Hg(e)&&Hg(n);if(!o&&!(pf(e)&&pf(n)))return n;const a=(o?e:Object.keys(e)).length,l=o?n:Object.keys(n),f=l.length,d=o?new Array(f):{};let h=0;for(let v=0;v<f;v++){const x=o?v:l[v],m=e[x],b=n[x];if(m===b){d[x]=m,(o?v<a:hC.call(e,x))&&h++;continue}if(m===null||b===null||typeof m!="object"||typeof b!="object"){d[x]=b;continue}const E=my(m,b);d[x]=E,E===m&&h++}return a===f&&h===a?e:d}function Hg(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function pf(e){if(!Vg(e))return!1;const n=e.constructor;if(n===void 0)return!0;const o=n.prototype;return!(!Vg(o)||!o.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Vg(e){return Object.prototype.toString.call(e)==="[object Object]"}function mC(e){return new Promise(n=>{df.setTimeout(n,e)})}function gC(e,n,o){return typeof o.structuralSharing=="function"?o.structuralSharing(e,n):o.structuralSharing!==!1?my(e,n):n}function vC(e,n,o=0){const s=[...e,n];return o&&s.length>o?s.slice(1):s}function yC(e,n,o=0){const s=[n,...e];return o&&s.length>o?s.slice(0,-1):s}var Qf=Symbol();function gy(e,n){return!e.queryFn&&(n!=null&&n.initialPromise)?()=>n.initialPromise:!e.queryFn||e.queryFn===Qf?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Ho,mo,Ps,sy,xC=(sy=class extends mc{constructor(){super();Ke(this,Ho);Ke(this,mo);Ke(this,Ps);Ae(this,Ps,n=>{if(!gc&&window.addEventListener){const o=()=>n();return window.addEventListener("visibilitychange",o,!1),()=>{window.removeEventListener("visibilitychange",o)}}})}onSubscribe(){Q(this,mo)||this.setEventListener(Q(this,Ps))}onUnsubscribe(){var n;this.hasListeners()||((n=Q(this,mo))==null||n.call(this),Ae(this,mo,void 0))}setEventListener(n){var o;Ae(this,Ps,n),(o=Q(this,mo))==null||o.call(this),Ae(this,mo,n(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(n){Q(this,Ho)!==n&&(Ae(this,Ho,n),this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(o=>{o(n)})}isFocused(){var n;return typeof Q(this,Ho)=="boolean"?Q(this,Ho):((n=globalThis.document)==null?void 0:n.visibilityState)!=="hidden"}},Ho=new WeakMap,mo=new WeakMap,Ps=new WeakMap,sy),vy=new xC;function wC(){let e,n;const o=new Promise((a,l)=>{e=a,n=l});o.status="pending",o.catch(()=>{});function s(a){Object.assign(o,a),delete o.resolve,delete o.reject}return o.resolve=a=>{s({status:"fulfilled",value:a}),e(a)},o.reject=a=>{s({status:"rejected",reason:a}),n(a)},o}var bC=cC;function SC(){let e=[],n=0,o=d=>{d()},s=d=>{d()},a=bC;const l=d=>{n?e.push(d):a(()=>{o(d)})},f=()=>{const d=e;e=[],d.length&&a(()=>{s(()=>{d.forEach(h=>{o(h)})})})};return{batch:d=>{let h;n++;try{h=d()}finally{n--,n||f()}return h},batchCalls:d=>(...h)=>{l(()=>{d(...h)})},schedule:l,setNotifyFunction:d=>{o=d},setBatchNotifyFunction:d=>{s=d},setScheduler:d=>{a=d}}}var sn=SC(),_s,go,Ds,iy,CC=(iy=class extends mc{constructor(){super();Ke(this,_s,!0);Ke(this,go);Ke(this,Ds);Ae(this,Ds,n=>{if(!gc&&window.addEventListener){const o=()=>n(!0),s=()=>n(!1);return window.addEventListener("online",o,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",o),window.removeEventListener("offline",s)}}})}onSubscribe(){Q(this,go)||this.setEventListener(Q(this,Ds))}onUnsubscribe(){var n;this.hasListeners()||((n=Q(this,go))==null||n.call(this),Ae(this,go,void 0))}setEventListener(n){var o;Ae(this,Ds,n),(o=Q(this,go))==null||o.call(this),Ae(this,go,n(this.setOnline.bind(this)))}setOnline(n){Q(this,_s)!==n&&(Ae(this,_s,n),this.listeners.forEach(s=>{s(n)}))}isOnline(){return Q(this,_s)}},_s=new WeakMap,go=new WeakMap,Ds=new WeakMap,iy),Ul=new CC;function EC(e){return Math.min(1e3*2**e,3e4)}function yy(e){return(e??"online")==="online"?Ul.isOnline():!0}var hf=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function xy(e){let n=!1,o=0,s;const a=wC(),l=()=>a.status!=="pending",f=w=>{var S;if(!l()){const C=new hf(w);b(C),(S=e.onCancel)==null||S.call(e,C)}},d=()=>{n=!0},h=()=>{n=!1},v=()=>vy.isFocused()&&(e.networkMode==="always"||Ul.isOnline())&&e.canRun(),x=()=>yy(e.networkMode)&&e.canRun(),m=w=>{l()||(s==null||s(),a.resolve(w))},b=w=>{l()||(s==null||s(),a.reject(w))},E=()=>new Promise(w=>{var S;s=C=>{(l()||v())&&w(C)},(S=e.onPause)==null||S.call(e)}).then(()=>{var w;s=void 0,l()||(w=e.onContinue)==null||w.call(e)}),T=()=>{if(l())return;let w;const S=o===0?e.initialPromise:void 0;try{w=S??e.fn()}catch(C){w=Promise.reject(C)}Promise.resolve(w).then(m).catch(C=>{var D;if(l())return;const j=e.retry??(gc?0:3),N=e.retryDelay??EC,k=typeof N=="function"?N(o,C):N,P=j===!0||typeof j=="number"&&o<j||typeof j=="function"&&j(o,C);if(n||!P){b(C);return}o++,(D=e.onFail)==null||D.call(e,o,C),mC(k).then(()=>v()?void 0:E()).then(()=>{n?b(C):T()})})};return{promise:a,status:()=>a.status,cancel:f,continue:()=>(s==null||s(),a),cancelRetry:d,continueRetry:h,canStart:x,start:()=>(x()?T():E().then(T),a)}}var Vo,ay,wy=(ay=class{constructor(){Ke(this,Vo)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),dC(this.gcTime)&&Ae(this,Vo,df.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(gc?1/0:300*1e3))}clearGcTimeout(){Q(this,Vo)&&(df.clearTimeout(Q(this,Vo)),Ae(this,Vo,void 0))}},Vo=new WeakMap,ay),Wo,As,On,Ko,Ft,ea,Yo,qn,Ir,ly,NC=(ly=class extends wy{constructor(n){super();Ke(this,qn);Ke(this,Wo);Ke(this,As);Ke(this,On);Ke(this,Ko);Ke(this,Ft);Ke(this,ea);Ke(this,Yo);Ae(this,Yo,!1),Ae(this,ea,n.defaultOptions),this.setOptions(n.options),this.observers=[],Ae(this,Ko,n.client),Ae(this,On,Q(this,Ko).getQueryCache()),this.queryKey=n.queryKey,this.queryHash=n.queryHash,Ae(this,Wo,Kg(this.options)),this.state=n.state??Q(this,Wo),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var n;return(n=Q(this,Ft))==null?void 0:n.promise}setOptions(n){if(this.options={...Q(this,ea),...n},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const o=Kg(this.options);o.data!==void 0&&(this.setState(Wg(o.data,o.dataUpdatedAt)),Ae(this,Wo,o))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&Q(this,On).remove(this)}setData(n,o){const s=gC(this.state.data,n,this.options);return en(this,qn,Ir).call(this,{data:s,type:"success",dataUpdatedAt:o==null?void 0:o.updatedAt,manual:o==null?void 0:o.manual}),s}setState(n,o){en(this,qn,Ir).call(this,{type:"setState",state:n,setStateOptions:o})}cancel(n){var s,a;const o=(s=Q(this,Ft))==null?void 0:s.promise;return(a=Q(this,Ft))==null||a.cancel(n),o?o.then(Xn).catch(Xn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(Q(this,Wo))}isActive(){return this.observers.some(n=>pC(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Qf||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>ff(n.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(n=>n.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(n=0){return this.state.data===void 0?!0:n==="static"?!1:this.state.isInvalidated?!0:!fC(this.state.dataUpdatedAt,n)}onFocus(){var o;const n=this.observers.find(s=>s.shouldFetchOnWindowFocus());n==null||n.refetch({cancelRefetch:!1}),(o=Q(this,Ft))==null||o.continue()}onOnline(){var o;const n=this.observers.find(s=>s.shouldFetchOnReconnect());n==null||n.refetch({cancelRefetch:!1}),(o=Q(this,Ft))==null||o.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),Q(this,On).notify({type:"observerAdded",query:this,observer:n}))}removeObserver(n){this.observers.includes(n)&&(this.observers=this.observers.filter(o=>o!==n),this.observers.length||(Q(this,Ft)&&(Q(this,Yo)?Q(this,Ft).cancel({revert:!0}):Q(this,Ft).cancelRetry()),this.scheduleGc()),Q(this,On).notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||en(this,qn,Ir).call(this,{type:"invalidate"})}async fetch(n,o){var h,v,x,m,b,E,T,w,S,C,j,N;if(this.state.fetchStatus!=="idle"&&((h=Q(this,Ft))==null?void 0:h.status())!=="rejected"){if(this.state.data!==void 0&&(o!=null&&o.cancelRefetch))this.cancel({silent:!0});else if(Q(this,Ft))return Q(this,Ft).continueRetry(),Q(this,Ft).promise}if(n&&this.setOptions(n),!this.options.queryFn){const k=this.observers.find(P=>P.options.queryFn);k&&this.setOptions(k.options)}const s=new AbortController,a=k=>{Object.defineProperty(k,"signal",{enumerable:!0,get:()=>(Ae(this,Yo,!0),s.signal)})},l=()=>{const k=gy(this.options,o),D=(()=>{const _={client:Q(this,Ko),queryKey:this.queryKey,meta:this.meta};return a(_),_})();return Ae(this,Yo,!1),this.options.persister?this.options.persister(k,D,this):k(D)},d=(()=>{const k={fetchOptions:o,options:this.options,queryKey:this.queryKey,client:Q(this,Ko),state:this.state,fetchFn:l};return a(k),k})();(v=this.options.behavior)==null||v.onFetch(d,this),Ae(this,As,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((x=d.fetchOptions)==null?void 0:x.meta))&&en(this,qn,Ir).call(this,{type:"fetch",meta:(m=d.fetchOptions)==null?void 0:m.meta}),Ae(this,Ft,xy({initialPromise:o==null?void 0:o.initialPromise,fn:d.fetchFn,onCancel:k=>{k instanceof hf&&k.revert&&this.setState({...Q(this,As),fetchStatus:"idle"}),s.abort()},onFail:(k,P)=>{en(this,qn,Ir).call(this,{type:"failed",failureCount:k,error:P})},onPause:()=>{en(this,qn,Ir).call(this,{type:"pause"})},onContinue:()=>{en(this,qn,Ir).call(this,{type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0}));try{const k=await Q(this,Ft).start();if(k===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(k),(E=(b=Q(this,On).config).onSuccess)==null||E.call(b,k,this),(w=(T=Q(this,On).config).onSettled)==null||w.call(T,k,this.state.error,this),k}catch(k){if(k instanceof hf){if(k.silent)return Q(this,Ft).promise;if(k.revert){if(this.state.data===void 0)throw k;return this.state.data}}throw en(this,qn,Ir).call(this,{type:"error",error:k}),(C=(S=Q(this,On).config).onError)==null||C.call(S,k,this),(N=(j=Q(this,On).config).onSettled)==null||N.call(j,this.state.data,k,this),k}finally{this.scheduleGc()}}},Wo=new WeakMap,As=new WeakMap,On=new WeakMap,Ko=new WeakMap,Ft=new WeakMap,ea=new WeakMap,Yo=new WeakMap,qn=new WeakSet,Ir=function(n){const o=s=>{switch(n.type){case"failed":return{...s,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...jC(s.data,this.options),fetchMeta:n.meta??null};case"success":const a={...s,...Wg(n.data,n.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ae(this,As,n.manual?a:void 0),a;case"error":const l=n.error;return{...s,error:l,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error"};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...n.state}}};this.state=o(this.state),sn.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),Q(this,On).notify({query:this,type:"updated",action:n})})},ly);function jC(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:yy(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Wg(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Kg(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,o=n!==void 0,s=o?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:o?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:o?"success":"pending",fetchStatus:"idle"}}function Yg(e){return{onFetch:(n,o)=>{var x,m,b,E,T;const s=n.options,a=(b=(m=(x=n.fetchOptions)==null?void 0:x.meta)==null?void 0:m.fetchMore)==null?void 0:b.direction,l=((E=n.state.data)==null?void 0:E.pages)||[],f=((T=n.state.data)==null?void 0:T.pageParams)||[];let d={pages:[],pageParams:[]},h=0;const v=async()=>{let w=!1;const S=N=>{Object.defineProperty(N,"signal",{enumerable:!0,get:()=>(n.signal.aborted?w=!0:n.signal.addEventListener("abort",()=>{w=!0}),n.signal)})},C=gy(n.options,n.fetchOptions),j=async(N,k,P)=>{if(w)return Promise.reject();if(k==null&&N.pages.length)return Promise.resolve(N);const _=(()=>{const U={client:n.client,queryKey:n.queryKey,pageParam:k,direction:P?"backward":"forward",meta:n.options.meta};return S(U),U})(),L=await C(_),{maxPages:H}=n.options,W=P?yC:vC;return{pages:W(N.pages,L,H),pageParams:W(N.pageParams,k,H)}};if(a&&l.length){const N=a==="backward",k=N?RC:Gg,P={pages:l,pageParams:f},D=k(s,P);d=await j(P,D,N)}else{const N=e??l.length;do{const k=h===0?f[0]??s.initialPageParam:Gg(s,d);if(h>0&&k==null)break;d=await j(d,k),h++}while(h<N)}return d};n.options.persister?n.fetchFn=()=>{var w,S;return(S=(w=n.options).persister)==null?void 0:S.call(w,v,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},o)}:n.fetchFn=v}}}function Gg(e,{pages:n,pageParams:o}){const s=n.length-1;return n.length>0?e.getNextPageParam(n[s],n,o[s],o):void 0}function RC(e,{pages:n,pageParams:o}){var s;return n.length>0?(s=e.getPreviousPageParam)==null?void 0:s.call(e,n[0],n,o[0],o):void 0}var ta,fr,rn,Go,pr,uo,cy,TC=(cy=class extends wy{constructor(n){super();Ke(this,pr);Ke(this,ta);Ke(this,fr);Ke(this,rn);Ke(this,Go);Ae(this,ta,n.client),this.mutationId=n.mutationId,Ae(this,rn,n.mutationCache),Ae(this,fr,[]),this.state=n.state||kC(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){Q(this,fr).includes(n)||(Q(this,fr).push(n),this.clearGcTimeout(),Q(this,rn).notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){Ae(this,fr,Q(this,fr).filter(o=>o!==n)),this.scheduleGc(),Q(this,rn).notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){Q(this,fr).length||(this.state.status==="pending"?this.scheduleGc():Q(this,rn).remove(this))}continue(){var n;return((n=Q(this,Go))==null?void 0:n.continue())??this.execute(this.state.variables)}async execute(n){var f,d,h,v,x,m,b,E,T,w,S,C,j,N,k,P,D,_,L,H;const o=()=>{en(this,pr,uo).call(this,{type:"continue"})},s={client:Q(this,ta),meta:this.options.meta,mutationKey:this.options.mutationKey};Ae(this,Go,xy({fn:()=>this.options.mutationFn?this.options.mutationFn(n,s):Promise.reject(new Error("No mutationFn found")),onFail:(W,U)=>{en(this,pr,uo).call(this,{type:"failed",failureCount:W,error:U})},onPause:()=>{en(this,pr,uo).call(this,{type:"pause"})},onContinue:o,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>Q(this,rn).canRun(this)}));const a=this.state.status==="pending",l=!Q(this,Go).canStart();try{if(a)o();else{en(this,pr,uo).call(this,{type:"pending",variables:n,isPaused:l}),await((d=(f=Q(this,rn).config).onMutate)==null?void 0:d.call(f,n,this,s));const U=await((v=(h=this.options).onMutate)==null?void 0:v.call(h,n,s));U!==this.state.context&&en(this,pr,uo).call(this,{type:"pending",context:U,variables:n,isPaused:l})}const W=await Q(this,Go).start();return await((m=(x=Q(this,rn).config).onSuccess)==null?void 0:m.call(x,W,n,this.state.context,this,s)),await((E=(b=this.options).onSuccess)==null?void 0:E.call(b,W,n,this.state.context,s)),await((w=(T=Q(this,rn).config).onSettled)==null?void 0:w.call(T,W,null,this.state.variables,this.state.context,this,s)),await((C=(S=this.options).onSettled)==null?void 0:C.call(S,W,null,n,this.state.context,s)),en(this,pr,uo).call(this,{type:"success",data:W}),W}catch(W){try{throw await((N=(j=Q(this,rn).config).onError)==null?void 0:N.call(j,W,n,this.state.context,this,s)),await((P=(k=this.options).onError)==null?void 0:P.call(k,W,n,this.state.context,s)),await((_=(D=Q(this,rn).config).onSettled)==null?void 0:_.call(D,void 0,W,this.state.variables,this.state.context,this,s)),await((H=(L=this.options).onSettled)==null?void 0:H.call(L,void 0,W,n,this.state.context,s)),W}finally{en(this,pr,uo).call(this,{type:"error",error:W})}}finally{Q(this,rn).runNext(this)}}},ta=new WeakMap,fr=new WeakMap,rn=new WeakMap,Go=new WeakMap,pr=new WeakSet,uo=function(n){const o=s=>{switch(n.type){case"failed":return{...s,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:n.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:n.isPaused,status:"pending",variables:n.variables,submittedAt:Date.now()};case"success":return{...s,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:n.error,failureCount:s.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=o(this.state),sn.batch(()=>{Q(this,fr).forEach(s=>{s.onMutationUpdate(n)}),Q(this,rn).notify({mutation:this,type:"updated",action:n})})},cy);function kC(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Lr,Qn,na,uy,PC=(uy=class extends mc{constructor(n={}){super();Ke(this,Lr);Ke(this,Qn);Ke(this,na);this.config=n,Ae(this,Lr,new Set),Ae(this,Qn,new Map),Ae(this,na,0)}build(n,o,s){const a=new TC({client:n,mutationCache:this,mutationId:++wl(this,na)._,options:n.defaultMutationOptions(o),state:s});return this.add(a),a}add(n){Q(this,Lr).add(n);const o=Sl(n);if(typeof o=="string"){const s=Q(this,Qn).get(o);s?s.push(n):Q(this,Qn).set(o,[n])}this.notify({type:"added",mutation:n})}remove(n){if(Q(this,Lr).delete(n)){const o=Sl(n);if(typeof o=="string"){const s=Q(this,Qn).get(o);if(s)if(s.length>1){const a=s.indexOf(n);a!==-1&&s.splice(a,1)}else s[0]===n&&Q(this,Qn).delete(o)}}this.notify({type:"removed",mutation:n})}canRun(n){const o=Sl(n);if(typeof o=="string"){const s=Q(this,Qn).get(o),a=s==null?void 0:s.find(l=>l.state.status==="pending");return!a||a===n}else return!0}runNext(n){var s;const o=Sl(n);if(typeof o=="string"){const a=(s=Q(this,Qn).get(o))==null?void 0:s.find(l=>l!==n&&l.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){sn.batch(()=>{Q(this,Lr).forEach(n=>{this.notify({type:"removed",mutation:n})}),Q(this,Lr).clear(),Q(this,Qn).clear()})}getAll(){return Array.from(Q(this,Lr))}find(n){const o={exact:!0,...n};return this.getAll().find(s=>Ug(o,s))}findAll(n={}){return this.getAll().filter(o=>Ug(n,o))}notify(n){sn.batch(()=>{this.listeners.forEach(o=>{o(n)})})}resumePausedMutations(){const n=this.getAll().filter(o=>o.state.isPaused);return sn.batch(()=>Promise.all(n.map(o=>o.continue().catch(Xn))))}},Lr=new WeakMap,Qn=new WeakMap,na=new WeakMap,uy);function Sl(e){var n;return(n=e.options.scope)==null?void 0:n.id}var hr,dy,_C=(dy=class extends mc{constructor(n={}){super();Ke(this,hr);this.config=n,Ae(this,hr,new Map)}build(n,o,s){const a=o.queryKey,l=o.queryHash??qf(a,o);let f=this.get(l);return f||(f=new NC({client:n,queryKey:a,queryHash:l,options:n.defaultQueryOptions(o),state:s,defaultOptions:n.getQueryDefaults(a)}),this.add(f)),f}add(n){Q(this,hr).has(n.queryHash)||(Q(this,hr).set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const o=Q(this,hr).get(n.queryHash);o&&(n.destroy(),o===n&&Q(this,hr).delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){sn.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return Q(this,hr).get(n)}getAll(){return[...Q(this,hr).values()]}find(n){const o={exact:!0,...n};return this.getAll().find(s=>Bg(o,s))}findAll(n={}){const o=this.getAll();return Object.keys(n).length>0?o.filter(s=>Bg(n,s)):o}notify(n){sn.batch(()=>{this.listeners.forEach(o=>{o(n)})})}onFocus(){sn.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){sn.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},hr=new WeakMap,dy),xt,vo,yo,Os,Ms,xo,Is,Ls,fy,DC=(fy=class{constructor(e={}){Ke(this,xt);Ke(this,vo);Ke(this,yo);Ke(this,Os);Ke(this,Ms);Ke(this,xo);Ke(this,Is);Ke(this,Ls);Ae(this,xt,e.queryCache||new _C),Ae(this,vo,e.mutationCache||new PC),Ae(this,yo,e.defaultOptions||{}),Ae(this,Os,new Map),Ae(this,Ms,new Map),Ae(this,xo,0)}mount(){wl(this,xo)._++,Q(this,xo)===1&&(Ae(this,Is,vy.subscribe(async e=>{e&&(await this.resumePausedMutations(),Q(this,xt).onFocus())})),Ae(this,Ls,Ul.subscribe(async e=>{e&&(await this.resumePausedMutations(),Q(this,xt).onOnline())})))}unmount(){var e,n;wl(this,xo)._--,Q(this,xo)===0&&((e=Q(this,Is))==null||e.call(this),Ae(this,Is,void 0),(n=Q(this,Ls))==null||n.call(this),Ae(this,Ls,void 0))}isFetching(e){return Q(this,xt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return Q(this,vo).findAll({...e,status:"pending"}).length}getQueryData(e){var o;const n=this.defaultQueryOptions({queryKey:e});return(o=Q(this,xt).get(n.queryHash))==null?void 0:o.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),o=Q(this,xt).build(this,n),s=o.state.data;return s===void 0?this.fetchQuery(e):(e.revalidateIfStale&&o.isStaleByTime(ff(n.staleTime,o))&&this.prefetchQuery(n),Promise.resolve(s))}getQueriesData(e){return Q(this,xt).findAll(e).map(({queryKey:n,state:o})=>{const s=o.data;return[n,s]})}setQueryData(e,n,o){const s=this.defaultQueryOptions({queryKey:e}),a=Q(this,xt).get(s.queryHash),l=a==null?void 0:a.state.data,f=uC(n,l);if(f!==void 0)return Q(this,xt).build(this,s).setData(f,{...o,manual:!0})}setQueriesData(e,n,o){return sn.batch(()=>Q(this,xt).findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,n,o)]))}getQueryState(e){var o;const n=this.defaultQueryOptions({queryKey:e});return(o=Q(this,xt).get(n.queryHash))==null?void 0:o.state}removeQueries(e){const n=Q(this,xt);sn.batch(()=>{n.findAll(e).forEach(o=>{n.remove(o)})})}resetQueries(e,n){const o=Q(this,xt);return sn.batch(()=>(o.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...e},n)))}cancelQueries(e,n={}){const o={revert:!0,...n},s=sn.batch(()=>Q(this,xt).findAll(e).map(a=>a.cancel(o)));return Promise.all(s).then(Xn).catch(Xn)}invalidateQueries(e,n={}){return sn.batch(()=>(Q(this,xt).findAll(e).forEach(o=>{o.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},n)))}refetchQueries(e,n={}){const o={...n,cancelRefetch:n.cancelRefetch??!0},s=sn.batch(()=>Q(this,xt).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let l=a.fetch(void 0,o);return o.throwOnError||(l=l.catch(Xn)),a.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(s).then(Xn)}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const o=Q(this,xt).build(this,n);return o.isStaleByTime(ff(n.staleTime,o))?o.fetch(n):Promise.resolve(o.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Xn).catch(Xn)}fetchInfiniteQuery(e){return e.behavior=Yg(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Xn).catch(Xn)}ensureInfiniteQueryData(e){return e.behavior=Yg(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ul.isOnline()?Q(this,vo).resumePausedMutations():Promise.resolve()}getQueryCache(){return Q(this,xt)}getMutationCache(){return Q(this,vo)}getDefaultOptions(){return Q(this,yo)}setDefaultOptions(e){Ae(this,yo,e)}setQueryDefaults(e,n){Q(this,Os).set(Hi(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...Q(this,Os).values()],o={};return n.forEach(s=>{Vi(e,s.queryKey)&&Object.assign(o,s.defaultOptions)}),o}setMutationDefaults(e,n){Q(this,Ms).set(Hi(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...Q(this,Ms).values()],o={};return n.forEach(s=>{Vi(e,s.mutationKey)&&Object.assign(o,s.defaultOptions)}),o}defaultQueryOptions(e){if(e._defaulted)return e;const n={...Q(this,yo).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=qf(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===Qf&&(n.enabled=!1),n}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...Q(this,yo).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){Q(this,xt).clear(),Q(this,vo).clear()}},xt=new WeakMap,vo=new WeakMap,yo=new WeakMap,Os=new WeakMap,Ms=new WeakMap,xo=new WeakMap,Is=new WeakMap,Ls=new WeakMap,fy),AC=g.createContext(void 0),OC=({client:e,children:n})=>(g.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),c.jsx(AC.Provider,{value:e,children:n}));/**42 * @license lucide-react v0.460.0 - ISC 43 * 44 * This source code is licensed under the ISC license. 45 * See the LICENSE file in the root directory of this source tree. 46 */const MC=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),by=(...e)=>e.filter((n,o,s)=>!!n&&n.trim()!==""&&s.indexOf(n)===o).join(" ").trim();/**47 * @license lucide-react v0.460.0 - ISC 48 * 49 * This source code is licensed under the ISC license. 50 * See the LICENSE file in the root directory of this source tree. 51 */var IC={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"};/**52 * @license lucide-react v0.460.0 - ISC 53 * 54 * This source code is licensed under the ISC license. 55 * See the LICENSE file in the root directory of this source tree. 56 */const LC=g.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:o=2,absoluteStrokeWidth:s,className:a="",children:l,iconNode:f,...d},h)=>g.createElement("svg",{ref:h,...IC,width:n,height:n,stroke:e,strokeWidth:s?Number(o)*24/Number(n):o,className:by("lucide",a),...d},[...f.map(([v,x])=>g.createElement(v,x)),...Array.isArray(l)?l:[l]]));/**57 * @license lucide-react v0.460.0 - ISC 58 * 59 * This source code is licensed under the ISC license. 60 * See the LICENSE file in the root directory of this source tree. 61 */const Qe=(e,n)=>{const o=g.forwardRef(({className:s,...a},l)=>g.createElement( LC,{ref:l,iconNode:n,className:by(`lucide-${MC(e)}`,s),...a}));return o.displayName=`${e}`,o};/**62 * @license lucide-react v0.460.0 - ISC 63 * 64 * This source code is licensed under the ISC license. 65 * See the LICENSE file in the root directory of this source tree. 66 */const FC=Qe("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**67 * @license lucide-react v0.460.0 - ISC 68 * 69 * This source code is licensed under the ISC license. 70 * See the LICENSE file in the root directory of this source tree. 71 */const $C=Qe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**72 * @license lucide-react v0.460.0 - ISC 73 * 74 * This source code is licensed under the ISC license. 75 * See the LICENSE file in the root directory of this source tree. 76 */const vc=Qe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**77 * @license lucide-react v0.460.0 - ISC 78 * 79 * This source code is licensed under the ISC license. 80 * See the LICENSE file in the root directory of this source tree. 81 */const zC=Qe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**82 * @license lucide-react v0.460.0 - ISC 83 * 84 * This source code is licensed under the ISC license. 85 * See the LICENSE file in the root directory of this source tree. 86 */const BC=Qe("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**87 * @license lucide-react v0.460.0 - ISC 88 * 89 * This source code is licensed under the ISC license. 90 * See the LICENSE file in the root directory of this source tree. 91 */const mf=Qe("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**92 * @license lucide-react v0.460.0 - ISC 93 * 94 * This source code is licensed under the ISC license. 95 * See the LICENSE file in the root directory of this source tree. 96 */const Xg=Qe("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"}]]);/**97 * @license lucide-react v0.460.0 - ISC 98 * 99 * This source code is licensed under the ISC license. 100 * See the LICENSE file in the root directory of this source tree. 101 */const Fs=Qe("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**102 * @license lucide-react v0.460.0 - ISC 103 * 104 * This source code is licensed under the ISC license. 105 * See the LICENSE file in the root directory of this source tree. 106 */const gf=Qe("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**107 * @license lucide-react v0.460.0 - ISC 108 * 109 * This source code is licensed under the ISC license. 110 * See the LICENSE file in the root directory of this source tree. 111 */const UC=Qe("EllipsisVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);/**112 * @license lucide-react v0.460.0 - ISC 113 * 114 * This source code is licensed under the ISC license. 115 * See the LICENSE file in the root directory of this source tree. 116 */const HC=Qe("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**117 * @license lucide-react v0.460.0 - ISC 118 * 119 * This source code is licensed under the ISC license. 120 * See the LICENSE file in the root directory of this source tree. 121 */const VC=Qe("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**122 * @license lucide-react v0.460.0 - ISC 123 * 124 * This source code is licensed under the ISC license. 125 * See the LICENSE file in the root directory of this source tree. 126 */const Sy=Qe("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**127 * @license lucide-react v0.460.0 - ISC 128 * 129 * This source code is licensed under the ISC license. 130 * See the LICENSE file in the root directory of this source tree. 131 */const WC=Qe("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**132 * @license lucide-react v0.460.0 - ISC 133 * 134 * This source code is licensed under the ISC license. 135 * See the LICENSE file in the root directory of this source tree. 136 */const KC=Qe("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/**137 * @license lucide-react v0.460.0 - ISC 138 * 139 * This source code is licensed under the ISC license. 140 * See the LICENSE file in the root directory of this source tree. 141 */const YC=Qe("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**142 * @license lucide-react v0.460.0 - ISC 143 * 144 * This source code is licensed under the ISC license. 145 * See the LICENSE file in the root directory of this source tree. 146 */const qg=Qe("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**147 * @license lucide-react v0.460.0 - ISC 148 * 149 * This source code is licensed under the ISC license. 150 * See the LICENSE file in the root directory of this source tree. 151 */const GC=Qe("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**152 * @license lucide-react v0.460.0 - ISC 153 * 154 * This source code is licensed under the ISC license. 155 * See the LICENSE file in the root directory of this source tree. 156 */const Cy=Qe("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**157 * @license lucide-react v0.460.0 - ISC 158 * 159 * This source code is licensed under the ISC license. 160 * See the LICENSE file in the root directory of this source tree. 161 */const XC=Qe("MoveVertical",[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"m8 18 4 4 4-4",key:"bh5tu3"}],["path",{d:"m8 6 4-4 4 4",key:"ybng9g"}]]);/**162 * @license lucide-react v0.460.0 - ISC 163 * 164 * This source code is licensed under the ISC license. 165 * See the LICENSE file in the root directory of this source tree. 166 */const qC=Qe("OctagonX",[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**167 * @license lucide-react v0.460.0 - ISC 168 * 169 * This source code is licensed under the ISC license. 170 * See the LICENSE file in the root directory of this source tree. 171 */const Fr=Qe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**172 * @license lucide-react v0.460.0 - ISC 173 * 174 * This source code is licensed under the ISC license. 175 * See the LICENSE file in the root directory of this source tree. 176 */const vf=Qe("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**177 * @license lucide-react v0.460.0 - ISC 178 * 179 * This source code is licensed under the ISC license. 180 * See the LICENSE file in the root directory of this source tree. 181 */const QC=Qe("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**182 * @license lucide-react v0.460.0 - ISC 183 * 184 * This source code is licensed under the ISC license. 185 * See the LICENSE file in the root directory of this source tree. 186 */const JC=Qe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**187 * @license lucide-react v0.460.0 - ISC 188 * 189 * This source code is licensed under the ISC license. 190 * See the LICENSE file in the root directory of this source tree. 191 */const ZC=Qe("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**192 * @license lucide-react v0.460.0 - ISC 193 * 194 * This source code is licensed under the ISC license. 195 * See the LICENSE file in the root directory of this source tree. 196 */const Qg=Qe("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**197 * @license lucide-react v0.460.0 - ISC 198 * 199 * This source code is licensed under the ISC license. 200 * See the LICENSE file in the root directory of this source tree. 201 */const yf=Qe("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**202 * @license lucide-react v0.460.0 - ISC 203 * 204 * This source code is licensed under the ISC license. 205 * See the LICENSE file in the root directory of this source tree. 206 */const eE=Qe("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**207 * @license lucide-react v0.460.0 - ISC 208 * 209 * This source code is licensed under the ISC license. 210 * See the LICENSE file in the root directory of this source tree. 211 */const Jg=Qe("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**212 * @license lucide-react v0.460.0 - ISC 213 * 214 * This source code is licensed under the ISC license. 215 * See the LICENSE file in the root directory of this source tree. 216 */const ra=Qe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),tE=1,nE=1e6;let Fd=0;function rE(){return Fd=(Fd+1)%Number.MAX_SAFE_INTEGER,Fd.toString()}const $d=new Map,Zg=e=>{if($d.has(e))return;const n=setTimeout(()=>{$d.delete(e),Li({type:"REMOVE_TOAST",toastId:e})},nE);$d.set(e,n)},oE=(e,n)=>{switch(n.type){case"ADD_TOAST":return{...e,toasts:[n.toast,...e.toasts].slice(0,tE)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(o=>o.id===n.toast.id?{...o,...n.toast}:o)};case"DISMISS_TOAST":{const{toastId:o}=n;return o?Zg(o):e.toasts.forEach(s=>{Zg(s.id)}),{...e,toasts:e.toasts.map(s=>s.id===o||o===void 0?{...s,open:!1}:s)}}case"REMOVE_TOAST":return n.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==n.toastId)}}},Il=[];let Ll={toasts:[]};function Li(e){Ll=oE(Ll,e),Il.forEach(n=>{n(Ll)})}function sE({...e}){const n=rE(),o=a=>Li({type:"UPDATE_TOAST",toast:{...a,id:n}}),s=()=>Li({type:"DISMISS_TOAST",toastId:n});return Li({type:"ADD_TOAST",toast:{...e,id:n,open:!0,onOpenChange:a=>{a||s()}}}),{id:n,dismiss:s,update:o}}function iE(){const[e,n]=g.useState(Ll);return g.useEffect(()=>(Il.push(n),()=>{const o=Il.indexOf(n);o>-1&&Il.splice(o,1)}),[e]),{...e,toast:sE,dismiss:o=>Li({type:"DISMISS_TOAST",toastId:o})}}var Jn=hy();const Ey=py(Jn);function Ee(e,n,{checkForDefaultPrevented:o=!0}={}){return function(a){if(e==null||e(a),o===!1||!a.defaultPrevented)return n==null?void 0:n(a)}}function ev(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function Jf(...e){return n=>{let o=!1;const s=e.map(a=>{const l=ev(a,n);return!o&&typeof l=="function"&&(o=!0),l});if(o)return()=>{for(let a=0;a<s.length;a++){const l=s[a];typeof l=="function"?l():ev(e[a],null)}}}}function Ie(...e){return g.useCallback(Jf(...e),e)}function aE(e,n){const o=g.createContext(n),s=l=>{const{children:f,...d}=l,h=g.useMemo(()=>d,Object.values(d));return c.jsx(o.Provider,{value:h,children:f})};s.displayName=e+"Provider";function a(l){const f=g.useContext(o);if(f)return f;if(n!==void 0)return n;throw new Error(`\`${l}\` must be used within \`${e}\``)}return[s,a]}function nr(e,n=[]){let o=[];function s(l,f){const d=g.createContext(f),h=o.length;o=[...o,f];const v=m=>{var C;const{scope:b,children:E,...T}=m,w=((C=b==null?void 0:b[e])==null?void 0:C[h])||d,S=g.useMemo(()=>T,Object.values(T));return c.jsx(w.Provider,{value:S,children:E})};v.displayName=l+"Provider";function x(m,b){var w;const E=((w=b==null?void 0:b[e])==null?void 0:w[h])||d,T=g.useContext(E);if(T)return T;if(f!==void 0)return f;throw new Error(`\`${m}\` must be used within \`${l}\``)}return[v,x]}const a=()=>{const l=o.map(f=>g.createContext(f));return function(d){const h=(d==null?void 0:d[e])||l;return g.useMemo(()=>({[`__scope${e}`]:{...d,[e]:h}}),[d,h])}};return a.scopeName=e,[s,lE(a,...n)]}function lE(...e){const n=e[0];if(e.length===1)return n;const o=()=>{const s=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(l){const f=s.reduce((d,{useScope:h,scopeName:v})=>{const m=h(l)[`__scope${v}`];return{...d,...m}},{});return g.useMemo(()=>({[`__scope${n.scopeName}`]:f}),[f])}};return o.scopeName=n.scopeName,o}function $s(e){const n=cE(e),o=g.forwardRef((s,a)=>{const{children:l,...f}=s,d=g.Children.toArray(l),h=d.find(dE);if(h){const v=h.props.children,x=d.map(m=>m===h?g.Children.count(v)>1?g.Children.only(null):g.isValidElement(v)?v.props.children:null:m);return c.jsx(n,{...f,ref:a,children:g.isValidElement(v)?g.cloneElement(v,void 0,x):null})}return c.jsx(n,{...f,ref:a,children:l})});return o.displayName=`${e}.Slot`,o}function cE(e){const n=g.forwardRef((o,s)=>{const{children:a,...l}=o;if(g.isValidElement(a)){const f=pE(a),d=fE(l,a.props);return a.type!==g.Fragment&&(d.ref=s?Jf(s,f):f),g.cloneElement(a,d)}return g.Children.count(a)>1?g.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var Ny=Symbol("radix.slottable");function uE(e){const n=({children:o})=>c.jsx(c.Fragment,{children:o});return n.displayName=`${e}.Slottable`,n.__radixId=Ny,n}function dE(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ny}function fE(e,n){const o={...n};for(const s in n){const a=e[s],l=n[s];/^on[A-Z]/.test(s)?a&&l?o[s]=(...d)=>{const h=l(...d);return a(...d),h}:a&&(o[s]=a):s==="style"?o[s]={...a,...l}:s==="className"&&(o[s]=[a,l].filter(Boolean).join(" "))}return{...e,...o}}function pE(e){var s,a;let n=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,o=n&&"isReactWarning"in n&&n.isReactWarning;return o?e.ref:(n=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,o=n&&"isReactWarning"in n&&n.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}function Zf(e){const n=e+"CollectionProvider",[o,s]=nr(n),[a,l]=o(n,{collectionRef:{current:null},itemMap:new Map}),f=w=>{const{scope:S,children:C}=w,j=F.useRef(null),N=F.useRef(new Map).current;return c.jsx(a,{scope:S,itemMap:N,collectionRef:j,children:C})};f.displayName=n;const d=e+"CollectionSlot",h=$s(d),v=F.forwardRef((w,S)=>{const{scope:C,children:j}=w,N=l(d,C),k=Ie(S,N.collectionRef);return c.jsx(h,{ref:k,children:j})});v.displayName=d;const x=e+"CollectionItemSlot",m="data-radix-collection-item",b=$s(x),E=F.forwardRef((w,S)=>{const{scope:C,children:j,...N}=w,k=F.useRef(null),P=Ie(S,k),D=l(x,C);return F.useEffect(()=>(D.itemMap.set(k,{ref:k,...N}),()=>void D.itemMap.delete(k))),c.jsx(b,{[m]:"",ref:P,children:j})});E.displayName=x;function T(w){const S=l(e+"CollectionConsumer",w);return F.useCallback(()=>{const j=S.collectionRef.current;if(!j)return[];const N=Array.from(j.querySelectorAll(`[${m}]`));return Array.from(S.itemMap.values()).sort((D,_)=>N.indexOf(D.ref.current)-N.indexOf(_.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:f,Slot:v,ItemSlot:E},T,s]}var hE=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ke=hE.reduce((e,n)=>{const o=$s(`Primitive.${n}`),s=g.forwardRef((a,l)=>{const{asChild:f,...d}=a,h=f?o:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(h,{...d,ref:l})});return s.displayName=`Primitive.${n}`,{...e,[n]:s}},{});function jy(e,n){e&&Jn.flushSync(()=>e.dispatchEvent(n))}function zt(e){const n=g.useRef(e);return g.useEffect(()=>{n.current=e}),g.useMemo(()=>(...o)=>{var s;return(s=n.current)==null?void 0:s.call(n,...o)},[])}function mE(e,n=globalThis==null?void 0:globalThis.document){const o=zt(e);g.useEffect(()=>{const s=a=>{a.key==="Escape"&&o(a)};return n.addEventListener("keydown",s,{capture:!0}),()=>n.removeEventListener("keydown",s,{capture:!0})},[o,n])}var gE="DismissableLayer",xf="dismissableLayer.update",vE="dismissableLayer.pointerDownOutside",yE="dismissableLayer.focusOutside",tv,Ry=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),oa=g.forwardRef((e,n)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:l,onInteractOutside:f,onDismiss:d,...h}=e,v=g.useContext(Ry),[x,m]=g.useState(null),b=(x==null?void 0:x.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,E]=g.useState({}),T=Ie(n,_=>m(_)),w=Array.from(v.layers),[S]=[...v.layersWithOutsidePointerEventsDisabled].slice(-1),C=w.indexOf(S),j=x?w.indexOf(x):-1,N=v.layersWithOutsidePointerEventsDisabled.size>0,k=j>=C,P=wE(_=>{const L=_.target,H=[...v.branches].some(W=>W.contains(L));!k||H||(a==null||a(_),f==null||f(_),_.defaultPrevented||d==null||d())},b),D=bE(_=>{const L=_.target;[...v.branches].some(W=>W.contains(L))||(l==null||l(_),f==null||f(_),_.defaultPrevented||d==null||d())},b);return mE(_=>{j===v.layers.size-1&&(s==null||s(_),!_.defaultPrevented&&d&&(_.preventDefault(),d()))},b),g.useEffect(()=>{if(x)return o&&(v.layersWithOutsidePointerEventsDisabled.size===0&&(tv=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),v.layersWithOutsidePointerEventsDisabled.add(x)),v.layers.add(x),nv(),()=>{o&&v.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=tv)}},[x,b,o,v]),g.useEffect(()=>()=>{x&&(v.layers.delete(x),v.layersWithOutsidePointerEventsDisabled.delete(x),nv())},[x,v]),g.useEffect(()=>{const _=()=>E({});return document.addEventListener(xf,_),()=>document.removeEventListener(xf,_)},[]),c.jsx(ke.div,{...h,ref:T,style:{pointerEvents:N?k?"auto":"none":void 0,...e.style},onFocusCapture:Ee(e.onFocusCapture,D.onFocusCapture),onBlurCapture:Ee(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:Ee(e.onPointerDownCapture,P.onPointerDownCapture)})});oa.displayName=gE;var xE="DismissableLayerBranch",Ty=g.forwardRef((e,n)=>{const o=g.useContext(Ry),s=g.useRef(null),a=Ie(n,s);return g.useEffect(()=>{const l=s.current;if(l)return o.branches.add(l),()=>{o.branches.delete(l)}},[o.branches]),c.jsx(ke.div,{...e,ref:a})});Ty.displayName=xE;function wE(e,n=globalThis==null?void 0:globalThis.document){const o=zt(e),s=g.useRef(!1),a=g.useRef(()=>{});return g.useEffect(()=>{const l=d=>{if(d.target&&!s.current){let h=function(){ky(vE,o,v,{discrete:!0})};const v={originalEvent:d};d.pointerType==="touch"?(n.removeEventListener("click",a.current),a.current=h,n.addEventListener("click",a.current,{once:!0})):h()}else n.removeEventListener("click",a.current);s.current=!1},f=window.setTimeout(()=>{n.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(f),n.removeEventListener("pointerdown",l),n.removeEventListener("click",a.current)}},[n,o]),{onPointerDownCapture:()=>s.current=!0}}function bE(e,n=globalThis==null?void 0:globalThis.document){const o=zt(e),s=g.useRef(!1);return g.useEffect(()=>{const a=l=>{l.target&&!s.current&&ky(yE,o,{originalEvent:l},{discrete:!1})};return n.addEventListener("focusin",a),()=>n.removeEventListener("focusin",a)},[n,o]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function nv(){const e=new CustomEvent(xf);document.dispatchEvent(e)}function ky(e,n,o,{discrete:s}){const a=o.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:o});n&&a.addEventListener(e,n,{once:!0}),s?jy(a,l):a.dispatchEvent(l)}var SE=oa,CE=Ty,_t=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},EE="Portal",sa=g.forwardRef((e,n)=>{var d;const{container:o,...s}=e,[a,l]=g.useState(!1);_t(()=>l(!0),[]);const f=o||a&&((d=globalThis==null?void 0:globalThis.document)==null?void 0:d.body);return f?Ey.createPortal(c.jsx(ke.div,{...s,ref:n}),f):null});sa.displayName=EE;function NE(e,n){return g.useReducer((o,s)=>n[o][s]??o,e)}var Ln=e=>{const{present:n,children:o}=e,s=jE(n),a=typeof o=="function"?o({present:s.isPresent}):g.Children.only(o),l=Ie(s.ref,RE(a));return typeof o=="function"||s.isPresent?g.cloneElement(a,{ref:l}):null};Ln.displayName="Presence";function jE(e){const[n,o]=g.useState(),s=g.useRef(null),a=g.useRef(e),l=g.useRef("none"),f=e?"mounted":"unmounted",[d,h]=NE(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const v=Cl(s.current);l.current=d==="mounted"?v:"none"},[d]),_t(()=>{const v=s.current,x=a.current;if(x!==e){const b=l.current,E=Cl(v);e?h("MOUNT"):E==="none"||(v==null?void 0:v.display)==="none"?h("UNMOUNT"):h(x&&b!==E?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,h]),_t(()=>{if(n){let v;const x=n.ownerDocument.defaultView??window,m=E=>{const w=Cl(s.current).includes(CSS.escape(E.animationName));if(E.target===n&&w&&(h("ANIMATION_END"),!a.current)){const S=n.style.animationFillMode;n.style.animationFillMode="forwards",v=x.setTimeout(()=>{n.style.animationFillMode==="forwards"&&(n.style.animationFillMode=S)})}},b=E=>{E.target===n&&(l.current=Cl(s.current))};return n.addEventListener("animationstart",b),n.addEventListener("animationcancel",m),n.addEventListener("animationend",m),()=>{x.clearTimeout(v),n.removeEventListener("animationstart",b),n.removeEventListener("animationcancel",m),n.removeEventListener("animationend",m)}}else h("ANIMATION_END")},[n,h]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:g.useCallback(v=>{s.current=v?getComputedStyle(v):null,o(v)},[])}}function Cl(e){return(e==null?void 0:e.animationName)||"none"}function RE(e){var s,a;let n=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,o=n&&"isReactWarning"in n&&n.isReactWarning;return o?e.ref:(n=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,o=n&&"isReactWarning"in n&&n.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var TE=Xf[" useInsertionEffect ".trim().toString()]||_t;function bo({prop:e,defaultProp:n,onChange:o=()=>{},caller:s}){const[a,l,f]=kE({defaultProp:n,onChange:o}),d=e!==void 0,h=d?e:a;{const x=g.useRef(e!==void 0);g.useEffect(()=>{const m=x.current;m!==d&&console.warn(`${s} is changing from ${m?"controlled":"uncontrolled"} to ${d?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),x.current=d},[d,s])}const v=g.useCallback(x=>{var m;if(d){const b=PE(x)?x(e):x;b!==e&&((m=f.current)==null||m.call(f,b))}else l(x)},[d,e,l,f]);return[h,v]}function kE({defaultProp:e,onChange:n}){const[o,s]=g.useState(e),a=g.useRef(o),l=g.useRef(n);return TE(()=>{l.current=n},[n]),g.useEffect(()=>{var f;a.current!==o&&((f=l.current)==null||f.call(l,o),a.current=o)},[o,a]),[o,s,l]}function PE(e){return typeof e=="function"}var Py=Object.freeze({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="VisuallyHidden",ep=g.forwardRef((e,n)=>c.jsx(ke.span,{...e,ref:n,style:{...Py,...e.style}}));ep.displayName=_E;var tp="ToastProvider",[np,DE,AE]=Zf("Toast"),[_y]=nr("Toast",[AE]),[OE,yc]=_y(tp),Dy=e=>{const{__scopeToast:n,label:o="Notification",duration:s=5e3,swipeDirection:a="right",swipeThreshold:l=50,children:f}=e,[d,h]=g.useState(null),[v,x]=g.useState(0),m=g.useRef(!1),b=g.useRef(!1);return o.trim()||console.error(`Invalid prop \`label\` supplied to \`${tp}\`. Expected non-empty \`string\`.`),c.jsx(np.Provider,{scope:n,children:c.jsx(OE,{scope:n,label:o,duration:s,swipeDirection:a,swipeThreshold:l,toastCount:v,viewport:d,onViewportChange:h,onToastAdd:g.useCallback(()=>x(E=>E+1),[]),onToastRemove:g.useCallback(()=>x(E=>E-1),[]),isFocusedToastEscapeKeyDownRef:m,isClosePausedRef:b,children:f})})};Dy.displayName=tp;var Ay="ToastViewport",ME=["F8"],wf="toast.viewportPause",bf="toast.viewportResume",Oy=g.forwardRef((e,n)=>{const{__scopeToast:o,hotkey:s=ME,label:a="Notifications ({hotkey})",...l}=e,f=yc(Ay,o),d=DE(o),h=g.useRef(null),v=g.useRef(null),x=g.useRef(null),m=g.useRef(null),b=Ie(n,m,f.onViewportChange),E=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),T=f.toastCount>0;g.useEffect(()=>{const S=C=>{var N;s.length!==0&&s.every(k=>C[k]||C.code===k)&&((N=m.current)==null||N.focus())};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[s]),g.useEffect(()=>{const S=h.current,C=m.current;if(T&&S&&C){const j=()=>{if(!f.isClosePausedRef.current){const D=new CustomEvent(wf);C.dispatchEvent(D),f.isClosePausedRef.current=!0}},N=()=>{if(f.isClosePausedRef.current){const D=new CustomEvent(bf);C.dispatchEvent(D),f.isClosePausedRef.current=!1}},k=D=>{!S.contains(D.relatedTarget)&&N()},P=()=>{S.contains(document.activeElement)||N()};return S.addEventListener("focusin",j),S.addEventListener("focusout",k),S.addEventListener("pointermove",j),S.addEventListener("pointerleave",P),window.addEventListener("blur",j),window.addEventListener("focus",N),()=>{S.removeEventListener("focusin",j),S.removeEventListener("focusout",k),S.removeEventListener("pointermove",j),S.removeEventListener("pointerleave",P),window.removeEventListener("blur",j),window.removeEventListener("focus",N)}}},[T,f.isClosePausedRef]);const w=g.useCallback(({tabbingDirection:S})=>{const j=d().map(N=>{const k=N.ref.current,P=[k,...GE(k)];return S==="forwards"?P:P.reverse()});return(S==="forwards"?j.reverse():j).flat()},[d]);return g.useEffect(()=>{const S=m.current;if(S){const C=j=>{var P,D,_;const N=j.altKey||j.ctrlKey||j.metaKey;if(j.key==="Tab"&&!N){const L=document.activeElement,H=j.shiftKey;if(j.target===S&&H){(P=v.current)==null||P.focus();return}const ee=w({tabbingDirection:H?"backwards":"forwards"}),Y=ee.findIndex(X=>X===L);zd(ee.slice(Y+1))?j.preventDefault():H?(D=v.current)==null||D.focus():(_=x.current)==null||_.focus()}};return S.addEventListener("keydown",C),()=>S.removeEventListener("keydown",C)}},[d,w]),c.jsxs(CE,{ref:h,role:"region","aria-label":a.replace("{hotkey}",E),tabIndex:-1,style:{pointerEvents:T?void 0:"none"},children:[T&&c.jsx(Sf,{ref:v,onFocusFromOutsideViewport:()=>{const S=w({tabbingDirection:"forwards"});zd(S)}}),c.jsx(np.Slot,{scope:o,children:c.jsx(ke.ol,{tabIndex:-1,...l,ref:b})}),T&&c.jsx(Sf,{ref:x,onFocusFromOutsideViewport:()=>{const S=w({tabbingDirection:"backwards"});zd(S)}})]})});Oy.displayName=Ay;var My="ToastFocusProxy",Sf=g.forwardRef((e,n)=>{const{__scopeToast:o,onFocusFromOutsideViewport:s,...a}=e,l=yc(My,o);return c.jsx(ep,{tabIndex:0,...a,ref:n,style:{position:"fixed"},onFocus:f=>{var v;const d=f.relatedTarget;!((v=l.viewport)!=null&&v.contains(d))&&s()}})});Sf.displayName=My;var ia="Toast",IE="toast.swipeStart",LE="toast.swipeMove",FE="toast.swipeCancel",$E="toast.swipeEnd",Iy=g.forwardRef((e,n)=>{const{forceMount:o,open:s,defaultOpen:a,onOpenChange:l,...f}=e,[d,h]=bo({prop:s,defaultProp:a??!0,onChange:l,caller:ia});return c.jsx(Ln,{present:o||d,children:c.jsx(UE,{open:d,...f,ref:n,onClose:()=>h(!1),onPause:zt(e.onPause),onResume:zt(e.onResume),onSwipeStart:Ee(e.onSwipeStart,v=>{v.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Ee(e.onSwipeMove,v=>{const{x,y:m}=v.detail.delta;v.currentTarget.setAttribute("data-swipe","move"),v.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${x}px`),v.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${m}px`)}),onSwipeCancel:Ee(e.onSwipeCancel,v=>{v.currentTarget.setAttribute("data-swipe","cancel"),v.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),v.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),v.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),v.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Ee(e.onSwipeEnd,v=>{const{x,y:m}=v.detail.delta;v.currentTarget.setAttribute("data-swipe","end"),v.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),v.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),v.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${x}px`),v.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${m}px`),h(!1)})})})});Iy.displayName=ia;var[zE,BE]=_y(ia,{onClose(){}}),UE=g.forwardRef((e,n)=>{const{__scopeToast:o,type:s="foreground",duration:a,open:l,onClose:f,onEscapeKeyDown:d,onPause:h,onResume:v,onSwipeStart:x,onSwipeMove:m,onSwipeCancel:b,onSwipeEnd:E,...T}=e,w=yc(ia,o),[S,C]=g.useState(null),j=Ie(n,X=>C(X)),N=g.useRef(null),k=g.useRef(null),P=a||w.duration,D=g.useRef(0),_=g.useRef(P),L=g.useRef(0),{onToastAdd:H,onToastRemove:W}=w,U=zt(()=>{var le;(S==null?void 0:S.contains(document.activeElement))&&((le=w.viewport)==null||le.focus()),f()}),ee=g.useCallback(X=>{!X||X===1/0||(window.clearTimeout(L.current),D.current=new Date().getTime(),L.current=window.setTimeout(U,X))},[U]);g.useEffect(()=>{const X=w.viewport;if(X){const le=()=>{ee(_.current),v==null||v()},Z=()=>{const q=new Date().getTime()-D.current;_.current=_.current-q,window.clearTimeout(L.current),h==null||h()};return X.addEventListener(wf,Z),X.addEventListener(bf,le),()=>{X.removeEventListener(wf,Z),X.removeEventListener(bf,le)}}},[w.viewport,P,h,v,ee]),g.useEffect(()=>{l&&!w.isClosePausedRef.current&&ee(P)},[l,P,w.isClosePausedRef,ee]),g.useEffect(()=>(H(),()=>W()),[H,W]);const Y=g.useMemo(()=>S?Hy(S):null,[S]);return w.viewport?c.jsxs(c.Fragment,{children:[Y&&c.jsx(HE,{__scopeToast:o,role:"status","aria-live":s==="foreground"?"assertive":"polite",children:Y}),c.jsx(zE,{scope:o,onClose:U,children:Jn.createPortal(c.jsx(np.ItemSlot,{scope:o,children:c.jsx(SE,{asChild:!0,onEscapeKeyDown:Ee(d,()=>{w.isFocusedToastEscapeKeyDownRef.current||U(),w.isFocusedToastEscapeKeyDownRef.current=!1}),children:c.jsx(ke.li,{tabIndex:0,"data-state":l?"open":"closed","data-swipe-direction":w.swipeDirection,...T,ref:j,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Ee(e.onKeyDown,X=>{X.key==="Escape"&&(d==null||d(X.nativeEvent),X.nativeEvent.defaultPrevented||(w.isFocusedToastEscapeKeyDownRef.current=!0,U()))}),onPointerDown:Ee(e.onPointerDown,X=>{X.button===0&&(N.current={x:X.clientX,y:X.clientY})}),onPointerMove:Ee(e.onPointerMove,X=>{if(!N.current)return;const le=X.clientX-N.current.x,Z=X.clientY-N.current.y,q=!!k.current,z=["left","right"].includes(w.swipeDirection),J=["left","up"].includes(w.swipeDirection)?Math.min:Math.max,te=z?J(0,le):0,O=z?0:J(0,Z),K=X.pointerType==="touch"?10:2,ne={x:te,y:O},G={originalEvent:X,delta:ne};q?(k.current=ne,El(LE,m,G,{discrete:!1})):rv(ne,w.swipeDirection,K)?(k.current=ne,El(IE,x,G,{discrete:!1}),X.target.setPointerCapture(X.pointerId)):(Math.abs(le)>K||Math.abs(Z)>K)&&(N.current=null)}),onPointerUp:Ee(e.onPointerUp,X=>{const le=k.current,Z=X.target;if(Z.hasPointerCapture(X.pointerId)&&Z.releasePointerCapture(X.pointerId),k.current=null,N.current=null,le){const q=X.currentTarget,z={originalEvent:X,delta:le};rv(le,w.swipeDirection,w.swipeThreshold)?El($E,E,z,{discrete:!0}):El(FE,b,z,{discrete:!0}),q.addEventListener("click",J=>J.preventDefault(),{once:!0})}})})})}),w.viewport)})]}):null}),HE=e=>{const{__scopeToast:n,children:o,...s}=e,a=yc(ia,n),[l,f]=g.useState(!1),[d,h]=g.useState(!1);return KE(()=>f(!0)),g.useEffect(()=>{const v=window.setTimeout(()=>h(!0),1e3);return()=>window.clearTimeout(v)},[]),d?null:c.jsx(sa,{asChild:!0,children:c.jsx(ep,{...s,children:l&&c.jsxs(c.Fragment,{children:[a.label," ",o]})})})},VE="ToastTitle",Ly=g.forwardRef((e,n)=>{const{__scopeToast:o,...s}=e;return c.jsx(ke.div,{...s,ref:n})});Ly.displayName=VE;var WE="ToastDescription",Fy=g.forwardRef((e,n)=>{const{__scopeToast:o,...s}=e;return c.jsx(ke.div,{...s,ref:n})});Fy.displayName=WE;var $y="ToastAction",zy=g.forwardRef((e,n)=>{const{altText:o,...s}=e;return o.trim()?c.jsx(Uy,{altText:o,asChild:!0,children:c.jsx(rp,{...s,ref:n})}):(console.error(`Invalid prop \`altText\` supplied to \`${$y}\`. Expected non-empty \`string\`.`),null)});zy.displayName=$y;var By="ToastClose",rp=g.forwardRef((e,n)=>{const{__scopeToast:o,...s}=e,a=BE(By,o);return c.jsx(Uy,{asChild:!0,children:c.jsx(ke.button,{type:"button",...s,ref:n,onClick:Ee(e.onClick,a.onClose)})})});rp.displayName=By;var Uy=g.forwardRef((e,n)=>{const{__scopeToast:o,altText:s,...a}=e;return c.jsx(ke.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":s||void 0,...a,ref:n})});function Hy(e){const n=[];return Array.from(e.childNodes).forEach(s=>{if(s.nodeType===s.TEXT_NODE&&s.textContent&&n.push(s.textContent),YE(s)){const a=s.ariaHidden||s.hidden||s.style.display==="none",l=s.dataset.radixToastAnnounceExclude==="";if(!a)if(l){const f=s.dataset.radixToastAnnounceAlt;f&&n.push(f)}else n.push(...Hy(s))}}),n}function El(e,n,o,{discrete:s}){const a=o.originalEvent.currentTarget,l=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:o});n&&a.addEventListener(e,n,{once:!0}),s?jy(a,l):a.dispatchEvent(l)}var rv=(e,n,o=0)=>{const s=Math.abs(e.x),a=Math.abs(e.y),l=s>a;return n==="left"||n==="right"?l&&s>o:!l&&a>o};function KE(e=()=>{}){const n=zt(e);_t(()=>{let o=0,s=0;return o=window.requestAnimationFrame(()=>s=window.requestAnimationFrame(n)),()=>{window.cancelAnimationFrame(o),window.cancelAnimationFrame(s)}},[n])}function YE(e){return e.nodeType===e.ELEMENT_NODE}function GE(e){const n=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const a=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||a?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)n.push(o.currentNode);return n}function zd(e){const n=document.activeElement;return e.some(o=>o===n?!0:(o.focus(),document.activeElement!==n))}var XE=Dy,Vy=Oy,Wy=Iy,Ky=Ly,Yy=Fy,Gy=zy,Xy=rp;function qy(e){var n,o,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(n=0;n<a;n++)e[n]&&(o=qy(e[n]))&&(s&&(s+=" "),s+=o)}else for(o in e)e[o]&&(s&&(s+=" "),s+=o);return s}function Qy(){for(var e,n,o=0,s="",a=arguments.length;o<a;o++)(e=arguments[o])&&(n=qy(e))&&(s&&(s+=" "),s+=n);return s}const ov=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,sv=Qy,xc=(e,n)=>o=>{var s;if((n==null?void 0:n.variants)==null)return sv(e,o==null?void 0:o.class,o==null?void 0:o.className);const{variants:a,defaultVariants:l}=n,f=Object.keys(a).map(v=>{const x=o==null?void 0:o[v],m=l==null?void 0:l[v];if(x===null)return null;const b=ov(x)||ov(m);return a[v][b]}),d=o&&Object.entries(o).reduce((v,x)=>{let[m,b]=x;return b===void 0||(v[m]=b),v},{}),h=n==null||(s=n.compoundVariants)===null||s===void 0?void 0:s.reduce((v,x)=>{let{class:m,className:b,...E}=x;return Object.entries(E).every(T=>{let[w,S]=T;return Array.isArray(S)?S.includes({...l,...d}[w]):{...l,...d}[w]===S})?[...v,m,b]:v},[]);return sv(e,f,h,o==null?void 0:o.class,o==null?void 0:o.className)},op="-",qE=e=>{const n=JE(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:f=>{const d=f.split(op);return d[0]===""&&d.length!==1&&d.shift(),Jy(d,n)||QE(f)},getConflictingClassGroupIds:(f,d)=>{const h=o[f]||[];return d&&s[f]?[...h,...s[f]]:h}}},Jy=(e,n)=>{var f;if(e.length===0)return n.classGroupId;const o=e[0],s=n.nextPart.get(o),a=s?Jy(e.slice(1),s):void 0;if(a)return a;if(n.validators.length===0)return;const l=e.join(op);return(f=n.validators.find(({validator:d})=>d(l)))==null?void 0:f.classGroupId},iv=/^\[(.+)\]$/,QE=e=>{if(iv.test(e)){const n=iv.exec(e)[1],o=n==null?void 0:n.substring(0,n.indexOf(":"));if(o)return"arbitrary.."+o}},JE=e=>{const{theme:n,prefix:o}=e,s={nextPart:new Map,validators:[]};return eN(Object.entries(e.classGroups),o).forEach(([l,f])=>{Cf(f,s,l,n)}),s},Cf=(e,n,o,s)=>{e.forEach(a=>{if(typeof a=="string"){const l=a===""?n:av(n,a);l.classGroupId=o;return}if(typeof a=="function"){if(ZE(a)){Cf(a(s),n,o,s);return}n.validators.push({validator:a,classGroupId:o});return}Object.entries(a).forEach(([l,f])=>{Cf(f,av(n,l),o,s)})})},av=(e,n)=>{let o=e;return n.split(op).forEach(s=>{o.nextPart.has(s)||o.nextPart.set(s,{nextPart:new Map,validators:[]}),o=o.nextPart.get(s)}),o},ZE=e=>e.isThemeGetter,eN=(e,n)=>n?e.map(([o,s])=>{const a=s.map(l=>typeof l=="string"?n+l:typeof l=="object"?Object.fromEntries(Object.entries(l).map(([f,d])=>[n+f,d])):l);return[o,a]}):e,tN=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,o=new Map,s=new Map;const a=(l,f)=>{o.set(l,f),n++,n>e&&(n=0,s=o,o=new Map)};return{get(l){let f=o.get(l);if(f!==void 0)return f;if((f=s.get(l))!==void 0)return a(l,f),f},set(l,f){o.has(l)?o.set(l,f):a(l,f)}}},Zy="!",nN=e=>{const{separator:n,experimentalParseClassName:o}=e,s=n.length===1,a=n[0],l=n.length,f=d=>{const h=[];let v=0,x=0,m;for(let S=0;S<d.length;S++){let C=d[S];if(v===0){if(C===a&&(s||d.slice(S,S+l)===n)){h.push(d.slice(x,S)),x=S+l;continue}if(C==="/"){m=S;continue}}C==="["?v++:C==="]"&&v--}const b=h.length===0?d:d.substring(x),E=b.startsWith(Zy),T=E?b.substring(1):b,w=m&&m>x?m-x:void 0;return{modifiers:h,hasImportantModifier:E,baseClassName:T,maybePostfixModifierPosition:w}};return o?d=>o({className:d,parseClassName:f}):f},rN=e=>{if(e.length<=1)return e;const n=[];let o=[];return e.forEach(s=>{s[0]==="["?(n.push(...o.sort(),s),o=[]):o.push(s)}),n.push(...o.sort()),n},oN=e=>({cache:tN(e.cacheSize),parseClassName:nN(e),...qE(e)}),sN=/\s+/,iN=(e,n)=>{const{parseClassName:o,getClassGroupId:s,getConflictingClassGroupIds:a}=n,l=[],f=e.trim().split(sN);let d="";for(let h=f.length-1;h>=0;h-=1){const v=f[h],{modifiers:x,hasImportantModifier:m,baseClassName:b,maybePostfixModifierPosition:E}=o(v);let T=!!E,w=s(T?b.substring(0,E):b);if(!w){if(!T){d=v+(d.length>0?" "+d:d);continue}if(w=s(b),!w){d=v+(d.length>0?" "+d:d);continue}T=!1}const S=rN(x).join(":"),C=m?S+Zy:S,j=C+w;if(l.includes(j))continue;l.push(j);const N=a(w,T);for(let k=0;k<N.length;++k){const P=N[k];l.push(C+P)}d=v+(d.length>0?" "+d:d)}return d};function aN(){let e=0,n,o,s="";for(;e<arguments.length;)(n=arguments[e++])&&(o=ex(n))&&(s&&(s+=" "),s+=o);return s}const ex=e=>{if(typeof e=="string")return e;let n,o="";for(let s=0;s<e.length;s++)e[s]&&(n=ex(e[s]))&&(o&&(o+=" "),o+=n);return o};function lN(e,...n){let o,s,a,l=f;function f(h){const v=n.reduce((x,m)=>m(x),e());return o=oN(v),s=o.cache.get,a=o.cache.set,l=d,d(h)}function d(h){const v=s(h);if(v)return v;const x=iN(h,o);return a(h,x),x}return function(){return l(aN.apply(null,arguments))}}const st=e=>{const n=o=>o[e]||[];return n.isThemeGetter=!0,n},tx=/^\[(?:([a-z-]+):)?(.+)\]$/i,cN=/^\d+\/\d+$/,uN=new Set(["px","full","screen"]),dN=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,fN=/\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$/,pN=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,hN=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,mN=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Mr=e=>Ns(e)||uN.has(e)||cN.test(e),lo=e=>Hs(e,"length",CN),Ns=e=>!!e&&!Number.isNaN(Number(e)),Bd=e=>Hs(e,"number",Ns),Di=e=>!!e&&Number.isInteger(Number(e)),gN=e=>e.endsWith("%")&&Ns(e.slice(0,-1)),$e=e=>tx.test(e),co=e=>dN.test(e),vN=new Set(["length","size","percentage"]),yN=e=>Hs(e,vN,nx),xN=e=>Hs(e,"position",nx),wN=new Set(["image","url"]),bN=e=>Hs(e,wN,NN),SN=e=>Hs(e,"",EN),Ai=()=>!0,Hs=(e,n,o)=>{const s=tx.exec(e);return s?s[1]?typeof n=="string"?s[1]===n:n.has(s[1]):o(s[2]):!1},CN=e=>fN.test(e)&&!pN.test(e),nx=()=>!1,EN=e=>hN.test(e),NN=e=>mN.test(e),jN=()=>{const e=st("colors"),n=st("spacing"),o=st("blur"),s=st("brightness"),a=st("borderColor"),l=st("borderRadius"),f=st("borderSpacing"),d=st("borderWidth"),h=st("contrast"),v=st("grayscale"),x=st("hueRotate"),m=st("invert"),b=st("gap"),E=st("gradientColorStops"),T=st("gradientColorStopPositions"),w=st("inset"),S=st("margin"),C=st("opacity"),j=st("padding"),N=st("saturate"),k=st("scale"),P=st("sepia"),D=st("skew"),_=st("space"),L=st("translate"),H=()=>["auto","contain","none"],W=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto",$e,n],ee=()=>[$e,n],Y=()=>["",Mr,lo],X=()=>["auto",Ns,$e],le=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Z=()=>["solid","dashed","dotted","double","none"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>["start","end","center","between","around","evenly","stretch"],J=()=>["","0",$e],te=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>[Ns,$e];return{cacheSize:500,separator:":",theme:{colors:[Ai],spacing:[Mr,lo],blur:["none","",co,$e],brightness:O(),borderColor:[e],borderRadius:["none","","full",co,$e],borderSpacing:ee(),borderWidth:Y(),contrast:O(),grayscale:J(),hueRotate:O(),invert:J(),gap:ee(),gradientColorStops:[e],gradientColorStopPositions:[gN,lo],inset:U(),margin:U(),opacity:O(),padding:ee(),saturate:O(),scale:O(),sepia:J(),skew:O(),space:ee(),translate:ee()},classGroups:{aspect:[{aspect:["auto","square","video",$e]}],container:["container"],columns:[{columns:[co]}],"break-after":[{"break-after":te()}],"break-before":[{"break-before":te()}],"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:[...le(),$e]}],overflow:[{overflow:W()}],"overflow-x":[{"overflow-x":W()}],"overflow-y":[{"overflow-y":W()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[w]}],"inset-x":[{"inset-x":[w]}],"inset-y":[{"inset-y":[w]}],start:[{start:[w]}],end:[{end:[w]}],top:[{top:[w]}],right:[{right:[w]}],bottom:[{bottom:[w]}],left:[{left:[w]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Di,$e]}],basis:[{basis:U()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",$e]}],grow:[{grow:J()}],shrink:[{shrink:J()}],order:[{order:["first","last","none",Di,$e]}],"grid-cols":[{"grid-cols":[Ai]}],"col-start-end":[{col:["auto",{span:["full",Di,$e]},$e]}],"col-start":[{"col-start":X()}],"col-end":[{"col-end":X()}],"grid-rows":[{"grid-rows":[Ai]}],"row-start-end":[{row:["auto",{span:[Di,$e]},$e]}],"row-start":[{"row-start":X()}],"row-end":[{"row-end":X()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",$e]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",$e]}],gap:[{gap:[b]}],"gap-x":[{"gap-x":[b]}],"gap-y":[{"gap-y":[b]}],"justify-content":[{justify:["normal",...z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[j]}],px:[{px:[j]}],py:[{py:[j]}],ps:[{ps:[j]}],pe:[{pe:[j]}],pt:[{pt:[j]}],pr:[{pr:[j]}],pb:[{pb:[j]}],pl:[{pl:[j]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"space-x":[{"space-x":[_]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[_]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",$e,n]}],"min-w":[{"min-w":[$e,n,"min","max","fit"]}],"max-w":[{"max-w":[$e,n,"none","full","min","max","fit","prose",{screen:[co]},co]}],h:[{h:[$e,n,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[$e,n,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[$e,n,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[$e,n,"auto","min","max","fit"]}],"font-size":[{text:["base",co,lo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Bd]}],"font-family":[{font:[Ai]}],"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-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",$e]}],"line-clamp":[{"line-clamp":["none",Ns,Bd]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Mr,$e]}],"list-image":[{"list-image":["none",$e]}],"list-style-type":[{list:["none","disc","decimal",$e]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[C]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[C]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Z(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Mr,lo]}],"underline-offset":[{"underline-offset":["auto",Mr,$e]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:ee()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",$e]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",$e]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[C]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...le(),xN]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",yN]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},bN]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[T]}],"gradient-via-pos":[{via:[T]}],"gradient-to-pos":[{to:[T]}],"gradient-from":[{from:[E]}],"gradient-via":[{via:[E]}],"gradient-to":[{to:[E]}],rounded:[{rounded:[l]}],"rounded-s":[{"rounded-s":[l]}],"rounded-e":[{"rounded-e":[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-ss":[{"rounded-ss":[l]}],"rounded-se":[{"rounded-se":[l]}],"rounded-ee":[{"rounded-ee":[l]}],"rounded-es":[{"rounded-es":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"border-w":[{border:[d]}],"border-w-x":[{"border-x":[d]}],"border-w-y":[{"border-y":[d]}],"border-w-s":[{"border-s":[d]}],"border-w-e":[{"border-e":[d]}],"border-w-t":[{"border-t":[d]}],"border-w-r":[{"border-r":[d]}],"border-w-b":[{"border-b":[d]}],"border-w-l":[{"border-l":[d]}],"border-opacity":[{"border-opacity":[C]}],"border-style":[{border:[...Z(),"hidden"]}],"divide-x":[{"divide-x":[d]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[d]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[C]}],"divide-style":[{divide:Z()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...Z()]}],"outline-offset":[{"outline-offset":[Mr,$e]}],"outline-w":[{outline:[Mr,lo]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[C]}],"ring-offset-w":[{"ring-offset":[Mr,lo]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",co,SN]}],"shadow-color":[{shadow:[Ai]}],opacity:[{opacity:[C]}],"mix-blend":[{"mix-blend":[...q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":q()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[s]}],contrast:[{contrast:[h]}],"drop-shadow":[{"drop-shadow":["","none",co,$e]}],grayscale:[{grayscale:[v]}],"hue-rotate":[{"hue-rotate":[x]}],invert:[{invert:[m]}],saturate:[{saturate:[N]}],sepia:[{sepia:[P]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[s]}],"backdrop-contrast":[{"backdrop-contrast":[h]}],"backdrop-grayscale":[{"backdrop-grayscale":[v]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[x]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[C]}],"backdrop-saturate":[{"backdrop-saturate":[N]}],"backdrop-sepia":[{"backdrop-sepia":[P]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[f]}],"border-spacing-x":[{"border-spacing-x":[f]}],"border-spacing-y":[{"border-spacing-y":[f]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",$e]}],duration:[{duration:O()}],ease:[{ease:["linear","in","out","in-out",$e]}],delay:[{delay:O()}],animate:[{animate:["none","spin","ping","pulse","bounce",$e]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[k]}],"scale-x":[{"scale-x":[k]}],"scale-y":[{"scale-y":[k]}],rotate:[{rotate:[Di,$e]}],"translate-x":[{"translate-x":[L]}],"translate-y":[{"translate-y":[L]}],"skew-x":[{"skew-x":[D]}],"skew-y":[{"skew-y":[D]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",$e]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",$e]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":ee()}],"scroll-mx":[{"scroll-mx":ee()}],"scroll-my":[{"scroll-my":ee()}],"scroll-ms":[{"scroll-ms":ee()}],"scroll-me":[{"scroll-me":ee()}],"scroll-mt":[{"scroll-mt":ee()}],"scroll-mr":[{"scroll-mr":ee()}],"scroll-mb":[{"scroll-mb":ee()}],"scroll-ml":[{"scroll-ml":ee()}],"scroll-p":[{"scroll-p":ee()}],"scroll-px":[{"scroll-px":ee()}],"scroll-py":[{"scroll-py":ee()}],"scroll-ps":[{"scroll-ps":ee()}],"scroll-pe":[{"scroll-pe":ee()}],"scroll-pt":[{"scroll-pt":ee()}],"scroll-pr":[{"scroll-pr":ee()}],"scroll-pb":[{"scroll-pb":ee()}],"scroll-pl":[{"scroll-pl":ee()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",$e]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Mr,lo,Bd]}],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-s","border-color-e","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"]}}},RN=lN(jN);function je(...e){return RN(Qy(e))}const TN=XE,rx=g.forwardRef(({className:e,...n},o)=>c.jsx(Vy,{ref:o,className:je("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),...n}));rx.displayName=Vy.displayName;const kN=xc("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 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"}}),ox=g.forwardRef(({className:e,variant:n,...o},s)=>c.jsx(Wy,{ref:s,className:je(kN({variant:n}),e),...o}));ox.displayName=Wy.displayName;const PN=g.forwardRef(({className:e,...n},o)=>c.jsx(Gy,{ref:o,className:je("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring 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),...n}));PN.displayName=Gy.displayName;const sx=g.forwardRef(({className:e,...n},o)=>c.jsx(Xy,{ref:o,className:je("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 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":"",...n,children:c.jsx(ra,{className:"h-4 w-4"})}));sx.displayName=Xy.displayName;const ix=g.forwardRef(({className:e,...n},o)=>c.jsx(Ky,{ref:o,className:je("text-sm font-semibold [&+div]:text-xs",e),...n}));ix.displayName=Ky.displayName;const ax=g.forwardRef(({className:e,...n},o)=>c.jsx(Yy,{ref:o,className:je("text-sm opacity-90",e),...n}));ax.displayName=Yy.displayName;function _N(){const{toasts:e}=iE();return c.jsxs(TN,{children:[e.map(function({id:n,title:o,description:s,action:a,...l}){return c.jsxs(ox,{...l,children:[c.jsxs("div",{className:"grid gap-1",children:[o&&c.jsx(ix,{children:o}),s&&c.jsx(ax,{children:s})]}),a,c.jsx(sx,{})]},n)}),c.jsx(rx,{})]})}function DN(e){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}const AN=e=>{switch(e){case"success":return IN;case"info":return FN;case"warning":return LN;case"error":return $N;default:return null}},ON=Array(12).fill(0),MN=({visible:e,className:n})=>F.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":e},F.createElement("div",{className:"sonner-spinner"},ON.map((o,s)=>F.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${s}`})))),IN=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),LN=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),FN=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),$N=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),zN=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},F.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),F.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),BN=()=>{const[e,n]=F.useState(document.hidden);return F.useEffect(()=>{const o=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",o),()=>window.removeEventListener("visibilitychange",o)},[]),e};let Ef=1;class UN{constructor(){this.subscribe=n=>(this.subscribers.push(n),()=>{const o=this.subscribers.indexOf(n);this.subscribers.splice(o,1)}),this.publish=n=>{this.subscribers.forEach(o=>o(n))},this.addToast=n=>{this.publish(n),this.toasts=[...this.toasts,n]},this.create=n=>{var o;const{message:s,...a}=n,l=typeof(n==null?void 0:n.id)=="number"||((o=n.id)==null?void 0:o.length)>0?n.id:Ef++,f=this.toasts.find(h=>h.id===l),d=n.dismissible===void 0?!0:n.dismissible;return this.dismissedToasts.has(l)&&this.dismissedToasts.delete(l),f?this.toasts=this.toasts.map(h=>h.id===l?(this.publish({...h,...n,id:l,title:s}),{...h,...n,id:l,dismissible:d,title:s}):h):this.addToast({title:s,...a,dismissible:d,id:l}),l},this.dismiss=n=>(n?(this.dismissedToasts.add(n),requestAnimationFrame(()=>this.subscribers.forEach(o=>o({id:n,dismiss:!0})))):this.toasts.forEach(o=>{this.subscribers.forEach(s=>s({id:o.id,dismiss:!0}))}),n),this.message=(n,o)=>this.create({...o,message:n}),this.error=(n,o)=>this.create({...o,message:n,type:"error"}),this.success=(n,o)=>this.create({...o,type:"success",message:n}),this.info=(n,o)=>this.create({...o,type:"info",message:n}),this.warning=(n,o)=>this.create({...o,type:"warning",message:n}),this.loading=(n,o)=>this.create({...o,type:"loading",message:n}),this.promise=(n,o)=>{if(!o)return;let s;o.loading!==void 0&&(s=this.create({...o,promise:n,type:"loading",message:o.loading,description:typeof o.description!="function"?o.description:void 0}));const a=Promise.resolve(n instanceof Function?n():n);let l=s!==void 0,f;const d=a.then(async v=>{if(f=["resolve",v],F.isValidElement(v))l=!1,this.create({id:s,type:"default",message:v});else if(VN(v)&&!v.ok){l=!1;const m=typeof o.error=="function"?await o.error(`HTTP error! status: ${v.status}`):o.error,b=typeof o.description=="function"?await o.description(`HTTP error! status: ${v.status}`):o.description,T=typeof m=="object"&&!F.isValidElement(m)?m:{message:m};this.create({id:s,type:"error",description:b,...T})}else if(v instanceof Error){l=!1;const m=typeof o.error=="function"?await o.error(v):o.error,b=typeof o.description=="function"?await o.description(v):o.description,T=typeof m=="object"&&!F.isValidElement(m)?m:{message:m};this.create({id:s,type:"error",description:b,...T})}else if(o.success!==void 0){l=!1;const m=typeof o.success=="function"?await o.success(v):o.success,b=typeof o.description=="function"?await o.description(v):o.description,T=typeof m=="object"&&!F.isValidElement(m)?m:{message:m};this.create({id:s,type:"success",description:b,...T})}}).catch(async v=>{if(f=["reject",v],o.error!==void 0){l=!1;const x=typeof o.error=="function"?await o.error(v):o.error,m=typeof o.description=="function"?await o.description(v):o.description,E=typeof x=="object"&&!F.isValidElement(x)?x:{message:x};this.create({id:s,type:"error",description:m,...E})}}).finally(()=>{l&&(this.dismiss(s),s=void 0),o.finally==null||o.finally.call(o)}),h=()=>new Promise((v,x)=>d.then(()=>f[0]==="reject"?x(f[1]):v(f[1])).catch(x));return typeof s!="string"&&typeof s!="number"?{unwrap:h}:Object.assign(s,{unwrap:h})},this.custom=(n,o)=>{const s=(o==null?void 0:o.id)||Ef++;return this.create({jsx:n(s),id:s,...o}),s},this.getActiveToasts=()=>this.toasts.filter(n=>!this.dismissedToasts.has(n.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const vn=new UN,HN=(e,n)=>{const o=(n==null?void 0:n.id)||Ef++;return vn.addToast({title:e,...n,id:o}),o},VN=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",WN=HN,KN=()=>vn.toasts,YN=()=>vn.getActiveToasts(),Uo=Object.assign(WN,{success:vn.success,info:vn.info,warning:vn.warning,error:vn.error,custom:vn.custom,message:vn.message,promise:vn.promise,dismiss:vn.dismiss,loading:vn.loading},{getHistory:KN,getToasts:YN});DN("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Nl(e){return e.label!==void 0}const GN=3,XN="24px",qN="16px",lv=4e3,QN=356,JN=14,ZN=45,ej=200;function dr(...e){return e.filter(Boolean).join(" ")}function tj(e){const[n,o]=e.split("-"),s=[];return n&&s.push(n),o&&s.push(o),s}const nj=e=>{var n,o,s,a,l,f,d,h,v;const{invert:x,toast:m,unstyled:b,interacting:E,setHeights:T,visibleToasts:w,heights:S,index:C,toasts:j,expanded:N,removeToast:k,defaultRichColors:P,closeButton:D,style:_,cancelButtonStyle:L,actionButtonStyle:H,className:W="",descriptionClassName:U="",duration:ee,position:Y,gap:X,expandByDefault:le,classNames:Z,icons:q,closeButtonAriaLabel:z="Close toast"}=e,[J,te]=F.useState(null),[O,K]=F.useState(null),[ne,G]=F.useState(!1),[de,he]=F.useState(!1),[ae,se]=F.useState(!1),[ye,fe]=F.useState(!1),[Ne,ce]=F.useState(!1),[Oe,pe]=F.useState(0),[Ze,wt]=F.useState(0),gt=F.useRef(m.duration||ee||lv),jn=F.useRef(null),at=F.useRef(null),ut=C===0,Xt=C+1<=w,lt=m.type,Dt=m.dismissible!==!1,Sr=m.className||"",Cr=m.descriptionClassName||"",$n=F.useMemo(()=>S.findIndex(me=>me.toastId===m.id)||0,[S,m.id]),an=F.useMemo(()=>{var me;return(me=m.closeButton)!=null?me:D},[m.closeButton,D]),Nt=F.useMemo(()=>m.duration||ee||lv,[m.duration,ee]),ln=F.useRef(0),At=F.useRef(0),jt=F.useRef(0),Ht=F.useRef(null),[Er,Ur]=Y.split("-"),sr=F.useMemo(()=>S.reduce((me,De,Fe)=>Fe>=$n?me:me+De.height,0),[S,$n]),zn=BN(),Nr=m.invert||x,Rn=lt==="loading";At.current=F.useMemo(()=>$n*X+sr,[$n,sr]),F.useEffect(()=>{gt.current=Nt},[Nt]),F.useEffect(()=>{G(!0)},[]),F.useEffect(()=>{const me=at.current;if(me){const De=me.getBoundingClientRect().height;return wt(De),T(Fe=>[{toastId:m.id,height:De,position:m.position},...Fe]),()=>T(Fe=>Fe.filter(Me=>Me.toastId!==m.id))}},[T,m.id]),F.useLayoutEffect(()=>{if(!ne)return;const me=at.current,De=me.style.height;me.style.height="auto";const Fe=me.getBoundingClientRect().height;me.style.height=De,wt(Fe),T(Me=>Me.find(We=>We.toastId===m.id)?Me.map(We=>We.toastId===m.id?{...We,height:Fe}:We):[{toastId:m.id,height:Fe,position:m.position},...Me])},[ne,m.title,m.description,T,m.id,m.jsx,m.action,m.cancel]);const we=F.useCallback(()=>{he(!0),pe(At.current),T(me=>me.filter(De=>De.toastId!==m.id)),setTimeout(()=>{k(m)},ej)},[m,k,T,At]);F.useEffect(()=>{if(m.promise&<==="loading"||m.duration===1/0||m.type==="loading")return;let me;return N||E||zn?(()=>{if(jt.current<ln.current){const Me=new Date().getTime()-ln.current;gt.current=gt.current-Me}jt.current=new Date().getTime()})():(()=>{gt.current!==1/0&&(ln.current=new Date().getTime(),me=setTimeout(()=>{m.onAutoClose==null||m.onAutoClose.call(m,m),we()},gt.current))})(),()=>clearTimeout(me)},[N,E,m,lt,zn,we]),F.useEffect(()=>{m.delete&&(we(),m.onDismiss==null||m.onDismiss.call(m,m))},[we,m.delete]);function He(){var me;if(q!=null&&q.loading){var De;return F.createElement("div",{className:dr(Z==null?void 0:Z.loader,m==null||(De=m.classNames)==null?void 0:De.loader,"sonner-loader"),"data-visible":lt==="loading"},q.loading)}return F.createElement(MN,{className:dr(Z==null?void 0:Z.loader,m==null||(me=m.classNames)==null?void 0:me.loader),visible:lt==="loading"})}const Ve=m.icon||(q==null?void 0:q[lt])||AN(lt);var Ce,Le;return F.createElement("li",{tabIndex:0,ref:at,className:dr(W,Sr,Z==null?void 0:Z.toast,m==null||(n=m.classNames)==null?void 0:n.toast,Z==null?void 0:Z.default,Z==null?void 0:Z[lt],m==null||(o=m.classNames)==null?void 0:o[lt]),"data-sonner-toast":"","data-rich-colors":(Ce=m.richColors)!=null?Ce:P,"data-styled":!(m.jsx||m.unstyled||b),"data-mounted":ne,"data-promise":!!m.promise,"data-swiped":Ne,"data-removed":de,"data-visible":Xt,"data-y-position":Er,"data-x-position":Ur,"data-index":C,"data-front":ut,"data-swiping":ae,"data-dismissible":Dt,"data-type":lt,"data-invert":Nr,"data-swipe-out":ye,"data-swipe-direction":O,"data-expanded":!!(N||le&&ne),"data-testid":m.testId,style:{"--index":C,"--toasts-before":C,"--z-index":j.length-C,"--offset":`${de?Oe:At.current}px`,"--initial-height":le?"auto":`${Ze}px`,..._,...m.style},onDragEnd:()=>{se(!1),te(null),Ht.current=null},onPointerDown:me=>{me.button!==2&&(Rn||!Dt||(jn.current=new Date,pe(At.current),me.target.setPointerCapture(me.pointerId),me.target.tagName!=="BUTTON"&&(se(!0),Ht.current={x:me.clientX,y:me.clientY})))},onPointerUp:()=>{var me,De,Fe;if(ye||!Dt)return;Ht.current=null;const Me=Number(((me=at.current)==null?void 0:me.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),tt=Number(((De=at.current)==null?void 0:De.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),We=new Date().getTime()-((Fe=jn.current)==null?void 0:Fe.getTime()),Pe=J==="x"?Me:tt,vt=Math.abs(Pe)/We;if(Math.abs(Pe)>=ZN||vt>.11){pe(At.current),m.onDismiss==null||m.onDismiss.call(m,m),K(J==="x"?Me>0?"right":"left":tt>0?"down":"up"),we(),fe(!0);return}else{var qe,dt;(qe=at.current)==null||qe.style.setProperty("--swipe-amount-x","0px"),(dt=at.current)==null||dt.style.setProperty("--swipe-amount-y","0px")}ce(!1),se(!1),te(null)},onPointerMove:me=>{var De,Fe,Me;if(!Ht.current||!Dt||((De=window.getSelection())==null?void 0:De.toString().length)>0)return;const We=me.clientY-Ht.current.y,Pe=me.clientX-Ht.current.x;var vt;const qe=(vt=e.swipeDirections)!=null?vt:tj(Y);!J&&(Math.abs(Pe)>1||Math.abs(We)>1)&&te(Math.abs(Pe)>Math.abs(We)?"x":"y");let dt={x:0,y:0};const cn=Ot=>1/(1.5+Math.abs(Ot)/20);if(J==="y"){if(qe.includes("top")||qe.includes("bottom"))if(qe.includes("top")&&We<0||qe.includes("bottom")&&We>0)dt.y=We;else{const Ot=We*cn(We);dt.y=Math.abs(Ot)<Math.abs(We)?Ot:We}}else if(J==="x"&&(qe.includes("left")||qe.includes("right")))if(qe.includes("left")&&Pe<0||qe.includes("right")&&Pe>0)dt.x=Pe;else{const Ot=Pe*cn(Pe);dt.x=Math.abs(Ot)<Math.abs(Pe)?Ot:Pe}(Math.abs(dt.x)>0||Math.abs(dt.y)>0)&&ce(!0),(Fe=at.current)==null||Fe.style.setProperty("--swipe-amount-x",`${dt.x}px`),(Me=at.current)==null||Me.style.setProperty("--swipe-amount-y",`${dt.y}px`)}},an&&!m.jsx&<!=="loading"?F.createElement("button",{"aria-label":z,"data-disabled":Rn,"data-close-button":!0,onClick:Rn||!Dt?()=>{}:()=>{we(),m.onDismiss==null||m.onDismiss.call(m,m)},className:dr(Z==null?void 0:Z.closeButton,m==null||(s=m.classNames)==null?void 0:s.closeButton)},(Le=q==null?void 0:q.close)!=null?Le:zN):null,(lt||m.icon||m.promise)&&m.icon!==null&&((q==null?void 0:q[lt])!==null||m.icon)?F.createElement("div",{"data-icon":"",className:dr(Z==null?void 0:Z.icon,m==null||(a=m.classNames)==null?void 0:a.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||He():null,m.type!=="loading"?Ve:null):null,F.createElement("div",{"data-content":"",className:dr(Z==null?void 0:Z.content,m==null||(l=m.classNames)==null?void 0:l.content)},F.createElement("div",{"data-title":"",className:dr(Z==null?void 0:Z.title,m==null||(f=m.classNames)==null?void 0:f.title)},m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title),m.description?F.createElement("div",{"data-description":"",className:dr(U,Cr,Z==null?void 0:Z.description,m==null||(d=m.classNames)==null?void 0:d.description)},typeof m.description=="function"?m.description():m.description):null),F.isValidElement(m.cancel)?m.cancel:m.cancel&&Nl(m.cancel)?F.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||L,onClick:me=>{Nl(m.cancel)&&Dt&&(m.cancel.onClick==null||m.cancel.onClick.call(m.cancel,me),we())},className:dr(Z==null?void 0:Z.cancelButton,m==null||(h=m.classNames)==null?void 0:h.cancelButton)},m.cancel.label):null,F.isValidElement(m.action)?m.action:m.action&&Nl(m.action)?F.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||H,onClick:me=>{Nl(m.action)&&(m.action.onClick==null||m.action.onClick.call(m.action,me),!me.defaultPrevented&&we())},className:dr(Z==null?void 0:Z.actionButton,m==null||(v=m.classNames)==null?void 0:v.actionButton)},m.action.label):null)};function cv(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function rj(e,n){const o={};return[e,n].forEach((s,a)=>{const l=a===1,f=l?"--mobile-offset":"--offset",d=l?qN:XN;function h(v){["top","right","bottom","left"].forEach(x=>{o[`${f}-${x}`]=typeof v=="number"?`${v}px`:v})}typeof s=="number"||typeof s=="string"?h(s):typeof s=="object"?["top","right","bottom","left"].forEach(v=>{s[v]===void 0?o[`${f}-${v}`]=d:o[`${f}-${v}`]=typeof s[v]=="number"?`${s[v]}px`:s[v]}):h(d)}),o}const oj=F.forwardRef(function(n,o){const{id:s,invert:a,position:l="bottom-right",hotkey:f=["altKey","KeyT"],expand:d,closeButton:h,className:v,offset:x,mobileOffset:m,theme:b="light",richColors:E,duration:T,style:w,visibleToasts:S=GN,toastOptions:C,dir:j=cv(),gap:N=JN,icons:k,containerAriaLabel:P="Notifications"}=n,[D,_]=F.useState([]),L=F.useMemo(()=>s?D.filter(ne=>ne.toasterId===s):D.filter(ne=>!ne.toasterId),[D,s]),H=F.useMemo(()=>Array.from(new Set([l].concat(L.filter(ne=>ne.position).map(ne=>ne.position)))),[L,l]),[W,U]=F.useState([]),[ee,Y]=F.useState(!1),[X,le]=F.useState(!1),[Z,q]=F.useState(b!=="system"?b:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),z=F.useRef(null),J=f.join("+").replace(/Key/g,"").replace(/Digit/g,""),te=F.useRef(null),O=F.useRef(!1),K=F.useCallback(ne=>{_(G=>{var de;return(de=G.find(he=>he.id===ne.id))!=null&&de.delete||vn.dismiss(ne.id),G.filter(({id:he})=>he!==ne.id)})},[]);return F.useEffect(()=>vn.subscribe(ne=>{if(ne.dismiss){requestAnimationFrame(()=>{_(G=>G.map(de=>de.id===ne.id?{...de,delete:!0}:de))});return}setTimeout(()=>{Ey.flushSync(()=>{_(G=>{const de=G.findIndex(he=>he.id===ne.id);return de!==-1?[...G.slice(0,de),{...G[de],...ne},...G.slice(de+1)]:[ne,...G]})})})}),[D]),F.useEffect(()=>{if(b!=="system"){q(b);return}if(b==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?q("dark"):q("light")),typeof window>"u")return;const ne=window.matchMedia("(prefers-color-scheme: dark)");try{ne.addEventListener("change",({matches:G})=>{q(G?"dark":"light")})}catch{ne.addListener(({matches:de})=>{try{q(de?"dark":"light")}catch(he){console.error(he)}})}},[b]),F.useEffect(()=>{D.length<=1&&Y(!1)},[D]),F.useEffect(()=>{const ne=G=>{var de;if(f.every(se=>G[se]||G.code===se)){var ae;Y(!0),(ae=z.current)==null||ae.focus()}G.code==="Escape"&&(document.activeElement===z.current||(de=z.current)!=null&&de.contains(document.activeElement))&&Y(!1)};return document.addEventListener("keydown",ne),()=>document.removeEventListener("keydown",ne)},[f]),F.useEffect(()=>{if(z.current)return()=>{te.current&&(te.current.focus({preventScroll:!0}),te.current=null,O.current=!1)}},[z.current]),F.createElement("section",{ref:o,"aria-label":`${P} ${J}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},H.map((ne,G)=>{var de;const[he,ae]=ne.split("-");return L.length?F.createElement("ol",{key:ne,dir:j==="auto"?cv():j,tabIndex:-1,ref:z,className:v,"data-sonner-toaster":!0,"data-sonner-theme":Z,"data-y-position":he,"data-x-position":ae,style:{"--front-toast-height":`${((de=W[0])==null?void 0:de.height)||0}px`,"--width":`${QN}px`,"--gap":`${N}px`,...w,...rj(x,m)},onBlur:se=>{O.current&&!se.currentTarget.contains(se.relatedTarget)&&(O.current=!1,te.current&&(te.current.focus({preventScroll:!0}),te.current=null))},onFocus:se=>{se.target instanceof HTMLElement&&se.target.dataset.dismissible==="false"||O.current||(O.current=!0,te.current=se.relatedTarget)},onMouseEnter:()=>Y(!0),onMouseMove:()=>Y(!0),onMouseLeave:()=>{X||Y(!1)},onDragEnd:()=>Y(!1),onPointerDown:se=>{se.target instanceof HTMLElement&&se.target.dataset.dismissible==="false"||le(!0)},onPointerUp:()=>le(!1)},L.filter(se=>!se.position&&G===0||se.position===ne).map((se,ye)=>{var fe,Ne;return F.createElement(nj,{key:se.id,icons:k,index:ye,toast:se,defaultRichColors:E,duration:(fe=C==null?void 0:C.duration)!=null?fe:T,className:C==null?void 0:C.className,descriptionClassName:C==null?void 0:C.descriptionClassName,invert:a,visibleToasts:S,closeButton:(Ne=C==null?void 0:C.closeButton)!=null?Ne:h,interacting:X,position:ne,style:C==null?void 0:C.style,unstyled:C==null?void 0:C.unstyled,classNames:C==null?void 0:C.classNames,cancelButtonStyle:C==null?void 0:C.cancelButtonStyle,actionButtonStyle:C==null?void 0:C.actionButtonStyle,closeButtonAriaLabel:C==null?void 0:C.closeButtonAriaLabel,removeToast:K,toasts:L.filter(ce=>ce.position==se.position),heights:W.filter(ce=>ce.position==se.position),setHeights:U,expandByDefault:d,gap:N,expanded:ee,swipeDirections:n.swipeDirections})})):null}))}),sj=({...e})=>c.jsx(oj,{theme:"light",className:"toaster group",icons:{success:c.jsx(mf,{className:"h-4 w-4"}),info:c.jsx(YC,{className:"h-4 w-4"}),warning:c.jsx(eE,{className:"h-4 w-4"}),error:c.jsx(qC,{className:"h-4 w-4"}),loading:c.jsx(Cy,{className:"h-4 w-4 animate-spin"})},toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e});var ij=Symbol.for("react.lazy"),Hl=Xf[" use ".trim().toString()];function aj(e){return typeof e=="object"&&e!==null&&"then"in e}function lx(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===ij&&"_payload"in e&&aj(e._payload)}function cx(e){const n=cj(e),o=g.forwardRef((s,a)=>{let{children:l,...f}=s;lx(l)&&typeof Hl=="function"&&(l=Hl(l._payload));const d=g.Children.toArray(l),h=d.find(dj);if(h){const v=h.props.children,x=d.map(m=>m===h?g.Children.count(v)>1?g.Children.only(null):g.isValidElement(v)?v.props.children:null:m);return c.jsx(n,{...f,ref:a,children:g.isValidElement(v)?g.cloneElement(v,void 0,x):null})}return c.jsx(n,{...f,ref:a,children:l})});return o.displayName=`${e}.Slot`,o}var lj=cx("Slot");function cj(e){const n=g.forwardRef((o,s)=>{let{children:a,...l}=o;if(lx(a)&&typeof Hl=="function"&&(a=Hl(a._payload)),g.isValidElement(a)){const f=pj(a),d=fj(l,a.props);return a.type!==g.Fragment&&(d.ref=s?Jf(s,f):f),g.cloneElement(a,d)}return g.Children.count(a)>1?g.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var uj=Symbol("radix.slottable");function dj(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===uj}function fj(e,n){const o={...n};for(const s in n){const a=e[s],l=n[s];/^on[A-Z]/.test(s)?a&&l?o[s]=(...d)=>{const h=l(...d);return a(...d),h}:a&&(o[s]=a):s==="style"?o[s]={...a,...l}:s==="className"&&(o[s]=[a,l].filter(Boolean).join(" "))}return{...e,...o}}function pj(e){var s,a;let n=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,o=n&&"isReactWarning"in n&&n.isReactWarning;return o?e.ref:(n=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,o=n&&"isReactWarning"in n&&n.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}const sp=xc("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),mt=g.forwardRef(({className:e,variant:n,size:o,asChild:s=!1,...a},l)=>{const f=s?lj:"button";return c.jsx(f,{className:je(sp({variant:n,size:o,className:e})),ref:l,...a})});mt.displayName="Button";const yn=g.forwardRef(({className:e,type:n,...o},s)=>c.jsx("input",{type:n,className:je("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:s,...o}));yn.displayName="Input";const hj=xc("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Fi({className:e,variant:n,...o}){return c.jsx("div",{className:je(hj({variant:n}),e),...o})}var mj=Xf[" useId ".trim().toString()]||(()=>{}),gj=0;function wo(e){const[n,o]=g.useState(mj());return _t(()=>{o(s=>s??String(gj++))},[e]),n?`radix-${n}`:""}var Ud="focusScope.autoFocusOnMount",Hd="focusScope.autoFocusOnUnmount",uv={bubbles:!1,cancelable:!0},vj="FocusScope",wc=g.forwardRef((e,n)=>{const{loop:o=!1,trapped:s=!1,onMountAutoFocus:a,onUnmountAutoFocus:l,...f}=e,[d,h]=g.useState(null),v=zt(a),x=zt(l),m=g.useRef(null),b=Ie(n,w=>h(w)),E=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(s){let w=function(N){if(E.paused||!d)return;const k=N.target;d.contains(k)?m.current=k:fo(m.current,{select:!0})},S=function(N){if(E.paused||!d)return;const k=N.relatedTarget;k!==null&&(d.contains(k)||fo(m.current,{select:!0}))},C=function(N){if(document.activeElement===document.body)for(const P of N)P.removedNodes.length>0&&fo(d)};document.addEventListener("focusin",w),document.addEventListener("focusout",S);const j=new MutationObserver(C);return d&&j.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",S),j.disconnect()}}},[s,d,E.paused]),g.useEffect(()=>{if(d){fv.add(E);const w=document.activeElement;if(!d.contains(w)){const C=new CustomEvent(Ud,uv);d.addEventListener(Ud,v),d.dispatchEvent(C),C.defaultPrevented||(yj(Cj(ux(d)),{select:!0}),document.activeElement===w&&fo(d))}return()=>{d.removeEventListener(Ud,v),setTimeout(()=>{const C=new CustomEvent(Hd,uv);d.addEventListener(Hd,x),d.dispatchEvent(C),C.defaultPrevented||fo(w??document.body,{select:!0}),d.removeEventListener(Hd,x),fv.remove(E)},0)}}},[d,v,x,E]);const T=g.useCallback(w=>{if(!o&&!s||E.paused)return;const S=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,C=document.activeElement;if(S&&C){const j=w.currentTarget,[N,k]=xj(j);N&&k?!w.shiftKey&&C===k?(w.preventDefault(),o&&fo(N,{select:!0})):w.shiftKey&&C===N&&(w.preventDefault(),o&&fo(k,{select:!0})):C===j&&w.preventDefault()}},[o,s,E.paused]);return c.jsx(ke.div,{tabIndex:-1,...f,ref:b,onKeyDown:T})});wc.displayName=vj;function yj(e,{select:n=!1}={}){const o=document.activeElement;for(const s of e)if(fo(s,{select:n}),document.activeElement!==o)return}function xj(e){const n=ux(e),o=dv(n,e),s=dv(n.reverse(),e);return[o,s]}function ux(e){const n=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const a=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||a?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)n.push(o.currentNode);return n}function dv(e,n){for(const o of e)if(!wj(o,{upTo:n}))return o}function wj(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function bj(e){return e instanceof HTMLInputElement&&"select"in e}function fo(e,{select:n=!1}={}){if(e&&e.focus){const o=document.activeElement;e.focus({preventScroll:!0}),e!==o&&bj(e)&&n&&e.select()}}var fv=Sj();function Sj(){let e=[];return{add(n){const o=e[0];n!==o&&(o==null||o.pause()),e=pv(e,n),e.unshift(n)},remove(n){var o;e=pv(e,n),(o=e[0])==null||o.resume()}}}function pv(e,n){const o=[...e],s=o.indexOf(n);return s!==-1&&o.splice(s,1),o}function Cj(e){return e.filter(n=>n.tagName!=="A")}var Vd=0;function ip(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??hv()),document.body.insertAdjacentElement("beforeend",e[1]??hv()),Vd++,()=>{Vd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Vd--}},[])}function hv(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var mr=function(){return mr=Object.assign||function(n){for(var o,s=1,a=arguments.length;s<a;s++){o=arguments[s];for(var l in o)Object.prototype.hasOwnProperty.call(o,l)&&(n[l]=o[l])}return n},mr.apply(this,arguments)};function dx(e,n){var o={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&n.indexOf(s)<0&&(o[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,s=Object.getOwnPropertySymbols(e);a<s.length;a++)n.indexOf(s[a])<0&&Object.prototype.propertyIsEnumerable.call(e,s[a])&&(o[s[a]]=e[s[a]]);return o}function Ej(e,n,o){if(o||arguments.length===2)for(var s=0,a=n.length,l;s<a;s++)(l||!(s in n))&&(l||(l=Array.prototype.slice.call(n,0,s)),l[s]=n[s]);return e.concat(l||Array.prototype.slice.call(n))}var Fl="right-scroll-bar-position",$l="width-before-scroll-bar",Nj="with-scroll-bars-hidden",jj="--removed-body-scroll-bar-size";function Wd(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function Rj(e,n){var o=g.useState(function(){return{value:e,callback:n,facade:{get current(){return o.value},set current(s){var a=o.value;a!==s&&(o.value=s,o.callback(s,a))}}}})[0];return o.callback=n,o.facade}var Tj=typeof window<"u"?g.useLayoutEffect:g.useEffect,mv=new WeakMap;function kj(e,n){var o=Rj(null,function(s){return e.forEach(function(a){return Wd(a,s)})});return Tj(function(){var s=mv.get(o);if(s){var a=new Set(s),l=new Set(e),f=o.current;a.forEach(function(d){l.has(d)||Wd(d,null)}),l.forEach(function(d){a.has(d)||Wd(d,f)})}mv.set(o,e)},[e]),o}function Pj(e){return e}function _j(e,n){n===void 0&&(n=Pj);var o=[],s=!1,a={read:function(){if(s)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:e},useMedium:function(l){var f=n(l,s);return o.push(f),function(){o=o.filter(function(d){return d!==f})}},assignSyncMedium:function(l){for(s=!0;o.length;){var f=o;o=[],f.forEach(l)}o={push:function(d){return l(d)},filter:function(){return o}}},assignMedium:function(l){s=!0;var f=[];if(o.length){var d=o;o=[],d.forEach(l),f=o}var h=function(){var x=f;f=[],x.forEach(l)},v=function(){return Promise.resolve().then(h)};v(),o={push:function(x){f.push(x),v()},filter:function(x){return f=f.filter(x),o}}}};return a}function Dj(e){e===void 0&&(e={});var n=_j(null);return n.options=mr({async:!0,ssr:!1},e),n}var fx=function(e){var n=e.sideCar,o=dx(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var s=n.read();if(!s)throw new Error("Sidecar medium not found");return g.createElement(s,mr({},o))};fx.isSideCarExport=!0;function Aj(e,n){return e.useMedium(n),fx}var px=Dj(),Kd=function(){},bc=g.forwardRef(function(e,n){var o=g.useRef(null),s=g.useState({onScrollCapture:Kd,onWheelCapture:Kd,onTouchMoveCapture:Kd}),a=s[0],l=s[1],f=e.forwardProps,d=e.children,h=e.className,v=e.removeScrollBar,x=e.enabled,m=e.shards,b=e.sideCar,E=e.noRelative,T=e.noIsolation,w=e.inert,S=e.allowPinchZoom,C=e.as,j=C===void 0?"div":C,N=e.gapMode,k=dx(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=b,D=kj([o,n]),_=mr(mr({},k),a);return g.createElement(g.Fragment,null,x&&g.createElement(P,{sideCar:px,removeScrollBar:v,shards:m,noRelative:E,noIsolation:T,inert:w,setCallbacks:l,allowPinchZoom:!!S,lockRef:o,gapMode:N}),f?g.cloneElement(g.Children.only(d),mr(mr({},_),{ref:D})):g.createElement(j,mr({},_,{className:h,ref:D}),d))});bc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};bc.classNames={fullWidth:$l,zeroRight:Fl};var Oj=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Mj(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=Oj();return n&&e.setAttribute("nonce",n),e}function Ij(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function Lj(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var Fj=function(){var e=0,n=null;return{add:function(o){e==0&&(n=Mj())&&(Ij(n,o),Lj(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},$j=function(){var e=Fj();return function(n,o){g.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&o])}},hx=function(){var e=$j(),n=function(o){var s=o.styles,a=o.dynamic;return e(s,a),null};return n},zj={left:0,top:0,right:0,gap:0},Yd=function(e){return parseInt(e||"",10)||0},Bj=function(e){var n=window.getComputedStyle(document.body),o=n[e==="padding"?"paddingLeft":"marginLeft"],s=n[e==="padding"?"paddingTop":"marginTop"],a=n[e==="padding"?"paddingRight":"marginRight"];return[Yd(o),Yd(s),Yd(a)]},Uj=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return zj;var n=Bj(e),o=document.documentElement.clientWidth,s=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,s-o+n[2]-n[0])}},Hj=hx(),js="data-scroll-locked",Vj=function(e,n,o,s){var a=e.left,l=e.top,f=e.right,d=e.gap;return o===void 0&&(o="margin"),`217 .`.concat( Nj,` {43 `+y.stack}return{value:t,source:r,stack:p,digest:null}}function kp(t,r,i){return{value:t,source:null,stack:i??null,digest:r??null}}function jp(t,r){try{console.error(r.value)}catch(i){setTimeout(function(){throw i})}}var cD=typeof WeakMap=="function"?WeakMap:Map;function gb(t,r,i){i=Br(-1,i),i.tag=3,i.payload={element:null};var u=r.value;return i.callback=function(){Bc||(Bc=!0,Hp=u),jp(t,r)},i}function vb(t,r,i){i=Br(-1,i),i.tag=3;var u=t.type.getDerivedStateFromError;if(typeof u=="function"){var p=r.value;i.payload=function(){return u(p)},i.callback=function(){jp(t,r)}}var y=t.stateNode;return y!==null&&typeof y.componentDidCatch=="function"&&(i.callback=function(){jp(t,r),typeof u!="function"&&(Co===null?Co=new Set([this]):Co.add(this));var k=r.stack;this.componentDidCatch(r.value,{componentStack:k!==null?k:""})}),i}function yb(t,r,i){var u=t.pingCache;if(u===null){u=t.pingCache=new cD;var p=new Set;u.set(r,p)}else p=u.get(r),p===void 0&&(p=new Set,u.set(r,p));p.has(i)||(p.add(i),t=CD.bind(null,t,r,i),r.then(t,t))}function wb(t){do{var r;if((r=t.tag===13)&&(r=t.memoizedState,r=r!==null?r.dehydrated!==null:!0),r)return t;t=t.return}while(t!==null);return null}function xb(t,r,i,u,p){return(t.mode&1)===0?(t===r?t.flags|=65536:(t.flags|=128,i.flags|=131072,i.flags&=-52805,i.tag===1&&(i.alternate===null?i.tag=17:(r=Br(-1,1),r.tag=2,bo(i,r,1))),i.lanes|=1),t):(t.flags|=65536,t.lanes=p,t)}var uD=R.ReactCurrentOwner,xn=!1;function ln(t,r,i,u){r.child=t===null?$x(r,null,i,u):Ys(r,t.child,i,u)}function bb(t,r,i,u,p){i=i.render;var y=r.ref;return Xs(r,p),u=yp(t,r,i,u,y,p),i=xp(),t!==null&&!xn?(r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~p,Ur(t,r,p)):(dt&&i&&tp(r),r.flags|=1,ln(t,r,u,p),r.child)}function Sb(t,r,i,u,p){if(t===null){var y=i.type;return typeof y=="function"&&!qp(y)&&y.defaultProps===void 0&&i.compare===null&&i.defaultProps===void 0?(r.tag=15,r.type=y,Cb(t,r,y,u,p)):(t=Kc(i.type,null,u,r,r.mode,p),t.ref=r.ref,t.return=r,r.child=t)}if(y=t.child,(t.lanes&p)===0){var k=y.memoizedProps;if(i=i.compare,i=i!==null?i:Zi,i(k,u)&&t.ref===r.ref)return Ur(t,r,p)}return r.flags|=1,t=ko(y,u),t.ref=r.ref,t.return=r,r.child=t}function Cb(t,r,i,u,p){if(t!==null){var y=t.memoizedProps;if(Zi(y,u)&&t.ref===r.ref)if(xn=!1,r.pendingProps=u=y,(t.lanes&p)!==0)(t.flags&131072)!==0&&(xn=!0);else return r.lanes=t.lanes,Ur(t,r,p)}return Rp(t,r,i,u,p)}function _b(t,r,i){var u=r.pendingProps,p=u.children,y=t!==null?t.memoizedState:null;if(u.mode==="hidden")if((r.mode&1)===0)r.memoizedState={baseLanes:0,cachePool:null,transitions:null},ot(Js,jn),jn|=i;else{if((i&1073741824)===0)return t=y!==null?y.baseLanes|i:i,r.lanes=r.childLanes=1073741824,r.memoizedState={baseLanes:t,cachePool:null,transitions:null},r.updateQueue=null,ot(Js,jn),jn|=t,null;r.memoizedState={baseLanes:0,cachePool:null,transitions:null},u=y!==null?y.baseLanes:i,ot(Js,jn),jn|=u}else y!==null?(u=y.baseLanes|i,r.memoizedState=null):u=i,ot(Js,jn),jn|=u;return ln(t,r,p,i),r.child}function Eb(t,r){var i=r.ref;(t===null&&i!==null||t!==null&&t.ref!==i)&&(r.flags|=512,r.flags|=2097152)}function Rp(t,r,i,u,p){var y=wn(i)?Ko:Zt.current;return y=Us(r,y),Xs(r,p),i=yp(t,r,i,u,y,p),u=xp(),t!==null&&!xn?(r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~p,Ur(t,r,p)):(dt&&u&&tp(r),r.flags|=1,ln(t,r,i,p),r.child)}function Nb(t,r,i,u,p){if(wn(i)){var y=!0;yc(r)}else y=!1;if(Xs(r,p),r.stateNode===null)Ic(t,r),hb(r,i,u),Np(r,i,u,p),u=!0;else if(t===null){var k=r.stateNode,O=r.memoizedProps;k.props=O;var I=k.context,W=i.contextType;typeof W=="object"&&W!==null?W=Fn(W):(W=wn(i)?Ko:Zt.current,W=Us(r,W));var se=i.getDerivedStateFromProps,ae=typeof se=="function"||typeof k.getSnapshotBeforeUpdate=="function";ae||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(O!==u||I!==W)&&mb(r,k,u,W),xo=!1;var oe=r.memoizedState;k.state=oe,kc(r,u,k,p),I=r.memoizedState,O!==u||oe!==I||yn.current||xo?(typeof se=="function"&&(Ep(r,i,se,u),I=r.memoizedState),(O=xo||pb(r,i,O,u,oe,I,W))?(ae||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount()),typeof k.componentDidMount=="function"&&(r.flags|=4194308)):(typeof k.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=u,r.memoizedState=I),k.props=u,k.state=I,k.context=W,u=O):(typeof k.componentDidMount=="function"&&(r.flags|=4194308),u=!1)}else{k=r.stateNode,Ux(t,r),O=r.memoizedProps,W=r.type===r.elementType?O:or(r.type,O),k.props=W,ae=r.pendingProps,oe=k.context,I=i.contextType,typeof I=="object"&&I!==null?I=Fn(I):(I=wn(i)?Ko:Zt.current,I=Us(r,I));var ve=i.getDerivedStateFromProps;(se=typeof ve=="function"||typeof k.getSnapshotBeforeUpdate=="function")||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(O!==ae||oe!==I)&&mb(r,k,u,I),xo=!1,oe=r.memoizedState,k.state=oe,kc(r,u,k,p);var xe=r.memoizedState;O!==ae||oe!==xe||yn.current||xo?(typeof ve=="function"&&(Ep(r,i,ve,u),xe=r.memoizedState),(W=xo||pb(r,i,W,u,oe,xe,I)||!1)?(se||typeof k.UNSAFE_componentWillUpdate!="function"&&typeof k.componentWillUpdate!="function"||(typeof k.componentWillUpdate=="function"&&k.componentWillUpdate(u,xe,I),typeof k.UNSAFE_componentWillUpdate=="function"&&k.UNSAFE_componentWillUpdate(u,xe,I)),typeof k.componentDidUpdate=="function"&&(r.flags|=4),typeof k.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof k.componentDidUpdate!="function"||O===t.memoizedProps&&oe===t.memoizedState||(r.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||O===t.memoizedProps&&oe===t.memoizedState||(r.flags|=1024),r.memoizedProps=u,r.memoizedState=xe),k.props=u,k.state=xe,k.context=I,u=W):(typeof k.componentDidUpdate!="function"||O===t.memoizedProps&&oe===t.memoizedState||(r.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||O===t.memoizedProps&&oe===t.memoizedState||(r.flags|=1024),u=!1)}return Tp(t,r,i,u,y,p)}function Tp(t,r,i,u,p,y){Eb(t,r);var k=(r.flags&128)!==0;if(!u&&!k)return p&&Px(r,i,!1),Ur(t,r,y);u=r.stateNode,uD.current=r;var O=k&&typeof i.getDerivedStateFromError!="function"?null:u.render();return r.flags|=1,t!==null&&k?(r.child=Ys(r,t.child,null,y),r.child=Ys(r,null,O,y)):ln(t,r,O,y),r.memoizedState=u.state,p&&Px(r,i,!0),r.child}function kb(t){var r=t.stateNode;r.pendingContext?Rx(t,r.pendingContext,r.pendingContext!==r.context):r.context&&Rx(t,r.context,!1),fp(t,r.containerInfo)}function jb(t,r,i,u,p){return Ws(),sp(p),r.flags|=256,ln(t,r,i,u),r.child}var Pp={dehydrated:null,treeContext:null,retryLane:0};function Dp(t){return{baseLanes:t,cachePool:null,transitions:null}}function Rb(t,r,i){var u=r.pendingProps,p=gt.current,y=!1,k=(r.flags&128)!==0,O;if((O=k)||(O=t!==null&&t.memoizedState===null?!1:(p&2)!==0),O?(y=!0,r.flags&=-129):(t===null||t.memoizedState!==null)&&(p|=1),ot(gt,p&1),t===null)return op(r),t=r.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?((r.mode&1)===0?r.lanes=1:t.data==="$!"?r.lanes=8:r.lanes=1073741824,null):(k=u.children,t=u.fallback,y?(u=r.mode,y=r.child,k={mode:"hidden",children:k},(u&1)===0&&y!==null?(y.childLanes=0,y.pendingProps=k):y=Xc(k,u,0,null),t=rs(t,u,i,null),y.return=r,t.return=r,y.sibling=t,r.child=y,r.child.memoizedState=Dp(i),r.memoizedState=Pp,t):Ap(r,k));if(p=t.memoizedState,p!==null&&(O=p.dehydrated,O!==null))return dD(t,r,k,u,O,p,i);if(y){y=u.fallback,k=r.mode,p=t.child,O=p.sibling;var I={mode:"hidden",children:u.children};return(k&1)===0&&r.child!==p?(u=r.child,u.childLanes=0,u.pendingProps=I,r.deletions=null):(u=ko(p,I),u.subtreeFlags=p.subtreeFlags&14680064),O!==null?y=ko(O,y):(y=rs(y,k,i,null),y.flags|=2),y.return=r,u.return=r,u.sibling=y,r.child=u,u=y,y=r.child,k=t.child.memoizedState,k=k===null?Dp(i):{baseLanes:k.baseLanes|i,cachePool:null,transitions:k.transitions},y.memoizedState=k,y.childLanes=t.childLanes&~i,r.memoizedState=Pp,u}return y=t.child,t=y.sibling,u=ko(y,{mode:"visible",children:u.children}),(r.mode&1)===0&&(u.lanes=i),u.return=r,u.sibling=null,t!==null&&(i=r.deletions,i===null?(r.deletions=[t],r.flags|=16):i.push(t)),r.child=u,r.memoizedState=null,u}function Ap(t,r){return r=Xc({mode:"visible",children:r},t.mode,0,null),r.return=t,t.child=r}function Mc(t,r,i,u){return u!==null&&sp(u),Ys(r,t.child,null,i),t=Ap(r,r.pendingProps.children),t.flags|=2,r.memoizedState=null,t}function dD(t,r,i,u,p,y,k){if(i)return r.flags&256?(r.flags&=-257,u=kp(Error(o(422))),Mc(t,r,k,u)):r.memoizedState!==null?(r.child=t.child,r.flags|=128,null):(y=u.fallback,p=r.mode,u=Xc({mode:"visible",children:u.children},p,0,null),y=rs(y,p,k,null),y.flags|=2,u.return=r,y.return=r,u.sibling=y,r.child=u,(r.mode&1)!==0&&Ys(r,t.child,null,k),r.child.memoizedState=Dp(k),r.memoizedState=Pp,y);if((r.mode&1)===0)return Mc(t,r,k,null);if(p.data==="$!"){if(u=p.nextSibling&&p.nextSibling.dataset,u)var O=u.dgst;return u=O,y=Error(o(419)),u=kp(y,u,void 0),Mc(t,r,k,u)}if(O=(k&t.childLanes)!==0,xn||O){if(u=Vt,u!==null){switch(k&-k){case 4:p=2;break;case 16:p=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:p=32;break;case 536870912:p=268435456;break;default:p=0}p=(p&(u.suspendedLanes|k))!==0?0:p,p!==0&&p!==y.retryLane&&(y.retryLane=p,$r(t,p),ar(u,t,p,-1))}return Gp(),u=kp(Error(o(421))),Mc(t,r,k,u)}return p.data==="$?"?(r.flags|=128,r.child=t.child,r=_D.bind(null,t),p._reactRetry=r,null):(t=y.treeContext,kn=go(p.nextSibling),Nn=r,dt=!0,rr=null,t!==null&&(In[Ln++]=Fr,In[Ln++]=zr,In[Ln++]=Xo,Fr=t.id,zr=t.overflow,Xo=r),r=Ap(r,u.children),r.flags|=4096,r)}function Tb(t,r,i){t.lanes|=r;var u=t.alternate;u!==null&&(u.lanes|=r),cp(t.return,r,i)}function Op(t,r,i,u,p){var y=t.memoizedState;y===null?t.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:u,tail:i,tailMode:p}:(y.isBackwards=r,y.rendering=null,y.renderingStartTime=0,y.last=u,y.tail=i,y.tailMode=p)}function Pb(t,r,i){var u=r.pendingProps,p=u.revealOrder,y=u.tail;if(ln(t,r,u.children,i),u=gt.current,(u&2)!==0)u=u&1|2,r.flags|=128;else{if(t!==null&&(t.flags&128)!==0)e:for(t=r.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Tb(t,i,r);else if(t.tag===19)Tb(t,i,r);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===r)break e;for(;t.sibling===null;){if(t.return===null||t.return===r)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}u&=1}if(ot(gt,u),(r.mode&1)===0)r.memoizedState=null;else switch(p){case"forwards":for(i=r.child,p=null;i!==null;)t=i.alternate,t!==null&&jc(t)===null&&(p=i),i=i.sibling;i=p,i===null?(p=r.child,r.child=null):(p=i.sibling,i.sibling=null),Op(r,!1,p,i,y);break;case"backwards":for(i=null,p=r.child,r.child=null;p!==null;){if(t=p.alternate,t!==null&&jc(t)===null){r.child=p;break}t=p.sibling,p.sibling=i,i=p,p=t}Op(r,!0,i,null,y);break;case"together":Op(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function Ic(t,r){(r.mode&1)===0&&t!==null&&(t.alternate=null,r.alternate=null,r.flags|=2)}function Ur(t,r,i){if(t!==null&&(r.dependencies=t.dependencies),Zo|=r.lanes,(i&r.childLanes)===0)return null;if(t!==null&&r.child!==t.child)throw Error(o(153));if(r.child!==null){for(t=r.child,i=ko(t,t.pendingProps),r.child=i,i.return=r;t.sibling!==null;)t=t.sibling,i=i.sibling=ko(t,t.pendingProps),i.return=r;i.sibling=null}return r.child}function fD(t,r,i){switch(r.tag){case 3:kb(r),Ws();break;case 5:Wx(r);break;case 1:wn(r.type)&&yc(r);break;case 4:fp(r,r.stateNode.containerInfo);break;case 10:var u=r.type._context,p=r.memoizedProps.value;ot(_c,u._currentValue),u._currentValue=p;break;case 13:if(u=r.memoizedState,u!==null)return u.dehydrated!==null?(ot(gt,gt.current&1),r.flags|=128,null):(i&r.child.childLanes)!==0?Rb(t,r,i):(ot(gt,gt.current&1),t=Ur(t,r,i),t!==null?t.sibling:null);ot(gt,gt.current&1);break;case 19:if(u=(i&r.childLanes)!==0,(t.flags&128)!==0){if(u)return Pb(t,r,i);r.flags|=128}if(p=r.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),ot(gt,gt.current),u)break;return null;case 22:case 23:return r.lanes=0,_b(t,r,i)}return Ur(t,r,i)}var Db,Mp,Ab,Ob;Db=function(t,r){for(var i=r.child;i!==null;){if(i.tag===5||i.tag===6)t.appendChild(i.stateNode);else if(i.tag!==4&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return;i=i.return}i.sibling.return=i.return,i=i.sibling}},Mp=function(){},Ab=function(t,r,i,u){var p=t.memoizedProps;if(p!==u){t=r.stateNode,Qo(Sr.current);var y=null;switch(i){case"input":p=he(t,p),u=he(t,u),y=[];break;case"select":p=ne({},p,{value:void 0}),u=ne({},u,{value:void 0}),y=[];break;case"textarea":p=ut(t,p),u=ut(t,u),y=[];break;default:typeof p.onClick!="function"&&typeof u.onClick=="function"&&(t.onclick=mc)}er(i,u);var k;i=null;for(W in p)if(!u.hasOwnProperty(W)&&p.hasOwnProperty(W)&&p[W]!=null)if(W==="style"){var O=p[W];for(k in O)O.hasOwnProperty(k)&&(i||(i={}),i[k]="")}else W!=="dangerouslySetInnerHTML"&&W!=="children"&&W!=="suppressContentEditableWarning"&&W!=="suppressHydrationWarning"&&W!=="autoFocus"&&(a.hasOwnProperty(W)?y||(y=[]):(y=y||[]).push(W,null));for(W in u){var I=u[W];if(O=p!=null?p[W]:void 0,u.hasOwnProperty(W)&&I!==O&&(I!=null||O!=null))if(W==="style")if(O){for(k in O)!O.hasOwnProperty(k)||I&&I.hasOwnProperty(k)||(i||(i={}),i[k]="");for(k in I)I.hasOwnProperty(k)&&O[k]!==I[k]&&(i||(i={}),i[k]=I[k])}else i||(y||(y=[]),y.push(W,i)),i=I;else W==="dangerouslySetInnerHTML"?(I=I?I.__html:void 0,O=O?O.__html:void 0,I!=null&&O!==I&&(y=y||[]).push(W,I)):W==="children"?typeof I!="string"&&typeof I!="number"||(y=y||[]).push(W,""+I):W!=="suppressContentEditableWarning"&&W!=="suppressHydrationWarning"&&(a.hasOwnProperty(W)?(I!=null&&W==="onScroll"&&at("scroll",t),y||O===I||(y=[])):(y=y||[]).push(W,I))}i&&(y=y||[]).push("style",i);var W=y;(r.updateQueue=W)&&(r.flags|=4)}},Ob=function(t,r,i,u){i!==u&&(r.flags|=4)};function ha(t,r){if(!dt)switch(t.tailMode){case"hidden":r=t.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?t.tail=null:i.sibling=null;break;case"collapsed":i=t.tail;for(var u=null;i!==null;)i.alternate!==null&&(u=i),i=i.sibling;u===null?r||t.tail===null?t.tail=null:t.tail.sibling=null:u.sibling=null}}function tn(t){var r=t.alternate!==null&&t.alternate.child===t.child,i=0,u=0;if(r)for(var p=t.child;p!==null;)i|=p.lanes|p.childLanes,u|=p.subtreeFlags&14680064,u|=p.flags&14680064,p.return=t,p=p.sibling;else for(p=t.child;p!==null;)i|=p.lanes|p.childLanes,u|=p.subtreeFlags,u|=p.flags,p.return=t,p=p.sibling;return t.subtreeFlags|=u,t.childLanes=i,r}function pD(t,r,i){var u=r.pendingProps;switch(np(r),r.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return tn(r),null;case 1:return wn(r.type)&&vc(),tn(r),null;case 3:return u=r.stateNode,Gs(),lt(yn),lt(Zt),mp(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(t===null||t.child===null)&&(Sc(r)?r.flags|=4:t===null||t.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,rr!==null&&(Yp(rr),rr=null))),Mp(t,r),tn(r),null;case 5:pp(r);var p=Qo(ca.current);if(i=r.type,t!==null&&r.stateNode!=null)Ab(t,r,i,u,p),t.ref!==r.ref&&(r.flags|=512,r.flags|=2097152);else{if(!u){if(r.stateNode===null)throw Error(o(166));return tn(r),null}if(t=Qo(Sr.current),Sc(r)){u=r.stateNode,i=r.type;var y=r.memoizedProps;switch(u[br]=r,u[oa]=y,t=(r.mode&1)!==0,i){case"dialog":at("cancel",u),at("close",u);break;case"iframe":case"object":case"embed":at("load",u);break;case"video":case"audio":for(p=0;p<ta.length;p++)at(ta[p],u);break;case"source":at("error",u);break;case"img":case"image":case"link":at("error",u),at("load",u);break;case"details":at("toggle",u);break;case"input":et(u,y),at("invalid",u);break;case"select":u._wrapperState={wasMultiple:!!y.multiple},at("invalid",u);break;case"textarea":$t(u,y),at("invalid",u)}er(i,y),p=null;for(var k in y)if(y.hasOwnProperty(k)){var O=y[k];k==="children"?typeof O=="string"?u.textContent!==O&&(y.suppressHydrationWarning!==!0&&hc(u.textContent,O,t),p=["children",O]):typeof O=="number"&&u.textContent!==""+O&&(y.suppressHydrationWarning!==!0&&hc(u.textContent,O,t),p=["children",""+O]):a.hasOwnProperty(k)&&O!=null&&k==="onScroll"&&at("scroll",u)}switch(i){case"input":Ne(u),On(u,y,!0);break;case"textarea":Ne(u),Dr(u);break;case"select":case"option":break;default:typeof y.onClick=="function"&&(u.onclick=mc)}u=p,r.updateQueue=u,u!==null&&(r.flags|=4)}else{k=p.nodeType===9?p:p.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=Zn(i)),t==="http://www.w3.org/1999/xhtml"?i==="script"?(t=k.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof u.is=="string"?t=k.createElement(i,{is:u.is}):(t=k.createElement(i),i==="select"&&(k=t,u.multiple?k.multiple=!0:u.size&&(k.size=u.size))):t=k.createElementNS(t,i),t[br]=r,t[oa]=u,Db(t,r,!1,!1),r.stateNode=t;e:{switch(k=Or(i,u),i){case"dialog":at("cancel",t),at("close",t),p=u;break;case"iframe":case"object":case"embed":at("load",t),p=u;break;case"video":case"audio":for(p=0;p<ta.length;p++)at(ta[p],t);p=u;break;case"source":at("error",t),p=u;break;case"img":case"image":case"link":at("error",t),at("load",t),p=u;break;case"details":at("toggle",t),p=u;break;case"input":et(t,u),p=he(t,u),at("invalid",t);break;case"option":p=u;break;case"select":t._wrapperState={wasMultiple:!!u.multiple},p=ne({},u,{value:void 0}),at("invalid",t);break;case"textarea":$t(t,u),p=ut(t,u),at("invalid",t);break;default:p=u}er(i,p),O=p;for(y in O)if(O.hasOwnProperty(y)){var I=O[y];y==="style"?lo(t,I):y==="dangerouslySetInnerHTML"?(I=I?I.__html:void 0,I!=null&&mn(t,I)):y==="children"?typeof I=="string"?(i!=="textarea"||I!=="")&&Bt(t,I):typeof I=="number"&&Bt(t,""+I):y!=="suppressContentEditableWarning"&&y!=="suppressHydrationWarning"&&y!=="autoFocus"&&(a.hasOwnProperty(y)?I!=null&&y==="onScroll"&&at("scroll",t):I!=null&&_(t,y,I,k))}switch(i){case"input":Ne(t),On(t,u,!1);break;case"textarea":Ne(t),Dr(t);break;case"option":u.value!=null&&t.setAttribute("value",""+ie(u.value));break;case"select":t.multiple=!!u.multiple,y=u.value,y!=null?Jt(t,!!u.multiple,y,!1):u.defaultValue!=null&&Jt(t,!!u.multiple,u.defaultValue,!0);break;default:typeof p.onClick=="function"&&(t.onclick=mc)}switch(i){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}}u&&(r.flags|=4)}r.ref!==null&&(r.flags|=512,r.flags|=2097152)}return tn(r),null;case 6:if(t&&r.stateNode!=null)Ob(t,r,t.memoizedProps,u);else{if(typeof u!="string"&&r.stateNode===null)throw Error(o(166));if(i=Qo(ca.current),Qo(Sr.current),Sc(r)){if(u=r.stateNode,i=r.memoizedProps,u[br]=r,(y=u.nodeValue!==i)&&(t=Nn,t!==null))switch(t.tag){case 3:hc(u.nodeValue,i,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&hc(u.nodeValue,i,(t.mode&1)!==0)}y&&(r.flags|=4)}else u=(i.nodeType===9?i:i.ownerDocument).createTextNode(u),u[br]=r,r.stateNode=u}return tn(r),null;case 13:if(lt(gt),u=r.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(dt&&kn!==null&&(r.mode&1)!==0&&(r.flags&128)===0)Lx(),Ws(),r.flags|=98560,y=!1;else if(y=Sc(r),u!==null&&u.dehydrated!==null){if(t===null){if(!y)throw Error(o(318));if(y=r.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(o(317));y[br]=r}else Ws(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;tn(r),y=!1}else rr!==null&&(Yp(rr),rr=null),y=!0;if(!y)return r.flags&65536?r:null}return(r.flags&128)!==0?(r.lanes=i,r):(u=u!==null,u!==(t!==null&&t.memoizedState!==null)&&u&&(r.child.flags|=8192,(r.mode&1)!==0&&(t===null||(gt.current&1)!==0?Ot===0&&(Ot=3):Gp())),r.updateQueue!==null&&(r.flags|=4),tn(r),null);case 4:return Gs(),Mp(t,r),t===null&&na(r.stateNode.containerInfo),tn(r),null;case 10:return lp(r.type._context),tn(r),null;case 17:return wn(r.type)&&vc(),tn(r),null;case 19:if(lt(gt),y=r.memoizedState,y===null)return tn(r),null;if(u=(r.flags&128)!==0,k=y.rendering,k===null)if(u)ha(y,!1);else{if(Ot!==0||t!==null&&(t.flags&128)!==0)for(t=r.child;t!==null;){if(k=jc(t),k!==null){for(r.flags|=128,ha(y,!1),u=k.updateQueue,u!==null&&(r.updateQueue=u,r.flags|=4),r.subtreeFlags=0,u=i,i=r.child;i!==null;)y=i,t=u,y.flags&=14680066,k=y.alternate,k===null?(y.childLanes=0,y.lanes=t,y.child=null,y.subtreeFlags=0,y.memoizedProps=null,y.memoizedState=null,y.updateQueue=null,y.dependencies=null,y.stateNode=null):(y.childLanes=k.childLanes,y.lanes=k.lanes,y.child=k.child,y.subtreeFlags=0,y.deletions=null,y.memoizedProps=k.memoizedProps,y.memoizedState=k.memoizedState,y.updateQueue=k.updateQueue,y.type=k.type,t=k.dependencies,y.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),i=i.sibling;return ot(gt,gt.current&1|2),r.child}t=t.sibling}y.tail!==null&&_t()>Zs&&(r.flags|=128,u=!0,ha(y,!1),r.lanes=4194304)}else{if(!u)if(t=jc(k),t!==null){if(r.flags|=128,u=!0,i=t.updateQueue,i!==null&&(r.updateQueue=i,r.flags|=4),ha(y,!0),y.tail===null&&y.tailMode==="hidden"&&!k.alternate&&!dt)return tn(r),null}else 2*_t()-y.renderingStartTime>Zs&&i!==1073741824&&(r.flags|=128,u=!0,ha(y,!1),r.lanes=4194304);y.isBackwards?(k.sibling=r.child,r.child=k):(i=y.last,i!==null?i.sibling=k:r.child=k,y.last=k)}return y.tail!==null?(r=y.tail,y.rendering=r,y.tail=r.sibling,y.renderingStartTime=_t(),r.sibling=null,i=gt.current,ot(gt,u?i&1|2:i&1),r):(tn(r),null);case 22:case 23:return Xp(),u=r.memoizedState!==null,t!==null&&t.memoizedState!==null!==u&&(r.flags|=8192),u&&(r.mode&1)!==0?(jn&1073741824)!==0&&(tn(r),r.subtreeFlags&6&&(r.flags|=8192)):tn(r),null;case 24:return null;case 25:return null}throw Error(o(156,r.tag))}function hD(t,r){switch(np(r),r.tag){case 1:return wn(r.type)&&vc(),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return Gs(),lt(yn),lt(Zt),mp(),t=r.flags,(t&65536)!==0&&(t&128)===0?(r.flags=t&-65537|128,r):null;case 5:return pp(r),null;case 13:if(lt(gt),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(o(340));Ws()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return lt(gt),null;case 4:return Gs(),null;case 10:return lp(r.type._context),null;case 22:case 23:return Xp(),null;case 24:return null;default:return null}}var Lc=!1,nn=!1,mD=typeof WeakSet=="function"?WeakSet:Set,ye=null;function Qs(t,r){var i=t.ref;if(i!==null)if(typeof i=="function")try{i(null)}catch(u){bt(t,r,u)}else i.current=null}function Ip(t,r,i){try{i()}catch(u){bt(t,r,u)}}var Mb=!1;function gD(t,r){if(Kf=rc,t=px(),zf(t)){if("selectionStart"in t)var i={start:t.selectionStart,end:t.selectionEnd};else e:{i=(i=t.ownerDocument)&&i.defaultView||window;var u=i.getSelection&&i.getSelection();if(u&&u.rangeCount!==0){i=u.anchorNode;var p=u.anchorOffset,y=u.focusNode;u=u.focusOffset;try{i.nodeType,y.nodeType}catch{i=null;break e}var k=0,O=-1,I=-1,W=0,se=0,ae=t,oe=null;t:for(;;){for(var ve;ae!==i||p!==0&&ae.nodeType!==3||(O=k+p),ae!==y||u!==0&&ae.nodeType!==3||(I=k+u),ae.nodeType===3&&(k+=ae.nodeValue.length),(ve=ae.firstChild)!==null;)oe=ae,ae=ve;for(;;){if(ae===t)break t;if(oe===i&&++W===p&&(O=k),oe===y&&++se===u&&(I=k),(ve=ae.nextSibling)!==null)break;ae=oe,oe=ae.parentNode}ae=ve}i=O===-1||I===-1?null:{start:O,end:I}}else i=null}i=i||{start:0,end:0}}else i=null;for(Xf={focusedElem:t,selectionRange:i},rc=!1,ye=r;ye!==null;)if(r=ye,t=r.child,(r.subtreeFlags&1028)!==0&&t!==null)t.return=r,ye=t;else for(;ye!==null;){r=ye;try{var xe=r.alternate;if((r.flags&1024)!==0)switch(r.tag){case 0:case 11:case 15:break;case 1:if(xe!==null){var Se=xe.memoizedProps,Et=xe.memoizedState,$=r.stateNode,L=$.getSnapshotBeforeUpdate(r.elementType===r.type?Se:or(r.type,Se),Et);$.__reactInternalSnapshotBeforeUpdate=L}break;case 3:var U=r.stateNode.containerInfo;U.nodeType===1?U.textContent="":U.nodeType===9&&U.documentElement&&U.removeChild(U.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(de){bt(r,r.return,de)}if(t=r.sibling,t!==null){t.return=r.return,ye=t;break}ye=r.return}return xe=Mb,Mb=!1,xe}function ma(t,r,i){var u=r.updateQueue;if(u=u!==null?u.lastEffect:null,u!==null){var p=u=u.next;do{if((p.tag&t)===t){var y=p.destroy;p.destroy=void 0,y!==void 0&&Ip(r,i,y)}p=p.next}while(p!==u)}}function Fc(t,r){if(r=r.updateQueue,r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var u=i.create;i.destroy=u()}i=i.next}while(i!==r)}}function Lp(t){var r=t.ref;if(r!==null){var i=t.stateNode;switch(t.tag){case 5:t=i;break;default:t=i}typeof r=="function"?r(t):r.current=t}}function Ib(t){var r=t.alternate;r!==null&&(t.alternate=null,Ib(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&(delete r[br],delete r[oa],delete r[Jf],delete r[JP],delete r[ZP])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function Lb(t){return t.tag===5||t.tag===3||t.tag===4}function Fb(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Lb(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Fp(t,r,i){var u=t.tag;if(u===5||u===6)t=t.stateNode,r?i.nodeType===8?i.parentNode.insertBefore(t,r):i.insertBefore(t,r):(i.nodeType===8?(r=i.parentNode,r.insertBefore(t,i)):(r=i,r.appendChild(t)),i=i._reactRootContainer,i!=null||r.onclick!==null||(r.onclick=mc));else if(u!==4&&(t=t.child,t!==null))for(Fp(t,r,i),t=t.sibling;t!==null;)Fp(t,r,i),t=t.sibling}function zp(t,r,i){var u=t.tag;if(u===5||u===6)t=t.stateNode,r?i.insertBefore(t,r):i.appendChild(t);else if(u!==4&&(t=t.child,t!==null))for(zp(t,r,i),t=t.sibling;t!==null;)zp(t,r,i),t=t.sibling}var qt=null,sr=!1;function So(t,r,i){for(i=i.child;i!==null;)zb(t,r,i),i=i.sibling}function zb(t,r,i){if(xr&&typeof xr.onCommitFiberUnmount=="function")try{xr.onCommitFiberUnmount(Ql,i)}catch{}switch(i.tag){case 5:nn||Qs(i,r);case 6:var u=qt,p=sr;qt=null,So(t,r,i),qt=u,sr=p,qt!==null&&(sr?(t=qt,i=i.stateNode,t.nodeType===8?t.parentNode.removeChild(i):t.removeChild(i)):qt.removeChild(i.stateNode));break;case 18:qt!==null&&(sr?(t=qt,i=i.stateNode,t.nodeType===8?Qf(t.parentNode,i):t.nodeType===1&&Qf(t,i),Ki(t)):Qf(qt,i.stateNode));break;case 4:u=qt,p=sr,qt=i.stateNode.containerInfo,sr=!0,So(t,r,i),qt=u,sr=p;break;case 0:case 11:case 14:case 15:if(!nn&&(u=i.updateQueue,u!==null&&(u=u.lastEffect,u!==null))){p=u=u.next;do{var y=p,k=y.destroy;y=y.tag,k!==void 0&&((y&2)!==0||(y&4)!==0)&&Ip(i,r,k),p=p.next}while(p!==u)}So(t,r,i);break;case 1:if(!nn&&(Qs(i,r),u=i.stateNode,typeof u.componentWillUnmount=="function"))try{u.props=i.memoizedProps,u.state=i.memoizedState,u.componentWillUnmount()}catch(O){bt(i,r,O)}So(t,r,i);break;case 21:So(t,r,i);break;case 22:i.mode&1?(nn=(u=nn)||i.memoizedState!==null,So(t,r,i),nn=u):So(t,r,i);break;default:So(t,r,i)}}function $b(t){var r=t.updateQueue;if(r!==null){t.updateQueue=null;var i=t.stateNode;i===null&&(i=t.stateNode=new mD),r.forEach(function(u){var p=ED.bind(null,t,u);i.has(u)||(i.add(u),u.then(p,p))})}}function ir(t,r){var i=r.deletions;if(i!==null)for(var u=0;u<i.length;u++){var p=i[u];try{var y=t,k=r,O=k;e:for(;O!==null;){switch(O.tag){case 5:qt=O.stateNode,sr=!1;break e;case 3:qt=O.stateNode.containerInfo,sr=!0;break e;case 4:qt=O.stateNode.containerInfo,sr=!0;break e}O=O.return}if(qt===null)throw Error(o(160));zb(y,k,p),qt=null,sr=!1;var I=p.alternate;I!==null&&(I.return=null),p.return=null}catch(W){bt(p,r,W)}}if(r.subtreeFlags&12854)for(r=r.child;r!==null;)Bb(r,t),r=r.sibling}function Bb(t,r){var i=t.alternate,u=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(ir(r,t),_r(t),u&4){try{ma(3,t,t.return),Fc(3,t)}catch(Se){bt(t,t.return,Se)}try{ma(5,t,t.return)}catch(Se){bt(t,t.return,Se)}}break;case 1:ir(r,t),_r(t),u&512&&i!==null&&Qs(i,i.return);break;case 5:if(ir(r,t),_r(t),u&512&&i!==null&&Qs(i,i.return),t.flags&32){var p=t.stateNode;try{Bt(p,"")}catch(Se){bt(t,t.return,Se)}}if(u&4&&(p=t.stateNode,p!=null)){var y=t.memoizedProps,k=i!==null?i.memoizedProps:y,O=t.type,I=t.updateQueue;if(t.updateQueue=null,I!==null)try{O==="input"&&y.type==="radio"&&y.name!=null&&Ct(p,y),Or(O,k);var W=Or(O,y);for(k=0;k<I.length;k+=2){var se=I[k],ae=I[k+1];se==="style"?lo(p,ae):se==="dangerouslySetInnerHTML"?mn(p,ae):se==="children"?Bt(p,ae):_(p,se,ae,W)}switch(O){case"input":wt(p,y);break;case"textarea":Pr(p,y);break;case"select":var oe=p._wrapperState.wasMultiple;p._wrapperState.wasMultiple=!!y.multiple;var ve=y.value;ve!=null?Jt(p,!!y.multiple,ve,!1):oe!==!!y.multiple&&(y.defaultValue!=null?Jt(p,!!y.multiple,y.defaultValue,!0):Jt(p,!!y.multiple,y.multiple?[]:"",!1))}p[oa]=y}catch(Se){bt(t,t.return,Se)}}break;case 6:if(ir(r,t),_r(t),u&4){if(t.stateNode===null)throw Error(o(162));p=t.stateNode,y=t.memoizedProps;try{p.nodeValue=y}catch(Se){bt(t,t.return,Se)}}break;case 3:if(ir(r,t),_r(t),u&4&&i!==null&&i.memoizedState.isDehydrated)try{Ki(r.containerInfo)}catch(Se){bt(t,t.return,Se)}break;case 4:ir(r,t),_r(t);break;case 13:ir(r,t),_r(t),p=t.child,p.flags&8192&&(y=p.memoizedState!==null,p.stateNode.isHidden=y,!y||p.alternate!==null&&p.alternate.memoizedState!==null||(Up=_t())),u&4&&$b(t);break;case 22:if(se=i!==null&&i.memoizedState!==null,t.mode&1?(nn=(W=nn)||se,ir(r,t),nn=W):ir(r,t),_r(t),u&8192){if(W=t.memoizedState!==null,(t.stateNode.isHidden=W)&&!se&&(t.mode&1)!==0)for(ye=t,se=t.child;se!==null;){for(ae=ye=se;ye!==null;){switch(oe=ye,ve=oe.child,oe.tag){case 0:case 11:case 14:case 15:ma(4,oe,oe.return);break;case 1:Qs(oe,oe.return);var xe=oe.stateNode;if(typeof xe.componentWillUnmount=="function"){u=oe,i=oe.return;try{r=u,xe.props=r.memoizedProps,xe.state=r.memoizedState,xe.componentWillUnmount()}catch(Se){bt(u,i,Se)}}break;case 5:Qs(oe,oe.return);break;case 22:if(oe.memoizedState!==null){Vb(ae);continue}}ve!==null?(ve.return=oe,ye=ve):Vb(ae)}se=se.sibling}e:for(se=null,ae=t;;){if(ae.tag===5){if(se===null){se=ae;try{p=ae.stateNode,W?(y=p.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none"):(O=ae.stateNode,I=ae.memoizedProps.style,k=I!=null&&I.hasOwnProperty("display")?I.display:null,O.style.display=Ar("display",k))}catch(Se){bt(t,t.return,Se)}}}else if(ae.tag===6){if(se===null)try{ae.stateNode.nodeValue=W?"":ae.memoizedProps}catch(Se){bt(t,t.return,Se)}}else if((ae.tag!==22&&ae.tag!==23||ae.memoizedState===null||ae===t)&&ae.child!==null){ae.child.return=ae,ae=ae.child;continue}if(ae===t)break e;for(;ae.sibling===null;){if(ae.return===null||ae.return===t)break e;se===ae&&(se=null),ae=ae.return}se===ae&&(se=null),ae.sibling.return=ae.return,ae=ae.sibling}}break;case 19:ir(r,t),_r(t),u&4&&$b(t);break;case 21:break;default:ir(r,t),_r(t)}}function _r(t){var r=t.flags;if(r&2){try{e:{for(var i=t.return;i!==null;){if(Lb(i)){var u=i;break e}i=i.return}throw Error(o(160))}switch(u.tag){case 5:var p=u.stateNode;u.flags&32&&(Bt(p,""),u.flags&=-33);var y=Fb(t);zp(t,y,p);break;case 3:case 4:var k=u.stateNode.containerInfo,O=Fb(t);Fp(t,O,k);break;default:throw Error(o(161))}}catch(I){bt(t,t.return,I)}t.flags&=-3}r&4096&&(t.flags&=-4097)}function vD(t,r,i){ye=t,Ub(t)}function Ub(t,r,i){for(var u=(t.mode&1)!==0;ye!==null;){var p=ye,y=p.child;if(p.tag===22&&u){var k=p.memoizedState!==null||Lc;if(!k){var O=p.alternate,I=O!==null&&O.memoizedState!==null||nn;O=Lc;var W=nn;if(Lc=k,(nn=I)&&!W)for(ye=p;ye!==null;)k=ye,I=k.child,k.tag===22&&k.memoizedState!==null?Wb(p):I!==null?(I.return=k,ye=I):Wb(p);for(;y!==null;)ye=y,Ub(y),y=y.sibling;ye=p,Lc=O,nn=W}Hb(t)}else(p.subtreeFlags&8772)!==0&&y!==null?(y.return=p,ye=y):Hb(t)}}function Hb(t){for(;ye!==null;){var r=ye;if((r.flags&8772)!==0){var i=r.alternate;try{if((r.flags&8772)!==0)switch(r.tag){case 0:case 11:case 15:nn||Fc(5,r);break;case 1:var u=r.stateNode;if(r.flags&4&&!nn)if(i===null)u.componentDidMount();else{var p=r.elementType===r.type?i.memoizedProps:or(r.type,i.memoizedProps);u.componentDidUpdate(p,i.memoizedState,u.__reactInternalSnapshotBeforeUpdate)}var y=r.updateQueue;y!==null&&Vx(r,y,u);break;case 3:var k=r.updateQueue;if(k!==null){if(i=null,r.child!==null)switch(r.child.tag){case 5:i=r.child.stateNode;break;case 1:i=r.child.stateNode}Vx(r,k,i)}break;case 5:var O=r.stateNode;if(i===null&&r.flags&4){i=O;var I=r.memoizedProps;switch(r.type){case"button":case"input":case"select":case"textarea":I.autoFocus&&i.focus();break;case"img":I.src&&(i.src=I.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(r.memoizedState===null){var W=r.alternate;if(W!==null){var se=W.memoizedState;if(se!==null){var ae=se.dehydrated;ae!==null&&Ki(ae)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(o(163))}nn||r.flags&512&&Lp(r)}catch(oe){bt(r,r.return,oe)}}if(r===t){ye=null;break}if(i=r.sibling,i!==null){i.return=r.return,ye=i;break}ye=r.return}}function Vb(t){for(;ye!==null;){var r=ye;if(r===t){ye=null;break}var i=r.sibling;if(i!==null){i.return=r.return,ye=i;break}ye=r.return}}function Wb(t){for(;ye!==null;){var r=ye;try{switch(r.tag){case 0:case 11:case 15:var i=r.return;try{Fc(4,r)}catch(I){bt(r,i,I)}break;case 1:var u=r.stateNode;if(typeof u.componentDidMount=="function"){var p=r.return;try{u.componentDidMount()}catch(I){bt(r,p,I)}}var y=r.return;try{Lp(r)}catch(I){bt(r,y,I)}break;case 5:var k=r.return;try{Lp(r)}catch(I){bt(r,k,I)}}}catch(I){bt(r,r.return,I)}if(r===t){ye=null;break}var O=r.sibling;if(O!==null){O.return=r.return,ye=O;break}ye=r.return}}var yD=Math.ceil,zc=R.ReactCurrentDispatcher,$p=R.ReactCurrentOwner,$n=R.ReactCurrentBatchConfig,Ge=0,Vt=null,kt=null,Qt=0,jn=0,Js=vo(0),Ot=0,ga=null,Zo=0,$c=0,Bp=0,va=null,bn=null,Up=0,Zs=1/0,Hr=null,Bc=!1,Hp=null,Co=null,Uc=!1,_o=null,Hc=0,ya=0,Vp=null,Vc=-1,Wc=0;function cn(){return(Ge&6)!==0?_t():Vc!==-1?Vc:Vc=_t()}function Eo(t){return(t.mode&1)===0?1:(Ge&2)!==0&&Qt!==0?Qt&-Qt:tD.transition!==null?(Wc===0&&(Wc=F0()),Wc):(t=tt,t!==0||(t=window.event,t=t===void 0?16:K0(t.type)),t)}function ar(t,r,i,u){if(50<ya)throw ya=0,Vp=null,Error(o(185));Ui(t,i,u),((Ge&2)===0||t!==Vt)&&(t===Vt&&((Ge&2)===0&&($c|=i),Ot===4&&No(t,Qt)),Sn(t,u),i===1&&Ge===0&&(r.mode&1)===0&&(Zs=_t()+500,wc&&wo()))}function Sn(t,r){var i=t.callbackNode;tP(t,r);var u=ec(t,t===Vt?Qt:0);if(u===0)i!==null&&M0(i),t.callbackNode=null,t.callbackPriority=0;else if(r=u&-u,t.callbackPriority!==r){if(i!=null&&M0(i),r===1)t.tag===0?eD(Kb.bind(null,t)):Dx(Kb.bind(null,t)),qP(function(){(Ge&6)===0&&wo()}),i=null;else{switch(z0(u)){case 1:i=Sf;break;case 4:i=I0;break;case 16:i=ql;break;case 536870912:i=L0;break;default:i=ql}i=tS(i,Yb.bind(null,t))}t.callbackPriority=r,t.callbackNode=i}}function Yb(t,r){if(Vc=-1,Wc=0,(Ge&6)!==0)throw Error(o(327));var i=t.callbackNode;if(ei()&&t.callbackNode!==i)return null;var u=ec(t,t===Vt?Qt:0);if(u===0)return null;if((u&30)!==0||(u&t.expiredLanes)!==0||r)r=Yc(t,u);else{r=u;var p=Ge;Ge|=2;var y=Gb();(Vt!==t||Qt!==r)&&(Hr=null,Zs=_t()+500,ts(t,r));do try{bD();break}catch(O){Xb(t,O)}while(!0);ap(),zc.current=y,Ge=p,kt!==null?r=0:(Vt=null,Qt=0,r=Ot)}if(r!==0){if(r===2&&(p=Cf(t),p!==0&&(u=p,r=Wp(t,p))),r===1)throw i=ga,ts(t,0),No(t,u),Sn(t,_t()),i;if(r===6)No(t,u);else{if(p=t.current.alternate,(u&30)===0&&!wD(p)&&(r=Yc(t,u),r===2&&(y=Cf(t),y!==0&&(u=y,r=Wp(t,y))),r===1))throw i=ga,ts(t,0),No(t,u),Sn(t,_t()),i;switch(t.finishedWork=p,t.finishedLanes=u,r){case 0:case 1:throw Error(o(345));case 2:ns(t,bn,Hr);break;case 3:if(No(t,u),(u&130023424)===u&&(r=Up+500-_t(),10<r)){if(ec(t,0)!==0)break;if(p=t.suspendedLanes,(p&u)!==u){cn(),t.pingedLanes|=t.suspendedLanes&p;break}t.timeoutHandle=qf(ns.bind(null,t,bn,Hr),r);break}ns(t,bn,Hr);break;case 4:if(No(t,u),(u&4194240)===u)break;for(r=t.eventTimes,p=-1;0<u;){var k=31-tr(u);y=1<<k,k=r[k],k>p&&(p=k),u&=~y}if(u=p,u=_t()-u,u=(120>u?120:480>u?480:1080>u?1080:1920>u?1920:3e3>u?3e3:4320>u?4320:1960*yD(u/1960))-u,10<u){t.timeoutHandle=qf(ns.bind(null,t,bn,Hr),u);break}ns(t,bn,Hr);break;case 5:ns(t,bn,Hr);break;default:throw Error(o(329))}}}return Sn(t,_t()),t.callbackNode===i?Yb.bind(null,t):null}function Wp(t,r){var i=va;return t.current.memoizedState.isDehydrated&&(ts(t,r).flags|=256),t=Yc(t,r),t!==2&&(r=bn,bn=i,r!==null&&Yp(r)),t}function Yp(t){bn===null?bn=t:bn.push.apply(bn,t)}function wD(t){for(var r=t;;){if(r.flags&16384){var i=r.updateQueue;if(i!==null&&(i=i.stores,i!==null))for(var u=0;u<i.length;u++){var p=i[u],y=p.getSnapshot;p=p.value;try{if(!nr(y(),p))return!1}catch{return!1}}}if(i=r.child,r.subtreeFlags&16384&&i!==null)i.return=r,r=i;else{if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function No(t,r){for(r&=~Bp,r&=~$c,t.suspendedLanes|=r,t.pingedLanes&=~r,t=t.expirationTimes;0<r;){var i=31-tr(r),u=1<<i;t[i]=-1,r&=~u}}function Kb(t){if((Ge&6)!==0)throw Error(o(327));ei();var r=ec(t,0);if((r&1)===0)return Sn(t,_t()),null;var i=Yc(t,r);if(t.tag!==0&&i===2){var u=Cf(t);u!==0&&(r=u,i=Wp(t,u))}if(i===1)throw i=ga,ts(t,0),No(t,r),Sn(t,_t()),i;if(i===6)throw Error(o(345));return t.finishedWork=t.current.alternate,t.finishedLanes=r,ns(t,bn,Hr),Sn(t,_t()),null}function Kp(t,r){var i=Ge;Ge|=1;try{return t(r)}finally{Ge=i,Ge===0&&(Zs=_t()+500,wc&&wo())}}function es(t){_o!==null&&_o.tag===0&&(Ge&6)===0&&ei();var r=Ge;Ge|=1;var i=$n.transition,u=tt;try{if($n.transition=null,tt=1,t)return t()}finally{tt=u,$n.transition=i,Ge=r,(Ge&6)===0&&wo()}}function Xp(){jn=Js.current,lt(Js)}function ts(t,r){t.finishedWork=null,t.finishedLanes=0;var i=t.timeoutHandle;if(i!==-1&&(t.timeoutHandle=-1,GP(i)),kt!==null)for(i=kt.return;i!==null;){var u=i;switch(np(u),u.tag){case 1:u=u.type.childContextTypes,u!=null&&vc();break;case 3:Gs(),lt(yn),lt(Zt),mp();break;case 5:pp(u);break;case 4:Gs();break;case 13:lt(gt);break;case 19:lt(gt);break;case 10:lp(u.type._context);break;case 22:case 23:Xp()}i=i.return}if(Vt=t,kt=t=ko(t.current,null),Qt=jn=r,Ot=0,ga=null,Bp=$c=Zo=0,bn=va=null,qo!==null){for(r=0;r<qo.length;r++)if(i=qo[r],u=i.interleaved,u!==null){i.interleaved=null;var p=u.next,y=i.pending;if(y!==null){var k=y.next;y.next=p,u.next=k}i.pending=u}qo=null}return t}function Xb(t,r){do{var i=kt;try{if(ap(),Rc.current=Ac,Tc){for(var u=vt.memoizedState;u!==null;){var p=u.queue;p!==null&&(p.pending=null),u=u.next}Tc=!1}if(Jo=0,Ht=At=vt=null,ua=!1,da=0,$p.current=null,i===null||i.return===null){Ot=1,ga=r,kt=null;break}e:{var y=t,k=i.return,O=i,I=r;if(r=Qt,O.flags|=32768,I!==null&&typeof I=="object"&&typeof I.then=="function"){var W=I,se=O,ae=se.tag;if((se.mode&1)===0&&(ae===0||ae===11||ae===15)){var oe=se.alternate;oe?(se.updateQueue=oe.updateQueue,se.memoizedState=oe.memoizedState,se.lanes=oe.lanes):(se.updateQueue=null,se.memoizedState=null)}var ve=wb(k);if(ve!==null){ve.flags&=-257,xb(ve,k,O,y,r),ve.mode&1&&yb(y,W,r),r=ve,I=W;var xe=r.updateQueue;if(xe===null){var Se=new Set;Se.add(I),r.updateQueue=Se}else xe.add(I);break e}else{if((r&1)===0){yb(y,W,r),Gp();break e}I=Error(o(426))}}else if(dt&&O.mode&1){var Et=wb(k);if(Et!==null){(Et.flags&65536)===0&&(Et.flags|=256),xb(Et,k,O,y,r),sp(qs(I,O));break e}}y=I=qs(I,O),Ot!==4&&(Ot=2),va===null?va=[y]:va.push(y),y=k;do{switch(y.tag){case 3:y.flags|=65536,r&=-r,y.lanes|=r;var $=gb(y,I,r);Hx(y,$);break e;case 1:O=I;var L=y.type,U=y.stateNode;if((y.flags&128)===0&&(typeof L.getDerivedStateFromError=="function"||U!==null&&typeof U.componentDidCatch=="function"&&(Co===null||!Co.has(U)))){y.flags|=65536,r&=-r,y.lanes|=r;var de=vb(y,O,r);Hx(y,de);break e}}y=y.return}while(y!==null)}Qb(i)}catch(Ce){r=Ce,kt===i&&i!==null&&(kt=i=i.return);continue}break}while(!0)}function Gb(){var t=zc.current;return zc.current=Ac,t===null?Ac:t}function Gp(){(Ot===0||Ot===3||Ot===2)&&(Ot=4),Vt===null||(Zo&268435455)===0&&($c&268435455)===0||No(Vt,Qt)}function Yc(t,r){var i=Ge;Ge|=2;var u=Gb();(Vt!==t||Qt!==r)&&(Hr=null,ts(t,r));do try{xD();break}catch(p){Xb(t,p)}while(!0);if(ap(),Ge=i,zc.current=u,kt!==null)throw Error(o(261));return Vt=null,Qt=0,Ot}function xD(){for(;kt!==null;)qb(kt)}function bD(){for(;kt!==null&&!YT();)qb(kt)}function qb(t){var r=eS(t.alternate,t,jn);t.memoizedProps=t.pendingProps,r===null?Qb(t):kt=r,$p.current=null}function Qb(t){var r=t;do{var i=r.alternate;if(t=r.return,(r.flags&32768)===0){if(i=pD(i,r,jn),i!==null){kt=i;return}}else{if(i=hD(i,r),i!==null){i.flags&=32767,kt=i;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{Ot=6,kt=null;return}}if(r=r.sibling,r!==null){kt=r;return}kt=r=t}while(r!==null);Ot===0&&(Ot=5)}function ns(t,r,i){var u=tt,p=$n.transition;try{$n.transition=null,tt=1,SD(t,r,i,u)}finally{$n.transition=p,tt=u}return null}function SD(t,r,i,u){do ei();while(_o!==null);if((Ge&6)!==0)throw Error(o(327));i=t.finishedWork;var p=t.finishedLanes;if(i===null)return null;if(t.finishedWork=null,t.finishedLanes=0,i===t.current)throw Error(o(177));t.callbackNode=null,t.callbackPriority=0;var y=i.lanes|i.childLanes;if(nP(t,y),t===Vt&&(kt=Vt=null,Qt=0),(i.subtreeFlags&2064)===0&&(i.flags&2064)===0||Uc||(Uc=!0,tS(ql,function(){return ei(),null})),y=(i.flags&15990)!==0,(i.subtreeFlags&15990)!==0||y){y=$n.transition,$n.transition=null;var k=tt;tt=1;var O=Ge;Ge|=4,$p.current=null,gD(t,i),Bb(i,t),UP(Xf),rc=!!Kf,Xf=Kf=null,t.current=i,vD(i),KT(),Ge=O,tt=k,$n.transition=y}else t.current=i;if(Uc&&(Uc=!1,_o=t,Hc=p),y=t.pendingLanes,y===0&&(Co=null),qT(i.stateNode),Sn(t,_t()),r!==null)for(u=t.onRecoverableError,i=0;i<r.length;i++)p=r[i],u(p.value,{componentStack:p.stack,digest:p.digest});if(Bc)throw Bc=!1,t=Hp,Hp=null,t;return(Hc&1)!==0&&t.tag!==0&&ei(),y=t.pendingLanes,(y&1)!==0?t===Vp?ya++:(ya=0,Vp=t):ya=0,wo(),null}function ei(){if(_o!==null){var t=z0(Hc),r=$n.transition,i=tt;try{if($n.transition=null,tt=16>t?16:t,_o===null)var u=!1;else{if(t=_o,_o=null,Hc=0,(Ge&6)!==0)throw Error(o(331));var p=Ge;for(Ge|=4,ye=t.current;ye!==null;){var y=ye,k=y.child;if((ye.flags&16)!==0){var O=y.deletions;if(O!==null){for(var I=0;I<O.length;I++){var W=O[I];for(ye=W;ye!==null;){var se=ye;switch(se.tag){case 0:case 11:case 15:ma(8,se,y)}var ae=se.child;if(ae!==null)ae.return=se,ye=ae;else for(;ye!==null;){se=ye;var oe=se.sibling,ve=se.return;if(Ib(se),se===W){ye=null;break}if(oe!==null){oe.return=ve,ye=oe;break}ye=ve}}}var xe=y.alternate;if(xe!==null){var Se=xe.child;if(Se!==null){xe.child=null;do{var Et=Se.sibling;Se.sibling=null,Se=Et}while(Se!==null)}}ye=y}}if((y.subtreeFlags&2064)!==0&&k!==null)k.return=y,ye=k;else e:for(;ye!==null;){if(y=ye,(y.flags&2048)!==0)switch(y.tag){case 0:case 11:case 15:ma(9,y,y.return)}var $=y.sibling;if($!==null){$.return=y.return,ye=$;break e}ye=y.return}}var L=t.current;for(ye=L;ye!==null;){k=ye;var U=k.child;if((k.subtreeFlags&2064)!==0&&U!==null)U.return=k,ye=U;else e:for(k=L;ye!==null;){if(O=ye,(O.flags&2048)!==0)try{switch(O.tag){case 0:case 11:case 15:Fc(9,O)}}catch(Ce){bt(O,O.return,Ce)}if(O===k){ye=null;break e}var de=O.sibling;if(de!==null){de.return=O.return,ye=de;break e}ye=O.return}}if(Ge=p,wo(),xr&&typeof xr.onPostCommitFiberRoot=="function")try{xr.onPostCommitFiberRoot(Ql,t)}catch{}u=!0}return u}finally{tt=i,$n.transition=r}}return!1}function Jb(t,r,i){r=qs(i,r),r=gb(t,r,1),t=bo(t,r,1),r=cn(),t!==null&&(Ui(t,1,r),Sn(t,r))}function bt(t,r,i){if(t.tag===3)Jb(t,t,i);else for(;r!==null;){if(r.tag===3){Jb(r,t,i);break}else if(r.tag===1){var u=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Co===null||!Co.has(u))){t=qs(i,t),t=vb(r,t,1),r=bo(r,t,1),t=cn(),r!==null&&(Ui(r,1,t),Sn(r,t));break}}r=r.return}}function CD(t,r,i){var u=t.pingCache;u!==null&&u.delete(r),r=cn(),t.pingedLanes|=t.suspendedLanes&i,Vt===t&&(Qt&i)===i&&(Ot===4||Ot===3&&(Qt&130023424)===Qt&&500>_t()-Up?ts(t,0):Bp|=i),Sn(t,r)}function Zb(t,r){r===0&&((t.mode&1)===0?r=1:(r=Zl,Zl<<=1,(Zl&130023424)===0&&(Zl=4194304)));var i=cn();t=$r(t,r),t!==null&&(Ui(t,r,i),Sn(t,i))}function _D(t){var r=t.memoizedState,i=0;r!==null&&(i=r.retryLane),Zb(t,i)}function ED(t,r){var i=0;switch(t.tag){case 13:var u=t.stateNode,p=t.memoizedState;p!==null&&(i=p.retryLane);break;case 19:u=t.stateNode;break;default:throw Error(o(314))}u!==null&&u.delete(r),Zb(t,i)}var eS;eS=function(t,r,i){if(t!==null)if(t.memoizedProps!==r.pendingProps||yn.current)xn=!0;else{if((t.lanes&i)===0&&(r.flags&128)===0)return xn=!1,fD(t,r,i);xn=(t.flags&131072)!==0}else xn=!1,dt&&(r.flags&1048576)!==0&&Ax(r,bc,r.index);switch(r.lanes=0,r.tag){case 2:var u=r.type;Ic(t,r),t=r.pendingProps;var p=Us(r,Zt.current);Xs(r,i),p=yp(null,r,u,t,p,i);var y=xp();return r.flags|=1,typeof p=="object"&&p!==null&&typeof p.render=="function"&&p.$$typeof===void 0?(r.tag=1,r.memoizedState=null,r.updateQueue=null,wn(u)?(y=!0,yc(r)):y=!1,r.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,dp(r),p.updater=Oc,r.stateNode=p,p._reactInternals=r,Np(r,u,t,i),r=Tp(null,r,u,!0,y,i)):(r.tag=0,dt&&y&&tp(r),ln(null,r,p,i),r=r.child),r;case 16:u=r.elementType;e:{switch(Ic(t,r),t=r.pendingProps,p=u._init,u=p(u._payload),r.type=u,p=r.tag=kD(u),t=or(u,t),p){case 0:r=Rp(null,r,u,t,i);break e;case 1:r=Nb(null,r,u,t,i);break e;case 11:r=bb(null,r,u,t,i);break e;case 14:r=Sb(null,r,u,or(u.type,t),i);break e}throw Error(o(306,u,""))}return r;case 0:return u=r.type,p=r.pendingProps,p=r.elementType===u?p:or(u,p),Rp(t,r,u,p,i);case 1:return u=r.type,p=r.pendingProps,p=r.elementType===u?p:or(u,p),Nb(t,r,u,p,i);case 3:e:{if(kb(r),t===null)throw Error(o(387));u=r.pendingProps,y=r.memoizedState,p=y.element,Ux(t,r),kc(r,u,null,i);var k=r.memoizedState;if(u=k.element,y.isDehydrated)if(y={element:u,isDehydrated:!1,cache:k.cache,pendingSuspenseBoundaries:k.pendingSuspenseBoundaries,transitions:k.transitions},r.updateQueue.baseState=y,r.memoizedState=y,r.flags&256){p=qs(Error(o(423)),r),r=jb(t,r,u,i,p);break e}else if(u!==p){p=qs(Error(o(424)),r),r=jb(t,r,u,i,p);break e}else for(kn=go(r.stateNode.containerInfo.firstChild),Nn=r,dt=!0,rr=null,i=$x(r,null,u,i),r.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(Ws(),u===p){r=Ur(t,r,i);break e}ln(t,r,u,i)}r=r.child}return r;case 5:return Wx(r),t===null&&op(r),u=r.type,p=r.pendingProps,y=t!==null?t.memoizedProps:null,k=p.children,Gf(u,p)?k=null:y!==null&&Gf(u,y)&&(r.flags|=32),Eb(t,r),ln(t,r,k,i),r.child;case 6:return t===null&&op(r),null;case 13:return Rb(t,r,i);case 4:return fp(r,r.stateNode.containerInfo),u=r.pendingProps,t===null?r.child=Ys(r,null,u,i):ln(t,r,u,i),r.child;case 11:return u=r.type,p=r.pendingProps,p=r.elementType===u?p:or(u,p),bb(t,r,u,p,i);case 7:return ln(t,r,r.pendingProps,i),r.child;case 8:return ln(t,r,r.pendingProps.children,i),r.child;case 12:return ln(t,r,r.pendingProps.children,i),r.child;case 10:e:{if(u=r.type._context,p=r.pendingProps,y=r.memoizedProps,k=p.value,ot(_c,u._currentValue),u._currentValue=k,y!==null)if(nr(y.value,k)){if(y.children===p.children&&!yn.current){r=Ur(t,r,i);break e}}else for(y=r.child,y!==null&&(y.return=r);y!==null;){var O=y.dependencies;if(O!==null){k=y.child;for(var I=O.firstContext;I!==null;){if(I.context===u){if(y.tag===1){I=Br(-1,i&-i),I.tag=2;var W=y.updateQueue;if(W!==null){W=W.shared;var se=W.pending;se===null?I.next=I:(I.next=se.next,se.next=I),W.pending=I}}y.lanes|=i,I=y.alternate,I!==null&&(I.lanes|=i),cp(y.return,i,r),O.lanes|=i;break}I=I.next}}else if(y.tag===10)k=y.type===r.type?null:y.child;else if(y.tag===18){if(k=y.return,k===null)throw Error(o(341));k.lanes|=i,O=k.alternate,O!==null&&(O.lanes|=i),cp(k,i,r),k=y.sibling}else k=y.child;if(k!==null)k.return=y;else for(k=y;k!==null;){if(k===r){k=null;break}if(y=k.sibling,y!==null){y.return=k.return,k=y;break}k=k.return}y=k}ln(t,r,p.children,i),r=r.child}return r;case 9:return p=r.type,u=r.pendingProps.children,Xs(r,i),p=Fn(p),u=u(p),r.flags|=1,ln(t,r,u,i),r.child;case 14:return u=r.type,p=or(u,r.pendingProps),p=or(u.type,p),Sb(t,r,u,p,i);case 15:return Cb(t,r,r.type,r.pendingProps,i);case 17:return u=r.type,p=r.pendingProps,p=r.elementType===u?p:or(u,p),Ic(t,r),r.tag=1,wn(u)?(t=!0,yc(r)):t=!1,Xs(r,i),hb(r,u,p),Np(r,u,p,i),Tp(null,r,u,!0,t,i);case 19:return Pb(t,r,i);case 22:return _b(t,r,i)}throw Error(o(156,r.tag))};function tS(t,r){return O0(t,r)}function ND(t,r,i,u){this.tag=t,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bn(t,r,i,u){return new ND(t,r,i,u)}function qp(t){return t=t.prototype,!(!t||!t.isReactComponent)}function kD(t){if(typeof t=="function")return qp(t)?1:0;if(t!=null){if(t=t.$$typeof,t===te)return 11;if(t===ce)return 14}return 2}function ko(t,r){var i=t.alternate;return i===null?(i=Bn(t.tag,r,t.key,t.mode),i.elementType=t.elementType,i.type=t.type,i.stateNode=t.stateNode,i.alternate=t,t.alternate=i):(i.pendingProps=r,i.type=t.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=t.flags&14680064,i.childLanes=t.childLanes,i.lanes=t.lanes,i.child=t.child,i.memoizedProps=t.memoizedProps,i.memoizedState=t.memoizedState,i.updateQueue=t.updateQueue,r=t.dependencies,i.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},i.sibling=t.sibling,i.index=t.index,i.ref=t.ref,i}function Kc(t,r,i,u,p,y){var k=2;if(u=t,typeof t=="function")qp(t)&&(k=1);else if(typeof t=="string")k=5;else e:switch(t){case D:return rs(i.children,p,y,r);case F:k=8,p|=8;break;case V:return t=Bn(12,i,r,p|2),t.elementType=V,t.lanes=y,t;case X:return t=Bn(13,i,r,p),t.elementType=X,t.lanes=y,t;case q:return t=Bn(19,i,r,p),t.elementType=q,t.lanes=y,t;case Q:return Xc(i,p,y,r);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Y:k=10;break e;case H:k=9;break e;case te:k=11;break e;case ce:k=14;break e;case ee:k=16,u=null;break e}throw Error(o(130,t==null?t:typeof t,""))}return r=Bn(k,i,r,p),r.elementType=t,r.type=u,r.lanes=y,r}function rs(t,r,i,u){return t=Bn(7,t,u,r),t.lanes=i,t}function Xc(t,r,i,u){return t=Bn(22,t,u,r),t.elementType=Q,t.lanes=i,t.stateNode={isHidden:!1},t}function Qp(t,r,i){return t=Bn(6,t,null,r),t.lanes=i,t}function Jp(t,r,i){return r=Bn(4,t.children!==null?t.children:[],t.key,r),r.lanes=i,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}function jD(t,r,i,u,p){this.tag=r,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=_f(0),this.expirationTimes=_f(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_f(0),this.identifierPrefix=u,this.onRecoverableError=p,this.mutableSourceEagerHydrationData=null}function Zp(t,r,i,u,p,y,k,O,I){return t=new jD(t,r,i,O,I),r===1?(r=1,y===!0&&(r|=8)):r=0,y=Bn(3,null,null,r),t.current=y,y.stateNode=t,y.memoizedState={element:u,isDehydrated:i,cache:null,transitions:null,pendingSuspenseBoundaries:null},dp(y),t}function RD(t,r,i){var u=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:A,key:u==null?null:""+u,children:t,containerInfo:r,implementation:i}}function nS(t){if(!t)return yo;t=t._reactInternals;e:{if(Wo(t)!==t||t.tag!==1)throw Error(o(170));var r=t;do{switch(r.tag){case 3:r=r.stateNode.context;break e;case 1:if(wn(r.type)){r=r.stateNode.__reactInternalMemoizedMergedChildContext;break e}}r=r.return}while(r!==null);throw Error(o(171))}if(t.tag===1){var i=t.type;if(wn(i))return Tx(t,i,r)}return r}function rS(t,r,i,u,p,y,k,O,I){return t=Zp(i,u,!0,t,p,y,k,O,I),t.context=nS(null),i=t.current,u=cn(),p=Eo(i),y=Br(u,p),y.callback=r??null,bo(i,y,p),t.current.lanes=p,Ui(t,p,u),Sn(t,u),t}function Gc(t,r,i,u){var p=r.current,y=cn(),k=Eo(p);return i=nS(i),r.context===null?r.context=i:r.pendingContext=i,r=Br(y,k),r.payload={element:t},u=u===void 0?null:u,u!==null&&(r.callback=u),t=bo(p,r,k),t!==null&&(ar(t,p,k,y),Nc(t,p,k)),k}function qc(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function oS(t,r){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var i=t.retryLane;t.retryLane=i!==0&&i<r?i:r}}function eh(t,r){oS(t,r),(t=t.alternate)&&oS(t,r)}function TD(){return null}var sS=typeof reportError=="function"?reportError:function(t){console.error(t)};function th(t){this._internalRoot=t}Qc.prototype.render=th.prototype.render=function(t){var r=this._internalRoot;if(r===null)throw Error(o(409));Gc(t,r,null,null)},Qc.prototype.unmount=th.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var r=t.containerInfo;es(function(){Gc(null,t,null,null)}),r[Ir]=null}};function Qc(t){this._internalRoot=t}Qc.prototype.unstable_scheduleHydration=function(t){if(t){var r=U0();t={blockedOn:null,target:t,priority:r};for(var i=0;i<po.length&&r!==0&&r<po[i].priority;i++);po.splice(i,0,t),i===0&&W0(t)}};function nh(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Jc(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function iS(){}function PD(t,r,i,u,p){if(p){if(typeof u=="function"){var y=u;u=function(){var W=qc(k);y.call(W)}}var k=rS(r,u,t,0,null,!1,!1,"",iS);return t._reactRootContainer=k,t[Ir]=k.current,na(t.nodeType===8?t.parentNode:t),es(),k}for(;p=t.lastChild;)t.removeChild(p);if(typeof u=="function"){var O=u;u=function(){var W=qc(I);O.call(W)}}var I=Zp(t,0,!1,null,null,!1,!1,"",iS);return t._reactRootContainer=I,t[Ir]=I.current,na(t.nodeType===8?t.parentNode:t),es(function(){Gc(r,I,i,u)}),I}function Zc(t,r,i,u,p){var y=i._reactRootContainer;if(y){var k=y;if(typeof p=="function"){var O=p;p=function(){var I=qc(k);O.call(I)}}Gc(r,k,t,p)}else k=PD(i,r,t,p,u);return qc(k)}$0=function(t){switch(t.tag){case 3:var r=t.stateNode;if(r.current.memoizedState.isDehydrated){var i=Bi(r.pendingLanes);i!==0&&(Ef(r,i|1),Sn(r,_t()),(Ge&6)===0&&(Zs=_t()+500,wo()))}break;case 13:es(function(){var u=$r(t,1);if(u!==null){var p=cn();ar(u,t,1,p)}}),eh(t,1)}},Nf=function(t){if(t.tag===13){var r=$r(t,134217728);if(r!==null){var i=cn();ar(r,t,134217728,i)}eh(t,134217728)}},B0=function(t){if(t.tag===13){var r=Eo(t),i=$r(t,r);if(i!==null){var u=cn();ar(i,t,r,u)}eh(t,r)}},U0=function(){return tt},H0=function(t,r){var i=tt;try{return tt=t,r()}finally{tt=i}},Ve=function(t,r,i){switch(r){case"input":if(wt(t,i),r=i.name,i.type==="radio"&&r!=null){for(i=t;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll("input[name="+JSON.stringify(""+r)+'][type="radio"]'),r=0;r<i.length;r++){var u=i[r];if(u!==t&&u.form===t.form){var p=gc(u);if(!p)throw Error(o(90));ue(u),wt(u,p)}}}break;case"textarea":Pr(t,i);break;case"select":r=i.value,r!=null&&Jt(t,!!i.multiple,r,!1)}},$e=Kp,Le=es;var DD={usingClientEntryPoint:!1,Events:[sa,$s,gc,ge,Ae,Kp]},wa={findFiberByHostInstance:Yo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},AD={bundleType:wa.bundleType,version:wa.version,rendererPackageName:wa.rendererPackageName,rendererConfig:wa.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:R.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=D0(t),t===null?null:t.stateNode},findFiberByHostInstance:wa.findFiberByHostInstance||TD,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var eu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!eu.isDisabled&&eu.supportsFiber)try{Ql=eu.inject(AD),xr=eu}catch{}}return un.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=DD,un.createPortal=function(t,r){var i=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!nh(r))throw Error(o(200));return RD(t,r,null,i)},un.createRoot=function(t,r){if(!nh(t))throw Error(o(299));var i=!1,u="",p=sS;return r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(u=r.identifierPrefix),r.onRecoverableError!==void 0&&(p=r.onRecoverableError)),r=Zp(t,1,!1,null,null,i,!1,u,p),t[Ir]=r.current,na(t.nodeType===8?t.parentNode:t),new th(r)},un.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var r=t._reactInternals;if(r===void 0)throw typeof t.render=="function"?Error(o(188)):(t=Object.keys(t).join(","),Error(o(268,t)));return t=D0(r),t=t===null?null:t.stateNode,t},un.flushSync=function(t){return es(t)},un.hydrate=function(t,r,i){if(!Jc(r))throw Error(o(200));return Zc(null,t,r,!0,i)},un.hydrateRoot=function(t,r,i){if(!nh(t))throw Error(o(405));var u=i!=null&&i.hydratedSources||null,p=!1,y="",k=sS;if(i!=null&&(i.unstable_strictMode===!0&&(p=!0),i.identifierPrefix!==void 0&&(y=i.identifierPrefix),i.onRecoverableError!==void 0&&(k=i.onRecoverableError)),r=rS(r,null,t,1,i??null,p,!1,y,k),t[Ir]=r.current,na(t),u)for(t=0;t<u.length;t++)i=u[t],p=i._getVersion,p=p(i._source),r.mutableSourceEagerHydrationData==null?r.mutableSourceEagerHydrationData=[i,p]:r.mutableSourceEagerHydrationData.push(i,p);return new Qc(r)},un.render=function(t,r,i){if(!Jc(r))throw Error(o(200));return Zc(null,t,r,!1,i)},un.unmountComponentAtNode=function(t){if(!Jc(t))throw Error(o(40));return t._reactRootContainer?(es(function(){Zc(null,null,t,!1,function(){t._reactRootContainer=null,t[Ir]=null})}),!0):!1},un.unstable_batchedUpdates=Kp,un.unstable_renderSubtreeIntoContainer=function(t,r,i,u){if(!Jc(i))throw Error(o(200));if(t==null||t._reactInternals===void 0)throw Error(o(38));return Zc(t,r,i,!1,u)},un.version="18.3.1-next-f1338f8080-20240426",un}var fh;function ph(){if(fh)return su.exports;fh=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),su.exports=pS(),su.exports}var hh;function hS(){if(hh)return xa;hh=1;var e=ph();return xa.createRoot=e.createRoot,xa.hydrateRoot=e.hydrateRoot,xa}var mS=hS(),ba=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},gS={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)},vS=(b0=class{constructor(){Xe(this,no,gS);Xe(this,bf,!1)}setTimeoutProvider(e){Oe(this,no,e)}setTimeout(e,n){return J(this,no).setTimeout(e,n)}clearTimeout(e){J(this,no).clearTimeout(e)}setInterval(e,n){return J(this,no).setInterval(e,n)}clearInterval(e){J(this,no).clearInterval(e)}},no=new WeakMap,bf=new WeakMap,b0),lu=new vS;function yS(e){setTimeout(e,0)}var Sa=typeof window>"u"||"Deno"in globalThis;function Un(){}function wS(e,n){return typeof e=="function"?e(n):e}function xS(e){return typeof e=="number"&&e>=0&&e!==1/0}function bS(e,n){return Math.max(e+(n||0)-Date.now(),0)}function cu(e,n){return typeof e=="function"?e(n):e}function SS(e,n){return typeof e=="function"?e(n):e}function mh(e,n){const{type:o="all",exact:s,fetchStatus:a,predicate:l,queryKey:f,stale:d}=e;if(f){if(s){if(n.queryHash!==uu(f,n.options))return!1}else if(!oi(n.queryKey,f))return!1}if(o!=="all"){const h=n.isActive();if(o==="active"&&!h||o==="inactive"&&h)return!1}return!(typeof d=="boolean"&&n.isStale()!==d||a&&a!==n.state.fetchStatus||l&&!l(n))}function gh(e,n){const{exact:o,status:s,predicate:a,mutationKey:l}=e;if(l){if(!n.options.mutationKey)return!1;if(o){if(ri(n.options.mutationKey)!==ri(l))return!1}else if(!oi(n.options.mutationKey,l))return!1}return!(s&&n.state.status!==s||a&&!a(n))}function uu(e,n){return((n==null?void 0:n.queryKeyHashFn)||ri)(e)}function ri(e){return JSON.stringify(e,(n,o)=>du(o)?Object.keys(o).sort().reduce((s,a)=>(s[a]=o[a],s),{}):o)}function oi(e,n){return e===n?!0:typeof e!=typeof n?!1:e&&n&&typeof e=="object"&&typeof n=="object"?Object.keys(n).every(o=>oi(e[o],n[o])):!1}var CS=Object.prototype.hasOwnProperty;function vh(e,n){if(e===n)return e;const o=yh(e)&&yh(n);if(!o&&!(du(e)&&du(n)))return n;const a=(o?e:Object.keys(e)).length,l=o?n:Object.keys(n),f=l.length,d=o?new Array(f):{};let h=0;for(let v=0;v<f;v++){const w=o?v:l[v],m=e[w],b=n[w];if(m===b){d[w]=m,(o?v<a:CS.call(e,w))&&h++;continue}if(m===null||b===null||typeof m!="object"||typeof b!="object"){d[w]=b;continue}const E=vh(m,b);d[w]=E,E===m&&h++}return a===f&&h===a?e:d}function yh(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function du(e){if(!wh(e))return!1;const n=e.constructor;if(n===void 0)return!0;const o=n.prototype;return!(!wh(o)||!o.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function wh(e){return Object.prototype.toString.call(e)==="[object Object]"}function _S(e){return new Promise(n=>{lu.setTimeout(n,e)})}function ES(e,n,o){return typeof o.structuralSharing=="function"?o.structuralSharing(e,n):o.structuralSharing!==!1?vh(e,n):n}function NS(e,n,o=0){const s=[...e,n];return o&&s.length>o?s.slice(1):s}function kS(e,n,o=0){const s=[n,...e];return o&&s.length>o?s.slice(0,-1):s}var fu=Symbol();function xh(e,n){return!e.queryFn&&(n!=null&&n.initialPromise)?()=>n.initialPromise:!e.queryFn||e.queryFn===fu?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var jS=(S0=class extends ba{constructor(){super();Xe(this,zo);Xe(this,ro);Xe(this,Es);Oe(this,Es,n=>{if(!Sa&&window.addEventListener){const o=()=>n();return window.addEventListener("visibilitychange",o,!1),()=>{window.removeEventListener("visibilitychange",o)}}})}onSubscribe(){J(this,ro)||this.setEventListener(J(this,Es))}onUnsubscribe(){var n;this.hasListeners()||((n=J(this,ro))==null||n.call(this),Oe(this,ro,void 0))}setEventListener(n){var o;Oe(this,Es,n),(o=J(this,ro))==null||o.call(this),Oe(this,ro,n(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(n){J(this,zo)!==n&&(Oe(this,zo,n),this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(o=>{o(n)})}isFocused(){var n;return typeof J(this,zo)=="boolean"?J(this,zo):((n=globalThis.document)==null?void 0:n.visibilityState)!=="hidden"}},zo=new WeakMap,ro=new WeakMap,Es=new WeakMap,S0),bh=new jS;function RS(){let e,n;const o=new Promise((a,l)=>{e=a,n=l});o.status="pending",o.catch(()=>{});function s(a){Object.assign(o,a),delete o.resolve,delete o.reject}return o.resolve=a=>{s({status:"fulfilled",value:a}),e(a)},o.reject=a=>{s({status:"rejected",reason:a}),n(a)},o}var TS=yS;function PS(){let e=[],n=0,o=d=>{d()},s=d=>{d()},a=TS;const l=d=>{n?e.push(d):a(()=>{o(d)})},f=()=>{const d=e;e=[],d.length&&a(()=>{s(()=>{d.forEach(h=>{o(h)})})})};return{batch:d=>{let h;n++;try{h=d()}finally{n--,n||f()}return h},batchCalls:d=>(...h)=>{l(()=>{d(...h)})},schedule:l,setNotifyFunction:d=>{o=d},setBatchNotifyFunction:d=>{s=d},setScheduler:d=>{a=d}}}var on=PS(),DS=(C0=class extends ba{constructor(){super();Xe(this,Ns,!0);Xe(this,oo);Xe(this,ks);Oe(this,ks,n=>{if(!Sa&&window.addEventListener){const o=()=>n(!0),s=()=>n(!1);return window.addEventListener("online",o,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",o),window.removeEventListener("offline",s)}}})}onSubscribe(){J(this,oo)||this.setEventListener(J(this,ks))}onUnsubscribe(){var n;this.hasListeners()||((n=J(this,oo))==null||n.call(this),Oe(this,oo,void 0))}setEventListener(n){var o;Oe(this,ks,n),(o=J(this,oo))==null||o.call(this),Oe(this,oo,n(this.setOnline.bind(this)))}setOnline(n){J(this,Ns)!==n&&(Oe(this,Ns,n),this.listeners.forEach(s=>{s(n)}))}isOnline(){return J(this,Ns)}},Ns=new WeakMap,oo=new WeakMap,ks=new WeakMap,C0),Ca=new DS;function AS(e){return Math.min(1e3*2**e,3e4)}function Sh(e){return(e??"online")==="online"?Ca.isOnline():!0}var pu=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Ch(e){let n=!1,o=0,s;const a=RS(),l=()=>a.status!=="pending",f=x=>{var S;if(!l()){const C=new pu(x);b(C),(S=e.onCancel)==null||S.call(e,C)}},d=()=>{n=!0},h=()=>{n=!1},v=()=>bh.isFocused()&&(e.networkMode==="always"||Ca.isOnline())&&e.canRun(),w=()=>Sh(e.networkMode)&&e.canRun(),m=x=>{l()||(s==null||s(),a.resolve(x))},b=x=>{l()||(s==null||s(),a.reject(x))},E=()=>new Promise(x=>{var S;s=C=>{(l()||v())&&x(C)},(S=e.onPause)==null||S.call(e)}).then(()=>{var x;s=void 0,l()||(x=e.onContinue)==null||x.call(e)}),j=()=>{if(l())return;let x;const S=o===0?e.initialPromise:void 0;try{x=S??e.fn()}catch(C){x=Promise.reject(C)}Promise.resolve(x).then(m).catch(C=>{var A;if(l())return;const N=e.retry??(Sa?0:3),_=e.retryDelay??AS,R=typeof _=="function"?_(o,C):_,P=N===!0||typeof N=="number"&&o<N||typeof N=="function"&&N(o,C);if(n||!P){b(C);return}o++,(A=e.onFail)==null||A.call(e,o,C),_S(R).then(()=>v()?void 0:E()).then(()=>{n?b(C):j()})})};return{promise:a,status:()=>a.status,cancel:f,continue:()=>(s==null||s(),a),cancelRetry:d,continueRetry:h,canStart:w,start:()=>(w()?j():E().then(j),a)}}var _h=(_0=class{constructor(){Xe(this,$o)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),xS(this.gcTime)&&Oe(this,$o,lu.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Sa?1/0:300*1e3))}clearGcTimeout(){J(this,$o)&&(lu.clearTimeout(J(this,$o)),Oe(this,$o,void 0))}},$o=new WeakMap,_0),OS=(E0=class extends _h{constructor(n){super();Xe(this,Qn);Xe(this,Bo);Xe(this,js);Xe(this,An);Xe(this,Uo);Xe(this,zt);Xe(this,Li);Xe(this,Ho);Oe(this,Ho,!1),Oe(this,Li,n.defaultOptions),this.setOptions(n.options),this.observers=[],Oe(this,Uo,n.client),Oe(this,An,J(this,Uo).getQueryCache()),this.queryKey=n.queryKey,this.queryHash=n.queryHash,Oe(this,Bo,Nh(this.options)),this.state=n.state??J(this,Bo),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var n;return(n=J(this,zt))==null?void 0:n.promise}setOptions(n){if(this.options={...J(this,Li),...n},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const o=Nh(this.options);o.data!==void 0&&(this.setState(Eh(o.data,o.dataUpdatedAt)),Oe(this,Bo,o))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&J(this,An).remove(this)}setData(n,o){const s=ES(this.state.data,n,this.options);return rn(this,Qn,Vr).call(this,{data:s,type:"success",dataUpdatedAt:o==null?void 0:o.updatedAt,manual:o==null?void 0:o.manual}),s}setState(n,o){rn(this,Qn,Vr).call(this,{type:"setState",state:n,setStateOptions:o})}cancel(n){var s,a;const o=(s=J(this,zt))==null?void 0:s.promise;return(a=J(this,zt))==null||a.cancel(n),o?o.then(Un).catch(Un):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(J(this,Bo))}isActive(){return this.observers.some(n=>SS(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===fu||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>cu(n.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(n=>n.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(n=0){return this.state.data===void 0?!0:n==="static"?!1:this.state.isInvalidated?!0:!bS(this.state.dataUpdatedAt,n)}onFocus(){var o;const n=this.observers.find(s=>s.shouldFetchOnWindowFocus());n==null||n.refetch({cancelRefetch:!1}),(o=J(this,zt))==null||o.continue()}onOnline(){var o;const n=this.observers.find(s=>s.shouldFetchOnReconnect());n==null||n.refetch({cancelRefetch:!1}),(o=J(this,zt))==null||o.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),J(this,An).notify({type:"observerAdded",query:this,observer:n}))}removeObserver(n){this.observers.includes(n)&&(this.observers=this.observers.filter(o=>o!==n),this.observers.length||(J(this,zt)&&(J(this,Ho)?J(this,zt).cancel({revert:!0}):J(this,zt).cancelRetry()),this.scheduleGc()),J(this,An).notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||rn(this,Qn,Vr).call(this,{type:"invalidate"})}async fetch(n,o){var h,v,w,m,b,E,j,x,S,C,N,_;if(this.state.fetchStatus!=="idle"&&((h=J(this,zt))==null?void 0:h.status())!=="rejected"){if(this.state.data!==void 0&&(o!=null&&o.cancelRefetch))this.cancel({silent:!0});else if(J(this,zt))return J(this,zt).continueRetry(),J(this,zt).promise}if(n&&this.setOptions(n),!this.options.queryFn){const R=this.observers.find(P=>P.options.queryFn);R&&this.setOptions(R.options)}const s=new AbortController,a=R=>{Object.defineProperty(R,"signal",{enumerable:!0,get:()=>(Oe(this,Ho,!0),s.signal)})},l=()=>{const R=xh(this.options,o),A=(()=>{const D={client:J(this,Uo),queryKey:this.queryKey,meta:this.meta};return a(D),D})();return Oe(this,Ho,!1),this.options.persister?this.options.persister(R,A,this):R(A)},d=(()=>{const R={fetchOptions:o,options:this.options,queryKey:this.queryKey,client:J(this,Uo),state:this.state,fetchFn:l};return a(R),R})();(v=this.options.behavior)==null||v.onFetch(d,this),Oe(this,js,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((w=d.fetchOptions)==null?void 0:w.meta))&&rn(this,Qn,Vr).call(this,{type:"fetch",meta:(m=d.fetchOptions)==null?void 0:m.meta}),Oe(this,zt,Ch({initialPromise:o==null?void 0:o.initialPromise,fn:d.fetchFn,onCancel:R=>{R instanceof pu&&R.revert&&this.setState({...J(this,js),fetchStatus:"idle"}),s.abort()},onFail:(R,P)=>{rn(this,Qn,Vr).call(this,{type:"failed",failureCount:R,error:P})},onPause:()=>{rn(this,Qn,Vr).call(this,{type:"pause"})},onContinue:()=>{rn(this,Qn,Vr).call(this,{type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0}));try{const R=await J(this,zt).start();if(R===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(R),(E=(b=J(this,An).config).onSuccess)==null||E.call(b,R,this),(x=(j=J(this,An).config).onSettled)==null||x.call(j,R,this.state.error,this),R}catch(R){if(R instanceof pu){if(R.silent)return J(this,zt).promise;if(R.revert){if(this.state.data===void 0)throw R;return this.state.data}}throw rn(this,Qn,Vr).call(this,{type:"error",error:R}),(C=(S=J(this,An).config).onError)==null||C.call(S,R,this),(_=(N=J(this,An).config).onSettled)==null||_.call(N,this.state.data,R,this),R}finally{this.scheduleGc()}}},Bo=new WeakMap,js=new WeakMap,An=new WeakMap,Uo=new WeakMap,zt=new WeakMap,Li=new WeakMap,Ho=new WeakMap,Qn=new WeakSet,Vr=function(n){const o=s=>{switch(n.type){case"failed":return{...s,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...MS(s.data,this.options),fetchMeta:n.meta??null};case"success":const a={...s,...Eh(n.data,n.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Oe(this,js,n.manual?a:void 0),a;case"error":const l=n.error;return{...s,error:l,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error"};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...n.state}}};this.state=o(this.state),on.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),J(this,An).notify({query:this,type:"updated",action:n})})},E0);function MS(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Sh(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Eh(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Nh(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,o=n!==void 0,s=o?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:o?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:o?"success":"pending",fetchStatus:"idle"}}function kh(e){return{onFetch:(n,o)=>{var w,m,b,E,j;const s=n.options,a=(b=(m=(w=n.fetchOptions)==null?void 0:w.meta)==null?void 0:m.fetchMore)==null?void 0:b.direction,l=((E=n.state.data)==null?void 0:E.pages)||[],f=((j=n.state.data)==null?void 0:j.pageParams)||[];let d={pages:[],pageParams:[]},h=0;const v=async()=>{let x=!1;const S=_=>{Object.defineProperty(_,"signal",{enumerable:!0,get:()=>(n.signal.aborted?x=!0:n.signal.addEventListener("abort",()=>{x=!0}),n.signal)})},C=xh(n.options,n.fetchOptions),N=async(_,R,P)=>{if(x)return Promise.reject();if(R==null&&_.pages.length)return Promise.resolve(_);const D=(()=>{const H={client:n.client,queryKey:n.queryKey,pageParam:R,direction:P?"backward":"forward",meta:n.options.meta};return S(H),H})(),F=await C(D),{maxPages:V}=n.options,Y=P?kS:NS;return{pages:Y(_.pages,F,V),pageParams:Y(_.pageParams,R,V)}};if(a&&l.length){const _=a==="backward",R=_?IS:jh,P={pages:l,pageParams:f},A=R(s,P);d=await N(P,A,_)}else{const _=e??l.length;do{const R=h===0?f[0]??s.initialPageParam:jh(s,d);if(h>0&&R==null)break;d=await N(d,R),h++}while(h<_)}return d};n.options.persister?n.fetchFn=()=>{var x,S;return(S=(x=n.options).persister)==null?void 0:S.call(x,v,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},o)}:n.fetchFn=v}}}function jh(e,{pages:n,pageParams:o}){const s=n.length-1;return n.length>0?e.getNextPageParam(n[s],n,o[s],o):void 0}function IS(e,{pages:n,pageParams:o}){var s;return n.length>0?(s=e.getPreviousPageParam)==null?void 0:s.call(e,n[0],n,o[0],o):void 0}var LS=(N0=class extends _h{constructor(n){super();Xe(this,vr);Xe(this,Fi);Xe(this,gr);Xe(this,an);Xe(this,Vo);Oe(this,Fi,n.client),this.mutationId=n.mutationId,Oe(this,an,n.mutationCache),Oe(this,gr,[]),this.state=n.state||FS(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){J(this,gr).includes(n)||(J(this,gr).push(n),this.clearGcTimeout(),J(this,an).notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){Oe(this,gr,J(this,gr).filter(o=>o!==n)),this.scheduleGc(),J(this,an).notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){J(this,gr).length||(this.state.status==="pending"?this.scheduleGc():J(this,an).remove(this))}continue(){var n;return((n=J(this,Vo))==null?void 0:n.continue())??this.execute(this.state.variables)}async execute(n){var f,d,h,v,w,m,b,E,j,x,S,C,N,_,R,P,A,D,F,V;const o=()=>{rn(this,vr,Ro).call(this,{type:"continue"})},s={client:J(this,Fi),meta:this.options.meta,mutationKey:this.options.mutationKey};Oe(this,Vo,Ch({fn:()=>this.options.mutationFn?this.options.mutationFn(n,s):Promise.reject(new Error("No mutationFn found")),onFail:(Y,H)=>{rn(this,vr,Ro).call(this,{type:"failed",failureCount:Y,error:H})},onPause:()=>{rn(this,vr,Ro).call(this,{type:"pause"})},onContinue:o,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>J(this,an).canRun(this)}));const a=this.state.status==="pending",l=!J(this,Vo).canStart();try{if(a)o();else{rn(this,vr,Ro).call(this,{type:"pending",variables:n,isPaused:l}),await((d=(f=J(this,an).config).onMutate)==null?void 0:d.call(f,n,this,s));const H=await((v=(h=this.options).onMutate)==null?void 0:v.call(h,n,s));H!==this.state.context&&rn(this,vr,Ro).call(this,{type:"pending",context:H,variables:n,isPaused:l})}const Y=await J(this,Vo).start();return await((m=(w=J(this,an).config).onSuccess)==null?void 0:m.call(w,Y,n,this.state.context,this,s)),await((E=(b=this.options).onSuccess)==null?void 0:E.call(b,Y,n,this.state.context,s)),await((x=(j=J(this,an).config).onSettled)==null?void 0:x.call(j,Y,null,this.state.variables,this.state.context,this,s)),await((C=(S=this.options).onSettled)==null?void 0:C.call(S,Y,null,n,this.state.context,s)),rn(this,vr,Ro).call(this,{type:"success",data:Y}),Y}catch(Y){try{throw await((_=(N=J(this,an).config).onError)==null?void 0:_.call(N,Y,n,this.state.context,this,s)),await((P=(R=this.options).onError)==null?void 0:P.call(R,Y,n,this.state.context,s)),await((D=(A=J(this,an).config).onSettled)==null?void 0:D.call(A,void 0,Y,this.state.variables,this.state.context,this,s)),await((V=(F=this.options).onSettled)==null?void 0:V.call(F,void 0,Y,n,this.state.context,s)),Y}finally{rn(this,vr,Ro).call(this,{type:"error",error:Y})}}finally{J(this,an).runNext(this)}}},Fi=new WeakMap,gr=new WeakMap,an=new WeakMap,Vo=new WeakMap,vr=new WeakSet,Ro=function(n){const o=s=>{switch(n.type){case"failed":return{...s,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:n.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:n.isPaused,status:"pending",variables:n.variables,submittedAt:Date.now()};case"success":return{...s,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:n.error,failureCount:s.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=o(this.state),on.batch(()=>{J(this,gr).forEach(s=>{s.onMutationUpdate(n)}),J(this,an).notify({mutation:this,type:"updated",action:n})})},N0);function FS(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var zS=(k0=class extends ba{constructor(n={}){super();Xe(this,Tr);Xe(this,Jn);Xe(this,zi);this.config=n,Oe(this,Tr,new Set),Oe(this,Jn,new Map),Oe(this,zi,0)}build(n,o,s){const a=new LS({client:n,mutationCache:this,mutationId:++tu(this,zi)._,options:n.defaultMutationOptions(o),state:s});return this.add(a),a}add(n){J(this,Tr).add(n);const o=_a(n);if(typeof o=="string"){const s=J(this,Jn).get(o);s?s.push(n):J(this,Jn).set(o,[n])}this.notify({type:"added",mutation:n})}remove(n){if(J(this,Tr).delete(n)){const o=_a(n);if(typeof o=="string"){const s=J(this,Jn).get(o);if(s)if(s.length>1){const a=s.indexOf(n);a!==-1&&s.splice(a,1)}else s[0]===n&&J(this,Jn).delete(o)}}this.notify({type:"removed",mutation:n})}canRun(n){const o=_a(n);if(typeof o=="string"){const s=J(this,Jn).get(o),a=s==null?void 0:s.find(l=>l.state.status==="pending");return!a||a===n}else return!0}runNext(n){var s;const o=_a(n);if(typeof o=="string"){const a=(s=J(this,Jn).get(o))==null?void 0:s.find(l=>l!==n&&l.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){on.batch(()=>{J(this,Tr).forEach(n=>{this.notify({type:"removed",mutation:n})}),J(this,Tr).clear(),J(this,Jn).clear()})}getAll(){return Array.from(J(this,Tr))}find(n){const o={exact:!0,...n};return this.getAll().find(s=>gh(o,s))}findAll(n={}){return this.getAll().filter(o=>gh(n,o))}notify(n){on.batch(()=>{this.listeners.forEach(o=>{o(n)})})}resumePausedMutations(){const n=this.getAll().filter(o=>o.state.isPaused);return on.batch(()=>Promise.all(n.map(o=>o.continue().catch(Un))))}},Tr=new WeakMap,Jn=new WeakMap,zi=new WeakMap,k0);function _a(e){var n;return(n=e.options.scope)==null?void 0:n.id}var $S=(j0=class extends ba{constructor(n={}){super();Xe(this,yr);this.config=n,Oe(this,yr,new Map)}build(n,o,s){const a=o.queryKey,l=o.queryHash??uu(a,o);let f=this.get(l);return f||(f=new OS({client:n,queryKey:a,queryHash:l,options:n.defaultQueryOptions(o),state:s,defaultOptions:n.getQueryDefaults(a)}),this.add(f)),f}add(n){J(this,yr).has(n.queryHash)||(J(this,yr).set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const o=J(this,yr).get(n.queryHash);o&&(n.destroy(),o===n&&J(this,yr).delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){on.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return J(this,yr).get(n)}getAll(){return[...J(this,yr).values()]}find(n){const o={exact:!0,...n};return this.getAll().find(s=>mh(o,s))}findAll(n={}){const o=this.getAll();return Object.keys(n).length>0?o.filter(s=>mh(n,s)):o}notify(n){on.batch(()=>{this.listeners.forEach(o=>{o(n)})})}onFocus(){on.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){on.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},yr=new WeakMap,j0),BS=(R0=class{constructor(e={}){Xe(this,yt);Xe(this,so);Xe(this,io);Xe(this,Rs);Xe(this,Ts);Xe(this,ao);Xe(this,Ps);Xe(this,Ds);Oe(this,yt,e.queryCache||new $S),Oe(this,so,e.mutationCache||new zS),Oe(this,io,e.defaultOptions||{}),Oe(this,Rs,new Map),Oe(this,Ts,new Map),Oe(this,ao,0)}mount(){tu(this,ao)._++,J(this,ao)===1&&(Oe(this,Ps,bh.subscribe(async e=>{e&&(await this.resumePausedMutations(),J(this,yt).onFocus())})),Oe(this,Ds,Ca.subscribe(async e=>{e&&(await this.resumePausedMutations(),J(this,yt).onOnline())})))}unmount(){var e,n;tu(this,ao)._--,J(this,ao)===0&&((e=J(this,Ps))==null||e.call(this),Oe(this,Ps,void 0),(n=J(this,Ds))==null||n.call(this),Oe(this,Ds,void 0))}isFetching(e){return J(this,yt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return J(this,so).findAll({...e,status:"pending"}).length}getQueryData(e){var o;const n=this.defaultQueryOptions({queryKey:e});return(o=J(this,yt).get(n.queryHash))==null?void 0:o.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),o=J(this,yt).build(this,n),s=o.state.data;return s===void 0?this.fetchQuery(e):(e.revalidateIfStale&&o.isStaleByTime(cu(n.staleTime,o))&&this.prefetchQuery(n),Promise.resolve(s))}getQueriesData(e){return J(this,yt).findAll(e).map(({queryKey:n,state:o})=>{const s=o.data;return[n,s]})}setQueryData(e,n,o){const s=this.defaultQueryOptions({queryKey:e}),a=J(this,yt).get(s.queryHash),l=a==null?void 0:a.state.data,f=wS(n,l);if(f!==void 0)return J(this,yt).build(this,s).setData(f,{...o,manual:!0})}setQueriesData(e,n,o){return on.batch(()=>J(this,yt).findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,n,o)]))}getQueryState(e){var o;const n=this.defaultQueryOptions({queryKey:e});return(o=J(this,yt).get(n.queryHash))==null?void 0:o.state}removeQueries(e){const n=J(this,yt);on.batch(()=>{n.findAll(e).forEach(o=>{n.remove(o)})})}resetQueries(e,n){const o=J(this,yt);return on.batch(()=>(o.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...e},n)))}cancelQueries(e,n={}){const o={revert:!0,...n},s=on.batch(()=>J(this,yt).findAll(e).map(a=>a.cancel(o)));return Promise.all(s).then(Un).catch(Un)}invalidateQueries(e,n={}){return on.batch(()=>(J(this,yt).findAll(e).forEach(o=>{o.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},n)))}refetchQueries(e,n={}){const o={...n,cancelRefetch:n.cancelRefetch??!0},s=on.batch(()=>J(this,yt).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let l=a.fetch(void 0,o);return o.throwOnError||(l=l.catch(Un)),a.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(s).then(Un)}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const o=J(this,yt).build(this,n);return o.isStaleByTime(cu(n.staleTime,o))?o.fetch(n):Promise.resolve(o.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Un).catch(Un)}fetchInfiniteQuery(e){return e.behavior=kh(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Un).catch(Un)}ensureInfiniteQueryData(e){return e.behavior=kh(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ca.isOnline()?J(this,so).resumePausedMutations():Promise.resolve()}getQueryCache(){return J(this,yt)}getMutationCache(){return J(this,so)}getDefaultOptions(){return J(this,io)}setDefaultOptions(e){Oe(this,io,e)}setQueryDefaults(e,n){J(this,Rs).set(ri(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...J(this,Rs).values()],o={};return n.forEach(s=>{oi(e,s.queryKey)&&Object.assign(o,s.defaultOptions)}),o}setMutationDefaults(e,n){J(this,Ts).set(ri(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...J(this,Ts).values()],o={};return n.forEach(s=>{oi(e,s.mutationKey)&&Object.assign(o,s.defaultOptions)}),o}defaultQueryOptions(e){if(e._defaulted)return e;const n={...J(this,io).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=uu(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===fu&&(n.enabled=!1),n}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...J(this,io).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){J(this,yt).clear(),J(this,so).clear()}},yt=new WeakMap,so=new WeakMap,io=new WeakMap,Rs=new WeakMap,Ts=new WeakMap,ao=new WeakMap,Ps=new WeakMap,Ds=new WeakMap,R0),US=g.createContext(void 0),HS=({client:e,children:n})=>(g.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),c.jsx(US.Provider,{value:e,children:n}));/** 44 * @license lucide-react v0.460.0 - ISC 45 * 46 * This source code is licensed under the ISC license. 47 * See the LICENSE file in the root directory of this source tree. 48 */const VS=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Rh=(...e)=>e.filter((n,o,s)=>!!n&&n.trim()!==""&&s.indexOf(n)===o).join(" ").trim();/** 49 * @license lucide-react v0.460.0 - ISC 50 * 51 * This source code is licensed under the ISC license. 52 * See the LICENSE file in the root directory of this source tree. 53 */var WS={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"};/** 54 * @license lucide-react v0.460.0 - ISC 55 * 56 * This source code is licensed under the ISC license. 57 * See the LICENSE file in the root directory of this source tree. 58 */const YS=g.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:o=2,absoluteStrokeWidth:s,className:a="",children:l,iconNode:f,...d},h)=>g.createElement("svg",{ref:h,...WS,width:n,height:n,stroke:e,strokeWidth:s?Number(o)*24/Number(n):o,className:Rh("lucide",a),...d},[...f.map(([v,w])=>g.createElement(v,w)),...Array.isArray(l)?l:[l]]));/** 59 * @license lucide-react v0.460.0 - ISC 60 * 61 * This source code is licensed under the ISC license. 62 * See the LICENSE file in the root directory of this source tree. 63 */const Qe=(e,n)=>{const o=g.forwardRef(({className:s,...a},l)=>g.createElement(YS,{ref:l,iconNode:n,className:Rh(`lucide-${VS(e)}`,s),...a}));return o.displayName=`${e}`,o};/** 64 * @license lucide-react v0.460.0 - ISC 65 * 66 * This source code is licensed under the ISC license. 67 * See the LICENSE file in the root directory of this source tree. 68 */const KS=Qe("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** 69 * @license lucide-react v0.460.0 - ISC 70 * 71 * This source code is licensed under the ISC license. 72 * See the LICENSE file in the root directory of this source tree. 73 */const XS=Qe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 74 * @license lucide-react v0.460.0 - ISC 75 * 76 * This source code is licensed under the ISC license. 77 * See the LICENSE file in the root directory of this source tree. 78 */const Ea=Qe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 79 * @license lucide-react v0.460.0 - ISC 80 * 81 * This source code is licensed under the ISC license. 82 * See the LICENSE file in the root directory of this source tree. 83 */const GS=Qe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** 84 * @license lucide-react v0.460.0 - ISC 85 * 86 * This source code is licensed under the ISC license. 87 * See the LICENSE file in the root directory of this source tree. 88 */const qS=Qe("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** 89 * @license lucide-react v0.460.0 - ISC 90 * 91 * This source code is licensed under the ISC license. 92 * See the LICENSE file in the root directory of this source tree. 93 */const hu=Qe("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 94 * @license lucide-react v0.460.0 - ISC 95 * 96 * This source code is licensed under the ISC license. 97 * See the LICENSE file in the root directory of this source tree. 98 */const Th=Qe("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"}]]);/** 99 * @license lucide-react v0.460.0 - ISC 100 * 101 * This source code is licensed under the ISC license. 102 * See the LICENSE file in the root directory of this source tree. 103 */const os=Qe("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** 104 * @license lucide-react v0.460.0 - ISC 105 * 106 * This source code is licensed under the ISC license. 107 * See the LICENSE file in the root directory of this source tree. 108 */const mu=Qe("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** 109 * @license lucide-react v0.460.0 - ISC 110 * 111 * This source code is licensed under the ISC license. 112 * See the LICENSE file in the root directory of this source tree. 113 */const QS=Qe("EllipsisVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);/** 114 * @license lucide-react v0.460.0 - ISC 115 * 116 * This source code is licensed under the ISC license. 117 * See the LICENSE file in the root directory of this source tree. 118 */const JS=Qe("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** 119 * @license lucide-react v0.460.0 - ISC 120 * 121 * This source code is licensed under the ISC license. 122 * See the LICENSE file in the root directory of this source tree. 123 */const ZS=Qe("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** 124 * @license lucide-react v0.460.0 - ISC 125 * 126 * This source code is licensed under the ISC license. 127 * See the LICENSE file in the root directory of this source tree. 128 */const Ph=Qe("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/** 129 * @license lucide-react v0.460.0 - ISC 130 * 131 * This source code is licensed under the ISC license. 132 * See the LICENSE file in the root directory of this source tree. 133 */const e1=Qe("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/** 134 * @license lucide-react v0.460.0 - ISC 135 * 136 * This source code is licensed under the ISC license. 137 * See the LICENSE file in the root directory of this source tree. 138 */const t1=Qe("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/** 139 * @license lucide-react v0.460.0 - ISC 140 * 141 * This source code is licensed under the ISC license. 142 * See the LICENSE file in the root directory of this source tree. 143 */const n1=Qe("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** 144 * @license lucide-react v0.460.0 - ISC 145 * 146 * This source code is licensed under the ISC license. 147 * See the LICENSE file in the root directory of this source tree. 148 */const Dh=Qe("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/** 149 * @license lucide-react v0.460.0 - ISC 150 * 151 * This source code is licensed under the ISC license. 152 * See the LICENSE file in the root directory of this source tree. 153 */const r1=Qe("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/** 154 * @license lucide-react v0.460.0 - ISC 155 * 156 * This source code is licensed under the ISC license. 157 * See the LICENSE file in the root directory of this source tree. 158 */const Ah=Qe("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 159 * @license lucide-react v0.460.0 - ISC 160 * 161 * This source code is licensed under the ISC license. 162 * See the LICENSE file in the root directory of this source tree. 163 */const o1=Qe("MoveVertical",[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"m8 18 4 4 4-4",key:"bh5tu3"}],["path",{d:"m8 6 4-4 4 4",key:"ybng9g"}]]);/** 164 * @license lucide-react v0.460.0 - ISC 165 * 166 * This source code is licensed under the ISC license. 167 * See the LICENSE file in the root directory of this source tree. 168 */const s1=Qe("OctagonX",[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/** 169 * @license lucide-react v0.460.0 - ISC 170 * 171 * This source code is licensed under the ISC license. 172 * See the LICENSE file in the root directory of this source tree. 173 */const Er=Qe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** 174 * @license lucide-react v0.460.0 - ISC 175 * 176 * This source code is licensed under the ISC license. 177 * See the LICENSE file in the root directory of this source tree. 178 */const gu=Qe("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** 179 * @license lucide-react v0.460.0 - ISC 180 * 181 * This source code is licensed under the ISC license. 182 * See the LICENSE file in the root directory of this source tree. 183 */const i1=Qe("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/** 184 * @license lucide-react v0.460.0 - ISC 185 * 186 * This source code is licensed under the ISC license. 187 * See the LICENSE file in the root directory of this source tree. 188 */const a1=Qe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 189 * @license lucide-react v0.460.0 - ISC 190 * 191 * This source code is licensed under the ISC license. 192 * See the LICENSE file in the root directory of this source tree. 193 */const l1=Qe("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** 194 * @license lucide-react v0.460.0 - ISC 195 * 196 * This source code is licensed under the ISC license. 197 * See the LICENSE file in the root directory of this source tree. 198 */const Oh=Qe("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/** 199 * @license lucide-react v0.460.0 - ISC 200 * 201 * This source code is licensed under the ISC license. 202 * See the LICENSE file in the root directory of this source tree. 203 */const vu=Qe("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** 204 * @license lucide-react v0.460.0 - ISC 205 * 206 * This source code is licensed under the ISC license. 207 * See the LICENSE file in the root directory of this source tree. 208 */const c1=Qe("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** 209 * @license lucide-react v0.460.0 - ISC 210 * 211 * This source code is licensed under the ISC license. 212 * See the LICENSE file in the root directory of this source tree. 213 */const Mh=Qe("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/** 214 * @license lucide-react v0.460.0 - ISC 215 * 216 * This source code is licensed under the ISC license. 217 * See the LICENSE file in the root directory of this source tree. 218 */const si=Qe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),u1=1,d1=1e6;let yu=0;function f1(){return yu=(yu+1)%Number.MAX_SAFE_INTEGER,yu.toString()}const wu=new Map,Ih=e=>{if(wu.has(e))return;const n=setTimeout(()=>{wu.delete(e),ii({type:"REMOVE_TOAST",toastId:e})},d1);wu.set(e,n)},p1=(e,n)=>{switch(n.type){case"ADD_TOAST":return{...e,toasts:[n.toast,...e.toasts].slice(0,u1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(o=>o.id===n.toast.id?{...o,...n.toast}:o)};case"DISMISS_TOAST":{const{toastId:o}=n;return o?Ih(o):e.toasts.forEach(s=>{Ih(s.id)}),{...e,toasts:e.toasts.map(s=>s.id===o||o===void 0?{...s,open:!1}:s)}}case"REMOVE_TOAST":return n.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==n.toastId)}}},Na=[];let ka={toasts:[]};function ii(e){ka=p1(ka,e),Na.forEach(n=>{n(ka)})}function h1({...e}){const n=f1(),o=a=>ii({type:"UPDATE_TOAST",toast:{...a,id:n}}),s=()=>ii({type:"DISMISS_TOAST",toastId:n});return ii({type:"ADD_TOAST",toast:{...e,id:n,open:!0,onOpenChange:a=>{a||s()}}}),{id:n,dismiss:s,update:o}}function m1(){const[e,n]=g.useState(ka);return g.useEffect(()=>(Na.push(n),()=>{const o=Na.indexOf(n);o>-1&&Na.splice(o,1)}),[e]),{...e,toast:h1,dismiss:o=>ii({type:"DISMISS_TOAST",toastId:o})}}var Hn=ph();const Lh=To(Hn);function Ee(e,n,{checkForDefaultPrevented:o=!0}={}){return function(a){if(e==null||e(a),o===!1||!a.defaultPrevented)return n==null?void 0:n(a)}}function Fh(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function xu(...e){return n=>{let o=!1;const s=e.map(a=>{const l=Fh(a,n);return!o&&typeof l=="function"&&(o=!0),l});if(o)return()=>{for(let a=0;a<s.length;a++){const l=s[a];typeof l=="function"?l():Fh(e[a],null)}}}}function Ie(...e){return g.useCallback(xu(...e),e)}function g1(e,n){const o=g.createContext(n),s=l=>{const{children:f,...d}=l,h=g.useMemo(()=>d,Object.values(d));return c.jsx(o.Provider,{value:h,children:f})};s.displayName=e+"Provider";function a(l){const f=g.useContext(o);if(f)return f;if(n!==void 0)return n;throw new Error(`\`${l}\` must be used within \`${e}\``)}return[s,a]}function Vn(e,n=[]){let o=[];function s(l,f){const d=g.createContext(f),h=o.length;o=[...o,f];const v=m=>{var C;const{scope:b,children:E,...j}=m,x=((C=b==null?void 0:b[e])==null?void 0:C[h])||d,S=g.useMemo(()=>j,Object.values(j));return c.jsx(x.Provider,{value:S,children:E})};v.displayName=l+"Provider";function w(m,b){var x;const E=((x=b==null?void 0:b[e])==null?void 0:x[h])||d,j=g.useContext(E);if(j)return j;if(f!==void 0)return f;throw new Error(`\`${m}\` must be used within \`${l}\``)}return[v,w]}const a=()=>{const l=o.map(f=>g.createContext(f));return function(d){const h=(d==null?void 0:d[e])||l;return g.useMemo(()=>({[`__scope${e}`]:{...d,[e]:h}}),[d,h])}};return a.scopeName=e,[s,v1(a,...n)]}function v1(...e){const n=e[0];if(e.length===1)return n;const o=()=>{const s=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(l){const f=s.reduce((d,{useScope:h,scopeName:v})=>{const m=h(l)[`__scope${v}`];return{...d,...m}},{});return g.useMemo(()=>({[`__scope${n.scopeName}`]:f}),[f])}};return o.scopeName=n.scopeName,o}function ss(e){const n=y1(e),o=g.forwardRef((s,a)=>{const{children:l,...f}=s,d=g.Children.toArray(l),h=d.find(x1);if(h){const v=h.props.children,w=d.map(m=>m===h?g.Children.count(v)>1?g.Children.only(null):g.isValidElement(v)?v.props.children:null:m);return c.jsx(n,{...f,ref:a,children:g.isValidElement(v)?g.cloneElement(v,void 0,w):null})}return c.jsx(n,{...f,ref:a,children:l})});return o.displayName=`${e}.Slot`,o}function y1(e){const n=g.forwardRef((o,s)=>{const{children:a,...l}=o;if(g.isValidElement(a)){const f=S1(a),d=b1(l,a.props);return a.type!==g.Fragment&&(d.ref=s?xu(s,f):f),g.cloneElement(a,d)}return g.Children.count(a)>1?g.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var zh=Symbol("radix.slottable");function w1(e){const n=({children:o})=>c.jsx(c.Fragment,{children:o});return n.displayName=`${e}.Slottable`,n.__radixId=zh,n}function x1(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===zh}function b1(e,n){const o={...n};for(const s in n){const a=e[s],l=n[s];/^on[A-Z]/.test(s)?a&&l?o[s]=(...d)=>{const h=l(...d);return a(...d),h}:a&&(o[s]=a):s==="style"?o[s]={...a,...l}:s==="className"&&(o[s]=[a,l].filter(Boolean).join(" "))}return{...e,...o}}function S1(e){var s,a;let n=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,o=n&&"isReactWarning"in n&&n.isReactWarning;return o?e.ref:(n=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,o=n&&"isReactWarning"in n&&n.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}function bu(e){const n=e+"CollectionProvider",[o,s]=Vn(n),[a,l]=o(n,{collectionRef:{current:null},itemMap:new Map}),f=x=>{const{scope:S,children:C}=x,N=z.useRef(null),_=z.useRef(new Map).current;return c.jsx(a,{scope:S,itemMap:_,collectionRef:N,children:C})};f.displayName=n;const d=e+"CollectionSlot",h=ss(d),v=z.forwardRef((x,S)=>{const{scope:C,children:N}=x,_=l(d,C),R=Ie(S,_.collectionRef);return c.jsx(h,{ref:R,children:N})});v.displayName=d;const w=e+"CollectionItemSlot",m="data-radix-collection-item",b=ss(w),E=z.forwardRef((x,S)=>{const{scope:C,children:N,..._}=x,R=z.useRef(null),P=Ie(S,R),A=l(w,C);return z.useEffect(()=>(A.itemMap.set(R,{ref:R,..._}),()=>void A.itemMap.delete(R))),c.jsx(b,{[m]:"",ref:P,children:N})});E.displayName=w;function j(x){const S=l(e+"CollectionConsumer",x);return z.useCallback(()=>{const N=S.collectionRef.current;if(!N)return[];const _=Array.from(N.querySelectorAll(`[${m}]`));return Array.from(S.itemMap.values()).sort((A,D)=>_.indexOf(A.ref.current)-_.indexOf(D.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:f,Slot:v,ItemSlot:E},j,s]}var C1=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Te=C1.reduce((e,n)=>{const o=ss(`Primitive.${n}`),s=g.forwardRef((a,l)=>{const{asChild:f,...d}=a,h=f?o:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(h,{...d,ref:l})});return s.displayName=`Primitive.${n}`,{...e,[n]:s}},{});function $h(e,n){e&&Hn.flushSync(()=>e.dispatchEvent(n))}function Mt(e){const n=g.useRef(e);return g.useEffect(()=>{n.current=e}),g.useMemo(()=>(...o)=>{var s;return(s=n.current)==null?void 0:s.call(n,...o)},[])}function _1(e,n=globalThis==null?void 0:globalThis.document){const o=Mt(e);g.useEffect(()=>{const s=a=>{a.key==="Escape"&&o(a)};return n.addEventListener("keydown",s,{capture:!0}),()=>n.removeEventListener("keydown",s,{capture:!0})},[o,n])}var E1="DismissableLayer",Su="dismissableLayer.update",N1="dismissableLayer.pointerDownOutside",k1="dismissableLayer.focusOutside",Bh,Uh=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ai=g.forwardRef((e,n)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:l,onInteractOutside:f,onDismiss:d,...h}=e,v=g.useContext(Uh),[w,m]=g.useState(null),b=(w==null?void 0:w.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,E]=g.useState({}),j=Ie(n,D=>m(D)),x=Array.from(v.layers),[S]=[...v.layersWithOutsidePointerEventsDisabled].slice(-1),C=x.indexOf(S),N=w?x.indexOf(w):-1,_=v.layersWithOutsidePointerEventsDisabled.size>0,R=N>=C,P=R1(D=>{const F=D.target,V=[...v.branches].some(Y=>Y.contains(F));!R||V||(a==null||a(D),f==null||f(D),D.defaultPrevented||d==null||d())},b),A=T1(D=>{const F=D.target;[...v.branches].some(Y=>Y.contains(F))||(l==null||l(D),f==null||f(D),D.defaultPrevented||d==null||d())},b);return _1(D=>{N===v.layers.size-1&&(s==null||s(D),!D.defaultPrevented&&d&&(D.preventDefault(),d()))},b),g.useEffect(()=>{if(w)return o&&(v.layersWithOutsidePointerEventsDisabled.size===0&&(Bh=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),v.layersWithOutsidePointerEventsDisabled.add(w)),v.layers.add(w),Vh(),()=>{o&&v.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=Bh)}},[w,b,o,v]),g.useEffect(()=>()=>{w&&(v.layers.delete(w),v.layersWithOutsidePointerEventsDisabled.delete(w),Vh())},[w,v]),g.useEffect(()=>{const D=()=>E({});return document.addEventListener(Su,D),()=>document.removeEventListener(Su,D)},[]),c.jsx(Te.div,{...h,ref:j,style:{pointerEvents:_?R?"auto":"none":void 0,...e.style},onFocusCapture:Ee(e.onFocusCapture,A.onFocusCapture),onBlurCapture:Ee(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:Ee(e.onPointerDownCapture,P.onPointerDownCapture)})});ai.displayName=E1;var j1="DismissableLayerBranch",Hh=g.forwardRef((e,n)=>{const o=g.useContext(Uh),s=g.useRef(null),a=Ie(n,s);return g.useEffect(()=>{const l=s.current;if(l)return o.branches.add(l),()=>{o.branches.delete(l)}},[o.branches]),c.jsx(Te.div,{...e,ref:a})});Hh.displayName=j1;function R1(e,n=globalThis==null?void 0:globalThis.document){const o=Mt(e),s=g.useRef(!1),a=g.useRef(()=>{});return g.useEffect(()=>{const l=d=>{if(d.target&&!s.current){let h=function(){Wh(N1,o,v,{discrete:!0})};const v={originalEvent:d};d.pointerType==="touch"?(n.removeEventListener("click",a.current),a.current=h,n.addEventListener("click",a.current,{once:!0})):h()}else n.removeEventListener("click",a.current);s.current=!1},f=window.setTimeout(()=>{n.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(f),n.removeEventListener("pointerdown",l),n.removeEventListener("click",a.current)}},[n,o]),{onPointerDownCapture:()=>s.current=!0}}function T1(e,n=globalThis==null?void 0:globalThis.document){const o=Mt(e),s=g.useRef(!1);return g.useEffect(()=>{const a=l=>{l.target&&!s.current&&Wh(k1,o,{originalEvent:l},{discrete:!1})};return n.addEventListener("focusin",a),()=>n.removeEventListener("focusin",a)},[n,o]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function Vh(){const e=new CustomEvent(Su);document.dispatchEvent(e)}function Wh(e,n,o,{discrete:s}){const a=o.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:o});n&&a.addEventListener(e,n,{once:!0}),s?$h(a,l):a.dispatchEvent(l)}var P1=ai,D1=Hh,jt=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},A1="Portal",li=g.forwardRef((e,n)=>{var d;const{container:o,...s}=e,[a,l]=g.useState(!1);jt(()=>l(!0),[]);const f=o||a&&((d=globalThis==null?void 0:globalThis.document)==null?void 0:d.body);return f?Lh.createPortal(c.jsx(Te.div,{...s,ref:n}),f):null});li.displayName=A1;function O1(e,n){return g.useReducer((o,s)=>n[o][s]??o,e)}var Rn=e=>{const{present:n,children:o}=e,s=M1(n),a=typeof o=="function"?o({present:s.isPresent}):g.Children.only(o),l=Ie(s.ref,I1(a));return typeof o=="function"||s.isPresent?g.cloneElement(a,{ref:l}):null};Rn.displayName="Presence";function M1(e){const[n,o]=g.useState(),s=g.useRef(null),a=g.useRef(e),l=g.useRef("none"),f=e?"mounted":"unmounted",[d,h]=O1(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const v=ja(s.current);l.current=d==="mounted"?v:"none"},[d]),jt(()=>{const v=s.current,w=a.current;if(w!==e){const b=l.current,E=ja(v);e?h("MOUNT"):E==="none"||(v==null?void 0:v.display)==="none"?h("UNMOUNT"):h(w&&b!==E?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,h]),jt(()=>{if(n){let v;const w=n.ownerDocument.defaultView??window,m=E=>{const x=ja(s.current).includes(CSS.escape(E.animationName));if(E.target===n&&x&&(h("ANIMATION_END"),!a.current)){const S=n.style.animationFillMode;n.style.animationFillMode="forwards",v=w.setTimeout(()=>{n.style.animationFillMode==="forwards"&&(n.style.animationFillMode=S)})}},b=E=>{E.target===n&&(l.current=ja(s.current))};return n.addEventListener("animationstart",b),n.addEventListener("animationcancel",m),n.addEventListener("animationend",m),()=>{w.clearTimeout(v),n.removeEventListener("animationstart",b),n.removeEventListener("animationcancel",m),n.removeEventListener("animationend",m)}}else h("ANIMATION_END")},[n,h]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:g.useCallback(v=>{s.current=v?getComputedStyle(v):null,o(v)},[])}}function ja(e){return(e==null?void 0:e.animationName)||"none"}function I1(e){var s,a;let n=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,o=n&&"isReactWarning"in n&&n.isReactWarning;return o?e.ref:(n=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,o=n&&"isReactWarning"in n&&n.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var L1=ou[" useInsertionEffect ".trim().toString()]||jt;function Wr({prop:e,defaultProp:n,onChange:o=()=>{},caller:s}){const[a,l,f]=F1({defaultProp:n,onChange:o}),d=e!==void 0,h=d?e:a;{const w=g.useRef(e!==void 0);g.useEffect(()=>{const m=w.current;m!==d&&console.warn(`${s} is changing from ${m?"controlled":"uncontrolled"} to ${d?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),w.current=d},[d,s])}const v=g.useCallback(w=>{var m;if(d){const b=z1(w)?w(e):w;b!==e&&((m=f.current)==null||m.call(f,b))}else l(w)},[d,e,l,f]);return[h,v]}function F1({defaultProp:e,onChange:n}){const[o,s]=g.useState(e),a=g.useRef(o),l=g.useRef(n);return L1(()=>{l.current=n},[n]),g.useEffect(()=>{var f;a.current!==o&&((f=l.current)==null||f.call(l,o),a.current=o)},[o,a]),[o,s,l]}function z1(e){return typeof e=="function"}var Yh=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),$1="VisuallyHidden",Cu=g.forwardRef((e,n)=>c.jsx(Te.span,{...e,ref:n,style:{...Yh,...e.style}}));Cu.displayName=$1;var _u="ToastProvider",[Eu,B1,U1]=bu("Toast"),[Kh]=Vn("Toast",[U1]),[H1,Ra]=Kh(_u),Xh=e=>{const{__scopeToast:n,label:o="Notification",duration:s=5e3,swipeDirection:a="right",swipeThreshold:l=50,children:f}=e,[d,h]=g.useState(null),[v,w]=g.useState(0),m=g.useRef(!1),b=g.useRef(!1);return o.trim()||console.error(`Invalid prop \`label\` supplied to \`${_u}\`. Expected non-empty \`string\`.`),c.jsx(Eu.Provider,{scope:n,children:c.jsx(H1,{scope:n,label:o,duration:s,swipeDirection:a,swipeThreshold:l,toastCount:v,viewport:d,onViewportChange:h,onToastAdd:g.useCallback(()=>w(E=>E+1),[]),onToastRemove:g.useCallback(()=>w(E=>E-1),[]),isFocusedToastEscapeKeyDownRef:m,isClosePausedRef:b,children:f})})};Xh.displayName=_u;var Gh="ToastViewport",V1=["F8"],Nu="toast.viewportPause",ku="toast.viewportResume",qh=g.forwardRef((e,n)=>{const{__scopeToast:o,hotkey:s=V1,label:a="Notifications ({hotkey})",...l}=e,f=Ra(Gh,o),d=B1(o),h=g.useRef(null),v=g.useRef(null),w=g.useRef(null),m=g.useRef(null),b=Ie(n,m,f.onViewportChange),E=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),j=f.toastCount>0;g.useEffect(()=>{const S=C=>{var _;s.length!==0&&s.every(R=>C[R]||C.code===R)&&((_=m.current)==null||_.focus())};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[s]),g.useEffect(()=>{const S=h.current,C=m.current;if(j&&S&&C){const N=()=>{if(!f.isClosePausedRef.current){const A=new CustomEvent(Nu);C.dispatchEvent(A),f.isClosePausedRef.current=!0}},_=()=>{if(f.isClosePausedRef.current){const A=new CustomEvent(ku);C.dispatchEvent(A),f.isClosePausedRef.current=!1}},R=A=>{!S.contains(A.relatedTarget)&&_()},P=()=>{S.contains(document.activeElement)||_()};return S.addEventListener("focusin",N),S.addEventListener("focusout",R),S.addEventListener("pointermove",N),S.addEventListener("pointerleave",P),window.addEventListener("blur",N),window.addEventListener("focus",_),()=>{S.removeEventListener("focusin",N),S.removeEventListener("focusout",R),S.removeEventListener("pointermove",N),S.removeEventListener("pointerleave",P),window.removeEventListener("blur",N),window.removeEventListener("focus",_)}}},[j,f.isClosePausedRef]);const x=g.useCallback(({tabbingDirection:S})=>{const N=d().map(_=>{const R=_.ref.current,P=[R,...rC(R)];return S==="forwards"?P:P.reverse()});return(S==="forwards"?N.reverse():N).flat()},[d]);return g.useEffect(()=>{const S=m.current;if(S){const C=N=>{var P,A,D;const _=N.altKey||N.ctrlKey||N.metaKey;if(N.key==="Tab"&&!_){const F=document.activeElement,V=N.shiftKey;if(N.target===S&&V){(P=v.current)==null||P.focus();return}const te=x({tabbingDirection:V?"backwards":"forwards"}),X=te.findIndex(q=>q===F);Tu(te.slice(X+1))?N.preventDefault():V?(A=v.current)==null||A.focus():(D=w.current)==null||D.focus()}};return S.addEventListener("keydown",C),()=>S.removeEventListener("keydown",C)}},[d,x]),c.jsxs(D1,{ref:h,role:"region","aria-label":a.replace("{hotkey}",E),tabIndex:-1,style:{pointerEvents:j?void 0:"none"},children:[j&&c.jsx(ju,{ref:v,onFocusFromOutsideViewport:()=>{const S=x({tabbingDirection:"forwards"});Tu(S)}}),c.jsx(Eu.Slot,{scope:o,children:c.jsx(Te.ol,{tabIndex:-1,...l,ref:b})}),j&&c.jsx(ju,{ref:w,onFocusFromOutsideViewport:()=>{const S=x({tabbingDirection:"backwards"});Tu(S)}})]})});qh.displayName=Gh;var Qh="ToastFocusProxy",ju=g.forwardRef((e,n)=>{const{__scopeToast:o,onFocusFromOutsideViewport:s,...a}=e,l=Ra(Qh,o);return c.jsx(Cu,{tabIndex:0,...a,ref:n,style:{position:"fixed"},onFocus:f=>{var v;const d=f.relatedTarget;!((v=l.viewport)!=null&&v.contains(d))&&s()}})});ju.displayName=Qh;var ci="Toast",W1="toast.swipeStart",Y1="toast.swipeMove",K1="toast.swipeCancel",X1="toast.swipeEnd",Jh=g.forwardRef((e,n)=>{const{forceMount:o,open:s,defaultOpen:a,onOpenChange:l,...f}=e,[d,h]=Wr({prop:s,defaultProp:a??!0,onChange:l,caller:ci});return c.jsx(Rn,{present:o||d,children:c.jsx(Q1,{open:d,...f,ref:n,onClose:()=>h(!1),onPause:Mt(e.onPause),onResume:Mt(e.onResume),onSwipeStart:Ee(e.onSwipeStart,v=>{v.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Ee(e.onSwipeMove,v=>{const{x:w,y:m}=v.detail.delta;v.currentTarget.setAttribute("data-swipe","move"),v.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${w}px`),v.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${m}px`)}),onSwipeCancel:Ee(e.onSwipeCancel,v=>{v.currentTarget.setAttribute("data-swipe","cancel"),v.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),v.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),v.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),v.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Ee(e.onSwipeEnd,v=>{const{x:w,y:m}=v.detail.delta;v.currentTarget.setAttribute("data-swipe","end"),v.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),v.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),v.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${w}px`),v.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${m}px`),h(!1)})})})});Jh.displayName=ci;var[G1,q1]=Kh(ci,{onClose(){}}),Q1=g.forwardRef((e,n)=>{const{__scopeToast:o,type:s="foreground",duration:a,open:l,onClose:f,onEscapeKeyDown:d,onPause:h,onResume:v,onSwipeStart:w,onSwipeMove:m,onSwipeCancel:b,onSwipeEnd:E,...j}=e,x=Ra(ci,o),[S,C]=g.useState(null),N=Ie(n,q=>C(q)),_=g.useRef(null),R=g.useRef(null),P=a||x.duration,A=g.useRef(0),D=g.useRef(P),F=g.useRef(0),{onToastAdd:V,onToastRemove:Y}=x,H=Mt(()=>{var ce;(S==null?void 0:S.contains(document.activeElement))&&((ce=x.viewport)==null||ce.focus()),f()}),te=g.useCallback(q=>{!q||q===1/0||(window.clearTimeout(F.current),A.current=new Date().getTime(),F.current=window.setTimeout(H,q))},[H]);g.useEffect(()=>{const q=x.viewport;if(q){const ce=()=>{te(D.current),v==null||v()},ee=()=>{const Q=new Date().getTime()-A.current;D.current=D.current-Q,window.clearTimeout(F.current),h==null||h()};return q.addEventListener(Nu,ee),q.addEventListener(ku,ce),()=>{q.removeEventListener(Nu,ee),q.removeEventListener(ku,ce)}}},[x.viewport,P,h,v,te]),g.useEffect(()=>{l&&!x.isClosePausedRef.current&&te(P)},[l,P,x.isClosePausedRef,te]),g.useEffect(()=>(V(),()=>Y()),[V,Y]);const X=g.useMemo(()=>S?sm(S):null,[S]);return x.viewport?c.jsxs(c.Fragment,{children:[X&&c.jsx(J1,{__scopeToast:o,role:"status","aria-live":s==="foreground"?"assertive":"polite",children:X}),c.jsx(G1,{scope:o,onClose:H,children:Hn.createPortal(c.jsx(Eu.ItemSlot,{scope:o,children:c.jsx(P1,{asChild:!0,onEscapeKeyDown:Ee(d,()=>{x.isFocusedToastEscapeKeyDownRef.current||H(),x.isFocusedToastEscapeKeyDownRef.current=!1}),children:c.jsx(Te.li,{tabIndex:0,"data-state":l?"open":"closed","data-swipe-direction":x.swipeDirection,...j,ref:N,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Ee(e.onKeyDown,q=>{q.key==="Escape"&&(d==null||d(q.nativeEvent),q.nativeEvent.defaultPrevented||(x.isFocusedToastEscapeKeyDownRef.current=!0,H()))}),onPointerDown:Ee(e.onPointerDown,q=>{q.button===0&&(_.current={x:q.clientX,y:q.clientY})}),onPointerMove:Ee(e.onPointerMove,q=>{if(!_.current)return;const ce=q.clientX-_.current.x,ee=q.clientY-_.current.y,Q=!!R.current,B=["left","right"].includes(x.swipeDirection),Z=["left","up"].includes(x.swipeDirection)?Math.min:Math.max,ne=B?Z(0,ce):0,M=B?0:Z(0,ee),K=q.pointerType==="touch"?10:2,re={x:ne,y:M},G={originalEvent:q,delta:re};Q?(R.current=re,Ta(Y1,m,G,{discrete:!1})):im(re,x.swipeDirection,K)?(R.current=re,Ta(W1,w,G,{discrete:!1}),q.target.setPointerCapture(q.pointerId)):(Math.abs(ce)>K||Math.abs(ee)>K)&&(_.current=null)}),onPointerUp:Ee(e.onPointerUp,q=>{const ce=R.current,ee=q.target;if(ee.hasPointerCapture(q.pointerId)&&ee.releasePointerCapture(q.pointerId),R.current=null,_.current=null,ce){const Q=q.currentTarget,B={originalEvent:q,delta:ce};im(ce,x.swipeDirection,x.swipeThreshold)?Ta(X1,E,B,{discrete:!0}):Ta(K1,b,B,{discrete:!0}),Q.addEventListener("click",Z=>Z.preventDefault(),{once:!0})}})})})}),x.viewport)})]}):null}),J1=e=>{const{__scopeToast:n,children:o,...s}=e,a=Ra(ci,n),[l,f]=g.useState(!1),[d,h]=g.useState(!1);return tC(()=>f(!0)),g.useEffect(()=>{const v=window.setTimeout(()=>h(!0),1e3);return()=>window.clearTimeout(v)},[]),d?null:c.jsx(li,{asChild:!0,children:c.jsx(Cu,{...s,children:l&&c.jsxs(c.Fragment,{children:[a.label," ",o]})})})},Z1="ToastTitle",Zh=g.forwardRef((e,n)=>{const{__scopeToast:o,...s}=e;return c.jsx(Te.div,{...s,ref:n})});Zh.displayName=Z1;var eC="ToastDescription",em=g.forwardRef((e,n)=>{const{__scopeToast:o,...s}=e;return c.jsx(Te.div,{...s,ref:n})});em.displayName=eC;var tm="ToastAction",nm=g.forwardRef((e,n)=>{const{altText:o,...s}=e;return o.trim()?c.jsx(om,{altText:o,asChild:!0,children:c.jsx(Ru,{...s,ref:n})}):(console.error(`Invalid prop \`altText\` supplied to \`${tm}\`. Expected non-empty \`string\`.`),null)});nm.displayName=tm;var rm="ToastClose",Ru=g.forwardRef((e,n)=>{const{__scopeToast:o,...s}=e,a=q1(rm,o);return c.jsx(om,{asChild:!0,children:c.jsx(Te.button,{type:"button",...s,ref:n,onClick:Ee(e.onClick,a.onClose)})})});Ru.displayName=rm;var om=g.forwardRef((e,n)=>{const{__scopeToast:o,altText:s,...a}=e;return c.jsx(Te.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":s||void 0,...a,ref:n})});function sm(e){const n=[];return Array.from(e.childNodes).forEach(s=>{if(s.nodeType===s.TEXT_NODE&&s.textContent&&n.push(s.textContent),nC(s)){const a=s.ariaHidden||s.hidden||s.style.display==="none",l=s.dataset.radixToastAnnounceExclude==="";if(!a)if(l){const f=s.dataset.radixToastAnnounceAlt;f&&n.push(f)}else n.push(...sm(s))}}),n}function Ta(e,n,o,{discrete:s}){const a=o.originalEvent.currentTarget,l=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:o});n&&a.addEventListener(e,n,{once:!0}),s?$h(a,l):a.dispatchEvent(l)}var im=(e,n,o=0)=>{const s=Math.abs(e.x),a=Math.abs(e.y),l=s>a;return n==="left"||n==="right"?l&&s>o:!l&&a>o};function tC(e=()=>{}){const n=Mt(e);jt(()=>{let o=0,s=0;return o=window.requestAnimationFrame(()=>s=window.requestAnimationFrame(n)),()=>{window.cancelAnimationFrame(o),window.cancelAnimationFrame(s)}},[n])}function nC(e){return e.nodeType===e.ELEMENT_NODE}function rC(e){const n=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const a=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||a?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)n.push(o.currentNode);return n}function Tu(e){const n=document.activeElement;return e.some(o=>o===n?!0:(o.focus(),document.activeElement!==n))}var oC=Xh,am=qh,lm=Jh,cm=Zh,um=em,dm=nm,fm=Ru;function pm(e){var n,o,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(n=0;n<a;n++)e[n]&&(o=pm(e[n]))&&(s&&(s+=" "),s+=o)}else for(o in e)e[o]&&(s&&(s+=" "),s+=o);return s}function hm(){for(var e,n,o=0,s="",a=arguments.length;o<a;o++)(e=arguments[o])&&(n=pm(e))&&(s&&(s+=" "),s+=n);return s}const mm=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,gm=hm,Pa=(e,n)=>o=>{var s;if((n==null?void 0:n.variants)==null)return gm(e,o==null?void 0:o.class,o==null?void 0:o.className);const{variants:a,defaultVariants:l}=n,f=Object.keys(a).map(v=>{const w=o==null?void 0:o[v],m=l==null?void 0:l[v];if(w===null)return null;const b=mm(w)||mm(m);return a[v][b]}),d=o&&Object.entries(o).reduce((v,w)=>{let[m,b]=w;return b===void 0||(v[m]=b),v},{}),h=n==null||(s=n.compoundVariants)===null||s===void 0?void 0:s.reduce((v,w)=>{let{class:m,className:b,...E}=w;return Object.entries(E).every(j=>{let[x,S]=j;return Array.isArray(S)?S.includes({...l,...d}[x]):{...l,...d}[x]===S})?[...v,m,b]:v},[]);return gm(e,f,h,o==null?void 0:o.class,o==null?void 0:o.className)},Pu="-",sC=e=>{const n=aC(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:f=>{const d=f.split(Pu);return d[0]===""&&d.length!==1&&d.shift(),vm(d,n)||iC(f)},getConflictingClassGroupIds:(f,d)=>{const h=o[f]||[];return d&&s[f]?[...h,...s[f]]:h}}},vm=(e,n)=>{var f;if(e.length===0)return n.classGroupId;const o=e[0],s=n.nextPart.get(o),a=s?vm(e.slice(1),s):void 0;if(a)return a;if(n.validators.length===0)return;const l=e.join(Pu);return(f=n.validators.find(({validator:d})=>d(l)))==null?void 0:f.classGroupId},ym=/^\[(.+)\]$/,iC=e=>{if(ym.test(e)){const n=ym.exec(e)[1],o=n==null?void 0:n.substring(0,n.indexOf(":"));if(o)return"arbitrary.."+o}},aC=e=>{const{theme:n,prefix:o}=e,s={nextPart:new Map,validators:[]};return cC(Object.entries(e.classGroups),o).forEach(([l,f])=>{Du(f,s,l,n)}),s},Du=(e,n,o,s)=>{e.forEach(a=>{if(typeof a=="string"){const l=a===""?n:wm(n,a);l.classGroupId=o;return}if(typeof a=="function"){if(lC(a)){Du(a(s),n,o,s);return}n.validators.push({validator:a,classGroupId:o});return}Object.entries(a).forEach(([l,f])=>{Du(f,wm(n,l),o,s)})})},wm=(e,n)=>{let o=e;return n.split(Pu).forEach(s=>{o.nextPart.has(s)||o.nextPart.set(s,{nextPart:new Map,validators:[]}),o=o.nextPart.get(s)}),o},lC=e=>e.isThemeGetter,cC=(e,n)=>n?e.map(([o,s])=>{const a=s.map(l=>typeof l=="string"?n+l:typeof l=="object"?Object.fromEntries(Object.entries(l).map(([f,d])=>[n+f,d])):l);return[o,a]}):e,uC=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,o=new Map,s=new Map;const a=(l,f)=>{o.set(l,f),n++,n>e&&(n=0,s=o,o=new Map)};return{get(l){let f=o.get(l);if(f!==void 0)return f;if((f=s.get(l))!==void 0)return a(l,f),f},set(l,f){o.has(l)?o.set(l,f):a(l,f)}}},xm="!",dC=e=>{const{separator:n,experimentalParseClassName:o}=e,s=n.length===1,a=n[0],l=n.length,f=d=>{const h=[];let v=0,w=0,m;for(let S=0;S<d.length;S++){let C=d[S];if(v===0){if(C===a&&(s||d.slice(S,S+l)===n)){h.push(d.slice(w,S)),w=S+l;continue}if(C==="/"){m=S;continue}}C==="["?v++:C==="]"&&v--}const b=h.length===0?d:d.substring(w),E=b.startsWith(xm),j=E?b.substring(1):b,x=m&&m>w?m-w:void 0;return{modifiers:h,hasImportantModifier:E,baseClassName:j,maybePostfixModifierPosition:x}};return o?d=>o({className:d,parseClassName:f}):f},fC=e=>{if(e.length<=1)return e;const n=[];let o=[];return e.forEach(s=>{s[0]==="["?(n.push(...o.sort(),s),o=[]):o.push(s)}),n.push(...o.sort()),n},pC=e=>({cache:uC(e.cacheSize),parseClassName:dC(e),...sC(e)}),hC=/\s+/,mC=(e,n)=>{const{parseClassName:o,getClassGroupId:s,getConflictingClassGroupIds:a}=n,l=[],f=e.trim().split(hC);let d="";for(let h=f.length-1;h>=0;h-=1){const v=f[h],{modifiers:w,hasImportantModifier:m,baseClassName:b,maybePostfixModifierPosition:E}=o(v);let j=!!E,x=s(j?b.substring(0,E):b);if(!x){if(!j){d=v+(d.length>0?" "+d:d);continue}if(x=s(b),!x){d=v+(d.length>0?" "+d:d);continue}j=!1}const S=fC(w).join(":"),C=m?S+xm:S,N=C+x;if(l.includes(N))continue;l.push(N);const _=a(x,j);for(let R=0;R<_.length;++R){const P=_[R];l.push(C+P)}d=v+(d.length>0?" "+d:d)}return d};function gC(){let e=0,n,o,s="";for(;e<arguments.length;)(n=arguments[e++])&&(o=bm(n))&&(s&&(s+=" "),s+=o);return s}const bm=e=>{if(typeof e=="string")return e;let n,o="";for(let s=0;s<e.length;s++)e[s]&&(n=bm(e[s]))&&(o&&(o+=" "),o+=n);return o};function vC(e,...n){let o,s,a,l=f;function f(h){const v=n.reduce((w,m)=>m(w),e());return o=pC(v),s=o.cache.get,a=o.cache.set,l=d,d(h)}function d(h){const v=s(h);if(v)return v;const w=mC(h,o);return a(h,w),w}return function(){return l(gC.apply(null,arguments))}}const st=e=>{const n=o=>o[e]||[];return n.isThemeGetter=!0,n},Sm=/^\[(?:([a-z-]+):)?(.+)\]$/i,yC=/^\d+\/\d+$/,wC=new Set(["px","full","screen"]),xC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,bC=/\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$/,SC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,CC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,_C=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Nr=e=>is(e)||wC.has(e)||yC.test(e),Yr=e=>as(e,"length",DC),is=e=>!!e&&!Number.isNaN(Number(e)),Au=e=>as(e,"number",is),ui=e=>!!e&&Number.isInteger(Number(e)),EC=e=>e.endsWith("%")&&is(e.slice(0,-1)),Fe=e=>Sm.test(e),Kr=e=>xC.test(e),NC=new Set(["length","size","percentage"]),kC=e=>as(e,NC,Cm),jC=e=>as(e,"position",Cm),RC=new Set(["image","url"]),TC=e=>as(e,RC,OC),PC=e=>as(e,"",AC),di=()=>!0,as=(e,n,o)=>{const s=Sm.exec(e);return s?s[1]?typeof n=="string"?s[1]===n:n.has(s[1]):o(s[2]):!1},DC=e=>bC.test(e)&&!SC.test(e),Cm=()=>!1,AC=e=>CC.test(e),OC=e=>_C.test(e),MC=vC(()=>{const e=st("colors"),n=st("spacing"),o=st("blur"),s=st("brightness"),a=st("borderColor"),l=st("borderRadius"),f=st("borderSpacing"),d=st("borderWidth"),h=st("contrast"),v=st("grayscale"),w=st("hueRotate"),m=st("invert"),b=st("gap"),E=st("gradientColorStops"),j=st("gradientColorStopPositions"),x=st("inset"),S=st("margin"),C=st("opacity"),N=st("padding"),_=st("saturate"),R=st("scale"),P=st("sepia"),A=st("skew"),D=st("space"),F=st("translate"),V=()=>["auto","contain","none"],Y=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto",Fe,n],te=()=>[Fe,n],X=()=>["",Nr,Yr],q=()=>["auto",is,Fe],ce=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ee=()=>["solid","dashed","dotted","double","none"],Q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],B=()=>["start","end","center","between","around","evenly","stretch"],Z=()=>["","0",Fe],ne=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>[is,Fe];return{cacheSize:500,separator:":",theme:{colors:[di],spacing:[Nr,Yr],blur:["none","",Kr,Fe],brightness:M(),borderColor:[e],borderRadius:["none","","full",Kr,Fe],borderSpacing:te(),borderWidth:X(),contrast:M(),grayscale:Z(),hueRotate:M(),invert:Z(),gap:te(),gradientColorStops:[e],gradientColorStopPositions:[EC,Yr],inset:H(),margin:H(),opacity:M(),padding:te(),saturate:M(),scale:M(),sepia:Z(),skew:M(),space:te(),translate:te()},classGroups:{aspect:[{aspect:["auto","square","video",Fe]}],container:["container"],columns:[{columns:[Kr]}],"break-after":[{"break-after":ne()}],"break-before":[{"break-before":ne()}],"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:[...ce(),Fe]}],overflow:[{overflow:Y()}],"overflow-x":[{"overflow-x":Y()}],"overflow-y":[{"overflow-y":Y()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[x]}],"inset-x":[{"inset-x":[x]}],"inset-y":[{"inset-y":[x]}],start:[{start:[x]}],end:[{end:[x]}],top:[{top:[x]}],right:[{right:[x]}],bottom:[{bottom:[x]}],left:[{left:[x]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ui,Fe]}],basis:[{basis:H()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Fe]}],grow:[{grow:Z()}],shrink:[{shrink:Z()}],order:[{order:["first","last","none",ui,Fe]}],"grid-cols":[{"grid-cols":[di]}],"col-start-end":[{col:["auto",{span:["full",ui,Fe]},Fe]}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":[di]}],"row-start-end":[{row:["auto",{span:[ui,Fe]},Fe]}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Fe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Fe]}],gap:[{gap:[b]}],"gap-x":[{"gap-x":[b]}],"gap-y":[{"gap-y":[b]}],"justify-content":[{justify:["normal",...B()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...B(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...B(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[N]}],px:[{px:[N]}],py:[{py:[N]}],ps:[{ps:[N]}],pe:[{pe:[N]}],pt:[{pt:[N]}],pr:[{pr:[N]}],pb:[{pb:[N]}],pl:[{pl:[N]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"space-x":[{"space-x":[D]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[D]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Fe,n]}],"min-w":[{"min-w":[Fe,n,"min","max","fit"]}],"max-w":[{"max-w":[Fe,n,"none","full","min","max","fit","prose",{screen:[Kr]},Kr]}],h:[{h:[Fe,n,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Fe,n,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Fe,n,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Fe,n,"auto","min","max","fit"]}],"font-size":[{text:["base",Kr,Yr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Au]}],"font-family":[{font:[di]}],"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-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Fe]}],"line-clamp":[{"line-clamp":["none",is,Au]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Nr,Fe]}],"list-image":[{"list-image":["none",Fe]}],"list-style-type":[{list:["none","disc","decimal",Fe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[C]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[C]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Nr,Yr]}],"underline-offset":[{"underline-offset":["auto",Nr,Fe]}],"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:te()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Fe]}],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",Fe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[C]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ce(),jC]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",kC]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},TC]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[j]}],"gradient-via-pos":[{via:[j]}],"gradient-to-pos":[{to:[j]}],"gradient-from":[{from:[E]}],"gradient-via":[{via:[E]}],"gradient-to":[{to:[E]}],rounded:[{rounded:[l]}],"rounded-s":[{"rounded-s":[l]}],"rounded-e":[{"rounded-e":[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-ss":[{"rounded-ss":[l]}],"rounded-se":[{"rounded-se":[l]}],"rounded-ee":[{"rounded-ee":[l]}],"rounded-es":[{"rounded-es":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"border-w":[{border:[d]}],"border-w-x":[{"border-x":[d]}],"border-w-y":[{"border-y":[d]}],"border-w-s":[{"border-s":[d]}],"border-w-e":[{"border-e":[d]}],"border-w-t":[{"border-t":[d]}],"border-w-r":[{"border-r":[d]}],"border-w-b":[{"border-b":[d]}],"border-w-l":[{"border-l":[d]}],"border-opacity":[{"border-opacity":[C]}],"border-style":[{border:[...ee(),"hidden"]}],"divide-x":[{"divide-x":[d]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[d]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[C]}],"divide-style":[{divide:ee()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...ee()]}],"outline-offset":[{"outline-offset":[Nr,Fe]}],"outline-w":[{outline:[Nr,Yr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[C]}],"ring-offset-w":[{"ring-offset":[Nr,Yr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Kr,PC]}],"shadow-color":[{shadow:[di]}],opacity:[{opacity:[C]}],"mix-blend":[{"mix-blend":[...Q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Q()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[s]}],contrast:[{contrast:[h]}],"drop-shadow":[{"drop-shadow":["","none",Kr,Fe]}],grayscale:[{grayscale:[v]}],"hue-rotate":[{"hue-rotate":[w]}],invert:[{invert:[m]}],saturate:[{saturate:[_]}],sepia:[{sepia:[P]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[s]}],"backdrop-contrast":[{"backdrop-contrast":[h]}],"backdrop-grayscale":[{"backdrop-grayscale":[v]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[w]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[C]}],"backdrop-saturate":[{"backdrop-saturate":[_]}],"backdrop-sepia":[{"backdrop-sepia":[P]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[f]}],"border-spacing-x":[{"border-spacing-x":[f]}],"border-spacing-y":[{"border-spacing-y":[f]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Fe]}],duration:[{duration:M()}],ease:[{ease:["linear","in","out","in-out",Fe]}],delay:[{delay:M()}],animate:[{animate:["none","spin","ping","pulse","bounce",Fe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[R]}],"scale-x":[{"scale-x":[R]}],"scale-y":[{"scale-y":[R]}],rotate:[{rotate:[ui,Fe]}],"translate-x":[{"translate-x":[F]}],"translate-y":[{"translate-y":[F]}],"skew-x":[{"skew-x":[A]}],"skew-y":[{"skew-y":[A]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Fe]}],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",Fe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":te()}],"scroll-mx":[{"scroll-mx":te()}],"scroll-my":[{"scroll-my":te()}],"scroll-ms":[{"scroll-ms":te()}],"scroll-me":[{"scroll-me":te()}],"scroll-mt":[{"scroll-mt":te()}],"scroll-mr":[{"scroll-mr":te()}],"scroll-mb":[{"scroll-mb":te()}],"scroll-ml":[{"scroll-ml":te()}],"scroll-p":[{"scroll-p":te()}],"scroll-px":[{"scroll-px":te()}],"scroll-py":[{"scroll-py":te()}],"scroll-ps":[{"scroll-ps":te()}],"scroll-pe":[{"scroll-pe":te()}],"scroll-pt":[{"scroll-pt":te()}],"scroll-pr":[{"scroll-pr":te()}],"scroll-pb":[{"scroll-pb":te()}],"scroll-pl":[{"scroll-pl":te()}],"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",Fe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Nr,Yr,Au]}],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-s","border-color-e","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"]}}});function ke(...e){return MC(hm(e))}const IC=oC,_m=g.forwardRef(({className:e,...n},o)=>c.jsx(am,{ref:o,className:ke("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:end-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...n}));_m.displayName=am.displayName;const LC=Pa("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pe-6 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"}}),Em=g.forwardRef(({className:e,variant:n,...o},s)=>c.jsx(lm,{ref:s,className:ke(LC({variant:n}),e),...o}));Em.displayName=lm.displayName;const FC=g.forwardRef(({className:e,...n},o)=>c.jsx(dm,{ref:o,className:ke("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring 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),...n}));FC.displayName=dm.displayName;const Nm=g.forwardRef(({className:e,...n},o)=>c.jsx(fm,{ref:o,className:ke("absolute end-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 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":"",...n,children:c.jsx(si,{className:"h-4 w-4"})}));Nm.displayName=fm.displayName;const km=g.forwardRef(({className:e,...n},o)=>c.jsx(cm,{ref:o,className:ke("text-sm font-semibold [&+div]:text-xs",e),...n}));km.displayName=cm.displayName;const jm=g.forwardRef(({className:e,...n},o)=>c.jsx(um,{ref:o,className:ke("text-sm opacity-90",e),...n}));jm.displayName=um.displayName;function zC(){const{toasts:e}=m1();return c.jsxs(IC,{children:[e.map(function({id:n,title:o,description:s,action:a,...l}){return c.jsxs(Em,{...l,children:[c.jsxs("div",{className:"grid gap-1",children:[o&&c.jsx(km,{children:o}),s&&c.jsx(jm,{children:s})]}),a,c.jsx(Nm,{})]},n)}),c.jsx(_m,{})]})}function $C(e){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}const BC=e=>{switch(e){case"success":return VC;case"info":return YC;case"warning":return WC;case"error":return KC;default:return null}},UC=Array(12).fill(0),HC=({visible:e,className:n})=>z.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":e},z.createElement("div",{className:"sonner-spinner"},UC.map((o,s)=>z.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${s}`})))),VC=z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},z.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),WC=z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},z.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),YC=z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},z.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),KC=z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},z.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),XC=z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},z.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),z.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),GC=()=>{const[e,n]=z.useState(document.hidden);return z.useEffect(()=>{const o=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",o),()=>window.removeEventListener("visibilitychange",o)},[]),e};let Ou=1;class qC{constructor(){this.subscribe=n=>(this.subscribers.push(n),()=>{const o=this.subscribers.indexOf(n);this.subscribers.splice(o,1)}),this.publish=n=>{this.subscribers.forEach(o=>o(n))},this.addToast=n=>{this.publish(n),this.toasts=[...this.toasts,n]},this.create=n=>{var o;const{message:s,...a}=n,l=typeof(n==null?void 0:n.id)=="number"||((o=n.id)==null?void 0:o.length)>0?n.id:Ou++,f=this.toasts.find(h=>h.id===l),d=n.dismissible===void 0?!0:n.dismissible;return this.dismissedToasts.has(l)&&this.dismissedToasts.delete(l),f?this.toasts=this.toasts.map(h=>h.id===l?(this.publish({...h,...n,id:l,title:s}),{...h,...n,id:l,dismissible:d,title:s}):h):this.addToast({title:s,...a,dismissible:d,id:l}),l},this.dismiss=n=>(n?(this.dismissedToasts.add(n),requestAnimationFrame(()=>this.subscribers.forEach(o=>o({id:n,dismiss:!0})))):this.toasts.forEach(o=>{this.subscribers.forEach(s=>s({id:o.id,dismiss:!0}))}),n),this.message=(n,o)=>this.create({...o,message:n}),this.error=(n,o)=>this.create({...o,message:n,type:"error"}),this.success=(n,o)=>this.create({...o,type:"success",message:n}),this.info=(n,o)=>this.create({...o,type:"info",message:n}),this.warning=(n,o)=>this.create({...o,type:"warning",message:n}),this.loading=(n,o)=>this.create({...o,type:"loading",message:n}),this.promise=(n,o)=>{if(!o)return;let s;o.loading!==void 0&&(s=this.create({...o,promise:n,type:"loading",message:o.loading,description:typeof o.description!="function"?o.description:void 0}));const a=Promise.resolve(n instanceof Function?n():n);let l=s!==void 0,f;const d=a.then(async v=>{if(f=["resolve",v],z.isValidElement(v))l=!1,this.create({id:s,type:"default",message:v});else if(JC(v)&&!v.ok){l=!1;const m=typeof o.error=="function"?await o.error(`HTTP error! status: ${v.status}`):o.error,b=typeof o.description=="function"?await o.description(`HTTP error! status: ${v.status}`):o.description,j=typeof m=="object"&&!z.isValidElement(m)?m:{message:m};this.create({id:s,type:"error",description:b,...j})}else if(v instanceof Error){l=!1;const m=typeof o.error=="function"?await o.error(v):o.error,b=typeof o.description=="function"?await o.description(v):o.description,j=typeof m=="object"&&!z.isValidElement(m)?m:{message:m};this.create({id:s,type:"error",description:b,...j})}else if(o.success!==void 0){l=!1;const m=typeof o.success=="function"?await o.success(v):o.success,b=typeof o.description=="function"?await o.description(v):o.description,j=typeof m=="object"&&!z.isValidElement(m)?m:{message:m};this.create({id:s,type:"success",description:b,...j})}}).catch(async v=>{if(f=["reject",v],o.error!==void 0){l=!1;const w=typeof o.error=="function"?await o.error(v):o.error,m=typeof o.description=="function"?await o.description(v):o.description,E=typeof w=="object"&&!z.isValidElement(w)?w:{message:w};this.create({id:s,type:"error",description:m,...E})}}).finally(()=>{l&&(this.dismiss(s),s=void 0),o.finally==null||o.finally.call(o)}),h=()=>new Promise((v,w)=>d.then(()=>f[0]==="reject"?w(f[1]):v(f[1])).catch(w));return typeof s!="string"&&typeof s!="number"?{unwrap:h}:Object.assign(s,{unwrap:h})},this.custom=(n,o)=>{const s=(o==null?void 0:o.id)||Ou++;return this.create({jsx:n(s),id:s,...o}),s},this.getActiveToasts=()=>this.toasts.filter(n=>!this.dismissedToasts.has(n.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const dn=new qC,QC=(e,n)=>{const o=(n==null?void 0:n.id)||Ou++;return dn.addToast({title:e,...n,id:o}),o},JC=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",ZC=QC,e_=()=>dn.toasts,t_=()=>dn.getActiveToasts(),Po=Object.assign(ZC,{success:dn.success,info:dn.info,warning:dn.warning,error:dn.error,custom:dn.custom,message:dn.message,promise:dn.promise,dismiss:dn.dismiss,loading:dn.loading},{getHistory:e_,getToasts:t_});$C("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Da(e){return e.label!==void 0}const n_=3,r_="24px",o_="16px",Rm=4e3,s_=356,i_=14,a_=45,l_=200;function lr(...e){return e.filter(Boolean).join(" ")}function c_(e){const[n,o]=e.split("-"),s=[];return n&&s.push(n),o&&s.push(o),s}const u_=e=>{var n,o,s,a,l,f,d,h,v;const{invert:w,toast:m,unstyled:b,interacting:E,setHeights:j,visibleToasts:x,heights:S,index:C,toasts:N,expanded:_,removeToast:R,defaultRichColors:P,closeButton:A,style:D,cancelButtonStyle:F,actionButtonStyle:V,className:Y="",descriptionClassName:H="",duration:te,position:X,gap:q,expandByDefault:ce,classNames:ee,icons:Q,closeButtonAriaLabel:B="Close toast"}=e,[Z,ne]=z.useState(null),[M,K]=z.useState(null),[re,G]=z.useState(!1),[fe,me]=z.useState(!1),[le,ie]=z.useState(!1),[we,pe]=z.useState(!1),[Ne,ue]=z.useState(!1),[Me,he]=z.useState(0),[et,Ct]=z.useState(0),wt=z.useRef(m.duration||te||Rm),On=z.useRef(null),ct=z.useRef(null),ht=C===0,Jt=C+1<=x,ut=m.type,$t=m.dismissible!==!1,Pr=m.className||"",Dr=m.descriptionClassName||"",Zn=z.useMemo(()=>S.findIndex(ge=>ge.toastId===m.id)||0,[S,m.id]),hn=z.useMemo(()=>{var ge;return(ge=m.closeButton)!=null?ge:A},[m.closeButton,A]),Pt=z.useMemo(()=>m.duration||te||Rm,[m.duration,te]),mn=z.useRef(0),Bt=z.useRef(0),Dt=z.useRef(0),Gt=z.useRef(null),[Ar,lo]=X.split("-"),wr=z.useMemo(()=>S.reduce((ge,Ae,$e)=>$e>=Zn?ge:ge+Ae.height,0),[S,Zn]),er=GC(),Or=m.invert||w,Mn=ut==="loading";Bt.current=z.useMemo(()=>Zn*q+wr,[Zn,wr]),z.useEffect(()=>{wt.current=Pt},[Pt]),z.useEffect(()=>{G(!0)},[]),z.useEffect(()=>{const ge=ct.current;if(ge){const Ae=ge.getBoundingClientRect().height;return Ct(Ae),j($e=>[{toastId:m.id,height:Ae,position:m.position},...$e]),()=>j($e=>$e.filter(Le=>Le.toastId!==m.id))}},[j,m.id]),z.useLayoutEffect(()=>{if(!re)return;const ge=ct.current,Ae=ge.style.height;ge.style.height="auto";const $e=ge.getBoundingClientRect().height;ge.style.height=Ae,Ct($e),j(Le=>Le.find(Ye=>Ye.toastId===m.id)?Le.map(Ye=>Ye.toastId===m.id?{...Ye,height:$e}:Ye):[{toastId:m.id,height:$e,position:m.position},...Le])},[re,m.title,m.description,j,m.id,m.jsx,m.action,m.cancel]);const be=z.useCallback(()=>{me(!0),he(Bt.current),j(ge=>ge.filter(Ae=>Ae.toastId!==m.id)),setTimeout(()=>{R(m)},l_)},[m,R,j,Bt]);z.useEffect(()=>{if(m.promise&&ut==="loading"||m.duration===1/0||m.type==="loading")return;let ge;return _||E||er?(()=>{if(Dt.current<mn.current){const Le=new Date().getTime()-mn.current;wt.current=wt.current-Le}Dt.current=new Date().getTime()})():(()=>{wt.current!==1/0&&(mn.current=new Date().getTime(),ge=setTimeout(()=>{m.onAutoClose==null||m.onAutoClose.call(m,m),be()},wt.current))})(),()=>clearTimeout(ge)},[_,E,m,ut,er,be]),z.useEffect(()=>{m.delete&&(be(),m.onDismiss==null||m.onDismiss.call(m,m))},[be,m.delete]);function Ve(){var ge;if(Q!=null&&Q.loading){var Ae;return z.createElement("div",{className:lr(ee==null?void 0:ee.loader,m==null||(Ae=m.classNames)==null?void 0:Ae.loader,"sonner-loader"),"data-visible":ut==="loading"},Q.loading)}return z.createElement(HC,{className:lr(ee==null?void 0:ee.loader,m==null||(ge=m.classNames)==null?void 0:ge.loader),visible:ut==="loading"})}const We=m.icon||(Q==null?void 0:Q[ut])||BC(ut);var _e,ze;return z.createElement("li",{tabIndex:0,ref:ct,className:lr(Y,Pr,ee==null?void 0:ee.toast,m==null||(n=m.classNames)==null?void 0:n.toast,ee==null?void 0:ee.default,ee==null?void 0:ee[ut],m==null||(o=m.classNames)==null?void 0:o[ut]),"data-sonner-toast":"","data-rich-colors":(_e=m.richColors)!=null?_e:P,"data-styled":!(m.jsx||m.unstyled||b),"data-mounted":re,"data-promise":!!m.promise,"data-swiped":Ne,"data-removed":fe,"data-visible":Jt,"data-y-position":Ar,"data-x-position":lo,"data-index":C,"data-front":ht,"data-swiping":le,"data-dismissible":$t,"data-type":ut,"data-invert":Or,"data-swipe-out":we,"data-swipe-direction":M,"data-expanded":!!(_||ce&&re),"data-testid":m.testId,style:{"--index":C,"--toasts-before":C,"--z-index":N.length-C,"--offset":`${fe?Me:Bt.current}px`,"--initial-height":ce?"auto":`${et}px`,...D,...m.style},onDragEnd:()=>{ie(!1),ne(null),Gt.current=null},onPointerDown:ge=>{ge.button!==2&&(Mn||!$t||(On.current=new Date,he(Bt.current),ge.target.setPointerCapture(ge.pointerId),ge.target.tagName!=="BUTTON"&&(ie(!0),Gt.current={x:ge.clientX,y:ge.clientY})))},onPointerUp:()=>{var ge,Ae,$e;if(we||!$t)return;Gt.current=null;const Le=Number(((ge=ct.current)==null?void 0:ge.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),rt=Number(((Ae=ct.current)==null?void 0:Ae.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ye=new Date().getTime()-(($e=On.current)==null?void 0:$e.getTime()),Pe=Z==="x"?Le:rt,xt=Math.abs(Pe)/Ye;if(Math.abs(Pe)>=a_||xt>.11){he(Bt.current),m.onDismiss==null||m.onDismiss.call(m,m),K(Z==="x"?Le>0?"right":"left":rt>0?"down":"up"),be(),pe(!0);return}else{var Je,mt;(Je=ct.current)==null||Je.style.setProperty("--swipe-amount-x","0px"),(mt=ct.current)==null||mt.style.setProperty("--swipe-amount-y","0px")}ue(!1),ie(!1),ne(null)},onPointerMove:ge=>{var Ae,$e,Le;if(!Gt.current||!$t||((Ae=window.getSelection())==null?void 0:Ae.toString().length)>0)return;const Ye=ge.clientY-Gt.current.y,Pe=ge.clientX-Gt.current.x;var xt;const Je=(xt=e.swipeDirections)!=null?xt:c_(X);!Z&&(Math.abs(Pe)>1||Math.abs(Ye)>1)&&ne(Math.abs(Pe)>Math.abs(Ye)?"x":"y");let mt={x:0,y:0};const gn=Ut=>1/(1.5+Math.abs(Ut)/20);if(Z==="y"){if(Je.includes("top")||Je.includes("bottom"))if(Je.includes("top")&&Ye<0||Je.includes("bottom")&&Ye>0)mt.y=Ye;else{const Ut=Ye*gn(Ye);mt.y=Math.abs(Ut)<Math.abs(Ye)?Ut:Ye}}else if(Z==="x"&&(Je.includes("left")||Je.includes("right")))if(Je.includes("left")&&Pe<0||Je.includes("right")&&Pe>0)mt.x=Pe;else{const Ut=Pe*gn(Pe);mt.x=Math.abs(Ut)<Math.abs(Pe)?Ut:Pe}(Math.abs(mt.x)>0||Math.abs(mt.y)>0)&&ue(!0),($e=ct.current)==null||$e.style.setProperty("--swipe-amount-x",`${mt.x}px`),(Le=ct.current)==null||Le.style.setProperty("--swipe-amount-y",`${mt.y}px`)}},hn&&!m.jsx&&ut!=="loading"?z.createElement("button",{"aria-label":B,"data-disabled":Mn,"data-close-button":!0,onClick:Mn||!$t?()=>{}:()=>{be(),m.onDismiss==null||m.onDismiss.call(m,m)},className:lr(ee==null?void 0:ee.closeButton,m==null||(s=m.classNames)==null?void 0:s.closeButton)},(ze=Q==null?void 0:Q.close)!=null?ze:XC):null,(ut||m.icon||m.promise)&&m.icon!==null&&((Q==null?void 0:Q[ut])!==null||m.icon)?z.createElement("div",{"data-icon":"",className:lr(ee==null?void 0:ee.icon,m==null||(a=m.classNames)==null?void 0:a.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||Ve():null,m.type!=="loading"?We:null):null,z.createElement("div",{"data-content":"",className:lr(ee==null?void 0:ee.content,m==null||(l=m.classNames)==null?void 0:l.content)},z.createElement("div",{"data-title":"",className:lr(ee==null?void 0:ee.title,m==null||(f=m.classNames)==null?void 0:f.title)},m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title),m.description?z.createElement("div",{"data-description":"",className:lr(H,Dr,ee==null?void 0:ee.description,m==null||(d=m.classNames)==null?void 0:d.description)},typeof m.description=="function"?m.description():m.description):null),z.isValidElement(m.cancel)?m.cancel:m.cancel&&Da(m.cancel)?z.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||F,onClick:ge=>{Da(m.cancel)&&$t&&(m.cancel.onClick==null||m.cancel.onClick.call(m.cancel,ge),be())},className:lr(ee==null?void 0:ee.cancelButton,m==null||(h=m.classNames)==null?void 0:h.cancelButton)},m.cancel.label):null,z.isValidElement(m.action)?m.action:m.action&&Da(m.action)?z.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||V,onClick:ge=>{Da(m.action)&&(m.action.onClick==null||m.action.onClick.call(m.action,ge),!ge.defaultPrevented&&be())},className:lr(ee==null?void 0:ee.actionButton,m==null||(v=m.classNames)==null?void 0:v.actionButton)},m.action.label):null)};function Tm(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function d_(e,n){const o={};return[e,n].forEach((s,a)=>{const l=a===1,f=l?"--mobile-offset":"--offset",d=l?o_:r_;function h(v){["top","right","bottom","left"].forEach(w=>{o[`${f}-${w}`]=typeof v=="number"?`${v}px`:v})}typeof s=="number"||typeof s=="string"?h(s):typeof s=="object"?["top","right","bottom","left"].forEach(v=>{s[v]===void 0?o[`${f}-${v}`]=d:o[`${f}-${v}`]=typeof s[v]=="number"?`${s[v]}px`:s[v]}):h(d)}),o}const f_=z.forwardRef(function(n,o){const{id:s,invert:a,position:l="bottom-right",hotkey:f=["altKey","KeyT"],expand:d,closeButton:h,className:v,offset:w,mobileOffset:m,theme:b="light",richColors:E,duration:j,style:x,visibleToasts:S=n_,toastOptions:C,dir:N=Tm(),gap:_=i_,icons:R,containerAriaLabel:P="Notifications"}=n,[A,D]=z.useState([]),F=z.useMemo(()=>s?A.filter(re=>re.toasterId===s):A.filter(re=>!re.toasterId),[A,s]),V=z.useMemo(()=>Array.from(new Set([l].concat(F.filter(re=>re.position).map(re=>re.position)))),[F,l]),[Y,H]=z.useState([]),[te,X]=z.useState(!1),[q,ce]=z.useState(!1),[ee,Q]=z.useState(b!=="system"?b:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),B=z.useRef(null),Z=f.join("+").replace(/Key/g,"").replace(/Digit/g,""),ne=z.useRef(null),M=z.useRef(!1),K=z.useCallback(re=>{D(G=>{var fe;return(fe=G.find(me=>me.id===re.id))!=null&&fe.delete||dn.dismiss(re.id),G.filter(({id:me})=>me!==re.id)})},[]);return z.useEffect(()=>dn.subscribe(re=>{if(re.dismiss){requestAnimationFrame(()=>{D(G=>G.map(fe=>fe.id===re.id?{...fe,delete:!0}:fe))});return}setTimeout(()=>{Lh.flushSync(()=>{D(G=>{const fe=G.findIndex(me=>me.id===re.id);return fe!==-1?[...G.slice(0,fe),{...G[fe],...re},...G.slice(fe+1)]:[re,...G]})})})}),[A]),z.useEffect(()=>{if(b!=="system"){Q(b);return}if(b==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Q("dark"):Q("light")),typeof window>"u")return;const re=window.matchMedia("(prefers-color-scheme: dark)");try{re.addEventListener("change",({matches:G})=>{Q(G?"dark":"light")})}catch{re.addListener(({matches:fe})=>{try{Q(fe?"dark":"light")}catch(me){console.error(me)}})}},[b]),z.useEffect(()=>{A.length<=1&&X(!1)},[A]),z.useEffect(()=>{const re=G=>{var fe;if(f.every(ie=>G[ie]||G.code===ie)){var le;X(!0),(le=B.current)==null||le.focus()}G.code==="Escape"&&(document.activeElement===B.current||(fe=B.current)!=null&&fe.contains(document.activeElement))&&X(!1)};return document.addEventListener("keydown",re),()=>document.removeEventListener("keydown",re)},[f]),z.useEffect(()=>{if(B.current)return()=>{ne.current&&(ne.current.focus({preventScroll:!0}),ne.current=null,M.current=!1)}},[B.current]),z.createElement("section",{ref:o,"aria-label":`${P} ${Z}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},V.map((re,G)=>{var fe;const[me,le]=re.split("-");return F.length?z.createElement("ol",{key:re,dir:N==="auto"?Tm():N,tabIndex:-1,ref:B,className:v,"data-sonner-toaster":!0,"data-sonner-theme":ee,"data-y-position":me,"data-x-position":le,style:{"--front-toast-height":`${((fe=Y[0])==null?void 0:fe.height)||0}px`,"--width":`${s_}px`,"--gap":`${_}px`,...x,...d_(w,m)},onBlur:ie=>{M.current&&!ie.currentTarget.contains(ie.relatedTarget)&&(M.current=!1,ne.current&&(ne.current.focus({preventScroll:!0}),ne.current=null))},onFocus:ie=>{ie.target instanceof HTMLElement&&ie.target.dataset.dismissible==="false"||M.current||(M.current=!0,ne.current=ie.relatedTarget)},onMouseEnter:()=>X(!0),onMouseMove:()=>X(!0),onMouseLeave:()=>{q||X(!1)},onDragEnd:()=>X(!1),onPointerDown:ie=>{ie.target instanceof HTMLElement&&ie.target.dataset.dismissible==="false"||ce(!0)},onPointerUp:()=>ce(!1)},F.filter(ie=>!ie.position&&G===0||ie.position===re).map((ie,we)=>{var pe,Ne;return z.createElement(u_,{key:ie.id,icons:R,index:we,toast:ie,defaultRichColors:E,duration:(pe=C==null?void 0:C.duration)!=null?pe:j,className:C==null?void 0:C.className,descriptionClassName:C==null?void 0:C.descriptionClassName,invert:a,visibleToasts:S,closeButton:(Ne=C==null?void 0:C.closeButton)!=null?Ne:h,interacting:q,position:re,style:C==null?void 0:C.style,unstyled:C==null?void 0:C.unstyled,classNames:C==null?void 0:C.classNames,cancelButtonStyle:C==null?void 0:C.cancelButtonStyle,actionButtonStyle:C==null?void 0:C.actionButtonStyle,closeButtonAriaLabel:C==null?void 0:C.closeButtonAriaLabel,removeToast:K,toasts:F.filter(ue=>ue.position==ie.position),heights:Y.filter(ue=>ue.position==ie.position),setHeights:H,expandByDefault:d,gap:_,expanded:te,swipeDirections:n.swipeDirections})})):null}))}),p_=({...e})=>c.jsx(f_,{theme:"light",className:"toaster group",icons:{success:c.jsx(hu,{className:"h-4 w-4"}),info:c.jsx(n1,{className:"h-4 w-4"}),warning:c.jsx(c1,{className:"h-4 w-4"}),error:c.jsx(s1,{className:"h-4 w-4"}),loading:c.jsx(Ah,{className:"h-4 w-4 animate-spin"})},toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e});var h_=Symbol.for("react.lazy"),Aa=ou[" use ".trim().toString()];function m_(e){return typeof e=="object"&&e!==null&&"then"in e}function Pm(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===h_&&"_payload"in e&&m_(e._payload)}function Dm(e){const n=v_(e),o=g.forwardRef((s,a)=>{let{children:l,...f}=s;Pm(l)&&typeof Aa=="function"&&(l=Aa(l._payload));const d=g.Children.toArray(l),h=d.find(w_);if(h){const v=h.props.children,w=d.map(m=>m===h?g.Children.count(v)>1?g.Children.only(null):g.isValidElement(v)?v.props.children:null:m);return c.jsx(n,{...f,ref:a,children:g.isValidElement(v)?g.cloneElement(v,void 0,w):null})}return c.jsx(n,{...f,ref:a,children:l})});return o.displayName=`${e}.Slot`,o}var g_=Dm("Slot");function v_(e){const n=g.forwardRef((o,s)=>{let{children:a,...l}=o;if(Pm(a)&&typeof Aa=="function"&&(a=Aa(a._payload)),g.isValidElement(a)){const f=b_(a),d=x_(l,a.props);return a.type!==g.Fragment&&(d.ref=s?xu(s,f):f),g.cloneElement(a,d)}return g.Children.count(a)>1?g.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var y_=Symbol("radix.slottable");function w_(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===y_}function x_(e,n){const o={...n};for(const s in n){const a=e[s],l=n[s];/^on[A-Z]/.test(s)?a&&l?o[s]=(...d)=>{const h=l(...d);return a(...d),h}:a&&(o[s]=a):s==="style"?o[s]={...a,...l}:s==="className"&&(o[s]=[a,l].filter(Boolean).join(" "))}return{...e,...o}}function b_(e){var s,a;let n=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,o=n&&"isReactWarning"in n&&n.isReactWarning;return o?e.ref:(n=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,o=n&&"isReactWarning"in n&&n.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}const Mu=Pa("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),ft=g.forwardRef(({className:e,variant:n,size:o,asChild:s=!1,...a},l)=>{const f=s?g_:"button";return c.jsx(f,{className:ke(Mu({variant:n,size:o,className:e})),ref:l,...a})});ft.displayName="Button";const fn=g.forwardRef(({className:e,type:n,...o},s)=>c.jsx("input",{type:n,className:ke("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:s,...o}));fn.displayName="Input";const S_=Pa("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function fi({className:e,variant:n,...o}){return c.jsx("div",{className:ke(S_({variant:n}),e),...o})}var C_=ou[" useId ".trim().toString()]||(()=>{}),__=0;function Xr(e){const[n,o]=g.useState(C_());return jt(()=>{o(s=>s??String(__++))},[e]),n?`radix-${n}`:""}var Iu="focusScope.autoFocusOnMount",Lu="focusScope.autoFocusOnUnmount",Am={bubbles:!1,cancelable:!0},E_="FocusScope",Oa=g.forwardRef((e,n)=>{const{loop:o=!1,trapped:s=!1,onMountAutoFocus:a,onUnmountAutoFocus:l,...f}=e,[d,h]=g.useState(null),v=Mt(a),w=Mt(l),m=g.useRef(null),b=Ie(n,x=>h(x)),E=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(s){let x=function(_){if(E.paused||!d)return;const R=_.target;d.contains(R)?m.current=R:Gr(m.current,{select:!0})},S=function(_){if(E.paused||!d)return;const R=_.relatedTarget;R!==null&&(d.contains(R)||Gr(m.current,{select:!0}))},C=function(_){if(document.activeElement===document.body)for(const P of _)P.removedNodes.length>0&&Gr(d)};document.addEventListener("focusin",x),document.addEventListener("focusout",S);const N=new MutationObserver(C);return d&&N.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",S),N.disconnect()}}},[s,d,E.paused]),g.useEffect(()=>{if(d){Im.add(E);const x=document.activeElement;if(!d.contains(x)){const C=new CustomEvent(Iu,Am);d.addEventListener(Iu,v),d.dispatchEvent(C),C.defaultPrevented||(N_(P_(Om(d)),{select:!0}),document.activeElement===x&&Gr(d))}return()=>{d.removeEventListener(Iu,v),setTimeout(()=>{const C=new CustomEvent(Lu,Am);d.addEventListener(Lu,w),d.dispatchEvent(C),C.defaultPrevented||Gr(x??document.body,{select:!0}),d.removeEventListener(Lu,w),Im.remove(E)},0)}}},[d,v,w,E]);const j=g.useCallback(x=>{if(!o&&!s||E.paused)return;const S=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,C=document.activeElement;if(S&&C){const N=x.currentTarget,[_,R]=k_(N);_&&R?!x.shiftKey&&C===R?(x.preventDefault(),o&&Gr(_,{select:!0})):x.shiftKey&&C===_&&(x.preventDefault(),o&&Gr(R,{select:!0})):C===N&&x.preventDefault()}},[o,s,E.paused]);return c.jsx(Te.div,{tabIndex:-1,...f,ref:b,onKeyDown:j})});Oa.displayName=E_;function N_(e,{select:n=!1}={}){const o=document.activeElement;for(const s of e)if(Gr(s,{select:n}),document.activeElement!==o)return}function k_(e){const n=Om(e),o=Mm(n,e),s=Mm(n.reverse(),e);return[o,s]}function Om(e){const n=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const a=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||a?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)n.push(o.currentNode);return n}function Mm(e,n){for(const o of e)if(!j_(o,{upTo:n}))return o}function j_(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function R_(e){return e instanceof HTMLInputElement&&"select"in e}function Gr(e,{select:n=!1}={}){if(e&&e.focus){const o=document.activeElement;e.focus({preventScroll:!0}),e!==o&&R_(e)&&n&&e.select()}}var Im=T_();function T_(){let e=[];return{add(n){const o=e[0];n!==o&&(o==null||o.pause()),e=Lm(e,n),e.unshift(n)},remove(n){var o;e=Lm(e,n),(o=e[0])==null||o.resume()}}}function Lm(e,n){const o=[...e],s=o.indexOf(n);return s!==-1&&o.splice(s,1),o}function P_(e){return e.filter(n=>n.tagName!=="A")}var Fu=0;function zu(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Fm()),document.body.insertAdjacentElement("beforeend",e[1]??Fm()),Fu++,()=>{Fu===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Fu--}},[])}function Fm(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var cr=function(){return cr=Object.assign||function(n){for(var o,s=1,a=arguments.length;s<a;s++){o=arguments[s];for(var l in o)Object.prototype.hasOwnProperty.call(o,l)&&(n[l]=o[l])}return n},cr.apply(this,arguments)};function zm(e,n){var o={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&n.indexOf(s)<0&&(o[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,s=Object.getOwnPropertySymbols(e);a<s.length;a++)n.indexOf(s[a])<0&&Object.prototype.propertyIsEnumerable.call(e,s[a])&&(o[s[a]]=e[s[a]]);return o}function D_(e,n,o){if(o||arguments.length===2)for(var s=0,a=n.length,l;s<a;s++)(l||!(s in n))&&(l||(l=Array.prototype.slice.call(n,0,s)),l[s]=n[s]);return e.concat(l||Array.prototype.slice.call(n))}typeof SuppressedError=="function"&&SuppressedError;var Ma="right-scroll-bar-position",Ia="width-before-scroll-bar",A_="with-scroll-bars-hidden",O_="--removed-body-scroll-bar-size";function $u(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function M_(e,n){var o=g.useState(function(){return{value:e,callback:n,facade:{get current(){return o.value},set current(s){var a=o.value;a!==s&&(o.value=s,o.callback(s,a))}}}})[0];return o.callback=n,o.facade}var I_=typeof window<"u"?g.useLayoutEffect:g.useEffect,$m=new WeakMap;function L_(e,n){var o=M_(null,function(s){return e.forEach(function(a){return $u(a,s)})});return I_(function(){var s=$m.get(o);if(s){var a=new Set(s),l=new Set(e),f=o.current;a.forEach(function(d){l.has(d)||$u(d,null)}),l.forEach(function(d){a.has(d)||$u(d,f)})}$m.set(o,e)},[e]),o}function F_(e){return e}function z_(e,n){n===void 0&&(n=F_);var o=[],s=!1,a={read:function(){if(s)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:e},useMedium:function(l){var f=n(l,s);return o.push(f),function(){o=o.filter(function(d){return d!==f})}},assignSyncMedium:function(l){for(s=!0;o.length;){var f=o;o=[],f.forEach(l)}o={push:function(d){return l(d)},filter:function(){return o}}},assignMedium:function(l){s=!0;var f=[];if(o.length){var d=o;o=[],d.forEach(l),f=o}var h=function(){var w=f;f=[],w.forEach(l)},v=function(){return Promise.resolve().then(h)};v(),o={push:function(w){f.push(w),v()},filter:function(w){return f=f.filter(w),o}}}};return a}function $_(e){e===void 0&&(e={});var n=z_(null);return n.options=cr({async:!0,ssr:!1},e),n}var Bm=function(e){var n=e.sideCar,o=zm(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var s=n.read();if(!s)throw new Error("Sidecar medium not found");return g.createElement(s,cr({},o))};Bm.isSideCarExport=!0;function B_(e,n){return e.useMedium(n),Bm}var Um=$_(),Bu=function(){},La=g.forwardRef(function(e,n){var o=g.useRef(null),s=g.useState({onScrollCapture:Bu,onWheelCapture:Bu,onTouchMoveCapture:Bu}),a=s[0],l=s[1],f=e.forwardProps,d=e.children,h=e.className,v=e.removeScrollBar,w=e.enabled,m=e.shards,b=e.sideCar,E=e.noRelative,j=e.noIsolation,x=e.inert,S=e.allowPinchZoom,C=e.as,N=C===void 0?"div":C,_=e.gapMode,R=zm(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=b,A=L_([o,n]),D=cr(cr({},R),a);return g.createElement(g.Fragment,null,w&&g.createElement(P,{sideCar:Um,removeScrollBar:v,shards:m,noRelative:E,noIsolation:j,inert:x,setCallbacks:l,allowPinchZoom:!!S,lockRef:o,gapMode:_}),f?g.cloneElement(g.Children.only(d),cr(cr({},D),{ref:A})):g.createElement(N,cr({},D,{className:h,ref:A}),d))});La.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},La.classNames={fullWidth:Ia,zeroRight:Ma};var U_=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function H_(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=U_();return n&&e.setAttribute("nonce",n),e}function V_(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function W_(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var Y_=function(){var e=0,n=null;return{add:function(o){e==0&&(n=H_())&&(V_(n,o),W_(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},K_=function(){var e=Y_();return function(n,o){g.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&o])}},Hm=function(){var e=K_(),n=function(o){var s=o.styles,a=o.dynamic;return e(s,a),null};return n},X_={left:0,top:0,right:0,gap:0},Uu=function(e){return parseInt(e||"",10)||0},G_=function(e){var n=window.getComputedStyle(document.body),o=n[e==="padding"?"paddingLeft":"marginLeft"],s=n[e==="padding"?"paddingTop":"marginTop"],a=n[e==="padding"?"paddingRight":"marginRight"];return[Uu(o),Uu(s),Uu(a)]},q_=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return X_;var n=G_(e),o=document.documentElement.clientWidth,s=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,s-o+n[2]-n[0])}},Q_=Hm(),ls="data-scroll-locked",J_=function(e,n,o,s){var a=e.left,l=e.top,f=e.right,d=e.gap;return o===void 0&&(o="margin"),` 219 .`.concat(A_,` { 218 220 overflow: hidden `).concat(s,`; 219 221 padding-right: `).concat(d,"px ").concat(s,`; 220 222 } 221 body[`).concat( js,`] {223 body[`).concat(ls,`] { 222 224 overflow: hidden `).concat(s,`; 223 225 overscroll-behavior: contain; … … 232 234 } 233 235 234 .`).concat( Fl,` {236 .`).concat(Ma,` { 235 237 right: `).concat(d,"px ").concat(s,`; 236 238 } 237 239 238 .`).concat( $l,` {240 .`).concat(Ia,` { 239 241 margin-right: `).concat(d,"px ").concat(s,`; 240 242 } 241 243 242 .`).concat( Fl," .").concat(Fl,` {244 .`).concat(Ma," .").concat(Ma,` { 243 245 right: 0 `).concat(s,`; 244 246 } 245 247 246 .`).concat( $l," .").concat($l,` {248 .`).concat(Ia," .").concat(Ia,` { 247 249 margin-right: 0 `).concat(s,`; 248 250 } 249 251 250 body[`).concat( js,`] {251 `).concat( jj,": ").concat(d,`px;252 } 253 `)}, gv=function(){var e=parseInt(document.body.getAttribute(js)||"0",10);return isFinite(e)?e:0},Wj=function(){g.useEffect(function(){return document.body.setAttribute(js,(gv()+1).toString()),function(){var e=gv()-1;e<=0?document.body.removeAttribute(js):document.body.setAttribute(js,e.toString())}},[])},Kj=function(e){var n=e.noRelative,o=e.noImportant,s=e.gapMode,a=s===void 0?"margin":s;Wj();var l=g.useMemo(function(){return Uj(a)},[a]);return g.createElement(Hj,{styles:Vj(l,!n,a,o?"":"!important")})},Nf=!1;if(typeof window<"u")try{var jl=Object.defineProperty({},"passive",{get:function(){return Nf=!0,!0}});window.addEventListener("test",jl,jl),window.removeEventListener("test",jl,jl)}catch{Nf=!1}var Ss=Nf?{passive:!1}:!1,Yj=function(e){return e.tagName==="TEXTAREA"},mx=function(e,n){if(!(e instanceof Element))return!1;var o=window.getComputedStyle(e);return o[n]!=="hidden"&&!(o.overflowY===o.overflowX&&!Yj(e)&&o[n]==="visible")},Gj=function(e){return mx(e,"overflowY")},Xj=function(e){return mx(e,"overflowX")},vv=function(e,n){var o=n.ownerDocument,s=n;do{typeof ShadowRoot<"u"&&s instanceof ShadowRoot&&(s=s.host);var a=gx(e,s);if(a){var l=vx(e,s),f=l[1],d=l[2];if(f>d)return!0}s=s.parentNode}while(s&&s!==o.body);return!1},qj=function(e){var n=e.scrollTop,o=e.scrollHeight,s=e.clientHeight;return[n,o,s]},Qj=function(e){var n=e.scrollLeft,o=e.scrollWidth,s=e.clientWidth;return[n,o,s]},gx=function(e,n){return e==="v"?Gj(n):Xj(n)},vx=function(e,n){return e==="v"?qj(n):Qj(n)},Jj=function(e,n){return e==="h"&&n==="rtl"?-1:1},Zj=function(e,n,o,s,a){var l=Jj(e,window.getComputedStyle(n).direction),f=l*s,d=o.target,h=n.contains(d),v=!1,x=f>0,m=0,b=0;do{if(!d)break;var E=vx(e,d),T=E[0],w=E[1],S=E[2],C=w-S-l*T;(T||C)&&gx(e,d)&&(m+=C,b+=T);var j=d.parentNode;d=j&&j.nodeType===Node.DOCUMENT_FRAGMENT_NODE?j.host:j}while(!h&&d!==document.body||h&&(n.contains(d)||n===d));return(x&&Math.abs(m)<1||!x&&Math.abs(b)<1)&&(v=!0),v},Rl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},yv=function(e){return[e.deltaX,e.deltaY]},xv=function(e){return e&&"current"in e?e.current:e},eR=function(e,n){return e[0]===n[0]&&e[1]===n[1]},tR=function(e){return`252 body[`).concat(ls,`] { 253 `).concat(O_,": ").concat(d,`px; 254 } 255 `)},Vm=function(){var e=parseInt(document.body.getAttribute(ls)||"0",10);return isFinite(e)?e:0},Z_=function(){g.useEffect(function(){return document.body.setAttribute(ls,(Vm()+1).toString()),function(){var e=Vm()-1;e<=0?document.body.removeAttribute(ls):document.body.setAttribute(ls,e.toString())}},[])},e2=function(e){var n=e.noRelative,o=e.noImportant,s=e.gapMode,a=s===void 0?"margin":s;Z_();var l=g.useMemo(function(){return q_(a)},[a]);return g.createElement(Q_,{styles:J_(l,!n,a,o?"":"!important")})},Hu=!1;if(typeof window<"u")try{var Fa=Object.defineProperty({},"passive",{get:function(){return Hu=!0,!0}});window.addEventListener("test",Fa,Fa),window.removeEventListener("test",Fa,Fa)}catch{Hu=!1}var cs=Hu?{passive:!1}:!1,t2=function(e){return e.tagName==="TEXTAREA"},Wm=function(e,n){if(!(e instanceof Element))return!1;var o=window.getComputedStyle(e);return o[n]!=="hidden"&&!(o.overflowY===o.overflowX&&!t2(e)&&o[n]==="visible")},n2=function(e){return Wm(e,"overflowY")},r2=function(e){return Wm(e,"overflowX")},Ym=function(e,n){var o=n.ownerDocument,s=n;do{typeof ShadowRoot<"u"&&s instanceof ShadowRoot&&(s=s.host);var a=Km(e,s);if(a){var l=Xm(e,s),f=l[1],d=l[2];if(f>d)return!0}s=s.parentNode}while(s&&s!==o.body);return!1},o2=function(e){var n=e.scrollTop,o=e.scrollHeight,s=e.clientHeight;return[n,o,s]},s2=function(e){var n=e.scrollLeft,o=e.scrollWidth,s=e.clientWidth;return[n,o,s]},Km=function(e,n){return e==="v"?n2(n):r2(n)},Xm=function(e,n){return e==="v"?o2(n):s2(n)},i2=function(e,n){return e==="h"&&n==="rtl"?-1:1},a2=function(e,n,o,s,a){var l=i2(e,window.getComputedStyle(n).direction),f=l*s,d=o.target,h=n.contains(d),v=!1,w=f>0,m=0,b=0;do{if(!d)break;var E=Xm(e,d),j=E[0],x=E[1],S=E[2],C=x-S-l*j;(j||C)&&Km(e,d)&&(m+=C,b+=j);var N=d.parentNode;d=N&&N.nodeType===Node.DOCUMENT_FRAGMENT_NODE?N.host:N}while(!h&&d!==document.body||h&&(n.contains(d)||n===d));return(w&&Math.abs(m)<1||!w&&Math.abs(b)<1)&&(v=!0),v},za=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Gm=function(e){return[e.deltaX,e.deltaY]},qm=function(e){return e&&"current"in e?e.current:e},l2=function(e,n){return e[0]===n[0]&&e[1]===n[1]},c2=function(e){return` 254 256 .block-interactivity-`.concat(e,` {pointer-events: none;} 255 257 .allow-interactivity-`).concat(e,` {pointer-events: all;} 256 `)}, nR=0,Cs=[];function rR(e){var n=g.useRef([]),o=g.useRef([0,0]),s=g.useRef(),a=g.useState(nR++)[0],l=g.useState(hx)[0],f=g.useRef(e);g.useEffect(function(){f.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var w=Ej([e.lockRef.current],(e.shards||[]).map(xv),!0).filter(Boolean);return w.forEach(function(S){return S.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),w.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var d=g.useCallback(function(w,S){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!f.current.allowPinchZoom;var C=Rl(w),j=o.current,N="deltaX"in w?w.deltaX:j[0]-C[0],k="deltaY"in w?w.deltaY:j[1]-C[1],P,D=w.target,_=Math.abs(N)>Math.abs(k)?"h":"v";if("touches"in w&&_==="h"&&D.type==="range")return!1;var L=window.getSelection(),H=L&&L.anchorNode,W=H?H===D||H.contains(D):!1;if(W)return!1;var U=vv(_,D);if(!U)return!0;if(U?P=_:(P=_==="v"?"h":"v",U=vv(_,D)),!U)return!1;if(!s.current&&"changedTouches"in w&&(N||k)&&(s.current=P),!P)return!0;var ee=s.current||P;return Zj(ee,S,w,ee==="h"?N:k)},[]),h=g.useCallback(function(w){var S=w;if(!(!Cs.length||Cs[Cs.length-1]!==l)){var C="deltaY"in S?yv(S):Rl(S),j=n.current.filter(function(P){return P.name===S.type&&(P.target===S.target||S.target===P.shadowParent)&&eR(P.delta,C)})[0];if(j&&j.should){S.cancelable&&S.preventDefault();return}if(!j){var N=(f.current.shards||[]).map(xv).filter(Boolean).filter(function(P){return P.contains(S.target)}),k=N.length>0?d(S,N[0]):!f.current.noIsolation;k&&S.cancelable&&S.preventDefault()}}},[]),v=g.useCallback(function(w,S,C,j){var N={name:w,delta:S,target:C,should:j,shadowParent:oR(C)};n.current.push(N),setTimeout(function(){n.current=n.current.filter(function(k){return k!==N})},1)},[]),x=g.useCallback(function(w){o.current=Rl(w),s.current=void 0},[]),m=g.useCallback(function(w){v(w.type,yv(w),w.target,d(w,e.lockRef.current))},[]),b=g.useCallback(function(w){v(w.type,Rl(w),w.target,d(w,e.lockRef.current))},[]);g.useEffect(function(){return Cs.push(l),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:b}),document.addEventListener("wheel",h,Ss),document.addEventListener("touchmove",h,Ss),document.addEventListener("touchstart",x,Ss),function(){Cs=Cs.filter(function(w){return w!==l}),document.removeEventListener("wheel",h,Ss),document.removeEventListener("touchmove",h,Ss),document.removeEventListener("touchstart",x,Ss)}},[]);var E=e.removeScrollBar,T=e.inert;return g.createElement(g.Fragment,null,T?g.createElement(l,{styles:tR(a)}):null,E?g.createElement(Kj,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function oR(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const sR=Aj(px,rR);var Sc=g.forwardRef(function(e,n){return g.createElement(bc,mr({},e,{ref:n,sideCar:sR}))});Sc.classNames=bc.classNames;var iR=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},Es=new WeakMap,Tl=new WeakMap,kl={},Gd=0,yx=function(e){return e&&(e.host||yx(e.parentNode))},aR=function(e,n){return n.map(function(o){if(e.contains(o))return o;var s=yx(o);return s&&e.contains(s)?s:(console.error("aria-hidden",o,"in not contained inside",e,". Doing nothing"),null)}).filter(function(o){return!!o})},lR=function(e,n,o,s){var a=aR(n,Array.isArray(e)?e:[e]);kl[o]||(kl[o]=new WeakMap);var l=kl[o],f=[],d=new Set,h=new Set(a),v=function(m){!m||d.has(m)||(d.add(m),v(m.parentNode))};a.forEach(v);var x=function(m){!m||h.has(m)||Array.prototype.forEach.call(m.children,function(b){if(d.has(b))x(b);else try{var E=b.getAttribute(s),T=E!==null&&E!=="false",w=(Es.get(b)||0)+1,S=(l.get(b)||0)+1;Es.set(b,w),l.set(b,S),f.push(b),w===1&&T&&Tl.set(b,!0),S===1&&b.setAttribute(o,"true"),T||b.setAttribute(s,"true")}catch(C){console.error("aria-hidden: cannot operate on ",b,C)}})};return x(n),d.clear(),Gd++,function(){f.forEach(function(m){var b=Es.get(m)-1,E=l.get(m)-1;Es.set(m,b),l.set(m,E),b||(Tl.has(m)||m.removeAttribute(s),Tl.delete(m)),E||m.removeAttribute(o)}),Gd--,Gd||(Es=new WeakMap,Es=new WeakMap,Tl=new WeakMap,kl={})}},ap=function(e,n,o){o===void 0&&(o="data-aria-hidden");var s=Array.from(Array.isArray(e)?e:[e]),a=iR(e);return a?(s.push.apply(s,Array.from(a.querySelectorAll("[aria-live], script"))),lR(s,a,o,"aria-hidden")):function(){return null}},Cc="Dialog",[xx,wx]=nr(Cc),[cR,rr]=xx(Cc),bx=e=>{const{__scopeDialog:n,children:o,open:s,defaultOpen:a,onOpenChange:l,modal:f=!0}=e,d=g.useRef(null),h=g.useRef(null),[v,x]=bo({prop:s,defaultProp:a??!1,onChange:l,caller:Cc});return c.jsx(cR,{scope:n,triggerRef:d,contentRef:h,contentId:wo(),titleId:wo(),descriptionId:wo(),open:v,onOpenChange:x,onOpenToggle:g.useCallback(()=>x(m=>!m),[x]),modal:f,children:o})};bx.displayName=Cc;var Sx="DialogTrigger",Cx=g.forwardRef((e,n)=>{const{__scopeDialog:o,...s}=e,a=rr(Sx,o),l=Ie(n,a.triggerRef);return c.jsx(ke.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":up(a.open),...s,ref:l,onClick:Ee(e.onClick,a.onOpenToggle)})});Cx.displayName=Sx;var lp="DialogPortal",[uR,Ex]=xx(lp,{forceMount:void 0}),Nx=e=>{const{__scopeDialog:n,forceMount:o,children:s,container:a}=e,l=rr(lp,n);return c.jsx(uR,{scope:n,forceMount:o,children:g.Children.map(s,f=>c.jsx(Ln,{present:o||l.open,children:c.jsx(sa,{asChild:!0,container:a,children:f})}))})};Nx.displayName=lp;var Vl="DialogOverlay",jx=g.forwardRef((e,n)=>{const o=Ex(Vl,e.__scopeDialog),{forceMount:s=o.forceMount,...a}=e,l=rr(Vl,e.__scopeDialog);return l.modal?c.jsx(Ln,{present:s||l.open,children:c.jsx(fR,{...a,ref:n})}):null});jx.displayName=Vl;var dR=$s("DialogOverlay.RemoveScroll"),fR=g.forwardRef((e,n)=>{const{__scopeDialog:o,...s}=e,a=rr(Vl,o);return c.jsx(Sc,{as:dR,allowPinchZoom:!0,shards:[a.contentRef],children:c.jsx(ke.div,{"data-state":up(a.open),...s,ref:n,style:{pointerEvents:"auto",...s.style}})})}),Xo="DialogContent",Rx=g.forwardRef((e,n)=>{const o=Ex(Xo,e.__scopeDialog),{forceMount:s=o.forceMount,...a}=e,l=rr(Xo,e.__scopeDialog);return c.jsx(Ln,{present:s||l.open,children:l.modal?c.jsx(pR,{...a,ref:n}):c.jsx(hR,{...a,ref:n})})});Rx.displayName=Xo;var pR=g.forwardRef((e,n)=>{const o=rr(Xo,e.__scopeDialog),s=g.useRef(null),a=Ie(n,o.contentRef,s);return g.useEffect(()=>{const l=s.current;if(l)return ap(l)},[]),c.jsx(Tx,{...e,ref:a,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ee(e.onCloseAutoFocus,l=>{var f;l.preventDefault(),(f=o.triggerRef.current)==null||f.focus()}),onPointerDownOutside:Ee(e.onPointerDownOutside,l=>{const f=l.detail.originalEvent,d=f.button===0&&f.ctrlKey===!0;(f.button===2||d)&&l.preventDefault()}),onFocusOutside:Ee(e.onFocusOutside,l=>l.preventDefault())})}),hR=g.forwardRef((e,n)=>{const o=rr(Xo,e.__scopeDialog),s=g.useRef(!1),a=g.useRef(!1);return c.jsx(Tx,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{var f,d;(f=e.onCloseAutoFocus)==null||f.call(e,l),l.defaultPrevented||(s.current||(d=o.triggerRef.current)==null||d.focus(),l.preventDefault()),s.current=!1,a.current=!1},onInteractOutside:l=>{var h,v;(h=e.onInteractOutside)==null||h.call(e,l),l.defaultPrevented||(s.current=!0,l.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const f=l.target;((v=o.triggerRef.current)==null?void 0:v.contains(f))&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&a.current&&l.preventDefault()}})}),Tx=g.forwardRef((e,n)=>{const{__scopeDialog:o,trapFocus:s,onOpenAutoFocus:a,onCloseAutoFocus:l,...f}=e,d=rr(Xo,o),h=g.useRef(null),v=Ie(n,h);return ip(),c.jsxs(c.Fragment,{children:[c.jsx(wc,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:a,onUnmountAutoFocus:l,children:c.jsx(oa,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":up(d.open),...f,ref:v,onDismiss:()=>d.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(gR,{titleId:d.titleId}),c.jsx(yR,{contentRef:h,descriptionId:d.descriptionId})]})]})}),cp="DialogTitle",kx=g.forwardRef((e,n)=>{const{__scopeDialog:o,...s}=e,a=rr(cp,o);return c.jsx(ke.h2,{id:a.titleId,...s,ref:n})});kx.displayName=cp;var Px="DialogDescription",_x=g.forwardRef((e,n)=>{const{__scopeDialog:o,...s}=e,a=rr(Px,o);return c.jsx(ke.p,{id:a.descriptionId,...s,ref:n})});_x.displayName=Px;var Dx="DialogClose",Ax=g.forwardRef((e,n)=>{const{__scopeDialog:o,...s}=e,a=rr(Dx,o);return c.jsx(ke.button,{type:"button",...s,ref:n,onClick:Ee(e.onClick,()=>a.onOpenChange(!1))})});Ax.displayName=Dx;function up(e){return e?"open":"closed"}var Ox="DialogTitleWarning",[mR,Mx]=aE(Ox,{contentName:Xo,titleName:cp,docsSlug:"dialog"}),gR=({titleId:e})=>{const n=Mx(Ox),o=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.258 `)},u2=0,us=[];function d2(e){var n=g.useRef([]),o=g.useRef([0,0]),s=g.useRef(),a=g.useState(u2++)[0],l=g.useState(Hm)[0],f=g.useRef(e);g.useEffect(function(){f.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var x=D_([e.lockRef.current],(e.shards||[]).map(qm),!0).filter(Boolean);return x.forEach(function(S){return S.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),x.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var d=g.useCallback(function(x,S){if("touches"in x&&x.touches.length===2||x.type==="wheel"&&x.ctrlKey)return!f.current.allowPinchZoom;var C=za(x),N=o.current,_="deltaX"in x?x.deltaX:N[0]-C[0],R="deltaY"in x?x.deltaY:N[1]-C[1],P,A=x.target,D=Math.abs(_)>Math.abs(R)?"h":"v";if("touches"in x&&D==="h"&&A.type==="range")return!1;var F=window.getSelection(),V=F&&F.anchorNode,Y=V?V===A||V.contains(A):!1;if(Y)return!1;var H=Ym(D,A);if(!H)return!0;if(H?P=D:(P=D==="v"?"h":"v",H=Ym(D,A)),!H)return!1;if(!s.current&&"changedTouches"in x&&(_||R)&&(s.current=P),!P)return!0;var te=s.current||P;return a2(te,S,x,te==="h"?_:R)},[]),h=g.useCallback(function(x){var S=x;if(!(!us.length||us[us.length-1]!==l)){var C="deltaY"in S?Gm(S):za(S),N=n.current.filter(function(P){return P.name===S.type&&(P.target===S.target||S.target===P.shadowParent)&&l2(P.delta,C)})[0];if(N&&N.should){S.cancelable&&S.preventDefault();return}if(!N){var _=(f.current.shards||[]).map(qm).filter(Boolean).filter(function(P){return P.contains(S.target)}),R=_.length>0?d(S,_[0]):!f.current.noIsolation;R&&S.cancelable&&S.preventDefault()}}},[]),v=g.useCallback(function(x,S,C,N){var _={name:x,delta:S,target:C,should:N,shadowParent:f2(C)};n.current.push(_),setTimeout(function(){n.current=n.current.filter(function(R){return R!==_})},1)},[]),w=g.useCallback(function(x){o.current=za(x),s.current=void 0},[]),m=g.useCallback(function(x){v(x.type,Gm(x),x.target,d(x,e.lockRef.current))},[]),b=g.useCallback(function(x){v(x.type,za(x),x.target,d(x,e.lockRef.current))},[]);g.useEffect(function(){return us.push(l),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:b}),document.addEventListener("wheel",h,cs),document.addEventListener("touchmove",h,cs),document.addEventListener("touchstart",w,cs),function(){us=us.filter(function(x){return x!==l}),document.removeEventListener("wheel",h,cs),document.removeEventListener("touchmove",h,cs),document.removeEventListener("touchstart",w,cs)}},[]);var E=e.removeScrollBar,j=e.inert;return g.createElement(g.Fragment,null,j?g.createElement(l,{styles:c2(a)}):null,E?g.createElement(e2,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function f2(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const p2=B_(Um,d2);var $a=g.forwardRef(function(e,n){return g.createElement(La,cr({},e,{ref:n,sideCar:p2}))});$a.classNames=La.classNames;var h2=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},ds=new WeakMap,Ba=new WeakMap,Ua={},Vu=0,Qm=function(e){return e&&(e.host||Qm(e.parentNode))},m2=function(e,n){return n.map(function(o){if(e.contains(o))return o;var s=Qm(o);return s&&e.contains(s)?s:(console.error("aria-hidden",o,"in not contained inside",e,". Doing nothing"),null)}).filter(function(o){return!!o})},g2=function(e,n,o,s){var a=m2(n,Array.isArray(e)?e:[e]);Ua[o]||(Ua[o]=new WeakMap);var l=Ua[o],f=[],d=new Set,h=new Set(a),v=function(m){!m||d.has(m)||(d.add(m),v(m.parentNode))};a.forEach(v);var w=function(m){!m||h.has(m)||Array.prototype.forEach.call(m.children,function(b){if(d.has(b))w(b);else try{var E=b.getAttribute(s),j=E!==null&&E!=="false",x=(ds.get(b)||0)+1,S=(l.get(b)||0)+1;ds.set(b,x),l.set(b,S),f.push(b),x===1&&j&&Ba.set(b,!0),S===1&&b.setAttribute(o,"true"),j||b.setAttribute(s,"true")}catch(C){console.error("aria-hidden: cannot operate on ",b,C)}})};return w(n),d.clear(),Vu++,function(){f.forEach(function(m){var b=ds.get(m)-1,E=l.get(m)-1;ds.set(m,b),l.set(m,E),b||(Ba.has(m)||m.removeAttribute(s),Ba.delete(m)),E||m.removeAttribute(o)}),Vu--,Vu||(ds=new WeakMap,ds=new WeakMap,Ba=new WeakMap,Ua={})}},Wu=function(e,n,o){o===void 0&&(o="data-aria-hidden");var s=Array.from(Array.isArray(e)?e:[e]),a=h2(e);return a?(s.push.apply(s,Array.from(a.querySelectorAll("[aria-live], script"))),g2(s,a,o,"aria-hidden")):function(){return null}},Ha="Dialog",[Jm,Zm]=Vn(Ha),[v2,Wn]=Jm(Ha),eg=e=>{const{__scopeDialog:n,children:o,open:s,defaultOpen:a,onOpenChange:l,modal:f=!0}=e,d=g.useRef(null),h=g.useRef(null),[v,w]=Wr({prop:s,defaultProp:a??!1,onChange:l,caller:Ha});return c.jsx(v2,{scope:n,triggerRef:d,contentRef:h,contentId:Xr(),titleId:Xr(),descriptionId:Xr(),open:v,onOpenChange:w,onOpenToggle:g.useCallback(()=>w(m=>!m),[w]),modal:f,children:o})};eg.displayName=Ha;var tg="DialogTrigger",ng=g.forwardRef((e,n)=>{const{__scopeDialog:o,...s}=e,a=Wn(tg,o),l=Ie(n,a.triggerRef);return c.jsx(Te.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Xu(a.open),...s,ref:l,onClick:Ee(e.onClick,a.onOpenToggle)})});ng.displayName=tg;var Yu="DialogPortal",[y2,rg]=Jm(Yu,{forceMount:void 0}),og=e=>{const{__scopeDialog:n,forceMount:o,children:s,container:a}=e,l=Wn(Yu,n);return c.jsx(y2,{scope:n,forceMount:o,children:g.Children.map(s,f=>c.jsx(Rn,{present:o||l.open,children:c.jsx(li,{asChild:!0,container:a,children:f})}))})};og.displayName=Yu;var Va="DialogOverlay",sg=g.forwardRef((e,n)=>{const o=rg(Va,e.__scopeDialog),{forceMount:s=o.forceMount,...a}=e,l=Wn(Va,e.__scopeDialog);return l.modal?c.jsx(Rn,{present:s||l.open,children:c.jsx(x2,{...a,ref:n})}):null});sg.displayName=Va;var w2=ss("DialogOverlay.RemoveScroll"),x2=g.forwardRef((e,n)=>{const{__scopeDialog:o,...s}=e,a=Wn(Va,o);return c.jsx($a,{as:w2,allowPinchZoom:!0,shards:[a.contentRef],children:c.jsx(Te.div,{"data-state":Xu(a.open),...s,ref:n,style:{pointerEvents:"auto",...s.style}})})}),Do="DialogContent",ig=g.forwardRef((e,n)=>{const o=rg(Do,e.__scopeDialog),{forceMount:s=o.forceMount,...a}=e,l=Wn(Do,e.__scopeDialog);return c.jsx(Rn,{present:s||l.open,children:l.modal?c.jsx(b2,{...a,ref:n}):c.jsx(S2,{...a,ref:n})})});ig.displayName=Do;var b2=g.forwardRef((e,n)=>{const o=Wn(Do,e.__scopeDialog),s=g.useRef(null),a=Ie(n,o.contentRef,s);return g.useEffect(()=>{const l=s.current;if(l)return Wu(l)},[]),c.jsx(ag,{...e,ref:a,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ee(e.onCloseAutoFocus,l=>{var f;l.preventDefault(),(f=o.triggerRef.current)==null||f.focus()}),onPointerDownOutside:Ee(e.onPointerDownOutside,l=>{const f=l.detail.originalEvent,d=f.button===0&&f.ctrlKey===!0;(f.button===2||d)&&l.preventDefault()}),onFocusOutside:Ee(e.onFocusOutside,l=>l.preventDefault())})}),S2=g.forwardRef((e,n)=>{const o=Wn(Do,e.__scopeDialog),s=g.useRef(!1),a=g.useRef(!1);return c.jsx(ag,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{var f,d;(f=e.onCloseAutoFocus)==null||f.call(e,l),l.defaultPrevented||(s.current||(d=o.triggerRef.current)==null||d.focus(),l.preventDefault()),s.current=!1,a.current=!1},onInteractOutside:l=>{var h,v;(h=e.onInteractOutside)==null||h.call(e,l),l.defaultPrevented||(s.current=!0,l.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const f=l.target;((v=o.triggerRef.current)==null?void 0:v.contains(f))&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&a.current&&l.preventDefault()}})}),ag=g.forwardRef((e,n)=>{const{__scopeDialog:o,trapFocus:s,onOpenAutoFocus:a,onCloseAutoFocus:l,...f}=e,d=Wn(Do,o),h=g.useRef(null),v=Ie(n,h);return zu(),c.jsxs(c.Fragment,{children:[c.jsx(Oa,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:a,onUnmountAutoFocus:l,children:c.jsx(ai,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":Xu(d.open),...f,ref:v,onDismiss:()=>d.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(_2,{titleId:d.titleId}),c.jsx(N2,{contentRef:h,descriptionId:d.descriptionId})]})]})}),Ku="DialogTitle",lg=g.forwardRef((e,n)=>{const{__scopeDialog:o,...s}=e,a=Wn(Ku,o);return c.jsx(Te.h2,{id:a.titleId,...s,ref:n})});lg.displayName=Ku;var cg="DialogDescription",ug=g.forwardRef((e,n)=>{const{__scopeDialog:o,...s}=e,a=Wn(cg,o);return c.jsx(Te.p,{id:a.descriptionId,...s,ref:n})});ug.displayName=cg;var dg="DialogClose",fg=g.forwardRef((e,n)=>{const{__scopeDialog:o,...s}=e,a=Wn(dg,o);return c.jsx(Te.button,{type:"button",...s,ref:n,onClick:Ee(e.onClick,()=>a.onOpenChange(!1))})});fg.displayName=dg;function Xu(e){return e?"open":"closed"}var pg="DialogTitleWarning",[C2,hg]=g1(pg,{contentName:Do,titleName:Ku,docsSlug:"dialog"}),_2=({titleId:e})=>{const n=hg(pg),o=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users. 257 259 258 260 If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component. 259 261 260 For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return g.useEffect(()=>{e&&(document.getElementById(e)||console.error(o))},[o,e]),null}, vR="DialogDescriptionWarning",yR=({contentRef:e,descriptionId:n})=>{const s=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Mx(vR).contentName}}.`;return g.useEffect(()=>{var l;const a=(l=e.current)==null?void 0:l.getAttribute("aria-describedby");n&&a&&(document.getElementById(n)||console.warn(s))},[s,e,n]),null},dp=bx,fp=Cx,pp=Nx,Ec=jx,Nc=Rx,jc=kx,Rc=_x,Tc=Ax,Ix="AlertDialog",[xR]=nr(Ix,[wx]),Br=wx(),Lx=e=>{const{__scopeAlertDialog:n,...o}=e,s=Br(n);return c.jsx(dp,{...s,...o,modal:!0})};Lx.displayName=Ix;var wR="AlertDialogTrigger",Fx=g.forwardRef((e,n)=>{const{__scopeAlertDialog:o,...s}=e,a=Br(o);return c.jsx(fp,{...a,...s,ref:n})});Fx.displayName=wR;var bR="AlertDialogPortal",$x=e=>{const{__scopeAlertDialog:n,...o}=e,s=Br(n);return c.jsx(pp,{...s,...o})};$x.displayName=bR;var SR="AlertDialogOverlay",zx=g.forwardRef((e,n)=>{const{__scopeAlertDialog:o,...s}=e,a=Br(o);return c.jsx(Ec,{...a,...s,ref:n})});zx.displayName=SR;var Rs="AlertDialogContent",[CR,ER]=xR(Rs),NR=uE("AlertDialogContent"),Bx=g.forwardRef((e,n)=>{const{__scopeAlertDialog:o,children:s,...a}=e,l=Br(o),f=g.useRef(null),d=Ie(n,f),h=g.useRef(null);return c.jsx(mR,{contentName:Rs,titleName:Ux,docsSlug:"alert-dialog",children:c.jsx(CR,{scope:o,cancelRef:h,children:c.jsxs(Nc,{role:"alertdialog",...l,...a,ref:d,onOpenAutoFocus:Ee(a.onOpenAutoFocus,v=>{var x;v.preventDefault(),(x=h.current)==null||x.focus({preventScroll:!0})}),onPointerDownOutside:v=>v.preventDefault(),onInteractOutside:v=>v.preventDefault(),children:[c.jsx(NR,{children:s}),c.jsx(RR,{contentRef:f})]})})})});Bx.displayName=Rs;var Ux="AlertDialogTitle",Hx=g.forwardRef((e,n)=>{const{__scopeAlertDialog:o,...s}=e,a=Br(o);return c.jsx(jc,{...a,...s,ref:n})});Hx.displayName=Ux;var Vx="AlertDialogDescription",Wx=g.forwardRef((e,n)=>{const{__scopeAlertDialog:o,...s}=e,a=Br(o);return c.jsx(Rc,{...a,...s,ref:n})});Wx.displayName=Vx;var jR="AlertDialogAction",Kx=g.forwardRef((e,n)=>{const{__scopeAlertDialog:o,...s}=e,a=Br(o);return c.jsx(Tc,{...a,...s,ref:n})});Kx.displayName=jR;var Yx="AlertDialogCancel",Gx=g.forwardRef((e,n)=>{const{__scopeAlertDialog:o,...s}=e,{cancelRef:a}=ER(Yx,o),l=Br(o),f=Ie(n,a);return c.jsx(Tc,{...l,...s,ref:f})});Gx.displayName=Yx;var RR=({contentRef:e})=>{const n=`\`${Rs}\` requires a description for the component to be accessible for screen reader users.261 262 You can add a description to the \`${ Rs}\` by passing a \`${Vx}\` component as a child, which also benefits sighted users by adding visible context to the dialog.263 264 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 \`${ Rs}\`. 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.265 266 For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return g.useEffect(()=>{var s;document.getElementById((s=e.current)==null?void 0:s.getAttribute("aria-describedby"))||console.warn(n)},[n,e]),null}, TR=Lx,kR=Fx,PR=$x,Xx=zx,qx=Bx,Qx=Kx,Jx=Gx,Zx=Hx,e0=Wx;const jf=TR,wv=kR,_R=PR,t0=g.forwardRef(({className:e,...n},o)=>c.jsx(Xx,{className:je("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),...n,ref:o}));t0.displayName=Xx.displayName;const Wl=g.forwardRef(({className:e,...n},o)=>c.jsxs(_R,{children:[c.jsx(t0,{}),c.jsx(qx,{ref:o,className:je("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})]}));Wl.displayName=qx.displayName;const Kl=({className:e,...n})=>c.jsx("div",{className:je("flex flex-col space-y-2 text-center sm:text-left",e),...n});Kl.displayName="AlertDialogHeader";const Yl=({className:e,...n})=>c.jsx("div",{className:je("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n});Yl.displayName="AlertDialogFooter";const Gl=g.forwardRef(({className:e,...n},o)=>c.jsx(Zx,{ref:o,className:je("text-lg font-semibold",e),...n}));Gl.displayName=Zx.displayName;const Xl=g.forwardRef(({className:e,...n},o)=>c.jsx(e0,{ref:o,className:je("text-sm text-muted-foreground",e),...n}));Xl.displayName=e0.displayName;const ql=g.forwardRef(({className:e,...n},o)=>c.jsx(Qx,{ref:o,className:je(sp(),e),...n}));ql.displayName=Qx.displayName;const Ql=g.forwardRef(({className:e,...n},o)=>c.jsx(Jx,{ref:o,className:je(sp({variant:"outline"}),"mt-2 sm:mt-0",e),...n}));Ql.displayName=Jx.displayName;const DR=["top","right","bottom","left"],So=Math.min,En=Math.max,Jl=Math.round,Pl=Math.floor,vr=e=>({x:e,y:e}),AR={left:"right",right:"left",bottom:"top",top:"bottom"},OR={start:"end",end:"start"};function Rf(e,n,o){return En(e,So(n,o))}function $r(e,n){return typeof e=="function"?e(n):e}function zr(e){return e.split("-")[0]}function Vs(e){return e.split("-")[1]}function hp(e){return e==="x"?"y":"x"}function mp(e){return e==="y"?"height":"width"}const MR=new Set(["top","bottom"]);function gr(e){return MR.has(zr(e))?"y":"x"}function gp(e){return hp(gr(e))}function IR(e,n,o){o===void 0&&(o=!1);const s=Vs(e),a=gp(e),l=mp(a);let f=a==="x"?s===(o?"end":"start")?"right":"left":s==="start"?"bottom":"top";return n.reference[l]>n.floating[l]&&(f=Zl(f)),[f,Zl(f)]}function LR(e){const n=Zl(e);return[Tf(e),n,Tf(n)]}function Tf(e){return e.replace(/start|end/g,n=>OR[n])}const bv=["left","right"],Sv=["right","left"],FR=["top","bottom"],$R=["bottom","top"];function zR(e,n,o){switch(e){case"top":case"bottom":return o?n?Sv:bv:n?bv:Sv;case"left":case"right":return n?FR:$R;default:return[]}}function BR(e,n,o,s){const a=Vs(e);let l=zR(zr(e),o==="start",s);return a&&(l=l.map(f=>f+"-"+a),n&&(l=l.concat(l.map(Tf)))),l}function Zl(e){return e.replace(/left|right|bottom|top/g,n=>AR[n])}function UR(e){return{top:0,right:0,bottom:0,left:0,...e}}function n0(e){return typeof e!="number"?UR(e):{top:e,right:e,bottom:e,left:e}}function ec(e){const{x:n,y:o,width:s,height:a}=e;return{width:s,height:a,top:o,left:n,right:n+s,bottom:o+a,x:n,y:o}}function Cv(e,n,o){let{reference:s,floating:a}=e;const l=gr(n),f=gp(n),d=mp(f),h=zr(n),v=l==="y",x=s.x+s.width/2-a.width/2,m=s.y+s.height/2-a.height/2,b=s[d]/2-a[d]/2;let E;switch(h){case"top":E={x,y:s.y-a.height};break;case"bottom":E={x,y:s.y+s.height};break;case"right":E={x:s.x+s.width,y:m};break;case"left":E={x:s.x-a.width,y:m};break;default:E={x:s.x,y:s.y}}switch(Vs(n)){case"start":E[f]-=b*(o&&v?-1:1);break;case"end":E[f]+=b*(o&&v?-1:1);break}return E}const HR=async(e,n,o)=>{const{placement:s="bottom",strategy:a="absolute",middleware:l=[],platform:f}=o,d=l.filter(Boolean),h=await(f.isRTL==null?void 0:f.isRTL(n));let v=await f.getElementRects({reference:e,floating:n,strategy:a}),{x,y:m}=Cv(v,s,h),b=s,E={},T=0;for(let w=0;w<d.length;w++){const{name:S,fn:C}=d[w],{x:j,y:N,data:k,reset:P}=await C({x,y:m,initialPlacement:s,placement:b,strategy:a,middlewareData:E,rects:v,platform:f,elements:{reference:e,floating:n}});x=j??x,m=N??m,E={...E,[S]:{...E[S],...k}},P&&T<=50&&(T++,typeof P=="object"&&(P.placement&&(b=P.placement),P.rects&&(v=P.rects===!0?await f.getElementRects({reference:e,floating:n,strategy:a}):P.rects),{x,y:m}=Cv(v,b,h)),w=-1)}return{x,y:m,placement:b,strategy:a,middlewareData:E}};async function Wi(e,n){var o;n===void 0&&(n={});const{x:s,y:a,platform:l,rects:f,elements:d,strategy:h}=e,{boundary:v="clippingAncestors",rootBoundary:x="viewport",elementContext:m="floating",altBoundary:b=!1,padding:E=0}=$r(n,e),T=n0(E),S=d[b?m==="floating"?"reference":"floating":m],C=ec(await l.getClippingRect({element:(o=await(l.isElement==null?void 0:l.isElement(S)))==null||o?S:S.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(d.floating)),boundary:v,rootBoundary:x,strategy:h})),j=m==="floating"?{x:s,y:a,width:f.floating.width,height:f.floating.height}:f.reference,N=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d.floating)),k=await(l.isElement==null?void 0:l.isElement(N))?await(l.getScale==null?void 0:l.getScale(N))||{x:1,y:1}:{x:1,y:1},P=ec(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:j,offsetParent:N,strategy:h}):j);return{top:(C.top-P.top+T.top)/k.y,bottom:(P.bottom-C.bottom+T.bottom)/k.y,left:(C.left-P.left+T.left)/k.x,right:(P.right-C.right+T.right)/k.x}}const VR=e=>({name:"arrow",options:e,async fn(n){const{x:o,y:s,placement:a,rects:l,platform:f,elements:d,middlewareData:h}=n,{element:v,padding:x=0}=$r(e,n)||{};if(v==null)return{};const m=n0(x),b={x:o,y:s},E=gp(a),T=mp(E),w=await f.getDimensions(v),S=E==="y",C=S?"top":"left",j=S?"bottom":"right",N=S?"clientHeight":"clientWidth",k=l.reference[T]+l.reference[E]-b[E]-l.floating[T],P=b[E]-l.reference[E],D=await(f.getOffsetParent==null?void 0:f.getOffsetParent(v));let _=D?D[N]:0;(!_||!await(f.isElement==null?void 0:f.isElement(D)))&&(_=d.floating[N]||l.floating[T]);const L=k/2-P/2,H=_/2-w[T]/2-1,W=So(m[C],H),U=So(m[j],H),ee=W,Y=_-w[T]-U,X=_/2-w[T]/2+L,le=Rf(ee,X,Y),Z=!h.arrow&&Vs(a)!=null&&X!==le&&l.reference[T]/2-(X<ee?W:U)-w[T]/2<0,q=Z?X<ee?X-ee:X-Y:0;return{[E]:b[E]+q,data:{[E]:le,centerOffset:X-le-q,...Z&&{alignmentOffset:q}},reset:Z}}}),WR=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(n){var o,s;const{placement:a,middlewareData:l,rects:f,initialPlacement:d,platform:h,elements:v}=n,{mainAxis:x=!0,crossAxis:m=!0,fallbackPlacements:b,fallbackStrategy:E="bestFit",fallbackAxisSideDirection:T="none",flipAlignment:w=!0,...S}=$r(e,n);if((o=l.arrow)!=null&&o.alignmentOffset)return{};const C=zr(a),j=gr(d),N=zr(d)===d,k=await(h.isRTL==null?void 0:h.isRTL(v.floating)),P=b||(N||!w?[Zl(d)]:LR(d)),D=T!=="none";!b&&D&&P.push(...BR(d,w,T,k));const _=[d,...P],L=await Wi(n,S),H=[];let W=((s=l.flip)==null?void 0:s.overflows)||[];if(x&&H.push(L[C]),m){const X=IR(a,f,k);H.push(L[X[0]],L[X[1]])}if(W=[...W,{placement:a,overflows:H}],!H.every(X=>X<=0)){var U,ee;const X=(((U=l.flip)==null?void 0:U.index)||0)+1,le=_[X];if(le&&(!(m==="alignment"?j!==gr(le):!1)||W.every(z=>gr(z.placement)===j?z.overflows[0]>0:!0)))return{data:{index:X,overflows:W},reset:{placement:le}};let Z=(ee=W.filter(q=>q.overflows[0]<=0).sort((q,z)=>q.overflows[1]-z.overflows[1])[0])==null?void 0:ee.placement;if(!Z)switch(E){case"bestFit":{var Y;const q=(Y=W.filter(z=>{if(D){const J=gr(z.placement);return J===j||J==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(J=>J>0).reduce((J,te)=>J+te,0)]).sort((z,J)=>z[1]-J[1])[0])==null?void 0:Y[0];q&&(Z=q);break}case"initialPlacement":Z=d;break}if(a!==Z)return{reset:{placement:Z}}}return{}}}};function Ev(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}function Nv(e){return DR.some(n=>e[n]>=0)}const KR=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:o}=n,{strategy:s="referenceHidden",...a}=$r(e,n);switch(s){case"referenceHidden":{const l=await Wi(n,{...a,elementContext:"reference"}),f=Ev(l,o.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:Nv(f)}}}case"escaped":{const l=await Wi(n,{...a,altBoundary:!0}),f=Ev(l,o.floating);return{data:{escapedOffsets:f,escaped:Nv(f)}}}default:return{}}}}},r0=new Set(["left","top"]);async function YR(e,n){const{placement:o,platform:s,elements:a}=e,l=await(s.isRTL==null?void 0:s.isRTL(a.floating)),f=zr(o),d=Vs(o),h=gr(o)==="y",v=r0.has(f)?-1:1,x=l&&h?-1:1,m=$r(n,e);let{mainAxis:b,crossAxis:E,alignmentAxis:T}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return d&&typeof T=="number"&&(E=d==="end"?T*-1:T),h?{x:E*x,y:b*v}:{x:b*v,y:E*x}}const GR=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var o,s;const{x:a,y:l,placement:f,middlewareData:d}=n,h=await YR(n,e);return f===((o=d.offset)==null?void 0:o.placement)&&(s=d.arrow)!=null&&s.alignmentOffset?{}:{x:a+h.x,y:l+h.y,data:{...h,placement:f}}}}},XR=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:o,y:s,placement:a}=n,{mainAxis:l=!0,crossAxis:f=!1,limiter:d={fn:S=>{let{x:C,y:j}=S;return{x:C,y:j}}},...h}=$r(e,n),v={x:o,y:s},x=await Wi(n,h),m=gr(zr(a)),b=hp(m);let E=v[b],T=v[m];if(l){const S=b==="y"?"top":"left",C=b==="y"?"bottom":"right",j=E+x[S],N=E-x[C];E=Rf(j,E,N)}if(f){const S=m==="y"?"top":"left",C=m==="y"?"bottom":"right",j=T+x[S],N=T-x[C];T=Rf(j,T,N)}const w=d.fn({...n,[b]:E,[m]:T});return{...w,data:{x:w.x-o,y:w.y-s,enabled:{[b]:l,[m]:f}}}}}},qR=function(e){return e===void 0&&(e={}),{options:e,fn(n){const{x:o,y:s,placement:a,rects:l,middlewareData:f}=n,{offset:d=0,mainAxis:h=!0,crossAxis:v=!0}=$r(e,n),x={x:o,y:s},m=gr(a),b=hp(m);let E=x[b],T=x[m];const w=$r(d,n),S=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(h){const N=b==="y"?"height":"width",k=l.reference[b]-l.floating[N]+S.mainAxis,P=l.reference[b]+l.reference[N]-S.mainAxis;E<k?E=k:E>P&&(E=P)}if(v){var C,j;const N=b==="y"?"width":"height",k=r0.has(zr(a)),P=l.reference[m]-l.floating[N]+(k&&((C=f.offset)==null?void 0:C[m])||0)+(k?0:S.crossAxis),D=l.reference[m]+l.reference[N]+(k?0:((j=f.offset)==null?void 0:j[m])||0)-(k?S.crossAxis:0);T<P?T=P:T>D&&(T=D)}return{[b]:E,[m]:T}}}},QR=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){var o,s;const{placement:a,rects:l,platform:f,elements:d}=n,{apply:h=()=>{},...v}=$r(e,n),x=await Wi(n,v),m=zr(a),b=Vs(a),E=gr(a)==="y",{width:T,height:w}=l.floating;let S,C;m==="top"||m==="bottom"?(S=m,C=b===(await(f.isRTL==null?void 0:f.isRTL(d.floating))?"start":"end")?"left":"right"):(C=m,S=b==="end"?"top":"bottom");const j=w-x.top-x.bottom,N=T-x.left-x.right,k=So(w-x[S],j),P=So(T-x[C],N),D=!n.middlewareData.shift;let _=k,L=P;if((o=n.middlewareData.shift)!=null&&o.enabled.x&&(L=N),(s=n.middlewareData.shift)!=null&&s.enabled.y&&(_=j),D&&!b){const W=En(x.left,0),U=En(x.right,0),ee=En(x.top,0),Y=En(x.bottom,0);E?L=T-2*(W!==0||U!==0?W+U:En(x.left,x.right)):_=w-2*(ee!==0||Y!==0?ee+Y:En(x.top,x.bottom))}await h({...n,availableWidth:L,availableHeight:_});const H=await f.getDimensions(d.floating);return T!==H.width||w!==H.height?{reset:{rects:!0}}:{}}}};function kc(){return typeof window<"u"}function Ws(e){return o0(e)?(e.nodeName||"").toLowerCase():"#document"}function Nn(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function wr(e){var n;return(n=(o0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function o0(e){return kc()?e instanceof Node||e instanceof Nn(e).Node:!1}function Zn(e){return kc()?e instanceof Element||e instanceof Nn(e).Element:!1}function yr(e){return kc()?e instanceof HTMLElement||e instanceof Nn(e).HTMLElement:!1}function jv(e){return!kc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Nn(e).ShadowRoot}const JR=new Set(["inline","contents"]);function aa(e){const{overflow:n,overflowX:o,overflowY:s,display:a}=er(e);return/auto|scroll|overlay|hidden|clip/.test(n+s+o)&&!JR.has(a)}const ZR=new Set(["table","td","th"]);function eT(e){return ZR.has(Ws(e))}const tT=[":popover-open",":modal"];function Pc(e){return tT.some(n=>{try{return e.matches(n)}catch{return!1}})}const nT=["transform","translate","scale","rotate","perspective"],rT=["transform","translate","scale","rotate","perspective","filter"],oT=["paint","layout","strict","content"];function vp(e){const n=yp(),o=Zn(e)?er(e):e;return nT.some(s=>o[s]?o[s]!=="none":!1)||(o.containerType?o.containerType!=="normal":!1)||!n&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!n&&(o.filter?o.filter!=="none":!1)||rT.some(s=>(o.willChange||"").includes(s))||oT.some(s=>(o.contain||"").includes(s))}function sT(e){let n=Co(e);for(;yr(n)&&!zs(n);){if(vp(n))return n;if(Pc(n))return null;n=Co(n)}return null}function yp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const iT=new Set(["html","body","#document"]);function zs(e){return iT.has(Ws(e))}function er(e){return Nn(e).getComputedStyle(e)}function _c(e){return Zn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Co(e){if(Ws(e)==="html")return e;const n=e.assignedSlot||e.parentNode||jv(e)&&e.host||wr(e);return jv(n)?n.host:n}function s0(e){const n=Co(e);return zs(n)?e.ownerDocument?e.ownerDocument.body:e.body:yr(n)&&aa(n)?n:s0(n)}function Ki(e,n,o){var s;n===void 0&&(n=[]),o===void 0&&(o=!0);const a=s0(e),l=a===((s=e.ownerDocument)==null?void 0:s.body),f=Nn(a);if(l){const d=kf(f);return n.concat(f,f.visualViewport||[],aa(a)?a:[],d&&o?Ki(d):[])}return n.concat(a,Ki(a,[],o))}function kf(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function i0(e){const n=er(e);let o=parseFloat(n.width)||0,s=parseFloat(n.height)||0;const a=yr(e),l=a?e.offsetWidth:o,f=a?e.offsetHeight:s,d=Jl(o)!==l||Jl(s)!==f;return d&&(o=l,s=f),{width:o,height:s,$:d}}function xp(e){return Zn(e)?e:e.contextElement}function Ts(e){const n=xp(e);if(!yr(n))return vr(1);const o=n.getBoundingClientRect(),{width:s,height:a,$:l}=i0(n);let f=(l?Jl(o.width):o.width)/s,d=(l?Jl(o.height):o.height)/a;return(!f||!Number.isFinite(f))&&(f=1),(!d||!Number.isFinite(d))&&(d=1),{x:f,y:d}}const aT=vr(0);function a0(e){const n=Nn(e);return!yp()||!n.visualViewport?aT:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function lT(e,n,o){return n===void 0&&(n=!1),!o||n&&o!==Nn(e)?!1:n}function qo(e,n,o,s){n===void 0&&(n=!1),o===void 0&&(o=!1);const a=e.getBoundingClientRect(),l=xp(e);let f=vr(1);n&&(s?Zn(s)&&(f=Ts(s)):f=Ts(e));const d=lT(l,o,s)?a0(l):vr(0);let h=(a.left+d.x)/f.x,v=(a.top+d.y)/f.y,x=a.width/f.x,m=a.height/f.y;if(l){const b=Nn(l),E=s&&Zn(s)?Nn(s):s;let T=b,w=kf(T);for(;w&&s&&E!==T;){const S=Ts(w),C=w.getBoundingClientRect(),j=er(w),N=C.left+(w.clientLeft+parseFloat(j.paddingLeft))*S.x,k=C.top+(w.clientTop+parseFloat(j.paddingTop))*S.y;h*=S.x,v*=S.y,x*=S.x,m*=S.y,h+=N,v+=k,T=Nn(w),w=kf(T)}}return ec({width:x,height:m,x:h,y:v})}function Dc(e,n){const o=_c(e).scrollLeft;return n?n.left+o:qo(wr(e)).left+o}function l0(e,n){const o=e.getBoundingClientRect(),s=o.left+n.scrollLeft-Dc(e,o),a=o.top+n.scrollTop;return{x:s,y:a}}function cT(e){let{elements:n,rect:o,offsetParent:s,strategy:a}=e;const l=a==="fixed",f=wr(s),d=n?Pc(n.floating):!1;if(s===f||d&&l)return o;let h={scrollLeft:0,scrollTop:0},v=vr(1);const x=vr(0),m=yr(s);if((m||!m&&!l)&&((Ws(s)!=="body"||aa(f))&&(h=_c(s)),yr(s))){const E=qo(s);v=Ts(s),x.x=E.x+s.clientLeft,x.y=E.y+s.clientTop}const b=f&&!m&&!l?l0(f,h):vr(0);return{width:o.width*v.x,height:o.height*v.y,x:o.x*v.x-h.scrollLeft*v.x+x.x+b.x,y:o.y*v.y-h.scrollTop*v.y+x.y+b.y}}function uT(e){return Array.from(e.getClientRects())}function dT(e){const n=wr(e),o=_c(e),s=e.ownerDocument.body,a=En(n.scrollWidth,n.clientWidth,s.scrollWidth,s.clientWidth),l=En(n.scrollHeight,n.clientHeight,s.scrollHeight,s.clientHeight);let f=-o.scrollLeft+Dc(e);const d=-o.scrollTop;return er(s).direction==="rtl"&&(f+=En(n.clientWidth,s.clientWidth)-a),{width:a,height:l,x:f,y:d}}const Rv=25;function fT(e,n){const o=Nn(e),s=wr(e),a=o.visualViewport;let l=s.clientWidth,f=s.clientHeight,d=0,h=0;if(a){l=a.width,f=a.height;const x=yp();(!x||x&&n==="fixed")&&(d=a.offsetLeft,h=a.offsetTop)}const v=Dc(s);if(v<=0){const x=s.ownerDocument,m=x.body,b=getComputedStyle(m),E=x.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,T=Math.abs(s.clientWidth-m.clientWidth-E);T<=Rv&&(l-=T)}else v<=Rv&&(l+=v);return{width:l,height:f,x:d,y:h}}const pT=new Set(["absolute","fixed"]);function hT(e,n){const o=qo(e,!0,n==="fixed"),s=o.top+e.clientTop,a=o.left+e.clientLeft,l=yr(e)?Ts(e):vr(1),f=e.clientWidth*l.x,d=e.clientHeight*l.y,h=a*l.x,v=s*l.y;return{width:f,height:d,x:h,y:v}}function Tv(e,n,o){let s;if(n==="viewport")s=fT(e,o);else if(n==="document")s=dT(wr(e));else if(Zn(n))s=hT(n,o);else{const a=a0(e);s={x:n.x-a.x,y:n.y-a.y,width:n.width,height:n.height}}return ec(s)}function c0(e,n){const o=Co(e);return o===n||!Zn(o)||zs(o)?!1:er(o).position==="fixed"||c0(o,n)}function mT(e,n){const o=n.get(e);if(o)return o;let s=Ki(e,[],!1).filter(d=>Zn(d)&&Ws(d)!=="body"),a=null;const l=er(e).position==="fixed";let f=l?Co(e):e;for(;Zn(f)&&!zs(f);){const d=er(f),h=vp(f);!h&&d.position==="fixed"&&(a=null),(l?!h&&!a:!h&&d.position==="static"&&!!a&&pT.has(a.position)||aa(f)&&!h&&c0(e,f))?s=s.filter(x=>x!==f):a=d,f=Co(f)}return n.set(e,s),s}function gT(e){let{element:n,boundary:o,rootBoundary:s,strategy:a}=e;const f=[...o==="clippingAncestors"?Pc(n)?[]:mT(n,this._c):[].concat(o),s],d=f[0],h=f.reduce((v,x)=>{const m=Tv(n,x,a);return v.top=En(m.top,v.top),v.right=So(m.right,v.right),v.bottom=So(m.bottom,v.bottom),v.left=En(m.left,v.left),v},Tv(n,d,a));return{width:h.right-h.left,height:h.bottom-h.top,x:h.left,y:h.top}}function vT(e){const{width:n,height:o}=i0(e);return{width:n,height:o}}function yT(e,n,o){const s=yr(n),a=wr(n),l=o==="fixed",f=qo(e,!0,l,n);let d={scrollLeft:0,scrollTop:0};const h=vr(0);function v(){h.x=Dc(a)}if(s||!s&&!l)if((Ws(n)!=="body"||aa(a))&&(d=_c(n)),s){const E=qo(n,!0,l,n);h.x=E.x+n.clientLeft,h.y=E.y+n.clientTop}else a&&v();l&&!s&&a&&v();const x=a&&!s&&!l?l0(a,d):vr(0),m=f.left+d.scrollLeft-h.x-x.x,b=f.top+d.scrollTop-h.y-x.y;return{x:m,y:b,width:f.width,height:f.height}}function Xd(e){return er(e).position==="static"}function kv(e,n){if(!yr(e)||er(e).position==="fixed")return null;if(n)return n(e);let o=e.offsetParent;return wr(e)===o&&(o=o.ownerDocument.body),o}function u0(e,n){const o=Nn(e);if(Pc(e))return o;if(!yr(e)){let a=Co(e);for(;a&&!zs(a);){if(Zn(a)&&!Xd(a))return a;a=Co(a)}return o}let s=kv(e,n);for(;s&&eT(s)&&Xd(s);)s=kv(s,n);return s&&zs(s)&&Xd(s)&&!vp(s)?o:s||sT(e)||o}const xT=async function(e){const n=this.getOffsetParent||u0,o=this.getDimensions,s=await o(e.floating);return{reference:yT(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function wT(e){return er(e).direction==="rtl"}const bT={convertOffsetParentRelativeRectToViewportRelativeRect:cT,getDocumentElement:wr,getClippingRect:gT,getOffsetParent:u0,getElementRects:xT,getClientRects:uT,getDimensions:vT,getScale:Ts,isElement:Zn,isRTL:wT};function d0(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}function ST(e,n){let o=null,s;const a=wr(e);function l(){var d;clearTimeout(s),(d=o)==null||d.disconnect(),o=null}function f(d,h){d===void 0&&(d=!1),h===void 0&&(h=1),l();const v=e.getBoundingClientRect(),{left:x,top:m,width:b,height:E}=v;if(d||n(),!b||!E)return;const T=Pl(m),w=Pl(a.clientWidth-(x+b)),S=Pl(a.clientHeight-(m+E)),C=Pl(x),N={rootMargin:-T+"px "+-w+"px "+-S+"px "+-C+"px",threshold:En(0,So(1,h))||1};let k=!0;function P(D){const _=D[0].intersectionRatio;if(_!==h){if(!k)return f();_?f(!1,_):s=setTimeout(()=>{f(!1,1e-7)},1e3)}_===1&&!d0(v,e.getBoundingClientRect())&&f(),k=!1}try{o=new IntersectionObserver(P,{...N,root:a.ownerDocument})}catch{o=new IntersectionObserver(P,N)}o.observe(e)}return f(!0),l}function CT(e,n,o,s){s===void 0&&(s={});const{ancestorScroll:a=!0,ancestorResize:l=!0,elementResize:f=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:h=!1}=s,v=xp(e),x=a||l?[...v?Ki(v):[],...Ki(n)]:[];x.forEach(C=>{a&&C.addEventListener("scroll",o,{passive:!0}),l&&C.addEventListener("resize",o)});const m=v&&d?ST(v,o):null;let b=-1,E=null;f&&(E=new ResizeObserver(C=>{let[j]=C;j&&j.target===v&&E&&(E.unobserve(n),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var N;(N=E)==null||N.observe(n)})),o()}),v&&!h&&E.observe(v),E.observe(n));let T,w=h?qo(e):null;h&&S();function S(){const C=qo(e);w&&!d0(w,C)&&o(),w=C,T=requestAnimationFrame(S)}return o(),()=>{var C;x.forEach(j=>{a&&j.removeEventListener("scroll",o),l&&j.removeEventListener("resize",o)}),m==null||m(),(C=E)==null||C.disconnect(),E=null,h&&cancelAnimationFrame(T)}}const ET=GR,NT=XR,jT=WR,RT=QR,TT=KR,Pv=VR,kT=qR,PT=(e,n,o)=>{const s=new Map,a={platform:bT,...o},l={...a.platform,_c:s};return HR(e,n,{...a,platform:l})};var _T=typeof document<"u",DT=function(){},zl=_T?g.useLayoutEffect:DT;function tc(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(typeof e=="function"&&e.toString()===n.toString())return!0;let o,s,a;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(o=e.length,o!==n.length)return!1;for(s=o;s--!==0;)if(!tc(e[s],n[s]))return!1;return!0}if(a=Object.keys(e),o=a.length,o!==Object.keys(n).length)return!1;for(s=o;s--!==0;)if(!{}.hasOwnProperty.call(n,a[s]))return!1;for(s=o;s--!==0;){const l=a[s];if(!(l==="_owner"&&e.$$typeof)&&!tc(e[l],n[l]))return!1}return!0}return e!==e&&n!==n}function f0(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function _v(e,n){const o=f0(e);return Math.round(n*o)/o}function qd(e){const n=g.useRef(e);return zl(()=>{n.current=e}),n}function AT(e){e===void 0&&(e={});const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:a,elements:{reference:l,floating:f}={},transform:d=!0,whileElementsMounted:h,open:v}=e,[x,m]=g.useState({x:0,y:0,strategy:o,placement:n,middlewareData:{},isPositioned:!1}),[b,E]=g.useState(s);tc(b,s)||E(s);const[T,w]=g.useState(null),[S,C]=g.useState(null),j=g.useCallback(z=>{z!==D.current&&(D.current=z,w(z))},[]),N=g.useCallback(z=>{z!==_.current&&(_.current=z,C(z))},[]),k=l||T,P=f||S,D=g.useRef(null),_=g.useRef(null),L=g.useRef(x),H=h!=null,W=qd(h),U=qd(a),ee=qd(v),Y=g.useCallback(()=>{if(!D.current||!_.current)return;const z={placement:n,strategy:o,middleware:b};U.current&&(z.platform=U.current),PT(D.current,_.current,z).then(J=>{const te={...J,isPositioned:ee.current!==!1};X.current&&!tc(L.current,te)&&(L.current=te,Jn.flushSync(()=>{m(te)}))})},[b,n,o,U,ee]);zl(()=>{v===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,m(z=>({...z,isPositioned:!1})))},[v]);const X=g.useRef(!1);zl(()=>(X.current=!0,()=>{X.current=!1}),[]),zl(()=>{if(k&&(D.current=k),P&&(_.current=P),k&&P){if(W.current)return W.current(k,P,Y);Y()}},[k,P,Y,W,H]);const le=g.useMemo(()=>({reference:D,floating:_,setReference:j,setFloating:N}),[j,N]),Z=g.useMemo(()=>({reference:k,floating:P}),[k,P]),q=g.useMemo(()=>{const z={position:o,left:0,top:0};if(!Z.floating)return z;const J=_v(Z.floating,x.x),te=_v(Z.floating,x.y);return d?{...z,transform:"translate("+J+"px, "+te+"px)",...f0(Z.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:J,top:te}},[o,d,Z.floating,x.x,x.y]);return g.useMemo(()=>({...x,update:Y,refs:le,elements:Z,floatingStyles:q}),[x,Y,le,Z,q])}const OT=e=>{function n(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){const{element:s,padding:a}=typeof e=="function"?e(o):e;return s&&n(s)?s.current!=null?Pv({element:s.current,padding:a}).fn(o):{}:s?Pv({element:s,padding:a}).fn(o):{}}}},MT=(e,n)=>({...ET(e),options:[e,n]}),IT=(e,n)=>({...NT(e),options:[e,n]}),LT=(e,n)=>({...kT(e),options:[e,n]}),FT=(e,n)=>({...jT(e),options:[e,n]}),$T=(e,n)=>({...RT(e),options:[e,n]}),zT=(e,n)=>({...TT(e),options:[e,n]}),BT=(e,n)=>({...OT(e),options:[e,n]});var UT="Arrow",p0=g.forwardRef((e,n)=>{const{children:o,width:s=10,height:a=5,...l}=e;return c.jsx(ke.svg,{...l,ref:n,width:s,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?o:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});p0.displayName=UT;var HT=p0;function wp(e){const[n,o]=g.useState(void 0);return _t(()=>{if(e){o({width:e.offsetWidth,height:e.offsetHeight});const s=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const l=a[0];let f,d;if("borderBoxSize"in l){const h=l.borderBoxSize,v=Array.isArray(h)?h[0]:h;f=v.inlineSize,d=v.blockSize}else f=e.offsetWidth,d=e.offsetHeight;o({width:f,height:d})});return s.observe(e,{box:"border-box"}),()=>s.unobserve(e)}else o(void 0)},[e]),n}var bp="Popper",[h0,Ac]=nr(bp),[VT,m0]=h0(bp),g0=e=>{const{__scopePopper:n,children:o}=e,[s,a]=g.useState(null);return c.jsx(VT,{scope:n,anchor:s,onAnchorChange:a,children:o})};g0.displayName=bp;var v0="PopperAnchor",y0=g.forwardRef((e,n)=>{const{__scopePopper:o,virtualRef:s,...a}=e,l=m0(v0,o),f=g.useRef(null),d=Ie(n,f),h=g.useRef(null);return g.useEffect(()=>{const v=h.current;h.current=(s==null?void 0:s.current)||f.current,v!==h.current&&l.onAnchorChange(h.current)}),s?null:c.jsx(ke.div,{...a,ref:d})});y0.displayName=v0;var Sp="PopperContent",[WT,KT]=h0(Sp),x0=g.forwardRef((e,n)=>{var ae,se,ye,fe,Ne,ce;const{__scopePopper:o,side:s="bottom",sideOffset:a=0,align:l="center",alignOffset:f=0,arrowPadding:d=0,avoidCollisions:h=!0,collisionBoundary:v=[],collisionPadding:x=0,sticky:m="partial",hideWhenDetached:b=!1,updatePositionStrategy:E="optimized",onPlaced:T,...w}=e,S=m0(Sp,o),[C,j]=g.useState(null),N=Ie(n,Oe=>j(Oe)),[k,P]=g.useState(null),D=wp(k),_=(D==null?void 0:D.width)??0,L=(D==null?void 0:D.height)??0,H=s+(l!=="center"?"-"+l:""),W=typeof x=="number"?x:{top:0,right:0,bottom:0,left:0,...x},U=Array.isArray(v)?v:[v],ee=U.length>0,Y={padding:W,boundary:U.filter(GT),altBoundary:ee},{refs:X,floatingStyles:le,placement:Z,isPositioned:q,middlewareData:z}=AT({strategy:"fixed",placement:H,whileElementsMounted:(...Oe)=>CT(...Oe,{animationFrame:E==="always"}),elements:{reference:S.anchor},middleware:[MT({mainAxis:a+L,alignmentAxis:f}),h&&IT({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?LT():void 0,...Y}),h&&FT({...Y}),$T({...Y,apply:({elements:Oe,rects:pe,availableWidth:Ze,availableHeight:wt})=>{const{width:gt,height:jn}=pe.reference,at=Oe.floating.style;at.setProperty("--radix-popper-available-width",`${Ze}px`),at.setProperty("--radix-popper-available-height",`${wt}px`),at.setProperty("--radix-popper-anchor-width",`${gt}px`),at.setProperty("--radix-popper-anchor-height",`${jn}px`)}}),k&&BT({element:k,padding:d}),XT({arrowWidth:_,arrowHeight:L}),b&&zT({strategy:"referenceHidden",...Y})]}),[J,te]=S0(Z),O=zt(T);_t(()=>{q&&(O==null||O())},[q,O]);const K=(ae=z.arrow)==null?void 0:ae.x,ne=(se=z.arrow)==null?void 0:se.y,G=((ye=z.arrow)==null?void 0:ye.centerOffset)!==0,[de,he]=g.useState();return _t(()=>{C&&he(window.getComputedStyle(C).zIndex)},[C]),c.jsx("div",{ref:X.setFloating,"data-radix-popper-content-wrapper":"",style:{...le,transform:q?le.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[(fe=z.transformOrigin)==null?void 0:fe.x,(Ne=z.transformOrigin)==null?void 0:Ne.y].join(" "),...((ce=z.hide)==null?void 0:ce.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(WT,{scope:o,placedSide:J,onArrowChange:P,arrowX:K,arrowY:ne,shouldHideArrow:G,children:c.jsx(ke.div,{"data-side":J,"data-align":te,...w,ref:N,style:{...w.style,animation:q?void 0:"none"}})})})});x0.displayName=Sp;var w0="PopperArrow",YT={top:"bottom",right:"left",bottom:"top",left:"right"},b0=g.forwardRef(function(n,o){const{__scopePopper:s,...a}=n,l=KT(w0,s),f=YT[l.placedSide];return c.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[f]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:c.jsx(HT,{...a,ref:o,style:{...a.style,display:"block"}})})});b0.displayName=w0;function GT(e){return e!==null}var XT=e=>({name:"transformOrigin",options:e,fn(n){var S,C,j;const{placement:o,rects:s,middlewareData:a}=n,f=((S=a.arrow)==null?void 0:S.centerOffset)!==0,d=f?0:e.arrowWidth,h=f?0:e.arrowHeight,[v,x]=S0(o),m={start:"0%",center:"50%",end:"100%"}[x],b=(((C=a.arrow)==null?void 0:C.x)??0)+d/2,E=(((j=a.arrow)==null?void 0:j.y)??0)+h/2;let T="",w="";return v==="bottom"?(T=f?m:`${b}px`,w=`${-h}px`):v==="top"?(T=f?m:`${b}px`,w=`${s.floating.height+h}px`):v==="right"?(T=`${-h}px`,w=f?m:`${E}px`):v==="left"&&(T=`${s.floating.width+h}px`,w=f?m:`${E}px`),{data:{x:T,y:w}}}});function S0(e){const[n,o="center"]=e.split("-");return[n,o]}var C0=g0,Cp=y0,E0=x0,N0=b0,Oc="Popover",[j0]=nr(Oc,[Ac]),la=Ac(),[qT,Eo]=j0(Oc),R0=e=>{const{__scopePopover:n,children:o,open:s,defaultOpen:a,onOpenChange:l,modal:f=!1}=e,d=la(n),h=g.useRef(null),[v,x]=g.useState(!1),[m,b]=bo({prop:s,defaultProp:a??!1,onChange:l,caller:Oc});return c.jsx(C0,{...d,children:c.jsx(qT,{scope:n,contentId:wo(),triggerRef:h,open:m,onOpenChange:b,onOpenToggle:g.useCallback(()=>b(E=>!E),[b]),hasCustomAnchor:v,onCustomAnchorAdd:g.useCallback(()=>x(!0),[]),onCustomAnchorRemove:g.useCallback(()=>x(!1),[]),modal:f,children:o})})};R0.displayName=Oc;var T0="PopoverAnchor",QT=g.forwardRef((e,n)=>{const{__scopePopover:o,...s}=e,a=Eo(T0,o),l=la(o),{onCustomAnchorAdd:f,onCustomAnchorRemove:d}=a;return g.useEffect(()=>(f(),()=>d()),[f,d]),c.jsx(Cp,{...l,...s,ref:n})});QT.displayName=T0;var k0="PopoverTrigger",P0=g.forwardRef((e,n)=>{const{__scopePopover:o,...s}=e,a=Eo(k0,o),l=la(o),f=Ie(n,a.triggerRef),d=c.jsx(ke.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":M0(a.open),...s,ref:f,onClick:Ee(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?d:c.jsx(Cp,{asChild:!0,...l,children:d})});P0.displayName=k0;var Ep="PopoverPortal",[JT,ZT]=j0(Ep,{forceMount:void 0}),_0=e=>{const{__scopePopover:n,forceMount:o,children:s,container:a}=e,l=Eo(Ep,n);return c.jsx(JT,{scope:n,forceMount:o,children:c.jsx(Ln,{present:o||l.open,children:c.jsx(sa,{asChild:!0,container:a,children:s})})})};_0.displayName=Ep;var Bs="PopoverContent",D0=g.forwardRef((e,n)=>{const o=ZT(Bs,e.__scopePopover),{forceMount:s=o.forceMount,...a}=e,l=Eo(Bs,e.__scopePopover);return c.jsx(Ln,{present:s||l.open,children:l.modal?c.jsx(t2,{...a,ref:n}):c.jsx(n2,{...a,ref:n})})});D0.displayName=Bs;var e2=$s("PopoverContent.RemoveScroll"),t2=g.forwardRef((e,n)=>{const o=Eo(Bs,e.__scopePopover),s=g.useRef(null),a=Ie(n,s),l=g.useRef(!1);return g.useEffect(()=>{const f=s.current;if(f)return ap(f)},[]),c.jsx(Sc,{as:e2,allowPinchZoom:!0,children:c.jsx(A0,{...e,ref:a,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ee(e.onCloseAutoFocus,f=>{var d;f.preventDefault(),l.current||(d=o.triggerRef.current)==null||d.focus()}),onPointerDownOutside:Ee(e.onPointerDownOutside,f=>{const d=f.detail.originalEvent,h=d.button===0&&d.ctrlKey===!0,v=d.button===2||h;l.current=v},{checkForDefaultPrevented:!1}),onFocusOutside:Ee(e.onFocusOutside,f=>f.preventDefault(),{checkForDefaultPrevented:!1})})})}),n2=g.forwardRef((e,n)=>{const o=Eo(Bs,e.__scopePopover),s=g.useRef(!1),a=g.useRef(!1);return c.jsx(A0,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{var f,d;(f=e.onCloseAutoFocus)==null||f.call(e,l),l.defaultPrevented||(s.current||(d=o.triggerRef.current)==null||d.focus(),l.preventDefault()),s.current=!1,a.current=!1},onInteractOutside:l=>{var h,v;(h=e.onInteractOutside)==null||h.call(e,l),l.defaultPrevented||(s.current=!0,l.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const f=l.target;((v=o.triggerRef.current)==null?void 0:v.contains(f))&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&a.current&&l.preventDefault()}})}),A0=g.forwardRef((e,n)=>{const{__scopePopover:o,trapFocus:s,onOpenAutoFocus:a,onCloseAutoFocus:l,disableOutsidePointerEvents:f,onEscapeKeyDown:d,onPointerDownOutside:h,onFocusOutside:v,onInteractOutside:x,...m}=e,b=Eo(Bs,o),E=la(o);return ip(),c.jsx(wc,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:a,onUnmountAutoFocus:l,children:c.jsx(oa,{asChild:!0,disableOutsidePointerEvents:f,onInteractOutside:x,onEscapeKeyDown:d,onPointerDownOutside:h,onFocusOutside:v,onDismiss:()=>b.onOpenChange(!1),children:c.jsx(E0,{"data-state":M0(b.open),role:"dialog",id:b.contentId,...E,...m,ref:n,style:{...m.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),O0="PopoverClose",r2=g.forwardRef((e,n)=>{const{__scopePopover:o,...s}=e,a=Eo(O0,o);return c.jsx(ke.button,{type:"button",...s,ref:n,onClick:Ee(e.onClick,()=>a.onOpenChange(!1))})});r2.displayName=O0;var o2="PopoverArrow",s2=g.forwardRef((e,n)=>{const{__scopePopover:o,...s}=e,a=la(o);return c.jsx(N0,{...a,...s,ref:n})});s2.displayName=o2;function M0(e){return e?"open":"closed"}var i2=R0,a2=P0,l2=_0,I0=D0;const Dv=i2,Av=a2,Pf=g.forwardRef(({className:e,align:n="center",sideOffset:o=4,...s},a)=>c.jsx(l2,{children:c.jsx(I0,{ref:a,align:n,sideOffset:o,className:je("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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 origin-[--radix-popover-content-transform-origin]",e),...s})}));Pf.displayName=I0.displayName;const Ov=e=>{let n;const o=new Set,s=(v,x)=>{const m=typeof v=="function"?v(n):v;if(!Object.is(m,n)){const b=n;n=x??(typeof m!="object"||m===null)?m:Object.assign({},n,m),o.forEach(E=>E(n,b))}},a=()=>n,d={setState:s,getState:a,getInitialState:()=>h,subscribe:v=>(o.add(v),()=>o.delete(v))},h=n=e(s,a,d);return d},c2=(e=>e?Ov(e):Ov),u2=e=>e;function d2(e,n=u2){const o=F.useSyncExternalStore(e.subscribe,F.useCallback(()=>n(e.getState()),[e,n]),F.useCallback(()=>n(e.getInitialState()),[e,n]));return F.useDebugValue(o),o}const f2=e=>{const n=c2(e),o=s=>d2(n,s);return Object.assign(o,n),o},L0=(e=>f2),Mv={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Yi=new Map,_l=e=>{const n=Yi.get(e);return n?Object.fromEntries(Object.entries(n.stores).map(([o,s])=>[o,s.getState()])):{}},p2=(e,n,o)=>{if(e===void 0)return{type:"untracked",connection:n.connect(o)};const s=Yi.get(o.name);if(s)return{type:"tracked",store:e,...s};const a={connection:n.connect(o),stores:{}};return Yi.set(o.name,a),{type:"tracked",store:e,...a}},h2=(e,n)=>{if(n===void 0)return;const o=Yi.get(e);o&&(delete o.stores[n],Object.keys(o.stores).length===0&&Yi.delete(e))},m2=e=>{var n,o;if(!e)return;const s=e.split(`267 `),a=s.findIndex(f=>f.includes("api.setState"));if(a<0)return;const l=((n=s[a+1])==null?void 0:n.trim())||"";return(o=/.+ (.+) .+/.exec(l))==null?void 0:o[1]}, g2=(e,n={})=>(o,s,a)=>{const{enabled:l,anonymousActionType:f,store:d,...h}=n;let v;try{v=(l??(Mv?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!v)return e(o,s,a);const{connection:x,...m}=p2(d,v,h);let b=!0;a.setState=((w,S,C)=>{const j=o(w,S);if(!b)return j;const N=C===void 0?{type:f||m2(new Error().stack)||"anonymous"}:typeof C=="string"?{type:C}:C;return d===void 0?(x==null||x.send(N,s()),j):(x==null||x.send({...N,type:`${d}/${N.type}`},{..._l(h.name),[d]:a.getState()}),j)}),a.devtools={cleanup:()=>{x&&typeof x.unsubscribe=="function"&&x.unsubscribe(),h2(h.name,d)}};const E=(...w)=>{const S=b;b=!1,o(...w),b=S},T=e(a.setState,s,a);if(m.type==="untracked"?x==null||x.init(T):(m.stores[m.store]=a,x==null||x.init(Object.fromEntries(Object.entries(m.stores).map(([w,S])=>[w,w===m.store?T:S.getState()])))),a.dispatchFromDevtools&&typeof a.dispatch=="function"){let w=!1;const S=a.dispatch;a.dispatch=(...C)=>{(Mv?"production":void 0)!=="production"&&C[0].type==="__setState"&&!w&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),w=!0),S(...C)}}return x.subscribe(w=>{var S;switch(w.type){case"ACTION":if(typeof w.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Qd(w.payload,C=>{if(C.type==="__setState"){if(d===void 0){E(C.state);return}Object.keys(C.state).length!==1&&console.error(`262 For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return g.useEffect(()=>{e&&(document.getElementById(e)||console.error(o))},[o,e]),null},E2="DialogDescriptionWarning",N2=({contentRef:e,descriptionId:n})=>{const s=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${hg(E2).contentName}}.`;return g.useEffect(()=>{var l;const a=(l=e.current)==null?void 0:l.getAttribute("aria-describedby");n&&a&&(document.getElementById(n)||console.warn(s))},[s,e,n]),null},Gu=eg,qu=ng,Qu=og,Wa=sg,Ya=ig,Ka=lg,Xa=ug,Ga=fg,mg="AlertDialog",[k2]=Vn(mg,[Zm]),kr=Zm(),gg=e=>{const{__scopeAlertDialog:n,...o}=e,s=kr(n);return c.jsx(Gu,{...s,...o,modal:!0})};gg.displayName=mg;var j2="AlertDialogTrigger",vg=g.forwardRef((e,n)=>{const{__scopeAlertDialog:o,...s}=e,a=kr(o);return c.jsx(qu,{...a,...s,ref:n})});vg.displayName=j2;var R2="AlertDialogPortal",yg=e=>{const{__scopeAlertDialog:n,...o}=e,s=kr(n);return c.jsx(Qu,{...s,...o})};yg.displayName=R2;var T2="AlertDialogOverlay",wg=g.forwardRef((e,n)=>{const{__scopeAlertDialog:o,...s}=e,a=kr(o);return c.jsx(Wa,{...a,...s,ref:n})});wg.displayName=T2;var fs="AlertDialogContent",[P2,D2]=k2(fs),A2=w1("AlertDialogContent"),xg=g.forwardRef((e,n)=>{const{__scopeAlertDialog:o,children:s,...a}=e,l=kr(o),f=g.useRef(null),d=Ie(n,f),h=g.useRef(null);return c.jsx(C2,{contentName:fs,titleName:bg,docsSlug:"alert-dialog",children:c.jsx(P2,{scope:o,cancelRef:h,children:c.jsxs(Ya,{role:"alertdialog",...l,...a,ref:d,onOpenAutoFocus:Ee(a.onOpenAutoFocus,v=>{var w;v.preventDefault(),(w=h.current)==null||w.focus({preventScroll:!0})}),onPointerDownOutside:v=>v.preventDefault(),onInteractOutside:v=>v.preventDefault(),children:[c.jsx(A2,{children:s}),c.jsx(M2,{contentRef:f})]})})})});xg.displayName=fs;var bg="AlertDialogTitle",Sg=g.forwardRef((e,n)=>{const{__scopeAlertDialog:o,...s}=e,a=kr(o);return c.jsx(Ka,{...a,...s,ref:n})});Sg.displayName=bg;var Cg="AlertDialogDescription",_g=g.forwardRef((e,n)=>{const{__scopeAlertDialog:o,...s}=e,a=kr(o);return c.jsx(Xa,{...a,...s,ref:n})});_g.displayName=Cg;var O2="AlertDialogAction",Eg=g.forwardRef((e,n)=>{const{__scopeAlertDialog:o,...s}=e,a=kr(o);return c.jsx(Ga,{...a,...s,ref:n})});Eg.displayName=O2;var Ng="AlertDialogCancel",kg=g.forwardRef((e,n)=>{const{__scopeAlertDialog:o,...s}=e,{cancelRef:a}=D2(Ng,o),l=kr(o),f=Ie(n,a);return c.jsx(Ga,{...l,...s,ref:f})});kg.displayName=Ng;var M2=({contentRef:e})=>{const n=`\`${fs}\` requires a description for the component to be accessible for screen reader users. 263 264 You can add a description to the \`${fs}\` by passing a \`${Cg}\` component as a child, which also benefits sighted users by adding visible context to the dialog. 265 266 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 \`${fs}\`. 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. 267 268 For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return g.useEffect(()=>{var s;document.getElementById((s=e.current)==null?void 0:s.getAttribute("aria-describedby"))||console.warn(n)},[n,e]),null},I2=gg,L2=vg,F2=yg,jg=wg,Rg=xg,Tg=Eg,Pg=kg,Dg=Sg,Ag=_g;const Ju=I2,Og=L2,z2=F2,Mg=g.forwardRef(({className:e,...n},o)=>c.jsx(jg,{className:ke("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),...n,ref:o}));Mg.displayName=jg.displayName;const qa=g.forwardRef(({className:e,...n},o)=>c.jsxs(z2,{children:[c.jsx(Mg,{}),c.jsx(Rg,{ref:o,className:ke("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})]}));qa.displayName=Rg.displayName;const Qa=({className:e,...n})=>c.jsx("div",{className:ke("flex flex-col space-y-2 text-center sm:text-start",e),...n});Qa.displayName="AlertDialogHeader";const Ja=({className:e,...n})=>c.jsx("div",{className:ke("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n});Ja.displayName="AlertDialogFooter";const Za=g.forwardRef(({className:e,...n},o)=>c.jsx(Dg,{ref:o,className:ke("text-lg font-semibold",e),...n}));Za.displayName=Dg.displayName;const el=g.forwardRef(({className:e,...n},o)=>c.jsx(Ag,{ref:o,className:ke("text-sm text-muted-foreground",e),...n}));el.displayName=Ag.displayName;const tl=g.forwardRef(({className:e,...n},o)=>c.jsx(Tg,{ref:o,className:ke(Mu(),e),...n}));tl.displayName=Tg.displayName;const nl=g.forwardRef(({className:e,...n},o)=>c.jsx(Pg,{ref:o,className:ke(Mu({variant:"outline"}),"mt-2 sm:mt-0",e),...n}));nl.displayName=Pg.displayName;const $2=["top","right","bottom","left"],qr=Math.min,Cn=Math.max,rl=Math.round,ol=Math.floor,ur=e=>({x:e,y:e}),B2={left:"right",right:"left",bottom:"top",top:"bottom"},U2={start:"end",end:"start"};function Zu(e,n,o){return Cn(e,qr(n,o))}function jr(e,n){return typeof e=="function"?e(n):e}function Rr(e){return e.split("-")[0]}function ps(e){return e.split("-")[1]}function ed(e){return e==="x"?"y":"x"}function td(e){return e==="y"?"height":"width"}const H2=new Set(["top","bottom"]);function dr(e){return H2.has(Rr(e))?"y":"x"}function nd(e){return ed(dr(e))}function V2(e,n,o){o===void 0&&(o=!1);const s=ps(e),a=nd(e),l=td(a);let f=a==="x"?s===(o?"end":"start")?"right":"left":s==="start"?"bottom":"top";return n.reference[l]>n.floating[l]&&(f=sl(f)),[f,sl(f)]}function W2(e){const n=sl(e);return[rd(e),n,rd(n)]}function rd(e){return e.replace(/start|end/g,n=>U2[n])}const Ig=["left","right"],Lg=["right","left"],Y2=["top","bottom"],K2=["bottom","top"];function X2(e,n,o){switch(e){case"top":case"bottom":return o?n?Lg:Ig:n?Ig:Lg;case"left":case"right":return n?Y2:K2;default:return[]}}function G2(e,n,o,s){const a=ps(e);let l=X2(Rr(e),o==="start",s);return a&&(l=l.map(f=>f+"-"+a),n&&(l=l.concat(l.map(rd)))),l}function sl(e){return e.replace(/left|right|bottom|top/g,n=>B2[n])}function q2(e){return{top:0,right:0,bottom:0,left:0,...e}}function Fg(e){return typeof e!="number"?q2(e):{top:e,right:e,bottom:e,left:e}}function il(e){const{x:n,y:o,width:s,height:a}=e;return{width:s,height:a,top:o,left:n,right:n+s,bottom:o+a,x:n,y:o}}function zg(e,n,o){let{reference:s,floating:a}=e;const l=dr(n),f=nd(n),d=td(f),h=Rr(n),v=l==="y",w=s.x+s.width/2-a.width/2,m=s.y+s.height/2-a.height/2,b=s[d]/2-a[d]/2;let E;switch(h){case"top":E={x:w,y:s.y-a.height};break;case"bottom":E={x:w,y:s.y+s.height};break;case"right":E={x:s.x+s.width,y:m};break;case"left":E={x:s.x-a.width,y:m};break;default:E={x:s.x,y:s.y}}switch(ps(n)){case"start":E[f]-=b*(o&&v?-1:1);break;case"end":E[f]+=b*(o&&v?-1:1);break}return E}const Q2=async(e,n,o)=>{const{placement:s="bottom",strategy:a="absolute",middleware:l=[],platform:f}=o,d=l.filter(Boolean),h=await(f.isRTL==null?void 0:f.isRTL(n));let v=await f.getElementRects({reference:e,floating:n,strategy:a}),{x:w,y:m}=zg(v,s,h),b=s,E={},j=0;for(let x=0;x<d.length;x++){const{name:S,fn:C}=d[x],{x:N,y:_,data:R,reset:P}=await C({x:w,y:m,initialPlacement:s,placement:b,strategy:a,middlewareData:E,rects:v,platform:f,elements:{reference:e,floating:n}});w=N??w,m=_??m,E={...E,[S]:{...E[S],...R}},P&&j<=50&&(j++,typeof P=="object"&&(P.placement&&(b=P.placement),P.rects&&(v=P.rects===!0?await f.getElementRects({reference:e,floating:n,strategy:a}):P.rects),{x:w,y:m}=zg(v,b,h)),x=-1)}return{x:w,y:m,placement:b,strategy:a,middlewareData:E}};async function pi(e,n){var o;n===void 0&&(n={});const{x:s,y:a,platform:l,rects:f,elements:d,strategy:h}=e,{boundary:v="clippingAncestors",rootBoundary:w="viewport",elementContext:m="floating",altBoundary:b=!1,padding:E=0}=jr(n,e),j=Fg(E),S=d[b?m==="floating"?"reference":"floating":m],C=il(await l.getClippingRect({element:(o=await(l.isElement==null?void 0:l.isElement(S)))==null||o?S:S.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(d.floating)),boundary:v,rootBoundary:w,strategy:h})),N=m==="floating"?{x:s,y:a,width:f.floating.width,height:f.floating.height}:f.reference,_=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d.floating)),R=await(l.isElement==null?void 0:l.isElement(_))?await(l.getScale==null?void 0:l.getScale(_))||{x:1,y:1}:{x:1,y:1},P=il(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:N,offsetParent:_,strategy:h}):N);return{top:(C.top-P.top+j.top)/R.y,bottom:(P.bottom-C.bottom+j.bottom)/R.y,left:(C.left-P.left+j.left)/R.x,right:(P.right-C.right+j.right)/R.x}}const J2=e=>({name:"arrow",options:e,async fn(n){const{x:o,y:s,placement:a,rects:l,platform:f,elements:d,middlewareData:h}=n,{element:v,padding:w=0}=jr(e,n)||{};if(v==null)return{};const m=Fg(w),b={x:o,y:s},E=nd(a),j=td(E),x=await f.getDimensions(v),S=E==="y",C=S?"top":"left",N=S?"bottom":"right",_=S?"clientHeight":"clientWidth",R=l.reference[j]+l.reference[E]-b[E]-l.floating[j],P=b[E]-l.reference[E],A=await(f.getOffsetParent==null?void 0:f.getOffsetParent(v));let D=A?A[_]:0;(!D||!await(f.isElement==null?void 0:f.isElement(A)))&&(D=d.floating[_]||l.floating[j]);const F=R/2-P/2,V=D/2-x[j]/2-1,Y=qr(m[C],V),H=qr(m[N],V),te=Y,X=D-x[j]-H,q=D/2-x[j]/2+F,ce=Zu(te,q,X),ee=!h.arrow&&ps(a)!=null&&q!==ce&&l.reference[j]/2-(q<te?Y:H)-x[j]/2<0,Q=ee?q<te?q-te:q-X:0;return{[E]:b[E]+Q,data:{[E]:ce,centerOffset:q-ce-Q,...ee&&{alignmentOffset:Q}},reset:ee}}}),Z2=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(n){var o,s;const{placement:a,middlewareData:l,rects:f,initialPlacement:d,platform:h,elements:v}=n,{mainAxis:w=!0,crossAxis:m=!0,fallbackPlacements:b,fallbackStrategy:E="bestFit",fallbackAxisSideDirection:j="none",flipAlignment:x=!0,...S}=jr(e,n);if((o=l.arrow)!=null&&o.alignmentOffset)return{};const C=Rr(a),N=dr(d),_=Rr(d)===d,R=await(h.isRTL==null?void 0:h.isRTL(v.floating)),P=b||(_||!x?[sl(d)]:W2(d)),A=j!=="none";!b&&A&&P.push(...G2(d,x,j,R));const D=[d,...P],F=await pi(n,S),V=[];let Y=((s=l.flip)==null?void 0:s.overflows)||[];if(w&&V.push(F[C]),m){const q=V2(a,f,R);V.push(F[q[0]],F[q[1]])}if(Y=[...Y,{placement:a,overflows:V}],!V.every(q=>q<=0)){var H,te;const q=(((H=l.flip)==null?void 0:H.index)||0)+1,ce=D[q];if(ce&&(!(m==="alignment"?N!==dr(ce):!1)||Y.every(B=>dr(B.placement)===N?B.overflows[0]>0:!0)))return{data:{index:q,overflows:Y},reset:{placement:ce}};let ee=(te=Y.filter(Q=>Q.overflows[0]<=0).sort((Q,B)=>Q.overflows[1]-B.overflows[1])[0])==null?void 0:te.placement;if(!ee)switch(E){case"bestFit":{var X;const Q=(X=Y.filter(B=>{if(A){const Z=dr(B.placement);return Z===N||Z==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(Z=>Z>0).reduce((Z,ne)=>Z+ne,0)]).sort((B,Z)=>B[1]-Z[1])[0])==null?void 0:X[0];Q&&(ee=Q);break}case"initialPlacement":ee=d;break}if(a!==ee)return{reset:{placement:ee}}}return{}}}};function $g(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}function Bg(e){return $2.some(n=>e[n]>=0)}const eE=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:o}=n,{strategy:s="referenceHidden",...a}=jr(e,n);switch(s){case"referenceHidden":{const l=await pi(n,{...a,elementContext:"reference"}),f=$g(l,o.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:Bg(f)}}}case"escaped":{const l=await pi(n,{...a,altBoundary:!0}),f=$g(l,o.floating);return{data:{escapedOffsets:f,escaped:Bg(f)}}}default:return{}}}}},Ug=new Set(["left","top"]);async function tE(e,n){const{placement:o,platform:s,elements:a}=e,l=await(s.isRTL==null?void 0:s.isRTL(a.floating)),f=Rr(o),d=ps(o),h=dr(o)==="y",v=Ug.has(f)?-1:1,w=l&&h?-1:1,m=jr(n,e);let{mainAxis:b,crossAxis:E,alignmentAxis:j}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return d&&typeof j=="number"&&(E=d==="end"?j*-1:j),h?{x:E*w,y:b*v}:{x:b*v,y:E*w}}const nE=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var o,s;const{x:a,y:l,placement:f,middlewareData:d}=n,h=await tE(n,e);return f===((o=d.offset)==null?void 0:o.placement)&&(s=d.arrow)!=null&&s.alignmentOffset?{}:{x:a+h.x,y:l+h.y,data:{...h,placement:f}}}}},rE=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:o,y:s,placement:a}=n,{mainAxis:l=!0,crossAxis:f=!1,limiter:d={fn:S=>{let{x:C,y:N}=S;return{x:C,y:N}}},...h}=jr(e,n),v={x:o,y:s},w=await pi(n,h),m=dr(Rr(a)),b=ed(m);let E=v[b],j=v[m];if(l){const S=b==="y"?"top":"left",C=b==="y"?"bottom":"right",N=E+w[S],_=E-w[C];E=Zu(N,E,_)}if(f){const S=m==="y"?"top":"left",C=m==="y"?"bottom":"right",N=j+w[S],_=j-w[C];j=Zu(N,j,_)}const x=d.fn({...n,[b]:E,[m]:j});return{...x,data:{x:x.x-o,y:x.y-s,enabled:{[b]:l,[m]:f}}}}}},oE=function(e){return e===void 0&&(e={}),{options:e,fn(n){const{x:o,y:s,placement:a,rects:l,middlewareData:f}=n,{offset:d=0,mainAxis:h=!0,crossAxis:v=!0}=jr(e,n),w={x:o,y:s},m=dr(a),b=ed(m);let E=w[b],j=w[m];const x=jr(d,n),S=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(h){const _=b==="y"?"height":"width",R=l.reference[b]-l.floating[_]+S.mainAxis,P=l.reference[b]+l.reference[_]-S.mainAxis;E<R?E=R:E>P&&(E=P)}if(v){var C,N;const _=b==="y"?"width":"height",R=Ug.has(Rr(a)),P=l.reference[m]-l.floating[_]+(R&&((C=f.offset)==null?void 0:C[m])||0)+(R?0:S.crossAxis),A=l.reference[m]+l.reference[_]+(R?0:((N=f.offset)==null?void 0:N[m])||0)-(R?S.crossAxis:0);j<P?j=P:j>A&&(j=A)}return{[b]:E,[m]:j}}}},sE=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){var o,s;const{placement:a,rects:l,platform:f,elements:d}=n,{apply:h=()=>{},...v}=jr(e,n),w=await pi(n,v),m=Rr(a),b=ps(a),E=dr(a)==="y",{width:j,height:x}=l.floating;let S,C;m==="top"||m==="bottom"?(S=m,C=b===(await(f.isRTL==null?void 0:f.isRTL(d.floating))?"start":"end")?"left":"right"):(C=m,S=b==="end"?"top":"bottom");const N=x-w.top-w.bottom,_=j-w.left-w.right,R=qr(x-w[S],N),P=qr(j-w[C],_),A=!n.middlewareData.shift;let D=R,F=P;if((o=n.middlewareData.shift)!=null&&o.enabled.x&&(F=_),(s=n.middlewareData.shift)!=null&&s.enabled.y&&(D=N),A&&!b){const Y=Cn(w.left,0),H=Cn(w.right,0),te=Cn(w.top,0),X=Cn(w.bottom,0);E?F=j-2*(Y!==0||H!==0?Y+H:Cn(w.left,w.right)):D=x-2*(te!==0||X!==0?te+X:Cn(w.top,w.bottom))}await h({...n,availableWidth:F,availableHeight:D});const V=await f.getDimensions(d.floating);return j!==V.width||x!==V.height?{reset:{rects:!0}}:{}}}};function al(){return typeof window<"u"}function hs(e){return Hg(e)?(e.nodeName||"").toLowerCase():"#document"}function _n(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function fr(e){var n;return(n=(Hg(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function Hg(e){return al()?e instanceof Node||e instanceof _n(e).Node:!1}function Yn(e){return al()?e instanceof Element||e instanceof _n(e).Element:!1}function pr(e){return al()?e instanceof HTMLElement||e instanceof _n(e).HTMLElement:!1}function Vg(e){return!al()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof _n(e).ShadowRoot}const iE=new Set(["inline","contents"]);function hi(e){const{overflow:n,overflowX:o,overflowY:s,display:a}=Kn(e);return/auto|scroll|overlay|hidden|clip/.test(n+s+o)&&!iE.has(a)}const aE=new Set(["table","td","th"]);function lE(e){return aE.has(hs(e))}const cE=[":popover-open",":modal"];function ll(e){return cE.some(n=>{try{return e.matches(n)}catch{return!1}})}const uE=["transform","translate","scale","rotate","perspective"],dE=["transform","translate","scale","rotate","perspective","filter"],fE=["paint","layout","strict","content"];function od(e){const n=sd(),o=Yn(e)?Kn(e):e;return uE.some(s=>o[s]?o[s]!=="none":!1)||(o.containerType?o.containerType!=="normal":!1)||!n&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!n&&(o.filter?o.filter!=="none":!1)||dE.some(s=>(o.willChange||"").includes(s))||fE.some(s=>(o.contain||"").includes(s))}function pE(e){let n=Qr(e);for(;pr(n)&&!ms(n);){if(od(n))return n;if(ll(n))return null;n=Qr(n)}return null}function sd(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const hE=new Set(["html","body","#document"]);function ms(e){return hE.has(hs(e))}function Kn(e){return _n(e).getComputedStyle(e)}function cl(e){return Yn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qr(e){if(hs(e)==="html")return e;const n=e.assignedSlot||e.parentNode||Vg(e)&&e.host||fr(e);return Vg(n)?n.host:n}function Wg(e){const n=Qr(e);return ms(n)?e.ownerDocument?e.ownerDocument.body:e.body:pr(n)&&hi(n)?n:Wg(n)}function mi(e,n,o){var s;n===void 0&&(n=[]),o===void 0&&(o=!0);const a=Wg(e),l=a===((s=e.ownerDocument)==null?void 0:s.body),f=_n(a);if(l){const d=id(f);return n.concat(f,f.visualViewport||[],hi(a)?a:[],d&&o?mi(d):[])}return n.concat(a,mi(a,[],o))}function id(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Yg(e){const n=Kn(e);let o=parseFloat(n.width)||0,s=parseFloat(n.height)||0;const a=pr(e),l=a?e.offsetWidth:o,f=a?e.offsetHeight:s,d=rl(o)!==l||rl(s)!==f;return d&&(o=l,s=f),{width:o,height:s,$:d}}function ad(e){return Yn(e)?e:e.contextElement}function gs(e){const n=ad(e);if(!pr(n))return ur(1);const o=n.getBoundingClientRect(),{width:s,height:a,$:l}=Yg(n);let f=(l?rl(o.width):o.width)/s,d=(l?rl(o.height):o.height)/a;return(!f||!Number.isFinite(f))&&(f=1),(!d||!Number.isFinite(d))&&(d=1),{x:f,y:d}}const mE=ur(0);function Kg(e){const n=_n(e);return!sd()||!n.visualViewport?mE:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function gE(e,n,o){return n===void 0&&(n=!1),!o||n&&o!==_n(e)?!1:n}function Ao(e,n,o,s){n===void 0&&(n=!1),o===void 0&&(o=!1);const a=e.getBoundingClientRect(),l=ad(e);let f=ur(1);n&&(s?Yn(s)&&(f=gs(s)):f=gs(e));const d=gE(l,o,s)?Kg(l):ur(0);let h=(a.left+d.x)/f.x,v=(a.top+d.y)/f.y,w=a.width/f.x,m=a.height/f.y;if(l){const b=_n(l),E=s&&Yn(s)?_n(s):s;let j=b,x=id(j);for(;x&&s&&E!==j;){const S=gs(x),C=x.getBoundingClientRect(),N=Kn(x),_=C.left+(x.clientLeft+parseFloat(N.paddingLeft))*S.x,R=C.top+(x.clientTop+parseFloat(N.paddingTop))*S.y;h*=S.x,v*=S.y,w*=S.x,m*=S.y,h+=_,v+=R,j=_n(x),x=id(j)}}return il({width:w,height:m,x:h,y:v})}function ul(e,n){const o=cl(e).scrollLeft;return n?n.left+o:Ao(fr(e)).left+o}function Xg(e,n){const o=e.getBoundingClientRect(),s=o.left+n.scrollLeft-ul(e,o),a=o.top+n.scrollTop;return{x:s,y:a}}function vE(e){let{elements:n,rect:o,offsetParent:s,strategy:a}=e;const l=a==="fixed",f=fr(s),d=n?ll(n.floating):!1;if(s===f||d&&l)return o;let h={scrollLeft:0,scrollTop:0},v=ur(1);const w=ur(0),m=pr(s);if((m||!m&&!l)&&((hs(s)!=="body"||hi(f))&&(h=cl(s)),pr(s))){const E=Ao(s);v=gs(s),w.x=E.x+s.clientLeft,w.y=E.y+s.clientTop}const b=f&&!m&&!l?Xg(f,h):ur(0);return{width:o.width*v.x,height:o.height*v.y,x:o.x*v.x-h.scrollLeft*v.x+w.x+b.x,y:o.y*v.y-h.scrollTop*v.y+w.y+b.y}}function yE(e){return Array.from(e.getClientRects())}function wE(e){const n=fr(e),o=cl(e),s=e.ownerDocument.body,a=Cn(n.scrollWidth,n.clientWidth,s.scrollWidth,s.clientWidth),l=Cn(n.scrollHeight,n.clientHeight,s.scrollHeight,s.clientHeight);let f=-o.scrollLeft+ul(e);const d=-o.scrollTop;return Kn(s).direction==="rtl"&&(f+=Cn(n.clientWidth,s.clientWidth)-a),{width:a,height:l,x:f,y:d}}const Gg=25;function xE(e,n){const o=_n(e),s=fr(e),a=o.visualViewport;let l=s.clientWidth,f=s.clientHeight,d=0,h=0;if(a){l=a.width,f=a.height;const w=sd();(!w||w&&n==="fixed")&&(d=a.offsetLeft,h=a.offsetTop)}const v=ul(s);if(v<=0){const w=s.ownerDocument,m=w.body,b=getComputedStyle(m),E=w.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,j=Math.abs(s.clientWidth-m.clientWidth-E);j<=Gg&&(l-=j)}else v<=Gg&&(l+=v);return{width:l,height:f,x:d,y:h}}const bE=new Set(["absolute","fixed"]);function SE(e,n){const o=Ao(e,!0,n==="fixed"),s=o.top+e.clientTop,a=o.left+e.clientLeft,l=pr(e)?gs(e):ur(1),f=e.clientWidth*l.x,d=e.clientHeight*l.y,h=a*l.x,v=s*l.y;return{width:f,height:d,x:h,y:v}}function qg(e,n,o){let s;if(n==="viewport")s=xE(e,o);else if(n==="document")s=wE(fr(e));else if(Yn(n))s=SE(n,o);else{const a=Kg(e);s={x:n.x-a.x,y:n.y-a.y,width:n.width,height:n.height}}return il(s)}function Qg(e,n){const o=Qr(e);return o===n||!Yn(o)||ms(o)?!1:Kn(o).position==="fixed"||Qg(o,n)}function CE(e,n){const o=n.get(e);if(o)return o;let s=mi(e,[],!1).filter(d=>Yn(d)&&hs(d)!=="body"),a=null;const l=Kn(e).position==="fixed";let f=l?Qr(e):e;for(;Yn(f)&&!ms(f);){const d=Kn(f),h=od(f);!h&&d.position==="fixed"&&(a=null),(l?!h&&!a:!h&&d.position==="static"&&!!a&&bE.has(a.position)||hi(f)&&!h&&Qg(e,f))?s=s.filter(w=>w!==f):a=d,f=Qr(f)}return n.set(e,s),s}function _E(e){let{element:n,boundary:o,rootBoundary:s,strategy:a}=e;const f=[...o==="clippingAncestors"?ll(n)?[]:CE(n,this._c):[].concat(o),s],d=f[0],h=f.reduce((v,w)=>{const m=qg(n,w,a);return v.top=Cn(m.top,v.top),v.right=qr(m.right,v.right),v.bottom=qr(m.bottom,v.bottom),v.left=Cn(m.left,v.left),v},qg(n,d,a));return{width:h.right-h.left,height:h.bottom-h.top,x:h.left,y:h.top}}function EE(e){const{width:n,height:o}=Yg(e);return{width:n,height:o}}function NE(e,n,o){const s=pr(n),a=fr(n),l=o==="fixed",f=Ao(e,!0,l,n);let d={scrollLeft:0,scrollTop:0};const h=ur(0);function v(){h.x=ul(a)}if(s||!s&&!l)if((hs(n)!=="body"||hi(a))&&(d=cl(n)),s){const E=Ao(n,!0,l,n);h.x=E.x+n.clientLeft,h.y=E.y+n.clientTop}else a&&v();l&&!s&&a&&v();const w=a&&!s&&!l?Xg(a,d):ur(0),m=f.left+d.scrollLeft-h.x-w.x,b=f.top+d.scrollTop-h.y-w.y;return{x:m,y:b,width:f.width,height:f.height}}function ld(e){return Kn(e).position==="static"}function Jg(e,n){if(!pr(e)||Kn(e).position==="fixed")return null;if(n)return n(e);let o=e.offsetParent;return fr(e)===o&&(o=o.ownerDocument.body),o}function Zg(e,n){const o=_n(e);if(ll(e))return o;if(!pr(e)){let a=Qr(e);for(;a&&!ms(a);){if(Yn(a)&&!ld(a))return a;a=Qr(a)}return o}let s=Jg(e,n);for(;s&&lE(s)&&ld(s);)s=Jg(s,n);return s&&ms(s)&&ld(s)&&!od(s)?o:s||pE(e)||o}const kE=async function(e){const n=this.getOffsetParent||Zg,o=this.getDimensions,s=await o(e.floating);return{reference:NE(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function jE(e){return Kn(e).direction==="rtl"}const RE={convertOffsetParentRelativeRectToViewportRelativeRect:vE,getDocumentElement:fr,getClippingRect:_E,getOffsetParent:Zg,getElementRects:kE,getClientRects:yE,getDimensions:EE,getScale:gs,isElement:Yn,isRTL:jE};function ev(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}function TE(e,n){let o=null,s;const a=fr(e);function l(){var d;clearTimeout(s),(d=o)==null||d.disconnect(),o=null}function f(d,h){d===void 0&&(d=!1),h===void 0&&(h=1),l();const v=e.getBoundingClientRect(),{left:w,top:m,width:b,height:E}=v;if(d||n(),!b||!E)return;const j=ol(m),x=ol(a.clientWidth-(w+b)),S=ol(a.clientHeight-(m+E)),C=ol(w),_={rootMargin:-j+"px "+-x+"px "+-S+"px "+-C+"px",threshold:Cn(0,qr(1,h))||1};let R=!0;function P(A){const D=A[0].intersectionRatio;if(D!==h){if(!R)return f();D?f(!1,D):s=setTimeout(()=>{f(!1,1e-7)},1e3)}D===1&&!ev(v,e.getBoundingClientRect())&&f(),R=!1}try{o=new IntersectionObserver(P,{..._,root:a.ownerDocument})}catch{o=new IntersectionObserver(P,_)}o.observe(e)}return f(!0),l}function PE(e,n,o,s){s===void 0&&(s={});const{ancestorScroll:a=!0,ancestorResize:l=!0,elementResize:f=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:h=!1}=s,v=ad(e),w=a||l?[...v?mi(v):[],...mi(n)]:[];w.forEach(C=>{a&&C.addEventListener("scroll",o,{passive:!0}),l&&C.addEventListener("resize",o)});const m=v&&d?TE(v,o):null;let b=-1,E=null;f&&(E=new ResizeObserver(C=>{let[N]=C;N&&N.target===v&&E&&(E.unobserve(n),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var _;(_=E)==null||_.observe(n)})),o()}),v&&!h&&E.observe(v),E.observe(n));let j,x=h?Ao(e):null;h&&S();function S(){const C=Ao(e);x&&!ev(x,C)&&o(),x=C,j=requestAnimationFrame(S)}return o(),()=>{var C;w.forEach(N=>{a&&N.removeEventListener("scroll",o),l&&N.removeEventListener("resize",o)}),m==null||m(),(C=E)==null||C.disconnect(),E=null,h&&cancelAnimationFrame(j)}}const DE=nE,AE=rE,OE=Z2,ME=sE,IE=eE,tv=J2,LE=oE,FE=(e,n,o)=>{const s=new Map,a={platform:RE,...o},l={...a.platform,_c:s};return Q2(e,n,{...a,platform:l})};var zE=typeof document<"u",$E=function(){},dl=zE?g.useLayoutEffect:$E;function fl(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(typeof e=="function"&&e.toString()===n.toString())return!0;let o,s,a;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(o=e.length,o!==n.length)return!1;for(s=o;s--!==0;)if(!fl(e[s],n[s]))return!1;return!0}if(a=Object.keys(e),o=a.length,o!==Object.keys(n).length)return!1;for(s=o;s--!==0;)if(!{}.hasOwnProperty.call(n,a[s]))return!1;for(s=o;s--!==0;){const l=a[s];if(!(l==="_owner"&&e.$$typeof)&&!fl(e[l],n[l]))return!1}return!0}return e!==e&&n!==n}function nv(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function rv(e,n){const o=nv(e);return Math.round(n*o)/o}function cd(e){const n=g.useRef(e);return dl(()=>{n.current=e}),n}function BE(e){e===void 0&&(e={});const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:a,elements:{reference:l,floating:f}={},transform:d=!0,whileElementsMounted:h,open:v}=e,[w,m]=g.useState({x:0,y:0,strategy:o,placement:n,middlewareData:{},isPositioned:!1}),[b,E]=g.useState(s);fl(b,s)||E(s);const[j,x]=g.useState(null),[S,C]=g.useState(null),N=g.useCallback(B=>{B!==A.current&&(A.current=B,x(B))},[]),_=g.useCallback(B=>{B!==D.current&&(D.current=B,C(B))},[]),R=l||j,P=f||S,A=g.useRef(null),D=g.useRef(null),F=g.useRef(w),V=h!=null,Y=cd(h),H=cd(a),te=cd(v),X=g.useCallback(()=>{if(!A.current||!D.current)return;const B={placement:n,strategy:o,middleware:b};H.current&&(B.platform=H.current),FE(A.current,D.current,B).then(Z=>{const ne={...Z,isPositioned:te.current!==!1};q.current&&!fl(F.current,ne)&&(F.current=ne,Hn.flushSync(()=>{m(ne)}))})},[b,n,o,H,te]);dl(()=>{v===!1&&F.current.isPositioned&&(F.current.isPositioned=!1,m(B=>({...B,isPositioned:!1})))},[v]);const q=g.useRef(!1);dl(()=>(q.current=!0,()=>{q.current=!1}),[]),dl(()=>{if(R&&(A.current=R),P&&(D.current=P),R&&P){if(Y.current)return Y.current(R,P,X);X()}},[R,P,X,Y,V]);const ce=g.useMemo(()=>({reference:A,floating:D,setReference:N,setFloating:_}),[N,_]),ee=g.useMemo(()=>({reference:R,floating:P}),[R,P]),Q=g.useMemo(()=>{const B={position:o,left:0,top:0};if(!ee.floating)return B;const Z=rv(ee.floating,w.x),ne=rv(ee.floating,w.y);return d?{...B,transform:"translate("+Z+"px, "+ne+"px)",...nv(ee.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:Z,top:ne}},[o,d,ee.floating,w.x,w.y]);return g.useMemo(()=>({...w,update:X,refs:ce,elements:ee,floatingStyles:Q}),[w,X,ce,ee,Q])}const UE=e=>{function n(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){const{element:s,padding:a}=typeof e=="function"?e(o):e;return s&&n(s)?s.current!=null?tv({element:s.current,padding:a}).fn(o):{}:s?tv({element:s,padding:a}).fn(o):{}}}},HE=(e,n)=>({...DE(e),options:[e,n]}),VE=(e,n)=>({...AE(e),options:[e,n]}),WE=(e,n)=>({...LE(e),options:[e,n]}),YE=(e,n)=>({...OE(e),options:[e,n]}),KE=(e,n)=>({...ME(e),options:[e,n]}),XE=(e,n)=>({...IE(e),options:[e,n]}),GE=(e,n)=>({...UE(e),options:[e,n]});var qE="Arrow",ov=g.forwardRef((e,n)=>{const{children:o,width:s=10,height:a=5,...l}=e;return c.jsx(Te.svg,{...l,ref:n,width:s,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?o:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});ov.displayName=qE;var QE=ov;function ud(e){const[n,o]=g.useState(void 0);return jt(()=>{if(e){o({width:e.offsetWidth,height:e.offsetHeight});const s=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const l=a[0];let f,d;if("borderBoxSize"in l){const h=l.borderBoxSize,v=Array.isArray(h)?h[0]:h;f=v.inlineSize,d=v.blockSize}else f=e.offsetWidth,d=e.offsetHeight;o({width:f,height:d})});return s.observe(e,{box:"border-box"}),()=>s.unobserve(e)}else o(void 0)},[e]),n}var dd="Popper",[sv,pl]=Vn(dd),[JE,iv]=sv(dd),av=e=>{const{__scopePopper:n,children:o}=e,[s,a]=g.useState(null);return c.jsx(JE,{scope:n,anchor:s,onAnchorChange:a,children:o})};av.displayName=dd;var lv="PopperAnchor",cv=g.forwardRef((e,n)=>{const{__scopePopper:o,virtualRef:s,...a}=e,l=iv(lv,o),f=g.useRef(null),d=Ie(n,f),h=g.useRef(null);return g.useEffect(()=>{const v=h.current;h.current=(s==null?void 0:s.current)||f.current,v!==h.current&&l.onAnchorChange(h.current)}),s?null:c.jsx(Te.div,{...a,ref:d})});cv.displayName=lv;var fd="PopperContent",[ZE,eN]=sv(fd),uv=g.forwardRef((e,n)=>{var le,ie,we,pe,Ne,ue;const{__scopePopper:o,side:s="bottom",sideOffset:a=0,align:l="center",alignOffset:f=0,arrowPadding:d=0,avoidCollisions:h=!0,collisionBoundary:v=[],collisionPadding:w=0,sticky:m="partial",hideWhenDetached:b=!1,updatePositionStrategy:E="optimized",onPlaced:j,...x}=e,S=iv(fd,o),[C,N]=g.useState(null),_=Ie(n,Me=>N(Me)),[R,P]=g.useState(null),A=ud(R),D=(A==null?void 0:A.width)??0,F=(A==null?void 0:A.height)??0,V=s+(l!=="center"?"-"+l:""),Y=typeof w=="number"?w:{top:0,right:0,bottom:0,left:0,...w},H=Array.isArray(v)?v:[v],te=H.length>0,X={padding:Y,boundary:H.filter(nN),altBoundary:te},{refs:q,floatingStyles:ce,placement:ee,isPositioned:Q,middlewareData:B}=BE({strategy:"fixed",placement:V,whileElementsMounted:(...Me)=>PE(...Me,{animationFrame:E==="always"}),elements:{reference:S.anchor},middleware:[HE({mainAxis:a+F,alignmentAxis:f}),h&&VE({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?WE():void 0,...X}),h&&YE({...X}),KE({...X,apply:({elements:Me,rects:he,availableWidth:et,availableHeight:Ct})=>{const{width:wt,height:On}=he.reference,ct=Me.floating.style;ct.setProperty("--radix-popper-available-width",`${et}px`),ct.setProperty("--radix-popper-available-height",`${Ct}px`),ct.setProperty("--radix-popper-anchor-width",`${wt}px`),ct.setProperty("--radix-popper-anchor-height",`${On}px`)}}),R&&GE({element:R,padding:d}),rN({arrowWidth:D,arrowHeight:F}),b&&XE({strategy:"referenceHidden",...X})]}),[Z,ne]=pv(ee),M=Mt(j);jt(()=>{Q&&(M==null||M())},[Q,M]);const K=(le=B.arrow)==null?void 0:le.x,re=(ie=B.arrow)==null?void 0:ie.y,G=((we=B.arrow)==null?void 0:we.centerOffset)!==0,[fe,me]=g.useState();return jt(()=>{C&&me(window.getComputedStyle(C).zIndex)},[C]),c.jsx("div",{ref:q.setFloating,"data-radix-popper-content-wrapper":"",style:{...ce,transform:Q?ce.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:fe,"--radix-popper-transform-origin":[(pe=B.transformOrigin)==null?void 0:pe.x,(Ne=B.transformOrigin)==null?void 0:Ne.y].join(" "),...((ue=B.hide)==null?void 0:ue.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(ZE,{scope:o,placedSide:Z,onArrowChange:P,arrowX:K,arrowY:re,shouldHideArrow:G,children:c.jsx(Te.div,{"data-side":Z,"data-align":ne,...x,ref:_,style:{...x.style,animation:Q?void 0:"none"}})})})});uv.displayName=fd;var dv="PopperArrow",tN={top:"bottom",right:"left",bottom:"top",left:"right"},fv=g.forwardRef(function(n,o){const{__scopePopper:s,...a}=n,l=eN(dv,s),f=tN[l.placedSide];return c.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[f]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:c.jsx(QE,{...a,ref:o,style:{...a.style,display:"block"}})})});fv.displayName=dv;function nN(e){return e!==null}var rN=e=>({name:"transformOrigin",options:e,fn(n){var S,C,N;const{placement:o,rects:s,middlewareData:a}=n,f=((S=a.arrow)==null?void 0:S.centerOffset)!==0,d=f?0:e.arrowWidth,h=f?0:e.arrowHeight,[v,w]=pv(o),m={start:"0%",center:"50%",end:"100%"}[w],b=(((C=a.arrow)==null?void 0:C.x)??0)+d/2,E=(((N=a.arrow)==null?void 0:N.y)??0)+h/2;let j="",x="";return v==="bottom"?(j=f?m:`${b}px`,x=`${-h}px`):v==="top"?(j=f?m:`${b}px`,x=`${s.floating.height+h}px`):v==="right"?(j=`${-h}px`,x=f?m:`${E}px`):v==="left"&&(j=`${s.floating.width+h}px`,x=f?m:`${E}px`),{data:{x:j,y:x}}}});function pv(e){const[n,o="center"]=e.split("-");return[n,o]}var hv=av,pd=cv,mv=uv,gv=fv,hl="Popover",[vv]=Vn(hl,[pl]),gi=pl(),[oN,Jr]=vv(hl),yv=e=>{const{__scopePopover:n,children:o,open:s,defaultOpen:a,onOpenChange:l,modal:f=!1}=e,d=gi(n),h=g.useRef(null),[v,w]=g.useState(!1),[m,b]=Wr({prop:s,defaultProp:a??!1,onChange:l,caller:hl});return c.jsx(hv,{...d,children:c.jsx(oN,{scope:n,contentId:Xr(),triggerRef:h,open:m,onOpenChange:b,onOpenToggle:g.useCallback(()=>b(E=>!E),[b]),hasCustomAnchor:v,onCustomAnchorAdd:g.useCallback(()=>w(!0),[]),onCustomAnchorRemove:g.useCallback(()=>w(!1),[]),modal:f,children:o})})};yv.displayName=hl;var wv="PopoverAnchor",sN=g.forwardRef((e,n)=>{const{__scopePopover:o,...s}=e,a=Jr(wv,o),l=gi(o),{onCustomAnchorAdd:f,onCustomAnchorRemove:d}=a;return g.useEffect(()=>(f(),()=>d()),[f,d]),c.jsx(pd,{...l,...s,ref:n})});sN.displayName=wv;var xv="PopoverTrigger",bv=g.forwardRef((e,n)=>{const{__scopePopover:o,...s}=e,a=Jr(xv,o),l=gi(o),f=Ie(n,a.triggerRef),d=c.jsx(Te.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Nv(a.open),...s,ref:f,onClick:Ee(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?d:c.jsx(pd,{asChild:!0,...l,children:d})});bv.displayName=xv;var hd="PopoverPortal",[iN,aN]=vv(hd,{forceMount:void 0}),Sv=e=>{const{__scopePopover:n,forceMount:o,children:s,container:a}=e,l=Jr(hd,n);return c.jsx(iN,{scope:n,forceMount:o,children:c.jsx(Rn,{present:o||l.open,children:c.jsx(li,{asChild:!0,container:a,children:s})})})};Sv.displayName=hd;var vs="PopoverContent",Cv=g.forwardRef((e,n)=>{const o=aN(vs,e.__scopePopover),{forceMount:s=o.forceMount,...a}=e,l=Jr(vs,e.__scopePopover);return c.jsx(Rn,{present:s||l.open,children:l.modal?c.jsx(cN,{...a,ref:n}):c.jsx(uN,{...a,ref:n})})});Cv.displayName=vs;var lN=ss("PopoverContent.RemoveScroll"),cN=g.forwardRef((e,n)=>{const o=Jr(vs,e.__scopePopover),s=g.useRef(null),a=Ie(n,s),l=g.useRef(!1);return g.useEffect(()=>{const f=s.current;if(f)return Wu(f)},[]),c.jsx($a,{as:lN,allowPinchZoom:!0,children:c.jsx(_v,{...e,ref:a,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ee(e.onCloseAutoFocus,f=>{var d;f.preventDefault(),l.current||(d=o.triggerRef.current)==null||d.focus()}),onPointerDownOutside:Ee(e.onPointerDownOutside,f=>{const d=f.detail.originalEvent,h=d.button===0&&d.ctrlKey===!0,v=d.button===2||h;l.current=v},{checkForDefaultPrevented:!1}),onFocusOutside:Ee(e.onFocusOutside,f=>f.preventDefault(),{checkForDefaultPrevented:!1})})})}),uN=g.forwardRef((e,n)=>{const o=Jr(vs,e.__scopePopover),s=g.useRef(!1),a=g.useRef(!1);return c.jsx(_v,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{var f,d;(f=e.onCloseAutoFocus)==null||f.call(e,l),l.defaultPrevented||(s.current||(d=o.triggerRef.current)==null||d.focus(),l.preventDefault()),s.current=!1,a.current=!1},onInteractOutside:l=>{var h,v;(h=e.onInteractOutside)==null||h.call(e,l),l.defaultPrevented||(s.current=!0,l.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const f=l.target;((v=o.triggerRef.current)==null?void 0:v.contains(f))&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&a.current&&l.preventDefault()}})}),_v=g.forwardRef((e,n)=>{const{__scopePopover:o,trapFocus:s,onOpenAutoFocus:a,onCloseAutoFocus:l,disableOutsidePointerEvents:f,onEscapeKeyDown:d,onPointerDownOutside:h,onFocusOutside:v,onInteractOutside:w,...m}=e,b=Jr(vs,o),E=gi(o);return zu(),c.jsx(Oa,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:a,onUnmountAutoFocus:l,children:c.jsx(ai,{asChild:!0,disableOutsidePointerEvents:f,onInteractOutside:w,onEscapeKeyDown:d,onPointerDownOutside:h,onFocusOutside:v,onDismiss:()=>b.onOpenChange(!1),children:c.jsx(mv,{"data-state":Nv(b.open),role:"dialog",id:b.contentId,...E,...m,ref:n,style:{...m.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Ev="PopoverClose",dN=g.forwardRef((e,n)=>{const{__scopePopover:o,...s}=e,a=Jr(Ev,o);return c.jsx(Te.button,{type:"button",...s,ref:n,onClick:Ee(e.onClick,()=>a.onOpenChange(!1))})});dN.displayName=Ev;var fN="PopoverArrow",pN=g.forwardRef((e,n)=>{const{__scopePopover:o,...s}=e,a=gi(o);return c.jsx(gv,{...a,...s,ref:n})});pN.displayName=fN;function Nv(e){return e?"open":"closed"}var hN=yv,mN=bv,gN=Sv,kv=Cv;const jv=hN,Rv=mN,md=g.forwardRef(({className:e,align:n="center",sideOffset:o=4,...s},a)=>c.jsx(gN,{children:c.jsx(kv,{ref:a,align:n,sideOffset:o,className:ke("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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 origin-[--radix-popover-content-transform-origin]",e),...s})}));md.displayName=kv.displayName;const Tv=e=>{let n;const o=new Set,s=(v,w)=>{const m=typeof v=="function"?v(n):v;if(!Object.is(m,n)){const b=n;n=w??(typeof m!="object"||m===null)?m:Object.assign({},n,m),o.forEach(E=>E(n,b))}},a=()=>n,d={setState:s,getState:a,getInitialState:()=>h,subscribe:v=>(o.add(v),()=>o.delete(v))},h=n=e(s,a,d);return d},vN=(e=>e?Tv(e):Tv),yN=e=>e;function wN(e,n=yN){const o=z.useSyncExternalStore(e.subscribe,z.useCallback(()=>n(e.getState()),[e,n]),z.useCallback(()=>n(e.getInitialState()),[e,n]));return z.useDebugValue(o),o}const xN=e=>{const n=vN(e),o=s=>wN(n,s);return Object.assign(o,n),o},Pv=(e=>xN),Dv={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},vi=new Map,ml=e=>{const n=vi.get(e);return n?Object.fromEntries(Object.entries(n.stores).map(([o,s])=>[o,s.getState()])):{}},bN=(e,n,o)=>{if(e===void 0)return{type:"untracked",connection:n.connect(o)};const s=vi.get(o.name);if(s)return{type:"tracked",store:e,...s};const a={connection:n.connect(o),stores:{}};return vi.set(o.name,a),{type:"tracked",store:e,...a}},SN=(e,n)=>{if(n===void 0)return;const o=vi.get(e);o&&(delete o.stores[n],Object.keys(o.stores).length===0&&vi.delete(e))},CN=e=>{var n,o;if(!e)return;const s=e.split(` 269 `),a=s.findIndex(f=>f.includes("api.setState"));if(a<0)return;const l=((n=s[a+1])==null?void 0:n.trim())||"";return(o=/.+ (.+) .+/.exec(l))==null?void 0:o[1]},Av=(e,n={})=>(o,s,a)=>{const{enabled:l,anonymousActionType:f,store:d,...h}=n;let v;try{v=(l??(Dv?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!v)return e(o,s,a);const{connection:w,...m}=bN(d,v,h);let b=!0;a.setState=((x,S,C)=>{const N=o(x,S);if(!b)return N;const _=C===void 0?{type:f||CN(new Error().stack)||"anonymous"}:typeof C=="string"?{type:C}:C;return d===void 0?(w==null||w.send(_,s()),N):(w==null||w.send({..._,type:`${d}/${_.type}`},{...ml(h.name),[d]:a.getState()}),N)}),a.devtools={cleanup:()=>{w&&typeof w.unsubscribe=="function"&&w.unsubscribe(),SN(h.name,d)}};const E=(...x)=>{const S=b;b=!1,o(...x),b=S},j=e(a.setState,s,a);if(m.type==="untracked"?w==null||w.init(j):(m.stores[m.store]=a,w==null||w.init(Object.fromEntries(Object.entries(m.stores).map(([x,S])=>[x,x===m.store?j:S.getState()])))),a.dispatchFromDevtools&&typeof a.dispatch=="function"){let x=!1;const S=a.dispatch;a.dispatch=(...C)=>{(Dv?"production":void 0)!=="production"&&C[0].type==="__setState"&&!x&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),x=!0),S(...C)}}return w.subscribe(x=>{var S;switch(x.type){case"ACTION":if(typeof x.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return gd(x.payload,C=>{if(C.type==="__setState"){if(d===void 0){E(C.state);return}Object.keys(C.state).length!==1&&console.error(` 268 270 [zustand devtools middleware] Unsupported __setState action format. 269 271 When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(), 270 272 and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } } 271 `);const j=C.state[d];if(j==null)return;JSON.stringify(a.getState())!==JSON.stringify(j)&&E(j);return}a.dispatchFromDevtools&&typeof a.dispatch=="function"&&a.dispatch(C)});case"DISPATCH":switch(w.payload.type){case"RESET":return E(T),d===void 0?x==null?void 0:x.init(a.getState()):x==null?void 0:x.init(_l(h.name));case"COMMIT":if(d===void 0){x==null||x.init(a.getState());return}return x==null?void 0:x.init(_l(h.name));case"ROLLBACK":return Qd(w.state,C=>{if(d===void 0){E(C),x==null||x.init(a.getState());return}E(C[d]),x==null||x.init(_l(h.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Qd(w.state,C=>{if(d===void 0){E(C);return}JSON.stringify(a.getState())!==JSON.stringify(C[d])&&E(C[d])});case"IMPORT_STATE":{const{nextLiftedState:C}=w.payload,j=(S=C.computedStates.slice(-1)[0])==null?void 0:S.state;if(!j)return;E(d===void 0?j:j[d]),x==null||x.send(null,C);return}case"PAUSE_RECORDING":return b=!b}return}}),T},F0=g2,Qd=(e,n)=>{let o;try{o=JSON.parse(e)}catch(s){console.error("[zustand devtools middleware] Could not parse the received json",s)}o!==void 0&&n(o)};function v2(e,n){let o;try{o=e()}catch{return}return{getItem:a=>{var l;const f=h=>h===null?null:JSON.parse(h,void 0),d=(l=o.getItem(a))!=null?l:null;return d instanceof Promise?d.then(f):f(d)},setItem:(a,l)=>o.setItem(a,JSON.stringify(l,void 0)),removeItem:a=>o.removeItem(a)}}const _f=e=>n=>{try{const o=e(n);return o instanceof Promise?o:{then(s){return _f(s)(o)},catch(s){return this}}}catch(o){return{then(s){return this},catch(s){return _f(s)(o)}}}},y2=(e,n)=>(o,s,a)=>{let l={storage:v2(()=>localStorage),partialize:w=>w,version:0,merge:(w,S)=>({...S,...w}),...n},f=!1;const d=new Set,h=new Set;let v=l.storage;if(!v)return e((...w)=>{console.warn(`[zustand persist middleware] Unable to update item '${l.name}', the given storage is currently unavailable.`),o(...w)},s,a);const x=()=>{const w=l.partialize({...s()});return v.setItem(l.name,{state:w,version:l.version})},m=a.setState;a.setState=(w,S)=>(m(w,S),x());const b=e((...w)=>(o(...w),x()),s,a);a.getInitialState=()=>b;let E;const T=()=>{var w,S;if(!v)return;f=!1,d.forEach(j=>{var N;return j((N=s())!=null?N:b)});const C=((S=l.onRehydrateStorage)==null?void 0:S.call(l,(w=s())!=null?w:b))||void 0;return _f(v.getItem.bind(v))(l.name).then(j=>{if(j)if(typeof j.version=="number"&&j.version!==l.version){if(l.migrate){const N=l.migrate(j.state,j.version);return N instanceof Promise?N.then(k=>[!0,k]):[!0,N]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,j.state];return[!1,void 0]}).then(j=>{var N;const[k,P]=j;if(E=l.merge(P,(N=s())!=null?N:b),o(E,!0),k)return x()}).then(()=>{C==null||C(E,void 0),E=s(),f=!0,h.forEach(j=>j(E))}).catch(j=>{C==null||C(void 0,j)})};return a.persist={setOptions:w=>{l={...l,...w},w.storage&&(v=w.storage)},clearStorage:()=>{v==null||v.removeItem(l.name)},getOptions:()=>l,rehydrate:()=>T(),hasHydrated:()=>f,onHydrate:w=>(d.add(w),()=>{d.delete(w)}),onFinishHydration:w=>(h.add(w),()=>{h.delete(w)})},l.skipHydration||T(),E||b},x2=y2,w2=()=>{var e,n;return{apiUrl:((e=window.cofldAdmin)==null?void 0:e.restUrl)||"/wp-json/codeideal-open-fields/v1",nonce:((n=window.cofldAdmin)==null?void 0:n.nonce)||""}};function Jd(e){const n={placeholder:e.placeholder,default_value:e.default_value,instructions:e.instructions,required:e.required};return e.conditional_logic&&(n.conditional_logic=e.conditional_logic),e.wrapper_config&&(n.wrapper=e.wrapper_config),e.field_config&&Object.assign(n,e.field_config),{...e,parent_id:e.parent_id&&e.parent_id!=="0"&&e.parent_id!==0?e.parent_id:null,settings:n}}function Iv(e){const n={...e};if("parent_id"in e&&(n.parent_id=e.parent_id||null),e.settings){const{settings:o}=e;"placeholder"in o&&(n.placeholder=o.placeholder??""),"default_value"in o&&(n.default_value=o.default_value??""),"instructions"in o&&(n.instructions=o.instructions??""),"required"in o&&(n.required=o.required),"wrapper"in o&&(n.wrapper_config=o.wrapper||{}),"conditional_logic"in o&&(n.conditional_logic=o.conditional_logic||[]);const s={},a=["placeholder","default_value","instructions","required","wrapper","conditional_logic"];for(const[l,f]of Object.entries(o))a.includes(l)||(s[l]=f);n.field_config=s,delete n.settings}return n}async function on(e,n={}){const{apiUrl:o,nonce:s}=w2(),a=`${o}${e}`,f=await fetch(a,{...n,headers:{...{"Content-Type":"application/json","X-WP-Nonce":s},...n.headers}});if(!f.ok){const d=await f.json().catch(()=>({message:"An error occurred"}));throw new Error(d.message||`HTTP ${f.status}`)}return f.json()}const Mn={async getAll(){return on("/fieldsets")},async get(e){return on(`/fieldsets/${e}`)},async create(e){return on("/fieldsets",{method:"POST",body:JSON.stringify(e)})},async update(e,n){return on(`/fieldsets/${e}`,{method:"PUT",body:JSON.stringify(n)})},async delete(e){return on(`/fieldsets/${e}`,{method:"DELETE"})},async duplicate(e){return on(`/fieldsets/${e}/duplicate`,{method:"POST"})},async export(e){return on(`/fieldsets/${e}/export`)},async import(e){return on("/fieldsets/import",{method:"POST",body:JSON.stringify(e)})}},Bo={async getByFieldset(e){return(await on(`/fieldsets/${e}/fields`)).map(Jd)},async create(e,n){const o=Iv(n),s=await on(`/fieldsets/${e}/fields`,{method:"POST",body:JSON.stringify(o)});return Jd(s)},async update(e,n){const o=Iv(n),s=await on(`/fields/${e}`,{method:"PUT",body:JSON.stringify(o)});return Jd(s)},async delete(e){return on(`/fields/${e}`,{method:"DELETE"})},async bulkUpdate(e,n){return on(`/fieldsets/${e}/fields/bulk`,{method:"PUT",body:JSON.stringify({fields:n})})}},Lv={async get(){return on("/settings")},async update(e){return on("/settings",{method:"PUT",body:JSON.stringify(e)})}};class b2{constructor(){_d(this,"fields",new Map);_d(this,"listeners",new Set)}register(n){const o=this.fields.get(n.type);o?this.fields.set(n.type,{...o,...n}):this.fields.set(n.type,n),this.notifyListeners()}registerMany(n){n.forEach(o=>this.register(o))}get(n){return this.fields.get(n)}getAll(){return Array.from(this.fields.values())}getByCategory(n){return this.getAll().filter(o=>o.category===n)}getGroupedByCategory(){const n={basic:[],content:[],choice:[],relational:[],layout:[]};return this.getAll().forEach(o=>{n[o.category].push(o)}),n}getMetadata(){return this.getAll().map(({type:n,label:o,icon:s,category:a,description:l,hasSubFields:f})=>({type:n,label:o,icon:s,category:a,description:l,hasSubFields:f}))}has(n){return this.fields.has(n)}getSettingsComponent(n){var o;return(o=this.get(n))==null?void 0:o.SettingsComponent}getDefaultSettings(n){var o;return((o=this.get(n))==null?void 0:o.defaultSettings)??{}}validate(n){const o=this.get(n.type);return o!=null&&o.validate?o.validate(n):null}subscribe(n){return this.listeners.add(n),()=>this.listeners.delete(n)}notifyListeners(){this.listeners.forEach(n=>n())}}const Je=new b2,S2=[{type:"text",label:"Text",category:"basic",icon:"Type",description:"Single line text input"},{type:"textarea",label:"Textarea",category:"basic",icon:"AlignLeft",description:"Multi-line text area"},{type:"number",label:"Number",category:"basic",icon:"Hash",description:"Numeric input with validation"},{type:"email",label:"Email",category:"basic",icon:"Mail",description:"Email input with validation"},{type:"url",label:"URL",category:"basic",icon:"Link",description:"URL input with validation"},{type:"wysiwyg",label:"WYSIWYG Editor",category:"content",icon:"FileText",description:"Rich text editor"},{type:"image",label:"Image",category:"content",icon:"Image",description:"Single image upload"},{type:"gallery",label:"Gallery",category:"content",icon:"Images",description:"Multiple image gallery"},{type:"file",label:"File",category:"content",icon:"File",description:"File upload"},{type:"select",label:"Select",category:"choice",icon:"ChevronDown",description:"Dropdown selection"},{type:"radio",label:"Radio",category:"choice",icon:"Circle",description:"Radio button group"},{type:"checkbox",label:"Checkbox",category:"choice",icon:"CheckSquare",description:"Checkbox group"},{type:"switch",label:"Switch",category:"choice",icon:"ToggleLeft",description:"True/False toggle"},{type:"date",label:"Date Picker",category:"basic",icon:"Calendar",description:"Date selection"},{type:"datetime",label:"Date Time",category:"basic",icon:"CalendarClock",description:"Date and time selection"},{type:"time",label:"Time",category:"basic",icon:"Clock",description:"Time selection"},{type:"color",label:"Color Picker",category:"basic",icon:"Palette",description:"Color selection"},{type:"link",label:"Link",category:"basic",icon:"ExternalLink",description:"URL with title and target"},{type:"post_object",label:"Post Object",category:"relational",icon:"FileText",description:"Select WordPress posts"},{type:"taxonomy",label:"Taxonomy",category:"relational",icon:"Tags",description:"Select taxonomy terms"},{type:"user",label:"User",category:"relational",icon:"User",description:"Select WordPress users"},{type:"repeater",label:"Repeater",category:"layout",icon:"Repeat",description:"Repeatable sub-fields",hasSubFields:!0},{type:"group",label:"Group",category:"layout",icon:"FolderOpen",description:"Group fields together",hasSubFields:!0}];Je.registerMany(S2);function ca(e){const n=Je.get(e.type);return(n==null?void 0:n.hasSubFields)??!1}function $i(e){return e.filter(n=>!n.parent_id).sort((n,o)=>n.menu_order-o.menu_order)}function Gi(e,n){return e.filter(o=>String(o.parent_id)===String(n)).sort((o,s)=>o.menu_order-s.menu_order)}function Np(e,n){const o=[],s=Gi(e,n);for(const a of s)o.push(a.id),o.push(...Np(e,a.id));return o}function C2(e,n,o){if(!o)return!0;if(String(n)===String(o)||Np(e,n).some(l=>String(l)===String(o)))return!1;const a=e.find(l=>String(l.id)===String(o));return!(!a||!ca(a))}function Zd(e,n){const o=n?Gi(e,n):$i(e);return o.length===0?0:Math.max(...o.map(s=>s.menu_order))+1}const it=L0()(F0((e,n)=>({fieldsets:[],currentFieldset:null,fields:[],isLoading:!1,error:null,unsavedChanges:!1,pendingFieldChanges:new Map,pendingFieldAdditions:[],pendingFieldDeletions:[],getRootFields:()=>$i(n().fields),getChildFields:o=>Gi(n().fields,o),setUnsavedChanges:o=>{e({unsavedChanges:o})},fetchFieldsets:async()=>{e({isLoading:!0,error:null});try{const o=await Mn.getAll();e({fieldsets:o,isLoading:!1})}catch(o){e({error:o instanceof Error?o.message:"Failed to fetch fieldsets",isLoading:!1})}},fetchFieldset:async o=>{e({isLoading:!0,error:null});try{const s=await Mn.get(o);e({currentFieldset:s,isLoading:!1}),await n().fetchFields(o)}catch(s){e({error:s instanceof Error?s.message:"Failed to fetch fieldset",isLoading:!1})}},createFieldset:async o=>{e({isLoading:!0,error:null});try{const s=await Mn.create(o);return e(a=>({fieldsets:[...a.fieldsets,s],isLoading:!1})),s}catch(s){throw e({error:s instanceof Error?s.message:"Failed to create fieldset",isLoading:!1}),s}},updateFieldset:async(o,s)=>{e({isLoading:!0,error:null});try{const a=await Mn.update(o,s);e(l=>{var f;return{fieldsets:l.fieldsets.map(d=>d.id===o?a:d),currentFieldset:((f=l.currentFieldset)==null?void 0:f.id)===o?a:l.currentFieldset,isLoading:!1}})}catch(a){throw e({error:a instanceof Error?a.message:"Failed to update fieldset",isLoading:!1}),a}},deleteFieldset:async o=>{e({isLoading:!0,error:null});try{await Mn.delete(o);const s=await Mn.getAll();e({fieldsets:s,currentFieldset:null,isLoading:!1})}catch(s){const a=s instanceof Error?s.message:"Failed to delete fieldset";throw console.error("Delete fieldset error:",a,s),e({error:a,isLoading:!1}),s}},duplicateFieldset:async o=>{e({isLoading:!0,error:null});try{const s=await Mn.duplicate(o);return e(a=>({fieldsets:[...a.fieldsets,s],isLoading:!1})),s}catch(s){throw e({error:s instanceof Error?s.message:"Failed to duplicate fieldset",isLoading:!1}),s}},setCurrentFieldset:o=>{e({currentFieldset:o})},fetchFields:async o=>{try{const s=await Bo.getByFieldset(o);e({fields:s})}catch(s){console.error("Failed to fetch fields:",s)}},addFieldLocal:(o,s)=>{const a=n(),l=Zd(a.fields,s??null),f={id:`temp-${Date.now()}-${Math.random()}`,label:o.label||"New Field",name:o.name||`field_${Date.now()}`,type:o.type||"text",settings:o.settings||{},menu_order:l,parent_id:s??null,...o};e(d=>({fields:[...d.fields,f],pendingFieldAdditions:[...d.pendingFieldAdditions,f],unsavedChanges:!0}))},updateFieldLocal:(o,s)=>{e(a=>{const l=new Map(a.pendingFieldChanges),f=String(o),d=l.get(f)||{},h={...d.settings,...s.settings};return l.set(f,{...d,...s,settings:h}),{fields:a.fields.map(x=>String(x.id)===f?{...x,...s,settings:{...x.settings,...s.settings}}:x),pendingFieldChanges:l,unsavedChanges:!0}})},deleteFieldLocal:o=>{e(s=>{const a=String(o),l=Np(s.fields,a),f=[a,...l.map(String)];return{fields:s.fields.filter(d=>!f.includes(String(d.id))),pendingFieldDeletions:[...s.pendingFieldDeletions,...f.filter(d=>!d.startsWith("temp-"))],pendingFieldAdditions:s.pendingFieldAdditions.filter(d=>!f.includes(String(d.id))),unsavedChanges:!0}})},reorderFieldsLocal:(o,s)=>{e(a=>{const l=o.map((v,x)=>({...v,menu_order:x})),f=new Set(l.map(v=>String(v.id))),d=a.fields.map(v=>f.has(String(v.id))?l.find(x=>String(x.id)===String(v.id)):v),h=new Map(a.pendingFieldChanges);return l.forEach(v=>{const x=String(v.id),m=h.get(x)||{};h.set(x,{...m,menu_order:v.menu_order})}),{fields:d,pendingFieldChanges:h,unsavedChanges:!0}})},moveFieldToParent:(o,s)=>{const a=n();if(!C2(a.fields,o,s)){console.error("Invalid move: circular reference or invalid parent");return}const l=Zd(a.fields,s);e(f=>{const d=new Map(f.pendingFieldChanges),h=d.get(o)||{};return d.set(o,{...h,parent_id:s,menu_order:l}),{fields:f.fields.map(v=>String(v.id)===o?{...v,parent_id:s,menu_order:l}:v),pendingFieldChanges:d,unsavedChanges:!0}})},copyFieldToParent:(o,s)=>{const a=n(),l=a.fields.find(m=>String(m.id)===o);if(!l)return;if(s){const m=a.fields.find(b=>String(b.id)===String(s));if(!m||!ca(m)){console.error("Invalid copy target: parent cannot have children");return}}let f=l.name,d=1,h=`${f}_copy`;for(;a.fields.some(m=>m.name===h);)d++,h=`${f}_copy_${d}`;const v=Zd(a.fields,s),x={...l,id:`temp-${Date.now()}-${Math.random()}`,name:h,label:`${l.label} (Copy)`,parent_id:s,menu_order:v};e(m=>({fields:[...m.fields,x],pendingFieldAdditions:[...m.pendingFieldAdditions,x],unsavedChanges:!0}))},saveAllChanges:async()=>{const{pendingFieldChanges:o,pendingFieldAdditions:s,pendingFieldDeletions:a,fields:l,currentFieldset:f}=n();if(!f)throw new Error("No fieldset selected");try{const d=[];for(const T of a)T.startsWith("temp-")||d.push(Bo.delete(Number(T)));await Promise.all(d);const h=new Map,v=[...s].sort((T,w)=>{const S=C=>{if(!C.parent_id)return 0;const j=l.find(N=>String(N.id)===String(C.parent_id));return j?1+S(j):0};return S(T)-S(w)});for(const T of v){const w=String(T.id),S=o.get(w),C=l.find(_=>String(_.id)===w)||T;let j=null;if(C.parent_id){const _=String(C.parent_id);_.startsWith("temp-")?j=h.get(_)??null:j=Number(C.parent_id)}const k=(j?l.filter(_=>{const L=String(_.parent_id);return L===String(C.parent_id)||L.startsWith("temp-")&&h.get(L)===j}):$i(l)).findIndex(_=>String(_.id)===w),P={label:(S==null?void 0:S.label)||C.label||T.label,name:(S==null?void 0:S.name)||C.name||T.name,type:(S==null?void 0:S.type)||C.type||T.type,settings:C.settings||T.settings||{},menu_order:k>=0?k:C.menu_order,parent_id:j},D=await Bo.create(f.id,P);h.set(w,D.id),e(_=>({fields:_.fields.map(L=>String(L.id)===w?{...D,parent_id:D.parent_id??null}:L)}))}e(T=>({fields:T.fields.map(w=>{if(w.parent_id&&String(w.parent_id).startsWith("temp-")){const S=h.get(String(w.parent_id));if(S)return{...w,parent_id:S}}return w})}));const x=[];e(T=>({fields:T.fields.map(w=>{var S;if((S=w.settings)!=null&&S.conditional_logic&&Array.isArray(w.settings.conditional_logic)){let C=!1;const j=w.settings.conditional_logic.map(N=>Array.isArray(N)?N.map(k=>{if(k.field&&String(k.field).startsWith("temp-")){const P=h.get(String(k.field));if(P)return C=!0,{...k,field:String(P)}}return k}):N);if(C)return x.push(String(w.id)),{...w,settings:{...w.settings,conditional_logic:j}}}return w})}));const m=[];for(const T of x)if(!T.startsWith("temp-")){const w=n().fields.find(S=>String(S.id)===T);w&&m.push(Bo.update(Number(T),{label:w.label,name:w.name,type:w.type,settings:w.settings,menu_order:w.menu_order,parent_id:w.parent_id}))}await Promise.all(m);const b=n().fields,E=[];o.forEach((T,w)=>{if(!w.startsWith("temp-")){const S=Number(w),C=b.find(j=>String(j.id)===w);if(C){const j={...C.settings,...T.settings};let N=null;if(C.parent_id){const _=String(C.parent_id);_.startsWith("temp-")?N=h.get(_)??null:N=Number(C.parent_id)}const P=(N?Gi(b,N):$i(b)).findIndex(_=>String(_.id)===w),D={label:T.label||C.label,name:T.name||C.name,type:T.type||C.type,settings:j,menu_order:P>=0?P:C.menu_order,parent_id:N};E.push(Bo.update(S,D))}}}),await Promise.all(E),e({pendingFieldChanges:new Map,pendingFieldAdditions:[],pendingFieldDeletions:[],unsavedChanges:!1})}catch(d){throw e({error:d instanceof Error?d.message:"Failed to save fields"}),d}}}),{name:"openfields-fieldset-store"})),ua=L0()(F0(x2(e=>({sidebarOpen:!0,activePanel:"fields",notifications:[],theme:"system",toggleSidebar:()=>{e(n=>({sidebarOpen:!n.sidebarOpen}))},setActivePanel:n=>{e({activePanel:n})},addNotification:n=>{const o=crypto.randomUUID(),s={...n,id:o,duration:n.duration??5e3};e(a=>({notifications:[...a.notifications,s]})),s.duration&&s.duration>0&&setTimeout(()=>{e(a=>({notifications:a.notifications.filter(l=>l.id!==o)}))},s.duration)},removeNotification:n=>{e(o=>({notifications:o.notifications.filter(s=>s.id!==n)}))},setTheme:n=>{e({theme:n})},showToast:(n,o)=>{e(s=>({notifications:[...s.notifications,{id:crypto.randomUUID(),type:n,message:o,duration:5e3}]}))}}),{name:"openfields-ui-store",partialize:e=>({sidebarOpen:e.sidebarOpen,theme:e.theme})}),{name:"openfields-ui-store"})),ef={post_type:"Post Type",page_template:"Page Template",page_type:"Page Type",page:"Page",post:"Post",post_category:"Post Category",post_taxonomy:"Post Taxonomy",post_status:"Post Status",post_format:"Post Format",taxonomy:"Taxonomy",attachment:"Attachment",user_form:"User Form",user_role:"User Role",options_page:"Options Page",block:"Block",nav_menu:"Nav Menu",nav_menu_item:"Nav Menu Item",widget:"Widget",comment:"Comment"};function E2(){const{fieldsets:e,isLoading:n,error:o,fetchFieldsets:s,deleteFieldset:a,duplicateFieldset:l}=it(),[f,d]=g.useState(""),[h,v]=g.useState(""),[x,m]=g.useState({});g.useEffect(()=>{s()},[s]),g.useEffect(()=>{const N=async()=>{const k={};for(const P of e)try{const D=await Bo.getByFieldset(P.id);k[P.id]=D.length}catch(D){console.error(`Failed to fetch fields for fieldset ${P.id}:`,D),k[P.id]=0}m(k)};e.length>0&&N()},[e]);const b=g.useMemo(()=>{const N=new Set;return e.forEach(k=>{var P;(P=k.locations)==null||P.forEach(D=>{N.add(D.param)})}),Array.from(N).sort()},[e]),E=g.useMemo(()=>e.filter(N=>{var D;const k=!f||N.title.toLowerCase().includes(f.toLowerCase())||N.field_key.toLowerCase().includes(f.toLowerCase()),P=!h||((D=N.locations)==null?void 0:D.some(_=>_.param===h));return k&&P}),[e,f,h]),T=async N=>{try{await a(N),Uo.success("Field group deleted successfully")}catch(k){console.error("Delete error:",k),Uo.error("Failed to delete field group")}},w=async N=>{try{await l(N),Uo.success("Field group duplicated successfully")}catch(k){console.error("Duplicate error:",k),Uo.error("Failed to duplicate field group")}},S=N=>{var P;const k=((P=window.cofldAdmin)==null?void 0:P.adminUrl)||"/wp-admin/";window.location.href=`${k}admin.php?page=codeideal-open-fields&action=edit&id=${N}`},C=()=>{var k;const N=((k=window.cofldAdmin)==null?void 0:k.adminUrl)||"/wp-admin/";window.location.href=`${N}admin.php?page=codeideal-open-fields&action=new`},j=N=>{if(!N||N.length===0)return c.jsx("span",{className:"text-gray-400 italic",children:"No location rules"});const k={};N.forEach(D=>{const _=D.group_id||0;k[_]||(k[_]=[]),k[_].push(D)});const P=Object.values(k);return c.jsxs("div",{className:"flex flex-wrap gap-1",children:[P.slice(0,2).map((D,_)=>c.jsxs("span",{className:"inline-flex items-center gap-1",children:[_>0&&c.jsx("span",{className:"text-gray-400 text-xs mx-1",children:"or"}),D.slice(0,2).map((L,H)=>c.jsxs(Fi,{variant:"secondary",className:"text-xs font-normal",children:[ef[L.param]||L.param,":"," ",L.operator==="=="?"":"≠ ",L.value]},H)),D.length>2&&c.jsxs("span",{className:"text-xs text-gray-500",children:["+",D.length-2]})]},_)),P.length>2&&c.jsxs("span",{className:"text-xs text-gray-500",children:["+",P.length-2," more"]})]})};return o?c.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4 text-red-700",children:o}):c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[c.jsxs("div",{className:"flex flex-col sm:flex-row items-stretch sm:items-center gap-3",children:[c.jsxs("div",{className:"relative w-full sm:w-64",children:[c.jsx(JC,{className:"absolute right-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400"}),c.jsx(yn,{type:"text",placeholder:"Search field groups...",value:f,onChange:N=>d(N.target.value),className:"pl-9"})]}),b.length>0&&c.jsxs(Dv,{children:[c.jsx(Av,{asChild:!0,children:c.jsxs(mt,{variant:"outline",size:"sm",className:"gap-2 justify-between sm:justify-start",children:[c.jsx(Sy,{className:"h-4 w-4"}),c.jsx("span",{className:"truncate",children:h?ef[h]||h:"Filter by location"}),c.jsx(vc,{className:"h-3 w-3 flex-shrink-0"})]})}),c.jsxs(Pf,{className:"w-48 p-2",children:[c.jsx("button",{onClick:()=>v(""),className:`w-full text-left px-3 py-2 text-sm rounded hover:bg-gray-100 ${h?"":"bg-gray-100 font-medium"}`,children:"All locations"}),b.map(N=>c.jsx("button",{onClick:()=>v(N),className:`w-full text-left px-3 py-2 text-sm rounded hover:bg-gray-100 ${h===N?"bg-gray-100 font-medium":""}`,children:ef[N]||N},N))]})]})]}),c.jsxs(mt,{onClick:C,className:"w-full sm:w-auto",children:[c.jsx(Fr,{className:"h-4 w-4 mr-2"}),"Add Field Group"]})]}),n&&c.jsx("div",{className:"flex items-center justify-center py-12",children:c.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}),!n&&E.length===0&&c.jsxs("div",{className:"bg-white rounded-lg border p-12 text-center",children:[c.jsx("div",{className:"mx-auto w-12 h-12 rounded-full bg-gray-100 flex items-center justify-center mb-4",children:c.jsx(VC,{className:"h-6 w-6 text-gray-400"})}),c.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:f||h?"No matching field groups":"No field groups yet"}),c.jsx("p",{className:"text-gray-500 mb-6 max-w-sm mx-auto",children:f||h?"Try adjusting your search or filter":"Get started by creating your first field group to add custom fields to your content."}),!f&&!h&&c.jsxs(mt,{onClick:C,children:[c.jsx(Fr,{className:"h-4 w-4 mr-2"}),"Create Field Group"]})]}),!n&&E.length>0&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"block md:hidden space-y-3",children:E.map(N=>c.jsx("div",{className:"bg-white rounded-lg border p-4 cursor-pointer hover:shadow-md transition-shadow",onClick:()=>S(N.id),children:c.jsxs("div",{className:"flex items-start justify-between gap-3",children:[c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[c.jsx("span",{className:"font-medium text-gray-900 truncate",children:N.title}),N.is_active?c.jsx(mf,{className:"h-4 w-4 text-green-600 flex-shrink-0"}):c.jsx(Xg,{className:"h-4 w-4 text-gray-400 flex-shrink-0"})]}),c.jsx("div",{className:"flex items-center gap-2 text-sm text-gray-500",children:c.jsxs("span",{children:[x[N.id]??0," fields"]})}),c.jsx("div",{className:"mt-2",children:j(N.locations)})]}),c.jsxs(Dv,{children:[c.jsx(Av,{asChild:!0,children:c.jsx(mt,{variant:"ghost",size:"icon",className:"h-8 w-8 flex-shrink-0",onClick:k=>k.stopPropagation(),children:c.jsx(UC,{className:"h-4 w-4"})})}),c.jsxs(Pf,{className:"w-40 p-1",align:"end",onClick:k=>k.stopPropagation(),children:[c.jsxs("button",{onClick:()=>S(N.id),className:"flex items-center gap-2 w-full px-3 py-2 text-sm rounded hover:bg-gray-100",children:[c.jsx(Qg,{className:"h-4 w-4"}),"Edit"]}),c.jsxs("button",{onClick:()=>w(N.id),className:"flex items-center gap-2 w-full px-3 py-2 text-sm rounded hover:bg-gray-100",children:[c.jsx(Fs,{className:"h-4 w-4"}),"Duplicate"]}),c.jsxs(jf,{children:[c.jsx(wv,{asChild:!0,children:c.jsxs("button",{className:"flex items-center gap-2 w-full px-3 py-2 text-sm rounded hover:bg-gray-100 text-red-600",children:[c.jsx(yf,{className:"h-4 w-4"}),"Delete"]})}),c.jsxs(Wl,{children:[c.jsxs(Kl,{children:[c.jsx(Gl,{children:"Delete Field Group"}),c.jsxs(Xl,{children:['Are you sure you want to delete "',N.title,'"? This action cannot be undone.']})]}),c.jsxs(Yl,{children:[c.jsx(Ql,{children:"Cancel"}),c.jsx(ql,{className:"bg-red-600 hover:bg-red-700",onClick:()=>T(N.id),children:"Delete"})]})]})]})]})]})]})},N.id))}),c.jsx("div",{className:"hidden md:block bg-white rounded-lg border overflow-hidden",children:c.jsxs("table",{className:"w-full",children:[c.jsx("thead",{className:"bg-gray-50 border-b",children:c.jsxs("tr",{children:[c.jsx("th",{className:"text-left text-xs font-medium text-gray-500 uppercase tracking-wider px-4 py-3",children:"Title"}),c.jsx("th",{className:"text-left text-xs font-medium text-gray-500 uppercase tracking-wider px-4 py-3",children:"Key"}),c.jsx("th",{className:"text-left text-xs font-medium text-gray-500 uppercase tracking-wider px-4 py-3",children:"Location"}),c.jsx("th",{className:"text-center text-xs font-medium text-gray-500 uppercase tracking-wider px-4 py-3 w-20",children:"Fields"}),c.jsx("th",{className:"text-center text-xs font-medium text-gray-500 uppercase tracking-wider px-4 py-3 w-20",children:"Status"}),c.jsx("th",{className:"text-right text-xs font-medium text-gray-500 uppercase tracking-wider px-4 py-3 w-24",children:"Actions"})]})}),c.jsx("tbody",{className:"divide-y divide-gray-200",children:E.map(N=>c.jsxs("tr",{className:"hover:bg-gray-50 cursor-pointer transition-colors",onClick:()=>S(N.id),children:[c.jsx("td",{className:"px-4 py-3",children:c.jsx("span",{className:"font-medium text-gray-900",children:N.title})}),c.jsx("td",{className:"px-4 py-3",children:c.jsx("code",{className:"text-sm text-gray-500 bg-gray-100 px-2 py-0.5 rounded",children:N.field_key})}),c.jsx("td",{className:"px-4 py-3",children:j(N.locations)}),c.jsx("td",{className:"px-4 py-3 text-center",children:c.jsx("span",{className:"text-sm text-gray-600",children:x[N.id]??"-"})}),c.jsx("td",{className:"px-4 py-3 text-center",children:N.is_active?c.jsx("span",{className:"inline-flex items-center gap-1 text-green-700",children:c.jsx(mf,{className:"h-4 w-4"})}):c.jsx("span",{className:"inline-flex items-center gap-1 text-gray-400",children:c.jsx(Xg,{className:"h-4 w-4"})})}),c.jsx("td",{className:"px-4 py-3 text-right",children:c.jsxs("div",{className:"flex items-center justify-end gap-1",onClick:k=>k.stopPropagation(),children:[c.jsx(mt,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>S(N.id),title:"Edit",children:c.jsx(Qg,{className:"h-4 w-4"})}),c.jsx(mt,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>w(N.id),title:"Duplicate",children:c.jsx(Fs,{className:"h-4 w-4"})}),c.jsxs(jf,{children:[c.jsx(wv,{asChild:!0,children:c.jsx(mt,{variant:"ghost",size:"icon",className:"h-8 w-8 text-red-600 hover:text-red-700 hover:bg-red-50",title:"Delete",children:c.jsx(yf,{className:"h-4 w-4"})})}),c.jsxs(Wl,{children:[c.jsxs(Kl,{children:[c.jsx(Gl,{children:"Delete Field Group"}),c.jsxs(Xl,{children:['Are you sure you want to delete "',N.title,'"? This action cannot be undone.']})]}),c.jsxs(Yl,{children:[c.jsx(Ql,{children:"Cancel"}),c.jsx(ql,{className:"bg-red-600 hover:bg-red-700",onClick:()=>T(N.id),children:"Delete"})]})]})]})]})})]},N.id))})]})})]})]})}var N2=g.createContext(void 0);function jp(e){const n=g.useContext(N2);return e||n||"ltr"}function Xi(e,[n,o]){return Math.min(o,Math.max(n,e))}function j2(e,n){return g.useReducer((o,s)=>n[o][s]??o,e)}var Rp="ScrollArea",[$0]=nr(Rp),[R2,Fn]=$0(Rp),z0=g.forwardRef((e,n)=>{const{__scopeScrollArea:o,type:s="hover",dir:a,scrollHideDelay:l=600,...f}=e,[d,h]=g.useState(null),[v,x]=g.useState(null),[m,b]=g.useState(null),[E,T]=g.useState(null),[w,S]=g.useState(null),[C,j]=g.useState(0),[N,k]=g.useState(0),[P,D]=g.useState(!1),[_,L]=g.useState(!1),H=Ie(n,U=>h(U)),W=jp(a);return c.jsx(R2,{scope:o,type:s,dir:W,scrollHideDelay:l,scrollArea:d,viewport:v,onViewportChange:x,content:m,onContentChange:b,scrollbarX:E,onScrollbarXChange:T,scrollbarXEnabled:P,onScrollbarXEnabledChange:D,scrollbarY:w,onScrollbarYChange:S,scrollbarYEnabled:_,onScrollbarYEnabledChange:L,onCornerWidthChange:j,onCornerHeightChange:k,children:c.jsx(ke.div,{dir:W,...f,ref:H,style:{position:"relative","--radix-scroll-area-corner-width":C+"px","--radix-scroll-area-corner-height":N+"px",...e.style}})})});z0.displayName=Rp;var B0="ScrollAreaViewport",U0=g.forwardRef((e,n)=>{const{__scopeScrollArea:o,children:s,nonce:a,...l}=e,f=Fn(B0,o),d=g.useRef(null),h=Ie(n,d,f.onViewportChange);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),c.jsx(ke.div,{"data-radix-scroll-area-viewport":"",...l,ref:h,style:{overflowX:f.scrollbarXEnabled?"scroll":"hidden",overflowY:f.scrollbarYEnabled?"scroll":"hidden",...e.style},children:c.jsx("div",{ref:f.onContentChange,style:{minWidth:"100%",display:"table"},children:s})})]})});U0.displayName=B0;var br="ScrollAreaScrollbar",Tp=g.forwardRef((e,n)=>{const{forceMount:o,...s}=e,a=Fn(br,e.__scopeScrollArea),{onScrollbarXEnabledChange:l,onScrollbarYEnabledChange:f}=a,d=e.orientation==="horizontal";return g.useEffect(()=>(d?l(!0):f(!0),()=>{d?l(!1):f(!1)}),[d,l,f]),a.type==="hover"?c.jsx(T2,{...s,ref:n,forceMount:o}):a.type==="scroll"?c.jsx(k2,{...s,ref:n,forceMount:o}):a.type==="auto"?c.jsx(H0,{...s,ref:n,forceMount:o}):a.type==="always"?c.jsx(kp,{...s,ref:n}):null});Tp.displayName=br;var T2=g.forwardRef((e,n)=>{const{forceMount:o,...s}=e,a=Fn(br,e.__scopeScrollArea),[l,f]=g.useState(!1);return g.useEffect(()=>{const d=a.scrollArea;let h=0;if(d){const v=()=>{window.clearTimeout(h),f(!0)},x=()=>{h=window.setTimeout(()=>f(!1),a.scrollHideDelay)};return d.addEventListener("pointerenter",v),d.addEventListener("pointerleave",x),()=>{window.clearTimeout(h),d.removeEventListener("pointerenter",v),d.removeEventListener("pointerleave",x)}}},[a.scrollArea,a.scrollHideDelay]),c.jsx(Ln,{present:o||l,children:c.jsx(H0,{"data-state":l?"visible":"hidden",...s,ref:n})})}),k2=g.forwardRef((e,n)=>{const{forceMount:o,...s}=e,a=Fn(br,e.__scopeScrollArea),l=e.orientation==="horizontal",f=Ic(()=>h("SCROLL_END"),100),[d,h]=j2("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return g.useEffect(()=>{if(d==="idle"){const v=window.setTimeout(()=>h("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(v)}},[d,a.scrollHideDelay,h]),g.useEffect(()=>{const v=a.viewport,x=l?"scrollLeft":"scrollTop";if(v){let m=v[x];const b=()=>{const E=v[x];m!==E&&(h("SCROLL"),f()),m=E};return v.addEventListener("scroll",b),()=>v.removeEventListener("scroll",b)}},[a.viewport,l,h,f]),c.jsx(Ln,{present:o||d!=="hidden",children:c.jsx(kp,{"data-state":d==="hidden"?"hidden":"visible",...s,ref:n,onPointerEnter:Ee(e.onPointerEnter,()=>h("POINTER_ENTER")),onPointerLeave:Ee(e.onPointerLeave,()=>h("POINTER_LEAVE"))})})}),H0=g.forwardRef((e,n)=>{const o=Fn(br,e.__scopeScrollArea),{forceMount:s,...a}=e,[l,f]=g.useState(!1),d=e.orientation==="horizontal",h=Ic(()=>{if(o.viewport){const v=o.viewport.offsetWidth<o.viewport.scrollWidth,x=o.viewport.offsetHeight<o.viewport.scrollHeight;f(d?v:x)}},10);return Us(o.viewport,h),Us(o.content,h),c.jsx(Ln,{present:s||l,children:c.jsx(kp,{"data-state":l?"visible":"hidden",...a,ref:n})})}),kp=g.forwardRef((e,n)=>{const{orientation:o="vertical",...s}=e,a=Fn(br,e.__scopeScrollArea),l=g.useRef(null),f=g.useRef(0),[d,h]=g.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),v=G0(d.viewport,d.content),x={...s,sizes:d,onSizesChange:h,hasThumb:v>0&&v<1,onThumbChange:b=>l.current=b,onThumbPointerUp:()=>f.current=0,onThumbPointerDown:b=>f.current=b};function m(b,E){return M2(b,f.current,d,E)}return o==="horizontal"?c.jsx(P2,{...x,ref:n,onThumbPositionChange:()=>{if(a.viewport&&l.current){const b=a.viewport.scrollLeft,E=Fv(b,d,a.dir);l.current.style.transform=`translate3d(${E}px, 0, 0)`}},onWheelScroll:b=>{a.viewport&&(a.viewport.scrollLeft=b)},onDragScroll:b=>{a.viewport&&(a.viewport.scrollLeft=m(b,a.dir))}}):o==="vertical"?c.jsx(_2,{...x,ref:n,onThumbPositionChange:()=>{if(a.viewport&&l.current){const b=a.viewport.scrollTop,E=Fv(b,d);l.current.style.transform=`translate3d(0, ${E}px, 0)`}},onWheelScroll:b=>{a.viewport&&(a.viewport.scrollTop=b)},onDragScroll:b=>{a.viewport&&(a.viewport.scrollTop=m(b))}}):null}),P2=g.forwardRef((e,n)=>{const{sizes:o,onSizesChange:s,...a}=e,l=Fn(br,e.__scopeScrollArea),[f,d]=g.useState(),h=g.useRef(null),v=Ie(n,h,l.onScrollbarXChange);return g.useEffect(()=>{h.current&&d(getComputedStyle(h.current))},[h]),c.jsx(W0,{"data-orientation":"horizontal",...a,ref:v,sizes:o,style:{bottom:0,left:l.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:l.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Mc(o)+"px",...e.style},onThumbPointerDown:x=>e.onThumbPointerDown(x.x),onDragScroll:x=>e.onDragScroll(x.x),onWheelScroll:(x,m)=>{if(l.viewport){const b=l.viewport.scrollLeft+x.deltaX;e.onWheelScroll(b),q0(b,m)&&x.preventDefault()}},onResize:()=>{h.current&&l.viewport&&f&&s({content:l.viewport.scrollWidth,viewport:l.viewport.offsetWidth,scrollbar:{size:h.current.clientWidth,paddingStart:rc(f.paddingLeft),paddingEnd:rc(f.paddingRight)}})}})}),_2=g.forwardRef((e,n)=>{const{sizes:o,onSizesChange:s,...a}=e,l=Fn(br,e.__scopeScrollArea),[f,d]=g.useState(),h=g.useRef(null),v=Ie(n,h,l.onScrollbarYChange);return g.useEffect(()=>{h.current&&d(getComputedStyle(h.current))},[h]),c.jsx(W0,{"data-orientation":"vertical",...a,ref:v,sizes:o,style:{top:0,right:l.dir==="ltr"?0:void 0,left:l.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Mc(o)+"px",...e.style},onThumbPointerDown:x=>e.onThumbPointerDown(x.y),onDragScroll:x=>e.onDragScroll(x.y),onWheelScroll:(x,m)=>{if(l.viewport){const b=l.viewport.scrollTop+x.deltaY;e.onWheelScroll(b),q0(b,m)&&x.preventDefault()}},onResize:()=>{h.current&&l.viewport&&f&&s({content:l.viewport.scrollHeight,viewport:l.viewport.offsetHeight,scrollbar:{size:h.current.clientHeight,paddingStart:rc(f.paddingTop),paddingEnd:rc(f.paddingBottom)}})}})}),[D2,V0]=$0(br),W0=g.forwardRef((e,n)=>{const{__scopeScrollArea:o,sizes:s,hasThumb:a,onThumbChange:l,onThumbPointerUp:f,onThumbPointerDown:d,onThumbPositionChange:h,onDragScroll:v,onWheelScroll:x,onResize:m,...b}=e,E=Fn(br,o),[T,w]=g.useState(null),S=Ie(n,H=>w(H)),C=g.useRef(null),j=g.useRef(""),N=E.viewport,k=s.content-s.viewport,P=zt(x),D=zt(h),_=Ic(m,10);function L(H){if(C.current){const W=H.clientX-C.current.left,U=H.clientY-C.current.top;v({x:W,y:U})}}return g.useEffect(()=>{const H=W=>{const U=W.target;(T==null?void 0:T.contains(U))&&P(W,k)};return document.addEventListener("wheel",H,{passive:!1}),()=>document.removeEventListener("wheel",H,{passive:!1})},[N,T,k,P]),g.useEffect(D,[s,D]),Us(T,_),Us(E.content,_),c.jsx(D2,{scope:o,scrollbar:T,hasThumb:a,onThumbChange:zt(l),onThumbPointerUp:zt(f),onThumbPositionChange:D,onThumbPointerDown:zt(d),children:c.jsx(ke.div,{...b,ref:S,style:{position:"absolute",...b.style},onPointerDown:Ee(e.onPointerDown,H=>{H.button===0&&(H.target.setPointerCapture(H.pointerId),C.current=T.getBoundingClientRect(),j.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",E.viewport&&(E.viewport.style.scrollBehavior="auto"),L(H))}),onPointerMove:Ee(e.onPointerMove,L),onPointerUp:Ee(e.onPointerUp,H=>{const W=H.target;W.hasPointerCapture(H.pointerId)&&W.releasePointerCapture(H.pointerId),document.body.style.webkitUserSelect=j.current,E.viewport&&(E.viewport.style.scrollBehavior=""),C.current=null})})})}),nc="ScrollAreaThumb",K0=g.forwardRef((e,n)=>{const{forceMount:o,...s}=e,a=V0(nc,e.__scopeScrollArea);return c.jsx(Ln,{present:o||a.hasThumb,children:c.jsx(A2,{ref:n,...s})})}),A2=g.forwardRef((e,n)=>{const{__scopeScrollArea:o,style:s,...a}=e,l=Fn(nc,o),f=V0(nc,o),{onThumbPositionChange:d}=f,h=Ie(n,m=>f.onThumbChange(m)),v=g.useRef(void 0),x=Ic(()=>{v.current&&(v.current(),v.current=void 0)},100);return g.useEffect(()=>{const m=l.viewport;if(m){const b=()=>{if(x(),!v.current){const E=I2(m,d);v.current=E,d()}};return d(),m.addEventListener("scroll",b),()=>m.removeEventListener("scroll",b)}},[l.viewport,x,d]),c.jsx(ke.div,{"data-state":f.hasThumb?"visible":"hidden",...a,ref:h,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...s},onPointerDownCapture:Ee(e.onPointerDownCapture,m=>{const E=m.target.getBoundingClientRect(),T=m.clientX-E.left,w=m.clientY-E.top;f.onThumbPointerDown({x:T,y:w})}),onPointerUp:Ee(e.onPointerUp,f.onThumbPointerUp)})});K0.displayName=nc;var Pp="ScrollAreaCorner",Y0=g.forwardRef((e,n)=>{const o=Fn(Pp,e.__scopeScrollArea),s=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&s?c.jsx(O2,{...e,ref:n}):null});Y0.displayName=Pp;var O2=g.forwardRef((e,n)=>{const{__scopeScrollArea:o,...s}=e,a=Fn(Pp,o),[l,f]=g.useState(0),[d,h]=g.useState(0),v=!!(l&&d);return Us(a.scrollbarX,()=>{var m;const x=((m=a.scrollbarX)==null?void 0:m.offsetHeight)||0;a.onCornerHeightChange(x),h(x)}),Us(a.scrollbarY,()=>{var m;const x=((m=a.scrollbarY)==null?void 0:m.offsetWidth)||0;a.onCornerWidthChange(x),f(x)}),v?c.jsx(ke.div,{...s,ref:n,style:{width:l,height:d,position:"absolute",right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function rc(e){return e?parseInt(e,10):0}function G0(e,n){const o=e/n;return isNaN(o)?0:o}function Mc(e){const n=G0(e.viewport,e.content),o=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,s=(e.scrollbar.size-o)*n;return Math.max(s,18)}function M2(e,n,o,s="ltr"){const a=Mc(o),l=a/2,f=n||l,d=a-f,h=o.scrollbar.paddingStart+f,v=o.scrollbar.size-o.scrollbar.paddingEnd-d,x=o.content-o.viewport,m=s==="ltr"?[0,x]:[x*-1,0];return X0([h,v],m)(e)}function Fv(e,n,o="ltr"){const s=Mc(n),a=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,l=n.scrollbar.size-a,f=n.content-n.viewport,d=l-s,h=o==="ltr"?[0,f]:[f*-1,0],v=Xi(e,h);return X0([0,f],[0,d])(v)}function X0(e,n){return o=>{if(e[0]===e[1]||n[0]===n[1])return n[0];const s=(n[1]-n[0])/(e[1]-e[0]);return n[0]+s*(o-e[0])}}function q0(e,n){return e>0&&e<n}var I2=(e,n=()=>{})=>{let o={left:e.scrollLeft,top:e.scrollTop},s=0;return(function a(){const l={left:e.scrollLeft,top:e.scrollTop},f=o.left!==l.left,d=o.top!==l.top;(f||d)&&n(),o=l,s=window.requestAnimationFrame(a)})(),()=>window.cancelAnimationFrame(s)};function Ic(e,n){const o=zt(e),s=g.useRef(0);return g.useEffect(()=>()=>window.clearTimeout(s.current),[]),g.useCallback(()=>{window.clearTimeout(s.current),s.current=window.setTimeout(o,n)},[o,n])}function Us(e,n){const o=zt(n);_t(()=>{let s=0;if(e){const a=new ResizeObserver(()=>{cancelAnimationFrame(s),s=window.requestAnimationFrame(o)});return a.observe(e),()=>{window.cancelAnimationFrame(s),a.unobserve(e)}}},[e,o])}var Q0=z0,L2=U0,F2=Y0;const Lc=g.forwardRef(({className:e,children:n,...o},s)=>c.jsxs(Q0,{ref:s,className:je("relative overflow-hidden",e),...o,children:[c.jsx(L2,{className:"h-full w-full rounded-[inherit]",children:n}),c.jsx(J0,{}),c.jsx(F2,{})]}));Lc.displayName=Q0.displayName;const J0=g.forwardRef(({className:e,orientation:n="vertical",...o},s)=>c.jsx(Tp,{ref:s,orientation:n,className:je("flex touch-none select-none transition-colors",n==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",n==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...o,children:c.jsx(K0,{className:"relative flex-1 rounded-full bg-border"})}));J0.displayName=Tp.displayName;function $2(e){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}const Z0=F.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),da=()=>{const e=F.useContext(Z0);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};$2(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(273 `);const N=C.state[d];if(N==null)return;JSON.stringify(a.getState())!==JSON.stringify(N)&&E(N);return}a.dispatchFromDevtools&&typeof a.dispatch=="function"&&a.dispatch(C)});case"DISPATCH":switch(x.payload.type){case"RESET":return E(j),d===void 0?w==null?void 0:w.init(a.getState()):w==null?void 0:w.init(ml(h.name));case"COMMIT":if(d===void 0){w==null||w.init(a.getState());return}return w==null?void 0:w.init(ml(h.name));case"ROLLBACK":return gd(x.state,C=>{if(d===void 0){E(C),w==null||w.init(a.getState());return}E(C[d]),w==null||w.init(ml(h.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return gd(x.state,C=>{if(d===void 0){E(C);return}JSON.stringify(a.getState())!==JSON.stringify(C[d])&&E(C[d])});case"IMPORT_STATE":{const{nextLiftedState:C}=x.payload,N=(S=C.computedStates.slice(-1)[0])==null?void 0:S.state;if(!N)return;E(d===void 0?N:N[d]),w==null||w.send(null,C);return}case"PAUSE_RECORDING":return b=!b}return}}),j},gd=(e,n)=>{let o;try{o=JSON.parse(e)}catch(s){console.error("[zustand devtools middleware] Could not parse the received json",s)}o!==void 0&&n(o)};function _N(e,n){let o;try{o=e()}catch{return}return{getItem:a=>{var l;const f=h=>h===null?null:JSON.parse(h,void 0),d=(l=o.getItem(a))!=null?l:null;return d instanceof Promise?d.then(f):f(d)},setItem:(a,l)=>o.setItem(a,JSON.stringify(l,void 0)),removeItem:a=>o.removeItem(a)}}const vd=e=>n=>{try{const o=e(n);return o instanceof Promise?o:{then(s){return vd(s)(o)},catch(s){return this}}}catch(o){return{then(s){return this},catch(s){return vd(s)(o)}}}},EN=(e,n)=>(o,s,a)=>{let l={storage:_N(()=>localStorage),partialize:x=>x,version:0,merge:(x,S)=>({...S,...x}),...n},f=!1;const d=new Set,h=new Set;let v=l.storage;if(!v)return e((...x)=>{console.warn(`[zustand persist middleware] Unable to update item '${l.name}', the given storage is currently unavailable.`),o(...x)},s,a);const w=()=>{const x=l.partialize({...s()});return v.setItem(l.name,{state:x,version:l.version})},m=a.setState;a.setState=(x,S)=>(m(x,S),w());const b=e((...x)=>(o(...x),w()),s,a);a.getInitialState=()=>b;let E;const j=()=>{var x,S;if(!v)return;f=!1,d.forEach(N=>{var _;return N((_=s())!=null?_:b)});const C=((S=l.onRehydrateStorage)==null?void 0:S.call(l,(x=s())!=null?x:b))||void 0;return vd(v.getItem.bind(v))(l.name).then(N=>{if(N)if(typeof N.version=="number"&&N.version!==l.version){if(l.migrate){const _=l.migrate(N.state,N.version);return _ instanceof Promise?_.then(R=>[!0,R]):[!0,_]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,N.state];return[!1,void 0]}).then(N=>{var _;const[R,P]=N;if(E=l.merge(P,(_=s())!=null?_:b),o(E,!0),R)return w()}).then(()=>{C==null||C(E,void 0),E=s(),f=!0,h.forEach(N=>N(E))}).catch(N=>{C==null||C(void 0,N)})};return a.persist={setOptions:x=>{l={...l,...x},x.storage&&(v=x.storage)},clearStorage:()=>{v==null||v.removeItem(l.name)},getOptions:()=>l,rehydrate:()=>j(),hasHydrated:()=>f,onHydrate:x=>(d.add(x),()=>{d.delete(x)}),onFinishHydration:x=>(h.add(x),()=>{h.delete(x)})},l.skipHydration||j(),E||b},NN=()=>{var e,n;return{apiUrl:((e=window.cofldAdmin)==null?void 0:e.restUrl)||"/wp-json/codeideal-open-fields/v1",nonce:((n=window.cofldAdmin)==null?void 0:n.nonce)||""}};function yd(e){const n={placeholder:e.placeholder,default_value:e.default_value,instructions:e.instructions,required:e.required};return e.conditional_logic&&(n.conditional_logic=e.conditional_logic),e.wrapper_config&&(n.wrapper=e.wrapper_config),e.field_config&&Object.assign(n,e.field_config),{...e,parent_id:e.parent_id&&e.parent_id!=="0"&&e.parent_id!==0?e.parent_id:null,settings:n}}function Ov(e){const n={...e};if("parent_id"in e&&(n.parent_id=e.parent_id||null),e.settings){const{settings:o}=e;"placeholder"in o&&(n.placeholder=o.placeholder??""),"default_value"in o&&(n.default_value=o.default_value??""),"instructions"in o&&(n.instructions=o.instructions??""),"required"in o&&(n.required=o.required),"wrapper"in o&&(n.wrapper_config=o.wrapper||{}),"conditional_logic"in o&&(n.conditional_logic=o.conditional_logic||[]);const s={},a=["placeholder","default_value","instructions","required","wrapper","conditional_logic"];for(const[l,f]of Object.entries(o))a.includes(l)||(s[l]=f);n.field_config=s,delete n.settings}return n}async function sn(e,n={}){const{apiUrl:o,nonce:s}=NN(),a=`${o}${e}`,f=await fetch(a,{...n,headers:{...{"Content-Type":"application/json","X-WP-Nonce":s},...n.headers}});if(!f.ok){const d=await f.json().catch(()=>({message:"An error occurred"}));throw new Error(d.message||`HTTP ${f.status}`)}return f.json()}const Tn={async getAll(){return sn("/fieldsets")},async get(e){return sn(`/fieldsets/${e}`)},async create(e){return sn("/fieldsets",{method:"POST",body:JSON.stringify(e)})},async update(e,n){return sn(`/fieldsets/${e}`,{method:"PUT",body:JSON.stringify(n)})},async delete(e){return sn(`/fieldsets/${e}`,{method:"DELETE"})},async duplicate(e){return sn(`/fieldsets/${e}/duplicate`,{method:"POST"})},async export(e){return sn(`/fieldsets/${e}/export`)},async import(e){return sn("/fieldsets/import",{method:"POST",body:JSON.stringify(e)})}},Oo={async getByFieldset(e){return(await sn(`/fieldsets/${e}/fields`)).map(yd)},async create(e,n){const o=Ov(n),s=await sn(`/fieldsets/${e}/fields`,{method:"POST",body:JSON.stringify(o)});return yd(s)},async update(e,n){const o=Ov(n),s=await sn(`/fields/${e}`,{method:"PUT",body:JSON.stringify(o)});return yd(s)},async delete(e){return sn(`/fields/${e}`,{method:"DELETE"})},async bulkUpdate(e,n){return sn(`/fieldsets/${e}/fields/bulk`,{method:"PUT",body:JSON.stringify({fields:n})})}},Mv={async get(){return sn("/settings")},async update(e){return sn("/settings",{method:"PUT",body:JSON.stringify(e)})}};class kN{constructor(){rh(this,"fields",new Map);rh(this,"listeners",new Set)}register(n){const o=this.fields.get(n.type);o?this.fields.set(n.type,{...o,...n}):this.fields.set(n.type,n),this.notifyListeners()}registerMany(n){n.forEach(o=>this.register(o))}get(n){return this.fields.get(n)}getAll(){return Array.from(this.fields.values())}getByCategory(n){return this.getAll().filter(o=>o.category===n)}getGroupedByCategory(){const n={basic:[],content:[],choice:[],relational:[],layout:[]};return this.getAll().forEach(o=>{n[o.category].push(o)}),n}getMetadata(){return this.getAll().map(({type:n,label:o,icon:s,category:a,description:l,hasSubFields:f})=>({type:n,label:o,icon:s,category:a,description:l,hasSubFields:f}))}has(n){return this.fields.has(n)}getSettingsComponent(n){var o;return(o=this.get(n))==null?void 0:o.SettingsComponent}getDefaultSettings(n){var o;return((o=this.get(n))==null?void 0:o.defaultSettings)??{}}validate(n){const o=this.get(n.type);return o!=null&&o.validate?o.validate(n):null}subscribe(n){return this.listeners.add(n),()=>this.listeners.delete(n)}notifyListeners(){this.listeners.forEach(n=>n())}}const Ze=new kN,jN=[{type:"text",label:"Text",category:"basic",icon:"Type",description:"Single line text input"},{type:"textarea",label:"Textarea",category:"basic",icon:"AlignLeft",description:"Multi-line text area"},{type:"number",label:"Number",category:"basic",icon:"Hash",description:"Numeric input with validation"},{type:"email",label:"Email",category:"basic",icon:"Mail",description:"Email input with validation"},{type:"url",label:"URL",category:"basic",icon:"Link",description:"URL input with validation"},{type:"wysiwyg",label:"WYSIWYG Editor",category:"content",icon:"FileText",description:"Rich text editor"},{type:"image",label:"Image",category:"content",icon:"Image",description:"Single image upload"},{type:"gallery",label:"Gallery",category:"content",icon:"Images",description:"Multiple image gallery"},{type:"file",label:"File",category:"content",icon:"File",description:"File upload"},{type:"select",label:"Select",category:"choice",icon:"ChevronDown",description:"Dropdown selection"},{type:"radio",label:"Radio",category:"choice",icon:"Circle",description:"Radio button group"},{type:"checkbox",label:"Checkbox",category:"choice",icon:"CheckSquare",description:"Checkbox group"},{type:"switch",label:"Switch",category:"choice",icon:"ToggleLeft",description:"True/False toggle"},{type:"date",label:"Date Picker",category:"basic",icon:"Calendar",description:"Date selection"},{type:"datetime",label:"Date Time",category:"basic",icon:"CalendarClock",description:"Date and time selection"},{type:"time",label:"Time",category:"basic",icon:"Clock",description:"Time selection"},{type:"color",label:"Color Picker",category:"basic",icon:"Palette",description:"Color selection"},{type:"link",label:"Link",category:"basic",icon:"ExternalLink",description:"URL with title and target"},{type:"post_object",label:"Post Object",category:"relational",icon:"FileText",description:"Select WordPress posts"},{type:"taxonomy",label:"Taxonomy",category:"relational",icon:"Tags",description:"Select taxonomy terms"},{type:"user",label:"User",category:"relational",icon:"User",description:"Select WordPress users"},{type:"repeater",label:"Repeater",category:"layout",icon:"Repeat",description:"Repeatable sub-fields",hasSubFields:!0},{type:"group",label:"Group",category:"layout",icon:"FolderOpen",description:"Group fields together",hasSubFields:!0}];Ze.registerMany(jN);function yi(e){const n=Ze.get(e.type);return(n==null?void 0:n.hasSubFields)??!1}function wi(e){return e.filter(n=>!n.parent_id).sort((n,o)=>n.menu_order-o.menu_order)}function xi(e,n){return e.filter(o=>String(o.parent_id)===String(n)).sort((o,s)=>o.menu_order-s.menu_order)}function wd(e,n){const o=[],s=xi(e,n);for(const a of s)o.push(a.id),o.push(...wd(e,a.id));return o}function RN(e,n,o){if(!o)return!0;if(String(n)===String(o)||wd(e,n).some(l=>String(l)===String(o)))return!1;const a=e.find(l=>String(l.id)===String(o));return!(!a||!yi(a))}function xd(e,n){const o=n?xi(e,n):wi(e);return o.length===0?0:Math.max(...o.map(s=>s.menu_order))+1}const it=Pv()(Av((e,n)=>({fieldsets:[],currentFieldset:null,fields:[],isLoading:!1,error:null,unsavedChanges:!1,pendingFieldChanges:new Map,pendingFieldAdditions:[],pendingFieldDeletions:[],getRootFields:()=>wi(n().fields),getChildFields:o=>xi(n().fields,o),setUnsavedChanges:o=>{e({unsavedChanges:o})},fetchFieldsets:async()=>{e({isLoading:!0,error:null});try{const o=await Tn.getAll();e({fieldsets:o,isLoading:!1})}catch(o){e({error:o instanceof Error?o.message:"Failed to fetch fieldsets",isLoading:!1})}},fetchFieldset:async o=>{e({isLoading:!0,error:null});try{const s=await Tn.get(o);e({currentFieldset:s,isLoading:!1}),await n().fetchFields(o)}catch(s){e({error:s instanceof Error?s.message:"Failed to fetch fieldset",isLoading:!1})}},createFieldset:async o=>{e({isLoading:!0,error:null});try{const s=await Tn.create(o);return e(a=>({fieldsets:[...a.fieldsets,s],isLoading:!1})),s}catch(s){throw e({error:s instanceof Error?s.message:"Failed to create fieldset",isLoading:!1}),s}},updateFieldset:async(o,s)=>{e({isLoading:!0,error:null});try{const a=await Tn.update(o,s);e(l=>{var f;return{fieldsets:l.fieldsets.map(d=>d.id===o?a:d),currentFieldset:((f=l.currentFieldset)==null?void 0:f.id)===o?a:l.currentFieldset,isLoading:!1}})}catch(a){throw e({error:a instanceof Error?a.message:"Failed to update fieldset",isLoading:!1}),a}},deleteFieldset:async o=>{e({isLoading:!0,error:null});try{await Tn.delete(o);const s=await Tn.getAll();e({fieldsets:s,currentFieldset:null,isLoading:!1})}catch(s){const a=s instanceof Error?s.message:"Failed to delete fieldset";throw console.error("Delete fieldset error:",a,s),e({error:a,isLoading:!1}),s}},duplicateFieldset:async o=>{e({isLoading:!0,error:null});try{const s=await Tn.duplicate(o);return e(a=>({fieldsets:[...a.fieldsets,s],isLoading:!1})),s}catch(s){throw e({error:s instanceof Error?s.message:"Failed to duplicate fieldset",isLoading:!1}),s}},setCurrentFieldset:o=>{e({currentFieldset:o})},fetchFields:async o=>{try{const s=await Oo.getByFieldset(o);e({fields:s})}catch(s){console.error("Failed to fetch fields:",s)}},addFieldLocal:(o,s)=>{const a=n(),l=xd(a.fields,s??null),f={id:`temp-${Date.now()}-${Math.random()}`,label:o.label||"New Field",name:o.name||`field_${Date.now()}`,type:o.type||"text",settings:o.settings||{},menu_order:l,parent_id:s??null,...o};e(d=>({fields:[...d.fields,f],pendingFieldAdditions:[...d.pendingFieldAdditions,f],unsavedChanges:!0}))},updateFieldLocal:(o,s)=>{e(a=>{const l=new Map(a.pendingFieldChanges),f=String(o),d=l.get(f)||{},h={...d.settings,...s.settings};return l.set(f,{...d,...s,settings:h}),{fields:a.fields.map(w=>String(w.id)===f?{...w,...s,settings:{...w.settings,...s.settings}}:w),pendingFieldChanges:l,unsavedChanges:!0}})},deleteFieldLocal:o=>{e(s=>{const a=String(o),l=wd(s.fields,a),f=[a,...l.map(String)];return{fields:s.fields.filter(d=>!f.includes(String(d.id))),pendingFieldDeletions:[...s.pendingFieldDeletions,...f.filter(d=>!d.startsWith("temp-"))],pendingFieldAdditions:s.pendingFieldAdditions.filter(d=>!f.includes(String(d.id))),unsavedChanges:!0}})},reorderFieldsLocal:(o,s)=>{e(a=>{const l=o.map((v,w)=>({...v,menu_order:w})),f=new Set(l.map(v=>String(v.id))),d=a.fields.map(v=>f.has(String(v.id))?l.find(w=>String(w.id)===String(v.id)):v),h=new Map(a.pendingFieldChanges);return l.forEach(v=>{const w=String(v.id),m=h.get(w)||{};h.set(w,{...m,menu_order:v.menu_order})}),{fields:d,pendingFieldChanges:h,unsavedChanges:!0}})},moveFieldToParent:(o,s)=>{const a=n();if(!RN(a.fields,o,s)){console.error("Invalid move: circular reference or invalid parent");return}const l=xd(a.fields,s);e(f=>{const d=new Map(f.pendingFieldChanges),h=d.get(o)||{};return d.set(o,{...h,parent_id:s,menu_order:l}),{fields:f.fields.map(v=>String(v.id)===o?{...v,parent_id:s,menu_order:l}:v),pendingFieldChanges:d,unsavedChanges:!0}})},copyFieldToParent:(o,s)=>{const a=n(),l=a.fields.find(m=>String(m.id)===o);if(!l)return;if(s){const m=a.fields.find(b=>String(b.id)===String(s));if(!m||!yi(m)){console.error("Invalid copy target: parent cannot have children");return}}let f=l.name,d=1,h=`${f}_copy`;for(;a.fields.some(m=>m.name===h);)d++,h=`${f}_copy_${d}`;const v=xd(a.fields,s),w={...l,id:`temp-${Date.now()}-${Math.random()}`,name:h,label:`${l.label} (Copy)`,parent_id:s,menu_order:v};e(m=>({fields:[...m.fields,w],pendingFieldAdditions:[...m.pendingFieldAdditions,w],unsavedChanges:!0}))},saveAllChanges:async()=>{const{pendingFieldChanges:o,pendingFieldAdditions:s,pendingFieldDeletions:a,fields:l,currentFieldset:f}=n();if(!f)throw new Error("No fieldset selected");try{const d=[];for(const j of a)j.startsWith("temp-")||d.push(Oo.delete(Number(j)));await Promise.all(d);const h=new Map,v=[...s].sort((j,x)=>{const S=C=>{if(!C.parent_id)return 0;const N=l.find(_=>String(_.id)===String(C.parent_id));return N?1+S(N):0};return S(j)-S(x)});for(const j of v){const x=String(j.id),S=o.get(x),C=l.find(D=>String(D.id)===x)||j;let N=null;if(C.parent_id){const D=String(C.parent_id);D.startsWith("temp-")?N=h.get(D)??null:N=Number(C.parent_id)}const R=(N?l.filter(D=>{const F=String(D.parent_id);return F===String(C.parent_id)||F.startsWith("temp-")&&h.get(F)===N}):wi(l)).findIndex(D=>String(D.id)===x),P={label:(S==null?void 0:S.label)||C.label||j.label,name:(S==null?void 0:S.name)||C.name||j.name,type:(S==null?void 0:S.type)||C.type||j.type,settings:C.settings||j.settings||{},menu_order:R>=0?R:C.menu_order,parent_id:N},A=await Oo.create(f.id,P);h.set(x,A.id),e(D=>({fields:D.fields.map(F=>String(F.id)===x?{...A,parent_id:A.parent_id??null}:F)}))}e(j=>({fields:j.fields.map(x=>{if(x.parent_id&&String(x.parent_id).startsWith("temp-")){const S=h.get(String(x.parent_id));if(S)return{...x,parent_id:S}}return x})}));const w=[];e(j=>({fields:j.fields.map(x=>{var S;if((S=x.settings)!=null&&S.conditional_logic&&Array.isArray(x.settings.conditional_logic)){let C=!1;const N=x.settings.conditional_logic.map(_=>Array.isArray(_)?_.map(R=>{if(R.field&&String(R.field).startsWith("temp-")){const P=h.get(String(R.field));if(P)return C=!0,{...R,field:String(P)}}return R}):_);if(C)return w.push(String(x.id)),{...x,settings:{...x.settings,conditional_logic:N}}}return x})}));const m=[];for(const j of w)if(!j.startsWith("temp-")){const x=n().fields.find(S=>String(S.id)===j);x&&m.push(Oo.update(Number(j),{label:x.label,name:x.name,type:x.type,settings:x.settings,menu_order:x.menu_order,parent_id:x.parent_id}))}await Promise.all(m);const b=n().fields,E=[];o.forEach((j,x)=>{if(!x.startsWith("temp-")){const S=Number(x),C=b.find(N=>String(N.id)===x);if(C){const N={...C.settings,...j.settings};let _=null;if(C.parent_id){const D=String(C.parent_id);D.startsWith("temp-")?_=h.get(D)??null:_=Number(C.parent_id)}const P=(_?xi(b,_):wi(b)).findIndex(D=>String(D.id)===x),A={label:j.label||C.label,name:j.name||C.name,type:j.type||C.type,settings:N,menu_order:P>=0?P:C.menu_order,parent_id:_};E.push(Oo.update(S,A))}}}),await Promise.all(E),e({pendingFieldChanges:new Map,pendingFieldAdditions:[],pendingFieldDeletions:[],unsavedChanges:!1})}catch(d){throw e({error:d instanceof Error?d.message:"Failed to save fields"}),d}}}),{name:"openfields-fieldset-store"})),bi=Pv()(Av(EN(e=>({sidebarOpen:!0,activePanel:"fields",notifications:[],theme:"system",toggleSidebar:()=>{e(n=>({sidebarOpen:!n.sidebarOpen}))},setActivePanel:n=>{e({activePanel:n})},addNotification:n=>{const o=crypto.randomUUID(),s={...n,id:o,duration:n.duration??5e3};e(a=>({notifications:[...a.notifications,s]})),s.duration&&s.duration>0&&setTimeout(()=>{e(a=>({notifications:a.notifications.filter(l=>l.id!==o)}))},s.duration)},removeNotification:n=>{e(o=>({notifications:o.notifications.filter(s=>s.id!==n)}))},setTheme:n=>{e({theme:n})},showToast:(n,o)=>{e(s=>({notifications:[...s.notifications,{id:crypto.randomUUID(),type:n,message:o,duration:5e3}]}))}}),{name:"openfields-ui-store",partialize:e=>({sidebarOpen:e.sidebarOpen,theme:e.theme})}),{name:"openfields-ui-store"})),bd={post_type:T.__("Post Type","codeideal-open-fields"),page_template:T.__("Page Template","codeideal-open-fields"),page_type:T.__("Page Type","codeideal-open-fields"),page:T.__("Page","codeideal-open-fields"),post:T.__("Post","codeideal-open-fields"),post_category:T.__("Post Category","codeideal-open-fields"),post_taxonomy:T.__("Post Taxonomy","codeideal-open-fields"),post_status:T.__("Post Status","codeideal-open-fields"),post_format:T.__("Post Format","codeideal-open-fields"),taxonomy:T.__("Taxonomy","codeideal-open-fields"),attachment:T.__("Attachment","codeideal-open-fields"),user_form:T.__("User Form","codeideal-open-fields"),user_role:T.__("User Role","codeideal-open-fields"),options_page:T.__("Options Page","codeideal-open-fields"),block:T.__("Block","codeideal-open-fields"),nav_menu:T.__("Nav Menu","codeideal-open-fields"),nav_menu_item:T.__("Nav Menu Item","codeideal-open-fields"),widget:T.__("Widget","codeideal-open-fields"),comment:T.__("Comment","codeideal-open-fields")};function TN(){const{fieldsets:e,isLoading:n,error:o,fetchFieldsets:s,deleteFieldset:a,duplicateFieldset:l}=it(),[f,d]=g.useState(""),[h,v]=g.useState(""),[w,m]=g.useState({});g.useEffect(()=>{s()},[s]),g.useEffect(()=>{const _=async()=>{const R={};for(const P of e)try{const A=await Oo.getByFieldset(P.id);R[P.id]=A.length}catch(A){console.error(`Failed to fetch fields for fieldset ${P.id}:`,A),R[P.id]=0}m(R)};e.length>0&&_()},[e]);const b=g.useMemo(()=>{const _=new Set;return e.forEach(R=>{var P;(P=R.locations)==null||P.forEach(A=>{_.add(A.param)})}),Array.from(_).sort()},[e]),E=g.useMemo(()=>e.filter(_=>{var A;const R=!f||_.title.toLowerCase().includes(f.toLowerCase())||_.field_key.toLowerCase().includes(f.toLowerCase()),P=!h||((A=_.locations)==null?void 0:A.some(D=>D.param===h));return R&&P}),[e,f,h]),j=async _=>{try{await a(_),Po.success(T.__("Field group deleted successfully","codeideal-open-fields"))}catch(R){console.error("Delete error:",R),Po.error(T.__("Failed to delete field group","codeideal-open-fields"))}},x=async _=>{try{await l(_),Po.success(T.__("Field group duplicated successfully","codeideal-open-fields"))}catch(R){console.error("Duplicate error:",R),Po.error(T.__("Failed to duplicate field group","codeideal-open-fields"))}},S=_=>{var P;const R=((P=window.cofldAdmin)==null?void 0:P.adminUrl)||"/wp-admin/";window.location.href=`${R}admin.php?page=codeideal-open-fields&action=edit&id=${_}`},C=()=>{var R;const _=((R=window.cofldAdmin)==null?void 0:R.adminUrl)||"/wp-admin/";window.location.href=`${_}admin.php?page=codeideal-open-fields&action=new`},N=_=>{if(!_||_.length===0)return c.jsx("span",{className:"text-gray-400 italic",children:T.__("No location rules","codeideal-open-fields")});const R={};_.forEach(A=>{const D=A.group_id||0;R[D]||(R[D]=[]),R[D].push(A)});const P=Object.values(R);return c.jsxs("div",{className:"flex flex-wrap gap-1",children:[P.slice(0,2).map((A,D)=>c.jsxs("span",{className:"inline-flex items-center gap-1",children:[D>0&&c.jsx("span",{className:"text-gray-400 text-xs mx-1",children:T.__("or","codeideal-open-fields")}),A.slice(0,2).map((F,V)=>c.jsxs(fi,{variant:"secondary",className:"text-xs font-normal",children:[bd[F.param]||F.param,":"," ",F.operator==="=="?"":"≠ ",F.value]},V)),A.length>2&&c.jsxs("span",{className:"text-xs text-gray-500",children:["+",A.length-2]})]},D)),P.length>2&&c.jsxs("span",{className:"text-xs text-gray-500",children:["+",P.length-2," ",T.__("more","codeideal-open-fields")]})]})};return o?c.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4 text-red-700",children:o}):c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[c.jsxs("div",{className:"flex flex-col sm:flex-row items-stretch sm:items-center gap-3",children:[c.jsxs("div",{className:"relative w-full sm:w-64",children:[c.jsx(a1,{className:"absolute end-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400"}),c.jsx(fn,{type:"text",placeholder:T.__("Search field groups...","codeideal-open-fields"),value:f,onChange:_=>d(_.target.value),className:"ps-9"})]}),b.length>0&&c.jsxs(jv,{children:[c.jsx(Rv,{asChild:!0,children:c.jsxs(ft,{variant:"outline",size:"sm",className:"gap-2 justify-between sm:justify-start",children:[c.jsx(Ph,{className:"h-4 w-4"}),c.jsx("span",{className:"truncate",children:h?bd[h]||h:T.__("Filter by location","codeideal-open-fields")}),c.jsx(Ea,{className:"h-3 w-3 flex-shrink-0"})]})}),c.jsxs(md,{className:"w-48 p-2",children:[c.jsx("button",{onClick:()=>v(""),className:`w-full text-start px-3 py-2 text-sm rounded hover:bg-gray-100 ${h?"":"bg-gray-100 font-medium"}`,children:T.__("All locations","codeideal-open-fields")}),b.map(_=>c.jsx("button",{onClick:()=>v(_),className:`w-full text-start px-3 py-2 text-sm rounded hover:bg-gray-100 ${h===_?"bg-gray-100 font-medium":""}`,children:bd[_]||_},_))]})]})]}),c.jsxs(ft,{onClick:C,className:"w-full sm:w-auto",children:[c.jsx(Er,{className:"h-4 w-4 me-2"}),T.__("Add Field Group","codeideal-open-fields")]})]}),n&&c.jsx("div",{className:"flex items-center justify-center py-12",children:c.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}),!n&&E.length===0&&c.jsxs("div",{className:"bg-white rounded-lg border p-12 text-center",children:[c.jsx("div",{className:"mx-auto w-12 h-12 rounded-full bg-gray-100 flex items-center justify-center mb-4",children:c.jsx(ZS,{className:"h-6 w-6 text-gray-400"})}),c.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:f||h?T.__("No matching field groups","codeideal-open-fields"):T.__("No field groups yet","codeideal-open-fields")}),c.jsx("p",{className:"text-gray-500 mb-6 max-w-sm mx-auto",children:f||h?T.__("Try adjusting your search or filter","codeideal-open-fields"):T.__("Get started by creating your first field group to add custom fields to your content.","codeideal-open-fields")}),!f&&!h&&c.jsxs(ft,{onClick:C,children:[c.jsx(Er,{className:"h-4 w-4 me-2"}),T.__("Create Field Group","codeideal-open-fields")]})]}),!n&&E.length>0&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"block md:hidden space-y-3",children:E.map(_=>c.jsx("div",{className:"bg-white rounded-lg border p-4 cursor-pointer hover:shadow-md transition-shadow",onClick:()=>S(_.id),children:c.jsxs("div",{className:"flex items-start justify-between gap-3",children:[c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[c.jsx("span",{className:"font-medium text-gray-900 truncate",children:_.title}),_.is_active?c.jsx(hu,{className:"h-4 w-4 text-green-600 flex-shrink-0"}):c.jsx(Th,{className:"h-4 w-4 text-gray-400 flex-shrink-0"})]}),c.jsx("div",{className:"flex items-center gap-2 text-sm text-gray-500",children:c.jsxs("span",{children:[w[_.id]??0," ",T.__("fields","codeideal-open-fields")]})}),c.jsx("div",{className:"mt-2",children:N(_.locations)})]}),c.jsxs(jv,{children:[c.jsx(Rv,{asChild:!0,children:c.jsx(ft,{variant:"ghost",size:"icon",className:"h-8 w-8 flex-shrink-0",onClick:R=>R.stopPropagation(),children:c.jsx(QS,{className:"h-4 w-4"})})}),c.jsxs(md,{className:"w-40 p-1",align:"end",onClick:R=>R.stopPropagation(),children:[c.jsxs("button",{onClick:()=>S(_.id),className:"flex items-center gap-2 w-full px-3 py-2 text-sm rounded hover:bg-gray-100",children:[c.jsx(Oh,{className:"h-4 w-4"}),T.__("Edit","codeideal-open-fields")]}),c.jsxs("button",{onClick:()=>x(_.id),className:"flex items-center gap-2 w-full px-3 py-2 text-sm rounded hover:bg-gray-100",children:[c.jsx(os,{className:"h-4 w-4"}),T.__("Duplicate","codeideal-open-fields")]}),c.jsxs(Ju,{children:[c.jsx(Og,{asChild:!0,children:c.jsxs("button",{className:"flex items-center gap-2 w-full px-3 py-2 text-sm rounded hover:bg-gray-100 text-red-600",children:[c.jsx(vu,{className:"h-4 w-4"}),T.__("Delete","codeideal-open-fields")]})}),c.jsxs(qa,{children:[c.jsxs(Qa,{children:[c.jsx(Za,{children:T.__("Delete Field Group","codeideal-open-fields")}),c.jsxs(el,{children:[T.__("Are you sure you want to delete","codeideal-open-fields"),' "',_.title,'"?',T.__("This action cannot be undone.","codeideal-open-fields")]})]}),c.jsxs(Ja,{children:[c.jsx(nl,{children:T.__("Cancel","codeideal-open-fields")}),c.jsx(tl,{className:"bg-red-600 hover:bg-red-700",onClick:()=>j(_.id),children:T.__("Delete","codeideal-open-fields")})]})]})]})]})]})]})},_.id))}),c.jsx("div",{className:"hidden md:block bg-white rounded-lg border overflow-hidden",children:c.jsxs("table",{className:"w-full",children:[c.jsx("thead",{className:"bg-gray-50 border-b",children:c.jsxs("tr",{children:[c.jsx("th",{className:"text-start text-xs font-medium text-gray-500 uppercase tracking-wider px-4 py-3",children:T.__("Title","codeideal-open-fields")}),c.jsx("th",{className:"text-start text-xs font-medium text-gray-500 uppercase tracking-wider px-4 py-3",children:T.__("Key","codeideal-open-fields")}),c.jsx("th",{className:"text-start text-xs font-medium text-gray-500 uppercase tracking-wider px-4 py-3",children:T.__("Location","codeideal-open-fields")}),c.jsx("th",{className:"text-center text-xs font-medium text-gray-500 uppercase tracking-wider px-4 py-3 w-20",children:T.__("Fields","codeideal-open-fields")}),c.jsx("th",{className:"text-center text-xs font-medium text-gray-500 uppercase tracking-wider px-4 py-3 w-20",children:T.__("Status","codeideal-open-fields")}),c.jsx("th",{className:"text-end text-xs font-medium text-gray-500 uppercase tracking-wider px-4 py-3 w-24",children:T.__("Actions","codeideal-open-fields")})]})}),c.jsx("tbody",{className:"divide-y divide-gray-200",children:E.map(_=>c.jsxs("tr",{className:"hover:bg-gray-50 cursor-pointer transition-colors",onClick:()=>S(_.id),children:[c.jsx("td",{className:"px-4 py-3",children:c.jsx("span",{className:"font-medium text-gray-900",children:_.title})}),c.jsx("td",{className:"px-4 py-3",children:c.jsx("code",{className:"text-sm text-gray-500 bg-gray-100 px-2 py-0.5 rounded",children:_.field_key})}),c.jsx("td",{className:"px-4 py-3",children:N(_.locations)}),c.jsx("td",{className:"px-4 py-3 text-center",children:c.jsx("span",{className:"text-sm text-gray-600",children:w[_.id]??"-"})}),c.jsx("td",{className:"px-4 py-3 text-center",children:_.is_active?c.jsx("span",{className:"inline-flex items-center gap-1 text-green-700",children:c.jsx(hu,{className:"h-4 w-4"})}):c.jsx("span",{className:"inline-flex items-center gap-1 text-gray-400",children:c.jsx(Th,{className:"h-4 w-4"})})}),c.jsx("td",{className:"px-4 py-3 text-end",children:c.jsxs("div",{className:"flex items-center justify-end gap-1",onClick:R=>R.stopPropagation(),children:[c.jsx(ft,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>S(_.id),title:T.__("Edit","codeideal-open-fields"),children:c.jsx(Oh,{className:"h-4 w-4"})}),c.jsx(ft,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>x(_.id),title:T.__("Duplicate","codeideal-open-fields"),children:c.jsx(os,{className:"h-4 w-4"})}),c.jsxs(Ju,{children:[c.jsx(Og,{asChild:!0,children:c.jsx(ft,{variant:"ghost",size:"icon",className:"h-8 w-8 text-red-600 hover:text-red-700 hover:bg-red-50",title:T.__("Delete","codeideal-open-fields"),children:c.jsx(vu,{className:"h-4 w-4"})})}),c.jsxs(qa,{children:[c.jsxs(Qa,{children:[c.jsx(Za,{children:T.__("Delete Field Group","codeideal-open-fields")}),c.jsxs(el,{children:[T.__("Are you sure you want to delete","codeideal-open-fields"),' "',_.title,'"?',T.__("This action cannot be undone.","codeideal-open-fields")]})]}),c.jsxs(Ja,{children:[c.jsx(nl,{children:T.__("Cancel","codeideal-open-fields")}),c.jsx(tl,{className:"bg-red-600 hover:bg-red-700",onClick:()=>j(_.id),children:T.__("Delete","codeideal-open-fields")})]})]})]})]})})]},_.id))})]})})]})]})}var PN=g.createContext(void 0);function Sd(e){const n=g.useContext(PN);return e||n||"ltr"}function Si(e,[n,o]){return Math.min(o,Math.max(n,e))}function DN(e,n){return g.useReducer((o,s)=>n[o][s]??o,e)}var Cd="ScrollArea",[Iv]=Vn(Cd),[AN,Pn]=Iv(Cd),Lv=g.forwardRef((e,n)=>{const{__scopeScrollArea:o,type:s="hover",dir:a,scrollHideDelay:l=600,...f}=e,[d,h]=g.useState(null),[v,w]=g.useState(null),[m,b]=g.useState(null),[E,j]=g.useState(null),[x,S]=g.useState(null),[C,N]=g.useState(0),[_,R]=g.useState(0),[P,A]=g.useState(!1),[D,F]=g.useState(!1),V=Ie(n,H=>h(H)),Y=Sd(a);return c.jsx(AN,{scope:o,type:s,dir:Y,scrollHideDelay:l,scrollArea:d,viewport:v,onViewportChange:w,content:m,onContentChange:b,scrollbarX:E,onScrollbarXChange:j,scrollbarXEnabled:P,onScrollbarXEnabledChange:A,scrollbarY:x,onScrollbarYChange:S,scrollbarYEnabled:D,onScrollbarYEnabledChange:F,onCornerWidthChange:N,onCornerHeightChange:R,children:c.jsx(Te.div,{dir:Y,...f,ref:V,style:{position:"relative","--radix-scroll-area-corner-width":C+"px","--radix-scroll-area-corner-height":_+"px",...e.style}})})});Lv.displayName=Cd;var Fv="ScrollAreaViewport",zv=g.forwardRef((e,n)=>{const{__scopeScrollArea:o,children:s,nonce:a,...l}=e,f=Pn(Fv,o),d=g.useRef(null),h=Ie(n,d,f.onViewportChange);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),c.jsx(Te.div,{"data-radix-scroll-area-viewport":"",...l,ref:h,style:{overflowX:f.scrollbarXEnabled?"scroll":"hidden",overflowY:f.scrollbarYEnabled?"scroll":"hidden",...e.style},children:c.jsx("div",{ref:f.onContentChange,style:{minWidth:"100%",display:"table"},children:s})})]})});zv.displayName=Fv;var hr="ScrollAreaScrollbar",_d=g.forwardRef((e,n)=>{const{forceMount:o,...s}=e,a=Pn(hr,e.__scopeScrollArea),{onScrollbarXEnabledChange:l,onScrollbarYEnabledChange:f}=a,d=e.orientation==="horizontal";return g.useEffect(()=>(d?l(!0):f(!0),()=>{d?l(!1):f(!1)}),[d,l,f]),a.type==="hover"?c.jsx(ON,{...s,ref:n,forceMount:o}):a.type==="scroll"?c.jsx(MN,{...s,ref:n,forceMount:o}):a.type==="auto"?c.jsx($v,{...s,ref:n,forceMount:o}):a.type==="always"?c.jsx(Ed,{...s,ref:n}):null});_d.displayName=hr;var ON=g.forwardRef((e,n)=>{const{forceMount:o,...s}=e,a=Pn(hr,e.__scopeScrollArea),[l,f]=g.useState(!1);return g.useEffect(()=>{const d=a.scrollArea;let h=0;if(d){const v=()=>{window.clearTimeout(h),f(!0)},w=()=>{h=window.setTimeout(()=>f(!1),a.scrollHideDelay)};return d.addEventListener("pointerenter",v),d.addEventListener("pointerleave",w),()=>{window.clearTimeout(h),d.removeEventListener("pointerenter",v),d.removeEventListener("pointerleave",w)}}},[a.scrollArea,a.scrollHideDelay]),c.jsx(Rn,{present:o||l,children:c.jsx($v,{"data-state":l?"visible":"hidden",...s,ref:n})})}),MN=g.forwardRef((e,n)=>{const{forceMount:o,...s}=e,a=Pn(hr,e.__scopeScrollArea),l=e.orientation==="horizontal",f=wl(()=>h("SCROLL_END"),100),[d,h]=DN("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return g.useEffect(()=>{if(d==="idle"){const v=window.setTimeout(()=>h("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(v)}},[d,a.scrollHideDelay,h]),g.useEffect(()=>{const v=a.viewport,w=l?"scrollLeft":"scrollTop";if(v){let m=v[w];const b=()=>{const E=v[w];m!==E&&(h("SCROLL"),f()),m=E};return v.addEventListener("scroll",b),()=>v.removeEventListener("scroll",b)}},[a.viewport,l,h,f]),c.jsx(Rn,{present:o||d!=="hidden",children:c.jsx(Ed,{"data-state":d==="hidden"?"hidden":"visible",...s,ref:n,onPointerEnter:Ee(e.onPointerEnter,()=>h("POINTER_ENTER")),onPointerLeave:Ee(e.onPointerLeave,()=>h("POINTER_LEAVE"))})})}),$v=g.forwardRef((e,n)=>{const o=Pn(hr,e.__scopeScrollArea),{forceMount:s,...a}=e,[l,f]=g.useState(!1),d=e.orientation==="horizontal",h=wl(()=>{if(o.viewport){const v=o.viewport.offsetWidth<o.viewport.scrollWidth,w=o.viewport.offsetHeight<o.viewport.scrollHeight;f(d?v:w)}},10);return ys(o.viewport,h),ys(o.content,h),c.jsx(Rn,{present:s||l,children:c.jsx(Ed,{"data-state":l?"visible":"hidden",...a,ref:n})})}),Ed=g.forwardRef((e,n)=>{const{orientation:o="vertical",...s}=e,a=Pn(hr,e.__scopeScrollArea),l=g.useRef(null),f=g.useRef(0),[d,h]=g.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),v=Wv(d.viewport,d.content),w={...s,sizes:d,onSizesChange:h,hasThumb:v>0&&v<1,onThumbChange:b=>l.current=b,onThumbPointerUp:()=>f.current=0,onThumbPointerDown:b=>f.current=b};function m(b,E){return BN(b,f.current,d,E)}return o==="horizontal"?c.jsx(IN,{...w,ref:n,onThumbPositionChange:()=>{if(a.viewport&&l.current){const b=a.viewport.scrollLeft,E=Yv(b,d,a.dir);l.current.style.transform=`translate3d(${E}px, 0, 0)`}},onWheelScroll:b=>{a.viewport&&(a.viewport.scrollLeft=b)},onDragScroll:b=>{a.viewport&&(a.viewport.scrollLeft=m(b,a.dir))}}):o==="vertical"?c.jsx(LN,{...w,ref:n,onThumbPositionChange:()=>{if(a.viewport&&l.current){const b=a.viewport.scrollTop,E=Yv(b,d);l.current.style.transform=`translate3d(0, ${E}px, 0)`}},onWheelScroll:b=>{a.viewport&&(a.viewport.scrollTop=b)},onDragScroll:b=>{a.viewport&&(a.viewport.scrollTop=m(b))}}):null}),IN=g.forwardRef((e,n)=>{const{sizes:o,onSizesChange:s,...a}=e,l=Pn(hr,e.__scopeScrollArea),[f,d]=g.useState(),h=g.useRef(null),v=Ie(n,h,l.onScrollbarXChange);return g.useEffect(()=>{h.current&&d(getComputedStyle(h.current))},[h]),c.jsx(Uv,{"data-orientation":"horizontal",...a,ref:v,sizes:o,style:{bottom:0,left:l.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:l.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":yl(o)+"px",...e.style},onThumbPointerDown:w=>e.onThumbPointerDown(w.x),onDragScroll:w=>e.onDragScroll(w.x),onWheelScroll:(w,m)=>{if(l.viewport){const b=l.viewport.scrollLeft+w.deltaX;e.onWheelScroll(b),Xv(b,m)&&w.preventDefault()}},onResize:()=>{h.current&&l.viewport&&f&&s({content:l.viewport.scrollWidth,viewport:l.viewport.offsetWidth,scrollbar:{size:h.current.clientWidth,paddingStart:vl(f.paddingLeft),paddingEnd:vl(f.paddingRight)}})}})}),LN=g.forwardRef((e,n)=>{const{sizes:o,onSizesChange:s,...a}=e,l=Pn(hr,e.__scopeScrollArea),[f,d]=g.useState(),h=g.useRef(null),v=Ie(n,h,l.onScrollbarYChange);return g.useEffect(()=>{h.current&&d(getComputedStyle(h.current))},[h]),c.jsx(Uv,{"data-orientation":"vertical",...a,ref:v,sizes:o,style:{top:0,right:l.dir==="ltr"?0:void 0,left:l.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":yl(o)+"px",...e.style},onThumbPointerDown:w=>e.onThumbPointerDown(w.y),onDragScroll:w=>e.onDragScroll(w.y),onWheelScroll:(w,m)=>{if(l.viewport){const b=l.viewport.scrollTop+w.deltaY;e.onWheelScroll(b),Xv(b,m)&&w.preventDefault()}},onResize:()=>{h.current&&l.viewport&&f&&s({content:l.viewport.scrollHeight,viewport:l.viewport.offsetHeight,scrollbar:{size:h.current.clientHeight,paddingStart:vl(f.paddingTop),paddingEnd:vl(f.paddingBottom)}})}})}),[FN,Bv]=Iv(hr),Uv=g.forwardRef((e,n)=>{const{__scopeScrollArea:o,sizes:s,hasThumb:a,onThumbChange:l,onThumbPointerUp:f,onThumbPointerDown:d,onThumbPositionChange:h,onDragScroll:v,onWheelScroll:w,onResize:m,...b}=e,E=Pn(hr,o),[j,x]=g.useState(null),S=Ie(n,V=>x(V)),C=g.useRef(null),N=g.useRef(""),_=E.viewport,R=s.content-s.viewport,P=Mt(w),A=Mt(h),D=wl(m,10);function F(V){if(C.current){const Y=V.clientX-C.current.left,H=V.clientY-C.current.top;v({x:Y,y:H})}}return g.useEffect(()=>{const V=Y=>{const H=Y.target;(j==null?void 0:j.contains(H))&&P(Y,R)};return document.addEventListener("wheel",V,{passive:!1}),()=>document.removeEventListener("wheel",V,{passive:!1})},[_,j,R,P]),g.useEffect(A,[s,A]),ys(j,D),ys(E.content,D),c.jsx(FN,{scope:o,scrollbar:j,hasThumb:a,onThumbChange:Mt(l),onThumbPointerUp:Mt(f),onThumbPositionChange:A,onThumbPointerDown:Mt(d),children:c.jsx(Te.div,{...b,ref:S,style:{position:"absolute",...b.style},onPointerDown:Ee(e.onPointerDown,V=>{V.button===0&&(V.target.setPointerCapture(V.pointerId),C.current=j.getBoundingClientRect(),N.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",E.viewport&&(E.viewport.style.scrollBehavior="auto"),F(V))}),onPointerMove:Ee(e.onPointerMove,F),onPointerUp:Ee(e.onPointerUp,V=>{const Y=V.target;Y.hasPointerCapture(V.pointerId)&&Y.releasePointerCapture(V.pointerId),document.body.style.webkitUserSelect=N.current,E.viewport&&(E.viewport.style.scrollBehavior=""),C.current=null})})})}),gl="ScrollAreaThumb",Hv=g.forwardRef((e,n)=>{const{forceMount:o,...s}=e,a=Bv(gl,e.__scopeScrollArea);return c.jsx(Rn,{present:o||a.hasThumb,children:c.jsx(zN,{ref:n,...s})})}),zN=g.forwardRef((e,n)=>{const{__scopeScrollArea:o,style:s,...a}=e,l=Pn(gl,o),f=Bv(gl,o),{onThumbPositionChange:d}=f,h=Ie(n,m=>f.onThumbChange(m)),v=g.useRef(void 0),w=wl(()=>{v.current&&(v.current(),v.current=void 0)},100);return g.useEffect(()=>{const m=l.viewport;if(m){const b=()=>{if(w(),!v.current){const E=UN(m,d);v.current=E,d()}};return d(),m.addEventListener("scroll",b),()=>m.removeEventListener("scroll",b)}},[l.viewport,w,d]),c.jsx(Te.div,{"data-state":f.hasThumb?"visible":"hidden",...a,ref:h,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...s},onPointerDownCapture:Ee(e.onPointerDownCapture,m=>{const E=m.target.getBoundingClientRect(),j=m.clientX-E.left,x=m.clientY-E.top;f.onThumbPointerDown({x:j,y:x})}),onPointerUp:Ee(e.onPointerUp,f.onThumbPointerUp)})});Hv.displayName=gl;var Nd="ScrollAreaCorner",Vv=g.forwardRef((e,n)=>{const o=Pn(Nd,e.__scopeScrollArea),s=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&s?c.jsx($N,{...e,ref:n}):null});Vv.displayName=Nd;var $N=g.forwardRef((e,n)=>{const{__scopeScrollArea:o,...s}=e,a=Pn(Nd,o),[l,f]=g.useState(0),[d,h]=g.useState(0),v=!!(l&&d);return ys(a.scrollbarX,()=>{var m;const w=((m=a.scrollbarX)==null?void 0:m.offsetHeight)||0;a.onCornerHeightChange(w),h(w)}),ys(a.scrollbarY,()=>{var m;const w=((m=a.scrollbarY)==null?void 0:m.offsetWidth)||0;a.onCornerWidthChange(w),f(w)}),v?c.jsx(Te.div,{...s,ref:n,style:{width:l,height:d,position:"absolute",right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function vl(e){return e?parseInt(e,10):0}function Wv(e,n){const o=e/n;return isNaN(o)?0:o}function yl(e){const n=Wv(e.viewport,e.content),o=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,s=(e.scrollbar.size-o)*n;return Math.max(s,18)}function BN(e,n,o,s="ltr"){const a=yl(o),l=a/2,f=n||l,d=a-f,h=o.scrollbar.paddingStart+f,v=o.scrollbar.size-o.scrollbar.paddingEnd-d,w=o.content-o.viewport,m=s==="ltr"?[0,w]:[w*-1,0];return Kv([h,v],m)(e)}function Yv(e,n,o="ltr"){const s=yl(n),a=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,l=n.scrollbar.size-a,f=n.content-n.viewport,d=l-s,h=o==="ltr"?[0,f]:[f*-1,0],v=Si(e,h);return Kv([0,f],[0,d])(v)}function Kv(e,n){return o=>{if(e[0]===e[1]||n[0]===n[1])return n[0];const s=(n[1]-n[0])/(e[1]-e[0]);return n[0]+s*(o-e[0])}}function Xv(e,n){return e>0&&e<n}var UN=(e,n=()=>{})=>{let o={left:e.scrollLeft,top:e.scrollTop},s=0;return(function a(){const l={left:e.scrollLeft,top:e.scrollTop},f=o.left!==l.left,d=o.top!==l.top;(f||d)&&n(),o=l,s=window.requestAnimationFrame(a)})(),()=>window.cancelAnimationFrame(s)};function wl(e,n){const o=Mt(e),s=g.useRef(0);return g.useEffect(()=>()=>window.clearTimeout(s.current),[]),g.useCallback(()=>{window.clearTimeout(s.current),s.current=window.setTimeout(o,n)},[o,n])}function ys(e,n){const o=Mt(n);jt(()=>{let s=0;if(e){const a=new ResizeObserver(()=>{cancelAnimationFrame(s),s=window.requestAnimationFrame(o)});return a.observe(e),()=>{window.cancelAnimationFrame(s),a.unobserve(e)}}},[e,o])}var Gv=Lv,HN=zv,VN=Vv;const xl=g.forwardRef(({className:e,children:n,...o},s)=>c.jsxs(Gv,{ref:s,className:ke("relative overflow-hidden",e),...o,children:[c.jsx(HN,{className:"h-full w-full rounded-[inherit]",children:n}),c.jsx(qv,{}),c.jsx(VN,{})]}));xl.displayName=Gv.displayName;const qv=g.forwardRef(({className:e,orientation:n="vertical",...o},s)=>c.jsx(_d,{ref:s,orientation:n,className:ke("flex touch-none select-none transition-colors",n==="vertical"&&"h-full w-2.5 border-s border-s-transparent p-[1px]",n==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...o,children:c.jsx(Hv,{className:"relative flex-1 rounded-full bg-border"})}));qv.displayName=_d.displayName;function WN(e){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}const Qv=z.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),Ci=()=>{const e=z.useContext(Qv);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};WN(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not( 272 274 [data-state=closed] 273 ){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function z2(){const e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function B2(){return _p(/^Mac/)}function U2(){return _p(/^iPhone/)}function $v(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function H2(){return _p(/^iPad/)||B2()&&navigator.maxTouchPoints>1}function ew(){return U2()||H2()}function _p(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const V2=24,W2=typeof window<"u"?g.useLayoutEffect:g.useEffect;function zv(...e){return(...n)=>{for(let o of e)typeof o=="function"&&o(...n)}}const tf=typeof document<"u"&&window.visualViewport;function Bv(e){let n=window.getComputedStyle(e);return/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY)}function tw(e){for(Bv(e)&&(e=e.parentElement);e&&!Bv(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const K2=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let Dl=0,nf;function Y2(e={}){let{isDisabled:n}=e;W2(()=>{if(!n)return Dl++,Dl===1&&ew()&&(nf=G2()),()=>{Dl--,Dl===0&&(nf==null||nf())}},[n])}function G2(){let e,n=0,o=m=>{e=tw(m.target),!(e===document.documentElement&&e===document.body)&&(n=m.changedTouches[0].pageY)},s=m=>{if(!e||e===document.documentElement||e===document.body){m.preventDefault();return}let b=m.changedTouches[0].pageY,E=e.scrollTop,T=e.scrollHeight-e.clientHeight;T!==0&&((E<=0&&b>n||E>=T&&b<n)&&m.preventDefault(),n=b)},a=m=>{let b=m.target;Df(b)&&b!==document.activeElement&&(m.preventDefault(),b.style.transform="translateY(-2000px)",b.focus(),requestAnimationFrame(()=>{b.style.transform=""}))},l=m=>{let b=m.target;Df(b)&&(b.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{b.style.transform="",tf&&(tf.height<window.innerHeight?requestAnimationFrame(()=>{Uv(b)}):tf.addEventListener("resize",()=>Uv(b),{once:!0}))}))},f=()=>{window.scrollTo(0,0)},d=window.pageXOffset,h=window.pageYOffset,v=zv(X2(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let x=zv(Oi(document,"touchstart",o,{passive:!1,capture:!0}),Oi(document,"touchmove",s,{passive:!1,capture:!0}),Oi(document,"touchend",a,{passive:!1,capture:!0}),Oi(document,"focus",l,!0),Oi(window,"scroll",f));return()=>{v(),x(),window.scrollTo(d,h)}}function X2(e,n,o){let s=e.style[n];return e.style[n]=o,()=>{e.style[n]=s}}function Oi(e,n,o,s){return e.addEventListener(n,o,s),()=>{e.removeEventListener(n,o,s)}}function Uv(e){let n=document.scrollingElement||document.documentElement;for(;e&&e!==n;){let o=tw(e);if(o!==document.documentElement&&o!==document.body&&o!==e){let s=o.getBoundingClientRect().top,a=e.getBoundingClientRect().top,l=e.getBoundingClientRect().bottom;const f=o.getBoundingClientRect().bottom+V2;l>f&&(o.scrollTop+=a-s)}e=o.parentElement}}function Df(e){return e instanceof HTMLInputElement&&!K2.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function q2(e,n){typeof e=="function"?e(n):e!=null&&(e.current=n)}function Q2(...e){return n=>e.forEach(o=>q2(o,n))}function nw(...e){return g.useCallback(Q2(...e),e)}const rw=new WeakMap;function kt(e,n,o=!1){if(!e||!(e instanceof HTMLElement))return;let s={};Object.entries(n).forEach(([a,l])=>{if(a.startsWith("--")){e.style.setProperty(a,l);return}s[a]=e.style[a],e.style[a]=l}),!o&&rw.set(e,s)}function J2(e,n){if(!e||!(e instanceof HTMLElement))return;let o=rw.get(e);o&&(e.style[n]=o[n])}const Et=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function Al(e,n){if(!e)return null;const o=window.getComputedStyle(e),s=o.transform||o.webkitTransform||o.mozTransform;let a=s.match(/^matrix3d\((.+)\)$/);return a?parseFloat(a[1].split(", ")[Et(n)?13:12]):(a=s.match(/^matrix\((.+)\)$/),a?parseFloat(a[1].split(", ")[Et(n)?5:4]):null)}function Z2(e){return 8*(Math.log(e+1)-2)}function rf(e,n){if(!e)return()=>{};const o=e.style.cssText;return Object.assign(e.style,n),()=>{e.style.cssText=o}}function ek(...e){return(...n)=>{for(const o of e)typeof o=="function"&&o(...n)}}const ht={DURATION:.5,EASE:[.32,.72,0,1]},ow=.4,tk=.25,nk=100,sw=8,zo=16,Af=26,of="vaul-dragging";function iw(e){const n=F.useRef(e);return F.useEffect(()=>{n.current=e}),F.useMemo(()=>(...o)=>n.current==null?void 0:n.current.call(n,...o),[])}function rk({defaultProp:e,onChange:n}){const o=F.useState(e),[s]=o,a=F.useRef(s),l=iw(n);return F.useEffect(()=>{a.current!==s&&(l(s),a.current=s)},[s,a,l]),o}function aw({prop:e,defaultProp:n,onChange:o=()=>{}}){const[s,a]=rk({defaultProp:n,onChange:o}),l=e!==void 0,f=l?e:s,d=iw(o),h=F.useCallback(v=>{if(l){const m=typeof v=="function"?v(e):v;m!==e&&d(m)}else a(v)},[l,e,a,d]);return[f,h]}function ok({activeSnapPointProp:e,setActiveSnapPointProp:n,snapPoints:o,drawerRef:s,overlayRef:a,fadeFromIndex:l,onSnapPointChange:f,direction:d="bottom",container:h,snapToSequentialPoint:v}){const[x,m]=aw({prop:e,defaultProp:o==null?void 0:o[0],onChange:n}),[b,E]=F.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);F.useEffect(()=>{function _(){E({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",_),()=>window.removeEventListener("resize",_)},[]);const T=F.useMemo(()=>x===(o==null?void 0:o[o.length-1])||null,[o,x]),w=F.useMemo(()=>{var _;return(_=o==null?void 0:o.findIndex(L=>L===x))!=null?_:null},[o,x]),S=o&&o.length>0&&(l||l===0)&&!Number.isNaN(l)&&o[l]===x||!o,C=F.useMemo(()=>{const _=h?{width:h.getBoundingClientRect().width,height:h.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var L;return(L=o==null?void 0:o.map(H=>{const W=typeof H=="string";let U=0;if(W&&(U=parseInt(H,10)),Et(d)){const Y=W?U:b?H*_.height:0;return b?d==="bottom"?_.height-Y:-_.height+Y:Y}const ee=W?U:b?H*_.width:0;return b?d==="right"?_.width-ee:-_.width+ee:ee}))!=null?L:[]},[o,b,h]),j=F.useMemo(()=>w!==null?C==null?void 0:C[w]:null,[C,w]),N=F.useCallback(_=>{var L;const H=(L=C==null?void 0:C.findIndex(W=>W===_))!=null?L:null;f(H),kt(s.current,{transition:`transform ${ht.DURATION}s cubic-bezier(${ht.EASE.join(",")})`,transform:Et(d)?`translate3d(0, ${_}px, 0)`:`translate3d(${_}px, 0, 0)`}),C&&H!==C.length-1&&l!==void 0&&H!==l&&H<l?kt(a.current,{transition:`opacity ${ht.DURATION}s cubic-bezier(${ht.EASE.join(",")})`,opacity:"0"}):kt(a.current,{transition:`opacity ${ht.DURATION}s cubic-bezier(${ht.EASE.join(",")})`,opacity:"1"}),m(o==null?void 0:o[Math.max(H,0)])},[s.current,o,C,l,a,m]);F.useEffect(()=>{if(x||e){var _;const L=(_=o==null?void 0:o.findIndex(H=>H===e||H===x))!=null?_:-1;C&&L!==-1&&typeof C[L]=="number"&&N(C[L])}},[x,e,o,C,N]);function k({draggedDistance:_,closeDrawer:L,velocity:H,dismissible:W}){if(l===void 0)return;const U=d==="bottom"||d==="right"?(j??0)-_:(j??0)+_,ee=w===l-1,Y=w===0,X=_>0;if(ee&&kt(a.current,{transition:`opacity ${ht.DURATION}s cubic-bezier(${ht.EASE.join(",")})`}),!v&&H>2&&!X){W?L():N(C[0]);return}if(!v&&H>2&&X&&C&&o){N(C[o.length-1]);return}const le=C==null?void 0:C.reduce((q,z)=>typeof q!="number"||typeof z!="number"?q:Math.abs(z-U)<Math.abs(q-U)?z:q),Z=Et(d)?window.innerHeight:window.innerWidth;if(H>ow&&Math.abs(_)<Z*.4){const q=X?1:-1;if(q>0&&T&&o){N(C[o.length-1]);return}if(Y&&q<0&&W&&L(),w===null)return;N(C[w+q]);return}N(le)}function P({draggedDistance:_}){if(j===null)return;const L=d==="bottom"||d==="right"?j-_:j+_;(d==="bottom"||d==="right")&&L<C[C.length-1]||(d==="top"||d==="left")&&L>C[C.length-1]||kt(s.current,{transform:Et(d)?`translate3d(0, ${L}px, 0)`:`translate3d(${L}px, 0, 0)`})}function D(_,L){if(!o||typeof w!="number"||!C||l===void 0)return null;const H=w===l-1;if(w>=l&&L)return 0;if(H&&!L)return 1;if(!S&&!H)return null;const U=H?w+1:w-1,ee=H?C[U]-C[U-1]:C[U+1]-C[U],Y=_/Math.abs(ee);return H?1-Y:Y}return{isLastSnapPoint:T,activeSnapPoint:x,shouldFade:S,getPercentageDragged:D,setActiveSnapPoint:m,activeSnapPointIndex:w,onRelease:k,onDrag:P,snapPointsOffset:C}}const sk=()=>()=>{};function ik(){const{direction:e,isOpen:n,shouldScaleBackground:o,setBackgroundColorOnScale:s,noBodyStyles:a}=da(),l=F.useRef(null),f=g.useMemo(()=>document.body.style.backgroundColor,[]);function d(){return(window.innerWidth-Af)/window.innerWidth}F.useEffect(()=>{if(n&&o){l.current&&clearTimeout(l.current);const h=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!h)return;ek(s&&!a?rf(document.body,{background:"black"}):sk,rf(h,{transformOrigin:Et(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${ht.DURATION}s`,transitionTimingFunction:`cubic-bezier(${ht.EASE.join(",")})`}));const v=rf(h,{borderRadius:`${sw}px`,overflow:"hidden",...Et(e)?{transform:`scale(${d()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${d()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{v(),l.current=window.setTimeout(()=>{f?document.body.style.background=f:document.body.style.removeProperty("background")},ht.DURATION*1e3)}}},[n,o,f])}let Mi=null;function ak({isOpen:e,modal:n,nested:o,hasBeenOpened:s,preventScrollRestoration:a,noBodyStyles:l}){const[f,d]=F.useState(()=>typeof window<"u"?window.location.href:""),h=F.useRef(0),v=F.useCallback(()=>{if($v()&&Mi===null&&e&&!l){Mi={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:m,innerHeight:b}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-h.current}px`,left:`${-m}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const E=b-window.innerHeight;E&&h.current>=b&&(document.body.style.top=`${-(h.current+E)}px`)}),300)}},[e]),x=F.useCallback(()=>{if($v()&&Mi!==null&&!l){const m=-parseInt(document.body.style.top,10),b=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Mi),window.requestAnimationFrame(()=>{if(a&&f!==window.location.href){d(window.location.href);return}window.scrollTo(b,m)}),Mi=null}},[f]);return F.useEffect(()=>{function m(){h.current=window.scrollY}return m(),window.addEventListener("scroll",m),()=>{window.removeEventListener("scroll",m)}},[]),F.useEffect(()=>{if(n)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||x()}},[n,x]),F.useEffect(()=>{o||!s||(e?(!window.matchMedia("(display-mode: standalone)").matches&&v(),n||window.setTimeout(()=>{x()},500)):x())},[e,s,f,n,o,v,x]),{restorePositionSetting:x}}function lk({open:e,onOpenChange:n,children:o,onDrag:s,onRelease:a,snapPoints:l,shouldScaleBackground:f=!1,setBackgroundColorOnScale:d=!0,closeThreshold:h=tk,scrollLockTimeout:v=nk,dismissible:x=!0,handleOnly:m=!1,fadeFromIndex:b=l&&l.length-1,activeSnapPoint:E,setActiveSnapPoint:T,fixed:w,modal:S=!0,onClose:C,nested:j,noBodyStyles:N=!1,direction:k="bottom",defaultOpen:P=!1,disablePreventScroll:D=!0,snapToSequentialPoint:_=!1,preventScrollRestoration:L=!1,repositionInputs:H=!0,onAnimationEnd:W,container:U,autoFocus:ee=!1}){var Y,X;const[le=!1,Z]=aw({defaultProp:P,prop:e,onChange:we=>{n==null||n(we),!we&&!j&&an(),setTimeout(()=>{W==null||W(we)},ht.DURATION*1e3),we&&!S&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),we||(document.body.style.pointerEvents="auto")}}),[q,z]=F.useState(!1),[J,te]=F.useState(!1),[O,K]=F.useState(!1),ne=F.useRef(null),G=F.useRef(null),de=F.useRef(null),he=F.useRef(null),ae=F.useRef(null),se=F.useRef(!1),ye=F.useRef(null),fe=F.useRef(0),Ne=F.useRef(!1),ce=F.useRef(!P),Oe=F.useRef(0),pe=F.useRef(null),Ze=F.useRef(((Y=pe.current)==null?void 0:Y.getBoundingClientRect().height)||0),wt=F.useRef(((X=pe.current)==null?void 0:X.getBoundingClientRect().width)||0),gt=F.useRef(0),jn=F.useCallback(we=>{l&&we===Dt.length-1&&(G.current=new Date)},[]),{activeSnapPoint:at,activeSnapPointIndex:ut,setActiveSnapPoint:Xt,onRelease:lt,snapPointsOffset:Dt,onDrag:Sr,shouldFade:Cr,getPercentageDragged:$n}=ok({snapPoints:l,activeSnapPointProp:E,setActiveSnapPointProp:T,drawerRef:pe,fadeFromIndex:b,overlayRef:ne,onSnapPointChange:jn,direction:k,container:U,snapToSequentialPoint:_});Y2({isDisabled:!le||J||!S||O||!q||!H||!D});const{restorePositionSetting:an}=ak({isOpen:le,modal:S,nested:j??!1,hasBeenOpened:q,preventScrollRestoration:L,noBodyStyles:N});function Nt(){return(window.innerWidth-Af)/window.innerWidth}function ln(we){var He,Ve;!x&&!l||pe.current&&!pe.current.contains(we.target)||(Ze.current=((He=pe.current)==null?void 0:He.getBoundingClientRect().height)||0,wt.current=((Ve=pe.current)==null?void 0:Ve.getBoundingClientRect().width)||0,te(!0),de.current=new Date,ew()&&window.addEventListener("touchend",()=>se.current=!1,{once:!0}),we.target.setPointerCapture(we.pointerId),fe.current=Et(k)?we.pageY:we.pageX)}function At(we,He){var Ve;let Ce=we;const Le=(Ve=window.getSelection())==null?void 0:Ve.toString(),me=pe.current?Al(pe.current,k):null,De=new Date;if(Ce.tagName==="SELECT"||Ce.hasAttribute("data-vaul-no-drag")||Ce.closest("[data-vaul-no-drag]"))return!1;if(k==="right"||k==="left")return!0;if(G.current&&De.getTime()-G.current.getTime()<500)return!1;if(me!==null&&(k==="bottom"?me>0:me<0))return!0;if(Le&&Le.length>0)return!1;if(ae.current&&De.getTime()-ae.current.getTime()<v&&me===0||He)return ae.current=De,!1;for(;Ce;){if(Ce.scrollHeight>Ce.clientHeight){if(Ce.scrollTop!==0)return ae.current=new Date,!1;if(Ce.getAttribute("role")==="dialog")return!0}Ce=Ce.parentNode}return!0}function jt(we){if(pe.current&&J){const He=k==="bottom"||k==="right"?1:-1,Ve=(fe.current-(Et(k)?we.pageY:we.pageX))*He,Ce=Ve>0,Le=l&&!x&&!Ce;if(Le&&ut===0)return;const me=Math.abs(Ve),De=document.querySelector("[data-vaul-drawer-wrapper]"),Fe=k==="bottom"||k==="top"?Ze.current:wt.current;let Me=me/Fe;const tt=$n(me,Ce);if(tt!==null&&(Me=tt),Le&&Me>=1||!se.current&&!At(we.target,Ce))return;if(pe.current.classList.add(of),se.current=!0,kt(pe.current,{transition:"none"}),kt(ne.current,{transition:"none"}),l&&Sr({draggedDistance:Ve}),Ce&&!l){const Pe=Z2(Ve),vt=Math.min(Pe*-1,0)*He;kt(pe.current,{transform:Et(k)?`translate3d(0, ${vt}px, 0)`:`translate3d(${vt}px, 0, 0)`});return}const We=1-Me;if((Cr||b&&ut===b-1)&&(s==null||s(we,Me),kt(ne.current,{opacity:`${We}`,transition:"none"},!0)),De&&ne.current&&f){const Pe=Math.min(Nt()+Me*(1-Nt()),1),vt=8-Me*8,qe=Math.max(0,14-Me*14);kt(De,{borderRadius:`${vt}px`,transform:Et(k)?`scale(${Pe}) translate3d(0, ${qe}px, 0)`:`scale(${Pe}) translate3d(${qe}px, 0, 0)`,transition:"none"},!0)}if(!l){const Pe=me*He;kt(pe.current,{transform:Et(k)?`translate3d(0, ${Pe}px, 0)`:`translate3d(${Pe}px, 0, 0)`})}}}F.useEffect(()=>{window.requestAnimationFrame(()=>{ce.current=!0})},[]),F.useEffect(()=>{var we;function He(){if(!pe.current||!H)return;const Ve=document.activeElement;if(Df(Ve)||Ne.current){var Ce;const Le=((Ce=window.visualViewport)==null?void 0:Ce.height)||0,me=window.innerHeight;let De=me-Le;const Fe=pe.current.getBoundingClientRect().height||0,Me=Fe>me*.8;gt.current||(gt.current=Fe);const tt=pe.current.getBoundingClientRect().top;if(Math.abs(Oe.current-De)>60&&(Ne.current=!Ne.current),l&&l.length>0&&Dt&&ut){const We=Dt[ut]||0;De+=We}if(Oe.current=De,Fe>Le||Ne.current){const We=pe.current.getBoundingClientRect().height;let Pe=We;We>Le&&(Pe=Le-(Me?tt:Af)),w?pe.current.style.height=`${We-Math.max(De,0)}px`:pe.current.style.height=`${Math.max(Pe,Le-tt)}px`}else z2()||(pe.current.style.height=`${gt.current}px`);l&&l.length>0&&!Ne.current?pe.current.style.bottom="0px":pe.current.style.bottom=`${Math.max(De,0)}px`}}return(we=window.visualViewport)==null||we.addEventListener("resize",He),()=>{var Ve;return(Ve=window.visualViewport)==null?void 0:Ve.removeEventListener("resize",He)}},[ut,l,Dt]);function Ht(we){Ur(),C==null||C(),we||Z(!1),setTimeout(()=>{l&&Xt(l[0])},ht.DURATION*1e3)}function Er(){if(!pe.current)return;const we=document.querySelector("[data-vaul-drawer-wrapper]"),He=Al(pe.current,k);kt(pe.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${ht.DURATION}s cubic-bezier(${ht.EASE.join(",")})`}),kt(ne.current,{transition:`opacity ${ht.DURATION}s cubic-bezier(${ht.EASE.join(",")})`,opacity:"1"}),f&&He&&He>0&&le&&kt(we,{borderRadius:`${sw}px`,overflow:"hidden",...Et(k)?{transform:`scale(${Nt()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${Nt()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${ht.DURATION}s`,transitionTimingFunction:`cubic-bezier(${ht.EASE.join(",")})`},!0)}function Ur(){!J||!pe.current||(pe.current.classList.remove(of),se.current=!1,te(!1),he.current=new Date)}function sr(we){if(!J||!pe.current)return;pe.current.classList.remove(of),se.current=!1,te(!1),he.current=new Date;const He=Al(pe.current,k);if(!we||!At(we.target,!1)||!He||Number.isNaN(He)||de.current===null)return;const Ve=he.current.getTime()-de.current.getTime(),Ce=fe.current-(Et(k)?we.pageY:we.pageX),Le=Math.abs(Ce)/Ve;if(Le>.05&&(K(!0),setTimeout(()=>{K(!1)},200)),l){lt({draggedDistance:Ce*(k==="bottom"||k==="right"?1:-1),closeDrawer:Ht,velocity:Le,dismissible:x}),a==null||a(we,!0);return}if(k==="bottom"||k==="right"?Ce>0:Ce<0){Er(),a==null||a(we,!0);return}if(Le>ow){Ht(),a==null||a(we,!1);return}var me;const De=Math.min((me=pe.current.getBoundingClientRect().height)!=null?me:0,window.innerHeight);var Fe;const Me=Math.min((Fe=pe.current.getBoundingClientRect().width)!=null?Fe:0,window.innerWidth),tt=k==="left"||k==="right";if(Math.abs(He)>=(tt?Me:De)*h){Ht(),a==null||a(we,!1);return}a==null||a(we,!0),Er()}F.useEffect(()=>(le&&(kt(document.documentElement,{scrollBehavior:"auto"}),G.current=new Date),()=>{J2(document.documentElement,"scrollBehavior")}),[le]);function zn(we){const He=we?(window.innerWidth-zo)/window.innerWidth:1,Ve=we?-zo:0;ye.current&&window.clearTimeout(ye.current),kt(pe.current,{transition:`transform ${ht.DURATION}s cubic-bezier(${ht.EASE.join(",")})`,transform:Et(k)?`scale(${He}) translate3d(0, ${Ve}px, 0)`:`scale(${He}) translate3d(${Ve}px, 0, 0)`}),!we&&pe.current&&(ye.current=setTimeout(()=>{const Ce=Al(pe.current,k);kt(pe.current,{transition:"none",transform:Et(k)?`translate3d(0, ${Ce}px, 0)`:`translate3d(${Ce}px, 0, 0)`})},500))}function Nr(we,He){if(He<0)return;const Ve=(window.innerWidth-zo)/window.innerWidth,Ce=Ve+He*(1-Ve),Le=-zo+He*zo;kt(pe.current,{transform:Et(k)?`scale(${Ce}) translate3d(0, ${Le}px, 0)`:`scale(${Ce}) translate3d(${Le}px, 0, 0)`,transition:"none"})}function Rn(we,He){const Ve=Et(k)?window.innerHeight:window.innerWidth,Ce=He?(Ve-zo)/Ve:1,Le=He?-zo:0;He&&kt(pe.current,{transition:`transform ${ht.DURATION}s cubic-bezier(${ht.EASE.join(",")})`,transform:Et(k)?`scale(${Ce}) translate3d(0, ${Le}px, 0)`:`scale(${Ce}) translate3d(${Le}px, 0, 0)`})}return F.useEffect(()=>{S||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[S]),F.createElement(dp,{defaultOpen:P,onOpenChange:we=>{!x&&!we||(we?z(!0):Ht(!0),Z(we))},open:le},F.createElement(Z0.Provider,{value:{activeSnapPoint:at,snapPoints:l,setActiveSnapPoint:Xt,drawerRef:pe,overlayRef:ne,onOpenChange:n,onPress:ln,onRelease:sr,onDrag:jt,dismissible:x,shouldAnimate:ce,handleOnly:m,isOpen:le,isDragging:J,shouldFade:Cr,closeDrawer:Ht,onNestedDrag:Nr,onNestedOpenChange:zn,onNestedRelease:Rn,keyboardIsOpen:Ne,modal:S,snapPointsOffset:Dt,activeSnapPointIndex:ut,direction:k,shouldScaleBackground:f,setBackgroundColorOnScale:d,noBodyStyles:N,container:U,autoFocus:ee}},o))}const lw=F.forwardRef(function({...e},n){const{overlayRef:o,snapPoints:s,onRelease:a,shouldFade:l,isOpen:f,modal:d,shouldAnimate:h}=da(),v=nw(n,o),x=s&&s.length>0;if(!d)return null;const m=F.useCallback(b=>a(b),[a]);return F.createElement(Ec,{onMouseUp:m,ref:v,"data-vaul-overlay":"","data-vaul-snap-points":f&&x?"true":"false","data-vaul-snap-points-overlay":f&&l?"true":"false","data-vaul-animate":h!=null&&h.current?"true":"false",...e})});lw.displayName="Drawer.Overlay";const cw=F.forwardRef(function({onPointerDownOutside:e,style:n,onOpenAutoFocus:o,...s},a){const{drawerRef:l,onPress:f,onRelease:d,onDrag:h,keyboardIsOpen:v,snapPointsOffset:x,activeSnapPointIndex:m,modal:b,isOpen:E,direction:T,snapPoints:w,container:S,handleOnly:C,shouldAnimate:j,autoFocus:N}=da(),[k,P]=F.useState(!1),D=nw(a,l),_=F.useRef(null),L=F.useRef(null),H=F.useRef(!1),W=w&&w.length>0;ik();const U=(Y,X,le=0)=>{if(H.current)return!0;const Z=Math.abs(Y.y),q=Math.abs(Y.x),z=q>Z,J=["bottom","right"].includes(X)?1:-1;if(X==="left"||X==="right"){if(!(Y.x*J<0)&&q>=0&&q<=le)return z}else if(!(Y.y*J<0)&&Z>=0&&Z<=le)return!z;return H.current=!0,!0};F.useEffect(()=>{W&&window.requestAnimationFrame(()=>{P(!0)})},[]);function ee(Y){_.current=null,H.current=!1,d(Y)}return F.createElement(Nc,{"data-vaul-drawer-direction":T,"data-vaul-drawer":"","data-vaul-delayed-snap-points":k?"true":"false","data-vaul-snap-points":E&&W?"true":"false","data-vaul-custom-container":S?"true":"false","data-vaul-animate":j!=null&&j.current?"true":"false",...s,ref:D,style:x&&x.length>0?{"--snap-point-height":`${x[m??0]}px`,...n}:n,onPointerDown:Y=>{C||(s.onPointerDown==null||s.onPointerDown.call(s,Y),_.current={x:Y.pageX,y:Y.pageY},f(Y))},onOpenAutoFocus:Y=>{o==null||o(Y),N||Y.preventDefault()},onPointerDownOutside:Y=>{if(e==null||e(Y),!b||Y.defaultPrevented){Y.preventDefault();return}v.current&&(v.current=!1)},onFocusOutside:Y=>{if(!b){Y.preventDefault();return}},onPointerMove:Y=>{if(L.current=Y,C||(s.onPointerMove==null||s.onPointerMove.call(s,Y),!_.current))return;const X=Y.pageY-_.current.y,le=Y.pageX-_.current.x,Z=Y.pointerType==="touch"?10:2;U({x:le,y:X},T,Z)?h(Y):(Math.abs(le)>Z||Math.abs(X)>Z)&&(_.current=null)},onPointerUp:Y=>{s.onPointerUp==null||s.onPointerUp.call(s,Y),_.current=null,H.current=!1,d(Y)},onPointerOut:Y=>{s.onPointerOut==null||s.onPointerOut.call(s,Y),ee(L.current)},onContextMenu:Y=>{s.onContextMenu==null||s.onContextMenu.call(s,Y),L.current&&ee(L.current)}})});cw.displayName="Drawer.Content";const ck=250,uk=120,dk=F.forwardRef(function({preventCycle:e=!1,children:n,...o},s){const{closeDrawer:a,isDragging:l,snapPoints:f,activeSnapPoint:d,setActiveSnapPoint:h,dismissible:v,handleOnly:x,isOpen:m,onPress:b,onDrag:E}=da(),T=F.useRef(null),w=F.useRef(!1);function S(){if(w.current){N();return}window.setTimeout(()=>{C()},uk)}function C(){if(l||e||w.current){N();return}if(N(),!f||f.length===0){v||a();return}if(d===f[f.length-1]&&v){a();return}const P=f.findIndex(_=>_===d);if(P===-1)return;const D=f[P+1];h(D)}function j(){T.current=window.setTimeout(()=>{w.current=!0},ck)}function N(){T.current&&window.clearTimeout(T.current),w.current=!1}return F.createElement("div",{onClick:S,onPointerCancel:N,onPointerDown:k=>{x&&b(k),j()},onPointerMove:k=>{x&&E(k)},ref:s,"data-vaul-drawer-visible":m?"true":"false","data-vaul-handle":"","aria-hidden":"true",...o},F.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},n))});dk.displayName="Drawer.Handle";function fk(e){const n=da(),{container:o=n.container,...s}=e;return F.createElement(pp,{container:o,...s})}const or={Root:lk,Content:cw,Overlay:lw,Trigger:fp,Portal:fk,Close:Tc,Title:jc,Description:Rc},Dp=({shouldScaleBackground:e=!0,...n})=>c.jsx(or.Root,{shouldScaleBackground:e,...n});Dp.displayName="Drawer";const uw=or.Trigger,pk=or.Portal,dw=or.Close,fw=g.forwardRef(({className:e,...n},o)=>c.jsx(or.Overlay,{ref:o,className:je("fixed inset-0 z-50 bg-black/80",e),...n}));fw.displayName=or.Overlay.displayName;const Ap=g.forwardRef(({className:e,children:n,...o},s)=>c.jsxs(pk,{children:[c.jsx(fw,{}),c.jsxs(or.Content,{ref:s,className:je("fixed inset-x-0 bottom-0 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background z-[10000]",e),...o,children:[c.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),n]})]}));Ap.displayName="DrawerContent";const Op=({className:e,...n})=>c.jsx("div",{className:je("grid gap-1.5 p-4 text-center sm:text-left",e),...n});Op.displayName="DrawerHeader";const Mp=({className:e,...n})=>c.jsx("div",{className:je("mt-auto flex flex-col gap-2 p-4",e),...n});Mp.displayName="DrawerFooter";const Ip=g.forwardRef(({className:e,...n},o)=>c.jsx(or.Title,{ref:o,className:je("text-lg font-semibold leading-none tracking-tight",e),...n}));Ip.displayName=or.Title.displayName;const Lp=g.forwardRef(({className:e,...n},o)=>c.jsx(or.Description,{ref:o,className:je("text-sm text-muted-foreground",e),...n}));Lp.displayName=or.Description.displayName;function hk(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return g.useMemo(()=>s=>{n.forEach(a=>a(s))},n)}const Fc=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ks(e){const n=Object.prototype.toString.call(e);return n==="[object Window]"||n==="[object global]"}function Fp(e){return"nodeType"in e}function xn(e){var n,o;return e?Ks(e)?e:Fp(e)&&(n=(o=e.ownerDocument)==null?void 0:o.defaultView)!=null?n:window:window}function $p(e){const{Document:n}=xn(e);return e instanceof n}function fa(e){return Ks(e)?!1:e instanceof xn(e).HTMLElement}function pw(e){return e instanceof xn(e).SVGElement}function Ys(e){return e?Ks(e)?e.document:Fp(e)?$p(e)?e:fa(e)||pw(e)?e.ownerDocument:document:document:document}const xr=Fc?g.useLayoutEffect:g.useEffect;function zp(e){const n=g.useRef(e);return xr(()=>{n.current=e}),g.useCallback(function(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];return n.current==null?void 0:n.current(...s)},[])}function mk(){const e=g.useRef(null),n=g.useCallback((s,a)=>{e.current=setInterval(s,a)},[]),o=g.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[n,o]}function qi(e,n){n===void 0&&(n=[e]);const o=g.useRef(e);return xr(()=>{o.current!==e&&(o.current=e)},n),o}function pa(e,n){const o=g.useRef();return g.useMemo(()=>{const s=e(o.current);return o.current=s,s},[...n])}function oc(e){const n=zp(e),o=g.useRef(null),s=g.useCallback(a=>{a!==o.current&&(n==null||n(a,o.current)),o.current=a},[]);return[o,s]}function Of(e){const n=g.useRef();return g.useEffect(()=>{n.current=e},[e]),n.current}let sf={};function ha(e,n){return g.useMemo(()=>{if(n)return n;const o=sf[e]==null?0:sf[e]+1;return sf[e]=o,e+"-"+o},[e,n])}function hw(e){return function(n){for(var o=arguments.length,s=new Array(o>1?o-1:0),a=1;a<o;a++)s[a-1]=arguments[a];return s.reduce((l,f)=>{const d=Object.entries(f);for(const[h,v]of d){const x=l[h];x!=null&&(l[h]=x+e*v)}return l},{...n})}}const ks=hw(1),Qi=hw(-1);function gk(e){return"clientX"in e&&"clientY"in e}function Bp(e){if(!e)return!1;const{KeyboardEvent:n}=xn(e.target);return n&&e instanceof n}function vk(e){if(!e)return!1;const{TouchEvent:n}=xn(e.target);return n&&e instanceof n}function Mf(e){if(vk(e)){if(e.touches&&e.touches.length){const{clientX:n,clientY:o}=e.touches[0];return{x:n,y:o}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:n,clientY:o}=e.changedTouches[0];return{x:n,y:o}}}return gk(e)?{x:e.clientX,y:e.clientY}:null}const Ji=Object.freeze({Translate:{toString(e){if(!e)return;const{x:n,y:o}=e;return"translate3d("+(n?Math.round(n):0)+"px, "+(o?Math.round(o):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:n,scaleY:o}=e;return"scaleX("+n+") scaleY("+o+")"}},Transform:{toString(e){if(e)return[Ji.Translate.toString(e),Ji.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:n,duration:o,easing:s}=e;return n+" "+o+"ms "+s}}}),Hv="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function yk(e){return e.matches(Hv)?e:e.querySelector(Hv)}const xk={display:"none"};function wk(e){let{id:n,value:o}=e;return F.createElement("div",{id:n,style:xk},o)}function bk(e){let{id:n,announcement:o,ariaLiveType:s="assertive"}=e;const a={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return F.createElement("div",{id:n,style:a,role:"status","aria-live":s,"aria-atomic":!0},o)}function Sk(){const[e,n]=g.useState("");return{announce:g.useCallback(s=>{s!=null&&n(s)},[]),announcement:e}}const mw=g.createContext(null);function Ck(e){const n=g.useContext(mw);g.useEffect(()=>{if(!n)throw new Error("useDndMonitor must be used within a children of <DndContext>");return n(e)},[e,n])}function Ek(){const[e]=g.useState(()=>new Set),n=g.useCallback(s=>(e.add(s),()=>e.delete(s)),[e]);return[g.useCallback(s=>{let{type:a,event:l}=s;e.forEach(f=>{var d;return(d=f[a])==null?void 0:d.call(f,l)})},[e]),n]}const Nk={draggable:`275 ){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function YN(){const e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function KN(){return kd(/^Mac/)}function XN(){return kd(/^iPhone/)}function Jv(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function GN(){return kd(/^iPad/)||KN()&&navigator.maxTouchPoints>1}function Zv(){return XN()||GN()}function kd(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const qN=24,QN=typeof window<"u"?g.useLayoutEffect:g.useEffect;function ey(...e){return(...n)=>{for(let o of e)typeof o=="function"&&o(...n)}}const jd=typeof document<"u"&&window.visualViewport;function ty(e){let n=window.getComputedStyle(e);return/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY)}function ny(e){for(ty(e)&&(e=e.parentElement);e&&!ty(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const JN=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let bl=0,Rd;function ZN(e={}){let{isDisabled:n}=e;QN(()=>{if(!n)return bl++,bl===1&&Zv()&&(Rd=ek()),()=>{bl--,bl===0&&(Rd==null||Rd())}},[n])}function ek(){let e,n=0,o=m=>{e=ny(m.target),!(e===document.documentElement&&e===document.body)&&(n=m.changedTouches[0].pageY)},s=m=>{if(!e||e===document.documentElement||e===document.body){m.preventDefault();return}let b=m.changedTouches[0].pageY,E=e.scrollTop,j=e.scrollHeight-e.clientHeight;j!==0&&((E<=0&&b>n||E>=j&&b<n)&&m.preventDefault(),n=b)},a=m=>{let b=m.target;Td(b)&&b!==document.activeElement&&(m.preventDefault(),b.style.transform="translateY(-2000px)",b.focus(),requestAnimationFrame(()=>{b.style.transform=""}))},l=m=>{let b=m.target;Td(b)&&(b.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{b.style.transform="",jd&&(jd.height<window.innerHeight?requestAnimationFrame(()=>{ry(b)}):jd.addEventListener("resize",()=>ry(b),{once:!0}))}))},f=()=>{window.scrollTo(0,0)},d=window.pageXOffset,h=window.pageYOffset,v=ey(tk(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let w=ey(_i(document,"touchstart",o,{passive:!1,capture:!0}),_i(document,"touchmove",s,{passive:!1,capture:!0}),_i(document,"touchend",a,{passive:!1,capture:!0}),_i(document,"focus",l,!0),_i(window,"scroll",f));return()=>{v(),w(),window.scrollTo(d,h)}}function tk(e,n,o){let s=e.style[n];return e.style[n]=o,()=>{e.style[n]=s}}function _i(e,n,o,s){return e.addEventListener(n,o,s),()=>{e.removeEventListener(n,o,s)}}function ry(e){let n=document.scrollingElement||document.documentElement;for(;e&&e!==n;){let o=ny(e);if(o!==document.documentElement&&o!==document.body&&o!==e){let s=o.getBoundingClientRect().top,a=e.getBoundingClientRect().top,l=e.getBoundingClientRect().bottom;const f=o.getBoundingClientRect().bottom+qN;l>f&&(o.scrollTop+=a-s)}e=o.parentElement}}function Td(e){return e instanceof HTMLInputElement&&!JN.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function nk(e,n){typeof e=="function"?e(n):e!=null&&(e.current=n)}function rk(...e){return n=>e.forEach(o=>nk(o,n))}function oy(...e){return g.useCallback(rk(...e),e)}const sy=new WeakMap;function Rt(e,n,o=!1){if(!e||!(e instanceof HTMLElement))return;let s={};Object.entries(n).forEach(([a,l])=>{if(a.startsWith("--")){e.style.setProperty(a,l);return}s[a]=e.style[a],e.style[a]=l}),!o&&sy.set(e,s)}function ok(e,n){if(!e||!(e instanceof HTMLElement))return;let o=sy.get(e);o&&(e.style[n]=o[n])}const Nt=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function Sl(e,n){if(!e)return null;const o=window.getComputedStyle(e),s=o.transform||o.webkitTransform||o.mozTransform;let a=s.match(/^matrix3d\((.+)\)$/);return a?parseFloat(a[1].split(", ")[Nt(n)?13:12]):(a=s.match(/^matrix\((.+)\)$/),a?parseFloat(a[1].split(", ")[Nt(n)?5:4]):null)}function sk(e){return 8*(Math.log(e+1)-2)}function Pd(e,n){if(!e)return()=>{};const o=e.style.cssText;return Object.assign(e.style,n),()=>{e.style.cssText=o}}function ik(...e){return(...n)=>{for(const o of e)typeof o=="function"&&o(...n)}}const pt={DURATION:.5,EASE:[.32,.72,0,1]},iy=.4,ak=.25,lk=100,ay=8,Mo=16,Dd=26,Ad="vaul-dragging";function ly(e){const n=z.useRef(e);return z.useEffect(()=>{n.current=e}),z.useMemo(()=>(...o)=>n.current==null?void 0:n.current.call(n,...o),[])}function ck({defaultProp:e,onChange:n}){const o=z.useState(e),[s]=o,a=z.useRef(s),l=ly(n);return z.useEffect(()=>{a.current!==s&&(l(s),a.current=s)},[s,a,l]),o}function cy({prop:e,defaultProp:n,onChange:o=()=>{}}){const[s,a]=ck({defaultProp:n,onChange:o}),l=e!==void 0,f=l?e:s,d=ly(o),h=z.useCallback(v=>{if(l){const m=typeof v=="function"?v(e):v;m!==e&&d(m)}else a(v)},[l,e,a,d]);return[f,h]}function uk({activeSnapPointProp:e,setActiveSnapPointProp:n,snapPoints:o,drawerRef:s,overlayRef:a,fadeFromIndex:l,onSnapPointChange:f,direction:d="bottom",container:h,snapToSequentialPoint:v}){const[w,m]=cy({prop:e,defaultProp:o==null?void 0:o[0],onChange:n}),[b,E]=z.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);z.useEffect(()=>{function D(){E({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",D),()=>window.removeEventListener("resize",D)},[]);const j=z.useMemo(()=>w===(o==null?void 0:o[o.length-1])||null,[o,w]),x=z.useMemo(()=>{var D;return(D=o==null?void 0:o.findIndex(F=>F===w))!=null?D:null},[o,w]),S=o&&o.length>0&&(l||l===0)&&!Number.isNaN(l)&&o[l]===w||!o,C=z.useMemo(()=>{const D=h?{width:h.getBoundingClientRect().width,height:h.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var F;return(F=o==null?void 0:o.map(V=>{const Y=typeof V=="string";let H=0;if(Y&&(H=parseInt(V,10)),Nt(d)){const X=Y?H:b?V*D.height:0;return b?d==="bottom"?D.height-X:-D.height+X:X}const te=Y?H:b?V*D.width:0;return b?d==="right"?D.width-te:-D.width+te:te}))!=null?F:[]},[o,b,h]),N=z.useMemo(()=>x!==null?C==null?void 0:C[x]:null,[C,x]),_=z.useCallback(D=>{var F;const V=(F=C==null?void 0:C.findIndex(Y=>Y===D))!=null?F:null;f(V),Rt(s.current,{transition:`transform ${pt.DURATION}s cubic-bezier(${pt.EASE.join(",")})`,transform:Nt(d)?`translate3d(0, ${D}px, 0)`:`translate3d(${D}px, 0, 0)`}),C&&V!==C.length-1&&l!==void 0&&V!==l&&V<l?Rt(a.current,{transition:`opacity ${pt.DURATION}s cubic-bezier(${pt.EASE.join(",")})`,opacity:"0"}):Rt(a.current,{transition:`opacity ${pt.DURATION}s cubic-bezier(${pt.EASE.join(",")})`,opacity:"1"}),m(o==null?void 0:o[Math.max(V,0)])},[s.current,o,C,l,a,m]);z.useEffect(()=>{if(w||e){var D;const F=(D=o==null?void 0:o.findIndex(V=>V===e||V===w))!=null?D:-1;C&&F!==-1&&typeof C[F]=="number"&&_(C[F])}},[w,e,o,C,_]);function R({draggedDistance:D,closeDrawer:F,velocity:V,dismissible:Y}){if(l===void 0)return;const H=d==="bottom"||d==="right"?(N??0)-D:(N??0)+D,te=x===l-1,X=x===0,q=D>0;if(te&&Rt(a.current,{transition:`opacity ${pt.DURATION}s cubic-bezier(${pt.EASE.join(",")})`}),!v&&V>2&&!q){Y?F():_(C[0]);return}if(!v&&V>2&&q&&C&&o){_(C[o.length-1]);return}const ce=C==null?void 0:C.reduce((Q,B)=>typeof Q!="number"||typeof B!="number"?Q:Math.abs(B-H)<Math.abs(Q-H)?B:Q),ee=Nt(d)?window.innerHeight:window.innerWidth;if(V>iy&&Math.abs(D)<ee*.4){const Q=q?1:-1;if(Q>0&&j&&o){_(C[o.length-1]);return}if(X&&Q<0&&Y&&F(),x===null)return;_(C[x+Q]);return}_(ce)}function P({draggedDistance:D}){if(N===null)return;const F=d==="bottom"||d==="right"?N-D:N+D;(d==="bottom"||d==="right")&&F<C[C.length-1]||(d==="top"||d==="left")&&F>C[C.length-1]||Rt(s.current,{transform:Nt(d)?`translate3d(0, ${F}px, 0)`:`translate3d(${F}px, 0, 0)`})}function A(D,F){if(!o||typeof x!="number"||!C||l===void 0)return null;const V=x===l-1;if(x>=l&&F)return 0;if(V&&!F)return 1;if(!S&&!V)return null;const H=V?x+1:x-1,te=V?C[H]-C[H-1]:C[H+1]-C[H],X=D/Math.abs(te);return V?1-X:X}return{isLastSnapPoint:j,activeSnapPoint:w,shouldFade:S,getPercentageDragged:A,setActiveSnapPoint:m,activeSnapPointIndex:x,onRelease:R,onDrag:P,snapPointsOffset:C}}const dk=()=>()=>{};function fk(){const{direction:e,isOpen:n,shouldScaleBackground:o,setBackgroundColorOnScale:s,noBodyStyles:a}=Ci(),l=z.useRef(null),f=g.useMemo(()=>document.body.style.backgroundColor,[]);function d(){return(window.innerWidth-Dd)/window.innerWidth}z.useEffect(()=>{if(n&&o){l.current&&clearTimeout(l.current);const h=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!h)return;ik(s&&!a?Pd(document.body,{background:"black"}):dk,Pd(h,{transformOrigin:Nt(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${pt.DURATION}s`,transitionTimingFunction:`cubic-bezier(${pt.EASE.join(",")})`}));const v=Pd(h,{borderRadius:`${ay}px`,overflow:"hidden",...Nt(e)?{transform:`scale(${d()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${d()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{v(),l.current=window.setTimeout(()=>{f?document.body.style.background=f:document.body.style.removeProperty("background")},pt.DURATION*1e3)}}},[n,o,f])}let Ei=null;function pk({isOpen:e,modal:n,nested:o,hasBeenOpened:s,preventScrollRestoration:a,noBodyStyles:l}){const[f,d]=z.useState(()=>typeof window<"u"?window.location.href:""),h=z.useRef(0),v=z.useCallback(()=>{if(Jv()&&Ei===null&&e&&!l){Ei={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:m,innerHeight:b}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-h.current}px`,left:`${-m}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const E=b-window.innerHeight;E&&h.current>=b&&(document.body.style.top=`${-(h.current+E)}px`)}),300)}},[e]),w=z.useCallback(()=>{if(Jv()&&Ei!==null&&!l){const m=-parseInt(document.body.style.top,10),b=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Ei),window.requestAnimationFrame(()=>{if(a&&f!==window.location.href){d(window.location.href);return}window.scrollTo(b,m)}),Ei=null}},[f]);return z.useEffect(()=>{function m(){h.current=window.scrollY}return m(),window.addEventListener("scroll",m),()=>{window.removeEventListener("scroll",m)}},[]),z.useEffect(()=>{if(n)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||w()}},[n,w]),z.useEffect(()=>{o||!s||(e?(!window.matchMedia("(display-mode: standalone)").matches&&v(),n||window.setTimeout(()=>{w()},500)):w())},[e,s,f,n,o,v,w]),{restorePositionSetting:w}}function hk({open:e,onOpenChange:n,children:o,onDrag:s,onRelease:a,snapPoints:l,shouldScaleBackground:f=!1,setBackgroundColorOnScale:d=!0,closeThreshold:h=ak,scrollLockTimeout:v=lk,dismissible:w=!0,handleOnly:m=!1,fadeFromIndex:b=l&&l.length-1,activeSnapPoint:E,setActiveSnapPoint:j,fixed:x,modal:S=!0,onClose:C,nested:N,noBodyStyles:_=!1,direction:R="bottom",defaultOpen:P=!1,disablePreventScroll:A=!0,snapToSequentialPoint:D=!1,preventScrollRestoration:F=!1,repositionInputs:V=!0,onAnimationEnd:Y,container:H,autoFocus:te=!1}){var X,q;const[ce=!1,ee]=cy({defaultProp:P,prop:e,onChange:be=>{n==null||n(be),!be&&!N&&hn(),setTimeout(()=>{Y==null||Y(be)},pt.DURATION*1e3),be&&!S&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),be||(document.body.style.pointerEvents="auto")}}),[Q,B]=z.useState(!1),[Z,ne]=z.useState(!1),[M,K]=z.useState(!1),re=z.useRef(null),G=z.useRef(null),fe=z.useRef(null),me=z.useRef(null),le=z.useRef(null),ie=z.useRef(!1),we=z.useRef(null),pe=z.useRef(0),Ne=z.useRef(!1),ue=z.useRef(!P),Me=z.useRef(0),he=z.useRef(null),et=z.useRef(((X=he.current)==null?void 0:X.getBoundingClientRect().height)||0),Ct=z.useRef(((q=he.current)==null?void 0:q.getBoundingClientRect().width)||0),wt=z.useRef(0),On=z.useCallback(be=>{l&&be===$t.length-1&&(G.current=new Date)},[]),{activeSnapPoint:ct,activeSnapPointIndex:ht,setActiveSnapPoint:Jt,onRelease:ut,snapPointsOffset:$t,onDrag:Pr,shouldFade:Dr,getPercentageDragged:Zn}=uk({snapPoints:l,activeSnapPointProp:E,setActiveSnapPointProp:j,drawerRef:he,fadeFromIndex:b,overlayRef:re,onSnapPointChange:On,direction:R,container:H,snapToSequentialPoint:D});ZN({isDisabled:!ce||Z||!S||M||!Q||!V||!A});const{restorePositionSetting:hn}=pk({isOpen:ce,modal:S,nested:N??!1,hasBeenOpened:Q,preventScrollRestoration:F,noBodyStyles:_});function Pt(){return(window.innerWidth-Dd)/window.innerWidth}function mn(be){var Ve,We;!w&&!l||he.current&&!he.current.contains(be.target)||(et.current=((Ve=he.current)==null?void 0:Ve.getBoundingClientRect().height)||0,Ct.current=((We=he.current)==null?void 0:We.getBoundingClientRect().width)||0,ne(!0),fe.current=new Date,Zv()&&window.addEventListener("touchend",()=>ie.current=!1,{once:!0}),be.target.setPointerCapture(be.pointerId),pe.current=Nt(R)?be.pageY:be.pageX)}function Bt(be,Ve){var We;let _e=be;const ze=(We=window.getSelection())==null?void 0:We.toString(),ge=he.current?Sl(he.current,R):null,Ae=new Date;if(_e.tagName==="SELECT"||_e.hasAttribute("data-vaul-no-drag")||_e.closest("[data-vaul-no-drag]"))return!1;if(R==="right"||R==="left")return!0;if(G.current&&Ae.getTime()-G.current.getTime()<500)return!1;if(ge!==null&&(R==="bottom"?ge>0:ge<0))return!0;if(ze&&ze.length>0)return!1;if(le.current&&Ae.getTime()-le.current.getTime()<v&&ge===0||Ve)return le.current=Ae,!1;for(;_e;){if(_e.scrollHeight>_e.clientHeight){if(_e.scrollTop!==0)return le.current=new Date,!1;if(_e.getAttribute("role")==="dialog")return!0}_e=_e.parentNode}return!0}function Dt(be){if(he.current&&Z){const Ve=R==="bottom"||R==="right"?1:-1,We=(pe.current-(Nt(R)?be.pageY:be.pageX))*Ve,_e=We>0,ze=l&&!w&&!_e;if(ze&&ht===0)return;const ge=Math.abs(We),Ae=document.querySelector("[data-vaul-drawer-wrapper]"),$e=R==="bottom"||R==="top"?et.current:Ct.current;let Le=ge/$e;const rt=Zn(ge,_e);if(rt!==null&&(Le=rt),ze&&Le>=1||!ie.current&&!Bt(be.target,_e))return;if(he.current.classList.add(Ad),ie.current=!0,Rt(he.current,{transition:"none"}),Rt(re.current,{transition:"none"}),l&&Pr({draggedDistance:We}),_e&&!l){const Pe=sk(We),xt=Math.min(Pe*-1,0)*Ve;Rt(he.current,{transform:Nt(R)?`translate3d(0, ${xt}px, 0)`:`translate3d(${xt}px, 0, 0)`});return}const Ye=1-Le;if((Dr||b&&ht===b-1)&&(s==null||s(be,Le),Rt(re.current,{opacity:`${Ye}`,transition:"none"},!0)),Ae&&re.current&&f){const Pe=Math.min(Pt()+Le*(1-Pt()),1),xt=8-Le*8,Je=Math.max(0,14-Le*14);Rt(Ae,{borderRadius:`${xt}px`,transform:Nt(R)?`scale(${Pe}) translate3d(0, ${Je}px, 0)`:`scale(${Pe}) translate3d(${Je}px, 0, 0)`,transition:"none"},!0)}if(!l){const Pe=ge*Ve;Rt(he.current,{transform:Nt(R)?`translate3d(0, ${Pe}px, 0)`:`translate3d(${Pe}px, 0, 0)`})}}}z.useEffect(()=>{window.requestAnimationFrame(()=>{ue.current=!0})},[]),z.useEffect(()=>{var be;function Ve(){if(!he.current||!V)return;const We=document.activeElement;if(Td(We)||Ne.current){var _e;const ze=((_e=window.visualViewport)==null?void 0:_e.height)||0,ge=window.innerHeight;let Ae=ge-ze;const $e=he.current.getBoundingClientRect().height||0,Le=$e>ge*.8;wt.current||(wt.current=$e);const rt=he.current.getBoundingClientRect().top;if(Math.abs(Me.current-Ae)>60&&(Ne.current=!Ne.current),l&&l.length>0&&$t&&ht){const Ye=$t[ht]||0;Ae+=Ye}if(Me.current=Ae,$e>ze||Ne.current){const Ye=he.current.getBoundingClientRect().height;let Pe=Ye;Ye>ze&&(Pe=ze-(Le?rt:Dd)),x?he.current.style.height=`${Ye-Math.max(Ae,0)}px`:he.current.style.height=`${Math.max(Pe,ze-rt)}px`}else YN()||(he.current.style.height=`${wt.current}px`);l&&l.length>0&&!Ne.current?he.current.style.bottom="0px":he.current.style.bottom=`${Math.max(Ae,0)}px`}}return(be=window.visualViewport)==null||be.addEventListener("resize",Ve),()=>{var We;return(We=window.visualViewport)==null?void 0:We.removeEventListener("resize",Ve)}},[ht,l,$t]);function Gt(be){lo(),C==null||C(),be||ee(!1),setTimeout(()=>{l&&Jt(l[0])},pt.DURATION*1e3)}function Ar(){if(!he.current)return;const be=document.querySelector("[data-vaul-drawer-wrapper]"),Ve=Sl(he.current,R);Rt(he.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${pt.DURATION}s cubic-bezier(${pt.EASE.join(",")})`}),Rt(re.current,{transition:`opacity ${pt.DURATION}s cubic-bezier(${pt.EASE.join(",")})`,opacity:"1"}),f&&Ve&&Ve>0&&ce&&Rt(be,{borderRadius:`${ay}px`,overflow:"hidden",...Nt(R)?{transform:`scale(${Pt()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${Pt()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${pt.DURATION}s`,transitionTimingFunction:`cubic-bezier(${pt.EASE.join(",")})`},!0)}function lo(){!Z||!he.current||(he.current.classList.remove(Ad),ie.current=!1,ne(!1),me.current=new Date)}function wr(be){if(!Z||!he.current)return;he.current.classList.remove(Ad),ie.current=!1,ne(!1),me.current=new Date;const Ve=Sl(he.current,R);if(!be||!Bt(be.target,!1)||!Ve||Number.isNaN(Ve)||fe.current===null)return;const We=me.current.getTime()-fe.current.getTime(),_e=pe.current-(Nt(R)?be.pageY:be.pageX),ze=Math.abs(_e)/We;if(ze>.05&&(K(!0),setTimeout(()=>{K(!1)},200)),l){ut({draggedDistance:_e*(R==="bottom"||R==="right"?1:-1),closeDrawer:Gt,velocity:ze,dismissible:w}),a==null||a(be,!0);return}if(R==="bottom"||R==="right"?_e>0:_e<0){Ar(),a==null||a(be,!0);return}if(ze>iy){Gt(),a==null||a(be,!1);return}var ge;const Ae=Math.min((ge=he.current.getBoundingClientRect().height)!=null?ge:0,window.innerHeight);var $e;const Le=Math.min(($e=he.current.getBoundingClientRect().width)!=null?$e:0,window.innerWidth),rt=R==="left"||R==="right";if(Math.abs(Ve)>=(rt?Le:Ae)*h){Gt(),a==null||a(be,!1);return}a==null||a(be,!0),Ar()}z.useEffect(()=>(ce&&(Rt(document.documentElement,{scrollBehavior:"auto"}),G.current=new Date),()=>{ok(document.documentElement,"scrollBehavior")}),[ce]);function er(be){const Ve=be?(window.innerWidth-Mo)/window.innerWidth:1,We=be?-Mo:0;we.current&&window.clearTimeout(we.current),Rt(he.current,{transition:`transform ${pt.DURATION}s cubic-bezier(${pt.EASE.join(",")})`,transform:Nt(R)?`scale(${Ve}) translate3d(0, ${We}px, 0)`:`scale(${Ve}) translate3d(${We}px, 0, 0)`}),!be&&he.current&&(we.current=setTimeout(()=>{const _e=Sl(he.current,R);Rt(he.current,{transition:"none",transform:Nt(R)?`translate3d(0, ${_e}px, 0)`:`translate3d(${_e}px, 0, 0)`})},500))}function Or(be,Ve){if(Ve<0)return;const We=(window.innerWidth-Mo)/window.innerWidth,_e=We+Ve*(1-We),ze=-Mo+Ve*Mo;Rt(he.current,{transform:Nt(R)?`scale(${_e}) translate3d(0, ${ze}px, 0)`:`scale(${_e}) translate3d(${ze}px, 0, 0)`,transition:"none"})}function Mn(be,Ve){const We=Nt(R)?window.innerHeight:window.innerWidth,_e=Ve?(We-Mo)/We:1,ze=Ve?-Mo:0;Ve&&Rt(he.current,{transition:`transform ${pt.DURATION}s cubic-bezier(${pt.EASE.join(",")})`,transform:Nt(R)?`scale(${_e}) translate3d(0, ${ze}px, 0)`:`scale(${_e}) translate3d(${ze}px, 0, 0)`})}return z.useEffect(()=>{S||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[S]),z.createElement(Gu,{defaultOpen:P,onOpenChange:be=>{!w&&!be||(be?B(!0):Gt(!0),ee(be))},open:ce},z.createElement(Qv.Provider,{value:{activeSnapPoint:ct,snapPoints:l,setActiveSnapPoint:Jt,drawerRef:he,overlayRef:re,onOpenChange:n,onPress:mn,onRelease:wr,onDrag:Dt,dismissible:w,shouldAnimate:ue,handleOnly:m,isOpen:ce,isDragging:Z,shouldFade:Dr,closeDrawer:Gt,onNestedDrag:Or,onNestedOpenChange:er,onNestedRelease:Mn,keyboardIsOpen:Ne,modal:S,snapPointsOffset:$t,activeSnapPointIndex:ht,direction:R,shouldScaleBackground:f,setBackgroundColorOnScale:d,noBodyStyles:_,container:H,autoFocus:te}},o))}const uy=z.forwardRef(function({...e},n){const{overlayRef:o,snapPoints:s,onRelease:a,shouldFade:l,isOpen:f,modal:d,shouldAnimate:h}=Ci(),v=oy(n,o),w=s&&s.length>0;if(!d)return null;const m=z.useCallback(b=>a(b),[a]);return z.createElement(Wa,{onMouseUp:m,ref:v,"data-vaul-overlay":"","data-vaul-snap-points":f&&w?"true":"false","data-vaul-snap-points-overlay":f&&l?"true":"false","data-vaul-animate":h!=null&&h.current?"true":"false",...e})});uy.displayName="Drawer.Overlay";const dy=z.forwardRef(function({onPointerDownOutside:e,style:n,onOpenAutoFocus:o,...s},a){const{drawerRef:l,onPress:f,onRelease:d,onDrag:h,keyboardIsOpen:v,snapPointsOffset:w,activeSnapPointIndex:m,modal:b,isOpen:E,direction:j,snapPoints:x,container:S,handleOnly:C,shouldAnimate:N,autoFocus:_}=Ci(),[R,P]=z.useState(!1),A=oy(a,l),D=z.useRef(null),F=z.useRef(null),V=z.useRef(!1),Y=x&&x.length>0;fk();const H=(X,q,ce=0)=>{if(V.current)return!0;const ee=Math.abs(X.y),Q=Math.abs(X.x),B=Q>ee,Z=["bottom","right"].includes(q)?1:-1;if(q==="left"||q==="right"){if(!(X.x*Z<0)&&Q>=0&&Q<=ce)return B}else if(!(X.y*Z<0)&&ee>=0&&ee<=ce)return!B;return V.current=!0,!0};z.useEffect(()=>{Y&&window.requestAnimationFrame(()=>{P(!0)})},[]);function te(X){D.current=null,V.current=!1,d(X)}return z.createElement(Ya,{"data-vaul-drawer-direction":j,"data-vaul-drawer":"","data-vaul-delayed-snap-points":R?"true":"false","data-vaul-snap-points":E&&Y?"true":"false","data-vaul-custom-container":S?"true":"false","data-vaul-animate":N!=null&&N.current?"true":"false",...s,ref:A,style:w&&w.length>0?{"--snap-point-height":`${w[m??0]}px`,...n}:n,onPointerDown:X=>{C||(s.onPointerDown==null||s.onPointerDown.call(s,X),D.current={x:X.pageX,y:X.pageY},f(X))},onOpenAutoFocus:X=>{o==null||o(X),_||X.preventDefault()},onPointerDownOutside:X=>{if(e==null||e(X),!b||X.defaultPrevented){X.preventDefault();return}v.current&&(v.current=!1)},onFocusOutside:X=>{if(!b){X.preventDefault();return}},onPointerMove:X=>{if(F.current=X,C||(s.onPointerMove==null||s.onPointerMove.call(s,X),!D.current))return;const q=X.pageY-D.current.y,ce=X.pageX-D.current.x,ee=X.pointerType==="touch"?10:2;H({x:ce,y:q},j,ee)?h(X):(Math.abs(ce)>ee||Math.abs(q)>ee)&&(D.current=null)},onPointerUp:X=>{s.onPointerUp==null||s.onPointerUp.call(s,X),D.current=null,V.current=!1,d(X)},onPointerOut:X=>{s.onPointerOut==null||s.onPointerOut.call(s,X),te(F.current)},onContextMenu:X=>{s.onContextMenu==null||s.onContextMenu.call(s,X),F.current&&te(F.current)}})});dy.displayName="Drawer.Content";const mk=250,gk=120,vk=z.forwardRef(function({preventCycle:e=!1,children:n,...o},s){const{closeDrawer:a,isDragging:l,snapPoints:f,activeSnapPoint:d,setActiveSnapPoint:h,dismissible:v,handleOnly:w,isOpen:m,onPress:b,onDrag:E}=Ci(),j=z.useRef(null),x=z.useRef(!1);function S(){if(x.current){_();return}window.setTimeout(()=>{C()},gk)}function C(){if(l||e||x.current){_();return}if(_(),!f||f.length===0){v||a();return}if(d===f[f.length-1]&&v){a();return}const P=f.findIndex(D=>D===d);if(P===-1)return;const A=f[P+1];h(A)}function N(){j.current=window.setTimeout(()=>{x.current=!0},mk)}function _(){j.current&&window.clearTimeout(j.current),x.current=!1}return z.createElement("div",{onClick:S,onPointerCancel:_,onPointerDown:R=>{w&&b(R),N()},onPointerMove:R=>{w&&E(R)},ref:s,"data-vaul-drawer-visible":m?"true":"false","data-vaul-handle":"","aria-hidden":"true",...o},z.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},n))});vk.displayName="Drawer.Handle";function yk(e){const n=Ci(),{container:o=n.container,...s}=e;return z.createElement(Qu,{container:o,...s})}const Xn={Root:hk,Content:dy,Overlay:uy,Trigger:qu,Portal:yk,Close:Ga,Title:Ka,Description:Xa},Od=({shouldScaleBackground:e=!0,...n})=>c.jsx(Xn.Root,{shouldScaleBackground:e,...n});Od.displayName="Drawer";const fy=Xn.Trigger,wk=Xn.Portal,py=Xn.Close,hy=g.forwardRef(({className:e,...n},o)=>c.jsx(Xn.Overlay,{ref:o,className:ke("fixed inset-0 z-50 bg-black/80",e),...n}));hy.displayName=Xn.Overlay.displayName;const Md=g.forwardRef(({className:e,children:n,...o},s)=>c.jsxs(wk,{children:[c.jsx(hy,{}),c.jsxs(Xn.Content,{ref:s,className:ke("fixed inset-x-0 bottom-0 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background z-[10000]",e),...o,children:[c.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),n]})]}));Md.displayName="DrawerContent";const Id=({className:e,...n})=>c.jsx("div",{className:ke("grid gap-1.5 p-4 text-center sm:text-start",e),...n});Id.displayName="DrawerHeader";const Ld=({className:e,...n})=>c.jsx("div",{className:ke("mt-auto flex flex-col gap-2 p-4",e),...n});Ld.displayName="DrawerFooter";const Fd=g.forwardRef(({className:e,...n},o)=>c.jsx(Xn.Title,{ref:o,className:ke("text-lg font-semibold leading-none tracking-tight",e),...n}));Fd.displayName=Xn.Title.displayName;const zd=g.forwardRef(({className:e,...n},o)=>c.jsx(Xn.Description,{ref:o,className:ke("text-sm text-muted-foreground",e),...n}));zd.displayName=Xn.Description.displayName;function xk(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return g.useMemo(()=>s=>{n.forEach(a=>a(s))},n)}const Cl=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ws(e){const n=Object.prototype.toString.call(e);return n==="[object Window]"||n==="[object global]"}function $d(e){return"nodeType"in e}function pn(e){var n,o;return e?ws(e)?e:$d(e)&&(n=(o=e.ownerDocument)==null?void 0:o.defaultView)!=null?n:window:window}function Bd(e){const{Document:n}=pn(e);return e instanceof n}function Ni(e){return ws(e)?!1:e instanceof pn(e).HTMLElement}function my(e){return e instanceof pn(e).SVGElement}function xs(e){return e?ws(e)?e.document:$d(e)?Bd(e)?e:Ni(e)||my(e)?e.ownerDocument:document:document:document}const mr=Cl?g.useLayoutEffect:g.useEffect;function Ud(e){const n=g.useRef(e);return mr(()=>{n.current=e}),g.useCallback(function(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];return n.current==null?void 0:n.current(...s)},[])}function bk(){const e=g.useRef(null),n=g.useCallback((s,a)=>{e.current=setInterval(s,a)},[]),o=g.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[n,o]}function ki(e,n){n===void 0&&(n=[e]);const o=g.useRef(e);return mr(()=>{o.current!==e&&(o.current=e)},n),o}function ji(e,n){const o=g.useRef();return g.useMemo(()=>{const s=e(o.current);return o.current=s,s},[...n])}function _l(e){const n=Ud(e),o=g.useRef(null),s=g.useCallback(a=>{a!==o.current&&(n==null||n(a,o.current)),o.current=a},[]);return[o,s]}function Hd(e){const n=g.useRef();return g.useEffect(()=>{n.current=e},[e]),n.current}let Vd={};function Ri(e,n){return g.useMemo(()=>{if(n)return n;const o=Vd[e]==null?0:Vd[e]+1;return Vd[e]=o,e+"-"+o},[e,n])}function gy(e){return function(n){for(var o=arguments.length,s=new Array(o>1?o-1:0),a=1;a<o;a++)s[a-1]=arguments[a];return s.reduce((l,f)=>{const d=Object.entries(f);for(const[h,v]of d){const w=l[h];w!=null&&(l[h]=w+e*v)}return l},{...n})}}const bs=gy(1),Ti=gy(-1);function Sk(e){return"clientX"in e&&"clientY"in e}function Wd(e){if(!e)return!1;const{KeyboardEvent:n}=pn(e.target);return n&&e instanceof n}function Ck(e){if(!e)return!1;const{TouchEvent:n}=pn(e.target);return n&&e instanceof n}function Yd(e){if(Ck(e)){if(e.touches&&e.touches.length){const{clientX:n,clientY:o}=e.touches[0];return{x:n,y:o}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:n,clientY:o}=e.changedTouches[0];return{x:n,y:o}}}return Sk(e)?{x:e.clientX,y:e.clientY}:null}const Pi=Object.freeze({Translate:{toString(e){if(!e)return;const{x:n,y:o}=e;return"translate3d("+(n?Math.round(n):0)+"px, "+(o?Math.round(o):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:n,scaleY:o}=e;return"scaleX("+n+") scaleY("+o+")"}},Transform:{toString(e){if(e)return[Pi.Translate.toString(e),Pi.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:n,duration:o,easing:s}=e;return n+" "+o+"ms "+s}}}),vy="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function _k(e){return e.matches(vy)?e:e.querySelector(vy)}const Ek={display:"none"};function Nk(e){let{id:n,value:o}=e;return z.createElement("div",{id:n,style:Ek},o)}function kk(e){let{id:n,announcement:o,ariaLiveType:s="assertive"}=e;const a={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return z.createElement("div",{id:n,style:a,role:"status","aria-live":s,"aria-atomic":!0},o)}function jk(){const[e,n]=g.useState("");return{announce:g.useCallback(s=>{s!=null&&n(s)},[]),announcement:e}}const yy=g.createContext(null);function Rk(e){const n=g.useContext(yy);g.useEffect(()=>{if(!n)throw new Error("useDndMonitor must be used within a children of <DndContext>");return n(e)},[e,n])}function Tk(){const[e]=g.useState(()=>new Set),n=g.useCallback(s=>(e.add(s),()=>e.delete(s)),[e]);return[g.useCallback(s=>{let{type:a,event:l}=s;e.forEach(f=>{var d;return(d=f[a])==null?void 0:d.call(f,l)})},[e]),n]}const Pk={draggable:` 274 276 To pick up a draggable item, press the space bar. 275 277 While dragging, use the arrow keys to move the item. 276 278 Press space again to drop the item in its new position, or press escape to cancel. 277 `}, jk={onDragStart(e){let{active:n}=e;return"Picked up draggable item "+n.id+"."},onDragOver(e){let{active:n,over:o}=e;return o?"Draggable item "+n.id+" was moved over droppable area "+o.id+".":"Draggable item "+n.id+" is no longer over a droppable area."},onDragEnd(e){let{active:n,over:o}=e;return o?"Draggable item "+n.id+" was dropped over droppable area "+o.id:"Draggable item "+n.id+" was dropped."},onDragCancel(e){let{active:n}=e;return"Dragging was cancelled. Draggable item "+n.id+" was dropped."}};function Rk(e){let{announcements:n=jk,container:o,hiddenTextDescribedById:s,screenReaderInstructions:a=Nk}=e;const{announce:l,announcement:f}=Sk(),d=ha("DndLiveRegion"),[h,v]=g.useState(!1);if(g.useEffect(()=>{v(!0)},[]),Ck(g.useMemo(()=>({onDragStart(m){let{active:b}=m;l(n.onDragStart({active:b}))},onDragMove(m){let{active:b,over:E}=m;n.onDragMove&&l(n.onDragMove({active:b,over:E}))},onDragOver(m){let{active:b,over:E}=m;l(n.onDragOver({active:b,over:E}))},onDragEnd(m){let{active:b,over:E}=m;l(n.onDragEnd({active:b,over:E}))},onDragCancel(m){let{active:b,over:E}=m;l(n.onDragCancel({active:b,over:E}))}}),[l,n])),!h)return null;const x=F.createElement(F.Fragment,null,F.createElement(wk,{id:s,value:a.draggable}),F.createElement(bk,{id:d,announcement:f}));return o?Jn.createPortal(x,o):x}var Pt;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Pt||(Pt={}));function sc(){}function ic(e,n){return g.useMemo(()=>({sensor:e,options:n??{}}),[e,n])}function gw(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return g.useMemo(()=>[...n].filter(s=>s!=null),[...n])}const tr=Object.freeze({x:0,y:0});function vw(e,n){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function yw(e,n){let{data:{value:o}}=e,{data:{value:s}}=n;return o-s}function Tk(e,n){let{data:{value:o}}=e,{data:{value:s}}=n;return s-o}function Vv(e){let{left:n,top:o,height:s,width:a}=e;return[{x:n,y:o},{x:n+a,y:o},{x:n,y:o+s},{x:n+a,y:o+s}]}function xw(e,n){if(!e||e.length===0)return null;const[o]=e;return o[n]}function Wv(e,n,o){return n===void 0&&(n=e.left),o===void 0&&(o=e.top),{x:n+e.width*.5,y:o+e.height*.5}}const ww=e=>{let{collisionRect:n,droppableRects:o,droppableContainers:s}=e;const a=Wv(n,n.left,n.top),l=[];for(const f of s){const{id:d}=f,h=o.get(d);if(h){const v=vw(Wv(h),a);l.push({id:d,data:{droppableContainer:f,value:v}})}}return l.sort(yw)},kk=e=>{let{collisionRect:n,droppableRects:o,droppableContainers:s}=e;const a=Vv(n),l=[];for(const f of s){const{id:d}=f,h=o.get(d);if(h){const v=Vv(h),x=a.reduce((b,E,T)=>b+vw(v[T],E),0),m=Number((x/4).toFixed(4));l.push({id:d,data:{droppableContainer:f,value:m}})}}return l.sort(yw)};function Pk(e,n){const o=Math.max(n.top,e.top),s=Math.max(n.left,e.left),a=Math.min(n.left+n.width,e.left+e.width),l=Math.min(n.top+n.height,e.top+e.height),f=a-s,d=l-o;if(s<a&&o<l){const h=n.width*n.height,v=e.width*e.height,x=f*d,m=x/(h+v-x);return Number(m.toFixed(4))}return 0}const _k=e=>{let{collisionRect:n,droppableRects:o,droppableContainers:s}=e;const a=[];for(const l of s){const{id:f}=l,d=o.get(f);if(d){const h=Pk(d,n);h>0&&a.push({id:f,data:{droppableContainer:l,value:h}})}}return a.sort(Tk)};function Dk(e,n,o){return{...e,scaleX:n&&o?n.width/o.width:1,scaleY:n&&o?n.height/o.height:1}}function bw(e,n){return e&&n?{x:e.left-n.left,y:e.top-n.top}:tr}function Ak(e){return function(o){for(var s=arguments.length,a=new Array(s>1?s-1:0),l=1;l<s;l++)a[l-1]=arguments[l];return a.reduce((f,d)=>({...f,top:f.top+e*d.y,bottom:f.bottom+e*d.y,left:f.left+e*d.x,right:f.right+e*d.x}),{...o})}}const Ok=Ak(1);function Mk(e){if(e.startsWith("matrix3d(")){const n=e.slice(9,-1).split(/, /);return{x:+n[12],y:+n[13],scaleX:+n[0],scaleY:+n[5]}}else if(e.startsWith("matrix(")){const n=e.slice(7,-1).split(/, /);return{x:+n[4],y:+n[5],scaleX:+n[0],scaleY:+n[3]}}return null}function Ik(e,n,o){const s=Mk(n);if(!s)return e;const{scaleX:a,scaleY:l,x:f,y:d}=s,h=e.left-f-(1-a)*parseFloat(o),v=e.top-d-(1-l)*parseFloat(o.slice(o.indexOf(" ")+1)),x=a?e.width/a:e.width,m=l?e.height/l:e.height;return{width:x,height:m,top:v,right:h+x,bottom:v+m,left:h}}const Lk={ignoreTransform:!1};function Gs(e,n){n===void 0&&(n=Lk);let o=e.getBoundingClientRect();if(n.ignoreTransform){const{transform:v,transformOrigin:x}=xn(e).getComputedStyle(e);v&&(o=Ik(o,v,x))}const{top:s,left:a,width:l,height:f,bottom:d,right:h}=o;return{top:s,left:a,width:l,height:f,bottom:d,right:h}}function Kv(e){return Gs(e,{ignoreTransform:!0})}function Fk(e){const n=e.innerWidth,o=e.innerHeight;return{top:0,left:0,right:n,bottom:o,width:n,height:o}}function $k(e,n){return n===void 0&&(n=xn(e).getComputedStyle(e)),n.position==="fixed"}function zk(e,n){n===void 0&&(n=xn(e).getComputedStyle(e));const o=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(a=>{const l=n[a];return typeof l=="string"?o.test(l):!1})}function $c(e,n){const o=[];function s(a){if(n!=null&&o.length>=n||!a)return o;if($p(a)&&a.scrollingElement!=null&&!o.includes(a.scrollingElement))return o.push(a.scrollingElement),o;if(!fa(a)||pw(a)||o.includes(a))return o;const l=xn(e).getComputedStyle(a);return a!==e&&zk(a,l)&&o.push(a),$k(a,l)?o:s(a.parentNode)}return e?s(e):o}function Sw(e){const[n]=$c(e,1);return n??null}function af(e){return!Fc||!e?null:Ks(e)?e:Fp(e)?$p(e)||e===Ys(e).scrollingElement?window:fa(e)?e:null:null}function Cw(e){return Ks(e)?e.scrollX:e.scrollLeft}function Ew(e){return Ks(e)?e.scrollY:e.scrollTop}function If(e){return{x:Cw(e),y:Ew(e)}}var $t;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})($t||($t={}));function Nw(e){return!Fc||!e?!1:e===document.scrollingElement}function jw(e){const n={x:0,y:0},o=Nw(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},s={x:e.scrollWidth-o.width,y:e.scrollHeight-o.height},a=e.scrollTop<=n.y,l=e.scrollLeft<=n.x,f=e.scrollTop>=s.y,d=e.scrollLeft>=s.x;return{isTop:a,isLeft:l,isBottom:f,isRight:d,maxScroll:s,minScroll:n}}const Bk={x:.2,y:.2};function Uk(e,n,o,s,a){let{top:l,left:f,right:d,bottom:h}=o;s===void 0&&(s=10),a===void 0&&(a=Bk);const{isTop:v,isBottom:x,isLeft:m,isRight:b}=jw(e),E={x:0,y:0},T={x:0,y:0},w={height:n.height*a.y,width:n.width*a.x};return!v&&l<=n.top+w.height?(E.y=$t.Backward,T.y=s*Math.abs((n.top+w.height-l)/w.height)):!x&&h>=n.bottom-w.height&&(E.y=$t.Forward,T.y=s*Math.abs((n.bottom-w.height-h)/w.height)),!b&&d>=n.right-w.width?(E.x=$t.Forward,T.x=s*Math.abs((n.right-w.width-d)/w.width)):!m&&f<=n.left+w.width&&(E.x=$t.Backward,T.x=s*Math.abs((n.left+w.width-f)/w.width)),{direction:E,speed:T}}function Hk(e){if(e===document.scrollingElement){const{innerWidth:l,innerHeight:f}=window;return{top:0,left:0,right:l,bottom:f,width:l,height:f}}const{top:n,left:o,right:s,bottom:a}=e.getBoundingClientRect();return{top:n,left:o,right:s,bottom:a,width:e.clientWidth,height:e.clientHeight}}function Rw(e){return e.reduce((n,o)=>ks(n,If(o)),tr)}function Vk(e){return e.reduce((n,o)=>n+Cw(o),0)}function Wk(e){return e.reduce((n,o)=>n+Ew(o),0)}function Kk(e,n){if(n===void 0&&(n=Gs),!e)return;const{top:o,left:s,bottom:a,right:l}=n(e);Sw(e)&&(a<=0||l<=0||o>=window.innerHeight||s>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Yk=[["x",["left","right"],Vk],["y",["top","bottom"],Wk]];class Up{constructor(n,o){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const s=$c(o),a=Rw(s);this.rect={...n},this.width=n.width,this.height=n.height;for(const[l,f,d]of Yk)for(const h of f)Object.defineProperty(this,h,{get:()=>{const v=d(s),x=a[l]-v;return this.rect[h]+x},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class zi{constructor(n){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(o=>{var s;return(s=this.target)==null?void 0:s.removeEventListener(...o)})},this.target=n}add(n,o,s){var a;(a=this.target)==null||a.addEventListener(n,o,s),this.listeners.push([n,o,s])}}function Gk(e){const{EventTarget:n}=xn(e);return e instanceof n?e:Ys(e)}function lf(e,n){const o=Math.abs(e.x),s=Math.abs(e.y);return typeof n=="number"?Math.sqrt(o**2+s**2)>n:"x"in n&&"y"in n?o>n.x&&s>n.y:"x"in n?o>n.x:"y"in n?s>n.y:!1}var In;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(In||(In={}));function Yv(e){e.preventDefault()}function Xk(e){e.stopPropagation()}var Ye;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(Ye||(Ye={}));const Tw={start:[Ye.Space,Ye.Enter],cancel:[Ye.Esc],end:[Ye.Space,Ye.Enter,Ye.Tab]},qk=(e,n)=>{let{currentCoordinates:o}=n;switch(e.code){case Ye.Right:return{...o,x:o.x+25};case Ye.Left:return{...o,x:o.x-25};case Ye.Down:return{...o,y:o.y+25};case Ye.Up:return{...o,y:o.y-25}}};class zc{constructor(n){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=n;const{event:{target:o}}=n;this.props=n,this.listeners=new zi(Ys(o)),this.windowListeners=new zi(xn(o)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(In.Resize,this.handleCancel),this.windowListeners.add(In.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(In.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:n,onStart:o}=this.props,s=n.node.current;s&&Kk(s),o(tr)}handleKeyDown(n){if(Bp(n)){const{active:o,context:s,options:a}=this.props,{keyboardCodes:l=Tw,coordinateGetter:f=qk,scrollBehavior:d="smooth"}=a,{code:h}=n;if(l.end.includes(h)){this.handleEnd(n);return}if(l.cancel.includes(h)){this.handleCancel(n);return}const{collisionRect:v}=s.current,x=v?{x:v.left,y:v.top}:tr;this.referenceCoordinates||(this.referenceCoordinates=x);const m=f(n,{active:o,context:s.current,currentCoordinates:x});if(m){const b=Qi(m,x),E={x:0,y:0},{scrollableAncestors:T}=s.current;for(const w of T){const S=n.code,{isTop:C,isRight:j,isLeft:N,isBottom:k,maxScroll:P,minScroll:D}=jw(w),_=Hk(w),L={x:Math.min(S===Ye.Right?_.right-_.width/2:_.right,Math.max(S===Ye.Right?_.left:_.left+_.width/2,m.x)),y:Math.min(S===Ye.Down?_.bottom-_.height/2:_.bottom,Math.max(S===Ye.Down?_.top:_.top+_.height/2,m.y))},H=S===Ye.Right&&!j||S===Ye.Left&&!N,W=S===Ye.Down&&!k||S===Ye.Up&&!C;if(H&&L.x!==m.x){const U=w.scrollLeft+b.x,ee=S===Ye.Right&&U<=P.x||S===Ye.Left&&U>=D.x;if(ee&&!b.y){w.scrollTo({left:U,behavior:d});return}ee?E.x=w.scrollLeft-U:E.x=S===Ye.Right?w.scrollLeft-P.x:w.scrollLeft-D.x,E.x&&w.scrollBy({left:-E.x,behavior:d});break}else if(W&&L.y!==m.y){const U=w.scrollTop+b.y,ee=S===Ye.Down&&U<=P.y||S===Ye.Up&&U>=D.y;if(ee&&!b.x){w.scrollTo({top:U,behavior:d});return}ee?E.y=w.scrollTop-U:E.y=S===Ye.Down?w.scrollTop-P.y:w.scrollTop-D.y,E.y&&w.scrollBy({top:-E.y,behavior:d});break}}this.handleMove(n,ks(Qi(m,this.referenceCoordinates),E))}}}handleMove(n,o){const{onMove:s}=this.props;n.preventDefault(),s(o)}handleEnd(n){const{onEnd:o}=this.props;n.preventDefault(),this.detach(),o()}handleCancel(n){const{onCancel:o}=this.props;n.preventDefault(),this.detach(),o()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}zc.activators=[{eventName:"onKeyDown",handler:(e,n,o)=>{let{keyboardCodes:s=Tw,onActivation:a}=n,{active:l}=o;const{code:f}=e.nativeEvent;if(s.start.includes(f)){const d=l.activatorNode.current;return d&&e.target!==d?!1:(e.preventDefault(),a==null||a({event:e.nativeEvent}),!0)}return!1}}];function Gv(e){return!!(e&&"distance"in e)}function Xv(e){return!!(e&&"delay"in e)}class Hp{constructor(n,o,s){var a;s===void 0&&(s=Gk(n.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=n,this.events=o;const{event:l}=n,{target:f}=l;this.props=n,this.events=o,this.document=Ys(f),this.documentListeners=new zi(this.document),this.listeners=new zi(s),this.windowListeners=new zi(xn(f)),this.initialCoordinates=(a=Mf(l))!=null?a:tr,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:n,props:{options:{activationConstraint:o,bypassActivationConstraint:s}}}=this;if(this.listeners.add(n.move.name,this.handleMove,{passive:!1}),this.listeners.add(n.end.name,this.handleEnd),n.cancel&&this.listeners.add(n.cancel.name,this.handleCancel),this.windowListeners.add(In.Resize,this.handleCancel),this.windowListeners.add(In.DragStart,Yv),this.windowListeners.add(In.VisibilityChange,this.handleCancel),this.windowListeners.add(In.ContextMenu,Yv),this.documentListeners.add(In.Keydown,this.handleKeydown),o){if(s!=null&&s({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Xv(o)){this.timeoutId=setTimeout(this.handleStart,o.delay),this.handlePending(o);return}if(Gv(o)){this.handlePending(o);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(n,o){const{active:s,onPending:a}=this.props;a(s,n,this.initialCoordinates,o)}handleStart(){const{initialCoordinates:n}=this,{onStart:o}=this.props;n&&(this.activated=!0,this.documentListeners.add(In.Click,Xk,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(In.SelectionChange,this.removeTextSelection),o(n))}handleMove(n){var o;const{activated:s,initialCoordinates:a,props:l}=this,{onMove:f,options:{activationConstraint:d}}=l;if(!a)return;const h=(o=Mf(n))!=null?o:tr,v=Qi(a,h);if(!s&&d){if(Gv(d)){if(d.tolerance!=null&&lf(v,d.tolerance))return this.handleCancel();if(lf(v,d.distance))return this.handleStart()}if(Xv(d)&&lf(v,d.tolerance))return this.handleCancel();this.handlePending(d,v);return}n.cancelable&&n.preventDefault(),f(h)}handleEnd(){const{onAbort:n,onEnd:o}=this.props;this.detach(),this.activated||n(this.props.active),o()}handleCancel(){const{onAbort:n,onCancel:o}=this.props;this.detach(),this.activated||n(this.props.active),o()}handleKeydown(n){n.code===Ye.Esc&&this.handleCancel()}removeTextSelection(){var n;(n=this.document.getSelection())==null||n.removeAllRanges()}}const Qk={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Bc extends Hp{constructor(n){const{event:o}=n,s=Ys(o.target);super(n,Qk,s)}}Bc.activators=[{eventName:"onPointerDown",handler:(e,n)=>{let{nativeEvent:o}=e,{onActivation:s}=n;return!o.isPrimary||o.button!==0?!1:(s==null||s({event:o}),!0)}}];const Jk={move:{name:"mousemove"},end:{name:"mouseup"}};var Lf;(function(e){e[e.RightClick=2]="RightClick"})(Lf||(Lf={}));class Zk extends Hp{constructor(n){super(n,Jk,Ys(n.event.target))}}Zk.activators=[{eventName:"onMouseDown",handler:(e,n)=>{let{nativeEvent:o}=e,{onActivation:s}=n;return o.button===Lf.RightClick?!1:(s==null||s({event:o}),!0)}}];const cf={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class eP extends Hp{constructor(n){super(n,cf)}static setup(){return window.addEventListener(cf.move.name,n,{capture:!1,passive:!1}),function(){window.removeEventListener(cf.move.name,n)};function n(){}}}eP.activators=[{eventName:"onTouchStart",handler:(e,n)=>{let{nativeEvent:o}=e,{onActivation:s}=n;const{touches:a}=o;return a.length>1?!1:(s==null||s({event:o}),!0)}}];var Bi;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Bi||(Bi={}));var ac;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(ac||(ac={}));function tP(e){let{acceleration:n,activator:o=Bi.Pointer,canScroll:s,draggingRect:a,enabled:l,interval:f=5,order:d=ac.TreeOrder,pointerCoordinates:h,scrollableAncestors:v,scrollableAncestorRects:x,delta:m,threshold:b}=e;const E=rP({delta:m,disabled:!l}),[T,w]=mk(),S=g.useRef({x:0,y:0}),C=g.useRef({x:0,y:0}),j=g.useMemo(()=>{switch(o){case Bi.Pointer:return h?{top:h.y,bottom:h.y,left:h.x,right:h.x}:null;case Bi.DraggableRect:return a}},[o,a,h]),N=g.useRef(null),k=g.useCallback(()=>{const D=N.current;if(!D)return;const _=S.current.x*C.current.x,L=S.current.y*C.current.y;D.scrollBy(_,L)},[]),P=g.useMemo(()=>d===ac.TreeOrder?[...v].reverse():v,[d,v]);g.useEffect(()=>{if(!l||!v.length||!j){w();return}for(const D of P){if((s==null?void 0:s(D))===!1)continue;const _=v.indexOf(D),L=x[_];if(!L)continue;const{direction:H,speed:W}=Uk(D,L,j,n,b);for(const U of["x","y"])E[U][H[U]]||(W[U]=0,H[U]=0);if(W.x>0||W.y>0){w(),N.current=D,T(k,f),S.current=W,C.current=H;return}}S.current={x:0,y:0},C.current={x:0,y:0},w()},[n,k,s,w,l,f,JSON.stringify(j),JSON.stringify(E),T,v,P,x,JSON.stringify(b)])}const nP={x:{[$t.Backward]:!1,[$t.Forward]:!1},y:{[$t.Backward]:!1,[$t.Forward]:!1}};function rP(e){let{delta:n,disabled:o}=e;const s=Of(n);return pa(a=>{if(o||!s||!a)return nP;const l={x:Math.sign(n.x-s.x),y:Math.sign(n.y-s.y)};return{x:{[$t.Backward]:a.x[$t.Backward]||l.x===-1,[$t.Forward]:a.x[$t.Forward]||l.x===1},y:{[$t.Backward]:a.y[$t.Backward]||l.y===-1,[$t.Forward]:a.y[$t.Forward]||l.y===1}}},[o,n,s])}function oP(e,n){const o=n!=null?e.get(n):void 0,s=o?o.node.current:null;return pa(a=>{var l;return n==null?null:(l=s??a)!=null?l:null},[s,n])}function sP(e,n){return g.useMemo(()=>e.reduce((o,s)=>{const{sensor:a}=s,l=a.activators.map(f=>({eventName:f.eventName,handler:n(f.handler,s)}));return[...o,...l]},[]),[e,n])}var Zi;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Zi||(Zi={}));var Ff;(function(e){e.Optimized="optimized"})(Ff||(Ff={}));const qv=new Map;function iP(e,n){let{dragging:o,dependencies:s,config:a}=n;const[l,f]=g.useState(null),{frequency:d,measure:h,strategy:v}=a,x=g.useRef(e),m=S(),b=qi(m),E=g.useCallback(function(C){C===void 0&&(C=[]),!b.current&&f(j=>j===null?C:j.concat(C.filter(N=>!j.includes(N))))},[b]),T=g.useRef(null),w=pa(C=>{if(m&&!o)return qv;if(!C||C===qv||x.current!==e||l!=null){const j=new Map;for(let N of e){if(!N)continue;if(l&&l.length>0&&!l.includes(N.id)&&N.rect.current){j.set(N.id,N.rect.current);continue}const k=N.node.current,P=k?new Up(h(k),k):null;N.rect.current=P,P&&j.set(N.id,P)}return j}return C},[e,l,o,m,h]);return g.useEffect(()=>{x.current=e},[e]),g.useEffect(()=>{m||E()},[o,m]),g.useEffect(()=>{l&&l.length>0&&f(null)},[JSON.stringify(l)]),g.useEffect(()=>{m||typeof d!="number"||T.current!==null||(T.current=setTimeout(()=>{E(),T.current=null},d))},[d,m,E,...s]),{droppableRects:w,measureDroppableContainers:E,measuringScheduled:l!=null};function S(){switch(v){case Zi.Always:return!1;case Zi.BeforeDragging:return o;default:return!o}}}function kw(e,n){return pa(o=>e?o||(typeof n=="function"?n(e):e):null,[n,e])}function aP(e,n){return kw(e,n)}function lP(e){let{callback:n,disabled:o}=e;const s=zp(n),a=g.useMemo(()=>{if(o||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:l}=window;return new l(s)},[s,o]);return g.useEffect(()=>()=>a==null?void 0:a.disconnect(),[a]),a}function Uc(e){let{callback:n,disabled:o}=e;const s=zp(n),a=g.useMemo(()=>{if(o||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:l}=window;return new l(s)},[o]);return g.useEffect(()=>()=>a==null?void 0:a.disconnect(),[a]),a}function cP(e){return new Up(Gs(e),e)}function Qv(e,n,o){n===void 0&&(n=cP);const[s,a]=g.useState(null);function l(){a(h=>{if(!e)return null;if(e.isConnected===!1){var v;return(v=h??o)!=null?v:null}const x=n(e);return JSON.stringify(h)===JSON.stringify(x)?h:x})}const f=lP({callback(h){if(e)for(const v of h){const{type:x,target:m}=v;if(x==="childList"&&m instanceof HTMLElement&&m.contains(e)){l();break}}}}),d=Uc({callback:l});return xr(()=>{l(),e?(d==null||d.observe(e),f==null||f.observe(document.body,{childList:!0,subtree:!0})):(d==null||d.disconnect(),f==null||f.disconnect())},[e]),s}function uP(e){const n=kw(e);return bw(e,n)}const Jv=[];function dP(e){const n=g.useRef(e),o=pa(s=>e?s&&s!==Jv&&e&&n.current&&e.parentNode===n.current.parentNode?s:$c(e):Jv,[e]);return g.useEffect(()=>{n.current=e},[e]),o}function fP(e){const[n,o]=g.useState(null),s=g.useRef(e),a=g.useCallback(l=>{const f=af(l.target);f&&o(d=>d?(d.set(f,If(f)),new Map(d)):null)},[]);return g.useEffect(()=>{const l=s.current;if(e!==l){f(l);const d=e.map(h=>{const v=af(h);return v?(v.addEventListener("scroll",a,{passive:!0}),[v,If(v)]):null}).filter(h=>h!=null);o(d.length?new Map(d):null),s.current=e}return()=>{f(e),f(l)};function f(d){d.forEach(h=>{const v=af(h);v==null||v.removeEventListener("scroll",a)})}},[a,e]),g.useMemo(()=>e.length?n?Array.from(n.values()).reduce((l,f)=>ks(l,f),tr):Rw(e):tr,[e,n])}function Zv(e,n){n===void 0&&(n=[]);const o=g.useRef(null);return g.useEffect(()=>{o.current=null},n),g.useEffect(()=>{const s=e!==tr;s&&!o.current&&(o.current=e),!s&&o.current&&(o.current=null)},[e]),o.current?Qi(e,o.current):tr}function pP(e){g.useEffect(()=>{if(!Fc)return;const n=e.map(o=>{let{sensor:s}=o;return s.setup==null?void 0:s.setup()});return()=>{for(const o of n)o==null||o()}},e.map(n=>{let{sensor:o}=n;return o}))}function hP(e,n){return g.useMemo(()=>e.reduce((o,s)=>{let{eventName:a,handler:l}=s;return o[a]=f=>{l(f,n)},o},{}),[e,n])}function Pw(e){return g.useMemo(()=>e?Fk(e):null,[e])}const ey=[];function mP(e,n){n===void 0&&(n=Gs);const[o]=e,s=Pw(o?xn(o):null),[a,l]=g.useState(ey);function f(){l(()=>e.length?e.map(h=>Nw(h)?s:new Up(n(h),h)):ey)}const d=Uc({callback:f});return xr(()=>{d==null||d.disconnect(),f(),e.forEach(h=>d==null?void 0:d.observe(h))},[e]),a}function gP(e){if(!e)return null;if(e.children.length>1)return e;const n=e.children[0];return fa(n)?n:e}function vP(e){let{measure:n}=e;const[o,s]=g.useState(null),a=g.useCallback(v=>{for(const{target:x}of v)if(fa(x)){s(m=>{const b=n(x);return m?{...m,width:b.width,height:b.height}:b});break}},[n]),l=Uc({callback:a}),f=g.useCallback(v=>{const x=gP(v);l==null||l.disconnect(),x&&(l==null||l.observe(x)),s(x?n(x):null)},[n,l]),[d,h]=oc(f);return g.useMemo(()=>({nodeRef:d,rect:o,setRef:h}),[o,d,h])}const yP=[{sensor:Bc,options:{}},{sensor:zc,options:{}}],xP={current:{}},Bl={draggable:{measure:Kv},droppable:{measure:Kv,strategy:Zi.WhileDragging,frequency:Ff.Optimized},dragOverlay:{measure:Gs}};class Ui extends Map{get(n){var o;return n!=null&&(o=super.get(n))!=null?o:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(n=>{let{disabled:o}=n;return!o})}getNodeFor(n){var o,s;return(o=(s=this.get(n))==null?void 0:s.node.current)!=null?o:void 0}}const wP={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Ui,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:sc},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Bl,measureDroppableContainers:sc,windowRect:null,measuringScheduled:!1},bP={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:sc,draggableNodes:new Map,over:null,measureDroppableContainers:sc},Hc=g.createContext(bP),_w=g.createContext(wP);function SP(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Ui}}}function CP(e,n){switch(n.type){case Pt.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:n.initialCoordinates,active:n.active}};case Pt.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:n.coordinates.x-e.draggable.initialCoordinates.x,y:n.coordinates.y-e.draggable.initialCoordinates.y}}};case Pt.DragEnd:case Pt.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Pt.RegisterDroppable:{const{element:o}=n,{id:s}=o,a=new Ui(e.droppable.containers);return a.set(s,o),{...e,droppable:{...e.droppable,containers:a}}}case Pt.SetDroppableDisabled:{const{id:o,key:s,disabled:a}=n,l=e.droppable.containers.get(o);if(!l||s!==l.key)return e;const f=new Ui(e.droppable.containers);return f.set(o,{...l,disabled:a}),{...e,droppable:{...e.droppable,containers:f}}}case Pt.UnregisterDroppable:{const{id:o,key:s}=n,a=e.droppable.containers.get(o);if(!a||s!==a.key)return e;const l=new Ui(e.droppable.containers);return l.delete(o),{...e,droppable:{...e.droppable,containers:l}}}default:return e}}function EP(e){let{disabled:n}=e;const{active:o,activatorEvent:s,draggableNodes:a}=g.useContext(Hc),l=Of(s),f=Of(o==null?void 0:o.id);return g.useEffect(()=>{if(!n&&!s&&l&&f!=null){if(!Bp(l)||document.activeElement===l.target)return;const d=a.get(f);if(!d)return;const{activatorNode:h,node:v}=d;if(!h.current&&!v.current)return;requestAnimationFrame(()=>{for(const x of[h.current,v.current]){if(!x)continue;const m=yk(x);if(m){m.focus();break}}})}},[s,n,a,f,l]),null}function NP(e,n){let{transform:o,...s}=n;return e!=null&&e.length?e.reduce((a,l)=>l({transform:a,...s}),o):o}function jP(e){return g.useMemo(()=>({draggable:{...Bl.draggable,...e==null?void 0:e.draggable},droppable:{...Bl.droppable,...e==null?void 0:e.droppable},dragOverlay:{...Bl.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function RP(e){let{activeNode:n,measure:o,initialRect:s,config:a=!0}=e;const l=g.useRef(!1),{x:f,y:d}=typeof a=="boolean"?{x:a,y:a}:a;xr(()=>{if(!f&&!d||!n){l.current=!1;return}if(l.current||!s)return;const v=n==null?void 0:n.node.current;if(!v||v.isConnected===!1)return;const x=o(v),m=bw(x,s);if(f||(m.x=0),d||(m.y=0),l.current=!0,Math.abs(m.x)>0||Math.abs(m.y)>0){const b=Sw(v);b&&b.scrollBy({top:m.y,left:m.x})}},[n,f,d,s,o])}const Dw=g.createContext({...tr,scaleX:1,scaleY:1});var po;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(po||(po={}));const Aw=g.memo(function(n){var o,s,a,l;let{id:f,accessibility:d,autoScroll:h=!0,children:v,sensors:x=yP,collisionDetection:m=_k,measuring:b,modifiers:E,...T}=n;const w=g.useReducer(CP,void 0,SP),[S,C]=w,[j,N]=Ek(),[k,P]=g.useState(po.Uninitialized),D=k===po.Initialized,{draggable:{active:_,nodes:L,translate:H},droppable:{containers:W}}=S,U=_!=null?L.get(_):null,ee=g.useRef({initial:null,translated:null}),Y=g.useMemo(()=>{var Ce;return _!=null?{id:_,data:(Ce=U==null?void 0:U.data)!=null?Ce:xP,rect:ee}:null},[_,U]),X=g.useRef(null),[le,Z]=g.useState(null),[q,z]=g.useState(null),J=qi(T,Object.values(T)),te=ha("DndDescribedBy",f),O=g.useMemo(()=>W.getEnabled(),[W]),K=jP(b),{droppableRects:ne,measureDroppableContainers:G,measuringScheduled:de}=iP(O,{dragging:D,dependencies:[H.x,H.y],config:K.droppable}),he=oP(L,_),ae=g.useMemo(()=>q?Mf(q):null,[q]),se=Ve(),ye=aP(he,K.draggable.measure);RP({activeNode:_!=null?L.get(_):null,config:se.layoutShiftCompensation,initialRect:ye,measure:K.draggable.measure});const fe=Qv(he,K.draggable.measure,ye),Ne=Qv(he?he.parentElement:null),ce=g.useRef({activatorEvent:null,active:null,activeNode:he,collisionRect:null,collisions:null,droppableRects:ne,draggableNodes:L,draggingNode:null,draggingNodeRect:null,droppableContainers:W,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Oe=W.getNodeFor((o=ce.current.over)==null?void 0:o.id),pe=vP({measure:K.dragOverlay.measure}),Ze=(s=pe.nodeRef.current)!=null?s:he,wt=D?(a=pe.rect)!=null?a:fe:null,gt=!!(pe.nodeRef.current&&pe.rect),jn=uP(gt?null:fe),at=Pw(Ze?xn(Ze):null),ut=dP(D?Oe??he:null),Xt=mP(ut),lt=NP(E,{transform:{x:H.x-jn.x,y:H.y-jn.y,scaleX:1,scaleY:1},activatorEvent:q,active:Y,activeNodeRect:fe,containerNodeRect:Ne,draggingNodeRect:wt,over:ce.current.over,overlayNodeRect:pe.rect,scrollableAncestors:ut,scrollableAncestorRects:Xt,windowRect:at}),Dt=ae?ks(ae,H):null,Sr=fP(ut),Cr=Zv(Sr),$n=Zv(Sr,[fe]),an=ks(lt,Cr),Nt=wt?Ok(wt,lt):null,ln=Y&&Nt?m({active:Y,collisionRect:Nt,droppableRects:ne,droppableContainers:O,pointerCoordinates:Dt}):null,At=xw(ln,"id"),[jt,Ht]=g.useState(null),Er=gt?lt:ks(lt,$n),Ur=Dk(Er,(l=jt==null?void 0:jt.rect)!=null?l:null,fe),sr=g.useRef(null),zn=g.useCallback((Ce,Le)=>{let{sensor:me,options:De}=Le;if(X.current==null)return;const Fe=L.get(X.current);if(!Fe)return;const Me=Ce.nativeEvent,tt=new me({active:X.current,activeNode:Fe,event:Me,options:De,context:ce,onAbort(Pe){if(!L.get(Pe))return;const{onDragAbort:qe}=J.current,dt={id:Pe};qe==null||qe(dt),j({type:"onDragAbort",event:dt})},onPending(Pe,vt,qe,dt){if(!L.get(Pe))return;const{onDragPending:Ot}=J.current,un={id:Pe,constraint:vt,initialCoordinates:qe,offset:dt};Ot==null||Ot(un),j({type:"onDragPending",event:un})},onStart(Pe){const vt=X.current;if(vt==null)return;const qe=L.get(vt);if(!qe)return;const{onDragStart:dt}=J.current,cn={activatorEvent:Me,active:{id:vt,data:qe.data,rect:ee}};Jn.unstable_batchedUpdates(()=>{dt==null||dt(cn),P(po.Initializing),C({type:Pt.DragStart,initialCoordinates:Pe,active:vt}),j({type:"onDragStart",event:cn}),Z(sr.current),z(Me)})},onMove(Pe){C({type:Pt.DragMove,coordinates:Pe})},onEnd:We(Pt.DragEnd),onCancel:We(Pt.DragCancel)});sr.current=tt;function We(Pe){return async function(){const{active:qe,collisions:dt,over:cn,scrollAdjustedTranslate:Ot}=ce.current;let un=null;if(qe&&Ot){const{cancelDrop:jr}=J.current;un={activatorEvent:Me,active:qe,collisions:dt,delta:Ot,over:cn},Pe===Pt.DragEnd&&typeof jr=="function"&&await Promise.resolve(jr(un))&&(Pe=Pt.DragCancel)}X.current=null,Jn.unstable_batchedUpdates(()=>{C({type:Pe}),P(po.Uninitialized),Ht(null),Z(null),z(null),sr.current=null;const jr=Pe===Pt.DragEnd?"onDragEnd":"onDragCancel";if(un){const Qs=J.current[jr];Qs==null||Qs(un),j({type:jr,event:un})}})}}},[L]),Nr=g.useCallback((Ce,Le)=>(me,De)=>{const Fe=me.nativeEvent,Me=L.get(De);if(X.current!==null||!Me||Fe.dndKit||Fe.defaultPrevented)return;const tt={active:Me};Ce(me,Le.options,tt)===!0&&(Fe.dndKit={capturedBy:Le.sensor},X.current=De,zn(me,Le))},[L,zn]),Rn=sP(x,Nr);pP(x),xr(()=>{fe&&k===po.Initializing&&P(po.Initialized)},[fe,k]),g.useEffect(()=>{const{onDragMove:Ce}=J.current,{active:Le,activatorEvent:me,collisions:De,over:Fe}=ce.current;if(!Le||!me)return;const Me={active:Le,activatorEvent:me,collisions:De,delta:{x:an.x,y:an.y},over:Fe};Jn.unstable_batchedUpdates(()=>{Ce==null||Ce(Me),j({type:"onDragMove",event:Me})})},[an.x,an.y]),g.useEffect(()=>{const{active:Ce,activatorEvent:Le,collisions:me,droppableContainers:De,scrollAdjustedTranslate:Fe}=ce.current;if(!Ce||X.current==null||!Le||!Fe)return;const{onDragOver:Me}=J.current,tt=De.get(At),We=tt&&tt.rect.current?{id:tt.id,rect:tt.rect.current,data:tt.data,disabled:tt.disabled}:null,Pe={active:Ce,activatorEvent:Le,collisions:me,delta:{x:Fe.x,y:Fe.y},over:We};Jn.unstable_batchedUpdates(()=>{Ht(We),Me==null||Me(Pe),j({type:"onDragOver",event:Pe})})},[At]),xr(()=>{ce.current={activatorEvent:q,active:Y,activeNode:he,collisionRect:Nt,collisions:ln,droppableRects:ne,draggableNodes:L,draggingNode:Ze,draggingNodeRect:wt,droppableContainers:W,over:jt,scrollableAncestors:ut,scrollAdjustedTranslate:an},ee.current={initial:wt,translated:Nt}},[Y,he,ln,Nt,L,Ze,wt,ne,W,jt,ut,an]),tP({...se,delta:H,draggingRect:Nt,pointerCoordinates:Dt,scrollableAncestors:ut,scrollableAncestorRects:Xt});const we=g.useMemo(()=>({active:Y,activeNode:he,activeNodeRect:fe,activatorEvent:q,collisions:ln,containerNodeRect:Ne,dragOverlay:pe,draggableNodes:L,droppableContainers:W,droppableRects:ne,over:jt,measureDroppableContainers:G,scrollableAncestors:ut,scrollableAncestorRects:Xt,measuringConfiguration:K,measuringScheduled:de,windowRect:at}),[Y,he,fe,q,ln,Ne,pe,L,W,ne,jt,G,ut,Xt,K,de,at]),He=g.useMemo(()=>({activatorEvent:q,activators:Rn,active:Y,activeNodeRect:fe,ariaDescribedById:{draggable:te},dispatch:C,draggableNodes:L,over:jt,measureDroppableContainers:G}),[q,Rn,Y,fe,C,te,L,jt,G]);return F.createElement(mw.Provider,{value:N},F.createElement(Hc.Provider,{value:He},F.createElement(_w.Provider,{value:we},F.createElement(Dw.Provider,{value:Ur},v)),F.createElement(EP,{disabled:(d==null?void 0:d.restoreFocus)===!1})),F.createElement(Rk,{...d,hiddenTextDescribedById:te}));function Ve(){const Ce=(le==null?void 0:le.autoScrollEnabled)===!1,Le=typeof h=="object"?h.enabled===!1:h===!1,me=D&&!Ce&&!Le;return typeof h=="object"?{...h,enabled:me}:{enabled:me}}}),TP=g.createContext(null),ty="button",kP="Draggable";function PP(e){let{id:n,data:o,disabled:s=!1,attributes:a}=e;const l=ha(kP),{activators:f,activatorEvent:d,active:h,activeNodeRect:v,ariaDescribedById:x,draggableNodes:m,over:b}=g.useContext(Hc),{role:E=ty,roleDescription:T="draggable",tabIndex:w=0}=a??{},S=(h==null?void 0:h.id)===n,C=g.useContext(S?Dw:TP),[j,N]=oc(),[k,P]=oc(),D=hP(f,n),_=qi(o);xr(()=>(m.set(n,{id:n,key:l,node:j,activatorNode:k,data:_}),()=>{const H=m.get(n);H&&H.key===l&&m.delete(n)}),[m,n]);const L=g.useMemo(()=>({role:E,tabIndex:w,"aria-disabled":s,"aria-pressed":S&&E===ty?!0:void 0,"aria-roledescription":T,"aria-describedby":x.draggable}),[s,E,w,S,T,x.draggable]);return{active:h,activatorEvent:d,activeNodeRect:v,attributes:L,isDragging:S,listeners:s?void 0:D,node:j,over:b,setNodeRef:N,setActivatorNodeRef:P,transform:C}}function _P(){return g.useContext(_w)}const DP="Droppable",AP={timeout:25};function OP(e){let{data:n,disabled:o=!1,id:s,resizeObserverConfig:a}=e;const l=ha(DP),{active:f,dispatch:d,over:h,measureDroppableContainers:v}=g.useContext(Hc),x=g.useRef({disabled:o}),m=g.useRef(!1),b=g.useRef(null),E=g.useRef(null),{disabled:T,updateMeasurementsFor:w,timeout:S}={...AP,...a},C=qi(w??s),j=g.useCallback(()=>{if(!m.current){m.current=!0;return}E.current!=null&&clearTimeout(E.current),E.current=setTimeout(()=>{v(Array.isArray(C.current)?C.current:[C.current]),E.current=null},S)},[S]),N=Uc({callback:j,disabled:T||!f}),k=g.useCallback((L,H)=>{N&&(H&&(N.unobserve(H),m.current=!1),L&&N.observe(L))},[N]),[P,D]=oc(k),_=qi(n);return g.useEffect(()=>{!N||!P.current||(N.disconnect(),m.current=!1,N.observe(P.current))},[P,N]),g.useEffect(()=>(d({type:Pt.RegisterDroppable,element:{id:s,key:l,disabled:o,node:P,rect:b,data:_}}),()=>d({type:Pt.UnregisterDroppable,key:l,id:s})),[s]),g.useEffect(()=>{o!==x.current.disabled&&(d({type:Pt.SetDroppableDisabled,id:s,key:l,disabled:o}),x.current.disabled=o)},[s,l,o,d]),{active:f,rect:b,isOver:(h==null?void 0:h.id)===s,node:P,over:h,setNodeRef:D}}function Vc(e,n,o){const s=e.slice();return s.splice(o<0?s.length+o:o,0,s.splice(n,1)[0]),s}function MP(e,n){return e.reduce((o,s,a)=>{const l=n.get(s);return l&&(o[a]=l),o},Array(e.length))}function Ol(e){return e!==null&&e>=0}function IP(e,n){if(e===n)return!0;if(e.length!==n.length)return!1;for(let o=0;o<e.length;o++)if(e[o]!==n[o])return!1;return!0}function LP(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Ow=e=>{let{rects:n,activeIndex:o,overIndex:s,index:a}=e;const l=Vc(n,s,o),f=n[a],d=l[a];return!d||!f?null:{x:d.left-f.left,y:d.top-f.top,scaleX:d.width/f.width,scaleY:d.height/f.height}},Ml={scaleX:1,scaleY:1},Mw=e=>{var n;let{activeIndex:o,activeNodeRect:s,index:a,rects:l,overIndex:f}=e;const d=(n=l[o])!=null?n:s;if(!d)return null;if(a===o){const v=l[f];return v?{x:0,y:o<f?v.top+v.height-(d.top+d.height):v.top-d.top,...Ml}:null}const h=FP(l,a,o);return a>o&&a<=f?{x:0,y:-d.height-h,...Ml}:a<o&&a>=f?{x:0,y:d.height+h,...Ml}:{x:0,y:0,...Ml}};function FP(e,n,o){const s=e[n],a=e[n-1],l=e[n+1];return s?o<n?a?s.top-(a.top+a.height):l?l.top-(s.top+s.height):0:l?l.top-(s.top+s.height):a?s.top-(a.top+a.height):0:0}const Iw="Sortable",Lw=F.createContext({activeIndex:-1,containerId:Iw,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Ow,disabled:{draggable:!1,droppable:!1}});function Fw(e){let{children:n,id:o,items:s,strategy:a=Ow,disabled:l=!1}=e;const{active:f,dragOverlay:d,droppableRects:h,over:v,measureDroppableContainers:x}=_P(),m=ha(Iw,o),b=d.rect!==null,E=g.useMemo(()=>s.map(D=>typeof D=="object"&&"id"in D?D.id:D),[s]),T=f!=null,w=f?E.indexOf(f.id):-1,S=v?E.indexOf(v.id):-1,C=g.useRef(E),j=!IP(E,C.current),N=S!==-1&&w===-1||j,k=LP(l);xr(()=>{j&&T&&x(E)},[j,E,T,x]),g.useEffect(()=>{C.current=E},[E]);const P=g.useMemo(()=>({activeIndex:w,containerId:m,disabled:k,disableTransforms:N,items:E,overIndex:S,useDragOverlay:b,sortedRects:MP(E,h),strategy:a}),[w,m,k.draggable,k.droppable,N,E,S,h,b,a]);return F.createElement(Lw.Provider,{value:P},n)}const $P=e=>{let{id:n,items:o,activeIndex:s,overIndex:a}=e;return Vc(o,s,a).indexOf(n)},zP=e=>{let{containerId:n,isSorting:o,wasDragging:s,index:a,items:l,newIndex:f,previousItems:d,previousContainerId:h,transition:v}=e;return!v||!s||d!==l&&a===f?!1:o?!0:f!==a&&n===h},BP={duration:200,easing:"ease"},$w="transform",UP=Ji.Transition.toString({property:$w,duration:0,easing:"linear"}),HP={roleDescription:"sortable"};function VP(e){let{disabled:n,index:o,node:s,rect:a}=e;const[l,f]=g.useState(null),d=g.useRef(o);return xr(()=>{if(!n&&o!==d.current&&s.current){const h=a.current;if(h){const v=Gs(s.current,{ignoreTransform:!0}),x={x:h.left-v.left,y:h.top-v.top,scaleX:h.width/v.width,scaleY:h.height/v.height};(x.x||x.y)&&f(x)}}o!==d.current&&(d.current=o)},[n,o,s,a]),g.useEffect(()=>{l&&f(null)},[l]),l}function WP(e){let{animateLayoutChanges:n=zP,attributes:o,disabled:s,data:a,getNewIndex:l=$P,id:f,strategy:d,resizeObserverConfig:h,transition:v=BP}=e;const{items:x,containerId:m,activeIndex:b,disabled:E,disableTransforms:T,sortedRects:w,overIndex:S,useDragOverlay:C,strategy:j}=g.useContext(Lw),N=KP(s,E),k=x.indexOf(f),P=g.useMemo(()=>({sortable:{containerId:m,index:k,items:x},...a}),[m,a,k,x]),D=g.useMemo(()=>x.slice(x.indexOf(f)),[x,f]),{rect:_,node:L,isOver:H,setNodeRef:W}=OP({id:f,data:P,disabled:N.droppable,resizeObserverConfig:{updateMeasurementsFor:D,...h}}),{active:U,activatorEvent:ee,activeNodeRect:Y,attributes:X,setNodeRef:le,listeners:Z,isDragging:q,over:z,setActivatorNodeRef:J,transform:te}=PP({id:f,data:P,attributes:{...HP,...o},disabled:N.draggable}),O=hk(W,le),K=!!U,ne=K&&!T&&Ol(b)&&Ol(S),G=!C&&q,de=G&&ne?te:null,ae=ne?de??(d??j)({rects:w,activeNodeRect:Y,activeIndex:b,overIndex:S,index:k}):null,se=Ol(b)&&Ol(S)?l({id:f,items:x,activeIndex:b,overIndex:S}):k,ye=U==null?void 0:U.id,fe=g.useRef({activeId:ye,items:x,newIndex:se,containerId:m}),Ne=x!==fe.current.items,ce=n({active:U,containerId:m,isDragging:q,isSorting:K,id:f,index:k,items:x,newIndex:fe.current.newIndex,previousItems:fe.current.items,previousContainerId:fe.current.containerId,transition:v,wasDragging:fe.current.activeId!=null}),Oe=VP({disabled:!ce,index:k,node:L,rect:_});return g.useEffect(()=>{K&&fe.current.newIndex!==se&&(fe.current.newIndex=se),m!==fe.current.containerId&&(fe.current.containerId=m),x!==fe.current.items&&(fe.current.items=x)},[K,se,m,x]),g.useEffect(()=>{if(ye===fe.current.activeId)return;if(ye&&!fe.current.activeId){fe.current.activeId=ye;return}const Ze=setTimeout(()=>{fe.current.activeId=ye},50);return()=>clearTimeout(Ze)},[ye]),{active:U,activeIndex:b,attributes:X,data:P,rect:_,index:k,newIndex:se,items:x,isOver:H,isSorting:K,isDragging:q,listeners:Z,node:L,overIndex:S,over:z,setNodeRef:O,setActivatorNodeRef:J,setDroppableNodeRef:W,setDraggableNodeRef:le,transform:Oe??ae,transition:pe()};function pe(){if(Oe||Ne&&fe.current.newIndex===k)return UP;if(!(G&&!Bp(ee)||!v)&&(K||ce))return Ji.Transition.toString({...v,property:$w})}}function KP(e,n){var o,s;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(o=e==null?void 0:e.draggable)!=null?o:n.draggable,droppable:(s=e==null?void 0:e.droppable)!=null?s:n.droppable}}function lc(e){if(!e)return!1;const n=e.data.current;return!!(n&&"sortable"in n&&typeof n.sortable=="object"&&"containerId"in n.sortable&&"items"in n.sortable&&"index"in n.sortable)}const YP=[Ye.Down,Ye.Right,Ye.Up,Ye.Left],zw=(e,n)=>{let{context:{active:o,collisionRect:s,droppableRects:a,droppableContainers:l,over:f,scrollableAncestors:d}}=n;if(YP.includes(e.code)){if(e.preventDefault(),!o||!s)return;const h=[];l.getEnabled().forEach(m=>{if(!m||m!=null&&m.disabled)return;const b=a.get(m.id);if(b)switch(e.code){case Ye.Down:s.top<b.top&&h.push(m);break;case Ye.Up:s.top>b.top&&h.push(m);break;case Ye.Left:s.left>b.left&&h.push(m);break;case Ye.Right:s.left<b.left&&h.push(m);break}});const v=kk({collisionRect:s,droppableRects:a,droppableContainers:h});let x=xw(v,"id");if(x===(f==null?void 0:f.id)&&v.length>1&&(x=v[1].id),x!=null){const m=l.get(o.id),b=l.get(x),E=b?a.get(b.id):null,T=b==null?void 0:b.node.current;if(T&&E&&m&&b){const S=$c(T).some((D,_)=>d[_]!==D),C=Bw(m,b),j=GP(m,b),N=S||!C?{x:0,y:0}:{x:j?s.width-E.width:0,y:j?s.height-E.height:0},k={x:E.left,y:E.top};return N.x&&N.y?k:Qi(k,N)}}}};function Bw(e,n){return!lc(e)||!lc(n)?!1:e.data.current.sortable.containerId===n.data.current.sortable.containerId}function GP(e,n){return!lc(e)||!lc(n)||!Bw(e,n)?!1:e.data.current.sortable.index<n.data.current.sortable.index}const Qo=g.forwardRef(({className:e,...n},o)=>c.jsx("div",{ref:o,className:je("rounded-xl border bg-card text-card-foreground shadow",e),...n}));Qo.displayName="Card";const cc=g.forwardRef(({className:e,...n},o)=>c.jsx("div",{ref:o,className:je("flex flex-col space-y-1.5 p-6",e),...n}));cc.displayName="CardHeader";const uc=g.forwardRef(({className:e,...n},o)=>c.jsx("h3",{ref:o,className:je("font-semibold leading-none tracking-tight",e),...n}));uc.displayName="CardTitle";const dc=g.forwardRef(({className:e,...n},o)=>c.jsx("p",{ref:o,className:je("text-sm text-muted-foreground",e),...n}));dc.displayName="CardDescription";const fc=g.forwardRef(({className:e,...n},o)=>c.jsx("div",{ref:o,className:je("p-6 pt-0",e),...n}));fc.displayName="CardContent";const XP=g.forwardRef(({className:e,...n},o)=>c.jsx("div",{ref:o,className:je("flex items-center p-6 pt-0",e),...n}));XP.displayName="CardFooter";var qP=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],QP=qP.reduce((e,n)=>{const o=cx(`Primitive.${n}`),s=g.forwardRef((a,l)=>{const{asChild:f,...d}=a,h=f?o:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(h,{...d,ref:l})});return s.displayName=`Primitive.${n}`,{...e,[n]:s}},{}),JP="Label",Uw=g.forwardRef((e,n)=>c.jsx(QP.label,{...e,ref:n,onMouseDown:o=>{var a;o.target.closest("button, input, select, textarea")||((a=e.onMouseDown)==null||a.call(e,o),!o.defaultPrevented&&o.detail>1&&o.preventDefault())}}));Uw.displayName=JP;var Hw=Uw;const ZP=xc("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ze=g.forwardRef(({className:e,...n},o)=>c.jsx(Hw,{ref:o,className:je(ZP(),e),...n}));ze.displayName=Hw.displayName;function Vp(e){const n=g.useRef({value:e,previous:e});return g.useMemo(()=>(n.current.value!==e&&(n.current.previous=n.current.value,n.current.value=e),n.current.previous),[e])}var Vw=["PageUp","PageDown"],Ww=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Kw={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Xs="Slider",[$f,e_,t_]=Zf(Xs),[Yw]=nr(Xs,[t_]),[n_,Wc]=Yw(Xs),Gw=g.forwardRef((e,n)=>{const{name:o,min:s=0,max:a=100,step:l=1,orientation:f="horizontal",disabled:d=!1,minStepsBetweenThumbs:h=0,defaultValue:v=[s],value:x,onValueChange:m=()=>{},onValueCommit:b=()=>{},inverted:E=!1,form:T,...w}=e,S=g.useRef(new Set),C=g.useRef(0),N=f==="horizontal"?r_:o_,[k=[],P]=bo({prop:x,defaultProp:v,onChange:U=>{var Y;(Y=[...S.current][C.current])==null||Y.focus(),m(U)}}),D=g.useRef(k);function _(U){const ee=c_(k,U);W(U,ee)}function L(U){W(U,C.current)}function H(){const U=D.current[C.current];k[C.current]!==U&&b(k)}function W(U,ee,{commit:Y}={commit:!1}){const X=p_(l),le=h_(Math.round((U-s)/l)*l+s,X),Z=Xi(le,[s,a]);P((q=[])=>{const z=a_(q,Z,ee);if(f_(z,h*l)){C.current=z.indexOf(Z);const J=String(z)!==String(q);return J&&Y&&b(z),J?z:q}else return q})}return c.jsx(n_,{scope:e.__scopeSlider,name:o,disabled:d,min:s,max:a,valueIndexToChangeRef:C,thumbs:S.current,values:k,orientation:f,form:T,children:c.jsx($f.Provider,{scope:e.__scopeSlider,children:c.jsx($f.Slot,{scope:e.__scopeSlider,children:c.jsx(N,{"aria-disabled":d,"data-disabled":d?"":void 0,...w,ref:n,onPointerDown:Ee(w.onPointerDown,()=>{d||(D.current=k)}),min:s,max:a,inverted:E,onSlideStart:d?void 0:_,onSlideMove:d?void 0:L,onSlideEnd:d?void 0:H,onHomeKeyDown:()=>!d&&W(s,0,{commit:!0}),onEndKeyDown:()=>!d&&W(a,k.length-1,{commit:!0}),onStepKeyDown:({event:U,direction:ee})=>{if(!d){const le=Vw.includes(U.key)||U.shiftKey&&Ww.includes(U.key)?10:1,Z=C.current,q=k[Z],z=l*le*ee;W(q+z,Z,{commit:!0})}}})})})})});Gw.displayName=Xs;var[Xw,qw]=Yw(Xs,{startEdge:"left",endEdge:"right",size:"width",direction:1}),r_=g.forwardRef((e,n)=>{const{min:o,max:s,dir:a,inverted:l,onSlideStart:f,onSlideMove:d,onSlideEnd:h,onStepKeyDown:v,...x}=e,[m,b]=g.useState(null),E=Ie(n,N=>b(N)),T=g.useRef(void 0),w=jp(a),S=w==="ltr",C=S&&!l||!S&&l;function j(N){const k=T.current||m.getBoundingClientRect(),P=[0,k.width],_=Wp(P,C?[o,s]:[s,o]);return T.current=k,_(N-k.left)}return c.jsx(Xw,{scope:e.__scopeSlider,startEdge:C?"left":"right",endEdge:C?"right":"left",direction:C?1:-1,size:"width",children:c.jsx(Qw,{dir:w,"data-orientation":"horizontal",...x,ref:E,style:{...x.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:N=>{const k=j(N.clientX);f==null||f(k)},onSlideMove:N=>{const k=j(N.clientX);d==null||d(k)},onSlideEnd:()=>{T.current=void 0,h==null||h()},onStepKeyDown:N=>{const P=Kw[C?"from-left":"from-right"].includes(N.key);v==null||v({event:N,direction:P?-1:1})}})})}),o_=g.forwardRef((e,n)=>{const{min:o,max:s,inverted:a,onSlideStart:l,onSlideMove:f,onSlideEnd:d,onStepKeyDown:h,...v}=e,x=g.useRef(null),m=Ie(n,x),b=g.useRef(void 0),E=!a;function T(w){const S=b.current||x.current.getBoundingClientRect(),C=[0,S.height],N=Wp(C,E?[s,o]:[o,s]);return b.current=S,N(w-S.top)}return c.jsx(Xw,{scope:e.__scopeSlider,startEdge:E?"bottom":"top",endEdge:E?"top":"bottom",size:"height",direction:E?1:-1,children:c.jsx(Qw,{"data-orientation":"vertical",...v,ref:m,style:{...v.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:w=>{const S=T(w.clientY);l==null||l(S)},onSlideMove:w=>{const S=T(w.clientY);f==null||f(S)},onSlideEnd:()=>{b.current=void 0,d==null||d()},onStepKeyDown:w=>{const C=Kw[E?"from-bottom":"from-top"].includes(w.key);h==null||h({event:w,direction:C?-1:1})}})})}),Qw=g.forwardRef((e,n)=>{const{__scopeSlider:o,onSlideStart:s,onSlideMove:a,onSlideEnd:l,onHomeKeyDown:f,onEndKeyDown:d,onStepKeyDown:h,...v}=e,x=Wc(Xs,o);return c.jsx(ke.span,{...v,ref:n,onKeyDown:Ee(e.onKeyDown,m=>{m.key==="Home"?(f(m),m.preventDefault()):m.key==="End"?(d(m),m.preventDefault()):Vw.concat(Ww).includes(m.key)&&(h(m),m.preventDefault())}),onPointerDown:Ee(e.onPointerDown,m=>{const b=m.target;b.setPointerCapture(m.pointerId),m.preventDefault(),x.thumbs.has(b)?b.focus():s(m)}),onPointerMove:Ee(e.onPointerMove,m=>{m.target.hasPointerCapture(m.pointerId)&&a(m)}),onPointerUp:Ee(e.onPointerUp,m=>{const b=m.target;b.hasPointerCapture(m.pointerId)&&(b.releasePointerCapture(m.pointerId),l(m))})})}),Jw="SliderTrack",Zw=g.forwardRef((e,n)=>{const{__scopeSlider:o,...s}=e,a=Wc(Jw,o);return c.jsx(ke.span,{"data-disabled":a.disabled?"":void 0,"data-orientation":a.orientation,...s,ref:n})});Zw.displayName=Jw;var zf="SliderRange",eb=g.forwardRef((e,n)=>{const{__scopeSlider:o,...s}=e,a=Wc(zf,o),l=qw(zf,o),f=g.useRef(null),d=Ie(n,f),h=a.values.length,v=a.values.map(b=>rb(b,a.min,a.max)),x=h>1?Math.min(...v):0,m=100-Math.max(...v);return c.jsx(ke.span,{"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,...s,ref:d,style:{...e.style,[l.startEdge]:x+"%",[l.endEdge]:m+"%"}})});eb.displayName=zf;var Bf="SliderThumb",tb=g.forwardRef((e,n)=>{const o=e_(e.__scopeSlider),[s,a]=g.useState(null),l=Ie(n,d=>a(d)),f=g.useMemo(()=>s?o().findIndex(d=>d.ref.current===s):-1,[o,s]);return c.jsx(s_,{...e,ref:l,index:f})}),s_=g.forwardRef((e,n)=>{const{__scopeSlider:o,index:s,name:a,...l}=e,f=Wc(Bf,o),d=qw(Bf,o),[h,v]=g.useState(null),x=Ie(n,j=>v(j)),m=h?f.form||!!h.closest("form"):!0,b=wp(h),E=f.values[s],T=E===void 0?0:rb(E,f.min,f.max),w=l_(s,f.values.length),S=b==null?void 0:b[d.size],C=S?u_(S,T,d.direction):0;return g.useEffect(()=>{if(h)return f.thumbs.add(h),()=>{f.thumbs.delete(h)}},[h,f.thumbs]),c.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[d.startEdge]:`calc(${T}% + ${C}px)`},children:[c.jsx($f.ItemSlot,{scope:e.__scopeSlider,children:c.jsx(ke.span,{role:"slider","aria-label":e["aria-label"]||w,"aria-valuemin":f.min,"aria-valuenow":E,"aria-valuemax":f.max,"aria-orientation":f.orientation,"data-orientation":f.orientation,"data-disabled":f.disabled?"":void 0,tabIndex:f.disabled?void 0:0,...l,ref:x,style:E===void 0?{display:"none"}:e.style,onFocus:Ee(e.onFocus,()=>{f.valueIndexToChangeRef.current=s})})}),m&&c.jsx(nb,{name:a??(f.name?f.name+(f.values.length>1?"[]":""):void 0),form:f.form,value:E},s)]})});tb.displayName=Bf;var i_="RadioBubbleInput",nb=g.forwardRef(({__scopeSlider:e,value:n,...o},s)=>{const a=g.useRef(null),l=Ie(a,s),f=Vp(n);return g.useEffect(()=>{const d=a.current;if(!d)return;const h=window.HTMLInputElement.prototype,x=Object.getOwnPropertyDescriptor(h,"value").set;if(f!==n&&x){const m=new Event("input",{bubbles:!0});x.call(d,n),d.dispatchEvent(m)}},[f,n]),c.jsx(ke.input,{style:{display:"none"},...o,ref:l,defaultValue:n})});nb.displayName=i_;function a_(e=[],n,o){const s=[...e];return s[o]=n,s.sort((a,l)=>a-l)}function rb(e,n,o){const l=100/(o-n)*(e-n);return Xi(l,[0,100])}function l_(e,n){return n>2?`Value ${e+1} of ${n}`:n===2?["Minimum","Maximum"][e]:void 0}function c_(e,n){if(e.length===1)return 0;const o=e.map(a=>Math.abs(a-n)),s=Math.min(...o);return o.indexOf(s)}function u_(e,n,o){const s=e/2,l=Wp([0,50],[0,s]);return(s-l(n)*o)*o}function d_(e){return e.slice(0,-1).map((n,o)=>e[o+1]-n)}function f_(e,n){if(n>0){const o=d_(e);return Math.min(...o)>=n}return!0}function Wp(e,n){return o=>{if(e[0]===e[1]||n[0]===n[1])return n[0];const s=(n[1]-n[0])/(e[1]-e[0]);return n[0]+s*(o-e[0])}}function p_(e){return(String(e).split(".")[1]||"").length}function h_(e,n){const o=Math.pow(10,n);return Math.round(e*o)/o}var ob=Gw,m_=Zw,g_=eb,v_=tb;const sb=g.forwardRef(({className:e,...n},o)=>c.jsxs(ob,{ref:o,className:je("relative flex w-full touch-none select-none items-center",e),...n,children:[c.jsx(m_,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:c.jsx(g_,{className:"absolute h-full bg-primary"})}),c.jsx(v_,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background 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"})]}));sb.displayName=ob.displayName;var Kc="Collapsible",[y_]=nr(Kc),[x_,Kp]=y_(Kc),ib=g.forwardRef((e,n)=>{const{__scopeCollapsible:o,open:s,defaultOpen:a,disabled:l,onOpenChange:f,...d}=e,[h,v]=bo({prop:s,defaultProp:a??!1,onChange:f,caller:Kc});return c.jsx(x_,{scope:o,disabled:l,contentId:wo(),open:h,onOpenToggle:g.useCallback(()=>v(x=>!x),[v]),children:c.jsx(ke.div,{"data-state":Gp(h),"data-disabled":l?"":void 0,...d,ref:n})})});ib.displayName=Kc;var ab="CollapsibleTrigger",lb=g.forwardRef((e,n)=>{const{__scopeCollapsible:o,...s}=e,a=Kp(ab,o);return c.jsx(ke.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":Gp(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...s,ref:n,onClick:Ee(e.onClick,a.onOpenToggle)})});lb.displayName=ab;var Yp="CollapsibleContent",cb=g.forwardRef((e,n)=>{const{forceMount:o,...s}=e,a=Kp(Yp,e.__scopeCollapsible);return c.jsx(Ln,{present:o||a.open,children:({present:l})=>c.jsx(w_,{...s,ref:n,present:l})})});cb.displayName=Yp;var w_=g.forwardRef((e,n)=>{const{__scopeCollapsible:o,present:s,children:a,...l}=e,f=Kp(Yp,o),[d,h]=g.useState(s),v=g.useRef(null),x=Ie(n,v),m=g.useRef(0),b=m.current,E=g.useRef(0),T=E.current,w=f.open||d,S=g.useRef(w),C=g.useRef(void 0);return g.useEffect(()=>{const j=requestAnimationFrame(()=>S.current=!1);return()=>cancelAnimationFrame(j)},[]),_t(()=>{const j=v.current;if(j){C.current=C.current||{transitionDuration:j.style.transitionDuration,animationName:j.style.animationName},j.style.transitionDuration="0s",j.style.animationName="none";const N=j.getBoundingClientRect();m.current=N.height,E.current=N.width,S.current||(j.style.transitionDuration=C.current.transitionDuration,j.style.animationName=C.current.animationName),h(s)}},[f.open,s]),c.jsx(ke.div,{"data-state":Gp(f.open),"data-disabled":f.disabled?"":void 0,id:f.contentId,hidden:!w,...l,ref:x,style:{"--radix-collapsible-content-height":b?`${b}px`:void 0,"--radix-collapsible-content-width":T?`${T}px`:void 0,...e.style},children:w&&a})});function Gp(e){return e?"open":"closed"}var b_=ib;const S_=b_,C_=lb,E_=cb;function pc(e){if(!e)return"";let n=e.toLowerCase();return n=n.replace(/\s+/g,"_"),n=n.replace(/[^a-z0-9_-]/g,""),n}function N_(e,n){const o=pc(e);return n.some(s=>pc(s.name)===o)}var Yc="Switch",[j_]=nr(Yc),[R_,T_]=j_(Yc),ub=g.forwardRef((e,n)=>{const{__scopeSwitch:o,name:s,checked:a,defaultChecked:l,required:f,disabled:d,value:h="on",onCheckedChange:v,form:x,...m}=e,[b,E]=g.useState(null),T=Ie(n,N=>E(N)),w=g.useRef(!1),S=b?x||!!b.closest("form"):!0,[C,j]=bo({prop:a,defaultProp:l??!1,onChange:v,caller:Yc});return c.jsxs(R_,{scope:o,checked:C,disabled:d,children:[c.jsx(ke.button,{type:"button",role:"switch","aria-checked":C,"aria-required":f,"data-state":hb(C),"data-disabled":d?"":void 0,disabled:d,value:h,...m,ref:T,onClick:Ee(e.onClick,N=>{j(k=>!k),S&&(w.current=N.isPropagationStopped(),w.current||N.stopPropagation())})}),S&&c.jsx(pb,{control:b,bubbles:!w.current,name:s,value:h,checked:C,required:f,disabled:d,form:x,style:{transform:"translateX(-100%)"}})]})});ub.displayName=Yc;var db="SwitchThumb",fb=g.forwardRef((e,n)=>{const{__scopeSwitch:o,...s}=e,a=T_(db,o);return c.jsx(ke.span,{"data-state":hb(a.checked),"data-disabled":a.disabled?"":void 0,...s,ref:n})});fb.displayName=db;var k_="SwitchBubbleInput",pb=g.forwardRef(({__scopeSwitch:e,control:n,checked:o,bubbles:s=!0,...a},l)=>{const f=g.useRef(null),d=Ie(f,l),h=Vp(o),v=wp(n);return g.useEffect(()=>{const x=f.current;if(!x)return;const m=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(m,"checked").set;if(h!==o&&E){const T=new Event("click",{bubbles:s});E.call(x,o),x.dispatchEvent(T)}},[h,o,s]),c.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o,...a,tabIndex:-1,ref:d,style:{...a.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});pb.displayName=k_;function hb(e){return e?"checked":"unchecked"}var mb=ub,P_=fb;const Kt=g.forwardRef(({className:e,...n},o)=>c.jsx(mb,{className:je("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),...n,ref:o,children:c.jsx(P_,{className:je("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")})}));Kt.displayName=mb.displayName;var __=[" ","Enter","ArrowUp","ArrowDown"],D_=[" ","Enter"],Jo="Select",[Gc,Xc,A_]=Zf(Jo),[qs]=nr(Jo,[A_,Ac]),qc=Ac(),[O_,No]=qs(Jo),[M_,I_]=qs(Jo),gb=e=>{const{__scopeSelect:n,children:o,open:s,defaultOpen:a,onOpenChange:l,value:f,defaultValue:d,onValueChange:h,dir:v,name:x,autoComplete:m,disabled:b,required:E,form:T}=e,w=qc(n),[S,C]=g.useState(null),[j,N]=g.useState(null),[k,P]=g.useState(!1),D=jp(v),[_,L]=bo({prop:s,defaultProp:a??!1,onChange:l,caller:Jo}),[H,W]=bo({prop:f,defaultProp:d,onChange:h,caller:Jo}),U=g.useRef(null),ee=S?T||!!S.closest("form"):!0,[Y,X]=g.useState(new Set),le=Array.from(Y).map(Z=>Z.props.value).join(";");return c.jsx(C0,{...w,children:c.jsxs(O_,{required:E,scope:n,trigger:S,onTriggerChange:C,valueNode:j,onValueNodeChange:N,valueNodeHasChildren:k,onValueNodeHasChildrenChange:P,contentId:wo(),value:H,onValueChange:W,open:_,onOpenChange:L,dir:D,triggerPointerDownPosRef:U,disabled:b,children:[c.jsx(Gc.Provider,{scope:n,children:c.jsx(M_,{scope:e.__scopeSelect,onNativeOptionAdd:g.useCallback(Z=>{X(q=>new Set(q).add(Z))},[]),onNativeOptionRemove:g.useCallback(Z=>{X(q=>{const z=new Set(q);return z.delete(Z),z})},[]),children:o})}),ee?c.jsxs(zb,{"aria-hidden":!0,required:E,tabIndex:-1,name:x,autoComplete:m,value:H,onChange:Z=>W(Z.target.value),disabled:b,form:T,children:[H===void 0?c.jsx("option",{value:""}):null,Array.from(Y)]},le):null]})})};gb.displayName=Jo;var vb="SelectTrigger",yb=g.forwardRef((e,n)=>{const{__scopeSelect:o,disabled:s=!1,...a}=e,l=qc(o),f=No(vb,o),d=f.disabled||s,h=Ie(n,f.onTriggerChange),v=Xc(o),x=g.useRef("touch"),[m,b,E]=Ub(w=>{const S=v().filter(N=>!N.disabled),C=S.find(N=>N.value===f.value),j=Hb(S,w,C);j!==void 0&&f.onValueChange(j.value)}),T=w=>{d||(f.onOpenChange(!0),E()),w&&(f.triggerPointerDownPosRef.current={x:Math.round(w.pageX),y:Math.round(w.pageY)})};return c.jsx(Cp,{asChild:!0,...l,children:c.jsx(ke.button,{type:"button",role:"combobox","aria-controls":f.contentId,"aria-expanded":f.open,"aria-required":f.required,"aria-autocomplete":"none",dir:f.dir,"data-state":f.open?"open":"closed",disabled:d,"data-disabled":d?"":void 0,"data-placeholder":Bb(f.value)?"":void 0,...a,ref:h,onClick:Ee(a.onClick,w=>{w.currentTarget.focus(),x.current!=="mouse"&&T(w)}),onPointerDown:Ee(a.onPointerDown,w=>{x.current=w.pointerType;const S=w.target;S.hasPointerCapture(w.pointerId)&&S.releasePointerCapture(w.pointerId),w.button===0&&w.ctrlKey===!1&&w.pointerType==="mouse"&&(T(w),w.preventDefault())}),onKeyDown:Ee(a.onKeyDown,w=>{const S=m.current!=="";!(w.ctrlKey||w.altKey||w.metaKey)&&w.key.length===1&&b(w.key),!(S&&w.key===" ")&&__.includes(w.key)&&(T(),w.preventDefault())})})})});yb.displayName=vb;var xb="SelectValue",wb=g.forwardRef((e,n)=>{const{__scopeSelect:o,className:s,style:a,children:l,placeholder:f="",...d}=e,h=No(xb,o),{onValueNodeHasChildrenChange:v}=h,x=l!==void 0,m=Ie(n,h.onValueNodeChange);return _t(()=>{v(x)},[v,x]),c.jsx(ke.span,{...d,ref:m,style:{pointerEvents:"none"},children:Bb(h.value)?c.jsx(c.Fragment,{children:f}):l})});wb.displayName=xb;var L_="SelectIcon",bb=g.forwardRef((e,n)=>{const{__scopeSelect:o,children:s,...a}=e;return c.jsx(ke.span,{"aria-hidden":!0,...a,ref:n,children:s||"▼"})});bb.displayName=L_;var F_="SelectPortal",Sb=e=>c.jsx(sa,{asChild:!0,...e});Sb.displayName=F_;var Zo="SelectContent",Cb=g.forwardRef((e,n)=>{const o=No(Zo,e.__scopeSelect),[s,a]=g.useState();if(_t(()=>{a(new DocumentFragment)},[]),!o.open){const l=s;return l?Jn.createPortal(c.jsx(Eb,{scope:e.__scopeSelect,children:c.jsx(Gc.Slot,{scope:e.__scopeSelect,children:c.jsx("div",{children:e.children})})}),l):null}return c.jsx(Nb,{...e,ref:n})});Cb.displayName=Zo;var Gn=10,[Eb,jo]=qs(Zo),$_="SelectContentImpl",z_=$s("SelectContent.RemoveScroll"),Nb=g.forwardRef((e,n)=>{const{__scopeSelect:o,position:s="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:l,onPointerDownOutside:f,side:d,sideOffset:h,align:v,alignOffset:x,arrowPadding:m,collisionBoundary:b,collisionPadding:E,sticky:T,hideWhenDetached:w,avoidCollisions:S,...C}=e,j=No(Zo,o),[N,k]=g.useState(null),[P,D]=g.useState(null),_=Ie(n,ae=>k(ae)),[L,H]=g.useState(null),[W,U]=g.useState(null),ee=Xc(o),[Y,X]=g.useState(!1),le=g.useRef(!1);g.useEffect(()=>{if(N)return ap(N)},[N]),ip();const Z=g.useCallback(ae=>{const[se,...ye]=ee().map(ce=>ce.ref.current),[fe]=ye.slice(-1),Ne=document.activeElement;for(const ce of ae)if(ce===Ne||(ce==null||ce.scrollIntoView({block:"nearest"}),ce===se&&P&&(P.scrollTop=0),ce===fe&&P&&(P.scrollTop=P.scrollHeight),ce==null||ce.focus(),document.activeElement!==Ne))return},[ee,P]),q=g.useCallback(()=>Z([L,N]),[Z,L,N]);g.useEffect(()=>{Y&&q()},[Y,q]);const{onOpenChange:z,triggerPointerDownPosRef:J}=j;g.useEffect(()=>{if(N){let ae={x:0,y:0};const se=fe=>{var Ne,ce;ae={x:Math.abs(Math.round(fe.pageX)-(((Ne=J.current)==null?void 0:Ne.x)??0)),y:Math.abs(Math.round(fe.pageY)-(((ce=J.current)==null?void 0:ce.y)??0))}},ye=fe=>{ae.x<=10&&ae.y<=10?fe.preventDefault():N.contains(fe.target)||z(!1),document.removeEventListener("pointermove",se),J.current=null};return J.current!==null&&(document.addEventListener("pointermove",se),document.addEventListener("pointerup",ye,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",se),document.removeEventListener("pointerup",ye,{capture:!0})}}},[N,z,J]),g.useEffect(()=>{const ae=()=>z(!1);return window.addEventListener("blur",ae),window.addEventListener("resize",ae),()=>{window.removeEventListener("blur",ae),window.removeEventListener("resize",ae)}},[z]);const[te,O]=Ub(ae=>{const se=ee().filter(Ne=>!Ne.disabled),ye=se.find(Ne=>Ne.ref.current===document.activeElement),fe=Hb(se,ae,ye);fe&&setTimeout(()=>fe.ref.current.focus())}),K=g.useCallback((ae,se,ye)=>{const fe=!le.current&&!ye;(j.value!==void 0&&j.value===se||fe)&&(H(ae),fe&&(le.current=!0))},[j.value]),ne=g.useCallback(()=>N==null?void 0:N.focus(),[N]),G=g.useCallback((ae,se,ye)=>{const fe=!le.current&&!ye;(j.value!==void 0&&j.value===se||fe)&&U(ae)},[j.value]),de=s==="popper"?Uf:jb,he=de===Uf?{side:d,sideOffset:h,align:v,alignOffset:x,arrowPadding:m,collisionBoundary:b,collisionPadding:E,sticky:T,hideWhenDetached:w,avoidCollisions:S}:{};return c.jsx(Eb,{scope:o,content:N,viewport:P,onViewportChange:D,itemRefCallback:K,selectedItem:L,onItemLeave:ne,itemTextRefCallback:G,focusSelectedItem:q,selectedItemText:W,position:s,isPositioned:Y,searchRef:te,children:c.jsx(Sc,{as:z_,allowPinchZoom:!0,children:c.jsx(wc,{asChild:!0,trapped:j.open,onMountAutoFocus:ae=>{ae.preventDefault()},onUnmountAutoFocus:Ee(a,ae=>{var se;(se=j.trigger)==null||se.focus({preventScroll:!0}),ae.preventDefault()}),children:c.jsx(oa,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:l,onPointerDownOutside:f,onFocusOutside:ae=>ae.preventDefault(),onDismiss:()=>j.onOpenChange(!1),children:c.jsx(de,{role:"listbox",id:j.contentId,"data-state":j.open?"open":"closed",dir:j.dir,onContextMenu:ae=>ae.preventDefault(),...C,...he,onPlaced:()=>X(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:Ee(C.onKeyDown,ae=>{const se=ae.ctrlKey||ae.altKey||ae.metaKey;if(ae.key==="Tab"&&ae.preventDefault(),!se&&ae.key.length===1&&O(ae.key),["ArrowUp","ArrowDown","Home","End"].includes(ae.key)){let fe=ee().filter(Ne=>!Ne.disabled).map(Ne=>Ne.ref.current);if(["ArrowUp","End"].includes(ae.key)&&(fe=fe.slice().reverse()),["ArrowUp","ArrowDown"].includes(ae.key)){const Ne=ae.target,ce=fe.indexOf(Ne);fe=fe.slice(ce+1)}setTimeout(()=>Z(fe)),ae.preventDefault()}})})})})})})});Nb.displayName=$_;var B_="SelectItemAlignedPosition",jb=g.forwardRef((e,n)=>{const{__scopeSelect:o,onPlaced:s,...a}=e,l=No(Zo,o),f=jo(Zo,o),[d,h]=g.useState(null),[v,x]=g.useState(null),m=Ie(n,_=>x(_)),b=Xc(o),E=g.useRef(!1),T=g.useRef(!0),{viewport:w,selectedItem:S,selectedItemText:C,focusSelectedItem:j}=f,N=g.useCallback(()=>{if(l.trigger&&l.valueNode&&d&&v&&w&&S&&C){const _=l.trigger.getBoundingClientRect(),L=v.getBoundingClientRect(),H=l.valueNode.getBoundingClientRect(),W=C.getBoundingClientRect();if(l.dir!=="rtl"){const Ne=W.left-L.left,ce=H.left-Ne,Oe=_.left-ce,pe=_.width+Oe,Ze=Math.max(pe,L.width),wt=window.innerWidth-Gn,gt=Xi(ce,[Gn,Math.max(Gn,wt-Ze)]);d.style.minWidth=pe+"px",d.style.left=gt+"px"}else{const Ne=L.right-W.right,ce=window.innerWidth-H.right-Ne,Oe=window.innerWidth-_.right-ce,pe=_.width+Oe,Ze=Math.max(pe,L.width),wt=window.innerWidth-Gn,gt=Xi(ce,[Gn,Math.max(Gn,wt-Ze)]);d.style.minWidth=pe+"px",d.style.right=gt+"px"}const U=b(),ee=window.innerHeight-Gn*2,Y=w.scrollHeight,X=window.getComputedStyle(v),le=parseInt(X.borderTopWidth,10),Z=parseInt(X.paddingTop,10),q=parseInt(X.borderBottomWidth,10),z=parseInt(X.paddingBottom,10),J=le+Z+Y+z+q,te=Math.min(S.offsetHeight*5,J),O=window.getComputedStyle(w),K=parseInt(O.paddingTop,10),ne=parseInt(O.paddingBottom,10),G=_.top+_.height/2-Gn,de=ee-G,he=S.offsetHeight/2,ae=S.offsetTop+he,se=le+Z+ae,ye=J-se;if(se<=G){const Ne=U.length>0&&S===U[U.length-1].ref.current;d.style.bottom="0px";const ce=v.clientHeight-w.offsetTop-w.offsetHeight,Oe=Math.max(de,he+(Ne?ne:0)+ce+q),pe=se+Oe;d.style.height=pe+"px"}else{const Ne=U.length>0&&S===U[0].ref.current;d.style.top="0px";const Oe=Math.max(G,le+w.offsetTop+(Ne?K:0)+he)+ye;d.style.height=Oe+"px",w.scrollTop=se-G+w.offsetTop}d.style.margin=`${Gn}px 0`,d.style.minHeight=te+"px",d.style.maxHeight=ee+"px",s==null||s(),requestAnimationFrame(()=>E.current=!0)}},[b,l.trigger,l.valueNode,d,v,w,S,C,l.dir,s]);_t(()=>N(),[N]);const[k,P]=g.useState();_t(()=>{v&&P(window.getComputedStyle(v).zIndex)},[v]);const D=g.useCallback(_=>{_&&T.current===!0&&(N(),j==null||j(),T.current=!1)},[N,j]);return c.jsx(H_,{scope:o,contentWrapper:d,shouldExpandOnScrollRef:E,onScrollButtonChange:D,children:c.jsx("div",{ref:h,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:c.jsx(ke.div,{...a,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});jb.displayName=B_;var U_="SelectPopperPosition",Uf=g.forwardRef((e,n)=>{const{__scopeSelect:o,align:s="start",collisionPadding:a=Gn,...l}=e,f=qc(o);return c.jsx(E0,{...f,...l,ref:n,align:s,collisionPadding:a,style:{boxSizing:"border-box",...l.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)"}})});Uf.displayName=U_;var[H_,Xp]=qs(Zo,{}),Hf="SelectViewport",Rb=g.forwardRef((e,n)=>{const{__scopeSelect:o,nonce:s,...a}=e,l=jo(Hf,o),f=Xp(Hf,o),d=Ie(n,l.onViewportChange),h=g.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:s}),c.jsx(Gc.Slot,{scope:o,children:c.jsx(ke.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:Ee(a.onScroll,v=>{const x=v.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:b}=f;if(b!=null&&b.current&&m){const E=Math.abs(h.current-x.scrollTop);if(E>0){const T=window.innerHeight-Gn*2,w=parseFloat(m.style.minHeight),S=parseFloat(m.style.height),C=Math.max(w,S);if(C<T){const j=C+E,N=Math.min(T,j),k=j-N;m.style.height=N+"px",m.style.bottom==="0px"&&(x.scrollTop=k>0?k:0,m.style.justifyContent="flex-end")}}}h.current=x.scrollTop})})})]})});Rb.displayName=Hf;var Tb="SelectGroup",[V_,W_]=qs(Tb),K_=g.forwardRef((e,n)=>{const{__scopeSelect:o,...s}=e,a=wo();return c.jsx(V_,{scope:o,id:a,children:c.jsx(ke.div,{role:"group","aria-labelledby":a,...s,ref:n})})});K_.displayName=Tb;var kb="SelectLabel",Pb=g.forwardRef((e,n)=>{const{__scopeSelect:o,...s}=e,a=W_(kb,o);return c.jsx(ke.div,{id:a.id,...s,ref:n})});Pb.displayName=kb;var hc="SelectItem",[Y_,_b]=qs(hc),Db=g.forwardRef((e,n)=>{const{__scopeSelect:o,value:s,disabled:a=!1,textValue:l,...f}=e,d=No(hc,o),h=jo(hc,o),v=d.value===s,[x,m]=g.useState(l??""),[b,E]=g.useState(!1),T=Ie(n,j=>{var N;return(N=h.itemRefCallback)==null?void 0:N.call(h,j,s,a)}),w=wo(),S=g.useRef("touch"),C=()=>{a||(d.onValueChange(s),d.onOpenChange(!1))};if(s==="")throw new Error("A <Select.Item /> 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(Y_,{scope:o,value:s,disabled:a,textId:w,isSelected:v,onItemTextChange:g.useCallback(j=>{m(N=>N||((j==null?void 0:j.textContent)??"").trim())},[]),children:c.jsx(Gc.ItemSlot,{scope:o,value:s,disabled:a,textValue:x,children:c.jsx(ke.div,{role:"option","aria-labelledby":w,"data-highlighted":b?"":void 0,"aria-selected":v&&b,"data-state":v?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...f,ref:T,onFocus:Ee(f.onFocus,()=>E(!0)),onBlur:Ee(f.onBlur,()=>E(!1)),onClick:Ee(f.onClick,()=>{S.current!=="mouse"&&C()}),onPointerUp:Ee(f.onPointerUp,()=>{S.current==="mouse"&&C()}),onPointerDown:Ee(f.onPointerDown,j=>{S.current=j.pointerType}),onPointerMove:Ee(f.onPointerMove,j=>{var N;S.current=j.pointerType,a?(N=h.onItemLeave)==null||N.call(h):S.current==="mouse"&&j.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ee(f.onPointerLeave,j=>{var N;j.currentTarget===document.activeElement&&((N=h.onItemLeave)==null||N.call(h))}),onKeyDown:Ee(f.onKeyDown,j=>{var k;((k=h.searchRef)==null?void 0:k.current)!==""&&j.key===" "||(D_.includes(j.key)&&C(),j.key===" "&&j.preventDefault())})})})})});Db.displayName=hc;var Ii="SelectItemText",Ab=g.forwardRef((e,n)=>{const{__scopeSelect:o,className:s,style:a,...l}=e,f=No(Ii,o),d=jo(Ii,o),h=_b(Ii,o),v=I_(Ii,o),[x,m]=g.useState(null),b=Ie(n,C=>m(C),h.onItemTextChange,C=>{var j;return(j=d.itemTextRefCallback)==null?void 0:j.call(d,C,h.value,h.disabled)}),E=x==null?void 0:x.textContent,T=g.useMemo(()=>c.jsx("option",{value:h.value,disabled:h.disabled,children:E},h.value),[h.disabled,h.value,E]),{onNativeOptionAdd:w,onNativeOptionRemove:S}=v;return _t(()=>(w(T),()=>S(T)),[w,S,T]),c.jsxs(c.Fragment,{children:[c.jsx(ke.span,{id:h.textId,...l,ref:b}),h.isSelected&&f.valueNode&&!f.valueNodeHasChildren?Jn.createPortal(l.children,f.valueNode):null]})});Ab.displayName=Ii;var Ob="SelectItemIndicator",Mb=g.forwardRef((e,n)=>{const{__scopeSelect:o,...s}=e;return _b(Ob,o).isSelected?c.jsx(ke.span,{"aria-hidden":!0,...s,ref:n}):null});Mb.displayName=Ob;var Vf="SelectScrollUpButton",Ib=g.forwardRef((e,n)=>{const o=jo(Vf,e.__scopeSelect),s=Xp(Vf,e.__scopeSelect),[a,l]=g.useState(!1),f=Ie(n,s.onScrollButtonChange);return _t(()=>{if(o.viewport&&o.isPositioned){let d=function(){const v=h.scrollTop>0;l(v)};const h=o.viewport;return d(),h.addEventListener("scroll",d),()=>h.removeEventListener("scroll",d)}},[o.viewport,o.isPositioned]),a?c.jsx(Fb,{...e,ref:f,onAutoScroll:()=>{const{viewport:d,selectedItem:h}=o;d&&h&&(d.scrollTop=d.scrollTop-h.offsetHeight)}}):null});Ib.displayName=Vf;var Wf="SelectScrollDownButton",Lb=g.forwardRef((e,n)=>{const o=jo(Wf,e.__scopeSelect),s=Xp(Wf,e.__scopeSelect),[a,l]=g.useState(!1),f=Ie(n,s.onScrollButtonChange);return _t(()=>{if(o.viewport&&o.isPositioned){let d=function(){const v=h.scrollHeight-h.clientHeight,x=Math.ceil(h.scrollTop)<v;l(x)};const h=o.viewport;return d(),h.addEventListener("scroll",d),()=>h.removeEventListener("scroll",d)}},[o.viewport,o.isPositioned]),a?c.jsx(Fb,{...e,ref:f,onAutoScroll:()=>{const{viewport:d,selectedItem:h}=o;d&&h&&(d.scrollTop=d.scrollTop+h.offsetHeight)}}):null});Lb.displayName=Wf;var Fb=g.forwardRef((e,n)=>{const{__scopeSelect:o,onAutoScroll:s,...a}=e,l=jo("SelectScrollButton",o),f=g.useRef(null),d=Xc(o),h=g.useCallback(()=>{f.current!==null&&(window.clearInterval(f.current),f.current=null)},[]);return g.useEffect(()=>()=>h(),[h]),_t(()=>{var x;const v=d().find(m=>m.ref.current===document.activeElement);(x=v==null?void 0:v.ref.current)==null||x.scrollIntoView({block:"nearest"})},[d]),c.jsx(ke.div,{"aria-hidden":!0,...a,ref:n,style:{flexShrink:0,...a.style},onPointerDown:Ee(a.onPointerDown,()=>{f.current===null&&(f.current=window.setInterval(s,50))}),onPointerMove:Ee(a.onPointerMove,()=>{var v;(v=l.onItemLeave)==null||v.call(l),f.current===null&&(f.current=window.setInterval(s,50))}),onPointerLeave:Ee(a.onPointerLeave,()=>{h()})})}),G_="SelectSeparator",$b=g.forwardRef((e,n)=>{const{__scopeSelect:o,...s}=e;return c.jsx(ke.div,{"aria-hidden":!0,...s,ref:n})});$b.displayName=G_;var Kf="SelectArrow",X_=g.forwardRef((e,n)=>{const{__scopeSelect:o,...s}=e,a=qc(o),l=No(Kf,o),f=jo(Kf,o);return l.open&&f.position==="popper"?c.jsx(N0,{...a,...s,ref:n}):null});X_.displayName=Kf;var q_="SelectBubbleInput",zb=g.forwardRef(({__scopeSelect:e,value:n,...o},s)=>{const a=g.useRef(null),l=Ie(s,a),f=Vp(n);return g.useEffect(()=>{const d=a.current;if(!d)return;const h=window.HTMLSelectElement.prototype,x=Object.getOwnPropertyDescriptor(h,"value").set;if(f!==n&&x){const m=new Event("change",{bubbles:!0});x.call(d,n),d.dispatchEvent(m)}},[f,n]),c.jsx(ke.select,{...o,style:{...Py,...o.style},ref:l,defaultValue:n})});zb.displayName=q_;function Bb(e){return e===""||e===void 0}function Ub(e){const n=zt(e),o=g.useRef(""),s=g.useRef(0),a=g.useCallback(f=>{const d=o.current+f;n(d),(function h(v){o.current=v,window.clearTimeout(s.current),v!==""&&(s.current=window.setTimeout(()=>h(""),1e3))})(d)},[n]),l=g.useCallback(()=>{o.current="",window.clearTimeout(s.current)},[]);return g.useEffect(()=>()=>window.clearTimeout(s.current),[]),[o,a,l]}function Hb(e,n,o){const a=n.length>1&&Array.from(n).every(v=>v===n[0])?n[0]:n,l=o?e.indexOf(o):-1;let f=Q_(e,Math.max(l,0));a.length===1&&(f=f.filter(v=>v!==o));const h=f.find(v=>v.textValue.toLowerCase().startsWith(a.toLowerCase()));return h!==o?h:void 0}function Q_(e,n){return e.map((o,s)=>e[(n+s)%e.length])}var J_=gb,Vb=yb,Z_=wb,eD=bb,tD=Sb,Wb=Cb,nD=Rb,Kb=Pb,Yb=Db,rD=Ab,oD=Mb,Gb=Ib,Xb=Lb,qb=$b;const Yt=J_,Gt=Z_,Bt=g.forwardRef(({className:e,children:n,...o},s)=>c.jsxs(Vb,{ref:s,className:je("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 data-[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),...o,children:[n,c.jsx(eD,{asChild:!0,children:c.jsx(vc,{className:"h-4 w-4 opacity-50"})})]}));Bt.displayName=Vb.displayName;const Qb=g.forwardRef(({className:e,...n},o)=>c.jsx(Gb,{ref:o,className:je("flex cursor-default items-center justify-center py-1",e),...n,children:c.jsx(BC,{className:"h-4 w-4"})}));Qb.displayName=Gb.displayName;const Jb=g.forwardRef(({className:e,...n},o)=>c.jsx(Xb,{ref:o,className:je("flex cursor-default items-center justify-center py-1",e),...n,children:c.jsx(vc,{className:"h-4 w-4"})}));Jb.displayName=Xb.displayName;const Ut=g.forwardRef(({className:e,children:n,position:o="popper",...s},a)=>c.jsx(tD,{children:c.jsxs(Wb,{ref:a,className:je("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-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 origin-[--radix-select-content-transform-origin]",o==="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:o,...s,children:[c.jsx(Qb,{}),c.jsx(nD,{className:je("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),c.jsx(Jb,{})]})}));Ut.displayName=Wb.displayName;const sD=g.forwardRef(({className:e,...n},o)=>c.jsx(Kb,{ref:o,className:je("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...n}));sD.displayName=Kb.displayName;const Ue=g.forwardRef(({className:e,children:n,...o},s)=>c.jsxs(Yb,{ref:s,className:je("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),...o,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(oD,{children:c.jsx($C,{className:"h-4 w-4"})})}),c.jsx(rD,{children:n})]}));Ue.displayName=Yb.displayName;const iD=g.forwardRef(({className:e,...n},o)=>c.jsx(qb,{ref:o,className:je("-mx-1 my-1 h-px bg-muted",e),...n}));iD.displayName=qb.displayName;const aD=[{value:"==",label:"is equal to"},{value:"!=",label:"is not equal to"},{value:"contains",label:"contains"},{value:"empty",label:"is empty"},{value:"not_empty",label:"is not empty"}];function lD({field:e,otherFields:n,onConditionalLogicChange:o}){var w,S,C;const s=((w=e.settings)==null?void 0:w.conditional_logic)&&e.settings.conditional_logic.length>0,[a,l]=g.useState(s),[f,d]=g.useState(((S=e.settings)==null?void 0:S.conditional_logic)||[]);g.useEffect(()=>{var N,k;if(((N=e.settings)==null?void 0:N.conditional_logic)&&e.settings.conditional_logic.length>0&&((k=e.settings)!=null&&k.conditional_logic)){l(!0);const P=e.settings.conditional_logic.map(D=>D.map(_=>({..._,field:String(_.field)})));d(P)}},[(C=e.settings)==null?void 0:C.conditional_logic]);const h=j=>{const N=j.map(k=>k.filter(P=>P.field&&P.operator)).filter(k=>k.length>0);N.length>0?o(N):o(void 0)},v=j=>{if(l(j),j){const N=f.length>0?f:[[{field:"",operator:"==",value:""}]];d(N),o(N)}else d([]),o(void 0)},x=j=>{const N=[...f];N[j]=[...N[j]||[],{field:"",operator:"==",value:""}],d(N)},m=()=>{const j=[...f,[{field:"",operator:"==",value:""}]];d(j)},b=(j,N,k,P)=>{const D=[...f],_=D[j];!_||!_[N]||(D[j]=[..._],D[j][N]={..._[N],[k]:P},d(D),h(D))},E=(j,N)=>{const k=[...f],P=k[j];if(!P)return;k[j]=P.filter((_,L)=>L!==N);const D=k.filter(_=>_.length>0);d(D),h(D)},T=j=>{const N=f.filter((k,P)=>P!==j);d(N),h(N)};return c.jsxs("div",{className:"border-t pt-4",children:[c.jsxs("div",{className:"flex items-center justify-between mb-3",children:[c.jsx("h4",{className:"text-sm font-medium",children:"Conditional Logic"}),c.jsx(Kt,{checked:a,onCheckedChange:v})]}),a&&c.jsxs("div",{className:"space-y-3",children:[c.jsx("p",{className:"text-xs text-gray-600",children:"Show this field if conditions match"}),f.map((j,N)=>c.jsxs("div",{className:"bg-gray-50 p-3 rounded-lg space-y-2",children:[N>0&&c.jsx("div",{className:"flex items-center justify-center -mt-6 mb-2",children:c.jsx("span",{className:"bg-blue-100 text-blue-700 text-xs font-semibold px-2 py-1 rounded",children:"OR"})}),j.map((k,P)=>c.jsxs("div",{children:[P>0&&c.jsx("div",{className:"text-xs text-gray-500 text-center my-1",children:"AND"}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs(Yt,{value:String(k.field),onValueChange:D=>b(N,P,"field",D),children:[c.jsx(Bt,{className:"w-[140px]",children:c.jsx(Gt,{placeholder:"Select field"})}),c.jsx(Ut,{children:n.map(D=>c.jsx(Ue,{value:String(D.id),children:D.label},D.id))})]}),c.jsxs(Yt,{value:k.operator,onValueChange:D=>b(N,P,"operator",D),children:[c.jsx(Bt,{className:"w-[130px]",children:c.jsx(Gt,{placeholder:"Operator"})}),c.jsx(Ut,{children:aD.map(D=>c.jsx(Ue,{value:D.value,children:D.label},D.value))})]}),!["empty","not_empty"].includes(k.operator)&&c.jsx(yn,{value:k.value,onChange:D=>b(N,P,"value",D.target.value),placeholder:"Value",className:"w-[100px]"}),c.jsx("button",{type:"button",onClick:()=>E(N,P),className:"p-1 text-gray-400 hover:text-red-600",title:"Remove rule",children:c.jsx(ra,{className:"h-4 w-4"})})]})]},P)),c.jsxs("div",{className:"flex items-center justify-between pt-2",children:[c.jsxs(mt,{type:"button",variant:"ghost",size:"sm",onClick:()=>x(N),className:"text-xs",children:[c.jsx(Fr,{className:"h-3 w-3 mr-1"}),"AND"]}),f.length>1&&c.jsx("button",{type:"button",onClick:()=>T(N),className:"text-xs text-red-500 hover:text-red-700",children:"Remove group"})]})]},N)),c.jsxs(mt,{type:"button",variant:"outline",size:"sm",onClick:m,className:"w-full",children:[c.jsx(Fr,{className:"h-3 w-3 mr-1"}),"Add OR Group"]})]})]})}function cD({field:e,onSettingsChange:n}){var a,l;const o=((a=e.settings)==null?void 0:a.required)??!1,s=((l=e.settings)==null?void 0:l.instructions)||"";return c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"space-y-0.5",children:[c.jsx(ze,{htmlFor:`required-${e.id}`,className:"text-sm font-medium",children:"Required"}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Make this field mandatory"})]}),c.jsx(Kt,{id:`required-${e.id}`,checked:o,onCheckedChange:f=>n({required:f})})]}),c.jsxs("div",{children:[c.jsx(ze,{htmlFor:`instructions-${e.id}`,className:"text-sm font-medium",children:"Instructions"}),c.jsx("textarea",{id:`instructions-${e.id}`,value:s,onChange:f=>n({instructions:f.target.value}),className:"w-full mt-1 px-3 py-2 border rounded-md text-sm resize-none",rows:2,placeholder:"Help text shown below the field"})]})]})}function uD({field:e,onSettingsChange:n}){const o=Je.getSettingsComponent(e.type);return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"border-t pt-4",children:[c.jsx("h4",{className:"text-sm font-medium mb-3",children:"General Settings"}),c.jsx(cD,{field:e,onSettingsChange:n})]}),o&&c.jsxs("div",{className:"border-t pt-4",children:[c.jsxs("h4",{className:"text-sm font-medium mb-3 capitalize",children:[e.type," Settings"]}),c.jsx(o,{field:e,onSettingsChange:n})]})]})}const Zb=dp,dD=fp,fD=pp,eS=g.forwardRef(({className:e,...n},o)=>c.jsx(Ec,{ref:o,className:je("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),...n}));eS.displayName=Ec.displayName;const qp=g.forwardRef(({className:e,children:n,...o},s)=>c.jsxs(fD,{children:[c.jsx(eS,{}),c.jsxs(Nc,{ref:s,className:je("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),...o,children:[n,c.jsxs(Tc,{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(ra,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));qp.displayName=Nc.displayName;const Qp=({className:e,...n})=>c.jsx("div",{className:je("flex flex-col space-y-1.5 text-center sm:text-left",e),...n});Qp.displayName="DialogHeader";const Jp=g.forwardRef(({className:e,...n},o)=>c.jsx(jc,{ref:o,className:je("text-lg font-semibold leading-none tracking-tight",e),...n}));Jp.displayName=jc.displayName;const Zp=g.forwardRef(({className:e,...n},o)=>c.jsx(Rc,{ref:o,className:je("text-sm text-muted-foreground",e),...n}));Zp.displayName=Rc.displayName;function tS({field:e,allFields:n,depth:o,onSelect:s}){const a=Gi(n,e.id),l=ca(e)&&a.length>0;return c.jsxs("div",{children:[c.jsxs("button",{onClick:()=>s(e),className:"w-full text-left px-3 py-2 hover:bg-gray-100 rounded flex items-center gap-2 transition-colors",style:{paddingLeft:`${12+o*20}px`},children:[l&&c.jsx(zC,{className:"h-3 w-3 text-gray-400"}),!l&&c.jsx("span",{className:"w-3"}),c.jsx("span",{className:"flex-1 text-sm truncate",children:e.label||e.name}),c.jsx(Fi,{variant:"outline",className:"text-xs",children:e.type}),c.jsx(Fs,{className:"h-3 w-3 text-gray-400"})]}),l&&c.jsx("div",{children:a.map(f=>c.jsx(tS,{field:f,allFields:n,depth:o+1,onSelect:s},f.id))})]})}function nS({open:e,onOpenChange:n,targetParentId:o,currentFieldsetId:s,onCopy:a}){var P;const[l,f]=g.useState("current"),[d,h]=g.useState([]),[v,x]=g.useState([]),[m,b]=g.useState(!1),[E,T]=g.useState(!1),w=it(D=>D.fields),S=it(D=>D.currentFieldset);g.useEffect(()=>{e&&d.length===0&&(b(!0),Mn.getAll().then(D=>{h(D)}).catch(D=>{console.error("Failed to fetch fieldsets:",D)}).finally(()=>{b(!1)}))},[e,d.length]),g.useEffect(()=>{if(l==="current"||!l){x([]);return}T(!0),Bo.getByFieldset(Number(l)).then(D=>{x(D)}).catch(D=>{console.error("Failed to fetch fields:",D),x([])}).finally(()=>{T(!1)})},[l]);const C=g.useMemo(()=>$i(l==="current"?w:v),[l,w,v]),j=l==="current"?w:v,N=D=>{const _={...D,id:`temp-${Date.now()}`,parent_id:o,fieldset_id:s,label:`${D.label} (Copy)`,name:`${D.name}_copy_${Date.now().toString(36)}`};D.settings&&(_.settings=JSON.parse(JSON.stringify(D.settings))),a(_),n(!1)},k=o?((P=w.find(D=>String(D.id)===String(o)))==null?void 0:P.label)||"selected parent":"root level";return c.jsx(Zb,{open:e,onOpenChange:n,children:c.jsxs(qp,{className:"max-w-lg",children:[c.jsxs(Qp,{children:[c.jsxs(Jp,{className:"flex items-center gap-2",children:[c.jsx(Fs,{className:"h-5 w-5"}),"Copy Field"]}),c.jsxs(Zp,{children:["Copy a field to ",k,". The copied field will have a new ID and name."]})]}),c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{children:[c.jsx(ze,{children:"Copy from"}),c.jsxs(Yt,{value:l,onValueChange:f,children:[c.jsx(Bt,{className:"mt-1",children:c.jsx(Gt,{placeholder:"Select fieldset..."})}),c.jsxs(Ut,{children:[c.jsxs(Ue,{value:"current",children:[(S==null?void 0:S.title)||"Current Fieldset"," (Current)"]}),d.filter(D=>D.id!==s).map(D=>c.jsx(Ue,{value:String(D.id),children:D.title},D.id))]})]})]}),c.jsxs("div",{children:[c.jsx(ze,{children:"Select field to copy"}),c.jsx("div",{className:"mt-1 border rounded-md",children:m||E?c.jsxs("div",{className:"flex items-center justify-center py-8 text-gray-500",children:[c.jsx(Cy,{className:"h-5 w-5 animate-spin mr-2"}),"Loading..."]}):C.length===0?c.jsx("div",{className:"text-center py-8 text-gray-500 text-sm",children:"No fields available in this fieldset"}):c.jsx(Lc,{className:"h-64",children:c.jsx("div",{className:"p-1",children:C.map(D=>c.jsx(tS,{field:D,allFields:j,depth:0,onSelect:N},D.id))})})})]})]})]})})}function pD({parentField:e,allFields:n,depth:o,maxDepth:s=3,FieldItemComponent:a}){const l=it(P=>P.addFieldLocal),f=it(P=>P.reorderFieldsLocal),d=it(P=>P.getChildFields),h=it(P=>P.currentFieldset),{showToast:v}=ua(),[x,m]=g.useState(!1),[b,E]=g.useState(!1),T=d(e.id),w=Je.getGroupedByCategory(),S=gw(ic(Bc),ic(zc,{coordinateGetter:zw})),C=P=>{const{active:D,over:_}=P;if(_&&D.id!==_.id){const L=T.findIndex(U=>U.id===D.id),H=T.findIndex(U=>U.id===_.id),W=Vc(T,L,H);f(W,e.id)}},j=()=>{let P=1,D=`${e.name}_field_${P}`,_=`Field ${P}`;for(;n.some(L=>L.name===D);)P++,D=`${e.name}_field_${P}`,_=`Field ${P}`;return{fieldName:D,fieldLabel:_}},N=P=>{const{fieldName:D,fieldLabel:_}=j(),L=Je.get(P);if(L!=null&&L.hasSubFields&&o>=s){v("error",`Cannot add ${L.label} - maximum nesting depth (${s}) reached`),m(!1);return}l({type:P,label:_,name:D},e.id),m(!1),v("success",`${_} added to ${e.label}`)},k=P=>{l({...P,parent_id:e.id},e.id),v("success",`${P.label} copied to ${e.label}`)};return c.jsxs("div",{className:"mt-3 ml-4 pl-4 border-l-2 border-dashed border-gray-300",children:[c.jsxs("div",{className:"text-xs text-gray-500 mb-2 font-medium",children:["Sub-fields of ",e.label]}),c.jsx(Aw,{id:`nested-${e.id}`,sensors:S,collisionDetection:ww,onDragEnd:C,children:c.jsx(Fw,{items:T.map(P=>P.id),strategy:Mw,children:T.map(P=>c.jsx(a,{field:P,allFields:n,depth:o,maxDepth:s},P.id))})}),T.length===0&&c.jsx("div",{className:"text-sm text-gray-400 italic py-2",children:"No sub-fields yet"}),c.jsxs(Dp,{open:x,onOpenChange:m,children:[c.jsx(uw,{asChild:!0,children:c.jsxs("button",{className:"w-full mt-2 p-3 border-2 border-dashed border-gray-200 rounded-lg hover:border-gray-300 hover:bg-gray-50 transition-colors flex items-center justify-center gap-2 text-gray-500 text-sm",children:[c.jsx(Fr,{className:"h-4 w-4"}),c.jsx("span",{children:"Add Sub-field"})]})}),c.jsxs(Ap,{children:[c.jsxs(Op,{children:[c.jsxs(Ip,{children:["Add Sub-field to ",e.label]}),c.jsx(Lp,{children:"Choose the type of field you want to add"})]}),c.jsx(Lc,{className:"h-96 px-6",children:Object.entries(w).map(([P,D])=>c.jsxs("div",{className:"mb-6",children:[c.jsx("h3",{className:"text-sm font-semibold text-gray-700 mb-2 capitalize",children:P}),c.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2",children:D.map(_=>{const L=_.hasSubFields&&o>=s;return c.jsxs("button",{onClick:()=>N(_.type),disabled:L,className:`p-3 border rounded-lg text-left transition-colors ${L?"opacity-50 cursor-not-allowed bg-gray-50":"hover:border-blue-500 hover:bg-blue-50"}`,children:[c.jsx("div",{className:"font-medium text-sm",children:_.label}),_.description&&c.jsx("div",{className:"text-xs text-gray-500 mt-1",children:_.description}),L&&c.jsx("div",{className:"text-xs text-red-500 mt-1",children:"Max depth reached"})]},_.type)})})]},P))}),c.jsx(Mp,{children:c.jsx(dw,{asChild:!0,children:c.jsx(mt,{variant:"outline",children:"Cancel"})})})]})]}),c.jsxs("button",{onClick:()=>E(!0),className:"w-full mt-2 p-2 border border-gray-200 rounded-lg hover:border-blue-300 hover:bg-blue-50 transition-colors flex items-center justify-center gap-2 text-gray-500 text-sm",children:[c.jsx(Fs,{className:"h-4 w-4"}),c.jsx("span",{children:"Copy from other field"})]}),h&&c.jsx(nS,{open:b,onOpenChange:E,targetParentId:e.id,currentFieldsetId:h.id,onCopy:k})]})}function hD({field:e,allFields:n,maxDepth:o}){const[s,a]=g.useState(!1),[l,f]=g.useState(e.parent_id?String(e.parent_id):"_root"),{moveFieldToParent:d}=it(),{showToast:h}=ua(),v=n.filter(m=>{if(!ca(m)||String(m.id)===String(e.id))return!1;const b=T=>{if(!T)return!1;if(String(T)===String(e.id))return!0;const w=n.find(S=>String(S.id)===String(T));return w?b(w.parent_id):!1};if(b(m.parent_id))return!1;const E=T=>{if(!T.parent_id)return 0;const w=n.find(S=>String(S.id)===String(T.parent_id));return w?1+E(w):0};return E(m)<o-1});if(v.length===0&&!e.parent_id)return null;const x=()=>{var E;const m=l==="_root"?null:l;d(String(e.id),m);const b=m?((E=n.find(T=>String(T.id)===l))==null?void 0:E.label)||"parent":"root level";h("success",`Field moved to ${b}`),a(!1)};return c.jsxs(Zb,{open:s,onOpenChange:a,children:[c.jsx(dD,{asChild:!0,children:c.jsx("button",{className:"p-1 text-gray-400 hover:text-blue-600",title:"Move field",children:c.jsx(XC,{className:"h-4 w-4"})})}),c.jsxs(qp,{className:"sm:max-w-[425px]",children:[c.jsxs(Qp,{children:[c.jsx(Jp,{children:"Move Field"}),c.jsxs(Zp,{children:['Move "',e.label||e.name,'" to a different location.']})]}),c.jsxs("div",{className:"py-4",children:[c.jsx(ze,{htmlFor:"move-location",children:"Move to"}),c.jsxs(Yt,{value:l,onValueChange:f,children:[c.jsx(Bt,{id:"move-location",className:"mt-2",children:c.jsx(Gt,{placeholder:"Select location"})}),c.jsxs(Ut,{children:[c.jsx(Ue,{value:"_root",children:"Root Level"}),v.map(m=>c.jsxs(Ue,{value:String(m.id),children:["→ ",m.label," (",m.type,")"]},m.id))]})]})]}),c.jsxs("div",{className:"flex justify-end gap-2",children:[c.jsx(mt,{variant:"outline",onClick:()=>a(!1),children:"Cancel"}),c.jsx(mt,{onClick:x,disabled:l===(e.parent_id?String(e.parent_id):"_root"),children:"Move Field"})]})]})]})}function rS({field:e,allFields:n,depth:o=0,maxDepth:s=3}){var ae,se,ye,fe,Ne;const a=it(ce=>ce.updateFieldLocal),l=it(ce=>ce.deleteFieldLocal),{showToast:f}=ua(),[d,h]=g.useState(!1),[v,x]=g.useState(e.label||""),[m,b]=g.useState(e.name||""),[E,T]=g.useState(""),[w,S]=g.useState(!1),C=ca(e),j=n.filter(ce=>String(ce.parent_id)===String(e.id)).length,[N,k]=g.useState(((se=(ae=e.settings)==null?void 0:ae.wrapper)==null?void 0:se.width)||"100"),[P,D]=g.useState(((fe=(ye=e.settings)==null?void 0:ye.wrapper)==null?void 0:fe.class)||""),_=((Ne=e.settings)==null?void 0:Ne.conditional_logic)&&e.settings.conditional_logic.length>0,{attributes:L,listeners:H,setNodeRef:W,transform:U,transition:ee,isDragging:Y}=WP({id:e.id}),X={transform:Ji.Transform.toString(U),transition:ee,opacity:Y?.5:1};g.useEffect(()=>{var ce,Oe,pe,Ze;x(e.label||""),b(e.name||""),k(((Oe=(ce=e.settings)==null?void 0:ce.wrapper)==null?void 0:Oe.width)||"100"),D(((Ze=(pe=e.settings)==null?void 0:pe.wrapper)==null?void 0:Ze.class)||"")},[e]);const le=g.useCallback(ce=>{a(String(e.id),ce)},[e.id,a]),Z=ce=>{x(ce),ce.trim()&&(S(!1),le({label:ce}))},q=()=>{v.trim()||S(!0)},z=ce=>{const Oe=pc(ce);b(Oe||ce);const pe=n.filter(Ze=>Ze.id!==e.id).map(Ze=>Ze.name);Oe&&N_(Oe,pe.map(Ze=>({name:Ze})))?T("This field name is already used in this fieldset"):T(Oe?"":"Field name is required and must contain only letters, numbers, hyphens, or underscores")},J=()=>{const ce=pc(m);ce?(le({name:ce}),b(ce)):T("Field name cannot be empty")},te=ce=>{var pe;const Oe=String(ce[0]);k(Oe),le({settings:{...e.settings,wrapper:{...(pe=e.settings)==null?void 0:pe.wrapper,width:Oe}}})},O=ce=>{var Oe;D(ce),le({settings:{...e.settings,wrapper:{...(Oe=e.settings)==null?void 0:Oe.wrapper,class:ce}}})},K=()=>{},ne=ce=>{le({settings:{...e.settings,conditional_logic:ce}})},G=ce=>{le({settings:{...e.settings,...ce}})},de=()=>{j>0?(l(String(e.id)),f("success",`Field and ${j} sub-field(s) removed (will be deleted when you click Save Changes)`)):(l(String(e.id)),f("success","Field removed (will be deleted when you click Save Changes)"))},he=n.filter(ce=>ce.id!==e.id);return c.jsx("div",{ref:W,style:X,className:"mb-2",children:c.jsx(S_,{open:d,onOpenChange:h,children:c.jsxs(Qo,{className:je(`${w?"border-red-500":""} ${o>0?"bg-gray-50/50":""}`),children:[c.jsxs("div",{className:je("flex items-center gap-2 p-3"),children:[c.jsx("button",{...L,...H,className:"cursor-grab active:cursor-grabbing p-1 text-gray-400 hover:text-gray-600",children:c.jsx(WC,{className:"h-4 w-4"})}),c.jsxs(C_,{className:"flex-1 flex items-center justify-between gap-2 text-left",children:[c.jsxs("div",{className:"flex-1",children:[c.jsxs("div",{className:"font-medium text-sm flex items-center gap-2 flex-wrap",children:[e.label||c.jsx("span",{className:"text-red-500",children:"Label required"}),c.jsx(Fi,{variant:"outline",className:"text-xs",children:e.type}),C&&c.jsxs(Fi,{variant:"secondary",className:"text-xs",children:[c.jsx(qg,{className:"h-3 w-3 mr-1"}),j," sub-field",j!==1?"s":""]}),_&&c.jsxs(Fi,{variant:"secondary",className:"text-xs",children:[c.jsx(Sy,{className:"h-3 w-3 mr-1"}),"Conditional"]})]}),c.jsx("div",{className:"text-xs text-gray-500",children:e.name})]}),c.jsx(vc,{className:`h-4 w-4 transition-transform ${d?"rotate-180":""}`})]}),c.jsx(hD,{field:e,allFields:n,maxDepth:s}),c.jsx("button",{onClick:de,className:"p-1 text-gray-400 hover:text-red-600",children:c.jsx(yf,{className:"h-4 w-4"})})]}),c.jsx(E_,{className:"",children:c.jsxs("div",{className:"px-3 pb-3 space-y-4 border-t pt-3",children:[w&&c.jsx("div",{className:"text-sm text-red-600 bg-red-50 p-2 rounded",children:"Field label and name cannot be empty"}),c.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[c.jsxs("div",{children:[c.jsx(ze,{htmlFor:`label-${e.id}`,children:"Field Label"}),c.jsx(yn,{id:`label-${e.id}`,value:v,onChange:ce=>Z(ce.target.value),onBlur:q,placeholder:"Enter field label",className:w&&!v.trim()?"border-red-500":""})]}),c.jsxs("div",{children:[c.jsx(ze,{htmlFor:`name-${e.id}`,children:"Field Name"}),c.jsx(yn,{id:`name-${e.id}`,value:m,onChange:ce=>z(ce.target.value),onBlur:J,placeholder:"my_field_name",className:E?"border-red-500":"",disabled:!1}),E&&c.jsx("p",{className:"text-xs text-red-600 mt-1",children:E})]})]}),c.jsxs("div",{className:"border-t pt-4",children:[c.jsx("h4",{className:"text-sm font-medium mb-3",children:"Wrapper Settings"}),c.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex justify-between items-center mb-2",children:[c.jsx(ze,{htmlFor:`width-${e.id}`,children:"Width"}),c.jsxs("span",{className:"text-sm font-medium text-primary",children:[N,"%"]})]}),c.jsx(sb,{id:`width-${e.id}`,min:10,max:100,step:1,value:[parseInt(N,10)],onValueChange:te,className:"w-full"})]}),c.jsxs("div",{children:[c.jsx(ze,{htmlFor:`class-${e.id}`,children:"CSS Class"}),c.jsx(yn,{id:`class-${e.id}`,value:P,onChange:ce=>O(ce.target.value),onBlur:K,placeholder:"custom-class"})]})]})]}),c.jsx(uD,{field:e,onSettingsChange:G}),c.jsx(lD,{field:e,otherFields:he,onConditionalLogicChange:ne}),C&&c.jsxs("div",{className:"border-t pt-4",children:[c.jsxs("h4",{className:"text-sm font-medium mb-3 flex items-center gap-2",children:[c.jsx(qg,{className:"h-4 w-4"}),"Sub-fields"]}),c.jsx(pD,{parentField:e,allFields:n,depth:o+1,maxDepth:s,FieldItemComponent:rS})]})]})})]})})})}function mD(){const e=it(j=>j.currentFieldset),n=it(j=>j.fields),o=it(j=>j.fetchFields),s=it(j=>j.addFieldLocal),a=it(j=>j.reorderFieldsLocal),l=it(j=>j.getRootFields),{showToast:f}=ua(),d=Je.getGroupedByCategory(),[h,v]=g.useState(!1),[x,m]=g.useState(!1),b=l(),E=gw(ic(Bc),ic(zc,{coordinateGetter:zw}));g.useEffect(()=>{e!=null&&e.id&&o(e.id)},[e==null?void 0:e.id,o]);const T=j=>{const{active:N,over:k}=j;if(k&&N.id!==k.id){const P=b.findIndex(L=>L.id===N.id),D=b.findIndex(L=>L.id===k.id),_=Vc(b,P,D);a(_,null)}},w=()=>{let j=1,N=`field_${j}`,k=`Field ${j}`;for(;n.some(P=>P.name===N);)j++,N=`field_${j}`,k=`Field ${j}`;return{fieldName:N,fieldLabel:k,counter:j}},S=j=>{const{fieldName:N,fieldLabel:k}=w();s({type:j,label:k,name:N},null),v(!1),f("success",`${k} added (will be saved when you click Save Changes)`)},C=j=>{s({...j,parent_id:null},null),f("success",`${j.label} copied to root level`)};return c.jsxs("div",{className:"mb-8",children:[c.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Fields"}),c.jsx(Aw,{id:"root-fields",sensors:E,collisionDetection:ww,onDragEnd:T,children:c.jsx(Fw,{items:b.map(j=>j.id),strategy:Mw,children:b.map(j=>c.jsx(rS,{field:j,allFields:n,depth:0,maxDepth:3},j.id))})}),c.jsxs(Dp,{open:h,onOpenChange:v,children:[c.jsx(uw,{asChild:!0,children:c.jsxs("button",{className:"w-full mt-4 p-6 border-2 border-dashed border-gray-300 rounded-lg hover:border-gray-400 hover:bg-gray-50 transition-colors flex items-center justify-center gap-2 text-gray-600",children:[c.jsx(Fr,{className:"h-5 w-5"}),c.jsx("span",{children:"Add Field"})]})}),c.jsxs(Ap,{children:[c.jsxs(Op,{children:[c.jsx(Ip,{children:"Select Field Type"}),c.jsx(Lp,{children:"Choose the type of field you want to add"})]}),c.jsx(Lc,{className:"h-96 px-6",children:Object.entries(d).map(([j,N])=>c.jsxs("div",{className:"mb-6",children:[c.jsx("h3",{className:"text-sm font-semibold text-gray-700 mb-2 capitalize",children:j}),c.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2",children:N.map(k=>c.jsxs("button",{onClick:()=>S(k.type),className:"p-3 border rounded-lg hover:border-blue-500 hover:bg-blue-50 transition-colors text-left",children:[c.jsx("div",{className:"font-medium text-sm",children:k.label}),k.description&&c.jsx("div",{className:"text-xs text-gray-500 mt-1",children:k.description})]},k.type))})]},j))}),c.jsx(Mp,{children:c.jsx(dw,{asChild:!0,children:c.jsx(mt,{variant:"outline",children:"Cancel"})})})]})]}),c.jsxs("button",{onClick:()=>m(!0),className:"w-full mt-2 p-3 border border-gray-300 rounded-lg hover:border-blue-400 hover:bg-blue-50 transition-colors flex items-center justify-center gap-2 text-gray-600",children:[c.jsx(Fs,{className:"h-4 w-4"}),c.jsx("span",{children:"Copy from other field"})]}),e&&c.jsx(nS,{open:x,onOpenChange:m,targetParentId:null,currentFieldsetId:e.id,onCopy:C})]})}function gD({isActive:e,slug:n,description:o,slugError:s,onActiveChange:a,onSlugChange:l,onDescriptionChange:f}){return c.jsxs("div",{className:"mb-8",children:[c.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Settings"}),c.jsx(Qo,{className:"p-4",children:c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex items-center justify-between pb-4 border-b",children:[c.jsxs("div",{children:[c.jsx(ze,{htmlFor:"active",children:"Active"}),c.jsx("p",{className:"text-xs text-gray-500",children:"Enable or disable this fieldset"})]}),c.jsx(Kt,{id:"active",checked:e,onCheckedChange:a})]}),c.jsxs("div",{children:[c.jsx(ze,{htmlFor:"slug",children:"Fieldset Slug"}),c.jsx(yn,{id:"slug",value:n,onChange:d=>l(d.target.value),placeholder:"fieldset_slug",className:s?"border-red-500":""}),s?c.jsx("p",{className:"text-xs text-red-500 mt-1",children:s}):c.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Used for programmatic access. Must be unique."})]}),c.jsxs("div",{children:[c.jsx(ze,{htmlFor:"description",children:"Description"}),c.jsx(yn,{id:"description",value:o,onChange:d=>f(d.target.value),placeholder:"Optional description for this fieldset"})]})]})})]})}function vD({locationGroups:e,onLocationGroupsChange:n}){const[o,s]=g.useState([]),[a,l]=g.useState([]),[f,d]=g.useState([]);g.useEffect(()=>{var S,C,j,N,k;const E=(S=window.cofldAdmin)==null?void 0:S.pageTemplates;if(E&&E.length>0)s(E);else{const P=((C=window.cofldAdmin)==null?void 0:C.restUrl)||"/wp-json/codeideal-open-fields/v1",D=((j=window.cofldAdmin)==null?void 0:j.nonce)||"";fetch(`${P}/locations/types`,{headers:{"X-WP-Nonce":D}}).then(_=>_.json()).then(_=>{const L=_.find(U=>U.key==="page_template");L!=null&&L.options&&s(L.options.map(U=>({name:U.value,label:U.label})));const H=_.find(U=>U.key==="post_category");H!=null&&H.options&&l(H.options.map(U=>({name:U.value,label:U.label})));const W=_.find(U=>U.key==="post_format");W!=null&&W.options&&d(W.options.map(U=>({name:U.value,label:U.label})))}).catch(()=>{s([{name:"default",label:"Default Template"}])})}const T=(N=window.cofldAdmin)==null?void 0:N.categories;T&&T.length>0&&l(T);const w=(k=window.cofldAdmin)==null?void 0:k.postFormats;w&&w.length>0&&d(w)},[]);const h=(E,T,w,S)=>{const C=[...e],j=C[E];if(j&&j.rules[T]){const N=j.rules[T];w==="type"?(N.type=S,N.value=""):w==="operator"?N.operator=S:w==="value"&&(N.value=S),n(C)}},v=E=>{const T=[...e],w=T[E];w&&(w.rules.push({type:"",operator:"==",value:""}),n(T))},x=(E,T)=>{const w=[...e],S=w[E];S&&(S.rules.length>1?S.rules=S.rules.filter((C,j)=>j!==T):w.splice(E,1)),w.length===0&&w.push({id:Date.now().toString(),rules:[{type:"",operator:"==",value:""}]}),n(w)},m=()=>{n([...e,{id:Date.now().toString(),rules:[{type:"",operator:"==",value:""}]}])},b=E=>{var T,w,S;switch(E){case"post_type":return((T=window.cofldAdmin)==null?void 0:T.postTypes)||[{name:"post",label:"Post"},{name:"page",label:"Page"}];case"taxonomy":return((w=window.cofldAdmin)==null?void 0:w.taxonomies)||[{name:"category",label:"Category"},{name:"post_tag",label:"Tag"}];case"user_role":return((S=window.cofldAdmin)==null?void 0:S.userRoles)||[{name:"administrator",label:"Administrator"},{name:"editor",label:"Editor"},{name:"author",label:"Author"}];case"page_template":return o.length>0?o:[{name:"default",label:"Default Template"}];case"post_category":return a;case"post_format":return f;default:return[]}};return c.jsxs("div",{className:"mb-8",children:[c.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Location Rules"}),c.jsxs(Qo,{className:"p-4",children:[c.jsx("p",{className:"text-sm text-gray-600 mb-4",children:"Show this fieldset when the following rules match"}),e.map((E,T)=>c.jsxs("div",{className:"mb-4",children:[T>0&&c.jsxs("div",{className:"flex items-center gap-2 my-3",children:[c.jsx("div",{className:"flex-1 border-t"}),c.jsx("span",{className:"text-xs font-medium text-blue-600 bg-blue-50 px-2 py-1 rounded",children:"OR"}),c.jsx("div",{className:"flex-1 border-t"})]}),c.jsxs("div",{className:"bg-gray-50 p-3 rounded-lg space-y-2",children:[E.rules.map((w,S)=>c.jsxs("div",{children:[S>0&&c.jsx("div",{className:"text-xs font-medium text-gray-500 text-center my-2",children:"AND"}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs(Yt,{value:w.type,onValueChange:C=>h(T,S,"type",C),children:[c.jsx(Bt,{className:"w-[160px]",children:c.jsx(Gt,{placeholder:"Select type"})}),c.jsxs(Ut,{children:[c.jsx(Ue,{value:"post_type",children:"Post Type"}),c.jsx(Ue,{value:"page_template",children:"Page Template"}),c.jsx(Ue,{value:"post_category",children:"Post Category"}),c.jsx(Ue,{value:"post_format",children:"Post Format"}),c.jsx(Ue,{value:"taxonomy",children:"Taxonomy"}),c.jsx(Ue,{value:"user_role",children:"User Role"})]})]}),c.jsxs(Yt,{value:w.operator,onValueChange:C=>h(T,S,"operator",C),children:[c.jsx(Bt,{className:"w-[130px]",children:c.jsx(Gt,{})}),c.jsxs(Ut,{children:[c.jsx(Ue,{value:"==",children:"is equal to"}),c.jsx(Ue,{value:"!=",children:"is not equal to"})]})]}),c.jsxs(Yt,{value:w.value,onValueChange:C=>h(T,S,"value",C),children:[c.jsx(Bt,{className:"flex-1",children:c.jsx(Gt,{placeholder:"Select value"})}),c.jsx(Ut,{children:b(w.type).map(C=>c.jsx(Ue,{value:C.name,children:C.label},C.name))})]}),(E.rules.length>1||e.length>1)&&c.jsx("button",{type:"button",onClick:()=>x(T,S),className:"p-1 text-gray-400 hover:text-red-600",children:c.jsx(ra,{className:"h-4 w-4"})})]})]},S)),c.jsxs(mt,{type:"button",variant:"ghost",size:"sm",onClick:()=>v(T),className:"mt-2",children:[c.jsx(Fr,{className:"h-3 w-3 mr-1"}),"Add AND rule"]})]})]},E.id)),c.jsxs(mt,{type:"button",variant:"outline",size:"sm",onClick:m,children:[c.jsx(Fr,{className:"h-3 w-3 mr-1"}),"Add OR rule group"]})]})]})}function ny({fieldsetId:e,isNew:n}){const o=it(G=>G.currentFieldset),s=it(G=>G.fieldsets),a=it(G=>G.fetchFieldset),l=it(G=>G.fetchFieldsets),f=it(G=>G.createFieldset),d=it(G=>G.updateFieldset),h=it(G=>G.unsavedChanges),v=it(G=>G.setUnsavedChanges),x=it(G=>G.saveAllChanges),{showToast:m}=ua(),[b,E]=g.useState(""),[T,w]=g.useState(""),[S,C]=g.useState(""),[j,N]=g.useState(!0),[k,P]=g.useState([{id:"1",rules:[{type:"",operator:"==",value:""}]}]),[D,_]=g.useState(!1),[L,H]=g.useState(!1),[W,U]=g.useState(!1),[ee,Y]=g.useState(null),X=g.useMemo(()=>T.trim()?s.some(de=>de.field_key===T&&de.id!==(o==null?void 0:o.id))?"This slug is already used by another fieldset":/^[a-z0-9_]+$/.test(T)?null:"Slug can only contain lowercase letters, numbers, and underscores":"Slug is required",[T,s,o==null?void 0:o.id]);g.useEffect(()=>{const G=de=>{if(h)return de.preventDefault(),de.returnValue="",""};return window.addEventListener("beforeunload",G),()=>window.removeEventListener("beforeunload",G)},[h]);const le=g.useCallback(()=>{var he;const de=`${((he=window.cofldAdmin)==null?void 0:he.adminUrl)||"/wp-admin/"}admin.php?page=codeideal-open-fields`;h?(Y(de),U(!0)):window.location.href=de},[h]),Z=()=>{ee&&(v(!1),window.location.href=ee)},q=()=>{U(!1),Y(null)};g.useEffect(()=>{(async()=>{if(await l(),e&&!n)await a(e);else if(n)try{const de=await f({title:"New Fieldset"});window.location.href=`admin.php?page=codeideal-open-fields&action=edit&id=${de.id}`}catch{m("error","Failed to create fieldset")}H(!0)})()},[e,n,a,l,f,m]),g.useEffect(()=>{var G;o&&(E(o.title),w(o.field_key||o.title.toLowerCase().replace(/[^a-z0-9]+/g,"_")),C(o.description||""),N(o.is_active!==!1),P(((G=o.settings)==null?void 0:G.location_groups)||[{id:"1",rules:[{type:"",operator:"==",value:""}]}]))},[o==null?void 0:o.id]);const z=G=>{E(G),v(!0)},J=G=>{w(G.toLowerCase().replace(/[^a-z0-9_]/g,"_")),v(!0)},te=G=>{C(G),v(!0)},O=G=>{N(G),v(!0)},K=G=>{P(G),v(!0)},ne=async()=>{if(o){if(!b.trim()){m("error","Fieldset title is required");return}if(X){m("error",X);return}_(!0);try{await d(o.id,{title:b,field_key:T,description:S,is_active:j,settings:{location_groups:k}}),await x(),v(!1),m("success","Fieldset saved successfully")}catch(G){console.error("Save error:",G),m("error","Failed to save fieldset")}finally{_(!1)}}};return L?o?c.jsxs("div",{className:"flex flex-col",children:[c.jsx("div",{className:"sticky top-[42px] md:top-[32px] z-[30] bg-background border-b px-4 sm:px-6 py-4",children:c.jsxs("div",{className:"flex items-center justify-between gap-4",children:[c.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[c.jsx(mt,{variant:"ghost",size:"icon",onClick:le,className:"flex-shrink-0",title:"Back to Field Groups",children:c.jsx(FC,{className:"h-4 w-4"})}),c.jsx(yn,{value:b,onChange:G=>z(G.target.value),placeholder:"Enter fieldset title",className:"text-lg sm:text-2xl font-bold border-none shadow-none focus-visible:ring-0 px-0 flex-1 min-w-0"})]}),c.jsx("div",{className:"flex items-center gap-3 flex-shrink-0",children:c.jsx(mt,{onClick:ne,disabled:D||!h,children:D?"Saving...":"Save Changes"})})]})}),c.jsxs("div",{className:"flex-auto px-4 sm:px-6 py-6 max-w-5xl w-full mx-auto",children:[c.jsx(mD,{}),c.jsx(gD,{isActive:j,slug:T,description:S,slugError:X,onActiveChange:O,onSlugChange:J,onDescriptionChange:te}),c.jsx(vD,{locationGroups:k,onLocationGroupsChange:K})]}),c.jsx(jf,{open:W,onOpenChange:U,children:c.jsxs(Wl,{children:[c.jsxs(Kl,{children:[c.jsx(Gl,{children:"Unsaved Changes"}),c.jsx(Xl,{children:"You have unsaved changes. Are you sure you want to leave this page? Your changes will be lost."})]}),c.jsxs(Yl,{children:[c.jsx(Ql,{onClick:q,children:"Stay on Page"}),c.jsx(ql,{onClick:Z,children:"Leave Page"})]})]})})]}):c.jsx("div",{className:"flex items-center justify-center h-64",children:c.jsx("p",{className:"text-gray-500",children:"Fieldset not found"})}):c.jsx("div",{className:"flex items-center justify-center h-64",children:c.jsx("p",{className:"text-gray-500",children:"Loading..."})})}function yD(){const[e,n]=g.useState(!1),[o,s]=g.useState(!1),[a,l]=g.useState(null),f=async()=>{n(!0);try{const h=await Mn.getAll(),x={version:"1.0.0",plugin:"openfields",fieldsets:await Promise.all(h.map(T=>Mn.export(T.id))),exported_at:new Date().toISOString()},m=new Blob([JSON.stringify(x,null,2)],{type:"application/json"}),b=URL.createObjectURL(m),E=document.createElement("a");E.href=b,E.download=`openfields-export-${Date.now()}.json`,document.body.appendChild(E),E.click(),document.body.removeChild(E),URL.revokeObjectURL(b)}catch(h){console.error("Export failed:",h)}finally{n(!1)}},d=async h=>{var x;const v=(x=h.target.files)==null?void 0:x[0];if(v){s(!0),l(null);try{const m=await v.text(),b=JSON.parse(m);if(Array.isArray(b.fieldsets)){let E=0,T=0;for(const S of b.fieldsets)try{await Mn.import(S),E++}catch(C){console.error("Failed to import fieldset:",C),T++}let w=`Successfully imported ${E} field group(s).`;T>0&&(w+=` (${T} failed)`),l(w)}else await Mn.import(b),l("Successfully imported 1 field group.")}catch(m){l(`Import failed: ${m instanceof Error?m.message:"Unknown error"}`)}finally{s(!1),h.target.value=""}}};return c.jsx("div",{className:"space-y-6",children:c.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[c.jsxs(Qo,{children:[c.jsxs(cc,{children:[c.jsxs(uc,{className:"flex items-center gap-2",children:[c.jsx(gf,{className:"h-5 w-5"}),"Export"]}),c.jsx(dc,{children:"Export all field groups as a JSON file"})]}),c.jsxs(fc,{children:[c.jsx("p",{className:"text-sm text-gray-600 mb-4",children:"Download all your field groups, including fields and settings, as a portable JSON file that can be imported into another site."}),c.jsx(mt,{onClick:f,disabled:e,children:e?c.jsxs(c.Fragment,{children:[c.jsx(vf,{className:"h-4 w-4 mr-2 animate-spin"}),"Exporting..."]}):c.jsxs(c.Fragment,{children:[c.jsx(gf,{className:"h-4 w-4 mr-2"}),"Export Field Groups"]})})]})]}),c.jsxs(Qo,{children:[c.jsxs(cc,{children:[c.jsxs(uc,{className:"flex items-center gap-2",children:[c.jsx(Jg,{className:"h-5 w-5"}),"Import"]}),c.jsx(dc,{children:"Import field groups from a JSON file"})]}),c.jsxs(fc,{children:[c.jsx("p",{className:"text-sm text-gray-600 mb-4",children:"Upload a previously exported JSON file to import field groups. Existing groups with the same key will be skipped."}),c.jsxs("div",{children:[c.jsx("input",{type:"file",accept:".json",onChange:d,disabled:o,className:"hidden",id:"import-file"}),c.jsx(mt,{asChild:!0,disabled:o,children:c.jsx("label",{htmlFor:"import-file",className:"cursor-pointer",children:o?c.jsxs(c.Fragment,{children:[c.jsx(vf,{className:"h-4 w-4 mr-2 animate-spin"}),"Importing..."]}):c.jsxs(c.Fragment,{children:[c.jsx(Jg,{className:"h-4 w-4 mr-2"}),"Choose File"]})})})]}),a&&c.jsx("p",{className:`mt-4 text-sm ${a.includes("failed")?"text-red-600":"text-green-600"}`,children:a})]})]})]})})}function xD(){const[e,n]=g.useState(null),[o,s]=g.useState(!0),[a,l]=g.useState(!1),[f,d]=g.useState(!1);g.useEffect(()=>{h()},[]);const h=async()=>{try{s(!0);const m=await Lv.get();n(m)}catch(m){console.error("Failed to load settings:",m),Uo.error("Failed to load settings")}finally{s(!1)}},v=async()=>{if(e)try{l(!0),await Lv.update({delete_data:e.delete_data,enable_rest_api:e.enable_rest_api,show_admin_column:e.show_admin_column}),d(!1),Uo.success("Settings saved successfully")}catch(m){console.error("Failed to save settings:",m),Uo.error("Failed to save settings")}finally{l(!1)}},x=(m,b)=>{e&&(n({...e,[m]:b}),d(!0))};return o?c.jsx("div",{className:"flex items-center justify-center py-12",children:c.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}):e?c.jsxs("div",{className:"space-y-6",children:[c.jsxs(Qo,{children:[c.jsxs(cc,{children:[c.jsx(uc,{children:"Data Management"}),c.jsx(dc,{children:"Control how OpenFields handles your data"})]}),c.jsx(fc,{className:"space-y-6",children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"space-y-0.5",children:[c.jsx(ze,{htmlFor:"preserve-data",className:"text-base font-medium",children:"Keep Plugin Data After Uninstall"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"When enabled, your field groups and saved data will be preserved even if you uninstall the plugin. Disable this only if you want to completely remove all OpenFields data."})]}),c.jsx(Kt,{id:"preserve-data",checked:!e.delete_data,onCheckedChange:m=>x("delete_data",!m)})]})})]}),f&&c.jsx("div",{className:"flex justify-end",children:c.jsx(mt,{onClick:v,disabled:a,children:a?c.jsxs(c.Fragment,{children:[c.jsx(vf,{className:"h-4 w-4 mr-2 animate-spin"}),"Saving..."]}):c.jsxs(c.Fragment,{children:[c.jsx(QC,{className:"h-4 w-4 mr-2"}),"Save Settings"]})})})]}):c.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4 text-red-700",children:"Failed to load settings"})}function wD({field:e,onSettingsChange:n}){var o,s,a;return c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm text-gray-600 mb-1",children:"Placeholder"}),c.jsx("input",{type:"text",value:((o=e.settings)==null?void 0:o.placeholder)||"",onChange:l=>n({placeholder:l.target.value}),className:"w-full px-3 py-2 border rounded-md text-sm",placeholder:"Enter placeholder text"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm text-gray-600 mb-1",children:"Max Length"}),c.jsx("input",{type:"number",value:((s=e.settings)==null?void 0:s.max)||"",onChange:l=>n({max:l.target.value?parseInt(l.target.value,10):void 0}),className:"w-full px-3 py-2 border rounded-md text-sm",placeholder:"0 = unlimited"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm text-gray-600 mb-1",children:"Default Value"}),c.jsx("input",{type:"text",value:((a=e.settings)==null?void 0:a.default_value)||"",onChange:l=>n({default_value:l.target.value}),className:"w-full px-3 py-2 border rounded-md text-sm",placeholder:"Default text"})]})]})}function bD({field:e,onSettingsChange:n}){var o,s,a;return c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm text-gray-600 mb-1",children:"Placeholder"}),c.jsx("input",{type:"text",value:((o=e.settings)==null?void 0:o.placeholder)||"",onChange:l=>n({placeholder:l.target.value}),className:"w-full px-3 py-2 border rounded-md text-sm",placeholder:"Enter placeholder text"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm text-gray-600 mb-1",children:"Rows"}),c.jsx("input",{type:"number",value:((s=e.settings)==null?void 0:s.rows)||4,onChange:l=>n({rows:parseInt(l.target.value,10)||4}),className:"w-full px-3 py-2 border rounded-md text-sm",min:1})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm text-gray-600 mb-1",children:"Default Value"}),c.jsx("textarea",{value:((a=e.settings)==null?void 0:a.default_value)||"",onChange:l=>n({default_value:l.target.value}),className:"w-full px-3 py-2 border rounded-md text-sm",rows:3,placeholder:"Default text"})]})]})}function SD({field:e,onSettingsChange:n}){var o,s,a,l,f;return c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm text-gray-600 mb-1",children:"Min"}),c.jsx("input",{type:"number",value:((o=e.settings)==null?void 0:o.min)??"",onChange:d=>n({min:d.target.value?parseFloat(d.target.value):void 0}),className:"w-full px-3 py-2 border rounded-md text-sm"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm text-gray-600 mb-1",children:"Max"}),c.jsx("input",{type:"number",value:((s=e.settings)==null?void 0:s.max)??"",onChange:d=>n({max:d.target.value?parseFloat(d.target.value):void 0}),className:"w-full px-3 py-2 border rounded-md text-sm"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm text-gray-600 mb-1",children:"Step"}),c.jsx("input",{type:"number",value:((a=e.settings)==null?void 0:a.step)||1,onChange:d=>n({step:parseFloat(d.target.value)||1}),className:"w-full px-3 py-2 border rounded-md text-sm"})]})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm text-gray-600 mb-1",children:"Placeholder"}),c.jsx("input",{type:"text",value:((l=e.settings)==null?void 0:l.placeholder)||"",onChange:d=>n({placeholder:d.target.value}),className:"w-full px-3 py-2 border rounded-md text-sm",placeholder:"Enter placeholder text"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm text-gray-600 mb-1",children:"Default Value"}),c.jsx("input",{type:"number",value:((f=e.settings)==null?void 0:f.default_value)??"",onChange:d=>n({default_value:d.target.value?parseFloat(d.target.value):void 0}),className:"w-full px-3 py-2 border rounded-md text-sm"})]})]})}function uf({field:e,onSettingsChange:n}){var h,v,x,m,b,E;const o=((h=e.settings)==null?void 0:h.choices)||[],s=e.type==="select",a=e.type==="checkbox",l=()=>{n({choices:[...o,{value:"",label:""}]})},f=(T,w,S)=>{const C=[...o],j=C[T];j&&(C[T]={value:w==="value"?S:j.value,label:w==="label"?S:j.label},n({choices:C}))},d=T=>{const w=o.filter((S,C)=>C!==T);n({choices:w})};return c.jsxs("div",{className:"space-y-4 border-t pt-4",children:[c.jsx("h4",{className:"text-sm font-medium",children:"Field Type Settings"}),c.jsxs("div",{className:"space-y-3",children:[s&&c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx(ze,{htmlFor:`multiple-${e.id}`,className:"text-sm font-normal",children:"Allow Multiple Selections"}),c.jsx(Kt,{id:`multiple-${e.id}`,checked:((v=e.settings)==null?void 0:v.multiple)||!1,onCheckedChange:T=>n({multiple:T})})]}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx(ze,{htmlFor:`allow-null-${e.id}`,className:"text-sm font-normal",children:"Allow Empty Value"}),c.jsx(Kt,{id:`allow-null-${e.id}`,checked:((x=e.settings)==null?void 0:x.allow_null)||!1,onCheckedChange:T=>n({allow_null:T})})]}),a&&c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx(ze,{htmlFor:`toggle-all-${e.id}`,className:"text-sm font-normal",children:"Show Toggle All"}),c.jsx(Kt,{id:`toggle-all-${e.id}`,checked:((m=e.settings)==null?void 0:m.toggle_all)||!1,onCheckedChange:T=>n({toggle_all:T})})]})]}),!s&&c.jsxs("div",{className:"space-y-2",children:[c.jsx(ze,{children:"Layout"}),c.jsxs(Yt,{value:((b=e.settings)==null?void 0:b.layout)||"vertical",onValueChange:T=>n({layout:T}),children:[c.jsx(Bt,{children:c.jsx(Gt,{placeholder:"Select layout"})}),c.jsxs(Ut,{children:[c.jsx(Ue,{value:"vertical",children:"Vertical"}),c.jsx(Ue,{value:"horizontal",children:"Horizontal"})]})]})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(ze,{children:"Choices"}),c.jsxs("div",{className:"space-y-2 bg-gray-50 p-3 rounded-lg",children:[o.length===0&&c.jsx("p",{className:"text-sm text-gray-500 text-center py-2",children:"No choices added yet"}),o.map((T,w)=>c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(yn,{value:T.value,onChange:S=>f(w,"value",S.target.value),placeholder:"value",className:"flex-1"}),c.jsx(yn,{value:T.label,onChange:S=>f(w,"label",S.target.value),placeholder:"label",className:"flex-1"}),c.jsx(mt,{type:"button",variant:"ghost",size:"icon",onClick:()=>d(w),className:"h-9 w-9 text-gray-400 hover:text-red-600",children:c.jsx(ra,{className:"h-4 w-4"})})]},w)),c.jsxs(mt,{type:"button",variant:"outline",size:"sm",onClick:l,className:"w-full mt-2",children:[c.jsx(Fr,{className:"h-3 w-3 mr-1"}),"Add Choice"]})]})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(ze,{htmlFor:`return-format-${e.id}`,children:"Return Format"}),c.jsxs(Yt,{value:((E=e.settings)==null?void 0:E.return_format)||"value",onValueChange:T=>n({return_format:T}),children:[c.jsx(Bt,{id:`return-format-${e.id}`,children:c.jsx(Gt,{placeholder:"Select format"})}),c.jsxs(Ut,{children:[c.jsx(Ue,{value:"value",children:"Value"}),c.jsx(Ue,{value:"label",children:"Label"}),c.jsx(Ue,{value:"array",children:"Both (Array)"})]})]})]})]})}function CD({field:e,onSettingsChange:n}){var o,s,a,l;return c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm text-gray-600 mb-1",children:"On Text"}),c.jsx("input",{type:"text",value:((o=e.settings)==null?void 0:o.on_text)||"Yes",onChange:f=>n({on_text:f.target.value}),className:"w-full px-3 py-2 border rounded-md text-sm",placeholder:"Yes"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm text-gray-600 mb-1",children:"Off Text"}),c.jsx("input",{type:"text",value:((s=e.settings)==null?void 0:s.off_text)||"No",onChange:f=>n({off_text:f.target.value}),className:"w-full px-3 py-2 border rounded-md text-sm",placeholder:"No"})]})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm text-gray-600 mb-1",children:"Default Value"}),c.jsxs("div",{className:"flex gap-4",children:[c.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[c.jsx("input",{type:"radio",name:`default-${e.id}`,checked:((a=e.settings)==null?void 0:a.default_value)!==!0,onChange:()=>n({default_value:!1})}),"Off"]}),c.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[c.jsx("input",{type:"radio",name:`default-${e.id}`,checked:((l=e.settings)==null?void 0:l.default_value)===!0,onChange:()=>n({default_value:!0})}),"On"]})]})]})]})}function ED({field:e,onSettingsChange:n}){const o=e.settings||{},s=typeof o.min=="number"?o.min:0,a=typeof o.max=="number"?o.max:0,l=typeof o.layout=="string"?o.layout:"table",f=typeof o.button_label=="string"?o.button_label:"Add Row",d=(h,v)=>{n({...o,[h]:v})};return c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx(ze,{htmlFor:"repeater-min",children:"Minimum Rows"}),c.jsx(yn,{id:"repeater-min",type:"number",min:0,value:s,onChange:h=>d("min",parseInt(h.target.value,10)||0),placeholder:"0"}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Minimum number of rows required"})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(ze,{htmlFor:"repeater-max",children:"Maximum Rows"}),c.jsx(yn,{id:"repeater-max",type:"number",min:0,value:a,onChange:h=>d("max",parseInt(h.target.value,10)||0),placeholder:"0 (unlimited)"}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Maximum allowed (0 = unlimited)"})]})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(ze,{htmlFor:"repeater-layout",children:"Layout"}),c.jsxs(Yt,{value:l,onValueChange:h=>d("layout",h),children:[c.jsx(Bt,{id:"repeater-layout",children:c.jsx(Gt,{placeholder:"Select layout"})}),c.jsxs(Ut,{children:[c.jsx(Ue,{value:"table",children:"Table"}),c.jsx(Ue,{value:"block",children:"Block"}),c.jsx(Ue,{value:"row",children:"Row"})]})]}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"How repeater rows should be displayed"})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(ze,{htmlFor:"repeater-button",children:"Button Label"}),c.jsx(yn,{id:"repeater-button",type:"text",value:f,onChange:h=>d("button_label",h.target.value),placeholder:"Add Row"}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Text displayed on the add row button"})]}),c.jsx("div",{className:"rounded-md bg-muted p-3",children:c.jsxs("p",{className:"text-sm text-muted-foreground",children:[c.jsx("strong",{children:"Sub-fields:"}),' Add sub-fields by clicking the "Add Field" button inside this repeater in the field list above. Sub-fields will be repeated for each row.']})})]})}const ND=()=>{var e,n;return{apiUrl:((e=window.cofldAdmin)==null?void 0:e.restUrl)||"/wp-json/openfields/v1",nonce:((n=window.cofldAdmin)==null?void 0:n.nonce)||""}};function jD({field:e,onSettingsChange:n}){const o=e.settings||{},[s,a]=g.useState([]),[l,f]=g.useState(!0);g.useEffect(()=>{(async()=>{try{const x=ND(),b=await(await fetch(`${x.apiUrl}/options/post-types`,{headers:{"X-WP-Nonce":x.nonce}})).json();a(b)}catch(x){console.error("Failed to fetch post types:",x)}finally{f(!1)}})()},[]);const d=(v,x)=>{n({...o,[v]:x})},h=Array.isArray(o.post_type)?o.post_type[0]:o.post_type||"post";return c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx(ze,{children:"Post Type"}),c.jsxs(Yt,{value:h,onValueChange:v=>d("post_type",v),disabled:l,children:[c.jsx(Bt,{children:c.jsx(Gt,{placeholder:l?"Loading...":"Select post type"})}),c.jsx(Ut,{children:s.map(v=>c.jsx(Ue,{value:v.value,children:v.label},v.value))})]}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Select which post type to search from"})]}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"space-y-0.5",children:[c.jsx(ze,{children:"Select Multiple"}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Allow selecting multiple posts"})]}),c.jsx(Kt,{checked:o.multiple||!1,onCheckedChange:v=>d("multiple",v)})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(ze,{children:"Return Format"}),c.jsxs(Yt,{value:o.return_format||"object",onValueChange:v=>d("return_format",v),children:[c.jsx(Bt,{children:c.jsx(Gt,{placeholder:"Select return format"})}),c.jsxs(Ut,{children:[c.jsx(Ue,{value:"object",children:"Post Object"}),c.jsx(Ue,{value:"id",children:"Post ID"})]})]}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Format of the value returned by get_field()"})]}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"space-y-0.5",children:[c.jsx(ze,{children:"Allow Null"}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Allow empty value"})]}),c.jsx(Kt,{checked:o.allow_null||!1,onCheckedChange:v=>d("allow_null",v)})]})]})}const RD=()=>{var e,n;return{apiUrl:((e=window.cofldAdmin)==null?void 0:e.restUrl)||"/wp-json/openfields/v1",nonce:((n=window.cofldAdmin)==null?void 0:n.nonce)||""}};function TD({field:e,onSettingsChange:n}){const o=e.settings||{},[s,a]=g.useState([]),[l,f]=g.useState(!0);g.useEffect(()=>{(async()=>{try{const v=RD(),m=await(await fetch(`${v.apiUrl}/options/taxonomies`,{headers:{"X-WP-Nonce":v.nonce}})).json();a(m)}catch(v){console.error("Failed to fetch taxonomies:",v)}finally{f(!1)}})()},[]);const d=(h,v)=>{n({...o,[h]:v})};return c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx(ze,{children:"Taxonomy"}),c.jsxs(Yt,{value:String(o.taxonomy||"category"),onValueChange:h=>d("taxonomy",h),disabled:l,children:[c.jsx(Bt,{children:c.jsx(Gt,{placeholder:l?"Loading...":"Select taxonomy"})}),c.jsx(Ut,{children:s.map(h=>c.jsx(Ue,{value:h.value,children:h.label},h.value))})]}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Select which taxonomy to choose terms from"})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(ze,{children:"Appearance"}),c.jsxs(Yt,{value:o.field_type||"select",onValueChange:h=>d("field_type",h),children:[c.jsx(Bt,{children:c.jsx(Gt,{placeholder:"Select appearance"})}),c.jsxs(Ut,{children:[c.jsx(Ue,{value:"select",children:"Dropdown"}),c.jsx(Ue,{value:"checkbox",children:"Checkbox"}),c.jsx(Ue,{value:"radio",children:"Radio Buttons"})]})]}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"How the field should be displayed"})]}),(o.field_type==="select"||!o.field_type)&&c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"space-y-0.5",children:[c.jsx(ze,{children:"Select Multiple"}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Allow selecting multiple terms"})]}),c.jsx(Kt,{checked:o.multiple||!1,onCheckedChange:h=>d("multiple",h)})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(ze,{children:"Return Format"}),c.jsxs(Yt,{value:o.return_format||"id",onValueChange:h=>d("return_format",h),children:[c.jsx(Bt,{children:c.jsx(Gt,{placeholder:"Select return format"})}),c.jsxs(Ut,{children:[c.jsx(Ue,{value:"id",children:"Term ID"}),c.jsx(Ue,{value:"object",children:"Term Object"})]})]}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Format of the value returned by get_field()"})]}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"space-y-0.5",children:[c.jsx(ze,{children:"Save Terms"}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Connect selected terms to the post"})]}),c.jsx(Kt,{checked:o.save_terms||!1,onCheckedChange:h=>d("save_terms",h)})]}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"space-y-0.5",children:[c.jsx(ze,{children:"Load Terms"}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Load value from the post's terms"})]}),c.jsx(Kt,{checked:o.load_terms||!1,onCheckedChange:h=>d("load_terms",h)})]})]})}const kD=()=>{var e,n;return{apiUrl:((e=window.cofldAdmin)==null?void 0:e.restUrl)||"/wp-json/openfields/v1",nonce:((n=window.cofldAdmin)==null?void 0:n.nonce)||""}};function PD({field:e,onSettingsChange:n}){const o=e.settings||{},[s,a]=g.useState([]),[l,f]=g.useState(!0);g.useEffect(()=>{(async()=>{try{const v=kD(),m=await(await fetch(`${v.apiUrl}/options/roles`,{headers:{"X-WP-Nonce":v.nonce}})).json();a(m)}catch(v){console.error("Failed to fetch roles:",v)}finally{f(!1)}})()},[]);const d=(h,v)=>{n({...o,[h]:v==="__all__"?"":v})};return c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx(ze,{children:"Filter by Role"}),c.jsxs(Yt,{value:String(o.role||"__all__"),onValueChange:h=>d("role",h),disabled:l,children:[c.jsx(Bt,{children:c.jsx(Gt,{placeholder:l?"Loading...":"All Roles"})}),c.jsxs(Ut,{children:[c.jsx(Ue,{value:"__all__",children:"All Roles"}),s.map(h=>c.jsx(Ue,{value:h.value,children:h.label},h.value))]})]}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Filter users by role (leave empty for all)"})]}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"space-y-0.5",children:[c.jsx(ze,{children:"Select Multiple"}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Allow selecting multiple users"})]}),c.jsx(Kt,{checked:o.multiple||!1,onCheckedChange:h=>d("multiple",h)})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(ze,{children:"Return Format"}),c.jsxs(Yt,{value:String(o.return_format||"array"),onValueChange:h=>d("return_format",h),children:[c.jsx(Bt,{children:c.jsx(Gt,{placeholder:"Select return format"})}),c.jsxs(Ut,{children:[c.jsx(Ue,{value:"array",children:"User Array"}),c.jsx(Ue,{value:"object",children:"User Object"}),c.jsx(Ue,{value:"id",children:"User ID"})]})]}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Format of the value returned by get_field()"})]}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"space-y-0.5",children:[c.jsx(ze,{children:"Allow Null"}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Allow empty value"})]}),c.jsx(Kt,{checked:o.allow_null||!1,onCheckedChange:h=>d("allow_null",h)})]})]})}function _D({field:e,onSettingsChange:n}){const o=e.settings||{},s=(a,l)=>{n({...o,[a]:l})};return c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"space-y-0.5",children:[c.jsx(ze,{children:"Show Link Text"}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Allow entering custom link text"})]}),c.jsx(Kt,{checked:o.show_title!==!1,onCheckedChange:a=>s("show_title",a)})]}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"space-y-0.5",children:[c.jsx(ze,{children:"Show Target Option"}),c.jsx("p",{className:"text-xs text-muted-foreground",children:'Allow selecting "Open in new tab"'})]}),c.jsx(Kt,{checked:o.show_target!==!1,onCheckedChange:a=>s("show_target",a)})]})]})}function DD(){const e=Je.get("text");e&&Je.register({...e,SettingsComponent:wD,defaultSettings:{placeholder:"",max_length:void 0}});const n=Je.get("textarea");n&&Je.register({...n,SettingsComponent:bD,defaultSettings:{placeholder:"",rows:4}});const o=Je.get("number");o&&Je.register({...o,SettingsComponent:SD,defaultSettings:{min:void 0,max:void 0,step:1}});const s=Je.get("select");s&&Je.register({...s,SettingsComponent:uf,defaultSettings:{choices:[],multiple:!1,allow_null:!1}});const a=Je.get("switch");a&&Je.register({...a,SettingsComponent:CD,defaultSettings:{on_text:"Yes",off_text:"No"}});const l=Je.get("radio");l&&Je.register({...l,SettingsComponent:uf,defaultSettings:{choices:[],layout:"vertical"}});const f=Je.get("checkbox");f&&Je.register({...f,SettingsComponent:uf,defaultSettings:{choices:[],layout:"vertical"}});const d=Je.get("repeater");d&&Je.register({...d,SettingsComponent:ED,hasSubFields:!0,defaultSettings:{min:0,max:0,layout:"table",button_label:"Add Row"}});const h=Je.get("post_object");h&&Je.register({...h,SettingsComponent:jD,defaultSettings:{post_type:["post"],multiple:!1,return_format:"object",allow_null:!1}});const v=Je.get("taxonomy");v&&Je.register({...v,SettingsComponent:TD,defaultSettings:{taxonomy:["category"],field_type:"select",multiple:!1,return_format:"id",save_terms:!1,load_terms:!1}});const x=Je.get("user");x&&Je.register({...x,SettingsComponent:PD,defaultSettings:{role:"",multiple:!1,return_format:"array",allow_null:!1}});const m=Je.get("link");m&&Je.register({...m,SettingsComponent:_D,defaultSettings:{show_title:!0,show_target:!0}})}DD();const AD=new DC({defaultOptions:{queries:{staleTime:1e3*60*5,retry:1}}});function OD(){return c.jsxs(OC,{client:AD,children:[c.jsx("div",{className:je("openfields-admin",""),children:c.jsx(MD,{})}),c.jsx(_N,{}),c.jsx(sj,{position:"bottom-right"})]})}function MD(){const e=new URLSearchParams(window.location.search),n=e.get("page"),o=e.get("action"),s=e.get("id"),a=e.get("tab");return n!=null&&n.startsWith("codeideal-open-fields")?n==="codeideal-open-fields"&&o==="edit"&&s?c.jsx(ny,{fieldsetId:parseInt(s,10)}):n==="codeideal-open-fields"&&o==="new"?c.jsx(ny,{isNew:!0}):c.jsx(ID,{initialTab:a||"fieldsets"}):null}function ID({initialTab:e}){const[n,o]=g.useState(e),s=l=>{o(l);const f=new URL(window.location.href);l==="fieldsets"?f.searchParams.delete("tab"):f.searchParams.set("tab",l),window.history.pushState({},"",f.toString())};g.useEffect(()=>{const l=()=>{const d=new URLSearchParams(window.location.search).get("tab");o(d||"fieldsets")};return window.addEventListener("popstate",l),()=>window.removeEventListener("popstate",l)},[]);const a=[{id:"fieldsets",label:"Field Groups",icon:GC},{id:"settings",label:"Settings",icon:ZC},{id:"tools",label:"Import / Export",icon:gf}];return c.jsxs("div",{className:"openfields-main-layout -ml-5 -mr-2.5",children:[c.jsxs("header",{className:"bg-white border-b border-gray-200 px-4 sm:px-6 py-4",children:[c.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-xl font-bold text-gray-900",children:"OpenFields"}),c.jsx("p",{className:"text-sm text-gray-500 mt-0.5",children:"Open Source Custom Fields Management"})]}),c.jsxs("a",{href:"https://openfields.codeideal.com/support",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-3 sm:px-4 py-2 text-sm font-medium text-rose-600 bg-rose-50 rounded-lg hover:bg-rose-100 transition-colors",children:[c.jsx(KC,{className:"h-4 w-4"}),c.jsx("span",{className:"hidden sm:inline",children:"Support this project"}),c.jsx("span",{className:"sm:hidden",children:"Support"}),c.jsx(HC,{className:"h-3 w-3"})]})]}),c.jsx("p",{className:"text-xs text-gray-400 mt-2",children:"This plugin is free and will be free, your support will keep it going."})]}),c.jsx("nav",{className:"bg-background border-b border-border px-4 sm:px-6 overflow-x-auto",children:c.jsx("div",{className:"flex flex-wrap gap-1 min-w-max",children:a.map(l=>c.jsxs("button",{onClick:()=>s(l.id),className:je("flex items-center gap-2 px-4 py-3 text-sm font-medium border-b-2 -mb-px transition-colors",n===l.id?"border-primary text-primary":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"),children:[c.jsx(l.icon,{className:"h-4 w-4"}),l.label]},l.id))})}),c.jsxs("main",{style:{boxSizing:"border-box"},className:"p-4 sm:p-6 bg-secondary min-h-[calc(100vh-200px)]",children:[n==="fieldsets"&&c.jsx(E2,{}),n==="settings"&&c.jsx(xD,{}),n==="tools"&&c.jsx(yD,{})]})]})}const ry=document.getElementById("openfields-admin");ry&&iC.createRoot(ry).render(c.jsx(g.StrictMode,{children:c.jsx(OD,{})}));279 `},Dk={onDragStart(e){let{active:n}=e;return"Picked up draggable item "+n.id+"."},onDragOver(e){let{active:n,over:o}=e;return o?"Draggable item "+n.id+" was moved over droppable area "+o.id+".":"Draggable item "+n.id+" is no longer over a droppable area."},onDragEnd(e){let{active:n,over:o}=e;return o?"Draggable item "+n.id+" was dropped over droppable area "+o.id:"Draggable item "+n.id+" was dropped."},onDragCancel(e){let{active:n}=e;return"Dragging was cancelled. Draggable item "+n.id+" was dropped."}};function Ak(e){let{announcements:n=Dk,container:o,hiddenTextDescribedById:s,screenReaderInstructions:a=Pk}=e;const{announce:l,announcement:f}=jk(),d=Ri("DndLiveRegion"),[h,v]=g.useState(!1);if(g.useEffect(()=>{v(!0)},[]),Rk(g.useMemo(()=>({onDragStart(m){let{active:b}=m;l(n.onDragStart({active:b}))},onDragMove(m){let{active:b,over:E}=m;n.onDragMove&&l(n.onDragMove({active:b,over:E}))},onDragOver(m){let{active:b,over:E}=m;l(n.onDragOver({active:b,over:E}))},onDragEnd(m){let{active:b,over:E}=m;l(n.onDragEnd({active:b,over:E}))},onDragCancel(m){let{active:b,over:E}=m;l(n.onDragCancel({active:b,over:E}))}}),[l,n])),!h)return null;const w=z.createElement(z.Fragment,null,z.createElement(Nk,{id:s,value:a.draggable}),z.createElement(kk,{id:d,announcement:f}));return o?Hn.createPortal(w,o):w}var Tt;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Tt||(Tt={}));function El(){}function Nl(e,n){return g.useMemo(()=>({sensor:e,options:n??{}}),[e,n])}function wy(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return g.useMemo(()=>[...n].filter(s=>s!=null),[...n])}const Gn=Object.freeze({x:0,y:0});function xy(e,n){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function by(e,n){let{data:{value:o}}=e,{data:{value:s}}=n;return o-s}function Ok(e,n){let{data:{value:o}}=e,{data:{value:s}}=n;return s-o}function Sy(e){let{left:n,top:o,height:s,width:a}=e;return[{x:n,y:o},{x:n+a,y:o},{x:n,y:o+s},{x:n+a,y:o+s}]}function Cy(e,n){if(!e||e.length===0)return null;const[o]=e;return o[n]}function _y(e,n,o){return n===void 0&&(n=e.left),o===void 0&&(o=e.top),{x:n+e.width*.5,y:o+e.height*.5}}const Ey=e=>{let{collisionRect:n,droppableRects:o,droppableContainers:s}=e;const a=_y(n,n.left,n.top),l=[];for(const f of s){const{id:d}=f,h=o.get(d);if(h){const v=xy(_y(h),a);l.push({id:d,data:{droppableContainer:f,value:v}})}}return l.sort(by)},Mk=e=>{let{collisionRect:n,droppableRects:o,droppableContainers:s}=e;const a=Sy(n),l=[];for(const f of s){const{id:d}=f,h=o.get(d);if(h){const v=Sy(h),w=a.reduce((b,E,j)=>b+xy(v[j],E),0),m=Number((w/4).toFixed(4));l.push({id:d,data:{droppableContainer:f,value:m}})}}return l.sort(by)};function Ik(e,n){const o=Math.max(n.top,e.top),s=Math.max(n.left,e.left),a=Math.min(n.left+n.width,e.left+e.width),l=Math.min(n.top+n.height,e.top+e.height),f=a-s,d=l-o;if(s<a&&o<l){const h=n.width*n.height,v=e.width*e.height,w=f*d,m=w/(h+v-w);return Number(m.toFixed(4))}return 0}const Lk=e=>{let{collisionRect:n,droppableRects:o,droppableContainers:s}=e;const a=[];for(const l of s){const{id:f}=l,d=o.get(f);if(d){const h=Ik(d,n);h>0&&a.push({id:f,data:{droppableContainer:l,value:h}})}}return a.sort(Ok)};function Fk(e,n,o){return{...e,scaleX:n&&o?n.width/o.width:1,scaleY:n&&o?n.height/o.height:1}}function Ny(e,n){return e&&n?{x:e.left-n.left,y:e.top-n.top}:Gn}function zk(e){return function(o){for(var s=arguments.length,a=new Array(s>1?s-1:0),l=1;l<s;l++)a[l-1]=arguments[l];return a.reduce((f,d)=>({...f,top:f.top+e*d.y,bottom:f.bottom+e*d.y,left:f.left+e*d.x,right:f.right+e*d.x}),{...o})}}const $k=zk(1);function Bk(e){if(e.startsWith("matrix3d(")){const n=e.slice(9,-1).split(/, /);return{x:+n[12],y:+n[13],scaleX:+n[0],scaleY:+n[5]}}else if(e.startsWith("matrix(")){const n=e.slice(7,-1).split(/, /);return{x:+n[4],y:+n[5],scaleX:+n[0],scaleY:+n[3]}}return null}function Uk(e,n,o){const s=Bk(n);if(!s)return e;const{scaleX:a,scaleY:l,x:f,y:d}=s,h=e.left-f-(1-a)*parseFloat(o),v=e.top-d-(1-l)*parseFloat(o.slice(o.indexOf(" ")+1)),w=a?e.width/a:e.width,m=l?e.height/l:e.height;return{width:w,height:m,top:v,right:h+w,bottom:v+m,left:h}}const Hk={ignoreTransform:!1};function Ss(e,n){n===void 0&&(n=Hk);let o=e.getBoundingClientRect();if(n.ignoreTransform){const{transform:v,transformOrigin:w}=pn(e).getComputedStyle(e);v&&(o=Uk(o,v,w))}const{top:s,left:a,width:l,height:f,bottom:d,right:h}=o;return{top:s,left:a,width:l,height:f,bottom:d,right:h}}function ky(e){return Ss(e,{ignoreTransform:!0})}function Vk(e){const n=e.innerWidth,o=e.innerHeight;return{top:0,left:0,right:n,bottom:o,width:n,height:o}}function Wk(e,n){return n===void 0&&(n=pn(e).getComputedStyle(e)),n.position==="fixed"}function Yk(e,n){n===void 0&&(n=pn(e).getComputedStyle(e));const o=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(a=>{const l=n[a];return typeof l=="string"?o.test(l):!1})}function kl(e,n){const o=[];function s(a){if(n!=null&&o.length>=n||!a)return o;if(Bd(a)&&a.scrollingElement!=null&&!o.includes(a.scrollingElement))return o.push(a.scrollingElement),o;if(!Ni(a)||my(a)||o.includes(a))return o;const l=pn(e).getComputedStyle(a);return a!==e&&Yk(a,l)&&o.push(a),Wk(a,l)?o:s(a.parentNode)}return e?s(e):o}function jy(e){const[n]=kl(e,1);return n??null}function Kd(e){return!Cl||!e?null:ws(e)?e:$d(e)?Bd(e)||e===xs(e).scrollingElement?window:Ni(e)?e:null:null}function Ry(e){return ws(e)?e.scrollX:e.scrollLeft}function Ty(e){return ws(e)?e.scrollY:e.scrollTop}function Xd(e){return{x:Ry(e),y:Ty(e)}}var It;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(It||(It={}));function Py(e){return!Cl||!e?!1:e===document.scrollingElement}function Dy(e){const n={x:0,y:0},o=Py(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},s={x:e.scrollWidth-o.width,y:e.scrollHeight-o.height},a=e.scrollTop<=n.y,l=e.scrollLeft<=n.x,f=e.scrollTop>=s.y,d=e.scrollLeft>=s.x;return{isTop:a,isLeft:l,isBottom:f,isRight:d,maxScroll:s,minScroll:n}}const Kk={x:.2,y:.2};function Xk(e,n,o,s,a){let{top:l,left:f,right:d,bottom:h}=o;s===void 0&&(s=10),a===void 0&&(a=Kk);const{isTop:v,isBottom:w,isLeft:m,isRight:b}=Dy(e),E={x:0,y:0},j={x:0,y:0},x={height:n.height*a.y,width:n.width*a.x};return!v&&l<=n.top+x.height?(E.y=It.Backward,j.y=s*Math.abs((n.top+x.height-l)/x.height)):!w&&h>=n.bottom-x.height&&(E.y=It.Forward,j.y=s*Math.abs((n.bottom-x.height-h)/x.height)),!b&&d>=n.right-x.width?(E.x=It.Forward,j.x=s*Math.abs((n.right-x.width-d)/x.width)):!m&&f<=n.left+x.width&&(E.x=It.Backward,j.x=s*Math.abs((n.left+x.width-f)/x.width)),{direction:E,speed:j}}function Gk(e){if(e===document.scrollingElement){const{innerWidth:l,innerHeight:f}=window;return{top:0,left:0,right:l,bottom:f,width:l,height:f}}const{top:n,left:o,right:s,bottom:a}=e.getBoundingClientRect();return{top:n,left:o,right:s,bottom:a,width:e.clientWidth,height:e.clientHeight}}function Ay(e){return e.reduce((n,o)=>bs(n,Xd(o)),Gn)}function qk(e){return e.reduce((n,o)=>n+Ry(o),0)}function Qk(e){return e.reduce((n,o)=>n+Ty(o),0)}function Jk(e,n){if(n===void 0&&(n=Ss),!e)return;const{top:o,left:s,bottom:a,right:l}=n(e);jy(e)&&(a<=0||l<=0||o>=window.innerHeight||s>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Zk=[["x",["left","right"],qk],["y",["top","bottom"],Qk]];class Gd{constructor(n,o){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const s=kl(o),a=Ay(s);this.rect={...n},this.width=n.width,this.height=n.height;for(const[l,f,d]of Zk)for(const h of f)Object.defineProperty(this,h,{get:()=>{const v=d(s),w=a[l]-v;return this.rect[h]+w},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Di{constructor(n){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(o=>{var s;return(s=this.target)==null?void 0:s.removeEventListener(...o)})},this.target=n}add(n,o,s){var a;(a=this.target)==null||a.addEventListener(n,o,s),this.listeners.push([n,o,s])}}function ej(e){const{EventTarget:n}=pn(e);return e instanceof n?e:xs(e)}function qd(e,n){const o=Math.abs(e.x),s=Math.abs(e.y);return typeof n=="number"?Math.sqrt(o**2+s**2)>n:"x"in n&&"y"in n?o>n.x&&s>n.y:"x"in n?o>n.x:"y"in n?s>n.y:!1}var Dn;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Dn||(Dn={}));function Oy(e){e.preventDefault()}function tj(e){e.stopPropagation()}var Ke;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(Ke||(Ke={}));const My={start:[Ke.Space,Ke.Enter],cancel:[Ke.Esc],end:[Ke.Space,Ke.Enter,Ke.Tab]},nj=(e,n)=>{let{currentCoordinates:o}=n;switch(e.code){case Ke.Right:return{...o,x:o.x+25};case Ke.Left:return{...o,x:o.x-25};case Ke.Down:return{...o,y:o.y+25};case Ke.Up:return{...o,y:o.y-25}}};class jl{constructor(n){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=n;const{event:{target:o}}=n;this.props=n,this.listeners=new Di(xs(o)),this.windowListeners=new Di(pn(o)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Dn.Resize,this.handleCancel),this.windowListeners.add(Dn.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Dn.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:n,onStart:o}=this.props,s=n.node.current;s&&Jk(s),o(Gn)}handleKeyDown(n){if(Wd(n)){const{active:o,context:s,options:a}=this.props,{keyboardCodes:l=My,coordinateGetter:f=nj,scrollBehavior:d="smooth"}=a,{code:h}=n;if(l.end.includes(h)){this.handleEnd(n);return}if(l.cancel.includes(h)){this.handleCancel(n);return}const{collisionRect:v}=s.current,w=v?{x:v.left,y:v.top}:Gn;this.referenceCoordinates||(this.referenceCoordinates=w);const m=f(n,{active:o,context:s.current,currentCoordinates:w});if(m){const b=Ti(m,w),E={x:0,y:0},{scrollableAncestors:j}=s.current;for(const x of j){const S=n.code,{isTop:C,isRight:N,isLeft:_,isBottom:R,maxScroll:P,minScroll:A}=Dy(x),D=Gk(x),F={x:Math.min(S===Ke.Right?D.right-D.width/2:D.right,Math.max(S===Ke.Right?D.left:D.left+D.width/2,m.x)),y:Math.min(S===Ke.Down?D.bottom-D.height/2:D.bottom,Math.max(S===Ke.Down?D.top:D.top+D.height/2,m.y))},V=S===Ke.Right&&!N||S===Ke.Left&&!_,Y=S===Ke.Down&&!R||S===Ke.Up&&!C;if(V&&F.x!==m.x){const H=x.scrollLeft+b.x,te=S===Ke.Right&&H<=P.x||S===Ke.Left&&H>=A.x;if(te&&!b.y){x.scrollTo({left:H,behavior:d});return}te?E.x=x.scrollLeft-H:E.x=S===Ke.Right?x.scrollLeft-P.x:x.scrollLeft-A.x,E.x&&x.scrollBy({left:-E.x,behavior:d});break}else if(Y&&F.y!==m.y){const H=x.scrollTop+b.y,te=S===Ke.Down&&H<=P.y||S===Ke.Up&&H>=A.y;if(te&&!b.x){x.scrollTo({top:H,behavior:d});return}te?E.y=x.scrollTop-H:E.y=S===Ke.Down?x.scrollTop-P.y:x.scrollTop-A.y,E.y&&x.scrollBy({top:-E.y,behavior:d});break}}this.handleMove(n,bs(Ti(m,this.referenceCoordinates),E))}}}handleMove(n,o){const{onMove:s}=this.props;n.preventDefault(),s(o)}handleEnd(n){const{onEnd:o}=this.props;n.preventDefault(),this.detach(),o()}handleCancel(n){const{onCancel:o}=this.props;n.preventDefault(),this.detach(),o()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}jl.activators=[{eventName:"onKeyDown",handler:(e,n,o)=>{let{keyboardCodes:s=My,onActivation:a}=n,{active:l}=o;const{code:f}=e.nativeEvent;if(s.start.includes(f)){const d=l.activatorNode.current;return d&&e.target!==d?!1:(e.preventDefault(),a==null||a({event:e.nativeEvent}),!0)}return!1}}];function Iy(e){return!!(e&&"distance"in e)}function Ly(e){return!!(e&&"delay"in e)}class Qd{constructor(n,o,s){var a;s===void 0&&(s=ej(n.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=n,this.events=o;const{event:l}=n,{target:f}=l;this.props=n,this.events=o,this.document=xs(f),this.documentListeners=new Di(this.document),this.listeners=new Di(s),this.windowListeners=new Di(pn(f)),this.initialCoordinates=(a=Yd(l))!=null?a:Gn,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:n,props:{options:{activationConstraint:o,bypassActivationConstraint:s}}}=this;if(this.listeners.add(n.move.name,this.handleMove,{passive:!1}),this.listeners.add(n.end.name,this.handleEnd),n.cancel&&this.listeners.add(n.cancel.name,this.handleCancel),this.windowListeners.add(Dn.Resize,this.handleCancel),this.windowListeners.add(Dn.DragStart,Oy),this.windowListeners.add(Dn.VisibilityChange,this.handleCancel),this.windowListeners.add(Dn.ContextMenu,Oy),this.documentListeners.add(Dn.Keydown,this.handleKeydown),o){if(s!=null&&s({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Ly(o)){this.timeoutId=setTimeout(this.handleStart,o.delay),this.handlePending(o);return}if(Iy(o)){this.handlePending(o);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(n,o){const{active:s,onPending:a}=this.props;a(s,n,this.initialCoordinates,o)}handleStart(){const{initialCoordinates:n}=this,{onStart:o}=this.props;n&&(this.activated=!0,this.documentListeners.add(Dn.Click,tj,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Dn.SelectionChange,this.removeTextSelection),o(n))}handleMove(n){var o;const{activated:s,initialCoordinates:a,props:l}=this,{onMove:f,options:{activationConstraint:d}}=l;if(!a)return;const h=(o=Yd(n))!=null?o:Gn,v=Ti(a,h);if(!s&&d){if(Iy(d)){if(d.tolerance!=null&&qd(v,d.tolerance))return this.handleCancel();if(qd(v,d.distance))return this.handleStart()}if(Ly(d)&&qd(v,d.tolerance))return this.handleCancel();this.handlePending(d,v);return}n.cancelable&&n.preventDefault(),f(h)}handleEnd(){const{onAbort:n,onEnd:o}=this.props;this.detach(),this.activated||n(this.props.active),o()}handleCancel(){const{onAbort:n,onCancel:o}=this.props;this.detach(),this.activated||n(this.props.active),o()}handleKeydown(n){n.code===Ke.Esc&&this.handleCancel()}removeTextSelection(){var n;(n=this.document.getSelection())==null||n.removeAllRanges()}}const rj={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Rl extends Qd{constructor(n){const{event:o}=n,s=xs(o.target);super(n,rj,s)}}Rl.activators=[{eventName:"onPointerDown",handler:(e,n)=>{let{nativeEvent:o}=e,{onActivation:s}=n;return!o.isPrimary||o.button!==0?!1:(s==null||s({event:o}),!0)}}];const oj={move:{name:"mousemove"},end:{name:"mouseup"}};var Jd;(function(e){e[e.RightClick=2]="RightClick"})(Jd||(Jd={}));class sj extends Qd{constructor(n){super(n,oj,xs(n.event.target))}}sj.activators=[{eventName:"onMouseDown",handler:(e,n)=>{let{nativeEvent:o}=e,{onActivation:s}=n;return o.button===Jd.RightClick?!1:(s==null||s({event:o}),!0)}}];const Zd={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class ij extends Qd{constructor(n){super(n,Zd)}static setup(){return window.addEventListener(Zd.move.name,n,{capture:!1,passive:!1}),function(){window.removeEventListener(Zd.move.name,n)};function n(){}}}ij.activators=[{eventName:"onTouchStart",handler:(e,n)=>{let{nativeEvent:o}=e,{onActivation:s}=n;const{touches:a}=o;return a.length>1?!1:(s==null||s({event:o}),!0)}}];var Ai;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Ai||(Ai={}));var Tl;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Tl||(Tl={}));function aj(e){let{acceleration:n,activator:o=Ai.Pointer,canScroll:s,draggingRect:a,enabled:l,interval:f=5,order:d=Tl.TreeOrder,pointerCoordinates:h,scrollableAncestors:v,scrollableAncestorRects:w,delta:m,threshold:b}=e;const E=cj({delta:m,disabled:!l}),[j,x]=bk(),S=g.useRef({x:0,y:0}),C=g.useRef({x:0,y:0}),N=g.useMemo(()=>{switch(o){case Ai.Pointer:return h?{top:h.y,bottom:h.y,left:h.x,right:h.x}:null;case Ai.DraggableRect:return a}},[o,a,h]),_=g.useRef(null),R=g.useCallback(()=>{const A=_.current;if(!A)return;const D=S.current.x*C.current.x,F=S.current.y*C.current.y;A.scrollBy(D,F)},[]),P=g.useMemo(()=>d===Tl.TreeOrder?[...v].reverse():v,[d,v]);g.useEffect(()=>{if(!l||!v.length||!N){x();return}for(const A of P){if((s==null?void 0:s(A))===!1)continue;const D=v.indexOf(A),F=w[D];if(!F)continue;const{direction:V,speed:Y}=Xk(A,F,N,n,b);for(const H of["x","y"])E[H][V[H]]||(Y[H]=0,V[H]=0);if(Y.x>0||Y.y>0){x(),_.current=A,j(R,f),S.current=Y,C.current=V;return}}S.current={x:0,y:0},C.current={x:0,y:0},x()},[n,R,s,x,l,f,JSON.stringify(N),JSON.stringify(E),j,v,P,w,JSON.stringify(b)])}const lj={x:{[It.Backward]:!1,[It.Forward]:!1},y:{[It.Backward]:!1,[It.Forward]:!1}};function cj(e){let{delta:n,disabled:o}=e;const s=Hd(n);return ji(a=>{if(o||!s||!a)return lj;const l={x:Math.sign(n.x-s.x),y:Math.sign(n.y-s.y)};return{x:{[It.Backward]:a.x[It.Backward]||l.x===-1,[It.Forward]:a.x[It.Forward]||l.x===1},y:{[It.Backward]:a.y[It.Backward]||l.y===-1,[It.Forward]:a.y[It.Forward]||l.y===1}}},[o,n,s])}function uj(e,n){const o=n!=null?e.get(n):void 0,s=o?o.node.current:null;return ji(a=>{var l;return n==null?null:(l=s??a)!=null?l:null},[s,n])}function dj(e,n){return g.useMemo(()=>e.reduce((o,s)=>{const{sensor:a}=s,l=a.activators.map(f=>({eventName:f.eventName,handler:n(f.handler,s)}));return[...o,...l]},[]),[e,n])}var Oi;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Oi||(Oi={}));var ef;(function(e){e.Optimized="optimized"})(ef||(ef={}));const Fy=new Map;function fj(e,n){let{dragging:o,dependencies:s,config:a}=n;const[l,f]=g.useState(null),{frequency:d,measure:h,strategy:v}=a,w=g.useRef(e),m=S(),b=ki(m),E=g.useCallback(function(C){C===void 0&&(C=[]),!b.current&&f(N=>N===null?C:N.concat(C.filter(_=>!N.includes(_))))},[b]),j=g.useRef(null),x=ji(C=>{if(m&&!o)return Fy;if(!C||C===Fy||w.current!==e||l!=null){const N=new Map;for(let _ of e){if(!_)continue;if(l&&l.length>0&&!l.includes(_.id)&&_.rect.current){N.set(_.id,_.rect.current);continue}const R=_.node.current,P=R?new Gd(h(R),R):null;_.rect.current=P,P&&N.set(_.id,P)}return N}return C},[e,l,o,m,h]);return g.useEffect(()=>{w.current=e},[e]),g.useEffect(()=>{m||E()},[o,m]),g.useEffect(()=>{l&&l.length>0&&f(null)},[JSON.stringify(l)]),g.useEffect(()=>{m||typeof d!="number"||j.current!==null||(j.current=setTimeout(()=>{E(),j.current=null},d))},[d,m,E,...s]),{droppableRects:x,measureDroppableContainers:E,measuringScheduled:l!=null};function S(){switch(v){case Oi.Always:return!1;case Oi.BeforeDragging:return o;default:return!o}}}function zy(e,n){return ji(o=>e?o||(typeof n=="function"?n(e):e):null,[n,e])}function pj(e,n){return zy(e,n)}function hj(e){let{callback:n,disabled:o}=e;const s=Ud(n),a=g.useMemo(()=>{if(o||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:l}=window;return new l(s)},[s,o]);return g.useEffect(()=>()=>a==null?void 0:a.disconnect(),[a]),a}function Pl(e){let{callback:n,disabled:o}=e;const s=Ud(n),a=g.useMemo(()=>{if(o||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:l}=window;return new l(s)},[o]);return g.useEffect(()=>()=>a==null?void 0:a.disconnect(),[a]),a}function mj(e){return new Gd(Ss(e),e)}function $y(e,n,o){n===void 0&&(n=mj);const[s,a]=g.useState(null);function l(){a(h=>{if(!e)return null;if(e.isConnected===!1){var v;return(v=h??o)!=null?v:null}const w=n(e);return JSON.stringify(h)===JSON.stringify(w)?h:w})}const f=hj({callback(h){if(e)for(const v of h){const{type:w,target:m}=v;if(w==="childList"&&m instanceof HTMLElement&&m.contains(e)){l();break}}}}),d=Pl({callback:l});return mr(()=>{l(),e?(d==null||d.observe(e),f==null||f.observe(document.body,{childList:!0,subtree:!0})):(d==null||d.disconnect(),f==null||f.disconnect())},[e]),s}function gj(e){const n=zy(e);return Ny(e,n)}const By=[];function vj(e){const n=g.useRef(e),o=ji(s=>e?s&&s!==By&&e&&n.current&&e.parentNode===n.current.parentNode?s:kl(e):By,[e]);return g.useEffect(()=>{n.current=e},[e]),o}function yj(e){const[n,o]=g.useState(null),s=g.useRef(e),a=g.useCallback(l=>{const f=Kd(l.target);f&&o(d=>d?(d.set(f,Xd(f)),new Map(d)):null)},[]);return g.useEffect(()=>{const l=s.current;if(e!==l){f(l);const d=e.map(h=>{const v=Kd(h);return v?(v.addEventListener("scroll",a,{passive:!0}),[v,Xd(v)]):null}).filter(h=>h!=null);o(d.length?new Map(d):null),s.current=e}return()=>{f(e),f(l)};function f(d){d.forEach(h=>{const v=Kd(h);v==null||v.removeEventListener("scroll",a)})}},[a,e]),g.useMemo(()=>e.length?n?Array.from(n.values()).reduce((l,f)=>bs(l,f),Gn):Ay(e):Gn,[e,n])}function Uy(e,n){n===void 0&&(n=[]);const o=g.useRef(null);return g.useEffect(()=>{o.current=null},n),g.useEffect(()=>{const s=e!==Gn;s&&!o.current&&(o.current=e),!s&&o.current&&(o.current=null)},[e]),o.current?Ti(e,o.current):Gn}function wj(e){g.useEffect(()=>{if(!Cl)return;const n=e.map(o=>{let{sensor:s}=o;return s.setup==null?void 0:s.setup()});return()=>{for(const o of n)o==null||o()}},e.map(n=>{let{sensor:o}=n;return o}))}function xj(e,n){return g.useMemo(()=>e.reduce((o,s)=>{let{eventName:a,handler:l}=s;return o[a]=f=>{l(f,n)},o},{}),[e,n])}function Hy(e){return g.useMemo(()=>e?Vk(e):null,[e])}const Vy=[];function bj(e,n){n===void 0&&(n=Ss);const[o]=e,s=Hy(o?pn(o):null),[a,l]=g.useState(Vy);function f(){l(()=>e.length?e.map(h=>Py(h)?s:new Gd(n(h),h)):Vy)}const d=Pl({callback:f});return mr(()=>{d==null||d.disconnect(),f(),e.forEach(h=>d==null?void 0:d.observe(h))},[e]),a}function Sj(e){if(!e)return null;if(e.children.length>1)return e;const n=e.children[0];return Ni(n)?n:e}function Cj(e){let{measure:n}=e;const[o,s]=g.useState(null),a=g.useCallback(v=>{for(const{target:w}of v)if(Ni(w)){s(m=>{const b=n(w);return m?{...m,width:b.width,height:b.height}:b});break}},[n]),l=Pl({callback:a}),f=g.useCallback(v=>{const w=Sj(v);l==null||l.disconnect(),w&&(l==null||l.observe(w)),s(w?n(w):null)},[n,l]),[d,h]=_l(f);return g.useMemo(()=>({nodeRef:d,rect:o,setRef:h}),[o,d,h])}const _j=[{sensor:Rl,options:{}},{sensor:jl,options:{}}],Ej={current:{}},Dl={draggable:{measure:ky},droppable:{measure:ky,strategy:Oi.WhileDragging,frequency:ef.Optimized},dragOverlay:{measure:Ss}};class Mi extends Map{get(n){var o;return n!=null&&(o=super.get(n))!=null?o:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(n=>{let{disabled:o}=n;return!o})}getNodeFor(n){var o,s;return(o=(s=this.get(n))==null?void 0:s.node.current)!=null?o:void 0}}const Nj={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Mi,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:El},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Dl,measureDroppableContainers:El,windowRect:null,measuringScheduled:!1},kj={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:El,draggableNodes:new Map,over:null,measureDroppableContainers:El},Al=g.createContext(kj),Wy=g.createContext(Nj);function jj(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Mi}}}function Rj(e,n){switch(n.type){case Tt.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:n.initialCoordinates,active:n.active}};case Tt.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:n.coordinates.x-e.draggable.initialCoordinates.x,y:n.coordinates.y-e.draggable.initialCoordinates.y}}};case Tt.DragEnd:case Tt.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Tt.RegisterDroppable:{const{element:o}=n,{id:s}=o,a=new Mi(e.droppable.containers);return a.set(s,o),{...e,droppable:{...e.droppable,containers:a}}}case Tt.SetDroppableDisabled:{const{id:o,key:s,disabled:a}=n,l=e.droppable.containers.get(o);if(!l||s!==l.key)return e;const f=new Mi(e.droppable.containers);return f.set(o,{...l,disabled:a}),{...e,droppable:{...e.droppable,containers:f}}}case Tt.UnregisterDroppable:{const{id:o,key:s}=n,a=e.droppable.containers.get(o);if(!a||s!==a.key)return e;const l=new Mi(e.droppable.containers);return l.delete(o),{...e,droppable:{...e.droppable,containers:l}}}default:return e}}function Tj(e){let{disabled:n}=e;const{active:o,activatorEvent:s,draggableNodes:a}=g.useContext(Al),l=Hd(s),f=Hd(o==null?void 0:o.id);return g.useEffect(()=>{if(!n&&!s&&l&&f!=null){if(!Wd(l)||document.activeElement===l.target)return;const d=a.get(f);if(!d)return;const{activatorNode:h,node:v}=d;if(!h.current&&!v.current)return;requestAnimationFrame(()=>{for(const w of[h.current,v.current]){if(!w)continue;const m=_k(w);if(m){m.focus();break}}})}},[s,n,a,f,l]),null}function Pj(e,n){let{transform:o,...s}=n;return e!=null&&e.length?e.reduce((a,l)=>l({transform:a,...s}),o):o}function Dj(e){return g.useMemo(()=>({draggable:{...Dl.draggable,...e==null?void 0:e.draggable},droppable:{...Dl.droppable,...e==null?void 0:e.droppable},dragOverlay:{...Dl.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function Aj(e){let{activeNode:n,measure:o,initialRect:s,config:a=!0}=e;const l=g.useRef(!1),{x:f,y:d}=typeof a=="boolean"?{x:a,y:a}:a;mr(()=>{if(!f&&!d||!n){l.current=!1;return}if(l.current||!s)return;const v=n==null?void 0:n.node.current;if(!v||v.isConnected===!1)return;const w=o(v),m=Ny(w,s);if(f||(m.x=0),d||(m.y=0),l.current=!0,Math.abs(m.x)>0||Math.abs(m.y)>0){const b=jy(v);b&&b.scrollBy({top:m.y,left:m.x})}},[n,f,d,s,o])}const Yy=g.createContext({...Gn,scaleX:1,scaleY:1});var Zr;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Zr||(Zr={}));const Ky=g.memo(function(n){var o,s,a,l;let{id:f,accessibility:d,autoScroll:h=!0,children:v,sensors:w=_j,collisionDetection:m=Lk,measuring:b,modifiers:E,...j}=n;const x=g.useReducer(Rj,void 0,jj),[S,C]=x,[N,_]=Tk(),[R,P]=g.useState(Zr.Uninitialized),A=R===Zr.Initialized,{draggable:{active:D,nodes:F,translate:V},droppable:{containers:Y}}=S,H=D!=null?F.get(D):null,te=g.useRef({initial:null,translated:null}),X=g.useMemo(()=>{var _e;return D!=null?{id:D,data:(_e=H==null?void 0:H.data)!=null?_e:Ej,rect:te}:null},[D,H]),q=g.useRef(null),[ce,ee]=g.useState(null),[Q,B]=g.useState(null),Z=ki(j,Object.values(j)),ne=Ri("DndDescribedBy",f),M=g.useMemo(()=>Y.getEnabled(),[Y]),K=Dj(b),{droppableRects:re,measureDroppableContainers:G,measuringScheduled:fe}=fj(M,{dragging:A,dependencies:[V.x,V.y],config:K.droppable}),me=uj(F,D),le=g.useMemo(()=>Q?Yd(Q):null,[Q]),ie=We(),we=pj(me,K.draggable.measure);Aj({activeNode:D!=null?F.get(D):null,config:ie.layoutShiftCompensation,initialRect:we,measure:K.draggable.measure});const pe=$y(me,K.draggable.measure,we),Ne=$y(me?me.parentElement:null),ue=g.useRef({activatorEvent:null,active:null,activeNode:me,collisionRect:null,collisions:null,droppableRects:re,draggableNodes:F,draggingNode:null,draggingNodeRect:null,droppableContainers:Y,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Me=Y.getNodeFor((o=ue.current.over)==null?void 0:o.id),he=Cj({measure:K.dragOverlay.measure}),et=(s=he.nodeRef.current)!=null?s:me,Ct=A?(a=he.rect)!=null?a:pe:null,wt=!!(he.nodeRef.current&&he.rect),On=gj(wt?null:pe),ct=Hy(et?pn(et):null),ht=vj(A?Me??me:null),Jt=bj(ht),ut=Pj(E,{transform:{x:V.x-On.x,y:V.y-On.y,scaleX:1,scaleY:1},activatorEvent:Q,active:X,activeNodeRect:pe,containerNodeRect:Ne,draggingNodeRect:Ct,over:ue.current.over,overlayNodeRect:he.rect,scrollableAncestors:ht,scrollableAncestorRects:Jt,windowRect:ct}),$t=le?bs(le,V):null,Pr=yj(ht),Dr=Uy(Pr),Zn=Uy(Pr,[pe]),hn=bs(ut,Dr),Pt=Ct?$k(Ct,ut):null,mn=X&&Pt?m({active:X,collisionRect:Pt,droppableRects:re,droppableContainers:M,pointerCoordinates:$t}):null,Bt=Cy(mn,"id"),[Dt,Gt]=g.useState(null),Ar=wt?ut:bs(ut,Zn),lo=Fk(Ar,(l=Dt==null?void 0:Dt.rect)!=null?l:null,pe),wr=g.useRef(null),er=g.useCallback((_e,ze)=>{let{sensor:ge,options:Ae}=ze;if(q.current==null)return;const $e=F.get(q.current);if(!$e)return;const Le=_e.nativeEvent,rt=new ge({active:q.current,activeNode:$e,event:Le,options:Ae,context:ue,onAbort(Pe){if(!F.get(Pe))return;const{onDragAbort:Je}=Z.current,mt={id:Pe};Je==null||Je(mt),N({type:"onDragAbort",event:mt})},onPending(Pe,xt,Je,mt){if(!F.get(Pe))return;const{onDragPending:Ut}=Z.current,vn={id:Pe,constraint:xt,initialCoordinates:Je,offset:mt};Ut==null||Ut(vn),N({type:"onDragPending",event:vn})},onStart(Pe){const xt=q.current;if(xt==null)return;const Je=F.get(xt);if(!Je)return;const{onDragStart:mt}=Z.current,gn={activatorEvent:Le,active:{id:xt,data:Je.data,rect:te}};Hn.unstable_batchedUpdates(()=>{mt==null||mt(gn),P(Zr.Initializing),C({type:Tt.DragStart,initialCoordinates:Pe,active:xt}),N({type:"onDragStart",event:gn}),ee(wr.current),B(Le)})},onMove(Pe){C({type:Tt.DragMove,coordinates:Pe})},onEnd:Ye(Tt.DragEnd),onCancel:Ye(Tt.DragCancel)});wr.current=rt;function Ye(Pe){return async function(){const{active:Je,collisions:mt,over:gn,scrollAdjustedTranslate:Ut}=ue.current;let vn=null;if(Je&&Ut){const{cancelDrop:Mr}=Z.current;vn={activatorEvent:Le,active:Je,collisions:mt,delta:Ut,over:gn},Pe===Tt.DragEnd&&typeof Mr=="function"&&await Promise.resolve(Mr(vn))&&(Pe=Tt.DragCancel)}q.current=null,Hn.unstable_batchedUpdates(()=>{C({type:Pe}),P(Zr.Uninitialized),Gt(null),ee(null),B(null),wr.current=null;const Mr=Pe===Tt.DragEnd?"onDragEnd":"onDragCancel";if(vn){const $i=Z.current[Mr];$i==null||$i(vn),N({type:Mr,event:vn})}})}}},[F]),Or=g.useCallback((_e,ze)=>(ge,Ae)=>{const $e=ge.nativeEvent,Le=F.get(Ae);if(q.current!==null||!Le||$e.dndKit||$e.defaultPrevented)return;const rt={active:Le};_e(ge,ze.options,rt)===!0&&($e.dndKit={capturedBy:ze.sensor},q.current=Ae,er(ge,ze))},[F,er]),Mn=dj(w,Or);wj(w),mr(()=>{pe&&R===Zr.Initializing&&P(Zr.Initialized)},[pe,R]),g.useEffect(()=>{const{onDragMove:_e}=Z.current,{active:ze,activatorEvent:ge,collisions:Ae,over:$e}=ue.current;if(!ze||!ge)return;const Le={active:ze,activatorEvent:ge,collisions:Ae,delta:{x:hn.x,y:hn.y},over:$e};Hn.unstable_batchedUpdates(()=>{_e==null||_e(Le),N({type:"onDragMove",event:Le})})},[hn.x,hn.y]),g.useEffect(()=>{const{active:_e,activatorEvent:ze,collisions:ge,droppableContainers:Ae,scrollAdjustedTranslate:$e}=ue.current;if(!_e||q.current==null||!ze||!$e)return;const{onDragOver:Le}=Z.current,rt=Ae.get(Bt),Ye=rt&&rt.rect.current?{id:rt.id,rect:rt.rect.current,data:rt.data,disabled:rt.disabled}:null,Pe={active:_e,activatorEvent:ze,collisions:ge,delta:{x:$e.x,y:$e.y},over:Ye};Hn.unstable_batchedUpdates(()=>{Gt(Ye),Le==null||Le(Pe),N({type:"onDragOver",event:Pe})})},[Bt]),mr(()=>{ue.current={activatorEvent:Q,active:X,activeNode:me,collisionRect:Pt,collisions:mn,droppableRects:re,draggableNodes:F,draggingNode:et,draggingNodeRect:Ct,droppableContainers:Y,over:Dt,scrollableAncestors:ht,scrollAdjustedTranslate:hn},te.current={initial:Ct,translated:Pt}},[X,me,mn,Pt,F,et,Ct,re,Y,Dt,ht,hn]),aj({...ie,delta:V,draggingRect:Pt,pointerCoordinates:$t,scrollableAncestors:ht,scrollableAncestorRects:Jt});const be=g.useMemo(()=>({active:X,activeNode:me,activeNodeRect:pe,activatorEvent:Q,collisions:mn,containerNodeRect:Ne,dragOverlay:he,draggableNodes:F,droppableContainers:Y,droppableRects:re,over:Dt,measureDroppableContainers:G,scrollableAncestors:ht,scrollableAncestorRects:Jt,measuringConfiguration:K,measuringScheduled:fe,windowRect:ct}),[X,me,pe,Q,mn,Ne,he,F,Y,re,Dt,G,ht,Jt,K,fe,ct]),Ve=g.useMemo(()=>({activatorEvent:Q,activators:Mn,active:X,activeNodeRect:pe,ariaDescribedById:{draggable:ne},dispatch:C,draggableNodes:F,over:Dt,measureDroppableContainers:G}),[Q,Mn,X,pe,C,ne,F,Dt,G]);return z.createElement(yy.Provider,{value:_},z.createElement(Al.Provider,{value:Ve},z.createElement(Wy.Provider,{value:be},z.createElement(Yy.Provider,{value:lo},v)),z.createElement(Tj,{disabled:(d==null?void 0:d.restoreFocus)===!1})),z.createElement(Ak,{...d,hiddenTextDescribedById:ne}));function We(){const _e=(ce==null?void 0:ce.autoScrollEnabled)===!1,ze=typeof h=="object"?h.enabled===!1:h===!1,ge=A&&!_e&&!ze;return typeof h=="object"?{...h,enabled:ge}:{enabled:ge}}}),Oj=g.createContext(null),Xy="button",Mj="Draggable";function Ij(e){let{id:n,data:o,disabled:s=!1,attributes:a}=e;const l=Ri(Mj),{activators:f,activatorEvent:d,active:h,activeNodeRect:v,ariaDescribedById:w,draggableNodes:m,over:b}=g.useContext(Al),{role:E=Xy,roleDescription:j="draggable",tabIndex:x=0}=a??{},S=(h==null?void 0:h.id)===n,C=g.useContext(S?Yy:Oj),[N,_]=_l(),[R,P]=_l(),A=xj(f,n),D=ki(o);mr(()=>(m.set(n,{id:n,key:l,node:N,activatorNode:R,data:D}),()=>{const V=m.get(n);V&&V.key===l&&m.delete(n)}),[m,n]);const F=g.useMemo(()=>({role:E,tabIndex:x,"aria-disabled":s,"aria-pressed":S&&E===Xy?!0:void 0,"aria-roledescription":j,"aria-describedby":w.draggable}),[s,E,x,S,j,w.draggable]);return{active:h,activatorEvent:d,activeNodeRect:v,attributes:F,isDragging:S,listeners:s?void 0:A,node:N,over:b,setNodeRef:_,setActivatorNodeRef:P,transform:C}}function Lj(){return g.useContext(Wy)}const Fj="Droppable",zj={timeout:25};function $j(e){let{data:n,disabled:o=!1,id:s,resizeObserverConfig:a}=e;const l=Ri(Fj),{active:f,dispatch:d,over:h,measureDroppableContainers:v}=g.useContext(Al),w=g.useRef({disabled:o}),m=g.useRef(!1),b=g.useRef(null),E=g.useRef(null),{disabled:j,updateMeasurementsFor:x,timeout:S}={...zj,...a},C=ki(x??s),N=g.useCallback(()=>{if(!m.current){m.current=!0;return}E.current!=null&&clearTimeout(E.current),E.current=setTimeout(()=>{v(Array.isArray(C.current)?C.current:[C.current]),E.current=null},S)},[S]),_=Pl({callback:N,disabled:j||!f}),R=g.useCallback((F,V)=>{_&&(V&&(_.unobserve(V),m.current=!1),F&&_.observe(F))},[_]),[P,A]=_l(R),D=ki(n);return g.useEffect(()=>{!_||!P.current||(_.disconnect(),m.current=!1,_.observe(P.current))},[P,_]),g.useEffect(()=>(d({type:Tt.RegisterDroppable,element:{id:s,key:l,disabled:o,node:P,rect:b,data:D}}),()=>d({type:Tt.UnregisterDroppable,key:l,id:s})),[s]),g.useEffect(()=>{o!==w.current.disabled&&(d({type:Tt.SetDroppableDisabled,id:s,key:l,disabled:o}),w.current.disabled=o)},[s,l,o,d]),{active:f,rect:b,isOver:(h==null?void 0:h.id)===s,node:P,over:h,setNodeRef:A}}function Ol(e,n,o){const s=e.slice();return s.splice(o<0?s.length+o:o,0,s.splice(n,1)[0]),s}function Bj(e,n){return e.reduce((o,s,a)=>{const l=n.get(s);return l&&(o[a]=l),o},Array(e.length))}function Ml(e){return e!==null&&e>=0}function Uj(e,n){if(e===n)return!0;if(e.length!==n.length)return!1;for(let o=0;o<e.length;o++)if(e[o]!==n[o])return!1;return!0}function Hj(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Gy=e=>{let{rects:n,activeIndex:o,overIndex:s,index:a}=e;const l=Ol(n,s,o),f=n[a],d=l[a];return!d||!f?null:{x:d.left-f.left,y:d.top-f.top,scaleX:d.width/f.width,scaleY:d.height/f.height}},Il={scaleX:1,scaleY:1},qy=e=>{var n;let{activeIndex:o,activeNodeRect:s,index:a,rects:l,overIndex:f}=e;const d=(n=l[o])!=null?n:s;if(!d)return null;if(a===o){const v=l[f];return v?{x:0,y:o<f?v.top+v.height-(d.top+d.height):v.top-d.top,...Il}:null}const h=Vj(l,a,o);return a>o&&a<=f?{x:0,y:-d.height-h,...Il}:a<o&&a>=f?{x:0,y:d.height+h,...Il}:{x:0,y:0,...Il}};function Vj(e,n,o){const s=e[n],a=e[n-1],l=e[n+1];return s?o<n?a?s.top-(a.top+a.height):l?l.top-(s.top+s.height):0:l?l.top-(s.top+s.height):a?s.top-(a.top+a.height):0:0}const Qy="Sortable",Jy=z.createContext({activeIndex:-1,containerId:Qy,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Gy,disabled:{draggable:!1,droppable:!1}});function Zy(e){let{children:n,id:o,items:s,strategy:a=Gy,disabled:l=!1}=e;const{active:f,dragOverlay:d,droppableRects:h,over:v,measureDroppableContainers:w}=Lj(),m=Ri(Qy,o),b=d.rect!==null,E=g.useMemo(()=>s.map(A=>typeof A=="object"&&"id"in A?A.id:A),[s]),j=f!=null,x=f?E.indexOf(f.id):-1,S=v?E.indexOf(v.id):-1,C=g.useRef(E),N=!Uj(E,C.current),_=S!==-1&&x===-1||N,R=Hj(l);mr(()=>{N&&j&&w(E)},[N,E,j,w]),g.useEffect(()=>{C.current=E},[E]);const P=g.useMemo(()=>({activeIndex:x,containerId:m,disabled:R,disableTransforms:_,items:E,overIndex:S,useDragOverlay:b,sortedRects:Bj(E,h),strategy:a}),[x,m,R.draggable,R.droppable,_,E,S,h,b,a]);return z.createElement(Jy.Provider,{value:P},n)}const Wj=e=>{let{id:n,items:o,activeIndex:s,overIndex:a}=e;return Ol(o,s,a).indexOf(n)},Yj=e=>{let{containerId:n,isSorting:o,wasDragging:s,index:a,items:l,newIndex:f,previousItems:d,previousContainerId:h,transition:v}=e;return!v||!s||d!==l&&a===f?!1:o?!0:f!==a&&n===h},Kj={duration:200,easing:"ease"},ew="transform",Xj=Pi.Transition.toString({property:ew,duration:0,easing:"linear"}),Gj={roleDescription:"sortable"};function qj(e){let{disabled:n,index:o,node:s,rect:a}=e;const[l,f]=g.useState(null),d=g.useRef(o);return mr(()=>{if(!n&&o!==d.current&&s.current){const h=a.current;if(h){const v=Ss(s.current,{ignoreTransform:!0}),w={x:h.left-v.left,y:h.top-v.top,scaleX:h.width/v.width,scaleY:h.height/v.height};(w.x||w.y)&&f(w)}}o!==d.current&&(d.current=o)},[n,o,s,a]),g.useEffect(()=>{l&&f(null)},[l]),l}function Qj(e){let{animateLayoutChanges:n=Yj,attributes:o,disabled:s,data:a,getNewIndex:l=Wj,id:f,strategy:d,resizeObserverConfig:h,transition:v=Kj}=e;const{items:w,containerId:m,activeIndex:b,disabled:E,disableTransforms:j,sortedRects:x,overIndex:S,useDragOverlay:C,strategy:N}=g.useContext(Jy),_=Jj(s,E),R=w.indexOf(f),P=g.useMemo(()=>({sortable:{containerId:m,index:R,items:w},...a}),[m,a,R,w]),A=g.useMemo(()=>w.slice(w.indexOf(f)),[w,f]),{rect:D,node:F,isOver:V,setNodeRef:Y}=$j({id:f,data:P,disabled:_.droppable,resizeObserverConfig:{updateMeasurementsFor:A,...h}}),{active:H,activatorEvent:te,activeNodeRect:X,attributes:q,setNodeRef:ce,listeners:ee,isDragging:Q,over:B,setActivatorNodeRef:Z,transform:ne}=Ij({id:f,data:P,attributes:{...Gj,...o},disabled:_.draggable}),M=xk(Y,ce),K=!!H,re=K&&!j&&Ml(b)&&Ml(S),G=!C&&Q,fe=G&&re?ne:null,le=re?fe??(d??N)({rects:x,activeNodeRect:X,activeIndex:b,overIndex:S,index:R}):null,ie=Ml(b)&&Ml(S)?l({id:f,items:w,activeIndex:b,overIndex:S}):R,we=H==null?void 0:H.id,pe=g.useRef({activeId:we,items:w,newIndex:ie,containerId:m}),Ne=w!==pe.current.items,ue=n({active:H,containerId:m,isDragging:Q,isSorting:K,id:f,index:R,items:w,newIndex:pe.current.newIndex,previousItems:pe.current.items,previousContainerId:pe.current.containerId,transition:v,wasDragging:pe.current.activeId!=null}),Me=qj({disabled:!ue,index:R,node:F,rect:D});return g.useEffect(()=>{K&&pe.current.newIndex!==ie&&(pe.current.newIndex=ie),m!==pe.current.containerId&&(pe.current.containerId=m),w!==pe.current.items&&(pe.current.items=w)},[K,ie,m,w]),g.useEffect(()=>{if(we===pe.current.activeId)return;if(we&&!pe.current.activeId){pe.current.activeId=we;return}const et=setTimeout(()=>{pe.current.activeId=we},50);return()=>clearTimeout(et)},[we]),{active:H,activeIndex:b,attributes:q,data:P,rect:D,index:R,newIndex:ie,items:w,isOver:V,isSorting:K,isDragging:Q,listeners:ee,node:F,overIndex:S,over:B,setNodeRef:M,setActivatorNodeRef:Z,setDroppableNodeRef:Y,setDraggableNodeRef:ce,transform:Me??le,transition:he()};function he(){if(Me||Ne&&pe.current.newIndex===R)return Xj;if(!(G&&!Wd(te)||!v)&&(K||ue))return Pi.Transition.toString({...v,property:ew})}}function Jj(e,n){var o,s;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(o=e==null?void 0:e.draggable)!=null?o:n.draggable,droppable:(s=e==null?void 0:e.droppable)!=null?s:n.droppable}}function Ll(e){if(!e)return!1;const n=e.data.current;return!!(n&&"sortable"in n&&typeof n.sortable=="object"&&"containerId"in n.sortable&&"items"in n.sortable&&"index"in n.sortable)}const Zj=[Ke.Down,Ke.Right,Ke.Up,Ke.Left],tw=(e,n)=>{let{context:{active:o,collisionRect:s,droppableRects:a,droppableContainers:l,over:f,scrollableAncestors:d}}=n;if(Zj.includes(e.code)){if(e.preventDefault(),!o||!s)return;const h=[];l.getEnabled().forEach(m=>{if(!m||m!=null&&m.disabled)return;const b=a.get(m.id);if(b)switch(e.code){case Ke.Down:s.top<b.top&&h.push(m);break;case Ke.Up:s.top>b.top&&h.push(m);break;case Ke.Left:s.left>b.left&&h.push(m);break;case Ke.Right:s.left<b.left&&h.push(m);break}});const v=Mk({collisionRect:s,droppableRects:a,droppableContainers:h});let w=Cy(v,"id");if(w===(f==null?void 0:f.id)&&v.length>1&&(w=v[1].id),w!=null){const m=l.get(o.id),b=l.get(w),E=b?a.get(b.id):null,j=b==null?void 0:b.node.current;if(j&&E&&m&&b){const S=kl(j).some((A,D)=>d[D]!==A),C=nw(m,b),N=eR(m,b),_=S||!C?{x:0,y:0}:{x:N?s.width-E.width:0,y:N?s.height-E.height:0},R={x:E.left,y:E.top};return _.x&&_.y?R:Ti(R,_)}}}};function nw(e,n){return!Ll(e)||!Ll(n)?!1:e.data.current.sortable.containerId===n.data.current.sortable.containerId}function eR(e,n){return!Ll(e)||!Ll(n)||!nw(e,n)?!1:e.data.current.sortable.index<n.data.current.sortable.index}const Io=g.forwardRef(({className:e,...n},o)=>c.jsx("div",{ref:o,className:ke("rounded-xl border bg-card text-card-foreground shadow",e),...n}));Io.displayName="Card";const Fl=g.forwardRef(({className:e,...n},o)=>c.jsx("div",{ref:o,className:ke("flex flex-col space-y-1.5 p-6",e),...n}));Fl.displayName="CardHeader";const zl=g.forwardRef(({className:e,...n},o)=>c.jsx("h3",{ref:o,className:ke("font-semibold leading-none tracking-tight",e),...n}));zl.displayName="CardTitle";const $l=g.forwardRef(({className:e,...n},o)=>c.jsx("p",{ref:o,className:ke("text-sm text-muted-foreground",e),...n}));$l.displayName="CardDescription";const Bl=g.forwardRef(({className:e,...n},o)=>c.jsx("div",{ref:o,className:ke("p-6 pt-0",e),...n}));Bl.displayName="CardContent";const tR=g.forwardRef(({className:e,...n},o)=>c.jsx("div",{ref:o,className:ke("flex items-center p-6 pt-0",e),...n}));tR.displayName="CardFooter";var nR=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],rR=nR.reduce((e,n)=>{const o=Dm(`Primitive.${n}`),s=g.forwardRef((a,l)=>{const{asChild:f,...d}=a,h=f?o:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(h,{...d,ref:l})});return s.displayName=`Primitive.${n}`,{...e,[n]:s}},{}),oR="Label",rw=g.forwardRef((e,n)=>c.jsx(rR.label,{...e,ref:n,onMouseDown:o=>{var a;o.target.closest("button, input, select, textarea")||((a=e.onMouseDown)==null||a.call(e,o),!o.defaultPrevented&&o.detail>1&&o.preventDefault())}}));rw.displayName=oR;var ow=rw;const sR=Pa("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Be=g.forwardRef(({className:e,...n},o)=>c.jsx(ow,{ref:o,className:ke(sR(),e),...n}));Be.displayName=ow.displayName;function tf(e){const n=g.useRef({value:e,previous:e});return g.useMemo(()=>(n.current.value!==e&&(n.current.previous=n.current.value,n.current.value=e),n.current.previous),[e])}var sw=["PageUp","PageDown"],iw=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],aw={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Cs="Slider",[nf,iR,aR]=bu(Cs),[lw]=Vn(Cs,[aR]),[lR,Ul]=lw(Cs),cw=g.forwardRef((e,n)=>{const{name:o,min:s=0,max:a=100,step:l=1,orientation:f="horizontal",disabled:d=!1,minStepsBetweenThumbs:h=0,defaultValue:v=[s],value:w,onValueChange:m=()=>{},onValueCommit:b=()=>{},inverted:E=!1,form:j,...x}=e,S=g.useRef(new Set),C=g.useRef(0),_=f==="horizontal"?cR:uR,[R=[],P]=Wr({prop:w,defaultProp:v,onChange:H=>{var X;(X=[...S.current][C.current])==null||X.focus(),m(H)}}),A=g.useRef(R);function D(H){const te=mR(R,H);Y(H,te)}function F(H){Y(H,C.current)}function V(){const H=A.current[C.current];R[C.current]!==H&&b(R)}function Y(H,te,{commit:X}={commit:!1}){const q=wR(l),ce=xR(Math.round((H-s)/l)*l+s,q),ee=Si(ce,[s,a]);P((Q=[])=>{const B=pR(Q,ee,te);if(yR(B,h*l)){C.current=B.indexOf(ee);const Z=String(B)!==String(Q);return Z&&X&&b(B),Z?B:Q}else return Q})}return c.jsx(lR,{scope:e.__scopeSlider,name:o,disabled:d,min:s,max:a,valueIndexToChangeRef:C,thumbs:S.current,values:R,orientation:f,form:j,children:c.jsx(nf.Provider,{scope:e.__scopeSlider,children:c.jsx(nf.Slot,{scope:e.__scopeSlider,children:c.jsx(_,{"aria-disabled":d,"data-disabled":d?"":void 0,...x,ref:n,onPointerDown:Ee(x.onPointerDown,()=>{d||(A.current=R)}),min:s,max:a,inverted:E,onSlideStart:d?void 0:D,onSlideMove:d?void 0:F,onSlideEnd:d?void 0:V,onHomeKeyDown:()=>!d&&Y(s,0,{commit:!0}),onEndKeyDown:()=>!d&&Y(a,R.length-1,{commit:!0}),onStepKeyDown:({event:H,direction:te})=>{if(!d){const ce=sw.includes(H.key)||H.shiftKey&&iw.includes(H.key)?10:1,ee=C.current,Q=R[ee],B=l*ce*te;Y(Q+B,ee,{commit:!0})}}})})})})});cw.displayName=Cs;var[uw,dw]=lw(Cs,{startEdge:"left",endEdge:"right",size:"width",direction:1}),cR=g.forwardRef((e,n)=>{const{min:o,max:s,dir:a,inverted:l,onSlideStart:f,onSlideMove:d,onSlideEnd:h,onStepKeyDown:v,...w}=e,[m,b]=g.useState(null),E=Ie(n,_=>b(_)),j=g.useRef(void 0),x=Sd(a),S=x==="ltr",C=S&&!l||!S&&l;function N(_){const R=j.current||m.getBoundingClientRect(),P=[0,R.width],D=sf(P,C?[o,s]:[s,o]);return j.current=R,D(_-R.left)}return c.jsx(uw,{scope:e.__scopeSlider,startEdge:C?"left":"right",endEdge:C?"right":"left",direction:C?1:-1,size:"width",children:c.jsx(fw,{dir:x,"data-orientation":"horizontal",...w,ref:E,style:{...w.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:_=>{const R=N(_.clientX);f==null||f(R)},onSlideMove:_=>{const R=N(_.clientX);d==null||d(R)},onSlideEnd:()=>{j.current=void 0,h==null||h()},onStepKeyDown:_=>{const P=aw[C?"from-left":"from-right"].includes(_.key);v==null||v({event:_,direction:P?-1:1})}})})}),uR=g.forwardRef((e,n)=>{const{min:o,max:s,inverted:a,onSlideStart:l,onSlideMove:f,onSlideEnd:d,onStepKeyDown:h,...v}=e,w=g.useRef(null),m=Ie(n,w),b=g.useRef(void 0),E=!a;function j(x){const S=b.current||w.current.getBoundingClientRect(),C=[0,S.height],_=sf(C,E?[s,o]:[o,s]);return b.current=S,_(x-S.top)}return c.jsx(uw,{scope:e.__scopeSlider,startEdge:E?"bottom":"top",endEdge:E?"top":"bottom",size:"height",direction:E?1:-1,children:c.jsx(fw,{"data-orientation":"vertical",...v,ref:m,style:{...v.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:x=>{const S=j(x.clientY);l==null||l(S)},onSlideMove:x=>{const S=j(x.clientY);f==null||f(S)},onSlideEnd:()=>{b.current=void 0,d==null||d()},onStepKeyDown:x=>{const C=aw[E?"from-bottom":"from-top"].includes(x.key);h==null||h({event:x,direction:C?-1:1})}})})}),fw=g.forwardRef((e,n)=>{const{__scopeSlider:o,onSlideStart:s,onSlideMove:a,onSlideEnd:l,onHomeKeyDown:f,onEndKeyDown:d,onStepKeyDown:h,...v}=e,w=Ul(Cs,o);return c.jsx(Te.span,{...v,ref:n,onKeyDown:Ee(e.onKeyDown,m=>{m.key==="Home"?(f(m),m.preventDefault()):m.key==="End"?(d(m),m.preventDefault()):sw.concat(iw).includes(m.key)&&(h(m),m.preventDefault())}),onPointerDown:Ee(e.onPointerDown,m=>{const b=m.target;b.setPointerCapture(m.pointerId),m.preventDefault(),w.thumbs.has(b)?b.focus():s(m)}),onPointerMove:Ee(e.onPointerMove,m=>{m.target.hasPointerCapture(m.pointerId)&&a(m)}),onPointerUp:Ee(e.onPointerUp,m=>{const b=m.target;b.hasPointerCapture(m.pointerId)&&(b.releasePointerCapture(m.pointerId),l(m))})})}),pw="SliderTrack",hw=g.forwardRef((e,n)=>{const{__scopeSlider:o,...s}=e,a=Ul(pw,o);return c.jsx(Te.span,{"data-disabled":a.disabled?"":void 0,"data-orientation":a.orientation,...s,ref:n})});hw.displayName=pw;var rf="SliderRange",mw=g.forwardRef((e,n)=>{const{__scopeSlider:o,...s}=e,a=Ul(rf,o),l=dw(rf,o),f=g.useRef(null),d=Ie(n,f),h=a.values.length,v=a.values.map(b=>yw(b,a.min,a.max)),w=h>1?Math.min(...v):0,m=100-Math.max(...v);return c.jsx(Te.span,{"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,...s,ref:d,style:{...e.style,[l.startEdge]:w+"%",[l.endEdge]:m+"%"}})});mw.displayName=rf;var of="SliderThumb",gw=g.forwardRef((e,n)=>{const o=iR(e.__scopeSlider),[s,a]=g.useState(null),l=Ie(n,d=>a(d)),f=g.useMemo(()=>s?o().findIndex(d=>d.ref.current===s):-1,[o,s]);return c.jsx(dR,{...e,ref:l,index:f})}),dR=g.forwardRef((e,n)=>{const{__scopeSlider:o,index:s,name:a,...l}=e,f=Ul(of,o),d=dw(of,o),[h,v]=g.useState(null),w=Ie(n,N=>v(N)),m=h?f.form||!!h.closest("form"):!0,b=ud(h),E=f.values[s],j=E===void 0?0:yw(E,f.min,f.max),x=hR(s,f.values.length),S=b==null?void 0:b[d.size],C=S?gR(S,j,d.direction):0;return g.useEffect(()=>{if(h)return f.thumbs.add(h),()=>{f.thumbs.delete(h)}},[h,f.thumbs]),c.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[d.startEdge]:`calc(${j}% + ${C}px)`},children:[c.jsx(nf.ItemSlot,{scope:e.__scopeSlider,children:c.jsx(Te.span,{role:"slider","aria-label":e["aria-label"]||x,"aria-valuemin":f.min,"aria-valuenow":E,"aria-valuemax":f.max,"aria-orientation":f.orientation,"data-orientation":f.orientation,"data-disabled":f.disabled?"":void 0,tabIndex:f.disabled?void 0:0,...l,ref:w,style:E===void 0?{display:"none"}:e.style,onFocus:Ee(e.onFocus,()=>{f.valueIndexToChangeRef.current=s})})}),m&&c.jsx(vw,{name:a??(f.name?f.name+(f.values.length>1?"[]":""):void 0),form:f.form,value:E},s)]})});gw.displayName=of;var fR="RadioBubbleInput",vw=g.forwardRef(({__scopeSlider:e,value:n,...o},s)=>{const a=g.useRef(null),l=Ie(a,s),f=tf(n);return g.useEffect(()=>{const d=a.current;if(!d)return;const h=window.HTMLInputElement.prototype,w=Object.getOwnPropertyDescriptor(h,"value").set;if(f!==n&&w){const m=new Event("input",{bubbles:!0});w.call(d,n),d.dispatchEvent(m)}},[f,n]),c.jsx(Te.input,{style:{display:"none"},...o,ref:l,defaultValue:n})});vw.displayName=fR;function pR(e=[],n,o){const s=[...e];return s[o]=n,s.sort((a,l)=>a-l)}function yw(e,n,o){const l=100/(o-n)*(e-n);return Si(l,[0,100])}function hR(e,n){return n>2?`Value ${e+1} of ${n}`:n===2?["Minimum","Maximum"][e]:void 0}function mR(e,n){if(e.length===1)return 0;const o=e.map(a=>Math.abs(a-n)),s=Math.min(...o);return o.indexOf(s)}function gR(e,n,o){const s=e/2,l=sf([0,50],[0,s]);return(s-l(n)*o)*o}function vR(e){return e.slice(0,-1).map((n,o)=>e[o+1]-n)}function yR(e,n){if(n>0){const o=vR(e);return Math.min(...o)>=n}return!0}function sf(e,n){return o=>{if(e[0]===e[1]||n[0]===n[1])return n[0];const s=(n[1]-n[0])/(e[1]-e[0]);return n[0]+s*(o-e[0])}}function wR(e){return(String(e).split(".")[1]||"").length}function xR(e,n){const o=Math.pow(10,n);return Math.round(e*o)/o}var ww=cw,bR=hw,SR=mw,CR=gw;const xw=g.forwardRef(({className:e,...n},o)=>c.jsxs(ww,{ref:o,className:ke("relative flex w-full touch-none select-none items-center",e),...n,children:[c.jsx(bR,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:c.jsx(SR,{className:"absolute h-full bg-primary"})}),c.jsx(CR,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background 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"})]}));xw.displayName=ww.displayName;var Hl="Collapsible",[_R]=Vn(Hl),[ER,af]=_R(Hl),bw=g.forwardRef((e,n)=>{const{__scopeCollapsible:o,open:s,defaultOpen:a,disabled:l,onOpenChange:f,...d}=e,[h,v]=Wr({prop:s,defaultProp:a??!1,onChange:f,caller:Hl});return c.jsx(ER,{scope:o,disabled:l,contentId:Xr(),open:h,onOpenToggle:g.useCallback(()=>v(w=>!w),[v]),children:c.jsx(Te.div,{"data-state":cf(h),"data-disabled":l?"":void 0,...d,ref:n})})});bw.displayName=Hl;var Sw="CollapsibleTrigger",Cw=g.forwardRef((e,n)=>{const{__scopeCollapsible:o,...s}=e,a=af(Sw,o);return c.jsx(Te.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":cf(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...s,ref:n,onClick:Ee(e.onClick,a.onOpenToggle)})});Cw.displayName=Sw;var lf="CollapsibleContent",_w=g.forwardRef((e,n)=>{const{forceMount:o,...s}=e,a=af(lf,e.__scopeCollapsible);return c.jsx(Rn,{present:o||a.open,children:({present:l})=>c.jsx(NR,{...s,ref:n,present:l})})});_w.displayName=lf;var NR=g.forwardRef((e,n)=>{const{__scopeCollapsible:o,present:s,children:a,...l}=e,f=af(lf,o),[d,h]=g.useState(s),v=g.useRef(null),w=Ie(n,v),m=g.useRef(0),b=m.current,E=g.useRef(0),j=E.current,x=f.open||d,S=g.useRef(x),C=g.useRef(void 0);return g.useEffect(()=>{const N=requestAnimationFrame(()=>S.current=!1);return()=>cancelAnimationFrame(N)},[]),jt(()=>{const N=v.current;if(N){C.current=C.current||{transitionDuration:N.style.transitionDuration,animationName:N.style.animationName},N.style.transitionDuration="0s",N.style.animationName="none";const _=N.getBoundingClientRect();m.current=_.height,E.current=_.width,S.current||(N.style.transitionDuration=C.current.transitionDuration,N.style.animationName=C.current.animationName),h(s)}},[f.open,s]),c.jsx(Te.div,{"data-state":cf(f.open),"data-disabled":f.disabled?"":void 0,id:f.contentId,hidden:!x,...l,ref:w,style:{"--radix-collapsible-content-height":b?`${b}px`:void 0,"--radix-collapsible-content-width":j?`${j}px`:void 0,...e.style},children:x&&a})});function cf(e){return e?"open":"closed"}var kR=bw;const jR=kR,RR=Cw,TR=_w;function Vl(e){if(!e)return"";let n=e.toLowerCase();return n=n.replace(/\s+/g,"_"),n=n.replace(/[^a-z0-9_-]/g,""),n}function PR(e,n){const o=Vl(e);return n.some(s=>Vl(s.name)===o)}var Wl="Switch",[DR]=Vn(Wl),[AR,OR]=DR(Wl),Ew=g.forwardRef((e,n)=>{const{__scopeSwitch:o,name:s,checked:a,defaultChecked:l,required:f,disabled:d,value:h="on",onCheckedChange:v,form:w,...m}=e,[b,E]=g.useState(null),j=Ie(n,_=>E(_)),x=g.useRef(!1),S=b?w||!!b.closest("form"):!0,[C,N]=Wr({prop:a,defaultProp:l??!1,onChange:v,caller:Wl});return c.jsxs(AR,{scope:o,checked:C,disabled:d,children:[c.jsx(Te.button,{type:"button",role:"switch","aria-checked":C,"aria-required":f,"data-state":Rw(C),"data-disabled":d?"":void 0,disabled:d,value:h,...m,ref:j,onClick:Ee(e.onClick,_=>{N(R=>!R),S&&(x.current=_.isPropagationStopped(),x.current||_.stopPropagation())})}),S&&c.jsx(jw,{control:b,bubbles:!x.current,name:s,value:h,checked:C,required:f,disabled:d,form:w,style:{transform:"translateX(-100%)"}})]})});Ew.displayName=Wl;var Nw="SwitchThumb",kw=g.forwardRef((e,n)=>{const{__scopeSwitch:o,...s}=e,a=OR(Nw,o);return c.jsx(Te.span,{"data-state":Rw(a.checked),"data-disabled":a.disabled?"":void 0,...s,ref:n})});kw.displayName=Nw;var MR="SwitchBubbleInput",jw=g.forwardRef(({__scopeSwitch:e,control:n,checked:o,bubbles:s=!0,...a},l)=>{const f=g.useRef(null),d=Ie(f,l),h=tf(o),v=ud(n);return g.useEffect(()=>{const w=f.current;if(!w)return;const m=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(m,"checked").set;if(h!==o&&E){const j=new Event("click",{bubbles:s});E.call(w,o),w.dispatchEvent(j)}},[h,o,s]),c.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o,...a,tabIndex:-1,ref:d,style:{...a.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});jw.displayName=MR;function Rw(e){return e?"checked":"unchecked"}var Tw=Ew,IR=kw;const Yt=g.forwardRef(({className:e,...n},o)=>c.jsx(Tw,{className:ke("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),...n,ref:o,children:c.jsx(IR,{className:ke("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")})}));Yt.displayName=Tw.displayName;var LR=[" ","Enter","ArrowUp","ArrowDown"],FR=[" ","Enter"],Lo="Select",[Yl,Kl,zR]=bu(Lo),[_s]=Vn(Lo,[zR,pl]),Xl=pl(),[$R,eo]=_s(Lo),[BR,UR]=_s(Lo),Pw=e=>{const{__scopeSelect:n,children:o,open:s,defaultOpen:a,onOpenChange:l,value:f,defaultValue:d,onValueChange:h,dir:v,name:w,autoComplete:m,disabled:b,required:E,form:j}=e,x=Xl(n),[S,C]=g.useState(null),[N,_]=g.useState(null),[R,P]=g.useState(!1),A=Sd(v),[D,F]=Wr({prop:s,defaultProp:a??!1,onChange:l,caller:Lo}),[V,Y]=Wr({prop:f,defaultProp:d,onChange:h,caller:Lo}),H=g.useRef(null),te=S?j||!!S.closest("form"):!0,[X,q]=g.useState(new Set),ce=Array.from(X).map(ee=>ee.props.value).join(";");return c.jsx(hv,{...x,children:c.jsxs($R,{required:E,scope:n,trigger:S,onTriggerChange:C,valueNode:N,onValueNodeChange:_,valueNodeHasChildren:R,onValueNodeHasChildrenChange:P,contentId:Xr(),value:V,onValueChange:Y,open:D,onOpenChange:F,dir:A,triggerPointerDownPosRef:H,disabled:b,children:[c.jsx(Yl.Provider,{scope:n,children:c.jsx(BR,{scope:e.__scopeSelect,onNativeOptionAdd:g.useCallback(ee=>{q(Q=>new Set(Q).add(ee))},[]),onNativeOptionRemove:g.useCallback(ee=>{q(Q=>{const B=new Set(Q);return B.delete(ee),B})},[]),children:o})}),te?c.jsxs(t0,{"aria-hidden":!0,required:E,tabIndex:-1,name:w,autoComplete:m,value:V,onChange:ee=>Y(ee.target.value),disabled:b,form:j,children:[V===void 0?c.jsx("option",{value:""}):null,Array.from(X)]},ce):null]})})};Pw.displayName=Lo;var Dw="SelectTrigger",Aw=g.forwardRef((e,n)=>{const{__scopeSelect:o,disabled:s=!1,...a}=e,l=Xl(o),f=eo(Dw,o),d=f.disabled||s,h=Ie(n,f.onTriggerChange),v=Kl(o),w=g.useRef("touch"),[m,b,E]=r0(x=>{const S=v().filter(_=>!_.disabled),C=S.find(_=>_.value===f.value),N=o0(S,x,C);N!==void 0&&f.onValueChange(N.value)}),j=x=>{d||(f.onOpenChange(!0),E()),x&&(f.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)})};return c.jsx(pd,{asChild:!0,...l,children:c.jsx(Te.button,{type:"button",role:"combobox","aria-controls":f.contentId,"aria-expanded":f.open,"aria-required":f.required,"aria-autocomplete":"none",dir:f.dir,"data-state":f.open?"open":"closed",disabled:d,"data-disabled":d?"":void 0,"data-placeholder":n0(f.value)?"":void 0,...a,ref:h,onClick:Ee(a.onClick,x=>{x.currentTarget.focus(),w.current!=="mouse"&&j(x)}),onPointerDown:Ee(a.onPointerDown,x=>{w.current=x.pointerType;const S=x.target;S.hasPointerCapture(x.pointerId)&&S.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&x.pointerType==="mouse"&&(j(x),x.preventDefault())}),onKeyDown:Ee(a.onKeyDown,x=>{const S=m.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&b(x.key),!(S&&x.key===" ")&&LR.includes(x.key)&&(j(),x.preventDefault())})})})});Aw.displayName=Dw;var Ow="SelectValue",Mw=g.forwardRef((e,n)=>{const{__scopeSelect:o,className:s,style:a,children:l,placeholder:f="",...d}=e,h=eo(Ow,o),{onValueNodeHasChildrenChange:v}=h,w=l!==void 0,m=Ie(n,h.onValueNodeChange);return jt(()=>{v(w)},[v,w]),c.jsx(Te.span,{...d,ref:m,style:{pointerEvents:"none"},children:n0(h.value)?c.jsx(c.Fragment,{children:f}):l})});Mw.displayName=Ow;var HR="SelectIcon",Iw=g.forwardRef((e,n)=>{const{__scopeSelect:o,children:s,...a}=e;return c.jsx(Te.span,{"aria-hidden":!0,...a,ref:n,children:s||"▼"})});Iw.displayName=HR;var VR="SelectPortal",Lw=e=>c.jsx(li,{asChild:!0,...e});Lw.displayName=VR;var Fo="SelectContent",Fw=g.forwardRef((e,n)=>{const o=eo(Fo,e.__scopeSelect),[s,a]=g.useState();if(jt(()=>{a(new DocumentFragment)},[]),!o.open){const l=s;return l?Hn.createPortal(c.jsx(zw,{scope:e.__scopeSelect,children:c.jsx(Yl.Slot,{scope:e.__scopeSelect,children:c.jsx("div",{children:e.children})})}),l):null}return c.jsx($w,{...e,ref:n})});Fw.displayName=Fo;var qn=10,[zw,to]=_s(Fo),WR="SelectContentImpl",YR=ss("SelectContent.RemoveScroll"),$w=g.forwardRef((e,n)=>{const{__scopeSelect:o,position:s="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:l,onPointerDownOutside:f,side:d,sideOffset:h,align:v,alignOffset:w,arrowPadding:m,collisionBoundary:b,collisionPadding:E,sticky:j,hideWhenDetached:x,avoidCollisions:S,...C}=e,N=eo(Fo,o),[_,R]=g.useState(null),[P,A]=g.useState(null),D=Ie(n,le=>R(le)),[F,V]=g.useState(null),[Y,H]=g.useState(null),te=Kl(o),[X,q]=g.useState(!1),ce=g.useRef(!1);g.useEffect(()=>{if(_)return Wu(_)},[_]),zu();const ee=g.useCallback(le=>{const[ie,...we]=te().map(ue=>ue.ref.current),[pe]=we.slice(-1),Ne=document.activeElement;for(const ue of le)if(ue===Ne||(ue==null||ue.scrollIntoView({block:"nearest"}),ue===ie&&P&&(P.scrollTop=0),ue===pe&&P&&(P.scrollTop=P.scrollHeight),ue==null||ue.focus(),document.activeElement!==Ne))return},[te,P]),Q=g.useCallback(()=>ee([F,_]),[ee,F,_]);g.useEffect(()=>{X&&Q()},[X,Q]);const{onOpenChange:B,triggerPointerDownPosRef:Z}=N;g.useEffect(()=>{if(_){let le={x:0,y:0};const ie=pe=>{var Ne,ue;le={x:Math.abs(Math.round(pe.pageX)-(((Ne=Z.current)==null?void 0:Ne.x)??0)),y:Math.abs(Math.round(pe.pageY)-(((ue=Z.current)==null?void 0:ue.y)??0))}},we=pe=>{le.x<=10&&le.y<=10?pe.preventDefault():_.contains(pe.target)||B(!1),document.removeEventListener("pointermove",ie),Z.current=null};return Z.current!==null&&(document.addEventListener("pointermove",ie),document.addEventListener("pointerup",we,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ie),document.removeEventListener("pointerup",we,{capture:!0})}}},[_,B,Z]),g.useEffect(()=>{const le=()=>B(!1);return window.addEventListener("blur",le),window.addEventListener("resize",le),()=>{window.removeEventListener("blur",le),window.removeEventListener("resize",le)}},[B]);const[ne,M]=r0(le=>{const ie=te().filter(Ne=>!Ne.disabled),we=ie.find(Ne=>Ne.ref.current===document.activeElement),pe=o0(ie,le,we);pe&&setTimeout(()=>pe.ref.current.focus())}),K=g.useCallback((le,ie,we)=>{const pe=!ce.current&&!we;(N.value!==void 0&&N.value===ie||pe)&&(V(le),pe&&(ce.current=!0))},[N.value]),re=g.useCallback(()=>_==null?void 0:_.focus(),[_]),G=g.useCallback((le,ie,we)=>{const pe=!ce.current&&!we;(N.value!==void 0&&N.value===ie||pe)&&H(le)},[N.value]),fe=s==="popper"?uf:Bw,me=fe===uf?{side:d,sideOffset:h,align:v,alignOffset:w,arrowPadding:m,collisionBoundary:b,collisionPadding:E,sticky:j,hideWhenDetached:x,avoidCollisions:S}:{};return c.jsx(zw,{scope:o,content:_,viewport:P,onViewportChange:A,itemRefCallback:K,selectedItem:F,onItemLeave:re,itemTextRefCallback:G,focusSelectedItem:Q,selectedItemText:Y,position:s,isPositioned:X,searchRef:ne,children:c.jsx($a,{as:YR,allowPinchZoom:!0,children:c.jsx(Oa,{asChild:!0,trapped:N.open,onMountAutoFocus:le=>{le.preventDefault()},onUnmountAutoFocus:Ee(a,le=>{var ie;(ie=N.trigger)==null||ie.focus({preventScroll:!0}),le.preventDefault()}),children:c.jsx(ai,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:l,onPointerDownOutside:f,onFocusOutside:le=>le.preventDefault(),onDismiss:()=>N.onOpenChange(!1),children:c.jsx(fe,{role:"listbox",id:N.contentId,"data-state":N.open?"open":"closed",dir:N.dir,onContextMenu:le=>le.preventDefault(),...C,...me,onPlaced:()=>q(!0),ref:D,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:Ee(C.onKeyDown,le=>{const ie=le.ctrlKey||le.altKey||le.metaKey;if(le.key==="Tab"&&le.preventDefault(),!ie&&le.key.length===1&&M(le.key),["ArrowUp","ArrowDown","Home","End"].includes(le.key)){let pe=te().filter(Ne=>!Ne.disabled).map(Ne=>Ne.ref.current);if(["ArrowUp","End"].includes(le.key)&&(pe=pe.slice().reverse()),["ArrowUp","ArrowDown"].includes(le.key)){const Ne=le.target,ue=pe.indexOf(Ne);pe=pe.slice(ue+1)}setTimeout(()=>ee(pe)),le.preventDefault()}})})})})})})});$w.displayName=WR;var KR="SelectItemAlignedPosition",Bw=g.forwardRef((e,n)=>{const{__scopeSelect:o,onPlaced:s,...a}=e,l=eo(Fo,o),f=to(Fo,o),[d,h]=g.useState(null),[v,w]=g.useState(null),m=Ie(n,D=>w(D)),b=Kl(o),E=g.useRef(!1),j=g.useRef(!0),{viewport:x,selectedItem:S,selectedItemText:C,focusSelectedItem:N}=f,_=g.useCallback(()=>{if(l.trigger&&l.valueNode&&d&&v&&x&&S&&C){const D=l.trigger.getBoundingClientRect(),F=v.getBoundingClientRect(),V=l.valueNode.getBoundingClientRect(),Y=C.getBoundingClientRect();if(l.dir!=="rtl"){const Ne=Y.left-F.left,ue=V.left-Ne,Me=D.left-ue,he=D.width+Me,et=Math.max(he,F.width),Ct=window.innerWidth-qn,wt=Si(ue,[qn,Math.max(qn,Ct-et)]);d.style.minWidth=he+"px",d.style.left=wt+"px"}else{const Ne=F.right-Y.right,ue=window.innerWidth-V.right-Ne,Me=window.innerWidth-D.right-ue,he=D.width+Me,et=Math.max(he,F.width),Ct=window.innerWidth-qn,wt=Si(ue,[qn,Math.max(qn,Ct-et)]);d.style.minWidth=he+"px",d.style.right=wt+"px"}const H=b(),te=window.innerHeight-qn*2,X=x.scrollHeight,q=window.getComputedStyle(v),ce=parseInt(q.borderTopWidth,10),ee=parseInt(q.paddingTop,10),Q=parseInt(q.borderBottomWidth,10),B=parseInt(q.paddingBottom,10),Z=ce+ee+X+B+Q,ne=Math.min(S.offsetHeight*5,Z),M=window.getComputedStyle(x),K=parseInt(M.paddingTop,10),re=parseInt(M.paddingBottom,10),G=D.top+D.height/2-qn,fe=te-G,me=S.offsetHeight/2,le=S.offsetTop+me,ie=ce+ee+le,we=Z-ie;if(ie<=G){const Ne=H.length>0&&S===H[H.length-1].ref.current;d.style.bottom="0px";const ue=v.clientHeight-x.offsetTop-x.offsetHeight,Me=Math.max(fe,me+(Ne?re:0)+ue+Q),he=ie+Me;d.style.height=he+"px"}else{const Ne=H.length>0&&S===H[0].ref.current;d.style.top="0px";const Me=Math.max(G,ce+x.offsetTop+(Ne?K:0)+me)+we;d.style.height=Me+"px",x.scrollTop=ie-G+x.offsetTop}d.style.margin=`${qn}px 0`,d.style.minHeight=ne+"px",d.style.maxHeight=te+"px",s==null||s(),requestAnimationFrame(()=>E.current=!0)}},[b,l.trigger,l.valueNode,d,v,x,S,C,l.dir,s]);jt(()=>_(),[_]);const[R,P]=g.useState();jt(()=>{v&&P(window.getComputedStyle(v).zIndex)},[v]);const A=g.useCallback(D=>{D&&j.current===!0&&(_(),N==null||N(),j.current=!1)},[_,N]);return c.jsx(GR,{scope:o,contentWrapper:d,shouldExpandOnScrollRef:E,onScrollButtonChange:A,children:c.jsx("div",{ref:h,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:c.jsx(Te.div,{...a,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});Bw.displayName=KR;var XR="SelectPopperPosition",uf=g.forwardRef((e,n)=>{const{__scopeSelect:o,align:s="start",collisionPadding:a=qn,...l}=e,f=Xl(o);return c.jsx(mv,{...f,...l,ref:n,align:s,collisionPadding:a,style:{boxSizing:"border-box",...l.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)"}})});uf.displayName=XR;var[GR,df]=_s(Fo,{}),ff="SelectViewport",Uw=g.forwardRef((e,n)=>{const{__scopeSelect:o,nonce:s,...a}=e,l=to(ff,o),f=df(ff,o),d=Ie(n,l.onViewportChange),h=g.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:s}),c.jsx(Yl.Slot,{scope:o,children:c.jsx(Te.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:Ee(a.onScroll,v=>{const w=v.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:b}=f;if(b!=null&&b.current&&m){const E=Math.abs(h.current-w.scrollTop);if(E>0){const j=window.innerHeight-qn*2,x=parseFloat(m.style.minHeight),S=parseFloat(m.style.height),C=Math.max(x,S);if(C<j){const N=C+E,_=Math.min(j,N),R=N-_;m.style.height=_+"px",m.style.bottom==="0px"&&(w.scrollTop=R>0?R:0,m.style.justifyContent="flex-end")}}}h.current=w.scrollTop})})})]})});Uw.displayName=ff;var Hw="SelectGroup",[qR,QR]=_s(Hw),JR=g.forwardRef((e,n)=>{const{__scopeSelect:o,...s}=e,a=Xr();return c.jsx(qR,{scope:o,id:a,children:c.jsx(Te.div,{role:"group","aria-labelledby":a,...s,ref:n})})});JR.displayName=Hw;var Vw="SelectLabel",Ww=g.forwardRef((e,n)=>{const{__scopeSelect:o,...s}=e,a=QR(Vw,o);return c.jsx(Te.div,{id:a.id,...s,ref:n})});Ww.displayName=Vw;var Gl="SelectItem",[ZR,Yw]=_s(Gl),Kw=g.forwardRef((e,n)=>{const{__scopeSelect:o,value:s,disabled:a=!1,textValue:l,...f}=e,d=eo(Gl,o),h=to(Gl,o),v=d.value===s,[w,m]=g.useState(l??""),[b,E]=g.useState(!1),j=Ie(n,N=>{var _;return(_=h.itemRefCallback)==null?void 0:_.call(h,N,s,a)}),x=Xr(),S=g.useRef("touch"),C=()=>{a||(d.onValueChange(s),d.onOpenChange(!1))};if(s==="")throw new Error("A <Select.Item /> 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(ZR,{scope:o,value:s,disabled:a,textId:x,isSelected:v,onItemTextChange:g.useCallback(N=>{m(_=>_||((N==null?void 0:N.textContent)??"").trim())},[]),children:c.jsx(Yl.ItemSlot,{scope:o,value:s,disabled:a,textValue:w,children:c.jsx(Te.div,{role:"option","aria-labelledby":x,"data-highlighted":b?"":void 0,"aria-selected":v&&b,"data-state":v?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...f,ref:j,onFocus:Ee(f.onFocus,()=>E(!0)),onBlur:Ee(f.onBlur,()=>E(!1)),onClick:Ee(f.onClick,()=>{S.current!=="mouse"&&C()}),onPointerUp:Ee(f.onPointerUp,()=>{S.current==="mouse"&&C()}),onPointerDown:Ee(f.onPointerDown,N=>{S.current=N.pointerType}),onPointerMove:Ee(f.onPointerMove,N=>{var _;S.current=N.pointerType,a?(_=h.onItemLeave)==null||_.call(h):S.current==="mouse"&&N.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ee(f.onPointerLeave,N=>{var _;N.currentTarget===document.activeElement&&((_=h.onItemLeave)==null||_.call(h))}),onKeyDown:Ee(f.onKeyDown,N=>{var R;((R=h.searchRef)==null?void 0:R.current)!==""&&N.key===" "||(FR.includes(N.key)&&C(),N.key===" "&&N.preventDefault())})})})})});Kw.displayName=Gl;var Ii="SelectItemText",Xw=g.forwardRef((e,n)=>{const{__scopeSelect:o,className:s,style:a,...l}=e,f=eo(Ii,o),d=to(Ii,o),h=Yw(Ii,o),v=UR(Ii,o),[w,m]=g.useState(null),b=Ie(n,C=>m(C),h.onItemTextChange,C=>{var N;return(N=d.itemTextRefCallback)==null?void 0:N.call(d,C,h.value,h.disabled)}),E=w==null?void 0:w.textContent,j=g.useMemo(()=>c.jsx("option",{value:h.value,disabled:h.disabled,children:E},h.value),[h.disabled,h.value,E]),{onNativeOptionAdd:x,onNativeOptionRemove:S}=v;return jt(()=>(x(j),()=>S(j)),[x,S,j]),c.jsxs(c.Fragment,{children:[c.jsx(Te.span,{id:h.textId,...l,ref:b}),h.isSelected&&f.valueNode&&!f.valueNodeHasChildren?Hn.createPortal(l.children,f.valueNode):null]})});Xw.displayName=Ii;var Gw="SelectItemIndicator",qw=g.forwardRef((e,n)=>{const{__scopeSelect:o,...s}=e;return Yw(Gw,o).isSelected?c.jsx(Te.span,{"aria-hidden":!0,...s,ref:n}):null});qw.displayName=Gw;var pf="SelectScrollUpButton",Qw=g.forwardRef((e,n)=>{const o=to(pf,e.__scopeSelect),s=df(pf,e.__scopeSelect),[a,l]=g.useState(!1),f=Ie(n,s.onScrollButtonChange);return jt(()=>{if(o.viewport&&o.isPositioned){let d=function(){const v=h.scrollTop>0;l(v)};const h=o.viewport;return d(),h.addEventListener("scroll",d),()=>h.removeEventListener("scroll",d)}},[o.viewport,o.isPositioned]),a?c.jsx(Zw,{...e,ref:f,onAutoScroll:()=>{const{viewport:d,selectedItem:h}=o;d&&h&&(d.scrollTop=d.scrollTop-h.offsetHeight)}}):null});Qw.displayName=pf;var hf="SelectScrollDownButton",Jw=g.forwardRef((e,n)=>{const o=to(hf,e.__scopeSelect),s=df(hf,e.__scopeSelect),[a,l]=g.useState(!1),f=Ie(n,s.onScrollButtonChange);return jt(()=>{if(o.viewport&&o.isPositioned){let d=function(){const v=h.scrollHeight-h.clientHeight,w=Math.ceil(h.scrollTop)<v;l(w)};const h=o.viewport;return d(),h.addEventListener("scroll",d),()=>h.removeEventListener("scroll",d)}},[o.viewport,o.isPositioned]),a?c.jsx(Zw,{...e,ref:f,onAutoScroll:()=>{const{viewport:d,selectedItem:h}=o;d&&h&&(d.scrollTop=d.scrollTop+h.offsetHeight)}}):null});Jw.displayName=hf;var Zw=g.forwardRef((e,n)=>{const{__scopeSelect:o,onAutoScroll:s,...a}=e,l=to("SelectScrollButton",o),f=g.useRef(null),d=Kl(o),h=g.useCallback(()=>{f.current!==null&&(window.clearInterval(f.current),f.current=null)},[]);return g.useEffect(()=>()=>h(),[h]),jt(()=>{var w;const v=d().find(m=>m.ref.current===document.activeElement);(w=v==null?void 0:v.ref.current)==null||w.scrollIntoView({block:"nearest"})},[d]),c.jsx(Te.div,{"aria-hidden":!0,...a,ref:n,style:{flexShrink:0,...a.style},onPointerDown:Ee(a.onPointerDown,()=>{f.current===null&&(f.current=window.setInterval(s,50))}),onPointerMove:Ee(a.onPointerMove,()=>{var v;(v=l.onItemLeave)==null||v.call(l),f.current===null&&(f.current=window.setInterval(s,50))}),onPointerLeave:Ee(a.onPointerLeave,()=>{h()})})}),eT="SelectSeparator",e0=g.forwardRef((e,n)=>{const{__scopeSelect:o,...s}=e;return c.jsx(Te.div,{"aria-hidden":!0,...s,ref:n})});e0.displayName=eT;var mf="SelectArrow",tT=g.forwardRef((e,n)=>{const{__scopeSelect:o,...s}=e,a=Xl(o),l=eo(mf,o),f=to(mf,o);return l.open&&f.position==="popper"?c.jsx(gv,{...a,...s,ref:n}):null});tT.displayName=mf;var nT="SelectBubbleInput",t0=g.forwardRef(({__scopeSelect:e,value:n,...o},s)=>{const a=g.useRef(null),l=Ie(s,a),f=tf(n);return g.useEffect(()=>{const d=a.current;if(!d)return;const h=window.HTMLSelectElement.prototype,w=Object.getOwnPropertyDescriptor(h,"value").set;if(f!==n&&w){const m=new Event("change",{bubbles:!0});w.call(d,n),d.dispatchEvent(m)}},[f,n]),c.jsx(Te.select,{...o,style:{...Yh,...o.style},ref:l,defaultValue:n})});t0.displayName=nT;function n0(e){return e===""||e===void 0}function r0(e){const n=Mt(e),o=g.useRef(""),s=g.useRef(0),a=g.useCallback(f=>{const d=o.current+f;n(d),(function h(v){o.current=v,window.clearTimeout(s.current),v!==""&&(s.current=window.setTimeout(()=>h(""),1e3))})(d)},[n]),l=g.useCallback(()=>{o.current="",window.clearTimeout(s.current)},[]);return g.useEffect(()=>()=>window.clearTimeout(s.current),[]),[o,a,l]}function o0(e,n,o){const a=n.length>1&&Array.from(n).every(v=>v===n[0])?n[0]:n,l=o?e.indexOf(o):-1;let f=rT(e,Math.max(l,0));a.length===1&&(f=f.filter(v=>v!==o));const h=f.find(v=>v.textValue.toLowerCase().startsWith(a.toLowerCase()));return h!==o?h:void 0}function rT(e,n){return e.map((o,s)=>e[(n+s)%e.length])}var oT=Pw,s0=Aw,sT=Mw,iT=Iw,aT=Lw,i0=Fw,lT=Uw,a0=Ww,l0=Kw,cT=Xw,uT=qw,c0=Qw,u0=Jw,d0=e0;const Kt=oT,Xt=sT,Lt=g.forwardRef(({className:e,children:n,...o},s)=>c.jsxs(s0,{ref:s,className:ke("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 data-[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),...o,children:[n,c.jsx(iT,{asChild:!0,children:c.jsx(Ea,{className:"h-4 w-4 opacity-50"})})]}));Lt.displayName=s0.displayName;const f0=g.forwardRef(({className:e,...n},o)=>c.jsx(c0,{ref:o,className:ke("flex cursor-default items-center justify-center py-1",e),...n,children:c.jsx(qS,{className:"h-4 w-4"})}));f0.displayName=c0.displayName;const p0=g.forwardRef(({className:e,...n},o)=>c.jsx(u0,{ref:o,className:ke("flex cursor-default items-center justify-center py-1",e),...n,children:c.jsx(Ea,{className:"h-4 w-4"})}));p0.displayName=u0.displayName;const Ft=g.forwardRef(({className:e,children:n,position:o="popper",...s},a)=>c.jsx(aT,{children:c.jsxs(i0,{ref:a,className:ke("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-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 origin-[--radix-select-content-transform-origin]",o==="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:o,...s,children:[c.jsx(f0,{}),c.jsx(lT,{className:ke("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),c.jsx(p0,{})]})}));Ft.displayName=i0.displayName;const dT=g.forwardRef(({className:e,...n},o)=>c.jsx(a0,{ref:o,className:ke("py-1.5 ps-8 pe-2 text-sm font-semibold",e),...n}));dT.displayName=a0.displayName;const He=g.forwardRef(({className:e,children:n,...o},s)=>c.jsxs(l0,{ref:s,className:ke("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 ps-8 pe-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[c.jsx("span",{className:"absolute start-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(uT,{children:c.jsx(XS,{className:"h-4 w-4"})})}),c.jsx(cT,{children:n})]}));He.displayName=l0.displayName;const fT=g.forwardRef(({className:e,...n},o)=>c.jsx(d0,{ref:o,className:ke("-mx-1 my-1 h-px bg-muted",e),...n}));fT.displayName=d0.displayName;const pT=[{value:"==",label:T.__("is equal to","codeideal-open-fields")},{value:"!=",label:T.__("is not equal to","codeideal-open-fields")},{value:"contains",label:T.__("contains","codeideal-open-fields")},{value:"empty",label:T.__("is empty","codeideal-open-fields")},{value:"not_empty",label:T.__("is not empty","codeideal-open-fields")}];function hT({field:e,otherFields:n,onConditionalLogicChange:o}){var x,S,C;const s=((x=e.settings)==null?void 0:x.conditional_logic)&&e.settings.conditional_logic.length>0,[a,l]=g.useState(s),[f,d]=g.useState(((S=e.settings)==null?void 0:S.conditional_logic)||[]);g.useEffect(()=>{var _,R;if(((_=e.settings)==null?void 0:_.conditional_logic)&&e.settings.conditional_logic.length>0&&((R=e.settings)!=null&&R.conditional_logic)){l(!0);const P=e.settings.conditional_logic.map(A=>A.map(D=>({...D,field:String(D.field)})));d(P)}},[(C=e.settings)==null?void 0:C.conditional_logic]);const h=N=>{const _=N.map(R=>R.filter(P=>P.field&&P.operator)).filter(R=>R.length>0);_.length>0?o(_):o(void 0)},v=N=>{if(l(N),N){const _=f.length>0?f:[[{field:"",operator:"==",value:""}]];d(_),o(_)}else d([]),o(void 0)},w=N=>{const _=[...f];_[N]=[..._[N]||[],{field:"",operator:"==",value:""}],d(_)},m=()=>{const N=[...f,[{field:"",operator:"==",value:""}]];d(N)},b=(N,_,R,P)=>{const A=[...f],D=A[N];!D||!D[_]||(A[N]=[...D],A[N][_]={...D[_],[R]:P},d(A),h(A))},E=(N,_)=>{const R=[...f],P=R[N];if(!P)return;R[N]=P.filter((D,F)=>F!==_);const A=R.filter(D=>D.length>0);d(A),h(A)},j=N=>{const _=f.filter((R,P)=>P!==N);d(_),h(_)};return c.jsxs("div",{className:"border-t pt-4",children:[c.jsxs("div",{className:"flex items-center justify-between mb-3",children:[c.jsx("h4",{className:"text-sm font-medium",children:T.__("Conditional Logic","codeideal-open-fields")}),c.jsx(Yt,{checked:a,onCheckedChange:v})]}),a&&c.jsxs("div",{className:"space-y-3",children:[c.jsx("p",{className:"text-xs text-gray-600",children:T.__("Show this field if conditions match","codeideal-open-fields")}),f.map((N,_)=>c.jsxs("div",{className:"bg-gray-50 p-3 rounded-lg space-y-2",children:[_>0&&c.jsx("div",{className:"flex items-center justify-center -mt-6 mb-2",children:c.jsx("span",{className:"bg-blue-100 text-blue-700 text-xs font-semibold px-2 py-1 rounded",children:"OR"})}),N.map((R,P)=>c.jsxs("div",{children:[P>0&&c.jsx("div",{className:"text-xs text-gray-500 text-center my-1",children:"AND"}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs(Kt,{value:String(R.field),onValueChange:A=>b(_,P,"field",A),children:[c.jsx(Lt,{className:"w-[140px]",children:c.jsx(Xt,{placeholder:T.__("Select field","codeideal-open-fields")})}),c.jsx(Ft,{children:n.map(A=>c.jsx(He,{value:String(A.id),children:A.label},A.id))})]}),c.jsxs(Kt,{value:R.operator,onValueChange:A=>b(_,P,"operator",A),children:[c.jsx(Lt,{className:"w-[130px]",children:c.jsx(Xt,{placeholder:T.__("Operator","codeideal-open-fields")})}),c.jsx(Ft,{children:pT.map(A=>c.jsx(He,{value:A.value,children:A.label},A.value))})]}),!["empty","not_empty"].includes(R.operator)&&c.jsx(fn,{value:R.value,onChange:A=>b(_,P,"value",A.target.value),placeholder:T.__("Value","codeideal-open-fields"),className:"w-[100px]"}),c.jsx("button",{type:"button",onClick:()=>E(_,P),className:"p-1 text-gray-400 hover:text-red-600",title:T.__("Remove rule","codeideal-open-fields"),children:c.jsx(si,{className:"h-4 w-4"})})]})]},P)),c.jsxs("div",{className:"flex items-center justify-between pt-2",children:[c.jsxs(ft,{type:"button",variant:"ghost",size:"sm",onClick:()=>w(_),className:"text-xs",children:[c.jsx(Er,{className:"h-3 w-3 me-1"}),"AND"]}),f.length>1&&c.jsx("button",{type:"button",onClick:()=>j(_),className:"text-xs text-red-500 hover:text-red-700",children:"Remove group"})]})]},_)),c.jsxs(ft,{type:"button",variant:"outline",size:"sm",onClick:m,className:"w-full",children:[c.jsx(Er,{className:"h-3 w-3 me-1"}),T.__("Add OR Group","codeideal-open-fields")]})]})]})}function mT({field:e,onSettingsChange:n}){var a,l;const o=((a=e.settings)==null?void 0:a.required)??!1,s=((l=e.settings)==null?void 0:l.instructions)||"";return c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"space-y-0.5",children:[c.jsx(Be,{htmlFor:`required-${e.id}`,className:"text-sm font-medium",children:T.__("Required","codeideal-open-fields")}),c.jsx("p",{className:"text-xs text-muted-foreground",children:T.__("Make this field mandatory","codeideal-open-fields")})]}),c.jsx(Yt,{id:`required-${e.id}`,checked:o,onCheckedChange:f=>n({required:f})})]}),c.jsxs("div",{children:[c.jsx(Be,{htmlFor:`instructions-${e.id}`,className:"text-sm font-medium",children:T.__("Instructions","codeideal-open-fields")}),c.jsx("textarea",{id:`instructions-${e.id}`,value:s,onChange:f=>n({instructions:f.target.value}),className:"w-full mt-1 px-3 py-2 border rounded-md text-sm resize-none",rows:2,placeholder:T.__("Help text shown below the field","codeideal-open-fields")})]})]})}function gT({field:e,onSettingsChange:n}){const o=Ze.getSettingsComponent(e.type);return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"border-t pt-4",children:[c.jsx("h4",{className:"text-sm font-medium mb-3",children:"General Settings"}),c.jsx(mT,{field:e,onSettingsChange:n})]}),o&&c.jsxs("div",{className:"border-t pt-4",children:[c.jsxs("h4",{className:"text-sm font-medium mb-3 capitalize",children:[e.type," Settings"]}),c.jsx(o,{field:e,onSettingsChange:n})]})]})}const h0=Gu,vT=qu,yT=Qu,m0=g.forwardRef(({className:e,...n},o)=>c.jsx(Wa,{ref:o,className:ke("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),...n}));m0.displayName=Wa.displayName;const gf=g.forwardRef(({className:e,children:n,...o},s)=>c.jsxs(yT,{children:[c.jsx(m0,{}),c.jsxs(Ya,{ref:s,className:ke("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),...o,children:[n,c.jsxs(Ga,{className:"absolute end-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(si,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));gf.displayName=Ya.displayName;const vf=({className:e,...n})=>c.jsx("div",{className:ke("flex flex-col space-y-1.5 text-center sm:text-start",e),...n});vf.displayName="DialogHeader";const yf=g.forwardRef(({className:e,...n},o)=>c.jsx(Ka,{ref:o,className:ke("text-lg font-semibold leading-none tracking-tight",e),...n}));yf.displayName=Ka.displayName;const wf=g.forwardRef(({className:e,...n},o)=>c.jsx(Xa,{ref:o,className:ke("text-sm text-muted-foreground",e),...n}));wf.displayName=Xa.displayName;function g0({field:e,allFields:n,depth:o,onSelect:s}){const a=xi(n,e.id),l=yi(e)&&a.length>0;return c.jsxs("div",{children:[c.jsxs("button",{onClick:()=>s(e),className:"w-full text-start px-3 py-2 hover:bg-gray-100 rounded flex items-center gap-2 transition-colors",style:{paddingLeft:`${12+o*20}px`},children:[l&&c.jsx(GS,{className:"h-3 w-3 text-gray-400"}),!l&&c.jsx("span",{className:"w-3"}),c.jsx("span",{className:"flex-1 text-sm truncate",children:e.label||e.name}),c.jsx(fi,{variant:"outline",className:"text-xs",children:e.type}),c.jsx(os,{className:"h-3 w-3 text-gray-400"})]}),l&&c.jsx("div",{children:a.map(f=>c.jsx(g0,{field:f,allFields:n,depth:o+1,onSelect:s},f.id))})]})}function v0({open:e,onOpenChange:n,targetParentId:o,currentFieldsetId:s,onCopy:a}){var P;const[l,f]=g.useState("current"),[d,h]=g.useState([]),[v,w]=g.useState([]),[m,b]=g.useState(!1),[E,j]=g.useState(!1),x=it(A=>A.fields),S=it(A=>A.currentFieldset);g.useEffect(()=>{e&&d.length===0&&(b(!0),Tn.getAll().then(A=>{h(A)}).catch(A=>{console.error("Failed to fetch fieldsets:",A)}).finally(()=>{b(!1)}))},[e,d.length]),g.useEffect(()=>{if(l==="current"||!l){w([]);return}j(!0),Oo.getByFieldset(Number(l)).then(A=>{w(A)}).catch(A=>{console.error("Failed to fetch fields:",A),w([])}).finally(()=>{j(!1)})},[l]);const C=g.useMemo(()=>wi(l==="current"?x:v),[l,x,v]),N=l==="current"?x:v,_=A=>{const D={...A,id:`temp-${Date.now()}`,parent_id:o,fieldset_id:s,label:`${A.label} (Copy)`,name:`${A.name}_copy_${Date.now().toString(36)}`};A.settings&&(D.settings=JSON.parse(JSON.stringify(A.settings))),a(D),n(!1)},R=o?((P=x.find(A=>String(A.id)===String(o)))==null?void 0:P.label)||"selected parent":"root level";return c.jsx(h0,{open:e,onOpenChange:n,children:c.jsxs(gf,{className:"max-w-lg",children:[c.jsxs(vf,{children:[c.jsxs(yf,{className:"flex items-center gap-2",children:[c.jsx(os,{className:"h-5 w-5"}),T.__("Copy Field","codeideal-open-fields")]}),c.jsxs(wf,{children:[T.__("Copy a field to","codeideal-open-fields")," ",R,". ",T.__("The copied field will have a new ID and name.","codeideal-open-fields")]})]}),c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{children:[c.jsx(Be,{children:T.__("Copy from","codeideal-open-fields")}),c.jsxs(Kt,{value:l,onValueChange:f,children:[c.jsx(Lt,{className:"mt-1",children:c.jsx(Xt,{placeholder:"Select fieldset..."})}),c.jsxs(Ft,{children:[c.jsxs(He,{value:"current",children:[(S==null?void 0:S.title)||T.__("Current Fieldset","codeideal-open-fields")," (",T.__("Current","codeideal-open-fields"),")"]}),d.filter(A=>A.id!==s).map(A=>c.jsx(He,{value:String(A.id),children:A.title},A.id))]})]})]}),c.jsxs("div",{children:[c.jsx(Be,{children:T.__("Select field to copy","codeideal-open-fields")}),c.jsx("div",{className:"mt-1 border rounded-md",children:m||E?c.jsxs("div",{className:"flex items-center justify-center py-8 text-gray-500",children:[c.jsx(Ah,{className:"h-5 w-5 animate-spin me-2"}),T.__("Loading...","codeideal-open-fields")]}):C.length===0?c.jsx("div",{className:"text-center py-8 text-gray-500 text-sm",children:T.__("No fields available in this fieldset","codeideal-open-fields")}):c.jsx(xl,{className:"h-64",children:c.jsx("div",{className:"p-1",children:C.map(A=>c.jsx(g0,{field:A,allFields:N,depth:0,onSelect:_},A.id))})})})]})]})]})})}function wT({parentField:e,allFields:n,depth:o,maxDepth:s=3,FieldItemComponent:a}){const l=it(P=>P.addFieldLocal),f=it(P=>P.reorderFieldsLocal),d=it(P=>P.getChildFields),h=it(P=>P.currentFieldset),{showToast:v}=bi(),[w,m]=g.useState(!1),[b,E]=g.useState(!1),j=d(e.id),x=Ze.getGroupedByCategory(),S=wy(Nl(Rl),Nl(jl,{coordinateGetter:tw})),C=P=>{const{active:A,over:D}=P;if(D&&A.id!==D.id){const F=j.findIndex(H=>H.id===A.id),V=j.findIndex(H=>H.id===D.id),Y=Ol(j,F,V);f(Y,e.id)}},N=()=>{let P=1,A=`${e.name}_field_${P}`,D=`Field ${P}`;for(;n.some(F=>F.name===A);)P++,A=`${e.name}_field_${P}`,D=`Field ${P}`;return{fieldName:A,fieldLabel:D}},_=P=>{const{fieldName:A,fieldLabel:D}=N(),F=Ze.get(P);if(F!=null&&F.hasSubFields&&o>=s){v("error",`Cannot add ${F.label} - maximum nesting depth (${s}) reached`),m(!1);return}l({type:P,label:D,name:A},e.id),m(!1),v("success",`${D} added to ${e.label}`)},R=P=>{l({...P,parent_id:e.id},e.id),v("success",`${P.label} copied to ${e.label}`)};return c.jsxs("div",{className:"mt-3 ms-4 ps-4 border-s-2 border-dashed border-gray-300",children:[c.jsxs("div",{className:"text-xs text-gray-500 mb-2 font-medium",children:[T.__("Sub-fields of","codeideal-open-fields")," ",e.label]}),c.jsx(Ky,{id:`nested-${e.id}`,sensors:S,collisionDetection:Ey,onDragEnd:C,children:c.jsx(Zy,{items:j.map(P=>P.id),strategy:qy,children:j.map(P=>c.jsx(a,{field:P,allFields:n,depth:o,maxDepth:s},P.id))})}),j.length===0&&c.jsx("div",{className:"text-sm text-gray-400 italic py-2",children:T.__("No sub-fields yet","codeideal-open-fields")}),c.jsxs(Od,{open:w,onOpenChange:m,children:[c.jsx(fy,{asChild:!0,children:c.jsxs("button",{className:"w-full mt-2 p-3 border-2 border-dashed border-gray-200 rounded-lg hover:border-gray-300 hover:bg-gray-50 transition-colors flex items-center justify-center gap-2 text-gray-500 text-sm",children:[c.jsx(Er,{className:"h-4 w-4"}),c.jsx("span",{children:T.__("Add Sub-field","codeideal-open-fields")})]})}),c.jsxs(Md,{children:[c.jsxs(Id,{children:[c.jsxs(Fd,{children:[T.__("Add Sub-field to","codeideal-open-fields")," ",e.label]}),c.jsx(zd,{children:T.__("Choose the type of field you want to add","codeideal-open-fields")})]}),c.jsx(xl,{className:"h-96 px-6",children:Object.entries(x).map(([P,A])=>c.jsxs("div",{className:"mb-6",children:[c.jsx("h3",{className:"text-sm font-semibold text-gray-700 mb-2 capitalize",children:P}),c.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2",children:A.map(D=>{const F=D.hasSubFields&&o>=s;return c.jsxs("button",{onClick:()=>_(D.type),disabled:F,className:`p-3 border rounded-lg text-start transition-colors ${F?"opacity-50 cursor-not-allowed bg-gray-50":"hover:border-blue-500 hover:bg-blue-50"}`,children:[c.jsx("div",{className:"font-medium text-sm",children:D.label}),D.description&&c.jsx("div",{className:"text-xs text-gray-500 mt-1",children:D.description}),F&&c.jsx("div",{className:"text-xs text-red-500 mt-1",children:T.__("Max depth reached","codeideal-open-fields")})]},D.type)})})]},P))}),c.jsx(Ld,{children:c.jsx(py,{asChild:!0,children:c.jsx(ft,{variant:"outline",children:T.__("Cancel","codeideal-open-fields")})})})]})]}),c.jsxs("button",{onClick:()=>E(!0),className:"w-full mt-2 p-2 border border-gray-200 rounded-lg hover:border-blue-300 hover:bg-blue-50 transition-colors flex items-center justify-center gap-2 text-gray-500 text-sm",children:[c.jsx(os,{className:"h-4 w-4"}),c.jsx("span",{children:T.__("Copy from other field","codeideal-open-fields")})]}),h&&c.jsx(v0,{open:b,onOpenChange:E,targetParentId:e.id,currentFieldsetId:h.id,onCopy:R})]})}function xT({field:e,allFields:n,maxDepth:o}){const[s,a]=g.useState(!1),[l,f]=g.useState(e.parent_id?String(e.parent_id):"_root"),{moveFieldToParent:d}=it(),{showToast:h}=bi(),v=n.filter(m=>{if(!yi(m)||String(m.id)===String(e.id))return!1;const b=j=>{if(!j)return!1;if(String(j)===String(e.id))return!0;const x=n.find(S=>String(S.id)===String(j));return x?b(x.parent_id):!1};if(b(m.parent_id))return!1;const E=j=>{if(!j.parent_id)return 0;const x=n.find(S=>String(S.id)===String(j.parent_id));return x?1+E(x):0};return E(m)<o-1});if(v.length===0&&!e.parent_id)return null;const w=()=>{var E;const m=l==="_root"?null:l;d(String(e.id),m);const b=m?((E=n.find(j=>String(j.id)===l))==null?void 0:E.label)||"parent":"root level";h("success",`${T.__("Field moved to","codeideal-open-fields")} ${b}`),a(!1)};return c.jsxs(h0,{open:s,onOpenChange:a,children:[c.jsx(vT,{asChild:!0,children:c.jsx("button",{className:"p-1 text-gray-400 hover:text-blue-600",title:T.__("Move field","codeideal-open-fields"),children:c.jsx(o1,{className:"h-4 w-4"})})}),c.jsxs(gf,{className:"sm:max-w-[425px]",children:[c.jsxs(vf,{children:[c.jsx(yf,{children:T.__("Move Field","codeideal-open-fields")}),c.jsxs(wf,{children:['Move "',e.label||e.name,'" to a different location.']})]}),c.jsxs("div",{className:"py-4",children:[c.jsx(Be,{htmlFor:"move-location",children:T.__("Move to","codeideal-open-fields")}),c.jsxs(Kt,{value:l,onValueChange:f,children:[c.jsx(Lt,{id:"move-location",className:"mt-2",children:c.jsx(Xt,{placeholder:"Select location"})}),c.jsxs(Ft,{children:[c.jsx(He,{value:"_root",children:T.__("Root Level","codeideal-open-fields")}),v.map(m=>c.jsxs(He,{value:String(m.id),children:["→ ",m.label," (",m.type,")"]},m.id))]})]})]}),c.jsxs("div",{className:"flex justify-end gap-2",children:[c.jsx(ft,{variant:"outline",onClick:()=>a(!1),children:T.__("Cancel","codeideal-open-fields")}),c.jsx(ft,{onClick:w,disabled:l===(e.parent_id?String(e.parent_id):"_root"),children:T.__("Move Field","codeideal-open-fields")})]})]})]})}function y0({field:e,allFields:n,depth:o=0,maxDepth:s=3}){var le,ie,we,pe,Ne;const a=it(ue=>ue.updateFieldLocal),l=it(ue=>ue.deleteFieldLocal),{showToast:f}=bi(),[d,h]=g.useState(!1),[v,w]=g.useState(e.label||""),[m,b]=g.useState(e.name||""),[E,j]=g.useState(""),[x,S]=g.useState(!1),C=yi(e),N=n.filter(ue=>String(ue.parent_id)===String(e.id)).length,[_,R]=g.useState(((ie=(le=e.settings)==null?void 0:le.wrapper)==null?void 0:ie.width)||"100"),[P,A]=g.useState(((pe=(we=e.settings)==null?void 0:we.wrapper)==null?void 0:pe.class)||""),D=((Ne=e.settings)==null?void 0:Ne.conditional_logic)&&e.settings.conditional_logic.length>0,{attributes:F,listeners:V,setNodeRef:Y,transform:H,transition:te,isDragging:X}=Qj({id:e.id}),q={transform:Pi.Transform.toString(H),transition:te,opacity:X?.5:1};g.useEffect(()=>{var ue,Me,he,et;w(e.label||""),b(e.name||""),R(((Me=(ue=e.settings)==null?void 0:ue.wrapper)==null?void 0:Me.width)||"100"),A(((et=(he=e.settings)==null?void 0:he.wrapper)==null?void 0:et.class)||"")},[e]);const ce=g.useCallback(ue=>{a(String(e.id),ue)},[e.id,a]),ee=ue=>{w(ue),ue.trim()&&(S(!1),ce({label:ue}))},Q=()=>{v.trim()||S(!0)},B=ue=>{const Me=Vl(ue);b(Me||ue);const he=n.filter(et=>et.id!==e.id).map(et=>et.name);Me&&PR(Me,he.map(et=>({name:et})))?j("This field name is already used in this fieldset"):j(Me?"":"Field name is required and must contain only letters, numbers, hyphens, or underscores")},Z=()=>{const ue=Vl(m);ue?(ce({name:ue}),b(ue)):j("Field name cannot be empty")},ne=ue=>{var he;const Me=String(ue[0]);R(Me),ce({settings:{...e.settings,wrapper:{...(he=e.settings)==null?void 0:he.wrapper,width:Me}}})},M=ue=>{var Me;A(ue),ce({settings:{...e.settings,wrapper:{...(Me=e.settings)==null?void 0:Me.wrapper,class:ue}}})},K=()=>{},re=ue=>{ce({settings:{...e.settings,conditional_logic:ue}})},G=ue=>{ce({settings:{...e.settings,...ue}})},fe=()=>{N>0?(l(String(e.id)),f("success",`${T.__("Field and","codeideal-open-fields")} ${N} ${T.__("sub-field(s) removed (will be deleted when you click Save Changes)","codeideal-open-fields")}`)):(l(String(e.id)),f("success",T.__("Field removed (will be deleted when you click Save Changes)","codeideal-open-fields")))},me=n.filter(ue=>ue.id!==e.id);return c.jsx("div",{ref:Y,style:q,className:"mb-2",children:c.jsx(jR,{open:d,onOpenChange:h,children:c.jsxs(Io,{className:ke(`${x?"border-red-500":""} ${o>0?"bg-gray-50/50":""}`),children:[c.jsxs("div",{className:ke("flex items-center gap-2 p-3"),children:[c.jsx("button",{...F,...V,className:"cursor-grab active:cursor-grabbing p-1 text-gray-400 hover:text-gray-600",children:c.jsx(e1,{className:"h-4 w-4"})}),c.jsxs(RR,{className:"flex-1 flex items-center justify-between gap-2 text-start",children:[c.jsxs("div",{className:"flex-1",children:[c.jsxs("div",{className:"font-medium text-sm flex items-center gap-2 flex-wrap",children:[e.label||c.jsx("span",{className:"text-red-500",children:T.__("Label required","codeideal-open-fields")}),c.jsx(fi,{variant:"outline",className:"text-xs",children:e.type}),C&&c.jsxs(fi,{variant:"secondary",className:"text-xs",children:[c.jsx(Dh,{className:"h-3 w-3 me-1"}),N," ",N!==1?T.__("sub-fields","codeideal-open-fields"):T.__("sub-field","codeideal-open-fields")]}),D&&c.jsxs(fi,{variant:"secondary",className:"text-xs",children:[c.jsx(Ph,{className:"h-3 w-3 me-1"}),T.__("Conditional","codeideal-open-fields")]})]}),c.jsx("div",{className:"text-xs text-gray-500",children:e.name})]}),c.jsx(Ea,{className:`h-4 w-4 transition-transform ${d?"rotate-180":""}`})]}),c.jsx(xT,{field:e,allFields:n,maxDepth:s}),c.jsx("button",{onClick:fe,className:"p-1 text-gray-400 hover:text-red-600",children:c.jsx(vu,{className:"h-4 w-4"})})]}),c.jsx(TR,{className:"",children:c.jsxs("div",{className:"px-3 pb-3 space-y-4 border-t pt-3",children:[x&&c.jsx("div",{className:"text-sm text-red-600 bg-red-50 p-2 rounded",children:T.__("Field label and name cannot be empty","codeideal-open-fields")}),c.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[c.jsxs("div",{children:[c.jsx(Be,{htmlFor:`label-${e.id}`,children:T.__("Field Label","codeideal-open-fields")}),c.jsx(fn,{id:`label-${e.id}`,value:v,onChange:ue=>ee(ue.target.value),onBlur:Q,placeholder:T.__("Enter field label","codeideal-open-fields"),className:x&&!v.trim()?"border-red-500":""})]}),c.jsxs("div",{children:[c.jsx(Be,{htmlFor:`name-${e.id}`,children:T.__("Field Name","codeideal-open-fields")}),c.jsx(fn,{id:`name-${e.id}`,value:m,onChange:ue=>B(ue.target.value),onBlur:Z,placeholder:"my_field_name",className:E?"border-red-500":"",disabled:!1}),E&&c.jsx("p",{className:"text-xs text-red-600 mt-1",children:E})]})]}),c.jsxs("div",{className:"border-t pt-4",children:[c.jsx("h4",{className:"text-sm font-medium mb-3",children:T.__("Wrapper Settings","codeideal-open-fields")}),c.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex justify-between items-center mb-2",children:[c.jsx(Be,{htmlFor:`width-${e.id}`,children:T.__("Width","codeideal-open-fields")}),c.jsxs("span",{className:"text-sm font-medium text-primary",children:[_,"%"]})]}),c.jsx(xw,{id:`width-${e.id}`,min:10,max:100,step:1,value:[parseInt(_,10)],onValueChange:ne,className:"w-full"})]}),c.jsxs("div",{children:[c.jsx(Be,{htmlFor:`class-${e.id}`,children:T.__("CSS Class","codeideal-open-fields")}),c.jsx(fn,{id:`class-${e.id}`,value:P,onChange:ue=>M(ue.target.value),onBlur:K,placeholder:"custom-class"})]})]})]}),c.jsx(gT,{field:e,onSettingsChange:G}),c.jsx(hT,{field:e,otherFields:me,onConditionalLogicChange:re}),C&&c.jsxs("div",{className:"border-t pt-4",children:[c.jsxs("h4",{className:"text-sm font-medium mb-3 flex items-center gap-2",children:[c.jsx(Dh,{className:"h-4 w-4"}),T.__("Sub-fields","codeideal-open-fields")]}),c.jsx(wT,{parentField:e,allFields:n,depth:o+1,maxDepth:s,FieldItemComponent:y0})]})]})})]})})})}function bT(){const e=it(N=>N.currentFieldset),n=it(N=>N.fields),o=it(N=>N.fetchFields),s=it(N=>N.addFieldLocal),a=it(N=>N.reorderFieldsLocal),l=it(N=>N.getRootFields),{showToast:f}=bi(),d=Ze.getGroupedByCategory(),[h,v]=g.useState(!1),[w,m]=g.useState(!1),b=l(),E=wy(Nl(Rl),Nl(jl,{coordinateGetter:tw}));g.useEffect(()=>{e!=null&&e.id&&o(e.id)},[e==null?void 0:e.id,o]);const j=N=>{const{active:_,over:R}=N;if(R&&_.id!==R.id){const P=b.findIndex(F=>F.id===_.id),A=b.findIndex(F=>F.id===R.id),D=Ol(b,P,A);a(D,null)}},x=()=>{let N=1,_=`field_${N}`,R=`Field ${N}`;for(;n.some(P=>P.name===_);)N++,_=`field_${N}`,R=`Field ${N}`;return{fieldName:_,fieldLabel:R,counter:N}},S=N=>{const{fieldName:_,fieldLabel:R}=x();s({type:N,label:R,name:_},null),v(!1),f("success",`${R} ${T.__("added (will be saved when you click Save Changes)","codeideal-open-fields")}`)},C=N=>{s({...N,parent_id:null},null),f("success",`${N.label} ${T.__("copied to root level","codeideal-open-fields")}`)};return c.jsxs("div",{className:"mb-8",children:[c.jsx("h2",{className:"text-lg font-semibold mb-4",children:T.__("Fields","codeideal-open-fields")}),c.jsx(Ky,{id:"root-fields",sensors:E,collisionDetection:Ey,onDragEnd:j,children:c.jsx(Zy,{items:b.map(N=>N.id),strategy:qy,children:b.map(N=>c.jsx(y0,{field:N,allFields:n,depth:0,maxDepth:3},N.id))})}),c.jsxs(Od,{open:h,onOpenChange:v,children:[c.jsx(fy,{asChild:!0,children:c.jsxs("button",{className:"w-full mt-4 p-6 border-2 border-dashed border-gray-300 rounded-lg hover:border-gray-400 hover:bg-gray-50 transition-colors flex items-center justify-center gap-2 text-gray-600",children:[c.jsx(Er,{className:"h-5 w-5"}),c.jsx("span",{children:T.__("Add Field","codeideal-open-fields")})]})}),c.jsxs(Md,{children:[c.jsxs(Id,{children:[c.jsx(Fd,{children:T.__("Select Field Type","codeideal-open-fields")}),c.jsx(zd,{children:T.__("Choose the type of field you want to add","codeideal-open-fields")})]}),c.jsx(xl,{className:"h-96 px-6",children:Object.entries(d).map(([N,_])=>c.jsxs("div",{className:"mb-6",children:[c.jsx("h3",{className:"text-sm font-semibold text-gray-700 mb-2 capitalize",children:N}),c.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2",children:_.map(R=>c.jsxs("button",{onClick:()=>S(R.type),className:"p-3 border rounded-lg hover:border-blue-500 hover:bg-blue-50 transition-colors text-start",children:[c.jsx("div",{className:"font-medium text-sm",children:R.label}),R.description&&c.jsx("div",{className:"text-xs text-gray-500 mt-1",children:R.description})]},R.type))})]},N))}),c.jsx(Ld,{children:c.jsx(py,{asChild:!0,children:c.jsx(ft,{variant:"outline",children:T.__("Cancel","codeideal-open-fields")})})})]})]}),c.jsxs("button",{onClick:()=>m(!0),className:"w-full mt-2 p-3 border border-gray-300 rounded-lg hover:border-blue-400 hover:bg-blue-50 transition-colors flex items-center justify-center gap-2 text-gray-600",children:[c.jsx(os,{className:"h-4 w-4"}),c.jsx("span",{children:T.__("Copy from other field","codeideal-open-fields")})]}),e&&c.jsx(v0,{open:w,onOpenChange:m,targetParentId:null,currentFieldsetId:e.id,onCopy:C})]})}function ST({isActive:e,slug:n,description:o,slugError:s,onActiveChange:a,onSlugChange:l,onDescriptionChange:f}){return c.jsxs("div",{className:"mb-8",children:[c.jsx("h2",{className:"text-lg font-semibold mb-4",children:T.__("Settings","codeideal-open-fields")}),c.jsx(Io,{className:"p-4",children:c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex items-center justify-between pb-4 border-b",children:[c.jsxs("div",{children:[c.jsx(Be,{htmlFor:"active",children:T.__("Active","codeideal-open-fields")}),c.jsx("p",{className:"text-xs text-gray-500",children:T.__("Enable or disable this fieldset","codeideal-open-fields")})]}),c.jsx(Yt,{id:"active",checked:e,onCheckedChange:a})]}),c.jsxs("div",{children:[c.jsx(Be,{htmlFor:"slug",children:T.__("Fieldset Slug","codeideal-open-fields")}),c.jsx(fn,{id:"slug",value:n,onChange:d=>l(d.target.value),placeholder:"fieldset_slug",className:s?"border-red-500":""}),s?c.jsx("p",{className:"text-xs text-red-500 mt-1",children:s}):c.jsx("p",{className:"text-xs text-gray-500 mt-1",children:T.__("Used for programmatic access. Must be unique.","codeideal-open-fields")})]}),c.jsxs("div",{children:[c.jsx(Be,{htmlFor:"description",children:T.__("Description","codeideal-open-fields")}),c.jsx(fn,{id:"description",value:o,onChange:d=>f(d.target.value),placeholder:T.__("Optional description for this fieldset","codeideal-open-fields")})]})]})})]})}function CT({locationGroups:e,onLocationGroupsChange:n}){const[o,s]=g.useState([]),[a,l]=g.useState([]),[f,d]=g.useState([]);g.useEffect(()=>{var S,C,N,_,R;const E=(S=window.cofldAdmin)==null?void 0:S.pageTemplates;if(E&&E.length>0)s(E);else{const P=((C=window.cofldAdmin)==null?void 0:C.restUrl)||"/wp-json/codeideal-open-fields/v1",A=((N=window.cofldAdmin)==null?void 0:N.nonce)||"";fetch(`${P}/locations/types`,{headers:{"X-WP-Nonce":A}}).then(D=>D.json()).then(D=>{const F=D.find(H=>H.key==="page_template");F!=null&&F.options&&s(F.options.map(H=>({name:H.value,label:H.label})));const V=D.find(H=>H.key==="post_category");V!=null&&V.options&&l(V.options.map(H=>({name:H.value,label:H.label})));const Y=D.find(H=>H.key==="post_format");Y!=null&&Y.options&&d(Y.options.map(H=>({name:H.value,label:H.label})))}).catch(()=>{s([{name:"default",label:"Default Template"}])})}const j=(_=window.cofldAdmin)==null?void 0:_.categories;j&&j.length>0&&l(j);const x=(R=window.cofldAdmin)==null?void 0:R.postFormats;x&&x.length>0&&d(x)},[]);const h=(E,j,x,S)=>{const C=[...e],N=C[E];if(N&&N.rules[j]){const _=N.rules[j];x==="type"?(_.type=S,_.value=""):x==="operator"?_.operator=S:x==="value"&&(_.value=S),n(C)}},v=E=>{const j=[...e],x=j[E];x&&(x.rules.push({type:"",operator:"==",value:""}),n(j))},w=(E,j)=>{const x=[...e],S=x[E];S&&(S.rules.length>1?S.rules=S.rules.filter((C,N)=>N!==j):x.splice(E,1)),x.length===0&&x.push({id:Date.now().toString(),rules:[{type:"",operator:"==",value:""}]}),n(x)},m=()=>{n([...e,{id:Date.now().toString(),rules:[{type:"",operator:"==",value:""}]}])},b=E=>{var j,x,S;switch(E){case"post_type":return((j=window.cofldAdmin)==null?void 0:j.postTypes)||[{name:"post",label:"Post"},{name:"page",label:"Page"}];case"taxonomy":return((x=window.cofldAdmin)==null?void 0:x.taxonomies)||[{name:"category",label:"Category"},{name:"post_tag",label:"Tag"}];case"user_role":return((S=window.cofldAdmin)==null?void 0:S.userRoles)||[{name:"administrator",label:"Administrator"},{name:"editor",label:"Editor"},{name:"author",label:"Author"}];case"page_template":return o.length>0?o:[{name:"default",label:"Default Template"}];case"post_category":return a;case"post_format":return f;default:return[]}};return c.jsxs("div",{className:"mb-8",children:[c.jsx("h2",{className:"text-lg font-semibold mb-4",children:T.__("Location Rules","codeideal-open-fields")}),c.jsxs(Io,{className:"p-4",children:[c.jsx("p",{className:"text-sm text-gray-600 mb-4",children:T.__("Show this fieldset when the following rules match","codeideal-open-fields")}),e.map((E,j)=>c.jsxs("div",{className:"mb-4",children:[j>0&&c.jsxs("div",{className:"flex items-center gap-2 my-3",children:[c.jsx("div",{className:"flex-1 border-t"}),c.jsx("span",{className:"text-xs font-medium text-blue-600 bg-blue-50 px-2 py-1 rounded",children:"OR"}),c.jsx("div",{className:"flex-1 border-t"})]}),c.jsxs("div",{className:"bg-gray-50 p-3 rounded-lg space-y-2",children:[E.rules.map((x,S)=>c.jsxs("div",{children:[S>0&&c.jsx("div",{className:"text-xs font-medium text-gray-500 text-center my-2",children:"AND"}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs(Kt,{value:x.type,onValueChange:C=>h(j,S,"type",C),children:[c.jsx(Lt,{className:"w-[160px]",children:c.jsx(Xt,{placeholder:T.__("Select type","codeideal-open-fields")})}),c.jsxs(Ft,{children:[c.jsx(He,{value:"post_type",children:T.__("Post Type","codeideal-open-fields")}),c.jsx(He,{value:"page_template",children:T.__("Page Template","codeideal-open-fields")}),c.jsx(He,{value:"post_category",children:T.__("Post Category","codeideal-open-fields")}),c.jsx(He,{value:"post_format",children:T.__("Post Format","codeideal-open-fields")}),c.jsx(He,{value:"taxonomy",children:T.__("Taxonomy","codeideal-open-fields")}),c.jsx(He,{value:"user_role",children:T.__("User Role","codeideal-open-fields")})]})]}),c.jsxs(Kt,{value:x.operator,onValueChange:C=>h(j,S,"operator",C),children:[c.jsx(Lt,{className:"w-[130px]",children:c.jsx(Xt,{})}),c.jsxs(Ft,{children:[c.jsx(He,{value:"==",children:T.__("is equal to","codeideal-open-fields")}),c.jsx(He,{value:"!=",children:T.__("is not equal to","codeideal-open-fields")})]})]}),c.jsxs(Kt,{value:x.value,onValueChange:C=>h(j,S,"value",C),children:[c.jsx(Lt,{className:"flex-1",children:c.jsx(Xt,{placeholder:T.__("Select value","codeideal-open-fields")})}),c.jsx(Ft,{children:b(x.type).map(C=>c.jsx(He,{value:C.name,children:C.label},C.name))})]}),(E.rules.length>1||e.length>1)&&c.jsx("button",{type:"button",onClick:()=>w(j,S),className:"p-1 text-gray-400 hover:text-red-600",children:c.jsx(si,{className:"h-4 w-4"})})]})]},S)),c.jsxs(ft,{type:"button",variant:"ghost",size:"sm",onClick:()=>v(j),className:"mt-2",children:[c.jsx(Er,{className:"h-3 w-3 me-1"}),T.__("Add AND rule","codeideal-open-fields")]})]})]},E.id)),c.jsxs(ft,{type:"button",variant:"outline",size:"sm",onClick:m,children:[c.jsx(Er,{className:"h-3 w-3 me-1"}),T.__("Add OR rule group","codeideal-open-fields")]})]})]})}function w0({fieldsetId:e,isNew:n}){const o=it(G=>G.currentFieldset),s=it(G=>G.fieldsets),a=it(G=>G.fetchFieldset),l=it(G=>G.fetchFieldsets),f=it(G=>G.createFieldset),d=it(G=>G.updateFieldset),h=it(G=>G.unsavedChanges),v=it(G=>G.setUnsavedChanges),w=it(G=>G.saveAllChanges),{showToast:m}=bi(),[b,E]=g.useState(""),[j,x]=g.useState(""),[S,C]=g.useState(""),[N,_]=g.useState(!0),[R,P]=g.useState([{id:"1",rules:[{type:"",operator:"==",value:""}]}]),[A,D]=g.useState(!1),[F,V]=g.useState(!1),[Y,H]=g.useState(!1),[te,X]=g.useState(null),q=g.useMemo(()=>j.trim()?s.some(fe=>fe.field_key===j&&fe.id!==(o==null?void 0:o.id))?T.__("This slug is already used by another fieldset","codeideal-open-fields"):/^[a-z0-9_]+$/.test(j)?null:T.__("Slug can only contain lowercase letters, numbers, and underscores","codeideal-open-fields"):T.__("Slug is required","codeideal-open-fields"),[j,s,o==null?void 0:o.id]);g.useEffect(()=>{const G=fe=>{if(h)return fe.preventDefault(),fe.returnValue="",""};return window.addEventListener("beforeunload",G),()=>window.removeEventListener("beforeunload",G)},[h]);const ce=g.useCallback(()=>{var me;const fe=`${((me=window.cofldAdmin)==null?void 0:me.adminUrl)||"/wp-admin/"}admin.php?page=codeideal-open-fields`;h?(X(fe),H(!0)):window.location.href=fe},[h]),ee=()=>{te&&(v(!1),window.location.href=te)},Q=()=>{H(!1),X(null)};g.useEffect(()=>{(async()=>{if(await l(),e&&!n)await a(e);else if(n)try{const fe=await f({title:T.__("New Fieldset","codeideal-open-fields")});window.location.href=`admin.php?page=codeideal-open-fields&action=edit&id=${fe.id}`}catch{m("error",T.__("Failed to create fieldset","codeideal-open-fields"))}V(!0)})()},[e,n,a,l,f,m]),g.useEffect(()=>{var G;o&&(E(o.title),x(o.field_key||o.title.toLowerCase().replace(/[^a-z0-9]+/g,"_")),C(o.description||""),_(o.is_active!==!1),P(((G=o.settings)==null?void 0:G.location_groups)||[{id:"1",rules:[{type:"",operator:"==",value:""}]}]))},[o==null?void 0:o.id]);const B=G=>{E(G),v(!0)},Z=G=>{x(G.toLowerCase().replace(/[^a-z0-9_]/g,"_")),v(!0)},ne=G=>{C(G),v(!0)},M=G=>{_(G),v(!0)},K=G=>{P(G),v(!0)},re=async()=>{if(o){if(!b.trim()){m("error",T.__("Fieldset title is required","codeideal-open-fields"));return}if(q){m("error",q);return}D(!0);try{await d(o.id,{title:b,field_key:j,description:S,is_active:N,settings:{location_groups:R}}),await w(),v(!1),m("success",T.__("Fieldset saved successfully","codeideal-open-fields"))}catch(G){console.error("Save error:",G),m("error",T.__("Failed to save fieldset","codeideal-open-fields"))}finally{D(!1)}}};return F?o?c.jsxs("div",{className:"flex flex-col",children:[c.jsx("div",{className:"sticky top-[42px] md:top-[32px] z-[30] bg-background border-b px-4 sm:px-6 py-4",children:c.jsxs("div",{className:"flex items-center justify-between gap-4",children:[c.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[c.jsx(ft,{variant:"ghost",size:"icon",onClick:ce,className:"flex-shrink-0",title:T.__("Back to Field Groups","codeideal-open-fields"),children:c.jsx(KS,{className:"h-4 w-4"})}),c.jsx(fn,{value:b,onChange:G=>B(G.target.value),placeholder:T.__("Enter fieldset title","codeideal-open-fields"),className:"text-lg sm:text-2xl font-bold border-none shadow-none focus-visible:ring-0 px-0 flex-1 min-w-0"})]}),c.jsx("div",{className:"flex items-center gap-3 flex-shrink-0",children:c.jsx(ft,{onClick:re,disabled:A||!h,children:A?T.__("Saving...","codeideal-open-fields"):T.__("Save Changes","codeideal-open-fields")})})]})}),c.jsxs("div",{className:"flex-auto px-4 sm:px-6 py-6 max-w-5xl w-full mx-auto",children:[c.jsx(bT,{}),c.jsx(ST,{isActive:N,slug:j,description:S,slugError:q,onActiveChange:M,onSlugChange:Z,onDescriptionChange:ne}),c.jsx(CT,{locationGroups:R,onLocationGroupsChange:K})]}),c.jsx(Ju,{open:Y,onOpenChange:H,children:c.jsxs(qa,{children:[c.jsxs(Qa,{children:[c.jsx(Za,{children:T.__("Unsaved Changes","codeideal-open-fields")}),c.jsx(el,{children:T.__("You have unsaved changes. Are you sure you want to leave this page? Your changes will be lost.","codeideal-open-fields")})]}),c.jsxs(Ja,{children:[c.jsx(nl,{onClick:Q,children:T.__("Stay on Page","codeideal-open-fields")}),c.jsx(tl,{onClick:ee,children:T.__("Leave Page","codeideal-open-fields")})]})]})})]}):c.jsx("div",{className:"flex items-center justify-center h-64",children:c.jsx("p",{className:"text-gray-500",children:T.__("Fieldset not found","codeideal-open-fields")})}):c.jsx("div",{className:"flex items-center justify-center h-64",children:c.jsx("p",{className:"text-gray-500",children:T.__("Loading...","codeideal-open-fields")})})}function _T(){const[e,n]=g.useState(!1),[o,s]=g.useState(!1),[a,l]=g.useState(null),[f,d]=g.useState(!1),h=async()=>{n(!0);try{const w=await Tn.getAll(),b={version:"1.0.0",plugin:"openfields",fieldsets:await Promise.all(w.map(S=>Tn.export(S.id))),exported_at:new Date().toISOString()},E=new Blob([JSON.stringify(b,null,2)],{type:"application/json"}),j=URL.createObjectURL(E),x=document.createElement("a");x.href=j,x.download=`openfields-export-${Date.now()}.json`,document.body.appendChild(x),x.click(),document.body.removeChild(x),URL.revokeObjectURL(j)}catch(w){console.error("Export failed:",w)}finally{n(!1)}},v=async w=>{var b;const m=(b=w.target.files)==null?void 0:b[0];if(m){s(!0),l(null),d(!1);try{const E=await m.text(),j=JSON.parse(E);if(Array.isArray(j.fieldsets)){let x=0,S=0;for(const N of j.fieldsets)try{await Tn.import(N),x++}catch(_){console.error("Failed to import fieldset:",_),S++}let C=T.sprintf(T.__("Successfully imported %d field group(s).","codeideal-open-fields"),x);S>0&&(C+=" "+T.sprintf(T.__("(%d failed)","codeideal-open-fields"),S)),l(C)}else await Tn.import(j),l(T.__("Successfully imported 1 field group.","codeideal-open-fields"))}catch(E){d(!0),l(T.sprintf(T.__("Import failed: %s","codeideal-open-fields"),E instanceof Error?E.message:T.__("Unknown error","codeideal-open-fields")))}finally{s(!1),w.target.value=""}}};return c.jsx("div",{className:"space-y-6",children:c.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[c.jsxs(Io,{children:[c.jsxs(Fl,{children:[c.jsxs(zl,{className:"flex items-center gap-2",children:[c.jsx(mu,{className:"h-5 w-5"}),T.__("Export","codeideal-open-fields")]}),c.jsx($l,{children:T.__("Export all field groups as a JSON file","codeideal-open-fields")})]}),c.jsxs(Bl,{children:[c.jsx("p",{className:"text-sm text-gray-600 mb-4",children:T.__("Download all your field groups, including fields and settings, as a portable JSON file that can be imported into another site.","codeideal-open-fields")}),c.jsx(ft,{onClick:h,disabled:e,children:e?c.jsxs(c.Fragment,{children:[c.jsx(gu,{className:"h-4 w-4 me-2 animate-spin"}),T.__("Exporting...","codeideal-open-fields")]}):c.jsxs(c.Fragment,{children:[c.jsx(mu,{className:"h-4 w-4 me-2"}),T.__("Export Field Groups","codeideal-open-fields")]})})]})]}),c.jsxs(Io,{children:[c.jsxs(Fl,{children:[c.jsxs(zl,{className:"flex items-center gap-2",children:[c.jsx(Mh,{className:"h-5 w-5"}),T.__("Import","codeideal-open-fields")]}),c.jsx($l,{children:T.__("Import field groups from a JSON file","codeideal-open-fields")})]}),c.jsxs(Bl,{children:[c.jsx("p",{className:"text-sm text-gray-600 mb-4",children:T.__("Upload a previously exported JSON file to import field groups. Existing groups with the same key will be skipped.","codeideal-open-fields")}),c.jsxs("div",{children:[c.jsx("input",{type:"file",accept:".json",onChange:v,disabled:o,className:"hidden",id:"import-file"}),c.jsx(ft,{asChild:!0,disabled:o,children:c.jsx("label",{htmlFor:"import-file",className:"cursor-pointer",children:o?c.jsxs(c.Fragment,{children:[c.jsx(gu,{className:"h-4 w-4 me-2 animate-spin"}),T.__("Importing...","codeideal-open-fields")]}):c.jsxs(c.Fragment,{children:[c.jsx(Mh,{className:"h-4 w-4 me-2"}),T.__("Choose File","codeideal-open-fields")]})})})]}),a&&c.jsx("p",{className:`mt-4 text-sm ${f?"text-red-600":"text-green-600"}`,children:a})]})]})]})})}function ET(){const[e,n]=g.useState(null),[o,s]=g.useState(!0),[a,l]=g.useState(!1),[f,d]=g.useState(!1);g.useEffect(()=>{h()},[]);const h=async()=>{try{s(!0);const m=await Mv.get();n(m)}catch(m){console.error("Failed to load settings:",m),Po.error(T.__("Failed to load settings","codeideal-open-fields"))}finally{s(!1)}},v=async()=>{if(e)try{l(!0),await Mv.update({delete_data:e.delete_data,enable_rest_api:e.enable_rest_api,show_admin_column:e.show_admin_column}),d(!1),Po.success(T.__("Settings saved successfully","codeideal-open-fields"))}catch(m){console.error("Failed to save settings:",m),Po.error(T.__("Failed to save settings","codeideal-open-fields"))}finally{l(!1)}},w=(m,b)=>{e&&(n({...e,[m]:b}),d(!0))};return o?c.jsx("div",{className:"flex items-center justify-center py-12",children:c.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}):e?c.jsxs("div",{className:"space-y-6",children:[c.jsxs(Io,{children:[c.jsxs(Fl,{children:[c.jsx(zl,{children:T.__("Data Management","codeideal-open-fields")}),c.jsx($l,{children:T.__("Control how OpenFields handles your data","codeideal-open-fields")})]}),c.jsx(Bl,{className:"space-y-6",children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"space-y-0.5",children:[c.jsx(Be,{htmlFor:"preserve-data",className:"text-base font-medium",children:T.__("Keep Plugin Data After Uninstall","codeideal-open-fields")}),c.jsx("p",{className:"text-sm text-muted-foreground",children:T.__("When enabled, your field groups and saved data will be preserved even if you uninstall the plugin. Disable this only if you want to completely remove all OpenFields data.","codeideal-open-fields")})]}),c.jsx(Yt,{id:"preserve-data",checked:!e.delete_data,onCheckedChange:m=>w("delete_data",!m)})]})})]}),f&&c.jsx("div",{className:"flex justify-end",children:c.jsx(ft,{onClick:v,disabled:a,children:a?c.jsxs(c.Fragment,{children:[c.jsx(gu,{className:"h-4 w-4 me-2 animate-spin"}),T.__("Saving...","codeideal-open-fields")]}):c.jsxs(c.Fragment,{children:[c.jsx(i1,{className:"h-4 w-4 me-2"}),T.__("Save Settings","codeideal-open-fields")]})})})]}):c.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4 text-red-700",children:T.__("Failed to load settings","codeideal-open-fields")})}function NT({field:e,onSettingsChange:n}){var o,s,a;return c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm text-gray-600 mb-1",children:T.__("Placeholder","codeideal-open-fields")}),c.jsx("input",{type:"text",value:((o=e.settings)==null?void 0:o.placeholder)||"",onChange:l=>n({placeholder:l.target.value}),className:"w-full px-3 py-2 border rounded-md text-sm",placeholder:T.__("Enter placeholder text","codeideal-open-fields")})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm text-gray-600 mb-1",children:T.__("Max Length","codeideal-open-fields")}),c.jsx("input",{type:"number",value:((s=e.settings)==null?void 0:s.max)||"",onChange:l=>n({max:l.target.value?parseInt(l.target.value,10):void 0}),className:"w-full px-3 py-2 border rounded-md text-sm",placeholder:T.__("0 = unlimited","codeideal-open-fields")})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm text-gray-600 mb-1",children:T.__("Default Value","codeideal-open-fields")}),c.jsx("input",{type:"text",value:((a=e.settings)==null?void 0:a.default_value)||"",onChange:l=>n({default_value:l.target.value}),className:"w-full px-3 py-2 border rounded-md text-sm",placeholder:T.__("Default text","codeideal-open-fields")})]})]})}function kT({field:e,onSettingsChange:n}){var o,s,a;return c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm text-gray-600 mb-1",children:T.__("Placeholder","codeideal-open-fields")}),c.jsx("input",{type:"text",value:((o=e.settings)==null?void 0:o.placeholder)||"",onChange:l=>n({placeholder:l.target.value}),className:"w-full px-3 py-2 border rounded-md text-sm",placeholder:T.__("Enter placeholder text","codeideal-open-fields")})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm text-gray-600 mb-1",children:T.__("Rows","codeideal-open-fields")}),c.jsx("input",{type:"number",value:((s=e.settings)==null?void 0:s.rows)||4,onChange:l=>n({rows:parseInt(l.target.value,10)||4}),className:"w-full px-3 py-2 border rounded-md text-sm",min:1})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm text-gray-600 mb-1",children:T.__("Default Value","codeideal-open-fields")}),c.jsx("textarea",{value:((a=e.settings)==null?void 0:a.default_value)||"",onChange:l=>n({default_value:l.target.value}),className:"w-full px-3 py-2 border rounded-md text-sm",rows:3,placeholder:T.__("Default text","codeideal-open-fields")})]})]})}function jT({field:e,onSettingsChange:n}){var o,s,a,l,f;return c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm text-gray-600 mb-1",children:T.__("Min","codeideal-open-fields")}),c.jsx("input",{type:"number",value:((o=e.settings)==null?void 0:o.min)??"",onChange:d=>n({min:d.target.value?parseFloat(d.target.value):void 0}),className:"w-full px-3 py-2 border rounded-md text-sm"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm text-gray-600 mb-1",children:T.__("Max","codeideal-open-fields")}),c.jsx("input",{type:"number",value:((s=e.settings)==null?void 0:s.max)??"",onChange:d=>n({max:d.target.value?parseFloat(d.target.value):void 0}),className:"w-full px-3 py-2 border rounded-md text-sm"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm text-gray-600 mb-1",children:T.__("Step","codeideal-open-fields")}),c.jsx("input",{type:"number",value:((a=e.settings)==null?void 0:a.step)||1,onChange:d=>n({step:parseFloat(d.target.value)||1}),className:"w-full px-3 py-2 border rounded-md text-sm"})]})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm text-gray-600 mb-1",children:T.__("Placeholder","codeideal-open-fields")}),c.jsx("input",{type:"text",value:((l=e.settings)==null?void 0:l.placeholder)||"",onChange:d=>n({placeholder:d.target.value}),className:"w-full px-3 py-2 border rounded-md text-sm",placeholder:T.__("Enter placeholder text","codeideal-open-fields")})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm text-gray-600 mb-1",children:T.__("Default Value","codeideal-open-fields")}),c.jsx("input",{type:"number",value:((f=e.settings)==null?void 0:f.default_value)??"",onChange:d=>n({default_value:d.target.value?parseFloat(d.target.value):void 0}),className:"w-full px-3 py-2 border rounded-md text-sm"})]})]})}function xf({field:e,onSettingsChange:n}){var h,v,w,m,b,E;const o=((h=e.settings)==null?void 0:h.choices)||[],s=e.type==="select",a=e.type==="checkbox",l=()=>{n({choices:[...o,{value:"",label:""}]})},f=(j,x,S)=>{const C=[...o],N=C[j];N&&(C[j]={value:x==="value"?S:N.value,label:x==="label"?S:N.label},n({choices:C}))},d=j=>{const x=o.filter((S,C)=>C!==j);n({choices:x})};return c.jsxs("div",{className:"space-y-4 border-t pt-4",children:[c.jsx("h4",{className:"text-sm font-medium",children:T.__("Field Type Settings","codeideal-open-fields")}),c.jsxs("div",{className:"space-y-3",children:[s&&c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx(Be,{htmlFor:`multiple-${e.id}`,className:"text-sm font-normal",children:T.__("Allow Multiple Selections","codeideal-open-fields")}),c.jsx(Yt,{id:`multiple-${e.id}`,checked:((v=e.settings)==null?void 0:v.multiple)||!1,onCheckedChange:j=>n({multiple:j})})]}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx(Be,{htmlFor:`allow-null-${e.id}`,className:"text-sm font-normal",children:T.__("Allow Empty Value","codeideal-open-fields")}),c.jsx(Yt,{id:`allow-null-${e.id}`,checked:((w=e.settings)==null?void 0:w.allow_null)||!1,onCheckedChange:j=>n({allow_null:j})})]}),a&&c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx(Be,{htmlFor:`toggle-all-${e.id}`,className:"text-sm font-normal",children:T.__("Show Toggle All","codeideal-open-fields")}),c.jsx(Yt,{id:`toggle-all-${e.id}`,checked:((m=e.settings)==null?void 0:m.toggle_all)||!1,onCheckedChange:j=>n({toggle_all:j})})]})]}),!s&&c.jsxs("div",{className:"space-y-2",children:[c.jsx(Be,{children:T.__("Layout","codeideal-open-fields")}),c.jsxs(Kt,{value:((b=e.settings)==null?void 0:b.layout)||"vertical",onValueChange:j=>n({layout:j}),children:[c.jsx(Lt,{children:c.jsx(Xt,{placeholder:"Select layout"})}),c.jsxs(Ft,{children:[c.jsx(He,{value:"vertical",children:T.__("Vertical","codeideal-open-fields")}),c.jsx(He,{value:"horizontal",children:T.__("Horizontal","codeideal-open-fields")})]})]})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(Be,{children:T.__("Choices","codeideal-open-fields")}),c.jsxs("div",{className:"space-y-2 bg-gray-50 p-3 rounded-lg",children:[o.length===0&&c.jsx("p",{className:"text-sm text-gray-500 text-center py-2",children:T.__("No choices added yet","codeideal-open-fields")}),o.map((j,x)=>c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(fn,{value:j.value,onChange:S=>f(x,"value",S.target.value),placeholder:"value",className:"flex-1"}),c.jsx(fn,{value:j.label,onChange:S=>f(x,"label",S.target.value),placeholder:"label",className:"flex-1"}),c.jsx(ft,{type:"button",variant:"ghost",size:"icon",onClick:()=>d(x),className:"h-9 w-9 text-gray-400 hover:text-red-600",children:c.jsx(si,{className:"h-4 w-4"})})]},x)),c.jsxs(ft,{type:"button",variant:"outline",size:"sm",onClick:l,className:"w-full mt-2",children:[c.jsx(Er,{className:"h-3 w-3 me-1"}),T.__("Add Choice","codeideal-open-fields")]})]})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(Be,{htmlFor:`return-format-${e.id}`,children:T.__("Return Format","codeideal-open-fields")}),c.jsxs(Kt,{value:((E=e.settings)==null?void 0:E.return_format)||"value",onValueChange:j=>n({return_format:j}),children:[c.jsx(Lt,{id:`return-format-${e.id}`,children:c.jsx(Xt,{placeholder:"Select format"})}),c.jsxs(Ft,{children:[c.jsx(He,{value:"value",children:T.__("Value","codeideal-open-fields")}),c.jsx(He,{value:"label",children:T.__("Label","codeideal-open-fields")}),c.jsx(He,{value:"array",children:T.__("Both (Array)","codeideal-open-fields")})]})]})]})]})}function RT({field:e,onSettingsChange:n}){var o,s,a,l;return c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm text-gray-600 mb-1",children:T.__("On Text","codeideal-open-fields")}),c.jsx("input",{type:"text",value:((o=e.settings)==null?void 0:o.on_text)||"Yes",onChange:f=>n({on_text:f.target.value}),className:"w-full px-3 py-2 border rounded-md text-sm",placeholder:T.__("Yes","codeideal-open-fields")})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm text-gray-600 mb-1",children:T.__("Off Text","codeideal-open-fields")}),c.jsx("input",{type:"text",value:((s=e.settings)==null?void 0:s.off_text)||"No",onChange:f=>n({off_text:f.target.value}),className:"w-full px-3 py-2 border rounded-md text-sm",placeholder:T.__("No","codeideal-open-fields")})]})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm text-gray-600 mb-1",children:T.__("Default Value","codeideal-open-fields")}),c.jsxs("div",{className:"flex gap-4",children:[c.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[c.jsx("input",{type:"radio",name:`default-${e.id}`,checked:((a=e.settings)==null?void 0:a.default_value)!==!0,onChange:()=>n({default_value:!1})}),T.__("Off","codeideal-open-fields")]}),c.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[c.jsx("input",{type:"radio",name:`default-${e.id}`,checked:((l=e.settings)==null?void 0:l.default_value)===!0,onChange:()=>n({default_value:!0})}),T.__("On","codeideal-open-fields")]})]})]})]})}function TT({field:e,onSettingsChange:n}){const o=e.settings||{},s=typeof o.min=="number"?o.min:0,a=typeof o.max=="number"?o.max:0,l=typeof o.layout=="string"?o.layout:"table",f=typeof o.button_label=="string"?o.button_label:"Add Row",d=(h,v)=>{n({...o,[h]:v})};return c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx(Be,{htmlFor:"repeater-min",children:T.__("Minimum Rows","codeideal-open-fields")}),c.jsx(fn,{id:"repeater-min",type:"number",min:0,value:s,onChange:h=>d("min",parseInt(h.target.value,10)||0),placeholder:"0"}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Minimum number of rows required"})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(Be,{htmlFor:"repeater-max",children:T.__("Maximum Rows","codeideal-open-fields")}),c.jsx(fn,{id:"repeater-max",type:"number",min:0,value:a,onChange:h=>d("max",parseInt(h.target.value,10)||0),placeholder:"0 (unlimited)"}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Maximum allowed (0 = unlimited)"})]})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(Be,{htmlFor:"repeater-layout",children:T.__("Layout","codeideal-open-fields")}),c.jsxs(Kt,{value:l,onValueChange:h=>d("layout",h),children:[c.jsx(Lt,{id:"repeater-layout",children:c.jsx(Xt,{placeholder:"Select layout"})}),c.jsxs(Ft,{children:[c.jsx(He,{value:"table",children:T.__("Table","codeideal-open-fields")}),c.jsx(He,{value:"block",children:T.__("Block","codeideal-open-fields")}),c.jsx(He,{value:"row",children:T.__("Row","codeideal-open-fields")})]})]}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"How repeater rows should be displayed"})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(Be,{htmlFor:"repeater-button",children:T.__("Button Label","codeideal-open-fields")}),c.jsx(fn,{id:"repeater-button",type:"text",value:f,onChange:h=>d("button_label",h.target.value),placeholder:T.__("Add Row","codeideal-open-fields")}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Text displayed on the add row button"})]}),c.jsx("div",{className:"rounded-md bg-muted p-3",children:c.jsxs("p",{className:"text-sm text-muted-foreground",children:[c.jsx("strong",{children:T.__("Sub-fields:","codeideal-open-fields")}),' Add sub-fields by clicking the "Add Field" button inside this repeater in the field list above. Sub-fields will be repeated for each row.']})})]})}const PT=()=>{var e,n;return{apiUrl:((e=window.cofldAdmin)==null?void 0:e.restUrl)||"/wp-json/openfields/v1",nonce:((n=window.cofldAdmin)==null?void 0:n.nonce)||""}};function DT({field:e,onSettingsChange:n}){const o=e.settings||{},[s,a]=g.useState([]),[l,f]=g.useState(!0);g.useEffect(()=>{(async()=>{try{const w=PT(),b=await(await fetch(`${w.apiUrl}/options/post-types`,{headers:{"X-WP-Nonce":w.nonce}})).json();a(b)}catch(w){console.error("Failed to fetch post types:",w)}finally{f(!1)}})()},[]);const d=(v,w)=>{n({...o,[v]:w})},h=Array.isArray(o.post_type)?o.post_type[0]:o.post_type||"post";return c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx(Be,{children:T.__("Post Type","codeideal-open-fields")}),c.jsxs(Kt,{value:h,onValueChange:v=>d("post_type",v),disabled:l,children:[c.jsx(Lt,{children:c.jsx(Xt,{placeholder:l?"Loading...":"Select post type"})}),c.jsx(Ft,{children:s.map(v=>c.jsx(He,{value:v.value,children:v.label},v.value))})]}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Select which post type to search from"})]}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"space-y-0.5",children:[c.jsx(Be,{children:T.__("Select Multiple","codeideal-open-fields")}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Allow selecting multiple posts"})]}),c.jsx(Yt,{checked:o.multiple||!1,onCheckedChange:v=>d("multiple",v)})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(Be,{children:T.__("Return Format","codeideal-open-fields")}),c.jsxs(Kt,{value:o.return_format||"object",onValueChange:v=>d("return_format",v),children:[c.jsx(Lt,{children:c.jsx(Xt,{placeholder:"Select return format"})}),c.jsxs(Ft,{children:[c.jsx(He,{value:"object",children:T.__("Post Object","codeideal-open-fields")}),c.jsx(He,{value:"id",children:T.__("Post ID","codeideal-open-fields")})]})]}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Format of the value returned by get_field()"})]}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"space-y-0.5",children:[c.jsx(Be,{children:T.__("Allow Null","codeideal-open-fields")}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Allow empty value"})]}),c.jsx(Yt,{checked:o.allow_null||!1,onCheckedChange:v=>d("allow_null",v)})]})]})}const AT=()=>{var e,n;return{apiUrl:((e=window.cofldAdmin)==null?void 0:e.restUrl)||"/wp-json/openfields/v1",nonce:((n=window.cofldAdmin)==null?void 0:n.nonce)||""}};function OT({field:e,onSettingsChange:n}){const o=e.settings||{},[s,a]=g.useState([]),[l,f]=g.useState(!0);g.useEffect(()=>{(async()=>{try{const v=AT(),m=await(await fetch(`${v.apiUrl}/options/taxonomies`,{headers:{"X-WP-Nonce":v.nonce}})).json();a(m)}catch(v){console.error("Failed to fetch taxonomies:",v)}finally{f(!1)}})()},[]);const d=(h,v)=>{n({...o,[h]:v})};return c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx(Be,{children:T.__("Taxonomy","codeideal-open-fields")}),c.jsxs(Kt,{value:String(o.taxonomy||"category"),onValueChange:h=>d("taxonomy",h),disabled:l,children:[c.jsx(Lt,{children:c.jsx(Xt,{placeholder:l?"Loading...":"Select taxonomy"})}),c.jsx(Ft,{children:s.map(h=>c.jsx(He,{value:h.value,children:h.label},h.value))})]}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Select which taxonomy to choose terms from"})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(Be,{children:T.__("Appearance","codeideal-open-fields")}),c.jsxs(Kt,{value:o.field_type||"select",onValueChange:h=>d("field_type",h),children:[c.jsx(Lt,{children:c.jsx(Xt,{placeholder:"Select appearance"})}),c.jsxs(Ft,{children:[c.jsx(He,{value:"select",children:T.__("Dropdown","codeideal-open-fields")}),c.jsx(He,{value:"checkbox",children:T.__("Checkbox","codeideal-open-fields")}),c.jsx(He,{value:"radio",children:T.__("Radio Buttons","codeideal-open-fields")})]})]}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"How the field should be displayed"})]}),(o.field_type==="select"||!o.field_type)&&c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"space-y-0.5",children:[c.jsx(Be,{children:T.__("Select Multiple","codeideal-open-fields")}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Allow selecting multiple terms"})]}),c.jsx(Yt,{checked:o.multiple||!1,onCheckedChange:h=>d("multiple",h)})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(Be,{children:T.__("Return Format","codeideal-open-fields")}),c.jsxs(Kt,{value:o.return_format||"id",onValueChange:h=>d("return_format",h),children:[c.jsx(Lt,{children:c.jsx(Xt,{placeholder:"Select return format"})}),c.jsxs(Ft,{children:[c.jsx(He,{value:"id",children:T.__("Term ID","codeideal-open-fields")}),c.jsx(He,{value:"object",children:T.__("Term Object","codeideal-open-fields")})]})]}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Format of the value returned by get_field()"})]}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"space-y-0.5",children:[c.jsx(Be,{children:T.__("Save Terms","codeideal-open-fields")}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Connect selected terms to the post"})]}),c.jsx(Yt,{checked:o.save_terms||!1,onCheckedChange:h=>d("save_terms",h)})]}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"space-y-0.5",children:[c.jsx(Be,{children:T.__("Load Terms","codeideal-open-fields")}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Load value from the post's terms"})]}),c.jsx(Yt,{checked:o.load_terms||!1,onCheckedChange:h=>d("load_terms",h)})]})]})}const MT=()=>{var e,n;return{apiUrl:((e=window.cofldAdmin)==null?void 0:e.restUrl)||"/wp-json/openfields/v1",nonce:((n=window.cofldAdmin)==null?void 0:n.nonce)||""}};function IT({field:e,onSettingsChange:n}){const o=e.settings||{},[s,a]=g.useState([]),[l,f]=g.useState(!0);g.useEffect(()=>{(async()=>{try{const v=MT(),m=await(await fetch(`${v.apiUrl}/options/roles`,{headers:{"X-WP-Nonce":v.nonce}})).json();a(m)}catch(v){console.error("Failed to fetch roles:",v)}finally{f(!1)}})()},[]);const d=(h,v)=>{n({...o,[h]:v==="__all__"?"":v})};return c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx(Be,{children:T.__("Filter by Role","codeideal-open-fields")}),c.jsxs(Kt,{value:String(o.role||"__all__"),onValueChange:h=>d("role",h),disabled:l,children:[c.jsx(Lt,{children:c.jsx(Xt,{placeholder:l?"Loading...":"All Roles"})}),c.jsxs(Ft,{children:[c.jsx(He,{value:"__all__",children:T.__("All Roles","codeideal-open-fields")}),s.map(h=>c.jsx(He,{value:h.value,children:h.label},h.value))]})]}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Filter users by role (leave empty for all)"})]}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"space-y-0.5",children:[c.jsx(Be,{children:T.__("Select Multiple","codeideal-open-fields")}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Allow selecting multiple users"})]}),c.jsx(Yt,{checked:o.multiple||!1,onCheckedChange:h=>d("multiple",h)})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(Be,{children:T.__("Return Format","codeideal-open-fields")}),c.jsxs(Kt,{value:String(o.return_format||"array"),onValueChange:h=>d("return_format",h),children:[c.jsx(Lt,{children:c.jsx(Xt,{placeholder:"Select return format"})}),c.jsxs(Ft,{children:[c.jsx(He,{value:"array",children:T.__("User Array","codeideal-open-fields")}),c.jsx(He,{value:"object",children:T.__("User Object","codeideal-open-fields")}),c.jsx(He,{value:"id",children:T.__("User ID","codeideal-open-fields")})]})]}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Format of the value returned by get_field()"})]}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"space-y-0.5",children:[c.jsx(Be,{children:T.__("Allow Null","codeideal-open-fields")}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Allow empty value"})]}),c.jsx(Yt,{checked:o.allow_null||!1,onCheckedChange:h=>d("allow_null",h)})]})]})}function LT({field:e,onSettingsChange:n}){const o=e.settings||{},s=(a,l)=>{n({...o,[a]:l})};return c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"space-y-0.5",children:[c.jsx(Be,{children:T.__("Show Link Text","codeideal-open-fields")}),c.jsx("p",{className:"text-xs text-muted-foreground",children:T.__("Allow entering custom link text","codeideal-open-fields")})]}),c.jsx(Yt,{checked:o.show_title!==!1,onCheckedChange:a=>s("show_title",a)})]}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"space-y-0.5",children:[c.jsx(Be,{children:T.__("Show Target Option","codeideal-open-fields")}),c.jsx("p",{className:"text-xs text-muted-foreground",children:T.__('Allow selecting "Open in new tab"',"codeideal-open-fields")})]}),c.jsx(Yt,{checked:o.show_target!==!1,onCheckedChange:a=>s("show_target",a)})]})]})}function FT(){const e=Ze.get("text");e&&Ze.register({...e,SettingsComponent:NT,defaultSettings:{placeholder:"",max_length:void 0}});const n=Ze.get("textarea");n&&Ze.register({...n,SettingsComponent:kT,defaultSettings:{placeholder:"",rows:4}});const o=Ze.get("number");o&&Ze.register({...o,SettingsComponent:jT,defaultSettings:{min:void 0,max:void 0,step:1}});const s=Ze.get("select");s&&Ze.register({...s,SettingsComponent:xf,defaultSettings:{choices:[],multiple:!1,allow_null:!1}});const a=Ze.get("switch");a&&Ze.register({...a,SettingsComponent:RT,defaultSettings:{on_text:"Yes",off_text:"No"}});const l=Ze.get("radio");l&&Ze.register({...l,SettingsComponent:xf,defaultSettings:{choices:[],layout:"vertical"}});const f=Ze.get("checkbox");f&&Ze.register({...f,SettingsComponent:xf,defaultSettings:{choices:[],layout:"vertical"}});const d=Ze.get("repeater");d&&Ze.register({...d,SettingsComponent:TT,hasSubFields:!0,defaultSettings:{min:0,max:0,layout:"table",button_label:"Add Row"}});const h=Ze.get("post_object");h&&Ze.register({...h,SettingsComponent:DT,defaultSettings:{post_type:["post"],multiple:!1,return_format:"object",allow_null:!1}});const v=Ze.get("taxonomy");v&&Ze.register({...v,SettingsComponent:OT,defaultSettings:{taxonomy:["category"],field_type:"select",multiple:!1,return_format:"id",save_terms:!1,load_terms:!1}});const w=Ze.get("user");w&&Ze.register({...w,SettingsComponent:IT,defaultSettings:{role:"",multiple:!1,return_format:"array",allow_null:!1}});const m=Ze.get("link");m&&Ze.register({...m,SettingsComponent:LT,defaultSettings:{show_title:!0,show_target:!0}})}FT();const zT=new BS({defaultOptions:{queries:{staleTime:1e3*60*5,retry:1}}});function $T(){return c.jsxs(HS,{client:zT,children:[c.jsx("div",{className:ke("openfields-admin",""),children:c.jsx(BT,{})}),c.jsx(zC,{}),c.jsx(p_,{position:"bottom-right"})]})}function BT(){const e=new URLSearchParams(window.location.search),n=e.get("page"),o=e.get("action"),s=e.get("id"),a=e.get("tab");return n!=null&&n.startsWith("codeideal-open-fields")?n==="codeideal-open-fields"&&o==="edit"&&s?c.jsx(w0,{fieldsetId:parseInt(s,10)}):n==="codeideal-open-fields"&&o==="new"?c.jsx(w0,{isNew:!0}):c.jsx(UT,{initialTab:a||"fieldsets"}):null}function UT({initialTab:e}){const[n,o]=g.useState(e),s=l=>{o(l);const f=new URL(window.location.href);l==="fieldsets"?f.searchParams.delete("tab"):f.searchParams.set("tab",l),window.history.pushState({},"",f.toString())};g.useEffect(()=>{const l=()=>{const d=new URLSearchParams(window.location.search).get("tab");o(d||"fieldsets")};return window.addEventListener("popstate",l),()=>window.removeEventListener("popstate",l)},[]);const a=[{id:"fieldsets",label:T.__("Field Groups","codeideal-open-fields"),icon:r1},{id:"settings",label:T.__("Settings","codeideal-open-fields"),icon:l1},{id:"tools",label:T.__("Import / Export","codeideal-open-fields"),icon:mu}];return c.jsxs("div",{className:"openfields-main-layout -ms-5 -me-2.5",children:[c.jsxs("header",{className:"bg-white border-b border-gray-200 px-4 sm:px-6 py-4",children:[c.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-xl font-bold text-gray-900",children:T.__("OpenFields","codeideal-open-fields")}),c.jsx("p",{className:"text-sm text-gray-500 mt-0.5",children:T.__("Open Source Custom Fields Management","codeideal-open-fields")})]}),c.jsxs("a",{href:"https://openfields.codeideal.com/support",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-3 sm:px-4 py-2 text-sm font-medium text-rose-600 bg-rose-50 rounded-lg hover:bg-rose-100 transition-colors",children:[c.jsx(t1,{className:"h-4 w-4"}),c.jsx("span",{className:"hidden sm:inline",children:T.__("Support this project","codeideal-open-fields")}),c.jsx("span",{className:"sm:hidden",children:T.__("Support","codeideal-open-fields")}),c.jsx(JS,{className:"h-3 w-3"})]})]}),c.jsx("p",{className:"text-xs text-gray-400 mt-2",children:T.__("This plugin is free and will be free, your support will keep it going.","codeideal-open-fields")})]}),c.jsx("nav",{className:"bg-background border-b border-border px-4 sm:px-6 overflow-x-auto",children:c.jsx("div",{className:"flex flex-wrap gap-1 min-w-max",children:a.map(l=>c.jsxs("button",{onClick:()=>s(l.id),className:ke("flex items-center gap-2 px-4 py-3 text-sm font-medium border-b-2 -mb-px transition-colors",n===l.id?"border-primary text-primary":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"),children:[c.jsx(l.icon,{className:"h-4 w-4"}),l.label]},l.id))})}),c.jsxs("main",{style:{boxSizing:"border-box"},className:"p-4 sm:p-6 bg-secondary min-h-[calc(100vh-200px)]",children:[n==="fieldsets"&&c.jsx(TN,{}),n==="settings"&&c.jsx(ET,{}),n==="tools"&&c.jsx(_T,{})]})]})}const x0=document.getElementById("openfields-admin");x0&&mS.createRoot(x0).render(c.jsx(g.StrictMode,{children:c.jsx($T,{})}))})(wp.i18n); -
codeideal-open-fields/trunk/assets/admin/js/block-editor.js
r3468520 r3468633 22 22 // Group fields by fieldset. 23 23 const groupedFields = availableFields.reduce( ( groups, field ) => { 24 const group = field.fieldset || __( 'Ungrouped', ' openfields' );24 const group = field.fieldset || __( 'Ungrouped', 'codeideal-open-fields' ); 25 25 if ( ! groups[ group ] ) { 26 26 groups[ group ] = []; … … 31 31 32 32 // Create options for SelectControl. 33 const fieldOptions = [ { value: '', label: __( '— Select a field —', ' openfields' ) } ];33 const fieldOptions = [ { value: '', label: __( '— Select a field —', 'codeideal-open-fields' ) } ]; 34 34 Object.keys( groupedFields ).forEach( ( group ) => { 35 35 groupedFields[ group ].forEach( ( field ) => { … … 43 43 // Format options. 44 44 const formatOptions = [ 45 { value: 'text', label: __( 'Plain Text', ' openfields' ) },46 { value: 'html', label: __( 'HTML', ' openfields' ) },47 { value: 'link', label: __( 'Link', ' openfields' ) },48 { value: 'image', label: __( 'Image', ' openfields' ) },45 { value: 'text', label: __( 'Plain Text', 'codeideal-open-fields' ) }, 46 { value: 'html', label: __( 'HTML', 'codeideal-open-fields' ) }, 47 { value: 'link', label: __( 'Link', 'codeideal-open-fields' ) }, 48 { value: 'image', label: __( 'Image', 'codeideal-open-fields' ) }, 49 49 ]; 50 50 … … 54 54 category: 'widgets', 55 55 icon: 'forms', 56 keywords: [ 'field', 'custom', 'meta', 'acf', ' openfields', 'open fields' ],56 keywords: [ 'field', 'custom', 'meta', 'acf', 'codeideal-open-fields', 'open fields' ], 57 57 supports: { 58 58 html: false, … … 85 85 el( 86 86 PanelBody, 87 { title: __( 'Field Settings', ' openfields' ), initialOpen: true },87 { title: __( 'Field Settings', 'codeideal-open-fields' ), initialOpen: true }, 88 88 el( SelectControl, { 89 label: __( 'Field', ' openfields' ),89 label: __( 'Field', 'codeideal-open-fields' ), 90 90 value: fieldName, 91 91 options: fieldOptions, 92 92 onChange: onFieldChange, 93 help: selectedField ? __( 'Type: ', ' openfields' ) + selectedField.type : '',93 help: selectedField ? __( 'Type: ', 'codeideal-open-fields' ) + selectedField.type : '', 94 94 } ), 95 95 el( TextControl, { 96 label: __( 'Label', ' openfields' ),96 label: __( 'Label', 'codeideal-open-fields' ), 97 97 value: fieldLabel, 98 98 onChange: ( value ) => setAttributes( { fieldLabel: value } ), 99 help: __( 'Label shown above the field value.', ' openfields' ),99 help: __( 'Label shown above the field value.', 'codeideal-open-fields' ), 100 100 } ), 101 101 el( ToggleControl, { 102 label: __( 'Show Label', ' openfields' ),102 label: __( 'Show Label', 'codeideal-open-fields' ), 103 103 checked: showLabel, 104 104 onChange: ( value ) => setAttributes( { showLabel: value } ), 105 105 } ), 106 106 el( SelectControl, { 107 label: __( 'Format', ' openfields' ),107 label: __( 'Format', 'codeideal-open-fields' ), 108 108 value: format, 109 109 options: formatOptions, 110 110 onChange: ( value ) => setAttributes( { format: value } ), 111 help: __( 'How to display the field value.', ' openfields' ),111 help: __( 'How to display the field value.', 'codeideal-open-fields' ), 112 112 } ) 113 113 ) … … 124 124 'div', 125 125 { className: 'cofld-block-placeholder cofld-block-empty' }, 126 __( 'No value found for this field.', ' openfields' )126 __( 'No value found for this field.', 'codeideal-open-fields' ) 127 127 ); 128 128 }, … … 132 132 { className: 'cofld-block-placeholder' }, 133 133 el( 'span', { className: 'dashicons dashicons-forms' } ), 134 el( 'p', {}, __( 'Select a field from the sidebar.', ' openfields' ) )134 el( 'p', {}, __( 'Select a field from the sidebar.', 'codeideal-open-fields' ) ) 135 135 ) 136 136 ) -
codeideal-open-fields/trunk/assets/admin/js/relational-fields.js
r3468387 r3468633 10 10 (function() { 11 11 'use strict'; 12 13 const { __ } = wp.i18n; 12 14 13 15 // Debounce utility. … … 96 98 } 97 99 98 resultsContainer.innerHTML = '<div class="cofld-search-loading"> Searching...</div>';100 resultsContainer.innerHTML = '<div class="cofld-search-loading">' + __('Searching...', 'codeideal-open-fields') + '</div>'; 99 101 resultsContainer.classList.add('active'); 100 102 … … 120 122 }); 121 123 } catch (error) { 122 resultsContainer.innerHTML = '<div class="cofld-search-error"> Search failed</div>';124 resultsContainer.innerHTML = '<div class="cofld-search-error">' + __('Search failed', 'codeideal-open-fields') + '</div>'; 123 125 } 124 126 }, 300); … … 166 168 } 167 169 168 resultsContainer.innerHTML = '<div class="cofld-search-loading"> Searching...</div>';170 resultsContainer.innerHTML = '<div class="cofld-search-loading">' + __('Searching...', 'codeideal-open-fields') + '</div>'; 169 171 resultsContainer.classList.add('active'); 170 172 … … 194 196 }); 195 197 } catch (error) { 196 resultsContainer.innerHTML = '<div class="cofld-search-error"> Search failed</div>';198 resultsContainer.innerHTML = '<div class="cofld-search-error">' + __('Search failed', 'codeideal-open-fields') + '</div>'; 197 199 } 198 200 }, 300); … … 217 219 function renderSearchResults(posts, container, onSelect) { 218 220 if (!posts.length) { 219 container.innerHTML = '<div class="cofld-search-empty"> No results found</div>';221 container.innerHTML = '<div class="cofld-search-empty">' + __('No results found', 'codeideal-open-fields') + '</div>'; 220 222 return; 221 223 } … … 242 244 function renderUserResults(users, container, onSelect) { 243 245 if (!users.length) { 244 container.innerHTML = '<div class="cofld-search-empty"> No users found</div>';246 container.innerHTML = '<div class="cofld-search-empty">' + __('No users found', 'codeideal-open-fields') + '</div>'; 245 247 return; 246 248 } … … 290 292 <span class="cofld-item-title">${escapeHtml(post.title)}</span> 291 293 <span class="cofld-item-type">${escapeHtml(post.type_label)}</span> 292 <button type="button" class="cofld-remove-item" title=" Remove">294 <button type="button" class="cofld-remove-item" title="${__('Remove', 'codeideal-open-fields')}"> 293 295 <span class="dashicons dashicons-no-alt"></span> 294 296 </button> … … 328 330 <img src="${escapeHtml(user.avatar)}" alt="" class="cofld-user-avatar" /> 329 331 <span class="cofld-item-title">${escapeHtml(user.display_name)}</span> 330 <button type="button" class="cofld-remove-item" title=" Remove">332 <button type="button" class="cofld-remove-item" title="${__('Remove', 'codeideal-open-fields')}"> 331 333 <span class="dashicons dashicons-no-alt"></span> 332 334 </button> -
codeideal-open-fields/trunk/codeideal-open-fields.php
r3468520 r3468633 4 4 * Plugin URI: https://openfields.codeideal.com 5 5 * Description: Modern custom fields builder for WordPress. Create and manage custom field groups with an intuitive interface. 6 * Version: 0.4. 06 * Version: 0.4.1 7 7 * Requires at least: 6.0 8 8 * Tested up to: 6.9 … … 24 24 25 25 // Define plugin constants. 26 define( 'COFLD_VERSION', '0.4. 0' );26 define( 'COFLD_VERSION', '0.4.1' ); 27 27 define( 'COFLD_PLUGIN_FILE', __FILE__ ); 28 28 define( 'COFLD_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); -
codeideal-open-fields/trunk/includes/admin/class-cofld-meta-box.php
r3468387 r3468633 166 166 'cofld-relational', 167 167 plugin_dir_url( COFLD_PLUGIN_FILE ) . 'assets/admin/js/relational-fields.js', 168 array( 'cofld-fields' ),168 array( 'cofld-fields', 'wp-i18n' ), 169 169 COFLD_VERSION, 170 170 true 171 ); 172 173 // Set script translations for relational fields. 174 wp_set_script_translations( 175 'cofld-relational', 176 'codeideal-open-fields', 177 plugin_dir_path( COFLD_PLUGIN_FILE ) . 'languages' 171 178 ); 172 179 -
codeideal-open-fields/trunk/includes/class-cofld-assets.php
r3468387 r3468633 68 68 'cofld-admin', 69 69 COFLD_PLUGIN_URL . 'assets/admin/js/admin.js', 70 array( ),70 array( 'wp-i18n' ), 71 71 COFLD_VERSION, 72 72 true -
codeideal-open-fields/trunk/includes/class-cofld-block.php
r3468520 r3468633 105 105 array(), 106 106 COFLD_VERSION 107 ); 108 109 // Set script translations for the block editor. 110 wp_set_script_translations( 111 'cofld-block-editor', 112 'codeideal-open-fields', 113 COFLD_PLUGIN_DIR . 'languages' 107 114 ); 108 115 } -
codeideal-open-fields/trunk/includes/class-cofld.php
r3468387 r3468633 106 106 */ 107 107 public function init() { 108 // Load text domain for translations. 109 load_plugin_textdomain( 110 'codeideal-open-fields', 111 false, 112 dirname( plugin_basename( COFLD_PLUGIN_DIR . 'codeideal-open-fields.php' ) ) . '/languages' 113 ); 114 108 115 // Initialize components. 109 116 COFLD_Assets::instance(); -
codeideal-open-fields/trunk/languages/codeideal-open-fields.pot
r3468387 r3468633 1 # OpenFields WordPress Plugin 2 # Copyright (C) OpenFields Contributors 3 # This file is distributed under the GPL-2.0-or-later license. 4 1 # Copyright (C) 2026 Codeideal 2 # This file is distributed under the GPL v2 or later. 5 3 msgid "" 6 4 msgstr "" 7 "Project-Id-Version: OpenFields 1.0.0\n" 8 "Report-Msgid-Bugs-To: https://github.com/novincode/openfields/issues\n" 9 "POT-Creation-Date: 2024-01-01 00:00:00+00:00\n" 5 "Project-Id-Version: Codeideal Open Fields 0.4.1\n" 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/plugin\n" 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 8 "Language-Team: LANGUAGE <LL@li.org>\n" 10 9 "MIME-Version: 1.0\n" 11 10 "Content-Type: text/plain; charset=UTF-8\n" 12 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2026-02-24T12:25:33+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 15 "Language-Team: LANGUAGE <LL@li.org>\n" 14 "X-Generator: WP-CLI 2.12.0\n" 15 "X-Domain: codeideal-open-fields\n" 16 17 #. Plugin Name of the plugin 18 #: codeideal-open-fields.php 19 msgid "Codeideal Open Fields" 20 msgstr "" 21 22 #. Plugin URI of the plugin 23 #: codeideal-open-fields.php 24 msgid "https://openfields.codeideal.com" 25 msgstr "" 26 27 #. Description of the plugin 28 #: codeideal-open-fields.php 29 msgid "Modern custom fields builder for WordPress. Create and manage custom field groups with an intuitive interface." 30 msgstr "" 31 32 #. Author of the plugin 33 #: codeideal-open-fields.php 34 msgid "Codeideal" 35 msgstr "" 36 37 #. Author URI of the plugin 38 #: codeideal-open-fields.php 39 msgid "https://codeideal.com" 40 msgstr "" 41 42 #: includes/admin/class-cofld-admin.php:61 43 #: includes/admin/class-cofld-admin.php:62 44 msgid "Open Fields" 45 msgstr "" 46 47 #: includes/admin/class-cofld-admin.php:73 48 #: includes/admin/class-cofld-admin.php:74 49 #: includes/admin/class-cofld-admin.php:166 50 msgid "Field Groups" 51 msgstr "" 52 53 #: includes/admin/class-cofld-admin.php:93 54 msgid "Loading Open Fields..." 55 msgstr "" 56 57 #: includes/admin/class-cofld-admin.php:167 58 msgid "Settings" 59 msgstr "" 60 61 #: includes/admin/class-cofld-meta-box.php:267 62 msgid "No fields configured." 63 msgstr "" 64 65 #: includes/admin/field-renderers/file.php:99 66 #: includes/admin/field-renderers/link.php:89 67 msgid "Open in new tab" 68 msgstr "" 69 70 #: includes/admin/field-renderers/file.php:115 71 msgid "No file selected" 72 msgstr "" 73 74 #: includes/admin/field-renderers/file.php:124 75 #: includes/class-cofld-assets.php:176 76 msgid "Select File" 77 msgstr "" 78 79 #: includes/admin/field-renderers/file.php:129 80 #: includes/admin/field-renderers/image.php:89 81 msgid "Change" 82 msgstr "" 83 84 #: includes/admin/field-renderers/file.php:134 85 #: includes/admin/field-renderers/gallery.php:79 86 #: includes/admin/field-renderers/image.php:94 87 #: includes/admin/field-renderers/post-object.php:81 88 #: includes/admin/field-renderers/repeater.php:151 89 #: includes/admin/field-renderers/user.php:81 90 msgid "Remove" 91 msgstr "" 92 93 #: includes/admin/field-renderers/gallery.php:83 94 msgid "Drag to reorder" 95 msgstr "" 96 97 #: includes/admin/field-renderers/gallery.php:92 98 #: includes/admin/field-renderers/gallery.php:106 99 msgid "Add Images" 100 msgstr "" 101 102 #: includes/admin/field-renderers/gallery.php:94 103 msgid "Add" 104 msgstr "" 105 106 #: includes/admin/field-renderers/gallery.php:103 107 msgid "No images selected" 108 msgstr "" 109 110 #. translators: %1$d: current count, %2$d: min, %3$d: max 111 #: includes/admin/field-renderers/gallery.php:119 112 #, php-format 113 msgid "%1$d images selected (min: %2$d, max: %3$d)" 114 msgstr "" 115 116 #. translators: %1$d: current count, %2$d: min 117 #: includes/admin/field-renderers/gallery.php:127 118 #, php-format 119 msgid "%1$d images selected (min: %2$d)" 120 msgstr "" 121 122 #. translators: %1$d: current count, %2$d: max 123 #: includes/admin/field-renderers/gallery.php:134 124 #, php-format 125 msgid "%1$d images selected (max: %2$d)" 126 msgstr "" 127 128 #: includes/admin/field-renderers/group.php:42 129 msgid "No sub-fields configured for this group." 130 msgstr "" 131 132 #: includes/admin/field-renderers/image.php:75 133 msgid "No image selected" 134 msgstr "" 135 136 #: includes/admin/field-renderers/image.php:84 137 #: includes/class-cofld-assets.php:174 138 msgid "Select Image" 139 msgstr "" 140 141 #: includes/admin/field-renderers/link.php:49 142 #: includes/fields/class-cofld-field-registry.php:152 143 msgid "URL" 144 msgstr "" 145 146 #: includes/admin/field-renderers/link.php:57 147 msgid "https://example.com" 148 msgstr "" 149 150 #: includes/admin/field-renderers/link.php:65 151 msgid "Link Text" 152 msgstr "" 153 154 #: includes/admin/field-renderers/link.php:73 155 msgid "Link text" 156 msgstr "" 157 158 #: includes/admin/field-renderers/post-object.php:93 159 msgid "Search..." 160 msgstr "" 161 162 #: includes/admin/field-renderers/repeater.php:47 163 msgid "No sub-fields configured for this repeater." 164 msgstr "" 165 166 #: includes/admin/field-renderers/repeater.php:55 167 #: includes/fields/class-cofld-field-registry.php:303 168 msgid "Add Row" 169 msgstr "" 170 171 #: includes/admin/field-renderers/repeater.php:148 172 msgid "Collapse" 173 msgstr "" 174 175 #: includes/admin/field-renderers/taxonomy.php:33 176 #: includes/class-cofld-rest-api.php:1751 177 msgid "Invalid taxonomy." 178 msgstr "" 179 180 #: includes/admin/field-renderers/taxonomy.php:104 181 msgid "— None —" 182 msgstr "" 183 184 #: includes/admin/field-renderers/taxonomy.php:136 185 msgid "— Select —" 186 msgstr "" 187 188 #: includes/admin/field-renderers/user.php:93 189 msgid "Search users..." 190 msgstr "" 191 192 #: includes/api/functions.php:46 193 msgid "Codeideal Open Fields - Compatibility Notice" 194 msgstr "" 195 196 #: includes/api/functions.php:47 197 msgid "Another custom fields plugin has been detected. Codeideal Open Fields stores data using standard WordPress meta, so both plugins can coexist. You can use either API to retrieve field values." 198 msgstr "" 199 200 #: includes/class-cofld-assets.php:175 201 msgid "Use this image" 202 msgstr "" 203 204 #: includes/class-cofld-assets.php:177 205 msgid "Use this file" 206 msgstr "" 207 208 #: includes/class-cofld-assets.php:321 209 #: includes/locations/class-cofld-location-manager.php:486 210 msgid "Default Template" 211 msgstr "" 212 213 #: includes/class-cofld-assets.php:435 214 msgid "Save" 215 msgstr "" 216 217 #: includes/class-cofld-assets.php:436 218 msgid "Cancel" 219 msgstr "" 220 221 #: includes/class-cofld-assets.php:437 222 msgid "Delete" 223 msgstr "" 224 225 #: includes/class-cofld-assets.php:438 226 msgid "Are you sure?" 227 msgstr "" 228 229 #: includes/class-cofld-assets.php:439 230 msgid "Saving..." 231 msgstr "" 232 233 #: includes/class-cofld-assets.php:440 234 msgid "Saved!" 235 msgstr "" 236 237 #: includes/class-cofld-assets.php:441 238 msgid "Error" 239 msgstr "" 240 241 #: includes/class-cofld-assets.php:442 242 msgid "Add Field" 243 msgstr "" 244 245 #: includes/class-cofld-assets.php:443 246 msgid "Field Settings" 247 msgstr "" 248 249 #: includes/class-cofld-assets.php:444 250 msgid "No fields yet. Drag a field type to get started." 251 msgstr "" 252 253 #: includes/class-cofld-assets.php:445 254 msgid "Copy Field" 255 msgstr "" 256 257 #: includes/class-cofld-assets.php:446 258 msgid "Paste Field" 259 msgstr "" 260 261 #: includes/class-cofld-assets.php:447 262 msgid "Duplicate Field" 263 msgstr "" 264 265 #: includes/class-cofld-rest-api.php:371 266 #: includes/class-cofld-rest-api.php:388 267 #: includes/class-cofld-rest-api.php:407 268 msgid "You do not have permission to access this resource." 269 msgstr "" 270 271 #: includes/class-cofld-rest-api.php:460 272 #: includes/class-cofld-rest-api.php:680 273 #: includes/class-cofld-rest-api.php:1099 274 msgid "Fieldset not found." 275 msgstr "" 276 277 #: includes/class-cofld-rest-api.php:518 278 msgid "Failed to create fieldset." 279 msgstr "" 280 281 #: includes/class-cofld-rest-api.php:599 282 msgid "Failed to update fieldset." 283 msgstr "" 284 285 #: includes/class-cofld-rest-api.php:649 286 msgid "Failed to delete fieldset." 287 msgstr "" 288 289 #: includes/class-cofld-rest-api.php:705 290 msgid "Failed to duplicate fieldset." 291 msgstr "" 292 293 #: includes/class-cofld-rest-api.php:807 294 #: includes/class-cofld-rest-api.php:905 295 msgid "Field name is required and must contain only lowercase letters, numbers, hyphens, and underscores." 296 msgstr "" 297 298 #: includes/class-cofld-rest-api.php:825 299 #: includes/class-cofld-rest-api.php:928 300 msgid "A field with this name already exists in this fieldset. Field names must be unique within a fieldset." 301 msgstr "" 302 303 #: includes/class-cofld-rest-api.php:859 304 msgid "Failed to create field." 305 msgstr "" 306 307 #: includes/class-cofld-rest-api.php:987 308 msgid "Failed to update field." 309 msgstr "" 310 311 #: includes/class-cofld-rest-api.php:1024 312 msgid "Failed to delete field." 313 msgstr "" 314 315 #: includes/class-cofld-rest-api.php:1045 316 msgid "Invalid fields data." 317 msgstr "" 318 319 #: includes/class-cofld-rest-api.php:1183 320 msgid "Invalid import data." 321 msgstr "" 322 323 #: includes/class-cofld.php:169 324 msgid "Unserializing instances of this class is forbidden." 325 msgstr "" 326 327 #: includes/fields/class-cofld-field-registry.php:67 328 msgid "Text" 329 msgstr "" 330 331 #: includes/fields/class-cofld-field-registry.php:68 332 msgid "Single line text input." 333 msgstr "" 334 335 #: includes/fields/class-cofld-field-registry.php:74 336 #: includes/fields/class-cofld-field-registry.php:103 337 msgid "Max Length" 338 msgstr "" 339 340 #: includes/fields/class-cofld-field-registry.php:79 341 #: includes/fields/class-cofld-field-registry.php:132 342 msgid "Prepend" 343 msgstr "" 344 345 #: includes/fields/class-cofld-field-registry.php:84 346 #: includes/fields/class-cofld-field-registry.php:137 347 msgid "Append" 348 msgstr "" 349 350 #: includes/fields/class-cofld-field-registry.php:91 351 msgid "Textarea" 352 msgstr "" 353 354 #: includes/fields/class-cofld-field-registry.php:92 355 msgid "Multi-line text area." 356 msgstr "" 357 358 #: includes/fields/class-cofld-field-registry.php:98 359 msgid "Rows" 360 msgstr "" 361 362 #: includes/fields/class-cofld-field-registry.php:110 363 msgid "Number" 364 msgstr "" 365 366 #: includes/fields/class-cofld-field-registry.php:111 367 msgid "Numeric input field." 368 msgstr "" 369 370 #: includes/fields/class-cofld-field-registry.php:117 371 msgid "Minimum" 372 msgstr "" 373 374 #: includes/fields/class-cofld-field-registry.php:122 375 msgid "Maximum" 376 msgstr "" 377 378 #: includes/fields/class-cofld-field-registry.php:127 379 msgid "Step" 380 msgstr "" 381 382 #: includes/fields/class-cofld-field-registry.php:144 383 msgid "Email" 384 msgstr "" 385 386 #: includes/fields/class-cofld-field-registry.php:145 387 msgid "Email address input." 388 msgstr "" 389 390 #: includes/fields/class-cofld-field-registry.php:153 391 msgid "URL input with validation." 392 msgstr "" 393 394 #: includes/fields/class-cofld-field-registry.php:160 395 msgid "Link" 396 msgstr "" 397 398 #: includes/fields/class-cofld-field-registry.php:161 399 msgid "Link with URL, text, and target options." 400 msgstr "" 401 402 #: includes/fields/class-cofld-field-registry.php:167 403 msgid "Show Link Text" 404 msgstr "" 405 406 #: includes/fields/class-cofld-field-registry.php:172 407 msgid "Show Target" 408 msgstr "" 409 410 #: includes/fields/class-cofld-field-registry.php:180 411 #: includes/fields/class-cofld-field-registry.php:360 412 #: includes/fields/class-cofld-field-renderer.php:334 413 msgid "Select" 414 msgstr "" 415 416 #: includes/fields/class-cofld-field-registry.php:181 417 msgid "Dropdown select field." 418 msgstr "" 419 420 #: includes/fields/class-cofld-field-registry.php:187 421 #: includes/fields/class-cofld-field-registry.php:211 422 #: includes/fields/class-cofld-field-registry.php:239 423 msgid "Choices" 424 msgstr "" 425 426 #: includes/fields/class-cofld-field-registry.php:192 427 msgid "Allow Multiple" 428 msgstr "" 429 430 #: includes/fields/class-cofld-field-registry.php:197 431 #: includes/fields/class-cofld-field-registry.php:338 432 #: includes/fields/class-cofld-field-registry.php:428 433 msgid "Allow Null" 434 msgstr "" 435 436 #: includes/fields/class-cofld-field-registry.php:204 437 msgid "Radio" 438 msgstr "" 439 440 #: includes/fields/class-cofld-field-registry.php:205 441 msgid "Radio button group." 442 msgstr "" 443 444 #: includes/fields/class-cofld-field-registry.php:216 445 #: includes/fields/class-cofld-field-registry.php:244 446 #: includes/fields/class-cofld-field-registry.php:292 447 #: includes/fields/class-cofld-field-registry.php:572 448 msgid "Layout" 449 msgstr "" 450 451 #: includes/fields/class-cofld-field-registry.php:218 452 #: includes/fields/class-cofld-field-registry.php:246 453 msgid "Vertical" 454 msgstr "" 455 456 #: includes/fields/class-cofld-field-registry.php:219 457 #: includes/fields/class-cofld-field-registry.php:247 458 msgid "Horizontal" 459 msgstr "" 460 461 #: includes/fields/class-cofld-field-registry.php:225 462 msgid "Allow Other" 463 msgstr "" 464 465 #: includes/fields/class-cofld-field-registry.php:232 466 #: includes/fields/class-cofld-field-registry.php:361 467 msgid "Checkbox" 468 msgstr "" 469 470 #: includes/fields/class-cofld-field-registry.php:233 471 msgid "Checkbox group." 472 msgstr "" 473 474 #: includes/fields/class-cofld-field-registry.php:255 475 msgid "Switch" 476 msgstr "" 477 478 #: includes/fields/class-cofld-field-registry.php:256 479 msgid "True/False toggle switch." 480 msgstr "" 481 482 #: includes/fields/class-cofld-field-registry.php:262 483 msgid "On Text" 484 msgstr "" 485 486 #: includes/fields/class-cofld-field-registry.php:263 487 #: includes/fields/class-cofld-field-renderer.php:415 488 msgid "Yes" 489 msgstr "" 490 491 #: includes/fields/class-cofld-field-registry.php:267 492 msgid "Off Text" 493 msgstr "" 494 495 #: includes/fields/class-cofld-field-registry.php:268 496 #: includes/fields/class-cofld-field-renderer.php:416 497 msgid "No" 498 msgstr "" 499 500 #: includes/fields/class-cofld-field-registry.php:274 501 msgid "Repeater" 502 msgstr "" 503 504 #: includes/fields/class-cofld-field-registry.php:275 505 msgid "Repeatable group of sub-fields." 506 msgstr "" 507 508 #: includes/fields/class-cofld-field-registry.php:282 509 msgid "Minimum Rows" 510 msgstr "" 511 512 #: includes/fields/class-cofld-field-registry.php:287 513 msgid "Maximum Rows" 514 msgstr "" 515 516 #: includes/fields/class-cofld-field-registry.php:294 517 msgid "Table" 518 msgstr "" 519 520 #: includes/fields/class-cofld-field-registry.php:295 521 msgid "Block" 522 msgstr "" 523 524 #: includes/fields/class-cofld-field-registry.php:296 525 msgid "Row" 526 msgstr "" 527 528 #: includes/fields/class-cofld-field-registry.php:302 529 msgid "Button Label" 530 msgstr "" 531 532 #: includes/fields/class-cofld-field-registry.php:310 533 #: includes/fields/class-cofld-field-registry.php:331 534 #: includes/fields/class-cofld-field-registry.php:468 535 msgid "Post Object" 536 msgstr "" 537 538 #: includes/fields/class-cofld-field-registry.php:311 539 msgid "Select posts from a searchable dropdown." 540 msgstr "" 541 542 #: includes/fields/class-cofld-field-registry.php:317 543 #: includes/fields/class-cofld-field-registry.php:442 544 #: includes/locations/class-cofld-location-manager.php:69 545 msgid "Post Type" 546 msgstr "" 547 548 #: includes/fields/class-cofld-field-registry.php:324 549 #: includes/fields/class-cofld-field-registry.php:368 550 #: includes/fields/class-cofld-field-registry.php:413 551 msgid "Select Multiple" 552 msgstr "" 553 554 #: includes/fields/class-cofld-field-registry.php:329 555 #: includes/fields/class-cofld-field-registry.php:373 556 #: includes/fields/class-cofld-field-registry.php:418 557 #: includes/fields/class-cofld-field-registry.php:466 558 msgid "Return Format" 559 msgstr "" 560 561 #: includes/fields/class-cofld-field-registry.php:332 562 #: includes/fields/class-cofld-field-registry.php:469 563 msgid "Post ID" 564 msgstr "" 565 566 #: includes/fields/class-cofld-field-registry.php:345 567 #: includes/fields/class-cofld-field-registry.php:352 568 #: includes/locations/class-cofld-location-manager.php:109 569 msgid "Taxonomy" 570 msgstr "" 571 572 #: includes/fields/class-cofld-field-registry.php:346 573 msgid "Select taxonomy terms." 574 msgstr "" 575 576 #: includes/fields/class-cofld-field-registry.php:358 577 msgid "Appearance" 578 msgstr "" 579 580 #: includes/fields/class-cofld-field-registry.php:362 581 msgid "Radio Buttons" 582 msgstr "" 583 584 #: includes/fields/class-cofld-field-registry.php:375 585 msgid "Term Object" 586 msgstr "" 587 588 #: includes/fields/class-cofld-field-registry.php:376 589 msgid "Term ID" 590 msgstr "" 591 592 #: includes/fields/class-cofld-field-registry.php:382 593 msgid "Allow Add Term" 594 msgstr "" 595 596 #: includes/fields/class-cofld-field-registry.php:387 597 msgid "Load Value from Post Terms" 598 msgstr "" 599 600 #: includes/fields/class-cofld-field-registry.php:392 601 msgid "Connect Selected Terms to Post" 602 msgstr "" 603 604 #: includes/fields/class-cofld-field-registry.php:399 605 msgid "User" 606 msgstr "" 607 608 #: includes/fields/class-cofld-field-registry.php:400 609 msgid "Select users from a searchable dropdown." 610 msgstr "" 611 612 #: includes/fields/class-cofld-field-registry.php:406 613 msgid "Filter by Role" 614 msgstr "" 615 616 #: includes/fields/class-cofld-field-registry.php:420 617 msgid "User Object" 618 msgstr "" 619 620 #: includes/fields/class-cofld-field-registry.php:421 621 msgid "User ID" 622 msgstr "" 623 624 #: includes/fields/class-cofld-field-registry.php:422 625 msgid "User Array" 626 msgstr "" 627 628 #: includes/fields/class-cofld-field-registry.php:435 629 msgid "Relationship" 630 msgstr "" 631 632 #: includes/fields/class-cofld-field-registry.php:436 633 msgid "A dual-column interface to select multiple posts." 634 msgstr "" 635 636 #: includes/fields/class-cofld-field-registry.php:449 637 msgid "Filter by Taxonomy" 638 msgstr "" 639 640 #: includes/fields/class-cofld-field-registry.php:456 641 msgid "Minimum Posts" 642 msgstr "" 643 644 #: includes/fields/class-cofld-field-registry.php:461 645 msgid "Maximum Posts" 646 msgstr "" 647 648 #: includes/fields/class-cofld-field-registry.php:566 649 msgid "Basic" 650 msgstr "" 651 652 #: includes/fields/class-cofld-field-registry.php:567 653 msgid "Choice" 654 msgstr "" 655 656 #: includes/fields/class-cofld-field-registry.php:568 657 msgid "Content" 658 msgstr "" 659 660 #: includes/fields/class-cofld-field-registry.php:569 661 msgid "Media" 662 msgstr "" 663 664 #: includes/fields/class-cofld-field-registry.php:570 665 msgid "Relational" 666 msgstr "" 667 668 #: includes/fields/class-cofld-field-registry.php:571 669 msgid "Date & Time" 670 msgstr "" 671 672 #: includes/locations/class-cofld-location-manager.php:79 673 msgid "Page Template" 674 msgstr "" 675 676 #: includes/locations/class-cofld-location-manager.php:89 677 msgid "Post Category" 678 msgstr "" 679 680 #: includes/locations/class-cofld-location-manager.php:99 681 msgid "Post Format" 682 msgstr "" 683 684 #: includes/locations/class-cofld-location-manager.php:119 685 msgid "User Role" 686 msgstr "" 687 688 #: includes/locations/class-cofld-location-manager.php:129 689 msgid "Options Page" 690 msgstr "" -
codeideal-open-fields/trunk/readme.txt
r3468520 r3468633 1 1 === Codeideal Open Fields === 2 2 Contributors: shayancode 3 Donate link: https:// codeideal.com3 Donate link: https://openfields.codeideal.com/support 4 4 Tags: custom fields, meta fields, field builder, post meta, custom meta 5 5 Requires at least: 6.0 6 6 Tested up to: 6.9 7 Stable tag: 0.4. 07 Stable tag: 0.4.1 8 8 Requires PHP: 7.4 9 9 License: GPLv2 or later … … 129 129 == Changelog == 130 130 131 = 0.4.1 = 132 * Added: Full internationalization (i18n) support — all admin UI strings are now translatable 133 * Added: RTL (right-to-left) language support — admin interface works correctly in RTL languages like Arabic, Hebrew, and Farsi 134 * Added: Translation-ready React admin, Gutenberg block, and relational fields 135 * Fixed: Block editor strings now use the correct text domain 136 * Fixed: wp_set_script_translations() for all JavaScript handles 137 * Improved: Logical CSS properties for direction-neutral styling 138 131 139 = 0.4.0 = 132 140 * Fixed: Duplicate Gutenberg block (cofld/field vs openfields/field) — now registers a single "Open Fields" block … … 150 158 == Upgrade Notice == 151 159 160 = 0.4.1 = 161 Full i18n and RTL support. Translate the plugin into your language at translate.wordpress.org. 162 152 163 = 0.4.0 = 153 164 Fixes duplicate block registration. Updated for WordPress 6.9 compatibility.
Note: See TracChangeset
for help on using the changeset viewer.