@stackable-labs/embeddables 1.66.1 → 1.67.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- (function(d,be){typeof exports=="object"&&typeof module<"u"?be(require("react/jsx-runtime"),require("react-dom/client"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["react/jsx-runtime","react-dom/client","react","react-dom"],be):(d=typeof globalThis<"u"?globalThis:d||self,be(d.jsxRuntime,d.ReactDOM,d.React,d.ReactDOM))})(this,(function(d,be,x,Ho){"use strict";var db=Object.defineProperty;var ub=(d,be,x)=>be in d?db(d,be,{enumerable:!0,configurable:!0,writable:!0,value:x}):d[be]=x;var on=(d,be,x)=>ub(d,typeof be!="symbol"?be+"":be,x);function rn(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const p=rn(x),Ut=rn(Ho),Ml='/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{:root,:host{--color-red-100:oklch(93.6% .032 17.717);--color-red-800:oklch(44.4% .177 26.899);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-800:oklch(47.3% .137 46.201);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-800:oklch(43.2% .095 166.913);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-800:oklch(42.4% .199 265.638);--color-purple-100:oklch(94.6% .033 307.174);--color-purple-800:oklch(43.8% .218 303.724);--color-pink-100:oklch(94.8% .028 342.258);--color-pink-800:oklch(45.9% .187 3.815);--color-gray-800:oklch(27.8% .033 256.848);--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--ease-out:cubic-bezier(0, 0, .2, 1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-geist-sans,ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);--default-mono-font-family:var(--font-geist-mono,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}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;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){*{outline-color:color-mix(in oklab,var(--ring) 50%,transparent)}}body{background-color:var(--background);color:var(--foreground)}*,:before,:after{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:rotateX(0);--tw-rotate-y:rotateY(0);--tw-rotate-z:rotateZ(0);--tw-skew-x:skewX(0);--tw-skew-y:skewY(0);--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-colored:0 0 #0000;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){*,:before,:after{outline-color:color-mix(in oklab,var(--ring) 50%,transparent)}}:host{background-color:var(--background);color:var(--foreground)}}@layer components;@layer utilities{.\\@container{container-type:inline-size}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.top-0{top:calc(var(--spacing) * 0)}.right-8{right:calc(var(--spacing) * 8)}.bottom-0{bottom:calc(var(--spacing) * 0)}.bottom-8{bottom:calc(var(--spacing) * 8)}.bottom-24{bottom:calc(var(--spacing) * 24)}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.z-1000{z-index:1000}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mx-auto{margin-inline:auto}.-mt-2\\.5{margin-top:calc(var(--spacing) * -2.5)}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-auto{margin-top:auto}.mr-1{margin-right:calc(var(--spacing) * 1)}.mr-4{margin-right:calc(var(--spacing) * 4)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.-ml-2\\.5{margin-left:calc(var(--spacing) * -2.5)}.block{display:block}.flex{display:flex}.hidden{display:none}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.size-3{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.h-0\\.5{height:calc(var(--spacing) * .5)}.h-3{height:calc(var(--spacing) * 3)}.h-4{height:calc(var(--spacing) * 4)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-12{height:calc(var(--spacing) * 12)}.h-16{height:calc(var(--spacing) * 16)}.h-20{height:calc(var(--spacing) * 20)}.h-24{height:calc(var(--spacing) * 24)}.h-32{height:calc(var(--spacing) * 32)}.h-48{height:calc(var(--spacing) * 48)}.h-64{height:calc(var(--spacing) * 64)}.h-\\[700px\\]{height:700px}.h-auto{height:auto}.h-full{height:100%}.min-h-0{min-height:calc(var(--spacing) * 0)}.w-0\\.5{width:calc(var(--spacing) * .5)}.w-3{width:calc(var(--spacing) * 3)}.w-4{width:calc(var(--spacing) * 4)}.w-6{width:calc(var(--spacing) * 6)}.w-12{width:calc(var(--spacing) * 12)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-48{width:calc(var(--spacing) * 48)}.w-\\[900px\\]{width:900px}.w-full{width:100%}.max-w-\\[200px\\]{max-width:200px}.min-w-0{min-width:calc(var(--spacing) * 0)}.flex-1{flex:1}.flex-none{flex:none}.shrink-0{flex-shrink:0}.origin-bottom-right{transform-origin:100% 100%}.translate-y-0{--tw-translate-y:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-2{--tw-translate-y:calc(var(--spacing) * 2);translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-115{--tw-scale-x:115%;--tw-scale-y:115%;--tw-scale-z:115%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-125{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x) var(--tw-scale-y)}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-col-resize{cursor:col-resize}.cursor-pointer{cursor:pointer}.cursor-row-resize{cursor:row-resize}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0{gap:calc(var(--spacing) * 0)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-8{gap:calc(var(--spacing) * 8)}.gap-10{gap:calc(var(--spacing) * 10)}.gap-12{gap:calc(var(--spacing) * 12)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-border>:not(:last-child)){border-color:var(--border)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-xl{border-radius:calc(var(--radius) + 4px)}.border{border-style:var(--tw-border-style);border-width:1px}.border-none{--tw-border-style:none;border-style:none}.border-border{border-color:var(--border)}.border-transparent{border-color:#0000}.border-zinc-200{border-color:#e4e4e4}.bg-amber-100{background-color:var(--color-amber-100)}.bg-background{background-color:var(--background)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-foreground\\/35{background-color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.bg-foreground\\/35{background-color:color-mix(in oklab,var(--foreground) 35%,transparent)}}.bg-foreground\\/70{background-color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.bg-foreground\\/70{background-color:color-mix(in oklab,var(--foreground) 70%,transparent)}}.bg-gray-100{background-color:#f3f4f6}.bg-muted{background-color:var(--muted)}.bg-pink-100{background-color:var(--color-pink-100)}.bg-purple-100{background-color:var(--color-purple-100)}.bg-red-100{background-color:var(--color-red-100)}.bg-transparent{background-color:#0000}.bg-white{background-color:#fff}.p-0{padding:calc(var(--spacing) * 0)}.p-1{padding:calc(var(--spacing) * 1)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.px-0{padding-inline:calc(var(--spacing) * 0)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0{padding-block:calc(var(--spacing) * 0)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-6{padding-block:calc(var(--spacing) * 6)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pb-0{padding-bottom:calc(var(--spacing) * 0)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.text-center{text-align:center}.text-left{text-align:left}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.\\!text-muted-foreground{color:var(--muted-foreground)!important}.text-amber-800{color:var(--color-amber-800)}.text-blue-800{color:var(--color-blue-800)}.text-destructive{color:var(--destructive)}.text-emerald-800{color:var(--color-emerald-800)}.text-foreground,.text-foreground\\/70{color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.text-foreground\\/70{color:color-mix(in oklab,var(--foreground) 70%,transparent)}}.text-foreground\\/75{color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.text-foreground\\/75{color:color-mix(in oklab,var(--foreground) 75%,transparent)}}.text-gray-800{color:var(--color-gray-800)}.text-muted-foreground{color:var(--muted-foreground)}.text-pink-800{color:var(--color-pink-800)}.text-purple-800{color:var(--color-purple-800)}.text-red-800{color:var(--color-red-800)}.text-zinc-300{color:#d4d4d4}.text-zinc-500{color:#727272}.opacity-0{opacity:0}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_0_1px_rgba\\(255\\,255\\,255\\,0\\.16\\)\\,0_0_0_1px_rgba\\(0\\,0\\,0\\,0\\.22\\)\\]{--tw-shadow:0 0 0 1px var(--tw-shadow-color,#ffffff29), 0 0 0 1px var(--tw-shadow-color,#00000038);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-background{--tw-ring-color:var(--background)}.ring-zinc-200{--tw-ring-color:oklch(92% 0 0)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);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,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.running{animation-play-state:running}@media(hover:hover){.group-hover\\/resize\\:bg-foreground\\/55:is(:where(.group\\/resize):hover *){background-color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.group-hover\\/resize\\:bg-foreground\\/55:is(:where(.group\\/resize):hover *){background-color:color-mix(in oklab,var(--foreground) 55%,transparent)}}.group-hover\\/resize\\:opacity-100:is(:where(.group\\/resize):hover *){opacity:1}.hover\\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\\:cursor-pointer:hover{cursor:pointer}.hover\\:bg-accent\\/70:hover{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-accent\\/70:hover{background-color:color-mix(in oklab,var(--accent) 70%,transparent)}}.hover\\:text-foreground:hover{color:var(--foreground)}.hover\\:text-zinc-900:hover{color:#181818}.hover\\:opacity-100:hover{opacity:1}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-ring\\/40:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.focus-visible\\:ring-ring\\/40:focus-visible{--tw-ring-color:color-mix(in oklab, var(--ring) 40%, transparent)}}.dark\\:border-zinc-300:is(.dark *){border-color:#d4d4d4}.dark\\:bg-background:is(.dark *){background-color:var(--background)}.dark\\:bg-white:is(.dark *){background-color:#fff}.dark\\:ring-zinc-300:is(.dark *){--tw-ring-color:oklch(87.1% 0 0)}@media(hover:hover){.dark\\:group-hover\\/resize\\:bg-white:is(.dark *):is(:where(.group\\/resize):hover *){background-color:#fff}}.\\[\\&\\[data-state\\=open\\]\\>svg\\]\\:rotate-90[data-state=open]>svg{rotate:90deg}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}:host{--radius:.625rem;--card:oklch(100% 0 0);--card-foreground:oklch(14.5% 0 0);--popover:oklch(100% 0 0);--popover-foreground:oklch(14.5% 0 0);--primary:oklch(20.5% 0 0);--primary-foreground:oklch(98.5% 0 0);--secondary:oklch(97% 0 0);--secondary-foreground:oklch(20.5% 0 0);--muted:oklch(97% 0 0);--muted-foreground:oklch(55.6% 0 0);--accent:oklch(97% 0 0);--accent-foreground:oklch(20.5% 0 0);--destructive:oklch(57.7% .245 27.325);--border:oklch(92.2% 0 0);--input:oklch(92.2% 0 0);--ring:oklch(70.8% 0 0);--background:oklch(100% 0 0);--foreground:oklch(14.5% 0 0);--chart-1:oklch(64.6% .222 41.116);--chart-2:oklch(60% .118 184.704);--chart-3:oklch(39.8% .07 227.392);--chart-4:oklch(82.8% .189 84.429);--chart-5:oklch(76.9% .188 70.08)}:host([theme=dark]),:host(.dark){--background:oklch(14.5% 0 0);--foreground:oklch(98.5% 0 0);--card:oklch(20.5% 0 0);--card-foreground:oklch(98.5% 0 0);--popover:oklch(20.5% 0 0);--popover-foreground:oklch(98.5% 0 0);--primary:oklch(92.2% 0 0);--primary-foreground:oklch(20.5% 0 0);--secondary:oklch(26.9% 0 0);--secondary-foreground:oklch(98.5% 0 0);--muted:oklch(26.9% 0 0);--muted-foreground:oklch(70.8% 0 0);--accent:oklch(26.9% 0 0);--accent-foreground:oklch(98.5% 0 0);--destructive:oklch(70.4% .191 22.216);--border:oklch(100% 0 0/.1);--input:oklch(100% 0 0/.15);--ring:oklch(55.6% 0 0);--chart-1:oklch(48.8% .243 264.376);--chart-2:oklch(69.6% .17 162.48);--chart-3:oklch(76.9% .188 70.08);--chart-4:oklch(62.7% .265 303.9);--chart-5:oklch(64.5% .246 16.439)}@keyframes sparkle-swipe-in{0%{opacity:0;color:#facc15;filter:drop-shadow(-8px 8px #a855f700)}28%{opacity:1;color:#d8b4fe;filter:drop-shadow(-2px 2px 8px #a855f7cc)}55%{color:#a855f7;filter:drop-shadow(3px -3px 10px #a855f7f2)}to{opacity:1;color:#facc15;filter:drop-shadow(0 0 #a855f700)}}@keyframes sparkle-twinkle{0%,to{opacity:.82;filter:drop-shadow(0 0 #facc1500)}50%{opacity:1;filter:drop-shadow(0 0 7px #facc1580)}}.sparkle-icon{color:#facc15;vertical-align:middle;transform-origin:50%;will-change:transform,filter,color,opacity;line-height:1;animation:1.15s cubic-bezier(.22,1,.36,1) sparkle-swipe-in,2.1s ease-in-out 1.15s infinite sparkle-twinkle;display:inline-block;transform:rotate(10deg)}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}',Ol=()=>{try{return"f290d16b-0cc5-41a4-89d7-8375c22a7ea8"}catch{return"dev"}},tt=new Map,Ll=async(e,t)=>{const o=tt.get(e.id);if(o)return o;if(!e.bundleUrl)return console.warn(`[SandboxManager] Extension ${e.id} is missing bundleUrl — skipping sandbox creation`),null;const r=document.createElement("iframe");if(r.setAttribute("sandbox","allow-scripts allow-same-origin"),r.style.display="none",r.style.width="0",r.style.height="0",r.style.border="none",e.bundleUrl.startsWith("http")&&!e.bundleUrl.endsWith(".js")){const i=new URL(e.bundleUrl);i.searchParams.set("__extensionId",e.id),r.src=i.toString(),console.warn(`[SandboxManager] Creating dev sandbox for ${e.id}, injecting __extensionId via query param, url: ${i.toString()}`)}else{let i="";try{const u=Ol();i=await(await fetch(`${e.bundleUrl}?_b=${u}`)).text()}catch(u){console.error(`[SandboxManager] Failed to fetch bundle for ${e.id}:`,u)}const l=`<!DOCTYPE html>
1
+ (function(d,be){typeof exports=="object"&&typeof module<"u"?be(require("react/jsx-runtime"),require("react-dom/client"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["react/jsx-runtime","react-dom/client","react","react-dom"],be):(d=typeof globalThis<"u"?globalThis:d||self,be(d.jsxRuntime,d.ReactDOM,d.React,d.ReactDOM))})(this,(function(d,be,x,Ho){"use strict";var fb=Object.defineProperty;var pb=(d,be,x)=>be in d?fb(d,be,{enumerable:!0,configurable:!0,writable:!0,value:x}):d[be]=x;var on=(d,be,x)=>pb(d,typeof be!="symbol"?be+"":be,x);function rn(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const p=rn(x),Ut=rn(Ho),Ml='/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{:root,:host{--color-red-100:oklch(93.6% .032 17.717);--color-red-800:oklch(44.4% .177 26.899);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-800:oklch(47.3% .137 46.201);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-800:oklch(43.2% .095 166.913);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-800:oklch(42.4% .199 265.638);--color-purple-100:oklch(94.6% .033 307.174);--color-purple-800:oklch(43.8% .218 303.724);--color-pink-100:oklch(94.8% .028 342.258);--color-pink-800:oklch(45.9% .187 3.815);--color-gray-800:oklch(27.8% .033 256.848);--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--ease-out:cubic-bezier(0, 0, .2, 1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-geist-sans,ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);--default-mono-font-family:var(--font-geist-mono,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}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;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){*{outline-color:color-mix(in oklab,var(--ring) 50%,transparent)}}body{background-color:var(--background);color:var(--foreground)}*,:before,:after{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:rotateX(0);--tw-rotate-y:rotateY(0);--tw-rotate-z:rotateZ(0);--tw-skew-x:skewX(0);--tw-skew-y:skewY(0);--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-colored:0 0 #0000;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){*,:before,:after{outline-color:color-mix(in oklab,var(--ring) 50%,transparent)}}:host{background-color:var(--background);color:var(--foreground)}}@layer components;@layer utilities{.\\@container{container-type:inline-size}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.top-0{top:calc(var(--spacing) * 0)}.right-8{right:calc(var(--spacing) * 8)}.bottom-0{bottom:calc(var(--spacing) * 0)}.bottom-8{bottom:calc(var(--spacing) * 8)}.bottom-24{bottom:calc(var(--spacing) * 24)}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.z-1000{z-index:1000}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mx-auto{margin-inline:auto}.-mt-2\\.5{margin-top:calc(var(--spacing) * -2.5)}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-auto{margin-top:auto}.mr-1{margin-right:calc(var(--spacing) * 1)}.mr-4{margin-right:calc(var(--spacing) * 4)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.-ml-2\\.5{margin-left:calc(var(--spacing) * -2.5)}.block{display:block}.flex{display:flex}.hidden{display:none}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.size-3{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.h-0\\.5{height:calc(var(--spacing) * .5)}.h-3{height:calc(var(--spacing) * 3)}.h-4{height:calc(var(--spacing) * 4)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-12{height:calc(var(--spacing) * 12)}.h-16{height:calc(var(--spacing) * 16)}.h-20{height:calc(var(--spacing) * 20)}.h-24{height:calc(var(--spacing) * 24)}.h-32{height:calc(var(--spacing) * 32)}.h-48{height:calc(var(--spacing) * 48)}.h-64{height:calc(var(--spacing) * 64)}.h-\\[700px\\]{height:700px}.h-auto{height:auto}.h-full{height:100%}.min-h-0{min-height:calc(var(--spacing) * 0)}.w-0\\.5{width:calc(var(--spacing) * .5)}.w-3{width:calc(var(--spacing) * 3)}.w-4{width:calc(var(--spacing) * 4)}.w-6{width:calc(var(--spacing) * 6)}.w-12{width:calc(var(--spacing) * 12)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-48{width:calc(var(--spacing) * 48)}.w-\\[900px\\]{width:900px}.w-full{width:100%}.max-w-\\[200px\\]{max-width:200px}.min-w-0{min-width:calc(var(--spacing) * 0)}.flex-1{flex:1}.flex-none{flex:none}.shrink-0{flex-shrink:0}.origin-bottom-right{transform-origin:100% 100%}.translate-y-0{--tw-translate-y:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-2{--tw-translate-y:calc(var(--spacing) * 2);translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-115{--tw-scale-x:115%;--tw-scale-y:115%;--tw-scale-z:115%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-125{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x) var(--tw-scale-y)}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-col-resize{cursor:col-resize}.cursor-pointer{cursor:pointer}.cursor-row-resize{cursor:row-resize}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0{gap:calc(var(--spacing) * 0)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-8{gap:calc(var(--spacing) * 8)}.gap-10{gap:calc(var(--spacing) * 10)}.gap-12{gap:calc(var(--spacing) * 12)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-border>:not(:last-child)){border-color:var(--border)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-xl{border-radius:calc(var(--radius) + 4px)}.border{border-style:var(--tw-border-style);border-width:1px}.border-none{--tw-border-style:none;border-style:none}.border-border{border-color:var(--border)}.border-transparent{border-color:#0000}.border-zinc-200{border-color:#e4e4e4}.bg-amber-100{background-color:var(--color-amber-100)}.bg-background{background-color:var(--background)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-foreground\\/35{background-color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.bg-foreground\\/35{background-color:color-mix(in oklab,var(--foreground) 35%,transparent)}}.bg-foreground\\/70{background-color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.bg-foreground\\/70{background-color:color-mix(in oklab,var(--foreground) 70%,transparent)}}.bg-gray-100{background-color:#f3f4f6}.bg-muted{background-color:var(--muted)}.bg-pink-100{background-color:var(--color-pink-100)}.bg-purple-100{background-color:var(--color-purple-100)}.bg-red-100{background-color:var(--color-red-100)}.bg-transparent{background-color:#0000}.bg-white{background-color:#fff}.p-0{padding:calc(var(--spacing) * 0)}.p-1{padding:calc(var(--spacing) * 1)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.px-0{padding-inline:calc(var(--spacing) * 0)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0{padding-block:calc(var(--spacing) * 0)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-6{padding-block:calc(var(--spacing) * 6)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pb-0{padding-bottom:calc(var(--spacing) * 0)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.text-center{text-align:center}.text-left{text-align:left}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.\\!text-muted-foreground{color:var(--muted-foreground)!important}.text-amber-800{color:var(--color-amber-800)}.text-blue-800{color:var(--color-blue-800)}.text-destructive{color:var(--destructive)}.text-emerald-800{color:var(--color-emerald-800)}.text-foreground,.text-foreground\\/70{color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.text-foreground\\/70{color:color-mix(in oklab,var(--foreground) 70%,transparent)}}.text-foreground\\/75{color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.text-foreground\\/75{color:color-mix(in oklab,var(--foreground) 75%,transparent)}}.text-gray-800{color:var(--color-gray-800)}.text-muted-foreground{color:var(--muted-foreground)}.text-pink-800{color:var(--color-pink-800)}.text-purple-800{color:var(--color-purple-800)}.text-red-800{color:var(--color-red-800)}.text-zinc-300{color:#d4d4d4}.text-zinc-500{color:#727272}.opacity-0{opacity:0}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_0_1px_rgba\\(255\\,255\\,255\\,0\\.16\\)\\,0_0_0_1px_rgba\\(0\\,0\\,0\\,0\\.22\\)\\]{--tw-shadow:0 0 0 1px var(--tw-shadow-color,#ffffff29), 0 0 0 1px var(--tw-shadow-color,#00000038);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-background{--tw-ring-color:var(--background)}.ring-zinc-200{--tw-ring-color:oklch(92% 0 0)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);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,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.running{animation-play-state:running}@media(hover:hover){.group-hover\\/resize\\:bg-foreground\\/55:is(:where(.group\\/resize):hover *){background-color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.group-hover\\/resize\\:bg-foreground\\/55:is(:where(.group\\/resize):hover *){background-color:color-mix(in oklab,var(--foreground) 55%,transparent)}}.group-hover\\/resize\\:opacity-100:is(:where(.group\\/resize):hover *){opacity:1}.hover\\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\\:cursor-pointer:hover{cursor:pointer}.hover\\:bg-accent\\/70:hover{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-accent\\/70:hover{background-color:color-mix(in oklab,var(--accent) 70%,transparent)}}.hover\\:text-foreground:hover{color:var(--foreground)}.hover\\:text-zinc-900:hover{color:#181818}.hover\\:opacity-100:hover{opacity:1}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-ring\\/40:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.focus-visible\\:ring-ring\\/40:focus-visible{--tw-ring-color:color-mix(in oklab, var(--ring) 40%, transparent)}}.dark\\:border-zinc-300:is(.dark *){border-color:#d4d4d4}.dark\\:bg-background:is(.dark *){background-color:var(--background)}.dark\\:bg-white:is(.dark *){background-color:#fff}.dark\\:ring-zinc-300:is(.dark *){--tw-ring-color:oklch(87.1% 0 0)}@media(hover:hover){.dark\\:group-hover\\/resize\\:bg-white:is(.dark *):is(:where(.group\\/resize):hover *){background-color:#fff}}.\\[\\&\\[data-state\\=open\\]\\>svg\\]\\:rotate-90[data-state=open]>svg{rotate:90deg}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}:host{--radius:.625rem;--card:oklch(100% 0 0);--card-foreground:oklch(14.5% 0 0);--popover:oklch(100% 0 0);--popover-foreground:oklch(14.5% 0 0);--primary:oklch(20.5% 0 0);--primary-foreground:oklch(98.5% 0 0);--secondary:oklch(97% 0 0);--secondary-foreground:oklch(20.5% 0 0);--muted:oklch(97% 0 0);--muted-foreground:oklch(55.6% 0 0);--accent:oklch(97% 0 0);--accent-foreground:oklch(20.5% 0 0);--destructive:oklch(57.7% .245 27.325);--border:oklch(92.2% 0 0);--input:oklch(92.2% 0 0);--ring:oklch(70.8% 0 0);--background:oklch(100% 0 0);--foreground:oklch(14.5% 0 0);--chart-1:oklch(64.6% .222 41.116);--chart-2:oklch(60% .118 184.704);--chart-3:oklch(39.8% .07 227.392);--chart-4:oklch(82.8% .189 84.429);--chart-5:oklch(76.9% .188 70.08)}:host([theme=dark]),:host(.dark){--background:oklch(14.5% 0 0);--foreground:oklch(98.5% 0 0);--card:oklch(20.5% 0 0);--card-foreground:oklch(98.5% 0 0);--popover:oklch(20.5% 0 0);--popover-foreground:oklch(98.5% 0 0);--primary:oklch(92.2% 0 0);--primary-foreground:oklch(20.5% 0 0);--secondary:oklch(26.9% 0 0);--secondary-foreground:oklch(98.5% 0 0);--muted:oklch(26.9% 0 0);--muted-foreground:oklch(70.8% 0 0);--accent:oklch(26.9% 0 0);--accent-foreground:oklch(98.5% 0 0);--destructive:oklch(70.4% .191 22.216);--border:oklch(100% 0 0/.1);--input:oklch(100% 0 0/.15);--ring:oklch(55.6% 0 0);--chart-1:oklch(48.8% .243 264.376);--chart-2:oklch(69.6% .17 162.48);--chart-3:oklch(76.9% .188 70.08);--chart-4:oklch(62.7% .265 303.9);--chart-5:oklch(64.5% .246 16.439)}@keyframes sparkle-swipe-in{0%{opacity:0;color:#facc15;filter:drop-shadow(-8px 8px #a855f700)}28%{opacity:1;color:#d8b4fe;filter:drop-shadow(-2px 2px 8px #a855f7cc)}55%{color:#a855f7;filter:drop-shadow(3px -3px 10px #a855f7f2)}to{opacity:1;color:#facc15;filter:drop-shadow(0 0 #a855f700)}}@keyframes sparkle-twinkle{0%,to{opacity:.82;filter:drop-shadow(0 0 #facc1500)}50%{opacity:1;filter:drop-shadow(0 0 7px #facc1580)}}.sparkle-icon{color:#facc15;vertical-align:middle;transform-origin:50%;will-change:transform,filter,color,opacity;line-height:1;animation:1.15s cubic-bezier(.22,1,.36,1) sparkle-swipe-in,2.1s ease-in-out 1.15s infinite sparkle-twinkle;display:inline-block;transform:rotate(10deg)}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}',Ol=()=>{try{return"257d4142-fd35-4557-b99d-18c07a1751c2"}catch{return"dev"}},tt=new Map,Ll=async(e,t)=>{const o=tt.get(e.id);if(o)return o;if(!e.bundleUrl)return console.warn(`[SandboxManager] Extension ${e.id} is missing bundleUrl — skipping sandbox creation`),null;const r=document.createElement("iframe");if(r.setAttribute("sandbox","allow-scripts allow-same-origin"),r.style.display="none",r.style.width="0",r.style.height="0",r.style.border="none",e.bundleUrl.startsWith("http")&&!e.bundleUrl.endsWith(".js")){const i=new URL(e.bundleUrl);i.searchParams.set("__extensionId",e.id),r.src=i.toString(),console.warn(`[SandboxManager] Creating dev sandbox for ${e.id}, injecting __extensionId via query param, url: ${i.toString()}`)}else{let i="";try{const u=Ol();i=await(await fetch(`${e.bundleUrl}?_b=${u}`)).text()}catch(u){console.error(`[SandboxManager] Failed to fetch bundle for ${e.id}:`,u)}const l=`<!DOCTYPE html>
2
2
  <html>
3
3
  <head>
4
4
  <meta charset="utf-8">
@@ -9,7 +9,7 @@
9
9
  <script>var __STACKABLE_EXTENSION_ID__ = ${JSON.stringify(e.id)}; var process = { env: { NODE_ENV: "production" } };<\/script>
10
10
  <script type="module">${i}<\/script>
11
11
  </body>
12
- </html>`;r.srcdoc=l,console.warn(`[SandboxManager] Creating srcdoc sandbox for ${e.id}, srcdoc starts with: ${l.substring(0,300)}`)}t.appendChild(r);const a={extensionId:e.id,iframe:r,manifest:e.manifest,ready:!1,messageHandlers:new Set},s=i=>{const l=i.data;!l||typeof l!="object"||!("type"in l)||("extensionId"in l?l.extensionId:void 0)!==e.id||(l.type==="extension-ready"&&(a.ready=!0),a.messageHandlers.forEach(f=>f(l)))};return window.addEventListener("message",s),tt.set(e.id,a),a},Fe=(e,t)=>{const o=tt.get(e);if(!(o!=null&&o.iframe.contentWindow)){console.warn(`Sandbox not found for extension: ${e}`);return}o.iframe.contentWindow.postMessage(t,"*")},ut=e=>tt.get(e),zl=e=>{const t=tt.get(e);t&&(t.iframe.remove(),t.messageHandlers.clear(),tt.delete(e))},Pt=()=>tt,nn={"ui-card":{description:"Card container for grouping related content",icon:"square",category:"layout",attributes:["className","onClick"],children:["ui-card-header","ui-card-content"]},"ui-card-content":{description:"Content area within a Card",icon:"square",category:"layout",attributes:["className"]},"ui-card-header":{description:"Header area within a Card",icon:"square",category:"layout",attributes:["className"]},"ui-button":{description:"Interactive button with variant and size options",icon:"mouse-pointer-click",category:"input",attributes:["variant","size","disabled","onClick","type","className","title"],attributeValues:{variant:["default","destructive","outline","secondary","ghost","link"],size:["default","xs","sm","lg","icon"]}},"ui-text":{description:"Paragraph text",icon:"type",category:"text",attributes:["className","tone"],attributeValues:{tone:["default","muted","destructive"]}},"ui-heading":{description:"Heading element (h1–h6)",icon:"heading",category:"text",attributes:["level","className"],attributeValues:{level:["1","2","3","4","5","6"]}},"ui-badge":{description:"Small label for status, category, or count",icon:"tag",category:"text",attributes:["variant","hue","tone","className"],attributeValues:{variant:["default","secondary","destructive","outline","ghost","link"],hue:["amber","blue","emerald","red","purple","pink","gray"],tone:["default","muted","destructive"]}},"ui-input":{description:"Single-line text input field",icon:"text-cursor-input",category:"input",attributes:["type","placeholder","value","onChange","disabled","className","id"]},"ui-textarea":{description:"Multi-line text input field",icon:"text",category:"input",attributes:["placeholder","value","onChange","disabled","rows","className","id"]},"ui-select":{description:"Dropdown select with options",icon:"chevrons-up-down",category:"input",attributes:["value","defaultValue","onChange","placeholder","disabled","className"],children:["ui-select-option"]},"ui-select-option":{description:"Option within a Select dropdown",icon:"chevrons-up-down",category:"input",attributes:["value","disabled","className"]},"ui-checkbox":{description:"Checkbox toggle for boolean values",icon:"square-check",category:"input",attributes:["checked","onChange","disabled","className","id"]},"ui-switch":{description:"Toggle switch for on/off states",icon:"toggle-left",category:"input",attributes:["checked","onChange","disabled","size","className","id"],attributeValues:{size:["sm","default"]}},"ui-label":{description:"Form label associated with an input",icon:"tag",category:"input",attributes:["htmlFor","className"]},"ui-radio-group":{description:"Group of radio buttons for single selection",icon:"circle-dot",category:"input",attributes:["value","defaultValue","onChange","className"],children:["ui-radio-group-item","ui-label","ui-inline"]},"ui-radio-group-item":{description:"Individual radio button within a RadioGroup",icon:"circle-dot",category:"input",attributes:["value","disabled","className","id"]},"ui-stack":{description:"Vertical or horizontal flex container with gap",icon:"rows-3",category:"layout",attributes:["gap","direction","className"],attributeValues:{direction:["row","column"],gap:["0","1","2","3","4","5","6","8","10","12"]}},"ui-inline":{description:"Horizontal flex container with centered items",icon:"columns-3",category:"layout",attributes:["gap","className"],attributeValues:{gap:["0","1","2","3","4","5","6","8","10","12"]}},"ui-separator":{description:"Horizontal divider line",icon:"minus",category:"layout",attributes:["className"]},"ui-tabs":{description:"Tabbed content container",icon:"panel-top",category:"navigation",attributes:["defaultValue","className"],children:["ui-tabs-list","ui-tabs-content"]},"ui-tabs-list":{description:"Container for tab triggers",icon:"panel-top",category:"navigation",attributes:["className"],children:["ui-tabs-trigger"]},"ui-tabs-trigger":{description:"Clickable tab label within TabsList",icon:"panel-top",category:"navigation",attributes:["value","className"]},"ui-tabs-content":{description:"Content panel shown when its tab is active",icon:"panel-top",category:"navigation",attributes:["value","className"]},"ui-scroll-area":{description:"Scrollable content container",icon:"scroll",category:"layout",attributes:["className"]},"ui-avatar":{description:"User avatar with image and initials fallback",icon:"circle-user",category:"composite",attributes:["src","alt","className"]},"ui-icon":{description:"Icon from the allowed icon set",icon:"sparkles",category:"composite",attributes:["name","size","className"],attributeValues:{size:["sm","md","lg"]}},"ui-link":{description:"Hyperlink element",icon:"link",category:"navigation",attributes:["href","target","rel","className"]},"ui-menu":{description:"Card-based menu with clickable items",icon:"menu",category:"navigation",attributes:["title","className"],children:["ui-menu-item"]},"ui-menu-item":{description:"Clickable item within a Menu",icon:"menu",category:"navigation",attributes:["icon","label","description","onClick","className"]},"ui-skeleton":{description:"Loading placeholder with shimmer effect",icon:"loader",category:"feedback",attributes:["width","height","className"]},"ui-tooltip":{description:"Hover tooltip with text content",icon:"message-square",category:"feedback",attributes:["content","className"]},"ui-progress":{description:"Progress bar with percentage value",icon:"bar-chart",category:"feedback",attributes:["value","className"]},"ui-alert":{description:"Alert banner with icon and optional title",icon:"alert-circle",category:"feedback",attributes:["variant","title","className"],attributeValues:{variant:["default","destructive"]}},"ui-collapsible":{description:"Expandable/collapsible content section",icon:"chevrons-down-up",category:"composite",attributes:["defaultOpen","className"],children:["ui-collapsible-trigger","ui-collapsible-content"]},"ui-collapsible-trigger":{description:"Clickable trigger to toggle Collapsible",icon:"chevrons-down-up",category:"composite",attributes:["className"]},"ui-collapsible-content":{description:"Content revealed when Collapsible is open",icon:"chevrons-down-up",category:"composite",attributes:["className"]}},ft=nn,At=Object.keys(nn),Dl=Object.fromEntries(At.map(e=>[e,ft[e].attributes]));Object.fromEntries(At.filter(e=>ft[e].attributeValues).map(e=>[e,ft[e].attributeValues]));const $l=Object.fromEntries(At.filter(e=>ft[e].children).map(e=>[e,ft[e].children]));Object.fromEntries(At.map(e=>[e,ft[e].category]));const Fl=["identity","messaging"],Bl={"context.read":"context:read","data.query":"data:query","data.fetch":"data:fetch","actions.toast":"actions:toast","actions.invoke":"actions:invoke","extend.identity":"extend:identity"},an={ADMIN:"org:super_admin"},sn={ADMIN:"org:admin",OWNER:"org:owner"},Hl=[an.ADMIN,sn.ADMIN,sn.OWNER];[...Object.values(an),...Object.values(Hl)];const Vl=e=>{const t=async o=>{const r=o.data;if((r==null?void 0:r.type)!=="capability-request")return;const n=r;console.warn("[CapabilityRPC] raw message data:",JSON.stringify(o.data));const a=n.extensionId;if(!a||!ut(a)){const l=[...Pt().keys()];console.warn(`Received capability request from unknown source (extensionId: "${a??"undefined"}", registered: [${l.join(", ")}], capability: ${n.capability})`);return}const s=ut(a);if(!s)return;const i=Bl[n.capability];if(i&&!s.manifest.permissions.includes(i)){const l={type:"capability-response",id:n.id,success:!1,error:`Permission denied: '${i}' not granted for extension '${a}'`};Fe(a,l);return}try{let l;switch(n.capability){case"data.query":l=await e["data.query"](n.payload);break;case"data.fetch":l=await e["data.fetch"](a,n.payload);break;case"actions.toast":l=await e["actions.toast"](a,n.payload);break;case"actions.invoke":l=await e["actions.invoke"](n.payload);break;case"context.read":l=await e["context.read"]();break;case"extend.identity":l=e["extend.identity"]?await e["extend.identity"](a,n.payload):null;break;default:throw new Error(`Unknown capability: ${n.capability}`)}const u={type:"capability-response",id:n.id,success:!0,data:l};Fe(a,u)}catch(l){const u={type:"capability-response",id:n.id,success:!1,error:l instanceof Error?l.message:"Unknown error"};Fe(a,u)}};return window.addEventListener("message",t),()=>{window.removeEventListener("message",t)}},ln=x.createContext({extensions:[],components:{},ready:!1}),Wl=({extensions:e,capabilityHandlers:t,components:o={},children:r})=>{const[n,a]=x.useState(!1),s=x.useRef(null),i=x.useRef(null),l=x.useRef(t);return l.current=t,x.useEffect(()=>{if(!s.current)return;let u=!1;return(async()=>{const c=s.current;if(!c)return;console.log("[ExtensionProvider] Initializing with",e.length,"extensions");const h=new Proxy({},{get:(g,b)=>l.current[b]});i.current=Vl(h);for(const g of e)g.enabled&&!u&&(console.log("[ExtensionProvider] Creating sandbox for",g.id,"bundleUrl:",g.bundleUrl),await Ll(g,c),console.log("[ExtensionProvider] Sandbox created for",g.id));u||(console.log("[ExtensionProvider] Ready"),a(!0))})(),()=>{var c;u=!0;for(const h of e)zl(h.id);(c=i.current)==null||c.call(i)}},[e]),d.jsxs(ln.Provider,{value:{extensions:e,components:o,ready:n},children:[d.jsx("div",{ref:s,style:{display:"none"}}),r]})},cn=()=>x.useContext(ln),Ul=e=>At.includes(e),jl=(e,t={})=>{const{surfaceId:o,logPrefix:r="[NodeRenderer]"}=t,n=(a,s,i=0)=>{var g,b,m;if(a.type==="text")return a.text||null;if(!a.tag)return null;if(a.tag==="__fragment")return d.jsx(x.Fragment,{children:(g=a.children)==null?void 0:g.map((v,w)=>n(v,s,w))},i);if(!Ul(a.tag))return console.warn(`${r} Unknown UI tag rejected: <${a.tag}>`),null;const l=e[a.tag];if(!l)return a.tag.startsWith("ui-")?(console.warn(`${r} Unregistered UI tag: <${a.tag}>`),null):d.jsx(x.Fragment,{children:(b=a.children)==null?void 0:b.map((v,w)=>n(v,s,w))},i);const{filtered:u,stripped:f}=Rl(a.tag,a.attrs);f.length>0&&console.warn(`${r} Attributes not allowed on <${a.tag}>, stripped: ${f.join(", ")}`);const c=Gl(a.tag,a.children);if(c.length>0&&console.warn(`${r} Invalid children in <${a.tag}>: ${c.join(", ")}`),a.actionId){const v=a.actionId;u.onClick=()=>{const w=s;w==null||w.postMessage({type:"action-invoke",surfaceId:o,actionId:v},"*")}}if(u["data-onchange-id"]){const v=u["data-onchange-id"];delete u["data-onchange-id"],u.onChange=w=>{const y=s;y==null||y.postMessage({type:"action-invoke",surfaceId:o,actionId:v,value:w.target.value},"*")}}const h=(m=a.children)==null?void 0:m.map((v,w)=>n(v,s,w));return x.createElement(l,{...u,key:i},h&&h.length>0?h:void 0)};return n},Rl=(e,t)=>{const o={},r=[];if(!t)return{filtered:o,stripped:r};const n=Dl[e];for(const[a,s]of Object.entries(t)){if(a==="data-onchange-id"){o[a]=s;continue}n!=null&&n.includes(a)?o[a]=s:r.push(a)}return{filtered:o,stripped:r}},Gl=(e,t)=>{const o=$l[e];if(!o||!t)return[];const r=[];for(const n of t)n.type!=="text"&&(!n.tag||n.tag==="__fragment"||o.includes(n.tag)||r.push(n.tag));return r},ql=e=>{const t={...e};for(const o of Fl)delete t[o];return t},jt=({target:e,context:t,className:o,separator:r,fallback:n=null,render:a})=>{const{extensions:s,components:i,ready:l}=cn(),[u,f]=x.useState({}),c=x.useRef(""),h=x.useMemo(()=>s.filter(v=>v.enabled&&v.manifest.targets.includes(e)),[s.map(v=>v.id).join(","),e]),g=x.useMemo(()=>jl(i,{surfaceId:e,logPrefix:"[ExtensionSlot]"}),[e,i]);if(x.useEffect(()=>{const v=h.map(y=>y.id).join(",");if(c.current!==v&&(c.current=v,f({})),!l||h.length===0)return;const w=y=>{const k=y.data;if(!(!k||typeof k!="object"||!h.some(_=>{const P=ut(_.id);return P&&y.source===P.iframe.contentWindow}))){if(k.type==="surface-update"&&k.surfaceId===e){const _=h.find(T=>{const S=ut(T.id);return S&&y.source===S.iframe.contentWindow});if(!_)return;const P=g(k.tree,y.source??null);f(T=>({...T,[_.id]:P}))}if(k.type==="surface-ready"&&k.surfaceId===e&&t){const _=ql(t);h.forEach(P=>{var S;const T=ut(P.id);(S=T==null?void 0:T.iframe.contentWindow)==null||S.postMessage({type:"context-update",surfaceId:e,context:_},"*")})}}};return window.addEventListener("message",w),h.forEach(y=>{var E;const k=ut(y.id);(E=k==null?void 0:k.iframe.contentWindow)==null||E.postMessage({type:"surface-render",surfaceId:e,context:t},"*")}),()=>{window.removeEventListener("message",w)}},[l,h,e,t,g]),!l)return null;if(h.length===0)return n?d.jsx("div",{"data-extension-slot":e,title:e,className:o,children:n}):null;const b=h.map(v=>({id:v.id,children:u[v.id]})).filter(v=>!!v.children),m=b.length>0?b.flatMap((v,w,y)=>{const k=a?a({extensionId:v.id,children:v.children,index:w,total:y.length}):d.jsx(x.Fragment,{children:v.children},v.id),E=d.jsx(x.Fragment,{children:k},`extension:${v.id}`);if(w===0||!r)return[E];const _=y[w-1],P=typeof r=="function"?r({index:w,total:y.length,previousExtensionId:_.id,extensionId:v.id}):r;return[d.jsx(x.Fragment,{children:P},`separator:${_.id}:${v.id}:${w}`),E]}):n;return d.jsx("div",{"data-extension-slot":e,title:e,className:o,children:m})};function Yl(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",t.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}const Xl=e=>{switch(e){case"success":return Jl;case"info":return ec;case"warning":return Ql;case"error":return tc;default:return null}},Kl=Array(12).fill(0),Zl=({visible:e,className:t})=>x.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},x.createElement("div",{className:"sonner-spinner"},Kl.map((o,r)=>x.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Jl=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},x.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"})),Ql=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},x.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"})),ec=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},x.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"})),tc=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},x.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"})),oc=x.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"},x.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),x.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),rc=()=>{const[e,t]=x.useState(document.hidden);return x.useEffect(()=>{const o=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",o),()=>window.removeEventListener("visibilitychange",o)},[]),e};let Vo=1;class nc{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const o=this.subscribers.indexOf(t);this.subscribers.splice(o,1)}),this.publish=t=>{this.subscribers.forEach(o=>o(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var o;const{message:r,...n}=t,a=typeof(t==null?void 0:t.id)=="number"||((o=t.id)==null?void 0:o.length)>0?t.id:Vo++,s=this.toasts.find(l=>l.id===a),i=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),s?this.toasts=this.toasts.map(l=>l.id===a?(this.publish({...l,...t,id:a,title:r}),{...l,...t,id:a,dismissible:i,title:r}):l):this.addToast({title:r,...n,dismissible:i,id:a}),a},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(o=>o({id:t,dismiss:!0})))):this.toasts.forEach(o=>{this.subscribers.forEach(r=>r({id:o.id,dismiss:!0}))}),t),this.message=(t,o)=>this.create({...o,message:t}),this.error=(t,o)=>this.create({...o,message:t,type:"error"}),this.success=(t,o)=>this.create({...o,type:"success",message:t}),this.info=(t,o)=>this.create({...o,type:"info",message:t}),this.warning=(t,o)=>this.create({...o,type:"warning",message:t}),this.loading=(t,o)=>this.create({...o,type:"loading",message:t}),this.promise=(t,o)=>{if(!o)return;let r;o.loading!==void 0&&(r=this.create({...o,promise:t,type:"loading",message:o.loading,description:typeof o.description!="function"?o.description:void 0}));const n=Promise.resolve(t instanceof Function?t():t);let a=r!==void 0,s;const i=n.then(async u=>{if(s=["resolve",u],x.isValidElement(u))a=!1,this.create({id:r,type:"default",message:u});else if(sc(u)&&!u.ok){a=!1;const c=typeof o.error=="function"?await o.error(`HTTP error! status: ${u.status}`):o.error,h=typeof o.description=="function"?await o.description(`HTTP error! status: ${u.status}`):o.description,b=typeof c=="object"&&!x.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:h,...b})}else if(u instanceof Error){a=!1;const c=typeof o.error=="function"?await o.error(u):o.error,h=typeof o.description=="function"?await o.description(u):o.description,b=typeof c=="object"&&!x.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:h,...b})}else if(o.success!==void 0){a=!1;const c=typeof o.success=="function"?await o.success(u):o.success,h=typeof o.description=="function"?await o.description(u):o.description,b=typeof c=="object"&&!x.isValidElement(c)?c:{message:c};this.create({id:r,type:"success",description:h,...b})}}).catch(async u=>{if(s=["reject",u],o.error!==void 0){a=!1;const f=typeof o.error=="function"?await o.error(u):o.error,c=typeof o.description=="function"?await o.description(u):o.description,g=typeof f=="object"&&!x.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:c,...g})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),o.finally==null||o.finally.call(o)}),l=()=>new Promise((u,f)=>i.then(()=>s[0]==="reject"?f(s[1]):u(s[1])).catch(f));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,o)=>{const r=(o==null?void 0:o.id)||Vo++;return this.create({jsx:t(r),id:r,...o}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const ge=new nc,ac=(e,t)=>{const o=(t==null?void 0:t.id)||Vo++;return ge.addToast({title:e,...t,id:o}),o},sc=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",ic=ac,lc=()=>ge.toasts,cc=()=>ge.getActiveToasts(),pt=Object.assign(ic,{success:ge.success,info:ge.info,warning:ge.warning,error:ge.error,custom:ge.custom,message:ge.message,promise:ge.promise,dismiss:ge.dismiss,loading:ge.loading},{getHistory:lc,getToasts:cc});Yl("[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 Rt(e){return e.label!==void 0}const dc=3,uc="24px",fc="16px",dn=4e3,pc=356,hc=14,gc=45,mc=200;function Me(...e){return e.filter(Boolean).join(" ")}function vc(e){const[t,o]=e.split("-"),r=[];return t&&r.push(t),o&&r.push(o),r}const bc=e=>{var t,o,r,n,a,s,i,l,u;const{invert:f,toast:c,unstyled:h,interacting:g,setHeights:b,visibleToasts:m,heights:v,index:w,toasts:y,expanded:k,removeToast:E,defaultRichColors:_,closeButton:P,style:T,cancelButtonStyle:S,actionButtonStyle:I,className:D="",descriptionClassName:L="",duration:V,position:W,gap:U,expandByDefault:J,classNames:M,icons:R,closeButtonAriaLabel:N="Close toast"}=e,[A,C]=x.useState(null),[z,H]=x.useState(null),[O,G]=x.useState(!1),[j,Q]=x.useState(!1),[F,q]=x.useState(!1),[Z,se]=x.useState(!1),[re,te]=x.useState(!1),[ce,de]=x.useState(0),[ct,Qe]=x.useState(0),Pe=x.useRef(c.duration||V||dn),Do=x.useRef(null),ve=x.useRef(null),eb=w===0,tb=w+1<=m,xe=c.type,Nt=c.dismissible!==!1,ob=c.className||"",rb=c.descriptionClassName||"",$o=x.useMemo(()=>v.findIndex(ee=>ee.toastId===c.id)||0,[v,c.id]),nb=x.useMemo(()=>{var ee;return(ee=c.closeButton)!=null?ee:P},[c.closeButton,P]),El=x.useMemo(()=>c.duration||V||dn,[c.duration,V]),en=x.useRef(0),Tt=x.useRef(0),Nl=x.useRef(0),_t=x.useRef(null),[ab,sb]=W.split("-"),Tl=x.useMemo(()=>v.reduce((ee,ue,he)=>he>=$o?ee:ee+ue.height,0),[v,$o]),_l=rc(),ib=c.invert||f,tn=xe==="loading";Tt.current=x.useMemo(()=>$o*U+Tl,[$o,Tl]),x.useEffect(()=>{Pe.current=El},[El]),x.useEffect(()=>{G(!0)},[]),x.useEffect(()=>{const ee=ve.current;if(ee){const ue=ee.getBoundingClientRect().height;return Qe(ue),b(he=>[{toastId:c.id,height:ue,position:c.position},...he]),()=>b(he=>he.filter(ke=>ke.toastId!==c.id))}},[b,c.id]),x.useLayoutEffect(()=>{if(!O)return;const ee=ve.current,ue=ee.style.height;ee.style.height="auto";const he=ee.getBoundingClientRect().height;ee.style.height=ue,Qe(he),b(ke=>ke.find(fe=>fe.toastId===c.id)?ke.map(fe=>fe.toastId===c.id?{...fe,height:he}:fe):[{toastId:c.id,height:he,position:c.position},...ke])},[O,c.title,c.description,b,c.id,c.jsx,c.action,c.cancel]);const et=x.useCallback(()=>{Q(!0),de(Tt.current),b(ee=>ee.filter(ue=>ue.toastId!==c.id)),setTimeout(()=>{E(c)},mc)},[c,E,b,Tt]);x.useEffect(()=>{if(c.promise&&xe==="loading"||c.duration===1/0||c.type==="loading")return;let ee;return k||g||_l?(()=>{if(Nl.current<en.current){const ke=new Date().getTime()-en.current;Pe.current=Pe.current-ke}Nl.current=new Date().getTime()})():(()=>{Pe.current!==1/0&&(en.current=new Date().getTime(),ee=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),et()},Pe.current))})(),()=>clearTimeout(ee)},[k,g,c,xe,_l,et]),x.useEffect(()=>{c.delete&&(et(),c.onDismiss==null||c.onDismiss.call(c,c))},[et,c.delete]);function lb(){var ee;if(R!=null&&R.loading){var ue;return x.createElement("div",{className:Me(M==null?void 0:M.loader,c==null||(ue=c.classNames)==null?void 0:ue.loader,"sonner-loader"),"data-visible":xe==="loading"},R.loading)}return x.createElement(Zl,{className:Me(M==null?void 0:M.loader,c==null||(ee=c.classNames)==null?void 0:ee.loader),visible:xe==="loading"})}const cb=c.icon||(R==null?void 0:R[xe])||Xl(xe);var Pl,Al;return x.createElement("li",{tabIndex:0,ref:ve,className:Me(D,ob,M==null?void 0:M.toast,c==null||(t=c.classNames)==null?void 0:t.toast,M==null?void 0:M.default,M==null?void 0:M[xe],c==null||(o=c.classNames)==null?void 0:o[xe]),"data-sonner-toast":"","data-rich-colors":(Pl=c.richColors)!=null?Pl:_,"data-styled":!(c.jsx||c.unstyled||h),"data-mounted":O,"data-promise":!!c.promise,"data-swiped":re,"data-removed":j,"data-visible":tb,"data-y-position":ab,"data-x-position":sb,"data-index":w,"data-front":eb,"data-swiping":F,"data-dismissible":Nt,"data-type":xe,"data-invert":ib,"data-swipe-out":Z,"data-swipe-direction":z,"data-expanded":!!(k||J&&O),"data-testid":c.testId,style:{"--index":w,"--toasts-before":w,"--z-index":y.length-w,"--offset":`${j?ce:Tt.current}px`,"--initial-height":J?"auto":`${ct}px`,...T,...c.style},onDragEnd:()=>{q(!1),C(null),_t.current=null},onPointerDown:ee=>{ee.button!==2&&(tn||!Nt||(Do.current=new Date,de(Tt.current),ee.target.setPointerCapture(ee.pointerId),ee.target.tagName!=="BUTTON"&&(q(!0),_t.current={x:ee.clientX,y:ee.clientY})))},onPointerUp:()=>{var ee,ue,he;if(Z||!Nt)return;_t.current=null;const ke=Number(((ee=ve.current)==null?void 0:ee.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Fo=Number(((ue=ve.current)==null?void 0:ue.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),fe=new Date().getTime()-((he=Do.current)==null?void 0:he.getTime()),Ce=A==="x"?ke:Fo,Bo=Math.abs(Ce)/fe;if(Math.abs(Ce)>=gc||Bo>.11){de(Tt.current),c.onDismiss==null||c.onDismiss.call(c,c),H(A==="x"?ke>0?"right":"left":Fo>0?"down":"up"),et(),se(!0);return}else{var Ae,Ie;(Ae=ve.current)==null||Ae.style.setProperty("--swipe-amount-x","0px"),(Ie=ve.current)==null||Ie.style.setProperty("--swipe-amount-y","0px")}te(!1),q(!1),C(null)},onPointerMove:ee=>{var ue,he,ke;if(!_t.current||!Nt||((ue=window.getSelection())==null?void 0:ue.toString().length)>0)return;const fe=ee.clientY-_t.current.y,Ce=ee.clientX-_t.current.x;var Bo;const Ae=(Bo=e.swipeDirections)!=null?Bo:vc(W);!A&&(Math.abs(Ce)>1||Math.abs(fe)>1)&&C(Math.abs(Ce)>Math.abs(fe)?"x":"y");let Ie={x:0,y:0};const Il=dt=>1/(1.5+Math.abs(dt)/20);if(A==="y"){if(Ae.includes("top")||Ae.includes("bottom"))if(Ae.includes("top")&&fe<0||Ae.includes("bottom")&&fe>0)Ie.y=fe;else{const dt=fe*Il(fe);Ie.y=Math.abs(dt)<Math.abs(fe)?dt:fe}}else if(A==="x"&&(Ae.includes("left")||Ae.includes("right")))if(Ae.includes("left")&&Ce<0||Ae.includes("right")&&Ce>0)Ie.x=Ce;else{const dt=Ce*Il(Ce);Ie.x=Math.abs(dt)<Math.abs(Ce)?dt:Ce}(Math.abs(Ie.x)>0||Math.abs(Ie.y)>0)&&te(!0),(he=ve.current)==null||he.style.setProperty("--swipe-amount-x",`${Ie.x}px`),(ke=ve.current)==null||ke.style.setProperty("--swipe-amount-y",`${Ie.y}px`)}},nb&&!c.jsx&&xe!=="loading"?x.createElement("button",{"aria-label":N,"data-disabled":tn,"data-close-button":!0,onClick:tn||!Nt?()=>{}:()=>{et(),c.onDismiss==null||c.onDismiss.call(c,c)},className:Me(M==null?void 0:M.closeButton,c==null||(r=c.classNames)==null?void 0:r.closeButton)},(Al=R==null?void 0:R.close)!=null?Al:oc):null,(xe||c.icon||c.promise)&&c.icon!==null&&((R==null?void 0:R[xe])!==null||c.icon)?x.createElement("div",{"data-icon":"",className:Me(M==null?void 0:M.icon,c==null||(n=c.classNames)==null?void 0:n.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||lb():null,c.type!=="loading"?cb:null):null,x.createElement("div",{"data-content":"",className:Me(M==null?void 0:M.content,c==null||(a=c.classNames)==null?void 0:a.content)},x.createElement("div",{"data-title":"",className:Me(M==null?void 0:M.title,c==null||(s=c.classNames)==null?void 0:s.title)},c.jsx?c.jsx:typeof c.title=="function"?c.title():c.title),c.description?x.createElement("div",{"data-description":"",className:Me(L,rb,M==null?void 0:M.description,c==null||(i=c.classNames)==null?void 0:i.description)},typeof c.description=="function"?c.description():c.description):null),x.isValidElement(c.cancel)?c.cancel:c.cancel&&Rt(c.cancel)?x.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||S,onClick:ee=>{Rt(c.cancel)&&Nt&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,ee),et())},className:Me(M==null?void 0:M.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,x.isValidElement(c.action)?c.action:c.action&&Rt(c.action)?x.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||I,onClick:ee=>{Rt(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,ee),!ee.defaultPrevented&&et())},className:Me(M==null?void 0:M.actionButton,c==null||(u=c.classNames)==null?void 0:u.actionButton)},c.action.label):null)};function un(){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 wc(e,t){const o={};return[e,t].forEach((r,n)=>{const a=n===1,s=a?"--mobile-offset":"--offset",i=a?fc:uc;function l(u){["top","right","bottom","left"].forEach(f=>{o[`${s}-${f}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?o[`${s}-${u}`]=i:o[`${s}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(i)}),o}const yc=x.forwardRef(function(t,o){const{id:r,invert:n,position:a="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:l,className:u,offset:f,mobileOffset:c,theme:h="light",richColors:g,duration:b,style:m,visibleToasts:v=dc,toastOptions:w,dir:y=un(),gap:k=hc,icons:E,containerAriaLabel:_="Notifications"}=t,[P,T]=x.useState([]),S=x.useMemo(()=>r?P.filter(O=>O.toasterId===r):P.filter(O=>!O.toasterId),[P,r]),I=x.useMemo(()=>Array.from(new Set([a].concat(S.filter(O=>O.position).map(O=>O.position)))),[S,a]),[D,L]=x.useState([]),[V,W]=x.useState(!1),[U,J]=x.useState(!1),[M,R]=x.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),N=x.useRef(null),A=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),C=x.useRef(null),z=x.useRef(!1),H=x.useCallback(O=>{T(G=>{var j;return(j=G.find(Q=>Q.id===O.id))!=null&&j.delete||ge.dismiss(O.id),G.filter(({id:Q})=>Q!==O.id)})},[]);return x.useEffect(()=>ge.subscribe(O=>{if(O.dismiss){requestAnimationFrame(()=>{T(G=>G.map(j=>j.id===O.id?{...j,delete:!0}:j))});return}setTimeout(()=>{Ho.flushSync(()=>{T(G=>{const j=G.findIndex(Q=>Q.id===O.id);return j!==-1?[...G.slice(0,j),{...G[j],...O},...G.slice(j+1)]:[O,...G]})})})}),[P]),x.useEffect(()=>{if(h!=="system"){R(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?R("dark"):R("light")),typeof window>"u")return;const O=window.matchMedia("(prefers-color-scheme: dark)");try{O.addEventListener("change",({matches:G})=>{R(G?"dark":"light")})}catch{O.addListener(({matches:j})=>{try{R(j?"dark":"light")}catch(Q){console.error(Q)}})}},[h]),x.useEffect(()=>{P.length<=1&&W(!1)},[P]),x.useEffect(()=>{const O=G=>{var j;if(s.every(q=>G[q]||G.code===q)){var F;W(!0),(F=N.current)==null||F.focus()}G.code==="Escape"&&(document.activeElement===N.current||(j=N.current)!=null&&j.contains(document.activeElement))&&W(!1)};return document.addEventListener("keydown",O),()=>document.removeEventListener("keydown",O)},[s]),x.useEffect(()=>{if(N.current)return()=>{C.current&&(C.current.focus({preventScroll:!0}),C.current=null,z.current=!1)}},[N.current]),x.createElement("section",{ref:o,"aria-label":`${_} ${A}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},I.map((O,G)=>{var j;const[Q,F]=O.split("-");return S.length?x.createElement("ol",{key:O,dir:y==="auto"?un():y,tabIndex:-1,ref:N,className:u,"data-sonner-toaster":!0,"data-sonner-theme":M,"data-y-position":Q,"data-x-position":F,style:{"--front-toast-height":`${((j=D[0])==null?void 0:j.height)||0}px`,"--width":`${pc}px`,"--gap":`${k}px`,...m,...wc(f,c)},onBlur:q=>{z.current&&!q.currentTarget.contains(q.relatedTarget)&&(z.current=!1,C.current&&(C.current.focus({preventScroll:!0}),C.current=null))},onFocus:q=>{q.target instanceof HTMLElement&&q.target.dataset.dismissible==="false"||z.current||(z.current=!0,C.current=q.relatedTarget)},onMouseEnter:()=>W(!0),onMouseMove:()=>W(!0),onMouseLeave:()=>{U||W(!1)},onDragEnd:()=>W(!1),onPointerDown:q=>{q.target instanceof HTMLElement&&q.target.dataset.dismissible==="false"||J(!0)},onPointerUp:()=>J(!1)},S.filter(q=>!q.position&&G===0||q.position===O).map((q,Z)=>{var se,re;return x.createElement(bc,{key:q.id,icons:E,index:Z,toast:q,defaultRichColors:g,duration:(se=w==null?void 0:w.duration)!=null?se:b,className:w==null?void 0:w.className,descriptionClassName:w==null?void 0:w.descriptionClassName,invert:n,visibleToasts:v,closeButton:(re=w==null?void 0:w.closeButton)!=null?re:l,interacting:U,position:O,style:w==null?void 0:w.style,unstyled:w==null?void 0:w.unstyled,classNames:w==null?void 0:w.classNames,cancelButtonStyle:w==null?void 0:w.cancelButtonStyle,actionButtonStyle:w==null?void 0:w.actionButtonStyle,closeButtonAriaLabel:w==null?void 0:w.closeButtonAriaLabel,removeToast:H,toasts:S.filter(te=>te.position==q.position),heights:D.filter(te=>te.position==q.position),setHeights:L,expandByDefault:i,gap:k,expanded:V,swipeDirections:t.swipeDirections})})):null}))}),xc=e=>e.startsWith("http")&&!e.endsWith(".js"),fn=e=>{try{const{hostname:t}=new URL(e);return t==="localhost"||t==="127.0.0.1"||t.endsWith(".trycloudflare.com")||t.endsWith(".ngrok-free.app")}catch{return!1}},kc=e=>{const t=e.replace(/-/g,"+").replace(/_/g,"/"),o=t+"=".repeat((4-t.length%4)%4);return atob(o)},Sc=(e,t)=>{const o=e.indexOf(":");if(o===-1)return;const r=e.slice(0,o),n=e.slice(o+1);if(!(!r||!n)){if(!n.startsWith("http")){try{const a=JSON.parse(kc(n));if(a.url&&fn(a.url))return{extensionId:r,bundleUrl:a.url,mode:t,token:a.token}}catch{}return}if(fn(n))return{extensionId:r,bundleUrl:n,mode:t}}},pn=(e,t,o)=>{const r=e.getAll(t);if(r.length===0)return[];const n=[];for(const a of r){const s=a.split(",");for(const i of s){const l=Sc(i,o);l&&n.push(l)}}return n},hn=e=>{const t=new URLSearchParams(e);try{const o=pn(t,"_stackable_dev","dev"),r=pn(t,"_stackable_staging","staging"),n=new Map;for(const a of o)n.set(a.extensionId,a);for(const a of r)n.set(a.extensionId,a);return Array.from(n.values())}catch{return[]}},Cc=async(e,t)=>t.length===0?e:Promise.all(e.map(async o=>{const r=t.find(n=>n.extensionId===o.id);if(!r)return o;console.log(`[Stackable] Dev override active for ${o.id} → ${r.bundleUrl}`);try{const n=await fetch(`${r.bundleUrl}/manifest.json`);if(n.ok){const a=await n.json();return console.log(`[Stackable] Dev manifest loaded for ${o.id}`,a.permissions),{...o,bundleUrl:r.bundleUrl,manifest:a}}}catch{console.warn(`[Stackable] Could not fetch dev manifest for ${o.id}, using registry manifest`)}return{...o,bundleUrl:r.bundleUrl}}));/**
12
+ </html>`;r.srcdoc=l,console.warn(`[SandboxManager] Creating srcdoc sandbox for ${e.id}, srcdoc starts with: ${l.substring(0,300)}`)}t.appendChild(r);const a={extensionId:e.id,iframe:r,manifest:e.manifest,ready:!1,messageHandlers:new Set},s=i=>{const l=i.data;!l||typeof l!="object"||!("type"in l)||("extensionId"in l?l.extensionId:void 0)!==e.id||(l.type==="extension-ready"&&(a.ready=!0),a.messageHandlers.forEach(f=>f(l)))};return window.addEventListener("message",s),tt.set(e.id,a),a},Fe=(e,t)=>{const o=tt.get(e);if(!(o!=null&&o.iframe.contentWindow)){console.warn(`Sandbox not found for extension: ${e}`);return}o.iframe.contentWindow.postMessage(t,"*")},ut=e=>tt.get(e),zl=e=>{const t=tt.get(e);t&&(t.iframe.remove(),t.messageHandlers.clear(),tt.delete(e))},Pt=()=>tt,Dl=e=>e,nn={ADMIN:"org:super_admin"},an={ADMIN:"org:admin",OWNER:"org:owner"},$l=[nn.ADMIN,an.ADMIN,an.OWNER];[...Object.values(nn),...Object.values($l)];const sn={"ui-card":{description:"Card container for grouping related content",icon:"square",category:"layout",attributes:["className","onClick"],children:["ui-card-header","ui-card-content"]},"ui-card-content":{description:"Content area within a Card",icon:"square",category:"layout",attributes:["className"]},"ui-card-header":{description:"Header area within a Card",icon:"square",category:"layout",attributes:["className"]},"ui-button":{description:"Interactive button with variant and size options",icon:"mouse-pointer-click",category:"input",attributes:["variant","size","disabled","onClick","type","className","title"],attributeValues:{variant:["default","destructive","outline","secondary","ghost","link"],size:["default","xs","sm","lg","icon"]}},"ui-text":{description:"Paragraph text",icon:"type",category:"text",attributes:["className","tone"],attributeValues:{tone:["default","muted","destructive"]}},"ui-heading":{description:"Heading element (h1–h6)",icon:"heading",category:"text",attributes:["level","className"],attributeValues:{level:["1","2","3","4","5","6"]}},"ui-badge":{description:"Small label for status, category, or count",icon:"tag",category:"text",attributes:["variant","hue","tone","className"],attributeValues:{variant:["default","secondary","destructive","outline","ghost","link"],hue:["amber","blue","emerald","red","purple","pink","gray"],tone:["default","muted","destructive"]}},"ui-input":{description:"Single-line text input field",icon:"text-cursor-input",category:"input",attributes:["type","placeholder","value","onChange","disabled","className","id"]},"ui-textarea":{description:"Multi-line text input field",icon:"text",category:"input",attributes:["placeholder","value","onChange","disabled","rows","className","id"]},"ui-select":{description:"Dropdown select with options",icon:"chevrons-up-down",category:"input",attributes:["value","defaultValue","onChange","placeholder","disabled","className"],children:["ui-select-option"]},"ui-select-option":{description:"Option within a Select dropdown",icon:"chevrons-up-down",category:"input",attributes:["value","disabled","className"]},"ui-checkbox":{description:"Checkbox toggle for boolean values",icon:"square-check",category:"input",attributes:["checked","onChange","disabled","className","id"]},"ui-switch":{description:"Toggle switch for on/off states",icon:"toggle-left",category:"input",attributes:["checked","onChange","disabled","size","className","id"],attributeValues:{size:["sm","default"]}},"ui-label":{description:"Form label associated with an input",icon:"tag",category:"input",attributes:["htmlFor","className"]},"ui-radio-group":{description:"Group of radio buttons for single selection",icon:"circle-dot",category:"input",attributes:["value","defaultValue","onChange","className"],children:["ui-radio-group-item","ui-label","ui-inline"]},"ui-radio-group-item":{description:"Individual radio button within a RadioGroup",icon:"circle-dot",category:"input",attributes:["value","disabled","className","id"]},"ui-stack":{description:"Vertical or horizontal flex container with gap",icon:"rows-3",category:"layout",attributes:["gap","direction","className"],attributeValues:{direction:["row","column"],gap:["0","1","2","3","4","5","6","8","10","12"]}},"ui-inline":{description:"Horizontal flex container with centered items",icon:"columns-3",category:"layout",attributes:["gap","className"],attributeValues:{gap:["0","1","2","3","4","5","6","8","10","12"]}},"ui-separator":{description:"Horizontal divider line",icon:"minus",category:"layout",attributes:["className"]},"ui-tabs":{description:"Tabbed content container",icon:"panel-top",category:"navigation",attributes:["defaultValue","className"],children:["ui-tabs-list","ui-tabs-content"]},"ui-tabs-list":{description:"Container for tab triggers",icon:"panel-top",category:"navigation",attributes:["className"],children:["ui-tabs-trigger"]},"ui-tabs-trigger":{description:"Clickable tab label within TabsList",icon:"panel-top",category:"navigation",attributes:["value","className"]},"ui-tabs-content":{description:"Content panel shown when its tab is active",icon:"panel-top",category:"navigation",attributes:["value","className"]},"ui-scroll-area":{description:"Scrollable content container",icon:"scroll",category:"layout",attributes:["className"]},"ui-avatar":{description:"User avatar with image and initials fallback",icon:"circle-user",category:"composite",attributes:["src","alt","className"]},"ui-icon":{description:"Icon from the allowed icon set",icon:"sparkles",category:"composite",attributes:["name","size","className"],attributeValues:{size:["sm","md","lg"]}},"ui-link":{description:"Hyperlink element",icon:"link",category:"navigation",attributes:["href","target","rel","className"]},"ui-menu":{description:"Card-based menu with clickable items",icon:"menu",category:"navigation",attributes:["title","className"],children:["ui-menu-item"]},"ui-menu-item":{description:"Clickable item within a Menu",icon:"menu",category:"navigation",attributes:["icon","label","description","onClick","className"]},"ui-skeleton":{description:"Loading placeholder with shimmer effect",icon:"loader",category:"feedback",attributes:["width","height","className"]},"ui-tooltip":{description:"Hover tooltip with text content",icon:"message-square",category:"feedback",attributes:["content","className"]},"ui-progress":{description:"Progress bar with percentage value",icon:"bar-chart",category:"feedback",attributes:["value","className"]},"ui-alert":{description:"Alert banner with icon and optional title",icon:"alert-circle",category:"feedback",attributes:["variant","title","className"],attributeValues:{variant:["default","destructive"]}},"ui-collapsible":{description:"Expandable/collapsible content section",icon:"chevrons-down-up",category:"composite",attributes:["defaultOpen","className"],children:["ui-collapsible-trigger","ui-collapsible-content"]},"ui-collapsible-trigger":{description:"Clickable trigger to toggle Collapsible",icon:"chevrons-down-up",category:"composite",attributes:["className"]},"ui-collapsible-content":{description:"Content revealed when Collapsible is open",icon:"chevrons-down-up",category:"composite",attributes:["className"]}},ft=sn,At=Object.keys(sn),Fl=Object.fromEntries(At.map(e=>[e,ft[e].attributes]));Object.fromEntries(At.filter(e=>ft[e].attributeValues).map(e=>[e,ft[e].attributeValues]));const Bl=Object.fromEntries(At.filter(e=>ft[e].children).map(e=>[e,ft[e].children]));Object.fromEntries(At.map(e=>[e,ft[e].category]));const Hl=["identity","messaging"],Vl={"context.read":"context:read","data.query":"data:query","data.fetch":"data:fetch","actions.toast":"actions:toast","actions.invoke":"actions:invoke","extend.identity":"extend:identity"},Wl=e=>{const t=async o=>{const r=o.data;if((r==null?void 0:r.type)!=="capability-request")return;const n=r;console.warn("[CapabilityRPC] raw message data:",JSON.stringify(o.data));const a=n.extensionId;if(!a||!ut(a)){const l=[...Pt().keys()];console.warn(`Received capability request from unknown source (extensionId: "${a??"undefined"}", registered: [${l.join(", ")}], capability: ${n.capability})`);return}const s=ut(a);if(!s)return;const i=Vl[n.capability];if(i&&!s.manifest.permissions.includes(i)){const l={type:"capability-response",id:n.id,success:!1,error:`Permission denied: '${i}' not granted for extension '${a}'`};Fe(a,l);return}try{let l;switch(n.capability){case"data.query":l=await e["data.query"](n.payload);break;case"data.fetch":l=await e["data.fetch"](a,n.payload);break;case"actions.toast":l=await e["actions.toast"](a,n.payload);break;case"actions.invoke":l=await e["actions.invoke"](n.payload);break;case"context.read":l=await e["context.read"]();break;case"extend.identity":l=e["extend.identity"]?await e["extend.identity"](a,n.payload):null;break;default:throw new Error(`Unknown capability: ${n.capability}`)}const u={type:"capability-response",id:n.id,success:!0,data:l};Fe(a,u)}catch(l){const u={type:"capability-response",id:n.id,success:!1,error:l instanceof Error?l.message:"Unknown error"};Fe(a,u)}};return window.addEventListener("message",t),()=>{window.removeEventListener("message",t)}},ln=x.createContext({extensions:[],components:{},ready:!1}),Ul=({extensions:e,capabilityHandlers:t,components:o={},children:r})=>{const[n,a]=x.useState(!1),s=x.useRef(null),i=x.useRef(null),l=x.useRef(t);return l.current=t,x.useEffect(()=>{if(!s.current)return;let u=!1;return(async()=>{const c=s.current;if(!c)return;console.log("[ExtensionProvider] Initializing with",e.length,"extensions");const h=new Proxy({},{get:(g,b)=>l.current[b]});i.current=Wl(h);for(const g of e)g.enabled&&!u&&(console.log("[ExtensionProvider] Creating sandbox for",g.id,"bundleUrl:",g.bundleUrl),await Ll(g,c),console.log("[ExtensionProvider] Sandbox created for",g.id));u||(console.log("[ExtensionProvider] Ready"),a(!0))})(),()=>{var c;u=!0;for(const h of e)zl(h.id);(c=i.current)==null||c.call(i)}},[e]),d.jsxs(ln.Provider,{value:{extensions:e,components:o,ready:n},children:[d.jsx("div",{ref:s,style:{display:"none"}}),r]})},cn=()=>x.useContext(ln),jl=e=>At.includes(e),Rl=(e,t={})=>{const{surfaceId:o,logPrefix:r="[NodeRenderer]"}=t,n=(a,s,i=0)=>{var g,b,m;if(a.type==="text")return a.text||null;if(!a.tag)return null;if(a.tag==="__fragment")return d.jsx(x.Fragment,{children:(g=a.children)==null?void 0:g.map((v,w)=>n(v,s,w))},i);if(!jl(a.tag))return console.warn(`${r} Unknown UI tag rejected: <${a.tag}>`),null;const l=e[a.tag];if(!l)return a.tag.startsWith("ui-")?(console.warn(`${r} Unregistered UI tag: <${a.tag}>`),null):d.jsx(x.Fragment,{children:(b=a.children)==null?void 0:b.map((v,w)=>n(v,s,w))},i);const{filtered:u,stripped:f}=Gl(a.tag,a.attrs);f.length>0&&console.warn(`${r} Attributes not allowed on <${a.tag}>, stripped: ${f.join(", ")}`);const c=ql(a.tag,a.children);if(c.length>0&&console.warn(`${r} Invalid children in <${a.tag}>: ${c.join(", ")}`),a.actionId){const v=a.actionId;u.onClick=()=>{const w=s;w==null||w.postMessage({type:"action-invoke",surfaceId:o,actionId:v},"*")}}if(u["data-onchange-id"]){const v=u["data-onchange-id"];delete u["data-onchange-id"],u.onChange=w=>{const y=s;y==null||y.postMessage({type:"action-invoke",surfaceId:o,actionId:v,value:w.target.value},"*")}}const h=(m=a.children)==null?void 0:m.map((v,w)=>n(v,s,w));return x.createElement(l,{...u,key:i},h&&h.length>0?h:void 0)};return n},Gl=(e,t)=>{const o={},r=[];if(!t)return{filtered:o,stripped:r};const n=Fl[e];for(const[a,s]of Object.entries(t)){if(a==="data-onchange-id"){o[a]=s;continue}n!=null&&n.includes(a)?o[a]=s:r.push(a)}return{filtered:o,stripped:r}},ql=(e,t)=>{const o=Bl[e];if(!o||!t)return[];const r=[];for(const n of t)n.type!=="text"&&(!n.tag||n.tag==="__fragment"||o.includes(n.tag)||r.push(n.tag));return r},Yl=e=>{const t={...e};for(const o of Hl)delete t[o];return t},jt=({target:e,context:t,className:o,separator:r,fallback:n=null,render:a})=>{const{extensions:s,components:i,ready:l}=cn(),[u,f]=x.useState({}),c=x.useRef(""),h=x.useMemo(()=>s.filter(v=>v.enabled&&v.manifest.targets.includes(e)),[s.map(v=>v.id).join(","),e]),g=x.useMemo(()=>Rl(i,{surfaceId:e,logPrefix:"[ExtensionSlot]"}),[e,i]);if(x.useEffect(()=>{const v=h.map(y=>y.id).join(",");if(c.current!==v&&(c.current=v,f({})),!l||h.length===0)return;const w=y=>{const k=y.data;if(!(!k||typeof k!="object"||!h.some(T=>{const P=ut(T.id);return P&&y.source===P.iframe.contentWindow}))){if(k.type==="surface-update"&&k.surfaceId===e){const T=h.find(_=>{const E=ut(_.id);return E&&y.source===E.iframe.contentWindow});if(!T)return;const P=g(k.tree,y.source??null);f(_=>({..._,[T.id]:P}))}if(k.type==="surface-ready"&&k.surfaceId===e&&t){const T=Yl(t);h.forEach(P=>{var E;const _=ut(P.id);(E=_==null?void 0:_.iframe.contentWindow)==null||E.postMessage({type:"context-update",surfaceId:e,context:T},"*")})}}};return window.addEventListener("message",w),h.forEach(y=>{var C;const k=ut(y.id);(C=k==null?void 0:k.iframe.contentWindow)==null||C.postMessage({type:"surface-render",surfaceId:e,context:t},"*")}),()=>{window.removeEventListener("message",w)}},[l,h,e,t,g]),!l)return null;if(h.length===0)return n?d.jsx("div",{"data-extension-slot":e,title:e,className:o,children:n}):null;const b=h.map(v=>({id:v.id,children:u[v.id]})).filter(v=>!!v.children),m=b.length>0?b.flatMap((v,w,y)=>{const k=a?a({extensionId:v.id,children:v.children,index:w,total:y.length}):d.jsx(x.Fragment,{children:v.children},v.id),C=d.jsx(x.Fragment,{children:k},`extension:${v.id}`);if(w===0||!r)return[C];const T=y[w-1],P=typeof r=="function"?r({index:w,total:y.length,previousExtensionId:T.id,extensionId:v.id}):r;return[d.jsx(x.Fragment,{children:P},`separator:${T.id}:${v.id}:${w}`),C]}):n;return d.jsx("div",{"data-extension-slot":e,title:e,className:o,children:m})};function Xl(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",t.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}const Kl=e=>{switch(e){case"success":return Ql;case"info":return tc;case"warning":return ec;case"error":return oc;default:return null}},Zl=Array(12).fill(0),Jl=({visible:e,className:t})=>x.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},x.createElement("div",{className:"sonner-spinner"},Zl.map((o,r)=>x.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Ql=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},x.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"})),ec=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},x.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"})),tc=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},x.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"})),oc=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},x.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"})),rc=x.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"},x.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),x.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),nc=()=>{const[e,t]=x.useState(document.hidden);return x.useEffect(()=>{const o=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",o),()=>window.removeEventListener("visibilitychange",o)},[]),e};let Vo=1;class ac{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const o=this.subscribers.indexOf(t);this.subscribers.splice(o,1)}),this.publish=t=>{this.subscribers.forEach(o=>o(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var o;const{message:r,...n}=t,a=typeof(t==null?void 0:t.id)=="number"||((o=t.id)==null?void 0:o.length)>0?t.id:Vo++,s=this.toasts.find(l=>l.id===a),i=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),s?this.toasts=this.toasts.map(l=>l.id===a?(this.publish({...l,...t,id:a,title:r}),{...l,...t,id:a,dismissible:i,title:r}):l):this.addToast({title:r,...n,dismissible:i,id:a}),a},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(o=>o({id:t,dismiss:!0})))):this.toasts.forEach(o=>{this.subscribers.forEach(r=>r({id:o.id,dismiss:!0}))}),t),this.message=(t,o)=>this.create({...o,message:t}),this.error=(t,o)=>this.create({...o,message:t,type:"error"}),this.success=(t,o)=>this.create({...o,type:"success",message:t}),this.info=(t,o)=>this.create({...o,type:"info",message:t}),this.warning=(t,o)=>this.create({...o,type:"warning",message:t}),this.loading=(t,o)=>this.create({...o,type:"loading",message:t}),this.promise=(t,o)=>{if(!o)return;let r;o.loading!==void 0&&(r=this.create({...o,promise:t,type:"loading",message:o.loading,description:typeof o.description!="function"?o.description:void 0}));const n=Promise.resolve(t instanceof Function?t():t);let a=r!==void 0,s;const i=n.then(async u=>{if(s=["resolve",u],x.isValidElement(u))a=!1,this.create({id:r,type:"default",message:u});else if(ic(u)&&!u.ok){a=!1;const c=typeof o.error=="function"?await o.error(`HTTP error! status: ${u.status}`):o.error,h=typeof o.description=="function"?await o.description(`HTTP error! status: ${u.status}`):o.description,b=typeof c=="object"&&!x.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:h,...b})}else if(u instanceof Error){a=!1;const c=typeof o.error=="function"?await o.error(u):o.error,h=typeof o.description=="function"?await o.description(u):o.description,b=typeof c=="object"&&!x.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:h,...b})}else if(o.success!==void 0){a=!1;const c=typeof o.success=="function"?await o.success(u):o.success,h=typeof o.description=="function"?await o.description(u):o.description,b=typeof c=="object"&&!x.isValidElement(c)?c:{message:c};this.create({id:r,type:"success",description:h,...b})}}).catch(async u=>{if(s=["reject",u],o.error!==void 0){a=!1;const f=typeof o.error=="function"?await o.error(u):o.error,c=typeof o.description=="function"?await o.description(u):o.description,g=typeof f=="object"&&!x.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:c,...g})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),o.finally==null||o.finally.call(o)}),l=()=>new Promise((u,f)=>i.then(()=>s[0]==="reject"?f(s[1]):u(s[1])).catch(f));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,o)=>{const r=(o==null?void 0:o.id)||Vo++;return this.create({jsx:t(r),id:r,...o}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const ge=new ac,sc=(e,t)=>{const o=(t==null?void 0:t.id)||Vo++;return ge.addToast({title:e,...t,id:o}),o},ic=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",lc=sc,cc=()=>ge.toasts,dc=()=>ge.getActiveToasts(),pt=Object.assign(lc,{success:ge.success,info:ge.info,warning:ge.warning,error:ge.error,custom:ge.custom,message:ge.message,promise:ge.promise,dismiss:ge.dismiss,loading:ge.loading},{getHistory:cc,getToasts:dc});Xl("[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 Rt(e){return e.label!==void 0}const uc=3,fc="24px",pc="16px",dn=4e3,hc=356,gc=14,mc=45,vc=200;function Me(...e){return e.filter(Boolean).join(" ")}function bc(e){const[t,o]=e.split("-"),r=[];return t&&r.push(t),o&&r.push(o),r}const wc=e=>{var t,o,r,n,a,s,i,l,u;const{invert:f,toast:c,unstyled:h,interacting:g,setHeights:b,visibleToasts:m,heights:v,index:w,toasts:y,expanded:k,removeToast:C,defaultRichColors:T,closeButton:P,style:_,cancelButtonStyle:E,actionButtonStyle:I,className:L="",descriptionClassName:F="",duration:D,position:V,gap:j,expandByDefault:G,classNames:M,icons:U,closeButtonAriaLabel:N="Close toast"}=e,[A,S]=x.useState(null),[z,W]=x.useState(null),[O,q]=x.useState(!1),[R,Q]=x.useState(!1),[B,Y]=x.useState(!1),[J,se]=x.useState(!1),[re,te]=x.useState(!1),[ce,de]=x.useState(0),[ct,Qe]=x.useState(0),Pe=x.useRef(c.duration||D||dn),Do=x.useRef(null),ve=x.useRef(null),ob=w===0,rb=w+1<=m,xe=c.type,Nt=c.dismissible!==!1,nb=c.className||"",ab=c.descriptionClassName||"",$o=x.useMemo(()=>v.findIndex(ee=>ee.toastId===c.id)||0,[v,c.id]),sb=x.useMemo(()=>{var ee;return(ee=c.closeButton)!=null?ee:P},[c.closeButton,P]),El=x.useMemo(()=>c.duration||D||dn,[c.duration,D]),en=x.useRef(0),Tt=x.useRef(0),Nl=x.useRef(0),_t=x.useRef(null),[ib,lb]=V.split("-"),Tl=x.useMemo(()=>v.reduce((ee,ue,he)=>he>=$o?ee:ee+ue.height,0),[v,$o]),_l=nc(),cb=c.invert||f,tn=xe==="loading";Tt.current=x.useMemo(()=>$o*j+Tl,[$o,Tl]),x.useEffect(()=>{Pe.current=El},[El]),x.useEffect(()=>{q(!0)},[]),x.useEffect(()=>{const ee=ve.current;if(ee){const ue=ee.getBoundingClientRect().height;return Qe(ue),b(he=>[{toastId:c.id,height:ue,position:c.position},...he]),()=>b(he=>he.filter(ke=>ke.toastId!==c.id))}},[b,c.id]),x.useLayoutEffect(()=>{if(!O)return;const ee=ve.current,ue=ee.style.height;ee.style.height="auto";const he=ee.getBoundingClientRect().height;ee.style.height=ue,Qe(he),b(ke=>ke.find(fe=>fe.toastId===c.id)?ke.map(fe=>fe.toastId===c.id?{...fe,height:he}:fe):[{toastId:c.id,height:he,position:c.position},...ke])},[O,c.title,c.description,b,c.id,c.jsx,c.action,c.cancel]);const et=x.useCallback(()=>{Q(!0),de(Tt.current),b(ee=>ee.filter(ue=>ue.toastId!==c.id)),setTimeout(()=>{C(c)},vc)},[c,C,b,Tt]);x.useEffect(()=>{if(c.promise&&xe==="loading"||c.duration===1/0||c.type==="loading")return;let ee;return k||g||_l?(()=>{if(Nl.current<en.current){const ke=new Date().getTime()-en.current;Pe.current=Pe.current-ke}Nl.current=new Date().getTime()})():(()=>{Pe.current!==1/0&&(en.current=new Date().getTime(),ee=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),et()},Pe.current))})(),()=>clearTimeout(ee)},[k,g,c,xe,_l,et]),x.useEffect(()=>{c.delete&&(et(),c.onDismiss==null||c.onDismiss.call(c,c))},[et,c.delete]);function db(){var ee;if(U!=null&&U.loading){var ue;return x.createElement("div",{className:Me(M==null?void 0:M.loader,c==null||(ue=c.classNames)==null?void 0:ue.loader,"sonner-loader"),"data-visible":xe==="loading"},U.loading)}return x.createElement(Jl,{className:Me(M==null?void 0:M.loader,c==null||(ee=c.classNames)==null?void 0:ee.loader),visible:xe==="loading"})}const ub=c.icon||(U==null?void 0:U[xe])||Kl(xe);var Pl,Al;return x.createElement("li",{tabIndex:0,ref:ve,className:Me(L,nb,M==null?void 0:M.toast,c==null||(t=c.classNames)==null?void 0:t.toast,M==null?void 0:M.default,M==null?void 0:M[xe],c==null||(o=c.classNames)==null?void 0:o[xe]),"data-sonner-toast":"","data-rich-colors":(Pl=c.richColors)!=null?Pl:T,"data-styled":!(c.jsx||c.unstyled||h),"data-mounted":O,"data-promise":!!c.promise,"data-swiped":re,"data-removed":R,"data-visible":rb,"data-y-position":ib,"data-x-position":lb,"data-index":w,"data-front":ob,"data-swiping":B,"data-dismissible":Nt,"data-type":xe,"data-invert":cb,"data-swipe-out":J,"data-swipe-direction":z,"data-expanded":!!(k||G&&O),"data-testid":c.testId,style:{"--index":w,"--toasts-before":w,"--z-index":y.length-w,"--offset":`${R?ce:Tt.current}px`,"--initial-height":G?"auto":`${ct}px`,..._,...c.style},onDragEnd:()=>{Y(!1),S(null),_t.current=null},onPointerDown:ee=>{ee.button!==2&&(tn||!Nt||(Do.current=new Date,de(Tt.current),ee.target.setPointerCapture(ee.pointerId),ee.target.tagName!=="BUTTON"&&(Y(!0),_t.current={x:ee.clientX,y:ee.clientY})))},onPointerUp:()=>{var ee,ue,he;if(J||!Nt)return;_t.current=null;const ke=Number(((ee=ve.current)==null?void 0:ee.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Fo=Number(((ue=ve.current)==null?void 0:ue.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),fe=new Date().getTime()-((he=Do.current)==null?void 0:he.getTime()),Ce=A==="x"?ke:Fo,Bo=Math.abs(Ce)/fe;if(Math.abs(Ce)>=mc||Bo>.11){de(Tt.current),c.onDismiss==null||c.onDismiss.call(c,c),W(A==="x"?ke>0?"right":"left":Fo>0?"down":"up"),et(),se(!0);return}else{var Ae,Ie;(Ae=ve.current)==null||Ae.style.setProperty("--swipe-amount-x","0px"),(Ie=ve.current)==null||Ie.style.setProperty("--swipe-amount-y","0px")}te(!1),Y(!1),S(null)},onPointerMove:ee=>{var ue,he,ke;if(!_t.current||!Nt||((ue=window.getSelection())==null?void 0:ue.toString().length)>0)return;const fe=ee.clientY-_t.current.y,Ce=ee.clientX-_t.current.x;var Bo;const Ae=(Bo=e.swipeDirections)!=null?Bo:bc(V);!A&&(Math.abs(Ce)>1||Math.abs(fe)>1)&&S(Math.abs(Ce)>Math.abs(fe)?"x":"y");let Ie={x:0,y:0};const Il=dt=>1/(1.5+Math.abs(dt)/20);if(A==="y"){if(Ae.includes("top")||Ae.includes("bottom"))if(Ae.includes("top")&&fe<0||Ae.includes("bottom")&&fe>0)Ie.y=fe;else{const dt=fe*Il(fe);Ie.y=Math.abs(dt)<Math.abs(fe)?dt:fe}}else if(A==="x"&&(Ae.includes("left")||Ae.includes("right")))if(Ae.includes("left")&&Ce<0||Ae.includes("right")&&Ce>0)Ie.x=Ce;else{const dt=Ce*Il(Ce);Ie.x=Math.abs(dt)<Math.abs(Ce)?dt:Ce}(Math.abs(Ie.x)>0||Math.abs(Ie.y)>0)&&te(!0),(he=ve.current)==null||he.style.setProperty("--swipe-amount-x",`${Ie.x}px`),(ke=ve.current)==null||ke.style.setProperty("--swipe-amount-y",`${Ie.y}px`)}},sb&&!c.jsx&&xe!=="loading"?x.createElement("button",{"aria-label":N,"data-disabled":tn,"data-close-button":!0,onClick:tn||!Nt?()=>{}:()=>{et(),c.onDismiss==null||c.onDismiss.call(c,c)},className:Me(M==null?void 0:M.closeButton,c==null||(r=c.classNames)==null?void 0:r.closeButton)},(Al=U==null?void 0:U.close)!=null?Al:rc):null,(xe||c.icon||c.promise)&&c.icon!==null&&((U==null?void 0:U[xe])!==null||c.icon)?x.createElement("div",{"data-icon":"",className:Me(M==null?void 0:M.icon,c==null||(n=c.classNames)==null?void 0:n.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||db():null,c.type!=="loading"?ub:null):null,x.createElement("div",{"data-content":"",className:Me(M==null?void 0:M.content,c==null||(a=c.classNames)==null?void 0:a.content)},x.createElement("div",{"data-title":"",className:Me(M==null?void 0:M.title,c==null||(s=c.classNames)==null?void 0:s.title)},c.jsx?c.jsx:typeof c.title=="function"?c.title():c.title),c.description?x.createElement("div",{"data-description":"",className:Me(F,ab,M==null?void 0:M.description,c==null||(i=c.classNames)==null?void 0:i.description)},typeof c.description=="function"?c.description():c.description):null),x.isValidElement(c.cancel)?c.cancel:c.cancel&&Rt(c.cancel)?x.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||E,onClick:ee=>{Rt(c.cancel)&&Nt&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,ee),et())},className:Me(M==null?void 0:M.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,x.isValidElement(c.action)?c.action:c.action&&Rt(c.action)?x.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||I,onClick:ee=>{Rt(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,ee),!ee.defaultPrevented&&et())},className:Me(M==null?void 0:M.actionButton,c==null||(u=c.classNames)==null?void 0:u.actionButton)},c.action.label):null)};function un(){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 yc(e,t){const o={};return[e,t].forEach((r,n)=>{const a=n===1,s=a?"--mobile-offset":"--offset",i=a?pc:fc;function l(u){["top","right","bottom","left"].forEach(f=>{o[`${s}-${f}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?o[`${s}-${u}`]=i:o[`${s}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(i)}),o}const xc=x.forwardRef(function(t,o){const{id:r,invert:n,position:a="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:l,className:u,offset:f,mobileOffset:c,theme:h="light",richColors:g,duration:b,style:m,visibleToasts:v=uc,toastOptions:w,dir:y=un(),gap:k=gc,icons:C,containerAriaLabel:T="Notifications"}=t,[P,_]=x.useState([]),E=x.useMemo(()=>r?P.filter(O=>O.toasterId===r):P.filter(O=>!O.toasterId),[P,r]),I=x.useMemo(()=>Array.from(new Set([a].concat(E.filter(O=>O.position).map(O=>O.position)))),[E,a]),[L,F]=x.useState([]),[D,V]=x.useState(!1),[j,G]=x.useState(!1),[M,U]=x.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),N=x.useRef(null),A=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),S=x.useRef(null),z=x.useRef(!1),W=x.useCallback(O=>{_(q=>{var R;return(R=q.find(Q=>Q.id===O.id))!=null&&R.delete||ge.dismiss(O.id),q.filter(({id:Q})=>Q!==O.id)})},[]);return x.useEffect(()=>ge.subscribe(O=>{if(O.dismiss){requestAnimationFrame(()=>{_(q=>q.map(R=>R.id===O.id?{...R,delete:!0}:R))});return}setTimeout(()=>{Ho.flushSync(()=>{_(q=>{const R=q.findIndex(Q=>Q.id===O.id);return R!==-1?[...q.slice(0,R),{...q[R],...O},...q.slice(R+1)]:[O,...q]})})})}),[P]),x.useEffect(()=>{if(h!=="system"){U(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?U("dark"):U("light")),typeof window>"u")return;const O=window.matchMedia("(prefers-color-scheme: dark)");try{O.addEventListener("change",({matches:q})=>{U(q?"dark":"light")})}catch{O.addListener(({matches:R})=>{try{U(R?"dark":"light")}catch(Q){console.error(Q)}})}},[h]),x.useEffect(()=>{P.length<=1&&V(!1)},[P]),x.useEffect(()=>{const O=q=>{var R;if(s.every(Y=>q[Y]||q.code===Y)){var B;V(!0),(B=N.current)==null||B.focus()}q.code==="Escape"&&(document.activeElement===N.current||(R=N.current)!=null&&R.contains(document.activeElement))&&V(!1)};return document.addEventListener("keydown",O),()=>document.removeEventListener("keydown",O)},[s]),x.useEffect(()=>{if(N.current)return()=>{S.current&&(S.current.focus({preventScroll:!0}),S.current=null,z.current=!1)}},[N.current]),x.createElement("section",{ref:o,"aria-label":`${T} ${A}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},I.map((O,q)=>{var R;const[Q,B]=O.split("-");return E.length?x.createElement("ol",{key:O,dir:y==="auto"?un():y,tabIndex:-1,ref:N,className:u,"data-sonner-toaster":!0,"data-sonner-theme":M,"data-y-position":Q,"data-x-position":B,style:{"--front-toast-height":`${((R=L[0])==null?void 0:R.height)||0}px`,"--width":`${hc}px`,"--gap":`${k}px`,...m,...yc(f,c)},onBlur:Y=>{z.current&&!Y.currentTarget.contains(Y.relatedTarget)&&(z.current=!1,S.current&&(S.current.focus({preventScroll:!0}),S.current=null))},onFocus:Y=>{Y.target instanceof HTMLElement&&Y.target.dataset.dismissible==="false"||z.current||(z.current=!0,S.current=Y.relatedTarget)},onMouseEnter:()=>V(!0),onMouseMove:()=>V(!0),onMouseLeave:()=>{j||V(!1)},onDragEnd:()=>V(!1),onPointerDown:Y=>{Y.target instanceof HTMLElement&&Y.target.dataset.dismissible==="false"||G(!0)},onPointerUp:()=>G(!1)},E.filter(Y=>!Y.position&&q===0||Y.position===O).map((Y,J)=>{var se,re;return x.createElement(wc,{key:Y.id,icons:C,index:J,toast:Y,defaultRichColors:g,duration:(se=w==null?void 0:w.duration)!=null?se:b,className:w==null?void 0:w.className,descriptionClassName:w==null?void 0:w.descriptionClassName,invert:n,visibleToasts:v,closeButton:(re=w==null?void 0:w.closeButton)!=null?re:l,interacting:j,position:O,style:w==null?void 0:w.style,unstyled:w==null?void 0:w.unstyled,classNames:w==null?void 0:w.classNames,cancelButtonStyle:w==null?void 0:w.cancelButtonStyle,actionButtonStyle:w==null?void 0:w.actionButtonStyle,closeButtonAriaLabel:w==null?void 0:w.closeButtonAriaLabel,removeToast:W,toasts:E.filter(te=>te.position==Y.position),heights:L.filter(te=>te.position==Y.position),setHeights:F,expandByDefault:i,gap:k,expanded:D,swipeDirections:t.swipeDirections})})):null}))}),kc=e=>e.startsWith("http")&&!e.endsWith(".js"),fn=e=>{try{const{hostname:t}=new URL(e);return t==="localhost"||t==="127.0.0.1"||t.endsWith(".trycloudflare.com")||t.endsWith(".ngrok-free.app")}catch{return!1}},Sc=e=>{const t=e.replace(/-/g,"+").replace(/_/g,"/"),o=t+"=".repeat((4-t.length%4)%4);return atob(o)},Cc=(e,t)=>{const o=e.indexOf(":");if(o===-1)return;const r=e.slice(0,o),n=e.slice(o+1);if(!(!r||!n)){if(!n.startsWith("http")){try{const a=JSON.parse(Sc(n));if(a.url&&fn(a.url))return{extensionId:r,bundleUrl:a.url,mode:t,token:a.token}}catch{}return}if(fn(n))return{extensionId:r,bundleUrl:n,mode:t}}},pn=(e,t,o)=>{const r=e.getAll(t);if(r.length===0)return[];const n=[];for(const a of r){const s=a.split(",");for(const i of s){const l=Cc(i,o);l&&n.push(l)}}return n},hn=e=>{const t=new URLSearchParams(e);try{const o=pn(t,"_stackable_dev","dev"),r=pn(t,"_stackable_staging","staging"),n=new Map;for(const a of o)n.set(a.extensionId,a);for(const a of r)n.set(a.extensionId,a);return Array.from(n.values())}catch{return[]}},Ec=async(e,t)=>t.length===0?e:Promise.all(e.map(async o=>{const r=t.find(n=>n.extensionId===o.id);if(!r)return o;console.log(`[Stackable] Dev override active for ${o.id} → ${r.bundleUrl}`);try{const n=await fetch(`${r.bundleUrl}/manifest.json`);if(n.ok){const a=await n.json();return console.log(`[Stackable] Dev manifest loaded for ${o.id}`,a.permissions),{...o,bundleUrl:r.bundleUrl,manifest:a}}}catch{console.warn(`[Stackable] Could not fetch dev manifest for ${o.id}, using registry manifest`)}return{...o,bundleUrl:r.bundleUrl}}));/**
13
13
  * @license lucide-react v0.577.0 - ISC
14
14
  *
15
15
  * This source code is licensed under the ISC license.
@@ -19,62 +19,62 @@
19
19
  *
20
20
  * This source code is licensed under the ISC license.
21
21
  * See the LICENSE file in the root directory of this source tree.
22
- */const Ec=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
22
+ */const Nc=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
23
23
  * @license lucide-react v0.577.0 - ISC
24
24
  *
25
25
  * This source code is licensed under the ISC license.
26
26
  * See the LICENSE file in the root directory of this source tree.
27
- */const Nc=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,o,r)=>r?r.toUpperCase():o.toLowerCase());/**
27
+ */const Tc=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,o,r)=>r?r.toUpperCase():o.toLowerCase());/**
28
28
  * @license lucide-react v0.577.0 - ISC
29
29
  *
30
30
  * This source code is licensed under the ISC license.
31
31
  * See the LICENSE file in the root directory of this source tree.
32
- */const mn=e=>{const t=Nc(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
32
+ */const mn=e=>{const t=Tc(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
33
33
  * @license lucide-react v0.577.0 - ISC
34
34
  *
35
35
  * This source code is licensed under the ISC license.
36
36
  * See the LICENSE file in the root directory of this source tree.
37
- */var Tc={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"};/**
37
+ */var _c={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"};/**
38
38
  * @license lucide-react v0.577.0 - ISC
39
39
  *
40
40
  * This source code is licensed under the ISC license.
41
41
  * See the LICENSE file in the root directory of this source tree.
42
- */const _c=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
42
+ */const Pc=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
43
43
  * @license lucide-react v0.577.0 - ISC
44
44
  *
45
45
  * This source code is licensed under the ISC license.
46
46
  * See the LICENSE file in the root directory of this source tree.
47
- */const Pc=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:o=2,absoluteStrokeWidth:r,className:n="",children:a,iconNode:s,...i},l)=>x.createElement("svg",{ref:l,...Tc,width:t,height:t,stroke:e,strokeWidth:r?Number(o)*24/Number(t):o,className:gn("lucide",n),...!a&&!_c(i)&&{"aria-hidden":"true"},...i},[...s.map(([u,f])=>x.createElement(u,f)),...Array.isArray(a)?a:[a]]));/**
47
+ */const Ac=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:o=2,absoluteStrokeWidth:r,className:n="",children:a,iconNode:s,...i},l)=>x.createElement("svg",{ref:l,..._c,width:t,height:t,stroke:e,strokeWidth:r?Number(o)*24/Number(t):o,className:gn("lucide",n),...!a&&!Pc(i)&&{"aria-hidden":"true"},...i},[...s.map(([u,f])=>x.createElement(u,f)),...Array.isArray(a)?a:[a]]));/**
48
48
  * @license lucide-react v0.577.0 - ISC
49
49
  *
50
50
  * This source code is licensed under the ISC license.
51
51
  * See the LICENSE file in the root directory of this source tree.
52
- */const ne=(e,t)=>{const o=x.forwardRef(({className:r,...n},a)=>x.createElement(Pc,{ref:a,iconNode:t,className:gn(`lucide-${Ec(mn(e))}`,`lucide-${e}`,r),...n}));return o.displayName=mn(e),o};/**
52
+ */const ne=(e,t)=>{const o=x.forwardRef(({className:r,...n},a)=>x.createElement(Ac,{ref:a,iconNode:t,className:gn(`lucide-${Nc(mn(e))}`,`lucide-${e}`,r),...n}));return o.displayName=mn(e),o};/**
53
53
  * @license lucide-react v0.577.0 - ISC
54
54
  *
55
55
  * This source code is licensed under the ISC license.
56
56
  * See the LICENSE file in the root directory of this source tree.
57
- */const Ac=ne("airplay",[["path",{d:"M5 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-1",key:"ns4c3b"}],["path",{d:"m12 15 5 6H7Z",key:"14qnn2"}]]);/**
57
+ */const Ic=ne("airplay",[["path",{d:"M5 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-1",key:"ns4c3b"}],["path",{d:"m12 15 5 6H7Z",key:"14qnn2"}]]);/**
58
58
  * @license lucide-react v0.577.0 - ISC
59
59
  *
60
60
  * This source code is licensed under the ISC license.
61
61
  * See the LICENSE file in the root directory of this source tree.
62
- */const Ic=ne("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
62
+ */const Mc=ne("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
63
63
  * @license lucide-react v0.577.0 - ISC
64
64
  *
65
65
  * This source code is licensed under the ISC license.
66
66
  * See the LICENSE file in the root directory of this source tree.
67
- */const Mc=ne("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
67
+ */const Oc=ne("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
68
68
  * @license lucide-react v0.577.0 - ISC
69
69
  *
70
70
  * This source code is licensed under the ISC license.
71
71
  * See the LICENSE file in the root directory of this source tree.
72
- */const Oc=ne("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
72
+ */const Lc=ne("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
73
73
  * @license lucide-react v0.577.0 - ISC
74
74
  *
75
75
  * This source code is licensed under the ISC license.
76
76
  * See the LICENSE file in the root directory of this source tree.
77
- */const Lc=ne("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
77
+ */const zc=ne("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
78
78
  * @license lucide-react v0.577.0 - ISC
79
79
  *
80
80
  * This source code is licensed under the ISC license.
@@ -89,7 +89,7 @@
89
89
  *
90
90
  * This source code is licensed under the ISC license.
91
91
  * See the LICENSE file in the root directory of this source tree.
92
- */const zc=ne("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
92
+ */const Dc=ne("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
93
93
  * @license lucide-react v0.577.0 - ISC
94
94
  *
95
95
  * This source code is licensed under the ISC license.
@@ -99,7 +99,7 @@
99
99
  *
100
100
  * This source code is licensed under the ISC license.
101
101
  * See the LICENSE file in the root directory of this source tree.
102
- */const Dc=ne("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
102
+ */const $c=ne("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
103
103
  * @license lucide-react v0.577.0 - ISC
104
104
  *
105
105
  * This source code is licensed under the ISC license.
@@ -119,37 +119,37 @@
119
119
  *
120
120
  * This source code is licensed under the ISC license.
121
121
  * See the LICENSE file in the root directory of this source tree.
122
- */const $c=ne("circle-x",[["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"}]]);/**
122
+ */const Fc=ne("circle-x",[["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"}]]);/**
123
123
  * @license lucide-react v0.577.0 - ISC
124
124
  *
125
125
  * This source code is licensed under the ISC license.
126
126
  * See the LICENSE file in the root directory of this source tree.
127
- */const Fc=ne("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
127
+ */const Bc=ne("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
128
128
  * @license lucide-react v0.577.0 - ISC
129
129
  *
130
130
  * This source code is licensed under the ISC license.
131
131
  * See the LICENSE file in the root directory of this source tree.
132
- */const Bc=ne("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);/**
132
+ */const Hc=ne("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);/**
133
133
  * @license lucide-react v0.577.0 - ISC
134
134
  *
135
135
  * This source code is licensed under the ISC license.
136
136
  * See the LICENSE file in the root directory of this source tree.
137
- */const Hc=ne("corner-right-down",[["path",{d:"m10 15 5 5 5-5",key:"1hpjnr"}],["path",{d:"M4 4h7a4 4 0 0 1 4 4v12",key:"wcbgct"}]]);/**
137
+ */const Vc=ne("corner-right-down",[["path",{d:"m10 15 5 5 5-5",key:"1hpjnr"}],["path",{d:"M4 4h7a4 4 0 0 1 4 4v12",key:"wcbgct"}]]);/**
138
138
  * @license lucide-react v0.577.0 - ISC
139
139
  *
140
140
  * This source code is licensed under the ISC license.
141
141
  * See the LICENSE file in the root directory of this source tree.
142
- */const Vc=ne("credit-card",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/**
142
+ */const Wc=ne("credit-card",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/**
143
143
  * @license lucide-react v0.577.0 - ISC
144
144
  *
145
145
  * This source code is licensed under the ISC license.
146
146
  * See the LICENSE file in the root directory of this source tree.
147
- */const Wc=ne("external-link",[["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"}]]);/**
147
+ */const Uc=ne("external-link",[["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"}]]);/**
148
148
  * @license lucide-react v0.577.0 - ISC
149
149
  *
150
150
  * This source code is licensed under the ISC license.
151
151
  * See the LICENSE file in the root directory of this source tree.
152
- */const Uc=ne("headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]);/**
152
+ */const jc=ne("headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]);/**
153
153
  * @license lucide-react v0.577.0 - ISC
154
154
  *
155
155
  * This source code is licensed under the ISC license.
@@ -169,7 +169,7 @@
169
169
  *
170
170
  * This source code is licensed under the ISC license.
171
171
  * See the LICENSE file in the root directory of this source tree.
172
- */const jc=ne("map-pin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
172
+ */const Rc=ne("map-pin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
173
173
  * @license lucide-react v0.577.0 - ISC
174
174
  *
175
175
  * This source code is licensed under the ISC license.
@@ -184,27 +184,32 @@
184
184
  *
185
185
  * This source code is licensed under the ISC license.
186
186
  * See the LICENSE file in the root directory of this source tree.
187
- */const Rc=ne("octagon-x",[["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"}]]);/**
187
+ */const Gc=ne("octagon-x",[["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"}]]);/**
188
188
  * @license lucide-react v0.577.0 - ISC
189
189
  *
190
190
  * This source code is licensed under the ISC license.
191
191
  * See the LICENSE file in the root directory of this source tree.
192
- */const Gc=ne("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
192
+ */const qc=ne("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
193
193
  * @license lucide-react v0.577.0 - ISC
194
194
  *
195
195
  * This source code is licensed under the ISC license.
196
196
  * See the LICENSE file in the root directory of this source tree.
197
- */const qc=ne("phone",[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]);/**
197
+ */const Yc=ne("phone",[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]);/**
198
198
  * @license lucide-react v0.577.0 - ISC
199
199
  *
200
200
  * This source code is licensed under the ISC license.
201
201
  * See the LICENSE file in the root directory of this source tree.
202
- */const Yc=ne("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);/**
202
+ */const Xc=ne("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
203
203
  * @license lucide-react v0.577.0 - ISC
204
204
  *
205
205
  * This source code is licensed under the ISC license.
206
206
  * See the LICENSE file in the root directory of this source tree.
207
- */const Xc=ne("shopping-bag",[["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}],["path",{d:"M3.103 6.034h17.794",key:"awc11p"}],["path",{d:"M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z",key:"o988cm"}]]);/**
207
+ */const Kc=ne("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);/**
208
+ * @license lucide-react v0.577.0 - ISC
209
+ *
210
+ * This source code is licensed under the ISC license.
211
+ * See the LICENSE file in the root directory of this source tree.
212
+ */const Zc=ne("shopping-bag",[["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}],["path",{d:"M3.103 6.034h17.794",key:"awc11p"}],["path",{d:"M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z",key:"o988cm"}]]);/**
208
213
  * @license lucide-react v0.577.0 - ISC
209
214
  *
210
215
  * This source code is licensed under the ISC license.
@@ -214,12 +219,12 @@
214
219
  *
215
220
  * This source code is licensed under the ISC license.
216
221
  * See the LICENSE file in the root directory of this source tree.
217
- */const Kc=ne("triangle-alert",[["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"}]]);/**
222
+ */const Jc=ne("triangle-alert",[["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"}]]);/**
218
223
  * @license lucide-react v0.577.0 - ISC
219
224
  *
220
225
  * This source code is licensed under the ISC license.
221
226
  * See the LICENSE file in the root directory of this source tree.
222
- */const Zc=ne("truck",[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]]);/**
227
+ */const Qc=ne("truck",[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]]);/**
223
228
  * @license lucide-react v0.577.0 - ISC
224
229
  *
225
230
  * This source code is licensed under the ISC license.
@@ -229,8 +234,8 @@
229
234
  *
230
235
  * This source code is licensed under the ISC license.
231
236
  * See the LICENSE file in the root directory of this source tree.
232
- */const Jc=ne("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function En(e){var t,o,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(o=En(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function Nn(){for(var e,t,o=0,r="",n=arguments.length;o<n;o++)(e=arguments[o])&&(t=En(e))&&(r&&(r+=" "),r+=t);return r}const Qc=(e,t)=>{const o=new Array(e.length+t.length);for(let r=0;r<e.length;r++)o[r]=e[r];for(let r=0;r<t.length;r++)o[e.length+r]=t[r];return o},ed=(e,t)=>({classGroupId:e,validator:t}),Tn=(e=new Map,t=null,o)=>({nextPart:e,validators:t,classGroupId:o}),qt="-",_n=[],td="arbitrary..",od=e=>{const t=nd(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return rd(s);const i=s.split(qt),l=i[0]===""&&i.length>1?1:0;return Pn(i,l,t)},getConflictingClassGroupIds:(s,i)=>{if(i){const l=r[s],u=o[s];return l?u?Qc(u,l):l:u||_n}return o[s]||_n}}},Pn=(e,t,o)=>{if(e.length-t===0)return o.classGroupId;const n=e[t],a=o.nextPart.get(n);if(a){const u=Pn(e,t+1,a);if(u)return u}const s=o.validators;if(s===null)return;const i=t===0?e.join(qt):e.slice(t).join(qt),l=s.length;for(let u=0;u<l;u++){const f=s[u];if(f.validator(i))return f.classGroupId}},rd=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),o=t.indexOf(":"),r=t.slice(0,o);return r?td+r:void 0})(),nd=e=>{const{theme:t,classGroups:o}=e;return ad(o,t)},ad=(e,t)=>{const o=Tn();for(const r in e){const n=e[r];Go(n,o,r,t)}return o},Go=(e,t,o,r)=>{const n=e.length;for(let a=0;a<n;a++){const s=e[a];sd(s,t,o,r)}},sd=(e,t,o,r)=>{if(typeof e=="string"){id(e,t,o);return}if(typeof e=="function"){ld(e,t,o,r);return}cd(e,t,o,r)},id=(e,t,o)=>{const r=e===""?t:An(t,e);r.classGroupId=o},ld=(e,t,o,r)=>{if(dd(e)){Go(e(r),t,o,r);return}t.validators===null&&(t.validators=[]),t.validators.push(ed(o,e))},cd=(e,t,o,r)=>{const n=Object.entries(e),a=n.length;for(let s=0;s<a;s++){const[i,l]=n[s];Go(l,An(t,i),o,r)}},An=(e,t)=>{let o=e;const r=t.split(qt),n=r.length;for(let a=0;a<n;a++){const s=r[a];let i=o.nextPart.get(s);i||(i=Tn(),o.nextPart.set(s,i)),o=i}return o},dd=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,ud=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=Object.create(null),r=Object.create(null);const n=(a,s)=>{o[a]=s,t++,t>e&&(t=0,r=o,o=Object.create(null))};return{get(a){let s=o[a];if(s!==void 0)return s;if((s=r[a])!==void 0)return n(a,s),s},set(a,s){a in o?o[a]=s:n(a,s)}}},qo="!",In=":",fd=[],Mn=(e,t,o,r,n)=>({modifiers:e,hasImportantModifier:t,baseClassName:o,maybePostfixModifierPosition:r,isExternal:n}),pd=e=>{const{prefix:t,experimentalParseClassName:o}=e;let r=n=>{const a=[];let s=0,i=0,l=0,u;const f=n.length;for(let m=0;m<f;m++){const v=n[m];if(s===0&&i===0){if(v===In){a.push(n.slice(l,m)),l=m+1;continue}if(v==="/"){u=m;continue}}v==="["?s++:v==="]"?s--:v==="("?i++:v===")"&&i--}const c=a.length===0?n:n.slice(l);let h=c,g=!1;c.endsWith(qo)?(h=c.slice(0,-1),g=!0):c.startsWith(qo)&&(h=c.slice(1),g=!0);const b=u&&u>l?u-l:void 0;return Mn(a,g,h,b)};if(t){const n=t+In,a=r;r=s=>s.startsWith(n)?a(s.slice(n.length)):Mn(fd,!1,s,void 0,!0)}if(o){const n=r;r=a=>o({className:a,parseClassName:n})}return r},hd=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((o,r)=>{t.set(o,1e6+r)}),o=>{const r=[];let n=[];for(let a=0;a<o.length;a++){const s=o[a],i=s[0]==="[",l=t.has(s);i||l?(n.length>0&&(n.sort(),r.push(...n),n=[]),r.push(s)):n.push(s)}return n.length>0&&(n.sort(),r.push(...n)),r}},gd=e=>({cache:ud(e.cacheSize),parseClassName:pd(e),sortModifiers:hd(e),...od(e)}),md=/\s+/,vd=(e,t)=>{const{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:n,sortModifiers:a}=t,s=[],i=e.trim().split(md);let l="";for(let u=i.length-1;u>=0;u-=1){const f=i[u],{isExternal:c,modifiers:h,hasImportantModifier:g,baseClassName:b,maybePostfixModifierPosition:m}=o(f);if(c){l=f+(l.length>0?" "+l:l);continue}let v=!!m,w=r(v?b.substring(0,m):b);if(!w){if(!v){l=f+(l.length>0?" "+l:l);continue}if(w=r(b),!w){l=f+(l.length>0?" "+l:l);continue}v=!1}const y=h.length===0?"":h.length===1?h[0]:a(h).join(":"),k=g?y+qo:y,E=k+w;if(s.indexOf(E)>-1)continue;s.push(E);const _=n(w,v);for(let P=0;P<_.length;++P){const T=_[P];s.push(k+T)}l=f+(l.length>0?" "+l:l)}return l},bd=(...e)=>{let t=0,o,r,n="";for(;t<e.length;)(o=e[t++])&&(r=On(o))&&(n&&(n+=" "),n+=r);return n},On=e=>{if(typeof e=="string")return e;let t,o="";for(let r=0;r<e.length;r++)e[r]&&(t=On(e[r]))&&(o&&(o+=" "),o+=t);return o},wd=(e,...t)=>{let o,r,n,a;const s=l=>{const u=t.reduce((f,c)=>c(f),e());return o=gd(u),r=o.cache.get,n=o.cache.set,a=i,i(l)},i=l=>{const u=r(l);if(u)return u;const f=vd(l,o);return n(l,f),f};return a=s,(...l)=>a(bd(...l))},yd=[],le=e=>{const t=o=>o[e]||yd;return t.isThemeGetter=!0,t},Ln=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,zn=/^\((?:(\w[\w-]*):)?(.+)\)$/i,xd=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,kd=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Sd=/\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$/,Cd=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ed=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Nd=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,je=e=>xd.test(e),oe=e=>!!e&&!Number.isNaN(Number(e)),Re=e=>!!e&&Number.isInteger(Number(e)),Yo=e=>e.endsWith("%")&&oe(e.slice(0,-1)),Be=e=>kd.test(e),Dn=()=>!0,Td=e=>Sd.test(e)&&!Cd.test(e),Xo=()=>!1,_d=e=>Ed.test(e),Pd=e=>Nd.test(e),Ad=e=>!$(e)&&!B(e),Id=e=>Ge(e,Wn,Xo),$=e=>Ln.test(e),ot=e=>Ge(e,Un,Td),$n=e=>Ge(e,Bd,oe),Md=e=>Ge(e,Rn,Dn),Od=e=>Ge(e,jn,Xo),Fn=e=>Ge(e,Hn,Xo),Ld=e=>Ge(e,Vn,Pd),Yt=e=>Ge(e,Gn,_d),B=e=>zn.test(e),It=e=>rt(e,Un),zd=e=>rt(e,jn),Bn=e=>rt(e,Hn),Dd=e=>rt(e,Wn),$d=e=>rt(e,Vn),Xt=e=>rt(e,Gn,!0),Fd=e=>rt(e,Rn,!0),Ge=(e,t,o)=>{const r=Ln.exec(e);return r?r[1]?t(r[1]):o(r[2]):!1},rt=(e,t,o=!1)=>{const r=zn.exec(e);return r?r[1]?t(r[1]):o:!1},Hn=e=>e==="position"||e==="percentage",Vn=e=>e==="image"||e==="url",Wn=e=>e==="length"||e==="size"||e==="bg-size",Un=e=>e==="length",Bd=e=>e==="number",jn=e=>e==="family-name",Rn=e=>e==="number"||e==="weight",Gn=e=>e==="shadow",Hd=wd(()=>{const e=le("color"),t=le("font"),o=le("text"),r=le("font-weight"),n=le("tracking"),a=le("leading"),s=le("breakpoint"),i=le("container"),l=le("spacing"),u=le("radius"),f=le("shadow"),c=le("inset-shadow"),h=le("text-shadow"),g=le("drop-shadow"),b=le("blur"),m=le("perspective"),v=le("aspect"),w=le("ease"),y=le("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],_=()=>[...E(),B,$],P=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],S=()=>[B,$,l],I=()=>[je,"full","auto",...S()],D=()=>[Re,"none","subgrid",B,$],L=()=>["auto",{span:["full",Re,B,$]},Re,B,$],V=()=>[Re,"auto",B,$],W=()=>["auto","min","max","fr",B,$],U=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],J=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...S()],R=()=>[je,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],N=()=>[je,"screen","full","dvw","lvw","svw","min","max","fit",...S()],A=()=>[je,"screen","full","lh","dvh","lvh","svh","min","max","fit",...S()],C=()=>[e,B,$],z=()=>[...E(),Bn,Fn,{position:[B,$]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],O=()=>["auto","cover","contain",Dd,Id,{size:[B,$]}],G=()=>[Yo,It,ot],j=()=>["","none","full",u,B,$],Q=()=>["",oe,It,ot],F=()=>["solid","dashed","dotted","double"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>[oe,Yo,Bn,Fn],se=()=>["","none",b,B,$],re=()=>["none",oe,B,$],te=()=>["none",oe,B,$],ce=()=>[oe,B,$],de=()=>[je,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Be],breakpoint:[Be],color:[Dn],container:[Be],"drop-shadow":[Be],ease:["in","out","in-out"],font:[Ad],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Be],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Be],shadow:[Be],spacing:["px",oe],text:[Be],"text-shadow":[Be],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",je,$,B,v]}],container:["container"],columns:[{columns:[oe,$,B,i]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"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"],sr:["sr-only","not-sr-only"],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:_()}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{"inset-s":I(),start:I()}],end:[{"inset-e":I(),end:I()}],"inset-bs":[{"inset-bs":I()}],"inset-be":[{"inset-be":I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[Re,"auto",B,$]}],basis:[{basis:[je,"full","auto",i,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[oe,je,"auto","initial","none",$]}],grow:[{grow:["",oe,B,$]}],shrink:[{shrink:["",oe,B,$]}],order:[{order:[Re,"first","last","none",B,$]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:L()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:L()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":W()}],"auto-rows":[{"auto-rows":W()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...U(),"normal"]}],"justify-items":[{"justify-items":[...J(),"normal"]}],"justify-self":[{"justify-self":["auto",...J()]}],"align-content":[{content:["normal",...U()]}],"align-items":[{items:[...J(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...J(),{baseline:["","last"]}]}],"place-content":[{"place-content":U()}],"place-items":[{"place-items":[...J(),"baseline"]}],"place-self":[{"place-self":["auto",...J()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pbs:[{pbs:S()}],pbe:[{pbe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:R()}],"inline-size":[{inline:["auto",...N()]}],"min-inline-size":[{"min-inline":["auto",...N()]}],"max-inline-size":[{"max-inline":["none",...N()]}],"block-size":[{block:["auto",...A()]}],"min-block-size":[{"min-block":["auto",...A()]}],"max-block-size":[{"max-block":["none",...A()]}],w:[{w:[i,"screen",...R()]}],"min-w":[{"min-w":[i,"screen","none",...R()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[s]},...R()]}],h:[{h:["screen","lh",...R()]}],"min-h":[{"min-h":["screen","lh","none",...R()]}],"max-h":[{"max-h":["screen","lh",...R()]}],"font-size":[{text:["base",o,It,ot]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Fd,Md]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Yo,$]}],"font-family":[{font:[zd,Od,t]}],"font-features":[{"font-features":[$]}],"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:[n,B,$]}],"line-clamp":[{"line-clamp":[oe,"none",B,$n]}],leading:[{leading:[a,...S()]}],"list-image":[{"list-image":["none",B,$]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",B,$]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:C()}],"text-color":[{text:C()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:[oe,"from-font","auto",B,ot]}],"text-decoration-color":[{decoration:C()}],"underline-offset":[{"underline-offset":[oe,"auto",B,$]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",B,$]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",B,$]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:z()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:O()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Re,B,$],radial:["",B,$],conic:[Re,B,$]},$d,Ld]}],"bg-color":[{bg:C()}],"gradient-from-pos":[{from:G()}],"gradient-via-pos":[{via:G()}],"gradient-to-pos":[{to:G()}],"gradient-from":[{from:C()}],"gradient-via":[{via:C()}],"gradient-to":[{to:C()}],rounded:[{rounded:j()}],"rounded-s":[{"rounded-s":j()}],"rounded-e":[{"rounded-e":j()}],"rounded-t":[{"rounded-t":j()}],"rounded-r":[{"rounded-r":j()}],"rounded-b":[{"rounded-b":j()}],"rounded-l":[{"rounded-l":j()}],"rounded-ss":[{"rounded-ss":j()}],"rounded-se":[{"rounded-se":j()}],"rounded-ee":[{"rounded-ee":j()}],"rounded-es":[{"rounded-es":j()}],"rounded-tl":[{"rounded-tl":j()}],"rounded-tr":[{"rounded-tr":j()}],"rounded-br":[{"rounded-br":j()}],"rounded-bl":[{"rounded-bl":j()}],"border-w":[{border:Q()}],"border-w-x":[{"border-x":Q()}],"border-w-y":[{"border-y":Q()}],"border-w-s":[{"border-s":Q()}],"border-w-e":[{"border-e":Q()}],"border-w-bs":[{"border-bs":Q()}],"border-w-be":[{"border-be":Q()}],"border-w-t":[{"border-t":Q()}],"border-w-r":[{"border-r":Q()}],"border-w-b":[{"border-b":Q()}],"border-w-l":[{"border-l":Q()}],"divide-x":[{"divide-x":Q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...F(),"hidden","none"]}],"divide-style":[{divide:[...F(),"hidden","none"]}],"border-color":[{border:C()}],"border-color-x":[{"border-x":C()}],"border-color-y":[{"border-y":C()}],"border-color-s":[{"border-s":C()}],"border-color-e":[{"border-e":C()}],"border-color-bs":[{"border-bs":C()}],"border-color-be":[{"border-be":C()}],"border-color-t":[{"border-t":C()}],"border-color-r":[{"border-r":C()}],"border-color-b":[{"border-b":C()}],"border-color-l":[{"border-l":C()}],"divide-color":[{divide:C()}],"outline-style":[{outline:[...F(),"none","hidden"]}],"outline-offset":[{"outline-offset":[oe,B,$]}],"outline-w":[{outline:["",oe,It,ot]}],"outline-color":[{outline:C()}],shadow:[{shadow:["","none",f,Xt,Yt]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":["none",c,Xt,Yt]}],"inset-shadow-color":[{"inset-shadow":C()}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:C()}],"ring-offset-w":[{"ring-offset":[oe,ot]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":Q()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":["none",h,Xt,Yt]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[oe,B,$]}],"mix-blend":[{"mix-blend":[...q(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":q()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[oe]}],"mask-image-linear-from-pos":[{"mask-linear-from":Z()}],"mask-image-linear-to-pos":[{"mask-linear-to":Z()}],"mask-image-linear-from-color":[{"mask-linear-from":C()}],"mask-image-linear-to-color":[{"mask-linear-to":C()}],"mask-image-t-from-pos":[{"mask-t-from":Z()}],"mask-image-t-to-pos":[{"mask-t-to":Z()}],"mask-image-t-from-color":[{"mask-t-from":C()}],"mask-image-t-to-color":[{"mask-t-to":C()}],"mask-image-r-from-pos":[{"mask-r-from":Z()}],"mask-image-r-to-pos":[{"mask-r-to":Z()}],"mask-image-r-from-color":[{"mask-r-from":C()}],"mask-image-r-to-color":[{"mask-r-to":C()}],"mask-image-b-from-pos":[{"mask-b-from":Z()}],"mask-image-b-to-pos":[{"mask-b-to":Z()}],"mask-image-b-from-color":[{"mask-b-from":C()}],"mask-image-b-to-color":[{"mask-b-to":C()}],"mask-image-l-from-pos":[{"mask-l-from":Z()}],"mask-image-l-to-pos":[{"mask-l-to":Z()}],"mask-image-l-from-color":[{"mask-l-from":C()}],"mask-image-l-to-color":[{"mask-l-to":C()}],"mask-image-x-from-pos":[{"mask-x-from":Z()}],"mask-image-x-to-pos":[{"mask-x-to":Z()}],"mask-image-x-from-color":[{"mask-x-from":C()}],"mask-image-x-to-color":[{"mask-x-to":C()}],"mask-image-y-from-pos":[{"mask-y-from":Z()}],"mask-image-y-to-pos":[{"mask-y-to":Z()}],"mask-image-y-from-color":[{"mask-y-from":C()}],"mask-image-y-to-color":[{"mask-y-to":C()}],"mask-image-radial":[{"mask-radial":[B,$]}],"mask-image-radial-from-pos":[{"mask-radial-from":Z()}],"mask-image-radial-to-pos":[{"mask-radial-to":Z()}],"mask-image-radial-from-color":[{"mask-radial-from":C()}],"mask-image-radial-to-color":[{"mask-radial-to":C()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":E()}],"mask-image-conic-pos":[{"mask-conic":[oe]}],"mask-image-conic-from-pos":[{"mask-conic-from":Z()}],"mask-image-conic-to-pos":[{"mask-conic-to":Z()}],"mask-image-conic-from-color":[{"mask-conic-from":C()}],"mask-image-conic-to-color":[{"mask-conic-to":C()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:z()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:O()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",B,$]}],filter:[{filter:["","none",B,$]}],blur:[{blur:se()}],brightness:[{brightness:[oe,B,$]}],contrast:[{contrast:[oe,B,$]}],"drop-shadow":[{"drop-shadow":["","none",g,Xt,Yt]}],"drop-shadow-color":[{"drop-shadow":C()}],grayscale:[{grayscale:["",oe,B,$]}],"hue-rotate":[{"hue-rotate":[oe,B,$]}],invert:[{invert:["",oe,B,$]}],saturate:[{saturate:[oe,B,$]}],sepia:[{sepia:["",oe,B,$]}],"backdrop-filter":[{"backdrop-filter":["","none",B,$]}],"backdrop-blur":[{"backdrop-blur":se()}],"backdrop-brightness":[{"backdrop-brightness":[oe,B,$]}],"backdrop-contrast":[{"backdrop-contrast":[oe,B,$]}],"backdrop-grayscale":[{"backdrop-grayscale":["",oe,B,$]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[oe,B,$]}],"backdrop-invert":[{"backdrop-invert":["",oe,B,$]}],"backdrop-opacity":[{"backdrop-opacity":[oe,B,$]}],"backdrop-saturate":[{"backdrop-saturate":[oe,B,$]}],"backdrop-sepia":[{"backdrop-sepia":["",oe,B,$]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",B,$]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[oe,"initial",B,$]}],ease:[{ease:["linear","initial",w,B,$]}],delay:[{delay:[oe,B,$]}],animate:[{animate:["none",y,B,$]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,B,$]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:re()}],"rotate-x":[{"rotate-x":re()}],"rotate-y":[{"rotate-y":re()}],"rotate-z":[{"rotate-z":re()}],scale:[{scale:te()}],"scale-x":[{"scale-x":te()}],"scale-y":[{"scale-y":te()}],"scale-z":[{"scale-z":te()}],"scale-3d":["scale-3d"],skew:[{skew:ce()}],"skew-x":[{"skew-x":ce()}],"skew-y":[{"skew-y":ce()}],transform:[{transform:[B,$,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:de()}],"translate-x":[{"translate-x":de()}],"translate-y":[{"translate-y":de()}],"translate-z":[{"translate-z":de()}],"translate-none":["translate-none"],accent:[{accent:C()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:C()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",B,$]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mbs":[{"scroll-mbs":S()}],"scroll-mbe":[{"scroll-mbe":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pbs":[{"scroll-pbs":S()}],"scroll-pbe":[{"scroll-pbe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"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",B,$]}],fill:[{fill:["none",...C()]}],"stroke-w":[{stroke:[oe,It,ot,$n]}],stroke:[{stroke:["none",...C()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","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-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","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-pbs","scroll-pbe","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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),Y=(...e)=>Hd(Nn(e));function Mt({className:e,...t}){return d.jsx("div",{"data-slot":"card",className:Y("flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",e),...t})}function Vd({className:e,...t}){return d.jsx("div",{"data-slot":"card-header",className:Y("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function Ot({className:e,...t}){return d.jsx("div",{"data-slot":"card-content",className:Y("px-6",e),...t})}const qn=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Yn=Nn,Kt=(e,t)=>o=>{var r;if((t==null?void 0:t.variants)==null)return Yn(e,o==null?void 0:o.class,o==null?void 0:o.className);const{variants:n,defaultVariants:a}=t,s=Object.keys(n).map(u=>{const f=o==null?void 0:o[u],c=a==null?void 0:a[u];if(f===null)return null;const h=qn(f)||qn(c);return n[u][h]}),i=o&&Object.entries(o).reduce((u,f)=>{let[c,h]=f;return h===void 0||(u[c]=h),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:c,className:h,...g}=f;return Object.entries(g).every(b=>{let[m,v]=b;return Array.isArray(v)?v.includes({...a,...i}[m]):{...a,...i}[m]===v})?[...u,c,h]:u},[]);return Yn(e,s,l,o==null?void 0:o.class,o==null?void 0:o.className)};function Xn(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Kn(...e){return t=>{let o=!1;const r=e.map(n=>{const a=Xn(n,t);return!o&&typeof a=="function"&&(o=!0),a});if(o)return()=>{for(let n=0;n<r.length;n++){const a=r[n];typeof a=="function"?a():Xn(e[n],null)}}}}function ae(...e){return p.useCallback(Kn(...e),e)}function Lt(e){const t=Wd(e),o=p.forwardRef((r,n)=>{const{children:a,...s}=r,i=p.Children.toArray(a),l=i.find(jd);if(l){const u=l.props.children,f=i.map(c=>c===l?p.Children.count(u)>1?p.Children.only(null):p.isValidElement(u)?u.props.children:null:c);return d.jsx(t,{...s,ref:n,children:p.isValidElement(u)?p.cloneElement(u,void 0,f):null})}return d.jsx(t,{...s,ref:n,children:a})});return o.displayName=`${e}.Slot`,o}var Zn=Lt("Slot");function Wd(e){const t=p.forwardRef((o,r)=>{const{children:n,...a}=o;if(p.isValidElement(n)){const s=Gd(n),i=Rd(a,n.props);return n.type!==p.Fragment&&(i.ref=r?Kn(r,s):s),p.cloneElement(n,i)}return p.Children.count(n)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Jn=Symbol("radix.slottable");function Ud(e){const t=({children:o})=>d.jsx(d.Fragment,{children:o});return t.displayName=`${e}.Slottable`,t.__radixId=Jn,t}function jd(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Jn}function Rd(e,t){const o={...t};for(const r in t){const n=e[r],a=t[r];/^on[A-Z]/.test(r)?n&&a?o[r]=(...i)=>{const l=a(...i);return n(...i),l}:n&&(o[r]=n):r==="style"?o[r]={...n,...a}:r==="className"&&(o[r]=[n,a].filter(Boolean).join(" "))}return{...e,...o}}function Gd(e){var r,n;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=(n=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:n.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var qd=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],X=qd.reduce((e,t)=>{const o=Lt(`Primitive.${t}`),r=p.forwardRef((n,a)=>{const{asChild:s,...i}=n,l=s?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(l,{...i,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Yd(e,t){e&&Ut.flushSync(()=>e.dispatchEvent(t))}var Qn=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"}),Xd="VisuallyHidden",ea=p.forwardRef((e,t)=>d.jsx(X.span,{...e,ref:t,style:{...Qn,...e.style}}));ea.displayName=Xd;var Kd=ea;function me(e,t=[]){let o=[];function r(a,s){const i=p.createContext(s),l=o.length;o=[...o,s];const u=c=>{var w;const{scope:h,children:g,...b}=c,m=((w=h==null?void 0:h[e])==null?void 0:w[l])||i,v=p.useMemo(()=>b,Object.values(b));return d.jsx(m.Provider,{value:v,children:g})};u.displayName=a+"Provider";function f(c,h){var m;const g=((m=h==null?void 0:h[e])==null?void 0:m[l])||i,b=p.useContext(g);if(b)return b;if(s!==void 0)return s;throw new Error(`\`${c}\` must be used within \`${a}\``)}return[u,f]}const n=()=>{const a=o.map(s=>p.createContext(s));return function(i){const l=(i==null?void 0:i[e])||a;return p.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return n.scopeName=e,[r,Zd(n,...t)]}function Zd(...e){const t=e[0];if(e.length===1)return t;const o=()=>{const r=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(a){const s=r.reduce((i,{useScope:l,scopeName:u})=>{const c=l(a)[`__scope${u}`];return{...i,...c}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return o.scopeName=t.scopeName,o}function ta(e){const t=e+"CollectionProvider",[o,r]=me(t),[n,a]=o(t,{collectionRef:{current:null},itemMap:new Map}),s=m=>{const{scope:v,children:w}=m,y=x.useRef(null),k=x.useRef(new Map).current;return d.jsx(n,{scope:v,itemMap:k,collectionRef:y,children:w})};s.displayName=t;const i=e+"CollectionSlot",l=Lt(i),u=x.forwardRef((m,v)=>{const{scope:w,children:y}=m,k=a(i,w),E=ae(v,k.collectionRef);return d.jsx(l,{ref:E,children:y})});u.displayName=i;const f=e+"CollectionItemSlot",c="data-radix-collection-item",h=Lt(f),g=x.forwardRef((m,v)=>{const{scope:w,children:y,...k}=m,E=x.useRef(null),_=ae(v,E),P=a(f,w);return x.useEffect(()=>(P.itemMap.set(E,{ref:E,...k}),()=>void P.itemMap.delete(E))),d.jsx(h,{[c]:"",ref:_,children:y})});g.displayName=f;function b(m){const v=a(e+"CollectionConsumer",m);return x.useCallback(()=>{const y=v.collectionRef.current;if(!y)return[];const k=Array.from(y.querySelectorAll(`[${c}]`));return Array.from(v.itemMap.values()).sort((P,T)=>k.indexOf(P.ref.current)-k.indexOf(T.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:s,Slot:u,ItemSlot:g},b,r]}function K(e,t,{checkForDefaultPrevented:o=!0}={}){return function(n){if(e==null||e(n),o===!1||!n.defaultPrevented)return t==null?void 0:t(n)}}var ie=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{},Jd=p[" useInsertionEffect ".trim().toString()]||ie;function He({prop:e,defaultProp:t,onChange:o=()=>{},caller:r}){const[n,a,s]=Qd({defaultProp:t,onChange:o}),i=e!==void 0,l=i?e:n;{const f=p.useRef(e!==void 0);p.useEffect(()=>{const c=f.current;c!==i&&console.warn(`${r} is changing from ${c?"controlled":"uncontrolled"} to ${i?"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.`),f.current=i},[i,r])}const u=p.useCallback(f=>{var c;if(i){const h=eu(f)?f(e):f;h!==e&&((c=s.current)==null||c.call(s,h))}else a(f)},[i,e,a,s]);return[l,u]}function Qd({defaultProp:e,onChange:t}){const[o,r]=p.useState(e),n=p.useRef(o),a=p.useRef(t);return Jd(()=>{a.current=t},[t]),p.useEffect(()=>{var s;n.current!==o&&((s=a.current)==null||s.call(a,o),n.current=o)},[o,n]),[o,r,a]}function eu(e){return typeof e=="function"}function tu(e,t){return p.useReducer((o,r)=>t[o][r]??o,e)}var Ee=e=>{const{present:t,children:o}=e,r=ou(t),n=typeof o=="function"?o({present:r.isPresent}):p.Children.only(o),a=ae(r.ref,ru(n));return typeof o=="function"||r.isPresent?p.cloneElement(n,{ref:a}):null};Ee.displayName="Presence";function ou(e){const[t,o]=p.useState(),r=p.useRef(null),n=p.useRef(e),a=p.useRef("none"),s=e?"mounted":"unmounted",[i,l]=tu(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const u=Zt(r.current);a.current=i==="mounted"?u:"none"},[i]),ie(()=>{const u=r.current,f=n.current;if(f!==e){const h=a.current,g=Zt(u);e?l("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(f&&h!==g?"ANIMATION_OUT":"UNMOUNT"),n.current=e}},[e,l]),ie(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,c=g=>{const m=Zt(r.current).includes(CSS.escape(g.animationName));if(g.target===t&&m&&(l("ANIMATION_END"),!n.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=g=>{g.target===t&&(a.current=Zt(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:p.useCallback(u=>{r.current=u?getComputedStyle(u):null,o(u)},[])}}function Zt(e){return(e==null?void 0:e.animationName)||"none"}function ru(e){var r,n;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=(n=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:n.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var nu=p[" useId ".trim().toString()]||(()=>{}),au=0;function nt(e){const[t,o]=p.useState(nu());return ie(()=>{o(r=>r??String(au++))},[e]),e||(t?`radix-${t}`:"")}var Jt="Collapsible",[su]=me(Jt),[iu,Ko]=su(Jt),oa=p.forwardRef((e,t)=>{const{__scopeCollapsible:o,open:r,defaultOpen:n,disabled:a,onOpenChange:s,...i}=e,[l,u]=He({prop:r,defaultProp:n??!1,onChange:s,caller:Jt});return d.jsx(iu,{scope:o,disabled:a,contentId:nt(),open:l,onOpenToggle:p.useCallback(()=>u(f=>!f),[u]),children:d.jsx(X.div,{"data-state":Jo(l),"data-disabled":a?"":void 0,...i,ref:t})})});oa.displayName=Jt;var ra="CollapsibleTrigger",na=p.forwardRef((e,t)=>{const{__scopeCollapsible:o,...r}=e,n=Ko(ra,o);return d.jsx(X.button,{type:"button","aria-controls":n.contentId,"aria-expanded":n.open||!1,"data-state":Jo(n.open),"data-disabled":n.disabled?"":void 0,disabled:n.disabled,...r,ref:t,onClick:K(e.onClick,n.onOpenToggle)})});na.displayName=ra;var Zo="CollapsibleContent",aa=p.forwardRef((e,t)=>{const{forceMount:o,...r}=e,n=Ko(Zo,e.__scopeCollapsible);return d.jsx(Ee,{present:o||n.open,children:({present:a})=>d.jsx(lu,{...r,ref:t,present:a})})});aa.displayName=Zo;var lu=p.forwardRef((e,t)=>{const{__scopeCollapsible:o,present:r,children:n,...a}=e,s=Ko(Zo,o),[i,l]=p.useState(r),u=p.useRef(null),f=ae(t,u),c=p.useRef(0),h=c.current,g=p.useRef(0),b=g.current,m=s.open||i,v=p.useRef(m),w=p.useRef(void 0);return p.useEffect(()=>{const y=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(y)},[]),ie(()=>{const y=u.current;if(y){w.current=w.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";const k=y.getBoundingClientRect();c.current=k.height,g.current=k.width,v.current||(y.style.transitionDuration=w.current.transitionDuration,y.style.animationName=w.current.animationName),l(r)}},[s.open,r]),d.jsx(X.div,{"data-state":Jo(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!m,...a,ref:f,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:m&&n})});function Jo(e){return e?"open":"closed"}var cu=oa,du=p.createContext(void 0);function zt(e){const t=p.useContext(du);return e||t||"ltr"}function pe(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...o)=>{var r;return(r=t.current)==null?void 0:r.call(t,...o)},[])}function uu(e,t=globalThis==null?void 0:globalThis.document){const o=pe(e);p.useEffect(()=>{const r=n=>{n.key==="Escape"&&o(n)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[o,t])}var fu="DismissableLayer",Qo="dismissableLayer.update",pu="dismissableLayer.pointerDownOutside",hu="dismissableLayer.focusOutside",sa,ia=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),er=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:r,onPointerDownOutside:n,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...l}=e,u=p.useContext(ia),[f,c]=p.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=p.useState({}),b=ae(t,T=>c(T)),m=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=m.indexOf(v),y=f?m.indexOf(f):-1,k=u.layersWithOutsidePointerEventsDisabled.size>0,E=y>=w,_=vu(T=>{const S=T.target,I=[...u.branches].some(D=>D.contains(S));!E||I||(n==null||n(T),s==null||s(T),T.defaultPrevented||i==null||i())},h),P=bu(T=>{const S=T.target;[...u.branches].some(D=>D.contains(S))||(a==null||a(T),s==null||s(T),T.defaultPrevented||i==null||i())},h);return uu(T=>{y===u.layers.size-1&&(r==null||r(T),!T.defaultPrevented&&i&&(T.preventDefault(),i()))},h),p.useEffect(()=>{if(f)return o&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(sa=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),la(),()=>{o&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=sa)}},[f,h,o,u]),p.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),la())},[f,u]),p.useEffect(()=>{const T=()=>g({});return document.addEventListener(Qo,T),()=>document.removeEventListener(Qo,T)},[]),d.jsx(X.div,{...l,ref:b,style:{pointerEvents:k?E?"auto":"none":void 0,...e.style},onFocusCapture:K(e.onFocusCapture,P.onFocusCapture),onBlurCapture:K(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:K(e.onPointerDownCapture,_.onPointerDownCapture)})});er.displayName=fu;var gu="DismissableLayerBranch",mu=p.forwardRef((e,t)=>{const o=p.useContext(ia),r=p.useRef(null),n=ae(t,r);return p.useEffect(()=>{const a=r.current;if(a)return o.branches.add(a),()=>{o.branches.delete(a)}},[o.branches]),d.jsx(X.div,{...e,ref:n})});mu.displayName=gu;function vu(e,t=globalThis==null?void 0:globalThis.document){const o=pe(e),r=p.useRef(!1),n=p.useRef(()=>{});return p.useEffect(()=>{const a=i=>{if(i.target&&!r.current){let l=function(){ca(pu,o,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",n.current),n.current=l,t.addEventListener("click",n.current,{once:!0})):l()}else t.removeEventListener("click",n.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",n.current)}},[t,o]),{onPointerDownCapture:()=>r.current=!0}}function bu(e,t=globalThis==null?void 0:globalThis.document){const o=pe(e),r=p.useRef(!1);return p.useEffect(()=>{const n=a=>{a.target&&!r.current&&ca(hu,o,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",n),()=>t.removeEventListener("focusin",n)},[t,o]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function la(){const e=new CustomEvent(Qo);document.dispatchEvent(e)}function ca(e,t,o,{discrete:r}){const n=o.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:o});t&&n.addEventListener(e,t,{once:!0}),r?Yd(n,a):n.dispatchEvent(a)}var tr="focusScope.autoFocusOnMount",or="focusScope.autoFocusOnUnmount",da={bubbles:!1,cancelable:!0},wu="FocusScope",ua=p.forwardRef((e,t)=>{const{loop:o=!1,trapped:r=!1,onMountAutoFocus:n,onUnmountAutoFocus:a,...s}=e,[i,l]=p.useState(null),u=pe(n),f=pe(a),c=p.useRef(null),h=ae(t,m=>l(m)),g=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(r){let m=function(k){if(g.paused||!i)return;const E=k.target;i.contains(E)?c.current=E:qe(c.current,{select:!0})},v=function(k){if(g.paused||!i)return;const E=k.relatedTarget;E!==null&&(i.contains(E)||qe(c.current,{select:!0}))},w=function(k){if(document.activeElement===document.body)for(const _ of k)_.removedNodes.length>0&&qe(i)};document.addEventListener("focusin",m),document.addEventListener("focusout",v);const y=new MutationObserver(w);return i&&y.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",v),y.disconnect()}}},[r,i,g.paused]),p.useEffect(()=>{if(i){ha.add(g);const m=document.activeElement;if(!i.contains(m)){const w=new CustomEvent(tr,da);i.addEventListener(tr,u),i.dispatchEvent(w),w.defaultPrevented||(yu(Eu(fa(i)),{select:!0}),document.activeElement===m&&qe(i))}return()=>{i.removeEventListener(tr,u),setTimeout(()=>{const w=new CustomEvent(or,da);i.addEventListener(or,f),i.dispatchEvent(w),w.defaultPrevented||qe(m??document.body,{select:!0}),i.removeEventListener(or,f),ha.remove(g)},0)}}},[i,u,f,g]);const b=p.useCallback(m=>{if(!o&&!r||g.paused)return;const v=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,w=document.activeElement;if(v&&w){const y=m.currentTarget,[k,E]=xu(y);k&&E?!m.shiftKey&&w===E?(m.preventDefault(),o&&qe(k,{select:!0})):m.shiftKey&&w===k&&(m.preventDefault(),o&&qe(E,{select:!0})):w===y&&m.preventDefault()}},[o,r,g.paused]);return d.jsx(X.div,{tabIndex:-1,...s,ref:h,onKeyDown:b})});ua.displayName=wu;function yu(e,{select:t=!1}={}){const o=document.activeElement;for(const r of e)if(qe(r,{select:t}),document.activeElement!==o)return}function xu(e){const t=fa(e),o=pa(t,e),r=pa(t.reverse(),e);return[o,r]}function fa(e){const t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const n=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||n?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)t.push(o.currentNode);return t}function pa(e,t){for(const o of e)if(!ku(o,{upTo:t}))return o}function ku(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Su(e){return e instanceof HTMLInputElement&&"select"in e}function qe(e,{select:t=!1}={}){if(e&&e.focus){const o=document.activeElement;e.focus({preventScroll:!0}),e!==o&&Su(e)&&t&&e.select()}}var ha=Cu();function Cu(){let e=[];return{add(t){const o=e[0];t!==o&&(o==null||o.pause()),e=ga(e,t),e.unshift(t)},remove(t){var o;e=ga(e,t),(o=e[0])==null||o.resume()}}}function ga(e,t){const o=[...e],r=o.indexOf(t);return r!==-1&&o.splice(r,1),o}function Eu(e){return e.filter(t=>t.tagName!=="A")}var Nu="Portal",rr=p.forwardRef((e,t)=>{var i;const{container:o,...r}=e,[n,a]=p.useState(!1);ie(()=>a(!0),[]);const s=o||n&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?Ho.createPortal(d.jsx(X.div,{...r,ref:t}),s):null});rr.displayName=Nu;var nr=0;function Tu(){p.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ma()),document.body.insertAdjacentElement("beforeend",e[1]??ma()),nr++,()=>{nr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),nr--}},[])}function ma(){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 Oe=function(){return Oe=Object.assign||function(t){for(var o,r=1,n=arguments.length;r<n;r++){o=arguments[r];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(t[a]=o[a])}return t},Oe.apply(this,arguments)};function va(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(o[r[n]]=e[r[n]]);return o}function _u(e,t,o){if(o||arguments.length===2)for(var r=0,n=t.length,a;r<n;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Qt="right-scroll-bar-position",eo="width-before-scroll-bar",Pu="with-scroll-bars-hidden",Au="--removed-body-scroll-bar-size";function ar(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Iu(e,t){var o=x.useState(function(){return{value:e,callback:t,facade:{get current(){return o.value},set current(r){var n=o.value;n!==r&&(o.value=r,o.callback(r,n))}}}})[0];return o.callback=t,o.facade}var Mu=typeof window<"u"?p.useLayoutEffect:p.useEffect,ba=new WeakMap;function Ou(e,t){var o=Iu(null,function(r){return e.forEach(function(n){return ar(n,r)})});return Mu(function(){var r=ba.get(o);if(r){var n=new Set(r),a=new Set(e),s=o.current;n.forEach(function(i){a.has(i)||ar(i,null)}),a.forEach(function(i){n.has(i)||ar(i,s)})}ba.set(o,e)},[e]),o}function Lu(e){return e}function zu(e,t){t===void 0&&(t=Lu);var o=[],r=!1,n={read:function(){if(r)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(a){var s=t(a,r);return o.push(s),function(){o=o.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(r=!0;o.length;){var s=o;o=[],s.forEach(a)}o={push:function(i){return a(i)},filter:function(){return o}}},assignMedium:function(a){r=!0;var s=[];if(o.length){var i=o;o=[],i.forEach(a),s=o}var l=function(){var f=s;s=[],f.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),o={push:function(f){s.push(f),u()},filter:function(f){return s=s.filter(f),o}}}};return n}function Du(e){e===void 0&&(e={});var t=zu(null);return t.options=Oe({async:!0,ssr:!1},e),t}var wa=function(e){var t=e.sideCar,o=va(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return p.createElement(r,Oe({},o))};wa.isSideCarExport=!0;function $u(e,t){return e.useMedium(t),wa}var ya=Du(),sr=function(){},to=p.forwardRef(function(e,t){var o=p.useRef(null),r=p.useState({onScrollCapture:sr,onWheelCapture:sr,onTouchMoveCapture:sr}),n=r[0],a=r[1],s=e.forwardProps,i=e.children,l=e.className,u=e.removeScrollBar,f=e.enabled,c=e.shards,h=e.sideCar,g=e.noRelative,b=e.noIsolation,m=e.inert,v=e.allowPinchZoom,w=e.as,y=w===void 0?"div":w,k=e.gapMode,E=va(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=h,P=Ou([o,t]),T=Oe(Oe({},E),n);return p.createElement(p.Fragment,null,f&&p.createElement(_,{sideCar:ya,removeScrollBar:u,shards:c,noRelative:g,noIsolation:b,inert:m,setCallbacks:a,allowPinchZoom:!!v,lockRef:o,gapMode:k}),s?p.cloneElement(p.Children.only(i),Oe(Oe({},T),{ref:P})):p.createElement(y,Oe({},T,{className:l,ref:P}),i))});to.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},to.classNames={fullWidth:eo,zeroRight:Qt};var Fu=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Bu(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Fu();return t&&e.setAttribute("nonce",t),e}function Hu(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Vu(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Wu=function(){var e=0,t=null;return{add:function(o){e==0&&(t=Bu())&&(Hu(t,o),Vu(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Uu=function(){var e=Wu();return function(t,o){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&o])}},xa=function(){var e=Uu(),t=function(o){var r=o.styles,n=o.dynamic;return e(r,n),null};return t},ju={left:0,top:0,right:0,gap:0},ir=function(e){return parseInt(e||"",10)||0},Ru=function(e){var t=window.getComputedStyle(document.body),o=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],n=t[e==="padding"?"paddingRight":"marginRight"];return[ir(o),ir(r),ir(n)]},Gu=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return ju;var t=Ru(e),o=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-o+t[2]-t[0])}},qu=xa(),ht="data-scroll-locked",Yu=function(e,t,o,r){var n=e.left,a=e.top,s=e.right,i=e.gap;return o===void 0&&(o="margin"),`
233
- .`.concat(Pu,` {
237
+ */const ed=ne("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function En(e){var t,o,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(o=En(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function Nn(){for(var e,t,o=0,r="",n=arguments.length;o<n;o++)(e=arguments[o])&&(t=En(e))&&(r&&(r+=" "),r+=t);return r}const td=(e,t)=>{const o=new Array(e.length+t.length);for(let r=0;r<e.length;r++)o[r]=e[r];for(let r=0;r<t.length;r++)o[e.length+r]=t[r];return o},od=(e,t)=>({classGroupId:e,validator:t}),Tn=(e=new Map,t=null,o)=>({nextPart:e,validators:t,classGroupId:o}),qt="-",_n=[],rd="arbitrary..",nd=e=>{const t=sd(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return ad(s);const i=s.split(qt),l=i[0]===""&&i.length>1?1:0;return Pn(i,l,t)},getConflictingClassGroupIds:(s,i)=>{if(i){const l=r[s],u=o[s];return l?u?td(u,l):l:u||_n}return o[s]||_n}}},Pn=(e,t,o)=>{if(e.length-t===0)return o.classGroupId;const n=e[t],a=o.nextPart.get(n);if(a){const u=Pn(e,t+1,a);if(u)return u}const s=o.validators;if(s===null)return;const i=t===0?e.join(qt):e.slice(t).join(qt),l=s.length;for(let u=0;u<l;u++){const f=s[u];if(f.validator(i))return f.classGroupId}},ad=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),o=t.indexOf(":"),r=t.slice(0,o);return r?rd+r:void 0})(),sd=e=>{const{theme:t,classGroups:o}=e;return id(o,t)},id=(e,t)=>{const o=Tn();for(const r in e){const n=e[r];Go(n,o,r,t)}return o},Go=(e,t,o,r)=>{const n=e.length;for(let a=0;a<n;a++){const s=e[a];ld(s,t,o,r)}},ld=(e,t,o,r)=>{if(typeof e=="string"){cd(e,t,o);return}if(typeof e=="function"){dd(e,t,o,r);return}ud(e,t,o,r)},cd=(e,t,o)=>{const r=e===""?t:An(t,e);r.classGroupId=o},dd=(e,t,o,r)=>{if(fd(e)){Go(e(r),t,o,r);return}t.validators===null&&(t.validators=[]),t.validators.push(od(o,e))},ud=(e,t,o,r)=>{const n=Object.entries(e),a=n.length;for(let s=0;s<a;s++){const[i,l]=n[s];Go(l,An(t,i),o,r)}},An=(e,t)=>{let o=e;const r=t.split(qt),n=r.length;for(let a=0;a<n;a++){const s=r[a];let i=o.nextPart.get(s);i||(i=Tn(),o.nextPart.set(s,i)),o=i}return o},fd=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,pd=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=Object.create(null),r=Object.create(null);const n=(a,s)=>{o[a]=s,t++,t>e&&(t=0,r=o,o=Object.create(null))};return{get(a){let s=o[a];if(s!==void 0)return s;if((s=r[a])!==void 0)return n(a,s),s},set(a,s){a in o?o[a]=s:n(a,s)}}},qo="!",In=":",hd=[],Mn=(e,t,o,r,n)=>({modifiers:e,hasImportantModifier:t,baseClassName:o,maybePostfixModifierPosition:r,isExternal:n}),gd=e=>{const{prefix:t,experimentalParseClassName:o}=e;let r=n=>{const a=[];let s=0,i=0,l=0,u;const f=n.length;for(let m=0;m<f;m++){const v=n[m];if(s===0&&i===0){if(v===In){a.push(n.slice(l,m)),l=m+1;continue}if(v==="/"){u=m;continue}}v==="["?s++:v==="]"?s--:v==="("?i++:v===")"&&i--}const c=a.length===0?n:n.slice(l);let h=c,g=!1;c.endsWith(qo)?(h=c.slice(0,-1),g=!0):c.startsWith(qo)&&(h=c.slice(1),g=!0);const b=u&&u>l?u-l:void 0;return Mn(a,g,h,b)};if(t){const n=t+In,a=r;r=s=>s.startsWith(n)?a(s.slice(n.length)):Mn(hd,!1,s,void 0,!0)}if(o){const n=r;r=a=>o({className:a,parseClassName:n})}return r},md=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((o,r)=>{t.set(o,1e6+r)}),o=>{const r=[];let n=[];for(let a=0;a<o.length;a++){const s=o[a],i=s[0]==="[",l=t.has(s);i||l?(n.length>0&&(n.sort(),r.push(...n),n=[]),r.push(s)):n.push(s)}return n.length>0&&(n.sort(),r.push(...n)),r}},vd=e=>({cache:pd(e.cacheSize),parseClassName:gd(e),sortModifiers:md(e),...nd(e)}),bd=/\s+/,wd=(e,t)=>{const{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:n,sortModifiers:a}=t,s=[],i=e.trim().split(bd);let l="";for(let u=i.length-1;u>=0;u-=1){const f=i[u],{isExternal:c,modifiers:h,hasImportantModifier:g,baseClassName:b,maybePostfixModifierPosition:m}=o(f);if(c){l=f+(l.length>0?" "+l:l);continue}let v=!!m,w=r(v?b.substring(0,m):b);if(!w){if(!v){l=f+(l.length>0?" "+l:l);continue}if(w=r(b),!w){l=f+(l.length>0?" "+l:l);continue}v=!1}const y=h.length===0?"":h.length===1?h[0]:a(h).join(":"),k=g?y+qo:y,C=k+w;if(s.indexOf(C)>-1)continue;s.push(C);const T=n(w,v);for(let P=0;P<T.length;++P){const _=T[P];s.push(k+_)}l=f+(l.length>0?" "+l:l)}return l},yd=(...e)=>{let t=0,o,r,n="";for(;t<e.length;)(o=e[t++])&&(r=On(o))&&(n&&(n+=" "),n+=r);return n},On=e=>{if(typeof e=="string")return e;let t,o="";for(let r=0;r<e.length;r++)e[r]&&(t=On(e[r]))&&(o&&(o+=" "),o+=t);return o},xd=(e,...t)=>{let o,r,n,a;const s=l=>{const u=t.reduce((f,c)=>c(f),e());return o=vd(u),r=o.cache.get,n=o.cache.set,a=i,i(l)},i=l=>{const u=r(l);if(u)return u;const f=wd(l,o);return n(l,f),f};return a=s,(...l)=>a(yd(...l))},kd=[],le=e=>{const t=o=>o[e]||kd;return t.isThemeGetter=!0,t},Ln=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,zn=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Sd=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Cd=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ed=/\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$/,Nd=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Td=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,_d=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,je=e=>Sd.test(e),oe=e=>!!e&&!Number.isNaN(Number(e)),Re=e=>!!e&&Number.isInteger(Number(e)),Yo=e=>e.endsWith("%")&&oe(e.slice(0,-1)),Be=e=>Cd.test(e),Dn=()=>!0,Pd=e=>Ed.test(e)&&!Nd.test(e),Xo=()=>!1,Ad=e=>Td.test(e),Id=e=>_d.test(e),Md=e=>!$(e)&&!H(e),Od=e=>Ge(e,Wn,Xo),$=e=>Ln.test(e),ot=e=>Ge(e,Un,Pd),$n=e=>Ge(e,Vd,oe),Ld=e=>Ge(e,Rn,Dn),zd=e=>Ge(e,jn,Xo),Fn=e=>Ge(e,Hn,Xo),Dd=e=>Ge(e,Vn,Id),Yt=e=>Ge(e,Gn,Ad),H=e=>zn.test(e),It=e=>rt(e,Un),$d=e=>rt(e,jn),Bn=e=>rt(e,Hn),Fd=e=>rt(e,Wn),Bd=e=>rt(e,Vn),Xt=e=>rt(e,Gn,!0),Hd=e=>rt(e,Rn,!0),Ge=(e,t,o)=>{const r=Ln.exec(e);return r?r[1]?t(r[1]):o(r[2]):!1},rt=(e,t,o=!1)=>{const r=zn.exec(e);return r?r[1]?t(r[1]):o:!1},Hn=e=>e==="position"||e==="percentage",Vn=e=>e==="image"||e==="url",Wn=e=>e==="length"||e==="size"||e==="bg-size",Un=e=>e==="length",Vd=e=>e==="number",jn=e=>e==="family-name",Rn=e=>e==="number"||e==="weight",Gn=e=>e==="shadow",Wd=xd(()=>{const e=le("color"),t=le("font"),o=le("text"),r=le("font-weight"),n=le("tracking"),a=le("leading"),s=le("breakpoint"),i=le("container"),l=le("spacing"),u=le("radius"),f=le("shadow"),c=le("inset-shadow"),h=le("text-shadow"),g=le("drop-shadow"),b=le("blur"),m=le("perspective"),v=le("aspect"),w=le("ease"),y=le("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],T=()=>[...C(),H,$],P=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto","contain","none"],E=()=>[H,$,l],I=()=>[je,"full","auto",...E()],L=()=>[Re,"none","subgrid",H,$],F=()=>["auto",{span:["full",Re,H,$]},Re,H,$],D=()=>[Re,"auto",H,$],V=()=>["auto","min","max","fr",H,$],j=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],G=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...E()],U=()=>[je,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],N=()=>[je,"screen","full","dvw","lvw","svw","min","max","fit",...E()],A=()=>[je,"screen","full","lh","dvh","lvh","svh","min","max","fit",...E()],S=()=>[e,H,$],z=()=>[...C(),Bn,Fn,{position:[H,$]}],W=()=>["no-repeat",{repeat:["","x","y","space","round"]}],O=()=>["auto","cover","contain",Fd,Od,{size:[H,$]}],q=()=>[Yo,It,ot],R=()=>["","none","full",u,H,$],Q=()=>["",oe,It,ot],B=()=>["solid","dashed","dotted","double"],Y=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],J=()=>[oe,Yo,Bn,Fn],se=()=>["","none",b,H,$],re=()=>["none",oe,H,$],te=()=>["none",oe,H,$],ce=()=>[oe,H,$],de=()=>[je,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Be],breakpoint:[Be],color:[Dn],container:[Be],"drop-shadow":[Be],ease:["in","out","in-out"],font:[Md],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Be],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Be],shadow:[Be],spacing:["px",oe],text:[Be],"text-shadow":[Be],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",je,$,H,v]}],container:["container"],columns:[{columns:[oe,$,H,i]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"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"],sr:["sr-only","not-sr-only"],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:T()}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{"inset-s":I(),start:I()}],end:[{"inset-e":I(),end:I()}],"inset-bs":[{"inset-bs":I()}],"inset-be":[{"inset-be":I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[Re,"auto",H,$]}],basis:[{basis:[je,"full","auto",i,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[oe,je,"auto","initial","none",$]}],grow:[{grow:["",oe,H,$]}],shrink:[{shrink:["",oe,H,$]}],order:[{order:[Re,"first","last","none",H,$]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:F()}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":V()}],"auto-rows":[{"auto-rows":V()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...j(),"normal"]}],"justify-items":[{"justify-items":[...G(),"normal"]}],"justify-self":[{"justify-self":["auto",...G()]}],"align-content":[{content:["normal",...j()]}],"align-items":[{items:[...G(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...G(),{baseline:["","last"]}]}],"place-content":[{"place-content":j()}],"place-items":[{"place-items":[...G(),"baseline"]}],"place-self":[{"place-self":["auto",...G()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pbs:[{pbs:E()}],pbe:[{pbe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:U()}],"inline-size":[{inline:["auto",...N()]}],"min-inline-size":[{"min-inline":["auto",...N()]}],"max-inline-size":[{"max-inline":["none",...N()]}],"block-size":[{block:["auto",...A()]}],"min-block-size":[{"min-block":["auto",...A()]}],"max-block-size":[{"max-block":["none",...A()]}],w:[{w:[i,"screen",...U()]}],"min-w":[{"min-w":[i,"screen","none",...U()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[s]},...U()]}],h:[{h:["screen","lh",...U()]}],"min-h":[{"min-h":["screen","lh","none",...U()]}],"max-h":[{"max-h":["screen","lh",...U()]}],"font-size":[{text:["base",o,It,ot]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Hd,Ld]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Yo,$]}],"font-family":[{font:[$d,zd,t]}],"font-features":[{"font-features":[$]}],"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:[n,H,$]}],"line-clamp":[{"line-clamp":[oe,"none",H,$n]}],leading:[{leading:[a,...E()]}],"list-image":[{"list-image":["none",H,$]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",H,$]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:S()}],"text-color":[{text:S()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:[oe,"from-font","auto",H,ot]}],"text-decoration-color":[{decoration:S()}],"underline-offset":[{"underline-offset":[oe,"auto",H,$]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",H,$]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",H,$]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:z()}],"bg-repeat":[{bg:W()}],"bg-size":[{bg:O()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Re,H,$],radial:["",H,$],conic:[Re,H,$]},Bd,Dd]}],"bg-color":[{bg:S()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:S()}],"gradient-via":[{via:S()}],"gradient-to":[{to:S()}],rounded:[{rounded:R()}],"rounded-s":[{"rounded-s":R()}],"rounded-e":[{"rounded-e":R()}],"rounded-t":[{"rounded-t":R()}],"rounded-r":[{"rounded-r":R()}],"rounded-b":[{"rounded-b":R()}],"rounded-l":[{"rounded-l":R()}],"rounded-ss":[{"rounded-ss":R()}],"rounded-se":[{"rounded-se":R()}],"rounded-ee":[{"rounded-ee":R()}],"rounded-es":[{"rounded-es":R()}],"rounded-tl":[{"rounded-tl":R()}],"rounded-tr":[{"rounded-tr":R()}],"rounded-br":[{"rounded-br":R()}],"rounded-bl":[{"rounded-bl":R()}],"border-w":[{border:Q()}],"border-w-x":[{"border-x":Q()}],"border-w-y":[{"border-y":Q()}],"border-w-s":[{"border-s":Q()}],"border-w-e":[{"border-e":Q()}],"border-w-bs":[{"border-bs":Q()}],"border-w-be":[{"border-be":Q()}],"border-w-t":[{"border-t":Q()}],"border-w-r":[{"border-r":Q()}],"border-w-b":[{"border-b":Q()}],"border-w-l":[{"border-l":Q()}],"divide-x":[{"divide-x":Q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...B(),"hidden","none"]}],"divide-style":[{divide:[...B(),"hidden","none"]}],"border-color":[{border:S()}],"border-color-x":[{"border-x":S()}],"border-color-y":[{"border-y":S()}],"border-color-s":[{"border-s":S()}],"border-color-e":[{"border-e":S()}],"border-color-bs":[{"border-bs":S()}],"border-color-be":[{"border-be":S()}],"border-color-t":[{"border-t":S()}],"border-color-r":[{"border-r":S()}],"border-color-b":[{"border-b":S()}],"border-color-l":[{"border-l":S()}],"divide-color":[{divide:S()}],"outline-style":[{outline:[...B(),"none","hidden"]}],"outline-offset":[{"outline-offset":[oe,H,$]}],"outline-w":[{outline:["",oe,It,ot]}],"outline-color":[{outline:S()}],shadow:[{shadow:["","none",f,Xt,Yt]}],"shadow-color":[{shadow:S()}],"inset-shadow":[{"inset-shadow":["none",c,Xt,Yt]}],"inset-shadow-color":[{"inset-shadow":S()}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:S()}],"ring-offset-w":[{"ring-offset":[oe,ot]}],"ring-offset-color":[{"ring-offset":S()}],"inset-ring-w":[{"inset-ring":Q()}],"inset-ring-color":[{"inset-ring":S()}],"text-shadow":[{"text-shadow":["none",h,Xt,Yt]}],"text-shadow-color":[{"text-shadow":S()}],opacity:[{opacity:[oe,H,$]}],"mix-blend":[{"mix-blend":[...Y(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Y()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[oe]}],"mask-image-linear-from-pos":[{"mask-linear-from":J()}],"mask-image-linear-to-pos":[{"mask-linear-to":J()}],"mask-image-linear-from-color":[{"mask-linear-from":S()}],"mask-image-linear-to-color":[{"mask-linear-to":S()}],"mask-image-t-from-pos":[{"mask-t-from":J()}],"mask-image-t-to-pos":[{"mask-t-to":J()}],"mask-image-t-from-color":[{"mask-t-from":S()}],"mask-image-t-to-color":[{"mask-t-to":S()}],"mask-image-r-from-pos":[{"mask-r-from":J()}],"mask-image-r-to-pos":[{"mask-r-to":J()}],"mask-image-r-from-color":[{"mask-r-from":S()}],"mask-image-r-to-color":[{"mask-r-to":S()}],"mask-image-b-from-pos":[{"mask-b-from":J()}],"mask-image-b-to-pos":[{"mask-b-to":J()}],"mask-image-b-from-color":[{"mask-b-from":S()}],"mask-image-b-to-color":[{"mask-b-to":S()}],"mask-image-l-from-pos":[{"mask-l-from":J()}],"mask-image-l-to-pos":[{"mask-l-to":J()}],"mask-image-l-from-color":[{"mask-l-from":S()}],"mask-image-l-to-color":[{"mask-l-to":S()}],"mask-image-x-from-pos":[{"mask-x-from":J()}],"mask-image-x-to-pos":[{"mask-x-to":J()}],"mask-image-x-from-color":[{"mask-x-from":S()}],"mask-image-x-to-color":[{"mask-x-to":S()}],"mask-image-y-from-pos":[{"mask-y-from":J()}],"mask-image-y-to-pos":[{"mask-y-to":J()}],"mask-image-y-from-color":[{"mask-y-from":S()}],"mask-image-y-to-color":[{"mask-y-to":S()}],"mask-image-radial":[{"mask-radial":[H,$]}],"mask-image-radial-from-pos":[{"mask-radial-from":J()}],"mask-image-radial-to-pos":[{"mask-radial-to":J()}],"mask-image-radial-from-color":[{"mask-radial-from":S()}],"mask-image-radial-to-color":[{"mask-radial-to":S()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[oe]}],"mask-image-conic-from-pos":[{"mask-conic-from":J()}],"mask-image-conic-to-pos":[{"mask-conic-to":J()}],"mask-image-conic-from-color":[{"mask-conic-from":S()}],"mask-image-conic-to-color":[{"mask-conic-to":S()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:z()}],"mask-repeat":[{mask:W()}],"mask-size":[{mask:O()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",H,$]}],filter:[{filter:["","none",H,$]}],blur:[{blur:se()}],brightness:[{brightness:[oe,H,$]}],contrast:[{contrast:[oe,H,$]}],"drop-shadow":[{"drop-shadow":["","none",g,Xt,Yt]}],"drop-shadow-color":[{"drop-shadow":S()}],grayscale:[{grayscale:["",oe,H,$]}],"hue-rotate":[{"hue-rotate":[oe,H,$]}],invert:[{invert:["",oe,H,$]}],saturate:[{saturate:[oe,H,$]}],sepia:[{sepia:["",oe,H,$]}],"backdrop-filter":[{"backdrop-filter":["","none",H,$]}],"backdrop-blur":[{"backdrop-blur":se()}],"backdrop-brightness":[{"backdrop-brightness":[oe,H,$]}],"backdrop-contrast":[{"backdrop-contrast":[oe,H,$]}],"backdrop-grayscale":[{"backdrop-grayscale":["",oe,H,$]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[oe,H,$]}],"backdrop-invert":[{"backdrop-invert":["",oe,H,$]}],"backdrop-opacity":[{"backdrop-opacity":[oe,H,$]}],"backdrop-saturate":[{"backdrop-saturate":[oe,H,$]}],"backdrop-sepia":[{"backdrop-sepia":["",oe,H,$]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",H,$]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[oe,"initial",H,$]}],ease:[{ease:["linear","initial",w,H,$]}],delay:[{delay:[oe,H,$]}],animate:[{animate:["none",y,H,$]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,H,$]}],"perspective-origin":[{"perspective-origin":T()}],rotate:[{rotate:re()}],"rotate-x":[{"rotate-x":re()}],"rotate-y":[{"rotate-y":re()}],"rotate-z":[{"rotate-z":re()}],scale:[{scale:te()}],"scale-x":[{"scale-x":te()}],"scale-y":[{"scale-y":te()}],"scale-z":[{"scale-z":te()}],"scale-3d":["scale-3d"],skew:[{skew:ce()}],"skew-x":[{"skew-x":ce()}],"skew-y":[{"skew-y":ce()}],transform:[{transform:[H,$,"","none","gpu","cpu"]}],"transform-origin":[{origin:T()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:de()}],"translate-x":[{"translate-x":de()}],"translate-y":[{"translate-y":de()}],"translate-z":[{"translate-z":de()}],"translate-none":["translate-none"],accent:[{accent:S()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:S()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",H,$]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mbs":[{"scroll-mbs":E()}],"scroll-mbe":[{"scroll-mbe":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pbs":[{"scroll-pbs":E()}],"scroll-pbe":[{"scroll-pbe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"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",H,$]}],fill:[{fill:["none",...S()]}],"stroke-w":[{stroke:[oe,It,ot,$n]}],stroke:[{stroke:["none",...S()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","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-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","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-pbs","scroll-pbe","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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),X=(...e)=>Wd(Nn(e));function Mt({className:e,...t}){return d.jsx("div",{"data-slot":"card",className:X("flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",e),...t})}function Ud({className:e,...t}){return d.jsx("div",{"data-slot":"card-header",className:X("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function Ot({className:e,...t}){return d.jsx("div",{"data-slot":"card-content",className:X("px-6",e),...t})}const qn=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Yn=Nn,Kt=(e,t)=>o=>{var r;if((t==null?void 0:t.variants)==null)return Yn(e,o==null?void 0:o.class,o==null?void 0:o.className);const{variants:n,defaultVariants:a}=t,s=Object.keys(n).map(u=>{const f=o==null?void 0:o[u],c=a==null?void 0:a[u];if(f===null)return null;const h=qn(f)||qn(c);return n[u][h]}),i=o&&Object.entries(o).reduce((u,f)=>{let[c,h]=f;return h===void 0||(u[c]=h),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:c,className:h,...g}=f;return Object.entries(g).every(b=>{let[m,v]=b;return Array.isArray(v)?v.includes({...a,...i}[m]):{...a,...i}[m]===v})?[...u,c,h]:u},[]);return Yn(e,s,l,o==null?void 0:o.class,o==null?void 0:o.className)};function Xn(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Kn(...e){return t=>{let o=!1;const r=e.map(n=>{const a=Xn(n,t);return!o&&typeof a=="function"&&(o=!0),a});if(o)return()=>{for(let n=0;n<r.length;n++){const a=r[n];typeof a=="function"?a():Xn(e[n],null)}}}}function ae(...e){return p.useCallback(Kn(...e),e)}function Lt(e){const t=jd(e),o=p.forwardRef((r,n)=>{const{children:a,...s}=r,i=p.Children.toArray(a),l=i.find(Gd);if(l){const u=l.props.children,f=i.map(c=>c===l?p.Children.count(u)>1?p.Children.only(null):p.isValidElement(u)?u.props.children:null:c);return d.jsx(t,{...s,ref:n,children:p.isValidElement(u)?p.cloneElement(u,void 0,f):null})}return d.jsx(t,{...s,ref:n,children:a})});return o.displayName=`${e}.Slot`,o}var Zn=Lt("Slot");function jd(e){const t=p.forwardRef((o,r)=>{const{children:n,...a}=o;if(p.isValidElement(n)){const s=Yd(n),i=qd(a,n.props);return n.type!==p.Fragment&&(i.ref=r?Kn(r,s):s),p.cloneElement(n,i)}return p.Children.count(n)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Jn=Symbol("radix.slottable");function Rd(e){const t=({children:o})=>d.jsx(d.Fragment,{children:o});return t.displayName=`${e}.Slottable`,t.__radixId=Jn,t}function Gd(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Jn}function qd(e,t){const o={...t};for(const r in t){const n=e[r],a=t[r];/^on[A-Z]/.test(r)?n&&a?o[r]=(...i)=>{const l=a(...i);return n(...i),l}:n&&(o[r]=n):r==="style"?o[r]={...n,...a}:r==="className"&&(o[r]=[n,a].filter(Boolean).join(" "))}return{...e,...o}}function Yd(e){var r,n;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=(n=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:n.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var Xd=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],K=Xd.reduce((e,t)=>{const o=Lt(`Primitive.${t}`),r=p.forwardRef((n,a)=>{const{asChild:s,...i}=n,l=s?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(l,{...i,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Kd(e,t){e&&Ut.flushSync(()=>e.dispatchEvent(t))}var Qn=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"}),Zd="VisuallyHidden",ea=p.forwardRef((e,t)=>d.jsx(K.span,{...e,ref:t,style:{...Qn,...e.style}}));ea.displayName=Zd;var Jd=ea;function me(e,t=[]){let o=[];function r(a,s){const i=p.createContext(s),l=o.length;o=[...o,s];const u=c=>{var w;const{scope:h,children:g,...b}=c,m=((w=h==null?void 0:h[e])==null?void 0:w[l])||i,v=p.useMemo(()=>b,Object.values(b));return d.jsx(m.Provider,{value:v,children:g})};u.displayName=a+"Provider";function f(c,h){var m;const g=((m=h==null?void 0:h[e])==null?void 0:m[l])||i,b=p.useContext(g);if(b)return b;if(s!==void 0)return s;throw new Error(`\`${c}\` must be used within \`${a}\``)}return[u,f]}const n=()=>{const a=o.map(s=>p.createContext(s));return function(i){const l=(i==null?void 0:i[e])||a;return p.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return n.scopeName=e,[r,Qd(n,...t)]}function Qd(...e){const t=e[0];if(e.length===1)return t;const o=()=>{const r=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(a){const s=r.reduce((i,{useScope:l,scopeName:u})=>{const c=l(a)[`__scope${u}`];return{...i,...c}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return o.scopeName=t.scopeName,o}function ta(e){const t=e+"CollectionProvider",[o,r]=me(t),[n,a]=o(t,{collectionRef:{current:null},itemMap:new Map}),s=m=>{const{scope:v,children:w}=m,y=x.useRef(null),k=x.useRef(new Map).current;return d.jsx(n,{scope:v,itemMap:k,collectionRef:y,children:w})};s.displayName=t;const i=e+"CollectionSlot",l=Lt(i),u=x.forwardRef((m,v)=>{const{scope:w,children:y}=m,k=a(i,w),C=ae(v,k.collectionRef);return d.jsx(l,{ref:C,children:y})});u.displayName=i;const f=e+"CollectionItemSlot",c="data-radix-collection-item",h=Lt(f),g=x.forwardRef((m,v)=>{const{scope:w,children:y,...k}=m,C=x.useRef(null),T=ae(v,C),P=a(f,w);return x.useEffect(()=>(P.itemMap.set(C,{ref:C,...k}),()=>void P.itemMap.delete(C))),d.jsx(h,{[c]:"",ref:T,children:y})});g.displayName=f;function b(m){const v=a(e+"CollectionConsumer",m);return x.useCallback(()=>{const y=v.collectionRef.current;if(!y)return[];const k=Array.from(y.querySelectorAll(`[${c}]`));return Array.from(v.itemMap.values()).sort((P,_)=>k.indexOf(P.ref.current)-k.indexOf(_.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:s,Slot:u,ItemSlot:g},b,r]}function Z(e,t,{checkForDefaultPrevented:o=!0}={}){return function(n){if(e==null||e(n),o===!1||!n.defaultPrevented)return t==null?void 0:t(n)}}var ie=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{},eu=p[" useInsertionEffect ".trim().toString()]||ie;function He({prop:e,defaultProp:t,onChange:o=()=>{},caller:r}){const[n,a,s]=tu({defaultProp:t,onChange:o}),i=e!==void 0,l=i?e:n;{const f=p.useRef(e!==void 0);p.useEffect(()=>{const c=f.current;c!==i&&console.warn(`${r} is changing from ${c?"controlled":"uncontrolled"} to ${i?"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.`),f.current=i},[i,r])}const u=p.useCallback(f=>{var c;if(i){const h=ou(f)?f(e):f;h!==e&&((c=s.current)==null||c.call(s,h))}else a(f)},[i,e,a,s]);return[l,u]}function tu({defaultProp:e,onChange:t}){const[o,r]=p.useState(e),n=p.useRef(o),a=p.useRef(t);return eu(()=>{a.current=t},[t]),p.useEffect(()=>{var s;n.current!==o&&((s=a.current)==null||s.call(a,o),n.current=o)},[o,n]),[o,r,a]}function ou(e){return typeof e=="function"}function ru(e,t){return p.useReducer((o,r)=>t[o][r]??o,e)}var Ee=e=>{const{present:t,children:o}=e,r=nu(t),n=typeof o=="function"?o({present:r.isPresent}):p.Children.only(o),a=ae(r.ref,au(n));return typeof o=="function"||r.isPresent?p.cloneElement(n,{ref:a}):null};Ee.displayName="Presence";function nu(e){const[t,o]=p.useState(),r=p.useRef(null),n=p.useRef(e),a=p.useRef("none"),s=e?"mounted":"unmounted",[i,l]=ru(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const u=Zt(r.current);a.current=i==="mounted"?u:"none"},[i]),ie(()=>{const u=r.current,f=n.current;if(f!==e){const h=a.current,g=Zt(u);e?l("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(f&&h!==g?"ANIMATION_OUT":"UNMOUNT"),n.current=e}},[e,l]),ie(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,c=g=>{const m=Zt(r.current).includes(CSS.escape(g.animationName));if(g.target===t&&m&&(l("ANIMATION_END"),!n.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=g=>{g.target===t&&(a.current=Zt(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:p.useCallback(u=>{r.current=u?getComputedStyle(u):null,o(u)},[])}}function Zt(e){return(e==null?void 0:e.animationName)||"none"}function au(e){var r,n;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=(n=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:n.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var su=p[" useId ".trim().toString()]||(()=>{}),iu=0;function nt(e){const[t,o]=p.useState(su());return ie(()=>{o(r=>r??String(iu++))},[e]),e||(t?`radix-${t}`:"")}var Jt="Collapsible",[lu]=me(Jt),[cu,Ko]=lu(Jt),oa=p.forwardRef((e,t)=>{const{__scopeCollapsible:o,open:r,defaultOpen:n,disabled:a,onOpenChange:s,...i}=e,[l,u]=He({prop:r,defaultProp:n??!1,onChange:s,caller:Jt});return d.jsx(cu,{scope:o,disabled:a,contentId:nt(),open:l,onOpenToggle:p.useCallback(()=>u(f=>!f),[u]),children:d.jsx(K.div,{"data-state":Jo(l),"data-disabled":a?"":void 0,...i,ref:t})})});oa.displayName=Jt;var ra="CollapsibleTrigger",na=p.forwardRef((e,t)=>{const{__scopeCollapsible:o,...r}=e,n=Ko(ra,o);return d.jsx(K.button,{type:"button","aria-controls":n.contentId,"aria-expanded":n.open||!1,"data-state":Jo(n.open),"data-disabled":n.disabled?"":void 0,disabled:n.disabled,...r,ref:t,onClick:Z(e.onClick,n.onOpenToggle)})});na.displayName=ra;var Zo="CollapsibleContent",aa=p.forwardRef((e,t)=>{const{forceMount:o,...r}=e,n=Ko(Zo,e.__scopeCollapsible);return d.jsx(Ee,{present:o||n.open,children:({present:a})=>d.jsx(du,{...r,ref:t,present:a})})});aa.displayName=Zo;var du=p.forwardRef((e,t)=>{const{__scopeCollapsible:o,present:r,children:n,...a}=e,s=Ko(Zo,o),[i,l]=p.useState(r),u=p.useRef(null),f=ae(t,u),c=p.useRef(0),h=c.current,g=p.useRef(0),b=g.current,m=s.open||i,v=p.useRef(m),w=p.useRef(void 0);return p.useEffect(()=>{const y=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(y)},[]),ie(()=>{const y=u.current;if(y){w.current=w.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";const k=y.getBoundingClientRect();c.current=k.height,g.current=k.width,v.current||(y.style.transitionDuration=w.current.transitionDuration,y.style.animationName=w.current.animationName),l(r)}},[s.open,r]),d.jsx(K.div,{"data-state":Jo(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!m,...a,ref:f,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:m&&n})});function Jo(e){return e?"open":"closed"}var uu=oa,fu=p.createContext(void 0);function zt(e){const t=p.useContext(fu);return e||t||"ltr"}function pe(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...o)=>{var r;return(r=t.current)==null?void 0:r.call(t,...o)},[])}function pu(e,t=globalThis==null?void 0:globalThis.document){const o=pe(e);p.useEffect(()=>{const r=n=>{n.key==="Escape"&&o(n)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[o,t])}var hu="DismissableLayer",Qo="dismissableLayer.update",gu="dismissableLayer.pointerDownOutside",mu="dismissableLayer.focusOutside",sa,ia=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),er=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:r,onPointerDownOutside:n,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...l}=e,u=p.useContext(ia),[f,c]=p.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=p.useState({}),b=ae(t,_=>c(_)),m=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=m.indexOf(v),y=f?m.indexOf(f):-1,k=u.layersWithOutsidePointerEventsDisabled.size>0,C=y>=w,T=wu(_=>{const E=_.target,I=[...u.branches].some(L=>L.contains(E));!C||I||(n==null||n(_),s==null||s(_),_.defaultPrevented||i==null||i())},h),P=yu(_=>{const E=_.target;[...u.branches].some(L=>L.contains(E))||(a==null||a(_),s==null||s(_),_.defaultPrevented||i==null||i())},h);return pu(_=>{y===u.layers.size-1&&(r==null||r(_),!_.defaultPrevented&&i&&(_.preventDefault(),i()))},h),p.useEffect(()=>{if(f)return o&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(sa=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),la(),()=>{o&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=sa)}},[f,h,o,u]),p.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),la())},[f,u]),p.useEffect(()=>{const _=()=>g({});return document.addEventListener(Qo,_),()=>document.removeEventListener(Qo,_)},[]),d.jsx(K.div,{...l,ref:b,style:{pointerEvents:k?C?"auto":"none":void 0,...e.style},onFocusCapture:Z(e.onFocusCapture,P.onFocusCapture),onBlurCapture:Z(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:Z(e.onPointerDownCapture,T.onPointerDownCapture)})});er.displayName=hu;var vu="DismissableLayerBranch",bu=p.forwardRef((e,t)=>{const o=p.useContext(ia),r=p.useRef(null),n=ae(t,r);return p.useEffect(()=>{const a=r.current;if(a)return o.branches.add(a),()=>{o.branches.delete(a)}},[o.branches]),d.jsx(K.div,{...e,ref:n})});bu.displayName=vu;function wu(e,t=globalThis==null?void 0:globalThis.document){const o=pe(e),r=p.useRef(!1),n=p.useRef(()=>{});return p.useEffect(()=>{const a=i=>{if(i.target&&!r.current){let l=function(){ca(gu,o,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",n.current),n.current=l,t.addEventListener("click",n.current,{once:!0})):l()}else t.removeEventListener("click",n.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",n.current)}},[t,o]),{onPointerDownCapture:()=>r.current=!0}}function yu(e,t=globalThis==null?void 0:globalThis.document){const o=pe(e),r=p.useRef(!1);return p.useEffect(()=>{const n=a=>{a.target&&!r.current&&ca(mu,o,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",n),()=>t.removeEventListener("focusin",n)},[t,o]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function la(){const e=new CustomEvent(Qo);document.dispatchEvent(e)}function ca(e,t,o,{discrete:r}){const n=o.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:o});t&&n.addEventListener(e,t,{once:!0}),r?Kd(n,a):n.dispatchEvent(a)}var tr="focusScope.autoFocusOnMount",or="focusScope.autoFocusOnUnmount",da={bubbles:!1,cancelable:!0},xu="FocusScope",ua=p.forwardRef((e,t)=>{const{loop:o=!1,trapped:r=!1,onMountAutoFocus:n,onUnmountAutoFocus:a,...s}=e,[i,l]=p.useState(null),u=pe(n),f=pe(a),c=p.useRef(null),h=ae(t,m=>l(m)),g=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(r){let m=function(k){if(g.paused||!i)return;const C=k.target;i.contains(C)?c.current=C:qe(c.current,{select:!0})},v=function(k){if(g.paused||!i)return;const C=k.relatedTarget;C!==null&&(i.contains(C)||qe(c.current,{select:!0}))},w=function(k){if(document.activeElement===document.body)for(const T of k)T.removedNodes.length>0&&qe(i)};document.addEventListener("focusin",m),document.addEventListener("focusout",v);const y=new MutationObserver(w);return i&&y.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",v),y.disconnect()}}},[r,i,g.paused]),p.useEffect(()=>{if(i){ha.add(g);const m=document.activeElement;if(!i.contains(m)){const w=new CustomEvent(tr,da);i.addEventListener(tr,u),i.dispatchEvent(w),w.defaultPrevented||(ku(Tu(fa(i)),{select:!0}),document.activeElement===m&&qe(i))}return()=>{i.removeEventListener(tr,u),setTimeout(()=>{const w=new CustomEvent(or,da);i.addEventListener(or,f),i.dispatchEvent(w),w.defaultPrevented||qe(m??document.body,{select:!0}),i.removeEventListener(or,f),ha.remove(g)},0)}}},[i,u,f,g]);const b=p.useCallback(m=>{if(!o&&!r||g.paused)return;const v=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,w=document.activeElement;if(v&&w){const y=m.currentTarget,[k,C]=Su(y);k&&C?!m.shiftKey&&w===C?(m.preventDefault(),o&&qe(k,{select:!0})):m.shiftKey&&w===k&&(m.preventDefault(),o&&qe(C,{select:!0})):w===y&&m.preventDefault()}},[o,r,g.paused]);return d.jsx(K.div,{tabIndex:-1,...s,ref:h,onKeyDown:b})});ua.displayName=xu;function ku(e,{select:t=!1}={}){const o=document.activeElement;for(const r of e)if(qe(r,{select:t}),document.activeElement!==o)return}function Su(e){const t=fa(e),o=pa(t,e),r=pa(t.reverse(),e);return[o,r]}function fa(e){const t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const n=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||n?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)t.push(o.currentNode);return t}function pa(e,t){for(const o of e)if(!Cu(o,{upTo:t}))return o}function Cu(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Eu(e){return e instanceof HTMLInputElement&&"select"in e}function qe(e,{select:t=!1}={}){if(e&&e.focus){const o=document.activeElement;e.focus({preventScroll:!0}),e!==o&&Eu(e)&&t&&e.select()}}var ha=Nu();function Nu(){let e=[];return{add(t){const o=e[0];t!==o&&(o==null||o.pause()),e=ga(e,t),e.unshift(t)},remove(t){var o;e=ga(e,t),(o=e[0])==null||o.resume()}}}function ga(e,t){const o=[...e],r=o.indexOf(t);return r!==-1&&o.splice(r,1),o}function Tu(e){return e.filter(t=>t.tagName!=="A")}var _u="Portal",rr=p.forwardRef((e,t)=>{var i;const{container:o,...r}=e,[n,a]=p.useState(!1);ie(()=>a(!0),[]);const s=o||n&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?Ho.createPortal(d.jsx(K.div,{...r,ref:t}),s):null});rr.displayName=_u;var nr=0;function Pu(){p.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ma()),document.body.insertAdjacentElement("beforeend",e[1]??ma()),nr++,()=>{nr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),nr--}},[])}function ma(){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 Oe=function(){return Oe=Object.assign||function(t){for(var o,r=1,n=arguments.length;r<n;r++){o=arguments[r];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(t[a]=o[a])}return t},Oe.apply(this,arguments)};function va(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(o[r[n]]=e[r[n]]);return o}function Au(e,t,o){if(o||arguments.length===2)for(var r=0,n=t.length,a;r<n;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Qt="right-scroll-bar-position",eo="width-before-scroll-bar",Iu="with-scroll-bars-hidden",Mu="--removed-body-scroll-bar-size";function ar(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Ou(e,t){var o=x.useState(function(){return{value:e,callback:t,facade:{get current(){return o.value},set current(r){var n=o.value;n!==r&&(o.value=r,o.callback(r,n))}}}})[0];return o.callback=t,o.facade}var Lu=typeof window<"u"?p.useLayoutEffect:p.useEffect,ba=new WeakMap;function zu(e,t){var o=Ou(null,function(r){return e.forEach(function(n){return ar(n,r)})});return Lu(function(){var r=ba.get(o);if(r){var n=new Set(r),a=new Set(e),s=o.current;n.forEach(function(i){a.has(i)||ar(i,null)}),a.forEach(function(i){n.has(i)||ar(i,s)})}ba.set(o,e)},[e]),o}function Du(e){return e}function $u(e,t){t===void 0&&(t=Du);var o=[],r=!1,n={read:function(){if(r)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(a){var s=t(a,r);return o.push(s),function(){o=o.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(r=!0;o.length;){var s=o;o=[],s.forEach(a)}o={push:function(i){return a(i)},filter:function(){return o}}},assignMedium:function(a){r=!0;var s=[];if(o.length){var i=o;o=[],i.forEach(a),s=o}var l=function(){var f=s;s=[],f.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),o={push:function(f){s.push(f),u()},filter:function(f){return s=s.filter(f),o}}}};return n}function Fu(e){e===void 0&&(e={});var t=$u(null);return t.options=Oe({async:!0,ssr:!1},e),t}var wa=function(e){var t=e.sideCar,o=va(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return p.createElement(r,Oe({},o))};wa.isSideCarExport=!0;function Bu(e,t){return e.useMedium(t),wa}var ya=Fu(),sr=function(){},to=p.forwardRef(function(e,t){var o=p.useRef(null),r=p.useState({onScrollCapture:sr,onWheelCapture:sr,onTouchMoveCapture:sr}),n=r[0],a=r[1],s=e.forwardProps,i=e.children,l=e.className,u=e.removeScrollBar,f=e.enabled,c=e.shards,h=e.sideCar,g=e.noRelative,b=e.noIsolation,m=e.inert,v=e.allowPinchZoom,w=e.as,y=w===void 0?"div":w,k=e.gapMode,C=va(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=h,P=zu([o,t]),_=Oe(Oe({},C),n);return p.createElement(p.Fragment,null,f&&p.createElement(T,{sideCar:ya,removeScrollBar:u,shards:c,noRelative:g,noIsolation:b,inert:m,setCallbacks:a,allowPinchZoom:!!v,lockRef:o,gapMode:k}),s?p.cloneElement(p.Children.only(i),Oe(Oe({},_),{ref:P})):p.createElement(y,Oe({},_,{className:l,ref:P}),i))});to.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},to.classNames={fullWidth:eo,zeroRight:Qt};var Hu=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Vu(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Hu();return t&&e.setAttribute("nonce",t),e}function Wu(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Uu(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ju=function(){var e=0,t=null;return{add:function(o){e==0&&(t=Vu())&&(Wu(t,o),Uu(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ru=function(){var e=ju();return function(t,o){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&o])}},xa=function(){var e=Ru(),t=function(o){var r=o.styles,n=o.dynamic;return e(r,n),null};return t},Gu={left:0,top:0,right:0,gap:0},ir=function(e){return parseInt(e||"",10)||0},qu=function(e){var t=window.getComputedStyle(document.body),o=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],n=t[e==="padding"?"paddingRight":"marginRight"];return[ir(o),ir(r),ir(n)]},Yu=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Gu;var t=qu(e),o=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-o+t[2]-t[0])}},Xu=xa(),ht="data-scroll-locked",Ku=function(e,t,o,r){var n=e.left,a=e.top,s=e.right,i=e.gap;return o===void 0&&(o="margin"),`
238
+ .`.concat(Iu,` {
234
239
  overflow: hidden `).concat(r,`;
235
240
  padding-right: `).concat(i,"px ").concat(r,`;
236
241
  }
@@ -264,12 +269,12 @@
264
269
  }
265
270
 
266
271
  body[`).concat(ht,`] {
267
- `).concat(Au,": ").concat(i,`px;
272
+ `).concat(Mu,": ").concat(i,`px;
268
273
  }
269
- `)},ka=function(){var e=parseInt(document.body.getAttribute(ht)||"0",10);return isFinite(e)?e:0},Xu=function(){p.useEffect(function(){return document.body.setAttribute(ht,(ka()+1).toString()),function(){var e=ka()-1;e<=0?document.body.removeAttribute(ht):document.body.setAttribute(ht,e.toString())}},[])},Ku=function(e){var t=e.noRelative,o=e.noImportant,r=e.gapMode,n=r===void 0?"margin":r;Xu();var a=p.useMemo(function(){return Gu(n)},[n]);return p.createElement(qu,{styles:Yu(a,!t,n,o?"":"!important")})},lr=!1;if(typeof window<"u")try{var oo=Object.defineProperty({},"passive",{get:function(){return lr=!0,!0}});window.addEventListener("test",oo,oo),window.removeEventListener("test",oo,oo)}catch{lr=!1}var gt=lr?{passive:!1}:!1,Zu=function(e){return e.tagName==="TEXTAREA"},Sa=function(e,t){if(!(e instanceof Element))return!1;var o=window.getComputedStyle(e);return o[t]!=="hidden"&&!(o.overflowY===o.overflowX&&!Zu(e)&&o[t]==="visible")},Ju=function(e){return Sa(e,"overflowY")},Qu=function(e){return Sa(e,"overflowX")},Ca=function(e,t){var o=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=Ea(e,r);if(n){var a=Na(e,r),s=a[1],i=a[2];if(s>i)return!0}r=r.parentNode}while(r&&r!==o.body);return!1},ef=function(e){var t=e.scrollTop,o=e.scrollHeight,r=e.clientHeight;return[t,o,r]},tf=function(e){var t=e.scrollLeft,o=e.scrollWidth,r=e.clientWidth;return[t,o,r]},Ea=function(e,t){return e==="v"?Ju(t):Qu(t)},Na=function(e,t){return e==="v"?ef(t):tf(t)},of=function(e,t){return e==="h"&&t==="rtl"?-1:1},rf=function(e,t,o,r,n){var a=of(e,window.getComputedStyle(t).direction),s=a*r,i=o.target,l=t.contains(i),u=!1,f=s>0,c=0,h=0;do{if(!i)break;var g=Na(e,i),b=g[0],m=g[1],v=g[2],w=m-v-a*b;(b||w)&&Ea(e,i)&&(c+=w,h+=b);var y=i.parentNode;i=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!l&&i!==document.body||l&&(t.contains(i)||t===i));return(f&&Math.abs(c)<1||!f&&Math.abs(h)<1)&&(u=!0),u},ro=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ta=function(e){return[e.deltaX,e.deltaY]},_a=function(e){return e&&"current"in e?e.current:e},nf=function(e,t){return e[0]===t[0]&&e[1]===t[1]},af=function(e){return`
274
+ `)},ka=function(){var e=parseInt(document.body.getAttribute(ht)||"0",10);return isFinite(e)?e:0},Zu=function(){p.useEffect(function(){return document.body.setAttribute(ht,(ka()+1).toString()),function(){var e=ka()-1;e<=0?document.body.removeAttribute(ht):document.body.setAttribute(ht,e.toString())}},[])},Ju=function(e){var t=e.noRelative,o=e.noImportant,r=e.gapMode,n=r===void 0?"margin":r;Zu();var a=p.useMemo(function(){return Yu(n)},[n]);return p.createElement(Xu,{styles:Ku(a,!t,n,o?"":"!important")})},lr=!1;if(typeof window<"u")try{var oo=Object.defineProperty({},"passive",{get:function(){return lr=!0,!0}});window.addEventListener("test",oo,oo),window.removeEventListener("test",oo,oo)}catch{lr=!1}var gt=lr?{passive:!1}:!1,Qu=function(e){return e.tagName==="TEXTAREA"},Sa=function(e,t){if(!(e instanceof Element))return!1;var o=window.getComputedStyle(e);return o[t]!=="hidden"&&!(o.overflowY===o.overflowX&&!Qu(e)&&o[t]==="visible")},ef=function(e){return Sa(e,"overflowY")},tf=function(e){return Sa(e,"overflowX")},Ca=function(e,t){var o=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=Ea(e,r);if(n){var a=Na(e,r),s=a[1],i=a[2];if(s>i)return!0}r=r.parentNode}while(r&&r!==o.body);return!1},of=function(e){var t=e.scrollTop,o=e.scrollHeight,r=e.clientHeight;return[t,o,r]},rf=function(e){var t=e.scrollLeft,o=e.scrollWidth,r=e.clientWidth;return[t,o,r]},Ea=function(e,t){return e==="v"?ef(t):tf(t)},Na=function(e,t){return e==="v"?of(t):rf(t)},nf=function(e,t){return e==="h"&&t==="rtl"?-1:1},af=function(e,t,o,r,n){var a=nf(e,window.getComputedStyle(t).direction),s=a*r,i=o.target,l=t.contains(i),u=!1,f=s>0,c=0,h=0;do{if(!i)break;var g=Na(e,i),b=g[0],m=g[1],v=g[2],w=m-v-a*b;(b||w)&&Ea(e,i)&&(c+=w,h+=b);var y=i.parentNode;i=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!l&&i!==document.body||l&&(t.contains(i)||t===i));return(f&&Math.abs(c)<1||!f&&Math.abs(h)<1)&&(u=!0),u},ro=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ta=function(e){return[e.deltaX,e.deltaY]},_a=function(e){return e&&"current"in e?e.current:e},sf=function(e,t){return e[0]===t[0]&&e[1]===t[1]},lf=function(e){return`
270
275
  .block-interactivity-`.concat(e,` {pointer-events: none;}
271
276
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
272
- `)},sf=0,mt=[];function lf(e){var t=p.useRef([]),o=p.useRef([0,0]),r=p.useRef(),n=p.useState(sf++)[0],a=p.useState(xa)[0],s=p.useRef(e);p.useEffect(function(){s.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(n));var m=_u([e.lockRef.current],(e.shards||[]).map(_a),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(n))}),function(){document.body.classList.remove("block-interactivity-".concat(n)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(n))})}}},[e.inert,e.lockRef.current,e.shards]);var i=p.useCallback(function(m,v){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!s.current.allowPinchZoom;var w=ro(m),y=o.current,k="deltaX"in m?m.deltaX:y[0]-w[0],E="deltaY"in m?m.deltaY:y[1]-w[1],_,P=m.target,T=Math.abs(k)>Math.abs(E)?"h":"v";if("touches"in m&&T==="h"&&P.type==="range")return!1;var S=window.getSelection(),I=S&&S.anchorNode,D=I?I===P||I.contains(P):!1;if(D)return!1;var L=Ca(T,P);if(!L)return!0;if(L?_=T:(_=T==="v"?"h":"v",L=Ca(T,P)),!L)return!1;if(!r.current&&"changedTouches"in m&&(k||E)&&(r.current=_),!_)return!0;var V=r.current||_;return rf(V,v,m,V==="h"?k:E)},[]),l=p.useCallback(function(m){var v=m;if(!(!mt.length||mt[mt.length-1]!==a)){var w="deltaY"in v?Ta(v):ro(v),y=t.current.filter(function(_){return _.name===v.type&&(_.target===v.target||v.target===_.shadowParent)&&nf(_.delta,w)})[0];if(y&&y.should){v.cancelable&&v.preventDefault();return}if(!y){var k=(s.current.shards||[]).map(_a).filter(Boolean).filter(function(_){return _.contains(v.target)}),E=k.length>0?i(v,k[0]):!s.current.noIsolation;E&&v.cancelable&&v.preventDefault()}}},[]),u=p.useCallback(function(m,v,w,y){var k={name:m,delta:v,target:w,should:y,shadowParent:cf(w)};t.current.push(k),setTimeout(function(){t.current=t.current.filter(function(E){return E!==k})},1)},[]),f=p.useCallback(function(m){o.current=ro(m),r.current=void 0},[]),c=p.useCallback(function(m){u(m.type,Ta(m),m.target,i(m,e.lockRef.current))},[]),h=p.useCallback(function(m){u(m.type,ro(m),m.target,i(m,e.lockRef.current))},[]);p.useEffect(function(){return mt.push(a),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:h}),document.addEventListener("wheel",l,gt),document.addEventListener("touchmove",l,gt),document.addEventListener("touchstart",f,gt),function(){mt=mt.filter(function(m){return m!==a}),document.removeEventListener("wheel",l,gt),document.removeEventListener("touchmove",l,gt),document.removeEventListener("touchstart",f,gt)}},[]);var g=e.removeScrollBar,b=e.inert;return p.createElement(p.Fragment,null,b?p.createElement(a,{styles:af(n)}):null,g?p.createElement(Ku,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function cf(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const df=$u(ya,lf);var Pa=p.forwardRef(function(e,t){return p.createElement(to,Oe({},e,{ref:t,sideCar:df}))});Pa.classNames=to.classNames;var uf=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},vt=new WeakMap,no=new WeakMap,ao={},cr=0,Aa=function(e){return e&&(e.host||Aa(e.parentNode))},ff=function(e,t){return t.map(function(o){if(e.contains(o))return o;var r=Aa(o);return r&&e.contains(r)?r:(console.error("aria-hidden",o,"in not contained inside",e,". Doing nothing"),null)}).filter(function(o){return!!o})},pf=function(e,t,o,r){var n=ff(t,Array.isArray(e)?e:[e]);ao[o]||(ao[o]=new WeakMap);var a=ao[o],s=[],i=new Set,l=new Set(n),u=function(c){!c||i.has(c)||(i.add(c),u(c.parentNode))};n.forEach(u);var f=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(h){if(i.has(h))f(h);else try{var g=h.getAttribute(r),b=g!==null&&g!=="false",m=(vt.get(h)||0)+1,v=(a.get(h)||0)+1;vt.set(h,m),a.set(h,v),s.push(h),m===1&&b&&no.set(h,!0),v===1&&h.setAttribute(o,"true"),b||h.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",h,w)}})};return f(t),i.clear(),cr++,function(){s.forEach(function(c){var h=vt.get(c)-1,g=a.get(c)-1;vt.set(c,h),a.set(c,g),h||(no.has(c)||c.removeAttribute(r),no.delete(c)),g||c.removeAttribute(o)}),cr--,cr||(vt=new WeakMap,vt=new WeakMap,no=new WeakMap,ao={})}},hf=function(e,t,o){o===void 0&&(o="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),n=uf(e);return n?(r.push.apply(r,Array.from(n.querySelectorAll("[aria-live], script"))),pf(r,n,o,"aria-hidden")):function(){return null}},dr={exports:{}},ur={};/**
277
+ `)},cf=0,mt=[];function df(e){var t=p.useRef([]),o=p.useRef([0,0]),r=p.useRef(),n=p.useState(cf++)[0],a=p.useState(xa)[0],s=p.useRef(e);p.useEffect(function(){s.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(n));var m=Au([e.lockRef.current],(e.shards||[]).map(_a),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(n))}),function(){document.body.classList.remove("block-interactivity-".concat(n)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(n))})}}},[e.inert,e.lockRef.current,e.shards]);var i=p.useCallback(function(m,v){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!s.current.allowPinchZoom;var w=ro(m),y=o.current,k="deltaX"in m?m.deltaX:y[0]-w[0],C="deltaY"in m?m.deltaY:y[1]-w[1],T,P=m.target,_=Math.abs(k)>Math.abs(C)?"h":"v";if("touches"in m&&_==="h"&&P.type==="range")return!1;var E=window.getSelection(),I=E&&E.anchorNode,L=I?I===P||I.contains(P):!1;if(L)return!1;var F=Ca(_,P);if(!F)return!0;if(F?T=_:(T=_==="v"?"h":"v",F=Ca(_,P)),!F)return!1;if(!r.current&&"changedTouches"in m&&(k||C)&&(r.current=T),!T)return!0;var D=r.current||T;return af(D,v,m,D==="h"?k:C)},[]),l=p.useCallback(function(m){var v=m;if(!(!mt.length||mt[mt.length-1]!==a)){var w="deltaY"in v?Ta(v):ro(v),y=t.current.filter(function(T){return T.name===v.type&&(T.target===v.target||v.target===T.shadowParent)&&sf(T.delta,w)})[0];if(y&&y.should){v.cancelable&&v.preventDefault();return}if(!y){var k=(s.current.shards||[]).map(_a).filter(Boolean).filter(function(T){return T.contains(v.target)}),C=k.length>0?i(v,k[0]):!s.current.noIsolation;C&&v.cancelable&&v.preventDefault()}}},[]),u=p.useCallback(function(m,v,w,y){var k={name:m,delta:v,target:w,should:y,shadowParent:uf(w)};t.current.push(k),setTimeout(function(){t.current=t.current.filter(function(C){return C!==k})},1)},[]),f=p.useCallback(function(m){o.current=ro(m),r.current=void 0},[]),c=p.useCallback(function(m){u(m.type,Ta(m),m.target,i(m,e.lockRef.current))},[]),h=p.useCallback(function(m){u(m.type,ro(m),m.target,i(m,e.lockRef.current))},[]);p.useEffect(function(){return mt.push(a),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:h}),document.addEventListener("wheel",l,gt),document.addEventListener("touchmove",l,gt),document.addEventListener("touchstart",f,gt),function(){mt=mt.filter(function(m){return m!==a}),document.removeEventListener("wheel",l,gt),document.removeEventListener("touchmove",l,gt),document.removeEventListener("touchstart",f,gt)}},[]);var g=e.removeScrollBar,b=e.inert;return p.createElement(p.Fragment,null,b?p.createElement(a,{styles:lf(n)}):null,g?p.createElement(Ju,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function uf(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ff=Bu(ya,df);var Pa=p.forwardRef(function(e,t){return p.createElement(to,Oe({},e,{ref:t,sideCar:ff}))});Pa.classNames=to.classNames;var pf=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},vt=new WeakMap,no=new WeakMap,ao={},cr=0,Aa=function(e){return e&&(e.host||Aa(e.parentNode))},hf=function(e,t){return t.map(function(o){if(e.contains(o))return o;var r=Aa(o);return r&&e.contains(r)?r:(console.error("aria-hidden",o,"in not contained inside",e,". Doing nothing"),null)}).filter(function(o){return!!o})},gf=function(e,t,o,r){var n=hf(t,Array.isArray(e)?e:[e]);ao[o]||(ao[o]=new WeakMap);var a=ao[o],s=[],i=new Set,l=new Set(n),u=function(c){!c||i.has(c)||(i.add(c),u(c.parentNode))};n.forEach(u);var f=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(h){if(i.has(h))f(h);else try{var g=h.getAttribute(r),b=g!==null&&g!=="false",m=(vt.get(h)||0)+1,v=(a.get(h)||0)+1;vt.set(h,m),a.set(h,v),s.push(h),m===1&&b&&no.set(h,!0),v===1&&h.setAttribute(o,"true"),b||h.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",h,w)}})};return f(t),i.clear(),cr++,function(){s.forEach(function(c){var h=vt.get(c)-1,g=a.get(c)-1;vt.set(c,h),a.set(c,g),h||(no.has(c)||c.removeAttribute(r),no.delete(c)),g||c.removeAttribute(o)}),cr--,cr||(vt=new WeakMap,vt=new WeakMap,no=new WeakMap,ao={})}},mf=function(e,t,o){o===void 0&&(o="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),n=pf(e);return n?(r.push.apply(r,Array.from(n.querySelectorAll("[aria-live], script"))),gf(r,n,o,"aria-hidden")):function(){return null}},dr={exports:{}},ur={};/**
273
278
  * @license React
274
279
  * use-sync-external-store-shim.production.js
275
280
  *
@@ -277,16 +282,16 @@
277
282
  *
278
283
  * This source code is licensed under the MIT license found in the
279
284
  * LICENSE file in the root directory of this source tree.
280
- */var Ia;function gf(){if(Ia)return ur;Ia=1;var e=x;function t(c,h){return c===h&&(c!==0||1/c===1/h)||c!==c&&h!==h}var o=typeof Object.is=="function"?Object.is:t,r=e.useState,n=e.useEffect,a=e.useLayoutEffect,s=e.useDebugValue;function i(c,h){var g=h(),b=r({inst:{value:g,getSnapshot:h}}),m=b[0].inst,v=b[1];return a(function(){m.value=g,m.getSnapshot=h,l(m)&&v({inst:m})},[c,g,h]),n(function(){return l(m)&&v({inst:m}),c(function(){l(m)&&v({inst:m})})},[c]),s(g),g}function l(c){var h=c.getSnapshot;c=c.value;try{var g=h();return!o(c,g)}catch{return!0}}function u(c,h){return h()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:i;return ur.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,ur}var Ma;function mf(){return Ma||(Ma=1,dr.exports=gf()),dr.exports}var vf=mf();function bf(){return vf.useSyncExternalStore(wf,()=>!0,()=>!1)}function wf(){return()=>{}}var fr="Avatar",[yf]=me(fr),[xf,Oa]=yf(fr),La=p.forwardRef((e,t)=>{const{__scopeAvatar:o,...r}=e,[n,a]=p.useState("idle");return d.jsx(xf,{scope:o,imageLoadingStatus:n,onImageLoadingStatusChange:a,children:d.jsx(X.span,{...r,ref:t})})});La.displayName=fr;var za="AvatarImage",Da=p.forwardRef((e,t)=>{const{__scopeAvatar:o,src:r,onLoadingStatusChange:n=()=>{},...a}=e,s=Oa(za,o),i=kf(r,a),l=pe(u=>{n(u),s.onImageLoadingStatusChange(u)});return ie(()=>{i!=="idle"&&l(i)},[i,l]),i==="loaded"?d.jsx(X.img,{...a,ref:t,src:r}):null});Da.displayName=za;var $a="AvatarFallback",Fa=p.forwardRef((e,t)=>{const{__scopeAvatar:o,delayMs:r,...n}=e,a=Oa($a,o),[s,i]=p.useState(r===void 0);return p.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>i(!0),r);return()=>window.clearTimeout(l)}},[r]),s&&a.imageLoadingStatus!=="loaded"?d.jsx(X.span,{...n,ref:t}):null});Fa.displayName=$a;function Ba(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function kf(e,{referrerPolicy:t,crossOrigin:o}){const r=bf(),n=p.useRef(null),a=r?(n.current||(n.current=new window.Image),n.current):null,[s,i]=p.useState(()=>Ba(a,e));return ie(()=>{i(Ba(a,e))},[a,e]),ie(()=>{const l=c=>()=>{i(c)};if(!a)return;const u=l("loaded"),f=l("error");return a.addEventListener("load",u),a.addEventListener("error",f),t&&(a.referrerPolicy=t),typeof o=="string"&&(a.crossOrigin=o),()=>{a.removeEventListener("load",u),a.removeEventListener("error",f)}},[a,o,t]),s}var Sf=La,Cf=Da,Ef=Fa;function so(e){const t=p.useRef({value:e,previous:e});return p.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function io(e){const[t,o]=p.useState(void 0);return ie(()=>{if(e){o({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(n=>{if(!Array.isArray(n)||!n.length)return;const a=n[0];let s,i;if("borderBoxSize"in a){const l=a.borderBoxSize,u=Array.isArray(l)?l[0]:l;s=u.inlineSize,i=u.blockSize}else s=e.offsetWidth,i=e.offsetHeight;o({width:s,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else o(void 0)},[e]),t}var lo="Checkbox",[Nf]=me(lo),[Tf,pr]=Nf(lo);function _f(e){const{__scopeCheckbox:t,checked:o,children:r,defaultChecked:n,disabled:a,form:s,name:i,onCheckedChange:l,required:u,value:f="on",internal_do_not_use_render:c}=e,[h,g]=He({prop:o,defaultProp:n??!1,onChange:l,caller:lo}),[b,m]=p.useState(null),[v,w]=p.useState(null),y=p.useRef(!1),k=b?!!s||!!b.closest("form"):!0,E={checked:h,disabled:a,setChecked:g,control:b,setControl:m,name:i,form:s,value:f,hasConsumerStoppedPropagationRef:y,required:u,defaultChecked:Ye(n)?!1:n,isFormControl:k,bubbleInput:v,setBubbleInput:w};return d.jsx(Tf,{scope:t,...E,children:Pf(c)?c(E):r})}var Ha="CheckboxTrigger",Va=p.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:o,...r},n)=>{const{control:a,value:s,disabled:i,checked:l,required:u,setControl:f,setChecked:c,hasConsumerStoppedPropagationRef:h,isFormControl:g,bubbleInput:b}=pr(Ha,e),m=ae(n,f),v=p.useRef(l);return p.useEffect(()=>{const w=a==null?void 0:a.form;if(w){const y=()=>c(v.current);return w.addEventListener("reset",y),()=>w.removeEventListener("reset",y)}},[a,c]),d.jsx(X.button,{type:"button",role:"checkbox","aria-checked":Ye(l)?"mixed":l,"aria-required":u,"data-state":qa(l),"data-disabled":i?"":void 0,disabled:i,value:s,...r,ref:m,onKeyDown:K(t,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:K(o,w=>{c(y=>Ye(y)?!0:!y),b&&g&&(h.current=w.isPropagationStopped(),h.current||w.stopPropagation())})})});Va.displayName=Ha;var Wa=p.forwardRef((e,t)=>{const{__scopeCheckbox:o,name:r,checked:n,defaultChecked:a,required:s,disabled:i,value:l,onCheckedChange:u,form:f,...c}=e;return d.jsx(_f,{__scopeCheckbox:o,checked:n,defaultChecked:a,disabled:i,required:s,onCheckedChange:u,name:r,form:f,value:l,internal_do_not_use_render:({isFormControl:h})=>d.jsxs(d.Fragment,{children:[d.jsx(Va,{...c,ref:t,__scopeCheckbox:o}),h&&d.jsx(Ga,{__scopeCheckbox:o})]})})});Wa.displayName=lo;var Ua="CheckboxIndicator",ja=p.forwardRef((e,t)=>{const{__scopeCheckbox:o,forceMount:r,...n}=e,a=pr(Ua,o);return d.jsx(Ee,{present:r||Ye(a.checked)||a.checked===!0,children:d.jsx(X.span,{"data-state":qa(a.checked),"data-disabled":a.disabled?"":void 0,...n,ref:t,style:{pointerEvents:"none",...e.style}})})});ja.displayName=Ua;var Ra="CheckboxBubbleInput",Ga=p.forwardRef(({__scopeCheckbox:e,...t},o)=>{const{control:r,hasConsumerStoppedPropagationRef:n,checked:a,defaultChecked:s,required:i,disabled:l,name:u,value:f,form:c,bubbleInput:h,setBubbleInput:g}=pr(Ra,e),b=ae(o,g),m=so(a),v=io(r);p.useEffect(()=>{const y=h;if(!y)return;const k=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(k,"checked").set,P=!n.current;if(m!==a&&_){const T=new Event("click",{bubbles:P});y.indeterminate=Ye(a),_.call(y,Ye(a)?!1:a),y.dispatchEvent(T)}},[h,m,a,n]);const w=p.useRef(Ye(a)?!1:a);return d.jsx(X.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??w.current,required:i,disabled:l,name:u,value:f,form:c,...t,tabIndex:-1,ref:b,style:{...t.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Ga.displayName=Ra;function Pf(e){return typeof e=="function"}function Ye(e){return e==="indeterminate"}function qa(e){return Ye(e)?"indeterminate":e?"checked":"unchecked"}const Af=["top","right","bottom","left"],Xe=Math.min,we=Math.max,co=Math.round,uo=Math.floor,Le=e=>({x:e,y:e}),If={left:"right",right:"left",bottom:"top",top:"bottom"};function hr(e,t,o){return we(e,Xe(t,o))}function Ve(e,t){return typeof e=="function"?e(t):e}function We(e){return e.split("-")[0]}function bt(e){return e.split("-")[1]}function gr(e){return e==="x"?"y":"x"}function mr(e){return e==="y"?"height":"width"}function ze(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function vr(e){return gr(ze(e))}function Mf(e,t,o){o===void 0&&(o=!1);const r=bt(e),n=vr(e),a=mr(n);let s=n==="x"?r===(o?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=fo(s)),[s,fo(s)]}function Of(e){const t=fo(e);return[br(e),t,br(t)]}function br(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Ya=["left","right"],Xa=["right","left"],Lf=["top","bottom"],zf=["bottom","top"];function Df(e,t,o){switch(e){case"top":case"bottom":return o?t?Xa:Ya:t?Ya:Xa;case"left":case"right":return t?Lf:zf;default:return[]}}function $f(e,t,o,r){const n=bt(e);let a=Df(We(e),o==="start",r);return n&&(a=a.map(s=>s+"-"+n),t&&(a=a.concat(a.map(br)))),a}function fo(e){const t=We(e);return If[t]+e.slice(t.length)}function Ff(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ka(e){return typeof e!="number"?Ff(e):{top:e,right:e,bottom:e,left:e}}function po(e){const{x:t,y:o,width:r,height:n}=e;return{width:r,height:n,top:o,left:t,right:t+r,bottom:o+n,x:t,y:o}}function Za(e,t,o){let{reference:r,floating:n}=e;const a=ze(t),s=vr(t),i=mr(s),l=We(t),u=a==="y",f=r.x+r.width/2-n.width/2,c=r.y+r.height/2-n.height/2,h=r[i]/2-n[i]/2;let g;switch(l){case"top":g={x:f,y:r.y-n.height};break;case"bottom":g={x:f,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:c};break;case"left":g={x:r.x-n.width,y:c};break;default:g={x:r.x,y:r.y}}switch(bt(t)){case"start":g[s]-=h*(o&&u?-1:1);break;case"end":g[s]+=h*(o&&u?-1:1);break}return g}async function Bf(e,t){var o;t===void 0&&(t={});const{x:r,y:n,platform:a,rects:s,elements:i,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:c="floating",altBoundary:h=!1,padding:g=0}=Ve(t,e),b=Ka(g),v=i[h?c==="floating"?"reference":"floating":c],w=po(await a.getClippingRect({element:(o=await(a.isElement==null?void 0:a.isElement(v)))==null||o?v:v.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:u,rootBoundary:f,strategy:l})),y=c==="floating"?{x:r,y:n,width:s.floating.width,height:s.floating.height}:s.reference,k=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),E=await(a.isElement==null?void 0:a.isElement(k))?await(a.getScale==null?void 0:a.getScale(k))||{x:1,y:1}:{x:1,y:1},_=po(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:y,offsetParent:k,strategy:l}):y);return{top:(w.top-_.top+b.top)/E.y,bottom:(_.bottom-w.bottom+b.bottom)/E.y,left:(w.left-_.left+b.left)/E.x,right:(_.right-w.right+b.right)/E.x}}const Hf=50,Vf=async(e,t,o)=>{const{placement:r="bottom",strategy:n="absolute",middleware:a=[],platform:s}=o,i=s.detectOverflow?s:{...s,detectOverflow:Bf},l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:n}),{x:f,y:c}=Za(u,r,l),h=r,g=0;const b={};for(let m=0;m<a.length;m++){const v=a[m];if(!v)continue;const{name:w,fn:y}=v,{x:k,y:E,data:_,reset:P}=await y({x:f,y:c,initialPlacement:r,placement:h,strategy:n,middlewareData:b,rects:u,platform:i,elements:{reference:e,floating:t}});f=k??f,c=E??c,b[w]={...b[w],..._},P&&g<Hf&&(g++,typeof P=="object"&&(P.placement&&(h=P.placement),P.rects&&(u=P.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:n}):P.rects),{x:f,y:c}=Za(u,h,l)),m=-1)}return{x:f,y:c,placement:h,strategy:n,middlewareData:b}},Wf=e=>({name:"arrow",options:e,async fn(t){const{x:o,y:r,placement:n,rects:a,platform:s,elements:i,middlewareData:l}=t,{element:u,padding:f=0}=Ve(e,t)||{};if(u==null)return{};const c=Ka(f),h={x:o,y:r},g=vr(n),b=mr(g),m=await s.getDimensions(u),v=g==="y",w=v?"top":"left",y=v?"bottom":"right",k=v?"clientHeight":"clientWidth",E=a.reference[b]+a.reference[g]-h[g]-a.floating[b],_=h[g]-a.reference[g],P=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let T=P?P[k]:0;(!T||!await(s.isElement==null?void 0:s.isElement(P)))&&(T=i.floating[k]||a.floating[b]);const S=E/2-_/2,I=T/2-m[b]/2-1,D=Xe(c[w],I),L=Xe(c[y],I),V=D,W=T-m[b]-L,U=T/2-m[b]/2+S,J=hr(V,U,W),M=!l.arrow&&bt(n)!=null&&U!==J&&a.reference[b]/2-(U<V?D:L)-m[b]/2<0,R=M?U<V?U-V:U-W:0;return{[g]:h[g]+R,data:{[g]:J,centerOffset:U-J-R,...M&&{alignmentOffset:R}},reset:M}}}),Uf=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var o,r;const{placement:n,middlewareData:a,rects:s,initialPlacement:i,platform:l,elements:u}=t,{mainAxis:f=!0,crossAxis:c=!0,fallbackPlacements:h,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:m=!0,...v}=Ve(e,t);if((o=a.arrow)!=null&&o.alignmentOffset)return{};const w=We(n),y=ze(i),k=We(i)===i,E=await(l.isRTL==null?void 0:l.isRTL(u.floating)),_=h||(k||!m?[fo(i)]:Of(i)),P=b!=="none";!h&&P&&_.push(...$f(i,m,b,E));const T=[i,..._],S=await l.detectOverflow(t,v),I=[];let D=((r=a.flip)==null?void 0:r.overflows)||[];if(f&&I.push(S[w]),c){const U=Mf(n,s,E);I.push(S[U[0]],S[U[1]])}if(D=[...D,{placement:n,overflows:I}],!I.every(U=>U<=0)){var L,V;const U=(((L=a.flip)==null?void 0:L.index)||0)+1,J=T[U];if(J&&(!(c==="alignment"?y!==ze(J):!1)||D.every(N=>ze(N.placement)===y?N.overflows[0]>0:!0)))return{data:{index:U,overflows:D},reset:{placement:J}};let M=(V=D.filter(R=>R.overflows[0]<=0).sort((R,N)=>R.overflows[1]-N.overflows[1])[0])==null?void 0:V.placement;if(!M)switch(g){case"bestFit":{var W;const R=(W=D.filter(N=>{if(P){const A=ze(N.placement);return A===y||A==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(A=>A>0).reduce((A,C)=>A+C,0)]).sort((N,A)=>N[1]-A[1])[0])==null?void 0:W[0];R&&(M=R);break}case"initialPlacement":M=i;break}if(n!==M)return{reset:{placement:M}}}return{}}}};function Ja(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Qa(e){return Af.some(t=>e[t]>=0)}const jf=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:o,platform:r}=t,{strategy:n="referenceHidden",...a}=Ve(e,t);switch(n){case"referenceHidden":{const s=await r.detectOverflow(t,{...a,elementContext:"reference"}),i=Ja(s,o.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Qa(i)}}}case"escaped":{const s=await r.detectOverflow(t,{...a,altBoundary:!0}),i=Ja(s,o.floating);return{data:{escapedOffsets:i,escaped:Qa(i)}}}default:return{}}}}},es=new Set(["left","top"]);async function Rf(e,t){const{placement:o,platform:r,elements:n}=e,a=await(r.isRTL==null?void 0:r.isRTL(n.floating)),s=We(o),i=bt(o),l=ze(o)==="y",u=es.has(s)?-1:1,f=a&&l?-1:1,c=Ve(t,e);let{mainAxis:h,crossAxis:g,alignmentAxis:b}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return i&&typeof b=="number"&&(g=i==="end"?b*-1:b),l?{x:g*f,y:h*u}:{x:h*u,y:g*f}}const Gf=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var o,r;const{x:n,y:a,placement:s,middlewareData:i}=t,l=await Rf(t,e);return s===((o=i.offset)==null?void 0:o.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:n+l.x,y:a+l.y,data:{...l,placement:s}}}}},qf=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:r,placement:n,platform:a}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:l={fn:w=>{let{x:y,y:k}=w;return{x:y,y:k}}},...u}=Ve(e,t),f={x:o,y:r},c=await a.detectOverflow(t,u),h=ze(We(n)),g=gr(h);let b=f[g],m=f[h];if(s){const w=g==="y"?"top":"left",y=g==="y"?"bottom":"right",k=b+c[w],E=b-c[y];b=hr(k,b,E)}if(i){const w=h==="y"?"top":"left",y=h==="y"?"bottom":"right",k=m+c[w],E=m-c[y];m=hr(k,m,E)}const v=l.fn({...t,[g]:b,[h]:m});return{...v,data:{x:v.x-o,y:v.y-r,enabled:{[g]:s,[h]:i}}}}}},Yf=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:o,y:r,placement:n,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:l=!0,crossAxis:u=!0}=Ve(e,t),f={x:o,y:r},c=ze(n),h=gr(c);let g=f[h],b=f[c];const m=Ve(i,t),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const k=h==="y"?"height":"width",E=a.reference[h]-a.floating[k]+v.mainAxis,_=a.reference[h]+a.reference[k]-v.mainAxis;g<E?g=E:g>_&&(g=_)}if(u){var w,y;const k=h==="y"?"width":"height",E=es.has(We(n)),_=a.reference[c]-a.floating[k]+(E&&((w=s.offset)==null?void 0:w[c])||0)+(E?0:v.crossAxis),P=a.reference[c]+a.reference[k]+(E?0:((y=s.offset)==null?void 0:y[c])||0)-(E?v.crossAxis:0);b<_?b=_:b>P&&(b=P)}return{[h]:g,[c]:b}}}},Xf=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var o,r;const{placement:n,rects:a,platform:s,elements:i}=t,{apply:l=()=>{},...u}=Ve(e,t),f=await s.detectOverflow(t,u),c=We(n),h=bt(n),g=ze(n)==="y",{width:b,height:m}=a.floating;let v,w;c==="top"||c==="bottom"?(v=c,w=h===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(w=c,v=h==="end"?"top":"bottom");const y=m-f.top-f.bottom,k=b-f.left-f.right,E=Xe(m-f[v],y),_=Xe(b-f[w],k),P=!t.middlewareData.shift;let T=E,S=_;if((o=t.middlewareData.shift)!=null&&o.enabled.x&&(S=k),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(T=y),P&&!h){const D=we(f.left,0),L=we(f.right,0),V=we(f.top,0),W=we(f.bottom,0);g?S=b-2*(D!==0||L!==0?D+L:we(f.left,f.right)):T=m-2*(V!==0||W!==0?V+W:we(f.top,f.bottom))}await l({...t,availableWidth:S,availableHeight:T});const I=await s.getDimensions(i.floating);return b!==I.width||m!==I.height?{reset:{rects:!0}}:{}}}};function ho(){return typeof window<"u"}function wt(e){return ts(e)?(e.nodeName||"").toLowerCase():"#document"}function ye(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function De(e){var t;return(t=(ts(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ts(e){return ho()?e instanceof Node||e instanceof ye(e).Node:!1}function Ne(e){return ho()?e instanceof Element||e instanceof ye(e).Element:!1}function Ue(e){return ho()?e instanceof HTMLElement||e instanceof ye(e).HTMLElement:!1}function os(e){return!ho()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ye(e).ShadowRoot}function Dt(e){const{overflow:t,overflowX:o,overflowY:r,display:n}=Te(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+o)&&n!=="inline"&&n!=="contents"}function Kf(e){return/^(table|td|th)$/.test(wt(e))}function go(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Zf=/transform|translate|scale|rotate|perspective|filter/,Jf=/paint|layout|strict|content/,at=e=>!!e&&e!=="none";let wr;function yr(e){const t=Ne(e)?Te(e):e;return at(t.transform)||at(t.translate)||at(t.scale)||at(t.rotate)||at(t.perspective)||!xr()&&(at(t.backdropFilter)||at(t.filter))||Zf.test(t.willChange||"")||Jf.test(t.contain||"")}function Qf(e){let t=Ke(e);for(;Ue(t)&&!yt(t);){if(yr(t))return t;if(go(t))return null;t=Ke(t)}return null}function xr(){return wr==null&&(wr=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),wr}function yt(e){return/^(html|body|#document)$/.test(wt(e))}function Te(e){return ye(e).getComputedStyle(e)}function mo(e){return Ne(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ke(e){if(wt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||os(e)&&e.host||De(e);return os(t)?t.host:t}function rs(e){const t=Ke(e);return yt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ue(t)&&Dt(t)?t:rs(t)}function $t(e,t,o){var r;t===void 0&&(t=[]),o===void 0&&(o=!0);const n=rs(e),a=n===((r=e.ownerDocument)==null?void 0:r.body),s=ye(n);if(a){const i=kr(s);return t.concat(s,s.visualViewport||[],Dt(n)?n:[],i&&o?$t(i):[])}else return t.concat(n,$t(n,[],o))}function kr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ns(e){const t=Te(e);let o=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const n=Ue(e),a=n?e.offsetWidth:o,s=n?e.offsetHeight:r,i=co(o)!==a||co(r)!==s;return i&&(o=a,r=s),{width:o,height:r,$:i}}function Sr(e){return Ne(e)?e:e.contextElement}function xt(e){const t=Sr(e);if(!Ue(t))return Le(1);const o=t.getBoundingClientRect(),{width:r,height:n,$:a}=ns(t);let s=(a?co(o.width):o.width)/r,i=(a?co(o.height):o.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const ep=Le(0);function as(e){const t=ye(e);return!xr()||!t.visualViewport?ep:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function tp(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==ye(e)?!1:t}function st(e,t,o,r){t===void 0&&(t=!1),o===void 0&&(o=!1);const n=e.getBoundingClientRect(),a=Sr(e);let s=Le(1);t&&(r?Ne(r)&&(s=xt(r)):s=xt(e));const i=tp(a,o,r)?as(a):Le(0);let l=(n.left+i.x)/s.x,u=(n.top+i.y)/s.y,f=n.width/s.x,c=n.height/s.y;if(a){const h=ye(a),g=r&&Ne(r)?ye(r):r;let b=h,m=kr(b);for(;m&&r&&g!==b;){const v=xt(m),w=m.getBoundingClientRect(),y=Te(m),k=w.left+(m.clientLeft+parseFloat(y.paddingLeft))*v.x,E=w.top+(m.clientTop+parseFloat(y.paddingTop))*v.y;l*=v.x,u*=v.y,f*=v.x,c*=v.y,l+=k,u+=E,b=ye(m),m=kr(b)}}return po({width:f,height:c,x:l,y:u})}function vo(e,t){const o=mo(e).scrollLeft;return t?t.left+o:st(De(e)).left+o}function ss(e,t){const o=e.getBoundingClientRect(),r=o.left+t.scrollLeft-vo(e,o),n=o.top+t.scrollTop;return{x:r,y:n}}function op(e){let{elements:t,rect:o,offsetParent:r,strategy:n}=e;const a=n==="fixed",s=De(r),i=t?go(t.floating):!1;if(r===s||i&&a)return o;let l={scrollLeft:0,scrollTop:0},u=Le(1);const f=Le(0),c=Ue(r);if((c||!c&&!a)&&((wt(r)!=="body"||Dt(s))&&(l=mo(r)),c)){const g=st(r);u=xt(r),f.x=g.x+r.clientLeft,f.y=g.y+r.clientTop}const h=s&&!c&&!a?ss(s,l):Le(0);return{width:o.width*u.x,height:o.height*u.y,x:o.x*u.x-l.scrollLeft*u.x+f.x+h.x,y:o.y*u.y-l.scrollTop*u.y+f.y+h.y}}function rp(e){return Array.from(e.getClientRects())}function np(e){const t=De(e),o=mo(e),r=e.ownerDocument.body,n=we(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=we(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-o.scrollLeft+vo(e);const i=-o.scrollTop;return Te(r).direction==="rtl"&&(s+=we(t.clientWidth,r.clientWidth)-n),{width:n,height:a,x:s,y:i}}const is=25;function ap(e,t){const o=ye(e),r=De(e),n=o.visualViewport;let a=r.clientWidth,s=r.clientHeight,i=0,l=0;if(n){a=n.width,s=n.height;const f=xr();(!f||f&&t==="fixed")&&(i=n.offsetLeft,l=n.offsetTop)}const u=vo(r);if(u<=0){const f=r.ownerDocument,c=f.body,h=getComputedStyle(c),g=f.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,b=Math.abs(r.clientWidth-c.clientWidth-g);b<=is&&(a-=b)}else u<=is&&(a+=u);return{width:a,height:s,x:i,y:l}}function sp(e,t){const o=st(e,!0,t==="fixed"),r=o.top+e.clientTop,n=o.left+e.clientLeft,a=Ue(e)?xt(e):Le(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,l=n*a.x,u=r*a.y;return{width:s,height:i,x:l,y:u}}function ls(e,t,o){let r;if(t==="viewport")r=ap(e,o);else if(t==="document")r=np(De(e));else if(Ne(t))r=sp(t,o);else{const n=as(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return po(r)}function cs(e,t){const o=Ke(e);return o===t||!Ne(o)||yt(o)?!1:Te(o).position==="fixed"||cs(o,t)}function ip(e,t){const o=t.get(e);if(o)return o;let r=$t(e,[],!1).filter(i=>Ne(i)&&wt(i)!=="body"),n=null;const a=Te(e).position==="fixed";let s=a?Ke(e):e;for(;Ne(s)&&!yt(s);){const i=Te(s),l=yr(s);!l&&i.position==="fixed"&&(n=null),(a?!l&&!n:!l&&i.position==="static"&&!!n&&(n.position==="absolute"||n.position==="fixed")||Dt(s)&&!l&&cs(e,s))?r=r.filter(f=>f!==s):n=i,s=Ke(s)}return t.set(e,r),r}function lp(e){let{element:t,boundary:o,rootBoundary:r,strategy:n}=e;const s=[...o==="clippingAncestors"?go(t)?[]:ip(t,this._c):[].concat(o),r],i=ls(t,s[0],n);let l=i.top,u=i.right,f=i.bottom,c=i.left;for(let h=1;h<s.length;h++){const g=ls(t,s[h],n);l=we(g.top,l),u=Xe(g.right,u),f=Xe(g.bottom,f),c=we(g.left,c)}return{width:u-c,height:f-l,x:c,y:l}}function cp(e){const{width:t,height:o}=ns(e);return{width:t,height:o}}function dp(e,t,o){const r=Ue(t),n=De(t),a=o==="fixed",s=st(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const l=Le(0);function u(){l.x=vo(n)}if(r||!r&&!a)if((wt(t)!=="body"||Dt(n))&&(i=mo(t)),r){const g=st(t,!0,a,t);l.x=g.x+t.clientLeft,l.y=g.y+t.clientTop}else n&&u();a&&!r&&n&&u();const f=n&&!r&&!a?ss(n,i):Le(0),c=s.left+i.scrollLeft-l.x-f.x,h=s.top+i.scrollTop-l.y-f.y;return{x:c,y:h,width:s.width,height:s.height}}function Cr(e){return Te(e).position==="static"}function ds(e,t){if(!Ue(e)||Te(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return De(e)===o&&(o=o.ownerDocument.body),o}function us(e,t){const o=ye(e);if(go(e))return o;if(!Ue(e)){let n=Ke(e);for(;n&&!yt(n);){if(Ne(n)&&!Cr(n))return n;n=Ke(n)}return o}let r=ds(e,t);for(;r&&Kf(r)&&Cr(r);)r=ds(r,t);return r&&yt(r)&&Cr(r)&&!yr(r)?o:r||Qf(e)||o}const up=async function(e){const t=this.getOffsetParent||us,o=this.getDimensions,r=await o(e.floating);return{reference:dp(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function fp(e){return Te(e).direction==="rtl"}const pp={convertOffsetParentRelativeRectToViewportRelativeRect:op,getDocumentElement:De,getClippingRect:lp,getOffsetParent:us,getElementRects:up,getClientRects:rp,getDimensions:cp,getScale:xt,isElement:Ne,isRTL:fp};function fs(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function hp(e,t){let o=null,r;const n=De(e);function a(){var i;clearTimeout(r),(i=o)==null||i.disconnect(),o=null}function s(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),a();const u=e.getBoundingClientRect(),{left:f,top:c,width:h,height:g}=u;if(i||t(),!h||!g)return;const b=uo(c),m=uo(n.clientWidth-(f+h)),v=uo(n.clientHeight-(c+g)),w=uo(f),k={rootMargin:-b+"px "+-m+"px "+-v+"px "+-w+"px",threshold:we(0,Xe(1,l))||1};let E=!0;function _(P){const T=P[0].intersectionRatio;if(T!==l){if(!E)return s();T?s(!1,T):r=setTimeout(()=>{s(!1,1e-7)},1e3)}T===1&&!fs(u,e.getBoundingClientRect())&&s(),E=!1}try{o=new IntersectionObserver(_,{...k,root:n.ownerDocument})}catch{o=new IntersectionObserver(_,k)}o.observe(e)}return s(!0),a}function gp(e,t,o,r){r===void 0&&(r={});const{ancestorScroll:n=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Sr(e),f=n||a?[...u?$t(u):[],...t?$t(t):[]]:[];f.forEach(w=>{n&&w.addEventListener("scroll",o,{passive:!0}),a&&w.addEventListener("resize",o)});const c=u&&i?hp(u,o):null;let h=-1,g=null;s&&(g=new ResizeObserver(w=>{let[y]=w;y&&y.target===u&&g&&t&&(g.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var k;(k=g)==null||k.observe(t)})),o()}),u&&!l&&g.observe(u),t&&g.observe(t));let b,m=l?st(e):null;l&&v();function v(){const w=st(e);m&&!fs(m,w)&&o(),m=w,b=requestAnimationFrame(v)}return o(),()=>{var w;f.forEach(y=>{n&&y.removeEventListener("scroll",o),a&&y.removeEventListener("resize",o)}),c==null||c(),(w=g)==null||w.disconnect(),g=null,l&&cancelAnimationFrame(b)}}const mp=Gf,vp=qf,bp=Uf,wp=Xf,yp=jf,ps=Wf,xp=Yf,kp=(e,t,o)=>{const r=new Map,n={platform:pp,...o},a={...n.platform,_c:r};return Vf(e,t,{...n,platform:a})};var Sp=typeof document<"u",Cp=function(){},bo=Sp?x.useLayoutEffect:Cp;function wo(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let o,r,n;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(r=o;r--!==0;)if(!wo(e[r],t[r]))return!1;return!0}if(n=Object.keys(e),o=n.length,o!==Object.keys(t).length)return!1;for(r=o;r--!==0;)if(!{}.hasOwnProperty.call(t,n[r]))return!1;for(r=o;r--!==0;){const a=n[r];if(!(a==="_owner"&&e.$$typeof)&&!wo(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function hs(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function gs(e,t){const o=hs(e);return Math.round(t*o)/o}function Er(e){const t=p.useRef(e);return bo(()=>{t.current=e}),t}function Ep(e){e===void 0&&(e={});const{placement:t="bottom",strategy:o="absolute",middleware:r=[],platform:n,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:l,open:u}=e,[f,c]=p.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[h,g]=p.useState(r);wo(h,r)||g(r);const[b,m]=p.useState(null),[v,w]=p.useState(null),y=p.useCallback(N=>{N!==P.current&&(P.current=N,m(N))},[]),k=p.useCallback(N=>{N!==T.current&&(T.current=N,w(N))},[]),E=a||b,_=s||v,P=p.useRef(null),T=p.useRef(null),S=p.useRef(f),I=l!=null,D=Er(l),L=Er(n),V=Er(u),W=p.useCallback(()=>{if(!P.current||!T.current)return;const N={placement:t,strategy:o,middleware:h};L.current&&(N.platform=L.current),kp(P.current,T.current,N).then(A=>{const C={...A,isPositioned:V.current!==!1};U.current&&!wo(S.current,C)&&(S.current=C,Ut.flushSync(()=>{c(C)}))})},[h,t,o,L,V]);bo(()=>{u===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,c(N=>({...N,isPositioned:!1})))},[u]);const U=p.useRef(!1);bo(()=>(U.current=!0,()=>{U.current=!1}),[]),bo(()=>{if(E&&(P.current=E),_&&(T.current=_),E&&_){if(D.current)return D.current(E,_,W);W()}},[E,_,W,D,I]);const J=p.useMemo(()=>({reference:P,floating:T,setReference:y,setFloating:k}),[y,k]),M=p.useMemo(()=>({reference:E,floating:_}),[E,_]),R=p.useMemo(()=>{const N={position:o,left:0,top:0};if(!M.floating)return N;const A=gs(M.floating,f.x),C=gs(M.floating,f.y);return i?{...N,transform:"translate("+A+"px, "+C+"px)",...hs(M.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:A,top:C}},[o,i,M.floating,f.x,f.y]);return p.useMemo(()=>({...f,update:W,refs:J,elements:M,floatingStyles:R}),[f,W,J,M,R])}const Np=e=>{function t(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){const{element:r,padding:n}=typeof e=="function"?e(o):e;return r&&t(r)?r.current!=null?ps({element:r.current,padding:n}).fn(o):{}:r?ps({element:r,padding:n}).fn(o):{}}}},Tp=(e,t)=>{const o=mp(e);return{name:o.name,fn:o.fn,options:[e,t]}},_p=(e,t)=>{const o=vp(e);return{name:o.name,fn:o.fn,options:[e,t]}},Pp=(e,t)=>({fn:xp(e).fn,options:[e,t]}),Ap=(e,t)=>{const o=bp(e);return{name:o.name,fn:o.fn,options:[e,t]}},Ip=(e,t)=>{const o=wp(e);return{name:o.name,fn:o.fn,options:[e,t]}},Mp=(e,t)=>{const o=yp(e);return{name:o.name,fn:o.fn,options:[e,t]}},Op=(e,t)=>{const o=Np(e);return{name:o.name,fn:o.fn,options:[e,t]}};var Lp="Arrow",ms=p.forwardRef((e,t)=>{const{children:o,width:r=10,height:n=5,...a}=e;return d.jsx(X.svg,{...a,ref:t,width:r,height:n,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?o:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});ms.displayName=Lp;var zp=ms,Nr="Popper",[vs,yo]=me(Nr),[Dp,bs]=vs(Nr),ws=e=>{const{__scopePopper:t,children:o}=e,[r,n]=p.useState(null);return d.jsx(Dp,{scope:t,anchor:r,onAnchorChange:n,children:o})};ws.displayName=Nr;var ys="PopperAnchor",xs=p.forwardRef((e,t)=>{const{__scopePopper:o,virtualRef:r,...n}=e,a=bs(ys,o),s=p.useRef(null),i=ae(t,s),l=p.useRef(null);return p.useEffect(()=>{const u=l.current;l.current=(r==null?void 0:r.current)||s.current,u!==l.current&&a.onAnchorChange(l.current)}),r?null:d.jsx(X.div,{...n,ref:i})});xs.displayName=ys;var Tr="PopperContent",[$p,Fp]=vs(Tr),ks=p.forwardRef((e,t)=>{var F,q,Z,se,re,te;const{__scopePopper:o,side:r="bottom",sideOffset:n=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:c="partial",hideWhenDetached:h=!1,updatePositionStrategy:g="optimized",onPlaced:b,...m}=e,v=bs(Tr,o),[w,y]=p.useState(null),k=ae(t,ce=>y(ce)),[E,_]=p.useState(null),P=io(E),T=(P==null?void 0:P.width)??0,S=(P==null?void 0:P.height)??0,I=r+(a!=="center"?"-"+a:""),D=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},L=Array.isArray(u)?u:[u],V=L.length>0,W={padding:D,boundary:L.filter(Hp),altBoundary:V},{refs:U,floatingStyles:J,placement:M,isPositioned:R,middlewareData:N}=Ep({strategy:"fixed",placement:I,whileElementsMounted:(...ce)=>gp(...ce,{animationFrame:g==="always"}),elements:{reference:v.anchor},middleware:[Tp({mainAxis:n+S,alignmentAxis:s}),l&&_p({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?Pp():void 0,...W}),l&&Ap({...W}),Ip({...W,apply:({elements:ce,rects:de,availableWidth:ct,availableHeight:Qe})=>{const{width:Pe,height:Do}=de.reference,ve=ce.floating.style;ve.setProperty("--radix-popper-available-width",`${ct}px`),ve.setProperty("--radix-popper-available-height",`${Qe}px`),ve.setProperty("--radix-popper-anchor-width",`${Pe}px`),ve.setProperty("--radix-popper-anchor-height",`${Do}px`)}}),E&&Op({element:E,padding:i}),Vp({arrowWidth:T,arrowHeight:S}),h&&Mp({strategy:"referenceHidden",...W})]}),[A,C]=Es(M),z=pe(b);ie(()=>{R&&(z==null||z())},[R,z]);const H=(F=N.arrow)==null?void 0:F.x,O=(q=N.arrow)==null?void 0:q.y,G=((Z=N.arrow)==null?void 0:Z.centerOffset)!==0,[j,Q]=p.useState();return ie(()=>{w&&Q(window.getComputedStyle(w).zIndex)},[w]),d.jsx("div",{ref:U.setFloating,"data-radix-popper-content-wrapper":"",style:{...J,transform:R?J.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:j,"--radix-popper-transform-origin":[(se=N.transformOrigin)==null?void 0:se.x,(re=N.transformOrigin)==null?void 0:re.y].join(" "),...((te=N.hide)==null?void 0:te.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx($p,{scope:o,placedSide:A,onArrowChange:_,arrowX:H,arrowY:O,shouldHideArrow:G,children:d.jsx(X.div,{"data-side":A,"data-align":C,...m,ref:k,style:{...m.style,animation:R?void 0:"none"}})})})});ks.displayName=Tr;var Ss="PopperArrow",Bp={top:"bottom",right:"left",bottom:"top",left:"right"},Cs=p.forwardRef(function(t,o){const{__scopePopper:r,...n}=t,a=Fp(Ss,r),s=Bp[a.placedSide];return d.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:d.jsx(zp,{...n,ref:o,style:{...n.style,display:"block"}})})});Cs.displayName=Ss;function Hp(e){return e!==null}var Vp=e=>({name:"transformOrigin",options:e,fn(t){var v,w,y;const{placement:o,rects:r,middlewareData:n}=t,s=((v=n.arrow)==null?void 0:v.centerOffset)!==0,i=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[u,f]=Es(o),c={start:"0%",center:"50%",end:"100%"}[f],h=(((w=n.arrow)==null?void 0:w.x)??0)+i/2,g=(((y=n.arrow)==null?void 0:y.y)??0)+l/2;let b="",m="";return u==="bottom"?(b=s?c:`${h}px`,m=`${-l}px`):u==="top"?(b=s?c:`${h}px`,m=`${r.floating.height+l}px`):u==="right"?(b=`${-l}px`,m=s?c:`${g}px`):u==="left"&&(b=`${r.floating.width+l}px`,m=s?c:`${g}px`),{data:{x:b,y:m}}}});function Es(e){const[t,o="center"]=e.split("-");return[t,o]}var Ns=ws,Ts=xs,_s=ks,Ps=Cs,_r="rovingFocusGroup.onEntryFocus",Wp={bubbles:!1,cancelable:!0},Ft="RovingFocusGroup",[Pr,As,Up]=ta(Ft),[jp,xo]=me(Ft,[Up]),[Rp,Gp]=jp(Ft),Is=p.forwardRef((e,t)=>d.jsx(Pr.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(Pr.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(qp,{...e,ref:t})})}));Is.displayName=Ft;var qp=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:o,orientation:r,loop:n=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...c}=e,h=p.useRef(null),g=ae(t,h),b=zt(a),[m,v]=He({prop:s,defaultProp:i??null,onChange:l,caller:Ft}),[w,y]=p.useState(!1),k=pe(u),E=As(o),_=p.useRef(!1),[P,T]=p.useState(0);return p.useEffect(()=>{const S=h.current;if(S)return S.addEventListener(_r,k),()=>S.removeEventListener(_r,k)},[k]),d.jsx(Rp,{scope:o,orientation:r,dir:b,loop:n,currentTabStopId:m,onItemFocus:p.useCallback(S=>v(S),[v]),onItemShiftTab:p.useCallback(()=>y(!0),[]),onFocusableItemAdd:p.useCallback(()=>T(S=>S+1),[]),onFocusableItemRemove:p.useCallback(()=>T(S=>S-1),[]),children:d.jsx(X.div,{tabIndex:w||P===0?-1:0,"data-orientation":r,...c,ref:g,style:{outline:"none",...e.style},onMouseDown:K(e.onMouseDown,()=>{_.current=!0}),onFocus:K(e.onFocus,S=>{const I=!_.current;if(S.target===S.currentTarget&&I&&!w){const D=new CustomEvent(_r,Wp);if(S.currentTarget.dispatchEvent(D),!D.defaultPrevented){const L=E().filter(M=>M.focusable),V=L.find(M=>M.active),W=L.find(M=>M.id===m),J=[V,W,...L].filter(Boolean).map(M=>M.ref.current);Ls(J,f)}}_.current=!1}),onBlur:K(e.onBlur,()=>y(!1))})})}),Ms="RovingFocusGroupItem",Os=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:o,focusable:r=!0,active:n=!1,tabStopId:a,children:s,...i}=e,l=nt(),u=a||l,f=Gp(Ms,o),c=f.currentTabStopId===u,h=As(o),{onFocusableItemAdd:g,onFocusableItemRemove:b,currentTabStopId:m}=f;return p.useEffect(()=>{if(r)return g(),()=>b()},[r,g,b]),d.jsx(Pr.ItemSlot,{scope:o,id:u,focusable:r,active:n,children:d.jsx(X.span,{tabIndex:c?0:-1,"data-orientation":f.orientation,...i,ref:t,onMouseDown:K(e.onMouseDown,v=>{r?f.onItemFocus(u):v.preventDefault()}),onFocus:K(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:K(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){f.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const w=Kp(v,f.orientation,f.dir);if(w!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let k=h().filter(E=>E.focusable).map(E=>E.ref.current);if(w==="last")k.reverse();else if(w==="prev"||w==="next"){w==="prev"&&k.reverse();const E=k.indexOf(v.currentTarget);k=f.loop?Zp(k,E+1):k.slice(E+1)}setTimeout(()=>Ls(k))}}),children:typeof s=="function"?s({isCurrentTabStop:c,hasTabStop:m!=null}):s})})});Os.displayName=Ms;var Yp={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Xp(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Kp(e,t,o){const r=Xp(e.key,o);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Yp[r]}function Ls(e,t=!1){const o=document.activeElement;for(const r of e)if(r===o||(r.focus({preventScroll:t}),document.activeElement!==o))return}function Zp(e,t){return e.map((o,r)=>e[(t+r)%e.length])}var zs=Is,Ds=Os,Jp="Label",$s=p.forwardRef((e,t)=>d.jsx(X.label,{...e,ref:t,onMouseDown:o=>{var n;o.target.closest("button, input, select, textarea")||((n=e.onMouseDown)==null||n.call(e,o),!o.defaultPrevented&&o.detail>1&&o.preventDefault())}}));$s.displayName=Jp;var Qp=$s;function Ar(e,[t,o]){return Math.min(o,Math.max(t,e))}var Ir="Progress",Mr=100,[eh]=me(Ir),[th,oh]=eh(Ir),Fs=p.forwardRef((e,t)=>{const{__scopeProgress:o,value:r=null,max:n,getValueLabel:a=rh,...s}=e;(n||n===0)&&!Ws(n)&&console.error(nh(`${n}`,"Progress"));const i=Ws(n)?n:Mr;r!==null&&!Us(r,i)&&console.error(ah(`${r}`,"Progress"));const l=Us(r,i)?r:null,u=ko(l)?a(l,i):void 0;return d.jsx(th,{scope:o,value:l,max:i,children:d.jsx(X.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":ko(l)?l:void 0,"aria-valuetext":u,role:"progressbar","data-state":Vs(l,i),"data-value":l??void 0,"data-max":i,...s,ref:t})})});Fs.displayName=Ir;var Bs="ProgressIndicator",Hs=p.forwardRef((e,t)=>{const{__scopeProgress:o,...r}=e,n=oh(Bs,o);return d.jsx(X.div,{"data-state":Vs(n.value,n.max),"data-value":n.value??void 0,"data-max":n.max,...r,ref:t})});Hs.displayName=Bs;function rh(e,t){return`${Math.round(e/t*100)}%`}function Vs(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function ko(e){return typeof e=="number"}function Ws(e){return ko(e)&&!isNaN(e)&&e>0}function Us(e,t){return ko(e)&&!isNaN(e)&&e<=t&&e>=0}function nh(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Mr}\`.`}function ah(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
285
+ */var Ia;function vf(){if(Ia)return ur;Ia=1;var e=x;function t(c,h){return c===h&&(c!==0||1/c===1/h)||c!==c&&h!==h}var o=typeof Object.is=="function"?Object.is:t,r=e.useState,n=e.useEffect,a=e.useLayoutEffect,s=e.useDebugValue;function i(c,h){var g=h(),b=r({inst:{value:g,getSnapshot:h}}),m=b[0].inst,v=b[1];return a(function(){m.value=g,m.getSnapshot=h,l(m)&&v({inst:m})},[c,g,h]),n(function(){return l(m)&&v({inst:m}),c(function(){l(m)&&v({inst:m})})},[c]),s(g),g}function l(c){var h=c.getSnapshot;c=c.value;try{var g=h();return!o(c,g)}catch{return!0}}function u(c,h){return h()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:i;return ur.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,ur}var Ma;function bf(){return Ma||(Ma=1,dr.exports=vf()),dr.exports}var wf=bf();function yf(){return wf.useSyncExternalStore(xf,()=>!0,()=>!1)}function xf(){return()=>{}}var fr="Avatar",[kf]=me(fr),[Sf,Oa]=kf(fr),La=p.forwardRef((e,t)=>{const{__scopeAvatar:o,...r}=e,[n,a]=p.useState("idle");return d.jsx(Sf,{scope:o,imageLoadingStatus:n,onImageLoadingStatusChange:a,children:d.jsx(K.span,{...r,ref:t})})});La.displayName=fr;var za="AvatarImage",Da=p.forwardRef((e,t)=>{const{__scopeAvatar:o,src:r,onLoadingStatusChange:n=()=>{},...a}=e,s=Oa(za,o),i=Cf(r,a),l=pe(u=>{n(u),s.onImageLoadingStatusChange(u)});return ie(()=>{i!=="idle"&&l(i)},[i,l]),i==="loaded"?d.jsx(K.img,{...a,ref:t,src:r}):null});Da.displayName=za;var $a="AvatarFallback",Fa=p.forwardRef((e,t)=>{const{__scopeAvatar:o,delayMs:r,...n}=e,a=Oa($a,o),[s,i]=p.useState(r===void 0);return p.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>i(!0),r);return()=>window.clearTimeout(l)}},[r]),s&&a.imageLoadingStatus!=="loaded"?d.jsx(K.span,{...n,ref:t}):null});Fa.displayName=$a;function Ba(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function Cf(e,{referrerPolicy:t,crossOrigin:o}){const r=yf(),n=p.useRef(null),a=r?(n.current||(n.current=new window.Image),n.current):null,[s,i]=p.useState(()=>Ba(a,e));return ie(()=>{i(Ba(a,e))},[a,e]),ie(()=>{const l=c=>()=>{i(c)};if(!a)return;const u=l("loaded"),f=l("error");return a.addEventListener("load",u),a.addEventListener("error",f),t&&(a.referrerPolicy=t),typeof o=="string"&&(a.crossOrigin=o),()=>{a.removeEventListener("load",u),a.removeEventListener("error",f)}},[a,o,t]),s}var Ef=La,Nf=Da,Tf=Fa;function so(e){const t=p.useRef({value:e,previous:e});return p.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function io(e){const[t,o]=p.useState(void 0);return ie(()=>{if(e){o({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(n=>{if(!Array.isArray(n)||!n.length)return;const a=n[0];let s,i;if("borderBoxSize"in a){const l=a.borderBoxSize,u=Array.isArray(l)?l[0]:l;s=u.inlineSize,i=u.blockSize}else s=e.offsetWidth,i=e.offsetHeight;o({width:s,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else o(void 0)},[e]),t}var lo="Checkbox",[_f]=me(lo),[Pf,pr]=_f(lo);function Af(e){const{__scopeCheckbox:t,checked:o,children:r,defaultChecked:n,disabled:a,form:s,name:i,onCheckedChange:l,required:u,value:f="on",internal_do_not_use_render:c}=e,[h,g]=He({prop:o,defaultProp:n??!1,onChange:l,caller:lo}),[b,m]=p.useState(null),[v,w]=p.useState(null),y=p.useRef(!1),k=b?!!s||!!b.closest("form"):!0,C={checked:h,disabled:a,setChecked:g,control:b,setControl:m,name:i,form:s,value:f,hasConsumerStoppedPropagationRef:y,required:u,defaultChecked:Ye(n)?!1:n,isFormControl:k,bubbleInput:v,setBubbleInput:w};return d.jsx(Pf,{scope:t,...C,children:If(c)?c(C):r})}var Ha="CheckboxTrigger",Va=p.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:o,...r},n)=>{const{control:a,value:s,disabled:i,checked:l,required:u,setControl:f,setChecked:c,hasConsumerStoppedPropagationRef:h,isFormControl:g,bubbleInput:b}=pr(Ha,e),m=ae(n,f),v=p.useRef(l);return p.useEffect(()=>{const w=a==null?void 0:a.form;if(w){const y=()=>c(v.current);return w.addEventListener("reset",y),()=>w.removeEventListener("reset",y)}},[a,c]),d.jsx(K.button,{type:"button",role:"checkbox","aria-checked":Ye(l)?"mixed":l,"aria-required":u,"data-state":qa(l),"data-disabled":i?"":void 0,disabled:i,value:s,...r,ref:m,onKeyDown:Z(t,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:Z(o,w=>{c(y=>Ye(y)?!0:!y),b&&g&&(h.current=w.isPropagationStopped(),h.current||w.stopPropagation())})})});Va.displayName=Ha;var Wa=p.forwardRef((e,t)=>{const{__scopeCheckbox:o,name:r,checked:n,defaultChecked:a,required:s,disabled:i,value:l,onCheckedChange:u,form:f,...c}=e;return d.jsx(Af,{__scopeCheckbox:o,checked:n,defaultChecked:a,disabled:i,required:s,onCheckedChange:u,name:r,form:f,value:l,internal_do_not_use_render:({isFormControl:h})=>d.jsxs(d.Fragment,{children:[d.jsx(Va,{...c,ref:t,__scopeCheckbox:o}),h&&d.jsx(Ga,{__scopeCheckbox:o})]})})});Wa.displayName=lo;var Ua="CheckboxIndicator",ja=p.forwardRef((e,t)=>{const{__scopeCheckbox:o,forceMount:r,...n}=e,a=pr(Ua,o);return d.jsx(Ee,{present:r||Ye(a.checked)||a.checked===!0,children:d.jsx(K.span,{"data-state":qa(a.checked),"data-disabled":a.disabled?"":void 0,...n,ref:t,style:{pointerEvents:"none",...e.style}})})});ja.displayName=Ua;var Ra="CheckboxBubbleInput",Ga=p.forwardRef(({__scopeCheckbox:e,...t},o)=>{const{control:r,hasConsumerStoppedPropagationRef:n,checked:a,defaultChecked:s,required:i,disabled:l,name:u,value:f,form:c,bubbleInput:h,setBubbleInput:g}=pr(Ra,e),b=ae(o,g),m=so(a),v=io(r);p.useEffect(()=>{const y=h;if(!y)return;const k=window.HTMLInputElement.prototype,T=Object.getOwnPropertyDescriptor(k,"checked").set,P=!n.current;if(m!==a&&T){const _=new Event("click",{bubbles:P});y.indeterminate=Ye(a),T.call(y,Ye(a)?!1:a),y.dispatchEvent(_)}},[h,m,a,n]);const w=p.useRef(Ye(a)?!1:a);return d.jsx(K.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??w.current,required:i,disabled:l,name:u,value:f,form:c,...t,tabIndex:-1,ref:b,style:{...t.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Ga.displayName=Ra;function If(e){return typeof e=="function"}function Ye(e){return e==="indeterminate"}function qa(e){return Ye(e)?"indeterminate":e?"checked":"unchecked"}const Mf=["top","right","bottom","left"],Xe=Math.min,we=Math.max,co=Math.round,uo=Math.floor,Le=e=>({x:e,y:e}),Of={left:"right",right:"left",bottom:"top",top:"bottom"};function hr(e,t,o){return we(e,Xe(t,o))}function Ve(e,t){return typeof e=="function"?e(t):e}function We(e){return e.split("-")[0]}function bt(e){return e.split("-")[1]}function gr(e){return e==="x"?"y":"x"}function mr(e){return e==="y"?"height":"width"}function ze(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function vr(e){return gr(ze(e))}function Lf(e,t,o){o===void 0&&(o=!1);const r=bt(e),n=vr(e),a=mr(n);let s=n==="x"?r===(o?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=fo(s)),[s,fo(s)]}function zf(e){const t=fo(e);return[br(e),t,br(t)]}function br(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Ya=["left","right"],Xa=["right","left"],Df=["top","bottom"],$f=["bottom","top"];function Ff(e,t,o){switch(e){case"top":case"bottom":return o?t?Xa:Ya:t?Ya:Xa;case"left":case"right":return t?Df:$f;default:return[]}}function Bf(e,t,o,r){const n=bt(e);let a=Ff(We(e),o==="start",r);return n&&(a=a.map(s=>s+"-"+n),t&&(a=a.concat(a.map(br)))),a}function fo(e){const t=We(e);return Of[t]+e.slice(t.length)}function Hf(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ka(e){return typeof e!="number"?Hf(e):{top:e,right:e,bottom:e,left:e}}function po(e){const{x:t,y:o,width:r,height:n}=e;return{width:r,height:n,top:o,left:t,right:t+r,bottom:o+n,x:t,y:o}}function Za(e,t,o){let{reference:r,floating:n}=e;const a=ze(t),s=vr(t),i=mr(s),l=We(t),u=a==="y",f=r.x+r.width/2-n.width/2,c=r.y+r.height/2-n.height/2,h=r[i]/2-n[i]/2;let g;switch(l){case"top":g={x:f,y:r.y-n.height};break;case"bottom":g={x:f,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:c};break;case"left":g={x:r.x-n.width,y:c};break;default:g={x:r.x,y:r.y}}switch(bt(t)){case"start":g[s]-=h*(o&&u?-1:1);break;case"end":g[s]+=h*(o&&u?-1:1);break}return g}async function Vf(e,t){var o;t===void 0&&(t={});const{x:r,y:n,platform:a,rects:s,elements:i,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:c="floating",altBoundary:h=!1,padding:g=0}=Ve(t,e),b=Ka(g),v=i[h?c==="floating"?"reference":"floating":c],w=po(await a.getClippingRect({element:(o=await(a.isElement==null?void 0:a.isElement(v)))==null||o?v:v.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:u,rootBoundary:f,strategy:l})),y=c==="floating"?{x:r,y:n,width:s.floating.width,height:s.floating.height}:s.reference,k=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),C=await(a.isElement==null?void 0:a.isElement(k))?await(a.getScale==null?void 0:a.getScale(k))||{x:1,y:1}:{x:1,y:1},T=po(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:y,offsetParent:k,strategy:l}):y);return{top:(w.top-T.top+b.top)/C.y,bottom:(T.bottom-w.bottom+b.bottom)/C.y,left:(w.left-T.left+b.left)/C.x,right:(T.right-w.right+b.right)/C.x}}const Wf=50,Uf=async(e,t,o)=>{const{placement:r="bottom",strategy:n="absolute",middleware:a=[],platform:s}=o,i=s.detectOverflow?s:{...s,detectOverflow:Vf},l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:n}),{x:f,y:c}=Za(u,r,l),h=r,g=0;const b={};for(let m=0;m<a.length;m++){const v=a[m];if(!v)continue;const{name:w,fn:y}=v,{x:k,y:C,data:T,reset:P}=await y({x:f,y:c,initialPlacement:r,placement:h,strategy:n,middlewareData:b,rects:u,platform:i,elements:{reference:e,floating:t}});f=k??f,c=C??c,b[w]={...b[w],...T},P&&g<Wf&&(g++,typeof P=="object"&&(P.placement&&(h=P.placement),P.rects&&(u=P.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:n}):P.rects),{x:f,y:c}=Za(u,h,l)),m=-1)}return{x:f,y:c,placement:h,strategy:n,middlewareData:b}},jf=e=>({name:"arrow",options:e,async fn(t){const{x:o,y:r,placement:n,rects:a,platform:s,elements:i,middlewareData:l}=t,{element:u,padding:f=0}=Ve(e,t)||{};if(u==null)return{};const c=Ka(f),h={x:o,y:r},g=vr(n),b=mr(g),m=await s.getDimensions(u),v=g==="y",w=v?"top":"left",y=v?"bottom":"right",k=v?"clientHeight":"clientWidth",C=a.reference[b]+a.reference[g]-h[g]-a.floating[b],T=h[g]-a.reference[g],P=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let _=P?P[k]:0;(!_||!await(s.isElement==null?void 0:s.isElement(P)))&&(_=i.floating[k]||a.floating[b]);const E=C/2-T/2,I=_/2-m[b]/2-1,L=Xe(c[w],I),F=Xe(c[y],I),D=L,V=_-m[b]-F,j=_/2-m[b]/2+E,G=hr(D,j,V),M=!l.arrow&&bt(n)!=null&&j!==G&&a.reference[b]/2-(j<D?L:F)-m[b]/2<0,U=M?j<D?j-D:j-V:0;return{[g]:h[g]+U,data:{[g]:G,centerOffset:j-G-U,...M&&{alignmentOffset:U}},reset:M}}}),Rf=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var o,r;const{placement:n,middlewareData:a,rects:s,initialPlacement:i,platform:l,elements:u}=t,{mainAxis:f=!0,crossAxis:c=!0,fallbackPlacements:h,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:m=!0,...v}=Ve(e,t);if((o=a.arrow)!=null&&o.alignmentOffset)return{};const w=We(n),y=ze(i),k=We(i)===i,C=await(l.isRTL==null?void 0:l.isRTL(u.floating)),T=h||(k||!m?[fo(i)]:zf(i)),P=b!=="none";!h&&P&&T.push(...Bf(i,m,b,C));const _=[i,...T],E=await l.detectOverflow(t,v),I=[];let L=((r=a.flip)==null?void 0:r.overflows)||[];if(f&&I.push(E[w]),c){const j=Lf(n,s,C);I.push(E[j[0]],E[j[1]])}if(L=[...L,{placement:n,overflows:I}],!I.every(j=>j<=0)){var F,D;const j=(((F=a.flip)==null?void 0:F.index)||0)+1,G=_[j];if(G&&(!(c==="alignment"?y!==ze(G):!1)||L.every(N=>ze(N.placement)===y?N.overflows[0]>0:!0)))return{data:{index:j,overflows:L},reset:{placement:G}};let M=(D=L.filter(U=>U.overflows[0]<=0).sort((U,N)=>U.overflows[1]-N.overflows[1])[0])==null?void 0:D.placement;if(!M)switch(g){case"bestFit":{var V;const U=(V=L.filter(N=>{if(P){const A=ze(N.placement);return A===y||A==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(A=>A>0).reduce((A,S)=>A+S,0)]).sort((N,A)=>N[1]-A[1])[0])==null?void 0:V[0];U&&(M=U);break}case"initialPlacement":M=i;break}if(n!==M)return{reset:{placement:M}}}return{}}}};function Ja(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Qa(e){return Mf.some(t=>e[t]>=0)}const Gf=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:o,platform:r}=t,{strategy:n="referenceHidden",...a}=Ve(e,t);switch(n){case"referenceHidden":{const s=await r.detectOverflow(t,{...a,elementContext:"reference"}),i=Ja(s,o.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Qa(i)}}}case"escaped":{const s=await r.detectOverflow(t,{...a,altBoundary:!0}),i=Ja(s,o.floating);return{data:{escapedOffsets:i,escaped:Qa(i)}}}default:return{}}}}},es=new Set(["left","top"]);async function qf(e,t){const{placement:o,platform:r,elements:n}=e,a=await(r.isRTL==null?void 0:r.isRTL(n.floating)),s=We(o),i=bt(o),l=ze(o)==="y",u=es.has(s)?-1:1,f=a&&l?-1:1,c=Ve(t,e);let{mainAxis:h,crossAxis:g,alignmentAxis:b}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return i&&typeof b=="number"&&(g=i==="end"?b*-1:b),l?{x:g*f,y:h*u}:{x:h*u,y:g*f}}const Yf=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var o,r;const{x:n,y:a,placement:s,middlewareData:i}=t,l=await qf(t,e);return s===((o=i.offset)==null?void 0:o.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:n+l.x,y:a+l.y,data:{...l,placement:s}}}}},Xf=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:r,placement:n,platform:a}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:l={fn:w=>{let{x:y,y:k}=w;return{x:y,y:k}}},...u}=Ve(e,t),f={x:o,y:r},c=await a.detectOverflow(t,u),h=ze(We(n)),g=gr(h);let b=f[g],m=f[h];if(s){const w=g==="y"?"top":"left",y=g==="y"?"bottom":"right",k=b+c[w],C=b-c[y];b=hr(k,b,C)}if(i){const w=h==="y"?"top":"left",y=h==="y"?"bottom":"right",k=m+c[w],C=m-c[y];m=hr(k,m,C)}const v=l.fn({...t,[g]:b,[h]:m});return{...v,data:{x:v.x-o,y:v.y-r,enabled:{[g]:s,[h]:i}}}}}},Kf=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:o,y:r,placement:n,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:l=!0,crossAxis:u=!0}=Ve(e,t),f={x:o,y:r},c=ze(n),h=gr(c);let g=f[h],b=f[c];const m=Ve(i,t),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const k=h==="y"?"height":"width",C=a.reference[h]-a.floating[k]+v.mainAxis,T=a.reference[h]+a.reference[k]-v.mainAxis;g<C?g=C:g>T&&(g=T)}if(u){var w,y;const k=h==="y"?"width":"height",C=es.has(We(n)),T=a.reference[c]-a.floating[k]+(C&&((w=s.offset)==null?void 0:w[c])||0)+(C?0:v.crossAxis),P=a.reference[c]+a.reference[k]+(C?0:((y=s.offset)==null?void 0:y[c])||0)-(C?v.crossAxis:0);b<T?b=T:b>P&&(b=P)}return{[h]:g,[c]:b}}}},Zf=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var o,r;const{placement:n,rects:a,platform:s,elements:i}=t,{apply:l=()=>{},...u}=Ve(e,t),f=await s.detectOverflow(t,u),c=We(n),h=bt(n),g=ze(n)==="y",{width:b,height:m}=a.floating;let v,w;c==="top"||c==="bottom"?(v=c,w=h===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(w=c,v=h==="end"?"top":"bottom");const y=m-f.top-f.bottom,k=b-f.left-f.right,C=Xe(m-f[v],y),T=Xe(b-f[w],k),P=!t.middlewareData.shift;let _=C,E=T;if((o=t.middlewareData.shift)!=null&&o.enabled.x&&(E=k),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(_=y),P&&!h){const L=we(f.left,0),F=we(f.right,0),D=we(f.top,0),V=we(f.bottom,0);g?E=b-2*(L!==0||F!==0?L+F:we(f.left,f.right)):_=m-2*(D!==0||V!==0?D+V:we(f.top,f.bottom))}await l({...t,availableWidth:E,availableHeight:_});const I=await s.getDimensions(i.floating);return b!==I.width||m!==I.height?{reset:{rects:!0}}:{}}}};function ho(){return typeof window<"u"}function wt(e){return ts(e)?(e.nodeName||"").toLowerCase():"#document"}function ye(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function De(e){var t;return(t=(ts(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ts(e){return ho()?e instanceof Node||e instanceof ye(e).Node:!1}function Ne(e){return ho()?e instanceof Element||e instanceof ye(e).Element:!1}function Ue(e){return ho()?e instanceof HTMLElement||e instanceof ye(e).HTMLElement:!1}function os(e){return!ho()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ye(e).ShadowRoot}function Dt(e){const{overflow:t,overflowX:o,overflowY:r,display:n}=Te(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+o)&&n!=="inline"&&n!=="contents"}function Jf(e){return/^(table|td|th)$/.test(wt(e))}function go(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Qf=/transform|translate|scale|rotate|perspective|filter/,ep=/paint|layout|strict|content/,at=e=>!!e&&e!=="none";let wr;function yr(e){const t=Ne(e)?Te(e):e;return at(t.transform)||at(t.translate)||at(t.scale)||at(t.rotate)||at(t.perspective)||!xr()&&(at(t.backdropFilter)||at(t.filter))||Qf.test(t.willChange||"")||ep.test(t.contain||"")}function tp(e){let t=Ke(e);for(;Ue(t)&&!yt(t);){if(yr(t))return t;if(go(t))return null;t=Ke(t)}return null}function xr(){return wr==null&&(wr=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),wr}function yt(e){return/^(html|body|#document)$/.test(wt(e))}function Te(e){return ye(e).getComputedStyle(e)}function mo(e){return Ne(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ke(e){if(wt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||os(e)&&e.host||De(e);return os(t)?t.host:t}function rs(e){const t=Ke(e);return yt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ue(t)&&Dt(t)?t:rs(t)}function $t(e,t,o){var r;t===void 0&&(t=[]),o===void 0&&(o=!0);const n=rs(e),a=n===((r=e.ownerDocument)==null?void 0:r.body),s=ye(n);if(a){const i=kr(s);return t.concat(s,s.visualViewport||[],Dt(n)?n:[],i&&o?$t(i):[])}else return t.concat(n,$t(n,[],o))}function kr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ns(e){const t=Te(e);let o=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const n=Ue(e),a=n?e.offsetWidth:o,s=n?e.offsetHeight:r,i=co(o)!==a||co(r)!==s;return i&&(o=a,r=s),{width:o,height:r,$:i}}function Sr(e){return Ne(e)?e:e.contextElement}function xt(e){const t=Sr(e);if(!Ue(t))return Le(1);const o=t.getBoundingClientRect(),{width:r,height:n,$:a}=ns(t);let s=(a?co(o.width):o.width)/r,i=(a?co(o.height):o.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const op=Le(0);function as(e){const t=ye(e);return!xr()||!t.visualViewport?op:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function rp(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==ye(e)?!1:t}function st(e,t,o,r){t===void 0&&(t=!1),o===void 0&&(o=!1);const n=e.getBoundingClientRect(),a=Sr(e);let s=Le(1);t&&(r?Ne(r)&&(s=xt(r)):s=xt(e));const i=rp(a,o,r)?as(a):Le(0);let l=(n.left+i.x)/s.x,u=(n.top+i.y)/s.y,f=n.width/s.x,c=n.height/s.y;if(a){const h=ye(a),g=r&&Ne(r)?ye(r):r;let b=h,m=kr(b);for(;m&&r&&g!==b;){const v=xt(m),w=m.getBoundingClientRect(),y=Te(m),k=w.left+(m.clientLeft+parseFloat(y.paddingLeft))*v.x,C=w.top+(m.clientTop+parseFloat(y.paddingTop))*v.y;l*=v.x,u*=v.y,f*=v.x,c*=v.y,l+=k,u+=C,b=ye(m),m=kr(b)}}return po({width:f,height:c,x:l,y:u})}function vo(e,t){const o=mo(e).scrollLeft;return t?t.left+o:st(De(e)).left+o}function ss(e,t){const o=e.getBoundingClientRect(),r=o.left+t.scrollLeft-vo(e,o),n=o.top+t.scrollTop;return{x:r,y:n}}function np(e){let{elements:t,rect:o,offsetParent:r,strategy:n}=e;const a=n==="fixed",s=De(r),i=t?go(t.floating):!1;if(r===s||i&&a)return o;let l={scrollLeft:0,scrollTop:0},u=Le(1);const f=Le(0),c=Ue(r);if((c||!c&&!a)&&((wt(r)!=="body"||Dt(s))&&(l=mo(r)),c)){const g=st(r);u=xt(r),f.x=g.x+r.clientLeft,f.y=g.y+r.clientTop}const h=s&&!c&&!a?ss(s,l):Le(0);return{width:o.width*u.x,height:o.height*u.y,x:o.x*u.x-l.scrollLeft*u.x+f.x+h.x,y:o.y*u.y-l.scrollTop*u.y+f.y+h.y}}function ap(e){return Array.from(e.getClientRects())}function sp(e){const t=De(e),o=mo(e),r=e.ownerDocument.body,n=we(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=we(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-o.scrollLeft+vo(e);const i=-o.scrollTop;return Te(r).direction==="rtl"&&(s+=we(t.clientWidth,r.clientWidth)-n),{width:n,height:a,x:s,y:i}}const is=25;function ip(e,t){const o=ye(e),r=De(e),n=o.visualViewport;let a=r.clientWidth,s=r.clientHeight,i=0,l=0;if(n){a=n.width,s=n.height;const f=xr();(!f||f&&t==="fixed")&&(i=n.offsetLeft,l=n.offsetTop)}const u=vo(r);if(u<=0){const f=r.ownerDocument,c=f.body,h=getComputedStyle(c),g=f.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,b=Math.abs(r.clientWidth-c.clientWidth-g);b<=is&&(a-=b)}else u<=is&&(a+=u);return{width:a,height:s,x:i,y:l}}function lp(e,t){const o=st(e,!0,t==="fixed"),r=o.top+e.clientTop,n=o.left+e.clientLeft,a=Ue(e)?xt(e):Le(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,l=n*a.x,u=r*a.y;return{width:s,height:i,x:l,y:u}}function ls(e,t,o){let r;if(t==="viewport")r=ip(e,o);else if(t==="document")r=sp(De(e));else if(Ne(t))r=lp(t,o);else{const n=as(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return po(r)}function cs(e,t){const o=Ke(e);return o===t||!Ne(o)||yt(o)?!1:Te(o).position==="fixed"||cs(o,t)}function cp(e,t){const o=t.get(e);if(o)return o;let r=$t(e,[],!1).filter(i=>Ne(i)&&wt(i)!=="body"),n=null;const a=Te(e).position==="fixed";let s=a?Ke(e):e;for(;Ne(s)&&!yt(s);){const i=Te(s),l=yr(s);!l&&i.position==="fixed"&&(n=null),(a?!l&&!n:!l&&i.position==="static"&&!!n&&(n.position==="absolute"||n.position==="fixed")||Dt(s)&&!l&&cs(e,s))?r=r.filter(f=>f!==s):n=i,s=Ke(s)}return t.set(e,r),r}function dp(e){let{element:t,boundary:o,rootBoundary:r,strategy:n}=e;const s=[...o==="clippingAncestors"?go(t)?[]:cp(t,this._c):[].concat(o),r],i=ls(t,s[0],n);let l=i.top,u=i.right,f=i.bottom,c=i.left;for(let h=1;h<s.length;h++){const g=ls(t,s[h],n);l=we(g.top,l),u=Xe(g.right,u),f=Xe(g.bottom,f),c=we(g.left,c)}return{width:u-c,height:f-l,x:c,y:l}}function up(e){const{width:t,height:o}=ns(e);return{width:t,height:o}}function fp(e,t,o){const r=Ue(t),n=De(t),a=o==="fixed",s=st(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const l=Le(0);function u(){l.x=vo(n)}if(r||!r&&!a)if((wt(t)!=="body"||Dt(n))&&(i=mo(t)),r){const g=st(t,!0,a,t);l.x=g.x+t.clientLeft,l.y=g.y+t.clientTop}else n&&u();a&&!r&&n&&u();const f=n&&!r&&!a?ss(n,i):Le(0),c=s.left+i.scrollLeft-l.x-f.x,h=s.top+i.scrollTop-l.y-f.y;return{x:c,y:h,width:s.width,height:s.height}}function Cr(e){return Te(e).position==="static"}function ds(e,t){if(!Ue(e)||Te(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return De(e)===o&&(o=o.ownerDocument.body),o}function us(e,t){const o=ye(e);if(go(e))return o;if(!Ue(e)){let n=Ke(e);for(;n&&!yt(n);){if(Ne(n)&&!Cr(n))return n;n=Ke(n)}return o}let r=ds(e,t);for(;r&&Jf(r)&&Cr(r);)r=ds(r,t);return r&&yt(r)&&Cr(r)&&!yr(r)?o:r||tp(e)||o}const pp=async function(e){const t=this.getOffsetParent||us,o=this.getDimensions,r=await o(e.floating);return{reference:fp(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function hp(e){return Te(e).direction==="rtl"}const gp={convertOffsetParentRelativeRectToViewportRelativeRect:np,getDocumentElement:De,getClippingRect:dp,getOffsetParent:us,getElementRects:pp,getClientRects:ap,getDimensions:up,getScale:xt,isElement:Ne,isRTL:hp};function fs(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function mp(e,t){let o=null,r;const n=De(e);function a(){var i;clearTimeout(r),(i=o)==null||i.disconnect(),o=null}function s(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),a();const u=e.getBoundingClientRect(),{left:f,top:c,width:h,height:g}=u;if(i||t(),!h||!g)return;const b=uo(c),m=uo(n.clientWidth-(f+h)),v=uo(n.clientHeight-(c+g)),w=uo(f),k={rootMargin:-b+"px "+-m+"px "+-v+"px "+-w+"px",threshold:we(0,Xe(1,l))||1};let C=!0;function T(P){const _=P[0].intersectionRatio;if(_!==l){if(!C)return s();_?s(!1,_):r=setTimeout(()=>{s(!1,1e-7)},1e3)}_===1&&!fs(u,e.getBoundingClientRect())&&s(),C=!1}try{o=new IntersectionObserver(T,{...k,root:n.ownerDocument})}catch{o=new IntersectionObserver(T,k)}o.observe(e)}return s(!0),a}function vp(e,t,o,r){r===void 0&&(r={});const{ancestorScroll:n=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Sr(e),f=n||a?[...u?$t(u):[],...t?$t(t):[]]:[];f.forEach(w=>{n&&w.addEventListener("scroll",o,{passive:!0}),a&&w.addEventListener("resize",o)});const c=u&&i?mp(u,o):null;let h=-1,g=null;s&&(g=new ResizeObserver(w=>{let[y]=w;y&&y.target===u&&g&&t&&(g.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var k;(k=g)==null||k.observe(t)})),o()}),u&&!l&&g.observe(u),t&&g.observe(t));let b,m=l?st(e):null;l&&v();function v(){const w=st(e);m&&!fs(m,w)&&o(),m=w,b=requestAnimationFrame(v)}return o(),()=>{var w;f.forEach(y=>{n&&y.removeEventListener("scroll",o),a&&y.removeEventListener("resize",o)}),c==null||c(),(w=g)==null||w.disconnect(),g=null,l&&cancelAnimationFrame(b)}}const bp=Yf,wp=Xf,yp=Rf,xp=Zf,kp=Gf,ps=jf,Sp=Kf,Cp=(e,t,o)=>{const r=new Map,n={platform:gp,...o},a={...n.platform,_c:r};return Uf(e,t,{...n,platform:a})};var Ep=typeof document<"u",Np=function(){},bo=Ep?x.useLayoutEffect:Np;function wo(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let o,r,n;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(r=o;r--!==0;)if(!wo(e[r],t[r]))return!1;return!0}if(n=Object.keys(e),o=n.length,o!==Object.keys(t).length)return!1;for(r=o;r--!==0;)if(!{}.hasOwnProperty.call(t,n[r]))return!1;for(r=o;r--!==0;){const a=n[r];if(!(a==="_owner"&&e.$$typeof)&&!wo(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function hs(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function gs(e,t){const o=hs(e);return Math.round(t*o)/o}function Er(e){const t=p.useRef(e);return bo(()=>{t.current=e}),t}function Tp(e){e===void 0&&(e={});const{placement:t="bottom",strategy:o="absolute",middleware:r=[],platform:n,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:l,open:u}=e,[f,c]=p.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[h,g]=p.useState(r);wo(h,r)||g(r);const[b,m]=p.useState(null),[v,w]=p.useState(null),y=p.useCallback(N=>{N!==P.current&&(P.current=N,m(N))},[]),k=p.useCallback(N=>{N!==_.current&&(_.current=N,w(N))},[]),C=a||b,T=s||v,P=p.useRef(null),_=p.useRef(null),E=p.useRef(f),I=l!=null,L=Er(l),F=Er(n),D=Er(u),V=p.useCallback(()=>{if(!P.current||!_.current)return;const N={placement:t,strategy:o,middleware:h};F.current&&(N.platform=F.current),Cp(P.current,_.current,N).then(A=>{const S={...A,isPositioned:D.current!==!1};j.current&&!wo(E.current,S)&&(E.current=S,Ut.flushSync(()=>{c(S)}))})},[h,t,o,F,D]);bo(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,c(N=>({...N,isPositioned:!1})))},[u]);const j=p.useRef(!1);bo(()=>(j.current=!0,()=>{j.current=!1}),[]),bo(()=>{if(C&&(P.current=C),T&&(_.current=T),C&&T){if(L.current)return L.current(C,T,V);V()}},[C,T,V,L,I]);const G=p.useMemo(()=>({reference:P,floating:_,setReference:y,setFloating:k}),[y,k]),M=p.useMemo(()=>({reference:C,floating:T}),[C,T]),U=p.useMemo(()=>{const N={position:o,left:0,top:0};if(!M.floating)return N;const A=gs(M.floating,f.x),S=gs(M.floating,f.y);return i?{...N,transform:"translate("+A+"px, "+S+"px)",...hs(M.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:A,top:S}},[o,i,M.floating,f.x,f.y]);return p.useMemo(()=>({...f,update:V,refs:G,elements:M,floatingStyles:U}),[f,V,G,M,U])}const _p=e=>{function t(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){const{element:r,padding:n}=typeof e=="function"?e(o):e;return r&&t(r)?r.current!=null?ps({element:r.current,padding:n}).fn(o):{}:r?ps({element:r,padding:n}).fn(o):{}}}},Pp=(e,t)=>{const o=bp(e);return{name:o.name,fn:o.fn,options:[e,t]}},Ap=(e,t)=>{const o=wp(e);return{name:o.name,fn:o.fn,options:[e,t]}},Ip=(e,t)=>({fn:Sp(e).fn,options:[e,t]}),Mp=(e,t)=>{const o=yp(e);return{name:o.name,fn:o.fn,options:[e,t]}},Op=(e,t)=>{const o=xp(e);return{name:o.name,fn:o.fn,options:[e,t]}},Lp=(e,t)=>{const o=kp(e);return{name:o.name,fn:o.fn,options:[e,t]}},zp=(e,t)=>{const o=_p(e);return{name:o.name,fn:o.fn,options:[e,t]}};var Dp="Arrow",ms=p.forwardRef((e,t)=>{const{children:o,width:r=10,height:n=5,...a}=e;return d.jsx(K.svg,{...a,ref:t,width:r,height:n,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?o:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});ms.displayName=Dp;var $p=ms,Nr="Popper",[vs,yo]=me(Nr),[Fp,bs]=vs(Nr),ws=e=>{const{__scopePopper:t,children:o}=e,[r,n]=p.useState(null);return d.jsx(Fp,{scope:t,anchor:r,onAnchorChange:n,children:o})};ws.displayName=Nr;var ys="PopperAnchor",xs=p.forwardRef((e,t)=>{const{__scopePopper:o,virtualRef:r,...n}=e,a=bs(ys,o),s=p.useRef(null),i=ae(t,s),l=p.useRef(null);return p.useEffect(()=>{const u=l.current;l.current=(r==null?void 0:r.current)||s.current,u!==l.current&&a.onAnchorChange(l.current)}),r?null:d.jsx(K.div,{...n,ref:i})});xs.displayName=ys;var Tr="PopperContent",[Bp,Hp]=vs(Tr),ks=p.forwardRef((e,t)=>{var B,Y,J,se,re,te;const{__scopePopper:o,side:r="bottom",sideOffset:n=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:c="partial",hideWhenDetached:h=!1,updatePositionStrategy:g="optimized",onPlaced:b,...m}=e,v=bs(Tr,o),[w,y]=p.useState(null),k=ae(t,ce=>y(ce)),[C,T]=p.useState(null),P=io(C),_=(P==null?void 0:P.width)??0,E=(P==null?void 0:P.height)??0,I=r+(a!=="center"?"-"+a:""),L=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},F=Array.isArray(u)?u:[u],D=F.length>0,V={padding:L,boundary:F.filter(Wp),altBoundary:D},{refs:j,floatingStyles:G,placement:M,isPositioned:U,middlewareData:N}=Tp({strategy:"fixed",placement:I,whileElementsMounted:(...ce)=>vp(...ce,{animationFrame:g==="always"}),elements:{reference:v.anchor},middleware:[Pp({mainAxis:n+E,alignmentAxis:s}),l&&Ap({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?Ip():void 0,...V}),l&&Mp({...V}),Op({...V,apply:({elements:ce,rects:de,availableWidth:ct,availableHeight:Qe})=>{const{width:Pe,height:Do}=de.reference,ve=ce.floating.style;ve.setProperty("--radix-popper-available-width",`${ct}px`),ve.setProperty("--radix-popper-available-height",`${Qe}px`),ve.setProperty("--radix-popper-anchor-width",`${Pe}px`),ve.setProperty("--radix-popper-anchor-height",`${Do}px`)}}),C&&zp({element:C,padding:i}),Up({arrowWidth:_,arrowHeight:E}),h&&Lp({strategy:"referenceHidden",...V})]}),[A,S]=Es(M),z=pe(b);ie(()=>{U&&(z==null||z())},[U,z]);const W=(B=N.arrow)==null?void 0:B.x,O=(Y=N.arrow)==null?void 0:Y.y,q=((J=N.arrow)==null?void 0:J.centerOffset)!==0,[R,Q]=p.useState();return ie(()=>{w&&Q(window.getComputedStyle(w).zIndex)},[w]),d.jsx("div",{ref:j.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:U?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:R,"--radix-popper-transform-origin":[(se=N.transformOrigin)==null?void 0:se.x,(re=N.transformOrigin)==null?void 0:re.y].join(" "),...((te=N.hide)==null?void 0:te.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(Bp,{scope:o,placedSide:A,onArrowChange:T,arrowX:W,arrowY:O,shouldHideArrow:q,children:d.jsx(K.div,{"data-side":A,"data-align":S,...m,ref:k,style:{...m.style,animation:U?void 0:"none"}})})})});ks.displayName=Tr;var Ss="PopperArrow",Vp={top:"bottom",right:"left",bottom:"top",left:"right"},Cs=p.forwardRef(function(t,o){const{__scopePopper:r,...n}=t,a=Hp(Ss,r),s=Vp[a.placedSide];return d.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:d.jsx($p,{...n,ref:o,style:{...n.style,display:"block"}})})});Cs.displayName=Ss;function Wp(e){return e!==null}var Up=e=>({name:"transformOrigin",options:e,fn(t){var v,w,y;const{placement:o,rects:r,middlewareData:n}=t,s=((v=n.arrow)==null?void 0:v.centerOffset)!==0,i=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[u,f]=Es(o),c={start:"0%",center:"50%",end:"100%"}[f],h=(((w=n.arrow)==null?void 0:w.x)??0)+i/2,g=(((y=n.arrow)==null?void 0:y.y)??0)+l/2;let b="",m="";return u==="bottom"?(b=s?c:`${h}px`,m=`${-l}px`):u==="top"?(b=s?c:`${h}px`,m=`${r.floating.height+l}px`):u==="right"?(b=`${-l}px`,m=s?c:`${g}px`):u==="left"&&(b=`${r.floating.width+l}px`,m=s?c:`${g}px`),{data:{x:b,y:m}}}});function Es(e){const[t,o="center"]=e.split("-");return[t,o]}var Ns=ws,Ts=xs,_s=ks,Ps=Cs,_r="rovingFocusGroup.onEntryFocus",jp={bubbles:!1,cancelable:!0},Ft="RovingFocusGroup",[Pr,As,Rp]=ta(Ft),[Gp,xo]=me(Ft,[Rp]),[qp,Yp]=Gp(Ft),Is=p.forwardRef((e,t)=>d.jsx(Pr.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(Pr.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(Xp,{...e,ref:t})})}));Is.displayName=Ft;var Xp=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:o,orientation:r,loop:n=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...c}=e,h=p.useRef(null),g=ae(t,h),b=zt(a),[m,v]=He({prop:s,defaultProp:i??null,onChange:l,caller:Ft}),[w,y]=p.useState(!1),k=pe(u),C=As(o),T=p.useRef(!1),[P,_]=p.useState(0);return p.useEffect(()=>{const E=h.current;if(E)return E.addEventListener(_r,k),()=>E.removeEventListener(_r,k)},[k]),d.jsx(qp,{scope:o,orientation:r,dir:b,loop:n,currentTabStopId:m,onItemFocus:p.useCallback(E=>v(E),[v]),onItemShiftTab:p.useCallback(()=>y(!0),[]),onFocusableItemAdd:p.useCallback(()=>_(E=>E+1),[]),onFocusableItemRemove:p.useCallback(()=>_(E=>E-1),[]),children:d.jsx(K.div,{tabIndex:w||P===0?-1:0,"data-orientation":r,...c,ref:g,style:{outline:"none",...e.style},onMouseDown:Z(e.onMouseDown,()=>{T.current=!0}),onFocus:Z(e.onFocus,E=>{const I=!T.current;if(E.target===E.currentTarget&&I&&!w){const L=new CustomEvent(_r,jp);if(E.currentTarget.dispatchEvent(L),!L.defaultPrevented){const F=C().filter(M=>M.focusable),D=F.find(M=>M.active),V=F.find(M=>M.id===m),G=[D,V,...F].filter(Boolean).map(M=>M.ref.current);Ls(G,f)}}T.current=!1}),onBlur:Z(e.onBlur,()=>y(!1))})})}),Ms="RovingFocusGroupItem",Os=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:o,focusable:r=!0,active:n=!1,tabStopId:a,children:s,...i}=e,l=nt(),u=a||l,f=Yp(Ms,o),c=f.currentTabStopId===u,h=As(o),{onFocusableItemAdd:g,onFocusableItemRemove:b,currentTabStopId:m}=f;return p.useEffect(()=>{if(r)return g(),()=>b()},[r,g,b]),d.jsx(Pr.ItemSlot,{scope:o,id:u,focusable:r,active:n,children:d.jsx(K.span,{tabIndex:c?0:-1,"data-orientation":f.orientation,...i,ref:t,onMouseDown:Z(e.onMouseDown,v=>{r?f.onItemFocus(u):v.preventDefault()}),onFocus:Z(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:Z(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){f.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const w=Jp(v,f.orientation,f.dir);if(w!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let k=h().filter(C=>C.focusable).map(C=>C.ref.current);if(w==="last")k.reverse();else if(w==="prev"||w==="next"){w==="prev"&&k.reverse();const C=k.indexOf(v.currentTarget);k=f.loop?Qp(k,C+1):k.slice(C+1)}setTimeout(()=>Ls(k))}}),children:typeof s=="function"?s({isCurrentTabStop:c,hasTabStop:m!=null}):s})})});Os.displayName=Ms;var Kp={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Zp(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Jp(e,t,o){const r=Zp(e.key,o);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Kp[r]}function Ls(e,t=!1){const o=document.activeElement;for(const r of e)if(r===o||(r.focus({preventScroll:t}),document.activeElement!==o))return}function Qp(e,t){return e.map((o,r)=>e[(t+r)%e.length])}var zs=Is,Ds=Os,eh="Label",$s=p.forwardRef((e,t)=>d.jsx(K.label,{...e,ref:t,onMouseDown:o=>{var n;o.target.closest("button, input, select, textarea")||((n=e.onMouseDown)==null||n.call(e,o),!o.defaultPrevented&&o.detail>1&&o.preventDefault())}}));$s.displayName=eh;var th=$s;function Ar(e,[t,o]){return Math.min(o,Math.max(t,e))}var Ir="Progress",Mr=100,[oh]=me(Ir),[rh,nh]=oh(Ir),Fs=p.forwardRef((e,t)=>{const{__scopeProgress:o,value:r=null,max:n,getValueLabel:a=ah,...s}=e;(n||n===0)&&!Ws(n)&&console.error(sh(`${n}`,"Progress"));const i=Ws(n)?n:Mr;r!==null&&!Us(r,i)&&console.error(ih(`${r}`,"Progress"));const l=Us(r,i)?r:null,u=ko(l)?a(l,i):void 0;return d.jsx(rh,{scope:o,value:l,max:i,children:d.jsx(K.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":ko(l)?l:void 0,"aria-valuetext":u,role:"progressbar","data-state":Vs(l,i),"data-value":l??void 0,"data-max":i,...s,ref:t})})});Fs.displayName=Ir;var Bs="ProgressIndicator",Hs=p.forwardRef((e,t)=>{const{__scopeProgress:o,...r}=e,n=nh(Bs,o);return d.jsx(K.div,{"data-state":Vs(n.value,n.max),"data-value":n.value??void 0,"data-max":n.max,...r,ref:t})});Hs.displayName=Bs;function ah(e,t){return`${Math.round(e/t*100)}%`}function Vs(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function ko(e){return typeof e=="number"}function Ws(e){return ko(e)&&!isNaN(e)&&e>0}function Us(e,t){return ko(e)&&!isNaN(e)&&e<=t&&e>=0}function sh(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Mr}\`.`}function ih(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
281
286
  - a positive number
282
287
  - less than the value passed to \`max\` (or ${Mr} if no \`max\` prop is set)
283
288
  - \`null\` or \`undefined\` if the progress is indeterminate.
284
289
 
285
- Defaulting to \`null\`.`}var sh=Fs,ih=Hs,Or="Radio",[lh,js]=me(Or),[ch,dh]=lh(Or),Rs=p.forwardRef((e,t)=>{const{__scopeRadio:o,name:r,checked:n=!1,required:a,disabled:s,value:i="on",onCheck:l,form:u,...f}=e,[c,h]=p.useState(null),g=ae(t,v=>h(v)),b=p.useRef(!1),m=c?u||!!c.closest("form"):!0;return d.jsxs(ch,{scope:o,checked:n,disabled:s,children:[d.jsx(X.button,{type:"button",role:"radio","aria-checked":n,"data-state":Xs(n),"data-disabled":s?"":void 0,disabled:s,value:i,...f,ref:g,onClick:K(e.onClick,v=>{n||l==null||l(),m&&(b.current=v.isPropagationStopped(),b.current||v.stopPropagation())})}),m&&d.jsx(Ys,{control:c,bubbles:!b.current,name:r,value:i,checked:n,required:a,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});Rs.displayName=Or;var Gs="RadioIndicator",qs=p.forwardRef((e,t)=>{const{__scopeRadio:o,forceMount:r,...n}=e,a=dh(Gs,o);return d.jsx(Ee,{present:r||a.checked,children:d.jsx(X.span,{"data-state":Xs(a.checked),"data-disabled":a.disabled?"":void 0,...n,ref:t})})});qs.displayName=Gs;var uh="RadioBubbleInput",Ys=p.forwardRef(({__scopeRadio:e,control:t,checked:o,bubbles:r=!0,...n},a)=>{const s=p.useRef(null),i=ae(s,a),l=so(o),u=io(t);return p.useEffect(()=>{const f=s.current;if(!f)return;const c=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(c,"checked").set;if(l!==o&&g){const b=new Event("click",{bubbles:r});g.call(f,o),f.dispatchEvent(b)}},[l,o,r]),d.jsx(X.input,{type:"radio","aria-hidden":!0,defaultChecked:o,...n,tabIndex:-1,ref:i,style:{...n.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ys.displayName=uh;function Xs(e){return e?"checked":"unchecked"}var fh=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],So="RadioGroup",[ph]=me(So,[xo,js]),Ks=xo(),Zs=js(),[hh,gh]=ph(So),Js=p.forwardRef((e,t)=>{const{__scopeRadioGroup:o,name:r,defaultValue:n,value:a,required:s=!1,disabled:i=!1,orientation:l,dir:u,loop:f=!0,onValueChange:c,...h}=e,g=Ks(o),b=zt(u),[m,v]=He({prop:a,defaultProp:n??null,onChange:c,caller:So});return d.jsx(hh,{scope:o,name:r,required:s,disabled:i,value:m,onValueChange:v,children:d.jsx(zs,{asChild:!0,...g,orientation:l,dir:b,loop:f,children:d.jsx(X.div,{role:"radiogroup","aria-required":s,"aria-orientation":l,"data-disabled":i?"":void 0,dir:b,...h,ref:t})})})});Js.displayName=So;var Qs="RadioGroupItem",ei=p.forwardRef((e,t)=>{const{__scopeRadioGroup:o,disabled:r,...n}=e,a=gh(Qs,o),s=a.disabled||r,i=Ks(o),l=Zs(o),u=p.useRef(null),f=ae(t,u),c=a.value===n.value,h=p.useRef(!1);return p.useEffect(()=>{const g=m=>{fh.includes(m.key)&&(h.current=!0)},b=()=>h.current=!1;return document.addEventListener("keydown",g),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",g),document.removeEventListener("keyup",b)}},[]),d.jsx(Ds,{asChild:!0,...i,focusable:!s,active:c,children:d.jsx(Rs,{disabled:s,required:a.required,checked:c,...l,...n,name:a.name,ref:f,onCheck:()=>a.onValueChange(n.value),onKeyDown:K(g=>{g.key==="Enter"&&g.preventDefault()}),onFocus:K(n.onFocus,()=>{var g;h.current&&((g=u.current)==null||g.click())})})})});ei.displayName=Qs;var mh="RadioGroupIndicator",ti=p.forwardRef((e,t)=>{const{__scopeRadioGroup:o,...r}=e,n=Zs(o);return d.jsx(qs,{...n,...r,ref:t})});ti.displayName=mh;var vh=Js,bh=ei,wh=ti;function yh(e,t){return p.useReducer((o,r)=>t[o][r]??o,e)}var Lr="ScrollArea",[oi]=me(Lr),[xh,Se]=oi(Lr),ri=p.forwardRef((e,t)=>{const{__scopeScrollArea:o,type:r="hover",dir:n,scrollHideDelay:a=600,...s}=e,[i,l]=p.useState(null),[u,f]=p.useState(null),[c,h]=p.useState(null),[g,b]=p.useState(null),[m,v]=p.useState(null),[w,y]=p.useState(0),[k,E]=p.useState(0),[_,P]=p.useState(!1),[T,S]=p.useState(!1),I=ae(t,L=>l(L)),D=zt(n);return d.jsx(xh,{scope:o,type:r,dir:D,scrollHideDelay:a,scrollArea:i,viewport:u,onViewportChange:f,content:c,onContentChange:h,scrollbarX:g,onScrollbarXChange:b,scrollbarXEnabled:_,onScrollbarXEnabledChange:P,scrollbarY:m,onScrollbarYChange:v,scrollbarYEnabled:T,onScrollbarYEnabledChange:S,onCornerWidthChange:y,onCornerHeightChange:E,children:d.jsx(X.div,{dir:D,...s,ref:I,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":k+"px",...e.style}})})});ri.displayName=Lr;var ni="ScrollAreaViewport",ai=p.forwardRef((e,t)=>{const{__scopeScrollArea:o,children:r,nonce:n,...a}=e,s=Se(ni,o),i=p.useRef(null),l=ae(t,i,s.onViewportChange);return d.jsxs(d.Fragment,{children:[d.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:n}),d.jsx(X.div,{"data-radix-scroll-area-viewport":"",...a,ref:l,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:d.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});ai.displayName=ni;var $e="ScrollAreaScrollbar",si=p.forwardRef((e,t)=>{const{forceMount:o,...r}=e,n=Se($e,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:s}=n,i=e.orientation==="horizontal";return p.useEffect(()=>(i?a(!0):s(!0),()=>{i?a(!1):s(!1)}),[i,a,s]),n.type==="hover"?d.jsx(kh,{...r,ref:t,forceMount:o}):n.type==="scroll"?d.jsx(Sh,{...r,ref:t,forceMount:o}):n.type==="auto"?d.jsx(ii,{...r,ref:t,forceMount:o}):n.type==="always"?d.jsx(zr,{...r,ref:t}):null});si.displayName=$e;var kh=p.forwardRef((e,t)=>{const{forceMount:o,...r}=e,n=Se($e,e.__scopeScrollArea),[a,s]=p.useState(!1);return p.useEffect(()=>{const i=n.scrollArea;let l=0;if(i){const u=()=>{window.clearTimeout(l),s(!0)},f=()=>{l=window.setTimeout(()=>s(!1),n.scrollHideDelay)};return i.addEventListener("pointerenter",u),i.addEventListener("pointerleave",f),()=>{window.clearTimeout(l),i.removeEventListener("pointerenter",u),i.removeEventListener("pointerleave",f)}}},[n.scrollArea,n.scrollHideDelay]),d.jsx(Ee,{present:o||a,children:d.jsx(ii,{"data-state":a?"visible":"hidden",...r,ref:t})})}),Sh=p.forwardRef((e,t)=>{const{forceMount:o,...r}=e,n=Se($e,e.__scopeScrollArea),a=e.orientation==="horizontal",s=To(()=>l("SCROLL_END"),100),[i,l]=yh("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 p.useEffect(()=>{if(i==="idle"){const u=window.setTimeout(()=>l("HIDE"),n.scrollHideDelay);return()=>window.clearTimeout(u)}},[i,n.scrollHideDelay,l]),p.useEffect(()=>{const u=n.viewport,f=a?"scrollLeft":"scrollTop";if(u){let c=u[f];const h=()=>{const g=u[f];c!==g&&(l("SCROLL"),s()),c=g};return u.addEventListener("scroll",h),()=>u.removeEventListener("scroll",h)}},[n.viewport,a,l,s]),d.jsx(Ee,{present:o||i!=="hidden",children:d.jsx(zr,{"data-state":i==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:K(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:K(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),ii=p.forwardRef((e,t)=>{const o=Se($e,e.__scopeScrollArea),{forceMount:r,...n}=e,[a,s]=p.useState(!1),i=e.orientation==="horizontal",l=To(()=>{if(o.viewport){const u=o.viewport.offsetWidth<o.viewport.scrollWidth,f=o.viewport.offsetHeight<o.viewport.scrollHeight;s(i?u:f)}},10);return kt(o.viewport,l),kt(o.content,l),d.jsx(Ee,{present:r||a,children:d.jsx(zr,{"data-state":a?"visible":"hidden",...n,ref:t})})}),zr=p.forwardRef((e,t)=>{const{orientation:o="vertical",...r}=e,n=Se($e,e.__scopeScrollArea),a=p.useRef(null),s=p.useRef(0),[i,l]=p.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=fi(i.viewport,i.content),f={...r,sizes:i,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:h=>a.current=h,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:h=>s.current=h};function c(h,g){return Ph(h,s.current,i,g)}return o==="horizontal"?d.jsx(Ch,{...f,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){const h=n.viewport.scrollLeft,g=pi(h,i,n.dir);a.current.style.transform=`translate3d(${g}px, 0, 0)`}},onWheelScroll:h=>{n.viewport&&(n.viewport.scrollLeft=h)},onDragScroll:h=>{n.viewport&&(n.viewport.scrollLeft=c(h,n.dir))}}):o==="vertical"?d.jsx(Eh,{...f,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){const h=n.viewport.scrollTop,g=pi(h,i);a.current.style.transform=`translate3d(0, ${g}px, 0)`}},onWheelScroll:h=>{n.viewport&&(n.viewport.scrollTop=h)},onDragScroll:h=>{n.viewport&&(n.viewport.scrollTop=c(h))}}):null}),Ch=p.forwardRef((e,t)=>{const{sizes:o,onSizesChange:r,...n}=e,a=Se($e,e.__scopeScrollArea),[s,i]=p.useState(),l=p.useRef(null),u=ae(t,l,a.onScrollbarXChange);return p.useEffect(()=>{l.current&&i(getComputedStyle(l.current))},[l]),d.jsx(ci,{"data-orientation":"horizontal",...n,ref:u,sizes:o,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":No(o)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,c)=>{if(a.viewport){const h=a.viewport.scrollLeft+f.deltaX;e.onWheelScroll(h),gi(h,c)&&f.preventDefault()}},onResize:()=>{l.current&&a.viewport&&s&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Eo(s.paddingLeft),paddingEnd:Eo(s.paddingRight)}})}})}),Eh=p.forwardRef((e,t)=>{const{sizes:o,onSizesChange:r,...n}=e,a=Se($e,e.__scopeScrollArea),[s,i]=p.useState(),l=p.useRef(null),u=ae(t,l,a.onScrollbarYChange);return p.useEffect(()=>{l.current&&i(getComputedStyle(l.current))},[l]),d.jsx(ci,{"data-orientation":"vertical",...n,ref:u,sizes:o,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":No(o)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,c)=>{if(a.viewport){const h=a.viewport.scrollTop+f.deltaY;e.onWheelScroll(h),gi(h,c)&&f.preventDefault()}},onResize:()=>{l.current&&a.viewport&&s&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Eo(s.paddingTop),paddingEnd:Eo(s.paddingBottom)}})}})}),[Nh,li]=oi($e),ci=p.forwardRef((e,t)=>{const{__scopeScrollArea:o,sizes:r,hasThumb:n,onThumbChange:a,onThumbPointerUp:s,onThumbPointerDown:i,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:f,onResize:c,...h}=e,g=Se($e,o),[b,m]=p.useState(null),v=ae(t,I=>m(I)),w=p.useRef(null),y=p.useRef(""),k=g.viewport,E=r.content-r.viewport,_=pe(f),P=pe(l),T=To(c,10);function S(I){if(w.current){const D=I.clientX-w.current.left,L=I.clientY-w.current.top;u({x:D,y:L})}}return p.useEffect(()=>{const I=D=>{const L=D.target;(b==null?void 0:b.contains(L))&&_(D,E)};return document.addEventListener("wheel",I,{passive:!1}),()=>document.removeEventListener("wheel",I,{passive:!1})},[k,b,E,_]),p.useEffect(P,[r,P]),kt(b,T),kt(g.content,T),d.jsx(Nh,{scope:o,scrollbar:b,hasThumb:n,onThumbChange:pe(a),onThumbPointerUp:pe(s),onThumbPositionChange:P,onThumbPointerDown:pe(i),children:d.jsx(X.div,{...h,ref:v,style:{position:"absolute",...h.style},onPointerDown:K(e.onPointerDown,I=>{I.button===0&&(I.target.setPointerCapture(I.pointerId),w.current=b.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",g.viewport&&(g.viewport.style.scrollBehavior="auto"),S(I))}),onPointerMove:K(e.onPointerMove,S),onPointerUp:K(e.onPointerUp,I=>{const D=I.target;D.hasPointerCapture(I.pointerId)&&D.releasePointerCapture(I.pointerId),document.body.style.webkitUserSelect=y.current,g.viewport&&(g.viewport.style.scrollBehavior=""),w.current=null})})})}),Co="ScrollAreaThumb",di=p.forwardRef((e,t)=>{const{forceMount:o,...r}=e,n=li(Co,e.__scopeScrollArea);return d.jsx(Ee,{present:o||n.hasThumb,children:d.jsx(Th,{ref:t,...r})})}),Th=p.forwardRef((e,t)=>{const{__scopeScrollArea:o,style:r,...n}=e,a=Se(Co,o),s=li(Co,o),{onThumbPositionChange:i}=s,l=ae(t,c=>s.onThumbChange(c)),u=p.useRef(void 0),f=To(()=>{u.current&&(u.current(),u.current=void 0)},100);return p.useEffect(()=>{const c=a.viewport;if(c){const h=()=>{if(f(),!u.current){const g=Ah(c,i);u.current=g,i()}};return i(),c.addEventListener("scroll",h),()=>c.removeEventListener("scroll",h)}},[a.viewport,f,i]),d.jsx(X.div,{"data-state":s.hasThumb?"visible":"hidden",...n,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:K(e.onPointerDownCapture,c=>{const g=c.target.getBoundingClientRect(),b=c.clientX-g.left,m=c.clientY-g.top;s.onThumbPointerDown({x:b,y:m})}),onPointerUp:K(e.onPointerUp,s.onThumbPointerUp)})});di.displayName=Co;var Dr="ScrollAreaCorner",ui=p.forwardRef((e,t)=>{const o=Se(Dr,e.__scopeScrollArea),r=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&r?d.jsx(_h,{...e,ref:t}):null});ui.displayName=Dr;var _h=p.forwardRef((e,t)=>{const{__scopeScrollArea:o,...r}=e,n=Se(Dr,o),[a,s]=p.useState(0),[i,l]=p.useState(0),u=!!(a&&i);return kt(n.scrollbarX,()=>{var c;const f=((c=n.scrollbarX)==null?void 0:c.offsetHeight)||0;n.onCornerHeightChange(f),l(f)}),kt(n.scrollbarY,()=>{var c;const f=((c=n.scrollbarY)==null?void 0:c.offsetWidth)||0;n.onCornerWidthChange(f),s(f)}),u?d.jsx(X.div,{...r,ref:t,style:{width:a,height:i,position:"absolute",right:n.dir==="ltr"?0:void 0,left:n.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Eo(e){return e?parseInt(e,10):0}function fi(e,t){const o=e/t;return isNaN(o)?0:o}function No(e){const t=fi(e.viewport,e.content),o=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-o)*t;return Math.max(r,18)}function Ph(e,t,o,r="ltr"){const n=No(o),a=n/2,s=t||a,i=n-s,l=o.scrollbar.paddingStart+s,u=o.scrollbar.size-o.scrollbar.paddingEnd-i,f=o.content-o.viewport,c=r==="ltr"?[0,f]:[f*-1,0];return hi([l,u],c)(e)}function pi(e,t,o="ltr"){const r=No(t),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-n,s=t.content-t.viewport,i=a-r,l=o==="ltr"?[0,s]:[s*-1,0],u=Ar(e,l);return hi([0,s],[0,i])(u)}function hi(e,t){return o=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(o-e[0])}}function gi(e,t){return e>0&&e<t}var Ah=(e,t=()=>{})=>{let o={left:e.scrollLeft,top:e.scrollTop},r=0;return(function n(){const a={left:e.scrollLeft,top:e.scrollTop},s=o.left!==a.left,i=o.top!==a.top;(s||i)&&t(),o=a,r=window.requestAnimationFrame(n)})(),()=>window.cancelAnimationFrame(r)};function To(e,t){const o=pe(e),r=p.useRef(0);return p.useEffect(()=>()=>window.clearTimeout(r.current),[]),p.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(o,t)},[o,t])}function kt(e,t){const o=pe(t);ie(()=>{let r=0;if(e){const n=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(o)});return n.observe(e),()=>{window.cancelAnimationFrame(r),n.unobserve(e)}}},[e,o])}var Ih=ri,Mh=ai,Oh=ui,Lh=[" ","Enter","ArrowUp","ArrowDown"],zh=[" ","Enter"],it="Select",[_o,Po,Dh]=ta(it),[St]=me(it,[Dh,yo]),Ao=yo(),[$h,Ze]=St(it),[Fh,Bh]=St(it),mi=e=>{const{__scopeSelect:t,children:o,open:r,defaultOpen:n,onOpenChange:a,value:s,defaultValue:i,onValueChange:l,dir:u,name:f,autoComplete:c,disabled:h,required:g,form:b}=e,m=Ao(t),[v,w]=p.useState(null),[y,k]=p.useState(null),[E,_]=p.useState(!1),P=zt(u),[T,S]=He({prop:r,defaultProp:n??!1,onChange:a,caller:it}),[I,D]=He({prop:s,defaultProp:i,onChange:l,caller:it}),L=p.useRef(null),V=v?b||!!v.closest("form"):!0,[W,U]=p.useState(new Set),J=Array.from(W).map(M=>M.props.value).join(";");return d.jsx(Ns,{...m,children:d.jsxs($h,{required:g,scope:t,trigger:v,onTriggerChange:w,valueNode:y,onValueNodeChange:k,valueNodeHasChildren:E,onValueNodeHasChildrenChange:_,contentId:nt(),value:I,onValueChange:D,open:T,onOpenChange:S,dir:P,triggerPointerDownPosRef:L,disabled:h,children:[d.jsx(_o.Provider,{scope:t,children:d.jsx(Fh,{scope:e.__scopeSelect,onNativeOptionAdd:p.useCallback(M=>{U(R=>new Set(R).add(M))},[]),onNativeOptionRemove:p.useCallback(M=>{U(R=>{const N=new Set(R);return N.delete(M),N})},[]),children:o})}),V?d.jsxs(Fi,{"aria-hidden":!0,required:g,tabIndex:-1,name:f,autoComplete:c,value:I,onChange:M=>D(M.target.value),disabled:h,form:b,children:[I===void 0?d.jsx("option",{value:""}):null,Array.from(W)]},J):null]})})};mi.displayName=it;var vi="SelectTrigger",bi=p.forwardRef((e,t)=>{const{__scopeSelect:o,disabled:r=!1,...n}=e,a=Ao(o),s=Ze(vi,o),i=s.disabled||r,l=ae(t,s.onTriggerChange),u=Po(o),f=p.useRef("touch"),[c,h,g]=Hi(m=>{const v=u().filter(k=>!k.disabled),w=v.find(k=>k.value===s.value),y=Vi(v,m,w);y!==void 0&&s.onValueChange(y.value)}),b=m=>{i||(s.onOpenChange(!0),g()),m&&(s.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return d.jsx(Ts,{asChild:!0,...a,children:d.jsx(X.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":Bi(s.value)?"":void 0,...n,ref:l,onClick:K(n.onClick,m=>{m.currentTarget.focus(),f.current!=="mouse"&&b(m)}),onPointerDown:K(n.onPointerDown,m=>{f.current=m.pointerType;const v=m.target;v.hasPointerCapture(m.pointerId)&&v.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(b(m),m.preventDefault())}),onKeyDown:K(n.onKeyDown,m=>{const v=c.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(v&&m.key===" ")&&Lh.includes(m.key)&&(b(),m.preventDefault())})})})});bi.displayName=vi;var wi="SelectValue",yi=p.forwardRef((e,t)=>{const{__scopeSelect:o,className:r,style:n,children:a,placeholder:s="",...i}=e,l=Ze(wi,o),{onValueNodeHasChildrenChange:u}=l,f=a!==void 0,c=ae(t,l.onValueNodeChange);return ie(()=>{u(f)},[u,f]),d.jsx(X.span,{...i,ref:c,style:{pointerEvents:"none"},children:Bi(l.value)?d.jsx(d.Fragment,{children:s}):a})});yi.displayName=wi;var Hh="SelectIcon",xi=p.forwardRef((e,t)=>{const{__scopeSelect:o,children:r,...n}=e;return d.jsx(X.span,{"aria-hidden":!0,...n,ref:t,children:r||"▼"})});xi.displayName=Hh;var Vh="SelectPortal",ki=e=>d.jsx(rr,{asChild:!0,...e});ki.displayName=Vh;var lt="SelectContent",Si=p.forwardRef((e,t)=>{const o=Ze(lt,e.__scopeSelect),[r,n]=p.useState();if(ie(()=>{n(new DocumentFragment)},[]),!o.open){const a=r;return a?Ut.createPortal(d.jsx(Ci,{scope:e.__scopeSelect,children:d.jsx(_o.Slot,{scope:e.__scopeSelect,children:d.jsx("div",{children:e.children})})}),a):null}return d.jsx(Ei,{...e,ref:t})});Si.displayName=lt;var _e=10,[Ci,Je]=St(lt),Wh="SelectContentImpl",Uh=Lt("SelectContent.RemoveScroll"),Ei=p.forwardRef((e,t)=>{const{__scopeSelect:o,position:r="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:a,onPointerDownOutside:s,side:i,sideOffset:l,align:u,alignOffset:f,arrowPadding:c,collisionBoundary:h,collisionPadding:g,sticky:b,hideWhenDetached:m,avoidCollisions:v,...w}=e,y=Ze(lt,o),[k,E]=p.useState(null),[_,P]=p.useState(null),T=ae(t,F=>E(F)),[S,I]=p.useState(null),[D,L]=p.useState(null),V=Po(o),[W,U]=p.useState(!1),J=p.useRef(!1);p.useEffect(()=>{if(k)return hf(k)},[k]),Tu();const M=p.useCallback(F=>{const[q,...Z]=V().map(te=>te.ref.current),[se]=Z.slice(-1),re=document.activeElement;for(const te of F)if(te===re||(te==null||te.scrollIntoView({block:"nearest"}),te===q&&_&&(_.scrollTop=0),te===se&&_&&(_.scrollTop=_.scrollHeight),te==null||te.focus(),document.activeElement!==re))return},[V,_]),R=p.useCallback(()=>M([S,k]),[M,S,k]);p.useEffect(()=>{W&&R()},[W,R]);const{onOpenChange:N,triggerPointerDownPosRef:A}=y;p.useEffect(()=>{if(k){let F={x:0,y:0};const q=se=>{var re,te;F={x:Math.abs(Math.round(se.pageX)-(((re=A.current)==null?void 0:re.x)??0)),y:Math.abs(Math.round(se.pageY)-(((te=A.current)==null?void 0:te.y)??0))}},Z=se=>{F.x<=10&&F.y<=10?se.preventDefault():k.contains(se.target)||N(!1),document.removeEventListener("pointermove",q),A.current=null};return A.current!==null&&(document.addEventListener("pointermove",q),document.addEventListener("pointerup",Z,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",q),document.removeEventListener("pointerup",Z,{capture:!0})}}},[k,N,A]),p.useEffect(()=>{const F=()=>N(!1);return window.addEventListener("blur",F),window.addEventListener("resize",F),()=>{window.removeEventListener("blur",F),window.removeEventListener("resize",F)}},[N]);const[C,z]=Hi(F=>{const q=V().filter(re=>!re.disabled),Z=q.find(re=>re.ref.current===document.activeElement),se=Vi(q,F,Z);se&&setTimeout(()=>se.ref.current.focus())}),H=p.useCallback((F,q,Z)=>{const se=!J.current&&!Z;(y.value!==void 0&&y.value===q||se)&&(I(F),se&&(J.current=!0))},[y.value]),O=p.useCallback(()=>k==null?void 0:k.focus(),[k]),G=p.useCallback((F,q,Z)=>{const se=!J.current&&!Z;(y.value!==void 0&&y.value===q||se)&&L(F)},[y.value]),j=r==="popper"?$r:Ni,Q=j===$r?{side:i,sideOffset:l,align:u,alignOffset:f,arrowPadding:c,collisionBoundary:h,collisionPadding:g,sticky:b,hideWhenDetached:m,avoidCollisions:v}:{};return d.jsx(Ci,{scope:o,content:k,viewport:_,onViewportChange:P,itemRefCallback:H,selectedItem:S,onItemLeave:O,itemTextRefCallback:G,focusSelectedItem:R,selectedItemText:D,position:r,isPositioned:W,searchRef:C,children:d.jsx(Pa,{as:Uh,allowPinchZoom:!0,children:d.jsx(ua,{asChild:!0,trapped:y.open,onMountAutoFocus:F=>{F.preventDefault()},onUnmountAutoFocus:K(n,F=>{var q;(q=y.trigger)==null||q.focus({preventScroll:!0}),F.preventDefault()}),children:d.jsx(er,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:F=>F.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:d.jsx(j,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:F=>F.preventDefault(),...w,...Q,onPlaced:()=>U(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:K(w.onKeyDown,F=>{const q=F.ctrlKey||F.altKey||F.metaKey;if(F.key==="Tab"&&F.preventDefault(),!q&&F.key.length===1&&z(F.key),["ArrowUp","ArrowDown","Home","End"].includes(F.key)){let se=V().filter(re=>!re.disabled).map(re=>re.ref.current);if(["ArrowUp","End"].includes(F.key)&&(se=se.slice().reverse()),["ArrowUp","ArrowDown"].includes(F.key)){const re=F.target,te=se.indexOf(re);se=se.slice(te+1)}setTimeout(()=>M(se)),F.preventDefault()}})})})})})})});Ei.displayName=Wh;var jh="SelectItemAlignedPosition",Ni=p.forwardRef((e,t)=>{const{__scopeSelect:o,onPlaced:r,...n}=e,a=Ze(lt,o),s=Je(lt,o),[i,l]=p.useState(null),[u,f]=p.useState(null),c=ae(t,T=>f(T)),h=Po(o),g=p.useRef(!1),b=p.useRef(!0),{viewport:m,selectedItem:v,selectedItemText:w,focusSelectedItem:y}=s,k=p.useCallback(()=>{if(a.trigger&&a.valueNode&&i&&u&&m&&v&&w){const T=a.trigger.getBoundingClientRect(),S=u.getBoundingClientRect(),I=a.valueNode.getBoundingClientRect(),D=w.getBoundingClientRect();if(a.dir!=="rtl"){const re=D.left-S.left,te=I.left-re,ce=T.left-te,de=T.width+ce,ct=Math.max(de,S.width),Qe=window.innerWidth-_e,Pe=Ar(te,[_e,Math.max(_e,Qe-ct)]);i.style.minWidth=de+"px",i.style.left=Pe+"px"}else{const re=S.right-D.right,te=window.innerWidth-I.right-re,ce=window.innerWidth-T.right-te,de=T.width+ce,ct=Math.max(de,S.width),Qe=window.innerWidth-_e,Pe=Ar(te,[_e,Math.max(_e,Qe-ct)]);i.style.minWidth=de+"px",i.style.right=Pe+"px"}const L=h(),V=window.innerHeight-_e*2,W=m.scrollHeight,U=window.getComputedStyle(u),J=parseInt(U.borderTopWidth,10),M=parseInt(U.paddingTop,10),R=parseInt(U.borderBottomWidth,10),N=parseInt(U.paddingBottom,10),A=J+M+W+N+R,C=Math.min(v.offsetHeight*5,A),z=window.getComputedStyle(m),H=parseInt(z.paddingTop,10),O=parseInt(z.paddingBottom,10),G=T.top+T.height/2-_e,j=V-G,Q=v.offsetHeight/2,F=v.offsetTop+Q,q=J+M+F,Z=A-q;if(q<=G){const re=L.length>0&&v===L[L.length-1].ref.current;i.style.bottom="0px";const te=u.clientHeight-m.offsetTop-m.offsetHeight,ce=Math.max(j,Q+(re?O:0)+te+R),de=q+ce;i.style.height=de+"px"}else{const re=L.length>0&&v===L[0].ref.current;i.style.top="0px";const ce=Math.max(G,J+m.offsetTop+(re?H:0)+Q)+Z;i.style.height=ce+"px",m.scrollTop=q-G+m.offsetTop}i.style.margin=`${_e}px 0`,i.style.minHeight=C+"px",i.style.maxHeight=V+"px",r==null||r(),requestAnimationFrame(()=>g.current=!0)}},[h,a.trigger,a.valueNode,i,u,m,v,w,a.dir,r]);ie(()=>k(),[k]);const[E,_]=p.useState();ie(()=>{u&&_(window.getComputedStyle(u).zIndex)},[u]);const P=p.useCallback(T=>{T&&b.current===!0&&(k(),y==null||y(),b.current=!1)},[k,y]);return d.jsx(Gh,{scope:o,contentWrapper:i,shouldExpandOnScrollRef:g,onScrollButtonChange:P,children:d.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E},children:d.jsx(X.div,{...n,ref:c,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});Ni.displayName=jh;var Rh="SelectPopperPosition",$r=p.forwardRef((e,t)=>{const{__scopeSelect:o,align:r="start",collisionPadding:n=_e,...a}=e,s=Ao(o);return d.jsx(_s,{...s,...a,ref:t,align:r,collisionPadding:n,style:{boxSizing:"border-box",...a.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)"}})});$r.displayName=Rh;var[Gh,Fr]=St(lt,{}),Br="SelectViewport",Ti=p.forwardRef((e,t)=>{const{__scopeSelect:o,nonce:r,...n}=e,a=Je(Br,o),s=Fr(Br,o),i=ae(t,a.onViewportChange),l=p.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),d.jsx(_o.Slot,{scope:o,children:d.jsx(X.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:K(n.onScroll,u=>{const f=u.currentTarget,{contentWrapper:c,shouldExpandOnScrollRef:h}=s;if(h!=null&&h.current&&c){const g=Math.abs(l.current-f.scrollTop);if(g>0){const b=window.innerHeight-_e*2,m=parseFloat(c.style.minHeight),v=parseFloat(c.style.height),w=Math.max(m,v);if(w<b){const y=w+g,k=Math.min(b,y),E=y-k;c.style.height=k+"px",c.style.bottom==="0px"&&(f.scrollTop=E>0?E:0,c.style.justifyContent="flex-end")}}}l.current=f.scrollTop})})})]})});Ti.displayName=Br;var _i="SelectGroup",[qh,Yh]=St(_i),Xh=p.forwardRef((e,t)=>{const{__scopeSelect:o,...r}=e,n=nt();return d.jsx(qh,{scope:o,id:n,children:d.jsx(X.div,{role:"group","aria-labelledby":n,...r,ref:t})})});Xh.displayName=_i;var Pi="SelectLabel",Kh=p.forwardRef((e,t)=>{const{__scopeSelect:o,...r}=e,n=Yh(Pi,o);return d.jsx(X.div,{id:n.id,...r,ref:t})});Kh.displayName=Pi;var Io="SelectItem",[Zh,Ai]=St(Io),Ii=p.forwardRef((e,t)=>{const{__scopeSelect:o,value:r,disabled:n=!1,textValue:a,...s}=e,i=Ze(Io,o),l=Je(Io,o),u=i.value===r,[f,c]=p.useState(a??""),[h,g]=p.useState(!1),b=ae(t,y=>{var k;return(k=l.itemRefCallback)==null?void 0:k.call(l,y,r,n)}),m=nt(),v=p.useRef("touch"),w=()=>{n||(i.onValueChange(r),i.onOpenChange(!1))};if(r==="")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 d.jsx(Zh,{scope:o,value:r,disabled:n,textId:m,isSelected:u,onItemTextChange:p.useCallback(y=>{c(k=>k||((y==null?void 0:y.textContent)??"").trim())},[]),children:d.jsx(_o.ItemSlot,{scope:o,value:r,disabled:n,textValue:f,children:d.jsx(X.div,{role:"option","aria-labelledby":m,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...s,ref:b,onFocus:K(s.onFocus,()=>g(!0)),onBlur:K(s.onBlur,()=>g(!1)),onClick:K(s.onClick,()=>{v.current!=="mouse"&&w()}),onPointerUp:K(s.onPointerUp,()=>{v.current==="mouse"&&w()}),onPointerDown:K(s.onPointerDown,y=>{v.current=y.pointerType}),onPointerMove:K(s.onPointerMove,y=>{var k;v.current=y.pointerType,n?(k=l.onItemLeave)==null||k.call(l):v.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:K(s.onPointerLeave,y=>{var k;y.currentTarget===document.activeElement&&((k=l.onItemLeave)==null||k.call(l))}),onKeyDown:K(s.onKeyDown,y=>{var E;((E=l.searchRef)==null?void 0:E.current)!==""&&y.key===" "||(zh.includes(y.key)&&w(),y.key===" "&&y.preventDefault())})})})})});Ii.displayName=Io;var Bt="SelectItemText",Mi=p.forwardRef((e,t)=>{const{__scopeSelect:o,className:r,style:n,...a}=e,s=Ze(Bt,o),i=Je(Bt,o),l=Ai(Bt,o),u=Bh(Bt,o),[f,c]=p.useState(null),h=ae(t,w=>c(w),l.onItemTextChange,w=>{var y;return(y=i.itemTextRefCallback)==null?void 0:y.call(i,w,l.value,l.disabled)}),g=f==null?void 0:f.textContent,b=p.useMemo(()=>d.jsx("option",{value:l.value,disabled:l.disabled,children:g},l.value),[l.disabled,l.value,g]),{onNativeOptionAdd:m,onNativeOptionRemove:v}=u;return ie(()=>(m(b),()=>v(b)),[m,v,b]),d.jsxs(d.Fragment,{children:[d.jsx(X.span,{id:l.textId,...a,ref:h}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Ut.createPortal(a.children,s.valueNode):null]})});Mi.displayName=Bt;var Oi="SelectItemIndicator",Li=p.forwardRef((e,t)=>{const{__scopeSelect:o,...r}=e;return Ai(Oi,o).isSelected?d.jsx(X.span,{"aria-hidden":!0,...r,ref:t}):null});Li.displayName=Oi;var Hr="SelectScrollUpButton",zi=p.forwardRef((e,t)=>{const o=Je(Hr,e.__scopeSelect),r=Fr(Hr,e.__scopeSelect),[n,a]=p.useState(!1),s=ae(t,r.onScrollButtonChange);return ie(()=>{if(o.viewport&&o.isPositioned){let i=function(){const u=l.scrollTop>0;a(u)};const l=o.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[o.viewport,o.isPositioned]),n?d.jsx($i,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=o;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});zi.displayName=Hr;var Vr="SelectScrollDownButton",Di=p.forwardRef((e,t)=>{const o=Je(Vr,e.__scopeSelect),r=Fr(Vr,e.__scopeSelect),[n,a]=p.useState(!1),s=ae(t,r.onScrollButtonChange);return ie(()=>{if(o.viewport&&o.isPositioned){let i=function(){const u=l.scrollHeight-l.clientHeight,f=Math.ceil(l.scrollTop)<u;a(f)};const l=o.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[o.viewport,o.isPositioned]),n?d.jsx($i,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=o;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});Di.displayName=Vr;var $i=p.forwardRef((e,t)=>{const{__scopeSelect:o,onAutoScroll:r,...n}=e,a=Je("SelectScrollButton",o),s=p.useRef(null),i=Po(o),l=p.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return p.useEffect(()=>()=>l(),[l]),ie(()=>{var f;const u=i().find(c=>c.ref.current===document.activeElement);(f=u==null?void 0:u.ref.current)==null||f.scrollIntoView({block:"nearest"})},[i]),d.jsx(X.div,{"aria-hidden":!0,...n,ref:t,style:{flexShrink:0,...n.style},onPointerDown:K(n.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:K(n.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:K(n.onPointerLeave,()=>{l()})})}),Jh="SelectSeparator",Qh=p.forwardRef((e,t)=>{const{__scopeSelect:o,...r}=e;return d.jsx(X.div,{"aria-hidden":!0,...r,ref:t})});Qh.displayName=Jh;var Wr="SelectArrow",eg=p.forwardRef((e,t)=>{const{__scopeSelect:o,...r}=e,n=Ao(o),a=Ze(Wr,o),s=Je(Wr,o);return a.open&&s.position==="popper"?d.jsx(Ps,{...n,...r,ref:t}):null});eg.displayName=Wr;var tg="SelectBubbleInput",Fi=p.forwardRef(({__scopeSelect:e,value:t,...o},r)=>{const n=p.useRef(null),a=ae(r,n),s=so(t);return p.useEffect(()=>{const i=n.current;if(!i)return;const l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&f){const c=new Event("change",{bubbles:!0});f.call(i,t),i.dispatchEvent(c)}},[s,t]),d.jsx(X.select,{...o,style:{...Qn,...o.style},ref:a,defaultValue:t})});Fi.displayName=tg;function Bi(e){return e===""||e===void 0}function Hi(e){const t=pe(e),o=p.useRef(""),r=p.useRef(0),n=p.useCallback(s=>{const i=o.current+s;t(i),(function l(u){o.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))})(i)},[t]),a=p.useCallback(()=>{o.current="",window.clearTimeout(r.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(r.current),[]),[o,n,a]}function Vi(e,t,o){const n=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=o?e.indexOf(o):-1;let s=og(e,Math.max(a,0));n.length===1&&(s=s.filter(u=>u!==o));const l=s.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return l!==o?l:void 0}function og(e,t){return e.map((o,r)=>e[(t+r)%e.length])}var rg=mi,ng=bi,ag=yi,sg=xi,ig=ki,lg=Si,cg=Ti,dg=Ii,ug=Mi,fg=Li,pg=zi,hg=Di,gg="Separator",Wi="horizontal",mg=["horizontal","vertical"],Ui=p.forwardRef((e,t)=>{const{decorative:o,orientation:r=Wi,...n}=e,a=vg(r)?r:Wi,i=o?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return d.jsx(X.div,{"data-orientation":a,...i,...n,ref:t})});Ui.displayName=gg;function vg(e){return mg.includes(e)}var bg=Ui,Mo="Switch",[wg]=me(Mo),[yg,xg]=wg(Mo),ji=p.forwardRef((e,t)=>{const{__scopeSwitch:o,name:r,checked:n,defaultChecked:a,required:s,disabled:i,value:l="on",onCheckedChange:u,form:f,...c}=e,[h,g]=p.useState(null),b=ae(t,k=>g(k)),m=p.useRef(!1),v=h?f||!!h.closest("form"):!0,[w,y]=He({prop:n,defaultProp:a??!1,onChange:u,caller:Mo});return d.jsxs(yg,{scope:o,checked:w,disabled:i,children:[d.jsx(X.button,{type:"button",role:"switch","aria-checked":w,"aria-required":s,"data-state":Yi(w),"data-disabled":i?"":void 0,disabled:i,value:l,...c,ref:b,onClick:K(e.onClick,k=>{y(E=>!E),v&&(m.current=k.isPropagationStopped(),m.current||k.stopPropagation())})}),v&&d.jsx(qi,{control:h,bubbles:!m.current,name:r,value:l,checked:w,required:s,disabled:i,form:f,style:{transform:"translateX(-100%)"}})]})});ji.displayName=Mo;var Ri="SwitchThumb",Gi=p.forwardRef((e,t)=>{const{__scopeSwitch:o,...r}=e,n=xg(Ri,o);return d.jsx(X.span,{"data-state":Yi(n.checked),"data-disabled":n.disabled?"":void 0,...r,ref:t})});Gi.displayName=Ri;var kg="SwitchBubbleInput",qi=p.forwardRef(({__scopeSwitch:e,control:t,checked:o,bubbles:r=!0,...n},a)=>{const s=p.useRef(null),i=ae(s,a),l=so(o),u=io(t);return p.useEffect(()=>{const f=s.current;if(!f)return;const c=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(c,"checked").set;if(l!==o&&g){const b=new Event("click",{bubbles:r});g.call(f,o),f.dispatchEvent(b)}},[l,o,r]),d.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o,...n,tabIndex:-1,ref:i,style:{...n.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});qi.displayName=kg;function Yi(e){return e?"checked":"unchecked"}var Sg=ji,Cg=Gi,Oo="Tabs",[Eg]=me(Oo,[xo]),Xi=xo(),[Ng,Ur]=Eg(Oo),Ki=p.forwardRef((e,t)=>{const{__scopeTabs:o,value:r,onValueChange:n,defaultValue:a,orientation:s="horizontal",dir:i,activationMode:l="automatic",...u}=e,f=zt(i),[c,h]=He({prop:r,onChange:n,defaultProp:a??"",caller:Oo});return d.jsx(Ng,{scope:o,baseId:nt(),value:c,onValueChange:h,orientation:s,dir:f,activationMode:l,children:d.jsx(X.div,{dir:f,"data-orientation":s,...u,ref:t})})});Ki.displayName=Oo;var Zi="TabsList",Ji=p.forwardRef((e,t)=>{const{__scopeTabs:o,loop:r=!0,...n}=e,a=Ur(Zi,o),s=Xi(o);return d.jsx(zs,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:r,children:d.jsx(X.div,{role:"tablist","aria-orientation":a.orientation,...n,ref:t})})});Ji.displayName=Zi;var Qi="TabsTrigger",el=p.forwardRef((e,t)=>{const{__scopeTabs:o,value:r,disabled:n=!1,...a}=e,s=Ur(Qi,o),i=Xi(o),l=rl(s.baseId,r),u=nl(s.baseId,r),f=r===s.value;return d.jsx(Ds,{asChild:!0,...i,focusable:!n,active:f,children:d.jsx(X.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":u,"data-state":f?"active":"inactive","data-disabled":n?"":void 0,disabled:n,id:l,...a,ref:t,onMouseDown:K(e.onMouseDown,c=>{!n&&c.button===0&&c.ctrlKey===!1?s.onValueChange(r):c.preventDefault()}),onKeyDown:K(e.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&s.onValueChange(r)}),onFocus:K(e.onFocus,()=>{const c=s.activationMode!=="manual";!f&&!n&&c&&s.onValueChange(r)})})})});el.displayName=Qi;var tl="TabsContent",ol=p.forwardRef((e,t)=>{const{__scopeTabs:o,value:r,forceMount:n,children:a,...s}=e,i=Ur(tl,o),l=rl(i.baseId,r),u=nl(i.baseId,r),f=r===i.value,c=p.useRef(f);return p.useEffect(()=>{const h=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(h)},[]),d.jsx(Ee,{present:n||f,children:({present:h})=>d.jsx(X.div,{"data-state":f?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!h,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:c.current?"0s":void 0},children:h&&a})})});ol.displayName=tl;function rl(e,t){return`${e}-trigger-${t}`}function nl(e,t){return`${e}-content-${t}`}var Tg=Ki,_g=Ji,Pg=el,Ag=ol,[Lo]=me("Tooltip",[yo]),zo=yo(),al="TooltipProvider",Ig=700,jr="tooltip.open",[Mg,Rr]=Lo(al),sl=e=>{const{__scopeTooltip:t,delayDuration:o=Ig,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:a}=e,s=p.useRef(!0),i=p.useRef(!1),l=p.useRef(0);return p.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),d.jsx(Mg,{scope:t,isOpenDelayedRef:s,delayDuration:o,onOpen:p.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:p.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:i,onPointerInTransitChange:p.useCallback(u=>{i.current=u},[]),disableHoverableContent:n,children:a})};sl.displayName=al;var Ht="Tooltip",[Og,Vt]=Lo(Ht),il=e=>{const{__scopeTooltip:t,children:o,open:r,defaultOpen:n,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,l=Rr(Ht,e.__scopeTooltip),u=zo(t),[f,c]=p.useState(null),h=nt(),g=p.useRef(0),b=s??l.disableHoverableContent,m=i??l.delayDuration,v=p.useRef(!1),[w,y]=He({prop:r,defaultProp:n??!1,onChange:T=>{T?(l.onOpen(),document.dispatchEvent(new CustomEvent(jr))):l.onClose(),a==null||a(T)},caller:Ht}),k=p.useMemo(()=>w?v.current?"delayed-open":"instant-open":"closed",[w]),E=p.useCallback(()=>{window.clearTimeout(g.current),g.current=0,v.current=!1,y(!0)},[y]),_=p.useCallback(()=>{window.clearTimeout(g.current),g.current=0,y(!1)},[y]),P=p.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{v.current=!0,y(!0),g.current=0},m)},[m,y]);return p.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),d.jsx(Ns,{...u,children:d.jsx(Og,{scope:t,contentId:h,open:w,stateAttribute:k,trigger:f,onTriggerChange:c,onTriggerEnter:p.useCallback(()=>{l.isOpenDelayedRef.current?P():E()},[l.isOpenDelayedRef,P,E]),onTriggerLeave:p.useCallback(()=>{b?_():(window.clearTimeout(g.current),g.current=0)},[_,b]),onOpen:E,onClose:_,disableHoverableContent:b,children:o})})};il.displayName=Ht;var Gr="TooltipTrigger",ll=p.forwardRef((e,t)=>{const{__scopeTooltip:o,...r}=e,n=Vt(Gr,o),a=Rr(Gr,o),s=zo(o),i=p.useRef(null),l=ae(t,i,n.onTriggerChange),u=p.useRef(!1),f=p.useRef(!1),c=p.useCallback(()=>u.current=!1,[]);return p.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),d.jsx(Ts,{asChild:!0,...s,children:d.jsx(X.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:l,onPointerMove:K(e.onPointerMove,h=>{h.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(n.onTriggerEnter(),f.current=!0)}),onPointerLeave:K(e.onPointerLeave,()=>{n.onTriggerLeave(),f.current=!1}),onPointerDown:K(e.onPointerDown,()=>{n.open&&n.onClose(),u.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:K(e.onFocus,()=>{u.current||n.onOpen()}),onBlur:K(e.onBlur,n.onClose),onClick:K(e.onClick,n.onClose)})})});ll.displayName=Gr;var qr="TooltipPortal",[Lg,zg]=Lo(qr,{forceMount:void 0}),cl=e=>{const{__scopeTooltip:t,forceMount:o,children:r,container:n}=e,a=Vt(qr,t);return d.jsx(Lg,{scope:t,forceMount:o,children:d.jsx(Ee,{present:o||a.open,children:d.jsx(rr,{asChild:!0,container:n,children:r})})})};cl.displayName=qr;var Ct="TooltipContent",dl=p.forwardRef((e,t)=>{const o=zg(Ct,e.__scopeTooltip),{forceMount:r=o.forceMount,side:n="top",...a}=e,s=Vt(Ct,e.__scopeTooltip);return d.jsx(Ee,{present:r||s.open,children:s.disableHoverableContent?d.jsx(ul,{side:n,...a,ref:t}):d.jsx(Dg,{side:n,...a,ref:t})})}),Dg=p.forwardRef((e,t)=>{const o=Vt(Ct,e.__scopeTooltip),r=Rr(Ct,e.__scopeTooltip),n=p.useRef(null),a=ae(t,n),[s,i]=p.useState(null),{trigger:l,onClose:u}=o,f=n.current,{onPointerInTransitChange:c}=r,h=p.useCallback(()=>{i(null),c(!1)},[c]),g=p.useCallback((b,m)=>{const v=b.currentTarget,w={x:b.clientX,y:b.clientY},y=Hg(w,v.getBoundingClientRect()),k=Vg(w,y),E=Wg(m.getBoundingClientRect()),_=jg([...k,...E]);i(_),c(!0)},[c]);return p.useEffect(()=>()=>h(),[h]),p.useEffect(()=>{if(l&&f){const b=v=>g(v,f),m=v=>g(v,l);return l.addEventListener("pointerleave",b),f.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",b),f.removeEventListener("pointerleave",m)}}},[l,f,g,h]),p.useEffect(()=>{if(s){const b=m=>{const v=m.target,w={x:m.clientX,y:m.clientY},y=(l==null?void 0:l.contains(v))||(f==null?void 0:f.contains(v)),k=!Ug(w,s);y?h():k&&(h(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[l,f,s,u,h]),d.jsx(ul,{...e,ref:a})}),[$g,Fg]=Lo(Ht,{isInside:!1}),Bg=Ud("TooltipContent"),ul=p.forwardRef((e,t)=>{const{__scopeTooltip:o,children:r,"aria-label":n,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,l=Vt(Ct,o),u=zo(o),{onClose:f}=l;return p.useEffect(()=>(document.addEventListener(jr,f),()=>document.removeEventListener(jr,f)),[f]),p.useEffect(()=>{if(l.trigger){const c=h=>{const g=h.target;g!=null&&g.contains(l.trigger)&&f()};return window.addEventListener("scroll",c,{capture:!0}),()=>window.removeEventListener("scroll",c,{capture:!0})}},[l.trigger,f]),d.jsx(er,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:c=>c.preventDefault(),onDismiss:f,children:d.jsxs(_s,{"data-state":l.stateAttribute,...u,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[d.jsx(Bg,{children:r}),d.jsx($g,{scope:o,isInside:!0,children:d.jsx(Kd,{id:l.contentId,role:"tooltip",children:n||r})})]})})});dl.displayName=Ct;var fl="TooltipArrow",pl=p.forwardRef((e,t)=>{const{__scopeTooltip:o,...r}=e,n=zo(o);return Fg(fl,o).isInside?null:d.jsx(Ps,{...n,...r,ref:t})});pl.displayName=fl;function Hg(e,t){const o=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),n=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(o,r,n,a)){case a:return"left";case n:return"right";case o:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Vg(e,t,o=5){const r=[];switch(t){case"top":r.push({x:e.x-o,y:e.y+o},{x:e.x+o,y:e.y+o});break;case"bottom":r.push({x:e.x-o,y:e.y-o},{x:e.x+o,y:e.y-o});break;case"left":r.push({x:e.x+o,y:e.y-o},{x:e.x+o,y:e.y+o});break;case"right":r.push({x:e.x-o,y:e.y-o},{x:e.x-o,y:e.y+o});break}return r}function Wg(e){const{top:t,right:o,bottom:r,left:n}=e;return[{x:n,y:t},{x:o,y:t},{x:o,y:r},{x:n,y:r}]}function Ug(e,t){const{x:o,y:r}=e;let n=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],l=t[s],u=i.x,f=i.y,c=l.x,h=l.y;f>r!=h>r&&o<(c-u)*(r-f)/(h-f)+u&&(n=!n)}return n}function jg(e){const t=e.slice();return t.sort((o,r)=>o.x<r.x?-1:o.x>r.x?1:o.y<r.y?-1:o.y>r.y?1:0),Rg(t)}function Rg(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const n=e[r];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(n.y-s.y)>=(a.y-s.y)*(n.x-s.x))t.pop();else break}t.push(n)}t.pop();const o=[];for(let r=e.length-1;r>=0;r--){const n=e[r];for(;o.length>=2;){const a=o[o.length-1],s=o[o.length-2];if((a.x-s.x)*(n.y-s.y)>=(a.y-s.y)*(n.x-s.x))o.pop();else break}o.push(n)}return o.pop(),t.length===1&&o.length===1&&t[0].x===o[0].x&&t[0].y===o[0].y?t:t.concat(o)}var Gg=sl,qg=il,Yg=ll,Xg=cl,Kg=dl,Zg=pl;const Jg=Kt("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function hl({className:e,variant:t="default",size:o="default",asChild:r=!1,...n}){const a=r?Zn:"button";return d.jsx(a,{"data-slot":"button","data-variant":t,"data-size":o,className:Y(Jg({variant:t,size:o,className:e})),...n})}const Qg={amber:"bg-amber-100 text-amber-800",blue:"bg-blue-100 text-blue-800",emerald:"bg-emerald-100 text-emerald-800",red:"bg-red-100 text-red-800",purple:"bg-purple-100 text-purple-800",pink:"bg-pink-100 text-pink-800",gray:"bg-gray-100 text-gray-800"},em=Kt("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function tm({className:e,variant:t="default",hue:o,asChild:r=!1,...n}){const a=r?Zn:"span",s=o?Qg[o]:void 0;return d.jsx(a,{"data-slot":"badge","data-variant":t,className:Y(em({variant:t}),s,e),...n})}function om({className:e,type:t,...o}){return d.jsx("input",{type:t,"data-slot":"input",className:Y("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",e),...o})}function rm({className:e,...t}){return d.jsx("textarea",{"data-slot":"textarea",className:Y("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",e),...t})}function nm({...e}){return d.jsx(rg,{"data-slot":"select",...e})}function am({...e}){return d.jsx(ag,{"data-slot":"select-value",...e})}function sm({className:e,size:t="default",children:o,...r}){return d.jsxs(ng,{"data-slot":"select-trigger","data-size":t,className:Y("flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",e),...r,children:[o,d.jsx(sg,{asChild:!0,children:d.jsx(bn,{className:"size-4 opacity-50"})})]})}function im({className:e,children:t,position:o="item-aligned",align:r="center",...n}){return d.jsx(ig,{children:d.jsxs(lg,{"data-slot":"select-content",className:Y("relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",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,align:r,...n,children:[d.jsx(cm,{}),d.jsx(cg,{className:Y("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),d.jsx(dm,{})]})})}function lm({className:e,children:t,...o}){return d.jsxs(dg,{"data-slot":"select-item",className:Y("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...o,children:[d.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(fg,{children:d.jsx(vn,{className:"size-4"})})}),d.jsx(ug,{children:t})]})}function cm({className:e,...t}){return d.jsx(pg,{"data-slot":"select-scroll-up-button",className:Y("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(Dc,{className:"size-4"})})}function dm({className:e,...t}){return d.jsx(hg,{"data-slot":"select-scroll-down-button",className:Y("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(bn,{className:"size-4"})})}function um({className:e,...t}){return d.jsx(Wa,{"data-slot":"checkbox",className:Y("peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs transition-shadow outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary",e),...t,children:d.jsx(ja,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none",children:d.jsx(vn,{className:"size-3.5"})})})}function fm({className:e,size:t="default",...o}){return d.jsx(Sg,{"data-slot":"switch","data-size":t,className:Y("peer group/switch inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80",e),...o,children:d.jsx(Cg,{"data-slot":"switch-thumb",className:Y("pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground")})})}function pm({className:e,...t}){return d.jsx(Qp,{"data-slot":"label",className:Y("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function hm({className:e,...t}){return d.jsx(vh,{"data-slot":"radio-group",className:Y("grid gap-3",e),...t})}function gm({className:e,...t}){return d.jsx(bh,{"data-slot":"radio-group-item",className:Y("aspect-square size-4 shrink-0 rounded-full border border-input text-primary shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:ring-destructive/40",e),...t,children:d.jsx(wh,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:d.jsx(Fc,{className:"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 fill-primary"})})})}function mm({className:e,orientation:t="horizontal",decorative:o=!0,...r}){return d.jsx(bg,{"data-slot":"separator",decorative:o,orientation:t,className:Y("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...r})}function vm({className:e,orientation:t="horizontal",...o}){return d.jsx(Tg,{"data-slot":"tabs","data-orientation":t,orientation:t,className:Y("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",e),...o})}const bm=Kt("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function wm({className:e,variant:t="default",...o}){return d.jsx(_g,{"data-slot":"tabs-list","data-variant":t,className:Y(bm({variant:t}),e),...o})}function ym({className:e,...t}){return d.jsx(Pg,{"data-slot":"tabs-trigger",className:Y("cursor-pointer relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent","data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100",e),...t})}function xm({className:e,...t}){return d.jsx(Ag,{"data-slot":"tabs-content",className:Y("flex-1 outline-none",e),...t})}function km({className:e,children:t,...o}){return d.jsxs(Ih,{"data-slot":"scroll-area",className:Y("relative",e),...o,children:[d.jsx(Mh,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",children:t}),d.jsx(Sm,{}),d.jsx(Oh,{})]})}function Sm({className:e,orientation:t="vertical",...o}){return d.jsx(si,{"data-slot":"scroll-area-scrollbar",orientation:t,className:Y("flex touch-none p-px transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...o,children:d.jsx(di,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}function Yr({className:e,size:t="default",...o}){return d.jsx(Sf,{"data-slot":"avatar","data-size":t,className:Y("group/avatar relative flex size-8 shrink-0 overflow-hidden rounded-full select-none data-[size=lg]:size-10 data-[size=sm]:size-6",e),...o})}function Xr({className:e,...t}){return d.jsx(Cf,{"data-slot":"avatar-image",className:Y("aspect-square size-full",e),...t})}function Kr({className:e,...t}){return d.jsx(Ef,{"data-slot":"avatar-fallback",className:Y("flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",e),...t})}function Cm({className:e,...t}){return d.jsx("div",{"data-slot":"skeleton",className:Y("animate-pulse rounded-md bg-accent",e),...t})}function Em({delayDuration:e=0,...t}){return d.jsx(Gg,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function Nm({...e}){return d.jsx(qg,{"data-slot":"tooltip",...e})}function Tm({...e}){return d.jsx(Yg,{"data-slot":"tooltip-trigger",...e})}function _m({className:e,sideOffset:t=0,children:o,...r}){return d.jsx(Xg,{children:d.jsxs(Kg,{"data-slot":"tooltip-content",sideOffset:t,className:Y("z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-foreground px-3 py-1.5 text-xs text-balance text-background fade-in-0 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",e),...r,children:[o,d.jsx(Zg,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]})})}function Pm({className:e,value:t,...o}){return d.jsx(sh,{"data-slot":"progress",className:Y("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...o,children:d.jsx(ih,{"data-slot":"progress-indicator",className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})})}const Am=Kt("relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current"}},defaultVariants:{variant:"default"}});function Im({className:e,variant:t,...o}){return d.jsx("div",{"data-slot":"alert",role:"alert",className:Y(Am({variant:t}),e),...o})}function Mm({className:e,...t}){return d.jsx("div",{"data-slot":"alert-title",className:Y("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),...t})}function Om({className:e,...t}){return d.jsx("div",{"data-slot":"alert-description",className:Y("col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed",e),...t})}function Lm({...e}){return d.jsx(cu,{"data-slot":"collapsible",...e})}function zm({...e}){return d.jsx(na,{"data-slot":"collapsible-trigger",...e})}function Dm({...e}){return d.jsx(aa,{"data-slot":"collapsible-content",...e})}const Et=e=>e==null?void 0:e===!0||e==="true",gl={"arrow-left":Ic,calendar:Lc,"check-circle-2":yn,"chevron-left":zc,"chevron-right":Wo,clock:Bc,"credit-card":Vc,"external-link":Wc,"help-circle":xn,info:Gt,"loader-2":Uo,mail:jo,"map-pin":jc,"message-circle":kn,"message-square":Ro,package:Gc,phone:qc,search:Yc,"shopping-bag":Xc,sparkles:Sn,truck:Zc,user:Cn,"x-circle":$c,"alert-circle":wn,"book-open":Mc},ml={0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8",10:"gap-10",12:"gap-12"},vl={default:"text-foreground",muted:"text-muted-foreground",destructive:"text-destructive"},bl=e=>typeof e=="number"?ml[String(e)]??"gap-2":typeof e=="string"?ml[e.trim()]??"gap-2":"gap-2",$m=({children:e,className:t,onClick:o})=>d.jsx(Mt,{className:t,onClick:o,children:e}),Fm=({children:e,className:t})=>d.jsx(Ot,{className:t,children:e}),Bm=({children:e,className:t})=>d.jsx(Vd,{className:t,children:e}),Hm=({children:e,className:t,onClick:o,variant:r,size:n,disabled:a,title:s})=>d.jsx(hl,{className:t,variant:r,size:n,onClick:o,disabled:Et(a),title:s,children:e}),Vm=({children:e,className:t,variant:o,hue:r,tone:n})=>d.jsx(tm,{className:Y(vl[n]??"",t),variant:o,hue:r,children:e}),Wm=({className:e,onChange:t,...o})=>d.jsx(om,{className:e,onChange:t,...o}),Um=({className:e,onChange:t,...o})=>d.jsx(rm,{className:e,onChange:t,...o}),jm=({children:e,className:t,value:o,defaultValue:r,onChange:n,placeholder:a,disabled:s})=>d.jsxs(nm,{value:o,defaultValue:r,onValueChange:i=>{const l=n;l==null||l({target:{value:i}})},disabled:Et(s),children:[d.jsx(sm,{className:t,children:d.jsx(am,{placeholder:a})}),d.jsx(im,{style:{zIndex:"calc(var(--widget-z, 1000) + 1)"},children:e})]}),Rm=({children:e,value:t,disabled:o,className:r})=>d.jsx(lm,{value:t,disabled:Et(o),className:r,children:e}),Gm=({checked:e,onChange:t,disabled:o,className:r,id:n})=>{const a=e!==void 0,s=t;return d.jsx(um,{...a?{checked:e==="true"||e===!0}:{},onCheckedChange:i=>s==null?void 0:s({target:{value:String(i)}}),disabled:Et(o),className:r,id:n})},qm=({checked:e,onChange:t,disabled:o,size:r,className:n,id:a})=>{const s=e!==void 0,i=t;return d.jsx(fm,{...s?{checked:e==="true"||e===!0}:{},onCheckedChange:l=>i==null?void 0:i({target:{value:String(l)}}),disabled:Et(o),size:r,className:n,id:a})},Ym=({children:e,htmlFor:t,className:o})=>d.jsx(pm,{htmlFor:t,className:o,children:e}),Xm=({children:e,value:t,defaultValue:o,onChange:r,className:n})=>d.jsx(hm,{value:t,defaultValue:o,onValueChange:a=>{const s=r;s==null||s({target:{value:a}})},className:n,children:e}),Km=({value:e,disabled:t,className:o,id:r})=>d.jsx(gm,{value:e,disabled:Et(t),className:o,id:r}),Zm=({className:e})=>d.jsx(mm,{className:e}),Jm=({children:e,defaultValue:t,className:o})=>{const[r,n]=x.useState(t);return d.jsx(vm,{value:r,onValueChange:n,className:o,children:e})},Qm=({children:e,className:t})=>d.jsx(wm,{className:t,children:e}),ev=({children:e,value:t,className:o})=>d.jsx(ym,{className:o,value:t,children:e}),tv=({children:e,value:t,className:o})=>d.jsx(xm,{className:o,value:t,children:e}),ov=({children:e,className:t})=>d.jsx(km,{className:t,children:e}),rv=({src:e,alt:t,className:o})=>{var r;return d.jsxs(Yr,{className:o,children:[d.jsx(Xr,{src:e,alt:t}),d.jsx(Kr,{children:((r=t==null?void 0:t.charAt(0))==null?void 0:r.toUpperCase())||"?"})]})},nv=({width:e,height:t,className:o})=>d.jsx(Cm,{className:o,style:{width:e,height:t}}),av=({children:e,content:t,className:o})=>d.jsx(Em,{children:d.jsxs(Nm,{children:[d.jsx(Tm,{asChild:!0,children:d.jsx("span",{className:o,children:e})}),d.jsx(_m,{children:d.jsx("p",{children:String(t)})})]})}),sv=({value:e,className:t})=>d.jsx(Pm,{value:typeof e=="string"?Number(e):e,className:t}),iv={default:Gt,destructive:wn},lv=({children:e,variant:t,title:o,className:r})=>{const n=t,a=iv[n||"default"]||Gt;return d.jsxs(Im,{variant:n,className:r,children:[d.jsx(a,{className:"size-4"}),o?d.jsx(Mm,{children:String(o)}):null,e?d.jsx(Om,{children:e}):null]})},cv=({children:e,defaultOpen:t,className:o})=>d.jsx(Lm,{defaultOpen:t==="true"||t===!0,className:o,children:e}),dv=({children:e,className:t})=>d.jsxs(zm,{className:Y("flex items-center gap-1 cursor-pointer text-sm font-medium [&[data-state=open]>svg]:rotate-90",t),children:[d.jsx(Wo,{className:"size-4 shrink-0 transition-transform duration-200"}),e]}),uv=({children:e,className:t})=>d.jsx(Dm,{className:t,children:e}),fv=({children:e,className:t,tone:o})=>d.jsx("p",{className:Y("text-sm",vl[o]??"",t),children:e}),pv=({children:e,className:t,level:o})=>{const r=`h${o||"2"}`;return d.jsx(r,{className:Y("font-semibold tracking-tight",t),children:e})},hv=({children:e,className:t,direction:o,gap:r})=>{const n=o==="row"?"flex-row":"flex-col",a=bl(r);return d.jsx("div",{className:Y("flex",n,a,t),children:e})},gv=({children:e,className:t,gap:o})=>{const r=bl(o);return d.jsx("div",{className:Y("flex flex-row items-center",r,t),children:e})},mv=({children:e,className:t,href:o,target:r,rel:n})=>d.jsx("a",{href:o,target:r,rel:n,className:t,children:e}),vv=({title:e,children:t,className:o})=>d.jsxs(Mt,{className:Y("overflow-hidden p-0 gap-0 shadow-sm",o),children:[e?d.jsx(Ot,{className:"px-6 py-3",children:d.jsx("h3",{className:"text-xs font-semibold tracking-wider text-muted-foreground",children:String(e)})}):null,d.jsx("div",{className:"flex flex-col gap-0 divide-y divide-border",children:t})]}),bv=({icon:e,label:t,description:o,onClick:r,className:n})=>{const a=e,s="size-5",i=a?gl[a]:null;return d.jsxs("button",{type:"button",className:Y("w-full h-auto px-6 py-6 flex items-center gap-2 justify-start cursor-pointer text-left rounded-none transition-colors hover:bg-accent/70",n),onClick:r,children:[i&&d.jsx(i,{className:`${s} shrink-0 text-muted-foreground`}),d.jsxs("div",{className:"flex flex-col gap-0 flex-1 min-w-0 items-start",children:[t?d.jsx("p",{className:"font-medium text-sm text-foreground",children:String(t)}):null,o?d.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:String(o)}):null]}),d.jsx(Wo,{className:"mr-1 size-4 shrink-0 text-muted-foreground"})]})},wv=({name:e,size:t,className:o})=>{const n={sm:"size-3",md:"size-5",lg:"size-6"}[t]??"size-4",a=e,s=gl[a],i=a==="sparkles"?"sparkle-icon":"";return s?d.jsx(s,{className:Y(n,i,o)}):d.jsx("span",{className:Y("inline-block",n,i,o),"data-icon":a})},yv=()=>({"ui-card":$m,"ui-card-content":Fm,"ui-card-header":Bm,"ui-button":Hm,"ui-text":fv,"ui-heading":pv,"ui-badge":Vm,"ui-input":Wm,"ui-textarea":Um,"ui-select":jm,"ui-select-option":Rm,"ui-checkbox":Gm,"ui-switch":qm,"ui-label":Ym,"ui-radio-group":Xm,"ui-radio-group-item":Km,"ui-stack":hv,"ui-inline":gv,"ui-separator":Zm,"ui-tabs":Jm,"ui-tabs-list":Qm,"ui-tabs-trigger":ev,"ui-tabs-content":tv,"ui-scroll-area":ov,"ui-avatar":rv,"ui-icon":wv,"ui-link":mv,"ui-menu-item":bv,"ui-menu":vv,"ui-skeleton":nv,"ui-tooltip":av,"ui-progress":sv,"ui-alert":lv,"ui-collapsible":cv,"ui-collapsible-trigger":dv,"ui-collapsible-content":uv}),wl="/api/ecommerce",yl=async(e,t)=>{const o=t?`${t.replace(/\/$/,"")}${wl}`:wl,r=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),n=await r.json();if(!r.ok)throw new Error(n.error||"API request failed");return n.data},xv=({className:e})=>d.jsxs("svg",{width:"100%",height:"100%",viewBox:"0 0 190 190",version:"1.1",className:e,children:[d.jsx("g",{transform:"matrix(1,0,0,1,-160.365,27.97)",children:d.jsx("path",{d:"M344.73,67.03C344.73,30.01 314.72,0 277.7,0C240.68,0 210.67,30.01 210.67,67.03L255.36,67.03C255.36,54.69 265.36,44.69 277.7,44.69C290.04,44.69 300.05,54.69 300.05,67.03L344.73,67.03Z",fill:"rgb(15,13,25)"})}),d.jsx("g",{transform:"matrix(1,0,0,1,-160.365,27.97)",children:d.jsx("path",{d:"M300.04,67.03C300.04,54.69 290.05,44.69 277.7,44.69C265.35,44.69 255.36,54.69 255.36,67.03L300.04,67.03Z",fill:"rgb(232,218,234)"})}),d.jsx("g",{transform:"matrix(1,0,0,1,-160.365,27.97)",children:d.jsx("path",{d:"M166,67.03C166,104.05 196.01,134.06 233.03,134.06C270.05,134.06 300.06,104.05 300.06,67.03L255.37,67.03C255.37,79.37 245.37,89.37 233.03,89.37C220.69,89.37 210.69,79.37 210.69,67.03L166,67.03Z",fill:"rgb(15,13,25)"})}),d.jsx("g",{transform:"matrix(1,0,0,1,-160.365,27.97)",children:d.jsx("path",{d:"M210.68,67.03C210.68,79.37 220.68,89.37 233.03,89.37C245.38,89.37 255.37,79.37 255.37,67.03L210.68,67.03Z",fill:"rgb(252,248,161)"})})]}),xl="stackable-dev-badge-styles",kv=()=>{if(typeof document>"u"||document.getElementById(xl))return;const e=document.createElement("style");e.id=xl,e.textContent=`
290
+ Defaulting to \`null\`.`}var lh=Fs,ch=Hs,Or="Radio",[dh,js]=me(Or),[uh,fh]=dh(Or),Rs=p.forwardRef((e,t)=>{const{__scopeRadio:o,name:r,checked:n=!1,required:a,disabled:s,value:i="on",onCheck:l,form:u,...f}=e,[c,h]=p.useState(null),g=ae(t,v=>h(v)),b=p.useRef(!1),m=c?u||!!c.closest("form"):!0;return d.jsxs(uh,{scope:o,checked:n,disabled:s,children:[d.jsx(K.button,{type:"button",role:"radio","aria-checked":n,"data-state":Xs(n),"data-disabled":s?"":void 0,disabled:s,value:i,...f,ref:g,onClick:Z(e.onClick,v=>{n||l==null||l(),m&&(b.current=v.isPropagationStopped(),b.current||v.stopPropagation())})}),m&&d.jsx(Ys,{control:c,bubbles:!b.current,name:r,value:i,checked:n,required:a,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});Rs.displayName=Or;var Gs="RadioIndicator",qs=p.forwardRef((e,t)=>{const{__scopeRadio:o,forceMount:r,...n}=e,a=fh(Gs,o);return d.jsx(Ee,{present:r||a.checked,children:d.jsx(K.span,{"data-state":Xs(a.checked),"data-disabled":a.disabled?"":void 0,...n,ref:t})})});qs.displayName=Gs;var ph="RadioBubbleInput",Ys=p.forwardRef(({__scopeRadio:e,control:t,checked:o,bubbles:r=!0,...n},a)=>{const s=p.useRef(null),i=ae(s,a),l=so(o),u=io(t);return p.useEffect(()=>{const f=s.current;if(!f)return;const c=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(c,"checked").set;if(l!==o&&g){const b=new Event("click",{bubbles:r});g.call(f,o),f.dispatchEvent(b)}},[l,o,r]),d.jsx(K.input,{type:"radio","aria-hidden":!0,defaultChecked:o,...n,tabIndex:-1,ref:i,style:{...n.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ys.displayName=ph;function Xs(e){return e?"checked":"unchecked"}var hh=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],So="RadioGroup",[gh]=me(So,[xo,js]),Ks=xo(),Zs=js(),[mh,vh]=gh(So),Js=p.forwardRef((e,t)=>{const{__scopeRadioGroup:o,name:r,defaultValue:n,value:a,required:s=!1,disabled:i=!1,orientation:l,dir:u,loop:f=!0,onValueChange:c,...h}=e,g=Ks(o),b=zt(u),[m,v]=He({prop:a,defaultProp:n??null,onChange:c,caller:So});return d.jsx(mh,{scope:o,name:r,required:s,disabled:i,value:m,onValueChange:v,children:d.jsx(zs,{asChild:!0,...g,orientation:l,dir:b,loop:f,children:d.jsx(K.div,{role:"radiogroup","aria-required":s,"aria-orientation":l,"data-disabled":i?"":void 0,dir:b,...h,ref:t})})})});Js.displayName=So;var Qs="RadioGroupItem",ei=p.forwardRef((e,t)=>{const{__scopeRadioGroup:o,disabled:r,...n}=e,a=vh(Qs,o),s=a.disabled||r,i=Ks(o),l=Zs(o),u=p.useRef(null),f=ae(t,u),c=a.value===n.value,h=p.useRef(!1);return p.useEffect(()=>{const g=m=>{hh.includes(m.key)&&(h.current=!0)},b=()=>h.current=!1;return document.addEventListener("keydown",g),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",g),document.removeEventListener("keyup",b)}},[]),d.jsx(Ds,{asChild:!0,...i,focusable:!s,active:c,children:d.jsx(Rs,{disabled:s,required:a.required,checked:c,...l,...n,name:a.name,ref:f,onCheck:()=>a.onValueChange(n.value),onKeyDown:Z(g=>{g.key==="Enter"&&g.preventDefault()}),onFocus:Z(n.onFocus,()=>{var g;h.current&&((g=u.current)==null||g.click())})})})});ei.displayName=Qs;var bh="RadioGroupIndicator",ti=p.forwardRef((e,t)=>{const{__scopeRadioGroup:o,...r}=e,n=Zs(o);return d.jsx(qs,{...n,...r,ref:t})});ti.displayName=bh;var wh=Js,yh=ei,xh=ti;function kh(e,t){return p.useReducer((o,r)=>t[o][r]??o,e)}var Lr="ScrollArea",[oi]=me(Lr),[Sh,Se]=oi(Lr),ri=p.forwardRef((e,t)=>{const{__scopeScrollArea:o,type:r="hover",dir:n,scrollHideDelay:a=600,...s}=e,[i,l]=p.useState(null),[u,f]=p.useState(null),[c,h]=p.useState(null),[g,b]=p.useState(null),[m,v]=p.useState(null),[w,y]=p.useState(0),[k,C]=p.useState(0),[T,P]=p.useState(!1),[_,E]=p.useState(!1),I=ae(t,F=>l(F)),L=zt(n);return d.jsx(Sh,{scope:o,type:r,dir:L,scrollHideDelay:a,scrollArea:i,viewport:u,onViewportChange:f,content:c,onContentChange:h,scrollbarX:g,onScrollbarXChange:b,scrollbarXEnabled:T,onScrollbarXEnabledChange:P,scrollbarY:m,onScrollbarYChange:v,scrollbarYEnabled:_,onScrollbarYEnabledChange:E,onCornerWidthChange:y,onCornerHeightChange:C,children:d.jsx(K.div,{dir:L,...s,ref:I,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":k+"px",...e.style}})})});ri.displayName=Lr;var ni="ScrollAreaViewport",ai=p.forwardRef((e,t)=>{const{__scopeScrollArea:o,children:r,nonce:n,...a}=e,s=Se(ni,o),i=p.useRef(null),l=ae(t,i,s.onViewportChange);return d.jsxs(d.Fragment,{children:[d.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:n}),d.jsx(K.div,{"data-radix-scroll-area-viewport":"",...a,ref:l,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:d.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});ai.displayName=ni;var $e="ScrollAreaScrollbar",si=p.forwardRef((e,t)=>{const{forceMount:o,...r}=e,n=Se($e,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:s}=n,i=e.orientation==="horizontal";return p.useEffect(()=>(i?a(!0):s(!0),()=>{i?a(!1):s(!1)}),[i,a,s]),n.type==="hover"?d.jsx(Ch,{...r,ref:t,forceMount:o}):n.type==="scroll"?d.jsx(Eh,{...r,ref:t,forceMount:o}):n.type==="auto"?d.jsx(ii,{...r,ref:t,forceMount:o}):n.type==="always"?d.jsx(zr,{...r,ref:t}):null});si.displayName=$e;var Ch=p.forwardRef((e,t)=>{const{forceMount:o,...r}=e,n=Se($e,e.__scopeScrollArea),[a,s]=p.useState(!1);return p.useEffect(()=>{const i=n.scrollArea;let l=0;if(i){const u=()=>{window.clearTimeout(l),s(!0)},f=()=>{l=window.setTimeout(()=>s(!1),n.scrollHideDelay)};return i.addEventListener("pointerenter",u),i.addEventListener("pointerleave",f),()=>{window.clearTimeout(l),i.removeEventListener("pointerenter",u),i.removeEventListener("pointerleave",f)}}},[n.scrollArea,n.scrollHideDelay]),d.jsx(Ee,{present:o||a,children:d.jsx(ii,{"data-state":a?"visible":"hidden",...r,ref:t})})}),Eh=p.forwardRef((e,t)=>{const{forceMount:o,...r}=e,n=Se($e,e.__scopeScrollArea),a=e.orientation==="horizontal",s=To(()=>l("SCROLL_END"),100),[i,l]=kh("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 p.useEffect(()=>{if(i==="idle"){const u=window.setTimeout(()=>l("HIDE"),n.scrollHideDelay);return()=>window.clearTimeout(u)}},[i,n.scrollHideDelay,l]),p.useEffect(()=>{const u=n.viewport,f=a?"scrollLeft":"scrollTop";if(u){let c=u[f];const h=()=>{const g=u[f];c!==g&&(l("SCROLL"),s()),c=g};return u.addEventListener("scroll",h),()=>u.removeEventListener("scroll",h)}},[n.viewport,a,l,s]),d.jsx(Ee,{present:o||i!=="hidden",children:d.jsx(zr,{"data-state":i==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Z(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:Z(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),ii=p.forwardRef((e,t)=>{const o=Se($e,e.__scopeScrollArea),{forceMount:r,...n}=e,[a,s]=p.useState(!1),i=e.orientation==="horizontal",l=To(()=>{if(o.viewport){const u=o.viewport.offsetWidth<o.viewport.scrollWidth,f=o.viewport.offsetHeight<o.viewport.scrollHeight;s(i?u:f)}},10);return kt(o.viewport,l),kt(o.content,l),d.jsx(Ee,{present:r||a,children:d.jsx(zr,{"data-state":a?"visible":"hidden",...n,ref:t})})}),zr=p.forwardRef((e,t)=>{const{orientation:o="vertical",...r}=e,n=Se($e,e.__scopeScrollArea),a=p.useRef(null),s=p.useRef(0),[i,l]=p.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=fi(i.viewport,i.content),f={...r,sizes:i,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:h=>a.current=h,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:h=>s.current=h};function c(h,g){return Ih(h,s.current,i,g)}return o==="horizontal"?d.jsx(Nh,{...f,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){const h=n.viewport.scrollLeft,g=pi(h,i,n.dir);a.current.style.transform=`translate3d(${g}px, 0, 0)`}},onWheelScroll:h=>{n.viewport&&(n.viewport.scrollLeft=h)},onDragScroll:h=>{n.viewport&&(n.viewport.scrollLeft=c(h,n.dir))}}):o==="vertical"?d.jsx(Th,{...f,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){const h=n.viewport.scrollTop,g=pi(h,i);a.current.style.transform=`translate3d(0, ${g}px, 0)`}},onWheelScroll:h=>{n.viewport&&(n.viewport.scrollTop=h)},onDragScroll:h=>{n.viewport&&(n.viewport.scrollTop=c(h))}}):null}),Nh=p.forwardRef((e,t)=>{const{sizes:o,onSizesChange:r,...n}=e,a=Se($e,e.__scopeScrollArea),[s,i]=p.useState(),l=p.useRef(null),u=ae(t,l,a.onScrollbarXChange);return p.useEffect(()=>{l.current&&i(getComputedStyle(l.current))},[l]),d.jsx(ci,{"data-orientation":"horizontal",...n,ref:u,sizes:o,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":No(o)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,c)=>{if(a.viewport){const h=a.viewport.scrollLeft+f.deltaX;e.onWheelScroll(h),gi(h,c)&&f.preventDefault()}},onResize:()=>{l.current&&a.viewport&&s&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Eo(s.paddingLeft),paddingEnd:Eo(s.paddingRight)}})}})}),Th=p.forwardRef((e,t)=>{const{sizes:o,onSizesChange:r,...n}=e,a=Se($e,e.__scopeScrollArea),[s,i]=p.useState(),l=p.useRef(null),u=ae(t,l,a.onScrollbarYChange);return p.useEffect(()=>{l.current&&i(getComputedStyle(l.current))},[l]),d.jsx(ci,{"data-orientation":"vertical",...n,ref:u,sizes:o,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":No(o)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,c)=>{if(a.viewport){const h=a.viewport.scrollTop+f.deltaY;e.onWheelScroll(h),gi(h,c)&&f.preventDefault()}},onResize:()=>{l.current&&a.viewport&&s&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Eo(s.paddingTop),paddingEnd:Eo(s.paddingBottom)}})}})}),[_h,li]=oi($e),ci=p.forwardRef((e,t)=>{const{__scopeScrollArea:o,sizes:r,hasThumb:n,onThumbChange:a,onThumbPointerUp:s,onThumbPointerDown:i,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:f,onResize:c,...h}=e,g=Se($e,o),[b,m]=p.useState(null),v=ae(t,I=>m(I)),w=p.useRef(null),y=p.useRef(""),k=g.viewport,C=r.content-r.viewport,T=pe(f),P=pe(l),_=To(c,10);function E(I){if(w.current){const L=I.clientX-w.current.left,F=I.clientY-w.current.top;u({x:L,y:F})}}return p.useEffect(()=>{const I=L=>{const F=L.target;(b==null?void 0:b.contains(F))&&T(L,C)};return document.addEventListener("wheel",I,{passive:!1}),()=>document.removeEventListener("wheel",I,{passive:!1})},[k,b,C,T]),p.useEffect(P,[r,P]),kt(b,_),kt(g.content,_),d.jsx(_h,{scope:o,scrollbar:b,hasThumb:n,onThumbChange:pe(a),onThumbPointerUp:pe(s),onThumbPositionChange:P,onThumbPointerDown:pe(i),children:d.jsx(K.div,{...h,ref:v,style:{position:"absolute",...h.style},onPointerDown:Z(e.onPointerDown,I=>{I.button===0&&(I.target.setPointerCapture(I.pointerId),w.current=b.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",g.viewport&&(g.viewport.style.scrollBehavior="auto"),E(I))}),onPointerMove:Z(e.onPointerMove,E),onPointerUp:Z(e.onPointerUp,I=>{const L=I.target;L.hasPointerCapture(I.pointerId)&&L.releasePointerCapture(I.pointerId),document.body.style.webkitUserSelect=y.current,g.viewport&&(g.viewport.style.scrollBehavior=""),w.current=null})})})}),Co="ScrollAreaThumb",di=p.forwardRef((e,t)=>{const{forceMount:o,...r}=e,n=li(Co,e.__scopeScrollArea);return d.jsx(Ee,{present:o||n.hasThumb,children:d.jsx(Ph,{ref:t,...r})})}),Ph=p.forwardRef((e,t)=>{const{__scopeScrollArea:o,style:r,...n}=e,a=Se(Co,o),s=li(Co,o),{onThumbPositionChange:i}=s,l=ae(t,c=>s.onThumbChange(c)),u=p.useRef(void 0),f=To(()=>{u.current&&(u.current(),u.current=void 0)},100);return p.useEffect(()=>{const c=a.viewport;if(c){const h=()=>{if(f(),!u.current){const g=Mh(c,i);u.current=g,i()}};return i(),c.addEventListener("scroll",h),()=>c.removeEventListener("scroll",h)}},[a.viewport,f,i]),d.jsx(K.div,{"data-state":s.hasThumb?"visible":"hidden",...n,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Z(e.onPointerDownCapture,c=>{const g=c.target.getBoundingClientRect(),b=c.clientX-g.left,m=c.clientY-g.top;s.onThumbPointerDown({x:b,y:m})}),onPointerUp:Z(e.onPointerUp,s.onThumbPointerUp)})});di.displayName=Co;var Dr="ScrollAreaCorner",ui=p.forwardRef((e,t)=>{const o=Se(Dr,e.__scopeScrollArea),r=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&r?d.jsx(Ah,{...e,ref:t}):null});ui.displayName=Dr;var Ah=p.forwardRef((e,t)=>{const{__scopeScrollArea:o,...r}=e,n=Se(Dr,o),[a,s]=p.useState(0),[i,l]=p.useState(0),u=!!(a&&i);return kt(n.scrollbarX,()=>{var c;const f=((c=n.scrollbarX)==null?void 0:c.offsetHeight)||0;n.onCornerHeightChange(f),l(f)}),kt(n.scrollbarY,()=>{var c;const f=((c=n.scrollbarY)==null?void 0:c.offsetWidth)||0;n.onCornerWidthChange(f),s(f)}),u?d.jsx(K.div,{...r,ref:t,style:{width:a,height:i,position:"absolute",right:n.dir==="ltr"?0:void 0,left:n.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Eo(e){return e?parseInt(e,10):0}function fi(e,t){const o=e/t;return isNaN(o)?0:o}function No(e){const t=fi(e.viewport,e.content),o=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-o)*t;return Math.max(r,18)}function Ih(e,t,o,r="ltr"){const n=No(o),a=n/2,s=t||a,i=n-s,l=o.scrollbar.paddingStart+s,u=o.scrollbar.size-o.scrollbar.paddingEnd-i,f=o.content-o.viewport,c=r==="ltr"?[0,f]:[f*-1,0];return hi([l,u],c)(e)}function pi(e,t,o="ltr"){const r=No(t),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-n,s=t.content-t.viewport,i=a-r,l=o==="ltr"?[0,s]:[s*-1,0],u=Ar(e,l);return hi([0,s],[0,i])(u)}function hi(e,t){return o=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(o-e[0])}}function gi(e,t){return e>0&&e<t}var Mh=(e,t=()=>{})=>{let o={left:e.scrollLeft,top:e.scrollTop},r=0;return(function n(){const a={left:e.scrollLeft,top:e.scrollTop},s=o.left!==a.left,i=o.top!==a.top;(s||i)&&t(),o=a,r=window.requestAnimationFrame(n)})(),()=>window.cancelAnimationFrame(r)};function To(e,t){const o=pe(e),r=p.useRef(0);return p.useEffect(()=>()=>window.clearTimeout(r.current),[]),p.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(o,t)},[o,t])}function kt(e,t){const o=pe(t);ie(()=>{let r=0;if(e){const n=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(o)});return n.observe(e),()=>{window.cancelAnimationFrame(r),n.unobserve(e)}}},[e,o])}var Oh=ri,Lh=ai,zh=ui,Dh=[" ","Enter","ArrowUp","ArrowDown"],$h=[" ","Enter"],it="Select",[_o,Po,Fh]=ta(it),[St]=me(it,[Fh,yo]),Ao=yo(),[Bh,Ze]=St(it),[Hh,Vh]=St(it),mi=e=>{const{__scopeSelect:t,children:o,open:r,defaultOpen:n,onOpenChange:a,value:s,defaultValue:i,onValueChange:l,dir:u,name:f,autoComplete:c,disabled:h,required:g,form:b}=e,m=Ao(t),[v,w]=p.useState(null),[y,k]=p.useState(null),[C,T]=p.useState(!1),P=zt(u),[_,E]=He({prop:r,defaultProp:n??!1,onChange:a,caller:it}),[I,L]=He({prop:s,defaultProp:i,onChange:l,caller:it}),F=p.useRef(null),D=v?b||!!v.closest("form"):!0,[V,j]=p.useState(new Set),G=Array.from(V).map(M=>M.props.value).join(";");return d.jsx(Ns,{...m,children:d.jsxs(Bh,{required:g,scope:t,trigger:v,onTriggerChange:w,valueNode:y,onValueNodeChange:k,valueNodeHasChildren:C,onValueNodeHasChildrenChange:T,contentId:nt(),value:I,onValueChange:L,open:_,onOpenChange:E,dir:P,triggerPointerDownPosRef:F,disabled:h,children:[d.jsx(_o.Provider,{scope:t,children:d.jsx(Hh,{scope:e.__scopeSelect,onNativeOptionAdd:p.useCallback(M=>{j(U=>new Set(U).add(M))},[]),onNativeOptionRemove:p.useCallback(M=>{j(U=>{const N=new Set(U);return N.delete(M),N})},[]),children:o})}),D?d.jsxs(Fi,{"aria-hidden":!0,required:g,tabIndex:-1,name:f,autoComplete:c,value:I,onChange:M=>L(M.target.value),disabled:h,form:b,children:[I===void 0?d.jsx("option",{value:""}):null,Array.from(V)]},G):null]})})};mi.displayName=it;var vi="SelectTrigger",bi=p.forwardRef((e,t)=>{const{__scopeSelect:o,disabled:r=!1,...n}=e,a=Ao(o),s=Ze(vi,o),i=s.disabled||r,l=ae(t,s.onTriggerChange),u=Po(o),f=p.useRef("touch"),[c,h,g]=Hi(m=>{const v=u().filter(k=>!k.disabled),w=v.find(k=>k.value===s.value),y=Vi(v,m,w);y!==void 0&&s.onValueChange(y.value)}),b=m=>{i||(s.onOpenChange(!0),g()),m&&(s.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return d.jsx(Ts,{asChild:!0,...a,children:d.jsx(K.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":Bi(s.value)?"":void 0,...n,ref:l,onClick:Z(n.onClick,m=>{m.currentTarget.focus(),f.current!=="mouse"&&b(m)}),onPointerDown:Z(n.onPointerDown,m=>{f.current=m.pointerType;const v=m.target;v.hasPointerCapture(m.pointerId)&&v.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(b(m),m.preventDefault())}),onKeyDown:Z(n.onKeyDown,m=>{const v=c.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(v&&m.key===" ")&&Dh.includes(m.key)&&(b(),m.preventDefault())})})})});bi.displayName=vi;var wi="SelectValue",yi=p.forwardRef((e,t)=>{const{__scopeSelect:o,className:r,style:n,children:a,placeholder:s="",...i}=e,l=Ze(wi,o),{onValueNodeHasChildrenChange:u}=l,f=a!==void 0,c=ae(t,l.onValueNodeChange);return ie(()=>{u(f)},[u,f]),d.jsx(K.span,{...i,ref:c,style:{pointerEvents:"none"},children:Bi(l.value)?d.jsx(d.Fragment,{children:s}):a})});yi.displayName=wi;var Wh="SelectIcon",xi=p.forwardRef((e,t)=>{const{__scopeSelect:o,children:r,...n}=e;return d.jsx(K.span,{"aria-hidden":!0,...n,ref:t,children:r||"▼"})});xi.displayName=Wh;var Uh="SelectPortal",ki=e=>d.jsx(rr,{asChild:!0,...e});ki.displayName=Uh;var lt="SelectContent",Si=p.forwardRef((e,t)=>{const o=Ze(lt,e.__scopeSelect),[r,n]=p.useState();if(ie(()=>{n(new DocumentFragment)},[]),!o.open){const a=r;return a?Ut.createPortal(d.jsx(Ci,{scope:e.__scopeSelect,children:d.jsx(_o.Slot,{scope:e.__scopeSelect,children:d.jsx("div",{children:e.children})})}),a):null}return d.jsx(Ei,{...e,ref:t})});Si.displayName=lt;var _e=10,[Ci,Je]=St(lt),jh="SelectContentImpl",Rh=Lt("SelectContent.RemoveScroll"),Ei=p.forwardRef((e,t)=>{const{__scopeSelect:o,position:r="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:a,onPointerDownOutside:s,side:i,sideOffset:l,align:u,alignOffset:f,arrowPadding:c,collisionBoundary:h,collisionPadding:g,sticky:b,hideWhenDetached:m,avoidCollisions:v,...w}=e,y=Ze(lt,o),[k,C]=p.useState(null),[T,P]=p.useState(null),_=ae(t,B=>C(B)),[E,I]=p.useState(null),[L,F]=p.useState(null),D=Po(o),[V,j]=p.useState(!1),G=p.useRef(!1);p.useEffect(()=>{if(k)return mf(k)},[k]),Pu();const M=p.useCallback(B=>{const[Y,...J]=D().map(te=>te.ref.current),[se]=J.slice(-1),re=document.activeElement;for(const te of B)if(te===re||(te==null||te.scrollIntoView({block:"nearest"}),te===Y&&T&&(T.scrollTop=0),te===se&&T&&(T.scrollTop=T.scrollHeight),te==null||te.focus(),document.activeElement!==re))return},[D,T]),U=p.useCallback(()=>M([E,k]),[M,E,k]);p.useEffect(()=>{V&&U()},[V,U]);const{onOpenChange:N,triggerPointerDownPosRef:A}=y;p.useEffect(()=>{if(k){let B={x:0,y:0};const Y=se=>{var re,te;B={x:Math.abs(Math.round(se.pageX)-(((re=A.current)==null?void 0:re.x)??0)),y:Math.abs(Math.round(se.pageY)-(((te=A.current)==null?void 0:te.y)??0))}},J=se=>{B.x<=10&&B.y<=10?se.preventDefault():k.contains(se.target)||N(!1),document.removeEventListener("pointermove",Y),A.current=null};return A.current!==null&&(document.addEventListener("pointermove",Y),document.addEventListener("pointerup",J,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Y),document.removeEventListener("pointerup",J,{capture:!0})}}},[k,N,A]),p.useEffect(()=>{const B=()=>N(!1);return window.addEventListener("blur",B),window.addEventListener("resize",B),()=>{window.removeEventListener("blur",B),window.removeEventListener("resize",B)}},[N]);const[S,z]=Hi(B=>{const Y=D().filter(re=>!re.disabled),J=Y.find(re=>re.ref.current===document.activeElement),se=Vi(Y,B,J);se&&setTimeout(()=>se.ref.current.focus())}),W=p.useCallback((B,Y,J)=>{const se=!G.current&&!J;(y.value!==void 0&&y.value===Y||se)&&(I(B),se&&(G.current=!0))},[y.value]),O=p.useCallback(()=>k==null?void 0:k.focus(),[k]),q=p.useCallback((B,Y,J)=>{const se=!G.current&&!J;(y.value!==void 0&&y.value===Y||se)&&F(B)},[y.value]),R=r==="popper"?$r:Ni,Q=R===$r?{side:i,sideOffset:l,align:u,alignOffset:f,arrowPadding:c,collisionBoundary:h,collisionPadding:g,sticky:b,hideWhenDetached:m,avoidCollisions:v}:{};return d.jsx(Ci,{scope:o,content:k,viewport:T,onViewportChange:P,itemRefCallback:W,selectedItem:E,onItemLeave:O,itemTextRefCallback:q,focusSelectedItem:U,selectedItemText:L,position:r,isPositioned:V,searchRef:S,children:d.jsx(Pa,{as:Rh,allowPinchZoom:!0,children:d.jsx(ua,{asChild:!0,trapped:y.open,onMountAutoFocus:B=>{B.preventDefault()},onUnmountAutoFocus:Z(n,B=>{var Y;(Y=y.trigger)==null||Y.focus({preventScroll:!0}),B.preventDefault()}),children:d.jsx(er,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:B=>B.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:d.jsx(R,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:B=>B.preventDefault(),...w,...Q,onPlaced:()=>j(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:Z(w.onKeyDown,B=>{const Y=B.ctrlKey||B.altKey||B.metaKey;if(B.key==="Tab"&&B.preventDefault(),!Y&&B.key.length===1&&z(B.key),["ArrowUp","ArrowDown","Home","End"].includes(B.key)){let se=D().filter(re=>!re.disabled).map(re=>re.ref.current);if(["ArrowUp","End"].includes(B.key)&&(se=se.slice().reverse()),["ArrowUp","ArrowDown"].includes(B.key)){const re=B.target,te=se.indexOf(re);se=se.slice(te+1)}setTimeout(()=>M(se)),B.preventDefault()}})})})})})})});Ei.displayName=jh;var Gh="SelectItemAlignedPosition",Ni=p.forwardRef((e,t)=>{const{__scopeSelect:o,onPlaced:r,...n}=e,a=Ze(lt,o),s=Je(lt,o),[i,l]=p.useState(null),[u,f]=p.useState(null),c=ae(t,_=>f(_)),h=Po(o),g=p.useRef(!1),b=p.useRef(!0),{viewport:m,selectedItem:v,selectedItemText:w,focusSelectedItem:y}=s,k=p.useCallback(()=>{if(a.trigger&&a.valueNode&&i&&u&&m&&v&&w){const _=a.trigger.getBoundingClientRect(),E=u.getBoundingClientRect(),I=a.valueNode.getBoundingClientRect(),L=w.getBoundingClientRect();if(a.dir!=="rtl"){const re=L.left-E.left,te=I.left-re,ce=_.left-te,de=_.width+ce,ct=Math.max(de,E.width),Qe=window.innerWidth-_e,Pe=Ar(te,[_e,Math.max(_e,Qe-ct)]);i.style.minWidth=de+"px",i.style.left=Pe+"px"}else{const re=E.right-L.right,te=window.innerWidth-I.right-re,ce=window.innerWidth-_.right-te,de=_.width+ce,ct=Math.max(de,E.width),Qe=window.innerWidth-_e,Pe=Ar(te,[_e,Math.max(_e,Qe-ct)]);i.style.minWidth=de+"px",i.style.right=Pe+"px"}const F=h(),D=window.innerHeight-_e*2,V=m.scrollHeight,j=window.getComputedStyle(u),G=parseInt(j.borderTopWidth,10),M=parseInt(j.paddingTop,10),U=parseInt(j.borderBottomWidth,10),N=parseInt(j.paddingBottom,10),A=G+M+V+N+U,S=Math.min(v.offsetHeight*5,A),z=window.getComputedStyle(m),W=parseInt(z.paddingTop,10),O=parseInt(z.paddingBottom,10),q=_.top+_.height/2-_e,R=D-q,Q=v.offsetHeight/2,B=v.offsetTop+Q,Y=G+M+B,J=A-Y;if(Y<=q){const re=F.length>0&&v===F[F.length-1].ref.current;i.style.bottom="0px";const te=u.clientHeight-m.offsetTop-m.offsetHeight,ce=Math.max(R,Q+(re?O:0)+te+U),de=Y+ce;i.style.height=de+"px"}else{const re=F.length>0&&v===F[0].ref.current;i.style.top="0px";const ce=Math.max(q,G+m.offsetTop+(re?W:0)+Q)+J;i.style.height=ce+"px",m.scrollTop=Y-q+m.offsetTop}i.style.margin=`${_e}px 0`,i.style.minHeight=S+"px",i.style.maxHeight=D+"px",r==null||r(),requestAnimationFrame(()=>g.current=!0)}},[h,a.trigger,a.valueNode,i,u,m,v,w,a.dir,r]);ie(()=>k(),[k]);const[C,T]=p.useState();ie(()=>{u&&T(window.getComputedStyle(u).zIndex)},[u]);const P=p.useCallback(_=>{_&&b.current===!0&&(k(),y==null||y(),b.current=!1)},[k,y]);return d.jsx(Yh,{scope:o,contentWrapper:i,shouldExpandOnScrollRef:g,onScrollButtonChange:P,children:d.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:d.jsx(K.div,{...n,ref:c,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});Ni.displayName=Gh;var qh="SelectPopperPosition",$r=p.forwardRef((e,t)=>{const{__scopeSelect:o,align:r="start",collisionPadding:n=_e,...a}=e,s=Ao(o);return d.jsx(_s,{...s,...a,ref:t,align:r,collisionPadding:n,style:{boxSizing:"border-box",...a.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)"}})});$r.displayName=qh;var[Yh,Fr]=St(lt,{}),Br="SelectViewport",Ti=p.forwardRef((e,t)=>{const{__scopeSelect:o,nonce:r,...n}=e,a=Je(Br,o),s=Fr(Br,o),i=ae(t,a.onViewportChange),l=p.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),d.jsx(_o.Slot,{scope:o,children:d.jsx(K.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:Z(n.onScroll,u=>{const f=u.currentTarget,{contentWrapper:c,shouldExpandOnScrollRef:h}=s;if(h!=null&&h.current&&c){const g=Math.abs(l.current-f.scrollTop);if(g>0){const b=window.innerHeight-_e*2,m=parseFloat(c.style.minHeight),v=parseFloat(c.style.height),w=Math.max(m,v);if(w<b){const y=w+g,k=Math.min(b,y),C=y-k;c.style.height=k+"px",c.style.bottom==="0px"&&(f.scrollTop=C>0?C:0,c.style.justifyContent="flex-end")}}}l.current=f.scrollTop})})})]})});Ti.displayName=Br;var _i="SelectGroup",[Xh,Kh]=St(_i),Zh=p.forwardRef((e,t)=>{const{__scopeSelect:o,...r}=e,n=nt();return d.jsx(Xh,{scope:o,id:n,children:d.jsx(K.div,{role:"group","aria-labelledby":n,...r,ref:t})})});Zh.displayName=_i;var Pi="SelectLabel",Jh=p.forwardRef((e,t)=>{const{__scopeSelect:o,...r}=e,n=Kh(Pi,o);return d.jsx(K.div,{id:n.id,...r,ref:t})});Jh.displayName=Pi;var Io="SelectItem",[Qh,Ai]=St(Io),Ii=p.forwardRef((e,t)=>{const{__scopeSelect:o,value:r,disabled:n=!1,textValue:a,...s}=e,i=Ze(Io,o),l=Je(Io,o),u=i.value===r,[f,c]=p.useState(a??""),[h,g]=p.useState(!1),b=ae(t,y=>{var k;return(k=l.itemRefCallback)==null?void 0:k.call(l,y,r,n)}),m=nt(),v=p.useRef("touch"),w=()=>{n||(i.onValueChange(r),i.onOpenChange(!1))};if(r==="")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 d.jsx(Qh,{scope:o,value:r,disabled:n,textId:m,isSelected:u,onItemTextChange:p.useCallback(y=>{c(k=>k||((y==null?void 0:y.textContent)??"").trim())},[]),children:d.jsx(_o.ItemSlot,{scope:o,value:r,disabled:n,textValue:f,children:d.jsx(K.div,{role:"option","aria-labelledby":m,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...s,ref:b,onFocus:Z(s.onFocus,()=>g(!0)),onBlur:Z(s.onBlur,()=>g(!1)),onClick:Z(s.onClick,()=>{v.current!=="mouse"&&w()}),onPointerUp:Z(s.onPointerUp,()=>{v.current==="mouse"&&w()}),onPointerDown:Z(s.onPointerDown,y=>{v.current=y.pointerType}),onPointerMove:Z(s.onPointerMove,y=>{var k;v.current=y.pointerType,n?(k=l.onItemLeave)==null||k.call(l):v.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Z(s.onPointerLeave,y=>{var k;y.currentTarget===document.activeElement&&((k=l.onItemLeave)==null||k.call(l))}),onKeyDown:Z(s.onKeyDown,y=>{var C;((C=l.searchRef)==null?void 0:C.current)!==""&&y.key===" "||($h.includes(y.key)&&w(),y.key===" "&&y.preventDefault())})})})})});Ii.displayName=Io;var Bt="SelectItemText",Mi=p.forwardRef((e,t)=>{const{__scopeSelect:o,className:r,style:n,...a}=e,s=Ze(Bt,o),i=Je(Bt,o),l=Ai(Bt,o),u=Vh(Bt,o),[f,c]=p.useState(null),h=ae(t,w=>c(w),l.onItemTextChange,w=>{var y;return(y=i.itemTextRefCallback)==null?void 0:y.call(i,w,l.value,l.disabled)}),g=f==null?void 0:f.textContent,b=p.useMemo(()=>d.jsx("option",{value:l.value,disabled:l.disabled,children:g},l.value),[l.disabled,l.value,g]),{onNativeOptionAdd:m,onNativeOptionRemove:v}=u;return ie(()=>(m(b),()=>v(b)),[m,v,b]),d.jsxs(d.Fragment,{children:[d.jsx(K.span,{id:l.textId,...a,ref:h}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Ut.createPortal(a.children,s.valueNode):null]})});Mi.displayName=Bt;var Oi="SelectItemIndicator",Li=p.forwardRef((e,t)=>{const{__scopeSelect:o,...r}=e;return Ai(Oi,o).isSelected?d.jsx(K.span,{"aria-hidden":!0,...r,ref:t}):null});Li.displayName=Oi;var Hr="SelectScrollUpButton",zi=p.forwardRef((e,t)=>{const o=Je(Hr,e.__scopeSelect),r=Fr(Hr,e.__scopeSelect),[n,a]=p.useState(!1),s=ae(t,r.onScrollButtonChange);return ie(()=>{if(o.viewport&&o.isPositioned){let i=function(){const u=l.scrollTop>0;a(u)};const l=o.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[o.viewport,o.isPositioned]),n?d.jsx($i,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=o;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});zi.displayName=Hr;var Vr="SelectScrollDownButton",Di=p.forwardRef((e,t)=>{const o=Je(Vr,e.__scopeSelect),r=Fr(Vr,e.__scopeSelect),[n,a]=p.useState(!1),s=ae(t,r.onScrollButtonChange);return ie(()=>{if(o.viewport&&o.isPositioned){let i=function(){const u=l.scrollHeight-l.clientHeight,f=Math.ceil(l.scrollTop)<u;a(f)};const l=o.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[o.viewport,o.isPositioned]),n?d.jsx($i,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=o;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});Di.displayName=Vr;var $i=p.forwardRef((e,t)=>{const{__scopeSelect:o,onAutoScroll:r,...n}=e,a=Je("SelectScrollButton",o),s=p.useRef(null),i=Po(o),l=p.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return p.useEffect(()=>()=>l(),[l]),ie(()=>{var f;const u=i().find(c=>c.ref.current===document.activeElement);(f=u==null?void 0:u.ref.current)==null||f.scrollIntoView({block:"nearest"})},[i]),d.jsx(K.div,{"aria-hidden":!0,...n,ref:t,style:{flexShrink:0,...n.style},onPointerDown:Z(n.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:Z(n.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:Z(n.onPointerLeave,()=>{l()})})}),eg="SelectSeparator",tg=p.forwardRef((e,t)=>{const{__scopeSelect:o,...r}=e;return d.jsx(K.div,{"aria-hidden":!0,...r,ref:t})});tg.displayName=eg;var Wr="SelectArrow",og=p.forwardRef((e,t)=>{const{__scopeSelect:o,...r}=e,n=Ao(o),a=Ze(Wr,o),s=Je(Wr,o);return a.open&&s.position==="popper"?d.jsx(Ps,{...n,...r,ref:t}):null});og.displayName=Wr;var rg="SelectBubbleInput",Fi=p.forwardRef(({__scopeSelect:e,value:t,...o},r)=>{const n=p.useRef(null),a=ae(r,n),s=so(t);return p.useEffect(()=>{const i=n.current;if(!i)return;const l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&f){const c=new Event("change",{bubbles:!0});f.call(i,t),i.dispatchEvent(c)}},[s,t]),d.jsx(K.select,{...o,style:{...Qn,...o.style},ref:a,defaultValue:t})});Fi.displayName=rg;function Bi(e){return e===""||e===void 0}function Hi(e){const t=pe(e),o=p.useRef(""),r=p.useRef(0),n=p.useCallback(s=>{const i=o.current+s;t(i),(function l(u){o.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))})(i)},[t]),a=p.useCallback(()=>{o.current="",window.clearTimeout(r.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(r.current),[]),[o,n,a]}function Vi(e,t,o){const n=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=o?e.indexOf(o):-1;let s=ng(e,Math.max(a,0));n.length===1&&(s=s.filter(u=>u!==o));const l=s.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return l!==o?l:void 0}function ng(e,t){return e.map((o,r)=>e[(t+r)%e.length])}var ag=mi,sg=bi,ig=yi,lg=xi,cg=ki,dg=Si,ug=Ti,fg=Ii,pg=Mi,hg=Li,gg=zi,mg=Di,vg="Separator",Wi="horizontal",bg=["horizontal","vertical"],Ui=p.forwardRef((e,t)=>{const{decorative:o,orientation:r=Wi,...n}=e,a=wg(r)?r:Wi,i=o?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return d.jsx(K.div,{"data-orientation":a,...i,...n,ref:t})});Ui.displayName=vg;function wg(e){return bg.includes(e)}var yg=Ui,Mo="Switch",[xg]=me(Mo),[kg,Sg]=xg(Mo),ji=p.forwardRef((e,t)=>{const{__scopeSwitch:o,name:r,checked:n,defaultChecked:a,required:s,disabled:i,value:l="on",onCheckedChange:u,form:f,...c}=e,[h,g]=p.useState(null),b=ae(t,k=>g(k)),m=p.useRef(!1),v=h?f||!!h.closest("form"):!0,[w,y]=He({prop:n,defaultProp:a??!1,onChange:u,caller:Mo});return d.jsxs(kg,{scope:o,checked:w,disabled:i,children:[d.jsx(K.button,{type:"button",role:"switch","aria-checked":w,"aria-required":s,"data-state":Yi(w),"data-disabled":i?"":void 0,disabled:i,value:l,...c,ref:b,onClick:Z(e.onClick,k=>{y(C=>!C),v&&(m.current=k.isPropagationStopped(),m.current||k.stopPropagation())})}),v&&d.jsx(qi,{control:h,bubbles:!m.current,name:r,value:l,checked:w,required:s,disabled:i,form:f,style:{transform:"translateX(-100%)"}})]})});ji.displayName=Mo;var Ri="SwitchThumb",Gi=p.forwardRef((e,t)=>{const{__scopeSwitch:o,...r}=e,n=Sg(Ri,o);return d.jsx(K.span,{"data-state":Yi(n.checked),"data-disabled":n.disabled?"":void 0,...r,ref:t})});Gi.displayName=Ri;var Cg="SwitchBubbleInput",qi=p.forwardRef(({__scopeSwitch:e,control:t,checked:o,bubbles:r=!0,...n},a)=>{const s=p.useRef(null),i=ae(s,a),l=so(o),u=io(t);return p.useEffect(()=>{const f=s.current;if(!f)return;const c=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(c,"checked").set;if(l!==o&&g){const b=new Event("click",{bubbles:r});g.call(f,o),f.dispatchEvent(b)}},[l,o,r]),d.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o,...n,tabIndex:-1,ref:i,style:{...n.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});qi.displayName=Cg;function Yi(e){return e?"checked":"unchecked"}var Eg=ji,Ng=Gi,Oo="Tabs",[Tg]=me(Oo,[xo]),Xi=xo(),[_g,Ur]=Tg(Oo),Ki=p.forwardRef((e,t)=>{const{__scopeTabs:o,value:r,onValueChange:n,defaultValue:a,orientation:s="horizontal",dir:i,activationMode:l="automatic",...u}=e,f=zt(i),[c,h]=He({prop:r,onChange:n,defaultProp:a??"",caller:Oo});return d.jsx(_g,{scope:o,baseId:nt(),value:c,onValueChange:h,orientation:s,dir:f,activationMode:l,children:d.jsx(K.div,{dir:f,"data-orientation":s,...u,ref:t})})});Ki.displayName=Oo;var Zi="TabsList",Ji=p.forwardRef((e,t)=>{const{__scopeTabs:o,loop:r=!0,...n}=e,a=Ur(Zi,o),s=Xi(o);return d.jsx(zs,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:r,children:d.jsx(K.div,{role:"tablist","aria-orientation":a.orientation,...n,ref:t})})});Ji.displayName=Zi;var Qi="TabsTrigger",el=p.forwardRef((e,t)=>{const{__scopeTabs:o,value:r,disabled:n=!1,...a}=e,s=Ur(Qi,o),i=Xi(o),l=rl(s.baseId,r),u=nl(s.baseId,r),f=r===s.value;return d.jsx(Ds,{asChild:!0,...i,focusable:!n,active:f,children:d.jsx(K.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":u,"data-state":f?"active":"inactive","data-disabled":n?"":void 0,disabled:n,id:l,...a,ref:t,onMouseDown:Z(e.onMouseDown,c=>{!n&&c.button===0&&c.ctrlKey===!1?s.onValueChange(r):c.preventDefault()}),onKeyDown:Z(e.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&s.onValueChange(r)}),onFocus:Z(e.onFocus,()=>{const c=s.activationMode!=="manual";!f&&!n&&c&&s.onValueChange(r)})})})});el.displayName=Qi;var tl="TabsContent",ol=p.forwardRef((e,t)=>{const{__scopeTabs:o,value:r,forceMount:n,children:a,...s}=e,i=Ur(tl,o),l=rl(i.baseId,r),u=nl(i.baseId,r),f=r===i.value,c=p.useRef(f);return p.useEffect(()=>{const h=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(h)},[]),d.jsx(Ee,{present:n||f,children:({present:h})=>d.jsx(K.div,{"data-state":f?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!h,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:c.current?"0s":void 0},children:h&&a})})});ol.displayName=tl;function rl(e,t){return`${e}-trigger-${t}`}function nl(e,t){return`${e}-content-${t}`}var Pg=Ki,Ag=Ji,Ig=el,Mg=ol,[Lo]=me("Tooltip",[yo]),zo=yo(),al="TooltipProvider",Og=700,jr="tooltip.open",[Lg,Rr]=Lo(al),sl=e=>{const{__scopeTooltip:t,delayDuration:o=Og,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:a}=e,s=p.useRef(!0),i=p.useRef(!1),l=p.useRef(0);return p.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),d.jsx(Lg,{scope:t,isOpenDelayedRef:s,delayDuration:o,onOpen:p.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:p.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:i,onPointerInTransitChange:p.useCallback(u=>{i.current=u},[]),disableHoverableContent:n,children:a})};sl.displayName=al;var Ht="Tooltip",[zg,Vt]=Lo(Ht),il=e=>{const{__scopeTooltip:t,children:o,open:r,defaultOpen:n,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,l=Rr(Ht,e.__scopeTooltip),u=zo(t),[f,c]=p.useState(null),h=nt(),g=p.useRef(0),b=s??l.disableHoverableContent,m=i??l.delayDuration,v=p.useRef(!1),[w,y]=He({prop:r,defaultProp:n??!1,onChange:_=>{_?(l.onOpen(),document.dispatchEvent(new CustomEvent(jr))):l.onClose(),a==null||a(_)},caller:Ht}),k=p.useMemo(()=>w?v.current?"delayed-open":"instant-open":"closed",[w]),C=p.useCallback(()=>{window.clearTimeout(g.current),g.current=0,v.current=!1,y(!0)},[y]),T=p.useCallback(()=>{window.clearTimeout(g.current),g.current=0,y(!1)},[y]),P=p.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{v.current=!0,y(!0),g.current=0},m)},[m,y]);return p.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),d.jsx(Ns,{...u,children:d.jsx(zg,{scope:t,contentId:h,open:w,stateAttribute:k,trigger:f,onTriggerChange:c,onTriggerEnter:p.useCallback(()=>{l.isOpenDelayedRef.current?P():C()},[l.isOpenDelayedRef,P,C]),onTriggerLeave:p.useCallback(()=>{b?T():(window.clearTimeout(g.current),g.current=0)},[T,b]),onOpen:C,onClose:T,disableHoverableContent:b,children:o})})};il.displayName=Ht;var Gr="TooltipTrigger",ll=p.forwardRef((e,t)=>{const{__scopeTooltip:o,...r}=e,n=Vt(Gr,o),a=Rr(Gr,o),s=zo(o),i=p.useRef(null),l=ae(t,i,n.onTriggerChange),u=p.useRef(!1),f=p.useRef(!1),c=p.useCallback(()=>u.current=!1,[]);return p.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),d.jsx(Ts,{asChild:!0,...s,children:d.jsx(K.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:l,onPointerMove:Z(e.onPointerMove,h=>{h.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(n.onTriggerEnter(),f.current=!0)}),onPointerLeave:Z(e.onPointerLeave,()=>{n.onTriggerLeave(),f.current=!1}),onPointerDown:Z(e.onPointerDown,()=>{n.open&&n.onClose(),u.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:Z(e.onFocus,()=>{u.current||n.onOpen()}),onBlur:Z(e.onBlur,n.onClose),onClick:Z(e.onClick,n.onClose)})})});ll.displayName=Gr;var qr="TooltipPortal",[Dg,$g]=Lo(qr,{forceMount:void 0}),cl=e=>{const{__scopeTooltip:t,forceMount:o,children:r,container:n}=e,a=Vt(qr,t);return d.jsx(Dg,{scope:t,forceMount:o,children:d.jsx(Ee,{present:o||a.open,children:d.jsx(rr,{asChild:!0,container:n,children:r})})})};cl.displayName=qr;var Ct="TooltipContent",dl=p.forwardRef((e,t)=>{const o=$g(Ct,e.__scopeTooltip),{forceMount:r=o.forceMount,side:n="top",...a}=e,s=Vt(Ct,e.__scopeTooltip);return d.jsx(Ee,{present:r||s.open,children:s.disableHoverableContent?d.jsx(ul,{side:n,...a,ref:t}):d.jsx(Fg,{side:n,...a,ref:t})})}),Fg=p.forwardRef((e,t)=>{const o=Vt(Ct,e.__scopeTooltip),r=Rr(Ct,e.__scopeTooltip),n=p.useRef(null),a=ae(t,n),[s,i]=p.useState(null),{trigger:l,onClose:u}=o,f=n.current,{onPointerInTransitChange:c}=r,h=p.useCallback(()=>{i(null),c(!1)},[c]),g=p.useCallback((b,m)=>{const v=b.currentTarget,w={x:b.clientX,y:b.clientY},y=Wg(w,v.getBoundingClientRect()),k=Ug(w,y),C=jg(m.getBoundingClientRect()),T=Gg([...k,...C]);i(T),c(!0)},[c]);return p.useEffect(()=>()=>h(),[h]),p.useEffect(()=>{if(l&&f){const b=v=>g(v,f),m=v=>g(v,l);return l.addEventListener("pointerleave",b),f.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",b),f.removeEventListener("pointerleave",m)}}},[l,f,g,h]),p.useEffect(()=>{if(s){const b=m=>{const v=m.target,w={x:m.clientX,y:m.clientY},y=(l==null?void 0:l.contains(v))||(f==null?void 0:f.contains(v)),k=!Rg(w,s);y?h():k&&(h(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[l,f,s,u,h]),d.jsx(ul,{...e,ref:a})}),[Bg,Hg]=Lo(Ht,{isInside:!1}),Vg=Rd("TooltipContent"),ul=p.forwardRef((e,t)=>{const{__scopeTooltip:o,children:r,"aria-label":n,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,l=Vt(Ct,o),u=zo(o),{onClose:f}=l;return p.useEffect(()=>(document.addEventListener(jr,f),()=>document.removeEventListener(jr,f)),[f]),p.useEffect(()=>{if(l.trigger){const c=h=>{const g=h.target;g!=null&&g.contains(l.trigger)&&f()};return window.addEventListener("scroll",c,{capture:!0}),()=>window.removeEventListener("scroll",c,{capture:!0})}},[l.trigger,f]),d.jsx(er,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:c=>c.preventDefault(),onDismiss:f,children:d.jsxs(_s,{"data-state":l.stateAttribute,...u,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[d.jsx(Vg,{children:r}),d.jsx(Bg,{scope:o,isInside:!0,children:d.jsx(Jd,{id:l.contentId,role:"tooltip",children:n||r})})]})})});dl.displayName=Ct;var fl="TooltipArrow",pl=p.forwardRef((e,t)=>{const{__scopeTooltip:o,...r}=e,n=zo(o);return Hg(fl,o).isInside?null:d.jsx(Ps,{...n,...r,ref:t})});pl.displayName=fl;function Wg(e,t){const o=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),n=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(o,r,n,a)){case a:return"left";case n:return"right";case o:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Ug(e,t,o=5){const r=[];switch(t){case"top":r.push({x:e.x-o,y:e.y+o},{x:e.x+o,y:e.y+o});break;case"bottom":r.push({x:e.x-o,y:e.y-o},{x:e.x+o,y:e.y-o});break;case"left":r.push({x:e.x+o,y:e.y-o},{x:e.x+o,y:e.y+o});break;case"right":r.push({x:e.x-o,y:e.y-o},{x:e.x-o,y:e.y+o});break}return r}function jg(e){const{top:t,right:o,bottom:r,left:n}=e;return[{x:n,y:t},{x:o,y:t},{x:o,y:r},{x:n,y:r}]}function Rg(e,t){const{x:o,y:r}=e;let n=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],l=t[s],u=i.x,f=i.y,c=l.x,h=l.y;f>r!=h>r&&o<(c-u)*(r-f)/(h-f)+u&&(n=!n)}return n}function Gg(e){const t=e.slice();return t.sort((o,r)=>o.x<r.x?-1:o.x>r.x?1:o.y<r.y?-1:o.y>r.y?1:0),qg(t)}function qg(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const n=e[r];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(n.y-s.y)>=(a.y-s.y)*(n.x-s.x))t.pop();else break}t.push(n)}t.pop();const o=[];for(let r=e.length-1;r>=0;r--){const n=e[r];for(;o.length>=2;){const a=o[o.length-1],s=o[o.length-2];if((a.x-s.x)*(n.y-s.y)>=(a.y-s.y)*(n.x-s.x))o.pop();else break}o.push(n)}return o.pop(),t.length===1&&o.length===1&&t[0].x===o[0].x&&t[0].y===o[0].y?t:t.concat(o)}var Yg=sl,Xg=il,Kg=ll,Zg=cl,Jg=dl,Qg=pl;const em=Kt("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function hl({className:e,variant:t="default",size:o="default",asChild:r=!1,...n}){const a=r?Zn:"button";return d.jsx(a,{"data-slot":"button","data-variant":t,"data-size":o,className:X(em({variant:t,size:o,className:e})),...n})}const tm={amber:"bg-amber-100 text-amber-800",blue:"bg-blue-100 text-blue-800",emerald:"bg-emerald-100 text-emerald-800",red:"bg-red-100 text-red-800",purple:"bg-purple-100 text-purple-800",pink:"bg-pink-100 text-pink-800",gray:"bg-gray-100 text-gray-800"},om=Kt("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function rm({className:e,variant:t="default",hue:o,asChild:r=!1,...n}){const a=r?Zn:"span",s=o?tm[o]:void 0;return d.jsx(a,{"data-slot":"badge","data-variant":t,className:X(om({variant:t}),s,e),...n})}function nm({className:e,type:t,...o}){return d.jsx("input",{type:t,"data-slot":"input",className:X("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",e),...o})}function am({className:e,...t}){return d.jsx("textarea",{"data-slot":"textarea",className:X("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",e),...t})}function sm({...e}){return d.jsx(ag,{"data-slot":"select",...e})}function im({...e}){return d.jsx(ig,{"data-slot":"select-value",...e})}function lm({className:e,size:t="default",children:o,...r}){return d.jsxs(sg,{"data-slot":"select-trigger","data-size":t,className:X("flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",e),...r,children:[o,d.jsx(lg,{asChild:!0,children:d.jsx(bn,{className:"size-4 opacity-50"})})]})}function cm({className:e,children:t,position:o="item-aligned",align:r="center",...n}){return d.jsx(cg,{children:d.jsxs(dg,{"data-slot":"select-content",className:X("relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",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,align:r,...n,children:[d.jsx(um,{}),d.jsx(ug,{className:X("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),d.jsx(fm,{})]})})}function dm({className:e,children:t,...o}){return d.jsxs(fg,{"data-slot":"select-item",className:X("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...o,children:[d.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(hg,{children:d.jsx(vn,{className:"size-4"})})}),d.jsx(pg,{children:t})]})}function um({className:e,...t}){return d.jsx(gg,{"data-slot":"select-scroll-up-button",className:X("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx($c,{className:"size-4"})})}function fm({className:e,...t}){return d.jsx(mg,{"data-slot":"select-scroll-down-button",className:X("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(bn,{className:"size-4"})})}function pm({className:e,...t}){return d.jsx(Wa,{"data-slot":"checkbox",className:X("peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs transition-shadow outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary",e),...t,children:d.jsx(ja,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none",children:d.jsx(vn,{className:"size-3.5"})})})}function hm({className:e,size:t="default",...o}){return d.jsx(Eg,{"data-slot":"switch","data-size":t,className:X("peer group/switch inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80",e),...o,children:d.jsx(Ng,{"data-slot":"switch-thumb",className:X("pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground")})})}function gm({className:e,...t}){return d.jsx(th,{"data-slot":"label",className:X("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function mm({className:e,...t}){return d.jsx(wh,{"data-slot":"radio-group",className:X("grid gap-3",e),...t})}function vm({className:e,...t}){return d.jsx(yh,{"data-slot":"radio-group-item",className:X("aspect-square size-4 shrink-0 rounded-full border border-input text-primary shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:ring-destructive/40",e),...t,children:d.jsx(xh,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:d.jsx(Bc,{className:"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 fill-primary"})})})}function bm({className:e,orientation:t="horizontal",decorative:o=!0,...r}){return d.jsx(yg,{"data-slot":"separator",decorative:o,orientation:t,className:X("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...r})}function wm({className:e,orientation:t="horizontal",...o}){return d.jsx(Pg,{"data-slot":"tabs","data-orientation":t,orientation:t,className:X("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",e),...o})}const ym=Kt("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function xm({className:e,variant:t="default",...o}){return d.jsx(Ag,{"data-slot":"tabs-list","data-variant":t,className:X(ym({variant:t}),e),...o})}function km({className:e,...t}){return d.jsx(Ig,{"data-slot":"tabs-trigger",className:X("cursor-pointer relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent","data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100",e),...t})}function Sm({className:e,...t}){return d.jsx(Mg,{"data-slot":"tabs-content",className:X("flex-1 outline-none",e),...t})}function Cm({className:e,children:t,...o}){return d.jsxs(Oh,{"data-slot":"scroll-area",className:X("relative",e),...o,children:[d.jsx(Lh,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",children:t}),d.jsx(Em,{}),d.jsx(zh,{})]})}function Em({className:e,orientation:t="vertical",...o}){return d.jsx(si,{"data-slot":"scroll-area-scrollbar",orientation:t,className:X("flex touch-none p-px transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...o,children:d.jsx(di,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}function Yr({className:e,size:t="default",...o}){return d.jsx(Ef,{"data-slot":"avatar","data-size":t,className:X("group/avatar relative flex size-8 shrink-0 overflow-hidden rounded-full select-none data-[size=lg]:size-10 data-[size=sm]:size-6",e),...o})}function Xr({className:e,...t}){return d.jsx(Nf,{"data-slot":"avatar-image",className:X("aspect-square size-full",e),...t})}function Kr({className:e,...t}){return d.jsx(Tf,{"data-slot":"avatar-fallback",className:X("flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",e),...t})}function Nm({className:e,...t}){return d.jsx("div",{"data-slot":"skeleton",className:X("animate-pulse rounded-md bg-accent",e),...t})}function Tm({delayDuration:e=0,...t}){return d.jsx(Yg,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function _m({...e}){return d.jsx(Xg,{"data-slot":"tooltip",...e})}function Pm({...e}){return d.jsx(Kg,{"data-slot":"tooltip-trigger",...e})}function Am({className:e,sideOffset:t=0,children:o,...r}){return d.jsx(Zg,{children:d.jsxs(Jg,{"data-slot":"tooltip-content",sideOffset:t,className:X("z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-foreground px-3 py-1.5 text-xs text-balance text-background fade-in-0 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",e),...r,children:[o,d.jsx(Qg,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]})})}function Im({className:e,value:t,...o}){return d.jsx(lh,{"data-slot":"progress",className:X("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...o,children:d.jsx(ch,{"data-slot":"progress-indicator",className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})})}const Mm=Kt("relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current"}},defaultVariants:{variant:"default"}});function Om({className:e,variant:t,...o}){return d.jsx("div",{"data-slot":"alert",role:"alert",className:X(Mm({variant:t}),e),...o})}function Lm({className:e,...t}){return d.jsx("div",{"data-slot":"alert-title",className:X("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),...t})}function zm({className:e,...t}){return d.jsx("div",{"data-slot":"alert-description",className:X("col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed",e),...t})}function Dm({...e}){return d.jsx(uu,{"data-slot":"collapsible",...e})}function $m({...e}){return d.jsx(na,{"data-slot":"collapsible-trigger",...e})}function Fm({...e}){return d.jsx(aa,{"data-slot":"collapsible-content",...e})}const Et=e=>e==null?void 0:e===!0||e==="true",gl={"arrow-left":Mc,calendar:zc,"check-circle-2":yn,"chevron-left":Dc,"chevron-right":Wo,clock:Hc,"credit-card":Wc,"external-link":Uc,"help-circle":xn,info:Gt,"loader-2":Uo,mail:jo,"map-pin":Rc,"message-circle":kn,"message-square":Ro,package:qc,phone:Yc,search:Kc,"shopping-bag":Zc,sparkles:Sn,truck:Qc,user:Cn,"x-circle":Fc,"alert-circle":wn,"book-open":Oc},ml={0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8",10:"gap-10",12:"gap-12"},vl={default:"text-foreground",muted:"text-muted-foreground",destructive:"text-destructive"},bl=e=>typeof e=="number"?ml[String(e)]??"gap-2":typeof e=="string"?ml[e.trim()]??"gap-2":"gap-2",Bm=({children:e,className:t,onClick:o})=>d.jsx(Mt,{className:t,onClick:o,children:e}),Hm=({children:e,className:t})=>d.jsx(Ot,{className:t,children:e}),Vm=({children:e,className:t})=>d.jsx(Ud,{className:t,children:e}),Wm=({children:e,className:t,onClick:o,variant:r,size:n,disabled:a,title:s})=>d.jsx(hl,{className:t,variant:r,size:n,onClick:o,disabled:Et(a),title:s,children:e}),Um=({children:e,className:t,variant:o,hue:r,tone:n})=>d.jsx(rm,{className:X(vl[n]??"",t),variant:o,hue:r,children:e}),jm=({className:e,onChange:t,...o})=>d.jsx(nm,{className:e,onChange:t,...o}),Rm=({className:e,onChange:t,...o})=>d.jsx(am,{className:e,onChange:t,...o}),Gm=({children:e,className:t,value:o,defaultValue:r,onChange:n,placeholder:a,disabled:s})=>d.jsxs(sm,{value:o,defaultValue:r,onValueChange:i=>{const l=n;l==null||l({target:{value:i}})},disabled:Et(s),children:[d.jsx(lm,{className:t,children:d.jsx(im,{placeholder:a})}),d.jsx(cm,{style:{zIndex:"calc(var(--widget-z, 1000) + 1)"},children:e})]}),qm=({children:e,value:t,disabled:o,className:r})=>d.jsx(dm,{value:t,disabled:Et(o),className:r,children:e}),Ym=({checked:e,onChange:t,disabled:o,className:r,id:n})=>{const a=e!==void 0,s=t;return d.jsx(pm,{...a?{checked:e==="true"||e===!0}:{},onCheckedChange:i=>s==null?void 0:s({target:{value:String(i)}}),disabled:Et(o),className:r,id:n})},Xm=({checked:e,onChange:t,disabled:o,size:r,className:n,id:a})=>{const s=e!==void 0,i=t;return d.jsx(hm,{...s?{checked:e==="true"||e===!0}:{},onCheckedChange:l=>i==null?void 0:i({target:{value:String(l)}}),disabled:Et(o),size:r,className:n,id:a})},Km=({children:e,htmlFor:t,className:o})=>d.jsx(gm,{htmlFor:t,className:o,children:e}),Zm=({children:e,value:t,defaultValue:o,onChange:r,className:n})=>d.jsx(mm,{value:t,defaultValue:o,onValueChange:a=>{const s=r;s==null||s({target:{value:a}})},className:n,children:e}),Jm=({value:e,disabled:t,className:o,id:r})=>d.jsx(vm,{value:e,disabled:Et(t),className:o,id:r}),Qm=({className:e})=>d.jsx(bm,{className:e}),ev=({children:e,defaultValue:t,className:o})=>{const[r,n]=x.useState(t);return d.jsx(wm,{value:r,onValueChange:n,className:o,children:e})},tv=({children:e,className:t})=>d.jsx(xm,{className:t,children:e}),ov=({children:e,value:t,className:o})=>d.jsx(km,{className:o,value:t,children:e}),rv=({children:e,value:t,className:o})=>d.jsx(Sm,{className:o,value:t,children:e}),nv=({children:e,className:t})=>d.jsx(Cm,{className:t,children:e}),av=({src:e,alt:t,className:o})=>{var r;return d.jsxs(Yr,{className:o,children:[d.jsx(Xr,{src:e,alt:t}),d.jsx(Kr,{children:((r=t==null?void 0:t.charAt(0))==null?void 0:r.toUpperCase())||"?"})]})},sv=({width:e,height:t,className:o})=>d.jsx(Nm,{className:o,style:{width:e,height:t}}),iv=({children:e,content:t,className:o})=>d.jsx(Tm,{children:d.jsxs(_m,{children:[d.jsx(Pm,{asChild:!0,children:d.jsx("span",{className:o,children:e})}),d.jsx(Am,{children:d.jsx("p",{children:String(t)})})]})}),lv=({value:e,className:t})=>d.jsx(Im,{value:typeof e=="string"?Number(e):e,className:t}),cv={default:Gt,destructive:wn},dv=({children:e,variant:t,title:o,className:r})=>{const n=t,a=cv[n||"default"]||Gt;return d.jsxs(Om,{variant:n,className:r,children:[d.jsx(a,{className:"size-4"}),o?d.jsx(Lm,{children:String(o)}):null,e?d.jsx(zm,{children:e}):null]})},uv=({children:e,defaultOpen:t,className:o})=>d.jsx(Dm,{defaultOpen:t==="true"||t===!0,className:o,children:e}),fv=({children:e,className:t})=>d.jsxs($m,{className:X("flex items-center gap-1 cursor-pointer text-sm font-medium [&[data-state=open]>svg]:rotate-90",t),children:[d.jsx(Wo,{className:"size-4 shrink-0 transition-transform duration-200"}),e]}),pv=({children:e,className:t})=>d.jsx(Fm,{className:t,children:e}),hv=({children:e,className:t,tone:o})=>d.jsx("p",{className:X("text-sm",vl[o]??"",t),children:e}),gv=({children:e,className:t,level:o})=>{const r=`h${o||"2"}`;return d.jsx(r,{className:X("font-semibold tracking-tight",t),children:e})},mv=({children:e,className:t,direction:o,gap:r})=>{const n=o==="row"?"flex-row":"flex-col",a=bl(r);return d.jsx("div",{className:X("flex",n,a,t),children:e})},vv=({children:e,className:t,gap:o})=>{const r=bl(o);return d.jsx("div",{className:X("flex flex-row items-center",r,t),children:e})},bv=({children:e,className:t,href:o,target:r,rel:n})=>d.jsx("a",{href:o,target:r,rel:n,className:t,children:e}),wv=({title:e,children:t,className:o})=>d.jsxs(Mt,{className:X("overflow-hidden p-0 gap-0 shadow-sm",o),children:[e?d.jsx(Ot,{className:"px-6 py-3",children:d.jsx("h3",{className:"text-xs font-semibold tracking-wider text-muted-foreground",children:String(e)})}):null,d.jsx("div",{className:"flex flex-col gap-0 divide-y divide-border",children:t})]}),yv=({icon:e,label:t,description:o,onClick:r,className:n})=>{const a=e,s="size-5",i=a?gl[a]:null;return d.jsxs("button",{type:"button",className:X("w-full h-auto px-6 py-6 flex items-center gap-2 justify-start cursor-pointer text-left rounded-none transition-colors hover:bg-accent/70",n),onClick:r,children:[i&&d.jsx(i,{className:`${s} shrink-0 text-muted-foreground`}),d.jsxs("div",{className:"flex flex-col gap-0 flex-1 min-w-0 items-start",children:[t?d.jsx("p",{className:"font-medium text-sm text-foreground",children:String(t)}):null,o?d.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:String(o)}):null]}),d.jsx(Wo,{className:"mr-1 size-4 shrink-0 text-muted-foreground"})]})},xv=({name:e,size:t,className:o})=>{const n={sm:"size-3",md:"size-5",lg:"size-6"}[t]??"size-4",a=e,s=gl[a],i=a==="sparkles"?"sparkle-icon":"";return s?d.jsx(s,{className:X(n,i,o)}):d.jsx("span",{className:X("inline-block",n,i,o),"data-icon":a})},kv=()=>({"ui-card":Bm,"ui-card-content":Hm,"ui-card-header":Vm,"ui-button":Wm,"ui-text":hv,"ui-heading":gv,"ui-badge":Um,"ui-input":jm,"ui-textarea":Rm,"ui-select":Gm,"ui-select-option":qm,"ui-checkbox":Ym,"ui-switch":Xm,"ui-label":Km,"ui-radio-group":Zm,"ui-radio-group-item":Jm,"ui-stack":mv,"ui-inline":vv,"ui-separator":Qm,"ui-tabs":ev,"ui-tabs-list":tv,"ui-tabs-trigger":ov,"ui-tabs-content":rv,"ui-scroll-area":nv,"ui-avatar":av,"ui-icon":xv,"ui-link":bv,"ui-menu-item":yv,"ui-menu":wv,"ui-skeleton":sv,"ui-tooltip":iv,"ui-progress":lv,"ui-alert":dv,"ui-collapsible":uv,"ui-collapsible-trigger":fv,"ui-collapsible-content":pv}),wl="/api/ecommerce",yl=async(e,t)=>{const o=t?`${t.replace(/\/$/,"")}${wl}`:wl,r=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),n=await r.json();if(!r.ok)throw new Error(n.error||"API request failed");return n.data},Sv=({className:e})=>d.jsxs("svg",{width:"100%",height:"100%",viewBox:"0 0 190 190",version:"1.1",className:e,children:[d.jsx("g",{transform:"matrix(1,0,0,1,-160.365,27.97)",children:d.jsx("path",{d:"M344.73,67.03C344.73,30.01 314.72,0 277.7,0C240.68,0 210.67,30.01 210.67,67.03L255.36,67.03C255.36,54.69 265.36,44.69 277.7,44.69C290.04,44.69 300.05,54.69 300.05,67.03L344.73,67.03Z",fill:"rgb(15,13,25)"})}),d.jsx("g",{transform:"matrix(1,0,0,1,-160.365,27.97)",children:d.jsx("path",{d:"M300.04,67.03C300.04,54.69 290.05,44.69 277.7,44.69C265.35,44.69 255.36,54.69 255.36,67.03L300.04,67.03Z",fill:"rgb(232,218,234)"})}),d.jsx("g",{transform:"matrix(1,0,0,1,-160.365,27.97)",children:d.jsx("path",{d:"M166,67.03C166,104.05 196.01,134.06 233.03,134.06C270.05,134.06 300.06,104.05 300.06,67.03L255.37,67.03C255.37,79.37 245.37,89.37 233.03,89.37C220.69,89.37 210.69,79.37 210.69,67.03L166,67.03Z",fill:"rgb(15,13,25)"})}),d.jsx("g",{transform:"matrix(1,0,0,1,-160.365,27.97)",children:d.jsx("path",{d:"M210.68,67.03C210.68,79.37 220.68,89.37 233.03,89.37C245.38,89.37 255.37,79.37 255.37,67.03L210.68,67.03Z",fill:"rgb(252,248,161)"})})]}),xl="stackable-dev-badge-styles",Cv=()=>{if(typeof document>"u"||document.getElementById(xl))return;const e=document.createElement("style");e.id=xl,e.textContent=`
286
291
  @keyframes stackable-icon-wiggle {
287
292
  0% { transform: rotate(0deg); }
288
293
  70% { transform: rotate(200deg); }
289
294
  85% { transform: rotate(175deg); }
290
295
  100% { transform: rotate(180deg); }
291
296
  }
292
- `,document.head.appendChild(e)},Sv=e=>{const t=e.some(r=>r.mode==="staging"),o=e.some(r=>r.mode==="dev");return t&&o?"Dev + Staging":t?"Staging Mode":"Dev Mode"},Cv=e=>e.mode==="staging"?"STAGING":"DEV",Ev=({className:e="",extensions:t=[],tokenErrors:o=new Map})=>{const[r,n]=x.useState([]),[a,s]=x.useState(!1),[i,l]=x.useState(!1),[u,f]=x.useState(!1),c=x.useRef(null),h=o.size>0;if(x.useEffect(()=>{kv()},[]),x.useEffect(()=>{if(!h)return;const b=()=>{f(!0),setTimeout(()=>f(!1),600)};b();const m=setInterval(b,4e3);return()=>clearInterval(m)},[h]),x.useEffect(()=>{if(typeof window>"u")return;const b=()=>{const v=hn(window.location.search);n(v)};b();const m=()=>b();return window.addEventListener("popstate",m),()=>window.removeEventListener("popstate",m)},[]),r.length===0)return null;const g=b=>{if(b.stopPropagation(),typeof window>"u")return;const m=new URL(window.location.href);m.searchParams.delete("_stackable_dev"),m.searchParams.delete("_stackable_staging"),window.location.href=m.toString()};return d.jsxs("div",{className:e,style:{position:"fixed",bottom:"16px",left:"50%",transform:i||u?"translate(-50%, -2px)":"translate(-50%, 0)",zIndex:2147483647,fontFamily:"system-ui, -apple-system, sans-serif",transition:"transform 0.15s ease",display:"flex",flexDirection:"column",alignItems:"center"},onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[a&&d.jsx("div",{style:{backgroundColor:"#fff",border:"1px solid #e5e7eb",borderBottom:`1px solid ${h?"#dc2626":"#eab308"}`,borderRadius:"8px 8px 0 0",boxShadow:"0 -4px 16px -4px rgba(0,0,0,0.12), 0 -2px 6px -4px rgba(0,0,0,0.08)",padding:"8px 0",width:"420px",maxWidth:"90vw"},children:r.map((b,m)=>{var v;return d.jsxs("div",{style:{padding:"8px 12px",borderBottom:m<r.length-1?"1px solid #f3f4f6":"none"},children:[d.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[d.jsx("span",{style:{fontSize:"10px",fontWeight:700,color:b.mode==="staging"?"#7c3aed":"#b45309",backgroundColor:b.mode==="staging"?"#ede9fe":"#fef3c7",padding:"1px 5px",borderRadius:"3px",letterSpacing:"0.05em",fontFamily:"ui-monospace, SFMono-Regular, monospace"},children:Cv(b)}),d.jsx("span",{style:{fontSize:"12px",fontWeight:600,color:"#111",fontFamily:"ui-monospace, SFMono-Regular, monospace",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:((v=t.find(w=>w.id===b.extensionId))==null?void 0:v.manifest.name)||b.extensionId})]}),d.jsxs("div",{style:{fontSize:"11px",color:"#6b7280",fontFamily:"ui-monospace, SFMono-Regular, monospace",marginTop:"2px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},title:b.bundleUrl,children:["→ ",b.bundleUrl]}),o.get(b.extensionId)&&d.jsxs("div",{style:{fontSize:"11px",color:"#dc2626",fontFamily:"ui-monospace, SFMono-Regular, monospace",marginTop:"3px"},children:["⚠ ",o.get(b.extensionId)]})]},b.extensionId)})}),d.jsxs("div",{onClick:()=>s(!a),style:{display:"flex",alignItems:"center",gap:"8px",backgroundColor:h?"#dc2626":"#eab308",color:h?"#fff":"#000",padding:"8px 12px",borderRadius:a?"0 0 8px 8px":"8px",boxShadow:i?"0 12px 24px -4px rgba(0,0,0,0.18), 0 6px 10px -4px rgba(0,0,0,0.12)":"0 8px 16px -4px rgba(0,0,0,0.12), 0 4px 6px -4px rgba(0,0,0,0.08)",fontSize:"14px",fontWeight:500,cursor:"pointer",userSelect:"none",transition:"box-shadow 0.15s ease, border-radius 0.1s ease"},children:[d.jsx("span",{ref:c,style:{display:"inline-flex",animation:i&&!a||u?"stackable-icon-wiggle 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97) both":"none"},children:d.jsx(xv,{className:"w-6 h-6"})}),d.jsx("span",{children:Sv(r)}),d.jsxs("span",{style:{fontSize:"12px",opacity:.75},children:["(",r.length," extension",r.length>1?"s":"",")"]}),d.jsx("button",{onClick:g,style:{marginLeft:"4px",backgroundColor:"rgba(0, 0, 0, 0.15)",border:"none",borderRadius:"4px",cursor:"pointer",padding:"2px 8px",fontSize:"12px",fontWeight:500,color:"inherit",fontFamily:"inherit",transition:"background-color 0.1s ease"},onMouseOver:b=>{b.currentTarget.style.backgroundColor="rgba(0, 0, 0, 0.25)"},onMouseOut:b=>{b.currentTarget.style.backgroundColor="rgba(0, 0, 0, 0.15)"},children:"Clear"})]})]})},Nv=800,Wt=(e,t)=>e?`${e.replace(/\/$/,"")}${t}`:t,Tv=async(e,t,o,r)=>{const n=new Map,a=new Map;return await Promise.all(e.filter(s=>s.manifest.permissions.includes("data:fetch")).map(async s=>{const i=r.find(h=>h.extensionId===s.id),l=i==null?void 0:i.token,u=i==null?void 0:i.mode,f=Wt(t,"/proxy-token"),c=await fetch(f,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({appId:o,extensionId:s.id,...u&&{mode:u},...l&&{devSessionToken:l}})});if(c.ok){const{token:h,encryptionKey:g}=await c.json();n.set(s.id,{token:h,encryptionKey:g})}else{let h=`Proxy token failed (${c.status})`;u&&!l?h="Session token missing — re-run CLI":u&&(h="Session expired or invalid — re-run CLI"),a.set(s.id,h),console.warn(`[embeddables] Failed to obtain proxy token for extension ${s.id} (${c.status}) — ${h}`)}})),{tokens:n,errors:a}},_v=e=>typeof e=="object"&&e!==null&&e.encrypted===!0&&Array.isArray(e.data),Pv=({instanceId:e,queryApiBase:t,apiBase:o,appId:r,children:n,customerId:a,customerEmail:s,customerName:i})=>{const[l,u]=x.useState([]),[f,c]=x.useState([]),[h,g]=x.useState(new Map),[b,m]=x.useState(new Map),[v,w]=x.useState(!1),[y,k]=x.useState({authenticated:!1,user:null}),[E,_]=x.useState(void 0),P=x.useRef(null),T=x.useRef(new Set),S=x.useMemo(()=>l.filter(N=>N.manifest.permissions.includes("extend:identity")).map(N=>N.id),[l]);x.useEffect(()=>{(async()=>{const A=e;try{if(!A){console.warn("[ExtensionSetup] No instanceId provided; loading no extensions"),u([]),w(!0);return}if(!o||!r){console.warn("[ExtensionSetup] apiBase and appId are required to load extensions"),u([]),w(!0);return}const C=await fetch(Wt(o,`/instances/${r}/${A}`));if(!C.ok){console.warn(`[ExtensionSetup] Instance not found or failed to load: ${A}`),u([]),w(!0);return}const z=await C.json(),H=hn(typeof window<"u"?window.location.search:""),O=await Cc(z,H),{tokens:G,errors:j}=await Tv(O,o,r,H);u(O),c(H),g(new Map(G)),m(j)}catch(C){console.error("Failed to load extensions:",C)}finally{w(!0)}})()},[e,r,o]),x.useEffect(()=>{if(!o||!r||l.length===0)return;const A=setInterval(async()=>{const C=[];await Promise.all(l.filter(z=>z.manifest.permissions.includes("data:fetch")).map(async z=>{const H=f.find(F=>F.extensionId===z.id),O=H==null?void 0:H.token,G=H==null?void 0:H.mode,j=Wt(o,"/proxy-token"),Q=await fetch(j,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({appId:r,extensionId:z.id,...G&&{mode:G},...O&&{devSessionToken:O}})});if(Q.ok){const{token:F,encryptionKey:q}=await Q.json();C.push([z.id,{token:F,encryptionKey:q}])}else console.warn(`[embeddables] Proxy token refresh failed for extension ${z.id} (${Q.status}) — using stale token`)})),C.length>0&&g(z=>{const H=new Map(z);for(const[O,G]of C)H.set(O,G);return H})},3300*1e3);return()=>clearInterval(A)},[l,f,o,r]),x.useEffect(()=>{if(h.size===0)return;const N=A=>{const C=A.data;if((C==null?void 0:C.type)!=="extension-ready")return;const z=C.extensionId,H=l.find(j=>j.id===z);if(!(H!=null&&H.bundleUrl))return;const O=f.find(j=>j.extensionId===z);if(xc(H.bundleUrl)&&(O==null?void 0:O.mode)!=="staging")return;const G=h.get(z);G&&Fe(z,{type:"extension-encryption-key",encryptionKey:G.encryptionKey})};return window.addEventListener("message",N),()=>window.removeEventListener("message",N)},[l,f,h]);const I=x.useCallback((N,A)=>{const C=Pt();for(const[z,H]of C){if(!H.manifest.permissions.includes("events:identity"))continue;const O=H.manifest.events??[];!O.includes("identity")&&!O.includes(N)||Fe(z,{type:"extension-event",eventType:N,payload:{type:N,state:A,timestamp:new Date().toISOString()}})}},[]),D=x.useCallback(N=>{const A=Pt();for(const[C,z]of A){if(!z.manifest.permissions.includes("events:messaging"))continue;const H=z.manifest.events??[];!H.includes("messaging")&&!H.includes("postback")&&!H.includes(`postback:${N.actionName}`)||Fe(C,{type:"extension-event",eventType:"messaging:postback",payload:N})}},[]),L=x.useCallback(async N=>{const A=Pt(),C=[];for(const[H,O]of A){if(!O.manifest.permissions.includes("extend:identity"))continue;const G=new Promise(j=>{const Q=`enrich_${H}_${Date.now()}`,F=q=>{const Z=q.data;(Z==null?void 0:Z.type)!=="extend-identity-response"||Z.id!==Q||(window.removeEventListener("message",F),Z.additionalClaims?j(Z.additionalClaims):j({}))};window.addEventListener("message",F),setTimeout(()=>{window.removeEventListener("message",F),j({})},5e3),Fe(H,{type:"extend-identity-request",id:Q,claims:N})});C.push(G)}if(C.length===0)return{};const z=await Promise.all(C);return Object.assign({},...z)},[]),V=x.useCallback(async N=>{if(!o||!r||!e)return console.warn("[embeddables] signIdentity skipped — missing:",{apiBase:!!o,appId:!!r,instanceId:!!e}),null;const A=Wt(o,`/instances/${r}/${e}/identity`);console.log("[embeddables] Calling identity sign:",{url:A,claims:Object.keys(N)});try{const C=await fetch(A,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(N)});if(!C.ok)return console.warn(`[embeddables] Identity sign failed (${C.status})`),null;const{token:z}=await C.json();return z}catch(C){return console.warn("[embeddables] Identity sign request failed:",C),null}},[o,r,e]),W=x.useCallback(N=>{const A=window.zE;A&&A("messenger","loginUser",async C=>{C(N)})},[]),U=x.useCallback(()=>{const N=window.zE;N&&N("messenger","logoutUser")},[]),J=x.useCallback(N=>{console.log("[embeddables] Running sign lifecycle for user:",N.id);const{email:A,name:C}=N,z={external_id:String(N.id)};(async()=>{const H=await L({...z,email:A,name:C});console.log("[embeddables] Enriched claims:",H);const O=await V({...z,...H,email:A,name:C});console.log("[embeddables] Sign result:",{hasToken:!!O}),O&&W(O)})()},[L,V,W]),M=x.useCallback(N=>{if(S.length>0&&T.current.size<S.length){console.log(`[embeddables] Deferring sign lifecycle — waiting for extend:identity extensions: ${T.current.size}/${S.length} ready`),P.current=N;return}console.log("[embeddables] No extend:identity extensions (or all ready) — signing immediately"),J(N)},[S,J]);x.useEffect(()=>{if(!v){console.log("[embeddables] Identity effect skipped — extensions not loaded yet");return}if(console.log("[embeddables] Identity effect running",{initialized:v,customerId:!!a,extendExtensions:S.length}),a){console.log("[embeddables] Identity from props:",{customerId:a,customerEmail:s,customerName:i});const N={authenticated:!0,user:{id:String(a),email:s,name:i,provider:"shopify"}};k(A=>{var C,z;return A.authenticated&&((C=A.user)==null?void 0:C.id)===((z=N.user)==null?void 0:z.id)?A:(console.log("[embeddables] Identity state changed (props), starting sign lifecycle"),M(N.user),I("identity.login",N),N)})}else{if(a===void 0)return;k(N=>N.authenticated?(console.log("[embeddables] Customer props cleared, logging out"),U(),I("identity.logout",{authenticated:!1,user:null}),{authenticated:!1,user:null}):N)}},[v,a,s,i,S,M,I,U]),x.useEffect(()=>{if(!v||a!==void 0)return;const N=()=>{const C=document.getElementById("stackable-identity");if(C)try{const z=JSON.parse(C.textContent??"{}"),H={authenticated:!0,user:{id:String(z.customerId??""),email:z.customerEmail,name:z.customerName,provider:"shopify"}};k(O=>{var G,j;return O.authenticated&&((G=O.user)==null?void 0:G.id)===((j=H.user)==null?void 0:j.id)?O:(console.log("[embeddables] Identity state changed (DOM), starting sign lifecycle"),M(H.user),I("identity.login",H),H)})}catch{console.warn("[embeddables] Failed to parse #stackable-identity JSON")}else k(z=>z.authenticated?(U(),I("identity.logout",{authenticated:!1,user:null}),{authenticated:!1,user:null}):z)};N();const A=new MutationObserver(N);return A.observe(document.head,{childList:!0,subtree:!0}),A.observe(document.body,{childList:!0,subtree:!0}),()=>A.disconnect()},[v,a,M,I,U]),x.useEffect(()=>{if(!y.authenticated)return;const N=A=>{const C=A.data;if((C==null?void 0:C.type)!=="extension-ready")return;const z=C.extensionId,H=l.find(G=>G.id===z);if(!(H!=null&&H.manifest.permissions.includes("events:identity")))return;const O=H.manifest.events??[];!O.includes("identity")&&!O.includes("identity.login")||Fe(z,{type:"extension-event",eventType:"identity.login",payload:{type:"identity.login",state:y,timestamp:new Date().toISOString()}})};return window.addEventListener("message",N),()=>window.removeEventListener("message",N)},[y,l]),x.useEffect(()=>{if(S.length===0)return;const N=C=>{const z=C.data;if((z==null?void 0:z.type)!=="extension-ready")return;const H=z.extensionId;if(S.includes(H)&&(T.current.add(H),console.log(`[embeddables] extend:identity extension ready: ${H} (${T.current.size}/${S.length})`),T.current.size>=S.length&&P.current)){console.log("[embeddables] All extend:identity extensions ready, running deferred sign lifecycle");const O=P.current;P.current=null,J(O)}};window.addEventListener("message",N);const A=setTimeout(()=>{if(P.current){console.warn(`[embeddables] extend:identity timeout (5s) — signing with ${T.current.size}/${S.length} extensions ready`);const C=P.current;P.current=null,J(C)}},5e3);return()=>{window.removeEventListener("message",N),clearTimeout(A)}},[S,J]),x.useEffect(()=>{const N=A=>{const{detail:C}=A;C!=null&&C.actionName&&D({type:"postback",actionName:C.actionName,conversationId:C.conversationId??"",timestamp:new Date().toISOString()})};return window.addEventListener("stackable:messaging:postback",N),()=>window.removeEventListener("stackable:messaging:postback",N)},[D]),x.useEffect(()=>{if(!v)return;const N={customerId:a??"",customerEmail:s??"",customerName:i??"",identity:y,messaging:E},A=Pt();for(const[C,z]of A)z.manifest.permissions.includes("context:read")&&Fe(C,{type:"context-push",context:N})},[v,a,s,i,y,E]),x.useEffect(()=>{const N=A=>{const{detail:C}=A;C&&_(z=>({...z,...C}))};return window.addEventListener("stackable:messaging:context",N),()=>window.removeEventListener("stackable:messaging:context",N)},[]);const R=x.useMemo(()=>({"data.query":async N=>yl(N,t),"data.fetch":async(N,A)=>{const C=h.get(N);if(!C)return{status:0,ok:!1,data:{error:"data.fetch: proxy token unavailable — ensure the extension has data:fetch permission and allowedDomains configured"}};const z=_v(A)?A:{url:A.url,method:A.method??"GET",headers:A.headers??{},body:A.body??null},H=Wt(o,"/proxy"),O=await fetch(H,{method:"POST",headers:{"Content-Type":"application/json","X-Extension-Id":N,"X-Application-Id":r??"",Authorization:`Bearer ${C.token}`},body:JSON.stringify(z)}),G=await O.json();return{status:G.status??O.status,ok:G.ok??O.ok,data:G.data}},"actions.toast":async(N,A)=>{const C={...A.description&&{description:A.description},...A.duration&&{duration:A.duration},...A.position&&{position:A.position},...A.dismissible!=null&&{dismissible:A.dismissible},...A.closeButton!=null&&{closeButton:A.closeButton}};if(A.fetch){const z=O=>new Promise(G=>setTimeout(G,O)),H=Promise.all([R["data.fetch"](N,A.fetch),z(Nv)]).then(([O])=>O);pt.promise(H,{loading:A.loading??A.message,success:A.success??A.message,error:A.error??"Something went wrong",...C});return}switch(A.type){case"success":{pt.success(A.message,C);break}case"error":{pt.error(A.message,C);break}case"warning":{pt.warning(A.message,C);break}case"info":{pt.info(A.message,C);break}default:pt(A.message,C)}},"actions.invoke":async N=>(window.dispatchEvent(new CustomEvent(`stackable:action:${N.action}`,{detail:N})),{success:!0}),"context.read":async()=>({customerId:a??"",customerEmail:s??"",customerName:i??"",identity:y,messaging:E})}),[o,r,t,a,s,i,h,y,E]);return v?d.jsxs(d.Fragment,{children:[d.jsx(Wl,{extensions:l,capabilityHandlers:R,components:yv(),children:n}),d.jsx(Ev,{extensions:l,tokenErrors:b})]}):null};var Av=(e,t,o,r,n,a,s,i)=>{let l=document.documentElement,u=["light","dark"];function f(g){(Array.isArray(e)?e:[e]).forEach(b=>{let m=b==="class",v=m&&a?n.map(w=>a[w]||w):n;m?(l.classList.remove(...v),l.classList.add(a&&a[g]?a[g]:g)):l.setAttribute(b,g)}),c(g)}function c(g){i&&u.includes(g)&&(l.style.colorScheme=g)}function h(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)f(r);else try{let g=localStorage.getItem(t)||o,b=s&&g==="system"?h():g;f(b)}catch{}},Iv=p.createContext(void 0),Mv={setTheme:e=>{},themes:[]},Ov=()=>{var e;return(e=p.useContext(Iv))!=null?e:Mv};p.memo(({forcedTheme:e,storageKey:t,attribute:o,enableSystem:r,enableColorScheme:n,defaultTheme:a,value:s,themes:i,nonce:l,scriptProps:u})=>{let f=JSON.stringify([o,t,a,e,i,s,r,n]).slice(1,-1);return p.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(${Av.toString()})(${f})`}})});const Lv=({...e})=>{const{theme:t="system"}=Ov();return d.jsx(yc,{theme:t,className:"toaster group",icons:{success:d.jsx(yn,{className:"size-4"}),info:d.jsx(Gt,{className:"size-4"}),warning:d.jsx(Kc,{className:"size-4"}),error:d.jsx(Rc,{className:"size-4"}),loading:d.jsx(Uo,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},...e})},zv={dark:"dark",light:"widget-theme-light"},Dv={dark:"dark",light:"light"},$v=({children:e,theme:t="inherit"})=>d.jsxs("div",{"data-id":"widget-body",className:zv[t],style:{position:"relative",transform:"translateZ(0)"},children:[d.jsx("div",{className:"h-[700px] w-[900px] overflow-hidden rounded-md ring ring-zinc-200 dark:ring-zinc-300",children:d.jsx("div",{className:"flex h-full w-full flex-col overflow-hidden rounded-md bg-muted dark:bg-background text-foreground",children:e})}),d.jsx(Lv,{position:"bottom-center",theme:Dv[t]??"system",toastOptions:{descriptionClassName:"!text-muted-foreground"}})]}),Fv={airplay:Ac,"message-circle":kn,"message-square":Ro,headphones:Uc,"help-circle":xn,bot:Oc,sparkles:Sn,zap:Jc},Bv=({className:e})=>d.jsx("svg",{className:Y(e,"scale-125"),viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:d.jsx("path",{d:"M10,18 L6,22 L6,18 L10,18 Z M17,6 C19.7614237,6 22,8.23857625 22,11 C22,13.7614237 19.7614237,16 17,16 L7,16 C4.23857625,16 2,13.7614237 2,11 C2,8.23857625 4.23857625,6 7,6 Z",transform:"translate(12, 14) scale(-1, 1) translate(-12, -14)"})}),Hv=({className:e})=>d.jsxs("svg",{className:e,viewBox:"0 0 190 190",fill:"currentColor","aria-hidden":"true",children:[d.jsxs("g",{id:"sl-half-right",children:[d.jsx("g",{transform:"translate(-160.365,27.97)",children:d.jsx("path",{d:"M344.73,67.03C344.73,30.01 314.72,0 277.7,0C240.68,0 210.67,30.01 210.67,67.03L255.36,67.03C255.36,54.69 265.36,44.69 277.7,44.69C290.04,44.69 300.05,54.69 300.05,67.03L344.73,67.03Z"})}),d.jsx("g",{transform:"translate(-160.365,27.97)",children:d.jsx("path",{d:"M300.04,67.03C300.04,54.69 290.05,44.69 277.7,44.69C265.35,44.69 255.36,54.69 255.36,67.03L300.04,67.03Z",opacity:"0.3"})})]}),d.jsxs("g",{id:"sl-half-left",children:[d.jsx("g",{transform:"translate(-160.365,27.97)",children:d.jsx("path",{d:"M166,67.03C166,104.05 196.01,134.06 233.03,134.06C270.05,134.06 300.06,104.05 300.06,67.03L255.37,67.03C255.37,79.37 245.37,89.37 233.03,89.37C220.69,89.37 210.69,79.37 210.69,67.03L166,67.03Z"})}),d.jsx("g",{transform:"translate(-160.365,27.97)",children:d.jsx("path",{d:"M210.68,67.03C210.68,79.37 220.68,89.37 233.03,89.37C245.38,89.37 255.37,79.37 255.37,67.03L210.68,67.03Z",opacity:"0.3"})})]})]}),kl=400,Vv=kl*.35,Wv=({icon:e,isOpen:t,onClick:o})=>{const r=Fv[e]??Bv,[n,a]=x.useState("idle"),s=x.useRef(t);x.useEffect(()=>{if(s.current===t)return;s.current=t,a("interstitial");const l=setTimeout(()=>a("idle"),Vv);return()=>clearTimeout(l)},[t]);const i=()=>n==="interstitial"?d.jsx(Hv,{}):t?d.jsx(Hc,{}):d.jsx(r,{});return d.jsx("div",{className:"fixed bottom-8 right-8 z-50",children:d.jsx(hl,{size:"icon",className:Y("h-12 w-12 rounded-full cursor-pointer transition-transform duration-300",t?"scale-115":"scale-100 hover:scale-105"),onClick:o,children:d.jsx("span",{className:Y("flex items-center justify-center transition-transform",t&&"rotate-180"),style:{transitionDuration:`${kl}ms`},children:i()})})})},Uv=({children:e,icon:t,theme:o})=>{const[r,n]=x.useState(!1),[a,s]=x.useState(!0),[i,l]=x.useState(!1),u=x.useCallback(()=>{n(f=>!f)},[]);return x.useEffect(()=>{r&&!i&&l(!0)},[r,i]),x.useEffect(()=>{const f=()=>n(m=>!m),c=()=>n(!0),h=()=>n(!1),g=()=>s(!0),b=()=>{n(!1),s(!1)};return window.addEventListener("stackable:action:toggle",f),window.addEventListener("stackable:action:open",c),window.addEventListener("stackable:action:close",h),window.addEventListener("stackable:action:show",g),window.addEventListener("stackable:action:hide",b),()=>{window.removeEventListener("stackable:action:open",c),window.removeEventListener("stackable:action:close",h),window.removeEventListener("stackable:action:toggle",f),window.removeEventListener("stackable:action:show",g),window.removeEventListener("stackable:action:hide",b)}},[]),d.jsxs(d.Fragment,{children:[a&&d.jsx(Wv,{isOpen:r,icon:t,onClick:u}),i&&d.jsx("div",{"data-id":"widget-container",className:Y("overflow-hidden fixed bottom-24 right-8 z-1000 rounded-md shadow-xl transition-all duration-200 ease-out origin-bottom-right",r?"opacity-100 scale-100 translate-y-0 pointer-events-auto":"opacity-0 scale-95 translate-y-2 pointer-events-none"),children:d.jsx($v,{theme:o,children:e})})]})},jv=({href:e,children:t})=>d.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"text-zinc-500 opacity-80 transition-colors hover:text-zinc-900 hover:opacity-100",children:t}),Rv=(e,t)=>{const[o,r]=x.useState(null),[n,a]=x.useState(!1),[s,i]=x.useState(null);return x.useEffect(()=>{if(!e){r(null);return}(async()=>{a(!0),i(null);try{const u=await yl({action:"getCustomer",customerId:e},t);r(u)}catch(u){i(u)}finally{a(!1)}})()},[e,t]),{customer:o,loading:n,error:s}},Gv=({customerId:e,customerEmail:t,queryApiBase:o,children:r})=>{var l,u;const{customer:n,loading:a,error:s}=Rv(e,o);if(a)return d.jsx(Mt,{className:"border-none shadow-none bg-transparent",children:d.jsx(Ot,{className:"flex items-center justify-center p-6",children:d.jsx(Uo,{className:"h-6 w-6 animate-spin text-muted-foreground"})})});if(s||!n){const f=t?t.split("@")[0]:e?`Customer ${e.slice(-4)}`:"Customer",c=f.split(/[\s._-]+/).map(h=>h[0]).join("").slice(0,2).toUpperCase();return d.jsx(Mt,{className:"border-none px-0 py-0 mb-4 shadow-none bg-transparent",children:d.jsxs(Ot,{className:"p-4 pb-0 pt-2",children:[d.jsxs("div",{className:"flex flex-col items-center",children:[d.jsxs(Yr,{className:"h-16 w-16 mb-2 ring-2 ring-background shadow-sm",children:[d.jsx(Xr,{src:`https://ui-avatars.com/api/?name=${encodeURIComponent(f)}&background=7c3aed&color=fff&size=128`,alt:f}),d.jsx(Kr,{className:"text-lg",children:c})]}),d.jsxs("div",{className:"text-center w-full space-y-1",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-foreground/70 font-medium tracking-wide",children:"Welcome,"}),d.jsx("h2",{className:"text-lg font-bold text-foreground leading-tight",children:f})]}),t&&d.jsx("div",{className:"pt-2 flex flex-col items-center gap-1",children:d.jsxs("div",{className:"flex items-center justify-center gap-1.5 text-xs font-semibold text-foreground/75",children:[d.jsx(jo,{className:"h-3 w-3","aria-hidden":"true"}),d.jsx("span",{className:"truncate max-w-[200px]",children:t})]})}),d.jsx("div",{className:"py-1 rounded-lg flex justify-center gap-1",children:r})]})]}),d.jsx("p",{className:"pt-2 text-center text-xs text-muted-foreground",children:"Using fallback profile (customer API returned no data)"})]})})}const i=`${((l=n.first_name)==null?void 0:l[0])||""}${((u=n.last_name)==null?void 0:u[0])||""}`;return d.jsx(Mt,{className:"border-none px-0 py-0 mb-4 shadow-none bg-transparent",children:d.jsx(Ot,{className:"p-4 pb-0 pt-2",children:d.jsxs("div",{className:"flex flex-col items-center",children:[d.jsxs(Yr,{className:"h-16 w-16 mb-2 ring-2 ring-background shadow-sm",children:[d.jsx(Xr,{src:`https://ui-avatars.com/api/?name=${encodeURIComponent(n.name)}&background=7c3aed&color=fff&size=128`,alt:n.name}),d.jsx(Kr,{className:"text-lg",children:i})]}),d.jsxs("div",{className:"text-center w-full space-y-1",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-foreground/70 font-medium tracking-wide",children:"Welcome,"}),d.jsx("h2",{className:"text-lg font-bold text-foreground leading-tight",children:n.name})]}),d.jsx("div",{className:"pt-2 flex flex-col items-center gap-1",children:d.jsxs("div",{className:"flex items-center justify-center gap-1.5 text-xs font-semibold text-foreground/75",children:[d.jsx(jo,{className:"h-3 w-3","aria-hidden":"true"}),d.jsx("span",{className:"truncate max-w-[200px]",children:n.email})]})}),d.jsx("div",{className:"py-1 rounded-lg flex justify-center gap-1",children:r})]})]})})})},Sl=(e,t)=>{x.useEffect(()=>{const o=t.current;if(!o)return;let r=document.getElementById(e);r||(r=document.createElement("div"),r.id=e,r.style.cssText="position:absolute;width:0;height:0;overflow:hidden;pointer-events:none;",document.body.appendChild(r));const n=new MutationObserver(()=>{for(;r.firstChild;)o.appendChild(document.adoptNode(r.firstChild))});return n.observe(r,{childList:!0,subtree:!0}),()=>{n.disconnect(),r==null||r.remove()}},[e,t])},qv=({customization:e})=>{const t=x.useRef(null);return Sl("widget_conversations",t),x.useEffect(()=>{!window.zE||!t.current||e&&window.zE("messenger:set","customization",{conversationList:e})},[e]),d.jsx("div",{ref:t,className:"h-full overflow-hidden"})},Yv=({customization:e})=>{const t=x.useRef(null);return Sl("widget_messages",t),x.useEffect(()=>{!window.zE||!t.current||e&&window.zE("messenger:set","customization",{messageLog:e})},[e]),d.jsx("div",{ref:t,className:"h-full overflow-hidden"})},Zr=e=>{window.dispatchEvent(new CustomEvent("stackable:messaging:context",{detail:e}))},Jr=25,Qr=75,Xv=({header:e,buttons:t,queryApiBase:o,customerId:r="",customerEmail:n="",primaryPercent:a=50})=>{const s=Math.max(Jr,Math.min(Qr,a)),{extensions:i}=cn(),l=x.useMemo(()=>i.some(S=>S.enabled&&(S.manifest.targets.includes("slot.header")||S.manifest.targets.includes("slot.content"))),[i]),[u,f]=x.useState(!1),[c,h]=x.useState(!1),[g,b]=x.useState("extensions"),[m,v]=x.useState(s),[w,y]=x.useState("loading"),k=x.useRef(null),E=x.useCallback(()=>!window.zE||!document.getElementById("widget_conversations")||!document.getElementById("widget_messages")?!1:(window.zE("messenger","render",{mode:"embedded",messageLog:{targetElement:"#widget_messages"},conversationList:{targetElement:"#widget_conversations"}}),window.zE("messenger:set","customization",{common:{hideHeader:!1},messageLog:{hideHeader:!0},conversationList:{hideHeader:!0,hideNewConversationButton:!0}}),!0),[]);x.useEffect(()=>{var V,W;if(E()){y("ready");return}const S=setInterval(()=>{E()&&(y("ready"),clearInterval(S))},100),I=setTimeout(()=>{clearInterval(S),y(U=>U==="ready"?U:(console.warn("Zendesk widget failed to load after 10 seconds"),"error"))},1e4),D=document.querySelector('script[src*="zdassets.com/ekr/snippet"]'),L=(W=(V=D==null?void 0:D.src)==null?void 0:V.match(/key=([a-f0-9-]+)/))==null?void 0:W[1];return L&&fetch(`https://ekr.zdassets.com/compose/${L}`).then(U=>U.text()).then(U=>{var M;const J=(M=U.match(/appId['"]?\s*:\s*['"]([a-f0-9]+)['"]/))==null?void 0:M[1];J&&Zr({appId:J})}).catch(()=>{}),()=>{clearInterval(S),clearTimeout(I)}},[E]);const _=x.useCallback(S=>{const{detail:I}=S;!window.zE||!(I!=null&&I.payload)||window.zE("messenger:ui","newConversation",I.payload)},[]);x.useEffect(()=>(window.addEventListener("stackable:action:newConversation",_),()=>{window.removeEventListener("stackable:action:newConversation",_)}),[_]),x.useEffect(()=>{if(w!=="ready"||!window.zE)return;const S=window.zE("messenger:on","conversationStarted",L=>{var W,U;const V=(U=(W=L==null?void 0:L.payload)==null?void 0:W.conversation)==null?void 0:U.id;V&&Zr({conversationId:V})}),I=window.zE("messenger:on","messagesShown",L=>{var W,U;const V=(U=(W=L==null?void 0:L.payload)==null?void 0:W.conversation)==null?void 0:U.id;V&&Zr({conversationId:V})}),D=window.zE("messenger:on","postbackButtonClicked",L=>{var W;const V=L==null?void 0:L.payload;V!=null&&V.actionName&&window.dispatchEvent(new CustomEvent("stackable:messaging:postback",{detail:{actionName:V.actionName,conversationId:((W=V.conversation)==null?void 0:W.id)??""}}))});return()=>{typeof S=="function"&&S(),typeof I=="function"&&I(),typeof D=="function"&&D()}},[w]),x.useEffect(()=>{if(!u)return;const S=D=>{if(!k.current)return;const L=k.current.getBoundingClientRect();if((c?L.width:L.height)===0)return;const W=c?(D.clientX-L.left)/L.width*100:(D.clientY-L.top)/L.height*100,U=Math.max(Jr,Math.min(Qr,W));v(U)},I=()=>{f(!1),document.body.style.cursor="",document.body.style.userSelect=""};return document.body.style.cursor=c?"col-resize":"row-resize",document.body.style.userSelect="none",window.addEventListener("mousemove",S),window.addEventListener("mouseup",I),window.addEventListener("blur",I),()=>{window.removeEventListener("mousemove",S),window.removeEventListener("mouseup",I),window.removeEventListener("blur",I),document.body.style.cursor="",document.body.style.userSelect=""}},[u,c]),x.useEffect(()=>{if(!k.current)return;const S=k.current,I=()=>{const L=getComputedStyle(S).flexDirection==="row";h(L)};I();const D=new ResizeObserver(I);return D.observe(S),()=>{D.disconnect()}},[]);const P=x.useCallback(S=>{if(S.detail===2){v(s);return}S.preventDefault(),f(!0)},[s]),T={customerId:r,customerEmail:n};return d.jsxs("div",{"data-component":"zendesk-wrapper",className:"flex-1 flex flex-col z-10 overflow-hidden",style:{containerType:"inline-size"},children:[d.jsx("style",{children:'@container (min-width: 42rem) { [data-component="zendesk-wrapper"] > [data-id="panel-layout"] { flex-direction: row; } }'}),d.jsxs("div",{ref:k,"data-id":"panel-layout",className:"relative flex-1 overflow-hidden flex flex-col",children:[l&&d.jsxs("div",{"data-id":"primary-panel",className:"min-h-0 min-w-0 flex-none overflow-hidden flex flex-col",style:{flexBasis:`${m}%`},children:[d.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[d.jsx("h2",{className:"font-semibold text-sm text-foreground",children:g==="extensions"?"My Profile":"My Conversations"}),d.jsxs("div",{className:"flex items-center gap-1",children:[e&&d.jsx("div",{className:"flex mr-1 gap-1",children:e}),d.jsxs("div",{className:"flex rounded-lg bg-muted p-1",children:[t,d.jsx("button",{onClick:()=>b("extensions"),className:Y("rounded-md border border-transparent p-1.5 transition-colors hover:cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",g==="extensions"?"border-border bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),title:"My Profile",children:d.jsx(Cn,{className:"h-4 w-4"})}),d.jsx("button",{onClick:()=>b("conversations"),className:Y("rounded-md border border-transparent p-1.5 transition-colors hover:cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",g==="conversations"?"border-border bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),title:"Conversations",children:d.jsx(Ro,{className:"h-4 w-4"})})]})]})]}),d.jsxs("div",{className:"flex-1 overflow-y-auto p-4 relative",children:[d.jsxs("div",{className:Y("flex flex-col gap-2",g==="conversations"&&"hidden"),children:[d.jsx(Gv,{customerId:r,customerEmail:n,queryApiBase:o,children:d.jsx(jt,{target:"slot.header",context:T,className:"flex-none"})}),d.jsx(jt,{target:"slot.content",context:T,className:"flex flex-col gap-2"})]}),d.jsx("div",{className:Y("h-full rounded-xl border border-zinc-200 bg-white p-2 shadow-sm dark:border-zinc-300",g==="extensions"&&"hidden"),children:w==="error"?d.jsx("div",{className:"flex h-full items-center justify-center p-6 text-center text-sm text-muted-foreground",children:d.jsx("p",{children:"Error loading conversations."})}):d.jsx(qv,{})})]})]}),d.jsxs("div",{"data-id":"secondary-panel",className:"min-h-0 min-w-0 flex-none flex flex-col bg-white",style:{flexBasis:l?`${100-m}%`:"100%"},children:[d.jsx("div",{className:"flex-1 overflow-hidden",children:w==="error"?d.jsx("div",{className:"flex h-full items-center justify-center p-6 text-center text-sm text-muted-foreground",children:d.jsx("p",{children:"Zendesk Messenger could not be loaded. Check that a valid Snippet Key is configured."})}):d.jsx(Yv,{})}),d.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-1 py-1 mr-4 text-xs text-zinc-500",children:[d.jsx(jt,{target:"slot.footer",context:T,className:"flex items-center gap-1",fallback:d.jsxs(d.Fragment,{children:[d.jsx("div",{children:"powered by"}),d.jsx(jv,{href:"https://zendesk.com",children:"Zendesk"})]})}),d.jsx(jt,{target:"slot.footer-links",context:T,className:"flex items-center gap-1",separator:d.jsx("span",{className:"text-zinc-300",children:"/"}),render:({children:S,index:I})=>d.jsxs(d.Fragment,{children:[I===0&&d.jsx("span",{className:"text-zinc-300",children:"+"}),S]})})]})]}),l&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:Y("group/resize absolute z-20 flex items-center justify-center",c?"top-0 bottom-0 w-3 -ml-2.5 cursor-col-resize":"w-full h-3 -mt-2.5 cursor-row-resize"),style:c?{left:`${m}%`}:{top:`${m}%`},onMouseDown:P,role:"separator","aria-label":"Resize panels","aria-orientation":c?"vertical":"horizontal","aria-valuemin":Jr,"aria-valuemax":Qr,"aria-valuenow":Math.round(m),children:d.jsx("div",{className:Y("rounded-full bg-foreground/35 dark:bg-white shadow-[0_0_0_1px_rgba(255,255,255,0.16),0_0_0_1px_rgba(0,0,0,0.22)] transition-all",c?"h-20 w-0.5":"h-0.5 w-20",u?"bg-foreground/70 dark:bg-white opacity-100":"opacity-70 group-hover/resize:bg-foreground/55 dark:group-hover/resize:bg-white group-hover/resize:opacity-100")})}),u&&d.jsx("div",{className:Y("absolute inset-0 z-40",c?"cursor-col-resize":"cursor-row-resize"),onMouseUp:()=>f(!1)})]})]})]})},Kv="ze-snippet",Cl=e=>`https://static.zdassets.com/ekr/snippet.js?key=${encodeURIComponent(e)}`,Zv=(e,t={})=>{if(typeof window>"u"||typeof document>"u"||!e)return Promise.resolve();const{autorender:o=!1,scriptId:r=Kv}=t;window.zEMessenger={autorender:o};const n=document.getElementById(r);if(n){if(n.getAttribute("src")===Cl(e))return Promise.resolve();n.remove()}return new Promise((a,s)=>{const i=document.createElement("script");i.id=r,i.src=Cl(e),i.async=!0,i.onload=()=>a(),i.onerror=()=>s(new Error("Failed to load Zendesk snippet")),document.head.appendChild(i)})},Jv=({queryApiBase:e,apiBase:t,appId:o,theme:r,icon:n,instanceId:a,customerId:s,customerEmail:i,customerName:l,snippetKey:u})=>{const f=r==="dark"||r==="light"?r:"inherit";return x.useEffect(()=>{u&&Zv(u).catch(c=>{console.error("[StackableWidget] Failed to load Zendesk snippet:",c)})},[u]),d.jsx(Pv,{instanceId:a,queryApiBase:e,apiBase:t,appId:o,customerId:s,customerEmail:i,customerName:l,children:d.jsx(Uv,{theme:f,icon:n,children:d.jsx(Xv,{queryApiBase:e,customerId:s,customerEmail:i,primaryPercent:40})})})};class Qv extends HTMLElement{constructor(){super();on(this,"mountNode");on(this,"root");const o=this.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=Ml,o.appendChild(r),this.mountNode=document.createElement("div"),o.appendChild(this.mountNode)}static get observedAttributes(){return["query-api-base","api-base","app-id","instance-id","theme","icon","customer-id","customer-email","customer-name","snippet-key"]}connectedCallback(){this.root=be.createRoot(this.mountNode),this.renderWidget()}disconnectedCallback(){var o;(o=this.root)==null||o.unmount(),this.root=void 0}attributeChangedCallback(){this.renderWidget()}renderWidget(){if(!this.root)return;const o=this.getAttribute("theme")??"";this.mountNode.classList.toggle("dark",o==="dark"),this.root.render(d.jsx(Jv,{theme:o,icon:this.getAttribute("icon")??void 0,queryApiBase:this.getAttribute("query-api-base")??"",apiBase:this.getAttribute("api-base")??void 0,appId:this.getAttribute("app-id")??"",instanceId:this.getAttribute("instance-id")??"",customerId:this.getAttribute("customer-id")??void 0,customerEmail:this.getAttribute("customer-email")??void 0,customerName:this.getAttribute("customer-name")??void 0,snippetKey:this.getAttribute("snippet-key")??""}))}}customElements.get("stackable-widget")||customElements.define("stackable-widget",Qv)}));
297
+ `,document.head.appendChild(e)},Ev=e=>{const t=e.some(r=>r.mode==="staging"),o=e.some(r=>r.mode==="dev");return t&&o?"Dev + Staging":t?"Staging Mode":"Dev Mode"},Nv=e=>e.mode==="staging"?"STAGING":"DEV",Tv=({className:e="",extensions:t=[],tokenErrors:o=new Map})=>{const[r,n]=x.useState([]),[a,s]=x.useState(!1),[i,l]=x.useState(!1),[u,f]=x.useState(!1),c=x.useRef(null),h=o.size>0;if(x.useEffect(()=>{Cv()},[]),x.useEffect(()=>{if(!h)return;const b=()=>{f(!0),setTimeout(()=>f(!1),600)};b();const m=setInterval(b,4e3);return()=>clearInterval(m)},[h]),x.useEffect(()=>{if(typeof window>"u")return;const b=()=>{const v=hn(window.location.search);n(v)};b();const m=()=>b();return window.addEventListener("popstate",m),()=>window.removeEventListener("popstate",m)},[]),r.length===0)return null;const g=b=>{if(b.stopPropagation(),typeof window>"u")return;const m=new URL(window.location.href);m.searchParams.delete("_stackable_dev"),m.searchParams.delete("_stackable_staging"),window.location.href=m.toString()};return d.jsxs("div",{className:e,style:{position:"fixed",bottom:"16px",left:"50%",transform:i||u?"translate(-50%, -2px)":"translate(-50%, 0)",zIndex:2147483647,fontFamily:"system-ui, -apple-system, sans-serif",transition:"transform 0.15s ease",display:"flex",flexDirection:"column",alignItems:"center"},onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[a&&d.jsx("div",{style:{backgroundColor:"#fff",border:"1px solid #e5e7eb",borderBottom:`1px solid ${h?"#dc2626":"#eab308"}`,borderRadius:"8px 8px 0 0",boxShadow:"0 -4px 16px -4px rgba(0,0,0,0.12), 0 -2px 6px -4px rgba(0,0,0,0.08)",padding:"8px 0",width:"420px",maxWidth:"90vw"},children:r.map((b,m)=>{var v;return d.jsxs("div",{style:{padding:"8px 12px",borderBottom:m<r.length-1?"1px solid #f3f4f6":"none"},children:[d.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[d.jsx("span",{style:{fontSize:"10px",fontWeight:700,color:b.mode==="staging"?"#7c3aed":"#b45309",backgroundColor:b.mode==="staging"?"#ede9fe":"#fef3c7",padding:"1px 5px",borderRadius:"3px",letterSpacing:"0.05em",fontFamily:"ui-monospace, SFMono-Regular, monospace"},children:Nv(b)}),d.jsx("span",{style:{fontSize:"12px",fontWeight:600,color:"#111",fontFamily:"ui-monospace, SFMono-Regular, monospace",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:((v=t.find(w=>w.id===b.extensionId))==null?void 0:v.manifest.name)||b.extensionId})]}),d.jsxs("div",{style:{fontSize:"11px",color:"#6b7280",fontFamily:"ui-monospace, SFMono-Regular, monospace",marginTop:"2px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},title:b.bundleUrl,children:["→ ",b.bundleUrl]}),o.get(b.extensionId)&&d.jsxs("div",{style:{fontSize:"11px",color:"#dc2626",fontFamily:"ui-monospace, SFMono-Regular, monospace",marginTop:"3px"},children:["⚠ ",o.get(b.extensionId)]})]},b.extensionId)})}),d.jsxs("div",{onClick:()=>s(!a),style:{display:"flex",alignItems:"center",gap:"8px",backgroundColor:h?"#dc2626":"#eab308",color:h?"#fff":"#000",padding:"8px 12px",borderRadius:a?"0 0 8px 8px":"8px",boxShadow:i?"0 12px 24px -4px rgba(0,0,0,0.18), 0 6px 10px -4px rgba(0,0,0,0.12)":"0 8px 16px -4px rgba(0,0,0,0.12), 0 4px 6px -4px rgba(0,0,0,0.08)",fontSize:"14px",fontWeight:500,cursor:"pointer",userSelect:"none",transition:"box-shadow 0.15s ease, border-radius 0.1s ease"},children:[d.jsx("span",{ref:c,style:{display:"inline-flex",animation:i&&!a||u?"stackable-icon-wiggle 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97) both":"none"},children:d.jsx(Sv,{className:"w-6 h-6"})}),d.jsx("span",{children:Ev(r)}),d.jsxs("span",{style:{fontSize:"12px",opacity:.75},children:["(",r.length," extension",r.length>1?"s":"",")"]}),d.jsx("button",{onClick:g,style:{marginLeft:"4px",backgroundColor:"rgba(0, 0, 0, 0.15)",border:"none",borderRadius:"4px",cursor:"pointer",padding:"2px 8px",fontSize:"12px",fontWeight:500,color:"inherit",fontFamily:"inherit",transition:"background-color 0.1s ease"},onMouseOver:b=>{b.currentTarget.style.backgroundColor="rgba(0, 0, 0, 0.25)"},onMouseOut:b=>{b.currentTarget.style.backgroundColor="rgba(0, 0, 0, 0.15)"},children:"Clear"})]})]})},_v=800,Wt=(e,t)=>e?`${e.replace(/\/$/,"")}${t}`:t,Pv=async(e,t,o,r)=>{const n=new Map,a=new Map;return await Promise.all(e.filter(s=>s.manifest.permissions.includes("data:fetch")).map(async s=>{const i=r.find(h=>h.extensionId===s.id),l=i==null?void 0:i.token,u=i==null?void 0:i.mode,f=Wt(t,"/proxy-token"),c=await fetch(f,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({appId:o,extensionId:s.id,...u&&{mode:u},...l&&{devSessionToken:l}})});if(c.ok){const{token:h,encryptionKey:g}=await c.json();n.set(s.id,{token:h,encryptionKey:g})}else{let h=`Proxy token failed (${c.status})`;u&&!l?h="Session token missing — re-run CLI":u&&(h="Session expired or invalid — re-run CLI"),a.set(s.id,h),console.warn(`[embeddables] Failed to obtain proxy token for extension ${s.id} (${c.status}) — ${h}`)}})),{tokens:n,errors:a}},Av=e=>typeof e=="object"&&e!==null&&e.encrypted===!0&&Array.isArray(e.data),Iv=({instanceId:e,queryApiBase:t,apiBase:o,appId:r,children:n,customerId:a,customerEmail:s,customerName:i})=>{const[l,u]=x.useState([]),[f,c]=x.useState([]),[h,g]=x.useState(new Map),[b,m]=x.useState(new Map),[v,w]=x.useState(!1),[y,k]=x.useState({authenticated:!1,user:null}),[C,T]=x.useState(void 0),P=x.useRef(null),_=x.useRef(new Set),E=x.useMemo(()=>l.filter(N=>N.manifest.permissions.includes("extend:identity")).map(N=>N.id),[l]);x.useEffect(()=>{(async()=>{const A=e;try{if(!A){console.warn("[ExtensionSetup] No instanceId provided; loading no extensions"),u([]),w(!0);return}if(!o||!r){console.warn("[ExtensionSetup] apiBase and appId are required to load extensions"),u([]),w(!0);return}const S=await fetch(Wt(o,`/instances/${r}/${A}`));if(!S.ok){console.warn(`[ExtensionSetup] Instance not found or failed to load: ${A}`),u([]),w(!0);return}const z=await S.json(),W=hn(typeof window<"u"?window.location.search:""),O=await Ec(z,W),{tokens:q,errors:R}=await Pv(O,o,r,W);u(O),c(W),g(new Map(q)),m(R)}catch(S){console.error("Failed to load extensions:",S)}finally{w(!0)}})()},[e,r,o]),x.useEffect(()=>{if(!o||!r||l.length===0)return;const A=setInterval(async()=>{const S=[];await Promise.all(l.filter(z=>z.manifest.permissions.includes("data:fetch")).map(async z=>{const W=f.find(B=>B.extensionId===z.id),O=W==null?void 0:W.token,q=W==null?void 0:W.mode,R=Wt(o,"/proxy-token"),Q=await fetch(R,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({appId:r,extensionId:z.id,...q&&{mode:q},...O&&{devSessionToken:O}})});if(Q.ok){const{token:B,encryptionKey:Y}=await Q.json();S.push([z.id,{token:B,encryptionKey:Y}])}else console.warn(`[embeddables] Proxy token refresh failed for extension ${z.id} (${Q.status}) — using stale token`)})),S.length>0&&g(z=>{const W=new Map(z);for(const[O,q]of S)W.set(O,q);return W})},3300*1e3);return()=>clearInterval(A)},[l,f,o,r]),x.useEffect(()=>{if(h.size===0)return;const N=A=>{const S=A.data;if((S==null?void 0:S.type)!=="extension-ready")return;const z=S.extensionId,W=l.find(R=>R.id===z);if(!(W!=null&&W.bundleUrl))return;const O=f.find(R=>R.extensionId===z);if(kc(W.bundleUrl)&&(O==null?void 0:O.mode)!=="staging")return;const q=h.get(z);q&&Fe(z,{type:"extension-encryption-key",encryptionKey:q.encryptionKey})};return window.addEventListener("message",N),()=>window.removeEventListener("message",N)},[l,f,h]);const I=x.useCallback((N,A)=>{const S=Pt();for(const[z,W]of S){if(!W.manifest.permissions.includes("events:identity"))continue;const O=W.manifest.events??[];!O.includes("identity")&&!O.includes(N)||Fe(z,{type:"extension-event",eventType:N,payload:{type:N,state:A,timestamp:new Date().toISOString()}})}},[]),L=x.useCallback(N=>{const A=Pt();for(const[S,z]of A){if(!z.manifest.permissions.includes("events:messaging"))continue;const W=z.manifest.events??[];!W.includes("messaging")&&!W.includes("postback")&&!W.includes(`postback:${N.actionName}`)||Fe(S,{type:"extension-event",eventType:"messaging:postback",payload:N})}},[]),F=x.useCallback(async N=>{const A=Pt(),S=[];for(const[W,O]of A){if(!O.manifest.permissions.includes("extend:identity"))continue;const q=new Promise(R=>{const Q=`enrich_${W}_${Date.now()}`,B=Y=>{const J=Y.data;(J==null?void 0:J.type)!=="extend-identity-response"||J.id!==Q||(window.removeEventListener("message",B),J.additionalClaims?R(J.additionalClaims):R({}))};window.addEventListener("message",B),setTimeout(()=>{window.removeEventListener("message",B),R({})},5e3),Fe(W,{type:"extend-identity-request",id:Q,claims:N})});S.push(q)}if(S.length===0)return{};const z=await Promise.all(S);return Object.assign({},...z)},[]),D=x.useCallback(async N=>{if(!o||!r||!e)return console.warn("[embeddables] signIdentity skipped — missing:",{apiBase:!!o,appId:!!r,instanceId:!!e}),null;const A=Wt(o,`/instances/${r}/${e}/identity`);console.log("[embeddables] Calling identity sign:",{url:A,claims:Object.keys(N)});try{const S=await fetch(A,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(N)});if(!S.ok)return console.warn(`[embeddables] Identity sign failed (${S.status})`),null;const{token:z}=await S.json();return z}catch(S){return console.warn("[embeddables] Identity sign request failed:",S),null}},[o,r,e]),V=x.useCallback(N=>{const A=window.zE;A&&A("messenger","loginUser",async S=>{S(N)})},[]),j=x.useCallback(()=>{const N=window.zE;N&&N("messenger","logoutUser")},[]),G=x.useCallback(N=>{console.log("[embeddables] Running sign lifecycle for user:",N.id);const{email:A,name:S}=N,z={external_id:String(N.id)};(async()=>{const W=await F({...z,email:A,name:S});console.log("[embeddables] Enriched claims:",W);const O=await D({...z,...W,email:A,name:S});console.log("[embeddables] Sign result:",{hasToken:!!O}),O&&V(O)})()},[F,D,V]),M=x.useCallback(N=>{if(E.length>0&&_.current.size<E.length){console.log(`[embeddables] Deferring sign lifecycle — waiting for extend:identity extensions: ${_.current.size}/${E.length} ready`),P.current=N;return}console.log("[embeddables] No extend:identity extensions (or all ready) — signing immediately"),G(N)},[E,G]);x.useEffect(()=>{if(!v){console.log("[embeddables] Identity effect skipped — extensions not loaded yet");return}if(console.log("[embeddables] Identity effect running",{initialized:v,customerId:!!a,extendExtensions:E.length}),a){console.log("[embeddables] Identity from props:",{customerId:a,customerEmail:s,customerName:i});const N={authenticated:!0,user:{id:String(a),email:s,name:i,provider:"shopify"}};k(A=>{var S,z;return A.authenticated&&((S=A.user)==null?void 0:S.id)===((z=N.user)==null?void 0:z.id)?A:(console.log("[embeddables] Identity state changed (props), starting sign lifecycle"),M(N.user),I("identity.login",N),N)})}else{if(a===void 0)return;k(N=>N.authenticated?(console.log("[embeddables] Customer props cleared, logging out"),j(),I("identity.logout",{authenticated:!1,user:null}),{authenticated:!1,user:null}):N)}},[v,a,s,i,E,M,I,j]),x.useEffect(()=>{if(!v||a!==void 0)return;const N=()=>{const S=document.getElementById("stackable-identity");if(S)try{const z=JSON.parse(S.textContent??"{}"),W={authenticated:!0,user:{id:String(z.customerId??""),email:z.customerEmail,name:z.customerName,provider:"shopify"}};k(O=>{var q,R;return O.authenticated&&((q=O.user)==null?void 0:q.id)===((R=W.user)==null?void 0:R.id)?O:(console.log("[embeddables] Identity state changed (DOM), starting sign lifecycle"),M(W.user),I("identity.login",W),W)})}catch{console.warn("[embeddables] Failed to parse #stackable-identity JSON")}else k(z=>z.authenticated?(j(),I("identity.logout",{authenticated:!1,user:null}),{authenticated:!1,user:null}):z)};N();const A=new MutationObserver(N);return A.observe(document.head,{childList:!0,subtree:!0}),A.observe(document.body,{childList:!0,subtree:!0}),()=>A.disconnect()},[v,a,M,I,j]),x.useEffect(()=>{if(!y.authenticated)return;const N=A=>{const S=A.data;if((S==null?void 0:S.type)!=="extension-ready")return;const z=S.extensionId,W=l.find(q=>q.id===z);if(!(W!=null&&W.manifest.permissions.includes("events:identity")))return;const O=W.manifest.events??[];!O.includes("identity")&&!O.includes("identity.login")||Fe(z,{type:"extension-event",eventType:"identity.login",payload:{type:"identity.login",state:y,timestamp:new Date().toISOString()}})};return window.addEventListener("message",N),()=>window.removeEventListener("message",N)},[y,l]),x.useEffect(()=>{if(E.length===0)return;const N=S=>{const z=S.data;if((z==null?void 0:z.type)!=="extension-ready")return;const W=z.extensionId;if(E.includes(W)&&(_.current.add(W),console.log(`[embeddables] extend:identity extension ready: ${W} (${_.current.size}/${E.length})`),_.current.size>=E.length&&P.current)){console.log("[embeddables] All extend:identity extensions ready, running deferred sign lifecycle");const O=P.current;P.current=null,G(O)}};window.addEventListener("message",N);const A=setTimeout(()=>{if(P.current){console.warn(`[embeddables] extend:identity timeout (5s) — signing with ${_.current.size}/${E.length} extensions ready`);const S=P.current;P.current=null,G(S)}},5e3);return()=>{window.removeEventListener("message",N),clearTimeout(A)}},[E,G]),x.useEffect(()=>{const N=A=>{const{detail:S}=A;S!=null&&S.actionName&&L({type:"postback",actionName:S.actionName,conversationId:S.conversationId??"",timestamp:Dl(new Date().toISOString())})};return window.addEventListener("stackable:messaging:postback",N),()=>window.removeEventListener("stackable:messaging:postback",N)},[L]),x.useEffect(()=>{if(!v)return;const N={customerId:a??"",customerEmail:s??"",customerName:i??"",messaging:C,identity:y},A=Pt();for(const[S,z]of A)z.manifest.permissions.includes("context:read")&&Fe(S,{type:"context-push",context:N})},[v,a,s,i,y,C]),x.useEffect(()=>{const N=A=>{const{detail:S}=A;S&&T(z=>({...z,...S}))};return window.addEventListener("stackable:messaging:context",N),()=>window.removeEventListener("stackable:messaging:context",N)},[]);const U=x.useMemo(()=>({"data.query":async N=>yl(N,t),"data.fetch":async(N,A)=>{const S=h.get(N);if(!S)return{status:0,ok:!1,data:{error:"data.fetch: proxy token unavailable — ensure the extension has data:fetch permission and allowedDomains configured"}};const z=Av(A)?A:{url:A.url,method:A.method??"GET",headers:A.headers??{},body:A.body??null},W=Wt(o,"/proxy"),O=await fetch(W,{method:"POST",headers:{"Content-Type":"application/json","X-Extension-Id":N,"X-Application-Id":r??"",Authorization:`Bearer ${S.token}`},body:JSON.stringify(z)}),q=await O.json();return{status:q.status??O.status,ok:q.ok??O.ok,data:q.data}},"actions.toast":async(N,A)=>{const S={...A.description&&{description:A.description},...A.duration&&{duration:A.duration},...A.position&&{position:A.position},...A.dismissible!=null&&{dismissible:A.dismissible},...A.closeButton!=null&&{closeButton:A.closeButton}};if(A.fetch){const z=O=>new Promise(q=>setTimeout(q,O)),W=Promise.all([U["data.fetch"](N,A.fetch),z(_v)]).then(([O])=>O);pt.promise(W,{loading:A.loading??A.message,success:A.success??A.message,error:A.error??"Something went wrong",...S});return}switch(A.type){case"success":{pt.success(A.message,S);break}case"error":{pt.error(A.message,S);break}case"warning":{pt.warning(A.message,S);break}case"info":{pt.info(A.message,S);break}default:pt(A.message,S)}},"actions.invoke":async N=>(window.dispatchEvent(new CustomEvent(`stackable:action:${N.action}`,{detail:N})),{success:!0}),"context.read":async()=>({customerId:a??"",customerEmail:s??"",customerName:i??"",identity:y,messaging:C})}),[o,r,t,a,s,i,h,y,C]);return v?d.jsxs(d.Fragment,{children:[d.jsx(Ul,{extensions:l,capabilityHandlers:U,components:kv(),children:n}),d.jsx(Tv,{extensions:l,tokenErrors:b})]}):null};var Mv=(e,t,o,r,n,a,s,i)=>{let l=document.documentElement,u=["light","dark"];function f(g){(Array.isArray(e)?e:[e]).forEach(b=>{let m=b==="class",v=m&&a?n.map(w=>a[w]||w):n;m?(l.classList.remove(...v),l.classList.add(a&&a[g]?a[g]:g)):l.setAttribute(b,g)}),c(g)}function c(g){i&&u.includes(g)&&(l.style.colorScheme=g)}function h(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)f(r);else try{let g=localStorage.getItem(t)||o,b=s&&g==="system"?h():g;f(b)}catch{}},Ov=p.createContext(void 0),Lv={setTheme:e=>{},themes:[]},zv=()=>{var e;return(e=p.useContext(Ov))!=null?e:Lv};p.memo(({forcedTheme:e,storageKey:t,attribute:o,enableSystem:r,enableColorScheme:n,defaultTheme:a,value:s,themes:i,nonce:l,scriptProps:u})=>{let f=JSON.stringify([o,t,a,e,i,s,r,n]).slice(1,-1);return p.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(${Mv.toString()})(${f})`}})});const Dv=({...e})=>{const{theme:t="system"}=zv();return d.jsx(xc,{theme:t,className:"toaster group",icons:{success:d.jsx(yn,{className:"size-4"}),info:d.jsx(Gt,{className:"size-4"}),warning:d.jsx(Jc,{className:"size-4"}),error:d.jsx(Gc,{className:"size-4"}),loading:d.jsx(Uo,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},...e})},$v={dark:"dark",light:"widget-theme-light"},Fv={dark:"dark",light:"light"},Bv=({children:e,theme:t="inherit"})=>d.jsxs("div",{"data-id":"widget-body",className:$v[t],style:{position:"relative",transform:"translateZ(0)"},children:[d.jsx("div",{className:"h-[700px] w-[900px] overflow-hidden rounded-md ring ring-zinc-200 dark:ring-zinc-300",children:d.jsx("div",{className:"flex h-full w-full flex-col overflow-hidden rounded-md bg-muted dark:bg-background text-foreground",children:e})}),d.jsx(Dv,{position:"bottom-center",theme:Fv[t]??"system",toastOptions:{descriptionClassName:"!text-muted-foreground"}})]}),Hv={airplay:Ic,"message-circle":kn,"message-square":Ro,headphones:jc,"help-circle":xn,bot:Lc,sparkles:Sn,zap:ed},Vv=({className:e})=>d.jsx("svg",{className:X(e,"scale-125"),viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:d.jsx("path",{d:"M10,18 L6,22 L6,18 L10,18 Z M17,6 C19.7614237,6 22,8.23857625 22,11 C22,13.7614237 19.7614237,16 17,16 L7,16 C4.23857625,16 2,13.7614237 2,11 C2,8.23857625 4.23857625,6 7,6 Z",transform:"translate(12, 14) scale(-1, 1) translate(-12, -14)"})}),Wv=({className:e})=>d.jsxs("svg",{className:e,viewBox:"0 0 190 190",fill:"currentColor","aria-hidden":"true",children:[d.jsxs("g",{id:"sl-half-right",children:[d.jsx("g",{transform:"translate(-160.365,27.97)",children:d.jsx("path",{d:"M344.73,67.03C344.73,30.01 314.72,0 277.7,0C240.68,0 210.67,30.01 210.67,67.03L255.36,67.03C255.36,54.69 265.36,44.69 277.7,44.69C290.04,44.69 300.05,54.69 300.05,67.03L344.73,67.03Z"})}),d.jsx("g",{transform:"translate(-160.365,27.97)",children:d.jsx("path",{d:"M300.04,67.03C300.04,54.69 290.05,44.69 277.7,44.69C265.35,44.69 255.36,54.69 255.36,67.03L300.04,67.03Z",opacity:"0.3"})})]}),d.jsxs("g",{id:"sl-half-left",children:[d.jsx("g",{transform:"translate(-160.365,27.97)",children:d.jsx("path",{d:"M166,67.03C166,104.05 196.01,134.06 233.03,134.06C270.05,134.06 300.06,104.05 300.06,67.03L255.37,67.03C255.37,79.37 245.37,89.37 233.03,89.37C220.69,89.37 210.69,79.37 210.69,67.03L166,67.03Z"})}),d.jsx("g",{transform:"translate(-160.365,27.97)",children:d.jsx("path",{d:"M210.68,67.03C210.68,79.37 220.68,89.37 233.03,89.37C245.38,89.37 255.37,79.37 255.37,67.03L210.68,67.03Z",opacity:"0.3"})})]})]}),kl=400,Uv=kl*.35,jv=({icon:e,isOpen:t,onClick:o})=>{const r=Hv[e]??Vv,[n,a]=x.useState("idle"),s=x.useRef(t);x.useEffect(()=>{if(s.current===t)return;s.current=t,a("interstitial");const l=setTimeout(()=>a("idle"),Uv);return()=>clearTimeout(l)},[t]);const i=()=>n==="interstitial"?d.jsx(Wv,{}):t?d.jsx(Vc,{}):d.jsx(r,{});return d.jsx("div",{className:"fixed bottom-8 right-8 z-50",children:d.jsx(hl,{size:"icon",className:X("h-12 w-12 rounded-full cursor-pointer transition-transform duration-300",t?"scale-115":"scale-100 hover:scale-105"),onClick:o,children:d.jsx("span",{className:X("flex items-center justify-center transition-transform",t&&"rotate-180"),style:{transitionDuration:`${kl}ms`},children:i()})})})},Rv=({children:e,icon:t,theme:o})=>{const[r,n]=x.useState(!1),[a,s]=x.useState(!0),[i,l]=x.useState(!1),u=x.useCallback(()=>{n(f=>!f)},[]);return x.useEffect(()=>{r&&!i&&l(!0)},[r,i]),x.useEffect(()=>{const f=()=>n(m=>!m),c=()=>n(!0),h=()=>n(!1),g=()=>s(!0),b=()=>{n(!1),s(!1)};return window.addEventListener("stackable:action:toggle",f),window.addEventListener("stackable:action:open",c),window.addEventListener("stackable:action:close",h),window.addEventListener("stackable:action:show",g),window.addEventListener("stackable:action:hide",b),()=>{window.removeEventListener("stackable:action:open",c),window.removeEventListener("stackable:action:close",h),window.removeEventListener("stackable:action:toggle",f),window.removeEventListener("stackable:action:show",g),window.removeEventListener("stackable:action:hide",b)}},[]),d.jsxs(d.Fragment,{children:[a&&d.jsx(jv,{isOpen:r,icon:t,onClick:u}),i&&d.jsx("div",{"data-id":"widget-container",className:X("overflow-hidden fixed bottom-24 right-8 z-1000 rounded-md shadow-xl transition-all duration-200 ease-out origin-bottom-right",r?"opacity-100 scale-100 translate-y-0 pointer-events-auto":"opacity-0 scale-95 translate-y-2 pointer-events-none"),children:d.jsx(Bv,{theme:o,children:e})})]})},Gv=({href:e,children:t})=>d.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"text-zinc-500 opacity-80 transition-colors hover:text-zinc-900 hover:opacity-100",children:t}),qv=(e,t)=>{const[o,r]=x.useState(null),[n,a]=x.useState(!1),[s,i]=x.useState(null);return x.useEffect(()=>{if(!e){r(null);return}(async()=>{a(!0),i(null);try{const u=await yl({action:"getCustomer",customerId:e},t);r(u)}catch(u){i(u)}finally{a(!1)}})()},[e,t]),{customer:o,loading:n,error:s}},Yv=({customerId:e,customerEmail:t,queryApiBase:o,children:r})=>{var l,u;const{customer:n,loading:a,error:s}=qv(e,o);if(a)return d.jsx(Mt,{className:"border-none shadow-none bg-transparent",children:d.jsx(Ot,{className:"flex items-center justify-center p-6",children:d.jsx(Uo,{className:"h-6 w-6 animate-spin text-muted-foreground"})})});if(s||!n){const f=t?t.split("@")[0]:e?`Customer ${e.slice(-4)}`:"Customer",c=f.split(/[\s._-]+/).map(h=>h[0]).join("").slice(0,2).toUpperCase();return d.jsx(Mt,{className:"border-none px-0 py-0 mb-4 shadow-none bg-transparent",children:d.jsxs(Ot,{className:"p-4 pb-0 pt-2",children:[d.jsxs("div",{className:"flex flex-col items-center",children:[d.jsxs(Yr,{className:"h-16 w-16 mb-2 ring-2 ring-background shadow-sm",children:[d.jsx(Xr,{src:`https://ui-avatars.com/api/?name=${encodeURIComponent(f)}&background=7c3aed&color=fff&size=128`,alt:f}),d.jsx(Kr,{className:"text-lg",children:c})]}),d.jsxs("div",{className:"text-center w-full space-y-1",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-foreground/70 font-medium tracking-wide",children:"Welcome,"}),d.jsx("h2",{className:"text-lg font-bold text-foreground leading-tight",children:f})]}),t&&d.jsx("div",{className:"pt-2 flex flex-col items-center gap-1",children:d.jsxs("div",{className:"flex items-center justify-center gap-1.5 text-xs font-semibold text-foreground/75",children:[d.jsx(jo,{className:"h-3 w-3","aria-hidden":"true"}),d.jsx("span",{className:"truncate max-w-[200px]",children:t})]})}),d.jsx("div",{className:"py-1 rounded-lg flex justify-center gap-1",children:r})]})]}),d.jsx("p",{className:"pt-2 text-center text-xs text-muted-foreground",children:"Using fallback profile (customer API returned no data)"})]})})}const i=`${((l=n.first_name)==null?void 0:l[0])||""}${((u=n.last_name)==null?void 0:u[0])||""}`;return d.jsx(Mt,{className:"border-none px-0 py-0 mb-4 shadow-none bg-transparent",children:d.jsx(Ot,{className:"p-4 pb-0 pt-2",children:d.jsxs("div",{className:"flex flex-col items-center",children:[d.jsxs(Yr,{className:"h-16 w-16 mb-2 ring-2 ring-background shadow-sm",children:[d.jsx(Xr,{src:`https://ui-avatars.com/api/?name=${encodeURIComponent(n.name)}&background=7c3aed&color=fff&size=128`,alt:n.name}),d.jsx(Kr,{className:"text-lg",children:i})]}),d.jsxs("div",{className:"text-center w-full space-y-1",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-foreground/70 font-medium tracking-wide",children:"Welcome,"}),d.jsx("h2",{className:"text-lg font-bold text-foreground leading-tight",children:n.name})]}),d.jsx("div",{className:"pt-2 flex flex-col items-center gap-1",children:d.jsxs("div",{className:"flex items-center justify-center gap-1.5 text-xs font-semibold text-foreground/75",children:[d.jsx(jo,{className:"h-3 w-3","aria-hidden":"true"}),d.jsx("span",{className:"truncate max-w-[200px]",children:n.email})]})}),d.jsx("div",{className:"py-1 rounded-lg flex justify-center gap-1",children:r})]})]})})})},Sl=(e,t)=>{x.useEffect(()=>{const o=t.current;if(!o)return;let r=document.getElementById(e);r||(r=document.createElement("div"),r.id=e,r.style.cssText="position:absolute;width:0;height:0;overflow:hidden;pointer-events:none;",document.body.appendChild(r));const n=new MutationObserver(()=>{for(;r.firstChild;)o.appendChild(document.adoptNode(r.firstChild))});return n.observe(r,{childList:!0,subtree:!0}),()=>{n.disconnect(),r==null||r.remove()}},[e,t])},Xv=({customization:e})=>{const t=x.useRef(null);return Sl("widget_conversations",t),x.useEffect(()=>{!window.zE||!t.current||e&&window.zE("messenger:set","customization",{conversationList:e})},[e]),d.jsx("div",{ref:t,className:"h-full overflow-hidden"})},Kv=({customization:e})=>{const t=x.useRef(null);return Sl("widget_messages",t),x.useEffect(()=>{!window.zE||!t.current||e&&window.zE("messenger:set","customization",{messageLog:e})},[e]),d.jsx("div",{ref:t,className:"h-full overflow-hidden"})},Zr=e=>{window.dispatchEvent(new CustomEvent("stackable:messaging:context",{detail:e}))},Jr=25,Qr=75,Zv=({header:e,buttons:t,queryApiBase:o,customerId:r="",customerEmail:n="",primaryPercent:a=50})=>{const s=Math.max(Jr,Math.min(Qr,a)),{extensions:i}=cn(),l=x.useMemo(()=>i.some(I=>I.enabled&&(I.manifest.targets.includes("slot.header")||I.manifest.targets.includes("slot.content"))),[i]),[u,f]=x.useState(!1),[c,h]=x.useState(!1),[g,b]=x.useState("extensions"),[m,v]=x.useState(s),[w,y]=x.useState("loading"),k=x.useRef(null),C=x.useCallback(()=>!window.zE||!document.getElementById("widget_conversations")||!document.getElementById("widget_messages")?!1:(window.zE("messenger","render",{mode:"embedded",messageLog:{targetElement:"#widget_messages"},conversationList:{targetElement:"#widget_conversations"}}),window.zE("messenger:set","customization",{common:{hideHeader:!1},messageLog:{hideHeader:!0},conversationList:{hideHeader:!0,hideNewConversationButton:!0}}),!0),[]);x.useEffect(()=>{var V,j;const I=document.querySelector('script[src*="zdassets.com/ekr/snippet"]'),L=(j=(V=I==null?void 0:I.src)==null?void 0:V.match(/key=([a-f0-9-]+)/))==null?void 0:j[1];if(L&&fetch(`https://ekr.zdassets.com/compose/${L}`).then(G=>G.text()).then(G=>{var U;const M=(U=G.match(/appId['"]?\s*:\s*['"]([a-f0-9]+)['"]/))==null?void 0:U[1];M&&Zr({appId:M})}).catch(()=>{}),C()){y("ready");return}const F=setInterval(()=>{C()&&(y("ready"),clearInterval(F))},100),D=setTimeout(()=>{clearInterval(F),y(G=>G==="ready"?G:(console.warn("Zendesk widget failed to load after 10 seconds"),"error"))},1e4);return()=>{clearInterval(F),clearTimeout(D)}},[C]);const T=x.useCallback(I=>{window.zE&&window.zE("messenger:ui","newConversation",I)},[]),P=x.useCallback(I=>{const{detail:L}=I;L!=null&&L.payload&&T(L.payload)},[T]);x.useEffect(()=>(window.addEventListener("stackable:action:newConversation",P),()=>{window.removeEventListener("stackable:action:newConversation",P)}),[P]),x.useEffect(()=>{if(w!=="ready"||!window.zE)return;const I=window.zE("messenger:on","conversationStarted",D=>{var j,G;const V=(G=(j=D==null?void 0:D.payload)==null?void 0:j.conversation)==null?void 0:G.id;V&&Zr({conversationId:V})}),L=window.zE("messenger:on","messagesShown",D=>{var j,G;const V=(G=(j=D==null?void 0:D.payload)==null?void 0:j.conversation)==null?void 0:G.id;V&&Zr({conversationId:V})}),F=window.zE("messenger:on","postbackButtonClicked",D=>{var j;const V=D==null?void 0:D.payload;V!=null&&V.actionName&&window.dispatchEvent(new CustomEvent("stackable:messaging:postback",{detail:{actionName:V.actionName,conversationId:((j=V.conversation)==null?void 0:j.id)??""}}))});return()=>{typeof I=="function"&&I(),typeof L=="function"&&L(),typeof F=="function"&&F()}},[w]),x.useEffect(()=>{if(!u)return;const I=F=>{if(!k.current)return;const D=k.current.getBoundingClientRect();if((c?D.width:D.height)===0)return;const j=c?(F.clientX-D.left)/D.width*100:(F.clientY-D.top)/D.height*100,G=Math.max(Jr,Math.min(Qr,j));v(G)},L=()=>{f(!1),document.body.style.cursor="",document.body.style.userSelect=""};return document.body.style.cursor=c?"col-resize":"row-resize",document.body.style.userSelect="none",window.addEventListener("mousemove",I),window.addEventListener("mouseup",L),window.addEventListener("blur",L),()=>{window.removeEventListener("mousemove",I),window.removeEventListener("mouseup",L),window.removeEventListener("blur",L),document.body.style.cursor="",document.body.style.userSelect=""}},[u,c]),x.useEffect(()=>{if(!k.current)return;const I=k.current,L=()=>{const D=getComputedStyle(I).flexDirection==="row";h(D)};L();const F=new ResizeObserver(L);return F.observe(I),()=>{F.disconnect()}},[]);const _=x.useCallback(I=>{if(I.detail===2){v(s);return}I.preventDefault(),f(!0)},[s]),E={customerId:r,customerEmail:n};return d.jsxs("div",{"data-component":"zendesk-wrapper",className:"flex-1 flex flex-col z-10 overflow-hidden",style:{containerType:"inline-size"},children:[d.jsx("style",{children:'@container (min-width: 42rem) { [data-component="zendesk-wrapper"] > [data-id="panel-layout"] { flex-direction: row; } }'}),d.jsxs("div",{ref:k,"data-id":"panel-layout",className:"relative flex-1 overflow-hidden flex flex-col",children:[l&&d.jsxs("div",{"data-id":"primary-panel",className:"min-h-0 min-w-0 flex-none overflow-hidden flex flex-col",style:{flexBasis:`${m}%`},children:[d.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[d.jsx("h2",{className:"font-semibold text-sm text-foreground",children:g==="extensions"?"My Profile":"My Conversations"}),d.jsxs("div",{className:"flex items-center gap-1",children:[e&&d.jsx("div",{className:"flex gap-1",children:e}),d.jsxs("div",{className:"flex rounded-lg bg-muted p-1",children:[w==="ready"&&d.jsx("button",{onClick:()=>T({}),className:"rounded-md border border-transparent p-1.5 text-muted-foreground transition-colors hover:cursor-pointer hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",title:"New Conversation",children:d.jsx(Xc,{className:"h-4 w-4"})}),t,d.jsx("button",{onClick:()=>b("conversations"),className:X("rounded-md border border-transparent p-1.5 transition-colors hover:cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",g==="conversations"?"border-border bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),title:"Conversations",children:d.jsx(Ro,{className:"h-4 w-4"})}),d.jsx("button",{onClick:()=>b("extensions"),className:X("rounded-md border border-transparent p-1.5 transition-colors hover:cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",g==="extensions"?"border-border bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),title:"My Profile",children:d.jsx(Cn,{className:"h-4 w-4"})})]})]})]}),d.jsxs("div",{className:"flex-1 overflow-y-auto p-4 relative",children:[d.jsxs("div",{className:X("flex flex-col gap-2",g==="conversations"&&"hidden"),children:[d.jsx(Yv,{customerId:r,customerEmail:n,queryApiBase:o,children:d.jsx(jt,{target:"slot.header",context:E,className:"flex-none"})}),d.jsx(jt,{target:"slot.content",context:E,className:"flex flex-col gap-2"})]}),d.jsx("div",{className:X("h-full rounded-xl border border-zinc-200 bg-white p-2 shadow-sm dark:border-zinc-300",g==="extensions"&&"hidden"),children:w==="error"?d.jsx("div",{className:"flex h-full items-center justify-center p-6 text-center text-sm text-muted-foreground",children:d.jsx("p",{children:"Error loading conversations."})}):d.jsx(Xv,{})})]})]}),d.jsxs("div",{"data-id":"secondary-panel",className:"min-h-0 min-w-0 flex-none flex flex-col bg-white",style:{flexBasis:l?`${100-m}%`:"100%"},children:[d.jsx("div",{className:"flex-1 overflow-hidden",children:w==="error"?d.jsx("div",{className:"flex h-full items-center justify-center p-6 text-center text-sm text-muted-foreground",children:d.jsx("p",{children:"Zendesk Messenger could not be loaded. Check that a valid Snippet Key is configured."})}):d.jsx(Kv,{})}),d.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-1 py-1 mr-4 text-xs text-zinc-500",children:[d.jsx(jt,{target:"slot.footer",context:E,className:"flex items-center gap-1",fallback:d.jsxs(d.Fragment,{children:[d.jsx("div",{children:"powered by"}),d.jsx(Gv,{href:"https://zendesk.com",children:"Zendesk"})]})}),d.jsx(jt,{target:"slot.footer-links",context:E,className:"flex items-center gap-1",separator:d.jsx("span",{className:"text-zinc-300",children:"/"}),render:({children:I,index:L})=>d.jsxs(d.Fragment,{children:[L===0&&d.jsx("span",{className:"text-zinc-300",children:"+"}),I]})})]})]}),l&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:X("group/resize absolute z-20 flex items-center justify-center",c?"top-0 bottom-0 w-3 -ml-2.5 cursor-col-resize":"w-full h-3 -mt-2.5 cursor-row-resize"),style:c?{left:`${m}%`}:{top:`${m}%`},onMouseDown:_,role:"separator","aria-label":"Resize panels","aria-orientation":c?"vertical":"horizontal","aria-valuemin":Jr,"aria-valuemax":Qr,"aria-valuenow":Math.round(m),children:d.jsx("div",{className:X("rounded-full bg-foreground/35 dark:bg-white shadow-[0_0_0_1px_rgba(255,255,255,0.16),0_0_0_1px_rgba(0,0,0,0.22)] transition-all",c?"h-20 w-0.5":"h-0.5 w-20",u?"bg-foreground/70 dark:bg-white opacity-100":"opacity-70 group-hover/resize:bg-foreground/55 dark:group-hover/resize:bg-white group-hover/resize:opacity-100")})}),u&&d.jsx("div",{className:X("absolute inset-0 z-40",c?"cursor-col-resize":"cursor-row-resize"),onMouseUp:()=>f(!1)})]})]})]})},Jv="ze-snippet",Cl=e=>`https://static.zdassets.com/ekr/snippet.js?key=${encodeURIComponent(e)}`,Qv=(e,t={})=>{if(typeof window>"u"||typeof document>"u"||!e)return Promise.resolve();const{autorender:o=!1,scriptId:r=Jv}=t;window.zEMessenger={autorender:o};const n=document.getElementById(r);if(n){if(n.getAttribute("src")===Cl(e))return Promise.resolve();n.remove()}return new Promise((a,s)=>{const i=document.createElement("script");i.id=r,i.src=Cl(e),i.async=!0,i.onload=()=>a(),i.onerror=()=>s(new Error("Failed to load Zendesk snippet")),document.head.appendChild(i)})},eb=({queryApiBase:e,apiBase:t,appId:o,theme:r,icon:n,instanceId:a,customerId:s,customerEmail:i,customerName:l,snippetKey:u})=>{const f=r==="dark"||r==="light"?r:"inherit";return x.useEffect(()=>{u&&Qv(u).catch(c=>{console.error("[StackableWidget] Failed to load Zendesk snippet:",c)})},[u]),d.jsx(Iv,{instanceId:a,queryApiBase:e,apiBase:t,appId:o,customerId:s,customerEmail:i,customerName:l,children:d.jsx(Rv,{theme:f,icon:n,children:d.jsx(Zv,{queryApiBase:e,customerId:s,customerEmail:i,primaryPercent:40})})})};class tb extends HTMLElement{constructor(){super();on(this,"mountNode");on(this,"root");const o=this.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=Ml,o.appendChild(r),this.mountNode=document.createElement("div"),o.appendChild(this.mountNode)}static get observedAttributes(){return["query-api-base","api-base","app-id","instance-id","theme","icon","customer-id","customer-email","customer-name","snippet-key"]}connectedCallback(){this.root=be.createRoot(this.mountNode),this.renderWidget()}disconnectedCallback(){var o;(o=this.root)==null||o.unmount(),this.root=void 0}attributeChangedCallback(){this.renderWidget()}renderWidget(){if(!this.root)return;const o=this.getAttribute("theme")??"";this.mountNode.classList.toggle("dark",o==="dark"),this.root.render(d.jsx(eb,{theme:o,icon:this.getAttribute("icon")??void 0,queryApiBase:this.getAttribute("query-api-base")??"",apiBase:this.getAttribute("api-base")??void 0,appId:this.getAttribute("app-id")??"",instanceId:this.getAttribute("instance-id")??"",customerId:this.getAttribute("customer-id")??void 0,customerEmail:this.getAttribute("customer-email")??void 0,customerName:this.getAttribute("customer-name")??void 0,snippetKey:this.getAttribute("snippet-key")??""}))}}customElements.get("stackable-widget")||customElements.define("stackable-widget",tb)}));